moonflower 1.2.0 → 1.3.0

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 (398) hide show
  1. package/dist/errors/UserFacingErrors.cjs +1 -1
  2. package/dist/errors/UserFacingErrors.cjs.map +1 -1
  3. package/dist/errors/UserFacingErrors.d.ts +27 -0
  4. package/dist/errors/UserFacingErrors.d.ts.map +1 -1
  5. package/dist/errors/UserFacingErrors.mjs +67 -13
  6. package/dist/errors/UserFacingErrors.mjs.map +1 -1
  7. package/dist/hooks/usePathParams.cjs +1 -1
  8. package/dist/hooks/usePathParams.cjs.map +1 -1
  9. package/dist/hooks/usePathParams.d.ts.map +1 -1
  10. package/dist/hooks/usePathParams.mjs +20 -27
  11. package/dist/hooks/usePathParams.mjs.map +1 -1
  12. package/dist/hooks/useQueryParams.cjs +1 -1
  13. package/dist/hooks/useQueryParams.cjs.map +1 -1
  14. package/dist/hooks/useQueryParams.d.ts +4 -3
  15. package/dist/hooks/useQueryParams.d.ts.map +1 -1
  16. package/dist/hooks/useQueryParams.mjs +24 -33
  17. package/dist/hooks/useQueryParams.mjs.map +1 -1
  18. package/dist/hooks/useRequestBody.cjs +1 -1
  19. package/dist/hooks/useRequestBody.cjs.map +1 -1
  20. package/dist/hooks/useRequestBody.d.ts +4 -3
  21. package/dist/hooks/useRequestBody.d.ts.map +1 -1
  22. package/dist/hooks/useRequestBody.mjs +23 -34
  23. package/dist/hooks/useRequestBody.mjs.map +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.mjs +64 -55
  26. package/dist/node_modules/zod/index.cjs +2 -0
  27. package/dist/node_modules/zod/index.cjs.map +1 -0
  28. package/dist/node_modules/zod/index.mjs +6 -0
  29. package/dist/node_modules/zod/index.mjs.map +1 -0
  30. package/dist/node_modules/zod/v4/classic/checks.cjs +2 -0
  31. package/dist/node_modules/zod/v4/classic/checks.cjs.map +1 -0
  32. package/dist/node_modules/zod/v4/classic/checks.mjs +34 -0
  33. package/dist/node_modules/zod/v4/classic/checks.mjs.map +1 -0
  34. package/dist/node_modules/zod/v4/classic/coerce.cjs +2 -0
  35. package/dist/node_modules/zod/v4/classic/coerce.cjs.map +1 -0
  36. package/dist/node_modules/zod/v4/classic/coerce.mjs +26 -0
  37. package/dist/node_modules/zod/v4/classic/coerce.mjs.map +1 -0
  38. package/dist/node_modules/zod/v4/classic/compat.cjs +2 -0
  39. package/dist/node_modules/zod/v4/classic/compat.cjs.map +1 -0
  40. package/dist/node_modules/zod/v4/classic/compat.mjs +35 -0
  41. package/dist/node_modules/zod/v4/classic/compat.mjs.map +1 -0
  42. package/dist/node_modules/zod/v4/classic/errors.cjs +2 -0
  43. package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -0
  44. package/dist/node_modules/zod/v4/classic/errors.mjs +41 -0
  45. package/dist/node_modules/zod/v4/classic/errors.mjs.map +1 -0
  46. package/dist/node_modules/zod/v4/classic/external.cjs +2 -0
  47. package/dist/node_modules/zod/v4/classic/external.cjs.map +1 -0
  48. package/dist/node_modules/zod/v4/classic/external.mjs +260 -0
  49. package/dist/node_modules/zod/v4/classic/external.mjs.map +1 -0
  50. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +2 -0
  51. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs.map +1 -0
  52. package/dist/node_modules/zod/v4/classic/from-json-schema.mjs +287 -0
  53. package/dist/node_modules/zod/v4/classic/from-json-schema.mjs.map +1 -0
  54. package/dist/node_modules/zod/v4/classic/iso.cjs +2 -0
  55. package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -0
  56. package/dist/node_modules/zod/v4/classic/iso.mjs +40 -0
  57. package/dist/node_modules/zod/v4/classic/iso.mjs.map +1 -0
  58. package/dist/node_modules/zod/v4/classic/parse.cjs +2 -0
  59. package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -0
  60. package/dist/node_modules/zod/v4/classic/parse.mjs +19 -0
  61. package/dist/node_modules/zod/v4/classic/parse.mjs.map +1 -0
  62. package/dist/node_modules/zod/v4/classic/schemas.cjs +2 -0
  63. package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
  64. package/dist/node_modules/zod/v4/classic/schemas.mjs +912 -0
  65. package/dist/node_modules/zod/v4/classic/schemas.mjs.map +1 -0
  66. package/dist/node_modules/zod/v4/core/api.cjs +2 -0
  67. package/dist/node_modules/zod/v4/core/api.cjs.map +1 -0
  68. package/dist/node_modules/zod/v4/core/api.mjs +1110 -0
  69. package/dist/node_modules/zod/v4/core/api.mjs.map +1 -0
  70. package/dist/node_modules/zod/v4/core/checks.cjs +2 -0
  71. package/dist/node_modules/zod/v4/core/checks.cjs.map +1 -0
  72. package/dist/node_modules/zod/v4/core/checks.mjs +421 -0
  73. package/dist/node_modules/zod/v4/core/checks.mjs.map +1 -0
  74. package/dist/node_modules/zod/v4/core/core.cjs +2 -0
  75. package/dist/node_modules/zod/v4/core/core.cjs.map +1 -0
  76. package/dist/node_modules/zod/v4/core/core.mjs +62 -0
  77. package/dist/node_modules/zod/v4/core/core.mjs.map +1 -0
  78. package/dist/node_modules/zod/v4/core/doc.cjs +4 -0
  79. package/dist/node_modules/zod/v4/core/doc.cjs.map +1 -0
  80. package/dist/node_modules/zod/v4/core/doc.mjs +27 -0
  81. package/dist/node_modules/zod/v4/core/doc.mjs.map +1 -0
  82. package/dist/node_modules/zod/v4/core/errors.cjs +3 -0
  83. package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -0
  84. package/dist/node_modules/zod/v4/core/errors.mjs +89 -0
  85. package/dist/node_modules/zod/v4/core/errors.mjs.map +1 -0
  86. package/dist/node_modules/zod/v4/core/index.cjs +2 -0
  87. package/dist/node_modules/zod/v4/core/index.cjs.map +1 -0
  88. package/dist/node_modules/zod/v4/core/index.mjs +293 -0
  89. package/dist/node_modules/zod/v4/core/index.mjs.map +1 -0
  90. package/dist/node_modules/zod/v4/core/json-schema-generator.cjs +2 -0
  91. package/dist/node_modules/zod/v4/core/json-schema-generator.cjs.map +1 -0
  92. package/dist/node_modules/zod/v4/core/json-schema-generator.mjs +66 -0
  93. package/dist/node_modules/zod/v4/core/json-schema-generator.mjs.map +1 -0
  94. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +2 -0
  95. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
  96. package/dist/node_modules/zod/v4/core/json-schema-processors.mjs +346 -0
  97. package/dist/node_modules/zod/v4/core/json-schema-processors.mjs.map +1 -0
  98. package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
  99. package/dist/node_modules/zod/v4/core/json-schema.cjs.map +1 -0
  100. package/dist/node_modules/zod/v4/core/json-schema.mjs +2 -0
  101. package/dist/node_modules/zod/v4/core/json-schema.mjs.map +1 -0
  102. package/dist/node_modules/zod/v4/core/parse.cjs +2 -0
  103. package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -0
  104. package/dist/node_modules/zod/v4/core/parse.mjs +75 -0
  105. package/dist/node_modules/zod/v4/core/parse.mjs.map +1 -0
  106. package/dist/node_modules/zod/v4/core/regexes.cjs +2 -0
  107. package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -0
  108. package/dist/node_modules/zod/v4/core/regexes.mjs +94 -0
  109. package/dist/node_modules/zod/v4/core/regexes.mjs.map +1 -0
  110. package/dist/node_modules/zod/v4/core/registries.cjs +2 -0
  111. package/dist/node_modules/zod/v4/core/registries.cjs.map +1 -0
  112. package/dist/node_modules/zod/v4/core/registries.mjs +44 -0
  113. package/dist/node_modules/zod/v4/core/registries.mjs.map +1 -0
  114. package/dist/node_modules/zod/v4/core/schemas.cjs +36 -0
  115. package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -0
  116. package/dist/node_modules/zod/v4/core/schemas.mjs +1319 -0
  117. package/dist/node_modules/zod/v4/core/schemas.mjs.map +1 -0
  118. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +4 -0
  119. package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
  120. package/dist/node_modules/zod/v4/core/to-json-schema.mjs +244 -0
  121. package/dist/node_modules/zod/v4/core/to-json-schema.mjs.map +1 -0
  122. package/dist/node_modules/zod/v4/core/util.cjs +2 -0
  123. package/dist/node_modules/zod/v4/core/util.cjs.map +1 -0
  124. package/dist/node_modules/zod/v4/core/util.mjs +523 -0
  125. package/dist/node_modules/zod/v4/core/util.mjs.map +1 -0
  126. package/dist/node_modules/zod/v4/core/versions.cjs +2 -0
  127. package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -0
  128. package/dist/node_modules/zod/v4/core/versions.mjs +9 -0
  129. package/dist/node_modules/zod/v4/core/versions.mjs.map +1 -0
  130. package/dist/node_modules/zod/v4/locales/ar.cjs +2 -0
  131. package/dist/node_modules/zod/v4/locales/ar.cjs.map +1 -0
  132. package/dist/node_modules/zod/v4/locales/ar.mjs +87 -0
  133. package/dist/node_modules/zod/v4/locales/ar.mjs.map +1 -0
  134. package/dist/node_modules/zod/v4/locales/az.cjs +2 -0
  135. package/dist/node_modules/zod/v4/locales/az.cjs.map +1 -0
  136. package/dist/node_modules/zod/v4/locales/az.mjs +87 -0
  137. package/dist/node_modules/zod/v4/locales/az.mjs.map +1 -0
  138. package/dist/node_modules/zod/v4/locales/be.cjs +2 -0
  139. package/dist/node_modules/zod/v4/locales/be.cjs.map +1 -0
  140. package/dist/node_modules/zod/v4/locales/be.mjs +129 -0
  141. package/dist/node_modules/zod/v4/locales/be.mjs.map +1 -0
  142. package/dist/node_modules/zod/v4/locales/bg.cjs +2 -0
  143. package/dist/node_modules/zod/v4/locales/bg.cjs.map +1 -0
  144. package/dist/node_modules/zod/v4/locales/bg.mjs +98 -0
  145. package/dist/node_modules/zod/v4/locales/bg.mjs.map +1 -0
  146. package/dist/node_modules/zod/v4/locales/ca.cjs +2 -0
  147. package/dist/node_modules/zod/v4/locales/ca.cjs.map +1 -0
  148. package/dist/node_modules/zod/v4/locales/ca.mjs +88 -0
  149. package/dist/node_modules/zod/v4/locales/ca.mjs.map +1 -0
  150. package/dist/node_modules/zod/v4/locales/cs.cjs +2 -0
  151. package/dist/node_modules/zod/v4/locales/cs.cjs.map +1 -0
  152. package/dist/node_modules/zod/v4/locales/cs.mjs +91 -0
  153. package/dist/node_modules/zod/v4/locales/cs.mjs.map +1 -0
  154. package/dist/node_modules/zod/v4/locales/da.cjs +2 -0
  155. package/dist/node_modules/zod/v4/locales/da.cjs.map +1 -0
  156. package/dist/node_modules/zod/v4/locales/da.mjs +94 -0
  157. package/dist/node_modules/zod/v4/locales/da.mjs.map +1 -0
  158. package/dist/node_modules/zod/v4/locales/de.cjs +2 -0
  159. package/dist/node_modules/zod/v4/locales/de.cjs.map +1 -0
  160. package/dist/node_modules/zod/v4/locales/de.mjs +89 -0
  161. package/dist/node_modules/zod/v4/locales/de.mjs.map +1 -0
  162. package/dist/node_modules/zod/v4/locales/en.cjs +2 -0
  163. package/dist/node_modules/zod/v4/locales/en.cjs.map +1 -0
  164. package/dist/node_modules/zod/v4/locales/en.mjs +91 -0
  165. package/dist/node_modules/zod/v4/locales/en.mjs.map +1 -0
  166. package/dist/node_modules/zod/v4/locales/eo.cjs +2 -0
  167. package/dist/node_modules/zod/v4/locales/eo.cjs.map +1 -0
  168. package/dist/node_modules/zod/v4/locales/eo.mjs +90 -0
  169. package/dist/node_modules/zod/v4/locales/eo.mjs.map +1 -0
  170. package/dist/node_modules/zod/v4/locales/es.cjs +2 -0
  171. package/dist/node_modules/zod/v4/locales/es.cjs.map +1 -0
  172. package/dist/node_modules/zod/v4/locales/es.mjs +111 -0
  173. package/dist/node_modules/zod/v4/locales/es.mjs.map +1 -0
  174. package/dist/node_modules/zod/v4/locales/fa.cjs +2 -0
  175. package/dist/node_modules/zod/v4/locales/fa.cjs.map +1 -0
  176. package/dist/node_modules/zod/v4/locales/fa.mjs +89 -0
  177. package/dist/node_modules/zod/v4/locales/fa.mjs.map +1 -0
  178. package/dist/node_modules/zod/v4/locales/fi.cjs +2 -0
  179. package/dist/node_modules/zod/v4/locales/fi.cjs.map +1 -0
  180. package/dist/node_modules/zod/v4/locales/fi.mjs +91 -0
  181. package/dist/node_modules/zod/v4/locales/fi.mjs.map +1 -0
  182. package/dist/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
  183. package/dist/node_modules/zod/v4/locales/fr-CA.cjs.map +1 -0
  184. package/dist/node_modules/zod/v4/locales/fr-CA.mjs +87 -0
  185. package/dist/node_modules/zod/v4/locales/fr-CA.mjs.map +1 -0
  186. package/dist/node_modules/zod/v4/locales/fr.cjs +2 -0
  187. package/dist/node_modules/zod/v4/locales/fr.cjs.map +1 -0
  188. package/dist/node_modules/zod/v4/locales/fr.mjs +89 -0
  189. package/dist/node_modules/zod/v4/locales/fr.mjs.map +1 -0
  190. package/dist/node_modules/zod/v4/locales/he.cjs +2 -0
  191. package/dist/node_modules/zod/v4/locales/he.cjs.map +1 -0
  192. package/dist/node_modules/zod/v4/locales/he.mjs +152 -0
  193. package/dist/node_modules/zod/v4/locales/he.mjs.map +1 -0
  194. package/dist/node_modules/zod/v4/locales/hu.cjs +2 -0
  195. package/dist/node_modules/zod/v4/locales/hu.cjs.map +1 -0
  196. package/dist/node_modules/zod/v4/locales/hu.mjs +89 -0
  197. package/dist/node_modules/zod/v4/locales/hu.mjs.map +1 -0
  198. package/dist/node_modules/zod/v4/locales/hy.cjs +2 -0
  199. package/dist/node_modules/zod/v4/locales/hy.cjs.map +1 -0
  200. package/dist/node_modules/zod/v4/locales/hy.mjs +130 -0
  201. package/dist/node_modules/zod/v4/locales/hy.mjs.map +1 -0
  202. package/dist/node_modules/zod/v4/locales/id.cjs +2 -0
  203. package/dist/node_modules/zod/v4/locales/id.cjs.map +1 -0
  204. package/dist/node_modules/zod/v4/locales/id.mjs +87 -0
  205. package/dist/node_modules/zod/v4/locales/id.mjs.map +1 -0
  206. package/dist/node_modules/zod/v4/locales/index.cjs +2 -0
  207. package/dist/node_modules/zod/v4/locales/index.cjs.map +1 -0
  208. package/dist/node_modules/zod/v4/locales/index.mjs +101 -0
  209. package/dist/node_modules/zod/v4/locales/index.mjs.map +1 -0
  210. package/dist/node_modules/zod/v4/locales/is.cjs +2 -0
  211. package/dist/node_modules/zod/v4/locales/is.cjs.map +1 -0
  212. package/dist/node_modules/zod/v4/locales/is.mjs +89 -0
  213. package/dist/node_modules/zod/v4/locales/is.mjs.map +1 -0
  214. package/dist/node_modules/zod/v4/locales/it.cjs +2 -0
  215. package/dist/node_modules/zod/v4/locales/it.cjs.map +1 -0
  216. package/dist/node_modules/zod/v4/locales/it.mjs +89 -0
  217. package/dist/node_modules/zod/v4/locales/it.mjs.map +1 -0
  218. package/dist/node_modules/zod/v4/locales/ja.cjs +2 -0
  219. package/dist/node_modules/zod/v4/locales/ja.cjs.map +1 -0
  220. package/dist/node_modules/zod/v4/locales/ja.mjs +89 -0
  221. package/dist/node_modules/zod/v4/locales/ja.mjs.map +1 -0
  222. package/dist/node_modules/zod/v4/locales/ka.cjs +2 -0
  223. package/dist/node_modules/zod/v4/locales/ka.cjs.map +1 -0
  224. package/dist/node_modules/zod/v4/locales/ka.mjs +92 -0
  225. package/dist/node_modules/zod/v4/locales/ka.mjs.map +1 -0
  226. package/dist/node_modules/zod/v4/locales/kh.cjs +2 -0
  227. package/dist/node_modules/zod/v4/locales/kh.cjs.map +1 -0
  228. package/dist/node_modules/zod/v4/locales/kh.mjs +8 -0
  229. package/dist/node_modules/zod/v4/locales/kh.mjs.map +1 -0
  230. package/dist/node_modules/zod/v4/locales/km.cjs +2 -0
  231. package/dist/node_modules/zod/v4/locales/km.cjs.map +1 -0
  232. package/dist/node_modules/zod/v4/locales/km.mjs +90 -0
  233. package/dist/node_modules/zod/v4/locales/km.mjs.map +1 -0
  234. package/dist/node_modules/zod/v4/locales/ko.cjs +2 -0
  235. package/dist/node_modules/zod/v4/locales/ko.cjs.map +1 -0
  236. package/dist/node_modules/zod/v4/locales/ko.mjs +87 -0
  237. package/dist/node_modules/zod/v4/locales/ko.mjs.map +1 -0
  238. package/dist/node_modules/zod/v4/locales/lt.cjs +2 -0
  239. package/dist/node_modules/zod/v4/locales/lt.cjs.map +1 -0
  240. package/dist/node_modules/zod/v4/locales/lt.mjs +178 -0
  241. package/dist/node_modules/zod/v4/locales/lt.mjs.map +1 -0
  242. package/dist/node_modules/zod/v4/locales/mk.cjs +2 -0
  243. package/dist/node_modules/zod/v4/locales/mk.cjs.map +1 -0
  244. package/dist/node_modules/zod/v4/locales/mk.mjs +89 -0
  245. package/dist/node_modules/zod/v4/locales/mk.mjs.map +1 -0
  246. package/dist/node_modules/zod/v4/locales/ms.cjs +2 -0
  247. package/dist/node_modules/zod/v4/locales/ms.cjs.map +1 -0
  248. package/dist/node_modules/zod/v4/locales/ms.mjs +88 -0
  249. package/dist/node_modules/zod/v4/locales/ms.mjs.map +1 -0
  250. package/dist/node_modules/zod/v4/locales/nl.cjs +2 -0
  251. package/dist/node_modules/zod/v4/locales/nl.cjs.map +1 -0
  252. package/dist/node_modules/zod/v4/locales/nl.mjs +88 -0
  253. package/dist/node_modules/zod/v4/locales/nl.mjs.map +1 -0
  254. package/dist/node_modules/zod/v4/locales/no.cjs +2 -0
  255. package/dist/node_modules/zod/v4/locales/no.cjs.map +1 -0
  256. package/dist/node_modules/zod/v4/locales/no.mjs +89 -0
  257. package/dist/node_modules/zod/v4/locales/no.mjs.map +1 -0
  258. package/dist/node_modules/zod/v4/locales/ota.cjs +2 -0
  259. package/dist/node_modules/zod/v4/locales/ota.cjs.map +1 -0
  260. package/dist/node_modules/zod/v4/locales/ota.mjs +90 -0
  261. package/dist/node_modules/zod/v4/locales/ota.mjs.map +1 -0
  262. package/dist/node_modules/zod/v4/locales/pl.cjs +2 -0
  263. package/dist/node_modules/zod/v4/locales/pl.cjs.map +1 -0
  264. package/dist/node_modules/zod/v4/locales/pl.mjs +89 -0
  265. package/dist/node_modules/zod/v4/locales/pl.mjs.map +1 -0
  266. package/dist/node_modules/zod/v4/locales/ps.cjs +2 -0
  267. package/dist/node_modules/zod/v4/locales/ps.cjs.map +1 -0
  268. package/dist/node_modules/zod/v4/locales/ps.mjs +89 -0
  269. package/dist/node_modules/zod/v4/locales/ps.mjs.map +1 -0
  270. package/dist/node_modules/zod/v4/locales/pt.cjs +2 -0
  271. package/dist/node_modules/zod/v4/locales/pt.cjs.map +1 -0
  272. package/dist/node_modules/zod/v4/locales/pt.mjs +89 -0
  273. package/dist/node_modules/zod/v4/locales/pt.mjs.map +1 -0
  274. package/dist/node_modules/zod/v4/locales/ru.cjs +2 -0
  275. package/dist/node_modules/zod/v4/locales/ru.cjs.map +1 -0
  276. package/dist/node_modules/zod/v4/locales/ru.mjs +129 -0
  277. package/dist/node_modules/zod/v4/locales/ru.mjs.map +1 -0
  278. package/dist/node_modules/zod/v4/locales/sl.cjs +2 -0
  279. package/dist/node_modules/zod/v4/locales/sl.cjs.map +1 -0
  280. package/dist/node_modules/zod/v4/locales/sl.mjs +89 -0
  281. package/dist/node_modules/zod/v4/locales/sl.mjs.map +1 -0
  282. package/dist/node_modules/zod/v4/locales/sv.cjs +2 -0
  283. package/dist/node_modules/zod/v4/locales/sv.cjs.map +1 -0
  284. package/dist/node_modules/zod/v4/locales/sv.mjs +89 -0
  285. package/dist/node_modules/zod/v4/locales/sv.mjs.map +1 -0
  286. package/dist/node_modules/zod/v4/locales/ta.cjs +2 -0
  287. package/dist/node_modules/zod/v4/locales/ta.cjs.map +1 -0
  288. package/dist/node_modules/zod/v4/locales/ta.mjs +90 -0
  289. package/dist/node_modules/zod/v4/locales/ta.mjs.map +1 -0
  290. package/dist/node_modules/zod/v4/locales/th.cjs +2 -0
  291. package/dist/node_modules/zod/v4/locales/th.cjs.map +1 -0
  292. package/dist/node_modules/zod/v4/locales/th.mjs +90 -0
  293. package/dist/node_modules/zod/v4/locales/th.mjs.map +1 -0
  294. package/dist/node_modules/zod/v4/locales/tr.cjs +2 -0
  295. package/dist/node_modules/zod/v4/locales/tr.cjs.map +1 -0
  296. package/dist/node_modules/zod/v4/locales/tr.mjs +87 -0
  297. package/dist/node_modules/zod/v4/locales/tr.mjs.map +1 -0
  298. package/dist/node_modules/zod/v4/locales/ua.cjs +2 -0
  299. package/dist/node_modules/zod/v4/locales/ua.cjs.map +1 -0
  300. package/dist/node_modules/zod/v4/locales/ua.mjs +8 -0
  301. package/dist/node_modules/zod/v4/locales/ua.mjs.map +1 -0
  302. package/dist/node_modules/zod/v4/locales/uk.cjs +2 -0
  303. package/dist/node_modules/zod/v4/locales/uk.cjs.map +1 -0
  304. package/dist/node_modules/zod/v4/locales/uk.mjs +89 -0
  305. package/dist/node_modules/zod/v4/locales/uk.mjs.map +1 -0
  306. package/dist/node_modules/zod/v4/locales/ur.cjs +2 -0
  307. package/dist/node_modules/zod/v4/locales/ur.cjs.map +1 -0
  308. package/dist/node_modules/zod/v4/locales/ur.mjs +90 -0
  309. package/dist/node_modules/zod/v4/locales/ur.mjs.map +1 -0
  310. package/dist/node_modules/zod/v4/locales/uz.cjs +2 -0
  311. package/dist/node_modules/zod/v4/locales/uz.cjs.map +1 -0
  312. package/dist/node_modules/zod/v4/locales/uz.mjs +90 -0
  313. package/dist/node_modules/zod/v4/locales/uz.mjs.map +1 -0
  314. package/dist/node_modules/zod/v4/locales/vi.cjs +2 -0
  315. package/dist/node_modules/zod/v4/locales/vi.cjs.map +1 -0
  316. package/dist/node_modules/zod/v4/locales/vi.mjs +89 -0
  317. package/dist/node_modules/zod/v4/locales/vi.mjs.map +1 -0
  318. package/dist/node_modules/zod/v4/locales/yo.cjs +2 -0
  319. package/dist/node_modules/zod/v4/locales/yo.cjs.map +1 -0
  320. package/dist/node_modules/zod/v4/locales/yo.mjs +89 -0
  321. package/dist/node_modules/zod/v4/locales/yo.mjs.map +1 -0
  322. package/dist/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
  323. package/dist/node_modules/zod/v4/locales/zh-CN.cjs.map +1 -0
  324. package/dist/node_modules/zod/v4/locales/zh-CN.mjs +90 -0
  325. package/dist/node_modules/zod/v4/locales/zh-CN.mjs.map +1 -0
  326. package/dist/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
  327. package/dist/node_modules/zod/v4/locales/zh-TW.cjs.map +1 -0
  328. package/dist/node_modules/zod/v4/locales/zh-TW.mjs +87 -0
  329. package/dist/node_modules/zod/v4/locales/zh-TW.mjs.map +1 -0
  330. package/dist/openapi/analyzerModule/analyzerModule.cjs +1 -1
  331. package/dist/openapi/analyzerModule/analyzerModule.cjs.map +1 -1
  332. package/dist/openapi/analyzerModule/analyzerModule.d.ts.map +1 -1
  333. package/dist/openapi/analyzerModule/analyzerModule.mjs +42 -42
  334. package/dist/openapi/analyzerModule/analyzerModule.mjs.map +1 -1
  335. package/dist/openapi/analyzerModule/nodeParsers.cjs +1 -1
  336. package/dist/openapi/analyzerModule/nodeParsers.cjs.map +1 -1
  337. package/dist/openapi/analyzerModule/nodeParsers.d.ts +1 -0
  338. package/dist/openapi/analyzerModule/nodeParsers.d.ts.map +1 -1
  339. package/dist/openapi/analyzerModule/nodeParsers.mjs +261 -206
  340. package/dist/openapi/analyzerModule/nodeParsers.mjs.map +1 -1
  341. package/dist/openapi/analyzerModule/parseEndpoint.cjs +1 -1
  342. package/dist/openapi/analyzerModule/parseEndpoint.cjs.map +1 -1
  343. package/dist/openapi/analyzerModule/parseEndpoint.d.ts.map +1 -1
  344. package/dist/openapi/analyzerModule/parseEndpoint.mjs +62 -62
  345. package/dist/openapi/analyzerModule/parseEndpoint.mjs.map +1 -1
  346. package/dist/openapi/analyzerModule/test/TestCase.d.ts +9 -0
  347. package/dist/openapi/analyzerModule/test/TestCase.d.ts.map +1 -0
  348. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts +2 -0
  349. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts.map +1 -0
  350. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts +2 -0
  351. package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts.map +1 -0
  352. package/dist/utils/getValueAsNullableString.cjs +2 -0
  353. package/dist/utils/getValueAsNullableString.cjs.map +1 -0
  354. package/dist/utils/getValueAsNullableString.d.ts +2 -0
  355. package/dist/utils/getValueAsNullableString.d.ts.map +1 -0
  356. package/dist/utils/getValueAsNullableString.mjs +7 -0
  357. package/dist/utils/getValueAsNullableString.mjs.map +1 -0
  358. package/dist/utils/validationMessages.cjs +1 -1
  359. package/dist/utils/validationMessages.cjs.map +1 -1
  360. package/dist/utils/validationMessages.d.ts +1 -1
  361. package/dist/utils/validationMessages.d.ts.map +1 -1
  362. package/dist/utils/validationMessages.mjs +8 -8
  363. package/dist/utils/validationMessages.mjs.map +1 -1
  364. package/dist/validators/types.d.ts +4 -0
  365. package/dist/validators/types.d.ts.map +1 -1
  366. package/dist/validators/validateMissingParams.cjs +2 -0
  367. package/dist/validators/validateMissingParams.cjs.map +1 -0
  368. package/dist/validators/validateMissingParams.d.ts +7 -0
  369. package/dist/validators/validateMissingParams.d.ts.map +1 -0
  370. package/dist/validators/validateMissingParams.mjs +17 -0
  371. package/dist/validators/validateMissingParams.mjs.map +1 -0
  372. package/dist/validators/validateParam.cjs +2 -0
  373. package/dist/validators/validateParam.cjs.map +1 -0
  374. package/dist/validators/validateParam.d.ts +8 -0
  375. package/dist/validators/validateParam.d.ts.map +1 -0
  376. package/dist/validators/validateParam.mjs +41 -0
  377. package/dist/validators/validateParam.mjs.map +1 -0
  378. package/package.json +9 -2
  379. package/src/errors/UserFacingErrors.ts +54 -0
  380. package/src/hooks/usePathParams.spec.ts +27 -0
  381. package/src/hooks/usePathParams.ts +5 -13
  382. package/src/hooks/useQueryParams.spec.ts +99 -0
  383. package/src/hooks/useQueryParams.ts +16 -25
  384. package/src/hooks/useRequestBody.spec.ts +99 -0
  385. package/src/hooks/useRequestBody.ts +16 -35
  386. package/src/openapi/analyzerModule/analyzerModule.ts +2 -3
  387. package/src/openapi/analyzerModule/nodeParsers.ts +113 -8
  388. package/src/openapi/analyzerModule/parseEndpoint.ts +2 -2
  389. package/src/openapi/analyzerModule/test/TestCase.ts +8 -0
  390. package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.data.ts +9 -0
  391. package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.ts +21 -0
  392. package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.ts +87 -0
  393. package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.ts +178 -0
  394. package/src/utils/getValueAsNullableString.ts +8 -0
  395. package/src/utils/validationMessages.ts +4 -0
  396. package/src/validators/types.ts +5 -0
  397. package/src/validators/validateMissingParams.ts +27 -0
  398. package/src/validators/validateParam.ts +69 -0
@@ -0,0 +1,1319 @@
1
+ import { $ZodCheckStringFormat as de, $ZodCheckNumberFormat as he, $ZodCheckBigIntFormat as ve, $ZodCheck as _e } from "./checks.mjs";
2
+ import { $constructor as l, $ZodAsyncError as D, globalConfig as fe, config as b, $ZodEncodeError as te } from "./core.mjs";
3
+ import { Doc as me } from "./doc.mjs";
4
+ import { safeParse as ze, safeParseAsync as $e, parse as B, parseAsync as K } from "./parse.mjs";
5
+ import { base64url as re, string as ge, guid as Ze, uuid as M, email as we, emoji as be, nanoid as Pe, cuid as ke, cuid2 as Te, ulid as Ie, xid as Se, ksuid as Ee, datetime as Re, date as Oe, time as De, duration as Ne, ipv4 as je, ipv6 as Ue, mac as Ae, cidrv4 as Ce, cidrv6 as Ve, base64 as Fe, e164 as Le, number as oe, boolean as Be, bigint as Ke, undefined as Me, null as xe } from "./regexes.mjs";
6
+ import { defineLazy as v, aborted as k, cached as V, isObject as F, allowsEval as Je, esc as x, cleanRegex as L, prefixIssues as w, isPlainObject as U, finalizeIssue as P, propertyKeyTypes as A, getEnumValues as We, escapeRegex as N, primitiveTypes as ye, issue as Xe, optionalKeys as Ge } from "./util.mjs";
7
+ import { clone as Tt } from "./util.mjs";
8
+ import { version as He } from "./versions.mjs";
9
+ const h = /* @__PURE__ */ l("$ZodType", (e, n) => {
10
+ var t;
11
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = He;
12
+ const o = [...e._zod.def.checks ?? []];
13
+ e._zod.traits.has("$ZodCheck") && o.unshift(e);
14
+ for (const r of o)
15
+ for (const s of r._zod.onattach)
16
+ s(e);
17
+ if (o.length === 0)
18
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => {
19
+ e._zod.run = e._zod.parse;
20
+ });
21
+ else {
22
+ const r = (i, u, c) => {
23
+ let a = k(i), p;
24
+ for (const d of u) {
25
+ if (d._zod.def.when) {
26
+ if (!d._zod.def.when(i))
27
+ continue;
28
+ } else if (a)
29
+ continue;
30
+ const _ = i.issues.length, f = d._zod.check(i);
31
+ if (f instanceof Promise && c?.async === !1)
32
+ throw new D();
33
+ if (p || f instanceof Promise)
34
+ p = (p ?? Promise.resolve()).then(async () => {
35
+ await f, i.issues.length !== _ && (a || (a = k(i, _)));
36
+ });
37
+ else {
38
+ if (i.issues.length === _)
39
+ continue;
40
+ a || (a = k(i, _));
41
+ }
42
+ }
43
+ return p ? p.then(() => i) : i;
44
+ }, s = (i, u, c) => {
45
+ if (k(i))
46
+ return i.aborted = !0, i;
47
+ const a = r(u, o, c);
48
+ if (a instanceof Promise) {
49
+ if (c.async === !1)
50
+ throw new D();
51
+ return a.then((p) => e._zod.parse(p, c));
52
+ }
53
+ return e._zod.parse(a, c);
54
+ };
55
+ e._zod.run = (i, u) => {
56
+ if (u.skipChecks)
57
+ return e._zod.parse(i, u);
58
+ if (u.direction === "backward") {
59
+ const a = e._zod.parse({ value: i.value, issues: [] }, { ...u, skipChecks: !0 });
60
+ return a instanceof Promise ? a.then((p) => s(p, i, u)) : s(a, i, u);
61
+ }
62
+ const c = e._zod.parse(i, u);
63
+ if (c instanceof Promise) {
64
+ if (u.async === !1)
65
+ throw new D();
66
+ return c.then((a) => r(a, o, u));
67
+ }
68
+ return r(c, o, u);
69
+ };
70
+ }
71
+ v(e, "~standard", () => ({
72
+ validate: (r) => {
73
+ try {
74
+ const s = ze(e, r);
75
+ return s.success ? { value: s.data } : { issues: s.error?.issues };
76
+ } catch {
77
+ return $e(e, r).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
78
+ }
79
+ },
80
+ vendor: "zod",
81
+ version: 1
82
+ }));
83
+ }), qe = /* @__PURE__ */ l("$ZodString", (e, n) => {
84
+ h.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? ge(e._zod.bag), e._zod.parse = (t, o) => {
85
+ if (n.coerce)
86
+ try {
87
+ t.value = String(t.value);
88
+ } catch {
89
+ }
90
+ return typeof t.value == "string" || t.issues.push({
91
+ expected: "string",
92
+ code: "invalid_type",
93
+ input: t.value,
94
+ inst: e
95
+ }), t;
96
+ };
97
+ }), m = /* @__PURE__ */ l("$ZodStringFormat", (e, n) => {
98
+ de.init(e, n), qe.init(e, n);
99
+ }), vn = /* @__PURE__ */ l("$ZodGUID", (e, n) => {
100
+ n.pattern ?? (n.pattern = Ze), m.init(e, n);
101
+ }), _n = /* @__PURE__ */ l("$ZodUUID", (e, n) => {
102
+ if (n.version) {
103
+ const o = {
104
+ v1: 1,
105
+ v2: 2,
106
+ v3: 3,
107
+ v4: 4,
108
+ v5: 5,
109
+ v6: 6,
110
+ v7: 7,
111
+ v8: 8
112
+ }[n.version];
113
+ if (o === void 0)
114
+ throw new Error(`Invalid UUID version: "${n.version}"`);
115
+ n.pattern ?? (n.pattern = M(o));
116
+ } else
117
+ n.pattern ?? (n.pattern = M());
118
+ m.init(e, n);
119
+ }), fn = /* @__PURE__ */ l("$ZodEmail", (e, n) => {
120
+ n.pattern ?? (n.pattern = we), m.init(e, n);
121
+ }), mn = /* @__PURE__ */ l("$ZodURL", (e, n) => {
122
+ m.init(e, n), e._zod.check = (t) => {
123
+ try {
124
+ const o = t.value.trim(), r = new URL(o);
125
+ n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(r.hostname) || t.issues.push({
126
+ code: "invalid_format",
127
+ format: "url",
128
+ note: "Invalid hostname",
129
+ pattern: n.hostname.source,
130
+ input: t.value,
131
+ inst: e,
132
+ continue: !n.abort
133
+ })), n.protocol && (n.protocol.lastIndex = 0, n.protocol.test(r.protocol.endsWith(":") ? r.protocol.slice(0, -1) : r.protocol) || t.issues.push({
134
+ code: "invalid_format",
135
+ format: "url",
136
+ note: "Invalid protocol",
137
+ pattern: n.protocol.source,
138
+ input: t.value,
139
+ inst: e,
140
+ continue: !n.abort
141
+ })), n.normalize ? t.value = r.href : t.value = o;
142
+ return;
143
+ } catch {
144
+ t.issues.push({
145
+ code: "invalid_format",
146
+ format: "url",
147
+ input: t.value,
148
+ inst: e,
149
+ continue: !n.abort
150
+ });
151
+ }
152
+ };
153
+ }), zn = /* @__PURE__ */ l("$ZodEmoji", (e, n) => {
154
+ n.pattern ?? (n.pattern = be()), m.init(e, n);
155
+ }), $n = /* @__PURE__ */ l("$ZodNanoID", (e, n) => {
156
+ n.pattern ?? (n.pattern = Pe), m.init(e, n);
157
+ }), gn = /* @__PURE__ */ l("$ZodCUID", (e, n) => {
158
+ n.pattern ?? (n.pattern = ke), m.init(e, n);
159
+ }), Zn = /* @__PURE__ */ l("$ZodCUID2", (e, n) => {
160
+ n.pattern ?? (n.pattern = Te), m.init(e, n);
161
+ }), wn = /* @__PURE__ */ l("$ZodULID", (e, n) => {
162
+ n.pattern ?? (n.pattern = Ie), m.init(e, n);
163
+ }), bn = /* @__PURE__ */ l("$ZodXID", (e, n) => {
164
+ n.pattern ?? (n.pattern = Se), m.init(e, n);
165
+ }), Pn = /* @__PURE__ */ l("$ZodKSUID", (e, n) => {
166
+ n.pattern ?? (n.pattern = Ee), m.init(e, n);
167
+ }), kn = /* @__PURE__ */ l("$ZodISODateTime", (e, n) => {
168
+ n.pattern ?? (n.pattern = Re(n)), m.init(e, n);
169
+ }), Tn = /* @__PURE__ */ l("$ZodISODate", (e, n) => {
170
+ n.pattern ?? (n.pattern = Oe), m.init(e, n);
171
+ }), In = /* @__PURE__ */ l("$ZodISOTime", (e, n) => {
172
+ n.pattern ?? (n.pattern = De(n)), m.init(e, n);
173
+ }), Sn = /* @__PURE__ */ l("$ZodISODuration", (e, n) => {
174
+ n.pattern ?? (n.pattern = Ne), m.init(e, n);
175
+ }), En = /* @__PURE__ */ l("$ZodIPv4", (e, n) => {
176
+ n.pattern ?? (n.pattern = je), m.init(e, n), e._zod.bag.format = "ipv4";
177
+ }), Rn = /* @__PURE__ */ l("$ZodIPv6", (e, n) => {
178
+ n.pattern ?? (n.pattern = Ue), m.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
179
+ try {
180
+ new URL(`http://[${t.value}]`);
181
+ } catch {
182
+ t.issues.push({
183
+ code: "invalid_format",
184
+ format: "ipv6",
185
+ input: t.value,
186
+ inst: e,
187
+ continue: !n.abort
188
+ });
189
+ }
190
+ };
191
+ }), On = /* @__PURE__ */ l("$ZodMAC", (e, n) => {
192
+ n.pattern ?? (n.pattern = Ae(n.delimiter)), m.init(e, n), e._zod.bag.format = "mac";
193
+ }), Dn = /* @__PURE__ */ l("$ZodCIDRv4", (e, n) => {
194
+ n.pattern ?? (n.pattern = Ce), m.init(e, n);
195
+ }), Nn = /* @__PURE__ */ l("$ZodCIDRv6", (e, n) => {
196
+ n.pattern ?? (n.pattern = Ve), m.init(e, n), e._zod.check = (t) => {
197
+ const o = t.value.split("/");
198
+ try {
199
+ if (o.length !== 2)
200
+ throw new Error();
201
+ const [r, s] = o;
202
+ if (!s)
203
+ throw new Error();
204
+ const i = Number(s);
205
+ if (`${i}` !== s)
206
+ throw new Error();
207
+ if (i < 0 || i > 128)
208
+ throw new Error();
209
+ new URL(`http://[${r}]`);
210
+ } catch {
211
+ t.issues.push({
212
+ code: "invalid_format",
213
+ format: "cidrv6",
214
+ input: t.value,
215
+ inst: e,
216
+ continue: !n.abort
217
+ });
218
+ }
219
+ };
220
+ });
221
+ function se(e) {
222
+ if (e === "")
223
+ return !0;
224
+ if (e.length % 4 !== 0)
225
+ return !1;
226
+ try {
227
+ return atob(e), !0;
228
+ } catch {
229
+ return !1;
230
+ }
231
+ }
232
+ const jn = /* @__PURE__ */ l("$ZodBase64", (e, n) => {
233
+ n.pattern ?? (n.pattern = Fe), m.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
234
+ se(t.value) || t.issues.push({
235
+ code: "invalid_format",
236
+ format: "base64",
237
+ input: t.value,
238
+ inst: e,
239
+ continue: !n.abort
240
+ });
241
+ };
242
+ });
243
+ function Qe(e) {
244
+ if (!re.test(e))
245
+ return !1;
246
+ const n = e.replace(/[-_]/g, (o) => o === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "=");
247
+ return se(t);
248
+ }
249
+ const Un = /* @__PURE__ */ l("$ZodBase64URL", (e, n) => {
250
+ n.pattern ?? (n.pattern = re), m.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
251
+ Qe(t.value) || t.issues.push({
252
+ code: "invalid_format",
253
+ format: "base64url",
254
+ input: t.value,
255
+ inst: e,
256
+ continue: !n.abort
257
+ });
258
+ };
259
+ }), An = /* @__PURE__ */ l("$ZodE164", (e, n) => {
260
+ n.pattern ?? (n.pattern = Le), m.init(e, n);
261
+ });
262
+ function Ye(e, n = null) {
263
+ try {
264
+ const t = e.split(".");
265
+ if (t.length !== 3)
266
+ return !1;
267
+ const [o] = t;
268
+ if (!o)
269
+ return !1;
270
+ const r = JSON.parse(atob(o));
271
+ return !("typ" in r && r?.typ !== "JWT" || !r.alg || n && (!("alg" in r) || r.alg !== n));
272
+ } catch {
273
+ return !1;
274
+ }
275
+ }
276
+ const Cn = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
277
+ m.init(e, n), e._zod.check = (t) => {
278
+ Ye(t.value, n.alg) || t.issues.push({
279
+ code: "invalid_format",
280
+ format: "jwt",
281
+ input: t.value,
282
+ inst: e,
283
+ continue: !n.abort
284
+ });
285
+ };
286
+ }), Vn = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, n) => {
287
+ m.init(e, n), e._zod.check = (t) => {
288
+ n.fn(t.value) || t.issues.push({
289
+ code: "invalid_format",
290
+ format: n.format,
291
+ input: t.value,
292
+ inst: e,
293
+ continue: !n.abort
294
+ });
295
+ };
296
+ }), en = /* @__PURE__ */ l("$ZodNumber", (e, n) => {
297
+ h.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? oe, e._zod.parse = (t, o) => {
298
+ if (n.coerce)
299
+ try {
300
+ t.value = Number(t.value);
301
+ } catch {
302
+ }
303
+ const r = t.value;
304
+ if (typeof r == "number" && !Number.isNaN(r) && Number.isFinite(r))
305
+ return t;
306
+ const s = typeof r == "number" ? Number.isNaN(r) ? "NaN" : Number.isFinite(r) ? void 0 : "Infinity" : void 0;
307
+ return t.issues.push({
308
+ expected: "number",
309
+ code: "invalid_type",
310
+ input: r,
311
+ inst: e,
312
+ ...s ? { received: s } : {}
313
+ }), t;
314
+ };
315
+ }), Fn = /* @__PURE__ */ l("$ZodNumberFormat", (e, n) => {
316
+ he.init(e, n), en.init(e, n);
317
+ }), Ln = /* @__PURE__ */ l("$ZodBoolean", (e, n) => {
318
+ h.init(e, n), e._zod.pattern = Be, e._zod.parse = (t, o) => {
319
+ if (n.coerce)
320
+ try {
321
+ t.value = !!t.value;
322
+ } catch {
323
+ }
324
+ const r = t.value;
325
+ return typeof r == "boolean" || t.issues.push({
326
+ expected: "boolean",
327
+ code: "invalid_type",
328
+ input: r,
329
+ inst: e
330
+ }), t;
331
+ };
332
+ }), nn = /* @__PURE__ */ l("$ZodBigInt", (e, n) => {
333
+ h.init(e, n), e._zod.pattern = Ke, e._zod.parse = (t, o) => {
334
+ if (n.coerce)
335
+ try {
336
+ t.value = BigInt(t.value);
337
+ } catch {
338
+ }
339
+ return typeof t.value == "bigint" || t.issues.push({
340
+ expected: "bigint",
341
+ code: "invalid_type",
342
+ input: t.value,
343
+ inst: e
344
+ }), t;
345
+ };
346
+ }), Bn = /* @__PURE__ */ l("$ZodBigIntFormat", (e, n) => {
347
+ ve.init(e, n), nn.init(e, n);
348
+ }), Kn = /* @__PURE__ */ l("$ZodSymbol", (e, n) => {
349
+ h.init(e, n), e._zod.parse = (t, o) => {
350
+ const r = t.value;
351
+ return typeof r == "symbol" || t.issues.push({
352
+ expected: "symbol",
353
+ code: "invalid_type",
354
+ input: r,
355
+ inst: e
356
+ }), t;
357
+ };
358
+ }), Mn = /* @__PURE__ */ l("$ZodUndefined", (e, n) => {
359
+ h.init(e, n), e._zod.pattern = Me, e._zod.values = /* @__PURE__ */ new Set([void 0]), e._zod.optin = "optional", e._zod.optout = "optional", e._zod.parse = (t, o) => {
360
+ const r = t.value;
361
+ return typeof r > "u" || t.issues.push({
362
+ expected: "undefined",
363
+ code: "invalid_type",
364
+ input: r,
365
+ inst: e
366
+ }), t;
367
+ };
368
+ }), xn = /* @__PURE__ */ l("$ZodNull", (e, n) => {
369
+ h.init(e, n), e._zod.pattern = xe, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, o) => {
370
+ const r = t.value;
371
+ return r === null || t.issues.push({
372
+ expected: "null",
373
+ code: "invalid_type",
374
+ input: r,
375
+ inst: e
376
+ }), t;
377
+ };
378
+ }), Jn = /* @__PURE__ */ l("$ZodAny", (e, n) => {
379
+ h.init(e, n), e._zod.parse = (t) => t;
380
+ }), Wn = /* @__PURE__ */ l("$ZodUnknown", (e, n) => {
381
+ h.init(e, n), e._zod.parse = (t) => t;
382
+ }), yn = /* @__PURE__ */ l("$ZodNever", (e, n) => {
383
+ h.init(e, n), e._zod.parse = (t, o) => (t.issues.push({
384
+ expected: "never",
385
+ code: "invalid_type",
386
+ input: t.value,
387
+ inst: e
388
+ }), t);
389
+ }), Xn = /* @__PURE__ */ l("$ZodVoid", (e, n) => {
390
+ h.init(e, n), e._zod.parse = (t, o) => {
391
+ const r = t.value;
392
+ return typeof r > "u" || t.issues.push({
393
+ expected: "void",
394
+ code: "invalid_type",
395
+ input: r,
396
+ inst: e
397
+ }), t;
398
+ };
399
+ }), Gn = /* @__PURE__ */ l("$ZodDate", (e, n) => {
400
+ h.init(e, n), e._zod.parse = (t, o) => {
401
+ if (n.coerce)
402
+ try {
403
+ t.value = new Date(t.value);
404
+ } catch {
405
+ }
406
+ const r = t.value, s = r instanceof Date;
407
+ return s && !Number.isNaN(r.getTime()) || t.issues.push({
408
+ expected: "date",
409
+ code: "invalid_type",
410
+ input: r,
411
+ ...s ? { received: "Invalid Date" } : {},
412
+ inst: e
413
+ }), t;
414
+ };
415
+ });
416
+ function J(e, n, t) {
417
+ e.issues.length && n.issues.push(...w(t, e.issues)), n.value[t] = e.value;
418
+ }
419
+ const Hn = /* @__PURE__ */ l("$ZodArray", (e, n) => {
420
+ h.init(e, n), e._zod.parse = (t, o) => {
421
+ const r = t.value;
422
+ if (!Array.isArray(r))
423
+ return t.issues.push({
424
+ expected: "array",
425
+ code: "invalid_type",
426
+ input: r,
427
+ inst: e
428
+ }), t;
429
+ t.value = Array(r.length);
430
+ const s = [];
431
+ for (let i = 0; i < r.length; i++) {
432
+ const u = r[i], c = n.element._zod.run({
433
+ value: u,
434
+ issues: []
435
+ }, o);
436
+ c instanceof Promise ? s.push(c.then((a) => J(a, t, i))) : J(c, t, i);
437
+ }
438
+ return s.length ? Promise.all(s).then(() => t) : t;
439
+ };
440
+ });
441
+ function j(e, n, t, o, r) {
442
+ if (e.issues.length) {
443
+ if (r && !(t in o))
444
+ return;
445
+ n.issues.push(...w(t, e.issues));
446
+ }
447
+ e.value === void 0 ? t in o && (n.value[t] = void 0) : n.value[t] = e.value;
448
+ }
449
+ function ie(e) {
450
+ const n = Object.keys(e.shape);
451
+ for (const o of n)
452
+ if (!e.shape?.[o]?._zod?.traits?.has("$ZodType"))
453
+ throw new Error(`Invalid element at key "${o}": expected a Zod schema`);
454
+ const t = Ge(e.shape);
455
+ return {
456
+ ...e,
457
+ keys: n,
458
+ keySet: new Set(n),
459
+ numKeys: n.length,
460
+ optionalKeys: new Set(t)
461
+ };
462
+ }
463
+ function ue(e, n, t, o, r, s) {
464
+ const i = [], u = r.keySet, c = r.catchall._zod, a = c.def.type, p = c.optout === "optional";
465
+ for (const d in n) {
466
+ if (u.has(d))
467
+ continue;
468
+ if (a === "never") {
469
+ i.push(d);
470
+ continue;
471
+ }
472
+ const _ = c.run({ value: n[d], issues: [] }, o);
473
+ _ instanceof Promise ? e.push(_.then((f) => j(f, t, d, n, p))) : j(_, t, d, n, p);
474
+ }
475
+ return i.length && t.issues.push({
476
+ code: "unrecognized_keys",
477
+ keys: i,
478
+ input: n,
479
+ inst: s
480
+ }), e.length ? Promise.all(e).then(() => t) : t;
481
+ }
482
+ const tn = /* @__PURE__ */ l("$ZodObject", (e, n) => {
483
+ if (h.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
484
+ const u = n.shape;
485
+ Object.defineProperty(n, "shape", {
486
+ get: () => {
487
+ const c = { ...u };
488
+ return Object.defineProperty(n, "shape", {
489
+ value: c
490
+ }), c;
491
+ }
492
+ });
493
+ }
494
+ const o = V(() => ie(n));
495
+ v(e._zod, "propValues", () => {
496
+ const u = n.shape, c = {};
497
+ for (const a in u) {
498
+ const p = u[a]._zod;
499
+ if (p.values) {
500
+ c[a] ?? (c[a] = /* @__PURE__ */ new Set());
501
+ for (const d of p.values)
502
+ c[a].add(d);
503
+ }
504
+ }
505
+ return c;
506
+ });
507
+ const r = F, s = n.catchall;
508
+ let i;
509
+ e._zod.parse = (u, c) => {
510
+ i ?? (i = o.value);
511
+ const a = u.value;
512
+ if (!r(a))
513
+ return u.issues.push({
514
+ expected: "object",
515
+ code: "invalid_type",
516
+ input: a,
517
+ inst: e
518
+ }), u;
519
+ u.value = {};
520
+ const p = [], d = i.shape;
521
+ for (const _ of i.keys) {
522
+ const f = d[_], $ = f._zod.optout === "optional", T = f._zod.run({ value: a[_], issues: [] }, c);
523
+ T instanceof Promise ? p.push(T.then((I) => j(I, u, _, a, $))) : j(T, u, _, a, $);
524
+ }
525
+ return s ? ue(p, a, u, c, o.value, e) : p.length ? Promise.all(p).then(() => u) : u;
526
+ };
527
+ }), qn = /* @__PURE__ */ l("$ZodObjectJIT", (e, n) => {
528
+ tn.init(e, n);
529
+ const t = e._zod.parse, o = V(() => ie(n)), r = (_) => {
530
+ const f = new me(["shape", "payload", "ctx"]), $ = o.value, T = (Z) => {
531
+ const z = x(Z);
532
+ return `shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`;
533
+ };
534
+ f.write("const input = payload.value;");
535
+ const I = /* @__PURE__ */ Object.create(null);
536
+ let ae = 0;
537
+ for (const Z of $.keys)
538
+ I[Z] = `key_${ae++}`;
539
+ f.write("const newResult = {};");
540
+ for (const Z of $.keys) {
541
+ const z = I[Z], g = x(Z), pe = _[Z]?._zod?.optout === "optional";
542
+ f.write(`const ${z} = ${T(Z)};`), pe ? f.write(`
543
+ if (${z}.issues.length) {
544
+ if (${g} in input) {
545
+ payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
546
+ ...iss,
547
+ path: iss.path ? [${g}, ...iss.path] : [${g}]
548
+ })));
549
+ }
550
+ }
551
+
552
+ if (${z}.value === undefined) {
553
+ if (${g} in input) {
554
+ newResult[${g}] = undefined;
555
+ }
556
+ } else {
557
+ newResult[${g}] = ${z}.value;
558
+ }
559
+
560
+ `) : f.write(`
561
+ if (${z}.issues.length) {
562
+ payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
563
+ ...iss,
564
+ path: iss.path ? [${g}, ...iss.path] : [${g}]
565
+ })));
566
+ }
567
+
568
+ if (${z}.value === undefined) {
569
+ if (${g} in input) {
570
+ newResult[${g}] = undefined;
571
+ }
572
+ } else {
573
+ newResult[${g}] = ${z}.value;
574
+ }
575
+
576
+ `);
577
+ }
578
+ f.write("payload.value = newResult;"), f.write("return payload;");
579
+ const le = f.compile();
580
+ return (Z, z) => le(_, Z, z);
581
+ };
582
+ let s;
583
+ const i = F, u = !fe.jitless, a = u && Je.value, p = n.catchall;
584
+ let d;
585
+ e._zod.parse = (_, f) => {
586
+ d ?? (d = o.value);
587
+ const $ = _.value;
588
+ return i($) ? u && a && f?.async === !1 && f.jitless !== !0 ? (s || (s = r(n.shape)), _ = s(_, f), p ? ue([], $, _, f, d, e) : _) : t(_, f) : (_.issues.push({
589
+ expected: "object",
590
+ code: "invalid_type",
591
+ input: $,
592
+ inst: e
593
+ }), _);
594
+ };
595
+ });
596
+ function W(e, n, t, o) {
597
+ for (const s of e)
598
+ if (s.issues.length === 0)
599
+ return n.value = s.value, n;
600
+ const r = e.filter((s) => !k(s));
601
+ return r.length === 1 ? (n.value = r[0].value, r[0]) : (n.issues.push({
602
+ code: "invalid_union",
603
+ input: n.value,
604
+ inst: t,
605
+ errors: e.map((s) => s.issues.map((i) => P(i, o, b())))
606
+ }), n);
607
+ }
608
+ const ce = /* @__PURE__ */ l("$ZodUnion", (e, n) => {
609
+ h.init(e, n), v(e._zod, "optin", () => n.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), v(e._zod, "optout", () => n.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), v(e._zod, "values", () => {
610
+ if (n.options.every((r) => r._zod.values))
611
+ return new Set(n.options.flatMap((r) => Array.from(r._zod.values)));
612
+ }), v(e._zod, "pattern", () => {
613
+ if (n.options.every((r) => r._zod.pattern)) {
614
+ const r = n.options.map((s) => s._zod.pattern);
615
+ return new RegExp(`^(${r.map((s) => L(s.source)).join("|")})$`);
616
+ }
617
+ });
618
+ const t = n.options.length === 1, o = n.options[0]._zod.run;
619
+ e._zod.parse = (r, s) => {
620
+ if (t)
621
+ return o(r, s);
622
+ let i = !1;
623
+ const u = [];
624
+ for (const c of n.options) {
625
+ const a = c._zod.run({
626
+ value: r.value,
627
+ issues: []
628
+ }, s);
629
+ if (a instanceof Promise)
630
+ u.push(a), i = !0;
631
+ else {
632
+ if (a.issues.length === 0)
633
+ return a;
634
+ u.push(a);
635
+ }
636
+ }
637
+ return i ? Promise.all(u).then((c) => W(c, r, e, s)) : W(u, r, e, s);
638
+ };
639
+ });
640
+ function y(e, n, t, o) {
641
+ const r = e.filter((s) => s.issues.length === 0);
642
+ return r.length === 1 ? (n.value = r[0].value, n) : (r.length === 0 ? n.issues.push({
643
+ code: "invalid_union",
644
+ input: n.value,
645
+ inst: t,
646
+ errors: e.map((s) => s.issues.map((i) => P(i, o, b())))
647
+ }) : n.issues.push({
648
+ code: "invalid_union",
649
+ input: n.value,
650
+ inst: t,
651
+ errors: [],
652
+ inclusive: !1
653
+ }), n);
654
+ }
655
+ const Qn = /* @__PURE__ */ l("$ZodXor", (e, n) => {
656
+ ce.init(e, n), n.inclusive = !1;
657
+ const t = n.options.length === 1, o = n.options[0]._zod.run;
658
+ e._zod.parse = (r, s) => {
659
+ if (t)
660
+ return o(r, s);
661
+ let i = !1;
662
+ const u = [];
663
+ for (const c of n.options) {
664
+ const a = c._zod.run({
665
+ value: r.value,
666
+ issues: []
667
+ }, s);
668
+ a instanceof Promise ? (u.push(a), i = !0) : u.push(a);
669
+ }
670
+ return i ? Promise.all(u).then((c) => y(c, r, e, s)) : y(u, r, e, s);
671
+ };
672
+ }), Yn = /* @__PURE__ */ l("$ZodDiscriminatedUnion", (e, n) => {
673
+ n.inclusive = !1, ce.init(e, n);
674
+ const t = e._zod.parse;
675
+ v(e._zod, "propValues", () => {
676
+ const r = {};
677
+ for (const s of n.options) {
678
+ const i = s._zod.propValues;
679
+ if (!i || Object.keys(i).length === 0)
680
+ throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);
681
+ for (const [u, c] of Object.entries(i)) {
682
+ r[u] || (r[u] = /* @__PURE__ */ new Set());
683
+ for (const a of c)
684
+ r[u].add(a);
685
+ }
686
+ }
687
+ return r;
688
+ });
689
+ const o = V(() => {
690
+ const r = n.options, s = /* @__PURE__ */ new Map();
691
+ for (const i of r) {
692
+ const u = i._zod.propValues?.[n.discriminator];
693
+ if (!u || u.size === 0)
694
+ throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);
695
+ for (const c of u) {
696
+ if (s.has(c))
697
+ throw new Error(`Duplicate discriminator value "${String(c)}"`);
698
+ s.set(c, i);
699
+ }
700
+ }
701
+ return s;
702
+ });
703
+ e._zod.parse = (r, s) => {
704
+ const i = r.value;
705
+ if (!F(i))
706
+ return r.issues.push({
707
+ code: "invalid_type",
708
+ expected: "object",
709
+ input: i,
710
+ inst: e
711
+ }), r;
712
+ const u = o.value.get(i?.[n.discriminator]);
713
+ return u ? u._zod.run(r, s) : n.unionFallback ? t(r, s) : (r.issues.push({
714
+ code: "invalid_union",
715
+ errors: [],
716
+ note: "No matching discriminator",
717
+ discriminator: n.discriminator,
718
+ input: i,
719
+ path: [n.discriminator],
720
+ inst: e
721
+ }), r);
722
+ };
723
+ }), et = /* @__PURE__ */ l("$ZodIntersection", (e, n) => {
724
+ h.init(e, n), e._zod.parse = (t, o) => {
725
+ const r = t.value, s = n.left._zod.run({ value: r, issues: [] }, o), i = n.right._zod.run({ value: r, issues: [] }, o);
726
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, a]) => X(t, c, a)) : X(t, s, i);
727
+ };
728
+ });
729
+ function C(e, n) {
730
+ if (e === n)
731
+ return { valid: !0, data: e };
732
+ if (e instanceof Date && n instanceof Date && +e == +n)
733
+ return { valid: !0, data: e };
734
+ if (U(e) && U(n)) {
735
+ const t = Object.keys(n), o = Object.keys(e).filter((s) => t.indexOf(s) !== -1), r = { ...e, ...n };
736
+ for (const s of o) {
737
+ const i = C(e[s], n[s]);
738
+ if (!i.valid)
739
+ return {
740
+ valid: !1,
741
+ mergeErrorPath: [s, ...i.mergeErrorPath]
742
+ };
743
+ r[s] = i.data;
744
+ }
745
+ return { valid: !0, data: r };
746
+ }
747
+ if (Array.isArray(e) && Array.isArray(n)) {
748
+ if (e.length !== n.length)
749
+ return { valid: !1, mergeErrorPath: [] };
750
+ const t = [];
751
+ for (let o = 0; o < e.length; o++) {
752
+ const r = e[o], s = n[o], i = C(r, s);
753
+ if (!i.valid)
754
+ return {
755
+ valid: !1,
756
+ mergeErrorPath: [o, ...i.mergeErrorPath]
757
+ };
758
+ t.push(i.data);
759
+ }
760
+ return { valid: !0, data: t };
761
+ }
762
+ return { valid: !1, mergeErrorPath: [] };
763
+ }
764
+ function X(e, n, t) {
765
+ const o = /* @__PURE__ */ new Map();
766
+ let r;
767
+ for (const u of n.issues)
768
+ if (u.code === "unrecognized_keys") {
769
+ r ?? (r = u);
770
+ for (const c of u.keys)
771
+ o.has(c) || o.set(c, {}), o.get(c).l = !0;
772
+ } else
773
+ e.issues.push(u);
774
+ for (const u of t.issues)
775
+ if (u.code === "unrecognized_keys")
776
+ for (const c of u.keys)
777
+ o.has(c) || o.set(c, {}), o.get(c).r = !0;
778
+ else
779
+ e.issues.push(u);
780
+ const s = [...o].filter(([, u]) => u.l && u.r).map(([u]) => u);
781
+ if (s.length && r && e.issues.push({ ...r, keys: s }), k(e))
782
+ return e;
783
+ const i = C(n.value, t.value);
784
+ if (!i.valid)
785
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
786
+ return e.value = i.data, e;
787
+ }
788
+ const rn = /* @__PURE__ */ l("$ZodTuple", (e, n) => {
789
+ h.init(e, n);
790
+ const t = n.items;
791
+ e._zod.parse = (o, r) => {
792
+ const s = o.value;
793
+ if (!Array.isArray(s))
794
+ return o.issues.push({
795
+ input: s,
796
+ inst: e,
797
+ expected: "tuple",
798
+ code: "invalid_type"
799
+ }), o;
800
+ o.value = [];
801
+ const i = [], u = [...t].reverse().findIndex((p) => p._zod.optin !== "optional"), c = u === -1 ? 0 : t.length - u;
802
+ if (!n.rest) {
803
+ const p = s.length > t.length, d = s.length < c - 1;
804
+ if (p || d)
805
+ return o.issues.push({
806
+ ...p ? { code: "too_big", maximum: t.length, inclusive: !0 } : { code: "too_small", minimum: t.length },
807
+ input: s,
808
+ inst: e,
809
+ origin: "array"
810
+ }), o;
811
+ }
812
+ let a = -1;
813
+ for (const p of t) {
814
+ if (a++, a >= s.length && a >= c)
815
+ continue;
816
+ const d = p._zod.run({
817
+ value: s[a],
818
+ issues: []
819
+ }, r);
820
+ d instanceof Promise ? i.push(d.then((_) => S(_, o, a))) : S(d, o, a);
821
+ }
822
+ if (n.rest) {
823
+ const p = s.slice(t.length);
824
+ for (const d of p) {
825
+ a++;
826
+ const _ = n.rest._zod.run({
827
+ value: d,
828
+ issues: []
829
+ }, r);
830
+ _ instanceof Promise ? i.push(_.then((f) => S(f, o, a))) : S(_, o, a);
831
+ }
832
+ }
833
+ return i.length ? Promise.all(i).then(() => o) : o;
834
+ };
835
+ });
836
+ function S(e, n, t) {
837
+ e.issues.length && n.issues.push(...w(t, e.issues)), n.value[t] = e.value;
838
+ }
839
+ const nt = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
840
+ h.init(e, n), e._zod.parse = (t, o) => {
841
+ const r = t.value;
842
+ if (!U(r))
843
+ return t.issues.push({
844
+ expected: "record",
845
+ code: "invalid_type",
846
+ input: r,
847
+ inst: e
848
+ }), t;
849
+ const s = [], i = n.keyType._zod.values;
850
+ if (i) {
851
+ t.value = {};
852
+ const u = /* @__PURE__ */ new Set();
853
+ for (const a of i)
854
+ if (typeof a == "string" || typeof a == "number" || typeof a == "symbol") {
855
+ u.add(typeof a == "number" ? a.toString() : a);
856
+ const p = n.valueType._zod.run({ value: r[a], issues: [] }, o);
857
+ p instanceof Promise ? s.push(p.then((d) => {
858
+ d.issues.length && t.issues.push(...w(a, d.issues)), t.value[a] = d.value;
859
+ })) : (p.issues.length && t.issues.push(...w(a, p.issues)), t.value[a] = p.value);
860
+ }
861
+ let c;
862
+ for (const a in r)
863
+ u.has(a) || (c = c ?? [], c.push(a));
864
+ c && c.length > 0 && t.issues.push({
865
+ code: "unrecognized_keys",
866
+ input: r,
867
+ inst: e,
868
+ keys: c
869
+ });
870
+ } else {
871
+ t.value = {};
872
+ for (const u of Reflect.ownKeys(r)) {
873
+ if (u === "__proto__")
874
+ continue;
875
+ let c = n.keyType._zod.run({ value: u, issues: [] }, o);
876
+ if (c instanceof Promise)
877
+ throw new Error("Async schemas not supported in object keys currently");
878
+ if (typeof u == "string" && oe.test(u) && c.issues.length) {
879
+ const d = n.keyType._zod.run({ value: Number(u), issues: [] }, o);
880
+ if (d instanceof Promise)
881
+ throw new Error("Async schemas not supported in object keys currently");
882
+ d.issues.length === 0 && (c = d);
883
+ }
884
+ if (c.issues.length) {
885
+ n.mode === "loose" ? t.value[u] = r[u] : t.issues.push({
886
+ code: "invalid_key",
887
+ origin: "record",
888
+ issues: c.issues.map((d) => P(d, o, b())),
889
+ input: u,
890
+ path: [u],
891
+ inst: e
892
+ });
893
+ continue;
894
+ }
895
+ const p = n.valueType._zod.run({ value: r[u], issues: [] }, o);
896
+ p instanceof Promise ? s.push(p.then((d) => {
897
+ d.issues.length && t.issues.push(...w(u, d.issues)), t.value[c.value] = d.value;
898
+ })) : (p.issues.length && t.issues.push(...w(u, p.issues)), t.value[c.value] = p.value);
899
+ }
900
+ }
901
+ return s.length ? Promise.all(s).then(() => t) : t;
902
+ };
903
+ }), tt = /* @__PURE__ */ l("$ZodMap", (e, n) => {
904
+ h.init(e, n), e._zod.parse = (t, o) => {
905
+ const r = t.value;
906
+ if (!(r instanceof Map))
907
+ return t.issues.push({
908
+ expected: "map",
909
+ code: "invalid_type",
910
+ input: r,
911
+ inst: e
912
+ }), t;
913
+ const s = [];
914
+ t.value = /* @__PURE__ */ new Map();
915
+ for (const [i, u] of r) {
916
+ const c = n.keyType._zod.run({ value: i, issues: [] }, o), a = n.valueType._zod.run({ value: u, issues: [] }, o);
917
+ c instanceof Promise || a instanceof Promise ? s.push(Promise.all([c, a]).then(([p, d]) => {
918
+ G(p, d, t, i, r, e, o);
919
+ })) : G(c, a, t, i, r, e, o);
920
+ }
921
+ return s.length ? Promise.all(s).then(() => t) : t;
922
+ };
923
+ });
924
+ function G(e, n, t, o, r, s, i) {
925
+ e.issues.length && (A.has(typeof o) ? t.issues.push(...w(o, e.issues)) : t.issues.push({
926
+ code: "invalid_key",
927
+ origin: "map",
928
+ input: r,
929
+ inst: s,
930
+ issues: e.issues.map((u) => P(u, i, b()))
931
+ })), n.issues.length && (A.has(typeof o) ? t.issues.push(...w(o, n.issues)) : t.issues.push({
932
+ origin: "map",
933
+ code: "invalid_element",
934
+ input: r,
935
+ inst: s,
936
+ key: o,
937
+ issues: n.issues.map((u) => P(u, i, b()))
938
+ })), t.value.set(e.value, n.value);
939
+ }
940
+ const rt = /* @__PURE__ */ l("$ZodSet", (e, n) => {
941
+ h.init(e, n), e._zod.parse = (t, o) => {
942
+ const r = t.value;
943
+ if (!(r instanceof Set))
944
+ return t.issues.push({
945
+ input: r,
946
+ inst: e,
947
+ expected: "set",
948
+ code: "invalid_type"
949
+ }), t;
950
+ const s = [];
951
+ t.value = /* @__PURE__ */ new Set();
952
+ for (const i of r) {
953
+ const u = n.valueType._zod.run({ value: i, issues: [] }, o);
954
+ u instanceof Promise ? s.push(u.then((c) => H(c, t))) : H(u, t);
955
+ }
956
+ return s.length ? Promise.all(s).then(() => t) : t;
957
+ };
958
+ });
959
+ function H(e, n) {
960
+ e.issues.length && n.issues.push(...e.issues), n.value.add(e.value);
961
+ }
962
+ const ot = /* @__PURE__ */ l("$ZodEnum", (e, n) => {
963
+ h.init(e, n);
964
+ const t = We(n.entries), o = new Set(t);
965
+ e._zod.values = o, e._zod.pattern = new RegExp(`^(${t.filter((r) => A.has(typeof r)).map((r) => typeof r == "string" ? N(r) : r.toString()).join("|")})$`), e._zod.parse = (r, s) => {
966
+ const i = r.value;
967
+ return o.has(i) || r.issues.push({
968
+ code: "invalid_value",
969
+ values: t,
970
+ input: i,
971
+ inst: e
972
+ }), r;
973
+ };
974
+ }), st = /* @__PURE__ */ l("$ZodLiteral", (e, n) => {
975
+ if (h.init(e, n), n.values.length === 0)
976
+ throw new Error("Cannot create literal schema with no valid values");
977
+ const t = new Set(n.values);
978
+ e._zod.values = t, e._zod.pattern = new RegExp(`^(${n.values.map((o) => typeof o == "string" ? N(o) : o ? N(o.toString()) : String(o)).join("|")})$`), e._zod.parse = (o, r) => {
979
+ const s = o.value;
980
+ return t.has(s) || o.issues.push({
981
+ code: "invalid_value",
982
+ values: n.values,
983
+ input: s,
984
+ inst: e
985
+ }), o;
986
+ };
987
+ }), it = /* @__PURE__ */ l("$ZodFile", (e, n) => {
988
+ h.init(e, n), e._zod.parse = (t, o) => {
989
+ const r = t.value;
990
+ return r instanceof File || t.issues.push({
991
+ expected: "file",
992
+ code: "invalid_type",
993
+ input: r,
994
+ inst: e
995
+ }), t;
996
+ };
997
+ }), ut = /* @__PURE__ */ l("$ZodTransform", (e, n) => {
998
+ h.init(e, n), e._zod.parse = (t, o) => {
999
+ if (o.direction === "backward")
1000
+ throw new te(e.constructor.name);
1001
+ const r = n.transform(t.value, t);
1002
+ if (o.async)
1003
+ return (r instanceof Promise ? r : Promise.resolve(r)).then((i) => (t.value = i, t));
1004
+ if (r instanceof Promise)
1005
+ throw new D();
1006
+ return t.value = r, t;
1007
+ };
1008
+ });
1009
+ function q(e, n) {
1010
+ return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
1011
+ }
1012
+ const on = /* @__PURE__ */ l("$ZodOptional", (e, n) => {
1013
+ h.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), v(e._zod, "pattern", () => {
1014
+ const t = n.innerType._zod.pattern;
1015
+ return t ? new RegExp(`^(${L(t.source)})?$`) : void 0;
1016
+ }), e._zod.parse = (t, o) => {
1017
+ if (n.innerType._zod.optin === "optional") {
1018
+ const r = n.innerType._zod.run(t, o);
1019
+ return r instanceof Promise ? r.then((s) => q(s, t.value)) : q(r, t.value);
1020
+ }
1021
+ return t.value === void 0 ? t : n.innerType._zod.run(t, o);
1022
+ };
1023
+ }), ct = /* @__PURE__ */ l("$ZodExactOptional", (e, n) => {
1024
+ on.init(e, n), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, o) => n.innerType._zod.run(t, o);
1025
+ }), at = /* @__PURE__ */ l("$ZodNullable", (e, n) => {
1026
+ h.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "pattern", () => {
1027
+ const t = n.innerType._zod.pattern;
1028
+ return t ? new RegExp(`^(${L(t.source)}|null)$`) : void 0;
1029
+ }), v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, o) => t.value === null ? t : n.innerType._zod.run(t, o);
1030
+ }), lt = /* @__PURE__ */ l("$ZodDefault", (e, n) => {
1031
+ h.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, o) => {
1032
+ if (o.direction === "backward")
1033
+ return n.innerType._zod.run(t, o);
1034
+ if (t.value === void 0)
1035
+ return t.value = n.defaultValue, t;
1036
+ const r = n.innerType._zod.run(t, o);
1037
+ return r instanceof Promise ? r.then((s) => Q(s, n)) : Q(r, n);
1038
+ };
1039
+ });
1040
+ function Q(e, n) {
1041
+ return e.value === void 0 && (e.value = n.defaultValue), e;
1042
+ }
1043
+ const pt = /* @__PURE__ */ l("$ZodPrefault", (e, n) => {
1044
+ h.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, o) => (o.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, o));
1045
+ }), dt = /* @__PURE__ */ l("$ZodNonOptional", (e, n) => {
1046
+ h.init(e, n), v(e._zod, "values", () => {
1047
+ const t = n.innerType._zod.values;
1048
+ return t ? new Set([...t].filter((o) => o !== void 0)) : void 0;
1049
+ }), e._zod.parse = (t, o) => {
1050
+ const r = n.innerType._zod.run(t, o);
1051
+ return r instanceof Promise ? r.then((s) => Y(s, e)) : Y(r, e);
1052
+ };
1053
+ });
1054
+ function Y(e, n) {
1055
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1056
+ code: "invalid_type",
1057
+ expected: "nonoptional",
1058
+ input: e.value,
1059
+ inst: n
1060
+ }), e;
1061
+ }
1062
+ const ht = /* @__PURE__ */ l("$ZodSuccess", (e, n) => {
1063
+ h.init(e, n), e._zod.parse = (t, o) => {
1064
+ if (o.direction === "backward")
1065
+ throw new te("ZodSuccess");
1066
+ const r = n.innerType._zod.run(t, o);
1067
+ return r instanceof Promise ? r.then((s) => (t.value = s.issues.length === 0, t)) : (t.value = r.issues.length === 0, t);
1068
+ };
1069
+ }), vt = /* @__PURE__ */ l("$ZodCatch", (e, n) => {
1070
+ h.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, o) => {
1071
+ if (o.direction === "backward")
1072
+ return n.innerType._zod.run(t, o);
1073
+ const r = n.innerType._zod.run(t, o);
1074
+ return r instanceof Promise ? r.then((s) => (t.value = s.value, s.issues.length && (t.value = n.catchValue({
1075
+ ...t,
1076
+ error: {
1077
+ issues: s.issues.map((i) => P(i, o, b()))
1078
+ },
1079
+ input: t.value
1080
+ }), t.issues = []), t)) : (t.value = r.value, r.issues.length && (t.value = n.catchValue({
1081
+ ...t,
1082
+ error: {
1083
+ issues: r.issues.map((s) => P(s, o, b()))
1084
+ },
1085
+ input: t.value
1086
+ }), t.issues = []), t);
1087
+ };
1088
+ }), _t = /* @__PURE__ */ l("$ZodNaN", (e, n) => {
1089
+ h.init(e, n), e._zod.parse = (t, o) => ((typeof t.value != "number" || !Number.isNaN(t.value)) && t.issues.push({
1090
+ input: t.value,
1091
+ inst: e,
1092
+ expected: "nan",
1093
+ code: "invalid_type"
1094
+ }), t);
1095
+ }), ft = /* @__PURE__ */ l("$ZodPipe", (e, n) => {
1096
+ h.init(e, n), v(e._zod, "values", () => n.in._zod.values), v(e._zod, "optin", () => n.in._zod.optin), v(e._zod, "optout", () => n.out._zod.optout), v(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, o) => {
1097
+ if (o.direction === "backward") {
1098
+ const s = n.out._zod.run(t, o);
1099
+ return s instanceof Promise ? s.then((i) => E(i, n.in, o)) : E(s, n.in, o);
1100
+ }
1101
+ const r = n.in._zod.run(t, o);
1102
+ return r instanceof Promise ? r.then((s) => E(s, n.out, o)) : E(r, n.out, o);
1103
+ };
1104
+ });
1105
+ function E(e, n, t) {
1106
+ return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
1107
+ }
1108
+ const mt = /* @__PURE__ */ l("$ZodCodec", (e, n) => {
1109
+ h.init(e, n), v(e._zod, "values", () => n.in._zod.values), v(e._zod, "optin", () => n.in._zod.optin), v(e._zod, "optout", () => n.out._zod.optout), v(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, o) => {
1110
+ if ((o.direction || "forward") === "forward") {
1111
+ const s = n.in._zod.run(t, o);
1112
+ return s instanceof Promise ? s.then((i) => R(i, n, o)) : R(s, n, o);
1113
+ } else {
1114
+ const s = n.out._zod.run(t, o);
1115
+ return s instanceof Promise ? s.then((i) => R(i, n, o)) : R(s, n, o);
1116
+ }
1117
+ };
1118
+ });
1119
+ function R(e, n, t) {
1120
+ if (e.issues.length)
1121
+ return e.aborted = !0, e;
1122
+ if ((t.direction || "forward") === "forward") {
1123
+ const r = n.transform(e.value, e);
1124
+ return r instanceof Promise ? r.then((s) => O(e, s, n.out, t)) : O(e, r, n.out, t);
1125
+ } else {
1126
+ const r = n.reverseTransform(e.value, e);
1127
+ return r instanceof Promise ? r.then((s) => O(e, s, n.in, t)) : O(e, r, n.in, t);
1128
+ }
1129
+ }
1130
+ function O(e, n, t, o) {
1131
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: n, issues: e.issues }, o);
1132
+ }
1133
+ const zt = /* @__PURE__ */ l("$ZodReadonly", (e, n) => {
1134
+ h.init(e, n), v(e._zod, "propValues", () => n.innerType._zod.propValues), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "optin", () => n.innerType?._zod?.optin), v(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, o) => {
1135
+ if (o.direction === "backward")
1136
+ return n.innerType._zod.run(t, o);
1137
+ const r = n.innerType._zod.run(t, o);
1138
+ return r instanceof Promise ? r.then(ee) : ee(r);
1139
+ };
1140
+ });
1141
+ function ee(e) {
1142
+ return e.value = Object.freeze(e.value), e;
1143
+ }
1144
+ const $t = /* @__PURE__ */ l("$ZodTemplateLiteral", (e, n) => {
1145
+ h.init(e, n);
1146
+ const t = [];
1147
+ for (const o of n.parts)
1148
+ if (typeof o == "object" && o !== null) {
1149
+ if (!o._zod.pattern)
1150
+ throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);
1151
+ const r = o._zod.pattern instanceof RegExp ? o._zod.pattern.source : o._zod.pattern;
1152
+ if (!r)
1153
+ throw new Error(`Invalid template literal part: ${o._zod.traits}`);
1154
+ const s = r.startsWith("^") ? 1 : 0, i = r.endsWith("$") ? r.length - 1 : r.length;
1155
+ t.push(r.slice(s, i));
1156
+ } else if (o === null || ye.has(typeof o))
1157
+ t.push(N(`${o}`));
1158
+ else
1159
+ throw new Error(`Invalid template literal part: ${o}`);
1160
+ e._zod.pattern = new RegExp(`^${t.join("")}$`), e._zod.parse = (o, r) => typeof o.value != "string" ? (o.issues.push({
1161
+ input: o.value,
1162
+ inst: e,
1163
+ expected: "string",
1164
+ code: "invalid_type"
1165
+ }), o) : (e._zod.pattern.lastIndex = 0, e._zod.pattern.test(o.value) || o.issues.push({
1166
+ input: o.value,
1167
+ inst: e,
1168
+ code: "invalid_format",
1169
+ format: n.format ?? "template_literal",
1170
+ pattern: e._zod.pattern.source
1171
+ }), o);
1172
+ }), gt = /* @__PURE__ */ l("$ZodFunction", (e, n) => (h.init(e, n), e._def = n, e._zod.def = n, e.implement = (t) => {
1173
+ if (typeof t != "function")
1174
+ throw new Error("implement() must be called with a function");
1175
+ return function(...o) {
1176
+ const r = e._def.input ? B(e._def.input, o) : o, s = Reflect.apply(t, this, r);
1177
+ return e._def.output ? B(e._def.output, s) : s;
1178
+ };
1179
+ }, e.implementAsync = (t) => {
1180
+ if (typeof t != "function")
1181
+ throw new Error("implementAsync() must be called with a function");
1182
+ return async function(...o) {
1183
+ const r = e._def.input ? await K(e._def.input, o) : o, s = await Reflect.apply(t, this, r);
1184
+ return e._def.output ? await K(e._def.output, s) : s;
1185
+ };
1186
+ }, e._zod.parse = (t, o) => typeof t.value != "function" ? (t.issues.push({
1187
+ code: "invalid_type",
1188
+ expected: "function",
1189
+ input: t.value,
1190
+ inst: e
1191
+ }), t) : (e._def.output && e._def.output._zod.def.type === "promise" ? t.value = e.implementAsync(t.value) : t.value = e.implement(t.value), t), e.input = (...t) => {
1192
+ const o = e.constructor;
1193
+ return Array.isArray(t[0]) ? new o({
1194
+ type: "function",
1195
+ input: new rn({
1196
+ type: "tuple",
1197
+ items: t[0],
1198
+ rest: t[1]
1199
+ }),
1200
+ output: e._def.output
1201
+ }) : new o({
1202
+ type: "function",
1203
+ input: t[0],
1204
+ output: e._def.output
1205
+ });
1206
+ }, e.output = (t) => {
1207
+ const o = e.constructor;
1208
+ return new o({
1209
+ type: "function",
1210
+ input: e._def.input,
1211
+ output: t
1212
+ });
1213
+ }, e)), Zt = /* @__PURE__ */ l("$ZodPromise", (e, n) => {
1214
+ h.init(e, n), e._zod.parse = (t, o) => Promise.resolve(t.value).then((r) => n.innerType._zod.run({ value: r, issues: [] }, o));
1215
+ }), wt = /* @__PURE__ */ l("$ZodLazy", (e, n) => {
1216
+ h.init(e, n), v(e._zod, "innerType", () => n.getter()), v(e._zod, "pattern", () => e._zod.innerType?._zod?.pattern), v(e._zod, "propValues", () => e._zod.innerType?._zod?.propValues), v(e._zod, "optin", () => e._zod.innerType?._zod?.optin ?? void 0), v(e._zod, "optout", () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, o) => e._zod.innerType._zod.run(t, o);
1217
+ }), bt = /* @__PURE__ */ l("$ZodCustom", (e, n) => {
1218
+ _e.init(e, n), h.init(e, n), e._zod.parse = (t, o) => t, e._zod.check = (t) => {
1219
+ const o = t.value, r = n.fn(o);
1220
+ if (r instanceof Promise)
1221
+ return r.then((s) => ne(s, t, o, e));
1222
+ ne(r, t, o, e);
1223
+ };
1224
+ });
1225
+ function ne(e, n, t, o) {
1226
+ if (!e) {
1227
+ const r = {
1228
+ code: "custom",
1229
+ input: t,
1230
+ inst: o,
1231
+ // incorporates params.error into issue reporting
1232
+ path: [...o._zod.def.path ?? []],
1233
+ // incorporates params.error into issue reporting
1234
+ continue: !o._zod.def.abort
1235
+ // params: inst._zod.def.params,
1236
+ };
1237
+ o._zod.def.params && (r.params = o._zod.def.params), n.issues.push(Xe(r));
1238
+ }
1239
+ }
1240
+ export {
1241
+ Jn as $ZodAny,
1242
+ Hn as $ZodArray,
1243
+ jn as $ZodBase64,
1244
+ Un as $ZodBase64URL,
1245
+ nn as $ZodBigInt,
1246
+ Bn as $ZodBigIntFormat,
1247
+ Ln as $ZodBoolean,
1248
+ Dn as $ZodCIDRv4,
1249
+ Nn as $ZodCIDRv6,
1250
+ gn as $ZodCUID,
1251
+ Zn as $ZodCUID2,
1252
+ vt as $ZodCatch,
1253
+ mt as $ZodCodec,
1254
+ bt as $ZodCustom,
1255
+ Vn as $ZodCustomStringFormat,
1256
+ Gn as $ZodDate,
1257
+ lt as $ZodDefault,
1258
+ Yn as $ZodDiscriminatedUnion,
1259
+ An as $ZodE164,
1260
+ fn as $ZodEmail,
1261
+ zn as $ZodEmoji,
1262
+ ot as $ZodEnum,
1263
+ ct as $ZodExactOptional,
1264
+ it as $ZodFile,
1265
+ gt as $ZodFunction,
1266
+ vn as $ZodGUID,
1267
+ En as $ZodIPv4,
1268
+ Rn as $ZodIPv6,
1269
+ Tn as $ZodISODate,
1270
+ kn as $ZodISODateTime,
1271
+ Sn as $ZodISODuration,
1272
+ In as $ZodISOTime,
1273
+ et as $ZodIntersection,
1274
+ Cn as $ZodJWT,
1275
+ Pn as $ZodKSUID,
1276
+ wt as $ZodLazy,
1277
+ st as $ZodLiteral,
1278
+ On as $ZodMAC,
1279
+ tt as $ZodMap,
1280
+ _t as $ZodNaN,
1281
+ $n as $ZodNanoID,
1282
+ yn as $ZodNever,
1283
+ dt as $ZodNonOptional,
1284
+ xn as $ZodNull,
1285
+ at as $ZodNullable,
1286
+ en as $ZodNumber,
1287
+ Fn as $ZodNumberFormat,
1288
+ tn as $ZodObject,
1289
+ qn as $ZodObjectJIT,
1290
+ on as $ZodOptional,
1291
+ ft as $ZodPipe,
1292
+ pt as $ZodPrefault,
1293
+ Zt as $ZodPromise,
1294
+ zt as $ZodReadonly,
1295
+ nt as $ZodRecord,
1296
+ rt as $ZodSet,
1297
+ qe as $ZodString,
1298
+ m as $ZodStringFormat,
1299
+ ht as $ZodSuccess,
1300
+ Kn as $ZodSymbol,
1301
+ $t as $ZodTemplateLiteral,
1302
+ ut as $ZodTransform,
1303
+ rn as $ZodTuple,
1304
+ h as $ZodType,
1305
+ wn as $ZodULID,
1306
+ mn as $ZodURL,
1307
+ _n as $ZodUUID,
1308
+ Mn as $ZodUndefined,
1309
+ ce as $ZodUnion,
1310
+ Wn as $ZodUnknown,
1311
+ Xn as $ZodVoid,
1312
+ bn as $ZodXID,
1313
+ Qn as $ZodXor,
1314
+ Tt as clone,
1315
+ se as isValidBase64,
1316
+ Qe as isValidBase64URL,
1317
+ Ye as isValidJWT
1318
+ };
1319
+ //# sourceMappingURL=schemas.mjs.map