fullstacked 0.12.0-1173 → 0.12.0-1184

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 (500) hide show
  1. package/fullstacked_modules/@fullstacked/ai-agent/README.md +1 -0
  2. package/fullstacked_modules/@fullstacked/ai-agent/chat.json +1 -0
  3. package/fullstacked_modules/@fullstacked/ai-agent/index.scss +15 -0
  4. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +92 -0
  5. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +726 -0
  6. package/fullstacked_modules/@fullstacked/ai-agent/package.json +15 -0
  7. package/fullstacked_modules/@fullstacked/ai-agent/src/conversation.ts +169 -0
  8. package/fullstacked_modules/@fullstacked/ai-agent/src/default.scss +23 -0
  9. package/fullstacked_modules/@fullstacked/ai-agent/src/index.ts +3 -0
  10. package/fullstacked_modules/@fullstacked/ai-agent/src/input.ts +36 -0
  11. package/fullstacked_modules/@fullstacked/ai-agent/src/markdown.ts +46 -0
  12. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/interface.ts +6 -0
  13. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +42 -0
  14. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/openai.ts +33 -0
  15. package/fullstacked_modules/@fullstacked/ai-agent/story.txt +7 -0
  16. package/fullstacked_modules/ai/index.d.ts +2 -0
  17. package/fullstacked_modules/ai/index.js +88268 -0
  18. package/fullstacked_modules/ai/index.ts +14 -0
  19. package/fullstacked_modules/ai/package.json +5 -0
  20. package/fullstacked_modules/ai/tools/fs.ts +60 -0
  21. package/{lib → fullstacked_modules}/archive/archive.ts +140 -140
  22. package/fullstacked_modules/archive/index.d.ts +2 -0
  23. package/{lib → fullstacked_modules}/archive/index.ts +4 -4
  24. package/{lib → fullstacked_modules}/base64.ts +144 -144
  25. package/fullstacked_modules/bridge/index.ts +120 -0
  26. package/{lib → fullstacked_modules}/bridge/platform/android.ts +18 -18
  27. package/{lib → fullstacked_modules}/bridge/platform/apple.ts +46 -46
  28. package/{lib → fullstacked_modules}/bridge/platform/electron.ts +14 -14
  29. package/{lib → fullstacked_modules}/bridge/platform/linux-gtk.ts +48 -48
  30. package/{lib → fullstacked_modules}/bridge/platform/linux-qt.ts +68 -68
  31. package/{lib → fullstacked_modules}/bridge/platform/node.ts +32 -32
  32. package/{lib → fullstacked_modules}/bridge/platform/wasm.ts +17 -17
  33. package/{lib → fullstacked_modules}/bridge/platform/windows.ts +49 -49
  34. package/{lib → fullstacked_modules}/bridge/serialization.ts +153 -153
  35. package/{lib → fullstacked_modules}/components/snackbar.ts +60 -60
  36. package/fullstacked_modules/config/config.ts +33 -0
  37. package/fullstacked_modules/config/index.ts +3 -0
  38. package/fullstacked_modules/connect/index.d.ts +2 -0
  39. package/{lib → fullstacked_modules}/connect/index.ts +125 -125
  40. package/{lib → fullstacked_modules}/core_message/core_message.ts +57 -76
  41. package/{lib → fullstacked_modules}/core_message/index.ts +3 -3
  42. package/fullstacked_modules/core_open.ts +9 -0
  43. package/fullstacked_modules/esbuild/esbuild.ts +101 -0
  44. package/fullstacked_modules/esbuild/index.ts +3 -0
  45. package/fullstacked_modules/esbuild/sass.ts +103 -0
  46. package/fullstacked_modules/fetch/index.d.ts +2 -0
  47. package/{lib → fullstacked_modules}/fetch/index.ts +332 -318
  48. package/{lib → fullstacked_modules}/fs/fs.ts +157 -157
  49. package/fullstacked_modules/fs/index.d.ts +2 -0
  50. package/{lib → fullstacked_modules}/fs/index.ts +3 -3
  51. package/fullstacked_modules/git/git.ts +238 -0
  52. package/fullstacked_modules/git/index.ts +3 -0
  53. package/fullstacked_modules/packages/index.ts +3 -0
  54. package/fullstacked_modules/packages/packages.ts +143 -0
  55. package/fullstacked_modules/platform/index.d.ts +2 -0
  56. package/{lib → fullstacked_modules}/platform/index.ts +14 -14
  57. package/fullstacked_modules/zod/LICENSE +21 -0
  58. package/fullstacked_modules/zod/README.md +208 -0
  59. package/fullstacked_modules/zod/index.d.cts +4 -0
  60. package/fullstacked_modules/zod/index.d.ts +4 -0
  61. package/fullstacked_modules/zod/locales/index.d.cts +1 -0
  62. package/fullstacked_modules/zod/locales/index.d.ts +1 -0
  63. package/fullstacked_modules/zod/mini/index.d.cts +1 -0
  64. package/fullstacked_modules/zod/mini/index.d.ts +1 -0
  65. package/fullstacked_modules/zod/package.json +134 -0
  66. package/fullstacked_modules/zod/src/index.ts +4 -0
  67. package/fullstacked_modules/zod/src/locales/index.ts +1 -0
  68. package/fullstacked_modules/zod/src/mini/index.ts +1 -0
  69. package/fullstacked_modules/zod/src/v3/ZodError.ts +330 -0
  70. package/fullstacked_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  71. package/fullstacked_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  72. package/fullstacked_modules/zod/src/v3/benchmarks/index.ts +59 -0
  73. package/fullstacked_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  74. package/fullstacked_modules/zod/src/v3/benchmarks/object.ts +69 -0
  75. package/fullstacked_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  76. package/fullstacked_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  77. package/fullstacked_modules/zod/src/v3/benchmarks/string.ts +55 -0
  78. package/fullstacked_modules/zod/src/v3/benchmarks/union.ts +80 -0
  79. package/fullstacked_modules/zod/src/v3/errors.ts +13 -0
  80. package/fullstacked_modules/zod/src/v3/external.ts +6 -0
  81. package/fullstacked_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  82. package/fullstacked_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  83. package/fullstacked_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  84. package/fullstacked_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  85. package/fullstacked_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  86. package/fullstacked_modules/zod/src/v3/helpers/util.ts +224 -0
  87. package/fullstacked_modules/zod/src/v3/index.ts +4 -0
  88. package/fullstacked_modules/zod/src/v3/locales/en.ts +124 -0
  89. package/fullstacked_modules/zod/src/v3/standard-schema.ts +113 -0
  90. package/fullstacked_modules/zod/src/v3/tests/Mocker.ts +54 -0
  91. package/fullstacked_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  92. package/fullstacked_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  93. package/fullstacked_modules/zod/src/v3/tests/array.test.ts +71 -0
  94. package/fullstacked_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  95. package/fullstacked_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  96. package/fullstacked_modules/zod/src/v3/tests/base.test.ts +29 -0
  97. package/fullstacked_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  98. package/fullstacked_modules/zod/src/v3/tests/branded.test.ts +53 -0
  99. package/fullstacked_modules/zod/src/v3/tests/catch.test.ts +220 -0
  100. package/fullstacked_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  101. package/fullstacked_modules/zod/src/v3/tests/complex.test.ts +56 -0
  102. package/fullstacked_modules/zod/src/v3/tests/custom.test.ts +31 -0
  103. package/fullstacked_modules/zod/src/v3/tests/date.test.ts +32 -0
  104. package/fullstacked_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  105. package/fullstacked_modules/zod/src/v3/tests/default.test.ts +112 -0
  106. package/fullstacked_modules/zod/src/v3/tests/description.test.ts +33 -0
  107. package/fullstacked_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  108. package/fullstacked_modules/zod/src/v3/tests/enum.test.ts +80 -0
  109. package/fullstacked_modules/zod/src/v3/tests/error.test.ts +551 -0
  110. package/fullstacked_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  111. package/fullstacked_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  112. package/fullstacked_modules/zod/src/v3/tests/function.test.ts +257 -0
  113. package/fullstacked_modules/zod/src/v3/tests/generics.test.ts +48 -0
  114. package/fullstacked_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  115. package/fullstacked_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  116. package/fullstacked_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  117. package/fullstacked_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  118. package/fullstacked_modules/zod/src/v3/tests/literal.test.ts +36 -0
  119. package/fullstacked_modules/zod/src/v3/tests/map.test.ts +110 -0
  120. package/fullstacked_modules/zod/src/v3/tests/masking.test.ts +4 -0
  121. package/fullstacked_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  122. package/fullstacked_modules/zod/src/v3/tests/nan.test.ts +21 -0
  123. package/fullstacked_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  124. package/fullstacked_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  125. package/fullstacked_modules/zod/src/v3/tests/number.test.ts +176 -0
  126. package/fullstacked_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  127. package/fullstacked_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  128. package/fullstacked_modules/zod/src/v3/tests/object.test.ts +434 -0
  129. package/fullstacked_modules/zod/src/v3/tests/optional.test.ts +42 -0
  130. package/fullstacked_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  131. package/fullstacked_modules/zod/src/v3/tests/parser.test.ts +41 -0
  132. package/fullstacked_modules/zod/src/v3/tests/partials.test.ts +243 -0
  133. package/fullstacked_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  134. package/fullstacked_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  135. package/fullstacked_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  136. package/fullstacked_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  137. package/fullstacked_modules/zod/src/v3/tests/promise.test.ts +90 -0
  138. package/fullstacked_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  139. package/fullstacked_modules/zod/src/v3/tests/record.test.ts +171 -0
  140. package/fullstacked_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  141. package/fullstacked_modules/zod/src/v3/tests/refine.test.ts +313 -0
  142. package/fullstacked_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  143. package/fullstacked_modules/zod/src/v3/tests/set.test.ts +142 -0
  144. package/fullstacked_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  145. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +916 -0
  146. package/fullstacked_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  147. package/fullstacked_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  148. package/fullstacked_modules/zod/src/v3/tests/unions.test.ts +57 -0
  149. package/fullstacked_modules/zod/src/v3/tests/validations.test.ts +133 -0
  150. package/fullstacked_modules/zod/src/v3/tests/void.test.ts +15 -0
  151. package/fullstacked_modules/zod/src/v3/types.ts +5138 -0
  152. package/fullstacked_modules/zod/src/v4/classic/checks.ts +31 -0
  153. package/fullstacked_modules/zod/src/v4/classic/coerce.ts +27 -0
  154. package/fullstacked_modules/zod/src/v4/classic/compat.ts +70 -0
  155. package/fullstacked_modules/zod/src/v4/classic/errors.ts +82 -0
  156. package/fullstacked_modules/zod/src/v4/classic/external.ts +50 -0
  157. package/fullstacked_modules/zod/src/v4/classic/index.ts +5 -0
  158. package/fullstacked_modules/zod/src/v4/classic/iso.ts +90 -0
  159. package/fullstacked_modules/zod/src/v4/classic/parse.ts +33 -0
  160. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +2031 -0
  161. package/fullstacked_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  162. package/fullstacked_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  163. package/fullstacked_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  164. package/fullstacked_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  165. package/fullstacked_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  166. package/fullstacked_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  167. package/fullstacked_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  168. package/fullstacked_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  169. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +251 -0
  170. package/fullstacked_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  171. package/fullstacked_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  172. package/fullstacked_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  173. package/fullstacked_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  174. package/fullstacked_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  175. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  176. package/fullstacked_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  177. package/fullstacked_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  178. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
  179. package/fullstacked_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  180. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
  181. package/fullstacked_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  182. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +94 -0
  183. package/fullstacked_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  184. package/fullstacked_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  185. package/fullstacked_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  186. package/fullstacked_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  187. package/fullstacked_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  188. package/fullstacked_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  189. package/fullstacked_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  190. package/fullstacked_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  191. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  192. package/fullstacked_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  193. package/fullstacked_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  194. package/fullstacked_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  195. package/fullstacked_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  196. package/fullstacked_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  197. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
  198. package/fullstacked_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  199. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +136 -0
  200. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +340 -0
  201. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  202. package/fullstacked_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  203. package/fullstacked_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  204. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +287 -0
  205. package/fullstacked_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  206. package/fullstacked_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  207. package/fullstacked_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  208. package/fullstacked_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  209. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +356 -0
  210. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +477 -0
  211. package/fullstacked_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  212. package/fullstacked_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  213. package/fullstacked_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  214. package/fullstacked_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  215. package/fullstacked_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  216. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +996 -0
  217. package/fullstacked_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  218. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +761 -0
  219. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2341 -0
  220. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +354 -0
  221. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  222. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +181 -0
  223. package/fullstacked_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  224. package/fullstacked_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  225. package/fullstacked_modules/zod/src/v4/core/api.ts +1628 -0
  226. package/fullstacked_modules/zod/src/v4/core/checks.ts +1285 -0
  227. package/fullstacked_modules/zod/src/v4/core/config.ts +15 -0
  228. package/fullstacked_modules/zod/src/v4/core/core.ts +134 -0
  229. package/fullstacked_modules/zod/src/v4/core/doc.ts +44 -0
  230. package/fullstacked_modules/zod/src/v4/core/errors.ts +423 -0
  231. package/fullstacked_modules/zod/src/v4/core/function.ts +176 -0
  232. package/fullstacked_modules/zod/src/v4/core/index.ts +15 -0
  233. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +146 -0
  234. package/fullstacked_modules/zod/src/v4/core/parse.ts +94 -0
  235. package/fullstacked_modules/zod/src/v4/core/regexes.ts +138 -0
  236. package/fullstacked_modules/zod/src/v4/core/registries.ts +97 -0
  237. package/fullstacked_modules/zod/src/v4/core/schemas.ts +3900 -0
  238. package/fullstacked_modules/zod/src/v4/core/standard-schema.ts +64 -0
  239. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +18 -0
  240. package/fullstacked_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  241. package/fullstacked_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  242. package/fullstacked_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  243. package/fullstacked_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  244. package/fullstacked_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  245. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +1004 -0
  246. package/fullstacked_modules/zod/src/v4/core/util.ts +827 -0
  247. package/fullstacked_modules/zod/src/v4/core/versions.ts +5 -0
  248. package/fullstacked_modules/zod/src/v4/core/zsf.ts +323 -0
  249. package/fullstacked_modules/zod/src/v4/index.ts +4 -0
  250. package/fullstacked_modules/zod/src/v4/locales/ar.ts +125 -0
  251. package/fullstacked_modules/zod/src/v4/locales/az.ts +121 -0
  252. package/fullstacked_modules/zod/src/v4/locales/be.ts +184 -0
  253. package/fullstacked_modules/zod/src/v4/locales/bg.ts +136 -0
  254. package/fullstacked_modules/zod/src/v4/locales/ca.ts +127 -0
  255. package/fullstacked_modules/zod/src/v4/locales/cs.ts +142 -0
  256. package/fullstacked_modules/zod/src/v4/locales/da.ts +141 -0
  257. package/fullstacked_modules/zod/src/v4/locales/de.ts +124 -0
  258. package/fullstacked_modules/zod/src/v4/locales/en.ts +127 -0
  259. package/fullstacked_modules/zod/src/v4/locales/eo.ts +125 -0
  260. package/fullstacked_modules/zod/src/v4/locales/es.ts +125 -0
  261. package/fullstacked_modules/zod/src/v4/locales/fa.ts +134 -0
  262. package/fullstacked_modules/zod/src/v4/locales/fi.ts +131 -0
  263. package/fullstacked_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  264. package/fullstacked_modules/zod/src/v4/locales/fr.ts +124 -0
  265. package/fullstacked_modules/zod/src/v4/locales/he.ts +125 -0
  266. package/fullstacked_modules/zod/src/v4/locales/hu.ts +126 -0
  267. package/fullstacked_modules/zod/src/v4/locales/id.ts +125 -0
  268. package/fullstacked_modules/zod/src/v4/locales/index.ts +42 -0
  269. package/fullstacked_modules/zod/src/v4/locales/is.ts +127 -0
  270. package/fullstacked_modules/zod/src/v4/locales/it.ts +125 -0
  271. package/fullstacked_modules/zod/src/v4/locales/ja.ts +122 -0
  272. package/fullstacked_modules/zod/src/v4/locales/kh.ts +126 -0
  273. package/fullstacked_modules/zod/src/v4/locales/ko.ts +131 -0
  274. package/fullstacked_modules/zod/src/v4/locales/mk.ts +127 -0
  275. package/fullstacked_modules/zod/src/v4/locales/ms.ts +124 -0
  276. package/fullstacked_modules/zod/src/v4/locales/nl.ts +126 -0
  277. package/fullstacked_modules/zod/src/v4/locales/no.ts +124 -0
  278. package/fullstacked_modules/zod/src/v4/locales/ota.ts +125 -0
  279. package/fullstacked_modules/zod/src/v4/locales/pl.ts +126 -0
  280. package/fullstacked_modules/zod/src/v4/locales/ps.ts +133 -0
  281. package/fullstacked_modules/zod/src/v4/locales/pt.ts +123 -0
  282. package/fullstacked_modules/zod/src/v4/locales/ru.ts +184 -0
  283. package/fullstacked_modules/zod/src/v4/locales/sl.ts +126 -0
  284. package/fullstacked_modules/zod/src/v4/locales/sv.ts +127 -0
  285. package/fullstacked_modules/zod/src/v4/locales/ta.ts +125 -0
  286. package/fullstacked_modules/zod/src/v4/locales/th.ts +126 -0
  287. package/fullstacked_modules/zod/src/v4/locales/tr.ts +121 -0
  288. package/fullstacked_modules/zod/src/v4/locales/ua.ts +126 -0
  289. package/fullstacked_modules/zod/src/v4/locales/ur.ts +126 -0
  290. package/fullstacked_modules/zod/src/v4/locales/vi.ts +125 -0
  291. package/fullstacked_modules/zod/src/v4/locales/yo.ts +131 -0
  292. package/fullstacked_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  293. package/fullstacked_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  294. package/fullstacked_modules/zod/src/v4/mini/checks.ts +32 -0
  295. package/fullstacked_modules/zod/src/v4/mini/coerce.ts +22 -0
  296. package/fullstacked_modules/zod/src/v4/mini/external.ts +40 -0
  297. package/fullstacked_modules/zod/src/v4/mini/index.ts +3 -0
  298. package/fullstacked_modules/zod/src/v4/mini/iso.ts +62 -0
  299. package/fullstacked_modules/zod/src/v4/mini/parse.ts +1 -0
  300. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +1592 -0
  301. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  302. package/fullstacked_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  303. package/fullstacked_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  304. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  305. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  306. package/fullstacked_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  307. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  308. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  309. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  310. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  311. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  312. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  313. package/fullstacked_modules/zod/src/v4-mini/index.ts +1 -0
  314. package/fullstacked_modules/zod/v3/ZodError.d.cts +164 -0
  315. package/fullstacked_modules/zod/v3/ZodError.d.ts +164 -0
  316. package/fullstacked_modules/zod/v3/errors.d.cts +5 -0
  317. package/fullstacked_modules/zod/v3/errors.d.ts +5 -0
  318. package/fullstacked_modules/zod/v3/external.d.cts +6 -0
  319. package/fullstacked_modules/zod/v3/external.d.ts +6 -0
  320. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  321. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  322. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  323. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  324. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  325. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  326. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  327. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  328. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  329. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  330. package/fullstacked_modules/zod/v3/helpers/util.d.cts +85 -0
  331. package/fullstacked_modules/zod/v3/helpers/util.d.ts +85 -0
  332. package/fullstacked_modules/zod/v3/index.d.cts +4 -0
  333. package/fullstacked_modules/zod/v3/index.d.ts +4 -0
  334. package/fullstacked_modules/zod/v3/locales/en.d.cts +3 -0
  335. package/fullstacked_modules/zod/v3/locales/en.d.ts +3 -0
  336. package/fullstacked_modules/zod/v3/standard-schema.d.cts +102 -0
  337. package/fullstacked_modules/zod/v3/standard-schema.d.ts +102 -0
  338. package/fullstacked_modules/zod/v3/types.d.cts +1034 -0
  339. package/fullstacked_modules/zod/v3/types.d.ts +1034 -0
  340. package/fullstacked_modules/zod/v4/classic/checks.d.cts +1 -0
  341. package/fullstacked_modules/zod/v4/classic/checks.d.ts +1 -0
  342. package/fullstacked_modules/zod/v4/classic/coerce.d.cts +17 -0
  343. package/fullstacked_modules/zod/v4/classic/coerce.d.ts +17 -0
  344. package/fullstacked_modules/zod/v4/classic/compat.d.cts +50 -0
  345. package/fullstacked_modules/zod/v4/classic/compat.d.ts +50 -0
  346. package/fullstacked_modules/zod/v4/classic/errors.d.cts +30 -0
  347. package/fullstacked_modules/zod/v4/classic/errors.d.ts +30 -0
  348. package/fullstacked_modules/zod/v4/classic/external.d.cts +13 -0
  349. package/fullstacked_modules/zod/v4/classic/external.d.ts +13 -0
  350. package/fullstacked_modules/zod/v4/classic/index.d.cts +4 -0
  351. package/fullstacked_modules/zod/v4/classic/index.d.ts +4 -0
  352. package/fullstacked_modules/zod/v4/classic/iso.d.cts +22 -0
  353. package/fullstacked_modules/zod/v4/classic/iso.d.ts +22 -0
  354. package/fullstacked_modules/zod/v4/classic/parse.d.cts +23 -0
  355. package/fullstacked_modules/zod/v4/classic/parse.d.ts +23 -0
  356. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +619 -0
  357. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +619 -0
  358. package/fullstacked_modules/zod/v4/core/api.d.cts +296 -0
  359. package/fullstacked_modules/zod/v4/core/api.d.ts +296 -0
  360. package/fullstacked_modules/zod/v4/core/checks.d.cts +278 -0
  361. package/fullstacked_modules/zod/v4/core/checks.d.ts +278 -0
  362. package/fullstacked_modules/zod/v4/core/core.d.cts +49 -0
  363. package/fullstacked_modules/zod/v4/core/core.d.ts +49 -0
  364. package/fullstacked_modules/zod/v4/core/doc.d.cts +14 -0
  365. package/fullstacked_modules/zod/v4/core/doc.d.ts +14 -0
  366. package/fullstacked_modules/zod/v4/core/errors.d.cts +210 -0
  367. package/fullstacked_modules/zod/v4/core/errors.d.ts +210 -0
  368. package/fullstacked_modules/zod/v4/core/function.d.cts +52 -0
  369. package/fullstacked_modules/zod/v4/core/function.d.ts +52 -0
  370. package/fullstacked_modules/zod/v4/core/index.d.cts +15 -0
  371. package/fullstacked_modules/zod/v4/core/index.d.ts +15 -0
  372. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +87 -0
  373. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +87 -0
  374. package/fullstacked_modules/zod/v4/core/parse.d.cts +25 -0
  375. package/fullstacked_modules/zod/v4/core/parse.d.ts +25 -0
  376. package/fullstacked_modules/zod/v4/core/regexes.d.cts +62 -0
  377. package/fullstacked_modules/zod/v4/core/regexes.d.ts +62 -0
  378. package/fullstacked_modules/zod/v4/core/registries.d.cts +35 -0
  379. package/fullstacked_modules/zod/v4/core/registries.d.ts +35 -0
  380. package/fullstacked_modules/zod/v4/core/schemas.d.cts +1055 -0
  381. package/fullstacked_modules/zod/v4/core/schemas.d.ts +1055 -0
  382. package/fullstacked_modules/zod/v4/core/standard-schema.d.cts +55 -0
  383. package/fullstacked_modules/zod/v4/core/standard-schema.d.ts +55 -0
  384. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +89 -0
  385. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +89 -0
  386. package/fullstacked_modules/zod/v4/core/util.d.cts +185 -0
  387. package/fullstacked_modules/zod/v4/core/util.d.ts +185 -0
  388. package/fullstacked_modules/zod/v4/core/versions.d.cts +5 -0
  389. package/fullstacked_modules/zod/v4/core/versions.d.ts +5 -0
  390. package/fullstacked_modules/zod/v4/index.d.cts +3 -0
  391. package/fullstacked_modules/zod/v4/index.d.ts +3 -0
  392. package/fullstacked_modules/zod/v4/locales/ar.d.cts +5 -0
  393. package/fullstacked_modules/zod/v4/locales/ar.d.ts +4 -0
  394. package/fullstacked_modules/zod/v4/locales/az.d.cts +5 -0
  395. package/fullstacked_modules/zod/v4/locales/az.d.ts +4 -0
  396. package/fullstacked_modules/zod/v4/locales/be.d.cts +5 -0
  397. package/fullstacked_modules/zod/v4/locales/be.d.ts +4 -0
  398. package/fullstacked_modules/zod/v4/locales/bg.d.cts +5 -0
  399. package/fullstacked_modules/zod/v4/locales/bg.d.ts +5 -0
  400. package/fullstacked_modules/zod/v4/locales/ca.d.cts +5 -0
  401. package/fullstacked_modules/zod/v4/locales/ca.d.ts +4 -0
  402. package/fullstacked_modules/zod/v4/locales/cs.d.cts +5 -0
  403. package/fullstacked_modules/zod/v4/locales/cs.d.ts +4 -0
  404. package/fullstacked_modules/zod/v4/locales/da.d.cts +5 -0
  405. package/fullstacked_modules/zod/v4/locales/da.d.ts +4 -0
  406. package/fullstacked_modules/zod/v4/locales/de.d.cts +5 -0
  407. package/fullstacked_modules/zod/v4/locales/de.d.ts +4 -0
  408. package/fullstacked_modules/zod/v4/locales/en.d.cts +5 -0
  409. package/fullstacked_modules/zod/v4/locales/en.d.ts +5 -0
  410. package/fullstacked_modules/zod/v4/locales/eo.d.cts +5 -0
  411. package/fullstacked_modules/zod/v4/locales/eo.d.ts +5 -0
  412. package/fullstacked_modules/zod/v4/locales/es.d.cts +5 -0
  413. package/fullstacked_modules/zod/v4/locales/es.d.ts +4 -0
  414. package/fullstacked_modules/zod/v4/locales/fa.d.cts +5 -0
  415. package/fullstacked_modules/zod/v4/locales/fa.d.ts +4 -0
  416. package/fullstacked_modules/zod/v4/locales/fi.d.cts +5 -0
  417. package/fullstacked_modules/zod/v4/locales/fi.d.ts +4 -0
  418. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  419. package/fullstacked_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  420. package/fullstacked_modules/zod/v4/locales/fr.d.cts +5 -0
  421. package/fullstacked_modules/zod/v4/locales/fr.d.ts +4 -0
  422. package/fullstacked_modules/zod/v4/locales/he.d.cts +5 -0
  423. package/fullstacked_modules/zod/v4/locales/he.d.ts +4 -0
  424. package/fullstacked_modules/zod/v4/locales/hu.d.cts +5 -0
  425. package/fullstacked_modules/zod/v4/locales/hu.d.ts +4 -0
  426. package/fullstacked_modules/zod/v4/locales/id.d.cts +5 -0
  427. package/fullstacked_modules/zod/v4/locales/id.d.ts +4 -0
  428. package/fullstacked_modules/zod/v4/locales/index.d.cts +42 -0
  429. package/fullstacked_modules/zod/v4/locales/index.d.ts +42 -0
  430. package/fullstacked_modules/zod/v4/locales/is.d.cts +5 -0
  431. package/fullstacked_modules/zod/v4/locales/is.d.ts +5 -0
  432. package/fullstacked_modules/zod/v4/locales/it.d.cts +5 -0
  433. package/fullstacked_modules/zod/v4/locales/it.d.ts +4 -0
  434. package/fullstacked_modules/zod/v4/locales/ja.d.cts +5 -0
  435. package/fullstacked_modules/zod/v4/locales/ja.d.ts +4 -0
  436. package/fullstacked_modules/zod/v4/locales/kh.d.cts +5 -0
  437. package/fullstacked_modules/zod/v4/locales/kh.d.ts +4 -0
  438. package/fullstacked_modules/zod/v4/locales/ko.d.cts +5 -0
  439. package/fullstacked_modules/zod/v4/locales/ko.d.ts +4 -0
  440. package/fullstacked_modules/zod/v4/locales/mk.d.cts +5 -0
  441. package/fullstacked_modules/zod/v4/locales/mk.d.ts +4 -0
  442. package/fullstacked_modules/zod/v4/locales/ms.d.cts +5 -0
  443. package/fullstacked_modules/zod/v4/locales/ms.d.ts +4 -0
  444. package/fullstacked_modules/zod/v4/locales/nl.d.cts +5 -0
  445. package/fullstacked_modules/zod/v4/locales/nl.d.ts +4 -0
  446. package/fullstacked_modules/zod/v4/locales/no.d.cts +5 -0
  447. package/fullstacked_modules/zod/v4/locales/no.d.ts +4 -0
  448. package/fullstacked_modules/zod/v4/locales/ota.d.cts +5 -0
  449. package/fullstacked_modules/zod/v4/locales/ota.d.ts +4 -0
  450. package/fullstacked_modules/zod/v4/locales/pl.d.cts +5 -0
  451. package/fullstacked_modules/zod/v4/locales/pl.d.ts +4 -0
  452. package/fullstacked_modules/zod/v4/locales/ps.d.cts +5 -0
  453. package/fullstacked_modules/zod/v4/locales/ps.d.ts +4 -0
  454. package/fullstacked_modules/zod/v4/locales/pt.d.cts +5 -0
  455. package/fullstacked_modules/zod/v4/locales/pt.d.ts +4 -0
  456. package/fullstacked_modules/zod/v4/locales/ru.d.cts +5 -0
  457. package/fullstacked_modules/zod/v4/locales/ru.d.ts +4 -0
  458. package/fullstacked_modules/zod/v4/locales/sl.d.cts +5 -0
  459. package/fullstacked_modules/zod/v4/locales/sl.d.ts +4 -0
  460. package/fullstacked_modules/zod/v4/locales/sv.d.cts +5 -0
  461. package/fullstacked_modules/zod/v4/locales/sv.d.ts +4 -0
  462. package/fullstacked_modules/zod/v4/locales/ta.d.cts +5 -0
  463. package/fullstacked_modules/zod/v4/locales/ta.d.ts +4 -0
  464. package/fullstacked_modules/zod/v4/locales/th.d.cts +5 -0
  465. package/fullstacked_modules/zod/v4/locales/th.d.ts +4 -0
  466. package/fullstacked_modules/zod/v4/locales/tr.d.cts +5 -0
  467. package/fullstacked_modules/zod/v4/locales/tr.d.ts +5 -0
  468. package/fullstacked_modules/zod/v4/locales/ua.d.cts +5 -0
  469. package/fullstacked_modules/zod/v4/locales/ua.d.ts +4 -0
  470. package/fullstacked_modules/zod/v4/locales/ur.d.cts +5 -0
  471. package/fullstacked_modules/zod/v4/locales/ur.d.ts +4 -0
  472. package/fullstacked_modules/zod/v4/locales/vi.d.cts +5 -0
  473. package/fullstacked_modules/zod/v4/locales/vi.d.ts +4 -0
  474. package/fullstacked_modules/zod/v4/locales/yo.d.cts +5 -0
  475. package/fullstacked_modules/zod/v4/locales/yo.d.ts +4 -0
  476. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  477. package/fullstacked_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  478. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  479. package/fullstacked_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  480. package/fullstacked_modules/zod/v4/mini/checks.d.cts +1 -0
  481. package/fullstacked_modules/zod/v4/mini/checks.d.ts +1 -0
  482. package/fullstacked_modules/zod/v4/mini/coerce.d.cts +7 -0
  483. package/fullstacked_modules/zod/v4/mini/coerce.d.ts +7 -0
  484. package/fullstacked_modules/zod/v4/mini/external.d.cts +11 -0
  485. package/fullstacked_modules/zod/v4/mini/external.d.ts +11 -0
  486. package/fullstacked_modules/zod/v4/mini/index.d.cts +3 -0
  487. package/fullstacked_modules/zod/v4/mini/index.d.ts +3 -0
  488. package/fullstacked_modules/zod/v4/mini/iso.d.cts +22 -0
  489. package/fullstacked_modules/zod/v4/mini/iso.d.ts +22 -0
  490. package/fullstacked_modules/zod/v4/mini/parse.d.cts +1 -0
  491. package/fullstacked_modules/zod/v4/mini/parse.d.ts +1 -0
  492. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +358 -0
  493. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +358 -0
  494. package/fullstacked_modules/zod/v4-mini/index.d.cts +1 -0
  495. package/fullstacked_modules/zod/v4-mini/index.d.ts +1 -0
  496. package/index.js +17 -12
  497. package/package.json +1 -1
  498. package/lib/bridge/index.ts +0 -53
  499. package/lib/fullstacked.d.ts +0 -208
  500. /package/{lib → fullstacked_modules}/components/snackbar.css +0 -0
