@nocobase/plugin-ai 1.6.0-beta.17

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 (1780) hide show
  1. package/LICENSE.txt +161 -0
  2. package/README.md +1 -0
  3. package/build.config.ts +165 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/6f221c7c3acd67ae.js +10 -0
  7. package/dist/client/83ce71fb5895b112.js +10 -0
  8. package/dist/client/chat-settings/Messages.d.ts +11 -0
  9. package/dist/client/index.d.ts +22 -0
  10. package/dist/client/index.js +10 -0
  11. package/dist/client/llm-providers/components/Chat.d.ts +10 -0
  12. package/dist/client/llm-providers/components/Messages.d.ts +10 -0
  13. package/dist/client/llm-providers/components/ModelSelect.d.ts +10 -0
  14. package/dist/client/llm-providers/components/StructuredOutput.d.ts +10 -0
  15. package/dist/client/llm-providers/deepseek/ModelSettings.d.ts +10 -0
  16. package/dist/client/llm-providers/deepseek/index.d.ts +10 -0
  17. package/dist/client/llm-providers/openai/ModelSettings.d.ts +10 -0
  18. package/dist/client/llm-providers/openai/ProviderSettings.d.ts +10 -0
  19. package/dist/client/llm-providers/openai/index.d.ts +10 -0
  20. package/dist/client/llm-services/LLMServices.d.ts +12 -0
  21. package/dist/client/llm-services/llm-providers.d.ts +24 -0
  22. package/dist/client/locale.d.ts +11 -0
  23. package/dist/client/manager/ai-manager.d.ts +23 -0
  24. package/dist/client/schemas/llms.d.ts +253 -0
  25. package/dist/client/workflow/nodes/llm/ModelSettings.d.ts +11 -0
  26. package/dist/client/workflow/nodes/llm/index.d.ts +59 -0
  27. package/dist/collections/llm-services.d.ts +34 -0
  28. package/dist/collections/llm-services.js +63 -0
  29. package/dist/externalVersion.js +26 -0
  30. package/dist/index.d.ts +10 -0
  31. package/dist/index.js +48 -0
  32. package/dist/locale/en-US.json +25 -0
  33. package/dist/locale/zh-CN.json +25 -0
  34. package/dist/node_modules/@langchain/core/LICENSE +21 -0
  35. package/dist/node_modules/@langchain/core/agents.cjs +1 -0
  36. package/dist/node_modules/@langchain/core/agents.d.cts +1 -0
  37. package/dist/node_modules/@langchain/core/agents.d.ts +1 -0
  38. package/dist/node_modules/@langchain/core/agents.js +1 -0
  39. package/dist/node_modules/@langchain/core/caches.cjs +1 -0
  40. package/dist/node_modules/@langchain/core/caches.d.cts +1 -0
  41. package/dist/node_modules/@langchain/core/caches.d.ts +1 -0
  42. package/dist/node_modules/@langchain/core/caches.js +1 -0
  43. package/dist/node_modules/@langchain/core/callbacks/base.cjs +1 -0
  44. package/dist/node_modules/@langchain/core/callbacks/base.d.cts +1 -0
  45. package/dist/node_modules/@langchain/core/callbacks/base.d.ts +1 -0
  46. package/dist/node_modules/@langchain/core/callbacks/base.js +1 -0
  47. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.cjs +1 -0
  48. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.d.cts +1 -0
  49. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.d.ts +1 -0
  50. package/dist/node_modules/@langchain/core/callbacks/dispatch/web.js +1 -0
  51. package/dist/node_modules/@langchain/core/callbacks/dispatch.cjs +1 -0
  52. package/dist/node_modules/@langchain/core/callbacks/dispatch.d.cts +1 -0
  53. package/dist/node_modules/@langchain/core/callbacks/dispatch.d.ts +1 -0
  54. package/dist/node_modules/@langchain/core/callbacks/dispatch.js +1 -0
  55. package/dist/node_modules/@langchain/core/callbacks/manager.cjs +1 -0
  56. package/dist/node_modules/@langchain/core/callbacks/manager.d.cts +1 -0
  57. package/dist/node_modules/@langchain/core/callbacks/manager.d.ts +1 -0
  58. package/dist/node_modules/@langchain/core/callbacks/manager.js +1 -0
  59. package/dist/node_modules/@langchain/core/callbacks/promises.cjs +1 -0
  60. package/dist/node_modules/@langchain/core/callbacks/promises.d.cts +1 -0
  61. package/dist/node_modules/@langchain/core/callbacks/promises.d.ts +1 -0
  62. package/dist/node_modules/@langchain/core/callbacks/promises.js +1 -0
  63. package/dist/node_modules/@langchain/core/chat_history.cjs +1 -0
  64. package/dist/node_modules/@langchain/core/chat_history.d.cts +1 -0
  65. package/dist/node_modules/@langchain/core/chat_history.d.ts +1 -0
  66. package/dist/node_modules/@langchain/core/chat_history.js +1 -0
  67. package/dist/node_modules/@langchain/core/context.cjs +1 -0
  68. package/dist/node_modules/@langchain/core/context.d.cts +1 -0
  69. package/dist/node_modules/@langchain/core/context.d.ts +1 -0
  70. package/dist/node_modules/@langchain/core/context.js +1 -0
  71. package/dist/node_modules/@langchain/core/dist/agents.cjs +2 -0
  72. package/dist/node_modules/@langchain/core/dist/agents.d.ts +13 -0
  73. package/dist/node_modules/@langchain/core/dist/agents.js +1 -0
  74. package/dist/node_modules/@langchain/core/dist/caches/base.cjs +89 -0
  75. package/dist/node_modules/@langchain/core/dist/caches/base.d.ts +56 -0
  76. package/dist/node_modules/@langchain/core/dist/caches/base.js +81 -0
  77. package/dist/node_modules/@langchain/core/dist/callbacks/base.cjs +183 -0
  78. package/dist/node_modules/@langchain/core/dist/callbacks/base.d.ts +291 -0
  79. package/dist/node_modules/@langchain/core/dist/callbacks/base.js +154 -0
  80. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.cjs +49 -0
  81. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.d.ts +35 -0
  82. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/index.js +45 -0
  83. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.cjs +59 -0
  84. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.d.ts +32 -0
  85. package/dist/node_modules/@langchain/core/dist/callbacks/dispatch/web.js +55 -0
  86. package/dist/node_modules/@langchain/core/dist/callbacks/manager.cjs +890 -0
  87. package/dist/node_modules/@langchain/core/dist/callbacks/manager.d.ts +179 -0
  88. package/dist/node_modules/@langchain/core/dist/callbacks/manager.js +876 -0
  89. package/dist/node_modules/@langchain/core/dist/callbacks/promises.cjs +6 -0
  90. package/dist/node_modules/@langchain/core/dist/callbacks/promises.d.ts +2 -0
  91. package/dist/node_modules/@langchain/core/dist/callbacks/promises.js +2 -0
  92. package/dist/node_modules/@langchain/core/dist/chat_history.cjs +123 -0
  93. package/dist/node_modules/@langchain/core/dist/chat_history.d.ts +92 -0
  94. package/dist/node_modules/@langchain/core/dist/chat_history.js +117 -0
  95. package/dist/node_modules/@langchain/core/dist/context.cjs +18 -0
  96. package/dist/node_modules/@langchain/core/dist/context.d.ts +2 -0
  97. package/dist/node_modules/@langchain/core/dist/context.js +13 -0
  98. package/dist/node_modules/@langchain/core/dist/document_loaders/base.cjs +24 -0
  99. package/dist/node_modules/@langchain/core/dist/document_loaders/base.d.ts +28 -0
  100. package/dist/node_modules/@langchain/core/dist/document_loaders/base.js +20 -0
  101. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.cjs +198 -0
  102. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.d.ts +96 -0
  103. package/dist/node_modules/@langchain/core/dist/document_loaders/langsmith.js +194 -0
  104. package/dist/node_modules/@langchain/core/dist/documents/document.cjs +42 -0
  105. package/dist/node_modules/@langchain/core/dist/documents/document.d.ts +37 -0
  106. package/dist/node_modules/@langchain/core/dist/documents/document.js +38 -0
  107. package/dist/node_modules/@langchain/core/dist/documents/index.cjs +18 -0
  108. package/dist/node_modules/@langchain/core/dist/documents/index.d.ts +2 -0
  109. package/dist/node_modules/@langchain/core/dist/documents/index.js +2 -0
  110. package/dist/node_modules/@langchain/core/dist/documents/transformers.cjs +51 -0
  111. package/dist/node_modules/@langchain/core/dist/documents/transformers.d.ts +38 -0
  112. package/dist/node_modules/@langchain/core/dist/documents/transformers.js +46 -0
  113. package/dist/node_modules/@langchain/core/dist/embeddings.cjs +24 -0
  114. package/dist/node_modules/@langchain/core/dist/embeddings.d.ts +50 -0
  115. package/dist/node_modules/@langchain/core/dist/embeddings.js +20 -0
  116. package/dist/node_modules/@langchain/core/dist/errors/index.cjs +11 -0
  117. package/dist/node_modules/@langchain/core/dist/errors/index.d.ts +2 -0
  118. package/dist/node_modules/@langchain/core/dist/errors/index.js +7 -0
  119. package/dist/node_modules/@langchain/core/dist/example_selectors/base.cjs +19 -0
  120. package/dist/node_modules/@langchain/core/dist/example_selectors/base.d.ts +20 -0
  121. package/dist/node_modules/@langchain/core/dist/example_selectors/base.js +15 -0
  122. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.cjs +76 -0
  123. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.d.ts +63 -0
  124. package/dist/node_modules/@langchain/core/dist/example_selectors/conditional.js +69 -0
  125. package/dist/node_modules/@langchain/core/dist/example_selectors/index.cjs +20 -0
  126. package/dist/node_modules/@langchain/core/dist/example_selectors/index.d.ts +4 -0
  127. package/dist/node_modules/@langchain/core/dist/example_selectors/index.js +4 -0
  128. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.cjs +150 -0
  129. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.d.ts +89 -0
  130. package/dist/node_modules/@langchain/core/dist/example_selectors/length_based.js +146 -0
  131. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.cjs +139 -0
  132. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.d.ts +91 -0
  133. package/dist/node_modules/@langchain/core/dist/example_selectors/semantic_similarity.js +135 -0
  134. package/dist/node_modules/@langchain/core/dist/index.cjs +63 -0
  135. package/dist/node_modules/@langchain/core/dist/index.d.ts +63 -0
  136. package/dist/node_modules/@langchain/core/dist/index.js +63 -0
  137. package/dist/node_modules/@langchain/core/dist/indexing/base.cjs +272 -0
  138. package/dist/node_modules/@langchain/core/dist/indexing/base.d.ts +114 -0
  139. package/dist/node_modules/@langchain/core/dist/indexing/base.js +263 -0
  140. package/dist/node_modules/@langchain/core/dist/indexing/index.cjs +18 -0
  141. package/dist/node_modules/@langchain/core/dist/indexing/index.d.ts +2 -0
  142. package/dist/node_modules/@langchain/core/dist/indexing/index.js +2 -0
  143. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.cjs +18 -0
  144. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.d.ts +64 -0
  145. package/dist/node_modules/@langchain/core/dist/indexing/record_manager.js +14 -0
  146. package/dist/node_modules/@langchain/core/dist/language_models/base.cjs +283 -0
  147. package/dist/node_modules/@langchain/core/dist/language_models/base.d.ts +226 -0
  148. package/dist/node_modules/@langchain/core/dist/language_models/base.js +273 -0
  149. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.cjs +603 -0
  150. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.d.ts +199 -0
  151. package/dist/node_modules/@langchain/core/dist/language_models/chat_models.js +597 -0
  152. package/dist/node_modules/@langchain/core/dist/language_models/llms.cjs +379 -0
  153. package/dist/node_modules/@langchain/core/dist/language_models/llms.d.ts +129 -0
  154. package/dist/node_modules/@langchain/core/dist/language_models/llms.js +374 -0
  155. package/dist/node_modules/@langchain/core/dist/load/import_constants.cjs +5 -0
  156. package/dist/node_modules/@langchain/core/dist/load/import_constants.d.ts +1 -0
  157. package/dist/node_modules/@langchain/core/dist/load/import_constants.js +2 -0
  158. package/dist/node_modules/@langchain/core/dist/load/import_map.cjs +70 -0
  159. package/dist/node_modules/@langchain/core/dist/load/import_map.d.ts +43 -0
  160. package/dist/node_modules/@langchain/core/dist/load/import_map.js +44 -0
  161. package/dist/node_modules/@langchain/core/dist/load/import_type.cjs +3 -0
  162. package/dist/node_modules/@langchain/core/dist/load/import_type.d.ts +4 -0
  163. package/dist/node_modules/@langchain/core/dist/load/import_type.js +2 -0
  164. package/dist/node_modules/@langchain/core/dist/load/index.cjs +189 -0
  165. package/dist/node_modules/@langchain/core/dist/load/index.d.ts +7 -0
  166. package/dist/node_modules/@langchain/core/dist/load/index.js +162 -0
  167. package/dist/node_modules/@langchain/core/dist/load/map_keys.cjs +26 -0
  168. package/dist/node_modules/@langchain/core/dist/load/map_keys.d.ts +9 -0
  169. package/dist/node_modules/@langchain/core/dist/load/map_keys.js +17 -0
  170. package/dist/node_modules/@langchain/core/dist/load/serializable.cjs +192 -0
  171. package/dist/node_modules/@langchain/core/dist/load/serializable.d.ts +76 -0
  172. package/dist/node_modules/@langchain/core/dist/load/serializable.js +187 -0
  173. package/dist/node_modules/@langchain/core/dist/memory.cjs +63 -0
  174. package/dist/node_modules/@langchain/core/dist/memory.d.ts +62 -0
  175. package/dist/node_modules/@langchain/core/dist/memory.js +56 -0
  176. package/dist/node_modules/@langchain/core/dist/messages/ai.cjs +327 -0
  177. package/dist/node_modules/@langchain/core/dist/messages/ai.d.ts +120 -0
  178. package/dist/node_modules/@langchain/core/dist/messages/ai.js +320 -0
  179. package/dist/node_modules/@langchain/core/dist/messages/base.cjs +350 -0
  180. package/dist/node_modules/@langchain/core/dist/messages/base.d.ts +189 -0
  181. package/dist/node_modules/@langchain/core/dist/messages/base.js +336 -0
  182. package/dist/node_modules/@langchain/core/dist/messages/chat.cjs +92 -0
  183. package/dist/node_modules/@langchain/core/dist/messages/chat.d.ts +32 -0
  184. package/dist/node_modules/@langchain/core/dist/messages/chat.js +85 -0
  185. package/dist/node_modules/@langchain/core/dist/messages/function.cjs +55 -0
  186. package/dist/node_modules/@langchain/core/dist/messages/function.d.ts +26 -0
  187. package/dist/node_modules/@langchain/core/dist/messages/function.js +48 -0
  188. package/dist/node_modules/@langchain/core/dist/messages/human.cjs +45 -0
  189. package/dist/node_modules/@langchain/core/dist/messages/human.d.ts +19 -0
  190. package/dist/node_modules/@langchain/core/dist/messages/human.js +38 -0
  191. package/dist/node_modules/@langchain/core/dist/messages/index.cjs +33 -0
  192. package/dist/node_modules/@langchain/core/dist/messages/index.d.ts +10 -0
  193. package/dist/node_modules/@langchain/core/dist/messages/index.js +12 -0
  194. package/dist/node_modules/@langchain/core/dist/messages/modifier.cjs +35 -0
  195. package/dist/node_modules/@langchain/core/dist/messages/modifier.d.ts +19 -0
  196. package/dist/node_modules/@langchain/core/dist/messages/modifier.js +31 -0
  197. package/dist/node_modules/@langchain/core/dist/messages/system.cjs +45 -0
  198. package/dist/node_modules/@langchain/core/dist/messages/system.d.ts +19 -0
  199. package/dist/node_modules/@langchain/core/dist/messages/system.js +38 -0
  200. package/dist/node_modules/@langchain/core/dist/messages/tool.cjs +191 -0
  201. package/dist/node_modules/@langchain/core/dist/messages/tool.d.ts +159 -0
  202. package/dist/node_modules/@langchain/core/dist/messages/tool.js +182 -0
  203. package/dist/node_modules/@langchain/core/dist/messages/transformers.cjs +459 -0
  204. package/dist/node_modules/@langchain/core/dist/messages/transformers.d.ts +466 -0
  205. package/dist/node_modules/@langchain/core/dist/messages/transformers.js +452 -0
  206. package/dist/node_modules/@langchain/core/dist/messages/utils.cjs +292 -0
  207. package/dist/node_modules/@langchain/core/dist/messages/utils.d.ts +31 -0
  208. package/dist/node_modules/@langchain/core/dist/messages/utils.js +283 -0
  209. package/dist/node_modules/@langchain/core/dist/output_parsers/base.cjs +124 -0
  210. package/dist/node_modules/@langchain/core/dist/output_parsers/base.d.ts +103 -0
  211. package/dist/node_modules/@langchain/core/dist/output_parsers/base.js +118 -0
  212. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.cjs +41 -0
  213. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.d.ts +13 -0
  214. package/dist/node_modules/@langchain/core/dist/output_parsers/bytes.js +37 -0
  215. package/dist/node_modules/@langchain/core/dist/output_parsers/index.cjs +24 -0
  216. package/dist/node_modules/@langchain/core/dist/output_parsers/index.d.ts +8 -0
  217. package/dist/node_modules/@langchain/core/dist/output_parsers/index.js +8 -0
  218. package/dist/node_modules/@langchain/core/dist/output_parsers/json.cjs +52 -0
  219. package/dist/node_modules/@langchain/core/dist/output_parsers/json.d.ts +17 -0
  220. package/dist/node_modules/@langchain/core/dist/output_parsers/json.js +47 -0
  221. package/dist/node_modules/@langchain/core/dist/output_parsers/list.cjs +244 -0
  222. package/dist/node_modules/@langchain/core/dist/output_parsers/list.d.ts +76 -0
  223. package/dist/node_modules/@langchain/core/dist/output_parsers/list.js +236 -0
  224. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.cjs +17 -0
  225. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.d.ts +1 -0
  226. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/index.js +1 -0
  227. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.cjs +207 -0
  228. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.d.ts +80 -0
  229. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_functions/json_output_functions_parsers.js +201 -0
  230. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.cjs +17 -0
  231. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.d.ts +1 -0
  232. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/index.js +1 -0
  233. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.cjs +262 -0
  234. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.d.ts +78 -0
  235. package/dist/node_modules/@langchain/core/dist/output_parsers/openai_tools/json_output_tools_parsers.js +254 -0
  236. package/dist/node_modules/@langchain/core/dist/output_parsers/string.cjs +86 -0
  237. package/dist/node_modules/@langchain/core/dist/output_parsers/string.d.ts +39 -0
  238. package/dist/node_modules/@langchain/core/dist/output_parsers/string.js +82 -0
  239. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.cjs +196 -0
  240. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.d.ts +88 -0
  241. package/dist/node_modules/@langchain/core/dist/output_parsers/structured.js +190 -0
  242. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.cjs +112 -0
  243. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.d.ts +34 -0
  244. package/dist/node_modules/@langchain/core/dist/output_parsers/transform.js +107 -0
  245. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.cjs +146 -0
  246. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.d.ts +29 -0
  247. package/dist/node_modules/@langchain/core/dist/output_parsers/xml.js +141 -0
  248. package/dist/node_modules/@langchain/core/dist/outputs.cjs +59 -0
  249. package/dist/node_modules/@langchain/core/dist/outputs.d.ts +61 -0
  250. package/dist/node_modules/@langchain/core/dist/outputs.js +54 -0
  251. package/dist/node_modules/@langchain/core/dist/prompt_values.cjs +153 -0
  252. package/dist/node_modules/@langchain/core/dist/prompt_values.d.ts +78 -0
  253. package/dist/node_modules/@langchain/core/dist/prompt_values.js +146 -0
  254. package/dist/node_modules/@langchain/core/dist/prompts/base.cjs +142 -0
  255. package/dist/node_modules/@langchain/core/dist/prompts/base.d.ts +95 -0
  256. package/dist/node_modules/@langchain/core/dist/prompts/base.js +138 -0
  257. package/dist/node_modules/@langchain/core/dist/prompts/chat.cjs +764 -0
  258. package/dist/node_modules/@langchain/core/dist/prompts/chat.d.ts +240 -0
  259. package/dist/node_modules/@langchain/core/dist/prompts/chat.js +752 -0
  260. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.cjs +355 -0
  261. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.d.ts +195 -0
  262. package/dist/node_modules/@langchain/core/dist/prompts/few_shot.js +350 -0
  263. package/dist/node_modules/@langchain/core/dist/prompts/image.cjs +128 -0
  264. package/dist/node_modules/@langchain/core/dist/prompts/image.d.ts +70 -0
  265. package/dist/node_modules/@langchain/core/dist/prompts/image.js +124 -0
  266. package/dist/node_modules/@langchain/core/dist/prompts/index.cjs +26 -0
  267. package/dist/node_modules/@langchain/core/dist/prompts/index.d.ts +10 -0
  268. package/dist/node_modules/@langchain/core/dist/prompts/index.js +10 -0
  269. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.cjs +144 -0
  270. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.d.ts +98 -0
  271. package/dist/node_modules/@langchain/core/dist/prompts/pipeline.js +140 -0
  272. package/dist/node_modules/@langchain/core/dist/prompts/prompt.cjs +166 -0
  273. package/dist/node_modules/@langchain/core/dist/prompts/prompt.d.ts +107 -0
  274. package/dist/node_modules/@langchain/core/dist/prompts/prompt.js +162 -0
  275. package/dist/node_modules/@langchain/core/dist/prompts/serde.cjs +2 -0
  276. package/dist/node_modules/@langchain/core/dist/prompts/serde.d.ts +43 -0
  277. package/dist/node_modules/@langchain/core/dist/prompts/serde.js +1 -0
  278. package/dist/node_modules/@langchain/core/dist/prompts/string.cjs +25 -0
  279. package/dist/node_modules/@langchain/core/dist/prompts/string.d.ts +17 -0
  280. package/dist/node_modules/@langchain/core/dist/prompts/string.js +21 -0
  281. package/dist/node_modules/@langchain/core/dist/prompts/structured.cjs +64 -0
  282. package/dist/node_modules/@langchain/core/dist/prompts/structured.d.ts +19 -0
  283. package/dist/node_modules/@langchain/core/dist/prompts/structured.js +60 -0
  284. package/dist/node_modules/@langchain/core/dist/prompts/template.cjs +169 -0
  285. package/dist/node_modules/@langchain/core/dist/prompts/template.d.ts +43 -0
  286. package/dist/node_modules/@langchain/core/dist/prompts/template.js +156 -0
  287. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.cjs +13 -0
  288. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.d.ts +18 -0
  289. package/dist/node_modules/@langchain/core/dist/retrievers/document_compressors/base.js +9 -0
  290. package/dist/node_modules/@langchain/core/dist/retrievers/index.cjs +131 -0
  291. package/dist/node_modules/@langchain/core/dist/retrievers/index.d.ts +134 -0
  292. package/dist/node_modules/@langchain/core/dist/retrievers/index.js +127 -0
  293. package/dist/node_modules/@langchain/core/dist/runnables/base.cjs +2399 -0
  294. package/dist/node_modules/@langchain/core/dist/runnables/base.d.ts +923 -0
  295. package/dist/node_modules/@langchain/core/dist/runnables/base.js +2377 -0
  296. package/dist/node_modules/@langchain/core/dist/runnables/branch.cjs +207 -0
  297. package/dist/node_modules/@langchain/core/dist/runnables/branch.d.ts +95 -0
  298. package/dist/node_modules/@langchain/core/dist/runnables/branch.js +203 -0
  299. package/dist/node_modules/@langchain/core/dist/runnables/config.cjs +223 -0
  300. package/dist/node_modules/@langchain/core/dist/runnables/config.d.ts +15 -0
  301. package/dist/node_modules/@langchain/core/dist/runnables/config.js +215 -0
  302. package/dist/node_modules/@langchain/core/dist/runnables/graph.cjs +270 -0
  303. package/dist/node_modules/@langchain/core/dist/runnables/graph.d.ts +44 -0
  304. package/dist/node_modules/@langchain/core/dist/runnables/graph.js +266 -0
  305. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.cjs +152 -0
  306. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.d.ts +18 -0
  307. package/dist/node_modules/@langchain/core/dist/runnables/graph_mermaid.js +147 -0
  308. package/dist/node_modules/@langchain/core/dist/runnables/history.cjs +262 -0
  309. package/dist/node_modules/@langchain/core/dist/runnables/history.d.ts +92 -0
  310. package/dist/node_modules/@langchain/core/dist/runnables/history.js +258 -0
  311. package/dist/node_modules/@langchain/core/dist/runnables/index.cjs +31 -0
  312. package/dist/node_modules/@langchain/core/dist/runnables/index.d.ts +7 -0
  313. package/dist/node_modules/@langchain/core/dist/runnables/index.js +6 -0
  314. package/dist/node_modules/@langchain/core/dist/runnables/iter.cjs +50 -0
  315. package/dist/node_modules/@langchain/core/dist/runnables/iter.d.ts +6 -0
  316. package/dist/node_modules/@langchain/core/dist/runnables/iter.js +42 -0
  317. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.cjs +127 -0
  318. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.d.ts +70 -0
  319. package/dist/node_modules/@langchain/core/dist/runnables/passthrough.js +123 -0
  320. package/dist/node_modules/@langchain/core/dist/runnables/remote.cjs +518 -0
  321. package/dist/node_modules/@langchain/core/dist/runnables/remote.d.ts +59 -0
  322. package/dist/node_modules/@langchain/core/dist/runnables/remote.js +514 -0
  323. package/dist/node_modules/@langchain/core/dist/runnables/router.cjs +97 -0
  324. package/dist/node_modules/@langchain/core/dist/runnables/router.d.ts +52 -0
  325. package/dist/node_modules/@langchain/core/dist/runnables/router.js +93 -0
  326. package/dist/node_modules/@langchain/core/dist/runnables/types.cjs +2 -0
  327. package/dist/node_modules/@langchain/core/dist/runnables/types.d.ts +68 -0
  328. package/dist/node_modules/@langchain/core/dist/runnables/types.js +1 -0
  329. package/dist/node_modules/@langchain/core/dist/runnables/utils.cjs +89 -0
  330. package/dist/node_modules/@langchain/core/dist/runnables/utils.d.ts +27 -0
  331. package/dist/node_modules/@langchain/core/dist/runnables/utils.js +84 -0
  332. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.cjs +18 -0
  333. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.d.ts +2 -0
  334. package/dist/node_modules/@langchain/core/dist/runnables/wrappers.js +14 -0
  335. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.cjs +189 -0
  336. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.d.ts +155 -0
  337. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/context.js +182 -0
  338. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.cjs +13 -0
  339. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.d.ts +9 -0
  340. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/globals.js +8 -0
  341. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.cjs +69 -0
  342. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.d.ts +14 -0
  343. package/dist/node_modules/@langchain/core/dist/singletons/async_local_storage/index.js +65 -0
  344. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.cjs +68 -0
  345. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.d.ts +13 -0
  346. package/dist/node_modules/@langchain/core/dist/singletons/callbacks.js +59 -0
  347. package/dist/node_modules/@langchain/core/dist/singletons/index.cjs +8 -0
  348. package/dist/node_modules/@langchain/core/dist/singletons/index.d.ts +4 -0
  349. package/dist/node_modules/@langchain/core/dist/singletons/index.js +4 -0
  350. package/dist/node_modules/@langchain/core/dist/singletons/tracer.cjs +23 -0
  351. package/dist/node_modules/@langchain/core/dist/singletons/tracer.d.ts +3 -0
  352. package/dist/node_modules/@langchain/core/dist/singletons/tracer.js +18 -0
  353. package/dist/node_modules/@langchain/core/dist/stores.cjs +90 -0
  354. package/dist/node_modules/@langchain/core/dist/stores.d.ts +105 -0
  355. package/dist/node_modules/@langchain/core/dist/stores.js +85 -0
  356. package/dist/node_modules/@langchain/core/dist/structured_query/base.cjs +139 -0
  357. package/dist/node_modules/@langchain/core/dist/structured_query/base.d.ts +69 -0
  358. package/dist/node_modules/@langchain/core/dist/structured_query/base.js +134 -0
  359. package/dist/node_modules/@langchain/core/dist/structured_query/functional.cjs +236 -0
  360. package/dist/node_modules/@langchain/core/dist/structured_query/functional.d.ts +93 -0
  361. package/dist/node_modules/@langchain/core/dist/structured_query/functional.js +232 -0
  362. package/dist/node_modules/@langchain/core/dist/structured_query/index.cjs +20 -0
  363. package/dist/node_modules/@langchain/core/dist/structured_query/index.d.ts +4 -0
  364. package/dist/node_modules/@langchain/core/dist/structured_query/index.js +4 -0
  365. package/dist/node_modules/@langchain/core/dist/structured_query/ir.cjs +141 -0
  366. package/dist/node_modules/@langchain/core/dist/structured_query/ir.d.ts +138 -0
  367. package/dist/node_modules/@langchain/core/dist/structured_query/ir.js +132 -0
  368. package/dist/node_modules/@langchain/core/dist/structured_query/utils.cjs +104 -0
  369. package/dist/node_modules/@langchain/core/dist/structured_query/utils.d.ts +33 -0
  370. package/dist/node_modules/@langchain/core/dist/structured_query/utils.js +94 -0
  371. package/dist/node_modules/@langchain/core/dist/tools/index.cjs +394 -0
  372. package/dist/node_modules/@langchain/core/dist/tools/index.d.ts +305 -0
  373. package/dist/node_modules/@langchain/core/dist/tools/index.js +385 -0
  374. package/dist/node_modules/@langchain/core/dist/tools/utils.cjs +28 -0
  375. package/dist/node_modules/@langchain/core/dist/tools/utils.d.ts +11 -0
  376. package/dist/node_modules/@langchain/core/dist/tools/utils.js +23 -0
  377. package/dist/node_modules/@langchain/core/dist/tracers/base.cjs +474 -0
  378. package/dist/node_modules/@langchain/core/dist/tracers/base.d.ts +259 -0
  379. package/dist/node_modules/@langchain/core/dist/tracers/base.js +469 -0
  380. package/dist/node_modules/@langchain/core/dist/tracers/console.cjs +233 -0
  381. package/dist/node_modules/@langchain/core/dist/tracers/console.d.ts +117 -0
  382. package/dist/node_modules/@langchain/core/dist/tracers/console.js +226 -0
  383. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.cjs +533 -0
  384. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.d.ts +140 -0
  385. package/dist/node_modules/@langchain/core/dist/tracers/event_stream.js +528 -0
  386. package/dist/node_modules/@langchain/core/dist/tracers/initialize.cjs +36 -0
  387. package/dist/node_modules/@langchain/core/dist/tracers/initialize.d.ts +20 -0
  388. package/dist/node_modules/@langchain/core/dist/tracers/initialize.js +31 -0
  389. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.cjs +436 -0
  390. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.d.ts +118 -0
  391. package/dist/node_modules/@langchain/core/dist/tracers/log_stream.js +429 -0
  392. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.cjs +81 -0
  393. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.d.ts +25 -0
  394. package/dist/node_modules/@langchain/core/dist/tracers/root_listener.js +77 -0
  395. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.cjs +50 -0
  396. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.d.ts +26 -0
  397. package/dist/node_modules/@langchain/core/dist/tracers/run_collector.js +46 -0
  398. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.cjs +160 -0
  399. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.d.ts +42 -0
  400. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain.js +156 -0
  401. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.cjs +200 -0
  402. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.d.ts +59 -0
  403. package/dist/node_modules/@langchain/core/dist/tracers/tracer_langchain_v1.js +196 -0
  404. package/dist/node_modules/@langchain/core/dist/types/_internal.cjs +2 -0
  405. package/dist/node_modules/@langchain/core/dist/types/_internal.d.ts +1 -0
  406. package/dist/node_modules/@langchain/core/dist/types/_internal.js +1 -0
  407. package/dist/node_modules/@langchain/core/dist/types/stream.cjs +2 -0
  408. package/dist/node_modules/@langchain/core/dist/types/stream.d.ts +2 -0
  409. package/dist/node_modules/@langchain/core/dist/types/stream.js +1 -0
  410. package/dist/node_modules/@langchain/core/dist/types/type-utils.cjs +2 -0
  411. package/dist/node_modules/@langchain/core/dist/types/type-utils.d.ts +1 -0
  412. package/dist/node_modules/@langchain/core/dist/types/type-utils.js +1 -0
  413. package/dist/node_modules/@langchain/core/dist/utils/async_caller.cjs +128 -0
  414. package/dist/node_modules/@langchain/core/dist/utils/async_caller.d.ts +45 -0
  415. package/dist/node_modules/@langchain/core/dist/utils/async_caller.js +121 -0
  416. package/dist/node_modules/@langchain/core/dist/utils/callbacks.cjs +17 -0
  417. package/dist/node_modules/@langchain/core/dist/utils/callbacks.d.ts +1 -0
  418. package/dist/node_modules/@langchain/core/dist/utils/callbacks.js +13 -0
  419. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.cjs +11 -0
  420. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.d.ts +1 -0
  421. package/dist/node_modules/@langchain/core/dist/utils/chunk_array.js +7 -0
  422. package/dist/node_modules/@langchain/core/dist/utils/env.cjs +79 -0
  423. package/dist/node_modules/@langchain/core/dist/utils/env.d.ts +24 -0
  424. package/dist/node_modules/@langchain/core/dist/utils/env.js +68 -0
  425. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.cjs +241 -0
  426. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.d.ts +39 -0
  427. package/dist/node_modules/@langchain/core/dist/utils/event_source_parse.js +234 -0
  428. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.cjs +49 -0
  429. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.d.ts +22 -0
  430. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/index.js +16 -0
  431. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.cjs +469 -0
  432. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.d.ts +111 -0
  433. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.js +459 -0
  434. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.cjs +237 -0
  435. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.d.ts +23 -0
  436. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.js +230 -0
  437. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.cjs +194 -0
  438. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.d.ts +36 -0
  439. package/dist/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.js +181 -0
  440. package/dist/node_modules/@langchain/core/dist/utils/function_calling.cjs +116 -0
  441. package/dist/node_modules/@langchain/core/dist/utils/function_calling.d.ts +66 -0
  442. package/dist/node_modules/@langchain/core/dist/utils/function_calling.js +107 -0
  443. package/dist/node_modules/@langchain/core/dist/utils/hash.cjs +5 -0
  444. package/dist/node_modules/@langchain/core/dist/utils/hash.d.ts +1 -0
  445. package/dist/node_modules/@langchain/core/dist/utils/hash.js +1 -0
  446. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.cjs +358 -0
  447. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.d.ts +1 -0
  448. package/dist/node_modules/@langchain/core/dist/utils/js-sha1/hash.js +355 -0
  449. package/dist/node_modules/@langchain/core/dist/utils/json.cjs +93 -0
  450. package/dist/node_modules/@langchain/core/dist/utils/json.d.ts +2 -0
  451. package/dist/node_modules/@langchain/core/dist/utils/json.js +88 -0
  452. package/dist/node_modules/@langchain/core/dist/utils/json_patch.cjs +6 -0
  453. package/dist/node_modules/@langchain/core/dist/utils/json_patch.d.ts +1 -0
  454. package/dist/node_modules/@langchain/core/dist/utils/json_patch.js +1 -0
  455. package/dist/node_modules/@langchain/core/dist/utils/json_schema.cjs +6 -0
  456. package/dist/node_modules/@langchain/core/dist/utils/json_schema.d.ts +1 -0
  457. package/dist/node_modules/@langchain/core/dist/utils/json_schema.js +1 -0
  458. package/dist/node_modules/@langchain/core/dist/utils/math.cjs +127 -0
  459. package/dist/node_modules/@langchain/core/dist/utils/math.d.ts +40 -0
  460. package/dist/node_modules/@langchain/core/dist/utils/math.js +118 -0
  461. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.cjs +18 -0
  462. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.d.ts +8 -0
  463. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/distances.js +14 -0
  464. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.cjs +21 -0
  465. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.d.ts +7 -0
  466. package/dist/node_modules/@langchain/core/dist/utils/ml-distance/similarities.js +17 -0
  467. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.cjs +15 -0
  468. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.d.ts +2 -0
  469. package/dist/node_modules/@langchain/core/dist/utils/ml-distance-euclidean/euclidean.js +10 -0
  470. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.cjs +1558 -0
  471. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.d.ts +2 -0
  472. package/dist/node_modules/@langchain/core/dist/utils/sax-js/sax.js +1555 -0
  473. package/dist/node_modules/@langchain/core/dist/utils/signal.cjs +30 -0
  474. package/dist/node_modules/@langchain/core/dist/utils/signal.d.ts +1 -0
  475. package/dist/node_modules/@langchain/core/dist/utils/signal.js +26 -0
  476. package/dist/node_modules/@langchain/core/dist/utils/stream.cjs +274 -0
  477. package/dist/node_modules/@langchain/core/dist/utils/stream.d.ts +38 -0
  478. package/dist/node_modules/@langchain/core/dist/utils/stream.js +266 -0
  479. package/dist/node_modules/@langchain/core/dist/utils/testing/index.cjs +809 -0
  480. package/dist/node_modules/@langchain/core/dist/utils/testing/index.d.ts +326 -0
  481. package/dist/node_modules/@langchain/core/dist/utils/testing/index.js +790 -0
  482. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.cjs +25 -0
  483. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.d.ts +3 -0
  484. package/dist/node_modules/@langchain/core/dist/utils/tiktoken.js +20 -0
  485. package/dist/node_modules/@langchain/core/dist/utils/types/index.cjs +17 -0
  486. package/dist/node_modules/@langchain/core/dist/utils/types/index.d.ts +8 -0
  487. package/dist/node_modules/@langchain/core/dist/utils/types/index.js +1 -0
  488. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.cjs +16 -0
  489. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.d.ts +8 -0
  490. package/dist/node_modules/@langchain/core/dist/utils/types/is_zod_schema.js +12 -0
  491. package/dist/node_modules/@langchain/core/dist/vectorstores.cjs +428 -0
  492. package/dist/node_modules/@langchain/core/dist/vectorstores.d.ts +644 -0
  493. package/dist/node_modules/@langchain/core/dist/vectorstores.js +422 -0
  494. package/dist/node_modules/@langchain/core/document_loaders/base.cjs +1 -0
  495. package/dist/node_modules/@langchain/core/document_loaders/base.d.cts +1 -0
  496. package/dist/node_modules/@langchain/core/document_loaders/base.d.ts +1 -0
  497. package/dist/node_modules/@langchain/core/document_loaders/base.js +1 -0
  498. package/dist/node_modules/@langchain/core/document_loaders/langsmith.cjs +1 -0
  499. package/dist/node_modules/@langchain/core/document_loaders/langsmith.d.cts +1 -0
  500. package/dist/node_modules/@langchain/core/document_loaders/langsmith.d.ts +1 -0
  501. package/dist/node_modules/@langchain/core/document_loaders/langsmith.js +1 -0
  502. package/dist/node_modules/@langchain/core/documents.cjs +1 -0
  503. package/dist/node_modules/@langchain/core/documents.d.cts +1 -0
  504. package/dist/node_modules/@langchain/core/documents.d.ts +1 -0
  505. package/dist/node_modules/@langchain/core/documents.js +1 -0
  506. package/dist/node_modules/@langchain/core/embeddings.cjs +1 -0
  507. package/dist/node_modules/@langchain/core/embeddings.d.cts +1 -0
  508. package/dist/node_modules/@langchain/core/embeddings.d.ts +1 -0
  509. package/dist/node_modules/@langchain/core/embeddings.js +1 -0
  510. package/dist/node_modules/@langchain/core/example_selectors.cjs +1 -0
  511. package/dist/node_modules/@langchain/core/example_selectors.d.cts +1 -0
  512. package/dist/node_modules/@langchain/core/example_selectors.d.ts +1 -0
  513. package/dist/node_modules/@langchain/core/example_selectors.js +1 -0
  514. package/dist/node_modules/@langchain/core/index.cjs +1 -0
  515. package/dist/node_modules/@langchain/core/index.d.cts +63 -0
  516. package/dist/node_modules/@langchain/core/index.d.ts +63 -0
  517. package/dist/node_modules/@langchain/core/index.js +63 -0
  518. package/dist/node_modules/@langchain/core/indexing.cjs +1 -0
  519. package/dist/node_modules/@langchain/core/indexing.d.cts +1 -0
  520. package/dist/node_modules/@langchain/core/indexing.d.ts +1 -0
  521. package/dist/node_modules/@langchain/core/indexing.js +1 -0
  522. package/dist/node_modules/@langchain/core/language_models/base.cjs +1 -0
  523. package/dist/node_modules/@langchain/core/language_models/base.d.cts +1 -0
  524. package/dist/node_modules/@langchain/core/language_models/base.d.ts +1 -0
  525. package/dist/node_modules/@langchain/core/language_models/base.js +1 -0
  526. package/dist/node_modules/@langchain/core/language_models/chat_models.cjs +1 -0
  527. package/dist/node_modules/@langchain/core/language_models/chat_models.d.cts +1 -0
  528. package/dist/node_modules/@langchain/core/language_models/chat_models.d.ts +1 -0
  529. package/dist/node_modules/@langchain/core/language_models/chat_models.js +1 -0
  530. package/dist/node_modules/@langchain/core/language_models/llms.cjs +1 -0
  531. package/dist/node_modules/@langchain/core/language_models/llms.d.cts +1 -0
  532. package/dist/node_modules/@langchain/core/language_models/llms.d.ts +1 -0
  533. package/dist/node_modules/@langchain/core/language_models/llms.js +1 -0
  534. package/dist/node_modules/@langchain/core/load/serializable.cjs +1 -0
  535. package/dist/node_modules/@langchain/core/load/serializable.d.cts +1 -0
  536. package/dist/node_modules/@langchain/core/load/serializable.d.ts +1 -0
  537. package/dist/node_modules/@langchain/core/load/serializable.js +1 -0
  538. package/dist/node_modules/@langchain/core/load.cjs +1 -0
  539. package/dist/node_modules/@langchain/core/load.d.cts +1 -0
  540. package/dist/node_modules/@langchain/core/load.d.ts +1 -0
  541. package/dist/node_modules/@langchain/core/load.js +1 -0
  542. package/dist/node_modules/@langchain/core/memory.cjs +1 -0
  543. package/dist/node_modules/@langchain/core/memory.d.cts +1 -0
  544. package/dist/node_modules/@langchain/core/memory.d.ts +1 -0
  545. package/dist/node_modules/@langchain/core/memory.js +1 -0
  546. package/dist/node_modules/@langchain/core/messages/tool.cjs +1 -0
  547. package/dist/node_modules/@langchain/core/messages/tool.d.cts +1 -0
  548. package/dist/node_modules/@langchain/core/messages/tool.d.ts +1 -0
  549. package/dist/node_modules/@langchain/core/messages/tool.js +1 -0
  550. package/dist/node_modules/@langchain/core/messages.cjs +1 -0
  551. package/dist/node_modules/@langchain/core/messages.d.cts +1 -0
  552. package/dist/node_modules/@langchain/core/messages.d.ts +1 -0
  553. package/dist/node_modules/@langchain/core/messages.js +1 -0
  554. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/README.md +75 -0
  555. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/deep-compare-strict.d.ts +1 -0
  556. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/deep-compare-strict.js +42 -0
  557. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/dereference.d.ts +7 -0
  558. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/dereference.js +147 -0
  559. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/format.d.ts +1 -0
  560. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/format.js +111 -0
  561. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/index.d.ts +8 -0
  562. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/index.js +24 -0
  563. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/package.json +3 -0
  564. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/pointer.d.ts +2 -0
  565. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/pointer.js +10 -0
  566. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/types.d.ts +72 -0
  567. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/types.js +9 -0
  568. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/ucs2-length.d.ts +1 -0
  569. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/ucs2-length.js +20 -0
  570. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validate.d.ts +3 -0
  571. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validate.js +805 -0
  572. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validator.d.ts +10 -0
  573. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/commonjs/validator.js +27 -0
  574. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.d.ts +1 -0
  575. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js +39 -0
  576. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/dereference.d.ts +7 -0
  577. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/dereference.js +143 -0
  578. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/format.d.ts +1 -0
  579. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/format.js +108 -0
  580. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/index.d.ts +8 -0
  581. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/index.js +8 -0
  582. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/package.json +3 -0
  583. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/pointer.d.ts +2 -0
  584. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/pointer.js +6 -0
  585. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/types.d.ts +72 -0
  586. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/types.js +6 -0
  587. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.d.ts +1 -0
  588. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js +17 -0
  589. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validate.d.ts +3 -0
  590. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validate.js +802 -0
  591. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validator.d.ts +10 -0
  592. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/dist/esm/validator.js +23 -0
  593. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/package.json +68 -0
  594. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/deep-compare-strict.d.ts +1 -0
  595. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/deep-compare-strict.ts +39 -0
  596. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/dereference.d.ts +12 -0
  597. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/dereference.ts +188 -0
  598. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/format.d.ts +2 -0
  599. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/format.ts +164 -0
  600. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/index.d.ts +8 -0
  601. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/index.ts +8 -0
  602. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/pointer.d.ts +2 -0
  603. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/pointer.ts +7 -0
  604. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/types.d.ts +79 -0
  605. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/types.ts +92 -0
  606. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/ucs2-length.d.ts +1 -0
  607. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/ucs2-length.ts +24 -0
  608. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validate.d.ts +13 -0
  609. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validate.ts +1168 -0
  610. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validator.d.ts +14 -0
  611. package/dist/node_modules/@langchain/core/node_modules/@cfworker/json-schema/src/validator.ts +32 -0
  612. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.d.ts +167 -0
  613. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/index.js +164 -0
  614. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/license +9 -0
  615. package/dist/node_modules/@langchain/core/node_modules/ansi-styles/package.json +52 -0
  616. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.d.ts +103 -0
  617. package/dist/node_modules/@langchain/core/node_modules/camelcase/index.js +113 -0
  618. package/dist/node_modules/@langchain/core/node_modules/camelcase/license +9 -0
  619. package/dist/node_modules/@langchain/core/node_modules/camelcase/package.json +44 -0
  620. package/dist/node_modules/@langchain/core/node_modules/decamelize/index.js +13 -0
  621. package/dist/node_modules/@langchain/core/node_modules/decamelize/license +21 -0
  622. package/dist/node_modules/@langchain/core/node_modules/decamelize/package.json +38 -0
  623. package/dist/node_modules/@langchain/core/node_modules/decamelize/readme.md +48 -0
  624. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.cjs +256 -0
  625. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.d.ts +1 -0
  626. package/dist/node_modules/@langchain/core/node_modules/js-tiktoken/lite.js +1 -0
  627. package/dist/node_modules/@langchain/core/node_modules/langsmith/README.md +523 -0
  628. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.cjs +1 -0
  629. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.cts +1 -0
  630. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.ts +1 -0
  631. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.js +1 -0
  632. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.cjs +1 -0
  633. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.cts +1 -0
  634. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.ts +1 -0
  635. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.js +1 -0
  636. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.cjs +102 -0
  637. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.d.ts +16 -0
  638. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.js +95 -0
  639. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.cjs +3266 -0
  640. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.d.ts +899 -0
  641. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js +3237 -0
  642. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.cjs +12 -0
  643. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.d.ts +1 -0
  644. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.js +8 -0
  645. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.cjs +730 -0
  646. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.d.ts +5 -0
  647. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.js +726 -0
  648. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.cjs +869 -0
  649. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.d.ts +236 -0
  650. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.js +864 -0
  651. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.cjs +219 -0
  652. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +61 -0
  653. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.js +212 -0
  654. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.cjs +112 -0
  655. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.d.ts +105 -0
  656. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.js +107 -0
  657. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.cjs +9 -0
  658. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.d.ts +4 -0
  659. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.js +3 -0
  660. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.cjs +55 -0
  661. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.d.ts +21 -0
  662. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/langchain.js +51 -0
  663. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.cjs +66 -0
  664. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +30 -0
  665. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.js +62 -0
  666. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.cjs +11 -0
  667. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.d.ts +5 -0
  668. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js +5 -0
  669. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.cjs +44 -0
  670. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.d.ts +437 -0
  671. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.js +322 -0
  672. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.cjs +37 -0
  673. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.d.ts +5 -0
  674. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.js +35 -0
  675. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.cjs +139 -0
  676. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.d.ts +30 -0
  677. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.js +134 -0
  678. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.cjs +586 -0
  679. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.d.ts +112 -0
  680. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.js +556 -0
  681. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.cjs +2 -0
  682. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.d.ts +530 -0
  683. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.js +1 -0
  684. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.cjs +4 -0
  685. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.d.ts +1 -0
  686. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.js +1 -0
  687. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.cjs +27 -0
  688. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.d.ts +7 -0
  689. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js +22 -0
  690. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.cjs +61 -0
  691. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.d.ts +22 -0
  692. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.js +55 -0
  693. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.cjs +2 -0
  694. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.d.ts +40 -0
  695. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.js +1 -0
  696. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.cjs +554 -0
  697. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.d.ts +57 -0
  698. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.js +546 -0
  699. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.cjs +72 -0
  700. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.d.ts +14 -0
  701. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.js +67 -0
  702. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.cjs +37 -0
  703. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.d.ts +1 -0
  704. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js +10 -0
  705. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.cjs +47 -0
  706. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.d.ts +7 -0
  707. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.js +37 -0
  708. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.cjs +139 -0
  709. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.d.ts +41 -0
  710. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js +132 -0
  711. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.cjs +24 -0
  712. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.d.ts +1 -0
  713. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.js +20 -0
  714. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.cjs +234 -0
  715. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.d.ts +61 -0
  716. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js +217 -0
  717. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.cjs +89 -0
  718. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.d.ts +44 -0
  719. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js +83 -0
  720. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +235 -0
  721. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.d.ts +1 -0
  722. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +231 -0
  723. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.cjs +10 -0
  724. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.d.ts +4 -0
  725. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.js +7 -0
  726. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.cjs +40 -0
  727. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.d.ts +34 -0
  728. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.js +35 -0
  729. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.cjs +591 -0
  730. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.d.ts +95 -0
  731. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.js +553 -0
  732. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.cjs +104 -0
  733. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.d.ts +27 -0
  734. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.js +98 -0
  735. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.cjs +286 -0
  736. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.d.ts +5 -0
  737. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.js +256 -0
  738. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.cjs +2 -0
  739. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.d.ts +28 -0
  740. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.js +1 -0
  741. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.cjs +93 -0
  742. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.d.ts +2 -0
  743. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.js +89 -0
  744. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.cjs +90 -0
  745. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.d.ts +12 -0
  746. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.js +85 -0
  747. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.cjs +29 -0
  748. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.d.ts +10 -0
  749. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.js +24 -0
  750. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.cjs +25 -0
  751. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.d.ts +11 -0
  752. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.js +23 -0
  753. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.cjs +50 -0
  754. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.d.ts +12 -0
  755. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.js +45 -0
  756. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.cjs +22 -0
  757. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.d.ts +10 -0
  758. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.js +17 -0
  759. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.cjs +36 -0
  760. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.d.ts +32 -0
  761. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.js +34 -0
  762. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.cjs +18 -0
  763. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.d.ts +9 -0
  764. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.js +16 -0
  765. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.cjs +25 -0
  766. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.d.ts +10 -0
  767. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.js +23 -0
  768. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.cjs +34 -0
  769. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.d.ts +10 -0
  770. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.js +29 -0
  771. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.cjs +31 -0
  772. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.d.ts +25 -0
  773. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.js +29 -0
  774. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.cjs +28 -0
  775. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.d.ts +17 -0
  776. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.js +23 -0
  777. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.cjs +65 -0
  778. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.d.ts +50 -0
  779. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.js +63 -0
  780. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.cjs +41 -0
  781. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.d.ts +32 -0
  782. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.js +36 -0
  783. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.cjs +49 -0
  784. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.d.ts +12 -0
  785. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.js +44 -0
  786. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.cjs +24 -0
  787. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.d.ts +9 -0
  788. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.js +19 -0
  789. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.cjs +22 -0
  790. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.d.ts +11 -0
  791. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js +17 -0
  792. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.cjs +38 -0
  793. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.d.ts +2 -0
  794. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js +33 -0
  795. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.cjs +15 -0
  796. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.d.ts +1 -0
  797. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.js +11 -0
  798. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.cjs +11 -0
  799. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.d.ts +1 -0
  800. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js +7 -0
  801. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.cjs +673 -0
  802. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.d.ts +75 -0
  803. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.js +669 -0
  804. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.cjs +2 -0
  805. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.d.ts +1 -0
  806. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vercel.types.js +1 -0
  807. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.cjs +44 -0
  808. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.d.ts +435 -0
  809. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.js +322 -0
  810. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.cjs +29 -0
  811. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.d.ts +6 -0
  812. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.js +27 -0
  813. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.cjs +49 -0
  814. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.d.ts +21 -0
  815. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.js +44 -0
  816. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.cjs +20 -0
  817. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.d.ts +2 -0
  818. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.js +2 -0
  819. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.cjs +286 -0
  820. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.d.ts +78 -0
  821. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.js +282 -0
  822. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.cjs +100 -0
  823. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.d.ts +30 -0
  824. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/vercel.js +96 -0
  825. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.cjs +1 -0
  826. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.d.cts +1 -0
  827. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.d.ts +1 -0
  828. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation/langchain.js +1 -0
  829. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.cjs +1 -0
  830. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.cts +1 -0
  831. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.ts +1 -0
  832. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.js +1 -0
  833. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.cjs +1 -0
  834. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.cts +1 -0
  835. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.ts +1 -0
  836. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.js +1 -0
  837. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.cjs +1 -0
  838. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.cts +1 -0
  839. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.ts +1 -0
  840. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.js +1 -0
  841. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.cjs +1 -0
  842. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.cts +1 -0
  843. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.ts +1 -0
  844. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.js +1 -0
  845. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.cjs +1 -0
  846. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.cts +1 -0
  847. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.ts +1 -0
  848. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.js +1 -0
  849. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/LICENSE +15 -0
  850. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/README.md +654 -0
  851. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/bin/semver.js +188 -0
  852. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/comparator.js +141 -0
  853. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/index.js +5 -0
  854. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/range.js +554 -0
  855. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/semver.js +302 -0
  856. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/clean.js +6 -0
  857. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/cmp.js +52 -0
  858. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/coerce.js +60 -0
  859. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-build.js +7 -0
  860. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-loose.js +3 -0
  861. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare.js +5 -0
  862. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/diff.js +65 -0
  863. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/eq.js +3 -0
  864. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gt.js +3 -0
  865. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gte.js +3 -0
  866. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/inc.js +19 -0
  867. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lt.js +3 -0
  868. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lte.js +3 -0
  869. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/major.js +3 -0
  870. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/minor.js +3 -0
  871. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/neq.js +3 -0
  872. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/parse.js +16 -0
  873. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/patch.js +3 -0
  874. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/prerelease.js +6 -0
  875. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rcompare.js +3 -0
  876. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rsort.js +3 -0
  877. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/satisfies.js +10 -0
  878. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/sort.js +3 -0
  879. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/valid.js +6 -0
  880. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/index.js +89 -0
  881. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/constants.js +35 -0
  882. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/debug.js +9 -0
  883. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/identifiers.js +23 -0
  884. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/lrucache.js +40 -0
  885. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/parse-options.js +15 -0
  886. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/re.js +217 -0
  887. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/package.json +77 -0
  888. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/preload.js +2 -0
  889. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/range.bnf +16 -0
  890. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/gtr.js +4 -0
  891. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/intersects.js +7 -0
  892. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/ltr.js +4 -0
  893. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/max-satisfying.js +25 -0
  894. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-satisfying.js +24 -0
  895. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-version.js +61 -0
  896. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/outside.js +80 -0
  897. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/simplify.js +47 -0
  898. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/subset.js +247 -0
  899. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/to-comparators.js +8 -0
  900. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/valid.js +11 -0
  901. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/CHANGELOG.md +292 -0
  902. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/CONTRIBUTING.md +18 -0
  903. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/LICENSE.md +9 -0
  904. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/README.md +584 -0
  905. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/bin/uuid +2 -0
  906. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
  907. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  908. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
  909. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
  910. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
  911. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
  912. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
  913. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
  914. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
  915. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
  916. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
  917. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  918. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
  919. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
  920. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
  921. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
  922. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  923. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  924. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  925. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
  926. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
  927. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/index.js +14 -0
  928. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/max.js +1 -0
  929. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/md5.js +194 -0
  930. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/native.js +4 -0
  931. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  932. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/parse.js +37 -0
  933. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  934. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/rng.js +17 -0
  935. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/sha1.js +76 -0
  936. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/stringify.js +31 -0
  937. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v1.js +125 -0
  938. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  939. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  940. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v35.js +55 -0
  941. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v4.js +25 -0
  942. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  943. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  944. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  945. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  946. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/validate.js +5 -0
  947. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-browser/version.js +8 -0
  948. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/index.js +14 -0
  949. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/max.js +1 -0
  950. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/md5.js +10 -0
  951. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/native.js +4 -0
  952. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/nil.js +1 -0
  953. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/parse.js +37 -0
  954. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/regex.js +1 -0
  955. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/rng.js +10 -0
  956. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/sha1.js +10 -0
  957. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/stringify.js +31 -0
  958. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v1.js +125 -0
  959. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  960. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v3.js +4 -0
  961. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v35.js +55 -0
  962. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v4.js +25 -0
  963. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v5.js +4 -0
  964. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v6.js +32 -0
  965. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  966. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/v7.js +146 -0
  967. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/validate.js +5 -0
  968. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/esm-node/version.js +8 -0
  969. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/index.js +104 -0
  970. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/max.js +7 -0
  971. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/md5-browser.js +200 -0
  972. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/md5.js +17 -0
  973. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/native-browser.js +10 -0
  974. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/native.js +11 -0
  975. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/nil.js +7 -0
  976. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/parse.js +44 -0
  977. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/regex.js +7 -0
  978. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/rng-browser.js +23 -0
  979. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/rng.js +17 -0
  980. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/sha1-browser.js +82 -0
  981. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/sha1.js +17 -0
  982. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/stringify.js +38 -0
  983. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/uuid-bin.js +75 -0
  984. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v1.js +131 -0
  985. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v1ToV6.js +26 -0
  986. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v3.js +11 -0
  987. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v35.js +63 -0
  988. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v4.js +32 -0
  989. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v5.js +11 -0
  990. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v6.js +38 -0
  991. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v6ToV1.js +26 -0
  992. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/v7.js +152 -0
  993. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/validate.js +12 -0
  994. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/dist/version.js +15 -0
  995. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/package.json +142 -0
  996. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/uuid/wrapper.mjs +15 -0
  997. package/dist/node_modules/@langchain/core/node_modules/langsmith/package.json +360 -0
  998. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.cjs +1 -0
  999. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.cts +1 -0
  1000. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.ts +1 -0
  1001. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.js +1 -0
  1002. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.cjs +1 -0
  1003. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.cts +1 -0
  1004. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.ts +1 -0
  1005. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.js +1 -0
  1006. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.cjs +1 -0
  1007. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.cts +1 -0
  1008. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.ts +1 -0
  1009. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.js +1 -0
  1010. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.cjs +1 -0
  1011. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.cts +1 -0
  1012. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.ts +1 -0
  1013. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.js +1 -0
  1014. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.cjs +1 -0
  1015. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.cts +1 -0
  1016. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.ts +1 -0
  1017. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.js +1 -0
  1018. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.cjs +1 -0
  1019. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.d.cts +1 -0
  1020. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.d.ts +1 -0
  1021. package/dist/node_modules/@langchain/core/node_modules/langsmith/vercel.js +1 -0
  1022. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.cjs +1 -0
  1023. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.cts +1 -0
  1024. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.ts +1 -0
  1025. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.js +1 -0
  1026. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.cjs +1 -0
  1027. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.cts +1 -0
  1028. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.ts +1 -0
  1029. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.js +1 -0
  1030. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.cjs +1 -0
  1031. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.cts +1 -0
  1032. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.ts +1 -0
  1033. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.js +1 -0
  1034. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.cjs +1 -0
  1035. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.d.cts +1 -0
  1036. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.d.ts +1 -0
  1037. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/vercel.js +1 -0
  1038. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.cjs +1 -0
  1039. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.cts +1 -0
  1040. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.ts +1 -0
  1041. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.js +1 -0
  1042. package/dist/node_modules/@langchain/core/node_modules/mustache/CHANGELOG.md +618 -0
  1043. package/dist/node_modules/@langchain/core/node_modules/mustache/LICENSE +11 -0
  1044. package/dist/node_modules/@langchain/core/node_modules/mustache/README.md +621 -0
  1045. package/dist/node_modules/@langchain/core/node_modules/mustache/bin/mustache +150 -0
  1046. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.js +772 -0
  1047. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.min.js +1 -0
  1048. package/dist/node_modules/@langchain/core/node_modules/mustache/mustache.mjs +764 -0
  1049. package/dist/node_modules/@langchain/core/node_modules/mustache/package.json +67 -0
  1050. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/dojo/mustache.js.post +4 -0
  1051. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/dojo/mustache.js.pre +9 -0
  1052. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/jquery/mustache.js.post +13 -0
  1053. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/jquery/mustache.js.pre +9 -0
  1054. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/mootools/mustache.js.post +5 -0
  1055. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/mootools/mustache.js.pre +2 -0
  1056. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/qooxdoo/mustache.js.post +9 -0
  1057. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/qooxdoo/mustache.js.pre +172 -0
  1058. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/yui3/mustache.js.post +4 -0
  1059. package/dist/node_modules/@langchain/core/node_modules/mustache/wrappers/yui3/mustache.js.pre +1 -0
  1060. package/dist/node_modules/@langchain/core/node_modules/p-finally/index.js +15 -0
  1061. package/dist/node_modules/@langchain/core/node_modules/p-finally/license +21 -0
  1062. package/dist/node_modules/@langchain/core/node_modules/p-finally/package.json +42 -0
  1063. package/dist/node_modules/@langchain/core/node_modules/p-finally/readme.md +47 -0
  1064. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/index.d.ts +101 -0
  1065. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/index.js +279 -0
  1066. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/lower-bound.d.ts +1 -0
  1067. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/lower-bound.js +21 -0
  1068. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/options.d.ts +64 -0
  1069. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/options.js +2 -0
  1070. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/priority-queue.d.ts +12 -0
  1071. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/priority-queue.js +32 -0
  1072. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/queue.d.ts +7 -0
  1073. package/dist/node_modules/@langchain/core/node_modules/p-queue/dist/queue.js +2 -0
  1074. package/dist/node_modules/@langchain/core/node_modules/p-queue/license +9 -0
  1075. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/LICENSE +21 -0
  1076. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/README.md +94 -0
  1077. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/index.d.ts +134 -0
  1078. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/index.js +336 -0
  1079. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/package.json +56 -0
  1080. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.js +340 -0
  1081. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js +1 -0
  1082. package/dist/node_modules/@langchain/core/node_modules/p-queue/node_modules/eventemitter3/umd/eventemitter3.min.js.map +1 -0
  1083. package/dist/node_modules/@langchain/core/node_modules/p-queue/package.json +92 -0
  1084. package/dist/node_modules/@langchain/core/node_modules/p-queue/readme.md +400 -0
  1085. package/dist/node_modules/@langchain/core/node_modules/p-retry/index.d.ts +106 -0
  1086. package/dist/node_modules/@langchain/core/node_modules/p-retry/index.js +85 -0
  1087. package/dist/node_modules/@langchain/core/node_modules/p-retry/license +9 -0
  1088. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/License +21 -0
  1089. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/README.md +227 -0
  1090. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/example/dns.js +31 -0
  1091. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/example/stop.js +40 -0
  1092. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/index.js +1 -0
  1093. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/lib/retry.js +100 -0
  1094. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/lib/retry_operation.js +162 -0
  1095. package/dist/node_modules/@langchain/core/node_modules/p-retry/node_modules/retry/package.json +36 -0
  1096. package/dist/node_modules/@langchain/core/node_modules/p-retry/package.json +51 -0
  1097. package/dist/node_modules/@langchain/core/node_modules/p-retry/readme.md +148 -0
  1098. package/dist/node_modules/@langchain/core/node_modules/p-timeout/index.d.ts +72 -0
  1099. package/dist/node_modules/@langchain/core/node_modules/p-timeout/index.js +57 -0
  1100. package/dist/node_modules/@langchain/core/node_modules/p-timeout/license +9 -0
  1101. package/dist/node_modules/@langchain/core/node_modules/p-timeout/package.json +45 -0
  1102. package/dist/node_modules/@langchain/core/node_modules/p-timeout/readme.md +87 -0
  1103. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/bin/uuid +2 -0
  1104. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
  1105. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  1106. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
  1107. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
  1108. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
  1109. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
  1110. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
  1111. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
  1112. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
  1113. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
  1114. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
  1115. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  1116. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
  1117. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
  1118. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
  1119. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
  1120. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  1121. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  1122. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  1123. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
  1124. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
  1125. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/index.js +14 -0
  1126. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/max.js +1 -0
  1127. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/md5.js +194 -0
  1128. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/native.js +4 -0
  1129. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  1130. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/parse.js +37 -0
  1131. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  1132. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/rng.js +17 -0
  1133. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/sha1.js +76 -0
  1134. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/stringify.js +31 -0
  1135. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v1.js +125 -0
  1136. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  1137. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  1138. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v35.js +55 -0
  1139. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v4.js +25 -0
  1140. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  1141. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  1142. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  1143. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  1144. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/validate.js +5 -0
  1145. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-browser/version.js +8 -0
  1146. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/index.js +14 -0
  1147. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/max.js +1 -0
  1148. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/md5.js +10 -0
  1149. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/native.js +4 -0
  1150. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/nil.js +1 -0
  1151. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/parse.js +37 -0
  1152. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/regex.js +1 -0
  1153. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/rng.js +10 -0
  1154. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/sha1.js +10 -0
  1155. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/stringify.js +31 -0
  1156. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v1.js +125 -0
  1157. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  1158. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v3.js +4 -0
  1159. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v35.js +55 -0
  1160. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v4.js +25 -0
  1161. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v5.js +4 -0
  1162. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v6.js +32 -0
  1163. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  1164. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/v7.js +146 -0
  1165. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/validate.js +5 -0
  1166. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/esm-node/version.js +8 -0
  1167. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/index.js +104 -0
  1168. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/max.js +7 -0
  1169. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/md5-browser.js +200 -0
  1170. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/md5.js +17 -0
  1171. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/native-browser.js +10 -0
  1172. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/native.js +11 -0
  1173. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/nil.js +7 -0
  1174. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/parse.js +44 -0
  1175. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/regex.js +7 -0
  1176. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/rng-browser.js +23 -0
  1177. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/rng.js +17 -0
  1178. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/sha1-browser.js +82 -0
  1179. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/sha1.js +17 -0
  1180. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/stringify.js +38 -0
  1181. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/uuid-bin.js +75 -0
  1182. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v1.js +131 -0
  1183. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v1ToV6.js +26 -0
  1184. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v3.js +11 -0
  1185. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v35.js +63 -0
  1186. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v4.js +32 -0
  1187. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v5.js +11 -0
  1188. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v6.js +38 -0
  1189. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v6ToV1.js +26 -0
  1190. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/v7.js +152 -0
  1191. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/validate.js +12 -0
  1192. package/dist/node_modules/@langchain/core/node_modules/uuid/dist/version.js +15 -0
  1193. package/dist/node_modules/@langchain/core/node_modules/uuid/package.json +142 -0
  1194. package/dist/node_modules/@langchain/core/node_modules/zod/LICENSE +21 -0
  1195. package/dist/node_modules/@langchain/core/node_modules/zod/README.md +3074 -0
  1196. package/dist/node_modules/@langchain/core/node_modules/zod/index.d.ts +2 -0
  1197. package/dist/node_modules/@langchain/core/node_modules/zod/lib/ZodError.d.ts +164 -0
  1198. package/dist/node_modules/@langchain/core/node_modules/zod/lib/ZodError.js +137 -0
  1199. package/dist/node_modules/@langchain/core/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1200. package/dist/node_modules/@langchain/core/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1201. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1202. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1203. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1204. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1205. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1206. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/index.js +59 -0
  1207. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1208. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1209. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1210. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/object.js +70 -0
  1211. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1212. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1213. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1214. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1215. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1216. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/string.js +55 -0
  1217. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1218. package/dist/node_modules/@langchain/core/node_modules/zod/lib/benchmarks/union.js +79 -0
  1219. package/dist/node_modules/@langchain/core/node_modules/zod/lib/errors.d.ts +5 -0
  1220. package/dist/node_modules/@langchain/core/node_modules/zod/lib/errors.js +17 -0
  1221. package/dist/node_modules/@langchain/core/node_modules/zod/lib/external.d.ts +6 -0
  1222. package/dist/node_modules/@langchain/core/node_modules/zod/lib/external.js +22 -0
  1223. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1224. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1225. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1226. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1227. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1228. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1229. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1230. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1231. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1232. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1233. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1234. package/dist/node_modules/@langchain/core/node_modules/zod/lib/helpers/util.js +142 -0
  1235. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.d.ts +4 -0
  1236. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.js +33 -0
  1237. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.mjs +4405 -0
  1238. package/dist/node_modules/@langchain/core/node_modules/zod/lib/index.umd.js +4520 -0
  1239. package/dist/node_modules/@langchain/core/node_modules/zod/lib/locales/en.d.ts +3 -0
  1240. package/dist/node_modules/@langchain/core/node_modules/zod/lib/locales/en.js +129 -0
  1241. package/dist/node_modules/@langchain/core/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1242. package/dist/node_modules/@langchain/core/node_modules/zod/lib/standard-schema.js +2 -0
  1243. package/dist/node_modules/@langchain/core/node_modules/zod/lib/types.d.ts +1062 -0
  1244. package/dist/node_modules/@langchain/core/node_modules/zod/lib/types.js +3846 -0
  1245. package/dist/node_modules/@langchain/core/node_modules/zod/package.json +122 -0
  1246. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.github/CR_logotype-full-color.png +0 -0
  1247. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.github/FUNDING.yml +1 -0
  1248. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/.prettierrc.json +1 -0
  1249. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/LICENSE +15 -0
  1250. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/README.md +371 -0
  1251. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/SECURITY.md +12 -0
  1252. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/changelog.md +77 -0
  1253. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/contributing.md +9 -0
  1254. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/createIndex.ts +32 -0
  1255. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/Options.js +48 -0
  1256. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/Refs.js +25 -0
  1257. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/errorMessages.js +19 -0
  1258. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/index.js +55 -0
  1259. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/package.json +1 -0
  1260. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parseDef.js +72 -0
  1261. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parseTypes.js +2 -0
  1262. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/any.js +7 -0
  1263. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/array.js +30 -0
  1264. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/bigint.js +53 -0
  1265. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/boolean.js +9 -0
  1266. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/branded.js +8 -0
  1267. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/catch.js +8 -0
  1268. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/date.js +50 -0
  1269. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/default.js +11 -0
  1270. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/effects.js +10 -0
  1271. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/enum.js +10 -0
  1272. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/intersection.js +56 -0
  1273. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/literal.js +25 -0
  1274. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/map.js +29 -0
  1275. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/nativeEnum.js +20 -0
  1276. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/never.js +9 -0
  1277. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/null.js +14 -0
  1278. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/nullable.js +37 -0
  1279. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/number.js +56 -0
  1280. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/object.js +59 -0
  1281. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/optional.js +24 -0
  1282. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/pipeline.js +24 -0
  1283. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/promise.js +8 -0
  1284. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/readonly.js +8 -0
  1285. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/record.js +64 -0
  1286. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/set.js +24 -0
  1287. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/string.js +357 -0
  1288. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/tuple.js +36 -0
  1289. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/undefined.js +9 -0
  1290. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/union.js +84 -0
  1291. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/parsers/unknown.js +7 -0
  1292. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/selectParser.js +110 -0
  1293. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/cjs/zodToJsonSchema.js +69 -0
  1294. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/Options.js +43 -0
  1295. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/Refs.js +21 -0
  1296. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
  1297. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/index.js +39 -0
  1298. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
  1299. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parseDef.js +68 -0
  1300. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +1 -0
  1301. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +3 -0
  1302. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +26 -0
  1303. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
  1304. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
  1305. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
  1306. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
  1307. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
  1308. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
  1309. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +6 -0
  1310. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
  1311. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
  1312. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
  1313. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +25 -0
  1314. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  1315. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +5 -0
  1316. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
  1317. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
  1318. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
  1319. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +55 -0
  1320. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  1321. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
  1322. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
  1323. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
  1324. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +60 -0
  1325. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
  1326. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +353 -0
  1327. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
  1328. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +5 -0
  1329. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
  1330. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +3 -0
  1331. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/selectParser.js +106 -0
  1332. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +66 -0
  1333. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/Options.d.ts +34 -0
  1334. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/Refs.d.ts +14 -0
  1335. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/errorMessages.d.ts +11 -0
  1336. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/index.d.ts +39 -0
  1337. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parseDef.d.ts +4 -0
  1338. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parseTypes.d.ts +34 -0
  1339. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/any.d.ts +2 -0
  1340. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/array.d.ts +12 -0
  1341. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/bigint.d.ts +14 -0
  1342. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/boolean.d.ts +4 -0
  1343. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/branded.d.ts +3 -0
  1344. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/catch.d.ts +3 -0
  1345. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/date.d.ts +15 -0
  1346. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/default.d.ts +6 -0
  1347. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/effects.d.ts +4 -0
  1348. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/enum.d.ts +6 -0
  1349. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/intersection.d.ts +8 -0
  1350. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/literal.d.ts +9 -0
  1351. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/map.d.ts +15 -0
  1352. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/nativeEnum.d.ts +6 -0
  1353. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/never.d.ts +4 -0
  1354. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/null.d.ts +5 -0
  1355. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/nullable.d.ts +10 -0
  1356. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/number.d.ts +13 -0
  1357. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/object.d.ts +10 -0
  1358. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/optional.d.ts +4 -0
  1359. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/pipeline.d.ts +5 -0
  1360. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/promise.d.ts +4 -0
  1361. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/readonly.d.ts +3 -0
  1362. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/record.d.ts +13 -0
  1363. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/set.d.ts +13 -0
  1364. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/string.d.ts +73 -0
  1365. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/tuple.d.ts +13 -0
  1366. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/undefined.d.ts +4 -0
  1367. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/union.d.ts +23 -0
  1368. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/parsers/unknown.d.ts +2 -0
  1369. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/selectParser.d.ts +5 -0
  1370. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist/types/zodToJsonSchema.d.ts +10 -0
  1371. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/index.js +12 -0
  1372. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/.package-lock.json +26 -0
  1373. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/LICENSE +21 -0
  1374. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/README.md +3074 -0
  1375. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/index.d.ts +2 -0
  1376. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/ZodError.d.ts +164 -0
  1377. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/ZodError.js +137 -0
  1378. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1379. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1380. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1381. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1382. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1383. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1384. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1385. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/index.js +59 -0
  1386. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1387. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1388. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1389. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/object.js +70 -0
  1390. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1391. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1392. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1393. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1394. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1395. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/string.js +55 -0
  1396. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1397. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/benchmarks/union.js +79 -0
  1398. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/errors.d.ts +5 -0
  1399. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/errors.js +17 -0
  1400. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/external.d.ts +6 -0
  1401. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/external.js +22 -0
  1402. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1403. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1404. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1405. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1406. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1407. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1408. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1409. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1410. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1411. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1412. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1413. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/helpers/util.js +142 -0
  1414. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.d.ts +4 -0
  1415. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.js +33 -0
  1416. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.mjs +4405 -0
  1417. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/index.umd.js +4520 -0
  1418. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/locales/en.d.ts +3 -0
  1419. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/locales/en.js +129 -0
  1420. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1421. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/standard-schema.js +2 -0
  1422. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/types.d.ts +1062 -0
  1423. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/lib/types.js +3846 -0
  1424. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/node_modules/zod/package.json +122 -0
  1425. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/package-lock.json +32 -0
  1426. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/cjs/package.json +9 -0
  1427. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/index.js +12 -0
  1428. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/.package-lock.json +26 -0
  1429. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/LICENSE +21 -0
  1430. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/README.md +3074 -0
  1431. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/index.d.ts +2 -0
  1432. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/ZodError.d.ts +164 -0
  1433. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/ZodError.js +137 -0
  1434. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1435. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1436. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1437. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1438. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1439. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1440. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1441. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/index.js +59 -0
  1442. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1443. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1444. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1445. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/object.js +70 -0
  1446. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1447. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1448. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1449. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1450. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1451. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/string.js +55 -0
  1452. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1453. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/benchmarks/union.js +79 -0
  1454. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/errors.d.ts +5 -0
  1455. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/errors.js +17 -0
  1456. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/external.d.ts +6 -0
  1457. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/external.js +22 -0
  1458. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1459. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1460. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1461. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1462. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1463. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1464. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1465. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1466. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1467. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1468. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1469. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/helpers/util.js +142 -0
  1470. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.d.ts +4 -0
  1471. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.js +33 -0
  1472. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.mjs +4405 -0
  1473. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/index.umd.js +4520 -0
  1474. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/locales/en.d.ts +3 -0
  1475. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/locales/en.js +129 -0
  1476. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1477. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/standard-schema.js +2 -0
  1478. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/types.d.ts +1062 -0
  1479. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/lib/types.js +3846 -0
  1480. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/node_modules/zod/package.json +122 -0
  1481. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/package-lock.json +32 -0
  1482. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/esm/package.json +11 -0
  1483. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/package.json +5 -0
  1484. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/index.ts +14 -0
  1485. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/.package-lock.json +29 -0
  1486. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/LICENSE +21 -0
  1487. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/README.md +3074 -0
  1488. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/index.d.ts +2 -0
  1489. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/ZodError.d.ts +164 -0
  1490. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/ZodError.js +137 -0
  1491. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  1492. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  1493. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  1494. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  1495. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  1496. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  1497. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  1498. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/index.js +59 -0
  1499. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  1500. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  1501. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  1502. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/object.js +70 -0
  1503. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  1504. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  1505. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  1506. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  1507. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  1508. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/string.js +55 -0
  1509. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  1510. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/benchmarks/union.js +79 -0
  1511. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/errors.d.ts +5 -0
  1512. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/errors.js +17 -0
  1513. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/external.d.ts +6 -0
  1514. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/external.js +22 -0
  1515. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  1516. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  1517. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  1518. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  1519. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  1520. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  1521. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  1522. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  1523. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  1524. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  1525. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/util.d.ts +82 -0
  1526. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/helpers/util.js +142 -0
  1527. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.d.ts +4 -0
  1528. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.js +33 -0
  1529. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.mjs +4405 -0
  1530. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/index.umd.js +4520 -0
  1531. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/locales/en.d.ts +3 -0
  1532. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/locales/en.js +129 -0
  1533. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/standard-schema.d.ts +102 -0
  1534. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/standard-schema.js +2 -0
  1535. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/types.d.ts +1062 -0
  1536. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/lib/types.js +3846 -0
  1537. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/node_modules/zod/package.json +122 -0
  1538. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/package-lock.json +35 -0
  1539. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/dist-test/types/package.json +9 -0
  1540. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/package.json +79 -0
  1541. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/postcjs.ts +3 -0
  1542. package/dist/node_modules/@langchain/core/node_modules/zod-to-json-schema/postesm.ts +3 -0
  1543. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.cjs +1 -0
  1544. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.d.cts +1 -0
  1545. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.d.ts +1 -0
  1546. package/dist/node_modules/@langchain/core/output_parsers/openai_functions.js +1 -0
  1547. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.cjs +1 -0
  1548. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.d.cts +1 -0
  1549. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.d.ts +1 -0
  1550. package/dist/node_modules/@langchain/core/output_parsers/openai_tools.js +1 -0
  1551. package/dist/node_modules/@langchain/core/output_parsers.cjs +1 -0
  1552. package/dist/node_modules/@langchain/core/output_parsers.d.cts +1 -0
  1553. package/dist/node_modules/@langchain/core/output_parsers.d.ts +1 -0
  1554. package/dist/node_modules/@langchain/core/output_parsers.js +1 -0
  1555. package/dist/node_modules/@langchain/core/outputs.cjs +1 -0
  1556. package/dist/node_modules/@langchain/core/outputs.d.cts +1 -0
  1557. package/dist/node_modules/@langchain/core/outputs.d.ts +1 -0
  1558. package/dist/node_modules/@langchain/core/outputs.js +1 -0
  1559. package/dist/node_modules/@langchain/core/package.json +1 -0
  1560. package/dist/node_modules/@langchain/core/prompt_values.cjs +1 -0
  1561. package/dist/node_modules/@langchain/core/prompt_values.d.cts +1 -0
  1562. package/dist/node_modules/@langchain/core/prompt_values.d.ts +1 -0
  1563. package/dist/node_modules/@langchain/core/prompt_values.js +1 -0
  1564. package/dist/node_modules/@langchain/core/prompts.cjs +1 -0
  1565. package/dist/node_modules/@langchain/core/prompts.d.cts +1 -0
  1566. package/dist/node_modules/@langchain/core/prompts.d.ts +1 -0
  1567. package/dist/node_modules/@langchain/core/prompts.js +1 -0
  1568. package/dist/node_modules/@langchain/core/retrievers/document_compressors.cjs +1 -0
  1569. package/dist/node_modules/@langchain/core/retrievers/document_compressors.d.cts +1 -0
  1570. package/dist/node_modules/@langchain/core/retrievers/document_compressors.d.ts +1 -0
  1571. package/dist/node_modules/@langchain/core/retrievers/document_compressors.js +1 -0
  1572. package/dist/node_modules/@langchain/core/retrievers.cjs +1 -0
  1573. package/dist/node_modules/@langchain/core/retrievers.d.cts +1 -0
  1574. package/dist/node_modules/@langchain/core/retrievers.d.ts +1 -0
  1575. package/dist/node_modules/@langchain/core/retrievers.js +1 -0
  1576. package/dist/node_modules/@langchain/core/runnables/graph.cjs +1 -0
  1577. package/dist/node_modules/@langchain/core/runnables/graph.d.cts +1 -0
  1578. package/dist/node_modules/@langchain/core/runnables/graph.d.ts +1 -0
  1579. package/dist/node_modules/@langchain/core/runnables/graph.js +1 -0
  1580. package/dist/node_modules/@langchain/core/runnables/remote.cjs +1 -0
  1581. package/dist/node_modules/@langchain/core/runnables/remote.d.cts +1 -0
  1582. package/dist/node_modules/@langchain/core/runnables/remote.d.ts +1 -0
  1583. package/dist/node_modules/@langchain/core/runnables/remote.js +1 -0
  1584. package/dist/node_modules/@langchain/core/runnables.cjs +1 -0
  1585. package/dist/node_modules/@langchain/core/runnables.d.cts +1 -0
  1586. package/dist/node_modules/@langchain/core/runnables.d.ts +1 -0
  1587. package/dist/node_modules/@langchain/core/runnables.js +1 -0
  1588. package/dist/node_modules/@langchain/core/singletons.cjs +1 -0
  1589. package/dist/node_modules/@langchain/core/singletons.d.cts +1 -0
  1590. package/dist/node_modules/@langchain/core/singletons.d.ts +1 -0
  1591. package/dist/node_modules/@langchain/core/singletons.js +1 -0
  1592. package/dist/node_modules/@langchain/core/stores.cjs +1 -0
  1593. package/dist/node_modules/@langchain/core/stores.d.cts +1 -0
  1594. package/dist/node_modules/@langchain/core/stores.d.ts +1 -0
  1595. package/dist/node_modules/@langchain/core/stores.js +1 -0
  1596. package/dist/node_modules/@langchain/core/structured_query.cjs +1 -0
  1597. package/dist/node_modules/@langchain/core/structured_query.d.cts +1 -0
  1598. package/dist/node_modules/@langchain/core/structured_query.d.ts +1 -0
  1599. package/dist/node_modules/@langchain/core/structured_query.js +1 -0
  1600. package/dist/node_modules/@langchain/core/tools.cjs +1 -0
  1601. package/dist/node_modules/@langchain/core/tools.d.cts +1 -0
  1602. package/dist/node_modules/@langchain/core/tools.d.ts +1 -0
  1603. package/dist/node_modules/@langchain/core/tools.js +1 -0
  1604. package/dist/node_modules/@langchain/core/tracers/base.cjs +1 -0
  1605. package/dist/node_modules/@langchain/core/tracers/base.d.cts +1 -0
  1606. package/dist/node_modules/@langchain/core/tracers/base.d.ts +1 -0
  1607. package/dist/node_modules/@langchain/core/tracers/base.js +1 -0
  1608. package/dist/node_modules/@langchain/core/tracers/console.cjs +1 -0
  1609. package/dist/node_modules/@langchain/core/tracers/console.d.cts +1 -0
  1610. package/dist/node_modules/@langchain/core/tracers/console.d.ts +1 -0
  1611. package/dist/node_modules/@langchain/core/tracers/console.js +1 -0
  1612. package/dist/node_modules/@langchain/core/tracers/initialize.cjs +1 -0
  1613. package/dist/node_modules/@langchain/core/tracers/initialize.d.cts +1 -0
  1614. package/dist/node_modules/@langchain/core/tracers/initialize.d.ts +1 -0
  1615. package/dist/node_modules/@langchain/core/tracers/initialize.js +1 -0
  1616. package/dist/node_modules/@langchain/core/tracers/log_stream.cjs +1 -0
  1617. package/dist/node_modules/@langchain/core/tracers/log_stream.d.cts +1 -0
  1618. package/dist/node_modules/@langchain/core/tracers/log_stream.d.ts +1 -0
  1619. package/dist/node_modules/@langchain/core/tracers/log_stream.js +1 -0
  1620. package/dist/node_modules/@langchain/core/tracers/run_collector.cjs +1 -0
  1621. package/dist/node_modules/@langchain/core/tracers/run_collector.d.cts +1 -0
  1622. package/dist/node_modules/@langchain/core/tracers/run_collector.d.ts +1 -0
  1623. package/dist/node_modules/@langchain/core/tracers/run_collector.js +1 -0
  1624. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.cjs +1 -0
  1625. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.d.cts +1 -0
  1626. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.d.ts +1 -0
  1627. package/dist/node_modules/@langchain/core/tracers/tracer_langchain.js +1 -0
  1628. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.cjs +1 -0
  1629. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.d.cts +1 -0
  1630. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.d.ts +1 -0
  1631. package/dist/node_modules/@langchain/core/tracers/tracer_langchain_v1.js +1 -0
  1632. package/dist/node_modules/@langchain/core/types/stream.cjs +1 -0
  1633. package/dist/node_modules/@langchain/core/types/stream.d.cts +1 -0
  1634. package/dist/node_modules/@langchain/core/types/stream.d.ts +1 -0
  1635. package/dist/node_modules/@langchain/core/types/stream.js +1 -0
  1636. package/dist/node_modules/@langchain/core/utils/async_caller.cjs +1 -0
  1637. package/dist/node_modules/@langchain/core/utils/async_caller.d.cts +1 -0
  1638. package/dist/node_modules/@langchain/core/utils/async_caller.d.ts +1 -0
  1639. package/dist/node_modules/@langchain/core/utils/async_caller.js +1 -0
  1640. package/dist/node_modules/@langchain/core/utils/chunk_array.cjs +1 -0
  1641. package/dist/node_modules/@langchain/core/utils/chunk_array.d.cts +1 -0
  1642. package/dist/node_modules/@langchain/core/utils/chunk_array.d.ts +1 -0
  1643. package/dist/node_modules/@langchain/core/utils/chunk_array.js +1 -0
  1644. package/dist/node_modules/@langchain/core/utils/env.cjs +1 -0
  1645. package/dist/node_modules/@langchain/core/utils/env.d.cts +1 -0
  1646. package/dist/node_modules/@langchain/core/utils/env.d.ts +1 -0
  1647. package/dist/node_modules/@langchain/core/utils/env.js +1 -0
  1648. package/dist/node_modules/@langchain/core/utils/event_source_parse.cjs +1 -0
  1649. package/dist/node_modules/@langchain/core/utils/event_source_parse.d.cts +1 -0
  1650. package/dist/node_modules/@langchain/core/utils/event_source_parse.d.ts +1 -0
  1651. package/dist/node_modules/@langchain/core/utils/event_source_parse.js +1 -0
  1652. package/dist/node_modules/@langchain/core/utils/function_calling.cjs +1 -0
  1653. package/dist/node_modules/@langchain/core/utils/function_calling.d.cts +1 -0
  1654. package/dist/node_modules/@langchain/core/utils/function_calling.d.ts +1 -0
  1655. package/dist/node_modules/@langchain/core/utils/function_calling.js +1 -0
  1656. package/dist/node_modules/@langchain/core/utils/hash.cjs +1 -0
  1657. package/dist/node_modules/@langchain/core/utils/hash.d.cts +1 -0
  1658. package/dist/node_modules/@langchain/core/utils/hash.d.ts +1 -0
  1659. package/dist/node_modules/@langchain/core/utils/hash.js +1 -0
  1660. package/dist/node_modules/@langchain/core/utils/json_patch.cjs +1 -0
  1661. package/dist/node_modules/@langchain/core/utils/json_patch.d.cts +1 -0
  1662. package/dist/node_modules/@langchain/core/utils/json_patch.d.ts +1 -0
  1663. package/dist/node_modules/@langchain/core/utils/json_patch.js +1 -0
  1664. package/dist/node_modules/@langchain/core/utils/json_schema.cjs +1 -0
  1665. package/dist/node_modules/@langchain/core/utils/json_schema.d.cts +1 -0
  1666. package/dist/node_modules/@langchain/core/utils/json_schema.d.ts +1 -0
  1667. package/dist/node_modules/@langchain/core/utils/json_schema.js +1 -0
  1668. package/dist/node_modules/@langchain/core/utils/math.cjs +1 -0
  1669. package/dist/node_modules/@langchain/core/utils/math.d.cts +1 -0
  1670. package/dist/node_modules/@langchain/core/utils/math.d.ts +1 -0
  1671. package/dist/node_modules/@langchain/core/utils/math.js +1 -0
  1672. package/dist/node_modules/@langchain/core/utils/stream.cjs +1 -0
  1673. package/dist/node_modules/@langchain/core/utils/stream.d.cts +1 -0
  1674. package/dist/node_modules/@langchain/core/utils/stream.d.ts +1 -0
  1675. package/dist/node_modules/@langchain/core/utils/stream.js +1 -0
  1676. package/dist/node_modules/@langchain/core/utils/testing.cjs +1 -0
  1677. package/dist/node_modules/@langchain/core/utils/testing.d.cts +1 -0
  1678. package/dist/node_modules/@langchain/core/utils/testing.d.ts +1 -0
  1679. package/dist/node_modules/@langchain/core/utils/testing.js +1 -0
  1680. package/dist/node_modules/@langchain/core/utils/tiktoken.cjs +1 -0
  1681. package/dist/node_modules/@langchain/core/utils/tiktoken.d.cts +1 -0
  1682. package/dist/node_modules/@langchain/core/utils/tiktoken.d.ts +1 -0
  1683. package/dist/node_modules/@langchain/core/utils/tiktoken.js +1 -0
  1684. package/dist/node_modules/@langchain/core/utils/types.cjs +1 -0
  1685. package/dist/node_modules/@langchain/core/utils/types.d.cts +1 -0
  1686. package/dist/node_modules/@langchain/core/utils/types.d.ts +1 -0
  1687. package/dist/node_modules/@langchain/core/utils/types.js +1 -0
  1688. package/dist/node_modules/@langchain/core/vectorstores.cjs +1 -0
  1689. package/dist/node_modules/@langchain/core/vectorstores.d.cts +1 -0
  1690. package/dist/node_modules/@langchain/core/vectorstores.d.ts +1 -0
  1691. package/dist/node_modules/@langchain/core/vectorstores.js +1 -0
  1692. package/dist/node_modules/@langchain/deepseek/LICENSE +21 -0
  1693. package/dist/node_modules/@langchain/deepseek/dist/chat_models.cjs +417 -0
  1694. package/dist/node_modules/@langchain/deepseek/dist/chat_models.d.ts +414 -0
  1695. package/dist/node_modules/@langchain/deepseek/dist/chat_models.js +413 -0
  1696. package/dist/node_modules/@langchain/deepseek/dist/index.cjs +17 -0
  1697. package/dist/node_modules/@langchain/deepseek/dist/index.d.ts +1 -0
  1698. package/dist/node_modules/@langchain/deepseek/dist/index.js +1 -0
  1699. package/dist/node_modules/@langchain/deepseek/index.cjs +37 -0
  1700. package/dist/node_modules/@langchain/deepseek/index.d.cts +1 -0
  1701. package/dist/node_modules/@langchain/deepseek/index.d.ts +1 -0
  1702. package/dist/node_modules/@langchain/deepseek/index.js +1 -0
  1703. package/dist/node_modules/@langchain/deepseek/package.json +1 -0
  1704. package/dist/node_modules/@langchain/openai/LICENSE +21 -0
  1705. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.cjs +647 -0
  1706. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.d.ts +456 -0
  1707. package/dist/node_modules/@langchain/openai/dist/azure/chat_models.js +643 -0
  1708. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.cjs +129 -0
  1709. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.d.ts +22 -0
  1710. package/dist/node_modules/@langchain/openai/dist/azure/embeddings.js +125 -0
  1711. package/dist/node_modules/@langchain/openai/dist/azure/llms.cjs +167 -0
  1712. package/dist/node_modules/@langchain/openai/dist/azure/llms.d.ts +27 -0
  1713. package/dist/node_modules/@langchain/openai/dist/azure/llms.js +163 -0
  1714. package/dist/node_modules/@langchain/openai/dist/chat_models.cjs +1769 -0
  1715. package/dist/node_modules/@langchain/openai/dist/chat_models.d.ts +759 -0
  1716. package/dist/node_modules/@langchain/openai/dist/chat_models.js +1763 -0
  1717. package/dist/node_modules/@langchain/openai/dist/embeddings.cjs +195 -0
  1718. package/dist/node_modules/@langchain/openai/dist/embeddings.d.ts +104 -0
  1719. package/dist/node_modules/@langchain/openai/dist/embeddings.js +191 -0
  1720. package/dist/node_modules/@langchain/openai/dist/index.cjs +32 -0
  1721. package/dist/node_modules/@langchain/openai/dist/index.d.ts +12 -0
  1722. package/dist/node_modules/@langchain/openai/dist/index.js +12 -0
  1723. package/dist/node_modules/@langchain/openai/dist/llms.cjs +470 -0
  1724. package/dist/node_modules/@langchain/openai/dist/llms.d.ts +117 -0
  1725. package/dist/node_modules/@langchain/openai/dist/llms.js +466 -0
  1726. package/dist/node_modules/@langchain/openai/dist/tools/dalle.cjs +193 -0
  1727. package/dist/node_modules/@langchain/openai/dist/tools/dalle.d.ts +111 -0
  1728. package/dist/node_modules/@langchain/openai/dist/tools/dalle.js +189 -0
  1729. package/dist/node_modules/@langchain/openai/dist/tools/index.cjs +17 -0
  1730. package/dist/node_modules/@langchain/openai/dist/tools/index.d.ts +1 -0
  1731. package/dist/node_modules/@langchain/openai/dist/tools/index.js +1 -0
  1732. package/dist/node_modules/@langchain/openai/dist/types.cjs +2 -0
  1733. package/dist/node_modules/@langchain/openai/dist/types.d.ts +218 -0
  1734. package/dist/node_modules/@langchain/openai/dist/types.js +1 -0
  1735. package/dist/node_modules/@langchain/openai/dist/utils/azure.cjs +51 -0
  1736. package/dist/node_modules/@langchain/openai/dist/utils/azure.d.ts +34 -0
  1737. package/dist/node_modules/@langchain/openai/dist/utils/azure.js +47 -0
  1738. package/dist/node_modules/@langchain/openai/dist/utils/errors.cjs +11 -0
  1739. package/dist/node_modules/@langchain/openai/dist/utils/errors.d.ts +2 -0
  1740. package/dist/node_modules/@langchain/openai/dist/utils/errors.js +7 -0
  1741. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.cjs +81 -0
  1742. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.d.ts +44 -0
  1743. package/dist/node_modules/@langchain/openai/dist/utils/openai-format-fndef.js +77 -0
  1744. package/dist/node_modules/@langchain/openai/dist/utils/openai.cjs +75 -0
  1745. package/dist/node_modules/@langchain/openai/dist/utils/openai.d.ts +20 -0
  1746. package/dist/node_modules/@langchain/openai/dist/utils/openai.js +68 -0
  1747. package/dist/node_modules/@langchain/openai/dist/utils/prompts.cjs +42 -0
  1748. package/dist/node_modules/@langchain/openai/dist/utils/prompts.d.ts +36 -0
  1749. package/dist/node_modules/@langchain/openai/dist/utils/prompts.js +38 -0
  1750. package/dist/node_modules/@langchain/openai/dist/utils/tools.cjs +54 -0
  1751. package/dist/node_modules/@langchain/openai/dist/utils/tools.d.ts +20 -0
  1752. package/dist/node_modules/@langchain/openai/dist/utils/tools.js +50 -0
  1753. package/dist/node_modules/@langchain/openai/index.cjs +37 -0
  1754. package/dist/node_modules/@langchain/openai/index.d.cts +1 -0
  1755. package/dist/node_modules/@langchain/openai/index.d.ts +1 -0
  1756. package/dist/node_modules/@langchain/openai/index.js +1 -0
  1757. package/dist/node_modules/@langchain/openai/package.json +1 -0
  1758. package/dist/server/collections/llm-services.d.ts +10 -0
  1759. package/dist/server/collections/llm-services.js +48 -0
  1760. package/dist/server/index.d.ts +11 -0
  1761. package/dist/server/index.js +51 -0
  1762. package/dist/server/llm-providers/deepseek.d.ts +16 -0
  1763. package/dist/server/llm-providers/deepseek.js +64 -0
  1764. package/dist/server/llm-providers/handlers/parse-messages.d.ts +9 -0
  1765. package/dist/server/llm-providers/handlers/parse-messages.js +70 -0
  1766. package/dist/server/llm-providers/openai.d.ts +18 -0
  1767. package/dist/server/llm-providers/openai.js +69 -0
  1768. package/dist/server/llm-providers/provider.d.ts +36 -0
  1769. package/dist/server/llm-providers/provider.js +104 -0
  1770. package/dist/server/manager/ai-manager.d.ts +26 -0
  1771. package/dist/server/manager/ai-manager.js +45 -0
  1772. package/dist/server/plugin.d.ts +21 -0
  1773. package/dist/server/plugin.js +83 -0
  1774. package/dist/server/resource/ai.d.ts +11 -0
  1775. package/dist/server/resource/ai.js +71 -0
  1776. package/dist/server/workflow/nodes/llm/index.d.ts +15 -0
  1777. package/dist/server/workflow/nodes/llm/index.js +127 -0
  1778. package/package.json +21 -0
  1779. package/server.d.ts +2 -0
  1780. package/server.js +1 -0
