@chrona-city/ugc-kit 1.5.13 → 1.6.9

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 (1653) hide show
  1. package/.agents/skills/chrona-3d-assets/SKILL.md +15 -0
  2. package/.agents/skills/chrona-ecs-creator/SKILL.md +17 -0
  3. package/.agents/skills/chrona-gameplay-js/SKILL.md +19 -0
  4. package/.agents/skills/chrona-realtime/SKILL.md +23 -0
  5. package/.agents/skills/chrona-repair/SKILL.md +13 -0
  6. package/README.md +26 -8
  7. package/bin/chrona.mjs +6 -2
  8. package/chrona.contract.lock.json +74 -6
  9. package/chrona.controlled-presentation.lock.json +8 -8
  10. package/chrona.core.lock.json +16 -12
  11. package/chrona.document-presentation.lock.json +52 -0
  12. package/chrona.ecs.lock.json +3 -3
  13. package/chrona.gameplay-tests.lock.json +9 -9
  14. package/chrona.ground-endpoint.lock.json +28 -0
  15. package/chrona.ground-spaces.lock.json +40 -0
  16. package/chrona.personal-state.lock.json +28 -0
  17. package/chrona.pipeline.lock.json +10 -10
  18. package/chrona.private-state-view.lock.json +2 -2
  19. package/chrona.private-state.lock.json +2 -2
  20. package/chrona.registry.lock.json +2 -2
  21. package/chrona.sandbox.lock.json +11 -7
  22. package/chrona.scene-interaction-v2.lock.json +28 -0
  23. package/chrona.world-scene-runtime.lock.json +49 -9
  24. package/chrona.world-scene.lock.json +9 -5
  25. package/compiler/local-builder.lock.json +1 -1
  26. package/compiler/source/contracts/creator/rules/v1/rules.mjs +99 -0
  27. package/compiler/source/contracts/creator/rules/v1/ugc-rules.json +807 -0
  28. package/compiler/source/contracts/ugc/authored-motion/v1/declaration.mjs +124 -0
  29. package/compiler/source/contracts/ugc/core-ecs/v1/core-view.mjs +146 -0
  30. package/compiler/source/contracts/ugc/core-ecs/v1/limits.json +4 -0
  31. package/compiler/source/contracts/ugc/document-presentation/v1/document.mjs +148 -27
  32. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.1.0.json +25 -0
  33. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.2.0.json +25 -0
  34. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.3.0.json +26 -0
  35. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.5.0.json +25 -0
  36. package/compiler/source/contracts/ugc/document-presentation/v1/profile-1.6.0.json +26 -0
  37. package/compiler/source/contracts/ugc/ecs-runtime/v1/private-world.mjs +313 -0
  38. package/compiler/source/contracts/ugc/live-rule-slot/v1/slot.json +58 -0
  39. package/compiler/source/contracts/ugc/local-content/v1/document-snapshot.mjs +13 -29
  40. package/compiler/source/contracts/ugc/local-content/v1/ground-snapshot.mjs +89 -0
  41. package/compiler/source/contracts/ugc/local-content/v1/snapshot.mjs +49 -6
  42. package/compiler/source/contracts/ugc/open-creation/v1/custom-actions.mjs +92 -0
  43. package/compiler/source/contracts/ugc/open-creation/v1/data-authority.mjs +37 -0
  44. package/compiler/source/contracts/ugc/open-creation/v1/declaration.mjs +28 -0
  45. package/compiler/source/contracts/ugc/open-creation/v1/dynamic-entities.mjs +186 -0
  46. package/compiler/source/contracts/ugc/open-creation/v1/open-world.mjs +269 -0
  47. package/compiler/source/contracts/ugc/pipeline/v1/conformance/js/pipeline-validator.mjs +35 -7
  48. package/compiler/source/contracts/ugc/private-state/v1/projection.mjs +178 -0
  49. package/compiler/source/contracts/ugc/registry/v1/resolution-policy.json +3 -3
  50. package/compiler/source/contracts/ugc/runtime-content/v1/asset-budget.mjs +21 -0
  51. package/compiler/source/contracts/ugc/runtime-content/v1/limits.json +5 -0
  52. package/compiler/source/contracts/ugc/runtime-content/v1/validate.mjs +420 -0
  53. package/compiler/source/contracts/ugc/sandbox/v1/sha256.mjs +47 -0
  54. package/compiler/source/contracts/ugc/server-entities/v1/entities.mjs +221 -0
  55. package/compiler/source/contracts/ugc/server-entities/v1/events.mjs +336 -0
  56. package/compiler/source/contracts/ugc/server-entities/v1/limits.json +112 -0
  57. package/compiler/source/contracts/ugc/server-entities/v1/roads.mjs +164 -0
  58. package/compiler/source/contracts/ugc/v1/conformance/js/package-validator.mjs +51 -5
  59. package/compiler/source/contracts/ugc/v1/host-runnable.mjs +23 -0
  60. package/compiler/source/contracts/ugc/world-scene/v2/asset-graph.mjs +8 -12
  61. package/compiler/source/contracts/ugc/world-scene/v2/contract-set.json +1 -0
  62. package/compiler/source/contracts/ugc/world-scene-runtime/v1/runtime-plan.schema.json +41 -13
  63. package/compiler/source/contracts/ugc/world-scene-runtime/v1/runtime-policy.mjs +2 -2
  64. package/compiler/source/contracts/ugc/world-scene-runtime/v2/contract-set.json +10 -0
  65. package/compiler/source/contracts/ugc/world-scene-runtime/v2/report.mjs +21 -14
  66. package/compiler/source/contracts/ugc/world-scene-runtime/v2/runtime-policy.mjs +17 -3
  67. package/compiler/source/services/game-worker/src/runtime/content/flight-runtime.js +2 -1
  68. package/compiler/source/services/game-worker/src/runtime/rooms/flight-collision.js +55 -30
  69. package/compiler/source/services/game-worker/src/runtime/rooms/flight-motion.js +99 -0
  70. package/compiler/source/services/game-worker/src/runtime/rooms/flight-preparation.js +3 -2
  71. package/compiler/source/services/game-worker/src/runtime/rooms/flight-room-controller.js +130 -24
  72. package/compiler/source/services/ugc-pipeline/src/asset-inspection.mjs +78 -28
  73. package/compiler/source/services/ugc-pipeline/src/document-presentation-model.mjs +2 -2
  74. package/compiler/source/services/ugc-pipeline/src/ground-rules-model.mjs +4 -5
  75. package/compiler/source/services/ugc-pipeline/src/local-content.mjs +29 -16
  76. package/compiler/source/services/ugc-pipeline/src/registry-release.mjs +4 -1
  77. package/compiler/source/services/ugc-pipeline/src/resource-bindings-model.mjs +3 -3
  78. package/compiler/source/services/ugc-pipeline/src/rules-locks.mjs +18 -0
  79. package/compiler/source/services/ugc-pipeline/src/scene-interaction-model.mjs +4 -5
  80. package/compiler/source/services/ugc-pipeline/src/visual-closure-v2.mjs +2 -2
  81. package/compiler/source/services/ugc-pipeline/src/world-scene-model.mjs +3 -3
  82. package/compiler/source/services/ugc-pipeline/src/world-scene-policies.json +138 -0
  83. package/compiler/source/services/ugc-pipeline/src/world-scene-runtime.mjs +4 -3
  84. package/consistency-vectors.snapshot.lock.json +14 -0
  85. package/contracts/creator/check/v1/rule-table.json +433 -0
  86. package/contracts/creator/check/v1/rules/client.json +924 -0
  87. package/contracts/creator/check/v1/rules/kit.json +1702 -0
  88. package/contracts/creator/check/v1/rules/platform.json +608 -0
  89. package/contracts/creator/check/v1/rules/publish.json +2484 -0
  90. package/contracts/creator/check/v1/rules/room.json +279 -0
  91. package/contracts/creator/rules/v1/rules.mjs +69 -0
  92. package/contracts/creator/rules/v1/vectors.json +39 -0
  93. package/contracts/ecs/realtime/consistency/v1/vectors.json +2437 -0
  94. package/contracts/errors/registry/v1/codes.json +13255 -0
  95. package/contracts/gameplay/step-input/step-input.mjs +16 -0
  96. package/contracts/network/realtime/authored-entity.mjs +67 -0
  97. package/contracts/network/realtime/revision-selection.mjs +65 -0
  98. package/contracts/testdata/gameplay-consistency/vectors.json +149 -0
  99. package/contracts/ugc/authored-motion/v1/declaration.mjs +124 -0
  100. package/contracts/ugc/core-ecs/v1/core-view.mjs +13 -5
  101. package/contracts/ugc/core-ecs/v1/limits.json +4 -0
  102. package/contracts/ugc/creator-source/v1/SOURCE-PACKAGE.md +1 -1
  103. package/contracts/ugc/creator-source/v1/source-package.mjs +24 -7
  104. package/contracts/ugc/creator-source/v1/source-package.schema.json +3 -3
  105. package/contracts/ugc/creator-source/v1/source-package.test.mjs +20 -2
  106. package/contracts/ugc/document-presentation/v1/document.mjs +148 -27
  107. package/contracts/ugc/document-presentation/v1/profile-1.1.0.json +25 -0
  108. package/contracts/ugc/document-presentation/v1/profile-1.2.0.json +25 -0
  109. package/contracts/ugc/document-presentation/v1/profile-1.3.0.json +26 -0
  110. package/contracts/ugc/document-presentation/v1/profile-1.5.0.json +25 -0
  111. package/contracts/ugc/document-presentation/v1/profile-1.6.0.json +26 -0
  112. package/contracts/ugc/ecs-runtime/v1/private-world.mjs +21 -7
  113. package/contracts/ugc/live-rule-slot/v1/slot.json +58 -0
  114. package/contracts/ugc/live-rule-slot/v1/slot.mjs +80 -0
  115. package/contracts/ugc/local-content/v1/README.md +10 -0
  116. package/contracts/ugc/local-content/v1/document-snapshot.mjs +13 -29
  117. package/contracts/ugc/local-content/v1/ground-snapshot.mjs +89 -0
  118. package/contracts/ugc/local-content/v1/snapshot.mjs +49 -6
  119. package/contracts/ugc/local-content/v1/spatial-plan.mjs +24 -0
  120. package/contracts/ugc/open-creation/v1/custom-actions.mjs +92 -0
  121. package/contracts/ugc/open-creation/v1/data-authority.mjs +37 -0
  122. package/contracts/ugc/open-creation/v1/declaration.mjs +28 -0
  123. package/contracts/ugc/open-creation/v1/dynamic-entities.mjs +186 -0
  124. package/contracts/ugc/open-creation/v1/open-world.mjs +269 -0
  125. package/contracts/ugc/public-runtime/v1/README.md +13 -1
  126. package/contracts/ugc/public-runtime/v1/compatibility-rows.test.mjs +79 -0
  127. package/contracts/ugc/public-runtime/v1/document-runtime.test.mjs +20 -5
  128. package/contracts/ugc/public-runtime/v1/manifest.mjs +24 -12
  129. package/contracts/ugc/public-runtime/v1/revision-vectors.test.mjs +49 -0
  130. package/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +119 -6
  131. package/contracts/ugc/runtime-content/v1/asset-budget.mjs +21 -0
  132. package/contracts/ugc/runtime-content/v1/limits.json +5 -0
  133. package/contracts/ugc/runtime-content/v1/validate.mjs +420 -0
  134. package/contracts/ugc/sandbox/v1/conformance/js/sandbox-validator.mjs +85 -6
  135. package/contracts/ugc/server-entities/v1/entities.mjs +221 -0
  136. package/contracts/ugc/server-entities/v1/events.mjs +336 -0
  137. package/contracts/ugc/server-entities/v1/limits.json +112 -0
  138. package/contracts/ugc/server-entities/v1/roads.mjs +164 -0
  139. package/contracts/ugc/v1/conformance/js/package-validator.mjs +51 -5
  140. package/contracts/ugc/v1/host-runnable.mjs +23 -0
  141. package/contracts/ugc/world-scene-runtime/v1/runtime-policy.mjs +2 -2
  142. package/contracts/ugc/world-scene-runtime/v2/runtime-policy.mjs +17 -3
  143. package/creator-check.source-lock.json +40 -0
  144. package/creator-release.json +1 -1
  145. package/docs/ai-index.md +193 -0
  146. package/docs/assets-3d-spec.md +114 -3
  147. package/docs/audio.md +110 -0
  148. package/docs/authored-avatars.md +67 -0
  149. package/docs/authored-entities.md +165 -0
  150. package/docs/capability-map.json +57 -0
  151. package/docs/controlled-presentation.md +53 -0
  152. package/docs/core-ecs.md +46 -0
  153. package/docs/declaration-generator.md +292 -0
  154. package/docs/document-presentation.md +14 -0
  155. package/docs/gameplay-inputs.md +77 -0
  156. package/docs/gameplay-lifecycle-tests.md +89 -0
  157. package/docs/ground-rules.md +63 -0
  158. package/docs/harness-onboarding.md +45 -22
  159. package/docs/live-rule-slots.md +57 -0
  160. package/docs/mcp-tools.md +39 -0
  161. package/docs/meshy.md +4 -4
  162. package/docs/migrate-1.6.md +63 -0
  163. package/docs/npm-creator.md +419 -254
  164. package/docs/open-creation.md +259 -0
  165. package/docs/player-private-components.md +51 -0
  166. package/docs/player-saves.md +175 -0
  167. package/docs/player-visible-state.md +65 -0
  168. package/docs/playtest.md +223 -0
  169. package/docs/private-ecs.md +48 -0
  170. package/docs/private-events.md +82 -0
  171. package/docs/private-state.md +30 -0
  172. package/docs/realtime-patterns.md +624 -0
  173. package/docs/recipes.md +397 -0
  174. package/docs/reference.md +365 -0
  175. package/docs/runtime-download.md +13 -5
  176. package/docs/scene-import.md +132 -0
  177. package/docs/scene-interactions.md +28 -0
  178. package/docs/server-entities.md +83 -0
  179. package/docs/weather.md +77 -0
  180. package/docs/work-brief.md +71 -0
  181. package/document-action-result.source-lock.json +8 -4
  182. package/error-codes.snapshot.lock.json +14 -0
  183. package/gameplay-consistency.source-lock.json +20 -0
  184. package/lib/authority-notice.mjs +76 -0
  185. package/lib/behavior-radius-check.mjs +71 -0
  186. package/lib/builtin-write.mjs +70 -0
  187. package/lib/capability-harness.mjs +4 -3
  188. package/lib/compress-model.mjs +266 -0
  189. package/lib/creator-agent-live.mjs +3 -0
  190. package/lib/creator-api.mjs +301 -148
  191. package/lib/creator-assets-restore.mjs +102 -0
  192. package/lib/creator-capability-map.mjs +28 -0
  193. package/lib/creator-check.mjs +338 -0
  194. package/lib/creator-cli.mjs +929 -118
  195. package/lib/creator-contribution.mjs +46 -37
  196. package/lib/creator-docs.mjs +56 -0
  197. package/lib/creator-entry.mjs +134 -0
  198. package/lib/creator-fix.mjs +208 -0
  199. package/lib/creator-init-paths.mjs +22 -13
  200. package/lib/creator-init.mjs +22 -9
  201. package/lib/creator-install.mjs +335 -65
  202. package/lib/creator-installed-platform.mjs +13 -0
  203. package/lib/creator-intent-rules.mjs +15 -0
  204. package/lib/creator-intent.mjs +147 -0
  205. package/lib/creator-issue.mjs +241 -0
  206. package/lib/creator-mcp.mjs +336 -140
  207. package/lib/creator-migrate.mjs +194 -0
  208. package/lib/creator-onboarding.mjs +3 -1
  209. package/lib/creator-platform.mjs +223 -29
  210. package/lib/creator-playtest.mjs +398 -0
  211. package/lib/creator-preview.mjs +80 -0
  212. package/lib/creator-project-snapshot.mjs +182 -108
  213. package/lib/creator-project-update.mjs +132 -102
  214. package/lib/creator-project.mjs +213 -62
  215. package/lib/creator-provenance.mjs +12 -10
  216. package/lib/creator-rebundle.mjs +68 -0
  217. package/lib/creator-rules.mjs +76 -0
  218. package/lib/creator-session.mjs +123 -25
  219. package/lib/creator-source-package.mjs +2 -2
  220. package/lib/creator-submit.mjs +252 -101
  221. package/lib/creator-toolchain-compat.mjs +473 -3
  222. package/lib/creator-upgrade.mjs +58 -33
  223. package/lib/creator-upload-state.mjs +61 -6
  224. package/lib/creator-workspace-guide.mjs +79 -0
  225. package/lib/declaration-generator.mjs +609 -0
  226. package/lib/declaration-problems.mjs +108 -0
  227. package/lib/document-action-result.mjs +7 -4
  228. package/lib/document-prechecks.mjs +633 -0
  229. package/lib/document-presentation.mjs +47 -15
  230. package/lib/document-refresh.mjs +46 -0
  231. package/lib/ecs-access.mjs +179 -0
  232. package/lib/failure-messages.mjs +42 -0
  233. package/lib/gameplay-imports.mjs +34 -0
  234. package/lib/host-consistency.mjs +74 -0
  235. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/manifest.mjs +24 -12
  236. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +119 -6
  237. package/lib/host-ipc/host-ipc.schema.json +80 -0
  238. package/lib/host-ipc/runtime-contract.mjs +2 -0
  239. package/lib/host-ipc/source-lock.json +5 -5
  240. package/lib/host-runnable-scope.mjs +19 -0
  241. package/lib/legacy-patterns.mjs +705 -0
  242. package/lib/live-baseline-shape.mjs +30 -0
  243. package/lib/live-baseline.mjs +108 -0
  244. package/lib/live-rule-check.mjs +96 -0
  245. package/lib/local-builder.mjs +20 -5
  246. package/lib/local-content.mjs +6 -4
  247. package/lib/local-development.mjs +96 -24
  248. package/lib/local-room.mjs +12 -0
  249. package/lib/meshy-api.mjs +57 -1
  250. package/lib/meshy-store.mjs +1 -1
  251. package/lib/movement-authority.mjs +24 -0
  252. package/lib/platform-discovery.mjs +61 -0
  253. package/lib/platform-limits.mjs +6 -0
  254. package/lib/playtest-browser.mjs +121 -0
  255. package/lib/playtest-compare.mjs +42 -0
  256. package/lib/playtest-page.mjs +372 -0
  257. package/lib/playtest-vehicle.mjs +234 -0
  258. package/lib/presentation-project-update.mjs +126 -4
  259. package/lib/private-ecs-harness.mjs +39 -17
  260. package/lib/private-event-harness.mjs +3 -5
  261. package/lib/project-validation.mjs +852 -167
  262. package/lib/publish-prechecks.mjs +28 -0
  263. package/lib/relay-notice.mjs +13 -0
  264. package/lib/rule-fuzz.mjs +45 -0
  265. package/lib/rule-pack.mjs +150 -0
  266. package/lib/rule-selection.mjs +130 -0
  267. package/lib/rule-tests-child.mjs +40 -0
  268. package/lib/rule-tests-sandbox.mjs +75 -0
  269. package/lib/runtime-content.mjs +49 -0
  270. package/lib/runtime-download.mjs +94 -31
  271. package/lib/runtime-host-client.mjs +30 -12
  272. package/lib/runtime-host.mjs +7 -10
  273. package/lib/runtime-install.mjs +46 -6
  274. package/lib/runtime-prechecks.mjs +133 -0
  275. package/lib/runtime-proxy-fetch.mjs +117 -0
  276. package/lib/runtime-snapshot.mjs +20 -20
  277. package/lib/runtime-source.mjs +30 -14
  278. package/lib/sandbox-projection/v1/room-state-projection.mjs +116 -0
  279. package/lib/scene-assets.mjs +5 -5
  280. package/lib/scene-import-profiles.mjs +8 -0
  281. package/lib/scene-import.mjs +737 -0
  282. package/lib/server-entities-check.mjs +160 -0
  283. package/lib/toolchain-history.json +602 -0
  284. package/lib/vendor/mcp.mjs +33787 -0
  285. package/lib/vendor/smol-toml.mjs +744 -0
  286. package/lib/writable-by-others.mjs +8 -0
  287. package/live-rule-slot.source-lock.json +20 -0
  288. package/llms.txt +43 -0
  289. package/local-builder.snapshot.lock.json +3 -3
  290. package/local-content.snapshot.lock.json +112 -8
  291. package/package.json +251 -22
  292. package/public-runtime.snapshot.lock.json +13 -9
  293. package/realtime-revision.source-lock.json +20 -0
  294. package/runtime-catalog.json +16 -16
  295. package/sandbox-projection.source-lock.json +15 -0
  296. package/sdk/client/index.js +3 -2
  297. package/source-package.snapshot.lock.json +5 -5
  298. package/templates/document-presentation/README.md +5 -0
  299. package/templates/document-presentation/assets.js +36 -10
  300. package/templates/document-presentation/authority.js +25 -7
  301. package/templates/document-presentation/live-view.js +100 -0
  302. package/templates/document-presentation/local-first.js +45 -0
  303. package/templates/document-presentation/motion.js +2 -0
  304. package/templates/document-presentation/ready-gate.js +37 -0
  305. package/templates/document-presentation/state-view.js +26 -0
  306. package/templates/document-presentation/weather-blend.js +57 -0
  307. package/templates/document-presentation/weather-particles.js +192 -0
  308. package/templates/document-presentation/wet-ripples.js +61 -0
  309. package/templates/examples/coin-rush/README.md +5 -0
  310. package/templates/examples/coin-rush/chrona.generate.json +63 -0
  311. package/templates/examples/coin-rush/content/assets/runtime/arena.gltf +399 -0
  312. package/templates/examples/coin-rush/content/assets/runtime/runner.gltf +197 -0
  313. package/templates/examples/coin-rush/content/bindings/resources.json +19 -0
  314. package/templates/examples/coin-rush/content/gameplay/client/presentation.js +44 -0
  315. package/templates/examples/coin-rush/content/gameplay/shared/rules.js +49 -0
  316. package/templates/examples/coin-rush/content/manifest.json +100 -0
  317. package/templates/examples/coin-rush/content/provenance.json +20 -0
  318. package/templates/examples/coin-rush/content/rules/ground.json +45 -0
  319. package/templates/examples/coin-rush/content/tests/budgets.json +5 -0
  320. package/templates/examples/coin-rush/content/tests/rules.json +16 -0
  321. package/templates/examples/open-creation/README.md +5 -0
  322. package/templates/examples/open-creation/chrona.generate.json +55 -0
  323. package/templates/examples/open-creation/content/assets/runtime/arena.gltf +399 -0
  324. package/templates/examples/open-creation/content/assets/runtime/runner.gltf +197 -0
  325. package/templates/examples/open-creation/content/bindings/resources.json +19 -0
  326. package/templates/examples/open-creation/content/gameplay/client/presentation.js +33 -0
  327. package/templates/examples/open-creation/content/gameplay/shared/rules.js +29 -0
  328. package/templates/examples/open-creation/content/manifest.json +100 -0
  329. package/templates/examples/open-creation/content/provenance.json +20 -0
  330. package/templates/examples/open-creation/content/rules/ground.json +45 -0
  331. package/templates/examples/open-creation/content/tests/budgets.json +5 -0
  332. package/templates/examples/open-creation/content/tests/rules.json +16 -0
  333. package/templates/live-rule-slot/score-slot.js +16 -0
  334. package/templates/npm-project/AGENTS.md +101 -4
  335. package/templates/npm-project/preview.command +7 -0
  336. package/templates/npm-project/preview.ps1 +6 -0
  337. package/templates/npm-project/scripts/install-kit.mjs +70 -0
  338. package/templates/npm-project/setup.command +3 -0
  339. package/templates/npm-project/setup.ps1 +14 -0
  340. package/templates/npm-project/setup.sh +11 -0
  341. package/templates/public-untrusted/content/gameplay/client/local-first.js +45 -0
  342. package/templates/public-untrusted/content/gameplay/client/smoothing.js +83 -0
  343. package/templates/public-untrusted/content/manifest.json +2 -1
  344. package/templates/public-untrusted/content/tests/scenarios.json +20 -2
  345. package/contracts/ugc/capability-wiring/v1/capability-proposal.schema.json +0 -82
  346. package/contracts/ugc/capability-wiring/v1/conformance/js/wiring-validator.mjs +0 -95
  347. package/contracts/ugc/capability-wiring/v1/conformance/web/index.html +0 -5
  348. package/contracts/ugc/capability-wiring/v1/conformance/web/runner.mjs +0 -32
  349. package/contracts/ugc/capability-wiring/v1/contract-set.json +0 -8
  350. package/contracts/ugc/capability-wiring/v1/error-codes.json +0 -15
  351. package/contracts/ugc/capability-wiring/v1/needs-capability.schema.json +0 -18
  352. package/contracts/ugc/capability-wiring/v1/testdata/vectors.json +0 -128
  353. package/contracts/ugc/capability-wiring/v1/wiring-release.schema.json +0 -66
  354. package/contracts/ugc/controlled-presentation/v1/README.md +0 -175
  355. package/contracts/ugc/controlled-presentation/v1/approval.schema.json +0 -53
  356. package/contracts/ugc/controlled-presentation/v1/command.schema.json +0 -243
  357. package/contracts/ugc/controlled-presentation/v1/conformance/run-vectors.mjs +0 -39
  358. package/contracts/ugc/controlled-presentation/v1/conformance/run-view-vectors.mjs +0 -54
  359. package/contracts/ugc/controlled-presentation/v1/conformance/web/index.html +0 -1
  360. package/contracts/ugc/controlled-presentation/v1/conformance/web/runner.mjs +0 -4
  361. package/contracts/ugc/controlled-presentation/v1/conformance/web/view-runner.mjs +0 -5
  362. package/contracts/ugc/controlled-presentation/v1/conformance/web/view.html +0 -1
  363. package/contracts/ugc/controlled-presentation/v1/context.schema.json +0 -19
  364. package/contracts/ugc/controlled-presentation/v1/contract-set.json +0 -33
  365. package/contracts/ugc/controlled-presentation/v1/export-view.mjs +0 -44
  366. package/contracts/ugc/controlled-presentation/v1/grant.schema.json +0 -120
  367. package/contracts/ugc/controlled-presentation/v1/presentation.mjs +0 -180
  368. package/contracts/ugc/controlled-presentation/v1/testdata/vectors.json +0 -565
  369. package/contracts/ugc/controlled-presentation/v1/view.mjs +0 -46
  370. package/contracts/ugc/controlled-presentation/v1/view.schema.json +0 -90
  371. package/contracts/ugc/core-ecs/v1/README.md +0 -13
  372. package/contracts/ugc/core-ecs/v1/api.json +0 -28
  373. package/contracts/ugc/core-ecs/v1/conformance/run-vectors.mjs +0 -33
  374. package/contracts/ugc/core-ecs/v1/conformance/web/index.html +0 -1
  375. package/contracts/ugc/core-ecs/v1/conformance/web/runner.mjs +0 -4
  376. package/contracts/ugc/core-ecs/v1/test-fixture.schema.json +0 -169
  377. package/contracts/ugc/core-ecs/v1/testdata/vectors.json +0 -57
  378. package/contracts/ugc/document-presentation/v1/README.md +0 -167
  379. package/contracts/ugc/document-presentation/v1/contract-set.json +0 -18
  380. package/contracts/ugc/document-presentation/v1/document.schema.json +0 -161
  381. package/contracts/ugc/document-presentation/v1/document.test.mjs +0 -138
  382. package/contracts/ugc/document-presentation/v1/source.schema.json +0 -88
  383. package/contracts/ugc/ecs-runtime/v1/README.md +0 -25
  384. package/contracts/ugc/ecs-runtime/v1/api.json +0 -46
  385. package/contracts/ugc/ecs-runtime/v1/conformance/run-vectors.mjs +0 -41
  386. package/contracts/ugc/ecs-runtime/v1/conformance/web/index.html +0 -3
  387. package/contracts/ugc/ecs-runtime/v1/conformance/web/runner.mjs +0 -5
  388. package/contracts/ugc/ecs-runtime/v1/testdata/vectors.json +0 -1318
  389. package/contracts/ugc/gameplay-tests/v1/README.md +0 -78
  390. package/contracts/ugc/gameplay-tests/v1/cases.mjs +0 -70
  391. package/contracts/ugc/gameplay-tests/v1/cases.schema.json +0 -262
  392. package/contracts/ugc/gameplay-tests/v1/conformance/run-vectors.mjs +0 -21
  393. package/contracts/ugc/gameplay-tests/v1/conformance/web/index.html +0 -1
  394. package/contracts/ugc/gameplay-tests/v1/conformance/web/runner.mjs +0 -4
  395. package/contracts/ugc/gameplay-tests/v1/contract-set.json +0 -9
  396. package/contracts/ugc/gameplay-tests/v1/scene-step.mjs +0 -49
  397. package/contracts/ugc/gameplay-tests/v1/testdata/vectors.json +0 -1504
  398. package/contracts/ugc/ground-rules/v1/README.md +0 -44
  399. package/contracts/ugc/ground-rules/v1/conformance/run-vectors.mjs +0 -31
  400. package/contracts/ugc/ground-rules/v1/conformance/web/index.html +0 -1
  401. package/contracts/ugc/ground-rules/v1/conformance/web/runner.mjs +0 -4
  402. package/contracts/ugc/ground-rules/v1/contract-set.json +0 -9
  403. package/contracts/ugc/ground-rules/v1/effective-ground-rules.schema.json +0 -27
  404. package/contracts/ugc/ground-rules/v1/ground-rules.schema.json +0 -33
  405. package/contracts/ugc/ground-rules/v1/testdata/vectors.json +0 -57
  406. package/contracts/ugc/ground-rules/v2/README.md +0 -88
  407. package/contracts/ugc/ground-rules/v2/contract-set.json +0 -20
  408. package/contracts/ugc/ground-rules/v2/ground-rules.schema.json +0 -373
  409. package/contracts/ugc/ground-rules/v2/spaces.test.mjs +0 -58
  410. package/contracts/ugc/ground-rules/v2/spatial-source.schema.json +0 -788
  411. package/contracts/ugc/ground-rules/v2/spatial.test.mjs +0 -142
  412. package/contracts/ugc/ground-rules/v2.2/README.md +0 -73
  413. package/contracts/ugc/ground-rules/v2.2/center-band.test.mjs +0 -149
  414. package/contracts/ugc/ground-rules/v2.2/contract-set.json +0 -8
  415. package/contracts/ugc/ground-rules/v2.2/spatial-source.schema.json +0 -1049
  416. package/contracts/ugc/personal-state/v1/README.md +0 -181
  417. package/contracts/ugc/personal-state/v1/declaration.schema.json +0 -295
  418. package/contracts/ugc/personal-state/v1/declaration.test.mjs +0 -26
  419. package/contracts/ugc/personal-state/v1/marker.schema.json +0 -9
  420. package/contracts/ugc/personal-state/v1/node-plan.test.mjs +0 -65
  421. package/contracts/ugc/pipeline/v1/PLATFORM-SOURCE.md +0 -54
  422. package/contracts/ugc/pipeline/v1/PRESENTATION.md +0 -13
  423. package/contracts/ugc/pipeline/v1/build-record.schema.json +0 -93
  424. package/contracts/ugc/pipeline/v1/conformance/js/pipeline-validator.mjs +0 -196
  425. package/contracts/ugc/pipeline/v1/conformance/js/platform-release-validator.mjs +0 -78
  426. package/contracts/ugc/pipeline/v1/conformance/web/index.html +0 -5
  427. package/contracts/ugc/pipeline/v1/conformance/web/runner.mjs +0 -30
  428. package/contracts/ugc/pipeline/v1/contract-set.json +0 -30
  429. package/contracts/ugc/pipeline/v1/error-codes.json +0 -95
  430. package/contracts/ugc/pipeline/v1/platform-publication-binding.schema.json +0 -56
  431. package/contracts/ugc/pipeline/v1/public-release-descriptor.schema.json +0 -264
  432. package/contracts/ugc/pipeline/v1/publication-operation.schema.json +0 -97
  433. package/contracts/ugc/pipeline/v1/release-index.schema.json +0 -192
  434. package/contracts/ugc/pipeline/v1/review-decision.schema.json +0 -212
  435. package/contracts/ugc/pipeline/v1/submission-receipt.schema.json +0 -15
  436. package/contracts/ugc/pipeline/v1/testdata/vectors.json +0 -1713
  437. package/contracts/ugc/private-event-view/v1/README.md +0 -83
  438. package/contracts/ugc/private-event-view/v1/conformance/run-vectors.mjs +0 -65
  439. package/contracts/ugc/private-event-view/v1/conformance/web/index.html +0 -1
  440. package/contracts/ugc/private-event-view/v1/conformance/web/runner.mjs +0 -5
  441. package/contracts/ugc/private-event-view/v1/contract-set.json +0 -9
  442. package/contracts/ugc/private-event-view/v1/export.mjs +0 -22
  443. package/contracts/ugc/private-event-view/v1/testdata/vectors.json +0 -22
  444. package/contracts/ugc/private-event-view/v1/view.mjs +0 -130
  445. package/contracts/ugc/private-event-view/v1/view.schema.json +0 -204
  446. package/contracts/ugc/private-events/v1/README.md +0 -102
  447. package/contracts/ugc/private-events/v1/conformance/run-vectors.mjs +0 -52
  448. package/contracts/ugc/private-events/v1/conformance/web/index.html +0 -1
  449. package/contracts/ugc/private-events/v1/conformance/web/runner.mjs +0 -4
  450. package/contracts/ugc/private-events/v1/contract-set.json +0 -9
  451. package/contracts/ugc/private-events/v1/events.schema.json +0 -19
  452. package/contracts/ugc/private-events/v1/grant.schema.json +0 -15
  453. package/contracts/ugc/private-events/v1/output.schema.json +0 -15
  454. package/contracts/ugc/private-events/v1/testdata/vectors.json +0 -55
  455. package/contracts/ugc/private-state/v1/README.md +0 -95
  456. package/contracts/ugc/private-state/v1/conformance/run-vectors.mjs +0 -40
  457. package/contracts/ugc/private-state/v1/conformance/web/index.html +0 -1
  458. package/contracts/ugc/private-state/v1/conformance/web/runner.mjs +0 -4
  459. package/contracts/ugc/private-state/v1/contract-set.json +0 -9
  460. package/contracts/ugc/private-state/v1/field-table.schema.json +0 -136
  461. package/contracts/ugc/private-state/v1/projection.schema.json +0 -515
  462. package/contracts/ugc/private-state/v1/testdata/vectors.json +0 -76
  463. package/contracts/ugc/private-state-view/v1/README.md +0 -91
  464. package/contracts/ugc/private-state-view/v1/conformance/run-vectors.mjs +0 -52
  465. package/contracts/ugc/private-state-view/v1/conformance/web/index.html +0 -1
  466. package/contracts/ugc/private-state-view/v1/conformance/web/runner.mjs +0 -5
  467. package/contracts/ugc/private-state-view/v1/contract-set.json +0 -24
  468. package/contracts/ugc/private-state-view/v1/export.mjs +0 -29
  469. package/contracts/ugc/private-state-view/v1/publication.schema.json +0 -82
  470. package/contracts/ugc/private-state-view/v1/testdata/vectors.json +0 -21
  471. package/contracts/ugc/private-state-view/v1/view.mjs +0 -199
  472. package/contracts/ugc/private-state-view/v1/view.schema.json +0 -255
  473. package/contracts/ugc/public-runtime/v1/static-room-runtime.test.mjs +0 -225
  474. package/contracts/ugc/registry/v1/capabilities-lock.schema.json +0 -110
  475. package/contracts/ugc/registry/v1/capability-query-result.schema.json +0 -33
  476. package/contracts/ugc/registry/v1/capability-query.schema.json +0 -14
  477. package/contracts/ugc/registry/v1/capability-registry.schema.json +0 -83
  478. package/contracts/ugc/registry/v1/conformance/web/index.html +0 -5
  479. package/contracts/ugc/registry/v1/conformance/web/runner.mjs +0 -68
  480. package/contracts/ugc/registry/v1/contract-set.json +0 -23
  481. package/contracts/ugc/registry/v1/effective-budgets.schema.json +0 -34
  482. package/contracts/ugc/registry/v1/error-codes.json +0 -11
  483. package/contracts/ugc/registry/v1/network-profile-lock.schema.json +0 -26
  484. package/contracts/ugc/registry/v1/registry.json +0 -1
  485. package/contracts/ugc/registry/v1/resolution-policy.json +0 -70
  486. package/contracts/ugc/registry/v1/resolution-result.schema.json +0 -49
  487. package/contracts/ugc/registry/v1/testdata/vectors.json +0 -405
  488. package/contracts/ugc/resource-bindings/v1/AUTHORED-AVATAR.md +0 -133
  489. package/contracts/ugc/resource-bindings/v1/README.md +0 -61
  490. package/contracts/ugc/resource-bindings/v1/authored-avatar.schema.json +0 -48
  491. package/contracts/ugc/resource-bindings/v1/bindings.schema.json +0 -45
  492. package/contracts/ugc/resource-bindings/v1/conformance/authored-avatar-vectors.mjs +0 -26
  493. package/contracts/ugc/resource-bindings/v1/conformance/run-vectors.mjs +0 -32
  494. package/contracts/ugc/resource-bindings/v1/conformance/web/index.html +0 -1
  495. package/contracts/ugc/resource-bindings/v1/conformance/web/runner.mjs +0 -13
  496. package/contracts/ugc/resource-bindings/v1/contract-set.json +0 -9
  497. package/contracts/ugc/resource-bindings/v1/testdata/authored-avatar-vectors.json +0 -146
  498. package/contracts/ugc/resource-bindings/v1/testdata/authored-avatar.json +0 -13
  499. package/contracts/ugc/resource-bindings/v1/testdata/vectors.json +0 -68
  500. package/contracts/ugc/sandbox/v1/conformance/web/index.html +0 -5
  501. package/contracts/ugc/sandbox/v1/conformance/web/runner.mjs +0 -26
  502. package/contracts/ugc/sandbox/v1/contract-set.json +0 -19
  503. package/contracts/ugc/sandbox/v1/error-codes.json +0 -25
  504. package/contracts/ugc/sandbox/v1/execution-result.schema.json +0 -80
  505. package/contracts/ugc/sandbox/v1/launch-request.schema.json +0 -96
  506. package/contracts/ugc/sandbox/v1/lifecycle-message.schema.json +0 -18
  507. package/contracts/ugc/sandbox/v1/local-launch-request.schema.json +0 -34
  508. package/contracts/ugc/sandbox/v1/private-ecs-grant.schema.json +0 -32
  509. package/contracts/ugc/sandbox/v1/sandbox-profile.schema.json +0 -70
  510. package/contracts/ugc/sandbox/v1/testdata/vectors.json +0 -89
  511. package/contracts/ugc/scene-interaction/v1/README.md +0 -63
  512. package/contracts/ugc/scene-interaction/v1/conformance/run-vectors.mjs +0 -26
  513. package/contracts/ugc/scene-interaction/v1/conformance/web/index.html +0 -1
  514. package/contracts/ugc/scene-interaction/v1/conformance/web/runner.mjs +0 -4
  515. package/contracts/ugc/scene-interaction/v1/contract-set.json +0 -26
  516. package/contracts/ugc/scene-interaction/v1/effective-targets.schema.json +0 -76
  517. package/contracts/ugc/scene-interaction/v1/request.schema.json +0 -30
  518. package/contracts/ugc/scene-interaction/v1/result.schema.json +0 -88
  519. package/contracts/ugc/scene-interaction/v1/targets.schema.json +0 -49
  520. package/contracts/ugc/scene-interaction/v1/testdata/vectors.json +0 -732
  521. package/contracts/ugc/scene-interaction/v2/README.md +0 -63
  522. package/contracts/ugc/scene-interaction/v2/contract-set.json +0 -19
  523. package/contracts/ugc/scene-interaction/v2/metric.test.mjs +0 -99
  524. package/contracts/ugc/scene-interaction/v2/targets.schema.json +0 -229
  525. package/contracts/ugc/scene-presentation/v1/INK-MATH.md +0 -64
  526. package/contracts/ugc/scene-presentation/v1/README.md +0 -126
  527. package/contracts/ugc/scene-presentation/v1/RENDER-POLICY.md +0 -63
  528. package/contracts/ugc/scene-presentation/v1/conformance/ink-vectors.mjs +0 -34
  529. package/contracts/ugc/scene-presentation/v1/conformance/render-policy-vectors.mjs +0 -62
  530. package/contracts/ugc/scene-presentation/v1/conformance/vectors.mjs +0 -128
  531. package/contracts/ugc/scene-presentation/v1/contract-set.json +0 -6
  532. package/contracts/ugc/scene-presentation/v1/ink-math.mjs +0 -70
  533. package/contracts/ugc/scene-presentation/v1/render-policy.schema.json +0 -27
  534. package/contracts/ugc/scene-presentation/v1/scene.schema.json +0 -66
  535. package/contracts/ugc/v1/COVER.md +0 -38
  536. package/contracts/ugc/v1/SCENE-PROVENANCE.md +0 -54
  537. package/contracts/ugc/v1/candidate-submission.schema.json +0 -16
  538. package/contracts/ugc/v1/capability-request.schema.json +0 -29
  539. package/contracts/ugc/v1/compatibility.json +0 -32
  540. package/contracts/ugc/v1/components.schema.json +0 -77
  541. package/contracts/ugc/v1/conformance/js/capability-operations.mjs +0 -13
  542. package/contracts/ugc/v1/conformance/js/scene-provenance.mjs +0 -121
  543. package/contracts/ugc/v1/conformance/js/source-validator.mjs +0 -99
  544. package/contracts/ugc/v1/conformance/web/index.html +0 -5
  545. package/contracts/ugc/v1/conformance/web/runner.mjs +0 -82
  546. package/contracts/ugc/v1/contract-set.json +0 -38
  547. package/contracts/ugc/v1/creator-sdk.json +0 -84
  548. package/contracts/ugc/v1/error-codes.json +0 -53
  549. package/contracts/ugc/v1/manifest.schema.json +0 -215
  550. package/contracts/ugc/v1/network-intent.schema.json +0 -15
  551. package/contracts/ugc/v1/prefabs.schema.json +0 -29
  552. package/contracts/ugc/v1/provenance.schema.json +0 -160
  553. package/contracts/ugc/v1/scene.schema.json +0 -37
  554. package/contracts/ugc/v1/testdata/capability-operation-vectors.json +0 -243
  555. package/contracts/ugc/v1/testdata/cover-vectors.json +0 -25
  556. package/contracts/ugc/v1/testdata/invalid/authored-avatar-missing-capability.json +0 -44
  557. package/contracts/ugc/v1/testdata/invalid/authored-avatar-wrong-capability.json +0 -51
  558. package/contracts/ugc/v1/testdata/invalid/budget-overflow.json +0 -1
  559. package/contracts/ugc/v1/testdata/invalid/build-field-override.json +0 -1
  560. package/contracts/ugc/v1/testdata/invalid/creator-server-entrypoint.json +0 -5
  561. package/contracts/ugc/v1/testdata/invalid/forbidden-network-control.json +0 -1
  562. package/contracts/ugc/v1/testdata/invalid/ground-authority.json +0 -57
  563. package/contracts/ugc/v1/testdata/invalid/ground-budget.json +0 -56
  564. package/contracts/ugc/v1/testdata/invalid/ground-dependency.json +0 -49
  565. package/contracts/ugc/v1/testdata/invalid/ground-identity.json +0 -56
  566. package/contracts/ugc/v1/testdata/invalid/ground-missing.json +0 -13
  567. package/contracts/ugc/v1/testdata/invalid/ground-optional.json +0 -60
  568. package/contracts/ugc/v1/testdata/invalid/ground-path.json +0 -56
  569. package/contracts/ugc/v1/testdata/invalid/ground-run-dependency.json +0 -56
  570. package/contracts/ugc/v1/testdata/invalid/ground-version.json +0 -56
  571. package/contracts/ugc/v1/testdata/invalid/missing-required-field.json +0 -1
  572. package/contracts/ugc/v1/testdata/invalid/missing-shared-entrypoint.json +0 -5
  573. package/contracts/ugc/v1/testdata/invalid/path-escape.json +0 -1
  574. package/contracts/ugc/v1/testdata/invalid/private-events-authority.json +0 -35
  575. package/contracts/ugc/v1/testdata/invalid/private-events-budget.json +0 -35
  576. package/contracts/ugc/v1/testdata/invalid/private-events-dependency.json +0 -27
  577. package/contracts/ugc/v1/testdata/invalid/private-events-empty.json +0 -20
  578. package/contracts/ugc/v1/testdata/invalid/private-events-identity.json +0 -34
  579. package/contracts/ugc/v1/testdata/invalid/private-events-missing.json +0 -13
  580. package/contracts/ugc/v1/testdata/invalid/private-events-optional.json +0 -38
  581. package/contracts/ugc/v1/testdata/invalid/private-events-path.json +0 -34
  582. package/contracts/ugc/v1/testdata/invalid/private-events-type.json +0 -34
  583. package/contracts/ugc/v1/testdata/invalid/private-events-unknown-ref.json +0 -34
  584. package/contracts/ugc/v1/testdata/invalid/private-events-version.json +0 -34
  585. package/contracts/ugc/v1/testdata/invalid/resource-bindings-identity.json +0 -18
  586. package/contracts/ugc/v1/testdata/invalid/resource-bindings-kind.json +0 -19
  587. package/contracts/ugc/v1/testdata/invalid/resource-bindings-missing.json +0 -6
  588. package/contracts/ugc/v1/testdata/invalid/resource-bindings-path.json +0 -6
  589. package/contracts/ugc/v1/testdata/invalid/resource-bindings-type.json +0 -8
  590. package/contracts/ugc/v1/testdata/invalid/resource-bindings-unknown.json +0 -18
  591. package/contracts/ugc/v1/testdata/invalid/scene-interactions-authority.json +0 -61
  592. package/contracts/ugc/v1/testdata/invalid/scene-interactions-core-unknown.json +0 -61
  593. package/contracts/ugc/v1/testdata/invalid/scene-interactions-dependency.json +0 -53
  594. package/contracts/ugc/v1/testdata/invalid/scene-interactions-identity.json +0 -60
  595. package/contracts/ugc/v1/testdata/invalid/scene-interactions-missing-transform.json +0 -50
  596. package/contracts/ugc/v1/testdata/invalid/scene-interactions-missing.json +0 -49
  597. package/contracts/ugc/v1/testdata/invalid/scene-interactions-optional.json +0 -64
  598. package/contracts/ugc/v1/testdata/invalid/scene-interactions-partial-transform.json +0 -59
  599. package/contracts/ugc/v1/testdata/invalid/scene-interactions-path.json +0 -60
  600. package/contracts/ugc/v1/testdata/invalid/scene-interactions-radius.json +0 -60
  601. package/contracts/ugc/v1/testdata/invalid/scene-interactions-unknown-target.json +0 -60
  602. package/contracts/ugc/v1/testdata/invalid/scene-interactions-version.json +0 -60
  603. package/contracts/ugc/v1/testdata/invalid/scene-presentation-authority.json +0 -166
  604. package/contracts/ugc/v1/testdata/invalid/scene-presentation-capability.json +0 -158
  605. package/contracts/ugc/v1/testdata/invalid/scene-presentation-identity.json +0 -165
  606. package/contracts/ugc/v1/testdata/invalid/scene-presentation-missing.json +0 -13
  607. package/contracts/ugc/v1/testdata/invalid/scene-presentation-optional.json +0 -169
  608. package/contracts/ugc/v1/testdata/invalid/scene-presentation-path.json +0 -165
  609. package/contracts/ugc/v1/testdata/invalid/scene-presentation-undeclared.json +0 -163
  610. package/contracts/ugc/v1/testdata/invalid/scene-presentation-unknown-material.json +0 -165
  611. package/contracts/ugc/v1/testdata/invalid/schema-incompatible.json +0 -1
  612. package/contracts/ugc/v1/testdata/invalid/unknown-required-component.json +0 -1
  613. package/contracts/ugc/v1/testdata/invalid/world-scene-dual-motion.json +0 -7
  614. package/contracts/ugc/v1/testdata/invalid/world-scene-identity.json +0 -90
  615. package/contracts/ugc/v1/testdata/invalid/world-scene-missing-capability.json +0 -85
  616. package/contracts/ugc/v1/testdata/invalid/world-scene-missing.json +0 -28
  617. package/contracts/ugc/v1/testdata/invalid/world-scene-optional-capability.json +0 -94
  618. package/contracts/ugc/v1/testdata/invalid/world-scene-path.json +0 -6
  619. package/contracts/ugc/v1/testdata/invalid/world-scene-version.json +0 -90
  620. package/contracts/ugc/v1/testdata/scene-provenance-vectors.json +0 -56
  621. package/contracts/ugc/v1/testdata/source-vectors.json +0 -83
  622. package/contracts/ugc/v1/testdata/valid/authored-avatar.json +0 -51
  623. package/contracts/ugc/v1/testdata/valid/boundary.json +0 -1
  624. package/contracts/ugc/v1/testdata/valid/components.json +0 -15
  625. package/contracts/ugc/v1/testdata/valid/cosmetic.json +0 -9
  626. package/contracts/ugc/v1/testdata/valid/ground-rules.json +0 -56
  627. package/contracts/ugc/v1/testdata/valid/minimal.json +0 -15
  628. package/contracts/ugc/v1/testdata/valid/prefabs.json +0 -11
  629. package/contracts/ugc/v1/testdata/valid/private-events.json +0 -34
  630. package/contracts/ugc/v1/testdata/valid/resource-bindings.json +0 -18
  631. package/contracts/ugc/v1/testdata/valid/scene-interactions.json +0 -60
  632. package/contracts/ugc/v1/testdata/valid/scene-presentation.json +0 -165
  633. package/contracts/ugc/v1/testdata/valid/scene.json +0 -6
  634. package/contracts/ugc/v1/testdata/valid/unknown-optional-component.json +0 -1
  635. package/contracts/ugc/v1/testdata/valid/world-scene.json +0 -90
  636. package/contracts/ugc/v1/testdata/vectors.json +0 -555
  637. package/contracts/ugc/v1/validation-report.schema.json +0 -61
  638. package/contracts/ugc/world-scene/v1/collision-identity.mjs +0 -73
  639. package/contracts/ugc/world-scene/v1/collision-target.schema.json +0 -18
  640. package/contracts/ugc/world-scene/v1/conformance/flight-avatar-vectors.mjs +0 -27
  641. package/contracts/ugc/world-scene/v1/conformance/run-vectors.mjs +0 -29
  642. package/contracts/ugc/world-scene/v1/coordinates.schema.json +0 -16
  643. package/contracts/ugc/world-scene/v1/flight-avatar-actions.mjs +0 -3
  644. package/contracts/ugc/world-scene/v1/flight-avatar-sample.schema.json +0 -14
  645. package/contracts/ugc/world-scene/v1/scene-declaration.schema.json +0 -40
  646. package/contracts/ugc/world-scene/v1/testdata/flight-avatar-actions.json +0 -48
  647. package/contracts/ugc/world-scene/v1/testdata/scene-declaration-vectors.json +0 -103
  648. package/contracts/ugc/world-scene/v1/testdata/vectors.json +0 -55
  649. package/contracts/ugc/world-scene/v1/visual-tileset.mjs +0 -112
  650. package/contracts/ugc/world-scene/v1/visual-tileset.schema.json +0 -35
  651. package/contracts/ugc/world-scene/v2/ASSET-GRAPH.md +0 -13
  652. package/contracts/ugc/world-scene/v2/ENCODED-RESOURCES.md +0 -117
  653. package/contracts/ugc/world-scene/v2/PARTITION.md +0 -59
  654. package/contracts/ugc/world-scene/v2/VISUAL-TILESET.md +0 -80
  655. package/contracts/ugc/world-scene/v2/asset-graph.mjs +0 -169
  656. package/contracts/ugc/world-scene/v2/collision-index.schema.json +0 -29
  657. package/contracts/ugc/world-scene/v2/collision-partition.schema.json +0 -37
  658. package/contracts/ugc/world-scene/v2/conformance/asset-graph-vectors.mjs +0 -52
  659. package/contracts/ugc/world-scene/v2/conformance/collision-index-vectors.mjs +0 -29
  660. package/contracts/ugc/world-scene/v2/conformance/encoded-resource-vectors.mjs +0 -17
  661. package/contracts/ugc/world-scene/v2/conformance/partition-vectors.mjs +0 -74
  662. package/contracts/ugc/world-scene/v2/conformance/visual-vectors.mjs +0 -24
  663. package/contracts/ugc/world-scene/v2/contract-set.json +0 -50
  664. package/contracts/ugc/world-scene/v2/encoded-resource.schema.json +0 -17
  665. package/contracts/ugc/world-scene/v2/scene-declaration.schema.json +0 -21
  666. package/contracts/ugc/world-scene/v2/testdata/asset-graph-vectors.json +0 -3354
  667. package/contracts/ugc/world-scene/v2/testdata/collision-index-vectors.json +0 -103
  668. package/contracts/ugc/world-scene/v2/testdata/encoded-resource-vectors.json +0 -372
  669. package/contracts/ugc/world-scene/v2/testdata/visual-vectors.json +0 -43
  670. package/contracts/ugc/world-scene/v2/vendor/pako-raw-inflate.provenance.json +0 -43
  671. package/contracts/ugc/world-scene/v2/visual-tileset.mjs +0 -107
  672. package/contracts/ugc/world-scene/v2/visual-tileset.schema.json +0 -33
  673. package/contracts/ugc/world-scene-runtime/v1/runtime-plan.schema.json +0 -660
  674. package/contracts/ugc/world-scene-runtime/v1/testdata/policy-vectors.json +0 -40
  675. package/contracts/ugc/world-scene-runtime/v2/COLLISION-CAPACITY.md +0 -74
  676. package/contracts/ugc/world-scene-runtime/v2/REPORT.md +0 -91
  677. package/contracts/ugc/world-scene-runtime/v2/RUNTIME-PROJECTION.md +0 -110
  678. package/contracts/ugc/world-scene-runtime/v2/VISUAL-WORK.md +0 -72
  679. package/contracts/ugc/world-scene-runtime/v2/collision-capacity.schema.json +0 -62
  680. package/contracts/ugc/world-scene-runtime/v2/conformance/capacity-vectors.mjs +0 -25
  681. package/contracts/ugc/world-scene-runtime/v2/conformance/report-vectors.mjs +0 -141
  682. package/contracts/ugc/world-scene-runtime/v2/conformance/runtime-vectors.mjs +0 -41
  683. package/contracts/ugc/world-scene-runtime/v2/conformance/visual-work-vectors.mjs +0 -21
  684. package/contracts/ugc/world-scene-runtime/v2/contract-set.json +0 -45
  685. package/contracts/ugc/world-scene-runtime/v2/report.mjs +0 -184
  686. package/contracts/ugc/world-scene-runtime/v2/runtime-plan.schema.json +0 -38
  687. package/contracts/ugc/world-scene-runtime/v2/testdata/capacity-vectors.json +0 -30
  688. package/contracts/ugc/world-scene-runtime/v2/testdata/report-fixture.json +0 -250
  689. package/contracts/ugc/world-scene-runtime/v2/testdata/runtime-vectors.json +0 -39
  690. package/contracts/ugc/world-scene-runtime/v2/testdata/visual-work-vectors.json +0 -28
  691. package/contracts/ugc/world-scene-runtime/v2/visual-work-policy.mjs +0 -59
  692. package/document-presentation.snapshot.lock.json +0 -40
  693. package/ground-endpoint.snapshot.lock.json +0 -36
  694. package/ground-spaces.snapshot.lock.json +0 -57
  695. package/lib/creator-source-archive.mjs +0 -182
  696. package/node_modules/@modelcontextprotocol/core/LICENSE +0 -216
  697. package/node_modules/@modelcontextprotocol/core/README.md +0 -40
  698. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts +0 -8501
  699. package/node_modules/@modelcontextprotocol/core/dist/auth-BWdKR39I.d.mts.map +0 -1
  700. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs +0 -1678
  701. package/node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs.map +0 -1
  702. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs +0 -2899
  703. package/node_modules/@modelcontextprotocol/core/dist/auth-CfDMXiII.cjs.map +0 -1
  704. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts +0 -8501
  705. package/node_modules/@modelcontextprotocol/core/dist/auth-hYtaIUZm.d.cts.map +0 -1
  706. package/node_modules/@modelcontextprotocol/core/dist/index.cjs +0 -175
  707. package/node_modules/@modelcontextprotocol/core/dist/index.d.cts +0 -2
  708. package/node_modules/@modelcontextprotocol/core/dist/index.d.mts +0 -2
  709. package/node_modules/@modelcontextprotocol/core/dist/index.mjs +0 -3
  710. package/node_modules/@modelcontextprotocol/core/dist/internal.cjs +0 -201
  711. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts +0 -99
  712. package/node_modules/@modelcontextprotocol/core/dist/internal.d.cts.map +0 -1
  713. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts +0 -99
  714. package/node_modules/@modelcontextprotocol/core/dist/internal.d.mts.map +0 -1
  715. package/node_modules/@modelcontextprotocol/core/dist/internal.mjs +0 -3
  716. package/node_modules/@modelcontextprotocol/core/package.json +0 -85
  717. package/node_modules/@modelcontextprotocol/server/LICENSE +0 -216
  718. package/node_modules/@modelcontextprotocol/server/README.md +0 -30
  719. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs +0 -7514
  720. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CEoC__sr.mjs.map +0 -1
  721. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts +0 -1071
  722. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-CgI-5L6O.d.mts.map +0 -1
  723. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts +0 -1071
  724. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-FOQRM7up.d.cts.map +0 -1
  725. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs +0 -7531
  726. package/node_modules/@modelcontextprotocol/server/dist/ajvProvider-ZaoO9afR.cjs.map +0 -1
  727. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs +0 -986
  728. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-BwbPzsdI.cjs.map +0 -1
  729. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts +0 -74
  730. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-C03CSigr.d.mts.map +0 -1
  731. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts +0 -74
  732. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-doTkZbTr.d.cts.map +0 -1
  733. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs +0 -981
  734. package/node_modules/@modelcontextprotocol/server/dist/cfWorkerProvider-p3WaZPqB.mjs.map +0 -1
  735. package/node_modules/@modelcontextprotocol/server/dist/chunk-Bnu9O96Y.cjs +0 -60
  736. package/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs +0 -42
  737. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts +0 -4043
  738. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-CLhGwQTn.d.mts.map +0 -1
  739. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts +0 -4045
  740. package/node_modules/@modelcontextprotocol/server/dist/createMcpHandler-dBHMsxwf.d.cts.map +0 -1
  741. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs +0 -46
  742. package/node_modules/@modelcontextprotocol/server/dist/dialects-D8eXzoGv.cjs.map +0 -1
  743. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs +0 -34
  744. package/node_modules/@modelcontextprotocol/server/dist/dialects-DoSzNhcb.mjs.map +0 -1
  745. package/node_modules/@modelcontextprotocol/server/dist/index.cjs +0 -2055
  746. package/node_modules/@modelcontextprotocol/server/dist/index.cjs.map +0 -1
  747. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts +0 -739
  748. package/node_modules/@modelcontextprotocol/server/dist/index.d.cts.map +0 -1
  749. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts +0 -739
  750. package/node_modules/@modelcontextprotocol/server/dist/index.d.mts.map +0 -1
  751. package/node_modules/@modelcontextprotocol/server/dist/index.mjs +0 -1870
  752. package/node_modules/@modelcontextprotocol/server/dist/index.mjs.map +0 -1
  753. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs +0 -2022
  754. package/node_modules/@modelcontextprotocol/server/dist/mcp-D7GmuPnv.cjs.map +0 -1
  755. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs +0 -1931
  756. package/node_modules/@modelcontextprotocol/server/dist/mcp-DXXb3Vv3.mjs.map +0 -1
  757. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs +0 -23
  758. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.cjs.map +0 -1
  759. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts +0 -11
  760. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.cts.map +0 -1
  761. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts +0 -11
  762. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.d.mts.map +0 -1
  763. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs +0 -22
  764. package/node_modules/@modelcontextprotocol/server/dist/shimsBrowser.mjs.map +0 -1
  765. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.cjs +0 -12
  766. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.cts +0 -3
  767. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.d.mts +0 -3
  768. package/node_modules/@modelcontextprotocol/server/dist/shimsNode.mjs +0 -4
  769. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs +0 -30
  770. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.cjs.map +0 -1
  771. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts +0 -10
  772. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.cts.map +0 -1
  773. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts +0 -10
  774. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.d.mts.map +0 -1
  775. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs +0 -29
  776. package/node_modules/@modelcontextprotocol/server/dist/shimsWorkerd.mjs.map +0 -1
  777. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs +0 -7606
  778. package/node_modules/@modelcontextprotocol/server/dist/src-CX2iR2pK.mjs.map +0 -1
  779. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs +0 -8104
  780. package/node_modules/@modelcontextprotocol/server/dist/src-STyD_Vvf.cjs.map +0 -1
  781. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs +0 -564
  782. package/node_modules/@modelcontextprotocol/server/dist/stdio.cjs.map +0 -1
  783. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts +0 -107
  784. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.cts.map +0 -1
  785. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts +0 -107
  786. package/node_modules/@modelcontextprotocol/server/dist/stdio.d.mts.map +0 -1
  787. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs +0 -562
  788. package/node_modules/@modelcontextprotocol/server/dist/stdio.mjs.map +0 -1
  789. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts +0 -1099
  790. package/node_modules/@modelcontextprotocol/server/dist/types-DUs7mGBv.d.mts.map +0 -1
  791. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts +0 -1099
  792. package/node_modules/@modelcontextprotocol/server/dist/types-DsbMXNFL.d.cts.map +0 -1
  793. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.cjs +0 -5
  794. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.cts +0 -2
  795. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.d.mts +0 -2
  796. package/node_modules/@modelcontextprotocol/server/dist/validators/ajv.mjs +0 -3
  797. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.cjs +0 -3
  798. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.cts +0 -2
  799. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.d.mts +0 -2
  800. package/node_modules/@modelcontextprotocol/server/dist/validators/cfWorker.mjs +0 -3
  801. package/node_modules/@modelcontextprotocol/server/package.json +0 -160
  802. package/node_modules/smol-toml/LICENSE +0 -24
  803. package/node_modules/smol-toml/README.md +0 -236
  804. package/node_modules/smol-toml/dist/date.d.ts +0 -41
  805. package/node_modules/smol-toml/dist/date.js +0 -127
  806. package/node_modules/smol-toml/dist/error.d.ts +0 -38
  807. package/node_modules/smol-toml/dist/error.js +0 -63
  808. package/node_modules/smol-toml/dist/extract.d.ts +0 -30
  809. package/node_modules/smol-toml/dist/extract.js +0 -109
  810. package/node_modules/smol-toml/dist/index.cjs +0 -906
  811. package/node_modules/smol-toml/dist/index.d.ts +0 -43
  812. package/node_modules/smol-toml/dist/index.js +0 -33
  813. package/node_modules/smol-toml/dist/parse.d.ts +0 -37
  814. package/node_modules/smol-toml/dist/parse.js +0 -148
  815. package/node_modules/smol-toml/dist/primitive.d.ts +0 -31
  816. package/node_modules/smol-toml/dist/primitive.js +0 -178
  817. package/node_modules/smol-toml/dist/stringify.d.ts +0 -31
  818. package/node_modules/smol-toml/dist/stringify.js +0 -163
  819. package/node_modules/smol-toml/dist/struct.d.ts +0 -32
  820. package/node_modules/smol-toml/dist/struct.js +0 -194
  821. package/node_modules/smol-toml/dist/util.d.ts +0 -42
  822. package/node_modules/smol-toml/dist/util.js +0 -106
  823. package/node_modules/smol-toml/package.json +0 -54
  824. package/node_modules/zod/LICENSE +0 -21
  825. package/node_modules/zod/README.md +0 -218
  826. package/node_modules/zod/compile.cjs +0 -77
  827. package/node_modules/zod/compile.d.cts +0 -1
  828. package/node_modules/zod/compile.d.ts +0 -1
  829. package/node_modules/zod/compile.js +0 -52
  830. package/node_modules/zod/index.cjs +0 -33
  831. package/node_modules/zod/index.d.cts +0 -3
  832. package/node_modules/zod/index.d.ts +0 -3
  833. package/node_modules/zod/index.js +0 -7
  834. package/node_modules/zod/locales/index.cjs +0 -17
  835. package/node_modules/zod/locales/index.d.cts +0 -1
  836. package/node_modules/zod/locales/index.d.ts +0 -1
  837. package/node_modules/zod/locales/index.js +0 -1
  838. package/node_modules/zod/locales/package.json +0 -7
  839. package/node_modules/zod/mini/index.cjs +0 -32
  840. package/node_modules/zod/mini/index.d.cts +0 -3
  841. package/node_modules/zod/mini/index.d.ts +0 -3
  842. package/node_modules/zod/mini/index.js +0 -3
  843. package/node_modules/zod/mini/package.json +0 -7
  844. package/node_modules/zod/package.json +0 -146
  845. package/node_modules/zod/src/compile.ts +0 -56
  846. package/node_modules/zod/src/index.ts +0 -7
  847. package/node_modules/zod/src/locales/index.ts +0 -1
  848. package/node_modules/zod/src/mini/index.ts +0 -3
  849. package/node_modules/zod/src/v3/ZodError.ts +0 -340
  850. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  851. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  852. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  853. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  854. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  855. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  856. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  857. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  858. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  859. package/node_modules/zod/src/v3/errors.ts +0 -13
  860. package/node_modules/zod/src/v3/external.ts +0 -6
  861. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  862. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  863. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  864. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  865. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  866. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  867. package/node_modules/zod/src/v3/index.ts +0 -4
  868. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  869. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  870. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  871. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  872. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  873. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  874. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  875. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  876. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  877. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  878. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  879. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  880. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  881. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  882. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  883. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  884. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  885. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  886. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  887. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  888. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  889. package/node_modules/zod/src/v3/tests/error.test.ts +0 -586
  890. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  891. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  892. package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  893. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  894. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  895. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -128
  896. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  897. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -206
  898. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  899. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  900. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  901. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  902. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  903. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  904. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  905. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  906. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  907. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  908. package/node_modules/zod/src/v3/tests/object.test.ts +0 -431
  909. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  910. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  911. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  912. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  913. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  914. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  915. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  916. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  917. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  918. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -114
  919. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  920. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  921. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  922. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  923. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  924. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  925. package/node_modules/zod/src/v3/tests/string.test.ts +0 -922
  926. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  927. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  928. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  929. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  930. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  931. package/node_modules/zod/src/v3/types.ts +0 -5138
  932. package/node_modules/zod/src/v4/classic/checks.ts +0 -33
  933. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  934. package/node_modules/zod/src/v4/classic/compat.ts +0 -78
  935. package/node_modules/zod/src/v4/classic/deep-partial.ts +0 -76
  936. package/node_modules/zod/src/v4/classic/errors.ts +0 -97
  937. package/node_modules/zod/src/v4/classic/external.ts +0 -55
  938. package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -721
  939. package/node_modules/zod/src/v4/classic/in-out.ts +0 -45
  940. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  941. package/node_modules/zod/src/v4/classic/iso.ts +0 -20
  942. package/node_modules/zod/src/v4/classic/parse.ts +0 -88
  943. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2862
  944. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  945. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -86
  946. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  947. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -351
  948. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  949. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  950. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  951. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -83
  952. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  953. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -604
  954. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  955. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -572
  956. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -704
  957. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  958. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  959. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +0 -76
  960. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  961. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +0 -720
  962. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -92
  963. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -316
  964. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +0 -380
  965. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +0 -32
  966. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -455
  967. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  968. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  969. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -221
  970. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -836
  971. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -296
  972. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -917
  973. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -979
  974. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  975. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  976. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  977. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -1310
  978. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -391
  979. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  980. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -32
  981. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -67
  982. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +0 -159
  983. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -958
  984. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +0 -281
  985. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -107
  986. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -334
  987. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +0 -183
  988. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -39
  989. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  990. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -262
  991. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -128
  992. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  993. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  994. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -342
  995. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  996. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  997. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  998. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  999. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -362
  1000. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -950
  1001. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +0 -234
  1002. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -366
  1003. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -497
  1004. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  1005. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  1006. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  1007. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -44
  1008. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  1009. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  1010. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  1011. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  1012. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -184
  1013. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -885
  1014. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -662
  1015. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +0 -68
  1016. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -693
  1017. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  1018. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -190
  1019. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  1020. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  1021. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1346
  1022. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -124
  1023. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -780
  1024. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  1025. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -4537
  1026. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  1027. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -511
  1028. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -310
  1029. package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  1030. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +0 -76
  1031. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  1032. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  1033. package/node_modules/zod/src/v4/core/api.ts +0 -1859
  1034. package/node_modules/zod/src/v4/core/checks.ts +0 -1306
  1035. package/node_modules/zod/src/v4/core/compile.ts +0 -2188
  1036. package/node_modules/zod/src/v4/core/core.ts +0 -232
  1037. package/node_modules/zod/src/v4/core/doc.ts +0 -48
  1038. package/node_modules/zod/src/v4/core/errors.ts +0 -546
  1039. package/node_modules/zod/src/v4/core/index.ts +0 -19
  1040. package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -131
  1041. package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -830
  1042. package/node_modules/zod/src/v4/core/json-schema.ts +0 -148
  1043. package/node_modules/zod/src/v4/core/memoizer.ts +0 -284
  1044. package/node_modules/zod/src/v4/core/parse.ts +0 -288
  1045. package/node_modules/zod/src/v4/core/regexes.ts +0 -207
  1046. package/node_modules/zod/src/v4/core/registries.ts +0 -105
  1047. package/node_modules/zod/src/v4/core/schemas.ts +0 -5028
  1048. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  1049. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +0 -969
  1050. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +0 -89
  1051. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +0 -26
  1052. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +0 -34
  1053. package/node_modules/zod/src/v4/core/tests/compile.test.ts +0 -1639
  1054. package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  1055. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  1056. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  1057. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -214
  1058. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  1059. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -180
  1060. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  1061. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  1062. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  1063. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  1064. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +0 -42
  1065. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  1066. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +0 -69
  1067. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  1068. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  1069. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  1070. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  1071. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +0 -51
  1072. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +0 -31
  1073. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -855
  1074. package/node_modules/zod/src/v4/core/util.ts +0 -1209
  1075. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  1076. package/node_modules/zod/src/v4/core/visit.ts +0 -193
  1077. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  1078. package/node_modules/zod/src/v4/index.ts +0 -4
  1079. package/node_modules/zod/src/v4/locales/ar.ts +0 -118
  1080. package/node_modules/zod/src/v4/locales/az.ts +0 -114
  1081. package/node_modules/zod/src/v4/locales/be.ts +0 -186
  1082. package/node_modules/zod/src/v4/locales/bg.ts +0 -131
  1083. package/node_modules/zod/src/v4/locales/bn.ts +0 -121
  1084. package/node_modules/zod/src/v4/locales/ca.ts +0 -119
  1085. package/node_modules/zod/src/v4/locales/ckb.ts +0 -138
  1086. package/node_modules/zod/src/v4/locales/cs.ts +0 -121
  1087. package/node_modules/zod/src/v4/locales/da.ts +0 -126
  1088. package/node_modules/zod/src/v4/locales/de.ts +0 -119
  1089. package/node_modules/zod/src/v4/locales/el.ts +0 -122
  1090. package/node_modules/zod/src/v4/locales/en.ts +0 -134
  1091. package/node_modules/zod/src/v4/locales/eo.ts +0 -121
  1092. package/node_modules/zod/src/v4/locales/es.ts +0 -143
  1093. package/node_modules/zod/src/v4/locales/fa.ts +0 -129
  1094. package/node_modules/zod/src/v4/locales/fi.ts +0 -124
  1095. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -119
  1096. package/node_modules/zod/src/v4/locales/fr.ts +0 -137
  1097. package/node_modules/zod/src/v4/locales/gu.ts +0 -121
  1098. package/node_modules/zod/src/v4/locales/he.ts +0 -251
  1099. package/node_modules/zod/src/v4/locales/hi.ts +0 -124
  1100. package/node_modules/zod/src/v4/locales/hr.ts +0 -133
  1101. package/node_modules/zod/src/v4/locales/hu.ts +0 -120
  1102. package/node_modules/zod/src/v4/locales/hy.ts +0 -173
  1103. package/node_modules/zod/src/v4/locales/id.ts +0 -118
  1104. package/node_modules/zod/src/v4/locales/index.ts +0 -62
  1105. package/node_modules/zod/src/v4/locales/is.ts +0 -122
  1106. package/node_modules/zod/src/v4/locales/it.ts +0 -119
  1107. package/node_modules/zod/src/v4/locales/ja.ts +0 -117
  1108. package/node_modules/zod/src/v4/locales/ka.ts +0 -126
  1109. package/node_modules/zod/src/v4/locales/kh.ts +0 -7
  1110. package/node_modules/zod/src/v4/locales/km.ts +0 -122
  1111. package/node_modules/zod/src/v4/locales/kn.ts +0 -124
  1112. package/node_modules/zod/src/v4/locales/ko.ts +0 -124
  1113. package/node_modules/zod/src/v4/locales/lt.ts +0 -241
  1114. package/node_modules/zod/src/v4/locales/mk.ts +0 -121
  1115. package/node_modules/zod/src/v4/locales/ms.ts +0 -118
  1116. package/node_modules/zod/src/v4/locales/ne.ts +0 -126
  1117. package/node_modules/zod/src/v4/locales/nl.ts +0 -124
  1118. package/node_modules/zod/src/v4/locales/nn.ts +0 -119
  1119. package/node_modules/zod/src/v4/locales/no.ts +0 -119
  1120. package/node_modules/zod/src/v4/locales/ota.ts +0 -120
  1121. package/node_modules/zod/src/v4/locales/pl.ts +0 -121
  1122. package/node_modules/zod/src/v4/locales/ps.ts +0 -129
  1123. package/node_modules/zod/src/v4/locales/pt-BR.ts +0 -159
  1124. package/node_modules/zod/src/v4/locales/pt.ts +0 -157
  1125. package/node_modules/zod/src/v4/locales/ro.ts +0 -130
  1126. package/node_modules/zod/src/v4/locales/ru.ts +0 -186
  1127. package/node_modules/zod/src/v4/locales/sk.ts +0 -121
  1128. package/node_modules/zod/src/v4/locales/sl.ts +0 -121
  1129. package/node_modules/zod/src/v4/locales/sv.ts +0 -122
  1130. package/node_modules/zod/src/v4/locales/ta.ts +0 -121
  1131. package/node_modules/zod/src/v4/locales/th.ts +0 -122
  1132. package/node_modules/zod/src/v4/locales/tk.ts +0 -111
  1133. package/node_modules/zod/src/v4/locales/tr.ts +0 -114
  1134. package/node_modules/zod/src/v4/locales/ua.ts +0 -7
  1135. package/node_modules/zod/src/v4/locales/uk.ts +0 -120
  1136. package/node_modules/zod/src/v4/locales/ur.ts +0 -122
  1137. package/node_modules/zod/src/v4/locales/uz.ts +0 -118
  1138. package/node_modules/zod/src/v4/locales/vi.ts +0 -120
  1139. package/node_modules/zod/src/v4/locales/yo.ts +0 -127
  1140. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -119
  1141. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -118
  1142. package/node_modules/zod/src/v4/mini/checks.ts +0 -33
  1143. package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  1144. package/node_modules/zod/src/v4/mini/deep-partial.ts +0 -73
  1145. package/node_modules/zod/src/v4/mini/external.ts +0 -50
  1146. package/node_modules/zod/src/v4/mini/in-out.ts +0 -45
  1147. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  1148. package/node_modules/zod/src/v4/mini/iso.ts +0 -66
  1149. package/node_modules/zod/src/v4/mini/parse.ts +0 -16
  1150. package/node_modules/zod/src/v4/mini/schemas.ts +0 -2026
  1151. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -57
  1152. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -190
  1153. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  1154. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -158
  1155. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -582
  1156. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  1157. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +0 -84
  1158. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +0 -54
  1159. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -41
  1160. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -14
  1161. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -1060
  1162. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -109
  1163. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -292
  1164. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  1165. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
  1166. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  1167. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -373
  1168. package/node_modules/zod/src/v4-mini/index.ts +0 -3
  1169. package/node_modules/zod/v3/ZodError.cjs +0 -148
  1170. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  1171. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  1172. package/node_modules/zod/v3/ZodError.js +0 -143
  1173. package/node_modules/zod/v3/errors.cjs +0 -17
  1174. package/node_modules/zod/v3/errors.d.cts +0 -5
  1175. package/node_modules/zod/v3/errors.d.ts +0 -5
  1176. package/node_modules/zod/v3/errors.js +0 -9
  1177. package/node_modules/zod/v3/external.cjs +0 -22
  1178. package/node_modules/zod/v3/external.d.cts +0 -6
  1179. package/node_modules/zod/v3/external.d.ts +0 -6
  1180. package/node_modules/zod/v3/external.js +0 -6
  1181. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  1182. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  1183. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  1184. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  1185. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  1186. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  1187. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  1188. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  1189. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  1190. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  1191. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  1192. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  1193. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  1194. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  1195. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  1196. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  1197. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  1198. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  1199. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  1200. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  1201. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  1202. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  1203. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  1204. package/node_modules/zod/v3/helpers/util.js +0 -133
  1205. package/node_modules/zod/v3/index.cjs +0 -33
  1206. package/node_modules/zod/v3/index.d.cts +0 -4
  1207. package/node_modules/zod/v3/index.d.ts +0 -4
  1208. package/node_modules/zod/v3/index.js +0 -4
  1209. package/node_modules/zod/v3/locales/en.cjs +0 -112
  1210. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  1211. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  1212. package/node_modules/zod/v3/locales/en.js +0 -109
  1213. package/node_modules/zod/v3/package.json +0 -7
  1214. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  1215. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  1216. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  1217. package/node_modules/zod/v3/standard-schema.js +0 -1
  1218. package/node_modules/zod/v3/types.cjs +0 -3779
  1219. package/node_modules/zod/v3/types.d.cts +0 -1034
  1220. package/node_modules/zod/v3/types.d.ts +0 -1034
  1221. package/node_modules/zod/v3/types.js +0 -3697
  1222. package/node_modules/zod/v4/classic/checks.cjs +0 -34
  1223. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  1224. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  1225. package/node_modules/zod/v4/classic/checks.js +0 -1
  1226. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  1227. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  1228. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  1229. package/node_modules/zod/v4/classic/coerce.js +0 -17
  1230. package/node_modules/zod/v4/classic/compat.cjs +0 -61
  1231. package/node_modules/zod/v4/classic/compat.d.cts +0 -48
  1232. package/node_modules/zod/v4/classic/compat.d.ts +0 -48
  1233. package/node_modules/zod/v4/classic/compat.js +0 -31
  1234. package/node_modules/zod/v4/classic/deep-partial.cjs +0 -39
  1235. package/node_modules/zod/v4/classic/deep-partial.d.cts +0 -14
  1236. package/node_modules/zod/v4/classic/deep-partial.d.ts +0 -14
  1237. package/node_modules/zod/v4/classic/deep-partial.js +0 -13
  1238. package/node_modules/zod/v4/classic/errors.cjs +0 -83
  1239. package/node_modules/zod/v4/classic/errors.d.cts +0 -29
  1240. package/node_modules/zod/v4/classic/errors.d.ts +0 -29
  1241. package/node_modules/zod/v4/classic/errors.js +0 -57
  1242. package/node_modules/zod/v4/classic/external.cjs +0 -76
  1243. package/node_modules/zod/v4/classic/external.d.cts +0 -19
  1244. package/node_modules/zod/v4/classic/external.d.ts +0 -19
  1245. package/node_modules/zod/v4/classic/external.js +0 -17
  1246. package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -686
  1247. package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  1248. package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  1249. package/node_modules/zod/v4/classic/from-json-schema.js +0 -660
  1250. package/node_modules/zod/v4/classic/in-out.cjs +0 -63
  1251. package/node_modules/zod/v4/classic/in-out.d.cts +0 -8
  1252. package/node_modules/zod/v4/classic/in-out.d.ts +0 -8
  1253. package/node_modules/zod/v4/classic/in-out.js +0 -36
  1254. package/node_modules/zod/v4/classic/index.cjs +0 -33
  1255. package/node_modules/zod/v4/classic/index.d.cts +0 -3
  1256. package/node_modules/zod/v4/classic/index.d.ts +0 -3
  1257. package/node_modules/zod/v4/classic/index.js +0 -4
  1258. package/node_modules/zod/v4/classic/iso.cjs +0 -49
  1259. package/node_modules/zod/v4/classic/iso.d.cts +0 -7
  1260. package/node_modules/zod/v4/classic/iso.d.ts +0 -7
  1261. package/node_modules/zod/v4/classic/iso.js +0 -15
  1262. package/node_modules/zod/v4/classic/package.json +0 -7
  1263. package/node_modules/zod/v4/classic/parse.cjs +0 -44
  1264. package/node_modules/zod/v4/classic/parse.d.cts +0 -44
  1265. package/node_modules/zod/v4/classic/parse.d.ts +0 -44
  1266. package/node_modules/zod/v4/classic/parse.js +0 -16
  1267. package/node_modules/zod/v4/classic/schemas.cjs +0 -1611
  1268. package/node_modules/zod/v4/classic/schemas.d.cts +0 -802
  1269. package/node_modules/zod/v4/classic/schemas.d.ts +0 -802
  1270. package/node_modules/zod/v4/classic/schemas.js +0 -1491
  1271. package/node_modules/zod/v4/core/api.cjs +0 -1246
  1272. package/node_modules/zod/v4/core/api.d.cts +0 -329
  1273. package/node_modules/zod/v4/core/api.d.ts +0 -329
  1274. package/node_modules/zod/v4/core/api.js +0 -1104
  1275. package/node_modules/zod/v4/core/checks.cjs +0 -607
  1276. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  1277. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  1278. package/node_modules/zod/v4/core/checks.js +0 -581
  1279. package/node_modules/zod/v4/core/compile.cjs +0 -1813
  1280. package/node_modules/zod/v4/core/compile.d.cts +0 -51
  1281. package/node_modules/zod/v4/core/compile.d.ts +0 -51
  1282. package/node_modules/zod/v4/core/compile.js +0 -1783
  1283. package/node_modules/zod/v4/core/core.cjs +0 -148
  1284. package/node_modules/zod/v4/core/core.d.cts +0 -82
  1285. package/node_modules/zod/v4/core/core.d.ts +0 -82
  1286. package/node_modules/zod/v4/core/core.js +0 -141
  1287. package/node_modules/zod/v4/core/doc.cjs +0 -37
  1288. package/node_modules/zod/v4/core/doc.d.cts +0 -16
  1289. package/node_modules/zod/v4/core/doc.d.ts +0 -16
  1290. package/node_modules/zod/v4/core/doc.js +0 -33
  1291. package/node_modules/zod/v4/core/errors.cjs +0 -301
  1292. package/node_modules/zod/v4/core/errors.d.cts +0 -225
  1293. package/node_modules/zod/v4/core/errors.d.ts +0 -225
  1294. package/node_modules/zod/v4/core/errors.js +0 -270
  1295. package/node_modules/zod/v4/core/index.cjs +0 -51
  1296. package/node_modules/zod/v4/core/index.d.cts +0 -19
  1297. package/node_modules/zod/v4/core/index.d.ts +0 -19
  1298. package/node_modules/zod/v4/core/index.js +0 -19
  1299. package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -103
  1300. package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  1301. package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  1302. package/node_modules/zod/v4/core/json-schema-generator.js +0 -99
  1303. package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -813
  1304. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
  1305. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
  1306. package/node_modules/zod/v4/core/json-schema-processors.js +0 -747
  1307. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  1308. package/node_modules/zod/v4/core/json-schema.d.cts +0 -89
  1309. package/node_modules/zod/v4/core/json-schema.d.ts +0 -89
  1310. package/node_modules/zod/v4/core/json-schema.js +0 -1
  1311. package/node_modules/zod/v4/core/memoizer.cjs +0 -272
  1312. package/node_modules/zod/v4/core/memoizer.d.cts +0 -15
  1313. package/node_modules/zod/v4/core/memoizer.d.ts +0 -15
  1314. package/node_modules/zod/v4/core/memoizer.js +0 -265
  1315. package/node_modules/zod/v4/core/package.json +0 -7
  1316. package/node_modules/zod/v4/core/parse.cjs +0 -193
  1317. package/node_modules/zod/v4/core/parse.d.cts +0 -52
  1318. package/node_modules/zod/v4/core/parse.d.ts +0 -52
  1319. package/node_modules/zod/v4/core/parse.js +0 -154
  1320. package/node_modules/zod/v4/core/regexes.cjs +0 -184
  1321. package/node_modules/zod/v4/core/regexes.d.cts +0 -87
  1322. package/node_modules/zod/v4/core/regexes.d.ts +0 -87
  1323. package/node_modules/zod/v4/core/regexes.js +0 -150
  1324. package/node_modules/zod/v4/core/registries.cjs +0 -56
  1325. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  1326. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  1327. package/node_modules/zod/v4/core/registries.js +0 -51
  1328. package/node_modules/zod/v4/core/schemas.cjs +0 -2481
  1329. package/node_modules/zod/v4/core/schemas.d.cts +0 -1253
  1330. package/node_modules/zod/v4/core/schemas.d.ts +0 -1253
  1331. package/node_modules/zod/v4/core/schemas.js +0 -2440
  1332. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  1333. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  1334. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  1335. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  1336. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -660
  1337. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -153
  1338. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -153
  1339. package/node_modules/zod/v4/core/to-json-schema.js +0 -650
  1340. package/node_modules/zod/v4/core/util.cjs +0 -915
  1341. package/node_modules/zod/v4/core/util.d.cts +0 -257
  1342. package/node_modules/zod/v4/core/util.d.ts +0 -257
  1343. package/node_modules/zod/v4/core/util.js +0 -846
  1344. package/node_modules/zod/v4/core/versions.cjs +0 -8
  1345. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  1346. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  1347. package/node_modules/zod/v4/core/versions.js +0 -5
  1348. package/node_modules/zod/v4/core/visit.cjs +0 -195
  1349. package/node_modules/zod/v4/core/visit.d.cts +0 -30
  1350. package/node_modules/zod/v4/core/visit.d.ts +0 -30
  1351. package/node_modules/zod/v4/core/visit.js +0 -169
  1352. package/node_modules/zod/v4/index.cjs +0 -32
  1353. package/node_modules/zod/v4/index.d.cts +0 -3
  1354. package/node_modules/zod/v4/index.d.ts +0 -3
  1355. package/node_modules/zod/v4/index.js +0 -4
  1356. package/node_modules/zod/v4/locales/ar.cjs +0 -136
  1357. package/node_modules/zod/v4/locales/ar.d.cts +0 -5
  1358. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  1359. package/node_modules/zod/v4/locales/ar.js +0 -109
  1360. package/node_modules/zod/v4/locales/az.cjs +0 -135
  1361. package/node_modules/zod/v4/locales/az.d.cts +0 -5
  1362. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  1363. package/node_modules/zod/v4/locales/az.js +0 -108
  1364. package/node_modules/zod/v4/locales/be.cjs +0 -193
  1365. package/node_modules/zod/v4/locales/be.d.cts +0 -5
  1366. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  1367. package/node_modules/zod/v4/locales/be.js +0 -166
  1368. package/node_modules/zod/v4/locales/bg.cjs +0 -150
  1369. package/node_modules/zod/v4/locales/bg.d.cts +0 -5
  1370. package/node_modules/zod/v4/locales/bg.d.ts +0 -4
  1371. package/node_modules/zod/v4/locales/bg.js +0 -123
  1372. package/node_modules/zod/v4/locales/bn.cjs +0 -138
  1373. package/node_modules/zod/v4/locales/bn.d.cts +0 -5
  1374. package/node_modules/zod/v4/locales/bn.d.ts +0 -4
  1375. package/node_modules/zod/v4/locales/bn.js +0 -111
  1376. package/node_modules/zod/v4/locales/ca.cjs +0 -137
  1377. package/node_modules/zod/v4/locales/ca.d.cts +0 -5
  1378. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  1379. package/node_modules/zod/v4/locales/ca.js +0 -110
  1380. package/node_modules/zod/v4/locales/ckb.cjs +0 -158
  1381. package/node_modules/zod/v4/locales/ckb.d.cts +0 -5
  1382. package/node_modules/zod/v4/locales/ckb.d.ts +0 -4
  1383. package/node_modules/zod/v4/locales/ckb.js +0 -131
  1384. package/node_modules/zod/v4/locales/cs.cjs +0 -141
  1385. package/node_modules/zod/v4/locales/cs.d.cts +0 -5
  1386. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  1387. package/node_modules/zod/v4/locales/cs.js +0 -114
  1388. package/node_modules/zod/v4/locales/da.cjs +0 -145
  1389. package/node_modules/zod/v4/locales/da.d.cts +0 -5
  1390. package/node_modules/zod/v4/locales/da.d.ts +0 -4
  1391. package/node_modules/zod/v4/locales/da.js +0 -118
  1392. package/node_modules/zod/v4/locales/de.cjs +0 -138
  1393. package/node_modules/zod/v4/locales/de.d.cts +0 -5
  1394. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  1395. package/node_modules/zod/v4/locales/de.js +0 -111
  1396. package/node_modules/zod/v4/locales/el.cjs +0 -137
  1397. package/node_modules/zod/v4/locales/el.d.cts +0 -5
  1398. package/node_modules/zod/v4/locales/el.d.ts +0 -4
  1399. package/node_modules/zod/v4/locales/el.js +0 -110
  1400. package/node_modules/zod/v4/locales/en.cjs +0 -150
  1401. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  1402. package/node_modules/zod/v4/locales/en.d.ts +0 -4
  1403. package/node_modules/zod/v4/locales/en.js +0 -123
  1404. package/node_modules/zod/v4/locales/eo.cjs +0 -139
  1405. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  1406. package/node_modules/zod/v4/locales/eo.d.ts +0 -4
  1407. package/node_modules/zod/v4/locales/eo.js +0 -112
  1408. package/node_modules/zod/v4/locales/es.cjs +0 -161
  1409. package/node_modules/zod/v4/locales/es.d.cts +0 -5
  1410. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  1411. package/node_modules/zod/v4/locales/es.js +0 -134
  1412. package/node_modules/zod/v4/locales/fa.cjs +0 -144
  1413. package/node_modules/zod/v4/locales/fa.d.cts +0 -5
  1414. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  1415. package/node_modules/zod/v4/locales/fa.js +0 -117
  1416. package/node_modules/zod/v4/locales/fi.cjs +0 -142
  1417. package/node_modules/zod/v4/locales/fi.d.cts +0 -5
  1418. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  1419. package/node_modules/zod/v4/locales/fi.js +0 -115
  1420. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -137
  1421. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  1422. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  1423. package/node_modules/zod/v4/locales/fr-CA.js +0 -110
  1424. package/node_modules/zod/v4/locales/fr.cjs +0 -154
  1425. package/node_modules/zod/v4/locales/fr.d.cts +0 -5
  1426. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  1427. package/node_modules/zod/v4/locales/fr.js +0 -127
  1428. package/node_modules/zod/v4/locales/gu.cjs +0 -138
  1429. package/node_modules/zod/v4/locales/gu.d.cts +0 -5
  1430. package/node_modules/zod/v4/locales/gu.d.ts +0 -4
  1431. package/node_modules/zod/v4/locales/gu.js +0 -111
  1432. package/node_modules/zod/v4/locales/he.cjs +0 -246
  1433. package/node_modules/zod/v4/locales/he.d.cts +0 -5
  1434. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  1435. package/node_modules/zod/v4/locales/he.js +0 -219
  1436. package/node_modules/zod/v4/locales/hi.cjs +0 -136
  1437. package/node_modules/zod/v4/locales/hi.d.cts +0 -5
  1438. package/node_modules/zod/v4/locales/hi.d.ts +0 -4
  1439. package/node_modules/zod/v4/locales/hi.js +0 -109
  1440. package/node_modules/zod/v4/locales/hr.cjs +0 -151
  1441. package/node_modules/zod/v4/locales/hr.d.cts +0 -5
  1442. package/node_modules/zod/v4/locales/hr.d.ts +0 -4
  1443. package/node_modules/zod/v4/locales/hr.js +0 -124
  1444. package/node_modules/zod/v4/locales/hu.cjs +0 -138
  1445. package/node_modules/zod/v4/locales/hu.d.cts +0 -5
  1446. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  1447. package/node_modules/zod/v4/locales/hu.js +0 -111
  1448. package/node_modules/zod/v4/locales/hy.cjs +0 -183
  1449. package/node_modules/zod/v4/locales/hy.d.cts +0 -5
  1450. package/node_modules/zod/v4/locales/hy.d.ts +0 -4
  1451. package/node_modules/zod/v4/locales/hy.js +0 -156
  1452. package/node_modules/zod/v4/locales/id.cjs +0 -136
  1453. package/node_modules/zod/v4/locales/id.d.cts +0 -5
  1454. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  1455. package/node_modules/zod/v4/locales/id.js +0 -109
  1456. package/node_modules/zod/v4/locales/index.cjs +0 -131
  1457. package/node_modules/zod/v4/locales/index.d.cts +0 -62
  1458. package/node_modules/zod/v4/locales/index.d.ts +0 -62
  1459. package/node_modules/zod/v4/locales/index.js +0 -62
  1460. package/node_modules/zod/v4/locales/is.cjs +0 -139
  1461. package/node_modules/zod/v4/locales/is.d.cts +0 -5
  1462. package/node_modules/zod/v4/locales/is.d.ts +0 -4
  1463. package/node_modules/zod/v4/locales/is.js +0 -112
  1464. package/node_modules/zod/v4/locales/it.cjs +0 -138
  1465. package/node_modules/zod/v4/locales/it.d.cts +0 -5
  1466. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  1467. package/node_modules/zod/v4/locales/it.js +0 -111
  1468. package/node_modules/zod/v4/locales/ja.cjs +0 -137
  1469. package/node_modules/zod/v4/locales/ja.d.cts +0 -5
  1470. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  1471. package/node_modules/zod/v4/locales/ja.js +0 -110
  1472. package/node_modules/zod/v4/locales/ka.cjs +0 -142
  1473. package/node_modules/zod/v4/locales/ka.d.cts +0 -5
  1474. package/node_modules/zod/v4/locales/ka.d.ts +0 -4
  1475. package/node_modules/zod/v4/locales/ka.js +0 -115
  1476. package/node_modules/zod/v4/locales/kh.cjs +0 -12
  1477. package/node_modules/zod/v4/locales/kh.d.cts +0 -5
  1478. package/node_modules/zod/v4/locales/kh.d.ts +0 -5
  1479. package/node_modules/zod/v4/locales/kh.js +0 -5
  1480. package/node_modules/zod/v4/locales/km.cjs +0 -140
  1481. package/node_modules/zod/v4/locales/km.d.cts +0 -5
  1482. package/node_modules/zod/v4/locales/km.d.ts +0 -4
  1483. package/node_modules/zod/v4/locales/km.js +0 -113
  1484. package/node_modules/zod/v4/locales/kn.cjs +0 -141
  1485. package/node_modules/zod/v4/locales/kn.d.cts +0 -5
  1486. package/node_modules/zod/v4/locales/kn.d.ts +0 -4
  1487. package/node_modules/zod/v4/locales/kn.js +0 -114
  1488. package/node_modules/zod/v4/locales/ko.cjs +0 -141
  1489. package/node_modules/zod/v4/locales/ko.d.cts +0 -5
  1490. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  1491. package/node_modules/zod/v4/locales/ko.js +0 -114
  1492. package/node_modules/zod/v4/locales/lt.cjs +0 -232
  1493. package/node_modules/zod/v4/locales/lt.d.cts +0 -5
  1494. package/node_modules/zod/v4/locales/lt.d.ts +0 -4
  1495. package/node_modules/zod/v4/locales/lt.js +0 -205
  1496. package/node_modules/zod/v4/locales/mk.cjs +0 -139
  1497. package/node_modules/zod/v4/locales/mk.d.cts +0 -5
  1498. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  1499. package/node_modules/zod/v4/locales/mk.js +0 -112
  1500. package/node_modules/zod/v4/locales/ms.cjs +0 -137
  1501. package/node_modules/zod/v4/locales/ms.d.cts +0 -5
  1502. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  1503. package/node_modules/zod/v4/locales/ms.js +0 -110
  1504. package/node_modules/zod/v4/locales/ne.cjs +0 -136
  1505. package/node_modules/zod/v4/locales/ne.d.cts +0 -5
  1506. package/node_modules/zod/v4/locales/ne.d.ts +0 -4
  1507. package/node_modules/zod/v4/locales/ne.js +0 -109
  1508. package/node_modules/zod/v4/locales/nl.cjs +0 -140
  1509. package/node_modules/zod/v4/locales/nl.d.cts +0 -5
  1510. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  1511. package/node_modules/zod/v4/locales/nl.js +0 -113
  1512. package/node_modules/zod/v4/locales/nn.cjs +0 -138
  1513. package/node_modules/zod/v4/locales/nn.d.cts +0 -5
  1514. package/node_modules/zod/v4/locales/nn.d.ts +0 -4
  1515. package/node_modules/zod/v4/locales/nn.js +0 -111
  1516. package/node_modules/zod/v4/locales/no.cjs +0 -138
  1517. package/node_modules/zod/v4/locales/no.d.cts +0 -5
  1518. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  1519. package/node_modules/zod/v4/locales/no.js +0 -111
  1520. package/node_modules/zod/v4/locales/ota.cjs +0 -139
  1521. package/node_modules/zod/v4/locales/ota.d.cts +0 -5
  1522. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  1523. package/node_modules/zod/v4/locales/ota.js +0 -112
  1524. package/node_modules/zod/v4/locales/package.json +0 -7
  1525. package/node_modules/zod/v4/locales/pl.cjs +0 -139
  1526. package/node_modules/zod/v4/locales/pl.d.cts +0 -5
  1527. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  1528. package/node_modules/zod/v4/locales/pl.js +0 -112
  1529. package/node_modules/zod/v4/locales/ps.cjs +0 -144
  1530. package/node_modules/zod/v4/locales/ps.d.cts +0 -5
  1531. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  1532. package/node_modules/zod/v4/locales/ps.js +0 -117
  1533. package/node_modules/zod/v4/locales/pt-BR.cjs +0 -168
  1534. package/node_modules/zod/v4/locales/pt-BR.d.cts +0 -5
  1535. package/node_modules/zod/v4/locales/pt-BR.d.ts +0 -4
  1536. package/node_modules/zod/v4/locales/pt-BR.js +0 -141
  1537. package/node_modules/zod/v4/locales/pt.cjs +0 -167
  1538. package/node_modules/zod/v4/locales/pt.d.cts +0 -5
  1539. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  1540. package/node_modules/zod/v4/locales/pt.js +0 -140
  1541. package/node_modules/zod/v4/locales/ro.cjs +0 -147
  1542. package/node_modules/zod/v4/locales/ro.d.cts +0 -5
  1543. package/node_modules/zod/v4/locales/ro.d.ts +0 -4
  1544. package/node_modules/zod/v4/locales/ro.js +0 -120
  1545. package/node_modules/zod/v4/locales/ru.cjs +0 -193
  1546. package/node_modules/zod/v4/locales/ru.d.cts +0 -5
  1547. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  1548. package/node_modules/zod/v4/locales/ru.js +0 -166
  1549. package/node_modules/zod/v4/locales/sk.cjs +0 -141
  1550. package/node_modules/zod/v4/locales/sk.d.cts +0 -5
  1551. package/node_modules/zod/v4/locales/sk.d.ts +0 -4
  1552. package/node_modules/zod/v4/locales/sk.js +0 -114
  1553. package/node_modules/zod/v4/locales/sl.cjs +0 -139
  1554. package/node_modules/zod/v4/locales/sl.d.cts +0 -5
  1555. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  1556. package/node_modules/zod/v4/locales/sl.js +0 -112
  1557. package/node_modules/zod/v4/locales/sv.cjs +0 -140
  1558. package/node_modules/zod/v4/locales/sv.d.cts +0 -5
  1559. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  1560. package/node_modules/zod/v4/locales/sv.js +0 -113
  1561. package/node_modules/zod/v4/locales/ta.cjs +0 -140
  1562. package/node_modules/zod/v4/locales/ta.d.cts +0 -5
  1563. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  1564. package/node_modules/zod/v4/locales/ta.js +0 -113
  1565. package/node_modules/zod/v4/locales/th.cjs +0 -140
  1566. package/node_modules/zod/v4/locales/th.d.cts +0 -5
  1567. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  1568. package/node_modules/zod/v4/locales/th.js +0 -113
  1569. package/node_modules/zod/v4/locales/tk.cjs +0 -132
  1570. package/node_modules/zod/v4/locales/tk.d.cts +0 -5
  1571. package/node_modules/zod/v4/locales/tk.d.ts +0 -4
  1572. package/node_modules/zod/v4/locales/tk.js +0 -105
  1573. package/node_modules/zod/v4/locales/tr.cjs +0 -135
  1574. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  1575. package/node_modules/zod/v4/locales/tr.d.ts +0 -4
  1576. package/node_modules/zod/v4/locales/tr.js +0 -108
  1577. package/node_modules/zod/v4/locales/ua.cjs +0 -12
  1578. package/node_modules/zod/v4/locales/ua.d.cts +0 -5
  1579. package/node_modules/zod/v4/locales/ua.d.ts +0 -5
  1580. package/node_modules/zod/v4/locales/ua.js +0 -5
  1581. package/node_modules/zod/v4/locales/uk.cjs +0 -138
  1582. package/node_modules/zod/v4/locales/uk.d.cts +0 -5
  1583. package/node_modules/zod/v4/locales/uk.d.ts +0 -4
  1584. package/node_modules/zod/v4/locales/uk.js +0 -111
  1585. package/node_modules/zod/v4/locales/ur.cjs +0 -140
  1586. package/node_modules/zod/v4/locales/ur.d.cts +0 -5
  1587. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  1588. package/node_modules/zod/v4/locales/ur.js +0 -113
  1589. package/node_modules/zod/v4/locales/uz.cjs +0 -138
  1590. package/node_modules/zod/v4/locales/uz.d.cts +0 -5
  1591. package/node_modules/zod/v4/locales/uz.d.ts +0 -4
  1592. package/node_modules/zod/v4/locales/uz.js +0 -111
  1593. package/node_modules/zod/v4/locales/vi.cjs +0 -138
  1594. package/node_modules/zod/v4/locales/vi.d.cts +0 -5
  1595. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  1596. package/node_modules/zod/v4/locales/vi.js +0 -111
  1597. package/node_modules/zod/v4/locales/yo.cjs +0 -137
  1598. package/node_modules/zod/v4/locales/yo.d.cts +0 -5
  1599. package/node_modules/zod/v4/locales/yo.d.ts +0 -4
  1600. package/node_modules/zod/v4/locales/yo.js +0 -110
  1601. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -139
  1602. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  1603. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  1604. package/node_modules/zod/v4/locales/zh-CN.js +0 -112
  1605. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -137
  1606. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  1607. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  1608. package/node_modules/zod/v4/locales/zh-TW.js +0 -110
  1609. package/node_modules/zod/v4/mini/checks.cjs +0 -35
  1610. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  1611. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  1612. package/node_modules/zod/v4/mini/checks.js +0 -1
  1613. package/node_modules/zod/v4/mini/coerce.cjs +0 -52
  1614. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  1615. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  1616. package/node_modules/zod/v4/mini/coerce.js +0 -22
  1617. package/node_modules/zod/v4/mini/deep-partial.cjs +0 -39
  1618. package/node_modules/zod/v4/mini/deep-partial.d.cts +0 -14
  1619. package/node_modules/zod/v4/mini/deep-partial.d.ts +0 -14
  1620. package/node_modules/zod/v4/mini/deep-partial.js +0 -13
  1621. package/node_modules/zod/v4/mini/external.cjs +0 -74
  1622. package/node_modules/zod/v4/mini/external.d.cts +0 -16
  1623. package/node_modules/zod/v4/mini/external.d.ts +0 -16
  1624. package/node_modules/zod/v4/mini/external.js +0 -16
  1625. package/node_modules/zod/v4/mini/in-out.cjs +0 -63
  1626. package/node_modules/zod/v4/mini/in-out.d.cts +0 -8
  1627. package/node_modules/zod/v4/mini/in-out.d.ts +0 -8
  1628. package/node_modules/zod/v4/mini/in-out.js +0 -36
  1629. package/node_modules/zod/v4/mini/index.cjs +0 -32
  1630. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  1631. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  1632. package/node_modules/zod/v4/mini/index.js +0 -3
  1633. package/node_modules/zod/v4/mini/iso.cjs +0 -64
  1634. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  1635. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  1636. package/node_modules/zod/v4/mini/iso.js +0 -34
  1637. package/node_modules/zod/v4/mini/package.json +0 -7
  1638. package/node_modules/zod/v4/mini/parse.cjs +0 -18
  1639. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  1640. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  1641. package/node_modules/zod/v4/mini/parse.js +0 -1
  1642. package/node_modules/zod/v4/mini/schemas.cjs +0 -1111
  1643. package/node_modules/zod/v4/mini/schemas.d.cts +0 -475
  1644. package/node_modules/zod/v4/mini/schemas.d.ts +0 -475
  1645. package/node_modules/zod/v4/mini/schemas.js +0 -987
  1646. package/node_modules/zod/v4/package.json +0 -7
  1647. package/node_modules/zod/v4-mini/index.cjs +0 -32
  1648. package/node_modules/zod/v4-mini/index.d.cts +0 -3
  1649. package/node_modules/zod/v4-mini/index.d.ts +0 -3
  1650. package/node_modules/zod/v4-mini/index.js +0 -3
  1651. package/node_modules/zod/v4-mini/package.json +0 -7
  1652. package/personal-state.snapshot.lock.json +0 -40
  1653. package/scene-interaction-v2.snapshot.lock.json +0 -36