@@ -0,0 +1,1285 @@
1
+ // import { $ZodType } from "./schemas.js";
2
+
3
+ import * as core from "./core.js";
4
+ import type * as errors from "./errors.js";
5
+ import * as regexes from "./regexes.js";
6
+ import type * as schemas from "./schemas.js";
7
+ import * as util from "./util.js";
8
+
9
+ ////////////////////////////// CHECKS ///////////////////////////////////////
10
+
11
+ export interface $ZodCheckDef {
12
+ check: string;
13
+ error?: errors.$ZodErrorMap<never> | undefined;
14
+ /** If true, no later checks will be executed if this check fails. Default `false`. */
15
+ abort?: boolean | undefined;
16
+ /** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
17
+ when?: ((payload: schemas.ParsePayload) => boolean) | undefined;
18
+ }
19
+
20
+ export interface $ZodCheckInternals<T> {
21
+ def: $ZodCheckDef;
22
+ /** The set of issues this check might throw. */
23
+ issc?: errors.$ZodIssueBase;
24
+ check(payload: schemas.ParsePayload<T>): util.MaybeAsync<void>;
25
+ onattach: ((schema: schemas.$ZodType) => void)[];
26
+ }
27
+
28
+ export interface $ZodCheck<in T = never> {
29
+ _zod: $ZodCheckInternals<T>;
30
+ }
31
+
32
+ export const $ZodCheck: core.$constructor<$ZodCheck<any>> = /*@__PURE__*/ core.$constructor(
33
+ "$ZodCheck",
34
+ (inst, def) => {
35
+ inst._zod ??= {} as any;
36
+ inst._zod.def = def;
37
+ inst._zod.onattach ??= [];
38
+ }
39
+ );
40
+
41
+ ///////////////////////////////////////
42
+ ///// $ZodCheckLessThan /////
43
+ ///////////////////////////////////////
44
+ export interface $ZodCheckLessThanDef extends $ZodCheckDef {
45
+ check: "less_than";
46
+ value: util.Numeric;
47
+ inclusive: boolean;
48
+ }
49
+
50
+ export interface $ZodCheckLessThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
51
+ def: $ZodCheckLessThanDef;
52
+ issc: errors.$ZodIssueTooBig<T>;
53
+ }
54
+
55
+ const numericOriginMap = {
56
+ number: "number",
57
+ bigint: "bigint",
58
+ object: "date",
59
+ } as const;
60
+ export interface $ZodCheckLessThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
61
+ _zod: $ZodCheckLessThanInternals<T>;
62
+ }
63
+
64
+ export const $ZodCheckLessThan: core.$constructor<$ZodCheckLessThan> = /*@__PURE__*/ core.$constructor(
65
+ "$ZodCheckLessThan",
66
+ (inst, def) => {
67
+ $ZodCheck.init(inst, def);
68
+ const origin = numericOriginMap[typeof def.value as "number" | "bigint" | "object"];
69
+
70
+ inst._zod.onattach.push((inst) => {
71
+ const bag = inst._zod.bag;
72
+ const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
73
+ if (def.value < curr) {
74
+ if (def.inclusive) bag.maximum = def.value;
75
+ else bag.exclusiveMaximum = def.value;
76
+ }
77
+ });
78
+
79
+ inst._zod.check = (payload) => {
80
+ if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
81
+ return;
82
+ }
83
+
84
+ payload.issues.push({
85
+ origin,
86
+ code: "too_big",
87
+ maximum: def.value as number,
88
+ input: payload.value,
89
+ inclusive: def.inclusive,
90
+ inst,
91
+ continue: !def.abort,
92
+ });
93
+ };
94
+ }
95
+ );
96
+
97
+ /////////////////////////////////////
98
+ ///// $ZodCheckGreaterThan /////
99
+ /////////////////////////////////////
100
+ export interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
101
+ check: "greater_than";
102
+ value: util.Numeric;
103
+ inclusive: boolean;
104
+ }
105
+
106
+ export interface $ZodCheckGreaterThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
107
+ def: $ZodCheckGreaterThanDef;
108
+ issc: errors.$ZodIssueTooSmall<T>;
109
+ }
110
+
111
+ export interface $ZodCheckGreaterThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
112
+ _zod: $ZodCheckGreaterThanInternals<T>;
113
+ }
114
+
115
+ export const $ZodCheckGreaterThan: core.$constructor<$ZodCheckGreaterThan> = /*@__PURE__*/ core.$constructor(
116
+ "$ZodCheckGreaterThan",
117
+ (inst, def) => {
118
+ $ZodCheck.init(inst, def);
119
+ const origin = numericOriginMap[typeof def.value as "number" | "bigint" | "object"];
120
+
121
+ inst._zod.onattach.push((inst) => {
122
+ const bag = inst._zod.bag;
123
+ const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
124
+ if (def.value > curr) {
125
+ if (def.inclusive) bag.minimum = def.value;
126
+ else bag.exclusiveMinimum = def.value;
127
+ }
128
+ });
129
+
130
+ inst._zod.check = (payload) => {
131
+ if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
132
+ return;
133
+ }
134
+
135
+ payload.issues.push({
136
+ origin,
137
+ code: "too_small",
138
+ minimum: def.value as number,
139
+ input: payload.value,
140
+ inclusive: def.inclusive,
141
+ inst,
142
+ continue: !def.abort,
143
+ });
144
+ };
145
+ }
146
+ );
147
+
148
+ /////////////////////////////////////
149
+ ///// $ZodCheckMultipleOf /////
150
+ /////////////////////////////////////
151
+ // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034
152
+
153
+ export interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
154
+ check: "multiple_of";
155
+ value: T;
156
+ }
157
+
158
+ export interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint>
159
+ extends $ZodCheckInternals<T> {
160
+ def: $ZodCheckMultipleOfDef<T>;
161
+ issc: errors.$ZodIssueNotMultipleOf;
162
+ }
163
+
164
+ export interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
165
+ _zod: $ZodCheckMultipleOfInternals<T>;
166
+ }
167
+
168
+ export const $ZodCheckMultipleOf: core.$constructor<$ZodCheckMultipleOf<number | bigint>> =
169
+ /*@__PURE__*/ core.$constructor("$ZodCheckMultipleOf", (inst, def) => {
170
+ $ZodCheck.init(inst, def);
171
+
172
+ inst._zod.onattach.push((inst) => {
173
+ inst._zod.bag.multipleOf ??= def.value;
174
+ });
175
+
176
+ inst._zod.check = (payload) => {
177
+ if (typeof payload.value !== typeof def.value)
178
+ throw new Error("Cannot mix number and bigint in multiple_of check.");
179
+ const isMultiple =
180
+ typeof payload.value === "bigint"
181
+ ? payload.value % (def.value as bigint) === BigInt(0)
182
+ : util.floatSafeRemainder(payload.value, def.value as number) === 0;
183
+
184
+ if (isMultiple) return;
185
+ payload.issues.push({
186
+ origin: typeof payload.value as "number",
187
+ code: "not_multiple_of",
188
+ divisor: def.value as number,
189
+ input: payload.value,
190
+ inst,
191
+ continue: !def.abort,
192
+ });
193
+ };
194
+ });
195
+
196
+ /////////////////////////////////////
197
+ ///// $ZodCheckFinite /////
198
+ /////////////////////////////////////
199
+ // interface $ZodCheckFiniteDef extends $ZodCheckDef {
200
+ // check: "finite";
201
+ // }
202
+
203
+ // export interface $ZodCheckFinite extends $ZodCheckInternals<number> {
204
+ // _def: $ZodCheckFiniteDef;
205
+ // _issc:
206
+ // | errors.$ZodIssueTooBig<"number", number>
207
+ // | errors.$ZodIssueTooSmall<"number", number>;
208
+ // }
209
+
210
+ // export const $ZodCheckFinite: core.$constructor<$ZodCheckFinite> =
211
+ // core.$constructor("$ZodCheckFinite", (inst, def) => {
212
+ // $ZodCheck.init(inst, def);
213
+
214
+ // inst._zod.onattach = (inst) => {
215
+ // inst["_bag"].finite = true;
216
+ // };
217
+
218
+ // inst._zod.check = (payload) => {
219
+ // if (Number.isFinite(payload.value)) return;
220
+ // payload.issues.push({
221
+ // origin: "number",
222
+ // ...(payload.value === Number.POSITIVE_INFINITY
223
+ // ? {
224
+ // code: "too_big",
225
+ // maximum: Number.POSITIVE_INFINITY,
226
+ // }
227
+ // : {
228
+ // code: "too_small",
229
+ // minimum: Number.NEGATIVE_INFINITY,
230
+ // }),
231
+ // // code: payload.value === Number.POSITIVE_INFINITY ? "too_big" : "too_big",
232
+ // // maximum: Number.POSITIVE_INFINITY,
233
+ // inclusive: false,
234
+ // input: payload.value,
235
+ // inst,
236
+ // });
237
+ // };
238
+ // });
239
+
240
+ ///////////////////////////////////////
241
+ ///// $ZodCheckNumberFormat /////
242
+ ///////////////////////////////////////
243
+
244
+ export type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
245
+
246
+ export interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
247
+ check: "number_format";
248
+ format: $ZodNumberFormats;
249
+ // abort?: boolean;
250
+ }
251
+
252
+ export interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
253
+ def: $ZodCheckNumberFormatDef;
254
+ issc: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<"number"> | errors.$ZodIssueTooSmall<"number">;
255
+ // bag: util.LoosePartial<{
256
+ // minimum?: number | undefined;
257
+ // }>;
258
+ }
259
+
260
+ export interface $ZodCheckNumberFormat extends $ZodCheck<number> {
261
+ _zod: $ZodCheckNumberFormatInternals;
262
+ }
263
+
264
+ export const $ZodCheckNumberFormat: core.$constructor<$ZodCheckNumberFormat> = /*@__PURE__*/ core.$constructor(
265
+ "$ZodCheckNumberFormat",
266
+ (inst, def) => {
267
+ $ZodCheck.init(inst, def); // no format checks
268
+ def.format = def.format || "float64";
269
+
270
+ const isInt = def.format?.includes("int");
271
+ const origin = isInt ? "int" : "number";
272
+ const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];
273
+
274
+ inst._zod.onattach.push((inst) => {
275
+ const bag = inst._zod.bag;
276
+ bag.format = def.format;
277
+ bag.minimum = minimum;
278
+ bag.maximum = maximum;
279
+ if (isInt) bag.pattern = regexes.integer;
280
+ });
281
+
282
+ inst._zod.check = (payload) => {
283
+ const input = payload.value;
284
+
285
+ if (isInt) {
286
+ if (!Number.isInteger(input)) {
287
+ // invalid_format issue
288
+ // payload.issues.push({
289
+ // expected: def.format,
290
+ // format: def.format,
291
+ // code: "invalid_format",
292
+ // input,
293
+ // inst,
294
+ // });
295
+ // invalid_type issue
296
+ payload.issues.push({
297
+ expected: origin,
298
+ format: def.format,
299
+ code: "invalid_type",
300
+ continue: false,
301
+ input,
302
+ inst,
303
+ });
304
+
305
+ return;
306
+
307
+ // not_multiple_of issue
308
+ // payload.issues.push({
309
+ // code: "not_multiple_of",
310
+ // origin: "number",
311
+ // input,
312
+ // inst,
313
+ // divisor: 1,
314
+ // });
315
+ }
316
+ if (!Number.isSafeInteger(input)) {
317
+ if (input > 0) {
318
+ // too_big
319
+ payload.issues.push({
320
+ input,
321
+ code: "too_big",
322
+ maximum: Number.MAX_SAFE_INTEGER,
323
+ note: "Integers must be within the safe integer range.",
324
+ inst,
325
+ origin,
326
+ continue: !def.abort,
327
+ });
328
+ } else {
329
+ // too_small
330
+ payload.issues.push({
331
+ input,
332
+ code: "too_small",
333
+ minimum: Number.MIN_SAFE_INTEGER,
334
+ note: "Integers must be within the safe integer range.",
335
+ inst,
336
+ origin,
337
+ continue: !def.abort,
338
+ });
339
+ }
340
+
341
+ return;
342
+ }
343
+ }
344
+
345
+ if (input < minimum) {
346
+ payload.issues.push({
347
+ origin: "number",
348
+ input,
349
+ code: "too_small",
350
+ minimum,
351
+ inclusive: true,
352
+ inst,
353
+ continue: !def.abort,
354
+ });
355
+ }
356
+
357
+ if (input > maximum) {
358
+ payload.issues.push({
359
+ origin: "number",
360
+ input,
361
+ code: "too_big",
362
+ maximum,
363
+ inst,
364
+ } as any);
365
+ }
366
+ };
367
+ }
368
+ );
369
+
370
+ /////////////////////////////////////
371
+ ///// $ZodCheckBigIntFormat /////
372
+ /////////////////////////////////////
373
+
374
+ export type $ZodBigIntFormats = "int64" | "uint64";
375
+
376
+ export interface $ZodCheckBigIntFormatDef extends $ZodCheckDef {
377
+ check: "bigint_format";
378
+ format: $ZodBigIntFormats | undefined;
379
+ }
380
+
381
+ export interface $ZodCheckBigIntFormatInternals extends $ZodCheckInternals<bigint> {
382
+ def: $ZodCheckBigIntFormatDef;
383
+ issc: errors.$ZodIssueTooBig<"bigint"> | errors.$ZodIssueTooSmall<"bigint">;
384
+ }
385
+
386
+ export interface $ZodCheckBigIntFormat extends $ZodCheck<bigint> {
387
+ _zod: $ZodCheckBigIntFormatInternals;
388
+ }
389
+
390
+ export const $ZodCheckBigIntFormat: core.$constructor<$ZodCheckBigIntFormat> = /*@__PURE__*/ core.$constructor(
391
+ "$ZodCheckBigIntFormat",
392
+ (inst, def) => {
393
+ $ZodCheck.init(inst, def); // no format checks
394
+
395
+ const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format!];
396
+
397
+ inst._zod.onattach.push((inst) => {
398
+ const bag = inst._zod.bag;
399
+ bag.format = def.format;
400
+ bag.minimum = minimum;
401
+ bag.maximum = maximum;
402
+ });
403
+
404
+ inst._zod.check = (payload) => {
405
+ const input = payload.value;
406
+
407
+ if (input < minimum) {
408
+ payload.issues.push({
409
+ origin: "bigint",
410
+ input,
411
+ code: "too_small",
412
+ minimum: minimum as any,
413
+ inclusive: true,
414
+ inst,
415
+ continue: !def.abort,
416
+ });
417
+ }
418
+
419
+ if (input > maximum) {
420
+ payload.issues.push({
421
+ origin: "bigint",
422
+ input,
423
+ code: "too_big",
424
+ maximum,
425
+ inst,
426
+ } as any);
427
+ }
428
+ };
429
+ }
430
+ );
431
+
432
+ //////////////////////////////////
433
+ ///// $ZodCheckMaxSize /////
434
+ //////////////////////////////////
435
+ export interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
436
+ check: "max_size";
437
+ maximum: number;
438
+ }
439
+
440
+ export interface $ZodCheckMaxSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
441
+ def: $ZodCheckMaxSizeDef;
442
+ issc: errors.$ZodIssueTooBig<T>;
443
+ }
444
+
445
+ export interface $ZodCheckMaxSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
446
+ _zod: $ZodCheckMaxSizeInternals<T>;
447
+ }
448
+
449
+ export const $ZodCheckMaxSize: core.$constructor<$ZodCheckMaxSize> = /*@__PURE__*/ core.$constructor(
450
+ "$ZodCheckMaxSize",
451
+ (inst, def) => {
452
+ $ZodCheck.init(inst, def);
453
+
454
+ inst._zod.def.when ??= (payload) => {
455
+ const val = payload.value;
456
+ return !util.nullish(val) && (val as any).size !== undefined;
457
+ };
458
+
459
+ inst._zod.onattach.push((inst) => {
460
+ const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY) as number;
461
+ if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
462
+ });
463
+
464
+ inst._zod.check = (payload) => {
465
+ const input = payload.value;
466
+ const size = input.size;
467
+
468
+ if (size <= def.maximum) return;
469
+ payload.issues.push({
470
+ origin: util.getSizableOrigin(input),
471
+ code: "too_big",
472
+ maximum: def.maximum,
473
+ input,
474
+ inst,
475
+ continue: !def.abort,
476
+ });
477
+ };
478
+ }
479
+ );
480
+
481
+ //////////////////////////////////
482
+ ///// $ZodCheckMinSize /////
483
+ //////////////////////////////////
484
+ export interface $ZodCheckMinSizeDef extends $ZodCheckDef {
485
+ check: "min_size";
486
+ minimum: number;
487
+ }
488
+
489
+ export interface $ZodCheckMinSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
490
+ def: $ZodCheckMinSizeDef;
491
+ issc: errors.$ZodIssueTooSmall<T>;
492
+ }
493
+
494
+ export interface $ZodCheckMinSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
495
+ _zod: $ZodCheckMinSizeInternals<T>;
496
+ }
497
+
498
+ export const $ZodCheckMinSize: core.$constructor<$ZodCheckMinSize> = /*@__PURE__*/ core.$constructor(
499
+ "$ZodCheckMinSize",
500
+ (inst, def) => {
501
+ $ZodCheck.init(inst, def);
502
+
503
+ inst._zod.def.when ??= (payload) => {
504
+ const val = payload.value;
505
+ return !util.nullish(val) && (val as any).size !== undefined;
506
+ };
507
+
508
+ inst._zod.onattach.push((inst) => {
509
+ const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY) as number;
510
+ if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
511
+ });
512
+
513
+ inst._zod.check = (payload) => {
514
+ const input = payload.value;
515
+ const size = input.size;
516
+
517
+ if (size >= def.minimum) return;
518
+ payload.issues.push({
519
+ origin: util.getSizableOrigin(input),
520
+ code: "too_small",
521
+ minimum: def.minimum,
522
+ input,
523
+ inst,
524
+ continue: !def.abort,
525
+ });
526
+ };
527
+ }
528
+ );
529
+
530
+ /////////////////////////////////////
531
+ ///// $ZodCheckSizeEquals /////
532
+ /////////////////////////////////////
533
+ export interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
534
+ check: "size_equals";
535
+ size: number;
536
+ }
537
+
538
+ export interface $ZodCheckSizeEqualsInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
539
+ def: $ZodCheckSizeEqualsDef;
540
+ issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
541
+ }
542
+
543
+ export interface $ZodCheckSizeEquals<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
544
+ _zod: $ZodCheckSizeEqualsInternals<T>;
545
+ }
546
+
547
+ export const $ZodCheckSizeEquals: core.$constructor<$ZodCheckSizeEquals> = /*@__PURE__*/ core.$constructor(
548
+ "$ZodCheckSizeEquals",
549
+ (inst, def) => {
550
+ $ZodCheck.init(inst, def);
551
+
552
+ inst._zod.def.when ??= (payload) => {
553
+ const val = payload.value;
554
+ return !util.nullish(val) && (val as any).size !== undefined;
555
+ };
556
+
557
+ inst._zod.onattach.push((inst) => {
558
+ const bag = inst._zod.bag;
559
+ bag.minimum = def.size;
560
+ bag.maximum = def.size;
561
+ bag.size = def.size;
562
+ });
563
+
564
+ inst._zod.check = (payload) => {
565
+ const input = payload.value;
566
+ const size = input.size;
567
+ if (size === def.size) return;
568
+
569
+ const tooBig = size > def.size;
570
+ payload.issues.push({
571
+ origin: util.getSizableOrigin(input),
572
+ ...(tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }),
573
+ inclusive: true,
574
+ exact: true,
575
+ input: payload.value,
576
+ inst,
577
+ continue: !def.abort,
578
+ });
579
+ };
580
+ }
581
+ );
582
+
583
+ //////////////////////////////////
584
+ ///// $ZodCheckMaxLength /////
585
+ //////////////////////////////////
586
+
587
+ export interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
588
+ check: "max_length";
589
+ maximum: number;
590
+ }
591
+
592
+ export interface $ZodCheckMaxLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
593
+ def: $ZodCheckMaxLengthDef;
594
+ issc: errors.$ZodIssueTooBig<T>;
595
+ }
596
+
597
+ export interface $ZodCheckMaxLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
598
+ _zod: $ZodCheckMaxLengthInternals<T>;
599
+ }
600
+
601
+ export const $ZodCheckMaxLength: core.$constructor<$ZodCheckMaxLength> = /*@__PURE__*/ core.$constructor(
602
+ "$ZodCheckMaxLength",
603
+ (inst, def) => {
604
+ $ZodCheck.init(inst, def);
605
+
606
+ inst._zod.def.when ??= (payload) => {
607
+ const val = payload.value;
608
+ return !util.nullish(val) && (val as any).length !== undefined;
609
+ };
610
+
611
+ inst._zod.onattach.push((inst) => {
612
+ const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY) as number;
613
+ if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
614
+ });
615
+
616
+ inst._zod.check = (payload) => {
617
+ const input = payload.value;
618
+ const length = input.length;
619
+
620
+ if (length <= def.maximum) return;
621
+ const origin = util.getLengthableOrigin(input);
622
+ payload.issues.push({
623
+ origin,
624
+ code: "too_big",
625
+ maximum: def.maximum,
626
+ inclusive: true,
627
+ input,
628
+ inst,
629
+ continue: !def.abort,
630
+ });
631
+ };
632
+ }
633
+ );
634
+
635
+ //////////////////////////////////
636
+ ///// $ZodCheckMinLength /////
637
+ //////////////////////////////////
638
+ export interface $ZodCheckMinLengthDef extends $ZodCheckDef {
639
+ check: "min_length";
640
+ minimum: number;
641
+ }
642
+
643
+ export interface $ZodCheckMinLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
644
+ def: $ZodCheckMinLengthDef;
645
+ issc: errors.$ZodIssueTooSmall<T>;
646
+ }
647
+
648
+ export interface $ZodCheckMinLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
649
+ _zod: $ZodCheckMinLengthInternals<T>;
650
+ }
651
+
652
+ export const $ZodCheckMinLength: core.$constructor<$ZodCheckMinLength> = /*@__PURE__*/ core.$constructor(
653
+ "$ZodCheckMinLength",
654
+ (inst, def) => {
655
+ $ZodCheck.init(inst, def);
656
+
657
+ inst._zod.def.when ??= (payload) => {
658
+ const val = payload.value;
659
+ return !util.nullish(val) && (val as any).length !== undefined;
660
+ };
661
+
662
+ inst._zod.onattach.push((inst) => {
663
+ const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY) as number;
664
+ if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
665
+ });
666
+
667
+ inst._zod.check = (payload) => {
668
+ const input = payload.value;
669
+ const length = input.length;
670
+
671
+ if (length >= def.minimum) return;
672
+ const origin = util.getLengthableOrigin(input);
673
+ payload.issues.push({
674
+ origin,
675
+ code: "too_small",
676
+ minimum: def.minimum,
677
+ inclusive: true,
678
+ input,
679
+ inst,
680
+ continue: !def.abort,
681
+ });
682
+ };
683
+ }
684
+ );
685
+
686
+ /////////////////////////////////////
687
+ ///// $ZodCheckLengthEquals /////
688
+ /////////////////////////////////////
689
+ export interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
690
+ check: "length_equals";
691
+ length: number;
692
+ }
693
+
694
+ export interface $ZodCheckLengthEqualsInternals<T extends util.HasLength = util.HasLength>
695
+ extends $ZodCheckInternals<T> {
696
+ def: $ZodCheckLengthEqualsDef;
697
+ issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
698
+ }
699
+
700
+ export interface $ZodCheckLengthEquals<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
701
+ _zod: $ZodCheckLengthEqualsInternals<T>;
702
+ }
703
+
704
+ export const $ZodCheckLengthEquals: core.$constructor<$ZodCheckLengthEquals> = /*@__PURE__*/ core.$constructor(
705
+ "$ZodCheckLengthEquals",
706
+ (inst, def) => {
707
+ $ZodCheck.init(inst, def);
708
+
709
+ inst._zod.def.when ??= (payload) => {
710
+ const val = payload.value;
711
+ return !util.nullish(val) && (val as any).length !== undefined;
712
+ };
713
+
714
+ inst._zod.onattach.push((inst) => {
715
+ const bag = inst._zod.bag;
716
+ bag.minimum = def.length;
717
+ bag.maximum = def.length;
718
+ bag.length = def.length;
719
+ });
720
+
721
+ inst._zod.check = (payload) => {
722
+ const input = payload.value;
723
+ const length = input.length;
724
+ if (length === def.length) return;
725
+ const origin = util.getLengthableOrigin(input);
726
+ const tooBig = length > def.length;
727
+ payload.issues.push({
728
+ origin,
729
+ ...(tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }),
730
+ inclusive: true,
731
+ exact: true,
732
+ input: payload.value,
733
+ inst,
734
+ continue: !def.abort,
735
+ });
736
+ };
737
+ }
738
+ );
739
+
740
+ /////////////////////////////////////////////
741
+ ///// $ZodCheckStringFormatRegex /////
742
+ /////////////////////////////////////////////
743
+ export type $ZodStringFormats =
744
+ | "email"
745
+ | "url"
746
+ | "emoji"
747
+ | "uuid"
748
+ | "guid"
749
+ | "nanoid"
750
+ | "cuid"
751
+ | "cuid2"
752
+ | "ulid"
753
+ | "xid"
754
+ | "ksuid"
755
+ | "datetime"
756
+ | "date"
757
+ | "time"
758
+ | "duration"
759
+ | "ipv4"
760
+ | "ipv6"
761
+ | "cidrv4"
762
+ | "cidrv6"
763
+ | "base64"
764
+ | "base64url"
765
+ | "json_string"
766
+ | "e164"
767
+ | "lowercase"
768
+ | "uppercase"
769
+ | "regex"
770
+ | "jwt"
771
+ | "starts_with"
772
+ | "ends_with"
773
+ | "includes";
774
+ export interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
775
+ check: "string_format";
776
+ format: Format;
777
+ pattern?: RegExp | undefined;
778
+ }
779
+
780
+ export interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
781
+ def: $ZodCheckStringFormatDef;
782
+ issc: errors.$ZodIssueInvalidStringFormat;
783
+ }
784
+
785
+ export interface $ZodCheckStringFormat extends $ZodCheck<string> {
786
+ _zod: $ZodCheckStringFormatInternals;
787
+ }
788
+
789
+ export const $ZodCheckStringFormat: core.$constructor<$ZodCheckStringFormat> = /*@__PURE__*/ core.$constructor(
790
+ "$ZodCheckStringFormat",
791
+ (inst, def) => {
792
+ $ZodCheck.init(inst, def);
793
+
794
+ inst._zod.onattach.push((inst) => {
795
+ const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
796
+ bag.format = def.format;
797
+ if (def.pattern) {
798
+ bag.patterns ??= new Set();
799
+ bag.patterns.add(def.pattern);
800
+ }
801
+ });
802
+
803
+ if (def.pattern)
804
+ inst._zod.check ??= (payload) => {
805
+ def.pattern!.lastIndex = 0;
806
+ if (def.pattern!.test(payload.value)) return;
807
+ payload.issues.push({
808
+ origin: "string",
809
+ code: "invalid_format",
810
+ format: def.format,
811
+ input: payload.value,
812
+ ...(def.pattern ? { pattern: def.pattern.toString() } : {}),
813
+ inst,
814
+ continue: !def.abort,
815
+ });
816
+ };
817
+ else inst._zod.check ??= () => {};
818
+ }
819
+ );
820
+
821
+ ////////////////////////////////
822
+ ///// $ZodCheckRegex /////
823
+ ////////////////////////////////
824
+ export interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
825
+ format: "regex";
826
+ pattern: RegExp;
827
+ }
828
+
829
+ export interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
830
+ def: $ZodCheckRegexDef;
831
+ issc: errors.$ZodIssueInvalidStringFormat;
832
+ }
833
+
834
+ export interface $ZodCheckRegex extends $ZodCheck<string> {
835
+ _zod: $ZodCheckRegexInternals;
836
+ }
837
+
838
+ export const $ZodCheckRegex: core.$constructor<$ZodCheckRegex> = /*@__PURE__*/ core.$constructor(
839
+ "$ZodCheckRegex",
840
+ (inst, def) => {
841
+ $ZodCheckStringFormat.init(inst, def);
842
+
843
+ inst._zod.check = (payload) => {
844
+ def.pattern.lastIndex = 0;
845
+ if (def.pattern.test(payload.value)) return;
846
+ payload.issues.push({
847
+ origin: "string",
848
+ code: "invalid_format",
849
+ format: "regex",
850
+ input: payload.value,
851
+ pattern: def.pattern.toString(),
852
+ inst,
853
+ continue: !def.abort,
854
+ });
855
+ };
856
+ }
857
+ );
858
+
859
+ ///////////////////////////////////
860
+ ///// $ZodCheckJSONString /////
861
+ ///////////////////////////////////
862
+ // interface $ZodCheckJSONStringDef extends $ZodCheckStringFormatDef<"json_string"> {
863
+ // // check: "string_format";
864
+ // // format: "json_string";
865
+ // // error?: errors.$ZodErrorMap<errors.$ZodIssueInvalidStringFormat> | undefined;
866
+ // }
867
+
868
+ // export interface $ZodCheckJSONString extends $ZodCheckStringFormat {
869
+ // _def: $ZodCheckJSONStringDef;
870
+ // }
871
+
872
+ // export const $ZodCheckJSONString: core.$constructor<$ZodCheckJSONString> = /*@__PURE__*/ core.$constructor(
873
+ // "$ZodCheckJSONString",
874
+ // (inst, def) => {
875
+ // $ZodCheck.init(inst, def);
876
+
877
+ // inst._zod.check = (payload) => {
878
+ // try {
879
+ // JSON.parse(payload.value);
880
+ // return;
881
+ // } catch (_) {
882
+ // payload.issues.push({
883
+ // origin: "string",
884
+ // code: "invalid_format",
885
+ // format: def.format,
886
+ // input: payload.value,
887
+ // inst,
888
+ // continue: !def.abort,
889
+ // });
890
+ // }
891
+ // };
892
+ // }
893
+ // );
894
+
895
+ //////////////////////////////////////
896
+ ///// $ZodCheckLowerCase /////
897
+ //////////////////////////////////////
898
+ export interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
899
+
900
+ export interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
901
+ def: $ZodCheckLowerCaseDef;
902
+ issc: errors.$ZodIssueInvalidStringFormat;
903
+ }
904
+
905
+ export interface $ZodCheckLowerCase extends $ZodCheck<string> {
906
+ _zod: $ZodCheckLowerCaseInternals;
907
+ }
908
+
909
+ export const $ZodCheckLowerCase: core.$constructor<$ZodCheckLowerCase> = /*@__PURE__*/ core.$constructor(
910
+ "$ZodCheckLowerCase",
911
+ (inst, def) => {
912
+ def.pattern ??= regexes.lowercase;
913
+ $ZodCheckStringFormat.init(inst, def);
914
+ }
915
+ );
916
+
917
+ //////////////////////////////////////
918
+ ///// $ZodCheckUpperCase /////
919
+ //////////////////////////////////////
920
+ export interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
921
+
922
+ export interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
923
+ def: $ZodCheckUpperCaseDef;
924
+ issc: errors.$ZodIssueInvalidStringFormat;
925
+ }
926
+
927
+ export interface $ZodCheckUpperCase extends $ZodCheck<string> {
928
+ _zod: $ZodCheckUpperCaseInternals;
929
+ }
930
+
931
+ export const $ZodCheckUpperCase: core.$constructor<$ZodCheckUpperCase> = /*@__PURE__*/ core.$constructor(
932
+ "$ZodCheckUpperCase",
933
+ (inst, def) => {
934
+ def.pattern ??= regexes.uppercase;
935
+ $ZodCheckStringFormat.init(inst, def);
936
+ }
937
+ );
938
+
939
+ ///////////////////////////////////
940
+ ///// $ZodCheckIncludes /////
941
+ ///////////////////////////////////
942
+ export interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
943
+ includes: string;
944
+ position?: number | undefined;
945
+ }
946
+
947
+ export interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
948
+ def: $ZodCheckIncludesDef;
949
+ issc: errors.$ZodIssueInvalidStringFormat;
950
+ }
951
+
952
+ export interface $ZodCheckIncludes extends $ZodCheck<string> {
953
+ _zod: $ZodCheckIncludesInternals;
954
+ }
955
+
956
+ export const $ZodCheckIncludes: core.$constructor<$ZodCheckIncludes> = /*@__PURE__*/ core.$constructor(
957
+ "$ZodCheckIncludes",
958
+ (inst, def) => {
959
+ $ZodCheck.init(inst, def);
960
+
961
+ const escapedRegex = util.escapeRegex(def.includes);
962
+ const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
963
+ def.pattern = pattern;
964
+ inst._zod.onattach.push((inst) => {
965
+ const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
966
+ bag.patterns ??= new Set();
967
+ bag.patterns.add(pattern);
968
+ });
969
+
970
+ inst._zod.check = (payload) => {
971
+ if (payload.value.includes(def.includes, def.position)) return;
972
+ payload.issues.push({
973
+ origin: "string",
974
+ code: "invalid_format",
975
+ format: "includes",
976
+ includes: def.includes,
977
+ input: payload.value,
978
+ inst,
979
+ continue: !def.abort,
980
+ });
981
+ };
982
+ }
983
+ );
984
+
985
+ /////////////////////////////////////
986
+ ///// $ZodCheckStartsWith /////
987
+ /////////////////////////////////////
988
+ export interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
989
+ prefix: string;
990
+ }
991
+
992
+ export interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
993
+ def: $ZodCheckStartsWithDef;
994
+ issc: errors.$ZodIssueInvalidStringFormat;
995
+ }
996
+
997
+ export interface $ZodCheckStartsWith extends $ZodCheck<string> {
998
+ _zod: $ZodCheckStartsWithInternals;
999
+ }
1000
+
1001
+ export const $ZodCheckStartsWith: core.$constructor<$ZodCheckStartsWith> = /*@__PURE__*/ core.$constructor(
1002
+ "$ZodCheckStartsWith",
1003
+ (inst, def) => {
1004
+ $ZodCheck.init(inst, def);
1005
+
1006
+ const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);
1007
+ def.pattern ??= pattern;
1008
+ inst._zod.onattach.push((inst) => {
1009
+ const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
1010
+ bag.patterns ??= new Set();
1011
+ bag.patterns.add(pattern);
1012
+ });
1013
+
1014
+ inst._zod.check = (payload) => {
1015
+ if (payload.value.startsWith(def.prefix)) return;
1016
+ payload.issues.push({
1017
+ origin: "string",
1018
+ code: "invalid_format",
1019
+ format: "starts_with",
1020
+ prefix: def.prefix,
1021
+ input: payload.value,
1022
+ inst,
1023
+ continue: !def.abort,
1024
+ });
1025
+ };
1026
+ }
1027
+ );
1028
+
1029
+ //////////////////////////////////
1030
+ ///// $ZodCheckEndsWith /////
1031
+ //////////////////////////////////
1032
+ export interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1033
+ suffix: string;
1034
+ }
1035
+
1036
+ export interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1037
+ def: $ZodCheckEndsWithDef;
1038
+ issc: errors.$ZodIssueInvalidStringFormat;
1039
+ }
1040
+
1041
+ export interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1042
+ _zod: $ZodCheckEndsWithInternals;
1043
+ }
1044
+
1045
+ export const $ZodCheckEndsWith: core.$constructor<$ZodCheckEndsWith> = /*@__PURE__*/ core.$constructor(
1046
+ "$ZodCheckEndsWith",
1047
+ (inst, def) => {
1048
+ $ZodCheck.init(inst, def);
1049
+
1050
+ const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);
1051
+ def.pattern ??= pattern;
1052
+ inst._zod.onattach.push((inst) => {
1053
+ const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
1054
+ bag.patterns ??= new Set();
1055
+ bag.patterns.add(pattern);
1056
+ });
1057
+
1058
+ inst._zod.check = (payload) => {
1059
+ if (payload.value.endsWith(def.suffix)) return;
1060
+ payload.issues.push({
1061
+ origin: "string",
1062
+ code: "invalid_format",
1063
+ format: "ends_with",
1064
+ suffix: def.suffix,
1065
+ input: payload.value,
1066
+ inst,
1067
+ continue: !def.abort,
1068
+ });
1069
+ };
1070
+ }
1071
+ );
1072
+
1073
+ ///////////////////////////////////
1074
+ ///// $ZodCheckProperty /////
1075
+ ///////////////////////////////////
1076
+ function handleCheckPropertyResult(
1077
+ result: schemas.ParsePayload<unknown>,
1078
+ payload: schemas.ParsePayload<unknown>,
1079
+ property: string
1080
+ ) {
1081
+ if (result.issues.length) {
1082
+ payload.issues.push(...util.prefixIssues(property, result.issues));
1083
+ }
1084
+ }
1085
+ export interface $ZodCheckPropertyDef extends $ZodCheckDef {
1086
+ check: "property";
1087
+ property: string;
1088
+ schema: schemas.$ZodType;
1089
+ }
1090
+
1091
+ export interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
1092
+ def: $ZodCheckPropertyDef;
1093
+ issc: errors.$ZodIssue;
1094
+ }
1095
+
1096
+ export interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
1097
+ _zod: $ZodCheckPropertyInternals<T>;
1098
+ }
1099
+
1100
+ export const $ZodCheckProperty: core.$constructor<$ZodCheckProperty> = /*@__PURE__*/ core.$constructor(
1101
+ "$ZodCheckProperty",
1102
+ (inst, def) => {
1103
+ $ZodCheck.init(inst, def);
1104
+
1105
+ inst._zod.check = (payload) => {
1106
+ const result = def.schema._zod.run(
1107
+ {
1108
+ value: (payload.value as any)[def.property],
1109
+ issues: [],
1110
+ },
1111
+ {}
1112
+ );
1113
+
1114
+ if (result instanceof Promise) {
1115
+ return result.then((result) => handleCheckPropertyResult(result, payload, def.property));
1116
+ }
1117
+
1118
+ handleCheckPropertyResult(result, payload, def.property);
1119
+ return;
1120
+ };
1121
+ }
1122
+ );
1123
+
1124
+ ///////////////////////////////////
1125
+ ///// $ZodCheckMimeType /////
1126
+ ///////////////////////////////////
1127
+ export interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
1128
+ check: "mime_type";
1129
+ mime: util.MimeTypes[];
1130
+ }
1131
+
1132
+ export interface $ZodCheckMimeTypeInternals<T extends schemas.File = schemas.File> extends $ZodCheckInternals<T> {
1133
+ def: $ZodCheckMimeTypeDef;
1134
+ issc: errors.$ZodIssueInvalidValue;
1135
+ }
1136
+
1137
+ export interface $ZodCheckMimeType<T extends schemas.File = schemas.File> extends $ZodCheck<T> {
1138
+ _zod: $ZodCheckMimeTypeInternals<T>;
1139
+ }
1140
+
1141
+ export const $ZodCheckMimeType: core.$constructor<$ZodCheckMimeType> = /*@__PURE__*/ core.$constructor(
1142
+ "$ZodCheckMimeType",
1143
+ (inst, def) => {
1144
+ $ZodCheck.init(inst, def);
1145
+ const mimeSet = new Set(def.mime);
1146
+ inst._zod.onattach.push((inst) => {
1147
+ inst._zod.bag.mime = def.mime;
1148
+ });
1149
+ inst._zod.check = (payload) => {
1150
+ if (mimeSet.has(payload.value.type)) return;
1151
+ payload.issues.push({
1152
+ code: "invalid_value",
1153
+ values: def.mime,
1154
+ input: payload.value.type,
1155
+ inst,
1156
+ continue: !def.abort,
1157
+ });
1158
+ };
1159
+ }
1160
+ );
1161
+
1162
+ ///////////////////////////////////
1163
+ ///// $ZodCheckFileName /////
1164
+ ///////////////////////////////////
1165
+ // interface $ZodCheckFileNameDef extends $ZodCheckDef {
1166
+ // check: "file_name";
1167
+ // fileName: string;
1168
+ // error?: errors.$ZodErrorMap<errors.$ZodIssueInvalidType> | undefined;
1169
+ // }
1170
+ // export interface $ZodCheckFileName<T extends File = File>
1171
+ // extends $ZodCheckInternals<T> {
1172
+ // _def: $ZodCheckFileNameDef;
1173
+ // }
1174
+
1175
+ // export const $ZodCheckFileName: core.$constructor<$ZodCheckFileName> =
1176
+ // core.$constructor("$ZodCheckFileName", (inst, def) => {
1177
+ // $ZodCheck.init(inst, def);
1178
+
1179
+ // inst._zod.check = (payload) => {
1180
+ // if (def.fileName === payload.value.name) return;
1181
+ // payload.issues.push({
1182
+ // origin: "file",
1183
+ // code: "invalid_value",
1184
+ // options: [def.fileName],
1185
+ // input: payload.value,
1186
+ // path: ["name"],
1187
+ // inst,
1188
+ // });
1189
+ // };
1190
+ // });
1191
+
1192
+ ///////////////////////////////////
1193
+ ///// $ZodCheckOverwrite /////
1194
+ ///////////////////////////////////
1195
+ export interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
1196
+ check: "overwrite";
1197
+ tx(value: T): T;
1198
+ }
1199
+
1200
+ export interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
1201
+ def: $ZodCheckOverwriteDef<T>;
1202
+ issc: never;
1203
+ }
1204
+
1205
+ export interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
1206
+ _zod: $ZodCheckOverwriteInternals<T>;
1207
+ }
1208
+
1209
+ export const $ZodCheckOverwrite: core.$constructor<$ZodCheckOverwrite> = /*@__PURE__*/ core.$constructor(
1210
+ "$ZodCheckOverwrite",
1211
+ (inst, def) => {
1212
+ $ZodCheck.init(inst, def);
1213
+
1214
+ inst._zod.check = (payload) => {
1215
+ payload.value = def.tx(payload.value);
1216
+ };
1217
+ }
1218
+ );
1219
+
1220
+ // ///////////////////////////////
1221
+ // ///// $ZodCheckTrim /////
1222
+ // ///////////////////////////////
1223
+ // export interface $ZodCheckTrimDef extends $ZodCheckDef {
1224
+ // check: "trim";
1225
+ // error?: errors.$ZodErrorMap<never> | undefined;
1226
+ // }
1227
+ // export interface $ZodCheckTrim extends $ZodCheckInternals<string> {
1228
+ // _def: $ZodCheckTrimDef;
1229
+ // }
1230
+
1231
+ // export const $ZodCheckTrim: core.$constructor<$ZodCheckTrim> =
1232
+ // core.$constructor("$ZodCheckTrim", (inst, def) => {
1233
+ // $ZodCheck.init(inst, def);
1234
+
1235
+ // inst._zod.check = (payload) => {
1236
+ // payload.value = payload.value.trim();
1237
+ // };
1238
+ // });
1239
+
1240
+ // //////////////////////////////////////
1241
+ // ///// $ZodCheckNormalize /////
1242
+ // //////////////////////////////////////
1243
+ // interface $ZodCheckNormalizeDef extends $ZodCheckDef {
1244
+ // check: "normalize";
1245
+ // error?: errors.$ZodErrorMap<never> | undefined;
1246
+ // }
1247
+
1248
+ // export interface $ZodCheckNormalize extends $ZodCheckInternals<string> {
1249
+ // _def: $ZodCheckNormalizeDef;
1250
+ // }
1251
+
1252
+ // export const $ZodCheckNormalize: core.$constructor<$ZodCheckNormalize> =
1253
+ // core.$constructor("$ZodCheckNormalize", (inst, def) => {
1254
+ // $ZodCheck.init(inst, def);
1255
+
1256
+ // inst._zod.check = (payload) => {
1257
+ // payload.value = payload.value.normalize();
1258
+ // };
1259
+ // });
1260
+
1261
+ export type $ZodChecks =
1262
+ | $ZodCheckLessThan
1263
+ | $ZodCheckGreaterThan
1264
+ | $ZodCheckMultipleOf
1265
+ | $ZodCheckNumberFormat
1266
+ | $ZodCheckBigIntFormat
1267
+ | $ZodCheckMaxSize
1268
+ | $ZodCheckMinSize
1269
+ | $ZodCheckSizeEquals
1270
+ | $ZodCheckMaxLength
1271
+ | $ZodCheckMinLength
1272
+ | $ZodCheckLengthEquals
1273
+ | $ZodCheckStringFormat
1274
+ | $ZodCheckProperty
1275
+ | $ZodCheckMimeType
1276
+ | $ZodCheckOverwrite;
1277
+
1278
+ export type $ZodStringFormatChecks =
1279
+ | $ZodCheckRegex
1280
+ | $ZodCheckLowerCase
1281
+ | $ZodCheckUpperCase
1282
+ | $ZodCheckIncludes
1283
+ | $ZodCheckStartsWith
1284
+ | $ZodCheckEndsWith
1285
+ | schemas.$ZodStringFormatTypes; // union of string format schema types