@amplitude/ai 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/.cursor/skills/instrument-with-amplitude-ai/SKILL.md +50 -0
  2. package/AGENTS.md +79 -0
  3. package/LICENSE +21 -0
  4. package/README.md +2111 -0
  5. package/bin/amplitude-ai-completions.mjs +19 -0
  6. package/bin/amplitude-ai-doctor.mjs +26 -0
  7. package/bin/amplitude-ai-init.mjs +27 -0
  8. package/bin/amplitude-ai-instrument.mjs +52 -0
  9. package/bin/amplitude-ai-mcp.mjs +8 -0
  10. package/bin/amplitude-ai-register-catalog.mjs +156 -0
  11. package/bin/amplitude-ai-status.mjs +28 -0
  12. package/bin/amplitude-ai.mjs +43 -0
  13. package/bin/validate-catalog-constants.mjs +134 -0
  14. package/data/agent_event_catalog.json +1277 -0
  15. package/dist/_virtual/rolldown_runtime.js +31 -0
  16. package/dist/bound-agent.d.ts +56 -0
  17. package/dist/bound-agent.d.ts.map +1 -0
  18. package/dist/bound-agent.js +155 -0
  19. package/dist/bound-agent.js.map +1 -0
  20. package/dist/cli/doctor.d.ts +17 -0
  21. package/dist/cli/doctor.d.ts.map +1 -0
  22. package/dist/cli/doctor.js +89 -0
  23. package/dist/cli/doctor.js.map +1 -0
  24. package/dist/cli/init.d.ts +14 -0
  25. package/dist/cli/init.d.ts.map +1 -0
  26. package/dist/cli/init.js +40 -0
  27. package/dist/cli/init.js.map +1 -0
  28. package/dist/cli/providers.d.ts +32 -0
  29. package/dist/cli/providers.d.ts.map +1 -0
  30. package/dist/cli/providers.js +46 -0
  31. package/dist/cli/providers.js.map +1 -0
  32. package/dist/cli/status.d.ts +14 -0
  33. package/dist/cli/status.d.ts.map +1 -0
  34. package/dist/cli/status.js +38 -0
  35. package/dist/cli/status.js.map +1 -0
  36. package/dist/client.d.ts +246 -0
  37. package/dist/client.d.ts.map +1 -0
  38. package/dist/client.js +369 -0
  39. package/dist/client.js.map +1 -0
  40. package/dist/config.d.ts +60 -0
  41. package/dist/config.d.ts.map +1 -0
  42. package/dist/config.js +57 -0
  43. package/dist/config.js.map +1 -0
  44. package/dist/context.d.ts +44 -0
  45. package/dist/context.d.ts.map +1 -0
  46. package/dist/context.js +53 -0
  47. package/dist/context.js.map +1 -0
  48. package/dist/core/constants.d.ts +96 -0
  49. package/dist/core/constants.d.ts.map +1 -0
  50. package/dist/core/constants.js +105 -0
  51. package/dist/core/constants.js.map +1 -0
  52. package/dist/core/enrichments.d.ts +139 -0
  53. package/dist/core/enrichments.d.ts.map +1 -0
  54. package/dist/core/enrichments.js +177 -0
  55. package/dist/core/enrichments.js.map +1 -0
  56. package/dist/core/privacy.d.ts +53 -0
  57. package/dist/core/privacy.d.ts.map +1 -0
  58. package/dist/core/privacy.js +235 -0
  59. package/dist/core/privacy.js.map +1 -0
  60. package/dist/core/tracking.d.ts +242 -0
  61. package/dist/core/tracking.d.ts.map +1 -0
  62. package/dist/core/tracking.js +469 -0
  63. package/dist/core/tracking.js.map +1 -0
  64. package/dist/decorators.d.ts +109 -0
  65. package/dist/decorators.d.ts.map +1 -0
  66. package/dist/decorators.js +281 -0
  67. package/dist/decorators.js.map +1 -0
  68. package/dist/exceptions.d.ts +19 -0
  69. package/dist/exceptions.d.ts.map +1 -0
  70. package/dist/exceptions.js +35 -0
  71. package/dist/exceptions.js.map +1 -0
  72. package/dist/index.d.ts +37 -0
  73. package/dist/index.js +38 -0
  74. package/dist/integrations/anthropic-tools.d.ts +38 -0
  75. package/dist/integrations/anthropic-tools.d.ts.map +1 -0
  76. package/dist/integrations/anthropic-tools.js +175 -0
  77. package/dist/integrations/anthropic-tools.js.map +1 -0
  78. package/dist/integrations/crewai.d.ts +14 -0
  79. package/dist/integrations/crewai.d.ts.map +1 -0
  80. package/dist/integrations/crewai.js +19 -0
  81. package/dist/integrations/crewai.js.map +1 -0
  82. package/dist/integrations/langchain.d.ts +37 -0
  83. package/dist/integrations/langchain.d.ts.map +1 -0
  84. package/dist/integrations/langchain.js +189 -0
  85. package/dist/integrations/langchain.js.map +1 -0
  86. package/dist/integrations/llamaindex.d.ts +44 -0
  87. package/dist/integrations/llamaindex.d.ts.map +1 -0
  88. package/dist/integrations/llamaindex.js +144 -0
  89. package/dist/integrations/llamaindex.js.map +1 -0
  90. package/dist/integrations/openai-agents.d.ts +35 -0
  91. package/dist/integrations/openai-agents.d.ts.map +1 -0
  92. package/dist/integrations/openai-agents.js +248 -0
  93. package/dist/integrations/openai-agents.js.map +1 -0
  94. package/dist/integrations/opentelemetry.d.ts +40 -0
  95. package/dist/integrations/opentelemetry.d.ts.map +1 -0
  96. package/dist/integrations/opentelemetry.js +146 -0
  97. package/dist/integrations/opentelemetry.js.map +1 -0
  98. package/dist/internals.d.ts +5 -0
  99. package/dist/internals.js +5 -0
  100. package/dist/mcp/contract.d.ts +27 -0
  101. package/dist/mcp/contract.d.ts.map +1 -0
  102. package/dist/mcp/contract.js +25 -0
  103. package/dist/mcp/contract.js.map +1 -0
  104. package/dist/mcp/index.d.ts +4 -0
  105. package/dist/mcp/index.js +5 -0
  106. package/dist/mcp/patterns.d.ts +11 -0
  107. package/dist/mcp/patterns.d.ts.map +1 -0
  108. package/dist/mcp/patterns.js +38 -0
  109. package/dist/mcp/patterns.js.map +1 -0
  110. package/dist/mcp/server.d.ts +10 -0
  111. package/dist/mcp/server.d.ts.map +1 -0
  112. package/dist/mcp/server.js +241 -0
  113. package/dist/mcp/server.js.map +1 -0
  114. package/dist/mcp/validate-file.d.ts +20 -0
  115. package/dist/mcp/validate-file.d.ts.map +1 -0
  116. package/dist/mcp/validate-file.js +122 -0
  117. package/dist/mcp/validate-file.js.map +1 -0
  118. package/dist/middleware.d.ts +32 -0
  119. package/dist/middleware.d.ts.map +1 -0
  120. package/dist/middleware.js +67 -0
  121. package/dist/middleware.js.map +1 -0
  122. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +54 -0
  123. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js.map +1 -0
  124. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +20 -0
  125. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js.map +1 -0
  126. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +34 -0
  127. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js.map +1 -0
  128. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +225 -0
  129. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js.map +1 -0
  130. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +22 -0
  131. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -0
  132. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +351 -0
  133. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -0
  134. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +634 -0
  135. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js.map +1 -0
  136. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +60 -0
  137. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -0
  138. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +122 -0
  139. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -0
  140. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +37 -0
  141. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js.map +1 -0
  142. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +858 -0
  143. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  144. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +32 -0
  145. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -0
  146. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +74 -0
  147. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js.map +1 -0
  148. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1262 -0
  149. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  150. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +83 -0
  151. package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js.map +1 -0
  152. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +195 -0
  153. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -0
  154. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +44 -0
  155. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -0
  156. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +88 -0
  157. package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -0
  158. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +107 -0
  159. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -0
  160. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +142 -0
  161. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  162. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +678 -0
  163. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  164. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +145 -0
  165. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  166. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +106 -0
  167. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -0
  168. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +227 -0
  169. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -0
  170. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +33 -0
  171. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -0
  172. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +22 -0
  173. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  174. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +137 -0
  175. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  176. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +65 -0
  177. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -0
  178. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +150 -0
  179. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -0
  180. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +27 -0
  181. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  182. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +52 -0
  183. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  184. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +176 -0
  185. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  186. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  187. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  188. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +437 -0
  189. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  190. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +117 -0
  191. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  192. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +76 -0
  193. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  194. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +587 -0
  195. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -0
  196. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js +22 -0
  197. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.js.map +1 -0
  198. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js +145 -0
  199. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.js.map +1 -0
  200. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -0
  201. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  202. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +29 -0
  203. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  204. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -0
  205. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  206. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js +20 -0
  207. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  208. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +61 -0
  209. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  210. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +101 -0
  211. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  212. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +34 -0
  213. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  214. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +21 -0
  215. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  216. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +94 -0
  217. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  218. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +91 -0
  219. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  220. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  221. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  222. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +64 -0
  223. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  224. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +63 -0
  225. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  226. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +39 -0
  227. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  228. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +36 -0
  229. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  230. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +56 -0
  231. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  232. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +66 -0
  233. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  234. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +22 -0
  235. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  236. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +57 -0
  237. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  238. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -0
  239. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  240. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +22 -0
  241. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  242. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +134 -0
  243. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  244. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +19 -0
  245. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  246. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -0
  247. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  248. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +116 -0
  249. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  250. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +106 -0
  251. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  252. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +18 -0
  253. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  254. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +31 -0
  255. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  256. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +97 -0
  257. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  258. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +15 -0
  259. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  260. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +27 -0
  261. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  262. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +32 -0
  263. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  264. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +54 -0
  265. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  266. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +53 -0
  267. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  268. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +33 -0
  269. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  270. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +38 -0
  271. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  272. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +52 -0
  273. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  274. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +33 -0
  275. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  276. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +32 -0
  277. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  278. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +43 -0
  279. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  280. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +77 -0
  281. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  282. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +75 -0
  283. package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  284. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +37 -0
  285. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
  286. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +240 -0
  287. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js.map +1 -0
  288. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +194 -0
  289. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js.map +1 -0
  290. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +286 -0
  291. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js.map +1 -0
  292. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +82 -0
  293. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -0
  294. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js +37 -0
  295. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -0
  296. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js +30 -0
  297. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js.map +1 -0
  298. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +16 -0
  299. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js.map +1 -0
  300. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +10 -0
  301. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js.map +1 -0
  302. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js +57 -0
  303. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js.map +1 -0
  304. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +17 -0
  305. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js.map +1 -0
  306. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +23 -0
  307. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js.map +1 -0
  308. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +36 -0
  309. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js.map +1 -0
  310. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +8 -0
  311. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js.map +1 -0
  312. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +10 -0
  313. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js.map +1 -0
  314. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +10 -0
  315. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js.map +1 -0
  316. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +39 -0
  317. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js.map +1 -0
  318. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +13 -0
  319. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js.map +1 -0
  320. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +11 -0
  321. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js.map +1 -0
  322. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +11 -0
  323. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js.map +1 -0
  324. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +47 -0
  325. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js.map +1 -0
  326. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +17 -0
  327. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js.map +1 -0
  328. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +38 -0
  329. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js.map +1 -0
  330. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  331. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js.map +1 -0
  332. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +13 -0
  333. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js.map +1 -0
  334. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +11 -0
  335. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js.map +1 -0
  336. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +46 -0
  337. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js.map +1 -0
  338. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +37 -0
  339. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js.map +1 -0
  340. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +64 -0
  341. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js.map +1 -0
  342. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  343. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js.map +1 -0
  344. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +27 -0
  345. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js.map +1 -0
  346. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +10 -0
  347. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js.map +1 -0
  348. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +10 -0
  349. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js.map +1 -0
  350. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +56 -0
  351. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js.map +1 -0
  352. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +21 -0
  353. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js.map +1 -0
  354. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +250 -0
  355. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js.map +1 -0
  356. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +38 -0
  357. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js.map +1 -0
  358. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +10 -0
  359. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js.map +1 -0
  360. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +64 -0
  361. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js.map +1 -0
  362. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +10 -0
  363. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js.map +1 -0
  364. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js +78 -0
  365. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js.map +1 -0
  366. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +70 -0
  367. package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js.map +1 -0
  368. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +104 -0
  369. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js.map +1 -0
  370. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +11 -0
  371. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js.map +1 -0
  372. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +10 -0
  373. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js.map +1 -0
  374. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +110 -0
  375. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js.map +1 -0
  376. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +99 -0
  377. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js.map +1 -0
  378. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +84 -0
  379. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js.map +1 -0
  380. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +3160 -0
  381. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js.map +1 -0
  382. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js +23 -0
  383. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/errors.js.map +1 -0
  384. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js +38 -0
  385. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/iso.js.map +1 -0
  386. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js +12 -0
  387. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/parse.js.map +1 -0
  388. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js +611 -0
  389. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/schemas.js.map +1 -0
  390. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js +437 -0
  391. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js.map +1 -0
  392. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js +360 -0
  393. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js.map +1 -0
  394. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js +50 -0
  395. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js.map +1 -0
  396. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js +34 -0
  397. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/doc.js.map +1 -0
  398. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js +71 -0
  399. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js.map +1 -0
  400. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js +74 -0
  401. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js.map +1 -0
  402. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js +63 -0
  403. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/regexes.js.map +1 -0
  404. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js +50 -0
  405. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/registries.js.map +1 -0
  406. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js +1098 -0
  407. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js.map +1 -0
  408. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js +599 -0
  409. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  410. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js +267 -0
  411. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js.map +1 -0
  412. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js +10 -0
  413. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/versions.js.map +1 -0
  414. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js +50 -0
  415. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/mini/schemas.js.map +1 -0
  416. package/dist/patching.d.ts +59 -0
  417. package/dist/patching.d.ts.map +1 -0
  418. package/dist/patching.js +891 -0
  419. package/dist/patching.js.map +1 -0
  420. package/dist/propagation.d.ts +8 -0
  421. package/dist/propagation.d.ts.map +1 -0
  422. package/dist/propagation.js +46 -0
  423. package/dist/propagation.js.map +1 -0
  424. package/dist/providers/anthropic.d.ts +44 -0
  425. package/dist/providers/anthropic.d.ts.map +1 -0
  426. package/dist/providers/anthropic.js +287 -0
  427. package/dist/providers/anthropic.js.map +1 -0
  428. package/dist/providers/azure-openai.d.ts +32 -0
  429. package/dist/providers/azure-openai.d.ts.map +1 -0
  430. package/dist/providers/azure-openai.js +39 -0
  431. package/dist/providers/azure-openai.js.map +1 -0
  432. package/dist/providers/base.d.ts +70 -0
  433. package/dist/providers/base.d.ts.map +1 -0
  434. package/dist/providers/base.js +141 -0
  435. package/dist/providers/base.js.map +1 -0
  436. package/dist/providers/bedrock.d.ts +41 -0
  437. package/dist/providers/bedrock.d.ts.map +1 -0
  438. package/dist/providers/bedrock.js +229 -0
  439. package/dist/providers/bedrock.js.map +1 -0
  440. package/dist/providers/gemini.d.ts +34 -0
  441. package/dist/providers/gemini.d.ts.map +1 -0
  442. package/dist/providers/gemini.js +225 -0
  443. package/dist/providers/gemini.js.map +1 -0
  444. package/dist/providers/mistral.d.ts +32 -0
  445. package/dist/providers/mistral.d.ts.map +1 -0
  446. package/dist/providers/mistral.js +218 -0
  447. package/dist/providers/mistral.js.map +1 -0
  448. package/dist/providers/openai.d.ts +61 -0
  449. package/dist/providers/openai.d.ts.map +1 -0
  450. package/dist/providers/openai.js +530 -0
  451. package/dist/providers/openai.js.map +1 -0
  452. package/dist/register.d.ts +1 -0
  453. package/dist/register.js +46 -0
  454. package/dist/register.js.map +1 -0
  455. package/dist/session.d.ts +46 -0
  456. package/dist/session.d.ts.map +1 -0
  457. package/dist/session.js +144 -0
  458. package/dist/session.js.map +1 -0
  459. package/dist/tenant.d.ts +30 -0
  460. package/dist/tenant.d.ts.map +1 -0
  461. package/dist/tenant.js +23 -0
  462. package/dist/tenant.js.map +1 -0
  463. package/dist/testing.d.ts +46 -0
  464. package/dist/testing.d.ts.map +1 -0
  465. package/dist/testing.js +120 -0
  466. package/dist/testing.js.map +1 -0
  467. package/dist/types.d.ts +384 -0
  468. package/dist/types.d.ts.map +1 -0
  469. package/dist/types.js +13 -0
  470. package/dist/types.js.map +1 -0
  471. package/dist/utils/costs.d.ts +27 -0
  472. package/dist/utils/costs.d.ts.map +1 -0
  473. package/dist/utils/costs.js +63 -0
  474. package/dist/utils/costs.js.map +1 -0
  475. package/dist/utils/debug.d.ts +6 -0
  476. package/dist/utils/debug.d.ts.map +1 -0
  477. package/dist/utils/debug.js +73 -0
  478. package/dist/utils/debug.js.map +1 -0
  479. package/dist/utils/logger.d.ts +11 -0
  480. package/dist/utils/logger.d.ts.map +1 -0
  481. package/dist/utils/logger.js +18 -0
  482. package/dist/utils/logger.js.map +1 -0
  483. package/dist/utils/model-tiers.d.ts +8 -0
  484. package/dist/utils/model-tiers.d.ts.map +1 -0
  485. package/dist/utils/model-tiers.js +76 -0
  486. package/dist/utils/model-tiers.js.map +1 -0
  487. package/dist/utils/providers.d.ts +5 -0
  488. package/dist/utils/providers.d.ts.map +1 -0
  489. package/dist/utils/providers.js +20 -0
  490. package/dist/utils/providers.js.map +1 -0
  491. package/dist/utils/resolve-module.d.ts +5 -0
  492. package/dist/utils/resolve-module.d.ts.map +1 -0
  493. package/dist/utils/resolve-module.js +29 -0
  494. package/dist/utils/resolve-module.js.map +1 -0
  495. package/dist/utils/streaming.d.ts +55 -0
  496. package/dist/utils/streaming.d.ts.map +1 -0
  497. package/dist/utils/streaming.js +72 -0
  498. package/dist/utils/streaming.js.map +1 -0
  499. package/dist/utils/tokens.d.ts +16 -0
  500. package/dist/utils/tokens.d.ts.map +1 -0
  501. package/dist/utils/tokens.js +80 -0
  502. package/dist/utils/tokens.js.map +1 -0
  503. package/dist/wrappers.d.ts +37 -0
  504. package/dist/wrappers.d.ts.map +1 -0
  505. package/dist/wrappers.js +61 -0
  506. package/dist/wrappers.js.map +1 -0
  507. package/llms-full.txt +127 -0
  508. package/llms.txt +28 -0
  509. package/mcp.schema.json +18 -0
  510. package/package.json +189 -0
@@ -0,0 +1,1098 @@
1
+ import { $ZodAsyncError, $constructor, config, globalConfig } from "./core.js";
2
+ import { aborted, allowsEval, cached, cleanRegex, clone, defineLazy, esc, escapeRegex, finalizeIssue, getEnumValues, isObject, isPlainObject, issue, optionalKeys, prefixIssues, propertyKeyTypes } from "./util.js";
3
+ import { safeParse, safeParseAsync } from "./parse.js";
4
+ import { _null, base64, base64url, boolean, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, hostname, ipv4, ipv6, ksuid, nanoid, number, string, time, ulid, uuid, xid } from "./regexes.js";
5
+ import { $ZodCheck, $ZodCheckNumberFormat, $ZodCheckStringFormat } from "./checks.js";
6
+ import { Doc } from "./doc.js";
7
+ import { version } from "./versions.js";
8
+
9
+ //#region node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/schemas.js
10
+ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
11
+ var _a;
12
+ inst ?? (inst = {});
13
+ inst._zod.def = def;
14
+ inst._zod.bag = inst._zod.bag || {};
15
+ inst._zod.version = version;
16
+ const checks = [...inst._zod.def.checks ?? []];
17
+ if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
18
+ for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
19
+ if (checks.length === 0) {
20
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
21
+ inst._zod.deferred?.push(() => {
22
+ inst._zod.run = inst._zod.parse;
23
+ });
24
+ } else {
25
+ const runChecks = (payload, checks$1, ctx) => {
26
+ let isAborted = aborted(payload);
27
+ let asyncResult;
28
+ for (const ch of checks$1) {
29
+ if (ch._zod.def.when) {
30
+ if (!ch._zod.def.when(payload)) continue;
31
+ } else if (isAborted) continue;
32
+ const currLen = payload.issues.length;
33
+ const _ = ch._zod.check(payload);
34
+ if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
35
+ if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
36
+ await _;
37
+ if (payload.issues.length === currLen) return;
38
+ if (!isAborted) isAborted = aborted(payload, currLen);
39
+ });
40
+ else {
41
+ if (payload.issues.length === currLen) continue;
42
+ if (!isAborted) isAborted = aborted(payload, currLen);
43
+ }
44
+ }
45
+ if (asyncResult) return asyncResult.then(() => {
46
+ return payload;
47
+ });
48
+ return payload;
49
+ };
50
+ inst._zod.run = (payload, ctx) => {
51
+ const result = inst._zod.parse(payload, ctx);
52
+ if (result instanceof Promise) {
53
+ if (ctx.async === false) throw new $ZodAsyncError();
54
+ return result.then((result$1) => runChecks(result$1, checks, ctx));
55
+ }
56
+ return runChecks(result, checks, ctx);
57
+ };
58
+ }
59
+ inst["~standard"] = {
60
+ validate: (value) => {
61
+ try {
62
+ const r = safeParse(inst, value);
63
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
64
+ } catch (_) {
65
+ return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
66
+ }
67
+ },
68
+ vendor: "zod",
69
+ version: 1
70
+ };
71
+ });
72
+ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
73
+ $ZodType.init(inst, def);
74
+ inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
75
+ inst._zod.parse = (payload, _) => {
76
+ if (def.coerce) try {
77
+ payload.value = String(payload.value);
78
+ } catch (_$1) {}
79
+ if (typeof payload.value === "string") return payload;
80
+ payload.issues.push({
81
+ expected: "string",
82
+ code: "invalid_type",
83
+ input: payload.value,
84
+ inst
85
+ });
86
+ return payload;
87
+ };
88
+ });
89
+ const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
90
+ $ZodCheckStringFormat.init(inst, def);
91
+ $ZodString.init(inst, def);
92
+ });
93
+ const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
94
+ def.pattern ?? (def.pattern = guid);
95
+ $ZodStringFormat.init(inst, def);
96
+ });
97
+ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
98
+ if (def.version) {
99
+ const v = {
100
+ v1: 1,
101
+ v2: 2,
102
+ v3: 3,
103
+ v4: 4,
104
+ v5: 5,
105
+ v6: 6,
106
+ v7: 7,
107
+ v8: 8
108
+ }[def.version];
109
+ if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
110
+ def.pattern ?? (def.pattern = uuid(v));
111
+ } else def.pattern ?? (def.pattern = uuid());
112
+ $ZodStringFormat.init(inst, def);
113
+ });
114
+ const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
115
+ def.pattern ?? (def.pattern = email);
116
+ $ZodStringFormat.init(inst, def);
117
+ });
118
+ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
119
+ $ZodStringFormat.init(inst, def);
120
+ inst._zod.check = (payload) => {
121
+ try {
122
+ const orig = payload.value;
123
+ const url = new URL(orig);
124
+ const href = url.href;
125
+ if (def.hostname) {
126
+ def.hostname.lastIndex = 0;
127
+ if (!def.hostname.test(url.hostname)) payload.issues.push({
128
+ code: "invalid_format",
129
+ format: "url",
130
+ note: "Invalid hostname",
131
+ pattern: hostname.source,
132
+ input: payload.value,
133
+ inst,
134
+ continue: !def.abort
135
+ });
136
+ }
137
+ if (def.protocol) {
138
+ def.protocol.lastIndex = 0;
139
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({
140
+ code: "invalid_format",
141
+ format: "url",
142
+ note: "Invalid protocol",
143
+ pattern: def.protocol.source,
144
+ input: payload.value,
145
+ inst,
146
+ continue: !def.abort
147
+ });
148
+ }
149
+ if (!orig.endsWith("/") && href.endsWith("/")) payload.value = href.slice(0, -1);
150
+ else payload.value = href;
151
+ return;
152
+ } catch (_) {
153
+ payload.issues.push({
154
+ code: "invalid_format",
155
+ format: "url",
156
+ input: payload.value,
157
+ inst,
158
+ continue: !def.abort
159
+ });
160
+ }
161
+ };
162
+ });
163
+ const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
164
+ def.pattern ?? (def.pattern = emoji());
165
+ $ZodStringFormat.init(inst, def);
166
+ });
167
+ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
168
+ def.pattern ?? (def.pattern = nanoid);
169
+ $ZodStringFormat.init(inst, def);
170
+ });
171
+ const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
172
+ def.pattern ?? (def.pattern = cuid);
173
+ $ZodStringFormat.init(inst, def);
174
+ });
175
+ const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
176
+ def.pattern ?? (def.pattern = cuid2);
177
+ $ZodStringFormat.init(inst, def);
178
+ });
179
+ const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
180
+ def.pattern ?? (def.pattern = ulid);
181
+ $ZodStringFormat.init(inst, def);
182
+ });
183
+ const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
184
+ def.pattern ?? (def.pattern = xid);
185
+ $ZodStringFormat.init(inst, def);
186
+ });
187
+ const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
188
+ def.pattern ?? (def.pattern = ksuid);
189
+ $ZodStringFormat.init(inst, def);
190
+ });
191
+ const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
192
+ def.pattern ?? (def.pattern = datetime(def));
193
+ $ZodStringFormat.init(inst, def);
194
+ });
195
+ const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
196
+ def.pattern ?? (def.pattern = date);
197
+ $ZodStringFormat.init(inst, def);
198
+ });
199
+ const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
200
+ def.pattern ?? (def.pattern = time(def));
201
+ $ZodStringFormat.init(inst, def);
202
+ });
203
+ const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
204
+ def.pattern ?? (def.pattern = duration);
205
+ $ZodStringFormat.init(inst, def);
206
+ });
207
+ const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
208
+ def.pattern ?? (def.pattern = ipv4);
209
+ $ZodStringFormat.init(inst, def);
210
+ inst._zod.onattach.push((inst$1) => {
211
+ const bag = inst$1._zod.bag;
212
+ bag.format = `ipv4`;
213
+ });
214
+ });
215
+ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
216
+ def.pattern ?? (def.pattern = ipv6);
217
+ $ZodStringFormat.init(inst, def);
218
+ inst._zod.onattach.push((inst$1) => {
219
+ const bag = inst$1._zod.bag;
220
+ bag.format = `ipv6`;
221
+ });
222
+ inst._zod.check = (payload) => {
223
+ try {
224
+ new URL(`http://[${payload.value}]`);
225
+ } catch {
226
+ payload.issues.push({
227
+ code: "invalid_format",
228
+ format: "ipv6",
229
+ input: payload.value,
230
+ inst,
231
+ continue: !def.abort
232
+ });
233
+ }
234
+ };
235
+ });
236
+ const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
237
+ def.pattern ?? (def.pattern = cidrv4);
238
+ $ZodStringFormat.init(inst, def);
239
+ });
240
+ const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
241
+ def.pattern ?? (def.pattern = cidrv6);
242
+ $ZodStringFormat.init(inst, def);
243
+ inst._zod.check = (payload) => {
244
+ const [address, prefix] = payload.value.split("/");
245
+ try {
246
+ if (!prefix) throw new Error();
247
+ const prefixNum = Number(prefix);
248
+ if (`${prefixNum}` !== prefix) throw new Error();
249
+ if (prefixNum < 0 || prefixNum > 128) throw new Error();
250
+ new URL(`http://[${address}]`);
251
+ } catch {
252
+ payload.issues.push({
253
+ code: "invalid_format",
254
+ format: "cidrv6",
255
+ input: payload.value,
256
+ inst,
257
+ continue: !def.abort
258
+ });
259
+ }
260
+ };
261
+ });
262
+ function isValidBase64(data) {
263
+ if (data === "") return true;
264
+ if (data.length % 4 !== 0) return false;
265
+ try {
266
+ atob(data);
267
+ return true;
268
+ } catch {
269
+ return false;
270
+ }
271
+ }
272
+ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
273
+ def.pattern ?? (def.pattern = base64);
274
+ $ZodStringFormat.init(inst, def);
275
+ inst._zod.onattach.push((inst$1) => {
276
+ inst$1._zod.bag.contentEncoding = "base64";
277
+ });
278
+ inst._zod.check = (payload) => {
279
+ if (isValidBase64(payload.value)) return;
280
+ payload.issues.push({
281
+ code: "invalid_format",
282
+ format: "base64",
283
+ input: payload.value,
284
+ inst,
285
+ continue: !def.abort
286
+ });
287
+ };
288
+ });
289
+ function isValidBase64URL(data) {
290
+ if (!base64url.test(data)) return false;
291
+ const base64$1 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
292
+ return isValidBase64(base64$1.padEnd(Math.ceil(base64$1.length / 4) * 4, "="));
293
+ }
294
+ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
295
+ def.pattern ?? (def.pattern = base64url);
296
+ $ZodStringFormat.init(inst, def);
297
+ inst._zod.onattach.push((inst$1) => {
298
+ inst$1._zod.bag.contentEncoding = "base64url";
299
+ });
300
+ inst._zod.check = (payload) => {
301
+ if (isValidBase64URL(payload.value)) return;
302
+ payload.issues.push({
303
+ code: "invalid_format",
304
+ format: "base64url",
305
+ input: payload.value,
306
+ inst,
307
+ continue: !def.abort
308
+ });
309
+ };
310
+ });
311
+ const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
312
+ def.pattern ?? (def.pattern = e164);
313
+ $ZodStringFormat.init(inst, def);
314
+ });
315
+ function isValidJWT(token, algorithm = null) {
316
+ try {
317
+ const tokensParts = token.split(".");
318
+ if (tokensParts.length !== 3) return false;
319
+ const [header] = tokensParts;
320
+ if (!header) return false;
321
+ const parsedHeader = JSON.parse(atob(header));
322
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
323
+ if (!parsedHeader.alg) return false;
324
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
325
+ return true;
326
+ } catch {
327
+ return false;
328
+ }
329
+ }
330
+ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
331
+ $ZodStringFormat.init(inst, def);
332
+ inst._zod.check = (payload) => {
333
+ if (isValidJWT(payload.value, def.alg)) return;
334
+ payload.issues.push({
335
+ code: "invalid_format",
336
+ format: "jwt",
337
+ input: payload.value,
338
+ inst,
339
+ continue: !def.abort
340
+ });
341
+ };
342
+ });
343
+ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
344
+ $ZodType.init(inst, def);
345
+ inst._zod.pattern = inst._zod.bag.pattern ?? number;
346
+ inst._zod.parse = (payload, _ctx) => {
347
+ if (def.coerce) try {
348
+ payload.value = Number(payload.value);
349
+ } catch (_) {}
350
+ const input = payload.value;
351
+ if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
352
+ const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
353
+ payload.issues.push({
354
+ expected: "number",
355
+ code: "invalid_type",
356
+ input,
357
+ inst,
358
+ ...received ? { received } : {}
359
+ });
360
+ return payload;
361
+ };
362
+ });
363
+ const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
364
+ $ZodCheckNumberFormat.init(inst, def);
365
+ $ZodNumber.init(inst, def);
366
+ });
367
+ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
368
+ $ZodType.init(inst, def);
369
+ inst._zod.pattern = boolean;
370
+ inst._zod.parse = (payload, _ctx) => {
371
+ if (def.coerce) try {
372
+ payload.value = Boolean(payload.value);
373
+ } catch (_) {}
374
+ const input = payload.value;
375
+ if (typeof input === "boolean") return payload;
376
+ payload.issues.push({
377
+ expected: "boolean",
378
+ code: "invalid_type",
379
+ input,
380
+ inst
381
+ });
382
+ return payload;
383
+ };
384
+ });
385
+ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
386
+ $ZodType.init(inst, def);
387
+ inst._zod.pattern = _null;
388
+ inst._zod.values = new Set([null]);
389
+ inst._zod.parse = (payload, _ctx) => {
390
+ const input = payload.value;
391
+ if (input === null) return payload;
392
+ payload.issues.push({
393
+ expected: "null",
394
+ code: "invalid_type",
395
+ input,
396
+ inst
397
+ });
398
+ return payload;
399
+ };
400
+ });
401
+ const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
402
+ $ZodType.init(inst, def);
403
+ inst._zod.parse = (payload) => payload;
404
+ });
405
+ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
406
+ $ZodType.init(inst, def);
407
+ inst._zod.parse = (payload, _ctx) => {
408
+ payload.issues.push({
409
+ expected: "never",
410
+ code: "invalid_type",
411
+ input: payload.value,
412
+ inst
413
+ });
414
+ return payload;
415
+ };
416
+ });
417
+ function handleArrayResult(result, final, index) {
418
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
419
+ final.value[index] = result.value;
420
+ }
421
+ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
422
+ $ZodType.init(inst, def);
423
+ inst._zod.parse = (payload, ctx) => {
424
+ const input = payload.value;
425
+ if (!Array.isArray(input)) {
426
+ payload.issues.push({
427
+ expected: "array",
428
+ code: "invalid_type",
429
+ input,
430
+ inst
431
+ });
432
+ return payload;
433
+ }
434
+ payload.value = Array(input.length);
435
+ const proms = [];
436
+ for (let i = 0; i < input.length; i++) {
437
+ const item = input[i];
438
+ const result = def.element._zod.run({
439
+ value: item,
440
+ issues: []
441
+ }, ctx);
442
+ if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
443
+ else handleArrayResult(result, payload, i);
444
+ }
445
+ if (proms.length) return Promise.all(proms).then(() => payload);
446
+ return payload;
447
+ };
448
+ });
449
+ function handleObjectResult(result, final, key) {
450
+ if (result.issues.length) final.issues.push(...prefixIssues(key, result.issues));
451
+ final.value[key] = result.value;
452
+ }
453
+ function handleOptionalObjectResult(result, final, key, input) {
454
+ if (result.issues.length) if (input[key] === void 0) if (key in input) final.value[key] = void 0;
455
+ else final.value[key] = result.value;
456
+ else final.issues.push(...prefixIssues(key, result.issues));
457
+ else if (result.value === void 0) {
458
+ if (key in input) final.value[key] = void 0;
459
+ } else final.value[key] = result.value;
460
+ }
461
+ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
462
+ $ZodType.init(inst, def);
463
+ const _normalized = cached(() => {
464
+ const keys = Object.keys(def.shape);
465
+ for (const k of keys) if (!(def.shape[k] instanceof $ZodType)) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
466
+ const okeys = optionalKeys(def.shape);
467
+ return {
468
+ shape: def.shape,
469
+ keys,
470
+ keySet: new Set(keys),
471
+ numKeys: keys.length,
472
+ optionalKeys: new Set(okeys)
473
+ };
474
+ });
475
+ defineLazy(inst._zod, "propValues", () => {
476
+ const shape = def.shape;
477
+ const propValues = {};
478
+ for (const key in shape) {
479
+ const field = shape[key]._zod;
480
+ if (field.values) {
481
+ propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
482
+ for (const v of field.values) propValues[key].add(v);
483
+ }
484
+ }
485
+ return propValues;
486
+ });
487
+ const generateFastpass = (shape) => {
488
+ const doc = new Doc([
489
+ "shape",
490
+ "payload",
491
+ "ctx"
492
+ ]);
493
+ const normalized = _normalized.value;
494
+ const parseStr = (key) => {
495
+ const k = esc(key);
496
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
497
+ };
498
+ doc.write(`const input = payload.value;`);
499
+ const ids = Object.create(null);
500
+ let counter = 0;
501
+ for (const key of normalized.keys) ids[key] = `key_${counter++}`;
502
+ doc.write(`const newResult = {}`);
503
+ for (const key of normalized.keys) if (normalized.optionalKeys.has(key)) {
504
+ const id = ids[key];
505
+ doc.write(`const ${id} = ${parseStr(key)};`);
506
+ const k = esc(key);
507
+ doc.write(`
508
+ if (${id}.issues.length) {
509
+ if (input[${k}] === undefined) {
510
+ if (${k} in input) {
511
+ newResult[${k}] = undefined;
512
+ }
513
+ } else {
514
+ payload.issues = payload.issues.concat(
515
+ ${id}.issues.map((iss) => ({
516
+ ...iss,
517
+ path: iss.path ? [${k}, ...iss.path] : [${k}],
518
+ }))
519
+ );
520
+ }
521
+ } else if (${id}.value === undefined) {
522
+ if (${k} in input) newResult[${k}] = undefined;
523
+ } else {
524
+ newResult[${k}] = ${id}.value;
525
+ }
526
+ `);
527
+ } else {
528
+ const id = ids[key];
529
+ doc.write(`const ${id} = ${parseStr(key)};`);
530
+ doc.write(`
531
+ if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
532
+ ...iss,
533
+ path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
534
+ })));`);
535
+ doc.write(`newResult[${esc(key)}] = ${id}.value`);
536
+ }
537
+ doc.write(`payload.value = newResult;`);
538
+ doc.write(`return payload;`);
539
+ const fn = doc.compile();
540
+ return (payload, ctx) => fn(shape, payload, ctx);
541
+ };
542
+ let fastpass;
543
+ const isObject$1 = isObject;
544
+ const jit = !globalConfig.jitless;
545
+ const allowsEval$1 = allowsEval;
546
+ const fastEnabled = jit && allowsEval$1.value;
547
+ const catchall = def.catchall;
548
+ let value;
549
+ inst._zod.parse = (payload, ctx) => {
550
+ value ?? (value = _normalized.value);
551
+ const input = payload.value;
552
+ if (!isObject$1(input)) {
553
+ payload.issues.push({
554
+ expected: "object",
555
+ code: "invalid_type",
556
+ input,
557
+ inst
558
+ });
559
+ return payload;
560
+ }
561
+ const proms = [];
562
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
563
+ if (!fastpass) fastpass = generateFastpass(def.shape);
564
+ payload = fastpass(payload, ctx);
565
+ } else {
566
+ payload.value = {};
567
+ const shape = value.shape;
568
+ for (const key of value.keys) {
569
+ const el = shape[key];
570
+ const r = el._zod.run({
571
+ value: input[key],
572
+ issues: []
573
+ }, ctx);
574
+ const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
575
+ if (r instanceof Promise) proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
576
+ else if (isOptional) handleOptionalObjectResult(r, payload, key, input);
577
+ else handleObjectResult(r, payload, key);
578
+ }
579
+ }
580
+ if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
581
+ const unrecognized = [];
582
+ const keySet = value.keySet;
583
+ const _catchall = catchall._zod;
584
+ const t = _catchall.def.type;
585
+ for (const key of Object.keys(input)) {
586
+ if (keySet.has(key)) continue;
587
+ if (t === "never") {
588
+ unrecognized.push(key);
589
+ continue;
590
+ }
591
+ const r = _catchall.run({
592
+ value: input[key],
593
+ issues: []
594
+ }, ctx);
595
+ if (r instanceof Promise) proms.push(r.then((r$1) => handleObjectResult(r$1, payload, key)));
596
+ else handleObjectResult(r, payload, key);
597
+ }
598
+ if (unrecognized.length) payload.issues.push({
599
+ code: "unrecognized_keys",
600
+ keys: unrecognized,
601
+ input,
602
+ inst
603
+ });
604
+ if (!proms.length) return payload;
605
+ return Promise.all(proms).then(() => {
606
+ return payload;
607
+ });
608
+ };
609
+ });
610
+ function handleUnionResults(results, final, inst, ctx) {
611
+ for (const result of results) if (result.issues.length === 0) {
612
+ final.value = result.value;
613
+ return final;
614
+ }
615
+ final.issues.push({
616
+ code: "invalid_union",
617
+ input: final.value,
618
+ inst,
619
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
620
+ });
621
+ return final;
622
+ }
623
+ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
624
+ $ZodType.init(inst, def);
625
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
626
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
627
+ defineLazy(inst._zod, "values", () => {
628
+ if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
629
+ });
630
+ defineLazy(inst._zod, "pattern", () => {
631
+ if (def.options.every((o) => o._zod.pattern)) {
632
+ const patterns = def.options.map((o) => o._zod.pattern);
633
+ return /* @__PURE__ */ new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
634
+ }
635
+ });
636
+ inst._zod.parse = (payload, ctx) => {
637
+ let async = false;
638
+ const results = [];
639
+ for (const option of def.options) {
640
+ const result = option._zod.run({
641
+ value: payload.value,
642
+ issues: []
643
+ }, ctx);
644
+ if (result instanceof Promise) {
645
+ results.push(result);
646
+ async = true;
647
+ } else {
648
+ if (result.issues.length === 0) return result;
649
+ results.push(result);
650
+ }
651
+ }
652
+ if (!async) return handleUnionResults(results, payload, inst, ctx);
653
+ return Promise.all(results).then((results$1) => {
654
+ return handleUnionResults(results$1, payload, inst, ctx);
655
+ });
656
+ };
657
+ });
658
+ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
659
+ $ZodUnion.init(inst, def);
660
+ const _super = inst._zod.parse;
661
+ defineLazy(inst._zod, "propValues", () => {
662
+ const propValues = {};
663
+ for (const option of def.options) {
664
+ const pv = option._zod.propValues;
665
+ if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
666
+ for (const [k, v] of Object.entries(pv)) {
667
+ if (!propValues[k]) propValues[k] = /* @__PURE__ */ new Set();
668
+ for (const val of v) propValues[k].add(val);
669
+ }
670
+ }
671
+ return propValues;
672
+ });
673
+ const disc = cached(() => {
674
+ const opts = def.options;
675
+ const map = /* @__PURE__ */ new Map();
676
+ for (const o of opts) {
677
+ const values = o._zod.propValues[def.discriminator];
678
+ if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
679
+ for (const v of values) {
680
+ if (map.has(v)) throw new Error(`Duplicate discriminator value "${String(v)}"`);
681
+ map.set(v, o);
682
+ }
683
+ }
684
+ return map;
685
+ });
686
+ inst._zod.parse = (payload, ctx) => {
687
+ const input = payload.value;
688
+ if (!isObject(input)) {
689
+ payload.issues.push({
690
+ code: "invalid_type",
691
+ expected: "object",
692
+ input,
693
+ inst
694
+ });
695
+ return payload;
696
+ }
697
+ const opt = disc.value.get(input?.[def.discriminator]);
698
+ if (opt) return opt._zod.run(payload, ctx);
699
+ if (def.unionFallback) return _super(payload, ctx);
700
+ payload.issues.push({
701
+ code: "invalid_union",
702
+ errors: [],
703
+ note: "No matching discriminator",
704
+ input,
705
+ path: [def.discriminator],
706
+ inst
707
+ });
708
+ return payload;
709
+ };
710
+ });
711
+ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
712
+ $ZodType.init(inst, def);
713
+ inst._zod.parse = (payload, ctx) => {
714
+ const input = payload.value;
715
+ const left = def.left._zod.run({
716
+ value: input,
717
+ issues: []
718
+ }, ctx);
719
+ const right = def.right._zod.run({
720
+ value: input,
721
+ issues: []
722
+ }, ctx);
723
+ if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left$1, right$1]) => {
724
+ return handleIntersectionResults(payload, left$1, right$1);
725
+ });
726
+ return handleIntersectionResults(payload, left, right);
727
+ };
728
+ });
729
+ function mergeValues(a, b) {
730
+ if (a === b) return {
731
+ valid: true,
732
+ data: a
733
+ };
734
+ if (a instanceof Date && b instanceof Date && +a === +b) return {
735
+ valid: true,
736
+ data: a
737
+ };
738
+ if (isPlainObject(a) && isPlainObject(b)) {
739
+ const bKeys = Object.keys(b);
740
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
741
+ const newObj = {
742
+ ...a,
743
+ ...b
744
+ };
745
+ for (const key of sharedKeys) {
746
+ const sharedValue = mergeValues(a[key], b[key]);
747
+ if (!sharedValue.valid) return {
748
+ valid: false,
749
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
750
+ };
751
+ newObj[key] = sharedValue.data;
752
+ }
753
+ return {
754
+ valid: true,
755
+ data: newObj
756
+ };
757
+ }
758
+ if (Array.isArray(a) && Array.isArray(b)) {
759
+ if (a.length !== b.length) return {
760
+ valid: false,
761
+ mergeErrorPath: []
762
+ };
763
+ const newArray = [];
764
+ for (let index = 0; index < a.length; index++) {
765
+ const itemA = a[index];
766
+ const itemB = b[index];
767
+ const sharedValue = mergeValues(itemA, itemB);
768
+ if (!sharedValue.valid) return {
769
+ valid: false,
770
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
771
+ };
772
+ newArray.push(sharedValue.data);
773
+ }
774
+ return {
775
+ valid: true,
776
+ data: newArray
777
+ };
778
+ }
779
+ return {
780
+ valid: false,
781
+ mergeErrorPath: []
782
+ };
783
+ }
784
+ function handleIntersectionResults(result, left, right) {
785
+ if (left.issues.length) result.issues.push(...left.issues);
786
+ if (right.issues.length) result.issues.push(...right.issues);
787
+ if (aborted(result)) return result;
788
+ const merged = mergeValues(left.value, right.value);
789
+ if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
790
+ result.value = merged.data;
791
+ return result;
792
+ }
793
+ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
794
+ $ZodType.init(inst, def);
795
+ inst._zod.parse = (payload, ctx) => {
796
+ const input = payload.value;
797
+ if (!isPlainObject(input)) {
798
+ payload.issues.push({
799
+ expected: "record",
800
+ code: "invalid_type",
801
+ input,
802
+ inst
803
+ });
804
+ return payload;
805
+ }
806
+ const proms = [];
807
+ if (def.keyType._zod.values) {
808
+ const values = def.keyType._zod.values;
809
+ payload.value = {};
810
+ for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
811
+ const result = def.valueType._zod.run({
812
+ value: input[key],
813
+ issues: []
814
+ }, ctx);
815
+ if (result instanceof Promise) proms.push(result.then((result$1) => {
816
+ if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
817
+ payload.value[key] = result$1.value;
818
+ }));
819
+ else {
820
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
821
+ payload.value[key] = result.value;
822
+ }
823
+ }
824
+ let unrecognized;
825
+ for (const key in input) if (!values.has(key)) {
826
+ unrecognized = unrecognized ?? [];
827
+ unrecognized.push(key);
828
+ }
829
+ if (unrecognized && unrecognized.length > 0) payload.issues.push({
830
+ code: "unrecognized_keys",
831
+ input,
832
+ inst,
833
+ keys: unrecognized
834
+ });
835
+ } else {
836
+ payload.value = {};
837
+ for (const key of Reflect.ownKeys(input)) {
838
+ if (key === "__proto__") continue;
839
+ const keyResult = def.keyType._zod.run({
840
+ value: key,
841
+ issues: []
842
+ }, ctx);
843
+ if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
844
+ if (keyResult.issues.length) {
845
+ payload.issues.push({
846
+ origin: "record",
847
+ code: "invalid_key",
848
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
849
+ input: key,
850
+ path: [key],
851
+ inst
852
+ });
853
+ payload.value[keyResult.value] = keyResult.value;
854
+ continue;
855
+ }
856
+ const result = def.valueType._zod.run({
857
+ value: input[key],
858
+ issues: []
859
+ }, ctx);
860
+ if (result instanceof Promise) proms.push(result.then((result$1) => {
861
+ if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
862
+ payload.value[keyResult.value] = result$1.value;
863
+ }));
864
+ else {
865
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
866
+ payload.value[keyResult.value] = result.value;
867
+ }
868
+ }
869
+ }
870
+ if (proms.length) return Promise.all(proms).then(() => payload);
871
+ return payload;
872
+ };
873
+ });
874
+ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
875
+ $ZodType.init(inst, def);
876
+ const values = getEnumValues(def.entries);
877
+ inst._zod.values = new Set(values);
878
+ inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
879
+ inst._zod.parse = (payload, _ctx) => {
880
+ const input = payload.value;
881
+ if (inst._zod.values.has(input)) return payload;
882
+ payload.issues.push({
883
+ code: "invalid_value",
884
+ values,
885
+ input,
886
+ inst
887
+ });
888
+ return payload;
889
+ };
890
+ });
891
+ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
892
+ $ZodType.init(inst, def);
893
+ inst._zod.values = new Set(def.values);
894
+ inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
895
+ inst._zod.parse = (payload, _ctx) => {
896
+ const input = payload.value;
897
+ if (inst._zod.values.has(input)) return payload;
898
+ payload.issues.push({
899
+ code: "invalid_value",
900
+ values: def.values,
901
+ input,
902
+ inst
903
+ });
904
+ return payload;
905
+ };
906
+ });
907
+ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
908
+ $ZodType.init(inst, def);
909
+ inst._zod.parse = (payload, _ctx) => {
910
+ const _out = def.transform(payload.value, payload);
911
+ if (_ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
912
+ payload.value = output;
913
+ return payload;
914
+ });
915
+ if (_out instanceof Promise) throw new $ZodAsyncError();
916
+ payload.value = _out;
917
+ return payload;
918
+ };
919
+ });
920
+ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
921
+ $ZodType.init(inst, def);
922
+ inst._zod.optin = "optional";
923
+ inst._zod.optout = "optional";
924
+ defineLazy(inst._zod, "values", () => {
925
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
926
+ });
927
+ defineLazy(inst._zod, "pattern", () => {
928
+ const pattern = def.innerType._zod.pattern;
929
+ return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
930
+ });
931
+ inst._zod.parse = (payload, ctx) => {
932
+ if (def.innerType._zod.optin === "optional") return def.innerType._zod.run(payload, ctx);
933
+ if (payload.value === void 0) return payload;
934
+ return def.innerType._zod.run(payload, ctx);
935
+ };
936
+ });
937
+ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
938
+ $ZodType.init(inst, def);
939
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
940
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
941
+ defineLazy(inst._zod, "pattern", () => {
942
+ const pattern = def.innerType._zod.pattern;
943
+ return pattern ? /* @__PURE__ */ new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
944
+ });
945
+ defineLazy(inst._zod, "values", () => {
946
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
947
+ });
948
+ inst._zod.parse = (payload, ctx) => {
949
+ if (payload.value === null) return payload;
950
+ return def.innerType._zod.run(payload, ctx);
951
+ };
952
+ });
953
+ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
954
+ $ZodType.init(inst, def);
955
+ inst._zod.optin = "optional";
956
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
957
+ inst._zod.parse = (payload, ctx) => {
958
+ if (payload.value === void 0) {
959
+ payload.value = def.defaultValue;
960
+ /**
961
+ * $ZodDefault always returns the default value immediately.
962
+ * 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. */
963
+ return payload;
964
+ }
965
+ const result = def.innerType._zod.run(payload, ctx);
966
+ if (result instanceof Promise) return result.then((result$1) => handleDefaultResult(result$1, def));
967
+ return handleDefaultResult(result, def);
968
+ };
969
+ });
970
+ function handleDefaultResult(payload, def) {
971
+ if (payload.value === void 0) payload.value = def.defaultValue;
972
+ return payload;
973
+ }
974
+ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
975
+ $ZodType.init(inst, def);
976
+ inst._zod.optin = "optional";
977
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
978
+ inst._zod.parse = (payload, ctx) => {
979
+ if (payload.value === void 0) payload.value = def.defaultValue;
980
+ return def.innerType._zod.run(payload, ctx);
981
+ };
982
+ });
983
+ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
984
+ $ZodType.init(inst, def);
985
+ defineLazy(inst._zod, "values", () => {
986
+ const v = def.innerType._zod.values;
987
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
988
+ });
989
+ inst._zod.parse = (payload, ctx) => {
990
+ const result = def.innerType._zod.run(payload, ctx);
991
+ if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult(result$1, inst));
992
+ return handleNonOptionalResult(result, inst);
993
+ };
994
+ });
995
+ function handleNonOptionalResult(payload, inst) {
996
+ if (!payload.issues.length && payload.value === void 0) payload.issues.push({
997
+ code: "invalid_type",
998
+ expected: "nonoptional",
999
+ input: payload.value,
1000
+ inst
1001
+ });
1002
+ return payload;
1003
+ }
1004
+ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
1005
+ $ZodType.init(inst, def);
1006
+ inst._zod.optin = "optional";
1007
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1008
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1009
+ inst._zod.parse = (payload, ctx) => {
1010
+ const result = def.innerType._zod.run(payload, ctx);
1011
+ if (result instanceof Promise) return result.then((result$1) => {
1012
+ payload.value = result$1.value;
1013
+ if (result$1.issues.length) {
1014
+ payload.value = def.catchValue({
1015
+ ...payload,
1016
+ error: { issues: result$1.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
1017
+ input: payload.value
1018
+ });
1019
+ payload.issues = [];
1020
+ }
1021
+ return payload;
1022
+ });
1023
+ payload.value = result.value;
1024
+ if (result.issues.length) {
1025
+ payload.value = def.catchValue({
1026
+ ...payload,
1027
+ error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
1028
+ input: payload.value
1029
+ });
1030
+ payload.issues = [];
1031
+ }
1032
+ return payload;
1033
+ };
1034
+ });
1035
+ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
1036
+ $ZodType.init(inst, def);
1037
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
1038
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1039
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1040
+ inst._zod.parse = (payload, ctx) => {
1041
+ const left = def.in._zod.run(payload, ctx);
1042
+ if (left instanceof Promise) return left.then((left$1) => handlePipeResult(left$1, def, ctx));
1043
+ return handlePipeResult(left, def, ctx);
1044
+ };
1045
+ });
1046
+ function handlePipeResult(left, def, ctx) {
1047
+ if (aborted(left)) return left;
1048
+ return def.out._zod.run({
1049
+ value: left.value,
1050
+ issues: left.issues
1051
+ }, ctx);
1052
+ }
1053
+ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
1054
+ $ZodType.init(inst, def);
1055
+ defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1056
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1057
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1058
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1059
+ inst._zod.parse = (payload, ctx) => {
1060
+ const result = def.innerType._zod.run(payload, ctx);
1061
+ if (result instanceof Promise) return result.then(handleReadonlyResult);
1062
+ return handleReadonlyResult(result);
1063
+ };
1064
+ });
1065
+ function handleReadonlyResult(payload) {
1066
+ payload.value = Object.freeze(payload.value);
1067
+ return payload;
1068
+ }
1069
+ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
1070
+ $ZodCheck.init(inst, def);
1071
+ $ZodType.init(inst, def);
1072
+ inst._zod.parse = (payload, _) => {
1073
+ return payload;
1074
+ };
1075
+ inst._zod.check = (payload) => {
1076
+ const input = payload.value;
1077
+ const r = def.fn(input);
1078
+ if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
1079
+ handleRefineResult(r, payload, input, inst);
1080
+ };
1081
+ });
1082
+ function handleRefineResult(result, payload, input, inst) {
1083
+ if (!result) {
1084
+ const _iss = {
1085
+ code: "custom",
1086
+ input,
1087
+ inst,
1088
+ path: [...inst._zod.def.path ?? []],
1089
+ continue: !inst._zod.def.abort
1090
+ };
1091
+ if (inst._zod.def.params) _iss.params = inst._zod.def.params;
1092
+ payload.issues.push(issue(_iss));
1093
+ }
1094
+ }
1095
+
1096
+ //#endregion
1097
+ export { $ZodArray, $ZodBase64, $ZodBase64URL, $ZodBoolean, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCustom, $ZodDefault, $ZodDiscriminatedUnion, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodLiteral, $ZodNanoID, $ZodNever, $ZodNonOptional, $ZodNull, $ZodNullable, $ZodNumber, $ZodNumberFormat, $ZodObject, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodReadonly, $ZodRecord, $ZodString, $ZodStringFormat, $ZodTransform, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUnion, $ZodUnknown, $ZodXID };
1098
+ //# sourceMappingURL=schemas.js.map