@@ -1,2440 +0,0 @@
1
- import * as checks from "./checks.js";
2
- import * as core from "./core.js";
3
- import { Doc } from "./doc.js";
4
- import { parse, parseAsync, safeParse, safeParseAsync } from "./parse.js";
5
- import * as regexes from "./regexes.js";
6
- import * as util from "./util.js";
7
- import { version } from "./versions.js";
8
- export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
9
- var _a;
10
- inst ?? (inst = {});
11
- inst._zod.def = def; // set _def property
12
- inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
13
- inst._zod.version = version;
14
- const defChecks = inst._zod.def.checks;
15
- // if inst is itself a checks.$ZodCheck, run it as a check
16
- const checks = inst._zod.traits.has("$ZodCheck")
17
- ? [inst, ...(defChecks ?? [])]
18
- : defChecks?.length
19
- ? [...defChecks]
20
- : [];
21
- for (const ch of checks) {
22
- for (const fn of ch._zod.onattach) {
23
- fn(inst);
24
- }
25
- }
26
- if (checks.length === 0) {
27
- // deferred initializer inst._zod.parse is not yet defined
28
- (_a = inst._zod).deferred ?? (_a.deferred = []);
29
- inst._zod.deferred?.push(() => {
30
- inst._zod.run = inst._zod.parse;
31
- });
32
- }
33
- else {
34
- const runChecks = (payload, checks, ctx) => {
35
- if (payload.memo)
36
- return payload;
37
- let isAborted = util.aborted(payload);
38
- let asyncResult;
39
- for (const ch of checks) {
40
- if (ch._zod.def.when) {
41
- if (util.explicitlyAborted(payload))
42
- continue;
43
- const shouldRun = ch._zod.def.when(payload);
44
- if (!shouldRun)
45
- continue;
46
- }
47
- else if (isAborted) {
48
- continue;
49
- }
50
- const currLen = payload.issues.length;
51
- const _ = ch._zod.check(payload);
52
- if (_ instanceof Promise && ctx?.async === false) {
53
- throw new core.$ZodAsyncError();
54
- }
55
- if (asyncResult || _ instanceof Promise) {
56
- asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
57
- await _;
58
- const nextLen = payload.issues.length;
59
- if (nextLen === currLen)
60
- return;
61
- util.attachSchema(payload.issues, currLen, inst);
62
- if (!isAborted)
63
- isAborted = util.aborted(payload, currLen);
64
- });
65
- }
66
- else {
67
- const nextLen = payload.issues.length;
68
- if (nextLen === currLen)
69
- continue;
70
- util.attachSchema(payload.issues, currLen, inst);
71
- if (!isAborted)
72
- isAborted = util.aborted(payload, currLen);
73
- }
74
- }
75
- if (asyncResult) {
76
- return asyncResult.then(() => {
77
- return payload;
78
- });
79
- }
80
- return payload;
81
- };
82
- const handleCanaryResult = (canary, payload, ctx) => {
83
- // abort if the canary is aborted
84
- if (util.aborted(canary)) {
85
- canary.aborted = true;
86
- return canary;
87
- }
88
- // run checks first, then
89
- const checkResult = runChecks(payload, checks, ctx);
90
- if (checkResult instanceof Promise) {
91
- if (ctx.async === false)
92
- throw new core.$ZodAsyncError();
93
- return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
94
- }
95
- return inst._zod.parse(checkResult, ctx);
96
- };
97
- inst._zod.run = (payload, ctx) => {
98
- if (ctx.skipChecks) {
99
- return inst._zod.parse(payload, ctx);
100
- }
101
- if (ctx.direction === "backward") {
102
- // run canary initial pass (no checks)
103
- const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
104
- if (canary instanceof Promise) {
105
- return canary.then((canary) => {
106
- return handleCanaryResult(canary, payload, ctx);
107
- });
108
- }
109
- return handleCanaryResult(canary, payload, ctx);
110
- }
111
- // forward
112
- const result = inst._zod.parse(payload, ctx);
113
- if (result instanceof Promise) {
114
- if (ctx.async === false)
115
- throw new core.$ZodAsyncError();
116
- return result.then((result) => runChecks(result, checks, ctx));
117
- }
118
- return runChecks(result, checks, ctx);
119
- };
120
- }
121
- }, {
122
- // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
123
- get "~standard"() {
124
- return util.hide(this, "~standard", standardProps(this));
125
- },
126
- set "~standard"(value) {
127
- util.own(this, "~standard", value);
128
- },
129
- });
130
- /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
131
- const toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };
132
- export function standardProps(inst) {
133
- return {
134
- validate: (value) => {
135
- try {
136
- return toStandardResult(safeParse(inst, value));
137
- }
138
- catch (_) {
139
- return safeParseAsync(inst, value).then(toStandardResult);
140
- }
141
- },
142
- vendor: "zod",
143
- version: 1,
144
- };
145
- }
146
- export { clone } from "./util.js";
147
- export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
148
- $ZodType.init(inst, def);
149
- inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);
150
- inst._zod.parse = (payload, _) => {
151
- if (def.coerce)
152
- try {
153
- payload.value = String(payload.value);
154
- }
155
- catch (_) { }
156
- if (typeof payload.value === "string")
157
- return payload;
158
- payload.issues.push({
159
- expected: "string",
160
- code: "invalid_type",
161
- input: payload.value,
162
- inst,
163
- });
164
- return payload;
165
- };
166
- });
167
- export const $ZodStringFormat = /*@__PURE__*/ core.$constructor("$ZodStringFormat", (inst, def) => {
168
- // check initialization must come first
169
- checks.$ZodCheckStringFormat.init(inst, def);
170
- $ZodString.init(inst, def);
171
- });
172
- export const $ZodGUID = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def) => {
173
- def.pattern ?? (def.pattern = regexes.guid);
174
- $ZodStringFormat.init(inst, def);
175
- });
176
- export const $ZodUUID = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def) => {
177
- if (def.version) {
178
- const versionMap = {
179
- v1: 1,
180
- v2: 2,
181
- v3: 3,
182
- v4: 4,
183
- v5: 5,
184
- v6: 6,
185
- v7: 7,
186
- v8: 8,
187
- };
188
- const v = versionMap[def.version];
189
- if (v === undefined)
190
- throw new Error(`Invalid UUID version: "${def.version}"`);
191
- def.pattern ?? (def.pattern = regexes.uuid(v));
192
- }
193
- else
194
- def.pattern ?? (def.pattern = regexes.uuid());
195
- $ZodStringFormat.init(inst, def);
196
- });
197
- export const $ZodEmail = /*@__PURE__*/ core.$constructor("$ZodEmail", (inst, def) => {
198
- def.pattern ?? (def.pattern = regexes.email);
199
- $ZodStringFormat.init(inst, def);
200
- });
201
- /** The `://` guard rejected the input before the URL constructor saw it. */
202
- export const URL_BAD_FORMAT = 1;
203
- /** The URL constructor rejected the input. */
204
- export const URL_UNPARSEABLE = 2;
205
- /** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */
206
- export function parseURLObject(trimmed, def) {
207
- // When normalize is off, require :// for http/https URLs. This prevents strings like "http:example.com" or "https:/path" from being silently accepted
208
- if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
209
- return URL_BAD_FORMAT;
210
- }
211
- try {
212
- // @ts-ignore
213
- return new URL(trimmed);
214
- }
215
- catch {
216
- return URL_UNPARSEABLE;
217
- }
218
- }
219
- const asciiTabOrNewline = /[\t\n\r]/g;
220
- /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */
221
- export function stripTabAndNewline(value) {
222
- return value.replace(asciiTabOrNewline, "");
223
- }
224
- export function urlHostnameOk(url, hostname) {
225
- hostname.lastIndex = 0;
226
- return hostname.test(url.hostname);
227
- }
228
- export function urlProtocolOk(url, protocol) {
229
- protocol.lastIndex = 0;
230
- return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
231
- }
232
- export const $ZodURL = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
233
- $ZodStringFormat.init(inst, def);
234
- inst._zod.check = (payload) => {
235
- try {
236
- // Trim whitespace from input
237
- const trimmed = payload.value.trim();
238
- const url = parseURLObject(trimmed, def);
239
- if (url === URL_BAD_FORMAT) {
240
- payload.issues.push({
241
- code: "invalid_format",
242
- format: "url",
243
- note: "Invalid URL format",
244
- input: payload.value,
245
- inst,
246
- continue: !def.abort,
247
- });
248
- return;
249
- }
250
- if (url === URL_UNPARSEABLE) {
251
- payload.issues.push({
252
- code: "invalid_format",
253
- format: "url",
254
- input: payload.value,
255
- inst,
256
- continue: !def.abort,
257
- });
258
- return;
259
- }
260
- if (def.hostname && !urlHostnameOk(url, def.hostname)) {
261
- payload.issues.push({
262
- code: "invalid_format",
263
- format: "url",
264
- note: "Invalid hostname",
265
- pattern: def.hostname.source,
266
- input: payload.value,
267
- inst,
268
- continue: !def.abort,
269
- });
270
- }
271
- if (def.protocol && !urlProtocolOk(url, def.protocol)) {
272
- payload.issues.push({
273
- code: "invalid_format",
274
- format: "url",
275
- note: "Invalid protocol",
276
- pattern: def.protocol.source,
277
- input: payload.value,
278
- inst,
279
- continue: !def.abort,
280
- });
281
- }
282
- // Set the output value based on normalize flag
283
- payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
284
- return;
285
- }
286
- catch (_) {
287
- payload.issues.push({
288
- code: "invalid_format",
289
- format: "url",
290
- input: payload.value,
291
- inst,
292
- continue: !def.abort,
293
- });
294
- }
295
- };
296
- });
297
- export const $ZodEmoji = /*@__PURE__*/ core.$constructor("$ZodEmoji", (inst, def) => {
298
- def.pattern ?? (def.pattern = regexes.emoji());
299
- $ZodStringFormat.init(inst, def);
300
- });
301
- export const $ZodNanoID = /*@__PURE__*/ core.$constructor("$ZodNanoID", (inst, def) => {
302
- if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))
303
- throw new Error(`Invalid nanoid length: ${def.length}`);
304
- def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));
305
- $ZodStringFormat.init(inst, def);
306
- });
307
- /**
308
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
309
- * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
310
- * See https://github.com/paralleldrive/cuid.
311
- */
312
- export const $ZodCUID = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def) => {
313
- def.pattern ?? (def.pattern = regexes.cuid);
314
- $ZodStringFormat.init(inst, def);
315
- });
316
- export const $ZodCUID2 = /*@__PURE__*/ core.$constructor("$ZodCUID2", (inst, def) => {
317
- def.pattern ?? (def.pattern = regexes.cuid2);
318
- $ZodStringFormat.init(inst, def);
319
- });
320
- export const $ZodULID = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def) => {
321
- def.pattern ?? (def.pattern = regexes.ulid);
322
- $ZodStringFormat.init(inst, def);
323
- });
324
- export const $ZodXID = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def) => {
325
- def.pattern ?? (def.pattern = regexes.xid);
326
- $ZodStringFormat.init(inst, def);
327
- });
328
- export const $ZodKSUID = /*@__PURE__*/ core.$constructor("$ZodKSUID", (inst, def) => {
329
- def.pattern ?? (def.pattern = regexes.ksuid);
330
- $ZodStringFormat.init(inst, def);
331
- });
332
- export const $ZodISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
333
- def.pattern ?? (def.pattern = regexes.datetime(def));
334
- $ZodStringFormat.init(inst, def);
335
- // these two drop the offset or seconds `date-time` requires — on the bag not the def, since `z.string().check(...)` lands the format on a different schema
336
- if (def.local || def.precision === -1) {
337
- inst._zod.bag.laxFormat = true;
338
- inst._zod.onattach.push((s) => {
339
- s._zod.bag.laxFormat = true;
340
- });
341
- }
342
- });
343
- export const $ZodISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
344
- def.pattern ?? (def.pattern = regexes.date);
345
- $ZodStringFormat.init(inst, def);
346
- });
347
- export const $ZodISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
348
- def.pattern ?? (def.pattern = regexes.time(def));
349
- $ZodStringFormat.init(inst, def);
350
- });
351
- export const $ZodISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
352
- def.pattern ?? (def.pattern = regexes.duration);
353
- $ZodStringFormat.init(inst, def);
354
- });
355
- export const $ZodIPv4 = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def) => {
356
- def.pattern ?? (def.pattern = regexes.ipv4);
357
- $ZodStringFormat.init(inst, def);
358
- inst._zod.bag.format = `ipv4`;
359
- });
360
- /** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL("http://[...]")` parses an authority, not an address, so `@` and `\` re-delimit it and `"::@1\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `"::1\n"` validated as `::1`. */
361
- const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
362
- export function isValidIPv6(value) {
363
- if (!ipv6Alphabet.test(value))
364
- return false;
365
- try {
366
- // @ts-ignore
367
- new URL(`http://[${value}]`);
368
- return true;
369
- }
370
- catch {
371
- return false;
372
- }
373
- }
374
- export const $ZodIPv6 = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def) => {
375
- def.pattern ?? (def.pattern = regexes.ipv6);
376
- $ZodStringFormat.init(inst, def);
377
- inst._zod.bag.format = `ipv6`;
378
- inst._zod.check = (payload) => {
379
- if (!isValidIPv6(payload.value)) {
380
- payload.issues.push({
381
- code: "invalid_format",
382
- format: "ipv6",
383
- input: payload.value,
384
- inst,
385
- continue: !def.abort,
386
- });
387
- }
388
- };
389
- });
390
- export const $ZodMAC = /*@__PURE__*/ core.$constructor("$ZodMAC", (inst, def) => {
391
- def.pattern ?? (def.pattern = regexes.mac(def.delimiter));
392
- $ZodStringFormat.init(inst, def);
393
- inst._zod.bag.format = `mac`;
394
- });
395
- export const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor("$ZodCIDRv4", (inst, def) => {
396
- def.pattern ?? (def.pattern = regexes.cidrv4);
397
- $ZodStringFormat.init(inst, def);
398
- });
399
- export function isValidCIDRv6(value) {
400
- const parts = value.split("/");
401
- if (parts.length !== 2)
402
- return false;
403
- const [address, prefix] = parts;
404
- if (!prefix)
405
- return false;
406
- const prefixNum = Number(prefix);
407
- if (`${prefixNum}` !== prefix)
408
- return false;
409
- if (prefixNum < 0 || prefixNum > 128)
410
- return false;
411
- return isValidIPv6(address);
412
- }
413
- export const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor("$ZodCIDRv6", (inst, def) => {
414
- def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
415
- $ZodStringFormat.init(inst, def);
416
- inst._zod.check = (payload) => {
417
- if (!isValidCIDRv6(payload.value)) {
418
- payload.issues.push({
419
- code: "invalid_format",
420
- format: "cidrv6",
421
- input: payload.value,
422
- inst,
423
- continue: !def.abort,
424
- });
425
- }
426
- };
427
- });
428
- ////////////////////////////// ZodBase64 //////////////////////////////
429
- export function isValidBase64(data) {
430
- if (data === "")
431
- return true;
432
- // atob ignores whitespace, so reject it up front.
433
- if (/\s/.test(data))
434
- return false;
435
- if (data.length % 4 !== 0)
436
- return false;
437
- try {
438
- // @ts-ignore
439
- atob(data);
440
- return true;
441
- }
442
- catch {
443
- return false;
444
- }
445
- }
446
- export const $ZodBase64 = /*@__PURE__*/ core.$constructor("$ZodBase64", (inst, def) => {
447
- def.pattern ?? (def.pattern = regexes.base64);
448
- $ZodStringFormat.init(inst, def);
449
- inst._zod.bag.contentEncoding = "base64";
450
- inst._zod.check = (payload) => {
451
- if (isValidBase64(payload.value))
452
- return;
453
- payload.issues.push({
454
- code: "invalid_format",
455
- format: "base64",
456
- input: payload.value,
457
- inst,
458
- continue: !def.abort,
459
- });
460
- };
461
- });
462
- ////////////////////////////// ZodBase64 //////////////////////////////
463
- export function isValidBase64URL(data) {
464
- if (!regexes.base64url.test(data))
465
- return false;
466
- const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
467
- const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
468
- return isValidBase64(padded);
469
- }
470
- export const $ZodBase64URL = /*@__PURE__*/ core.$constructor("$ZodBase64URL", (inst, def) => {
471
- def.pattern ?? (def.pattern = regexes.base64url);
472
- $ZodStringFormat.init(inst, def);
473
- inst._zod.bag.contentEncoding = "base64url";
474
- inst._zod.check = (payload) => {
475
- if (isValidBase64URL(payload.value))
476
- return;
477
- payload.issues.push({
478
- code: "invalid_format",
479
- format: "base64url",
480
- input: payload.value,
481
- inst,
482
- continue: !def.abort,
483
- });
484
- };
485
- });
486
- export const $ZodE164 = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def) => {
487
- def.pattern ?? (def.pattern = regexes.e164);
488
- $ZodStringFormat.init(inst, def);
489
- });
490
- ////////////////////////////// ZodCreditCard //////////////////////////////
491
- const CC_SANITIZE = /[- ]/g;
492
- /** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */
493
- function isLuhnAlgo(digits) {
494
- let length = digits.length;
495
- let bit = 1;
496
- let sum = 0;
497
- while (length) {
498
- const value = +digits[--length];
499
- bit ^= 1;
500
- sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
501
- }
502
- return sum % 10 === 0;
503
- }
504
- export function isValidCreditCard(input) {
505
- if (!regexes.creditCard.test(input))
506
- return false;
507
- return isLuhnAlgo(input.replace(CC_SANITIZE, ""));
508
- }
509
- export const $ZodCreditCard = /*@__PURE__*/ core.$constructor("$ZodCreditCard", (inst, def) => {
510
- // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.
511
- def.pattern ?? (def.pattern = regexes.creditCard);
512
- $ZodStringFormat.init(inst, def);
513
- inst._zod.check = (payload) => {
514
- if (isValidCreditCard(payload.value))
515
- return;
516
- payload.issues.push({
517
- code: "invalid_format",
518
- format: "credit_card",
519
- input: payload.value,
520
- inst,
521
- continue: !def.abort,
522
- });
523
- };
524
- });
525
- ////////////////////////////// ZodJWT //////////////////////////////
526
- export function isValidJWT(token, algorithm = null) {
527
- try {
528
- const tokensParts = token.split(".");
529
- if (tokensParts.length !== 3)
530
- return false;
531
- const [header] = tokensParts;
532
- if (!header)
533
- return false;
534
- // @ts-ignore
535
- const parsedHeader = JSON.parse(atob(header));
536
- if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
537
- return false;
538
- if (!parsedHeader.alg)
539
- return false;
540
- if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
541
- return false;
542
- return true;
543
- }
544
- catch {
545
- return false;
546
- }
547
- }
548
- export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) => {
549
- $ZodStringFormat.init(inst, def);
550
- inst._zod.check = (payload) => {
551
- if (isValidJWT(payload.value, def.alg))
552
- return;
553
- payload.issues.push({
554
- code: "invalid_format",
555
- format: "jwt",
556
- input: payload.value,
557
- inst,
558
- continue: !def.abort,
559
- });
560
- };
561
- });
562
- export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
563
- $ZodStringFormat.init(inst, def);
564
- inst._zod.check = (payload) => {
565
- if (def.fn(payload.value))
566
- return;
567
- payload.issues.push({
568
- code: "invalid_format",
569
- format: def.format,
570
- input: payload.value,
571
- inst,
572
- continue: !def.abort,
573
- });
574
- };
575
- });
576
- export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
577
- $ZodType.init(inst, def);
578
- inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
579
- inst._zod.parse = (payload, _ctx) => {
580
- if (def.coerce)
581
- try {
582
- payload.value = Number(payload.value);
583
- }
584
- catch (_) { }
585
- const input = payload.value;
586
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
587
- return payload;
588
- }
589
- const received = typeof input === "number"
590
- ? Number.isNaN(input)
591
- ? "NaN"
592
- : !Number.isFinite(input)
593
- ? String(input)
594
- : undefined
595
- : undefined;
596
- payload.issues.push({
597
- expected: "number",
598
- code: "invalid_type",
599
- input,
600
- inst,
601
- ...(received ? { received } : {}),
602
- });
603
- return payload;
604
- };
605
- });
606
- export const $ZodNumberFormat = /*@__PURE__*/ core.$constructor("$ZodNumberFormat", (inst, def) => {
607
- checks.$ZodCheckNumberFormat.init(inst, def);
608
- $ZodNumber.init(inst, def); // no format checks
609
- });
610
- export const $ZodBoolean = /*@__PURE__*/ core.$constructor("$ZodBoolean", (inst, def) => {
611
- $ZodType.init(inst, def);
612
- inst._zod.pattern = regexes.boolean;
613
- inst._zod.parse = (payload, _ctx) => {
614
- if (def.coerce)
615
- try {
616
- payload.value = Boolean(payload.value);
617
- }
618
- catch (_) { }
619
- const input = payload.value;
620
- if (typeof input === "boolean")
621
- return payload;
622
- payload.issues.push({
623
- expected: "boolean",
624
- code: "invalid_type",
625
- input,
626
- inst,
627
- });
628
- return payload;
629
- };
630
- });
631
- export const $ZodBigInt = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
632
- $ZodType.init(inst, def);
633
- inst._zod.pattern = regexes.bigint;
634
- inst._zod.parse = (payload, _ctx) => {
635
- if (def.coerce)
636
- try {
637
- payload.value = BigInt(payload.value);
638
- }
639
- catch (_) { }
640
- if (typeof payload.value === "bigint")
641
- return payload;
642
- payload.issues.push({
643
- expected: "bigint",
644
- code: "invalid_type",
645
- input: payload.value,
646
- inst,
647
- });
648
- return payload;
649
- };
650
- });
651
- export const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodBigIntFormat", (inst, def) => {
652
- checks.$ZodCheckBigIntFormat.init(inst, def);
653
- $ZodBigInt.init(inst, def); // no format checks
654
- });
655
- export const $ZodSymbol = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
656
- $ZodType.init(inst, def);
657
- inst._zod.parse = (payload, _ctx) => {
658
- const input = payload.value;
659
- if (typeof input === "symbol")
660
- return payload;
661
- payload.issues.push({
662
- expected: "symbol",
663
- code: "invalid_type",
664
- input,
665
- inst,
666
- });
667
- return payload;
668
- };
669
- });
670
- export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (inst, def) => {
671
- $ZodType.init(inst, def);
672
- inst._zod.pattern = regexes.undefined;
673
- inst._zod.values = new Set([undefined]);
674
- inst._zod.parse = (payload, _ctx) => {
675
- const input = payload.value;
676
- if (typeof input === "undefined")
677
- return payload;
678
- payload.issues.push({
679
- expected: "undefined",
680
- code: "invalid_type",
681
- input,
682
- inst,
683
- });
684
- return payload;
685
- };
686
- });
687
- export const $ZodNull = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
688
- $ZodType.init(inst, def);
689
- inst._zod.pattern = regexes.null;
690
- inst._zod.values = new Set([null]);
691
- inst._zod.parse = (payload, _ctx) => {
692
- const input = payload.value;
693
- if (input === null)
694
- return payload;
695
- payload.issues.push({
696
- expected: "null",
697
- code: "invalid_type",
698
- input,
699
- inst,
700
- });
701
- return payload;
702
- };
703
- });
704
- export const $ZodAny = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
705
- $ZodType.init(inst, def);
706
- inst._zod.parse = (payload) => payload;
707
- });
708
- export const $ZodUnknown = /*@__PURE__*/ core.$constructor("$ZodUnknown", (inst, def) => {
709
- $ZodType.init(inst, def);
710
- inst._zod.parse = (payload) => payload;
711
- });
712
- export const $ZodNever = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
713
- $ZodType.init(inst, def);
714
- inst._zod.parse = (payload, _ctx) => {
715
- payload.issues.push({
716
- expected: "never",
717
- code: "invalid_type",
718
- input: payload.value,
719
- inst,
720
- });
721
- return payload;
722
- };
723
- });
724
- export const $ZodVoid = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
725
- $ZodType.init(inst, def);
726
- inst._zod.parse = (payload, _ctx) => {
727
- const input = payload.value;
728
- if (typeof input === "undefined")
729
- return payload;
730
- payload.issues.push({
731
- expected: "void",
732
- code: "invalid_type",
733
- input,
734
- inst,
735
- });
736
- return payload;
737
- };
738
- });
739
- export const $ZodDate = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
740
- $ZodType.init(inst, def);
741
- inst._zod.parse = (payload, _ctx) => {
742
- if (def.coerce) {
743
- try {
744
- payload.value = new Date(payload.value);
745
- }
746
- catch (_err) { }
747
- }
748
- const input = payload.value;
749
- const isDate = input instanceof Date;
750
- const isValidDate = isDate && !Number.isNaN(input.getTime());
751
- if (isValidDate)
752
- return payload;
753
- payload.issues.push({
754
- expected: "date",
755
- code: "invalid_type",
756
- input,
757
- ...(isDate ? { received: "Invalid Date" } : {}),
758
- inst,
759
- });
760
- return payload;
761
- };
762
- });
763
- function handleArrayResult(result, final, index) {
764
- if (result.issues.length) {
765
- final.issues.push(...util.prefixIssues(index, result.issues));
766
- }
767
- final.value[index] = result.value;
768
- }
769
- export const $ZodArray = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
770
- $ZodType.init(inst, def);
771
- const memo = core.globalConfig.memoizer;
772
- memo?.attach(inst);
773
- inst._zod.parse = (payload, ctx) => {
774
- const input = payload.value;
775
- if (!Array.isArray(input)) {
776
- payload.issues.push({
777
- expected: "array",
778
- code: "invalid_type",
779
- input,
780
- inst,
781
- });
782
- return payload;
783
- }
784
- payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
785
- const proms = [];
786
- for (let i = 0; i < input.length; i++) {
787
- const item = input[i];
788
- const result = def.element._zod.run({
789
- value: item,
790
- issues: [],
791
- }, ctx);
792
- if (result instanceof Promise) {
793
- proms.push(result.then((result) => handleArrayResult(result, payload, i)));
794
- }
795
- else {
796
- handleArrayResult(result, payload, i);
797
- }
798
- }
799
- if (proms.length) {
800
- return Promise.all(proms).then(() => payload);
801
- }
802
- return payload; //handleArrayResultsAsync(parseResults, final);
803
- };
804
- });
805
- function handlePropertyResult(result, final, key, input, optin, optout) {
806
- const isPresent = key in input;
807
- const isOptionalOut = optout === "optional";
808
- // The middle rung means "absence permitted, nothing supplied in its place", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.
809
- if (!isPresent && isOptionalOut && optin === "optional") {
810
- return;
811
- }
812
- if (result.issues.length) {
813
- // For optional-in/out schemas, ignore errors on absent keys.
814
- if (optin !== undefined && isOptionalOut && !isPresent) {
815
- return;
816
- }
817
- final.issues.push(...util.prefixIssues(key, result.issues));
818
- }
819
- if (!isPresent && optin === undefined) {
820
- if (!result.issues.length) {
821
- final.issues.push({
822
- code: "invalid_type",
823
- expected: "nonoptional",
824
- input: undefined,
825
- path: [key],
826
- });
827
- }
828
- return;
829
- }
830
- if (result.value === undefined) {
831
- if (isPresent) {
832
- final.value[key] = undefined;
833
- }
834
- }
835
- else {
836
- final.value[key] = result.value;
837
- }
838
- }
839
- // one shared instance; a fresh [] per schema cost 56 bytes retained
840
- const NO_SYMBOL_KEYS = [];
841
- function normalizeDef(def) {
842
- const keys = Object.keys(def.shape);
843
- const ownSymbols = Object.getOwnPropertySymbols(def.shape);
844
- const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;
845
- // aliases `keys` when there are no symbols, so a string-only shape keeps one array
846
- const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;
847
- for (const k of allKeys) {
848
- if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) {
849
- throw new Error(`Invalid element at key "${String(k)}": expected a Zod schema`);
850
- }
851
- }
852
- const okeys = util.optionalKeys(def.shape);
853
- return {
854
- ...def,
855
- allKeys,
856
- symbolKeys,
857
- // string-only: handleCatchall matches it against `for...in`, which never yields a symbol
858
- keySet: new Set(keys),
859
- numKeys: keys.length,
860
- optionalKeys: new Set(okeys),
861
- };
862
- }
863
- function handleCatchall(proms, input, payload, ctx, def, inst) {
864
- const unrecognized = [];
865
- const keySet = def.keySet;
866
- const _catchall = def.catchall._zod;
867
- const t = _catchall.def.type;
868
- const optin = _catchall.optin;
869
- const optout = _catchall.optout;
870
- for (const key in input) {
871
- // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.
872
- if (keySet.has(key))
873
- continue;
874
- // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.
875
- if (key === "__proto__") {
876
- if (t === "never")
877
- unrecognized.push(key);
878
- continue;
879
- }
880
- if (t === "never") {
881
- unrecognized.push(key);
882
- continue;
883
- }
884
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
885
- if (r instanceof Promise) {
886
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
887
- }
888
- else {
889
- handlePropertyResult(r, payload, key, input, optin, optout);
890
- }
891
- }
892
- if (unrecognized.length) {
893
- payload.issues.push({
894
- code: "unrecognized_keys",
895
- keys: unrecognized,
896
- input,
897
- inst,
898
- // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
899
- continue: true,
900
- });
901
- }
902
- if (!proms.length)
903
- return payload;
904
- return Promise.all(proms).then(() => {
905
- return payload;
906
- });
907
- }
908
- // Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it. Keyed by def, so a def rebuilt by a builder is simply absent rather than inheriting the source's. Read its keys with `Object.keys`, which does not invoke them — that is what lets a discriminated union check its discriminator without resolving an option whose getters reference the union being constructed.
909
- const propShapes = new WeakMap();
910
- export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
911
- // requires cast because technically $ZodObject doesn't extend
912
- $ZodType.init(inst, def);
913
- // const sh = def.shape;
914
- const desc = Object.getOwnPropertyDescriptor(def, "shape");
915
- if (!desc?.get) {
916
- const sh = def.shape;
917
- propShapes.set(def, sh);
918
- Object.defineProperty(def, "shape", {
919
- get: () => {
920
- const newSh = { ...sh };
921
- Object.defineProperty(def, "shape", {
922
- value: newSh,
923
- });
924
- propShapes.set(def, newSh);
925
- return newSh;
926
- },
927
- });
928
- }
929
- const _normalized = util.cached(() => normalizeDef(def));
930
- util.defineLazyInternal(inst, "propValues", (zod) => {
931
- const shape = zod.def.shape;
932
- const propValues = {};
933
- for (const key in shape) {
934
- const field = shape[key]._zod;
935
- if (field.values) {
936
- if (!Object.prototype.hasOwnProperty.call(propValues, key)) {
937
- util.assignProp(propValues, key, new Set());
938
- }
939
- for (const v of field.values)
940
- propValues[key].add(v);
941
- // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.
942
- if (field.optin !== undefined)
943
- propValues[key].add(undefined);
944
- }
945
- }
946
- return propValues;
947
- });
948
- const isObject = util.isObject;
949
- const catchall = def.catchall;
950
- let value;
951
- const memo = core.globalConfig.memoizer;
952
- memo?.attach(inst);
953
- inst._zod.parse = (payload, ctx) => {
954
- value ?? (value = _normalized.value);
955
- const input = payload.value;
956
- if (!isObject(input)) {
957
- payload.issues.push({
958
- expected: "object",
959
- code: "invalid_type",
960
- input,
961
- inst,
962
- });
963
- return payload;
964
- }
965
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
966
- const proms = [];
967
- const shape = value.shape;
968
- for (const key of value.allKeys) {
969
- if (key === "__proto__")
970
- continue;
971
- const el = shape[key];
972
- const optin = el._zod.optin;
973
- const optout = el._zod.optout;
974
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
975
- if (r instanceof Promise) {
976
- proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
977
- }
978
- else {
979
- handlePropertyResult(r, payload, key, input, optin, optout);
980
- }
981
- }
982
- if (!catchall) {
983
- return proms.length ? Promise.all(proms).then(() => payload) : payload;
984
- }
985
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
986
- };
987
- });
988
- export const $ZodObjectJIT = /*@__PURE__*/ core.$constructor("$ZodObjectJIT", (inst, def) => {
989
- // requires cast because technically $ZodObject doesn't extend
990
- $ZodObject.init(inst, def);
991
- const superParse = inst._zod.parse;
992
- const _normalized = util.cached(() => normalizeDef(def));
993
- const memo = core.globalConfig.memoizer;
994
- const generateFastpass = (shape) => {
995
- const normalized = _normalized.value;
996
- const syms = normalized.symbolKeys;
997
- // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope
998
- const doc = new Doc(["payload", "ctx"], { shape, inst, memo, syms });
999
- const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1000
- // Prefixes in place, like util.prefixIssues does for every interpreted path.
1001
- const prefixStr = (id, k) => `
1002
- for (let i = 0; i < ${id}.issues.length; i++) {
1003
- const iss = ${id}.issues[i];
1004
- iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
1005
- payload.issues.push(iss);
1006
- }`;
1007
- doc.write(`const input = payload.value;`);
1008
- const ids = Object.create(null);
1009
- let counter = 0;
1010
- for (const key of normalized.allKeys) {
1011
- ids[key] = `key_${counter++}`;
1012
- }
1013
- // A: preserve key order {
1014
- doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
1015
- for (const key of normalized.allKeys) {
1016
- if (key === "__proto__")
1017
- continue;
1018
- const id = ids[key];
1019
- const k = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : util.esc(key);
1020
- const isPresent = `${k} in input`;
1021
- const schema = shape[key];
1022
- const optin = schema?._zod?.optin;
1023
- const isOptionalIn = optin !== undefined;
1024
- const isOptionalOut = schema?._zod?.optout === "optional";
1025
- doc.write(`const ${id} = ${parseStr(k)};`);
1026
- if (isOptionalIn && isOptionalOut) {
1027
- // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.
1028
- const assign = optin === "optional" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;
1029
- doc.write(`
1030
- const ${id}_present = ${isPresent};
1031
- if (!${id}.issues.length || ${id}_present) {
1032
- if (${id}.issues.length) {${prefixStr(id, k)}
1033
- }
1034
-
1035
- if (${assign}) {
1036
- newResult[${k}] = ${id}.value;
1037
- }
1038
- }
1039
-
1040
- `);
1041
- }
1042
- else if (!isOptionalIn) {
1043
- doc.write(`
1044
- const ${id}_present = ${isPresent};
1045
- if (${id}.issues.length) {${prefixStr(id, k)}
1046
- }
1047
- if (!${id}_present && !${id}.issues.length) {
1048
- payload.issues.push({
1049
- code: "invalid_type",
1050
- expected: "nonoptional",
1051
- input: undefined,
1052
- path: [${k}]
1053
- });
1054
- }
1055
-
1056
- if (${id}_present) {
1057
- newResult[${k}] = ${id}.value;
1058
- }
1059
-
1060
- `);
1061
- }
1062
- else {
1063
- doc.write(`
1064
- if (${id}.issues.length) {${prefixStr(id, k)}
1065
- }
1066
-
1067
- if (${id}.value === undefined) {
1068
- if (${isPresent}) {
1069
- newResult[${k}] = undefined;
1070
- }
1071
- } else {
1072
- newResult[${k}] = ${id}.value;
1073
- }
1074
-
1075
- `);
1076
- }
1077
- }
1078
- doc.write(`payload.value = newResult;`);
1079
- doc.write(`return payload;`);
1080
- // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone
1081
- return doc.compile();
1082
- };
1083
- let fastpass;
1084
- const isObject = util.isObject;
1085
- const jit = !core.globalConfig.jitless;
1086
- const allowsEval = util.allowsEval;
1087
- const fastEnabled = jit && allowsEval.value; // && !def.catchall;
1088
- const catchall = def.catchall;
1089
- let value;
1090
- inst._zod.parse = (payload, ctx) => {
1091
- value ?? (value = _normalized.value);
1092
- const input = payload.value;
1093
- if (!isObject(input)) {
1094
- payload.issues.push({
1095
- expected: "object",
1096
- code: "invalid_type",
1097
- input,
1098
- inst,
1099
- });
1100
- return payload;
1101
- }
1102
- if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
1103
- // always synchronous
1104
- if (!fastpass)
1105
- fastpass = generateFastpass(def.shape);
1106
- payload = fastpass(payload, ctx);
1107
- if (!catchall)
1108
- return payload;
1109
- return handleCatchall([], input, payload, ctx, value, inst);
1110
- }
1111
- return superParse(payload, ctx);
1112
- };
1113
- });
1114
- function handleUnionResults(results, final, inst, ctx) {
1115
- for (const result of results) {
1116
- if (result.issues.length === 0) {
1117
- final.value = result.value;
1118
- return final;
1119
- }
1120
- }
1121
- const nonaborted = results.filter((r) => !util.aborted(r));
1122
- if (nonaborted.length === 1) {
1123
- final.value = nonaborted[0].value;
1124
- return nonaborted[0];
1125
- }
1126
- final.issues.push({
1127
- code: "invalid_union",
1128
- input: final.value,
1129
- inst,
1130
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1131
- });
1132
- return final;
1133
- }
1134
- export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
1135
- $ZodType.init(inst, def);
1136
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.options.some((o) => o._zod.optin === "defaulted")
1137
- ? "defaulted"
1138
- : zod.def.options.some((o) => o._zod.optin !== undefined)
1139
- ? "optional"
1140
- : undefined);
1141
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
1142
- util.defineLazyInternal(inst, "values", (zod) => {
1143
- if (zod.def.options.every((o) => o._zod.values)) {
1144
- return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));
1145
- }
1146
- return undefined;
1147
- });
1148
- util.defineLazyInternal(inst, "pattern", (zod) => {
1149
- if (zod.def.options.every((o) => o._zod.pattern)) {
1150
- const patterns = zod.def.options.map((o) => o._zod.pattern);
1151
- return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
1152
- }
1153
- return undefined;
1154
- });
1155
- const first = def.options.length === 1 ? def.options[0]._zod.run : null;
1156
- inst._zod.parse = (payload, ctx) => {
1157
- if (first) {
1158
- return first(payload, ctx);
1159
- }
1160
- let async = false;
1161
- const results = [];
1162
- for (const option of def.options) {
1163
- const result = option._zod.run({
1164
- value: payload.value,
1165
- issues: [],
1166
- }, ctx);
1167
- if (result instanceof Promise) {
1168
- results.push(result);
1169
- async = true;
1170
- }
1171
- else {
1172
- if (result.issues.length === 0)
1173
- return result;
1174
- results.push(result);
1175
- }
1176
- }
1177
- if (!async)
1178
- return handleUnionResults(results, payload, inst, ctx);
1179
- return Promise.all(results).then((results) => {
1180
- return handleUnionResults(results, payload, inst, ctx);
1181
- });
1182
- };
1183
- });
1184
- function handleExclusiveUnionResults(results, final, inst, ctx) {
1185
- const matches = [];
1186
- for (let i = 0; i < results.length; i++) {
1187
- if (results[i].issues.length === 0)
1188
- matches.push(i);
1189
- }
1190
- if (matches.length === 1) {
1191
- final.value = results[matches[0]].value;
1192
- return final;
1193
- }
1194
- if (matches.length === 0) {
1195
- // No matches - same as regular union
1196
- final.issues.push({
1197
- code: "invalid_union",
1198
- input: final.value,
1199
- inst,
1200
- errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
1201
- });
1202
- }
1203
- else {
1204
- // Multiple matches - exclusive union failure
1205
- final.issues.push({
1206
- code: "invalid_union",
1207
- input: final.value,
1208
- inst,
1209
- errors: [],
1210
- inclusive: false,
1211
- matches,
1212
- });
1213
- }
1214
- return final;
1215
- }
1216
- export const $ZodXor = /*@__PURE__*/ core.$constructor("$ZodXor", (inst, def) => {
1217
- $ZodUnion.init(inst, def);
1218
- def.inclusive = false;
1219
- const first = def.options.length === 1 ? def.options[0]._zod.run : null;
1220
- inst._zod.parse = (payload, ctx) => {
1221
- if (first) {
1222
- return first(payload, ctx);
1223
- }
1224
- let async = false;
1225
- const results = [];
1226
- for (const option of def.options) {
1227
- const result = option._zod.run({
1228
- value: payload.value,
1229
- issues: [],
1230
- }, ctx);
1231
- if (result instanceof Promise) {
1232
- results.push(result);
1233
- async = true;
1234
- }
1235
- else {
1236
- results.push(result);
1237
- }
1238
- }
1239
- if (!async)
1240
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1241
- return Promise.all(results).then((results) => {
1242
- return handleExclusiveUnionResults(results, payload, inst, ctx);
1243
- });
1244
- };
1245
- });
1246
- /** Returns the option of `union` whose discriminator claims `value`. */
1247
- export function getDiscriminatedOption(union, value) {
1248
- const internals = union._zod;
1249
- let map = internals.bag.optionsMap;
1250
- if (!map) {
1251
- map = new Map();
1252
- const { options, discriminator } = internals.def;
1253
- for (const option of options) {
1254
- // First declaration wins, matching the order the parse path resolves a duplicate in.
1255
- for (const v of option._zod.propValues?.[discriminator] ?? [])
1256
- if (!map.has(v))
1257
- map.set(v, option);
1258
- }
1259
- internals.bag.optionsMap = map;
1260
- }
1261
- return map.get(value);
1262
- }
1263
- export const $ZodDiscriminatedUnion =
1264
- /*@__PURE__*/
1265
- core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
1266
- def.inclusive = false;
1267
- $ZodUnion.init(inst, def);
1268
- const _super = inst._zod.parse;
1269
- util.defineLazyInternal(inst, "propValues", (zod) => {
1270
- const propValues = {};
1271
- for (const option of zod.def.options) {
1272
- const pv = option._zod.propValues;
1273
- if (!pv || Object.keys(pv).length === 0)
1274
- throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
1275
- for (const [k, v] of Object.entries(pv)) {
1276
- if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
1277
- util.assignProp(propValues, k, new Set());
1278
- }
1279
- for (const val of v) {
1280
- propValues[k].add(val);
1281
- }
1282
- }
1283
- }
1284
- return propValues;
1285
- });
1286
- // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes, lazies, and objects rebuilt by a builder such as `.extend()` — are left to the map.
1287
- def.options.forEach((option, i) => {
1288
- const propShape = propShapes.get(option._zod.def);
1289
- if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
1290
- throw new Error(`Invalid discriminated union option at index "${i}"`);
1291
- }
1292
- });
1293
- const disc = util.cached(() => {
1294
- const opts = def.options;
1295
- const map = new Map();
1296
- for (const o of opts) {
1297
- const values = o._zod.propValues?.[def.discriminator];
1298
- if (!values || values.size === 0)
1299
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
1300
- for (const v of values) {
1301
- if (map.has(v)) {
1302
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
1303
- }
1304
- map.set(v, o);
1305
- }
1306
- }
1307
- return map;
1308
- });
1309
- inst._zod.parse = (payload, ctx) => {
1310
- const input = payload.value;
1311
- if (!util.isObject(input)) {
1312
- payload.issues.push({
1313
- code: "invalid_type",
1314
- expected: "object",
1315
- input,
1316
- inst,
1317
- });
1318
- return payload;
1319
- }
1320
- const opt = disc.value.get(input?.[def.discriminator]);
1321
- if (opt) {
1322
- return opt._zod.run(payload, ctx);
1323
- }
1324
- // Fall back to union matching when the fast discriminator path fails:
1325
- // - explicitly enabled via unionFallback, or
1326
- // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions
1327
- if (def.unionFallback || ctx.direction === "backward") {
1328
- return _super(payload, ctx);
1329
- }
1330
- // no matching discriminator
1331
- payload.issues.push({
1332
- code: "invalid_union",
1333
- errors: [],
1334
- note: "No matching discriminator",
1335
- discriminator: def.discriminator,
1336
- options: Array.from(disc.value.keys()),
1337
- input,
1338
- path: [def.discriminator],
1339
- inst,
1340
- });
1341
- return payload;
1342
- };
1343
- });
1344
- export const $ZodIntersection = /*@__PURE__*/ core.$constructor("$ZodIntersection", (inst, def) => {
1345
- $ZodType.init(inst, def);
1346
- inst._zod.parse = (payload, ctx) => {
1347
- const input = payload.value;
1348
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
1349
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
1350
- const async = left instanceof Promise || right instanceof Promise;
1351
- if (async) {
1352
- return Promise.all([left, right]).then(([left, right]) => {
1353
- return handleIntersectionResults(payload, left, right);
1354
- });
1355
- }
1356
- return handleIntersectionResults(payload, left, right);
1357
- };
1358
- });
1359
- export function mergeValues(a, b) {
1360
- // const aType = parse.t(a);
1361
- // const bType = parse.t(b);
1362
- if (a === b) {
1363
- return { valid: true, data: a };
1364
- }
1365
- if (a instanceof Date && b instanceof Date && +a === +b) {
1366
- return { valid: true, data: a };
1367
- }
1368
- if (util.isPlainObject(a) && util.isPlainObject(b)) {
1369
- const bKeys = Object.keys(b);
1370
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1371
- const newObj = { ...a, ...b };
1372
- if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
1373
- delete newObj.__proto__;
1374
- for (const key of sharedKeys) {
1375
- if (key === "__proto__")
1376
- continue;
1377
- const sharedValue = mergeValues(a[key], b[key]);
1378
- if (!sharedValue.valid) {
1379
- return {
1380
- valid: false,
1381
- mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
1382
- };
1383
- }
1384
- newObj[key] = sharedValue.data;
1385
- }
1386
- return { valid: true, data: newObj };
1387
- }
1388
- if (Array.isArray(a) && Array.isArray(b)) {
1389
- if (a.length !== b.length) {
1390
- return { valid: false, mergeErrorPath: [] };
1391
- }
1392
- const newArray = [];
1393
- for (let index = 0; index < a.length; index++) {
1394
- const itemA = a[index];
1395
- const itemB = b[index];
1396
- const sharedValue = mergeValues(itemA, itemB);
1397
- if (!sharedValue.valid) {
1398
- return {
1399
- valid: false,
1400
- mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
1401
- };
1402
- }
1403
- newArray.push(sharedValue.data);
1404
- }
1405
- return { valid: true, data: newArray };
1406
- }
1407
- return { valid: false, mergeErrorPath: [] };
1408
- }
1409
- function handleIntersectionResults(result, left, right) {
1410
- // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.
1411
- const unrecKeys = new Map();
1412
- let unrecIssue;
1413
- const keyIssues = new Map();
1414
- const collect = (iss, side) => {
1415
- let keys;
1416
- if (iss.code === "unrecognized_keys" && !iss.path?.length) {
1417
- unrecIssue ?? (unrecIssue = iss);
1418
- keys = iss.keys;
1419
- }
1420
- else if (iss.code === "invalid_key" && iss.origin === "record" && iss.path?.length === 1) {
1421
- const k = String(iss.path[0]);
1422
- if (!keyIssues.has(k))
1423
- keyIssues.set(k, iss);
1424
- keys = [k];
1425
- }
1426
- else {
1427
- return false;
1428
- }
1429
- for (const k of keys) {
1430
- if (!unrecKeys.has(k))
1431
- unrecKeys.set(k, {});
1432
- unrecKeys.get(k)[side] = true;
1433
- }
1434
- return true;
1435
- };
1436
- for (const iss of left.issues) {
1437
- if (!collect(iss, "l"))
1438
- result.issues.push(iss);
1439
- }
1440
- for (const iss of right.issues) {
1441
- if (!collect(iss, "r"))
1442
- result.issues.push(iss);
1443
- }
1444
- // Report only keys rejected by BOTH sides
1445
- const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1446
- if (bothKeys.length) {
1447
- const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];
1448
- if (aggregated.length)
1449
- result.issues.push({ ...unrecIssue, keys: aggregated });
1450
- for (const k of bothKeys) {
1451
- if (!aggregated.includes(k) && keyIssues.has(k))
1452
- result.issues.push(keyIssues.get(k));
1453
- }
1454
- }
1455
- const merged = mergeValues(left.value, right.value);
1456
- if (!merged.valid) {
1457
- if (util.aborted(result))
1458
- return result;
1459
- throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
1460
- }
1461
- result.value = merged.data;
1462
- return result;
1463
- }
1464
- export const $ZodTuple = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
1465
- $ZodType.init(inst, def);
1466
- const items = def.items;
1467
- const memo = core.globalConfig.memoizer;
1468
- memo?.attach(inst);
1469
- inst._zod.parse = (payload, ctx) => {
1470
- const input = payload.value;
1471
- if (!Array.isArray(input)) {
1472
- payload.issues.push({
1473
- input,
1474
- inst,
1475
- expected: "tuple",
1476
- code: "invalid_type",
1477
- });
1478
- return payload;
1479
- }
1480
- payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
1481
- const proms = [];
1482
- const optinStart = getTupleOptStart(items, "optin");
1483
- const optoutStart = getTupleOptStart(items, "optout");
1484
- if (!def.rest) {
1485
- if (input.length < optinStart) {
1486
- payload.issues.push({
1487
- code: "too_small",
1488
- minimum: optinStart,
1489
- inclusive: true,
1490
- input,
1491
- inst,
1492
- origin: "array",
1493
- });
1494
- return payload;
1495
- }
1496
- if (input.length > items.length) {
1497
- payload.issues.push({
1498
- code: "too_big",
1499
- maximum: items.length,
1500
- inclusive: true,
1501
- input,
1502
- inst,
1503
- origin: "array",
1504
- });
1505
- }
1506
- }
1507
- // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.
1508
- const itemResults = new Array(items.length);
1509
- for (let i = 0; i < items.length; i++) {
1510
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
1511
- if (r instanceof Promise) {
1512
- proms.push(r.then((rr) => {
1513
- itemResults[i] = rr;
1514
- }));
1515
- }
1516
- else {
1517
- itemResults[i] = r;
1518
- }
1519
- }
1520
- if (def.rest) {
1521
- let i = items.length - 1;
1522
- const rest = input.slice(items.length);
1523
- for (const el of rest) {
1524
- i++;
1525
- const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
1526
- if (result instanceof Promise) {
1527
- proms.push(result.then((r) => handleTupleResult(r, payload, i)));
1528
- }
1529
- else {
1530
- handleTupleResult(result, payload, i);
1531
- }
1532
- }
1533
- }
1534
- if (proms.length) {
1535
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
1536
- }
1537
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
1538
- };
1539
- });
1540
- function getTupleOptStart(items, key) {
1541
- for (let i = items.length - 1; i >= 0; i--) {
1542
- // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.
1543
- const omittable = key === "optin" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === "optional";
1544
- if (!omittable)
1545
- return i + 1;
1546
- }
1547
- return 0;
1548
- }
1549
- function handleTupleResult(result, final, index) {
1550
- if (result.issues.length) {
1551
- final.issues.push(...util.prefixIssues(index, result.issues));
1552
- }
1553
- final.value[index] = result.value;
1554
- }
1555
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
1556
- // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.
1557
- for (let i = 0; i < items.length; i++) {
1558
- const r = itemResults[i];
1559
- const isPresent = i < input.length;
1560
- // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.
1561
- if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
1562
- final.value.length = i;
1563
- break;
1564
- }
1565
- if (r.issues.length) {
1566
- if (!isPresent && i >= optoutStart) {
1567
- final.value.length = i;
1568
- break;
1569
- }
1570
- final.issues.push(...util.prefixIssues(i, r.issues));
1571
- }
1572
- final.value[i] = r.value;
1573
- }
1574
- // Drop trailing slots that produced `undefined` for absent input
1575
- // (the array analog of an absent optional key on an object). The
1576
- // `i >= input.length` floor is critical: an explicit `undefined`
1577
- // *inside* the input must be preserved even when the schema is
1578
- // optional-out (e.g. `z.string().or(z.undefined())` accepting an
1579
- // explicit undefined value).
1580
- for (let i = final.value.length - 1; i >= input.length; i--) {
1581
- if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
1582
- final.value.length = i;
1583
- }
1584
- else {
1585
- break;
1586
- }
1587
- }
1588
- return final;
1589
- }
1590
- export const $ZodRecord = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
1591
- $ZodType.init(inst, def);
1592
- const memo = core.globalConfig.memoizer;
1593
- memo?.attach(inst);
1594
- inst._zod.parse = (payload, ctx) => {
1595
- const input = payload.value;
1596
- if (!util.isPlainObject(input)) {
1597
- payload.issues.push({
1598
- expected: "record",
1599
- code: "invalid_type",
1600
- input,
1601
- inst,
1602
- });
1603
- return payload;
1604
- }
1605
- const proms = [];
1606
- const values = def.keyType._zod.values;
1607
- if (values && !def.partial) {
1608
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1609
- const recordKeys = new Set();
1610
- for (const key of values) {
1611
- if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1612
- recordKeys.add(typeof key === "number" ? key.toString() : key);
1613
- // A declared __proto__ is stripped but is not an unrecognized key.
1614
- if (key === "__proto__")
1615
- continue;
1616
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1617
- if (keyResult instanceof Promise) {
1618
- throw new Error("Async schemas not supported in object keys currently");
1619
- }
1620
- if (keyResult.issues.length) {
1621
- payload.issues.push({
1622
- code: "invalid_key",
1623
- origin: "record",
1624
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1625
- input: key,
1626
- path: [key],
1627
- inst,
1628
- });
1629
- continue;
1630
- }
1631
- const outKey = keyResult.value;
1632
- if (outKey === "__proto__")
1633
- continue;
1634
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1635
- if (result instanceof Promise) {
1636
- proms.push(result.then((result) => {
1637
- if (result.issues.length) {
1638
- payload.issues.push(...util.prefixIssues(key, result.issues));
1639
- }
1640
- payload.value[outKey] = result.value;
1641
- }));
1642
- }
1643
- else {
1644
- if (result.issues.length) {
1645
- payload.issues.push(...util.prefixIssues(key, result.issues));
1646
- }
1647
- payload.value[outKey] = result.value;
1648
- }
1649
- }
1650
- }
1651
- let unrecognized;
1652
- for (const key in input) {
1653
- if (!recordKeys.has(key)) {
1654
- if (def.mode === "loose") {
1655
- // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into
1656
- if (key === "__proto__")
1657
- continue;
1658
- payload.value[key] = input[key];
1659
- }
1660
- else {
1661
- unrecognized = unrecognized ?? [];
1662
- unrecognized.push(key);
1663
- }
1664
- }
1665
- }
1666
- if (unrecognized && unrecognized.length > 0) {
1667
- payload.issues.push({
1668
- code: "unrecognized_keys",
1669
- input,
1670
- inst,
1671
- keys: unrecognized,
1672
- continue: true,
1673
- });
1674
- }
1675
- }
1676
- else {
1677
- payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
1678
- // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.
1679
- let unrecognized;
1680
- // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()
1681
- for (const key of Reflect.ownKeys(input)) {
1682
- if (key === "__proto__")
1683
- continue;
1684
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
1685
- continue;
1686
- let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1687
- if (keyResult instanceof Promise) {
1688
- throw new Error("Async schemas not supported in object keys currently");
1689
- }
1690
- // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals
1691
- const checkNumericKey = typeof key === "string" && regexes.number.test(key) && keyResult.issues.length;
1692
- if (checkNumericKey) {
1693
- const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
1694
- if (retryResult instanceof Promise) {
1695
- throw new Error("Async schemas not supported in object keys currently");
1696
- }
1697
- if (retryResult.issues.length === 0) {
1698
- keyResult = retryResult;
1699
- }
1700
- }
1701
- if (keyResult.issues.length) {
1702
- if (def.mode === "loose") {
1703
- // Pass through unchanged
1704
- payload.value[key] = input[key];
1705
- }
1706
- else if (values) {
1707
- unrecognized = unrecognized ?? [];
1708
- unrecognized.push(key);
1709
- }
1710
- else {
1711
- // Default "strict" behavior: error on invalid key
1712
- payload.issues.push({
1713
- code: "invalid_key",
1714
- origin: "record",
1715
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1716
- input: key,
1717
- path: [key],
1718
- inst,
1719
- });
1720
- }
1721
- continue;
1722
- }
1723
- // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under
1724
- const outKey = keyResult.value;
1725
- if (outKey === "__proto__")
1726
- continue;
1727
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1728
- if (result instanceof Promise) {
1729
- proms.push(result.then((result) => {
1730
- if (result.issues.length) {
1731
- payload.issues.push(...util.prefixIssues(key, result.issues));
1732
- }
1733
- payload.value[outKey] = result.value;
1734
- }));
1735
- }
1736
- else {
1737
- if (result.issues.length) {
1738
- payload.issues.push(...util.prefixIssues(key, result.issues));
1739
- }
1740
- payload.value[outKey] = result.value;
1741
- }
1742
- }
1743
- if (unrecognized && unrecognized.length > 0) {
1744
- payload.issues.push({
1745
- code: "unrecognized_keys",
1746
- input,
1747
- inst,
1748
- keys: unrecognized,
1749
- continue: true,
1750
- });
1751
- }
1752
- }
1753
- if (proms.length) {
1754
- return Promise.all(proms).then(() => payload);
1755
- }
1756
- return payload;
1757
- };
1758
- });
1759
- export const $ZodMap = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
1760
- $ZodType.init(inst, def);
1761
- const memo = core.globalConfig.memoizer;
1762
- memo?.attach(inst);
1763
- inst._zod.parse = (payload, ctx) => {
1764
- const input = payload.value;
1765
- if (!(input instanceof Map)) {
1766
- payload.issues.push({
1767
- expected: "map",
1768
- code: "invalid_type",
1769
- input,
1770
- inst,
1771
- });
1772
- return payload;
1773
- }
1774
- const proms = [];
1775
- payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();
1776
- for (const [key, value] of input) {
1777
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1778
- const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
1779
- if (keyResult instanceof Promise || valueResult instanceof Promise) {
1780
- proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
1781
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1782
- }));
1783
- }
1784
- else {
1785
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1786
- }
1787
- }
1788
- if (proms.length)
1789
- return Promise.all(proms).then(() => payload);
1790
- return payload;
1791
- };
1792
- });
1793
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1794
- if (keyResult.issues.length) {
1795
- if (util.propertyKeyTypes.has(typeof key)) {
1796
- final.issues.push(...util.prefixIssues(key, keyResult.issues));
1797
- }
1798
- else {
1799
- final.issues.push({
1800
- code: "invalid_key",
1801
- origin: "map",
1802
- input,
1803
- inst,
1804
- issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1805
- });
1806
- }
1807
- }
1808
- if (valueResult.issues.length) {
1809
- if (util.propertyKeyTypes.has(typeof key)) {
1810
- final.issues.push(...util.prefixIssues(key, valueResult.issues));
1811
- }
1812
- else {
1813
- final.issues.push({
1814
- origin: "map",
1815
- code: "invalid_element",
1816
- input,
1817
- inst,
1818
- key: key,
1819
- issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1820
- });
1821
- }
1822
- }
1823
- final.value.set(keyResult.value, valueResult.value);
1824
- }
1825
- export const $ZodSet = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
1826
- $ZodType.init(inst, def);
1827
- const memo = core.globalConfig.memoizer;
1828
- memo?.attach(inst);
1829
- inst._zod.parse = (payload, ctx) => {
1830
- const input = payload.value;
1831
- if (!(input instanceof Set)) {
1832
- payload.issues.push({
1833
- input,
1834
- inst,
1835
- expected: "set",
1836
- code: "invalid_type",
1837
- });
1838
- return payload;
1839
- }
1840
- const proms = [];
1841
- payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();
1842
- for (const item of input) {
1843
- const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
1844
- if (result instanceof Promise) {
1845
- proms.push(result.then((result) => handleSetResult(result, payload)));
1846
- }
1847
- else
1848
- handleSetResult(result, payload);
1849
- }
1850
- if (proms.length)
1851
- return Promise.all(proms).then(() => payload);
1852
- return payload;
1853
- };
1854
- });
1855
- function handleSetResult(result, final) {
1856
- if (result.issues.length) {
1857
- final.issues.push(...result.issues);
1858
- }
1859
- final.value.add(result.value);
1860
- }
1861
- export const $ZodEnum = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
1862
- $ZodType.init(inst, def);
1863
- const values = util.getEnumValues(def.entries);
1864
- const valuesSet = new Set(values);
1865
- inst._zod.values = valuesSet;
1866
- const patternValues = values.filter((k) => util.propertyKeyTypes.has(typeof k));
1867
- // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
1868
- inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
1869
- inst._zod.parse = (payload, _ctx) => {
1870
- const input = payload.value;
1871
- if (valuesSet.has(input)) {
1872
- return payload;
1873
- }
1874
- payload.issues.push({
1875
- code: "invalid_value",
1876
- values,
1877
- input,
1878
- inst,
1879
- });
1880
- return payload;
1881
- };
1882
- });
1883
- export const $ZodLiteral = /*@__PURE__*/ core.$constructor("$ZodLiteral", (inst, def) => {
1884
- $ZodType.init(inst, def);
1885
- const values = new Set(def.values);
1886
- inst._zod.values = values;
1887
- // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches ""
1888
- inst._zod.pattern = new RegExp(def.values.length
1889
- ? `^(${def.values
1890
- .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))
1891
- .join("|")})$`
1892
- : "^[^\\s\\S]$");
1893
- inst._zod.parse = (payload, _ctx) => {
1894
- const input = payload.value;
1895
- if (values.has(input)) {
1896
- return payload;
1897
- }
1898
- payload.issues.push({
1899
- code: "invalid_value",
1900
- values: def.values,
1901
- input,
1902
- inst,
1903
- });
1904
- return payload;
1905
- };
1906
- });
1907
- export const $ZodFile = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
1908
- $ZodType.init(inst, def);
1909
- inst._zod.parse = (payload, _ctx) => {
1910
- const input = payload.value;
1911
- // @ts-ignore
1912
- if (input instanceof File)
1913
- return payload;
1914
- payload.issues.push({
1915
- expected: "file",
1916
- code: "invalid_type",
1917
- input,
1918
- inst,
1919
- });
1920
- return payload;
1921
- };
1922
- });
1923
- export const $ZodTransform = /*@__PURE__*/ core.$constructor("$ZodTransform", (inst, def) => {
1924
- $ZodType.init(inst, def);
1925
- inst._zod.optin = "optional";
1926
- core.globalConfig.memoizer?.guard(inst);
1927
- inst._zod.parse = (payload, ctx) => {
1928
- if (ctx.direction === "backward") {
1929
- throw new core.$ZodEncodeError(inst.constructor.name);
1930
- }
1931
- const _out = def.transform(payload.value, payload);
1932
- if (ctx.async) {
1933
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
1934
- return output.then((output) => {
1935
- payload.value = output;
1936
- return payload;
1937
- });
1938
- }
1939
- if (_out instanceof Promise) {
1940
- throw new core.$ZodAsyncError();
1941
- }
1942
- payload.value = _out;
1943
- return payload;
1944
- };
1945
- });
1946
- function handleOptionalResult(payload, result) {
1947
- // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.
1948
- payload.value = result.issues.length ? undefined : result.value;
1949
- return payload;
1950
- }
1951
- export const $ZodOptional = /*@__PURE__*/ core.$constructor("$ZodOptional", (inst, def) => {
1952
- $ZodType.init(inst, def);
1953
- // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.
1954
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
1955
- inst._zod.optout = "optional";
1956
- util.defineLazyInternal(inst, "values", (zod) => {
1957
- const values = zod.def.innerType._zod.values;
1958
- return values ? new Set([...values, undefined]) : undefined;
1959
- });
1960
- util.defineLazyInternal(inst, "pattern", (zod) => {
1961
- const pattern = zod.def.innerType._zod.pattern;
1962
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
1963
- });
1964
- inst._zod.parse = (payload, ctx) => {
1965
- if (payload.value === undefined) {
1966
- // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.
1967
- if (def.innerType._zod.optin !== "defaulted")
1968
- return payload;
1969
- // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.
1970
- const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
1971
- if (result instanceof Promise)
1972
- return result.then((result) => handleOptionalResult(payload, result));
1973
- return handleOptionalResult(payload, result);
1974
- }
1975
- return def.innerType._zod.run(payload, ctx);
1976
- };
1977
- });
1978
- export const $ZodExactOptional = /*@__PURE__*/ core.$constructor("$ZodExactOptional", (inst, def) => {
1979
- // Call parent init - inherits optin/optout = "optional"
1980
- $ZodOptional.init(inst, def);
1981
- // Override values/pattern to NOT add undefined
1982
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
1983
- util.defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
1984
- // Override parse to just delegate (no undefined handling)
1985
- inst._zod.parse = (payload, ctx) => {
1986
- return def.innerType._zod.run(payload, ctx);
1987
- };
1988
- });
1989
- export const $ZodNullable = /*@__PURE__*/ core.$constructor("$ZodNullable", (inst, def) => {
1990
- $ZodType.init(inst, def);
1991
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
1992
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
1993
- util.defineLazyInternal(inst, "pattern", (zod) => {
1994
- const pattern = zod.def.innerType._zod.pattern;
1995
- return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
1996
- });
1997
- util.defineLazyInternal(inst, "values", (zod) => {
1998
- return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;
1999
- });
2000
- inst._zod.parse = (payload, ctx) => {
2001
- // Forward direction (decode): allow null to pass through
2002
- if (payload.value === null)
2003
- return payload;
2004
- return def.innerType._zod.run(payload, ctx);
2005
- };
2006
- });
2007
- export const $ZodDefault = /*@__PURE__*/ core.$constructor("$ZodDefault", (inst, def) => {
2008
- $ZodType.init(inst, def);
2009
- // inst._zod.qin = "true";
2010
- inst._zod.optin = "defaulted";
2011
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2012
- inst._zod.parse = (payload, ctx) => {
2013
- if (ctx.direction === "backward") {
2014
- return def.innerType._zod.run(payload, ctx);
2015
- }
2016
- // Forward direction (decode): apply defaults for undefined input
2017
- if (payload.value === undefined) {
2018
- payload.value = def.defaultValue;
2019
- /**
2020
- * $ZodDefault returns the default value immediately in forward direction.
2021
- * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
2022
- return payload;
2023
- }
2024
- // Forward direction: continue with default handling
2025
- const result = def.innerType._zod.run(payload, ctx);
2026
- if (result instanceof Promise) {
2027
- return result.then((result) => handleDefaultResult(result, def));
2028
- }
2029
- return handleDefaultResult(result, def);
2030
- };
2031
- });
2032
- function handleDefaultResult(payload, def) {
2033
- if (payload.value === undefined) {
2034
- payload.value = def.defaultValue;
2035
- }
2036
- return payload;
2037
- }
2038
- export const $ZodPrefault = /*@__PURE__*/ core.$constructor("$ZodPrefault", (inst, def) => {
2039
- $ZodType.init(inst, def);
2040
- inst._zod.optin = "defaulted";
2041
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2042
- inst._zod.parse = (payload, ctx) => {
2043
- if (ctx.direction === "backward") {
2044
- return def.innerType._zod.run(payload, ctx);
2045
- }
2046
- // Forward direction (decode): apply prefault for undefined input
2047
- if (payload.value === undefined) {
2048
- payload.value = def.defaultValue;
2049
- }
2050
- return def.innerType._zod.run(payload, ctx);
2051
- };
2052
- });
2053
- export const $ZodNonOptional = /*@__PURE__*/ core.$constructor("$ZodNonOptional", (inst, def) => {
2054
- $ZodType.init(inst, def);
2055
- util.defineLazyInternal(inst, "values", (zod) => {
2056
- const v = zod.def.innerType._zod.values;
2057
- return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
2058
- });
2059
- inst._zod.parse = (payload, ctx) => {
2060
- const result = def.innerType._zod.run(payload, ctx);
2061
- if (result instanceof Promise) {
2062
- return result.then((result) => handleNonOptionalResult(result, inst));
2063
- }
2064
- return handleNonOptionalResult(result, inst);
2065
- };
2066
- });
2067
- function handleNonOptionalResult(payload, inst) {
2068
- if (!payload.issues.length && payload.value === undefined) {
2069
- payload.issues.push({
2070
- code: "invalid_type",
2071
- expected: "nonoptional",
2072
- input: payload.value,
2073
- inst,
2074
- });
2075
- }
2076
- return payload;
2077
- }
2078
- export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst, def) => {
2079
- $ZodType.init(inst, def);
2080
- inst._zod.parse = (payload, ctx) => {
2081
- if (ctx.direction === "backward") {
2082
- throw new core.$ZodEncodeError("ZodSuccess");
2083
- }
2084
- const result = def.innerType._zod.run(payload, ctx);
2085
- if (result instanceof Promise) {
2086
- return result.then((result) => {
2087
- payload.value = result.issues.length === 0;
2088
- return payload;
2089
- });
2090
- }
2091
- payload.value = result.issues.length === 0;
2092
- return payload;
2093
- };
2094
- });
2095
- function handleCatchResult(payload, result, def, ctx) {
2096
- if (!result.issues.length) {
2097
- payload.value = result.value;
2098
- // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.
2099
- if (result.memo)
2100
- payload.memo = true;
2101
- return payload;
2102
- }
2103
- // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.
2104
- payload.value = def.catchValue({
2105
- ...result,
2106
- value: payload.value,
2107
- error: {
2108
- issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
2109
- },
2110
- input: payload.value,
2111
- });
2112
- return payload;
2113
- }
2114
- export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
2115
- $ZodType.init(inst, def);
2116
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2117
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
2118
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2119
- inst._zod.parse = (payload, ctx) => {
2120
- if (ctx.direction === "backward") {
2121
- return def.innerType._zod.run(payload, ctx);
2122
- }
2123
- // Forward direction (decode): apply catch logic
2124
- const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);
2125
- if (result instanceof Promise) {
2126
- return result.then((result) => handleCatchResult(payload, result, def, ctx));
2127
- }
2128
- return handleCatchResult(payload, result, def, ctx);
2129
- };
2130
- });
2131
- export const $ZodNaN = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
2132
- $ZodType.init(inst, def);
2133
- inst._zod.parse = (payload, _ctx) => {
2134
- if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
2135
- payload.issues.push({
2136
- input: payload.value,
2137
- inst,
2138
- expected: "nan",
2139
- code: "invalid_type",
2140
- });
2141
- return payload;
2142
- }
2143
- return payload;
2144
- };
2145
- });
2146
- export const $ZodPipe = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
2147
- $ZodType.init(inst, def);
2148
- util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2149
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
2150
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
2151
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
2152
- inst._zod.parse = (payload, ctx) => {
2153
- if (ctx.direction === "backward") {
2154
- const right = def.out._zod.run(payload, ctx);
2155
- if (right instanceof Promise) {
2156
- return right.then((right) => handlePipeResult(right, def.in, ctx));
2157
- }
2158
- return handlePipeResult(right, def.in, ctx);
2159
- }
2160
- const left = def.in._zod.run(payload, ctx);
2161
- if (left instanceof Promise) {
2162
- return left.then((left) => handlePipeResult(left, def.out, ctx));
2163
- }
2164
- return handlePipeResult(left, def.out, ctx);
2165
- };
2166
- });
2167
- function handlePipeResult(left, next, ctx) {
2168
- // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.
2169
- if (left.issues.some((iss) => iss.code !== "unrecognized_keys")) {
2170
- // prevent further checks
2171
- left.aborted = true;
2172
- return left;
2173
- }
2174
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
2175
- }
2176
- export const $ZodCodec = /*@__PURE__*/ core.$constructor("$ZodCodec", (inst, def) => {
2177
- $ZodType.init(inst, def);
2178
- util.defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2179
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
2180
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
2181
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
2182
- inst._zod.parse = (payload, ctx) => {
2183
- const direction = ctx.direction || "forward";
2184
- if (direction === "forward") {
2185
- const left = def.in._zod.run(payload, ctx);
2186
- if (left instanceof Promise) {
2187
- return left.then((left) => handleCodecAResult(left, def, ctx));
2188
- }
2189
- return handleCodecAResult(left, def, ctx);
2190
- }
2191
- else {
2192
- const right = def.out._zod.run(payload, ctx);
2193
- if (right instanceof Promise) {
2194
- return right.then((right) => handleCodecAResult(right, def, ctx));
2195
- }
2196
- return handleCodecAResult(right, def, ctx);
2197
- }
2198
- };
2199
- });
2200
- function handleCodecAResult(result, def, ctx) {
2201
- if (result.issues.length) {
2202
- // prevent further checks
2203
- result.aborted = true;
2204
- return result;
2205
- }
2206
- const direction = ctx.direction || "forward";
2207
- if (direction === "forward") {
2208
- const transformed = def.transform(result.value, result);
2209
- if (transformed instanceof Promise) {
2210
- return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
2211
- }
2212
- return handleCodecTxResult(result, transformed, def.out, ctx);
2213
- }
2214
- else {
2215
- const transformed = def.reverseTransform(result.value, result);
2216
- if (transformed instanceof Promise) {
2217
- return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
2218
- }
2219
- return handleCodecTxResult(result, transformed, def.in, ctx);
2220
- }
2221
- }
2222
- function handleCodecTxResult(left, value, nextSchema, ctx) {
2223
- // Check if transform added any issues
2224
- if (left.issues.length) {
2225
- left.aborted = true;
2226
- return left;
2227
- }
2228
- return nextSchema._zod.run({ value, issues: left.issues }, ctx);
2229
- }
2230
- export const $ZodPreprocess = /*@__PURE__*/ core.$constructor("$ZodPreprocess", (inst, def) => {
2231
- $ZodPipe.init(inst, def);
2232
- });
2233
- export const $ZodReadonly = /*@__PURE__*/ core.$constructor("$ZodReadonly", (inst, def) => {
2234
- $ZodType.init(inst, def);
2235
- util.defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
2236
- util.defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2237
- util.defineLazyInternal(inst, "optin", (zod) => zod.def.innerType?._zod?.optin);
2238
- util.defineLazyInternal(inst, "optout", (zod) => zod.def.innerType?._zod?.optout);
2239
- inst._zod.parse = (payload, ctx) => {
2240
- if (ctx.direction === "backward") {
2241
- return def.innerType._zod.run(payload, ctx);
2242
- }
2243
- const result = def.innerType._zod.run(payload, ctx);
2244
- if (result instanceof Promise) {
2245
- return result.then(handleReadonlyResult);
2246
- }
2247
- return handleReadonlyResult(result);
2248
- };
2249
- });
2250
- function handleReadonlyResult(payload) {
2251
- // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.
2252
- if (!payload.memo)
2253
- payload.value = Object.freeze(payload.value);
2254
- return payload;
2255
- }
2256
- export const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("$ZodTemplateLiteral", (inst, def) => {
2257
- $ZodType.init(inst, def);
2258
- const regexParts = [];
2259
- for (const part of def.parts) {
2260
- if (typeof part === "object" && part !== null) {
2261
- // is Zod schema
2262
- if (!part._zod.pattern) {
2263
- // if (!source)
2264
- throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
2265
- }
2266
- const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
2267
- if (!source)
2268
- throw new Error(`Invalid template literal part: ${part._zod.traits}`);
2269
- const start = source.startsWith("^") ? 1 : 0;
2270
- const end = source.endsWith("$") ? source.length - 1 : source.length;
2271
- regexParts.push(source.slice(start, end));
2272
- }
2273
- else if (part === null || util.primitiveTypes.has(typeof part)) {
2274
- regexParts.push(util.escapeRegex(`${part}`));
2275
- }
2276
- else {
2277
- throw new Error(`Invalid template literal part: ${part}`);
2278
- }
2279
- }
2280
- inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
2281
- inst._zod.parse = (payload, _ctx) => {
2282
- if (typeof payload.value !== "string") {
2283
- payload.issues.push({
2284
- input: payload.value,
2285
- inst,
2286
- expected: "string",
2287
- code: "invalid_type",
2288
- });
2289
- return payload;
2290
- }
2291
- inst._zod.pattern.lastIndex = 0;
2292
- if (!inst._zod.pattern.test(payload.value)) {
2293
- payload.issues.push({
2294
- input: payload.value,
2295
- inst,
2296
- code: "invalid_format",
2297
- format: def.format ?? "template_literal",
2298
- pattern: inst._zod.pattern.source,
2299
- });
2300
- return payload;
2301
- }
2302
- return payload;
2303
- };
2304
- });
2305
- export const $ZodFunction = /*@__PURE__*/ core.$constructor("$ZodFunction", (inst, def) => {
2306
- $ZodType.init(inst, def);
2307
- // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.
2308
- Object.defineProperty(inst, "_def", { value: def });
2309
- inst._zod.def = def;
2310
- inst.implement = (func) => {
2311
- if (typeof func !== "function") {
2312
- throw new Error("implement() must be called with a function");
2313
- }
2314
- // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.
2315
- return Object.defineProperty(function (...args) {
2316
- const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;
2317
- const result = Reflect.apply(func, this, parsedArgs);
2318
- if (inst._def.output) {
2319
- return parse(inst._def.output, result);
2320
- }
2321
- return result;
2322
- }, "_zod", { value: inst._zod, enumerable: false });
2323
- };
2324
- inst.implementAsync = (func) => {
2325
- if (typeof func !== "function") {
2326
- throw new Error("implementAsync() must be called with a function");
2327
- }
2328
- return Object.defineProperty(async function (...args) {
2329
- const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;
2330
- const result = await Reflect.apply(func, this, parsedArgs);
2331
- if (inst._def.output) {
2332
- return await parseAsync(inst._def.output, result);
2333
- }
2334
- return result;
2335
- }, "_zod", { value: inst._zod, enumerable: false });
2336
- };
2337
- inst._zod.parse = (payload, _ctx) => {
2338
- if (typeof payload.value !== "function") {
2339
- payload.issues.push({
2340
- code: "invalid_type",
2341
- expected: "function",
2342
- input: payload.value,
2343
- inst,
2344
- });
2345
- return payload;
2346
- }
2347
- // Check if output is a promise type to determine if we should use async implementation
2348
- const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise";
2349
- if (hasPromiseOutput) {
2350
- payload.value = inst.implementAsync(payload.value);
2351
- }
2352
- else {
2353
- payload.value = inst.implement(payload.value);
2354
- }
2355
- return payload;
2356
- };
2357
- inst.input = (...args) => {
2358
- const F = inst.constructor;
2359
- if (Array.isArray(args[0])) {
2360
- return new F({
2361
- type: "function",
2362
- input: new $ZodTuple({
2363
- type: "tuple",
2364
- items: args[0],
2365
- rest: args[1],
2366
- }),
2367
- output: inst._def.output,
2368
- });
2369
- }
2370
- return new F({
2371
- type: "function",
2372
- input: args[0],
2373
- output: inst._def.output,
2374
- });
2375
- };
2376
- inst.output = (output) => {
2377
- const F = inst.constructor;
2378
- return new F({
2379
- type: "function",
2380
- input: inst._def.input,
2381
- output,
2382
- });
2383
- };
2384
- return inst;
2385
- });
2386
- export const $ZodPromise = /*@__PURE__*/ core.$constructor("$ZodPromise", (inst, def) => {
2387
- $ZodType.init(inst, def);
2388
- inst._zod.parse = (payload, ctx) => {
2389
- return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
2390
- };
2391
- });
2392
- export const $ZodLazy = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
2393
- $ZodType.init(inst, def);
2394
- // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.
2395
- util.defineLazy(inst._zod, "innerType", () => {
2396
- const d = def;
2397
- if (!d._cachedInner)
2398
- d._cachedInner = def.getter();
2399
- return d._cachedInner;
2400
- });
2401
- util.defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
2402
- util.defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
2403
- util.defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? undefined);
2404
- util.defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? undefined);
2405
- inst._zod.parse = (payload, ctx) => {
2406
- const inner = inst._zod.innerType;
2407
- return inner._zod.run(payload, ctx);
2408
- };
2409
- });
2410
- export const $ZodCustom = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
2411
- checks.$ZodCheck.init(inst, def);
2412
- $ZodType.init(inst, def);
2413
- inst._zod.parse = (payload, _) => {
2414
- return payload;
2415
- };
2416
- inst._zod.check = (payload) => {
2417
- const input = payload.value;
2418
- const r = def.fn(input);
2419
- if (r instanceof Promise) {
2420
- return r.then((r) => handleRefineResult(r, payload, input, inst));
2421
- }
2422
- handleRefineResult(r, payload, input, inst);
2423
- return;
2424
- };
2425
- });
2426
- function handleRefineResult(result, payload, input, inst) {
2427
- if (!result) {
2428
- const _iss = {
2429
- code: "custom",
2430
- input,
2431
- inst, // incorporates params.error into issue reporting
2432
- path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
2433
- continue: !inst._zod.def.abort,
2434
- // params: inst._zod.def.params,
2435
- };
2436
- if (inst._zod.def.params)
2437
- _iss.params = inst._zod.def.params;
2438
- payload.issues.push(util.issue(_iss));
2439
- }
2440
- }