@@ -0,0 +1,4405 @@
1
+ var util;
2
+ (function (util) {
3
+ util.assertEqual = (val) => val;
4
+ function assertIs(_arg) { }
5
+ util.assertIs = assertIs;
6
+ function assertNever(_x) {
7
+ throw new Error();
8
+ }
9
+ util.assertNever = assertNever;
10
+ util.arrayToEnum = (items) => {
11
+ const obj = {};
12
+ for (const item of items) {
13
+ obj[item] = item;
14
+ }
15
+ return obj;
16
+ };
17
+ util.getValidEnumValues = (obj) => {
18
+ const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
19
+ const filtered = {};
20
+ for (const k of validKeys) {
21
+ filtered[k] = obj[k];
22
+ }
23
+ return util.objectValues(filtered);
24
+ };
25
+ util.objectValues = (obj) => {
26
+ return util.objectKeys(obj).map(function (e) {
27
+ return obj[e];
28
+ });
29
+ };
30
+ util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
31
+ ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
32
+ : (object) => {
33
+ const keys = [];
34
+ for (const key in object) {
35
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
36
+ keys.push(key);
37
+ }
38
+ }
39
+ return keys;
40
+ };
41
+ util.find = (arr, checker) => {
42
+ for (const item of arr) {
43
+ if (checker(item))
44
+ return item;
45
+ }
46
+ return undefined;
47
+ };
48
+ util.isInteger = typeof Number.isInteger === "function"
49
+ ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
50
+ : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
51
+ function joinValues(array, separator = " | ") {
52
+ return array
53
+ .map((val) => (typeof val === "string" ? `'${val}'` : val))
54
+ .join(separator);
55
+ }
56
+ util.joinValues = joinValues;
57
+ util.jsonStringifyReplacer = (_, value) => {
58
+ if (typeof value === "bigint") {
59
+ return value.toString();
60
+ }
61
+ return value;
62
+ };
63
+ })(util || (util = {}));
64
+ var objectUtil;
65
+ (function (objectUtil) {
66
+ objectUtil.mergeShapes = (first, second) => {
67
+ return {
68
+ ...first,
69
+ ...second, // second overwrites first
70
+ };
71
+ };
72
+ })(objectUtil || (objectUtil = {}));
73
+ const ZodParsedType = util.arrayToEnum([
74
+ "string",
75
+ "nan",
76
+ "number",
77
+ "integer",
78
+ "float",
79
+ "boolean",
80
+ "date",
81
+ "bigint",
82
+ "symbol",
83
+ "function",
84
+ "undefined",
85
+ "null",
86
+ "array",
87
+ "object",
88
+ "unknown",
89
+ "promise",
90
+ "void",
91
+ "never",
92
+ "map",
93
+ "set",
94
+ ]);
95
+ const getParsedType = (data) => {
96
+ const t = typeof data;
97
+ switch (t) {
98
+ case "undefined":
99
+ return ZodParsedType.undefined;
100
+ case "string":
101
+ return ZodParsedType.string;
102
+ case "number":
103
+ return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
104
+ case "boolean":
105
+ return ZodParsedType.boolean;
106
+ case "function":
107
+ return ZodParsedType.function;
108
+ case "bigint":
109
+ return ZodParsedType.bigint;
110
+ case "symbol":
111
+ return ZodParsedType.symbol;
112
+ case "object":
113
+ if (Array.isArray(data)) {
114
+ return ZodParsedType.array;
115
+ }
116
+ if (data === null) {
117
+ return ZodParsedType.null;
118
+ }
119
+ if (data.then &&
120
+ typeof data.then === "function" &&
121
+ data.catch &&
122
+ typeof data.catch === "function") {
123
+ return ZodParsedType.promise;
124
+ }
125
+ if (typeof Map !== "undefined" && data instanceof Map) {
126
+ return ZodParsedType.map;
127
+ }
128
+ if (typeof Set !== "undefined" && data instanceof Set) {
129
+ return ZodParsedType.set;
130
+ }
131
+ if (typeof Date !== "undefined" && data instanceof Date) {
132
+ return ZodParsedType.date;
133
+ }
134
+ return ZodParsedType.object;
135
+ default:
136
+ return ZodParsedType.unknown;
137
+ }
138
+ };
139
+
140
+ const ZodIssueCode = util.arrayToEnum([
141
+ "invalid_type",
142
+ "invalid_literal",
143
+ "custom",
144
+ "invalid_union",
145
+ "invalid_union_discriminator",
146
+ "invalid_enum_value",
147
+ "unrecognized_keys",
148
+ "invalid_arguments",
149
+ "invalid_return_type",
150
+ "invalid_date",
151
+ "invalid_string",
152
+ "too_small",
153
+ "too_big",
154
+ "invalid_intersection_types",
155
+ "not_multiple_of",
156
+ "not_finite",
157
+ ]);
158
+ const quotelessJson = (obj) => {
159
+ const json = JSON.stringify(obj, null, 2);
160
+ return json.replace(/"([^"]+)":/g, "$1:");
161
+ };
162
+ class ZodError extends Error {
163
+ get errors() {
164
+ return this.issues;
165
+ }
166
+ constructor(issues) {
167
+ super();
168
+ this.issues = [];
169
+ this.addIssue = (sub) => {
170
+ this.issues = [...this.issues, sub];
171
+ };
172
+ this.addIssues = (subs = []) => {
173
+ this.issues = [...this.issues, ...subs];
174
+ };
175
+ const actualProto = new.target.prototype;
176
+ if (Object.setPrototypeOf) {
177
+ // eslint-disable-next-line ban/ban
178
+ Object.setPrototypeOf(this, actualProto);
179
+ }
180
+ else {
181
+ this.__proto__ = actualProto;
182
+ }
183
+ this.name = "ZodError";
184
+ this.issues = issues;
185
+ }
186
+ format(_mapper) {
187
+ const mapper = _mapper ||
188
+ function (issue) {
189
+ return issue.message;
190
+ };
191
+ const fieldErrors = { _errors: [] };
192
+ const processError = (error) => {
193
+ for (const issue of error.issues) {
194
+ if (issue.code === "invalid_union") {
195
+ issue.unionErrors.map(processError);
196
+ }
197
+ else if (issue.code === "invalid_return_type") {
198
+ processError(issue.returnTypeError);
199
+ }
200
+ else if (issue.code === "invalid_arguments") {
201
+ processError(issue.argumentsError);
202
+ }
203
+ else if (issue.path.length === 0) {
204
+ fieldErrors._errors.push(mapper(issue));
205
+ }
206
+ else {
207
+ let curr = fieldErrors;
208
+ let i = 0;
209
+ while (i < issue.path.length) {
210
+ const el = issue.path[i];
211
+ const terminal = i === issue.path.length - 1;
212
+ if (!terminal) {
213
+ curr[el] = curr[el] || { _errors: [] };
214
+ // if (typeof el === "string") {
215
+ // curr[el] = curr[el] || { _errors: [] };
216
+ // } else if (typeof el === "number") {
217
+ // const errorArray: any = [];
218
+ // errorArray._errors = [];
219
+ // curr[el] = curr[el] || errorArray;
220
+ // }
221
+ }
222
+ else {
223
+ curr[el] = curr[el] || { _errors: [] };
224
+ curr[el]._errors.push(mapper(issue));
225
+ }
226
+ curr = curr[el];
227
+ i++;
228
+ }
229
+ }
230
+ }
231
+ };
232
+ processError(this);
233
+ return fieldErrors;
234
+ }
235
+ static assert(value) {
236
+ if (!(value instanceof ZodError)) {
237
+ throw new Error(`Not a ZodError: ${value}`);
238
+ }
239
+ }
240
+ toString() {
241
+ return this.message;
242
+ }
243
+ get message() {
244
+ return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
245
+ }
246
+ get isEmpty() {
247
+ return this.issues.length === 0;
248
+ }
249
+ flatten(mapper = (issue) => issue.message) {
250
+ const fieldErrors = {};
251
+ const formErrors = [];
252
+ for (const sub of this.issues) {
253
+ if (sub.path.length > 0) {
254
+ fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
255
+ fieldErrors[sub.path[0]].push(mapper(sub));
256
+ }
257
+ else {
258
+ formErrors.push(mapper(sub));
259
+ }
260
+ }
261
+ return { formErrors, fieldErrors };
262
+ }
263
+ get formErrors() {
264
+ return this.flatten();
265
+ }
266
+ }
267
+ ZodError.create = (issues) => {
268
+ const error = new ZodError(issues);
269
+ return error;
270
+ };
271
+
272
+ const errorMap = (issue, _ctx) => {
273
+ let message;
274
+ switch (issue.code) {
275
+ case ZodIssueCode.invalid_type:
276
+ if (issue.received === ZodParsedType.undefined) {
277
+ message = "Required";
278
+ }
279
+ else {
280
+ message = `Expected ${issue.expected}, received ${issue.received}`;
281
+ }
282
+ break;
283
+ case ZodIssueCode.invalid_literal:
284
+ message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
285
+ break;
286
+ case ZodIssueCode.unrecognized_keys:
287
+ message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
288
+ break;
289
+ case ZodIssueCode.invalid_union:
290
+ message = `Invalid input`;
291
+ break;
292
+ case ZodIssueCode.invalid_union_discriminator:
293
+ message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
294
+ break;
295
+ case ZodIssueCode.invalid_enum_value:
296
+ message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
297
+ break;
298
+ case ZodIssueCode.invalid_arguments:
299
+ message = `Invalid function arguments`;
300
+ break;
301
+ case ZodIssueCode.invalid_return_type:
302
+ message = `Invalid function return type`;
303
+ break;
304
+ case ZodIssueCode.invalid_date:
305
+ message = `Invalid date`;
306
+ break;
307
+ case ZodIssueCode.invalid_string:
308
+ if (typeof issue.validation === "object") {
309
+ if ("includes" in issue.validation) {
310
+ message = `Invalid input: must include "${issue.validation.includes}"`;
311
+ if (typeof issue.validation.position === "number") {
312
+ message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
313
+ }
314
+ }
315
+ else if ("startsWith" in issue.validation) {
316
+ message = `Invalid input: must start with "${issue.validation.startsWith}"`;
317
+ }
318
+ else if ("endsWith" in issue.validation) {
319
+ message = `Invalid input: must end with "${issue.validation.endsWith}"`;
320
+ }
321
+ else {
322
+ util.assertNever(issue.validation);
323
+ }
324
+ }
325
+ else if (issue.validation !== "regex") {
326
+ message = `Invalid ${issue.validation}`;
327
+ }
328
+ else {
329
+ message = "Invalid";
330
+ }
331
+ break;
332
+ case ZodIssueCode.too_small:
333
+ if (issue.type === "array")
334
+ message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
335
+ else if (issue.type === "string")
336
+ message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
337
+ else if (issue.type === "number")
338
+ message = `Number must be ${issue.exact
339
+ ? `exactly equal to `
340
+ : issue.inclusive
341
+ ? `greater than or equal to `
342
+ : `greater than `}${issue.minimum}`;
343
+ else if (issue.type === "date")
344
+ message = `Date must be ${issue.exact
345
+ ? `exactly equal to `
346
+ : issue.inclusive
347
+ ? `greater than or equal to `
348
+ : `greater than `}${new Date(Number(issue.minimum))}`;
349
+ else
350
+ message = "Invalid input";
351
+ break;
352
+ case ZodIssueCode.too_big:
353
+ if (issue.type === "array")
354
+ message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
355
+ else if (issue.type === "string")
356
+ message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
357
+ else if (issue.type === "number")
358
+ message = `Number must be ${issue.exact
359
+ ? `exactly`
360
+ : issue.inclusive
361
+ ? `less than or equal to`
362
+ : `less than`} ${issue.maximum}`;
363
+ else if (issue.type === "bigint")
364
+ message = `BigInt must be ${issue.exact
365
+ ? `exactly`
366
+ : issue.inclusive
367
+ ? `less than or equal to`
368
+ : `less than`} ${issue.maximum}`;
369
+ else if (issue.type === "date")
370
+ message = `Date must be ${issue.exact
371
+ ? `exactly`
372
+ : issue.inclusive
373
+ ? `smaller than or equal to`
374
+ : `smaller than`} ${new Date(Number(issue.maximum))}`;
375
+ else
376
+ message = "Invalid input";
377
+ break;
378
+ case ZodIssueCode.custom:
379
+ message = `Invalid input`;
380
+ break;
381
+ case ZodIssueCode.invalid_intersection_types:
382
+ message = `Intersection results could not be merged`;
383
+ break;
384
+ case ZodIssueCode.not_multiple_of:
385
+ message = `Number must be a multiple of ${issue.multipleOf}`;
386
+ break;
387
+ case ZodIssueCode.not_finite:
388
+ message = "Number must be finite";
389
+ break;
390
+ default:
391
+ message = _ctx.defaultError;
392
+ util.assertNever(issue);
393
+ }
394
+ return { message };
395
+ };
396
+
397
+ let overrideErrorMap = errorMap;
398
+ function setErrorMap(map) {
399
+ overrideErrorMap = map;
400
+ }
401
+ function getErrorMap() {
402
+ return overrideErrorMap;
403
+ }
404
+
405
+ const makeIssue = (params) => {
406
+ const { data, path, errorMaps, issueData } = params;
407
+ const fullPath = [...path, ...(issueData.path || [])];
408
+ const fullIssue = {
409
+ ...issueData,
410
+ path: fullPath,
411
+ };
412
+ if (issueData.message !== undefined) {
413
+ return {
414
+ ...issueData,
415
+ path: fullPath,
416
+ message: issueData.message,
417
+ };
418
+ }
419
+ let errorMessage = "";
420
+ const maps = errorMaps
421
+ .filter((m) => !!m)
422
+ .slice()
423
+ .reverse();
424
+ for (const map of maps) {
425
+ errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
426
+ }
427
+ return {
428
+ ...issueData,
429
+ path: fullPath,
430
+ message: errorMessage,
431
+ };
432
+ };
433
+ const EMPTY_PATH = [];
434
+ function addIssueToContext(ctx, issueData) {
435
+ const overrideMap = getErrorMap();
436
+ const issue = makeIssue({
437
+ issueData: issueData,
438
+ data: ctx.data,
439
+ path: ctx.path,
440
+ errorMaps: [
441
+ ctx.common.contextualErrorMap, // contextual error map is first priority
442
+ ctx.schemaErrorMap, // then schema-bound map if available
443
+ overrideMap, // then global override map
444
+ overrideMap === errorMap ? undefined : errorMap, // then global default map
445
+ ].filter((x) => !!x),
446
+ });
447
+ ctx.common.issues.push(issue);
448
+ }
449
+ class ParseStatus {
450
+ constructor() {
451
+ this.value = "valid";
452
+ }
453
+ dirty() {
454
+ if (this.value === "valid")
455
+ this.value = "dirty";
456
+ }
457
+ abort() {
458
+ if (this.value !== "aborted")
459
+ this.value = "aborted";
460
+ }
461
+ static mergeArray(status, results) {
462
+ const arrayValue = [];
463
+ for (const s of results) {
464
+ if (s.status === "aborted")
465
+ return INVALID;
466
+ if (s.status === "dirty")
467
+ status.dirty();
468
+ arrayValue.push(s.value);
469
+ }
470
+ return { status: status.value, value: arrayValue };
471
+ }
472
+ static async mergeObjectAsync(status, pairs) {
473
+ const syncPairs = [];
474
+ for (const pair of pairs) {
475
+ const key = await pair.key;
476
+ const value = await pair.value;
477
+ syncPairs.push({
478
+ key,
479
+ value,
480
+ });
481
+ }
482
+ return ParseStatus.mergeObjectSync(status, syncPairs);
483
+ }
484
+ static mergeObjectSync(status, pairs) {
485
+ const finalObject = {};
486
+ for (const pair of pairs) {
487
+ const { key, value } = pair;
488
+ if (key.status === "aborted")
489
+ return INVALID;
490
+ if (value.status === "aborted")
491
+ return INVALID;
492
+ if (key.status === "dirty")
493
+ status.dirty();
494
+ if (value.status === "dirty")
495
+ status.dirty();
496
+ if (key.value !== "__proto__" &&
497
+ (typeof value.value !== "undefined" || pair.alwaysSet)) {
498
+ finalObject[key.value] = value.value;
499
+ }
500
+ }
501
+ return { status: status.value, value: finalObject };
502
+ }
503
+ }
504
+ const INVALID = Object.freeze({
505
+ status: "aborted",
506
+ });
507
+ const DIRTY = (value) => ({ status: "dirty", value });
508
+ const OK = (value) => ({ status: "valid", value });
509
+ const isAborted = (x) => x.status === "aborted";
510
+ const isDirty = (x) => x.status === "dirty";
511
+ const isValid = (x) => x.status === "valid";
512
+ const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
513
+
514
+ /******************************************************************************
515
+ Copyright (c) Microsoft Corporation.
516
+
517
+ Permission to use, copy, modify, and/or distribute this software for any
518
+ purpose with or without fee is hereby granted.
519
+
520
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
521
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
522
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
523
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
524
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
525
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
526
+ PERFORMANCE OF THIS SOFTWARE.
527
+ ***************************************************************************** */
528
+
529
+ function __classPrivateFieldGet(receiver, state, kind, f) {
530
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
531
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
532
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
533
+ }
534
+
535
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
536
+ if (kind === "m") throw new TypeError("Private method is not writable");
537
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
538
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
539
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
540
+ }
541
+
542
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
543
+ var e = new Error(message);
544
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
545
+ };
546
+
547
+ var errorUtil;
548
+ (function (errorUtil) {
549
+ errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
550
+ errorUtil.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
551
+ })(errorUtil || (errorUtil = {}));
552
+
553
+ var _ZodEnum_cache, _ZodNativeEnum_cache;
554
+ class ParseInputLazyPath {
555
+ constructor(parent, value, path, key) {
556
+ this._cachedPath = [];
557
+ this.parent = parent;
558
+ this.data = value;
559
+ this._path = path;
560
+ this._key = key;
561
+ }
562
+ get path() {
563
+ if (!this._cachedPath.length) {
564
+ if (this._key instanceof Array) {
565
+ this._cachedPath.push(...this._path, ...this._key);
566
+ }
567
+ else {
568
+ this._cachedPath.push(...this._path, this._key);
569
+ }
570
+ }
571
+ return this._cachedPath;
572
+ }
573
+ }
574
+ const handleResult = (ctx, result) => {
575
+ if (isValid(result)) {
576
+ return { success: true, data: result.value };
577
+ }
578
+ else {
579
+ if (!ctx.common.issues.length) {
580
+ throw new Error("Validation failed but no issues detected.");
581
+ }
582
+ return {
583
+ success: false,
584
+ get error() {
585
+ if (this._error)
586
+ return this._error;
587
+ const error = new ZodError(ctx.common.issues);
588
+ this._error = error;
589
+ return this._error;
590
+ },
591
+ };
592
+ }
593
+ };
594
+ function processCreateParams(params) {
595
+ if (!params)
596
+ return {};
597
+ const { errorMap, invalid_type_error, required_error, description } = params;
598
+ if (errorMap && (invalid_type_error || required_error)) {
599
+ throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
600
+ }
601
+ if (errorMap)
602
+ return { errorMap: errorMap, description };
603
+ const customMap = (iss, ctx) => {
604
+ var _a, _b;
605
+ const { message } = params;
606
+ if (iss.code === "invalid_enum_value") {
607
+ return { message: message !== null && message !== void 0 ? message : ctx.defaultError };
608
+ }
609
+ if (typeof ctx.data === "undefined") {
610
+ return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };
611
+ }
612
+ if (iss.code !== "invalid_type")
613
+ return { message: ctx.defaultError };
614
+ return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };
615
+ };
616
+ return { errorMap: customMap, description };
617
+ }
618
+ class ZodType {
619
+ get description() {
620
+ return this._def.description;
621
+ }
622
+ _getType(input) {
623
+ return getParsedType(input.data);
624
+ }
625
+ _getOrReturnCtx(input, ctx) {
626
+ return (ctx || {
627
+ common: input.parent.common,
628
+ data: input.data,
629
+ parsedType: getParsedType(input.data),
630
+ schemaErrorMap: this._def.errorMap,
631
+ path: input.path,
632
+ parent: input.parent,
633
+ });
634
+ }
635
+ _processInputParams(input) {
636
+ return {
637
+ status: new ParseStatus(),
638
+ ctx: {
639
+ common: input.parent.common,
640
+ data: input.data,
641
+ parsedType: getParsedType(input.data),
642
+ schemaErrorMap: this._def.errorMap,
643
+ path: input.path,
644
+ parent: input.parent,
645
+ },
646
+ };
647
+ }
648
+ _parseSync(input) {
649
+ const result = this._parse(input);
650
+ if (isAsync(result)) {
651
+ throw new Error("Synchronous parse encountered promise.");
652
+ }
653
+ return result;
654
+ }
655
+ _parseAsync(input) {
656
+ const result = this._parse(input);
657
+ return Promise.resolve(result);
658
+ }
659
+ parse(data, params) {
660
+ const result = this.safeParse(data, params);
661
+ if (result.success)
662
+ return result.data;
663
+ throw result.error;
664
+ }
665
+ safeParse(data, params) {
666
+ var _a;
667
+ const ctx = {
668
+ common: {
669
+ issues: [],
670
+ async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,
671
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
672
+ },
673
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
674
+ schemaErrorMap: this._def.errorMap,
675
+ parent: null,
676
+ data,
677
+ parsedType: getParsedType(data),
678
+ };
679
+ const result = this._parseSync({ data, path: ctx.path, parent: ctx });
680
+ return handleResult(ctx, result);
681
+ }
682
+ "~validate"(data) {
683
+ var _a, _b;
684
+ const ctx = {
685
+ common: {
686
+ issues: [],
687
+ async: !!this["~standard"].async,
688
+ },
689
+ path: [],
690
+ schemaErrorMap: this._def.errorMap,
691
+ parent: null,
692
+ data,
693
+ parsedType: getParsedType(data),
694
+ };
695
+ if (!this["~standard"].async) {
696
+ try {
697
+ const result = this._parseSync({ data, path: [], parent: ctx });
698
+ return isValid(result)
699
+ ? {
700
+ value: result.value,
701
+ }
702
+ : {
703
+ issues: ctx.common.issues,
704
+ };
705
+ }
706
+ catch (err) {
707
+ if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
708
+ this["~standard"].async = true;
709
+ }
710
+ ctx.common = {
711
+ issues: [],
712
+ async: true,
713
+ };
714
+ }
715
+ }
716
+ return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)
717
+ ? {
718
+ value: result.value,
719
+ }
720
+ : {
721
+ issues: ctx.common.issues,
722
+ });
723
+ }
724
+ async parseAsync(data, params) {
725
+ const result = await this.safeParseAsync(data, params);
726
+ if (result.success)
727
+ return result.data;
728
+ throw result.error;
729
+ }
730
+ async safeParseAsync(data, params) {
731
+ const ctx = {
732
+ common: {
733
+ issues: [],
734
+ contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,
735
+ async: true,
736
+ },
737
+ path: (params === null || params === void 0 ? void 0 : params.path) || [],
738
+ schemaErrorMap: this._def.errorMap,
739
+ parent: null,
740
+ data,
741
+ parsedType: getParsedType(data),
742
+ };
743
+ const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
744
+ const result = await (isAsync(maybeAsyncResult)
745
+ ? maybeAsyncResult
746
+ : Promise.resolve(maybeAsyncResult));
747
+ return handleResult(ctx, result);
748
+ }
749
+ refine(check, message) {
750
+ const getIssueProperties = (val) => {
751
+ if (typeof message === "string" || typeof message === "undefined") {
752
+ return { message };
753
+ }
754
+ else if (typeof message === "function") {
755
+ return message(val);
756
+ }
757
+ else {
758
+ return message;
759
+ }
760
+ };
761
+ return this._refinement((val, ctx) => {
762
+ const result = check(val);
763
+ const setError = () => ctx.addIssue({
764
+ code: ZodIssueCode.custom,
765
+ ...getIssueProperties(val),
766
+ });
767
+ if (typeof Promise !== "undefined" && result instanceof Promise) {
768
+ return result.then((data) => {
769
+ if (!data) {
770
+ setError();
771
+ return false;
772
+ }
773
+ else {
774
+ return true;
775
+ }
776
+ });
777
+ }
778
+ if (!result) {
779
+ setError();
780
+ return false;
781
+ }
782
+ else {
783
+ return true;
784
+ }
785
+ });
786
+ }
787
+ refinement(check, refinementData) {
788
+ return this._refinement((val, ctx) => {
789
+ if (!check(val)) {
790
+ ctx.addIssue(typeof refinementData === "function"
791
+ ? refinementData(val, ctx)
792
+ : refinementData);
793
+ return false;
794
+ }
795
+ else {
796
+ return true;
797
+ }
798
+ });
799
+ }
800
+ _refinement(refinement) {
801
+ return new ZodEffects({
802
+ schema: this,
803
+ typeName: ZodFirstPartyTypeKind.ZodEffects,
804
+ effect: { type: "refinement", refinement },
805
+ });
806
+ }
807
+ superRefine(refinement) {
808
+ return this._refinement(refinement);
809
+ }
810
+ constructor(def) {
811
+ /** Alias of safeParseAsync */
812
+ this.spa = this.safeParseAsync;
813
+ this._def = def;
814
+ this.parse = this.parse.bind(this);
815
+ this.safeParse = this.safeParse.bind(this);
816
+ this.parseAsync = this.parseAsync.bind(this);
817
+ this.safeParseAsync = this.safeParseAsync.bind(this);
818
+ this.spa = this.spa.bind(this);
819
+ this.refine = this.refine.bind(this);
820
+ this.refinement = this.refinement.bind(this);
821
+ this.superRefine = this.superRefine.bind(this);
822
+ this.optional = this.optional.bind(this);
823
+ this.nullable = this.nullable.bind(this);
824
+ this.nullish = this.nullish.bind(this);
825
+ this.array = this.array.bind(this);
826
+ this.promise = this.promise.bind(this);
827
+ this.or = this.or.bind(this);
828
+ this.and = this.and.bind(this);
829
+ this.transform = this.transform.bind(this);
830
+ this.brand = this.brand.bind(this);
831
+ this.default = this.default.bind(this);
832
+ this.catch = this.catch.bind(this);
833
+ this.describe = this.describe.bind(this);
834
+ this.pipe = this.pipe.bind(this);
835
+ this.readonly = this.readonly.bind(this);
836
+ this.isNullable = this.isNullable.bind(this);
837
+ this.isOptional = this.isOptional.bind(this);
838
+ this["~standard"] = {
839
+ version: 1,
840
+ vendor: "zod",
841
+ validate: (data) => this["~validate"](data),
842
+ };
843
+ }
844
+ optional() {
845
+ return ZodOptional.create(this, this._def);
846
+ }
847
+ nullable() {
848
+ return ZodNullable.create(this, this._def);
849
+ }
850
+ nullish() {
851
+ return this.nullable().optional();
852
+ }
853
+ array() {
854
+ return ZodArray.create(this);
855
+ }
856
+ promise() {
857
+ return ZodPromise.create(this, this._def);
858
+ }
859
+ or(option) {
860
+ return ZodUnion.create([this, option], this._def);
861
+ }
862
+ and(incoming) {
863
+ return ZodIntersection.create(this, incoming, this._def);
864
+ }
865
+ transform(transform) {
866
+ return new ZodEffects({
867
+ ...processCreateParams(this._def),
868
+ schema: this,
869
+ typeName: ZodFirstPartyTypeKind.ZodEffects,
870
+ effect: { type: "transform", transform },
871
+ });
872
+ }
873
+ default(def) {
874
+ const defaultValueFunc = typeof def === "function" ? def : () => def;
875
+ return new ZodDefault({
876
+ ...processCreateParams(this._def),
877
+ innerType: this,
878
+ defaultValue: defaultValueFunc,
879
+ typeName: ZodFirstPartyTypeKind.ZodDefault,
880
+ });
881
+ }
882
+ brand() {
883
+ return new ZodBranded({
884
+ typeName: ZodFirstPartyTypeKind.ZodBranded,
885
+ type: this,
886
+ ...processCreateParams(this._def),
887
+ });
888
+ }
889
+ catch(def) {
890
+ const catchValueFunc = typeof def === "function" ? def : () => def;
891
+ return new ZodCatch({
892
+ ...processCreateParams(this._def),
893
+ innerType: this,
894
+ catchValue: catchValueFunc,
895
+ typeName: ZodFirstPartyTypeKind.ZodCatch,
896
+ });
897
+ }
898
+ describe(description) {
899
+ const This = this.constructor;
900
+ return new This({
901
+ ...this._def,
902
+ description,
903
+ });
904
+ }
905
+ pipe(target) {
906
+ return ZodPipeline.create(this, target);
907
+ }
908
+ readonly() {
909
+ return ZodReadonly.create(this);
910
+ }
911
+ isOptional() {
912
+ return this.safeParse(undefined).success;
913
+ }
914
+ isNullable() {
915
+ return this.safeParse(null).success;
916
+ }
917
+ }
918
+ const cuidRegex = /^c[^\s-]{8,}$/i;
919
+ const cuid2Regex = /^[0-9a-z]+$/;
920
+ const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
921
+ // const uuidRegex =
922
+ // /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
923
+ const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
924
+ const nanoidRegex = /^[a-z0-9_-]{21}$/i;
925
+ const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
926
+ const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
927
+ // from https://stackoverflow.com/a/46181/1550155
928
+ // old version: too slow, didn't support unicode
929
+ // const emailRegex = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
930
+ //old email regex
931
+ // const emailRegex = /^(([^<>()[\].,;:\s@"]+(\.[^<>()[\].,;:\s@"]+)*)|(".+"))@((?!-)([^<>()[\].,;:\s@"]+\.)+[^<>()[\].,;:\s@"]{1,})[^-<>()[\].,;:\s@"]$/i;
932
+ // eslint-disable-next-line
933
+ // const emailRegex =
934
+ // /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;
935
+ // const emailRegex =
936
+ // /^[a-zA-Z0-9\.\!\#\$\%\&\'\*\+\/\=\?\^\_\`\{\|\}\~\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
937
+ // const emailRegex =
938
+ // /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
939
+ const emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
940
+ // const emailRegex =
941
+ // /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\.[a-z0-9\-]+)*$/i;
942
+ // from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression
943
+ const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
944
+ let emojiRegex;
945
+ // faster, simpler, safer
946
+ const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
947
+ const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
948
+ // const ipv6Regex =
949
+ // /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
950
+ const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
951
+ const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
952
+ // https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
953
+ const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
954
+ // https://base64.guru/standards/base64url
955
+ const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
956
+ // simple
957
+ // const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
958
+ // no leap year validation
959
+ // const dateRegexSource = `\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\d|2\\d))`;
960
+ // with leap year validation
961
+ const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
962
+ const dateRegex = new RegExp(`^${dateRegexSource}$`);
963
+ function timeRegexSource(args) {
964
+ // let regex = `\\d{2}:\\d{2}:\\d{2}`;
965
+ let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
966
+ if (args.precision) {
967
+ regex = `${regex}\\.\\d{${args.precision}}`;
968
+ }
969
+ else if (args.precision == null) {
970
+ regex = `${regex}(\\.\\d+)?`;
971
+ }
972
+ return regex;
973
+ }
974
+ function timeRegex(args) {
975
+ return new RegExp(`^${timeRegexSource(args)}$`);
976
+ }
977
+ // Adapted from https://stackoverflow.com/a/3143231
978
+ function datetimeRegex(args) {
979
+ let regex = `${dateRegexSource}T${timeRegexSource(args)}`;
980
+ const opts = [];
981
+ opts.push(args.local ? `Z?` : `Z`);
982
+ if (args.offset)
983
+ opts.push(`([+-]\\d{2}:?\\d{2})`);
984
+ regex = `${regex}(${opts.join("|")})`;
985
+ return new RegExp(`^${regex}$`);
986
+ }
987
+ function isValidIP(ip, version) {
988
+ if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
989
+ return true;
990
+ }
991
+ if ((version === "v6" || !version) && ipv6Regex.test(ip)) {
992
+ return true;
993
+ }
994
+ return false;
995
+ }
996
+ function isValidJWT(jwt, alg) {
997
+ if (!jwtRegex.test(jwt))
998
+ return false;
999
+ try {
1000
+ const [header] = jwt.split(".");
1001
+ // Convert base64url to base64
1002
+ const base64 = header
1003
+ .replace(/-/g, "+")
1004
+ .replace(/_/g, "/")
1005
+ .padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
1006
+ const decoded = JSON.parse(atob(base64));
1007
+ if (typeof decoded !== "object" || decoded === null)
1008
+ return false;
1009
+ if (!decoded.typ || !decoded.alg)
1010
+ return false;
1011
+ if (alg && decoded.alg !== alg)
1012
+ return false;
1013
+ return true;
1014
+ }
1015
+ catch (_a) {
1016
+ return false;
1017
+ }
1018
+ }
1019
+ function isValidCidr(ip, version) {
1020
+ if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
1021
+ return true;
1022
+ }
1023
+ if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
1024
+ return true;
1025
+ }
1026
+ return false;
1027
+ }
1028
+ class ZodString extends ZodType {
1029
+ _parse(input) {
1030
+ if (this._def.coerce) {
1031
+ input.data = String(input.data);
1032
+ }
1033
+ const parsedType = this._getType(input);
1034
+ if (parsedType !== ZodParsedType.string) {
1035
+ const ctx = this._getOrReturnCtx(input);
1036
+ addIssueToContext(ctx, {
1037
+ code: ZodIssueCode.invalid_type,
1038
+ expected: ZodParsedType.string,
1039
+ received: ctx.parsedType,
1040
+ });
1041
+ return INVALID;
1042
+ }
1043
+ const status = new ParseStatus();
1044
+ let ctx = undefined;
1045
+ for (const check of this._def.checks) {
1046
+ if (check.kind === "min") {
1047
+ if (input.data.length < check.value) {
1048
+ ctx = this._getOrReturnCtx(input, ctx);
1049
+ addIssueToContext(ctx, {
1050
+ code: ZodIssueCode.too_small,
1051
+ minimum: check.value,
1052
+ type: "string",
1053
+ inclusive: true,
1054
+ exact: false,
1055
+ message: check.message,
1056
+ });
1057
+ status.dirty();
1058
+ }
1059
+ }
1060
+ else if (check.kind === "max") {
1061
+ if (input.data.length > check.value) {
1062
+ ctx = this._getOrReturnCtx(input, ctx);
1063
+ addIssueToContext(ctx, {
1064
+ code: ZodIssueCode.too_big,
1065
+ maximum: check.value,
1066
+ type: "string",
1067
+ inclusive: true,
1068
+ exact: false,
1069
+ message: check.message,
1070
+ });
1071
+ status.dirty();
1072
+ }
1073
+ }
1074
+ else if (check.kind === "length") {
1075
+ const tooBig = input.data.length > check.value;
1076
+ const tooSmall = input.data.length < check.value;
1077
+ if (tooBig || tooSmall) {
1078
+ ctx = this._getOrReturnCtx(input, ctx);
1079
+ if (tooBig) {
1080
+ addIssueToContext(ctx, {
1081
+ code: ZodIssueCode.too_big,
1082
+ maximum: check.value,
1083
+ type: "string",
1084
+ inclusive: true,
1085
+ exact: true,
1086
+ message: check.message,
1087
+ });
1088
+ }
1089
+ else if (tooSmall) {
1090
+ addIssueToContext(ctx, {
1091
+ code: ZodIssueCode.too_small,
1092
+ minimum: check.value,
1093
+ type: "string",
1094
+ inclusive: true,
1095
+ exact: true,
1096
+ message: check.message,
1097
+ });
1098
+ }
1099
+ status.dirty();
1100
+ }
1101
+ }
1102
+ else if (check.kind === "email") {
1103
+ if (!emailRegex.test(input.data)) {
1104
+ ctx = this._getOrReturnCtx(input, ctx);
1105
+ addIssueToContext(ctx, {
1106
+ validation: "email",
1107
+ code: ZodIssueCode.invalid_string,
1108
+ message: check.message,
1109
+ });
1110
+ status.dirty();
1111
+ }
1112
+ }
1113
+ else if (check.kind === "emoji") {
1114
+ if (!emojiRegex) {
1115
+ emojiRegex = new RegExp(_emojiRegex, "u");
1116
+ }
1117
+ if (!emojiRegex.test(input.data)) {
1118
+ ctx = this._getOrReturnCtx(input, ctx);
1119
+ addIssueToContext(ctx, {
1120
+ validation: "emoji",
1121
+ code: ZodIssueCode.invalid_string,
1122
+ message: check.message,
1123
+ });
1124
+ status.dirty();
1125
+ }
1126
+ }
1127
+ else if (check.kind === "uuid") {
1128
+ if (!uuidRegex.test(input.data)) {
1129
+ ctx = this._getOrReturnCtx(input, ctx);
1130
+ addIssueToContext(ctx, {
1131
+ validation: "uuid",
1132
+ code: ZodIssueCode.invalid_string,
1133
+ message: check.message,
1134
+ });
1135
+ status.dirty();
1136
+ }
1137
+ }
1138
+ else if (check.kind === "nanoid") {
1139
+ if (!nanoidRegex.test(input.data)) {
1140
+ ctx = this._getOrReturnCtx(input, ctx);
1141
+ addIssueToContext(ctx, {
1142
+ validation: "nanoid",
1143
+ code: ZodIssueCode.invalid_string,
1144
+ message: check.message,
1145
+ });
1146
+ status.dirty();
1147
+ }
1148
+ }
1149
+ else if (check.kind === "cuid") {
1150
+ if (!cuidRegex.test(input.data)) {
1151
+ ctx = this._getOrReturnCtx(input, ctx);
1152
+ addIssueToContext(ctx, {
1153
+ validation: "cuid",
1154
+ code: ZodIssueCode.invalid_string,
1155
+ message: check.message,
1156
+ });
1157
+ status.dirty();
1158
+ }
1159
+ }
1160
+ else if (check.kind === "cuid2") {
1161
+ if (!cuid2Regex.test(input.data)) {
1162
+ ctx = this._getOrReturnCtx(input, ctx);
1163
+ addIssueToContext(ctx, {
1164
+ validation: "cuid2",
1165
+ code: ZodIssueCode.invalid_string,
1166
+ message: check.message,
1167
+ });
1168
+ status.dirty();
1169
+ }
1170
+ }
1171
+ else if (check.kind === "ulid") {
1172
+ if (!ulidRegex.test(input.data)) {
1173
+ ctx = this._getOrReturnCtx(input, ctx);
1174
+ addIssueToContext(ctx, {
1175
+ validation: "ulid",
1176
+ code: ZodIssueCode.invalid_string,
1177
+ message: check.message,
1178
+ });
1179
+ status.dirty();
1180
+ }
1181
+ }
1182
+ else if (check.kind === "url") {
1183
+ try {
1184
+ new URL(input.data);
1185
+ }
1186
+ catch (_a) {
1187
+ ctx = this._getOrReturnCtx(input, ctx);
1188
+ addIssueToContext(ctx, {
1189
+ validation: "url",
1190
+ code: ZodIssueCode.invalid_string,
1191
+ message: check.message,
1192
+ });
1193
+ status.dirty();
1194
+ }
1195
+ }
1196
+ else if (check.kind === "regex") {
1197
+ check.regex.lastIndex = 0;
1198
+ const testResult = check.regex.test(input.data);
1199
+ if (!testResult) {
1200
+ ctx = this._getOrReturnCtx(input, ctx);
1201
+ addIssueToContext(ctx, {
1202
+ validation: "regex",
1203
+ code: ZodIssueCode.invalid_string,
1204
+ message: check.message,
1205
+ });
1206
+ status.dirty();
1207
+ }
1208
+ }
1209
+ else if (check.kind === "trim") {
1210
+ input.data = input.data.trim();
1211
+ }
1212
+ else if (check.kind === "includes") {
1213
+ if (!input.data.includes(check.value, check.position)) {
1214
+ ctx = this._getOrReturnCtx(input, ctx);
1215
+ addIssueToContext(ctx, {
1216
+ code: ZodIssueCode.invalid_string,
1217
+ validation: { includes: check.value, position: check.position },
1218
+ message: check.message,
1219
+ });
1220
+ status.dirty();
1221
+ }
1222
+ }
1223
+ else if (check.kind === "toLowerCase") {
1224
+ input.data = input.data.toLowerCase();
1225
+ }
1226
+ else if (check.kind === "toUpperCase") {
1227
+ input.data = input.data.toUpperCase();
1228
+ }
1229
+ else if (check.kind === "startsWith") {
1230
+ if (!input.data.startsWith(check.value)) {
1231
+ ctx = this._getOrReturnCtx(input, ctx);
1232
+ addIssueToContext(ctx, {
1233
+ code: ZodIssueCode.invalid_string,
1234
+ validation: { startsWith: check.value },
1235
+ message: check.message,
1236
+ });
1237
+ status.dirty();
1238
+ }
1239
+ }
1240
+ else if (check.kind === "endsWith") {
1241
+ if (!input.data.endsWith(check.value)) {
1242
+ ctx = this._getOrReturnCtx(input, ctx);
1243
+ addIssueToContext(ctx, {
1244
+ code: ZodIssueCode.invalid_string,
1245
+ validation: { endsWith: check.value },
1246
+ message: check.message,
1247
+ });
1248
+ status.dirty();
1249
+ }
1250
+ }
1251
+ else if (check.kind === "datetime") {
1252
+ const regex = datetimeRegex(check);
1253
+ if (!regex.test(input.data)) {
1254
+ ctx = this._getOrReturnCtx(input, ctx);
1255
+ addIssueToContext(ctx, {
1256
+ code: ZodIssueCode.invalid_string,
1257
+ validation: "datetime",
1258
+ message: check.message,
1259
+ });
1260
+ status.dirty();
1261
+ }
1262
+ }
1263
+ else if (check.kind === "date") {
1264
+ const regex = dateRegex;
1265
+ if (!regex.test(input.data)) {
1266
+ ctx = this._getOrReturnCtx(input, ctx);
1267
+ addIssueToContext(ctx, {
1268
+ code: ZodIssueCode.invalid_string,
1269
+ validation: "date",
1270
+ message: check.message,
1271
+ });
1272
+ status.dirty();
1273
+ }
1274
+ }
1275
+ else if (check.kind === "time") {
1276
+ const regex = timeRegex(check);
1277
+ if (!regex.test(input.data)) {
1278
+ ctx = this._getOrReturnCtx(input, ctx);
1279
+ addIssueToContext(ctx, {
1280
+ code: ZodIssueCode.invalid_string,
1281
+ validation: "time",
1282
+ message: check.message,
1283
+ });
1284
+ status.dirty();
1285
+ }
1286
+ }
1287
+ else if (check.kind === "duration") {
1288
+ if (!durationRegex.test(input.data)) {
1289
+ ctx = this._getOrReturnCtx(input, ctx);
1290
+ addIssueToContext(ctx, {
1291
+ validation: "duration",
1292
+ code: ZodIssueCode.invalid_string,
1293
+ message: check.message,
1294
+ });
1295
+ status.dirty();
1296
+ }
1297
+ }
1298
+ else if (check.kind === "ip") {
1299
+ if (!isValidIP(input.data, check.version)) {
1300
+ ctx = this._getOrReturnCtx(input, ctx);
1301
+ addIssueToContext(ctx, {
1302
+ validation: "ip",
1303
+ code: ZodIssueCode.invalid_string,
1304
+ message: check.message,
1305
+ });
1306
+ status.dirty();
1307
+ }
1308
+ }
1309
+ else if (check.kind === "jwt") {
1310
+ if (!isValidJWT(input.data, check.alg)) {
1311
+ ctx = this._getOrReturnCtx(input, ctx);
1312
+ addIssueToContext(ctx, {
1313
+ validation: "jwt",
1314
+ code: ZodIssueCode.invalid_string,
1315
+ message: check.message,
1316
+ });
1317
+ status.dirty();
1318
+ }
1319
+ }
1320
+ else if (check.kind === "cidr") {
1321
+ if (!isValidCidr(input.data, check.version)) {
1322
+ ctx = this._getOrReturnCtx(input, ctx);
1323
+ addIssueToContext(ctx, {
1324
+ validation: "cidr",
1325
+ code: ZodIssueCode.invalid_string,
1326
+ message: check.message,
1327
+ });
1328
+ status.dirty();
1329
+ }
1330
+ }
1331
+ else if (check.kind === "base64") {
1332
+ if (!base64Regex.test(input.data)) {
1333
+ ctx = this._getOrReturnCtx(input, ctx);
1334
+ addIssueToContext(ctx, {
1335
+ validation: "base64",
1336
+ code: ZodIssueCode.invalid_string,
1337
+ message: check.message,
1338
+ });
1339
+ status.dirty();
1340
+ }
1341
+ }
1342
+ else if (check.kind === "base64url") {
1343
+ if (!base64urlRegex.test(input.data)) {
1344
+ ctx = this._getOrReturnCtx(input, ctx);
1345
+ addIssueToContext(ctx, {
1346
+ validation: "base64url",
1347
+ code: ZodIssueCode.invalid_string,
1348
+ message: check.message,
1349
+ });
1350
+ status.dirty();
1351
+ }
1352
+ }
1353
+ else {
1354
+ util.assertNever(check);
1355
+ }
1356
+ }
1357
+ return { status: status.value, value: input.data };
1358
+ }
1359
+ _regex(regex, validation, message) {
1360
+ return this.refinement((data) => regex.test(data), {
1361
+ validation,
1362
+ code: ZodIssueCode.invalid_string,
1363
+ ...errorUtil.errToObj(message),
1364
+ });
1365
+ }
1366
+ _addCheck(check) {
1367
+ return new ZodString({
1368
+ ...this._def,
1369
+ checks: [...this._def.checks, check],
1370
+ });
1371
+ }
1372
+ email(message) {
1373
+ return this._addCheck({ kind: "email", ...errorUtil.errToObj(message) });
1374
+ }
1375
+ url(message) {
1376
+ return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
1377
+ }
1378
+ emoji(message) {
1379
+ return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
1380
+ }
1381
+ uuid(message) {
1382
+ return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
1383
+ }
1384
+ nanoid(message) {
1385
+ return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message) });
1386
+ }
1387
+ cuid(message) {
1388
+ return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
1389
+ }
1390
+ cuid2(message) {
1391
+ return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
1392
+ }
1393
+ ulid(message) {
1394
+ return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
1395
+ }
1396
+ base64(message) {
1397
+ return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
1398
+ }
1399
+ base64url(message) {
1400
+ // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
1401
+ return this._addCheck({
1402
+ kind: "base64url",
1403
+ ...errorUtil.errToObj(message),
1404
+ });
1405
+ }
1406
+ jwt(options) {
1407
+ return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
1408
+ }
1409
+ ip(options) {
1410
+ return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
1411
+ }
1412
+ cidr(options) {
1413
+ return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1414
+ }
1415
+ datetime(options) {
1416
+ var _a, _b;
1417
+ if (typeof options === "string") {
1418
+ return this._addCheck({
1419
+ kind: "datetime",
1420
+ precision: null,
1421
+ offset: false,
1422
+ local: false,
1423
+ message: options,
1424
+ });
1425
+ }
1426
+ return this._addCheck({
1427
+ kind: "datetime",
1428
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1429
+ offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
1430
+ local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,
1431
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1432
+ });
1433
+ }
1434
+ date(message) {
1435
+ return this._addCheck({ kind: "date", message });
1436
+ }
1437
+ time(options) {
1438
+ if (typeof options === "string") {
1439
+ return this._addCheck({
1440
+ kind: "time",
1441
+ precision: null,
1442
+ message: options,
1443
+ });
1444
+ }
1445
+ return this._addCheck({
1446
+ kind: "time",
1447
+ precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
1448
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1449
+ });
1450
+ }
1451
+ duration(message) {
1452
+ return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message) });
1453
+ }
1454
+ regex(regex, message) {
1455
+ return this._addCheck({
1456
+ kind: "regex",
1457
+ regex: regex,
1458
+ ...errorUtil.errToObj(message),
1459
+ });
1460
+ }
1461
+ includes(value, options) {
1462
+ return this._addCheck({
1463
+ kind: "includes",
1464
+ value: value,
1465
+ position: options === null || options === void 0 ? void 0 : options.position,
1466
+ ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),
1467
+ });
1468
+ }
1469
+ startsWith(value, message) {
1470
+ return this._addCheck({
1471
+ kind: "startsWith",
1472
+ value: value,
1473
+ ...errorUtil.errToObj(message),
1474
+ });
1475
+ }
1476
+ endsWith(value, message) {
1477
+ return this._addCheck({
1478
+ kind: "endsWith",
1479
+ value: value,
1480
+ ...errorUtil.errToObj(message),
1481
+ });
1482
+ }
1483
+ min(minLength, message) {
1484
+ return this._addCheck({
1485
+ kind: "min",
1486
+ value: minLength,
1487
+ ...errorUtil.errToObj(message),
1488
+ });
1489
+ }
1490
+ max(maxLength, message) {
1491
+ return this._addCheck({
1492
+ kind: "max",
1493
+ value: maxLength,
1494
+ ...errorUtil.errToObj(message),
1495
+ });
1496
+ }
1497
+ length(len, message) {
1498
+ return this._addCheck({
1499
+ kind: "length",
1500
+ value: len,
1501
+ ...errorUtil.errToObj(message),
1502
+ });
1503
+ }
1504
+ /**
1505
+ * Equivalent to `.min(1)`
1506
+ */
1507
+ nonempty(message) {
1508
+ return this.min(1, errorUtil.errToObj(message));
1509
+ }
1510
+ trim() {
1511
+ return new ZodString({
1512
+ ...this._def,
1513
+ checks: [...this._def.checks, { kind: "trim" }],
1514
+ });
1515
+ }
1516
+ toLowerCase() {
1517
+ return new ZodString({
1518
+ ...this._def,
1519
+ checks: [...this._def.checks, { kind: "toLowerCase" }],
1520
+ });
1521
+ }
1522
+ toUpperCase() {
1523
+ return new ZodString({
1524
+ ...this._def,
1525
+ checks: [...this._def.checks, { kind: "toUpperCase" }],
1526
+ });
1527
+ }
1528
+ get isDatetime() {
1529
+ return !!this._def.checks.find((ch) => ch.kind === "datetime");
1530
+ }
1531
+ get isDate() {
1532
+ return !!this._def.checks.find((ch) => ch.kind === "date");
1533
+ }
1534
+ get isTime() {
1535
+ return !!this._def.checks.find((ch) => ch.kind === "time");
1536
+ }
1537
+ get isDuration() {
1538
+ return !!this._def.checks.find((ch) => ch.kind === "duration");
1539
+ }
1540
+ get isEmail() {
1541
+ return !!this._def.checks.find((ch) => ch.kind === "email");
1542
+ }
1543
+ get isURL() {
1544
+ return !!this._def.checks.find((ch) => ch.kind === "url");
1545
+ }
1546
+ get isEmoji() {
1547
+ return !!this._def.checks.find((ch) => ch.kind === "emoji");
1548
+ }
1549
+ get isUUID() {
1550
+ return !!this._def.checks.find((ch) => ch.kind === "uuid");
1551
+ }
1552
+ get isNANOID() {
1553
+ return !!this._def.checks.find((ch) => ch.kind === "nanoid");
1554
+ }
1555
+ get isCUID() {
1556
+ return !!this._def.checks.find((ch) => ch.kind === "cuid");
1557
+ }
1558
+ get isCUID2() {
1559
+ return !!this._def.checks.find((ch) => ch.kind === "cuid2");
1560
+ }
1561
+ get isULID() {
1562
+ return !!this._def.checks.find((ch) => ch.kind === "ulid");
1563
+ }
1564
+ get isIP() {
1565
+ return !!this._def.checks.find((ch) => ch.kind === "ip");
1566
+ }
1567
+ get isCIDR() {
1568
+ return !!this._def.checks.find((ch) => ch.kind === "cidr");
1569
+ }
1570
+ get isBase64() {
1571
+ return !!this._def.checks.find((ch) => ch.kind === "base64");
1572
+ }
1573
+ get isBase64url() {
1574
+ // base64url encoding is a modification of base64 that can safely be used in URLs and filenames
1575
+ return !!this._def.checks.find((ch) => ch.kind === "base64url");
1576
+ }
1577
+ get minLength() {
1578
+ let min = null;
1579
+ for (const ch of this._def.checks) {
1580
+ if (ch.kind === "min") {
1581
+ if (min === null || ch.value > min)
1582
+ min = ch.value;
1583
+ }
1584
+ }
1585
+ return min;
1586
+ }
1587
+ get maxLength() {
1588
+ let max = null;
1589
+ for (const ch of this._def.checks) {
1590
+ if (ch.kind === "max") {
1591
+ if (max === null || ch.value < max)
1592
+ max = ch.value;
1593
+ }
1594
+ }
1595
+ return max;
1596
+ }
1597
+ }
1598
+ ZodString.create = (params) => {
1599
+ var _a;
1600
+ return new ZodString({
1601
+ checks: [],
1602
+ typeName: ZodFirstPartyTypeKind.ZodString,
1603
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
1604
+ ...processCreateParams(params),
1605
+ });
1606
+ };
1607
+ // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034
1608
+ function floatSafeRemainder(val, step) {
1609
+ const valDecCount = (val.toString().split(".")[1] || "").length;
1610
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
1611
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1612
+ const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
1613
+ const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
1614
+ return (valInt % stepInt) / Math.pow(10, decCount);
1615
+ }
1616
+ class ZodNumber extends ZodType {
1617
+ constructor() {
1618
+ super(...arguments);
1619
+ this.min = this.gte;
1620
+ this.max = this.lte;
1621
+ this.step = this.multipleOf;
1622
+ }
1623
+ _parse(input) {
1624
+ if (this._def.coerce) {
1625
+ input.data = Number(input.data);
1626
+ }
1627
+ const parsedType = this._getType(input);
1628
+ if (parsedType !== ZodParsedType.number) {
1629
+ const ctx = this._getOrReturnCtx(input);
1630
+ addIssueToContext(ctx, {
1631
+ code: ZodIssueCode.invalid_type,
1632
+ expected: ZodParsedType.number,
1633
+ received: ctx.parsedType,
1634
+ });
1635
+ return INVALID;
1636
+ }
1637
+ let ctx = undefined;
1638
+ const status = new ParseStatus();
1639
+ for (const check of this._def.checks) {
1640
+ if (check.kind === "int") {
1641
+ if (!util.isInteger(input.data)) {
1642
+ ctx = this._getOrReturnCtx(input, ctx);
1643
+ addIssueToContext(ctx, {
1644
+ code: ZodIssueCode.invalid_type,
1645
+ expected: "integer",
1646
+ received: "float",
1647
+ message: check.message,
1648
+ });
1649
+ status.dirty();
1650
+ }
1651
+ }
1652
+ else if (check.kind === "min") {
1653
+ const tooSmall = check.inclusive
1654
+ ? input.data < check.value
1655
+ : input.data <= check.value;
1656
+ if (tooSmall) {
1657
+ ctx = this._getOrReturnCtx(input, ctx);
1658
+ addIssueToContext(ctx, {
1659
+ code: ZodIssueCode.too_small,
1660
+ minimum: check.value,
1661
+ type: "number",
1662
+ inclusive: check.inclusive,
1663
+ exact: false,
1664
+ message: check.message,
1665
+ });
1666
+ status.dirty();
1667
+ }
1668
+ }
1669
+ else if (check.kind === "max") {
1670
+ const tooBig = check.inclusive
1671
+ ? input.data > check.value
1672
+ : input.data >= check.value;
1673
+ if (tooBig) {
1674
+ ctx = this._getOrReturnCtx(input, ctx);
1675
+ addIssueToContext(ctx, {
1676
+ code: ZodIssueCode.too_big,
1677
+ maximum: check.value,
1678
+ type: "number",
1679
+ inclusive: check.inclusive,
1680
+ exact: false,
1681
+ message: check.message,
1682
+ });
1683
+ status.dirty();
1684
+ }
1685
+ }
1686
+ else if (check.kind === "multipleOf") {
1687
+ if (floatSafeRemainder(input.data, check.value) !== 0) {
1688
+ ctx = this._getOrReturnCtx(input, ctx);
1689
+ addIssueToContext(ctx, {
1690
+ code: ZodIssueCode.not_multiple_of,
1691
+ multipleOf: check.value,
1692
+ message: check.message,
1693
+ });
1694
+ status.dirty();
1695
+ }
1696
+ }
1697
+ else if (check.kind === "finite") {
1698
+ if (!Number.isFinite(input.data)) {
1699
+ ctx = this._getOrReturnCtx(input, ctx);
1700
+ addIssueToContext(ctx, {
1701
+ code: ZodIssueCode.not_finite,
1702
+ message: check.message,
1703
+ });
1704
+ status.dirty();
1705
+ }
1706
+ }
1707
+ else {
1708
+ util.assertNever(check);
1709
+ }
1710
+ }
1711
+ return { status: status.value, value: input.data };
1712
+ }
1713
+ gte(value, message) {
1714
+ return this.setLimit("min", value, true, errorUtil.toString(message));
1715
+ }
1716
+ gt(value, message) {
1717
+ return this.setLimit("min", value, false, errorUtil.toString(message));
1718
+ }
1719
+ lte(value, message) {
1720
+ return this.setLimit("max", value, true, errorUtil.toString(message));
1721
+ }
1722
+ lt(value, message) {
1723
+ return this.setLimit("max", value, false, errorUtil.toString(message));
1724
+ }
1725
+ setLimit(kind, value, inclusive, message) {
1726
+ return new ZodNumber({
1727
+ ...this._def,
1728
+ checks: [
1729
+ ...this._def.checks,
1730
+ {
1731
+ kind,
1732
+ value,
1733
+ inclusive,
1734
+ message: errorUtil.toString(message),
1735
+ },
1736
+ ],
1737
+ });
1738
+ }
1739
+ _addCheck(check) {
1740
+ return new ZodNumber({
1741
+ ...this._def,
1742
+ checks: [...this._def.checks, check],
1743
+ });
1744
+ }
1745
+ int(message) {
1746
+ return this._addCheck({
1747
+ kind: "int",
1748
+ message: errorUtil.toString(message),
1749
+ });
1750
+ }
1751
+ positive(message) {
1752
+ return this._addCheck({
1753
+ kind: "min",
1754
+ value: 0,
1755
+ inclusive: false,
1756
+ message: errorUtil.toString(message),
1757
+ });
1758
+ }
1759
+ negative(message) {
1760
+ return this._addCheck({
1761
+ kind: "max",
1762
+ value: 0,
1763
+ inclusive: false,
1764
+ message: errorUtil.toString(message),
1765
+ });
1766
+ }
1767
+ nonpositive(message) {
1768
+ return this._addCheck({
1769
+ kind: "max",
1770
+ value: 0,
1771
+ inclusive: true,
1772
+ message: errorUtil.toString(message),
1773
+ });
1774
+ }
1775
+ nonnegative(message) {
1776
+ return this._addCheck({
1777
+ kind: "min",
1778
+ value: 0,
1779
+ inclusive: true,
1780
+ message: errorUtil.toString(message),
1781
+ });
1782
+ }
1783
+ multipleOf(value, message) {
1784
+ return this._addCheck({
1785
+ kind: "multipleOf",
1786
+ value: value,
1787
+ message: errorUtil.toString(message),
1788
+ });
1789
+ }
1790
+ finite(message) {
1791
+ return this._addCheck({
1792
+ kind: "finite",
1793
+ message: errorUtil.toString(message),
1794
+ });
1795
+ }
1796
+ safe(message) {
1797
+ return this._addCheck({
1798
+ kind: "min",
1799
+ inclusive: true,
1800
+ value: Number.MIN_SAFE_INTEGER,
1801
+ message: errorUtil.toString(message),
1802
+ })._addCheck({
1803
+ kind: "max",
1804
+ inclusive: true,
1805
+ value: Number.MAX_SAFE_INTEGER,
1806
+ message: errorUtil.toString(message),
1807
+ });
1808
+ }
1809
+ get minValue() {
1810
+ let min = null;
1811
+ for (const ch of this._def.checks) {
1812
+ if (ch.kind === "min") {
1813
+ if (min === null || ch.value > min)
1814
+ min = ch.value;
1815
+ }
1816
+ }
1817
+ return min;
1818
+ }
1819
+ get maxValue() {
1820
+ let max = null;
1821
+ for (const ch of this._def.checks) {
1822
+ if (ch.kind === "max") {
1823
+ if (max === null || ch.value < max)
1824
+ max = ch.value;
1825
+ }
1826
+ }
1827
+ return max;
1828
+ }
1829
+ get isInt() {
1830
+ return !!this._def.checks.find((ch) => ch.kind === "int" ||
1831
+ (ch.kind === "multipleOf" && util.isInteger(ch.value)));
1832
+ }
1833
+ get isFinite() {
1834
+ let max = null, min = null;
1835
+ for (const ch of this._def.checks) {
1836
+ if (ch.kind === "finite" ||
1837
+ ch.kind === "int" ||
1838
+ ch.kind === "multipleOf") {
1839
+ return true;
1840
+ }
1841
+ else if (ch.kind === "min") {
1842
+ if (min === null || ch.value > min)
1843
+ min = ch.value;
1844
+ }
1845
+ else if (ch.kind === "max") {
1846
+ if (max === null || ch.value < max)
1847
+ max = ch.value;
1848
+ }
1849
+ }
1850
+ return Number.isFinite(min) && Number.isFinite(max);
1851
+ }
1852
+ }
1853
+ ZodNumber.create = (params) => {
1854
+ return new ZodNumber({
1855
+ checks: [],
1856
+ typeName: ZodFirstPartyTypeKind.ZodNumber,
1857
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
1858
+ ...processCreateParams(params),
1859
+ });
1860
+ };
1861
+ class ZodBigInt extends ZodType {
1862
+ constructor() {
1863
+ super(...arguments);
1864
+ this.min = this.gte;
1865
+ this.max = this.lte;
1866
+ }
1867
+ _parse(input) {
1868
+ if (this._def.coerce) {
1869
+ try {
1870
+ input.data = BigInt(input.data);
1871
+ }
1872
+ catch (_a) {
1873
+ return this._getInvalidInput(input);
1874
+ }
1875
+ }
1876
+ const parsedType = this._getType(input);
1877
+ if (parsedType !== ZodParsedType.bigint) {
1878
+ return this._getInvalidInput(input);
1879
+ }
1880
+ let ctx = undefined;
1881
+ const status = new ParseStatus();
1882
+ for (const check of this._def.checks) {
1883
+ if (check.kind === "min") {
1884
+ const tooSmall = check.inclusive
1885
+ ? input.data < check.value
1886
+ : input.data <= check.value;
1887
+ if (tooSmall) {
1888
+ ctx = this._getOrReturnCtx(input, ctx);
1889
+ addIssueToContext(ctx, {
1890
+ code: ZodIssueCode.too_small,
1891
+ type: "bigint",
1892
+ minimum: check.value,
1893
+ inclusive: check.inclusive,
1894
+ message: check.message,
1895
+ });
1896
+ status.dirty();
1897
+ }
1898
+ }
1899
+ else if (check.kind === "max") {
1900
+ const tooBig = check.inclusive
1901
+ ? input.data > check.value
1902
+ : input.data >= check.value;
1903
+ if (tooBig) {
1904
+ ctx = this._getOrReturnCtx(input, ctx);
1905
+ addIssueToContext(ctx, {
1906
+ code: ZodIssueCode.too_big,
1907
+ type: "bigint",
1908
+ maximum: check.value,
1909
+ inclusive: check.inclusive,
1910
+ message: check.message,
1911
+ });
1912
+ status.dirty();
1913
+ }
1914
+ }
1915
+ else if (check.kind === "multipleOf") {
1916
+ if (input.data % check.value !== BigInt(0)) {
1917
+ ctx = this._getOrReturnCtx(input, ctx);
1918
+ addIssueToContext(ctx, {
1919
+ code: ZodIssueCode.not_multiple_of,
1920
+ multipleOf: check.value,
1921
+ message: check.message,
1922
+ });
1923
+ status.dirty();
1924
+ }
1925
+ }
1926
+ else {
1927
+ util.assertNever(check);
1928
+ }
1929
+ }
1930
+ return { status: status.value, value: input.data };
1931
+ }
1932
+ _getInvalidInput(input) {
1933
+ const ctx = this._getOrReturnCtx(input);
1934
+ addIssueToContext(ctx, {
1935
+ code: ZodIssueCode.invalid_type,
1936
+ expected: ZodParsedType.bigint,
1937
+ received: ctx.parsedType,
1938
+ });
1939
+ return INVALID;
1940
+ }
1941
+ gte(value, message) {
1942
+ return this.setLimit("min", value, true, errorUtil.toString(message));
1943
+ }
1944
+ gt(value, message) {
1945
+ return this.setLimit("min", value, false, errorUtil.toString(message));
1946
+ }
1947
+ lte(value, message) {
1948
+ return this.setLimit("max", value, true, errorUtil.toString(message));
1949
+ }
1950
+ lt(value, message) {
1951
+ return this.setLimit("max", value, false, errorUtil.toString(message));
1952
+ }
1953
+ setLimit(kind, value, inclusive, message) {
1954
+ return new ZodBigInt({
1955
+ ...this._def,
1956
+ checks: [
1957
+ ...this._def.checks,
1958
+ {
1959
+ kind,
1960
+ value,
1961
+ inclusive,
1962
+ message: errorUtil.toString(message),
1963
+ },
1964
+ ],
1965
+ });
1966
+ }
1967
+ _addCheck(check) {
1968
+ return new ZodBigInt({
1969
+ ...this._def,
1970
+ checks: [...this._def.checks, check],
1971
+ });
1972
+ }
1973
+ positive(message) {
1974
+ return this._addCheck({
1975
+ kind: "min",
1976
+ value: BigInt(0),
1977
+ inclusive: false,
1978
+ message: errorUtil.toString(message),
1979
+ });
1980
+ }
1981
+ negative(message) {
1982
+ return this._addCheck({
1983
+ kind: "max",
1984
+ value: BigInt(0),
1985
+ inclusive: false,
1986
+ message: errorUtil.toString(message),
1987
+ });
1988
+ }
1989
+ nonpositive(message) {
1990
+ return this._addCheck({
1991
+ kind: "max",
1992
+ value: BigInt(0),
1993
+ inclusive: true,
1994
+ message: errorUtil.toString(message),
1995
+ });
1996
+ }
1997
+ nonnegative(message) {
1998
+ return this._addCheck({
1999
+ kind: "min",
2000
+ value: BigInt(0),
2001
+ inclusive: true,
2002
+ message: errorUtil.toString(message),
2003
+ });
2004
+ }
2005
+ multipleOf(value, message) {
2006
+ return this._addCheck({
2007
+ kind: "multipleOf",
2008
+ value,
2009
+ message: errorUtil.toString(message),
2010
+ });
2011
+ }
2012
+ get minValue() {
2013
+ let min = null;
2014
+ for (const ch of this._def.checks) {
2015
+ if (ch.kind === "min") {
2016
+ if (min === null || ch.value > min)
2017
+ min = ch.value;
2018
+ }
2019
+ }
2020
+ return min;
2021
+ }
2022
+ get maxValue() {
2023
+ let max = null;
2024
+ for (const ch of this._def.checks) {
2025
+ if (ch.kind === "max") {
2026
+ if (max === null || ch.value < max)
2027
+ max = ch.value;
2028
+ }
2029
+ }
2030
+ return max;
2031
+ }
2032
+ }
2033
+ ZodBigInt.create = (params) => {
2034
+ var _a;
2035
+ return new ZodBigInt({
2036
+ checks: [],
2037
+ typeName: ZodFirstPartyTypeKind.ZodBigInt,
2038
+ coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,
2039
+ ...processCreateParams(params),
2040
+ });
2041
+ };
2042
+ class ZodBoolean extends ZodType {
2043
+ _parse(input) {
2044
+ if (this._def.coerce) {
2045
+ input.data = Boolean(input.data);
2046
+ }
2047
+ const parsedType = this._getType(input);
2048
+ if (parsedType !== ZodParsedType.boolean) {
2049
+ const ctx = this._getOrReturnCtx(input);
2050
+ addIssueToContext(ctx, {
2051
+ code: ZodIssueCode.invalid_type,
2052
+ expected: ZodParsedType.boolean,
2053
+ received: ctx.parsedType,
2054
+ });
2055
+ return INVALID;
2056
+ }
2057
+ return OK(input.data);
2058
+ }
2059
+ }
2060
+ ZodBoolean.create = (params) => {
2061
+ return new ZodBoolean({
2062
+ typeName: ZodFirstPartyTypeKind.ZodBoolean,
2063
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2064
+ ...processCreateParams(params),
2065
+ });
2066
+ };
2067
+ class ZodDate extends ZodType {
2068
+ _parse(input) {
2069
+ if (this._def.coerce) {
2070
+ input.data = new Date(input.data);
2071
+ }
2072
+ const parsedType = this._getType(input);
2073
+ if (parsedType !== ZodParsedType.date) {
2074
+ const ctx = this._getOrReturnCtx(input);
2075
+ addIssueToContext(ctx, {
2076
+ code: ZodIssueCode.invalid_type,
2077
+ expected: ZodParsedType.date,
2078
+ received: ctx.parsedType,
2079
+ });
2080
+ return INVALID;
2081
+ }
2082
+ if (isNaN(input.data.getTime())) {
2083
+ const ctx = this._getOrReturnCtx(input);
2084
+ addIssueToContext(ctx, {
2085
+ code: ZodIssueCode.invalid_date,
2086
+ });
2087
+ return INVALID;
2088
+ }
2089
+ const status = new ParseStatus();
2090
+ let ctx = undefined;
2091
+ for (const check of this._def.checks) {
2092
+ if (check.kind === "min") {
2093
+ if (input.data.getTime() < check.value) {
2094
+ ctx = this._getOrReturnCtx(input, ctx);
2095
+ addIssueToContext(ctx, {
2096
+ code: ZodIssueCode.too_small,
2097
+ message: check.message,
2098
+ inclusive: true,
2099
+ exact: false,
2100
+ minimum: check.value,
2101
+ type: "date",
2102
+ });
2103
+ status.dirty();
2104
+ }
2105
+ }
2106
+ else if (check.kind === "max") {
2107
+ if (input.data.getTime() > check.value) {
2108
+ ctx = this._getOrReturnCtx(input, ctx);
2109
+ addIssueToContext(ctx, {
2110
+ code: ZodIssueCode.too_big,
2111
+ message: check.message,
2112
+ inclusive: true,
2113
+ exact: false,
2114
+ maximum: check.value,
2115
+ type: "date",
2116
+ });
2117
+ status.dirty();
2118
+ }
2119
+ }
2120
+ else {
2121
+ util.assertNever(check);
2122
+ }
2123
+ }
2124
+ return {
2125
+ status: status.value,
2126
+ value: new Date(input.data.getTime()),
2127
+ };
2128
+ }
2129
+ _addCheck(check) {
2130
+ return new ZodDate({
2131
+ ...this._def,
2132
+ checks: [...this._def.checks, check],
2133
+ });
2134
+ }
2135
+ min(minDate, message) {
2136
+ return this._addCheck({
2137
+ kind: "min",
2138
+ value: minDate.getTime(),
2139
+ message: errorUtil.toString(message),
2140
+ });
2141
+ }
2142
+ max(maxDate, message) {
2143
+ return this._addCheck({
2144
+ kind: "max",
2145
+ value: maxDate.getTime(),
2146
+ message: errorUtil.toString(message),
2147
+ });
2148
+ }
2149
+ get minDate() {
2150
+ let min = null;
2151
+ for (const ch of this._def.checks) {
2152
+ if (ch.kind === "min") {
2153
+ if (min === null || ch.value > min)
2154
+ min = ch.value;
2155
+ }
2156
+ }
2157
+ return min != null ? new Date(min) : null;
2158
+ }
2159
+ get maxDate() {
2160
+ let max = null;
2161
+ for (const ch of this._def.checks) {
2162
+ if (ch.kind === "max") {
2163
+ if (max === null || ch.value < max)
2164
+ max = ch.value;
2165
+ }
2166
+ }
2167
+ return max != null ? new Date(max) : null;
2168
+ }
2169
+ }
2170
+ ZodDate.create = (params) => {
2171
+ return new ZodDate({
2172
+ checks: [],
2173
+ coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,
2174
+ typeName: ZodFirstPartyTypeKind.ZodDate,
2175
+ ...processCreateParams(params),
2176
+ });
2177
+ };
2178
+ class ZodSymbol extends ZodType {
2179
+ _parse(input) {
2180
+ const parsedType = this._getType(input);
2181
+ if (parsedType !== ZodParsedType.symbol) {
2182
+ const ctx = this._getOrReturnCtx(input);
2183
+ addIssueToContext(ctx, {
2184
+ code: ZodIssueCode.invalid_type,
2185
+ expected: ZodParsedType.symbol,
2186
+ received: ctx.parsedType,
2187
+ });
2188
+ return INVALID;
2189
+ }
2190
+ return OK(input.data);
2191
+ }
2192
+ }
2193
+ ZodSymbol.create = (params) => {
2194
+ return new ZodSymbol({
2195
+ typeName: ZodFirstPartyTypeKind.ZodSymbol,
2196
+ ...processCreateParams(params),
2197
+ });
2198
+ };
2199
+ class ZodUndefined extends ZodType {
2200
+ _parse(input) {
2201
+ const parsedType = this._getType(input);
2202
+ if (parsedType !== ZodParsedType.undefined) {
2203
+ const ctx = this._getOrReturnCtx(input);
2204
+ addIssueToContext(ctx, {
2205
+ code: ZodIssueCode.invalid_type,
2206
+ expected: ZodParsedType.undefined,
2207
+ received: ctx.parsedType,
2208
+ });
2209
+ return INVALID;
2210
+ }
2211
+ return OK(input.data);
2212
+ }
2213
+ }
2214
+ ZodUndefined.create = (params) => {
2215
+ return new ZodUndefined({
2216
+ typeName: ZodFirstPartyTypeKind.ZodUndefined,
2217
+ ...processCreateParams(params),
2218
+ });
2219
+ };
2220
+ class ZodNull extends ZodType {
2221
+ _parse(input) {
2222
+ const parsedType = this._getType(input);
2223
+ if (parsedType !== ZodParsedType.null) {
2224
+ const ctx = this._getOrReturnCtx(input);
2225
+ addIssueToContext(ctx, {
2226
+ code: ZodIssueCode.invalid_type,
2227
+ expected: ZodParsedType.null,
2228
+ received: ctx.parsedType,
2229
+ });
2230
+ return INVALID;
2231
+ }
2232
+ return OK(input.data);
2233
+ }
2234
+ }
2235
+ ZodNull.create = (params) => {
2236
+ return new ZodNull({
2237
+ typeName: ZodFirstPartyTypeKind.ZodNull,
2238
+ ...processCreateParams(params),
2239
+ });
2240
+ };
2241
+ class ZodAny extends ZodType {
2242
+ constructor() {
2243
+ super(...arguments);
2244
+ // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.
2245
+ this._any = true;
2246
+ }
2247
+ _parse(input) {
2248
+ return OK(input.data);
2249
+ }
2250
+ }
2251
+ ZodAny.create = (params) => {
2252
+ return new ZodAny({
2253
+ typeName: ZodFirstPartyTypeKind.ZodAny,
2254
+ ...processCreateParams(params),
2255
+ });
2256
+ };
2257
+ class ZodUnknown extends ZodType {
2258
+ constructor() {
2259
+ super(...arguments);
2260
+ // required
2261
+ this._unknown = true;
2262
+ }
2263
+ _parse(input) {
2264
+ return OK(input.data);
2265
+ }
2266
+ }
2267
+ ZodUnknown.create = (params) => {
2268
+ return new ZodUnknown({
2269
+ typeName: ZodFirstPartyTypeKind.ZodUnknown,
2270
+ ...processCreateParams(params),
2271
+ });
2272
+ };
2273
+ class ZodNever extends ZodType {
2274
+ _parse(input) {
2275
+ const ctx = this._getOrReturnCtx(input);
2276
+ addIssueToContext(ctx, {
2277
+ code: ZodIssueCode.invalid_type,
2278
+ expected: ZodParsedType.never,
2279
+ received: ctx.parsedType,
2280
+ });
2281
+ return INVALID;
2282
+ }
2283
+ }
2284
+ ZodNever.create = (params) => {
2285
+ return new ZodNever({
2286
+ typeName: ZodFirstPartyTypeKind.ZodNever,
2287
+ ...processCreateParams(params),
2288
+ });
2289
+ };
2290
+ class ZodVoid extends ZodType {
2291
+ _parse(input) {
2292
+ const parsedType = this._getType(input);
2293
+ if (parsedType !== ZodParsedType.undefined) {
2294
+ const ctx = this._getOrReturnCtx(input);
2295
+ addIssueToContext(ctx, {
2296
+ code: ZodIssueCode.invalid_type,
2297
+ expected: ZodParsedType.void,
2298
+ received: ctx.parsedType,
2299
+ });
2300
+ return INVALID;
2301
+ }
2302
+ return OK(input.data);
2303
+ }
2304
+ }
2305
+ ZodVoid.create = (params) => {
2306
+ return new ZodVoid({
2307
+ typeName: ZodFirstPartyTypeKind.ZodVoid,
2308
+ ...processCreateParams(params),
2309
+ });
2310
+ };
2311
+ class ZodArray extends ZodType {
2312
+ _parse(input) {
2313
+ const { ctx, status } = this._processInputParams(input);
2314
+ const def = this._def;
2315
+ if (ctx.parsedType !== ZodParsedType.array) {
2316
+ addIssueToContext(ctx, {
2317
+ code: ZodIssueCode.invalid_type,
2318
+ expected: ZodParsedType.array,
2319
+ received: ctx.parsedType,
2320
+ });
2321
+ return INVALID;
2322
+ }
2323
+ if (def.exactLength !== null) {
2324
+ const tooBig = ctx.data.length > def.exactLength.value;
2325
+ const tooSmall = ctx.data.length < def.exactLength.value;
2326
+ if (tooBig || tooSmall) {
2327
+ addIssueToContext(ctx, {
2328
+ code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,
2329
+ minimum: (tooSmall ? def.exactLength.value : undefined),
2330
+ maximum: (tooBig ? def.exactLength.value : undefined),
2331
+ type: "array",
2332
+ inclusive: true,
2333
+ exact: true,
2334
+ message: def.exactLength.message,
2335
+ });
2336
+ status.dirty();
2337
+ }
2338
+ }
2339
+ if (def.minLength !== null) {
2340
+ if (ctx.data.length < def.minLength.value) {
2341
+ addIssueToContext(ctx, {
2342
+ code: ZodIssueCode.too_small,
2343
+ minimum: def.minLength.value,
2344
+ type: "array",
2345
+ inclusive: true,
2346
+ exact: false,
2347
+ message: def.minLength.message,
2348
+ });
2349
+ status.dirty();
2350
+ }
2351
+ }
2352
+ if (def.maxLength !== null) {
2353
+ if (ctx.data.length > def.maxLength.value) {
2354
+ addIssueToContext(ctx, {
2355
+ code: ZodIssueCode.too_big,
2356
+ maximum: def.maxLength.value,
2357
+ type: "array",
2358
+ inclusive: true,
2359
+ exact: false,
2360
+ message: def.maxLength.message,
2361
+ });
2362
+ status.dirty();
2363
+ }
2364
+ }
2365
+ if (ctx.common.async) {
2366
+ return Promise.all([...ctx.data].map((item, i) => {
2367
+ return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2368
+ })).then((result) => {
2369
+ return ParseStatus.mergeArray(status, result);
2370
+ });
2371
+ }
2372
+ const result = [...ctx.data].map((item, i) => {
2373
+ return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
2374
+ });
2375
+ return ParseStatus.mergeArray(status, result);
2376
+ }
2377
+ get element() {
2378
+ return this._def.type;
2379
+ }
2380
+ min(minLength, message) {
2381
+ return new ZodArray({
2382
+ ...this._def,
2383
+ minLength: { value: minLength, message: errorUtil.toString(message) },
2384
+ });
2385
+ }
2386
+ max(maxLength, message) {
2387
+ return new ZodArray({
2388
+ ...this._def,
2389
+ maxLength: { value: maxLength, message: errorUtil.toString(message) },
2390
+ });
2391
+ }
2392
+ length(len, message) {
2393
+ return new ZodArray({
2394
+ ...this._def,
2395
+ exactLength: { value: len, message: errorUtil.toString(message) },
2396
+ });
2397
+ }
2398
+ nonempty(message) {
2399
+ return this.min(1, message);
2400
+ }
2401
+ }
2402
+ ZodArray.create = (schema, params) => {
2403
+ return new ZodArray({
2404
+ type: schema,
2405
+ minLength: null,
2406
+ maxLength: null,
2407
+ exactLength: null,
2408
+ typeName: ZodFirstPartyTypeKind.ZodArray,
2409
+ ...processCreateParams(params),
2410
+ });
2411
+ };
2412
+ function deepPartialify(schema) {
2413
+ if (schema instanceof ZodObject) {
2414
+ const newShape = {};
2415
+ for (const key in schema.shape) {
2416
+ const fieldSchema = schema.shape[key];
2417
+ newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));
2418
+ }
2419
+ return new ZodObject({
2420
+ ...schema._def,
2421
+ shape: () => newShape,
2422
+ });
2423
+ }
2424
+ else if (schema instanceof ZodArray) {
2425
+ return new ZodArray({
2426
+ ...schema._def,
2427
+ type: deepPartialify(schema.element),
2428
+ });
2429
+ }
2430
+ else if (schema instanceof ZodOptional) {
2431
+ return ZodOptional.create(deepPartialify(schema.unwrap()));
2432
+ }
2433
+ else if (schema instanceof ZodNullable) {
2434
+ return ZodNullable.create(deepPartialify(schema.unwrap()));
2435
+ }
2436
+ else if (schema instanceof ZodTuple) {
2437
+ return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));
2438
+ }
2439
+ else {
2440
+ return schema;
2441
+ }
2442
+ }
2443
+ class ZodObject extends ZodType {
2444
+ constructor() {
2445
+ super(...arguments);
2446
+ this._cached = null;
2447
+ /**
2448
+ * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.
2449
+ * If you want to pass through unknown properties, use `.passthrough()` instead.
2450
+ */
2451
+ this.nonstrict = this.passthrough;
2452
+ // extend<
2453
+ // Augmentation extends ZodRawShape,
2454
+ // NewOutput extends util.flatten<{
2455
+ // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
2456
+ // ? Augmentation[k]["_output"]
2457
+ // : k extends keyof Output
2458
+ // ? Output[k]
2459
+ // : never;
2460
+ // }>,
2461
+ // NewInput extends util.flatten<{
2462
+ // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
2463
+ // ? Augmentation[k]["_input"]
2464
+ // : k extends keyof Input
2465
+ // ? Input[k]
2466
+ // : never;
2467
+ // }>
2468
+ // >(
2469
+ // augmentation: Augmentation
2470
+ // ): ZodObject<
2471
+ // extendShape<T, Augmentation>,
2472
+ // UnknownKeys,
2473
+ // Catchall,
2474
+ // NewOutput,
2475
+ // NewInput
2476
+ // > {
2477
+ // return new ZodObject({
2478
+ // ...this._def,
2479
+ // shape: () => ({
2480
+ // ...this._def.shape(),
2481
+ // ...augmentation,
2482
+ // }),
2483
+ // }) as any;
2484
+ // }
2485
+ /**
2486
+ * @deprecated Use `.extend` instead
2487
+ * */
2488
+ this.augment = this.extend;
2489
+ }
2490
+ _getCached() {
2491
+ if (this._cached !== null)
2492
+ return this._cached;
2493
+ const shape = this._def.shape();
2494
+ const keys = util.objectKeys(shape);
2495
+ return (this._cached = { shape, keys });
2496
+ }
2497
+ _parse(input) {
2498
+ const parsedType = this._getType(input);
2499
+ if (parsedType !== ZodParsedType.object) {
2500
+ const ctx = this._getOrReturnCtx(input);
2501
+ addIssueToContext(ctx, {
2502
+ code: ZodIssueCode.invalid_type,
2503
+ expected: ZodParsedType.object,
2504
+ received: ctx.parsedType,
2505
+ });
2506
+ return INVALID;
2507
+ }
2508
+ const { status, ctx } = this._processInputParams(input);
2509
+ const { shape, keys: shapeKeys } = this._getCached();
2510
+ const extraKeys = [];
2511
+ if (!(this._def.catchall instanceof ZodNever &&
2512
+ this._def.unknownKeys === "strip")) {
2513
+ for (const key in ctx.data) {
2514
+ if (!shapeKeys.includes(key)) {
2515
+ extraKeys.push(key);
2516
+ }
2517
+ }
2518
+ }
2519
+ const pairs = [];
2520
+ for (const key of shapeKeys) {
2521
+ const keyValidator = shape[key];
2522
+ const value = ctx.data[key];
2523
+ pairs.push({
2524
+ key: { status: "valid", value: key },
2525
+ value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
2526
+ alwaysSet: key in ctx.data,
2527
+ });
2528
+ }
2529
+ if (this._def.catchall instanceof ZodNever) {
2530
+ const unknownKeys = this._def.unknownKeys;
2531
+ if (unknownKeys === "passthrough") {
2532
+ for (const key of extraKeys) {
2533
+ pairs.push({
2534
+ key: { status: "valid", value: key },
2535
+ value: { status: "valid", value: ctx.data[key] },
2536
+ });
2537
+ }
2538
+ }
2539
+ else if (unknownKeys === "strict") {
2540
+ if (extraKeys.length > 0) {
2541
+ addIssueToContext(ctx, {
2542
+ code: ZodIssueCode.unrecognized_keys,
2543
+ keys: extraKeys,
2544
+ });
2545
+ status.dirty();
2546
+ }
2547
+ }
2548
+ else if (unknownKeys === "strip") ;
2549
+ else {
2550
+ throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2551
+ }
2552
+ }
2553
+ else {
2554
+ // run catchall validation
2555
+ const catchall = this._def.catchall;
2556
+ for (const key of extraKeys) {
2557
+ const value = ctx.data[key];
2558
+ pairs.push({
2559
+ key: { status: "valid", value: key },
2560
+ value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)
2561
+ ),
2562
+ alwaysSet: key in ctx.data,
2563
+ });
2564
+ }
2565
+ }
2566
+ if (ctx.common.async) {
2567
+ return Promise.resolve()
2568
+ .then(async () => {
2569
+ const syncPairs = [];
2570
+ for (const pair of pairs) {
2571
+ const key = await pair.key;
2572
+ const value = await pair.value;
2573
+ syncPairs.push({
2574
+ key,
2575
+ value,
2576
+ alwaysSet: pair.alwaysSet,
2577
+ });
2578
+ }
2579
+ return syncPairs;
2580
+ })
2581
+ .then((syncPairs) => {
2582
+ return ParseStatus.mergeObjectSync(status, syncPairs);
2583
+ });
2584
+ }
2585
+ else {
2586
+ return ParseStatus.mergeObjectSync(status, pairs);
2587
+ }
2588
+ }
2589
+ get shape() {
2590
+ return this._def.shape();
2591
+ }
2592
+ strict(message) {
2593
+ errorUtil.errToObj;
2594
+ return new ZodObject({
2595
+ ...this._def,
2596
+ unknownKeys: "strict",
2597
+ ...(message !== undefined
2598
+ ? {
2599
+ errorMap: (issue, ctx) => {
2600
+ var _a, _b, _c, _d;
2601
+ const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
2602
+ if (issue.code === "unrecognized_keys")
2603
+ return {
2604
+ message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,
2605
+ };
2606
+ return {
2607
+ message: defaultError,
2608
+ };
2609
+ },
2610
+ }
2611
+ : {}),
2612
+ });
2613
+ }
2614
+ strip() {
2615
+ return new ZodObject({
2616
+ ...this._def,
2617
+ unknownKeys: "strip",
2618
+ });
2619
+ }
2620
+ passthrough() {
2621
+ return new ZodObject({
2622
+ ...this._def,
2623
+ unknownKeys: "passthrough",
2624
+ });
2625
+ }
2626
+ // const AugmentFactory =
2627
+ // <Def extends ZodObjectDef>(def: Def) =>
2628
+ // <Augmentation extends ZodRawShape>(
2629
+ // augmentation: Augmentation
2630
+ // ): ZodObject<
2631
+ // extendShape<ReturnType<Def["shape"]>, Augmentation>,
2632
+ // Def["unknownKeys"],
2633
+ // Def["catchall"]
2634
+ // > => {
2635
+ // return new ZodObject({
2636
+ // ...def,
2637
+ // shape: () => ({
2638
+ // ...def.shape(),
2639
+ // ...augmentation,
2640
+ // }),
2641
+ // }) as any;
2642
+ // };
2643
+ extend(augmentation) {
2644
+ return new ZodObject({
2645
+ ...this._def,
2646
+ shape: () => ({
2647
+ ...this._def.shape(),
2648
+ ...augmentation,
2649
+ }),
2650
+ });
2651
+ }
2652
+ /**
2653
+ * Prior to zod@1.0.12 there was a bug in the
2654
+ * inferred type of merged objects. Please
2655
+ * upgrade if you are experiencing issues.
2656
+ */
2657
+ merge(merging) {
2658
+ const merged = new ZodObject({
2659
+ unknownKeys: merging._def.unknownKeys,
2660
+ catchall: merging._def.catchall,
2661
+ shape: () => ({
2662
+ ...this._def.shape(),
2663
+ ...merging._def.shape(),
2664
+ }),
2665
+ typeName: ZodFirstPartyTypeKind.ZodObject,
2666
+ });
2667
+ return merged;
2668
+ }
2669
+ // merge<
2670
+ // Incoming extends AnyZodObject,
2671
+ // Augmentation extends Incoming["shape"],
2672
+ // NewOutput extends {
2673
+ // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation
2674
+ // ? Augmentation[k]["_output"]
2675
+ // : k extends keyof Output
2676
+ // ? Output[k]
2677
+ // : never;
2678
+ // },
2679
+ // NewInput extends {
2680
+ // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation
2681
+ // ? Augmentation[k]["_input"]
2682
+ // : k extends keyof Input
2683
+ // ? Input[k]
2684
+ // : never;
2685
+ // }
2686
+ // >(
2687
+ // merging: Incoming
2688
+ // ): ZodObject<
2689
+ // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2690
+ // Incoming["_def"]["unknownKeys"],
2691
+ // Incoming["_def"]["catchall"],
2692
+ // NewOutput,
2693
+ // NewInput
2694
+ // > {
2695
+ // const merged: any = new ZodObject({
2696
+ // unknownKeys: merging._def.unknownKeys,
2697
+ // catchall: merging._def.catchall,
2698
+ // shape: () =>
2699
+ // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2700
+ // typeName: ZodFirstPartyTypeKind.ZodObject,
2701
+ // }) as any;
2702
+ // return merged;
2703
+ // }
2704
+ setKey(key, schema) {
2705
+ return this.augment({ [key]: schema });
2706
+ }
2707
+ // merge<Incoming extends AnyZodObject>(
2708
+ // merging: Incoming
2709
+ // ): //ZodObject<T & Incoming["_shape"], UnknownKeys, Catchall> = (merging) => {
2710
+ // ZodObject<
2711
+ // extendShape<T, ReturnType<Incoming["_def"]["shape"]>>,
2712
+ // Incoming["_def"]["unknownKeys"],
2713
+ // Incoming["_def"]["catchall"]
2714
+ // > {
2715
+ // // const mergedShape = objectUtil.mergeShapes(
2716
+ // // this._def.shape(),
2717
+ // // merging._def.shape()
2718
+ // // );
2719
+ // const merged: any = new ZodObject({
2720
+ // unknownKeys: merging._def.unknownKeys,
2721
+ // catchall: merging._def.catchall,
2722
+ // shape: () =>
2723
+ // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),
2724
+ // typeName: ZodFirstPartyTypeKind.ZodObject,
2725
+ // }) as any;
2726
+ // return merged;
2727
+ // }
2728
+ catchall(index) {
2729
+ return new ZodObject({
2730
+ ...this._def,
2731
+ catchall: index,
2732
+ });
2733
+ }
2734
+ pick(mask) {
2735
+ const shape = {};
2736
+ util.objectKeys(mask).forEach((key) => {
2737
+ if (mask[key] && this.shape[key]) {
2738
+ shape[key] = this.shape[key];
2739
+ }
2740
+ });
2741
+ return new ZodObject({
2742
+ ...this._def,
2743
+ shape: () => shape,
2744
+ });
2745
+ }
2746
+ omit(mask) {
2747
+ const shape = {};
2748
+ util.objectKeys(this.shape).forEach((key) => {
2749
+ if (!mask[key]) {
2750
+ shape[key] = this.shape[key];
2751
+ }
2752
+ });
2753
+ return new ZodObject({
2754
+ ...this._def,
2755
+ shape: () => shape,
2756
+ });
2757
+ }
2758
+ /**
2759
+ * @deprecated
2760
+ */
2761
+ deepPartial() {
2762
+ return deepPartialify(this);
2763
+ }
2764
+ partial(mask) {
2765
+ const newShape = {};
2766
+ util.objectKeys(this.shape).forEach((key) => {
2767
+ const fieldSchema = this.shape[key];
2768
+ if (mask && !mask[key]) {
2769
+ newShape[key] = fieldSchema;
2770
+ }
2771
+ else {
2772
+ newShape[key] = fieldSchema.optional();
2773
+ }
2774
+ });
2775
+ return new ZodObject({
2776
+ ...this._def,
2777
+ shape: () => newShape,
2778
+ });
2779
+ }
2780
+ required(mask) {
2781
+ const newShape = {};
2782
+ util.objectKeys(this.shape).forEach((key) => {
2783
+ if (mask && !mask[key]) {
2784
+ newShape[key] = this.shape[key];
2785
+ }
2786
+ else {
2787
+ const fieldSchema = this.shape[key];
2788
+ let newField = fieldSchema;
2789
+ while (newField instanceof ZodOptional) {
2790
+ newField = newField._def.innerType;
2791
+ }
2792
+ newShape[key] = newField;
2793
+ }
2794
+ });
2795
+ return new ZodObject({
2796
+ ...this._def,
2797
+ shape: () => newShape,
2798
+ });
2799
+ }
2800
+ keyof() {
2801
+ return createZodEnum(util.objectKeys(this.shape));
2802
+ }
2803
+ }
2804
+ ZodObject.create = (shape, params) => {
2805
+ return new ZodObject({
2806
+ shape: () => shape,
2807
+ unknownKeys: "strip",
2808
+ catchall: ZodNever.create(),
2809
+ typeName: ZodFirstPartyTypeKind.ZodObject,
2810
+ ...processCreateParams(params),
2811
+ });
2812
+ };
2813
+ ZodObject.strictCreate = (shape, params) => {
2814
+ return new ZodObject({
2815
+ shape: () => shape,
2816
+ unknownKeys: "strict",
2817
+ catchall: ZodNever.create(),
2818
+ typeName: ZodFirstPartyTypeKind.ZodObject,
2819
+ ...processCreateParams(params),
2820
+ });
2821
+ };
2822
+ ZodObject.lazycreate = (shape, params) => {
2823
+ return new ZodObject({
2824
+ shape,
2825
+ unknownKeys: "strip",
2826
+ catchall: ZodNever.create(),
2827
+ typeName: ZodFirstPartyTypeKind.ZodObject,
2828
+ ...processCreateParams(params),
2829
+ });
2830
+ };
2831
+ class ZodUnion extends ZodType {
2832
+ _parse(input) {
2833
+ const { ctx } = this._processInputParams(input);
2834
+ const options = this._def.options;
2835
+ function handleResults(results) {
2836
+ // return first issue-free validation if it exists
2837
+ for (const result of results) {
2838
+ if (result.result.status === "valid") {
2839
+ return result.result;
2840
+ }
2841
+ }
2842
+ for (const result of results) {
2843
+ if (result.result.status === "dirty") {
2844
+ // add issues from dirty option
2845
+ ctx.common.issues.push(...result.ctx.common.issues);
2846
+ return result.result;
2847
+ }
2848
+ }
2849
+ // return invalid
2850
+ const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));
2851
+ addIssueToContext(ctx, {
2852
+ code: ZodIssueCode.invalid_union,
2853
+ unionErrors,
2854
+ });
2855
+ return INVALID;
2856
+ }
2857
+ if (ctx.common.async) {
2858
+ return Promise.all(options.map(async (option) => {
2859
+ const childCtx = {
2860
+ ...ctx,
2861
+ common: {
2862
+ ...ctx.common,
2863
+ issues: [],
2864
+ },
2865
+ parent: null,
2866
+ };
2867
+ return {
2868
+ result: await option._parseAsync({
2869
+ data: ctx.data,
2870
+ path: ctx.path,
2871
+ parent: childCtx,
2872
+ }),
2873
+ ctx: childCtx,
2874
+ };
2875
+ })).then(handleResults);
2876
+ }
2877
+ else {
2878
+ let dirty = undefined;
2879
+ const issues = [];
2880
+ for (const option of options) {
2881
+ const childCtx = {
2882
+ ...ctx,
2883
+ common: {
2884
+ ...ctx.common,
2885
+ issues: [],
2886
+ },
2887
+ parent: null,
2888
+ };
2889
+ const result = option._parseSync({
2890
+ data: ctx.data,
2891
+ path: ctx.path,
2892
+ parent: childCtx,
2893
+ });
2894
+ if (result.status === "valid") {
2895
+ return result;
2896
+ }
2897
+ else if (result.status === "dirty" && !dirty) {
2898
+ dirty = { result, ctx: childCtx };
2899
+ }
2900
+ if (childCtx.common.issues.length) {
2901
+ issues.push(childCtx.common.issues);
2902
+ }
2903
+ }
2904
+ if (dirty) {
2905
+ ctx.common.issues.push(...dirty.ctx.common.issues);
2906
+ return dirty.result;
2907
+ }
2908
+ const unionErrors = issues.map((issues) => new ZodError(issues));
2909
+ addIssueToContext(ctx, {
2910
+ code: ZodIssueCode.invalid_union,
2911
+ unionErrors,
2912
+ });
2913
+ return INVALID;
2914
+ }
2915
+ }
2916
+ get options() {
2917
+ return this._def.options;
2918
+ }
2919
+ }
2920
+ ZodUnion.create = (types, params) => {
2921
+ return new ZodUnion({
2922
+ options: types,
2923
+ typeName: ZodFirstPartyTypeKind.ZodUnion,
2924
+ ...processCreateParams(params),
2925
+ });
2926
+ };
2927
+ /////////////////////////////////////////////////////
2928
+ /////////////////////////////////////////////////////
2929
+ ////////// //////////
2930
+ ////////// ZodDiscriminatedUnion //////////
2931
+ ////////// //////////
2932
+ /////////////////////////////////////////////////////
2933
+ /////////////////////////////////////////////////////
2934
+ const getDiscriminator = (type) => {
2935
+ if (type instanceof ZodLazy) {
2936
+ return getDiscriminator(type.schema);
2937
+ }
2938
+ else if (type instanceof ZodEffects) {
2939
+ return getDiscriminator(type.innerType());
2940
+ }
2941
+ else if (type instanceof ZodLiteral) {
2942
+ return [type.value];
2943
+ }
2944
+ else if (type instanceof ZodEnum) {
2945
+ return type.options;
2946
+ }
2947
+ else if (type instanceof ZodNativeEnum) {
2948
+ // eslint-disable-next-line ban/ban
2949
+ return util.objectValues(type.enum);
2950
+ }
2951
+ else if (type instanceof ZodDefault) {
2952
+ return getDiscriminator(type._def.innerType);
2953
+ }
2954
+ else if (type instanceof ZodUndefined) {
2955
+ return [undefined];
2956
+ }
2957
+ else if (type instanceof ZodNull) {
2958
+ return [null];
2959
+ }
2960
+ else if (type instanceof ZodOptional) {
2961
+ return [undefined, ...getDiscriminator(type.unwrap())];
2962
+ }
2963
+ else if (type instanceof ZodNullable) {
2964
+ return [null, ...getDiscriminator(type.unwrap())];
2965
+ }
2966
+ else if (type instanceof ZodBranded) {
2967
+ return getDiscriminator(type.unwrap());
2968
+ }
2969
+ else if (type instanceof ZodReadonly) {
2970
+ return getDiscriminator(type.unwrap());
2971
+ }
2972
+ else if (type instanceof ZodCatch) {
2973
+ return getDiscriminator(type._def.innerType);
2974
+ }
2975
+ else {
2976
+ return [];
2977
+ }
2978
+ };
2979
+ class ZodDiscriminatedUnion extends ZodType {
2980
+ _parse(input) {
2981
+ const { ctx } = this._processInputParams(input);
2982
+ if (ctx.parsedType !== ZodParsedType.object) {
2983
+ addIssueToContext(ctx, {
2984
+ code: ZodIssueCode.invalid_type,
2985
+ expected: ZodParsedType.object,
2986
+ received: ctx.parsedType,
2987
+ });
2988
+ return INVALID;
2989
+ }
2990
+ const discriminator = this.discriminator;
2991
+ const discriminatorValue = ctx.data[discriminator];
2992
+ const option = this.optionsMap.get(discriminatorValue);
2993
+ if (!option) {
2994
+ addIssueToContext(ctx, {
2995
+ code: ZodIssueCode.invalid_union_discriminator,
2996
+ options: Array.from(this.optionsMap.keys()),
2997
+ path: [discriminator],
2998
+ });
2999
+ return INVALID;
3000
+ }
3001
+ if (ctx.common.async) {
3002
+ return option._parseAsync({
3003
+ data: ctx.data,
3004
+ path: ctx.path,
3005
+ parent: ctx,
3006
+ });
3007
+ }
3008
+ else {
3009
+ return option._parseSync({
3010
+ data: ctx.data,
3011
+ path: ctx.path,
3012
+ parent: ctx,
3013
+ });
3014
+ }
3015
+ }
3016
+ get discriminator() {
3017
+ return this._def.discriminator;
3018
+ }
3019
+ get options() {
3020
+ return this._def.options;
3021
+ }
3022
+ get optionsMap() {
3023
+ return this._def.optionsMap;
3024
+ }
3025
+ /**
3026
+ * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
3027
+ * However, it only allows a union of objects, all of which need to share a discriminator property. This property must
3028
+ * have a different value for each object in the union.
3029
+ * @param discriminator the name of the discriminator property
3030
+ * @param types an array of object schemas
3031
+ * @param params
3032
+ */
3033
+ static create(discriminator, options, params) {
3034
+ // Get all the valid discriminator values
3035
+ const optionsMap = new Map();
3036
+ // try {
3037
+ for (const type of options) {
3038
+ const discriminatorValues = getDiscriminator(type.shape[discriminator]);
3039
+ if (!discriminatorValues.length) {
3040
+ throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
3041
+ }
3042
+ for (const value of discriminatorValues) {
3043
+ if (optionsMap.has(value)) {
3044
+ throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
3045
+ }
3046
+ optionsMap.set(value, type);
3047
+ }
3048
+ }
3049
+ return new ZodDiscriminatedUnion({
3050
+ typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
3051
+ discriminator,
3052
+ options,
3053
+ optionsMap,
3054
+ ...processCreateParams(params),
3055
+ });
3056
+ }
3057
+ }
3058
+ function mergeValues(a, b) {
3059
+ const aType = getParsedType(a);
3060
+ const bType = getParsedType(b);
3061
+ if (a === b) {
3062
+ return { valid: true, data: a };
3063
+ }
3064
+ else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
3065
+ const bKeys = util.objectKeys(b);
3066
+ const sharedKeys = util
3067
+ .objectKeys(a)
3068
+ .filter((key) => bKeys.indexOf(key) !== -1);
3069
+ const newObj = { ...a, ...b };
3070
+ for (const key of sharedKeys) {
3071
+ const sharedValue = mergeValues(a[key], b[key]);
3072
+ if (!sharedValue.valid) {
3073
+ return { valid: false };
3074
+ }
3075
+ newObj[key] = sharedValue.data;
3076
+ }
3077
+ return { valid: true, data: newObj };
3078
+ }
3079
+ else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
3080
+ if (a.length !== b.length) {
3081
+ return { valid: false };
3082
+ }
3083
+ const newArray = [];
3084
+ for (let index = 0; index < a.length; index++) {
3085
+ const itemA = a[index];
3086
+ const itemB = b[index];
3087
+ const sharedValue = mergeValues(itemA, itemB);
3088
+ if (!sharedValue.valid) {
3089
+ return { valid: false };
3090
+ }
3091
+ newArray.push(sharedValue.data);
3092
+ }
3093
+ return { valid: true, data: newArray };
3094
+ }
3095
+ else if (aType === ZodParsedType.date &&
3096
+ bType === ZodParsedType.date &&
3097
+ +a === +b) {
3098
+ return { valid: true, data: a };
3099
+ }
3100
+ else {
3101
+ return { valid: false };
3102
+ }
3103
+ }
3104
+ class ZodIntersection extends ZodType {
3105
+ _parse(input) {
3106
+ const { status, ctx } = this._processInputParams(input);
3107
+ const handleParsed = (parsedLeft, parsedRight) => {
3108
+ if (isAborted(parsedLeft) || isAborted(parsedRight)) {
3109
+ return INVALID;
3110
+ }
3111
+ const merged = mergeValues(parsedLeft.value, parsedRight.value);
3112
+ if (!merged.valid) {
3113
+ addIssueToContext(ctx, {
3114
+ code: ZodIssueCode.invalid_intersection_types,
3115
+ });
3116
+ return INVALID;
3117
+ }
3118
+ if (isDirty(parsedLeft) || isDirty(parsedRight)) {
3119
+ status.dirty();
3120
+ }
3121
+ return { status: status.value, value: merged.data };
3122
+ };
3123
+ if (ctx.common.async) {
3124
+ return Promise.all([
3125
+ this._def.left._parseAsync({
3126
+ data: ctx.data,
3127
+ path: ctx.path,
3128
+ parent: ctx,
3129
+ }),
3130
+ this._def.right._parseAsync({
3131
+ data: ctx.data,
3132
+ path: ctx.path,
3133
+ parent: ctx,
3134
+ }),
3135
+ ]).then(([left, right]) => handleParsed(left, right));
3136
+ }
3137
+ else {
3138
+ return handleParsed(this._def.left._parseSync({
3139
+ data: ctx.data,
3140
+ path: ctx.path,
3141
+ parent: ctx,
3142
+ }), this._def.right._parseSync({
3143
+ data: ctx.data,
3144
+ path: ctx.path,
3145
+ parent: ctx,
3146
+ }));
3147
+ }
3148
+ }
3149
+ }
3150
+ ZodIntersection.create = (left, right, params) => {
3151
+ return new ZodIntersection({
3152
+ left: left,
3153
+ right: right,
3154
+ typeName: ZodFirstPartyTypeKind.ZodIntersection,
3155
+ ...processCreateParams(params),
3156
+ });
3157
+ };
3158
+ class ZodTuple extends ZodType {
3159
+ _parse(input) {
3160
+ const { status, ctx } = this._processInputParams(input);
3161
+ if (ctx.parsedType !== ZodParsedType.array) {
3162
+ addIssueToContext(ctx, {
3163
+ code: ZodIssueCode.invalid_type,
3164
+ expected: ZodParsedType.array,
3165
+ received: ctx.parsedType,
3166
+ });
3167
+ return INVALID;
3168
+ }
3169
+ if (ctx.data.length < this._def.items.length) {
3170
+ addIssueToContext(ctx, {
3171
+ code: ZodIssueCode.too_small,
3172
+ minimum: this._def.items.length,
3173
+ inclusive: true,
3174
+ exact: false,
3175
+ type: "array",
3176
+ });
3177
+ return INVALID;
3178
+ }
3179
+ const rest = this._def.rest;
3180
+ if (!rest && ctx.data.length > this._def.items.length) {
3181
+ addIssueToContext(ctx, {
3182
+ code: ZodIssueCode.too_big,
3183
+ maximum: this._def.items.length,
3184
+ inclusive: true,
3185
+ exact: false,
3186
+ type: "array",
3187
+ });
3188
+ status.dirty();
3189
+ }
3190
+ const items = [...ctx.data]
3191
+ .map((item, itemIndex) => {
3192
+ const schema = this._def.items[itemIndex] || this._def.rest;
3193
+ if (!schema)
3194
+ return null;
3195
+ return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
3196
+ })
3197
+ .filter((x) => !!x); // filter nulls
3198
+ if (ctx.common.async) {
3199
+ return Promise.all(items).then((results) => {
3200
+ return ParseStatus.mergeArray(status, results);
3201
+ });
3202
+ }
3203
+ else {
3204
+ return ParseStatus.mergeArray(status, items);
3205
+ }
3206
+ }
3207
+ get items() {
3208
+ return this._def.items;
3209
+ }
3210
+ rest(rest) {
3211
+ return new ZodTuple({
3212
+ ...this._def,
3213
+ rest,
3214
+ });
3215
+ }
3216
+ }
3217
+ ZodTuple.create = (schemas, params) => {
3218
+ if (!Array.isArray(schemas)) {
3219
+ throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
3220
+ }
3221
+ return new ZodTuple({
3222
+ items: schemas,
3223
+ typeName: ZodFirstPartyTypeKind.ZodTuple,
3224
+ rest: null,
3225
+ ...processCreateParams(params),
3226
+ });
3227
+ };
3228
+ class ZodRecord extends ZodType {
3229
+ get keySchema() {
3230
+ return this._def.keyType;
3231
+ }
3232
+ get valueSchema() {
3233
+ return this._def.valueType;
3234
+ }
3235
+ _parse(input) {
3236
+ const { status, ctx } = this._processInputParams(input);
3237
+ if (ctx.parsedType !== ZodParsedType.object) {
3238
+ addIssueToContext(ctx, {
3239
+ code: ZodIssueCode.invalid_type,
3240
+ expected: ZodParsedType.object,
3241
+ received: ctx.parsedType,
3242
+ });
3243
+ return INVALID;
3244
+ }
3245
+ const pairs = [];
3246
+ const keyType = this._def.keyType;
3247
+ const valueType = this._def.valueType;
3248
+ for (const key in ctx.data) {
3249
+ pairs.push({
3250
+ key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
3251
+ value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
3252
+ alwaysSet: key in ctx.data,
3253
+ });
3254
+ }
3255
+ if (ctx.common.async) {
3256
+ return ParseStatus.mergeObjectAsync(status, pairs);
3257
+ }
3258
+ else {
3259
+ return ParseStatus.mergeObjectSync(status, pairs);
3260
+ }
3261
+ }
3262
+ get element() {
3263
+ return this._def.valueType;
3264
+ }
3265
+ static create(first, second, third) {
3266
+ if (second instanceof ZodType) {
3267
+ return new ZodRecord({
3268
+ keyType: first,
3269
+ valueType: second,
3270
+ typeName: ZodFirstPartyTypeKind.ZodRecord,
3271
+ ...processCreateParams(third),
3272
+ });
3273
+ }
3274
+ return new ZodRecord({
3275
+ keyType: ZodString.create(),
3276
+ valueType: first,
3277
+ typeName: ZodFirstPartyTypeKind.ZodRecord,
3278
+ ...processCreateParams(second),
3279
+ });
3280
+ }
3281
+ }
3282
+ class ZodMap extends ZodType {
3283
+ get keySchema() {
3284
+ return this._def.keyType;
3285
+ }
3286
+ get valueSchema() {
3287
+ return this._def.valueType;
3288
+ }
3289
+ _parse(input) {
3290
+ const { status, ctx } = this._processInputParams(input);
3291
+ if (ctx.parsedType !== ZodParsedType.map) {
3292
+ addIssueToContext(ctx, {
3293
+ code: ZodIssueCode.invalid_type,
3294
+ expected: ZodParsedType.map,
3295
+ received: ctx.parsedType,
3296
+ });
3297
+ return INVALID;
3298
+ }
3299
+ const keyType = this._def.keyType;
3300
+ const valueType = this._def.valueType;
3301
+ const pairs = [...ctx.data.entries()].map(([key, value], index) => {
3302
+ return {
3303
+ key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
3304
+ value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])),
3305
+ };
3306
+ });
3307
+ if (ctx.common.async) {
3308
+ const finalMap = new Map();
3309
+ return Promise.resolve().then(async () => {
3310
+ for (const pair of pairs) {
3311
+ const key = await pair.key;
3312
+ const value = await pair.value;
3313
+ if (key.status === "aborted" || value.status === "aborted") {
3314
+ return INVALID;
3315
+ }
3316
+ if (key.status === "dirty" || value.status === "dirty") {
3317
+ status.dirty();
3318
+ }
3319
+ finalMap.set(key.value, value.value);
3320
+ }
3321
+ return { status: status.value, value: finalMap };
3322
+ });
3323
+ }
3324
+ else {
3325
+ const finalMap = new Map();
3326
+ for (const pair of pairs) {
3327
+ const key = pair.key;
3328
+ const value = pair.value;
3329
+ if (key.status === "aborted" || value.status === "aborted") {
3330
+ return INVALID;
3331
+ }
3332
+ if (key.status === "dirty" || value.status === "dirty") {
3333
+ status.dirty();
3334
+ }
3335
+ finalMap.set(key.value, value.value);
3336
+ }
3337
+ return { status: status.value, value: finalMap };
3338
+ }
3339
+ }
3340
+ }
3341
+ ZodMap.create = (keyType, valueType, params) => {
3342
+ return new ZodMap({
3343
+ valueType,
3344
+ keyType,
3345
+ typeName: ZodFirstPartyTypeKind.ZodMap,
3346
+ ...processCreateParams(params),
3347
+ });
3348
+ };
3349
+ class ZodSet extends ZodType {
3350
+ _parse(input) {
3351
+ const { status, ctx } = this._processInputParams(input);
3352
+ if (ctx.parsedType !== ZodParsedType.set) {
3353
+ addIssueToContext(ctx, {
3354
+ code: ZodIssueCode.invalid_type,
3355
+ expected: ZodParsedType.set,
3356
+ received: ctx.parsedType,
3357
+ });
3358
+ return INVALID;
3359
+ }
3360
+ const def = this._def;
3361
+ if (def.minSize !== null) {
3362
+ if (ctx.data.size < def.minSize.value) {
3363
+ addIssueToContext(ctx, {
3364
+ code: ZodIssueCode.too_small,
3365
+ minimum: def.minSize.value,
3366
+ type: "set",
3367
+ inclusive: true,
3368
+ exact: false,
3369
+ message: def.minSize.message,
3370
+ });
3371
+ status.dirty();
3372
+ }
3373
+ }
3374
+ if (def.maxSize !== null) {
3375
+ if (ctx.data.size > def.maxSize.value) {
3376
+ addIssueToContext(ctx, {
3377
+ code: ZodIssueCode.too_big,
3378
+ maximum: def.maxSize.value,
3379
+ type: "set",
3380
+ inclusive: true,
3381
+ exact: false,
3382
+ message: def.maxSize.message,
3383
+ });
3384
+ status.dirty();
3385
+ }
3386
+ }
3387
+ const valueType = this._def.valueType;
3388
+ function finalizeSet(elements) {
3389
+ const parsedSet = new Set();
3390
+ for (const element of elements) {
3391
+ if (element.status === "aborted")
3392
+ return INVALID;
3393
+ if (element.status === "dirty")
3394
+ status.dirty();
3395
+ parsedSet.add(element.value);
3396
+ }
3397
+ return { status: status.value, value: parsedSet };
3398
+ }
3399
+ const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));
3400
+ if (ctx.common.async) {
3401
+ return Promise.all(elements).then((elements) => finalizeSet(elements));
3402
+ }
3403
+ else {
3404
+ return finalizeSet(elements);
3405
+ }
3406
+ }
3407
+ min(minSize, message) {
3408
+ return new ZodSet({
3409
+ ...this._def,
3410
+ minSize: { value: minSize, message: errorUtil.toString(message) },
3411
+ });
3412
+ }
3413
+ max(maxSize, message) {
3414
+ return new ZodSet({
3415
+ ...this._def,
3416
+ maxSize: { value: maxSize, message: errorUtil.toString(message) },
3417
+ });
3418
+ }
3419
+ size(size, message) {
3420
+ return this.min(size, message).max(size, message);
3421
+ }
3422
+ nonempty(message) {
3423
+ return this.min(1, message);
3424
+ }
3425
+ }
3426
+ ZodSet.create = (valueType, params) => {
3427
+ return new ZodSet({
3428
+ valueType,
3429
+ minSize: null,
3430
+ maxSize: null,
3431
+ typeName: ZodFirstPartyTypeKind.ZodSet,
3432
+ ...processCreateParams(params),
3433
+ });
3434
+ };
3435
+ class ZodFunction extends ZodType {
3436
+ constructor() {
3437
+ super(...arguments);
3438
+ this.validate = this.implement;
3439
+ }
3440
+ _parse(input) {
3441
+ const { ctx } = this._processInputParams(input);
3442
+ if (ctx.parsedType !== ZodParsedType.function) {
3443
+ addIssueToContext(ctx, {
3444
+ code: ZodIssueCode.invalid_type,
3445
+ expected: ZodParsedType.function,
3446
+ received: ctx.parsedType,
3447
+ });
3448
+ return INVALID;
3449
+ }
3450
+ function makeArgsIssue(args, error) {
3451
+ return makeIssue({
3452
+ data: args,
3453
+ path: ctx.path,
3454
+ errorMaps: [
3455
+ ctx.common.contextualErrorMap,
3456
+ ctx.schemaErrorMap,
3457
+ getErrorMap(),
3458
+ errorMap,
3459
+ ].filter((x) => !!x),
3460
+ issueData: {
3461
+ code: ZodIssueCode.invalid_arguments,
3462
+ argumentsError: error,
3463
+ },
3464
+ });
3465
+ }
3466
+ function makeReturnsIssue(returns, error) {
3467
+ return makeIssue({
3468
+ data: returns,
3469
+ path: ctx.path,
3470
+ errorMaps: [
3471
+ ctx.common.contextualErrorMap,
3472
+ ctx.schemaErrorMap,
3473
+ getErrorMap(),
3474
+ errorMap,
3475
+ ].filter((x) => !!x),
3476
+ issueData: {
3477
+ code: ZodIssueCode.invalid_return_type,
3478
+ returnTypeError: error,
3479
+ },
3480
+ });
3481
+ }
3482
+ const params = { errorMap: ctx.common.contextualErrorMap };
3483
+ const fn = ctx.data;
3484
+ if (this._def.returns instanceof ZodPromise) {
3485
+ // Would love a way to avoid disabling this rule, but we need
3486
+ // an alias (using an arrow function was what caused 2651).
3487
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3488
+ const me = this;
3489
+ return OK(async function (...args) {
3490
+ const error = new ZodError([]);
3491
+ const parsedArgs = await me._def.args
3492
+ .parseAsync(args, params)
3493
+ .catch((e) => {
3494
+ error.addIssue(makeArgsIssue(args, e));
3495
+ throw error;
3496
+ });
3497
+ const result = await Reflect.apply(fn, this, parsedArgs);
3498
+ const parsedReturns = await me._def.returns._def.type
3499
+ .parseAsync(result, params)
3500
+ .catch((e) => {
3501
+ error.addIssue(makeReturnsIssue(result, e));
3502
+ throw error;
3503
+ });
3504
+ return parsedReturns;
3505
+ });
3506
+ }
3507
+ else {
3508
+ // Would love a way to avoid disabling this rule, but we need
3509
+ // an alias (using an arrow function was what caused 2651).
3510
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3511
+ const me = this;
3512
+ return OK(function (...args) {
3513
+ const parsedArgs = me._def.args.safeParse(args, params);
3514
+ if (!parsedArgs.success) {
3515
+ throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);
3516
+ }
3517
+ const result = Reflect.apply(fn, this, parsedArgs.data);
3518
+ const parsedReturns = me._def.returns.safeParse(result, params);
3519
+ if (!parsedReturns.success) {
3520
+ throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);
3521
+ }
3522
+ return parsedReturns.data;
3523
+ });
3524
+ }
3525
+ }
3526
+ parameters() {
3527
+ return this._def.args;
3528
+ }
3529
+ returnType() {
3530
+ return this._def.returns;
3531
+ }
3532
+ args(...items) {
3533
+ return new ZodFunction({
3534
+ ...this._def,
3535
+ args: ZodTuple.create(items).rest(ZodUnknown.create()),
3536
+ });
3537
+ }
3538
+ returns(returnType) {
3539
+ return new ZodFunction({
3540
+ ...this._def,
3541
+ returns: returnType,
3542
+ });
3543
+ }
3544
+ implement(func) {
3545
+ const validatedFunc = this.parse(func);
3546
+ return validatedFunc;
3547
+ }
3548
+ strictImplement(func) {
3549
+ const validatedFunc = this.parse(func);
3550
+ return validatedFunc;
3551
+ }
3552
+ static create(args, returns, params) {
3553
+ return new ZodFunction({
3554
+ args: (args
3555
+ ? args
3556
+ : ZodTuple.create([]).rest(ZodUnknown.create())),
3557
+ returns: returns || ZodUnknown.create(),
3558
+ typeName: ZodFirstPartyTypeKind.ZodFunction,
3559
+ ...processCreateParams(params),
3560
+ });
3561
+ }
3562
+ }
3563
+ class ZodLazy extends ZodType {
3564
+ get schema() {
3565
+ return this._def.getter();
3566
+ }
3567
+ _parse(input) {
3568
+ const { ctx } = this._processInputParams(input);
3569
+ const lazySchema = this._def.getter();
3570
+ return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
3571
+ }
3572
+ }
3573
+ ZodLazy.create = (getter, params) => {
3574
+ return new ZodLazy({
3575
+ getter: getter,
3576
+ typeName: ZodFirstPartyTypeKind.ZodLazy,
3577
+ ...processCreateParams(params),
3578
+ });
3579
+ };
3580
+ class ZodLiteral extends ZodType {
3581
+ _parse(input) {
3582
+ if (input.data !== this._def.value) {
3583
+ const ctx = this._getOrReturnCtx(input);
3584
+ addIssueToContext(ctx, {
3585
+ received: ctx.data,
3586
+ code: ZodIssueCode.invalid_literal,
3587
+ expected: this._def.value,
3588
+ });
3589
+ return INVALID;
3590
+ }
3591
+ return { status: "valid", value: input.data };
3592
+ }
3593
+ get value() {
3594
+ return this._def.value;
3595
+ }
3596
+ }
3597
+ ZodLiteral.create = (value, params) => {
3598
+ return new ZodLiteral({
3599
+ value: value,
3600
+ typeName: ZodFirstPartyTypeKind.ZodLiteral,
3601
+ ...processCreateParams(params),
3602
+ });
3603
+ };
3604
+ function createZodEnum(values, params) {
3605
+ return new ZodEnum({
3606
+ values,
3607
+ typeName: ZodFirstPartyTypeKind.ZodEnum,
3608
+ ...processCreateParams(params),
3609
+ });
3610
+ }
3611
+ class ZodEnum extends ZodType {
3612
+ constructor() {
3613
+ super(...arguments);
3614
+ _ZodEnum_cache.set(this, void 0);
3615
+ }
3616
+ _parse(input) {
3617
+ if (typeof input.data !== "string") {
3618
+ const ctx = this._getOrReturnCtx(input);
3619
+ const expectedValues = this._def.values;
3620
+ addIssueToContext(ctx, {
3621
+ expected: util.joinValues(expectedValues),
3622
+ received: ctx.parsedType,
3623
+ code: ZodIssueCode.invalid_type,
3624
+ });
3625
+ return INVALID;
3626
+ }
3627
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
3628
+ __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
3629
+ }
3630
+ if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3631
+ const ctx = this._getOrReturnCtx(input);
3632
+ const expectedValues = this._def.values;
3633
+ addIssueToContext(ctx, {
3634
+ received: ctx.data,
3635
+ code: ZodIssueCode.invalid_enum_value,
3636
+ options: expectedValues,
3637
+ });
3638
+ return INVALID;
3639
+ }
3640
+ return OK(input.data);
3641
+ }
3642
+ get options() {
3643
+ return this._def.values;
3644
+ }
3645
+ get enum() {
3646
+ const enumValues = {};
3647
+ for (const val of this._def.values) {
3648
+ enumValues[val] = val;
3649
+ }
3650
+ return enumValues;
3651
+ }
3652
+ get Values() {
3653
+ const enumValues = {};
3654
+ for (const val of this._def.values) {
3655
+ enumValues[val] = val;
3656
+ }
3657
+ return enumValues;
3658
+ }
3659
+ get Enum() {
3660
+ const enumValues = {};
3661
+ for (const val of this._def.values) {
3662
+ enumValues[val] = val;
3663
+ }
3664
+ return enumValues;
3665
+ }
3666
+ extract(values, newDef = this._def) {
3667
+ return ZodEnum.create(values, {
3668
+ ...this._def,
3669
+ ...newDef,
3670
+ });
3671
+ }
3672
+ exclude(values, newDef = this._def) {
3673
+ return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {
3674
+ ...this._def,
3675
+ ...newDef,
3676
+ });
3677
+ }
3678
+ }
3679
+ _ZodEnum_cache = new WeakMap();
3680
+ ZodEnum.create = createZodEnum;
3681
+ class ZodNativeEnum extends ZodType {
3682
+ constructor() {
3683
+ super(...arguments);
3684
+ _ZodNativeEnum_cache.set(this, void 0);
3685
+ }
3686
+ _parse(input) {
3687
+ const nativeEnumValues = util.getValidEnumValues(this._def.values);
3688
+ const ctx = this._getOrReturnCtx(input);
3689
+ if (ctx.parsedType !== ZodParsedType.string &&
3690
+ ctx.parsedType !== ZodParsedType.number) {
3691
+ const expectedValues = util.objectValues(nativeEnumValues);
3692
+ addIssueToContext(ctx, {
3693
+ expected: util.joinValues(expectedValues),
3694
+ received: ctx.parsedType,
3695
+ code: ZodIssueCode.invalid_type,
3696
+ });
3697
+ return INVALID;
3698
+ }
3699
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
3700
+ __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
3701
+ }
3702
+ if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3703
+ const expectedValues = util.objectValues(nativeEnumValues);
3704
+ addIssueToContext(ctx, {
3705
+ received: ctx.data,
3706
+ code: ZodIssueCode.invalid_enum_value,
3707
+ options: expectedValues,
3708
+ });
3709
+ return INVALID;
3710
+ }
3711
+ return OK(input.data);
3712
+ }
3713
+ get enum() {
3714
+ return this._def.values;
3715
+ }
3716
+ }
3717
+ _ZodNativeEnum_cache = new WeakMap();
3718
+ ZodNativeEnum.create = (values, params) => {
3719
+ return new ZodNativeEnum({
3720
+ values: values,
3721
+ typeName: ZodFirstPartyTypeKind.ZodNativeEnum,
3722
+ ...processCreateParams(params),
3723
+ });
3724
+ };
3725
+ class ZodPromise extends ZodType {
3726
+ unwrap() {
3727
+ return this._def.type;
3728
+ }
3729
+ _parse(input) {
3730
+ const { ctx } = this._processInputParams(input);
3731
+ if (ctx.parsedType !== ZodParsedType.promise &&
3732
+ ctx.common.async === false) {
3733
+ addIssueToContext(ctx, {
3734
+ code: ZodIssueCode.invalid_type,
3735
+ expected: ZodParsedType.promise,
3736
+ received: ctx.parsedType,
3737
+ });
3738
+ return INVALID;
3739
+ }
3740
+ const promisified = ctx.parsedType === ZodParsedType.promise
3741
+ ? ctx.data
3742
+ : Promise.resolve(ctx.data);
3743
+ return OK(promisified.then((data) => {
3744
+ return this._def.type.parseAsync(data, {
3745
+ path: ctx.path,
3746
+ errorMap: ctx.common.contextualErrorMap,
3747
+ });
3748
+ }));
3749
+ }
3750
+ }
3751
+ ZodPromise.create = (schema, params) => {
3752
+ return new ZodPromise({
3753
+ type: schema,
3754
+ typeName: ZodFirstPartyTypeKind.ZodPromise,
3755
+ ...processCreateParams(params),
3756
+ });
3757
+ };
3758
+ class ZodEffects extends ZodType {
3759
+ innerType() {
3760
+ return this._def.schema;
3761
+ }
3762
+ sourceType() {
3763
+ return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects
3764
+ ? this._def.schema.sourceType()
3765
+ : this._def.schema;
3766
+ }
3767
+ _parse(input) {
3768
+ const { status, ctx } = this._processInputParams(input);
3769
+ const effect = this._def.effect || null;
3770
+ const checkCtx = {
3771
+ addIssue: (arg) => {
3772
+ addIssueToContext(ctx, arg);
3773
+ if (arg.fatal) {
3774
+ status.abort();
3775
+ }
3776
+ else {
3777
+ status.dirty();
3778
+ }
3779
+ },
3780
+ get path() {
3781
+ return ctx.path;
3782
+ },
3783
+ };
3784
+ checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);
3785
+ if (effect.type === "preprocess") {
3786
+ const processed = effect.transform(ctx.data, checkCtx);
3787
+ if (ctx.common.async) {
3788
+ return Promise.resolve(processed).then(async (processed) => {
3789
+ if (status.value === "aborted")
3790
+ return INVALID;
3791
+ const result = await this._def.schema._parseAsync({
3792
+ data: processed,
3793
+ path: ctx.path,
3794
+ parent: ctx,
3795
+ });
3796
+ if (result.status === "aborted")
3797
+ return INVALID;
3798
+ if (result.status === "dirty")
3799
+ return DIRTY(result.value);
3800
+ if (status.value === "dirty")
3801
+ return DIRTY(result.value);
3802
+ return result;
3803
+ });
3804
+ }
3805
+ else {
3806
+ if (status.value === "aborted")
3807
+ return INVALID;
3808
+ const result = this._def.schema._parseSync({
3809
+ data: processed,
3810
+ path: ctx.path,
3811
+ parent: ctx,
3812
+ });
3813
+ if (result.status === "aborted")
3814
+ return INVALID;
3815
+ if (result.status === "dirty")
3816
+ return DIRTY(result.value);
3817
+ if (status.value === "dirty")
3818
+ return DIRTY(result.value);
3819
+ return result;
3820
+ }
3821
+ }
3822
+ if (effect.type === "refinement") {
3823
+ const executeRefinement = (acc) => {
3824
+ const result = effect.refinement(acc, checkCtx);
3825
+ if (ctx.common.async) {
3826
+ return Promise.resolve(result);
3827
+ }
3828
+ if (result instanceof Promise) {
3829
+ throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
3830
+ }
3831
+ return acc;
3832
+ };
3833
+ if (ctx.common.async === false) {
3834
+ const inner = this._def.schema._parseSync({
3835
+ data: ctx.data,
3836
+ path: ctx.path,
3837
+ parent: ctx,
3838
+ });
3839
+ if (inner.status === "aborted")
3840
+ return INVALID;
3841
+ if (inner.status === "dirty")
3842
+ status.dirty();
3843
+ // return value is ignored
3844
+ executeRefinement(inner.value);
3845
+ return { status: status.value, value: inner.value };
3846
+ }
3847
+ else {
3848
+ return this._def.schema
3849
+ ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
3850
+ .then((inner) => {
3851
+ if (inner.status === "aborted")
3852
+ return INVALID;
3853
+ if (inner.status === "dirty")
3854
+ status.dirty();
3855
+ return executeRefinement(inner.value).then(() => {
3856
+ return { status: status.value, value: inner.value };
3857
+ });
3858
+ });
3859
+ }
3860
+ }
3861
+ if (effect.type === "transform") {
3862
+ if (ctx.common.async === false) {
3863
+ const base = this._def.schema._parseSync({
3864
+ data: ctx.data,
3865
+ path: ctx.path,
3866
+ parent: ctx,
3867
+ });
3868
+ if (!isValid(base))
3869
+ return base;
3870
+ const result = effect.transform(base.value, checkCtx);
3871
+ if (result instanceof Promise) {
3872
+ throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
3873
+ }
3874
+ return { status: status.value, value: result };
3875
+ }
3876
+ else {
3877
+ return this._def.schema
3878
+ ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
3879
+ .then((base) => {
3880
+ if (!isValid(base))
3881
+ return base;
3882
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3883
+ });
3884
+ }
3885
+ }
3886
+ util.assertNever(effect);
3887
+ }
3888
+ }
3889
+ ZodEffects.create = (schema, effect, params) => {
3890
+ return new ZodEffects({
3891
+ schema,
3892
+ typeName: ZodFirstPartyTypeKind.ZodEffects,
3893
+ effect,
3894
+ ...processCreateParams(params),
3895
+ });
3896
+ };
3897
+ ZodEffects.createWithPreprocess = (preprocess, schema, params) => {
3898
+ return new ZodEffects({
3899
+ schema,
3900
+ effect: { type: "preprocess", transform: preprocess },
3901
+ typeName: ZodFirstPartyTypeKind.ZodEffects,
3902
+ ...processCreateParams(params),
3903
+ });
3904
+ };
3905
+ class ZodOptional extends ZodType {
3906
+ _parse(input) {
3907
+ const parsedType = this._getType(input);
3908
+ if (parsedType === ZodParsedType.undefined) {
3909
+ return OK(undefined);
3910
+ }
3911
+ return this._def.innerType._parse(input);
3912
+ }
3913
+ unwrap() {
3914
+ return this._def.innerType;
3915
+ }
3916
+ }
3917
+ ZodOptional.create = (type, params) => {
3918
+ return new ZodOptional({
3919
+ innerType: type,
3920
+ typeName: ZodFirstPartyTypeKind.ZodOptional,
3921
+ ...processCreateParams(params),
3922
+ });
3923
+ };
3924
+ class ZodNullable extends ZodType {
3925
+ _parse(input) {
3926
+ const parsedType = this._getType(input);
3927
+ if (parsedType === ZodParsedType.null) {
3928
+ return OK(null);
3929
+ }
3930
+ return this._def.innerType._parse(input);
3931
+ }
3932
+ unwrap() {
3933
+ return this._def.innerType;
3934
+ }
3935
+ }
3936
+ ZodNullable.create = (type, params) => {
3937
+ return new ZodNullable({
3938
+ innerType: type,
3939
+ typeName: ZodFirstPartyTypeKind.ZodNullable,
3940
+ ...processCreateParams(params),
3941
+ });
3942
+ };
3943
+ class ZodDefault extends ZodType {
3944
+ _parse(input) {
3945
+ const { ctx } = this._processInputParams(input);
3946
+ let data = ctx.data;
3947
+ if (ctx.parsedType === ZodParsedType.undefined) {
3948
+ data = this._def.defaultValue();
3949
+ }
3950
+ return this._def.innerType._parse({
3951
+ data,
3952
+ path: ctx.path,
3953
+ parent: ctx,
3954
+ });
3955
+ }
3956
+ removeDefault() {
3957
+ return this._def.innerType;
3958
+ }
3959
+ }
3960
+ ZodDefault.create = (type, params) => {
3961
+ return new ZodDefault({
3962
+ innerType: type,
3963
+ typeName: ZodFirstPartyTypeKind.ZodDefault,
3964
+ defaultValue: typeof params.default === "function"
3965
+ ? params.default
3966
+ : () => params.default,
3967
+ ...processCreateParams(params),
3968
+ });
3969
+ };
3970
+ class ZodCatch extends ZodType {
3971
+ _parse(input) {
3972
+ const { ctx } = this._processInputParams(input);
3973
+ // newCtx is used to not collect issues from inner types in ctx
3974
+ const newCtx = {
3975
+ ...ctx,
3976
+ common: {
3977
+ ...ctx.common,
3978
+ issues: [],
3979
+ },
3980
+ };
3981
+ const result = this._def.innerType._parse({
3982
+ data: newCtx.data,
3983
+ path: newCtx.path,
3984
+ parent: {
3985
+ ...newCtx,
3986
+ },
3987
+ });
3988
+ if (isAsync(result)) {
3989
+ return result.then((result) => {
3990
+ return {
3991
+ status: "valid",
3992
+ value: result.status === "valid"
3993
+ ? result.value
3994
+ : this._def.catchValue({
3995
+ get error() {
3996
+ return new ZodError(newCtx.common.issues);
3997
+ },
3998
+ input: newCtx.data,
3999
+ }),
4000
+ };
4001
+ });
4002
+ }
4003
+ else {
4004
+ return {
4005
+ status: "valid",
4006
+ value: result.status === "valid"
4007
+ ? result.value
4008
+ : this._def.catchValue({
4009
+ get error() {
4010
+ return new ZodError(newCtx.common.issues);
4011
+ },
4012
+ input: newCtx.data,
4013
+ }),
4014
+ };
4015
+ }
4016
+ }
4017
+ removeCatch() {
4018
+ return this._def.innerType;
4019
+ }
4020
+ }
4021
+ ZodCatch.create = (type, params) => {
4022
+ return new ZodCatch({
4023
+ innerType: type,
4024
+ typeName: ZodFirstPartyTypeKind.ZodCatch,
4025
+ catchValue: typeof params.catch === "function" ? params.catch : () => params.catch,
4026
+ ...processCreateParams(params),
4027
+ });
4028
+ };
4029
+ class ZodNaN extends ZodType {
4030
+ _parse(input) {
4031
+ const parsedType = this._getType(input);
4032
+ if (parsedType !== ZodParsedType.nan) {
4033
+ const ctx = this._getOrReturnCtx(input);
4034
+ addIssueToContext(ctx, {
4035
+ code: ZodIssueCode.invalid_type,
4036
+ expected: ZodParsedType.nan,
4037
+ received: ctx.parsedType,
4038
+ });
4039
+ return INVALID;
4040
+ }
4041
+ return { status: "valid", value: input.data };
4042
+ }
4043
+ }
4044
+ ZodNaN.create = (params) => {
4045
+ return new ZodNaN({
4046
+ typeName: ZodFirstPartyTypeKind.ZodNaN,
4047
+ ...processCreateParams(params),
4048
+ });
4049
+ };
4050
+ const BRAND = Symbol("zod_brand");
4051
+ class ZodBranded extends ZodType {
4052
+ _parse(input) {
4053
+ const { ctx } = this._processInputParams(input);
4054
+ const data = ctx.data;
4055
+ return this._def.type._parse({
4056
+ data,
4057
+ path: ctx.path,
4058
+ parent: ctx,
4059
+ });
4060
+ }
4061
+ unwrap() {
4062
+ return this._def.type;
4063
+ }
4064
+ }
4065
+ class ZodPipeline extends ZodType {
4066
+ _parse(input) {
4067
+ const { status, ctx } = this._processInputParams(input);
4068
+ if (ctx.common.async) {
4069
+ const handleAsync = async () => {
4070
+ const inResult = await this._def.in._parseAsync({
4071
+ data: ctx.data,
4072
+ path: ctx.path,
4073
+ parent: ctx,
4074
+ });
4075
+ if (inResult.status === "aborted")
4076
+ return INVALID;
4077
+ if (inResult.status === "dirty") {
4078
+ status.dirty();
4079
+ return DIRTY(inResult.value);
4080
+ }
4081
+ else {
4082
+ return this._def.out._parseAsync({
4083
+ data: inResult.value,
4084
+ path: ctx.path,
4085
+ parent: ctx,
4086
+ });
4087
+ }
4088
+ };
4089
+ return handleAsync();
4090
+ }
4091
+ else {
4092
+ const inResult = this._def.in._parseSync({
4093
+ data: ctx.data,
4094
+ path: ctx.path,
4095
+ parent: ctx,
4096
+ });
4097
+ if (inResult.status === "aborted")
4098
+ return INVALID;
4099
+ if (inResult.status === "dirty") {
4100
+ status.dirty();
4101
+ return {
4102
+ status: "dirty",
4103
+ value: inResult.value,
4104
+ };
4105
+ }
4106
+ else {
4107
+ return this._def.out._parseSync({
4108
+ data: inResult.value,
4109
+ path: ctx.path,
4110
+ parent: ctx,
4111
+ });
4112
+ }
4113
+ }
4114
+ }
4115
+ static create(a, b) {
4116
+ return new ZodPipeline({
4117
+ in: a,
4118
+ out: b,
4119
+ typeName: ZodFirstPartyTypeKind.ZodPipeline,
4120
+ });
4121
+ }
4122
+ }
4123
+ class ZodReadonly extends ZodType {
4124
+ _parse(input) {
4125
+ const result = this._def.innerType._parse(input);
4126
+ const freeze = (data) => {
4127
+ if (isValid(data)) {
4128
+ data.value = Object.freeze(data.value);
4129
+ }
4130
+ return data;
4131
+ };
4132
+ return isAsync(result)
4133
+ ? result.then((data) => freeze(data))
4134
+ : freeze(result);
4135
+ }
4136
+ unwrap() {
4137
+ return this._def.innerType;
4138
+ }
4139
+ }
4140
+ ZodReadonly.create = (type, params) => {
4141
+ return new ZodReadonly({
4142
+ innerType: type,
4143
+ typeName: ZodFirstPartyTypeKind.ZodReadonly,
4144
+ ...processCreateParams(params),
4145
+ });
4146
+ };
4147
+ ////////////////////////////////////////
4148
+ ////////////////////////////////////////
4149
+ ////////// //////////
4150
+ ////////// z.custom //////////
4151
+ ////////// //////////
4152
+ ////////////////////////////////////////
4153
+ ////////////////////////////////////////
4154
+ function cleanParams(params, data) {
4155
+ const p = typeof params === "function"
4156
+ ? params(data)
4157
+ : typeof params === "string"
4158
+ ? { message: params }
4159
+ : params;
4160
+ const p2 = typeof p === "string" ? { message: p } : p;
4161
+ return p2;
4162
+ }
4163
+ function custom(check, _params = {},
4164
+ /**
4165
+ * @deprecated
4166
+ *
4167
+ * Pass `fatal` into the params object instead:
4168
+ *
4169
+ * ```ts
4170
+ * z.string().custom((val) => val.length > 5, { fatal: false })
4171
+ * ```
4172
+ *
4173
+ */
4174
+ fatal) {
4175
+ if (check)
4176
+ return ZodAny.create().superRefine((data, ctx) => {
4177
+ var _a, _b;
4178
+ const r = check(data);
4179
+ if (r instanceof Promise) {
4180
+ return r.then((r) => {
4181
+ var _a, _b;
4182
+ if (!r) {
4183
+ const params = cleanParams(_params, data);
4184
+ const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4185
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4186
+ }
4187
+ });
4188
+ }
4189
+ if (!r) {
4190
+ const params = cleanParams(_params, data);
4191
+ const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
4192
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
4193
+ }
4194
+ return;
4195
+ });
4196
+ return ZodAny.create();
4197
+ }
4198
+ const late = {
4199
+ object: ZodObject.lazycreate,
4200
+ };
4201
+ var ZodFirstPartyTypeKind;
4202
+ (function (ZodFirstPartyTypeKind) {
4203
+ ZodFirstPartyTypeKind["ZodString"] = "ZodString";
4204
+ ZodFirstPartyTypeKind["ZodNumber"] = "ZodNumber";
4205
+ ZodFirstPartyTypeKind["ZodNaN"] = "ZodNaN";
4206
+ ZodFirstPartyTypeKind["ZodBigInt"] = "ZodBigInt";
4207
+ ZodFirstPartyTypeKind["ZodBoolean"] = "ZodBoolean";
4208
+ ZodFirstPartyTypeKind["ZodDate"] = "ZodDate";
4209
+ ZodFirstPartyTypeKind["ZodSymbol"] = "ZodSymbol";
4210
+ ZodFirstPartyTypeKind["ZodUndefined"] = "ZodUndefined";
4211
+ ZodFirstPartyTypeKind["ZodNull"] = "ZodNull";
4212
+ ZodFirstPartyTypeKind["ZodAny"] = "ZodAny";
4213
+ ZodFirstPartyTypeKind["ZodUnknown"] = "ZodUnknown";
4214
+ ZodFirstPartyTypeKind["ZodNever"] = "ZodNever";
4215
+ ZodFirstPartyTypeKind["ZodVoid"] = "ZodVoid";
4216
+ ZodFirstPartyTypeKind["ZodArray"] = "ZodArray";
4217
+ ZodFirstPartyTypeKind["ZodObject"] = "ZodObject";
4218
+ ZodFirstPartyTypeKind["ZodUnion"] = "ZodUnion";
4219
+ ZodFirstPartyTypeKind["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion";
4220
+ ZodFirstPartyTypeKind["ZodIntersection"] = "ZodIntersection";
4221
+ ZodFirstPartyTypeKind["ZodTuple"] = "ZodTuple";
4222
+ ZodFirstPartyTypeKind["ZodRecord"] = "ZodRecord";
4223
+ ZodFirstPartyTypeKind["ZodMap"] = "ZodMap";
4224
+ ZodFirstPartyTypeKind["ZodSet"] = "ZodSet";
4225
+ ZodFirstPartyTypeKind["ZodFunction"] = "ZodFunction";
4226
+ ZodFirstPartyTypeKind["ZodLazy"] = "ZodLazy";
4227
+ ZodFirstPartyTypeKind["ZodLiteral"] = "ZodLiteral";
4228
+ ZodFirstPartyTypeKind["ZodEnum"] = "ZodEnum";
4229
+ ZodFirstPartyTypeKind["ZodEffects"] = "ZodEffects";
4230
+ ZodFirstPartyTypeKind["ZodNativeEnum"] = "ZodNativeEnum";
4231
+ ZodFirstPartyTypeKind["ZodOptional"] = "ZodOptional";
4232
+ ZodFirstPartyTypeKind["ZodNullable"] = "ZodNullable";
4233
+ ZodFirstPartyTypeKind["ZodDefault"] = "ZodDefault";
4234
+ ZodFirstPartyTypeKind["ZodCatch"] = "ZodCatch";
4235
+ ZodFirstPartyTypeKind["ZodPromise"] = "ZodPromise";
4236
+ ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
4237
+ ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
4238
+ ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
4239
+ })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
4240
+ const instanceOfType = (
4241
+ // const instanceOfType = <T extends new (...args: any[]) => any>(
4242
+ cls, params = {
4243
+ message: `Input not instance of ${cls.name}`,
4244
+ }) => custom((data) => data instanceof cls, params);
4245
+ const stringType = ZodString.create;
4246
+ const numberType = ZodNumber.create;
4247
+ const nanType = ZodNaN.create;
4248
+ const bigIntType = ZodBigInt.create;
4249
+ const booleanType = ZodBoolean.create;
4250
+ const dateType = ZodDate.create;
4251
+ const symbolType = ZodSymbol.create;
4252
+ const undefinedType = ZodUndefined.create;
4253
+ const nullType = ZodNull.create;
4254
+ const anyType = ZodAny.create;
4255
+ const unknownType = ZodUnknown.create;
4256
+ const neverType = ZodNever.create;
4257
+ const voidType = ZodVoid.create;
4258
+ const arrayType = ZodArray.create;
4259
+ const objectType = ZodObject.create;
4260
+ const strictObjectType = ZodObject.strictCreate;
4261
+ const unionType = ZodUnion.create;
4262
+ const discriminatedUnionType = ZodDiscriminatedUnion.create;
4263
+ const intersectionType = ZodIntersection.create;
4264
+ const tupleType = ZodTuple.create;
4265
+ const recordType = ZodRecord.create;
4266
+ const mapType = ZodMap.create;
4267
+ const setType = ZodSet.create;
4268
+ const functionType = ZodFunction.create;
4269
+ const lazyType = ZodLazy.create;
4270
+ const literalType = ZodLiteral.create;
4271
+ const enumType = ZodEnum.create;
4272
+ const nativeEnumType = ZodNativeEnum.create;
4273
+ const promiseType = ZodPromise.create;
4274
+ const effectsType = ZodEffects.create;
4275
+ const optionalType = ZodOptional.create;
4276
+ const nullableType = ZodNullable.create;
4277
+ const preprocessType = ZodEffects.createWithPreprocess;
4278
+ const pipelineType = ZodPipeline.create;
4279
+ const ostring = () => stringType().optional();
4280
+ const onumber = () => numberType().optional();
4281
+ const oboolean = () => booleanType().optional();
4282
+ const coerce = {
4283
+ string: ((arg) => ZodString.create({ ...arg, coerce: true })),
4284
+ number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),
4285
+ boolean: ((arg) => ZodBoolean.create({
4286
+ ...arg,
4287
+ coerce: true,
4288
+ })),
4289
+ bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
4290
+ date: ((arg) => ZodDate.create({ ...arg, coerce: true })),
4291
+ };
4292
+ const NEVER = INVALID;
4293
+
4294
+ var z = /*#__PURE__*/Object.freeze({
4295
+ __proto__: null,
4296
+ defaultErrorMap: errorMap,
4297
+ setErrorMap: setErrorMap,
4298
+ getErrorMap: getErrorMap,
4299
+ makeIssue: makeIssue,
4300
+ EMPTY_PATH: EMPTY_PATH,
4301
+ addIssueToContext: addIssueToContext,
4302
+ ParseStatus: ParseStatus,
4303
+ INVALID: INVALID,
4304
+ DIRTY: DIRTY,
4305
+ OK: OK,
4306
+ isAborted: isAborted,
4307
+ isDirty: isDirty,
4308
+ isValid: isValid,
4309
+ isAsync: isAsync,
4310
+ get util () { return util; },
4311
+ get objectUtil () { return objectUtil; },
4312
+ ZodParsedType: ZodParsedType,
4313
+ getParsedType: getParsedType,
4314
+ ZodType: ZodType,
4315
+ datetimeRegex: datetimeRegex,
4316
+ ZodString: ZodString,
4317
+ ZodNumber: ZodNumber,
4318
+ ZodBigInt: ZodBigInt,
4319
+ ZodBoolean: ZodBoolean,
4320
+ ZodDate: ZodDate,
4321
+ ZodSymbol: ZodSymbol,
4322
+ ZodUndefined: ZodUndefined,
4323
+ ZodNull: ZodNull,
4324
+ ZodAny: ZodAny,
4325
+ ZodUnknown: ZodUnknown,
4326
+ ZodNever: ZodNever,
4327
+ ZodVoid: ZodVoid,
4328
+ ZodArray: ZodArray,
4329
+ ZodObject: ZodObject,
4330
+ ZodUnion: ZodUnion,
4331
+ ZodDiscriminatedUnion: ZodDiscriminatedUnion,
4332
+ ZodIntersection: ZodIntersection,
4333
+ ZodTuple: ZodTuple,
4334
+ ZodRecord: ZodRecord,
4335
+ ZodMap: ZodMap,
4336
+ ZodSet: ZodSet,
4337
+ ZodFunction: ZodFunction,
4338
+ ZodLazy: ZodLazy,
4339
+ ZodLiteral: ZodLiteral,
4340
+ ZodEnum: ZodEnum,
4341
+ ZodNativeEnum: ZodNativeEnum,
4342
+ ZodPromise: ZodPromise,
4343
+ ZodEffects: ZodEffects,
4344
+ ZodTransformer: ZodEffects,
4345
+ ZodOptional: ZodOptional,
4346
+ ZodNullable: ZodNullable,
4347
+ ZodDefault: ZodDefault,
4348
+ ZodCatch: ZodCatch,
4349
+ ZodNaN: ZodNaN,
4350
+ BRAND: BRAND,
4351
+ ZodBranded: ZodBranded,
4352
+ ZodPipeline: ZodPipeline,
4353
+ ZodReadonly: ZodReadonly,
4354
+ custom: custom,
4355
+ Schema: ZodType,
4356
+ ZodSchema: ZodType,
4357
+ late: late,
4358
+ get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },
4359
+ coerce: coerce,
4360
+ any: anyType,
4361
+ array: arrayType,
4362
+ bigint: bigIntType,
4363
+ boolean: booleanType,
4364
+ date: dateType,
4365
+ discriminatedUnion: discriminatedUnionType,
4366
+ effect: effectsType,
4367
+ 'enum': enumType,
4368
+ 'function': functionType,
4369
+ 'instanceof': instanceOfType,
4370
+ intersection: intersectionType,
4371
+ lazy: lazyType,
4372
+ literal: literalType,
4373
+ map: mapType,
4374
+ nan: nanType,
4375
+ nativeEnum: nativeEnumType,
4376
+ never: neverType,
4377
+ 'null': nullType,
4378
+ nullable: nullableType,
4379
+ number: numberType,
4380
+ object: objectType,
4381
+ oboolean: oboolean,
4382
+ onumber: onumber,
4383
+ optional: optionalType,
4384
+ ostring: ostring,
4385
+ pipeline: pipelineType,
4386
+ preprocess: preprocessType,
4387
+ promise: promiseType,
4388
+ record: recordType,
4389
+ set: setType,
4390
+ strictObject: strictObjectType,
4391
+ string: stringType,
4392
+ symbol: symbolType,
4393
+ transformer: effectsType,
4394
+ tuple: tupleType,
4395
+ 'undefined': undefinedType,
4396
+ union: unionType,
4397
+ unknown: unknownType,
4398
+ 'void': voidType,
4399
+ NEVER: NEVER,
4400
+ ZodIssueCode: ZodIssueCode,
4401
+ quotelessJson: quotelessJson,
4402
+ ZodError: ZodError
4403
+ });
4404
+
4405
+ export { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, datetimeRegex, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };