@8wave/ai-elements 0.90.0 → 0.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/_chunks/{Document-BajUssb0.js → Document-OYsMoc9f.js} +46 -9
  2. package/dist/_chunks/Document-OYsMoc9f.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowSources-CZWBpBBV.js → PkToolShowSources-BHLHRoy2.js} +2 -2
  4. package/dist/_chunks/{PkToolShowSources-CZWBpBBV.js.map → PkToolShowSources-BHLHRoy2.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowSuggestedReply-1j4lOkRj.js → PkToolShowSuggestedReply-CUk_SK-9.js} +2 -2
  6. package/dist/_chunks/PkToolShowSuggestedReply-CUk_SK-9.js.map +1 -0
  7. package/dist/ai-elements.es.js +4099 -3985
  8. package/dist/ai-elements.es.js.map +1 -1
  9. package/dist-vue/PkChatbot.js +1 -1
  10. package/dist-vue/PkChatbotAuth.js +1 -1
  11. package/dist-vue/PkChatbotEmptyState.js +1 -1
  12. package/dist-vue/PkChatbotFeedbackForm.js +1 -1
  13. package/dist-vue/PkChatbotFilePreview.js +1 -1
  14. package/dist-vue/PkChatbotInput.js +1 -1
  15. package/dist-vue/PkChatbotMessageFeedback.js +1 -1
  16. package/dist-vue/PkChatbotMessages.js +1 -1
  17. package/dist-vue/PkChatbotOutlineRail.js +1 -1
  18. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  19. package/dist-vue/PkChatbotSteps.js +1 -1
  20. package/dist-vue/PkChatbotViewChat.js +1 -1
  21. package/dist-vue/PkChatbotViewConversations.js +1 -1
  22. package/dist-vue/PkChatbotViewFiles.js +1 -1
  23. package/dist-vue/PkChatbotViewProfile.js +1 -1
  24. package/dist-vue/_chunks/{Document-Dvf2nw6v.js → Document-c1tATTDs.js} +46 -9
  25. package/dist-vue/_chunks/{Document-Dvf2nw6v.js.map → Document-c1tATTDs.js.map} +1 -1
  26. package/dist-vue/_chunks/{PkAvatar-Dv3e4aUl.js → PkAvatar-Bpf6cD4N.js} +1 -1
  27. package/dist-vue/_chunks/{PkAvatar-Dv3e4aUl.js.map → PkAvatar-Bpf6cD4N.js.map} +1 -1
  28. package/dist-vue/_chunks/PkChatbot-DpfxBVue.js +237 -0
  29. package/dist-vue/_chunks/PkChatbot-DpfxBVue.js.map +1 -0
  30. package/dist-vue/_chunks/{PkChatbotAuth-CFqcYxj9.js → PkChatbotAuth-uAPZRV6N.js} +2 -2
  31. package/dist-vue/_chunks/{PkChatbotAuth-CFqcYxj9.js.map → PkChatbotAuth-uAPZRV6N.js.map} +1 -1
  32. package/dist-vue/_chunks/{PkChatbotEmptyState-C70aTfG-.js → PkChatbotEmptyState-JTlPPXdI.js} +2 -2
  33. package/dist-vue/_chunks/{PkChatbotEmptyState-C70aTfG-.js.map → PkChatbotEmptyState-JTlPPXdI.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Ds2-nOaU.js → PkChatbotFeedbackForm-CHXxzWqQ.js} +2 -2
  35. package/dist-vue/_chunks/{PkChatbotFeedbackForm-Ds2-nOaU.js.map → PkChatbotFeedbackForm-CHXxzWqQ.js.map} +1 -1
  36. package/dist-vue/_chunks/{PkChatbotFilePreview-DG887KhT.js → PkChatbotFilePreview-Bf1bdZn8.js} +61 -54
  37. package/dist-vue/_chunks/PkChatbotFilePreview-Bf1bdZn8.js.map +1 -0
  38. package/dist-vue/_chunks/{PkChatbotInput-BTszEUj2.js → PkChatbotInput-DWS7vqC5.js} +152 -124
  39. package/dist-vue/_chunks/PkChatbotInput-DWS7vqC5.js.map +1 -0
  40. package/dist-vue/_chunks/{PkChatbotMessageFeedback-Cp0zzCP8.js → PkChatbotMessageFeedback-DAqlgPrz.js} +1 -1
  41. package/dist-vue/_chunks/{PkChatbotMessageFeedback-Cp0zzCP8.js.map → PkChatbotMessageFeedback-DAqlgPrz.js.map} +1 -1
  42. package/dist-vue/_chunks/{PkChatbotMessages-DLP7utmG.js → PkChatbotMessages-BR5JUybd.js} +208 -212
  43. package/dist-vue/_chunks/PkChatbotMessages-BR5JUybd.js.map +1 -0
  44. package/dist-vue/_chunks/{PkChatbotOutlineRail-CAIfj2dI.js → PkChatbotOutlineRail-BXrdMIrA.js} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotOutlineRail-CAIfj2dI.js.map → PkChatbotOutlineRail-BXrdMIrA.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C-ucv_wp.js → PkChatbotStepToolDetail-C2nWevnD.js} +2 -2
  47. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C-ucv_wp.js.map → PkChatbotStepToolDetail-C2nWevnD.js.map} +1 -1
  48. package/dist-vue/_chunks/{PkChatbotSteps-CBOhYZ10.js → PkChatbotSteps-5Ahr-zpZ.js} +4 -4
  49. package/dist-vue/_chunks/{PkChatbotSteps-CBOhYZ10.js.map → PkChatbotSteps-5Ahr-zpZ.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotViewChat-BZ9IH-sz.js → PkChatbotViewChat-C_t6qEEV.js} +64 -55
  51. package/dist-vue/_chunks/PkChatbotViewChat-C_t6qEEV.js.map +1 -0
  52. package/dist-vue/_chunks/{PkChatbotViewConversations-q5KPJt_D.js → PkChatbotViewConversations-CEaEsnBy.js} +4 -4
  53. package/dist-vue/_chunks/{PkChatbotViewConversations-q5KPJt_D.js.map → PkChatbotViewConversations-CEaEsnBy.js.map} +1 -1
  54. package/dist-vue/_chunks/PkChatbotViewFiles-Bzcn8AEo.js +114 -0
  55. package/dist-vue/_chunks/PkChatbotViewFiles-Bzcn8AEo.js.map +1 -0
  56. package/dist-vue/_chunks/{PkChatbotViewProfile-DTbQlkVL.js → PkChatbotViewProfile-CfFeqjse.js} +4 -4
  57. package/dist-vue/_chunks/{PkChatbotViewProfile-DTbQlkVL.js.map → PkChatbotViewProfile-CfFeqjse.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkRelativeTime-D72zYq42.js → PkRelativeTime-2HoOjv_T.js} +1 -1
  59. package/dist-vue/_chunks/{PkRelativeTime-D72zYq42.js.map → PkRelativeTime-2HoOjv_T.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkStreamingMarkdown-CVAsbuWi.js → PkStreamingMarkdown-C_LQOTVJ.js} +1 -1
  61. package/dist-vue/_chunks/{PkStreamingMarkdown-CVAsbuWi.js.map → PkStreamingMarkdown-C_LQOTVJ.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkSvgViewer-CTYxVK7q.js → PkSvgViewer-Dtx4uluo.js} +2 -2
  63. package/dist-vue/_chunks/{PkSvgViewer-CTYxVK7q.js.map → PkSvgViewer-Dtx4uluo.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkToolShowArtifact-Csjfo9Xl.js → PkToolShowArtifact-CoYM3_A3.js} +3 -3
  65. package/dist-vue/_chunks/{PkToolShowArtifact-Csjfo9Xl.js.map → PkToolShowArtifact-CoYM3_A3.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkToolShowCalendarEvent-B2tHaoqo.js → PkToolShowCalendarEvent-BZYdRwid.js} +2 -2
  67. package/dist-vue/_chunks/{PkToolShowCalendarEvent-B2tHaoqo.js.map → PkToolShowCalendarEvent-BZYdRwid.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolShowComparison-BLDtjv3w.js → PkToolShowComparison-C4OP5c1t.js} +2 -2
  69. package/dist-vue/_chunks/{PkToolShowComparison-BLDtjv3w.js.map → PkToolShowComparison-C4OP5c1t.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolShowContactForm-CdgD4fd8.js → PkToolShowContactForm-DjX9G8CD.js} +5 -5
  71. package/dist-vue/_chunks/{PkToolShowContactForm-CdgD4fd8.js.map → PkToolShowContactForm-DjX9G8CD.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolShowDiagram-DGYQjjGj.js → PkToolShowDiagram-DHwAckwN.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowDiagram-DGYQjjGj.js.map → PkToolShowDiagram-DHwAckwN.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowEmail-D42WDTO9.js → PkToolShowEmail-5waUO5cm.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolShowEmail-D42WDTO9.js.map → PkToolShowEmail-5waUO5cm.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkToolShowForm-BhVSPIAR.js → PkToolShowForm-C7bOdRse.js} +3 -3
  77. package/dist-vue/_chunks/{PkToolShowForm-BhVSPIAR.js.map → PkToolShowForm-C7bOdRse.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowImageGallery-WANi2hA0.js → PkToolShowImageGallery-D3bqInQn.js} +3 -3
  79. package/dist-vue/_chunks/{PkToolShowImageGallery-WANi2hA0.js.map → PkToolShowImageGallery-D3bqInQn.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowLocation-RVbaQoU5.js → PkToolShowLocation-DE-dbJEw.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowLocation-RVbaQoU5.js.map → PkToolShowLocation-DE-dbJEw.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowMessage-D8UbJcas.js → PkToolShowMessage-DCbW7AYl.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowMessage-D8UbJcas.js.map → PkToolShowMessage-DCbW7AYl.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowProductList-BQts3MBy.js → PkToolShowProductList-Blsv3Cio.js} +3 -3
  85. package/dist-vue/_chunks/{PkToolShowProductList-BQts3MBy.js.map → PkToolShowProductList-Blsv3Cio.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowQrCode-BybXCt5e.js → PkToolShowQrCode-BbMTgOW3.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowQrCode-BybXCt5e.js.map → PkToolShowQrCode-BbMTgOW3.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowSources-DRewYfe-.js → PkToolShowSources-B9d3iLVk.js} +5 -5
  89. package/dist-vue/_chunks/{PkToolShowSources-DRewYfe-.js.map → PkToolShowSources-B9d3iLVk.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DKiYUsaZ.js → PkToolShowSuggestedReply-B516t3Nb.js} +2 -2
  91. package/dist-vue/_chunks/PkToolShowSuggestedReply-B516t3Nb.js.map +1 -0
  92. package/dist-vue/_chunks/{PkToolShowWebPages-IV3OzwJe.js → PkToolShowWebPages-BF2aHJGK.js} +3 -3
  93. package/dist-vue/_chunks/{PkToolShowWebPages-IV3OzwJe.js.map → PkToolShowWebPages-BF2aHJGK.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkUrl-a6l-l4Au.js → PkUrl-DA-6t_2f.js} +1 -1
  95. package/dist-vue/_chunks/{PkUrl-a6l-l4Au.js.map → PkUrl-DA-6t_2f.js.map} +1 -1
  96. package/dist-vue/_chunks/{chatbotProfileContext-R95aQ5bH.js → chatbotProfileContext-R1zi561l.js} +1 -1
  97. package/dist-vue/_chunks/{chatbotProfileContext-R95aQ5bH.js.map → chatbotProfileContext-R1zi561l.js.map} +1 -1
  98. package/dist-vue/_chunks/{constants-DpYDYnZU.js → constants-CWT3GgSb.js} +2 -2
  99. package/dist-vue/_chunks/constants-CWT3GgSb.js.map +1 -0
  100. package/dist-vue/_chunks/{createChatbotApiClient-DXmWtu3b.js → createChatbotApiClient-kU7rCKwN.js} +13 -5
  101. package/dist-vue/_chunks/createChatbotApiClient-kU7rCKwN.js.map +1 -0
  102. package/dist-vue/_chunks/{dist-BbAXqaCM.js → dist-0LxfGh4q.js} +2 -2
  103. package/dist-vue/_chunks/{dist-BbAXqaCM.js.map → dist-0LxfGh4q.js.map} +1 -1
  104. package/dist-vue/_chunks/{dist-BU1gMaJv.js → dist-46HfWmpr.js} +2 -2
  105. package/dist-vue/_chunks/{dist-BU1gMaJv.js.map → dist-46HfWmpr.js.map} +1 -1
  106. package/dist-vue/_chunks/{dist-CpoLpTWk.js → dist-8YCZENrl.js} +3 -3
  107. package/dist-vue/_chunks/{dist-CpoLpTWk.js.map → dist-8YCZENrl.js.map} +1 -1
  108. package/dist-vue/_chunks/{dist-l7mimsz6.js → dist-B34dY8rD.js} +2 -2
  109. package/dist-vue/_chunks/{dist-l7mimsz6.js.map → dist-B34dY8rD.js.map} +1 -1
  110. package/dist-vue/_chunks/{dist-CYrZgvgZ.js → dist-BfbUNalO.js} +4 -4
  111. package/dist-vue/_chunks/{dist-CYrZgvgZ.js.map → dist-BfbUNalO.js.map} +1 -1
  112. package/dist-vue/_chunks/{dist-Begygip9.js → dist-BmRGnWn9.js} +3 -3
  113. package/dist-vue/_chunks/{dist-Begygip9.js.map → dist-BmRGnWn9.js.map} +1 -1
  114. package/dist-vue/_chunks/{dist-BGl_mYmF.js → dist-BoaZDzxm.js} +4 -4
  115. package/dist-vue/_chunks/{dist-BGl_mYmF.js.map → dist-BoaZDzxm.js.map} +1 -1
  116. package/dist-vue/_chunks/{dist-DEyUvwtq.js → dist-Bq9kJLlA.js} +3 -3
  117. package/dist-vue/_chunks/{dist-DEyUvwtq.js.map → dist-Bq9kJLlA.js.map} +1 -1
  118. package/dist-vue/_chunks/{dist-nZs6UeVS.js → dist-Bs-QG-km.js} +1 -1
  119. package/dist-vue/_chunks/{dist-nZs6UeVS.js.map → dist-Bs-QG-km.js.map} +1 -1
  120. package/dist-vue/_chunks/{dist-DinYvSmw.js → dist-BxqLQ_dy.js} +2 -2
  121. package/dist-vue/_chunks/{dist-DinYvSmw.js.map → dist-BxqLQ_dy.js.map} +1 -1
  122. package/dist-vue/_chunks/{dist-Dj7rLAD9.js → dist-Cc0Lyhoq.js} +3 -3
  123. package/dist-vue/_chunks/{dist-Dj7rLAD9.js.map → dist-Cc0Lyhoq.js.map} +1 -1
  124. package/dist-vue/_chunks/{dist-Jh4J_VuU.js → dist-CiYFTV6m.js} +3 -3
  125. package/dist-vue/_chunks/{dist-Jh4J_VuU.js.map → dist-CiYFTV6m.js.map} +1 -1
  126. package/dist-vue/_chunks/{dist-BzsV0Mzp.js → dist-CrcvoPSj.js} +2 -2
  127. package/dist-vue/_chunks/{dist-BzsV0Mzp.js.map → dist-CrcvoPSj.js.map} +1 -1
  128. package/dist-vue/_chunks/{dist-CABEM3v-.js → dist-DK5UPLjU.js} +4 -4
  129. package/dist-vue/_chunks/{dist-CABEM3v-.js.map → dist-DK5UPLjU.js.map} +1 -1
  130. package/dist-vue/_chunks/{dist-uvKhW3hB.js → dist-Da4-ZEZn.js} +3 -3
  131. package/dist-vue/_chunks/{dist-uvKhW3hB.js.map → dist-Da4-ZEZn.js.map} +1 -1
  132. package/dist-vue/_chunks/{dist-SbwxxzT7.js → dist-Dc77ClI_.js} +3 -3
  133. package/dist-vue/_chunks/{dist-SbwxxzT7.js.map → dist-Dc77ClI_.js.map} +1 -1
  134. package/dist-vue/_chunks/{dist-t9ZGnt-g.js → dist-LN9oA4PR.js} +2 -2
  135. package/dist-vue/_chunks/{dist-t9ZGnt-g.js.map → dist-LN9oA4PR.js.map} +1 -1
  136. package/dist-vue/_chunks/{dist-DKzsFjYx.js → dist-gx9K9AtO.js} +5 -5
  137. package/dist-vue/_chunks/{dist-DKzsFjYx.js.map → dist-gx9K9AtO.js.map} +1 -1
  138. package/dist-vue/_chunks/{dist-Bnrde8nq.js → dist-iDVEgNgZ.js} +3 -3
  139. package/dist-vue/_chunks/{dist-Bnrde8nq.js.map → dist-iDVEgNgZ.js.map} +1 -1
  140. package/dist-vue/_chunks/{dist-Byr8BhEG.js → dist-m2_O1KGc.js} +3 -3
  141. package/dist-vue/_chunks/{dist-Byr8BhEG.js.map → dist-m2_O1KGc.js.map} +1 -1
  142. package/dist-vue/_chunks/{dist-C08Qizu9.js → dist-qArLqzVS.js} +2 -2
  143. package/dist-vue/_chunks/{dist-C08Qizu9.js.map → dist-qArLqzVS.js.map} +1 -1
  144. package/dist-vue/_chunks/{dist-6gaEFVNT.js → dist-qJLUge9r.js} +2 -2
  145. package/dist-vue/_chunks/{dist-6gaEFVNT.js.map → dist-qJLUge9r.js.map} +1 -1
  146. package/dist-vue/_chunks/{index.es-ChKj3bPm.js → index.es-W-WNHB7-.js} +1 -1
  147. package/dist-vue/_chunks/{index.es-ChKj3bPm.js.map → index.es-W-WNHB7-.js.map} +1 -1
  148. package/dist-vue/_chunks/{useChatbotStore-GEO6rQ74.js → useChatbotStore-WPRS7mhR.js} +855 -832
  149. package/dist-vue/_chunks/{useChatbotStore-GEO6rQ74.js.map → useChatbotStore-WPRS7mhR.js.map} +1 -1
  150. package/dist-vue/_chunks/{useLocalizedString-DPX1ED4p.js → useLocalizedString-BQzGZyu0.js} +1 -1
  151. package/dist-vue/_chunks/{useLocalizedString-DPX1ED4p.js.map → useLocalizedString-BQzGZyu0.js.map} +1 -1
  152. package/dist-vue/_chunks/utils-BDNQaNua.js +101 -0
  153. package/dist-vue/_chunks/utils-BDNQaNua.js.map +1 -0
  154. package/dist-vue/api.js +1 -1
  155. package/dist-vue/composables.js +4 -4
  156. package/dist-vue/index.js +105 -80
  157. package/dist-vue/index.js.map +1 -1
  158. package/dist-vue/locales.js +10 -2
  159. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +7 -3
  160. package/dist-vue/packages/components/src/chat/PkMessageParts.d.ts +3 -0
  161. package/dist-vue/packages/components/src/chat/constants.d.ts +1 -1
  162. package/dist-vue/packages/components/src/chat/useChatScroll.d.ts +0 -7
  163. package/dist-vue/packages/components/src/table/PkTableSortable.d.ts +4 -0
  164. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +1 -0
  165. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +42 -3
  166. package/dist-vue/packages/composable/src/index.d.ts +1 -0
  167. package/dist-vue/packages/composable/src/useFileRow.d.ts +24 -0
  168. package/dist-vue/packages/models/src/schema/Agent.d.ts +1 -0
  169. package/dist-vue/packages/models/src/schema/Document.d.ts +12 -0
  170. package/dist-vue/packages/models/src/schema/Platform.d.ts +6 -0
  171. package/dist-vue/packages/models/src/schema/constants.d.ts +7 -2
  172. package/dist-vue/style.css +1 -1
  173. package/package.json +1 -1
  174. package/dist/_chunks/Document-BajUssb0.js.map +0 -1
  175. package/dist/_chunks/PkToolShowSuggestedReply-1j4lOkRj.js.map +0 -1
  176. package/dist-vue/_chunks/PkChatbot-q_W4cKsy.js +0 -237
  177. package/dist-vue/_chunks/PkChatbot-q_W4cKsy.js.map +0 -1
  178. package/dist-vue/_chunks/PkChatbotFilePreview-DG887KhT.js.map +0 -1
  179. package/dist-vue/_chunks/PkChatbotInput-BTszEUj2.js.map +0 -1
  180. package/dist-vue/_chunks/PkChatbotMessages-DLP7utmG.js.map +0 -1
  181. package/dist-vue/_chunks/PkChatbotViewChat-BZ9IH-sz.js.map +0 -1
  182. package/dist-vue/_chunks/PkChatbotViewFiles-B0FNE1Kk.js +0 -86
  183. package/dist-vue/_chunks/PkChatbotViewFiles-B0FNE1Kk.js.map +0 -1
  184. package/dist-vue/_chunks/PkToolShowSuggestedReply-DKiYUsaZ.js.map +0 -1
  185. package/dist-vue/_chunks/constants-DpYDYnZU.js.map +0 -1
  186. package/dist-vue/_chunks/createChatbotApiClient-DXmWtu3b.js.map +0 -1
  187. package/dist-vue/_chunks/utils-BBAveXy4.js +0 -101
  188. package/dist-vue/_chunks/utils-BBAveXy4.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { C as e, _ as t, a as n, b as r, c as i, d as a, g as o, i as s, m as c, n as l, o as u, p as d, r as f, s as p, u as m, v as h, w as ee, y as g } from "./schemas-B9AZeRC2.js";
2
- import { t as te } from "./createChatbotApiClient-DXmWtu3b.js";
2
+ import { t as te } from "./createChatbotApiClient-kU7rCKwN.js";
3
3
  import { b as ne, d as re, x as ie, y as ae } from "./src-BCYjA3mm.js";
4
4
  import { a as _, i as v, n as y, r as b, t as x } from "./ZodError-CrsKgcZC.js";
5
5
  import { t as oe } from "./useSafeLocalStorage-ZixhvX4i.js";
@@ -39,30 +39,30 @@ var he = Object.create, E = Object.defineProperty, ge = Object.getOwnPropertyDes
39
39
  function Te(e) {
40
40
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
41
41
  }
42
- var Ee = "AI_InvalidArgumentError", j = `vercel.ai.error.${Ee}`, De = Symbol.for(j), Oe, ke, Ae = class extends (ke = A, Oe = De, ke) {
42
+ var Ee = "AI_InvalidArgumentError", De = `vercel.ai.error.${Ee}`, Oe = Symbol.for(De), ke, Ae, je = class extends (Ae = A, ke = Oe, Ae) {
43
43
  constructor({ message: e, cause: t, argument: n }) {
44
44
  super({
45
45
  name: Ee,
46
46
  message: e,
47
47
  cause: t
48
- }), this[Oe] = !0, this.argument = n;
48
+ }), this[ke] = !0, this.argument = n;
49
49
  }
50
50
  static isInstance(e) {
51
- return A.hasMarker(e, j);
51
+ return A.hasMarker(e, De);
52
52
  }
53
- }, je = "AI_JSONParseError", Me = `vercel.ai.error.${je}`, Ne = Symbol.for(Me), Pe, M, N = class extends (M = A, Pe = Ne, M) {
53
+ }, Me = "AI_JSONParseError", Ne = `vercel.ai.error.${Me}`, Pe = Symbol.for(Ne), Fe, j, M = class extends (j = A, Fe = Pe, j) {
54
54
  constructor({ text: e, cause: t }) {
55
55
  super({
56
- name: je,
56
+ name: Me,
57
57
  message: `JSON parsing failed: Text: ${e}.
58
58
  Error message: ${Te(t)}`,
59
59
  cause: t
60
- }), this[Pe] = !0, this.text = e;
60
+ }), this[Fe] = !0, this.text = e;
61
61
  }
62
62
  static isInstance(e) {
63
- return A.hasMarker(e, Me);
63
+ return A.hasMarker(e, Ne);
64
64
  }
65
- }, Fe = "AI_TypeValidationError", Ie = `vercel.ai.error.${Fe}`, Le = Symbol.for(Ie), Re, ze, Be = class e extends (ze = A, Re = Le, ze) {
65
+ }, Ie = "AI_TypeValidationError", Le = `vercel.ai.error.${Ie}`, Re = Symbol.for(Le), ze, Be, Ve = class e extends (Be = A, ze = Re, Be) {
66
66
  constructor({ value: e, cause: t, context: n }) {
67
67
  let r = "Type validation failed";
68
68
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -71,14 +71,14 @@ Error message: ${Te(t)}`,
71
71
  n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(", "), r += ")";
72
72
  }
73
73
  super({
74
- name: Fe,
74
+ name: Ie,
75
75
  message: `${r}: Value: ${JSON.stringify(e)}.
76
76
  Error message: ${Te(t)}`,
77
77
  cause: t
78
- }), this[Re] = !0, this.value = e, this.context = n;
78
+ }), this[ze] = !0, this.value = e, this.context = n;
79
79
  }
80
80
  static isInstance(e) {
81
- return A.hasMarker(e, Ie);
81
+ return A.hasMarker(e, Le);
82
82
  }
83
83
  static wrap({ value: t, cause: n, context: r }) {
84
84
  return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({
@@ -87,7 +87,7 @@ Error message: ${Te(t)}`,
87
87
  context: r
88
88
  });
89
89
  }
90
- }, Ve = (e, t) => {
90
+ }, He = (e, t) => {
91
91
  let n;
92
92
  switch (e.code) {
93
93
  case y.invalid_type:
@@ -141,13 +141,13 @@ Error message: ${Te(t)}`,
141
141
  default: n = t.defaultError, _.assertNever(e);
142
142
  }
143
143
  return { message: n };
144
- }, He = Ve;
145
- function Ue() {
146
- return He;
144
+ }, Ue = He;
145
+ function We() {
146
+ return Ue;
147
147
  }
148
148
  //#endregion
149
149
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/helpers/parseUtil.js
150
- var We = (e) => {
150
+ var Ge = (e) => {
151
151
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
152
152
  ...i,
153
153
  path: a
@@ -168,8 +168,8 @@ var We = (e) => {
168
168
  message: s
169
169
  };
170
170
  };
171
- function P(e, t) {
172
- let n = Ue(), r = We({
171
+ function N(e, t) {
172
+ let n = We(), r = Ge({
173
173
  issueData: t,
174
174
  data: e.data,
175
175
  path: e.path,
@@ -177,12 +177,12 @@ function P(e, t) {
177
177
  e.common.contextualErrorMap,
178
178
  e.schemaErrorMap,
179
179
  n,
180
- n === Ve ? void 0 : Ve
180
+ n === He ? void 0 : He
181
181
  ].filter((e) => !!e)
182
182
  });
183
183
  e.common.issues.push(r);
184
184
  }
185
- var F = class e {
185
+ var P = class e {
186
186
  constructor() {
187
187
  this.value = "valid";
188
188
  }
@@ -195,7 +195,7 @@ var F = class e {
195
195
  static mergeArray(e, t) {
196
196
  let n = [];
197
197
  for (let r of t) {
198
- if (r.status === "aborted") return I;
198
+ if (r.status === "aborted") return F;
199
199
  r.status === "dirty" && e.dirty(), n.push(r.value);
200
200
  }
201
201
  return {
@@ -218,7 +218,7 @@ var F = class e {
218
218
  let n = {};
219
219
  for (let r of t) {
220
220
  let { key: t, value: i } = r;
221
- if (t.status === "aborted" || i.status === "aborted") return I;
221
+ if (t.status === "aborted" || i.status === "aborted") return F;
222
222
  t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
223
223
  }
224
224
  return {
@@ -226,27 +226,27 @@ var F = class e {
226
226
  value: n
227
227
  };
228
228
  }
229
- }, I = Object.freeze({ status: "aborted" }), Ge = (e) => ({
229
+ }, F = Object.freeze({ status: "aborted" }), Ke = (e) => ({
230
230
  status: "dirty",
231
231
  value: e
232
- }), L = (e) => ({
232
+ }), I = (e) => ({
233
233
  status: "valid",
234
234
  value: e
235
- }), Ke = (e) => e.status === "aborted", qe = (e) => e.status === "dirty", Je = (e) => e.status === "valid", Ye = (e) => typeof Promise < "u" && e instanceof Promise, R;
235
+ }), qe = (e) => e.status === "aborted", Je = (e) => e.status === "dirty", Ye = (e) => e.status === "valid", Xe = (e) => typeof Promise < "u" && e instanceof Promise, L;
236
236
  (function(e) {
237
237
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
238
- })(R ||= {});
238
+ })(L ||= {});
239
239
  //#endregion
240
240
  //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v3/types.js
241
- var z = class {
241
+ var R = class {
242
242
  constructor(e, t, n, r) {
243
243
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
244
244
  }
245
245
  get path() {
246
246
  return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
247
247
  }
248
- }, Xe = (e, t) => {
249
- if (Je(t)) return {
248
+ }, Ze = (e, t) => {
249
+ if (Ye(t)) return {
250
250
  success: !0,
251
251
  data: t.value
252
252
  };
@@ -260,7 +260,7 @@ var z = class {
260
260
  }
261
261
  };
262
262
  };
263
- function B(e) {
263
+ function z(e) {
264
264
  if (!e) return {};
265
265
  let { errorMap: t, invalid_type_error: n, required_error: r, description: i } = e;
266
266
  if (t && (n || r)) throw Error("Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.");
@@ -275,7 +275,7 @@ function B(e) {
275
275
  description: i
276
276
  };
277
277
  }
278
- var V = class {
278
+ var B = class {
279
279
  get description() {
280
280
  return this._def.description;
281
281
  }
@@ -294,7 +294,7 @@ var V = class {
294
294
  }
295
295
  _processInputParams(e) {
296
296
  return {
297
- status: new F(),
297
+ status: new P(),
298
298
  ctx: {
299
299
  common: e.parent.common,
300
300
  data: e.data,
@@ -307,7 +307,7 @@ var V = class {
307
307
  }
308
308
  _parseSync(e) {
309
309
  let t = this._parse(e);
310
- if (Ye(t)) throw Error("Synchronous parse encountered promise.");
310
+ if (Xe(t)) throw Error("Synchronous parse encountered promise.");
311
311
  return t;
312
312
  }
313
313
  _parseAsync(e) {
@@ -332,7 +332,7 @@ var V = class {
332
332
  data: e,
333
333
  parsedType: v(e)
334
334
  };
335
- return Xe(n, this._parseSync({
335
+ return Ze(n, this._parseSync({
336
336
  data: e,
337
337
  path: n.path,
338
338
  parent: n
@@ -356,7 +356,7 @@ var V = class {
356
356
  path: [],
357
357
  parent: t
358
358
  });
359
- return Je(n) ? { value: n.value } : { issues: t.common.issues };
359
+ return Ye(n) ? { value: n.value } : { issues: t.common.issues };
360
360
  } catch (e) {
361
361
  e?.message?.toLowerCase()?.includes("encountered") && (this["~standard"].async = !0), t.common = {
362
362
  issues: [],
@@ -367,7 +367,7 @@ var V = class {
367
367
  data: e,
368
368
  path: [],
369
369
  parent: t
370
- }).then((e) => Je(e) ? { value: e.value } : { issues: t.common.issues });
370
+ }).then((e) => Ye(e) ? { value: e.value } : { issues: t.common.issues });
371
371
  }
372
372
  async parseAsync(e, t) {
373
373
  let n = await this.safeParseAsync(e, t);
@@ -391,7 +391,7 @@ var V = class {
391
391
  path: n.path,
392
392
  parent: n
393
393
  });
394
- return Xe(n, await (Ye(r) ? r : Promise.resolve(r)));
394
+ return Ze(n, await (Xe(r) ? r : Promise.resolve(r)));
395
395
  }
396
396
  refine(e, t) {
397
397
  let n = (e) => typeof t == "string" || t === void 0 ? { message: t } : typeof t == "function" ? t(e) : t;
@@ -407,9 +407,9 @@ var V = class {
407
407
  return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
408
408
  }
409
409
  _refinement(e) {
410
- return new U({
410
+ return new W({
411
411
  schema: this,
412
- typeName: G.ZodEffects,
412
+ typeName: K.ZodEffects,
413
413
  effect: {
414
414
  type: "refinement",
415
415
  refinement: e
@@ -427,10 +427,10 @@ var V = class {
427
427
  };
428
428
  }
429
429
  optional() {
430
- return W.create(this, this._def);
430
+ return G.create(this, this._def);
431
431
  }
432
432
  nullable() {
433
- return Qt.create(this, this._def);
433
+ return Zt.create(this, this._def);
434
434
  }
435
435
  nullish() {
436
436
  return this.nullable().optional();
@@ -439,19 +439,19 @@ var V = class {
439
439
  return Pt.create(this);
440
440
  }
441
441
  promise() {
442
- return Zt.create(this, this._def);
442
+ return Xt.create(this, this._def);
443
443
  }
444
444
  or(e) {
445
445
  return It.create([this, e], this._def);
446
446
  }
447
447
  and(e) {
448
- return Bt.create(this, e, this._def);
448
+ return zt.create(this, e, this._def);
449
449
  }
450
450
  transform(e) {
451
- return new U({
452
- ...B(this._def),
451
+ return new W({
452
+ ...z(this._def),
453
453
  schema: this,
454
- typeName: G.ZodEffects,
454
+ typeName: K.ZodEffects,
455
455
  effect: {
456
456
  type: "transform",
457
457
  transform: e
@@ -460,27 +460,27 @@ var V = class {
460
460
  }
461
461
  default(e) {
462
462
  let t = typeof e == "function" ? e : () => e;
463
- return new $t({
464
- ...B(this._def),
463
+ return new Qt({
464
+ ...z(this._def),
465
465
  innerType: this,
466
466
  defaultValue: t,
467
- typeName: G.ZodDefault
467
+ typeName: K.ZodDefault
468
468
  });
469
469
  }
470
470
  brand() {
471
- return new nn({
472
- typeName: G.ZodBranded,
471
+ return new tn({
472
+ typeName: K.ZodBranded,
473
473
  type: this,
474
- ...B(this._def)
474
+ ...z(this._def)
475
475
  });
476
476
  }
477
477
  catch(e) {
478
478
  let t = typeof e == "function" ? e : () => e;
479
- return new en({
480
- ...B(this._def),
479
+ return new $t({
480
+ ...z(this._def),
481
481
  innerType: this,
482
482
  catchValue: t,
483
- typeName: G.ZodCatch
483
+ typeName: K.ZodCatch
484
484
  });
485
485
  }
486
486
  describe(e) {
@@ -491,10 +491,10 @@ var V = class {
491
491
  });
492
492
  }
493
493
  pipe(e) {
494
- return rn.create(this, e);
494
+ return nn.create(this, e);
495
495
  }
496
496
  readonly() {
497
- return an.create(this);
497
+ return rn.create(this);
498
498
  }
499
499
  isOptional() {
500
500
  return this.safeParse(void 0).success;
@@ -502,25 +502,25 @@ var V = class {
502
502
  isNullable() {
503
503
  return this.safeParse(null).success;
504
504
  }
505
- }, Ze = /^c[^\s-]{8,}$/i, Qe = /^[0-9a-z]+$/, $e = /^[0-9A-HJKMNP-TV-Z]{26}$/i, et = /^[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, tt = /^[a-z0-9_-]{21}$/i, nt = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, rt = /^[-+]?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)?)??$/, it = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, at = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", ot, st = /^(?:(?: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])$/, ct = /^(?:(?: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])$/, lt = /^(([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]))$/, ut = /^(([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])$/, dt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ft = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, pt = "((\\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])))", mt = RegExp(`^${pt}$`);
506
- function ht(e) {
505
+ }, Qe = /^c[^\s-]{8,}$/i, $e = /^[0-9a-z]+$/, et = /^[0-9A-HJKMNP-TV-Z]{26}$/i, tt = /^[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, nt = /^[a-z0-9_-]{21}$/i, rt = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, it = /^[-+]?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)?)??$/, at = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ot = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", st, ct = /^(?:(?: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])$/, lt = /^(?:(?: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])$/, ut = /^(([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]))$/, dt = /^(([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])$/, ft = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, pt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, mt = "((\\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])))", ht = RegExp(`^${mt}$`);
506
+ function gt(e) {
507
507
  let t = "[0-5]\\d";
508
508
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
509
509
  let n = e.precision ? "+" : "?";
510
510
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
511
511
  }
512
- function gt(e) {
513
- return RegExp(`^${ht(e)}$`);
514
- }
515
512
  function _t(e) {
516
- let t = `${pt}T${ht(e)}`, n = [];
517
- return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
513
+ return RegExp(`^${gt(e)}$`);
518
514
  }
519
- function vt(e, t) {
520
- return !!((t === "v4" || !t) && st.test(e) || (t === "v6" || !t) && lt.test(e));
515
+ function vt(e) {
516
+ let t = `${mt}T${gt(e)}`, n = [];
517
+ return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
521
518
  }
522
519
  function yt(e, t) {
523
- if (!nt.test(e)) return !1;
520
+ return !!((t === "v4" || !t) && ct.test(e) || (t === "v6" || !t) && ut.test(e));
521
+ }
522
+ function bt(e, t) {
523
+ if (!rt.test(e)) return !1;
524
524
  try {
525
525
  let [n] = e.split(".");
526
526
  if (!n) return !1;
@@ -530,21 +530,21 @@ function yt(e, t) {
530
530
  return !1;
531
531
  }
532
532
  }
533
- function bt(e, t) {
534
- return !!((t === "v4" || !t) && ct.test(e) || (t === "v6" || !t) && ut.test(e));
533
+ function xt(e, t) {
534
+ return !!((t === "v4" || !t) && lt.test(e) || (t === "v6" || !t) && dt.test(e));
535
535
  }
536
- var xt = class e extends V {
536
+ var St = class e extends B {
537
537
  _parse(e) {
538
538
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== b.string) {
539
539
  let t = this._getOrReturnCtx(e);
540
- return P(t, {
540
+ return N(t, {
541
541
  code: y.invalid_type,
542
542
  expected: b.string,
543
543
  received: t.parsedType
544
- }), I;
544
+ }), F;
545
545
  }
546
- let t = new F(), n;
547
- for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), P(n, {
546
+ let t = new P(), n;
547
+ for (let r of this._def.checks) if (r.kind === "min") e.data.length < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
548
548
  code: y.too_small,
549
549
  minimum: r.value,
550
550
  type: "string",
@@ -552,7 +552,7 @@ var xt = class e extends V {
552
552
  exact: !1,
553
553
  message: r.message
554
554
  }), t.dirty());
555
- else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), P(n, {
555
+ else if (r.kind === "max") e.data.length > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
556
556
  code: y.too_big,
557
557
  maximum: r.value,
558
558
  type: "string",
@@ -562,14 +562,14 @@ var xt = class e extends V {
562
562
  }), t.dirty());
563
563
  else if (r.kind === "length") {
564
564
  let i = e.data.length > r.value, a = e.data.length < r.value;
565
- (i || a) && (n = this._getOrReturnCtx(e, n), i ? P(n, {
565
+ (i || a) && (n = this._getOrReturnCtx(e, n), i ? N(n, {
566
566
  code: y.too_big,
567
567
  maximum: r.value,
568
568
  type: "string",
569
569
  inclusive: !0,
570
570
  exact: !0,
571
571
  message: r.message
572
- }) : a && P(n, {
572
+ }) : a && N(n, {
573
573
  code: y.too_small,
574
574
  minimum: r.value,
575
575
  type: "string",
@@ -577,37 +577,37 @@ var xt = class e extends V {
577
577
  exact: !0,
578
578
  message: r.message
579
579
  }), t.dirty());
580
- } else if (r.kind === "email") it.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
580
+ } else if (r.kind === "email") at.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
581
581
  validation: "email",
582
582
  code: y.invalid_string,
583
583
  message: r.message
584
584
  }), t.dirty());
585
- else if (r.kind === "emoji") ot ||= new RegExp(at, "u"), ot.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
585
+ else if (r.kind === "emoji") st ||= new RegExp(ot, "u"), st.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
586
586
  validation: "emoji",
587
587
  code: y.invalid_string,
588
588
  message: r.message
589
589
  }), t.dirty());
590
- else if (r.kind === "uuid") et.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
590
+ else if (r.kind === "uuid") tt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
591
591
  validation: "uuid",
592
592
  code: y.invalid_string,
593
593
  message: r.message
594
594
  }), t.dirty());
595
- else if (r.kind === "nanoid") tt.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
595
+ else if (r.kind === "nanoid") nt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
596
596
  validation: "nanoid",
597
597
  code: y.invalid_string,
598
598
  message: r.message
599
599
  }), t.dirty());
600
- else if (r.kind === "cuid") Ze.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
600
+ else if (r.kind === "cuid") Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
601
601
  validation: "cuid",
602
602
  code: y.invalid_string,
603
603
  message: r.message
604
604
  }), t.dirty());
605
- else if (r.kind === "cuid2") Qe.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
605
+ else if (r.kind === "cuid2") $e.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
606
606
  validation: "cuid2",
607
607
  code: y.invalid_string,
608
608
  message: r.message
609
609
  }), t.dirty());
610
- else if (r.kind === "ulid") $e.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
610
+ else if (r.kind === "ulid") et.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
611
611
  validation: "ulid",
612
612
  code: y.invalid_string,
613
613
  message: r.message
@@ -615,64 +615,64 @@ var xt = class e extends V {
615
615
  else if (r.kind === "url") try {
616
616
  new URL(e.data);
617
617
  } catch {
618
- n = this._getOrReturnCtx(e, n), P(n, {
618
+ n = this._getOrReturnCtx(e, n), N(n, {
619
619
  validation: "url",
620
620
  code: y.invalid_string,
621
621
  message: r.message
622
622
  }), t.dirty();
623
623
  }
624
- else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
624
+ else r.kind === "regex" ? (r.regex.lastIndex = 0, r.regex.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
625
625
  validation: "regex",
626
626
  code: y.invalid_string,
627
627
  message: r.message
628
- }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), P(n, {
628
+ }), t.dirty())) : r.kind === "trim" ? e.data = e.data.trim() : r.kind === "includes" ? e.data.includes(r.value, r.position) || (n = this._getOrReturnCtx(e, n), N(n, {
629
629
  code: y.invalid_string,
630
630
  validation: {
631
631
  includes: r.value,
632
632
  position: r.position
633
633
  },
634
634
  message: r.message
635
- }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), P(n, {
635
+ }), t.dirty()) : r.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : r.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : r.kind === "startsWith" ? e.data.startsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
636
636
  code: y.invalid_string,
637
637
  validation: { startsWith: r.value },
638
638
  message: r.message
639
- }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), P(n, {
639
+ }), t.dirty()) : r.kind === "endsWith" ? e.data.endsWith(r.value) || (n = this._getOrReturnCtx(e, n), N(n, {
640
640
  code: y.invalid_string,
641
641
  validation: { endsWith: r.value },
642
642
  message: r.message
643
- }), t.dirty()) : r.kind === "datetime" ? _t(r).test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
643
+ }), t.dirty()) : r.kind === "datetime" ? vt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
644
644
  code: y.invalid_string,
645
645
  validation: "datetime",
646
646
  message: r.message
647
- }), t.dirty()) : r.kind === "date" ? mt.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
647
+ }), t.dirty()) : r.kind === "date" ? ht.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
648
648
  code: y.invalid_string,
649
649
  validation: "date",
650
650
  message: r.message
651
- }), t.dirty()) : r.kind === "time" ? gt(r).test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
651
+ }), t.dirty()) : r.kind === "time" ? _t(r).test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
652
652
  code: y.invalid_string,
653
653
  validation: "time",
654
654
  message: r.message
655
- }), t.dirty()) : r.kind === "duration" ? rt.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
655
+ }), t.dirty()) : r.kind === "duration" ? it.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
656
656
  validation: "duration",
657
657
  code: y.invalid_string,
658
658
  message: r.message
659
- }), t.dirty()) : r.kind === "ip" ? vt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), P(n, {
659
+ }), t.dirty()) : r.kind === "ip" ? yt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
660
660
  validation: "ip",
661
661
  code: y.invalid_string,
662
662
  message: r.message
663
- }), t.dirty()) : r.kind === "jwt" ? yt(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), P(n, {
663
+ }), t.dirty()) : r.kind === "jwt" ? bt(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), N(n, {
664
664
  validation: "jwt",
665
665
  code: y.invalid_string,
666
666
  message: r.message
667
- }), t.dirty()) : r.kind === "cidr" ? bt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), P(n, {
667
+ }), t.dirty()) : r.kind === "cidr" ? xt(e.data, r.version) || (n = this._getOrReturnCtx(e, n), N(n, {
668
668
  validation: "cidr",
669
669
  code: y.invalid_string,
670
670
  message: r.message
671
- }), t.dirty()) : r.kind === "base64" ? dt.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
671
+ }), t.dirty()) : r.kind === "base64" ? ft.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
672
672
  validation: "base64",
673
673
  code: y.invalid_string,
674
674
  message: r.message
675
- }), t.dirty()) : r.kind === "base64url" ? ft.test(e.data) || (n = this._getOrReturnCtx(e, n), P(n, {
675
+ }), t.dirty()) : r.kind === "base64url" ? pt.test(e.data) || (n = this._getOrReturnCtx(e, n), N(n, {
676
676
  validation: "base64url",
677
677
  code: y.invalid_string,
678
678
  message: r.message
@@ -686,7 +686,7 @@ var xt = class e extends V {
686
686
  return this.refinement((t) => e.test(t), {
687
687
  validation: t,
688
688
  code: y.invalid_string,
689
- ...R.errToObj(n)
689
+ ...L.errToObj(n)
690
690
  });
691
691
  }
692
692
  _addCheck(t) {
@@ -698,79 +698,79 @@ var xt = class e extends V {
698
698
  email(e) {
699
699
  return this._addCheck({
700
700
  kind: "email",
701
- ...R.errToObj(e)
701
+ ...L.errToObj(e)
702
702
  });
703
703
  }
704
704
  url(e) {
705
705
  return this._addCheck({
706
706
  kind: "url",
707
- ...R.errToObj(e)
707
+ ...L.errToObj(e)
708
708
  });
709
709
  }
710
710
  emoji(e) {
711
711
  return this._addCheck({
712
712
  kind: "emoji",
713
- ...R.errToObj(e)
713
+ ...L.errToObj(e)
714
714
  });
715
715
  }
716
716
  uuid(e) {
717
717
  return this._addCheck({
718
718
  kind: "uuid",
719
- ...R.errToObj(e)
719
+ ...L.errToObj(e)
720
720
  });
721
721
  }
722
722
  nanoid(e) {
723
723
  return this._addCheck({
724
724
  kind: "nanoid",
725
- ...R.errToObj(e)
725
+ ...L.errToObj(e)
726
726
  });
727
727
  }
728
728
  cuid(e) {
729
729
  return this._addCheck({
730
730
  kind: "cuid",
731
- ...R.errToObj(e)
731
+ ...L.errToObj(e)
732
732
  });
733
733
  }
734
734
  cuid2(e) {
735
735
  return this._addCheck({
736
736
  kind: "cuid2",
737
- ...R.errToObj(e)
737
+ ...L.errToObj(e)
738
738
  });
739
739
  }
740
740
  ulid(e) {
741
741
  return this._addCheck({
742
742
  kind: "ulid",
743
- ...R.errToObj(e)
743
+ ...L.errToObj(e)
744
744
  });
745
745
  }
746
746
  base64(e) {
747
747
  return this._addCheck({
748
748
  kind: "base64",
749
- ...R.errToObj(e)
749
+ ...L.errToObj(e)
750
750
  });
751
751
  }
752
752
  base64url(e) {
753
753
  return this._addCheck({
754
754
  kind: "base64url",
755
- ...R.errToObj(e)
755
+ ...L.errToObj(e)
756
756
  });
757
757
  }
758
758
  jwt(e) {
759
759
  return this._addCheck({
760
760
  kind: "jwt",
761
- ...R.errToObj(e)
761
+ ...L.errToObj(e)
762
762
  });
763
763
  }
764
764
  ip(e) {
765
765
  return this._addCheck({
766
766
  kind: "ip",
767
- ...R.errToObj(e)
767
+ ...L.errToObj(e)
768
768
  });
769
769
  }
770
770
  cidr(e) {
771
771
  return this._addCheck({
772
772
  kind: "cidr",
773
- ...R.errToObj(e)
773
+ ...L.errToObj(e)
774
774
  });
775
775
  }
776
776
  datetime(e) {
@@ -785,7 +785,7 @@ var xt = class e extends V {
785
785
  precision: e?.precision === void 0 ? null : e?.precision,
786
786
  offset: e?.offset ?? !1,
787
787
  local: e?.local ?? !1,
788
- ...R.errToObj(e?.message)
788
+ ...L.errToObj(e?.message)
789
789
  });
790
790
  }
791
791
  date(e) {
@@ -802,20 +802,20 @@ var xt = class e extends V {
802
802
  }) : this._addCheck({
803
803
  kind: "time",
804
804
  precision: e?.precision === void 0 ? null : e?.precision,
805
- ...R.errToObj(e?.message)
805
+ ...L.errToObj(e?.message)
806
806
  });
807
807
  }
808
808
  duration(e) {
809
809
  return this._addCheck({
810
810
  kind: "duration",
811
- ...R.errToObj(e)
811
+ ...L.errToObj(e)
812
812
  });
813
813
  }
814
814
  regex(e, t) {
815
815
  return this._addCheck({
816
816
  kind: "regex",
817
817
  regex: e,
818
- ...R.errToObj(t)
818
+ ...L.errToObj(t)
819
819
  });
820
820
  }
821
821
  includes(e, t) {
@@ -823,46 +823,46 @@ var xt = class e extends V {
823
823
  kind: "includes",
824
824
  value: e,
825
825
  position: t?.position,
826
- ...R.errToObj(t?.message)
826
+ ...L.errToObj(t?.message)
827
827
  });
828
828
  }
829
829
  startsWith(e, t) {
830
830
  return this._addCheck({
831
831
  kind: "startsWith",
832
832
  value: e,
833
- ...R.errToObj(t)
833
+ ...L.errToObj(t)
834
834
  });
835
835
  }
836
836
  endsWith(e, t) {
837
837
  return this._addCheck({
838
838
  kind: "endsWith",
839
839
  value: e,
840
- ...R.errToObj(t)
840
+ ...L.errToObj(t)
841
841
  });
842
842
  }
843
843
  min(e, t) {
844
844
  return this._addCheck({
845
845
  kind: "min",
846
846
  value: e,
847
- ...R.errToObj(t)
847
+ ...L.errToObj(t)
848
848
  });
849
849
  }
850
850
  max(e, t) {
851
851
  return this._addCheck({
852
852
  kind: "max",
853
853
  value: e,
854
- ...R.errToObj(t)
854
+ ...L.errToObj(t)
855
855
  });
856
856
  }
857
857
  length(e, t) {
858
858
  return this._addCheck({
859
859
  kind: "length",
860
860
  value: e,
861
- ...R.errToObj(t)
861
+ ...L.errToObj(t)
862
862
  });
863
863
  }
864
864
  nonempty(e) {
865
- return this.min(1, R.errToObj(e));
865
+ return this.min(1, L.errToObj(e));
866
866
  }
867
867
  trim() {
868
868
  return new e({
@@ -941,54 +941,54 @@ var xt = class e extends V {
941
941
  return e;
942
942
  }
943
943
  };
944
- xt.create = (e) => new xt({
944
+ St.create = (e) => new St({
945
945
  checks: [],
946
- typeName: G.ZodString,
946
+ typeName: K.ZodString,
947
947
  coerce: e?.coerce ?? !1,
948
- ...B(e)
948
+ ...z(e)
949
949
  });
950
- function St(e, t) {
950
+ function Ct(e, t) {
951
951
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
952
952
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
953
953
  }
954
- var Ct = class e extends V {
954
+ var wt = class e extends B {
955
955
  constructor() {
956
956
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
957
957
  }
958
958
  _parse(e) {
959
959
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== b.number) {
960
960
  let t = this._getOrReturnCtx(e);
961
- return P(t, {
961
+ return N(t, {
962
962
  code: y.invalid_type,
963
963
  expected: b.number,
964
964
  received: t.parsedType
965
- }), I;
965
+ }), F;
966
966
  }
967
- let t, n = new F();
968
- for (let r of this._def.checks) r.kind === "int" ? _.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), P(t, {
967
+ let t, n = new P();
968
+ for (let r of this._def.checks) r.kind === "int" ? _.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
969
969
  code: y.invalid_type,
970
970
  expected: "integer",
971
971
  received: "float",
972
972
  message: r.message
973
- }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), P(t, {
973
+ }), n.dirty()) : r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
974
974
  code: y.too_small,
975
975
  minimum: r.value,
976
976
  type: "number",
977
977
  inclusive: r.inclusive,
978
978
  exact: !1,
979
979
  message: r.message
980
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), P(t, {
980
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
981
981
  code: y.too_big,
982
982
  maximum: r.value,
983
983
  type: "number",
984
984
  inclusive: r.inclusive,
985
985
  exact: !1,
986
986
  message: r.message
987
- }), n.dirty()) : r.kind === "multipleOf" ? St(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), P(t, {
987
+ }), n.dirty()) : r.kind === "multipleOf" ? Ct(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), N(t, {
988
988
  code: y.not_multiple_of,
989
989
  multipleOf: r.value,
990
990
  message: r.message
991
- }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), P(t, {
991
+ }), n.dirty()) : r.kind === "finite" ? Number.isFinite(e.data) || (t = this._getOrReturnCtx(e, t), N(t, {
992
992
  code: y.not_finite,
993
993
  message: r.message
994
994
  }), n.dirty()) : _.assertNever(r);
@@ -998,16 +998,16 @@ var Ct = class e extends V {
998
998
  };
999
999
  }
1000
1000
  gte(e, t) {
1001
- return this.setLimit("min", e, !0, R.toString(t));
1001
+ return this.setLimit("min", e, !0, L.toString(t));
1002
1002
  }
1003
1003
  gt(e, t) {
1004
- return this.setLimit("min", e, !1, R.toString(t));
1004
+ return this.setLimit("min", e, !1, L.toString(t));
1005
1005
  }
1006
1006
  lte(e, t) {
1007
- return this.setLimit("max", e, !0, R.toString(t));
1007
+ return this.setLimit("max", e, !0, L.toString(t));
1008
1008
  }
1009
1009
  lt(e, t) {
1010
- return this.setLimit("max", e, !1, R.toString(t));
1010
+ return this.setLimit("max", e, !1, L.toString(t));
1011
1011
  }
1012
1012
  setLimit(t, n, r, i) {
1013
1013
  return new e({
@@ -1016,7 +1016,7 @@ var Ct = class e extends V {
1016
1016
  kind: t,
1017
1017
  value: n,
1018
1018
  inclusive: r,
1019
- message: R.toString(i)
1019
+ message: L.toString(i)
1020
1020
  }]
1021
1021
  });
1022
1022
  }
@@ -1029,7 +1029,7 @@ var Ct = class e extends V {
1029
1029
  int(e) {
1030
1030
  return this._addCheck({
1031
1031
  kind: "int",
1032
- message: R.toString(e)
1032
+ message: L.toString(e)
1033
1033
  });
1034
1034
  }
1035
1035
  positive(e) {
@@ -1037,7 +1037,7 @@ var Ct = class e extends V {
1037
1037
  kind: "min",
1038
1038
  value: 0,
1039
1039
  inclusive: !1,
1040
- message: R.toString(e)
1040
+ message: L.toString(e)
1041
1041
  });
1042
1042
  }
1043
1043
  negative(e) {
@@ -1045,7 +1045,7 @@ var Ct = class e extends V {
1045
1045
  kind: "max",
1046
1046
  value: 0,
1047
1047
  inclusive: !1,
1048
- message: R.toString(e)
1048
+ message: L.toString(e)
1049
1049
  });
1050
1050
  }
1051
1051
  nonpositive(e) {
@@ -1053,7 +1053,7 @@ var Ct = class e extends V {
1053
1053
  kind: "max",
1054
1054
  value: 0,
1055
1055
  inclusive: !0,
1056
- message: R.toString(e)
1056
+ message: L.toString(e)
1057
1057
  });
1058
1058
  }
1059
1059
  nonnegative(e) {
@@ -1061,20 +1061,20 @@ var Ct = class e extends V {
1061
1061
  kind: "min",
1062
1062
  value: 0,
1063
1063
  inclusive: !0,
1064
- message: R.toString(e)
1064
+ message: L.toString(e)
1065
1065
  });
1066
1066
  }
1067
1067
  multipleOf(e, t) {
1068
1068
  return this._addCheck({
1069
1069
  kind: "multipleOf",
1070
1070
  value: e,
1071
- message: R.toString(t)
1071
+ message: L.toString(t)
1072
1072
  });
1073
1073
  }
1074
1074
  finite(e) {
1075
1075
  return this._addCheck({
1076
1076
  kind: "finite",
1077
- message: R.toString(e)
1077
+ message: L.toString(e)
1078
1078
  });
1079
1079
  }
1080
1080
  safe(e) {
@@ -1082,12 +1082,12 @@ var Ct = class e extends V {
1082
1082
  kind: "min",
1083
1083
  inclusive: !0,
1084
1084
  value: -(2 ** 53 - 1),
1085
- message: R.toString(e)
1085
+ message: L.toString(e)
1086
1086
  })._addCheck({
1087
1087
  kind: "max",
1088
1088
  inclusive: !0,
1089
1089
  value: 2 ** 53 - 1,
1090
- message: R.toString(e)
1090
+ message: L.toString(e)
1091
1091
  });
1092
1092
  }
1093
1093
  get minValue() {
@@ -1110,13 +1110,13 @@ var Ct = class e extends V {
1110
1110
  return Number.isFinite(t) && Number.isFinite(e);
1111
1111
  }
1112
1112
  };
1113
- Ct.create = (e) => new Ct({
1113
+ wt.create = (e) => new wt({
1114
1114
  checks: [],
1115
- typeName: G.ZodNumber,
1115
+ typeName: K.ZodNumber,
1116
1116
  coerce: e?.coerce || !1,
1117
- ...B(e)
1117
+ ...z(e)
1118
1118
  });
1119
- var wt = class e extends V {
1119
+ var Tt = class e extends B {
1120
1120
  constructor() {
1121
1121
  super(...arguments), this.min = this.gte, this.max = this.lte;
1122
1122
  }
@@ -1127,20 +1127,20 @@ var wt = class e extends V {
1127
1127
  return this._getInvalidInput(e);
1128
1128
  }
1129
1129
  if (this._getType(e) !== b.bigint) return this._getInvalidInput(e);
1130
- let t, n = new F();
1131
- for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), P(t, {
1130
+ let t, n = new P();
1131
+ for (let r of this._def.checks) r.kind === "min" ? (r.inclusive ? e.data < r.value : e.data <= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1132
1132
  code: y.too_small,
1133
1133
  type: "bigint",
1134
1134
  minimum: r.value,
1135
1135
  inclusive: r.inclusive,
1136
1136
  message: r.message
1137
- }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), P(t, {
1137
+ }), n.dirty()) : r.kind === "max" ? (r.inclusive ? e.data > r.value : e.data >= r.value) && (t = this._getOrReturnCtx(e, t), N(t, {
1138
1138
  code: y.too_big,
1139
1139
  type: "bigint",
1140
1140
  maximum: r.value,
1141
1141
  inclusive: r.inclusive,
1142
1142
  message: r.message
1143
- }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), P(t, {
1143
+ }), n.dirty()) : r.kind === "multipleOf" ? e.data % r.value !== BigInt(0) && (t = this._getOrReturnCtx(e, t), N(t, {
1144
1144
  code: y.not_multiple_of,
1145
1145
  multipleOf: r.value,
1146
1146
  message: r.message
@@ -1152,23 +1152,23 @@ var wt = class e extends V {
1152
1152
  }
1153
1153
  _getInvalidInput(e) {
1154
1154
  let t = this._getOrReturnCtx(e);
1155
- return P(t, {
1155
+ return N(t, {
1156
1156
  code: y.invalid_type,
1157
1157
  expected: b.bigint,
1158
1158
  received: t.parsedType
1159
- }), I;
1159
+ }), F;
1160
1160
  }
1161
1161
  gte(e, t) {
1162
- return this.setLimit("min", e, !0, R.toString(t));
1162
+ return this.setLimit("min", e, !0, L.toString(t));
1163
1163
  }
1164
1164
  gt(e, t) {
1165
- return this.setLimit("min", e, !1, R.toString(t));
1165
+ return this.setLimit("min", e, !1, L.toString(t));
1166
1166
  }
1167
1167
  lte(e, t) {
1168
- return this.setLimit("max", e, !0, R.toString(t));
1168
+ return this.setLimit("max", e, !0, L.toString(t));
1169
1169
  }
1170
1170
  lt(e, t) {
1171
- return this.setLimit("max", e, !1, R.toString(t));
1171
+ return this.setLimit("max", e, !1, L.toString(t));
1172
1172
  }
1173
1173
  setLimit(t, n, r, i) {
1174
1174
  return new e({
@@ -1177,7 +1177,7 @@ var wt = class e extends V {
1177
1177
  kind: t,
1178
1178
  value: n,
1179
1179
  inclusive: r,
1180
- message: R.toString(i)
1180
+ message: L.toString(i)
1181
1181
  }]
1182
1182
  });
1183
1183
  }
@@ -1192,7 +1192,7 @@ var wt = class e extends V {
1192
1192
  kind: "min",
1193
1193
  value: BigInt(0),
1194
1194
  inclusive: !1,
1195
- message: R.toString(e)
1195
+ message: L.toString(e)
1196
1196
  });
1197
1197
  }
1198
1198
  negative(e) {
@@ -1200,7 +1200,7 @@ var wt = class e extends V {
1200
1200
  kind: "max",
1201
1201
  value: BigInt(0),
1202
1202
  inclusive: !1,
1203
- message: R.toString(e)
1203
+ message: L.toString(e)
1204
1204
  });
1205
1205
  }
1206
1206
  nonpositive(e) {
@@ -1208,7 +1208,7 @@ var wt = class e extends V {
1208
1208
  kind: "max",
1209
1209
  value: BigInt(0),
1210
1210
  inclusive: !0,
1211
- message: R.toString(e)
1211
+ message: L.toString(e)
1212
1212
  });
1213
1213
  }
1214
1214
  nonnegative(e) {
@@ -1216,14 +1216,14 @@ var wt = class e extends V {
1216
1216
  kind: "min",
1217
1217
  value: BigInt(0),
1218
1218
  inclusive: !0,
1219
- message: R.toString(e)
1219
+ message: L.toString(e)
1220
1220
  });
1221
1221
  }
1222
1222
  multipleOf(e, t) {
1223
1223
  return this._addCheck({
1224
1224
  kind: "multipleOf",
1225
1225
  value: e,
1226
- message: R.toString(t)
1226
+ message: L.toString(t)
1227
1227
  });
1228
1228
  }
1229
1229
  get minValue() {
@@ -1237,50 +1237,50 @@ var wt = class e extends V {
1237
1237
  return e;
1238
1238
  }
1239
1239
  };
1240
- wt.create = (e) => new wt({
1240
+ Tt.create = (e) => new Tt({
1241
1241
  checks: [],
1242
- typeName: G.ZodBigInt,
1242
+ typeName: K.ZodBigInt,
1243
1243
  coerce: e?.coerce ?? !1,
1244
- ...B(e)
1244
+ ...z(e)
1245
1245
  });
1246
- var Tt = class extends V {
1246
+ var Et = class extends B {
1247
1247
  _parse(e) {
1248
1248
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== b.boolean) {
1249
1249
  let t = this._getOrReturnCtx(e);
1250
- return P(t, {
1250
+ return N(t, {
1251
1251
  code: y.invalid_type,
1252
1252
  expected: b.boolean,
1253
1253
  received: t.parsedType
1254
- }), I;
1254
+ }), F;
1255
1255
  }
1256
- return L(e.data);
1256
+ return I(e.data);
1257
1257
  }
1258
1258
  };
1259
- Tt.create = (e) => new Tt({
1260
- typeName: G.ZodBoolean,
1259
+ Et.create = (e) => new Et({
1260
+ typeName: K.ZodBoolean,
1261
1261
  coerce: e?.coerce || !1,
1262
- ...B(e)
1262
+ ...z(e)
1263
1263
  });
1264
- var Et = class e extends V {
1264
+ var Dt = class e extends B {
1265
1265
  _parse(e) {
1266
1266
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== b.date) {
1267
1267
  let t = this._getOrReturnCtx(e);
1268
- return P(t, {
1268
+ return N(t, {
1269
1269
  code: y.invalid_type,
1270
1270
  expected: b.date,
1271
1271
  received: t.parsedType
1272
- }), I;
1272
+ }), F;
1273
1273
  }
1274
- if (Number.isNaN(e.data.getTime())) return P(this._getOrReturnCtx(e), { code: y.invalid_date }), I;
1275
- let t = new F(), n;
1276
- for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), P(n, {
1274
+ if (Number.isNaN(e.data.getTime())) return N(this._getOrReturnCtx(e), { code: y.invalid_date }), F;
1275
+ let t = new P(), n;
1276
+ for (let r of this._def.checks) r.kind === "min" ? e.data.getTime() < r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1277
1277
  code: y.too_small,
1278
1278
  message: r.message,
1279
1279
  inclusive: !0,
1280
1280
  exact: !1,
1281
1281
  minimum: r.value,
1282
1282
  type: "date"
1283
- }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), P(n, {
1283
+ }), t.dirty()) : r.kind === "max" ? e.data.getTime() > r.value && (n = this._getOrReturnCtx(e, n), N(n, {
1284
1284
  code: y.too_big,
1285
1285
  message: r.message,
1286
1286
  inclusive: !0,
@@ -1303,14 +1303,14 @@ var Et = class e extends V {
1303
1303
  return this._addCheck({
1304
1304
  kind: "min",
1305
1305
  value: e.getTime(),
1306
- message: R.toString(t)
1306
+ message: L.toString(t)
1307
1307
  });
1308
1308
  }
1309
1309
  max(e, t) {
1310
1310
  return this._addCheck({
1311
1311
  kind: "max",
1312
1312
  value: e.getTime(),
1313
- message: R.toString(t)
1313
+ message: L.toString(t)
1314
1314
  });
1315
1315
  }
1316
1316
  get minDate() {
@@ -1324,129 +1324,129 @@ var Et = class e extends V {
1324
1324
  return e == null ? null : new Date(e);
1325
1325
  }
1326
1326
  };
1327
- Et.create = (e) => new Et({
1327
+ Dt.create = (e) => new Dt({
1328
1328
  checks: [],
1329
1329
  coerce: e?.coerce || !1,
1330
- typeName: G.ZodDate,
1331
- ...B(e)
1330
+ typeName: K.ZodDate,
1331
+ ...z(e)
1332
1332
  });
1333
- var Dt = class extends V {
1333
+ var Ot = class extends B {
1334
1334
  _parse(e) {
1335
1335
  if (this._getType(e) !== b.symbol) {
1336
1336
  let t = this._getOrReturnCtx(e);
1337
- return P(t, {
1337
+ return N(t, {
1338
1338
  code: y.invalid_type,
1339
1339
  expected: b.symbol,
1340
1340
  received: t.parsedType
1341
- }), I;
1341
+ }), F;
1342
1342
  }
1343
- return L(e.data);
1343
+ return I(e.data);
1344
1344
  }
1345
1345
  };
1346
- Dt.create = (e) => new Dt({
1347
- typeName: G.ZodSymbol,
1348
- ...B(e)
1346
+ Ot.create = (e) => new Ot({
1347
+ typeName: K.ZodSymbol,
1348
+ ...z(e)
1349
1349
  });
1350
- var Ot = class extends V {
1350
+ var kt = class extends B {
1351
1351
  _parse(e) {
1352
1352
  if (this._getType(e) !== b.undefined) {
1353
1353
  let t = this._getOrReturnCtx(e);
1354
- return P(t, {
1354
+ return N(t, {
1355
1355
  code: y.invalid_type,
1356
1356
  expected: b.undefined,
1357
1357
  received: t.parsedType
1358
- }), I;
1358
+ }), F;
1359
1359
  }
1360
- return L(e.data);
1360
+ return I(e.data);
1361
1361
  }
1362
1362
  };
1363
- Ot.create = (e) => new Ot({
1364
- typeName: G.ZodUndefined,
1365
- ...B(e)
1363
+ kt.create = (e) => new kt({
1364
+ typeName: K.ZodUndefined,
1365
+ ...z(e)
1366
1366
  });
1367
- var kt = class extends V {
1367
+ var At = class extends B {
1368
1368
  _parse(e) {
1369
1369
  if (this._getType(e) !== b.null) {
1370
1370
  let t = this._getOrReturnCtx(e);
1371
- return P(t, {
1371
+ return N(t, {
1372
1372
  code: y.invalid_type,
1373
1373
  expected: b.null,
1374
1374
  received: t.parsedType
1375
- }), I;
1375
+ }), F;
1376
1376
  }
1377
- return L(e.data);
1377
+ return I(e.data);
1378
1378
  }
1379
1379
  };
1380
- kt.create = (e) => new kt({
1381
- typeName: G.ZodNull,
1382
- ...B(e)
1380
+ At.create = (e) => new At({
1381
+ typeName: K.ZodNull,
1382
+ ...z(e)
1383
1383
  });
1384
- var At = class extends V {
1384
+ var jt = class extends B {
1385
1385
  constructor() {
1386
1386
  super(...arguments), this._any = !0;
1387
1387
  }
1388
1388
  _parse(e) {
1389
- return L(e.data);
1389
+ return I(e.data);
1390
1390
  }
1391
1391
  };
1392
- At.create = (e) => new At({
1393
- typeName: G.ZodAny,
1394
- ...B(e)
1392
+ jt.create = (e) => new jt({
1393
+ typeName: K.ZodAny,
1394
+ ...z(e)
1395
1395
  });
1396
- var jt = class extends V {
1396
+ var Mt = class extends B {
1397
1397
  constructor() {
1398
1398
  super(...arguments), this._unknown = !0;
1399
1399
  }
1400
1400
  _parse(e) {
1401
- return L(e.data);
1401
+ return I(e.data);
1402
1402
  }
1403
1403
  };
1404
- jt.create = (e) => new jt({
1405
- typeName: G.ZodUnknown,
1406
- ...B(e)
1404
+ Mt.create = (e) => new Mt({
1405
+ typeName: K.ZodUnknown,
1406
+ ...z(e)
1407
1407
  });
1408
- var Mt = class extends V {
1408
+ var V = class extends B {
1409
1409
  _parse(e) {
1410
1410
  let t = this._getOrReturnCtx(e);
1411
- return P(t, {
1411
+ return N(t, {
1412
1412
  code: y.invalid_type,
1413
1413
  expected: b.never,
1414
1414
  received: t.parsedType
1415
- }), I;
1415
+ }), F;
1416
1416
  }
1417
1417
  };
1418
- Mt.create = (e) => new Mt({
1419
- typeName: G.ZodNever,
1420
- ...B(e)
1418
+ V.create = (e) => new V({
1419
+ typeName: K.ZodNever,
1420
+ ...z(e)
1421
1421
  });
1422
- var Nt = class extends V {
1422
+ var Nt = class extends B {
1423
1423
  _parse(e) {
1424
1424
  if (this._getType(e) !== b.undefined) {
1425
1425
  let t = this._getOrReturnCtx(e);
1426
- return P(t, {
1426
+ return N(t, {
1427
1427
  code: y.invalid_type,
1428
1428
  expected: b.void,
1429
1429
  received: t.parsedType
1430
- }), I;
1430
+ }), F;
1431
1431
  }
1432
- return L(e.data);
1432
+ return I(e.data);
1433
1433
  }
1434
1434
  };
1435
1435
  Nt.create = (e) => new Nt({
1436
- typeName: G.ZodVoid,
1437
- ...B(e)
1436
+ typeName: K.ZodVoid,
1437
+ ...z(e)
1438
1438
  });
1439
- var Pt = class e extends V {
1439
+ var Pt = class e extends B {
1440
1440
  _parse(e) {
1441
1441
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
1442
- if (t.parsedType !== b.array) return P(t, {
1442
+ if (t.parsedType !== b.array) return N(t, {
1443
1443
  code: y.invalid_type,
1444
1444
  expected: b.array,
1445
1445
  received: t.parsedType
1446
- }), I;
1446
+ }), F;
1447
1447
  if (r.exactLength !== null) {
1448
1448
  let e = t.data.length > r.exactLength.value, i = t.data.length < r.exactLength.value;
1449
- (e || i) && (P(t, {
1449
+ (e || i) && (N(t, {
1450
1450
  code: e ? y.too_big : y.too_small,
1451
1451
  minimum: i ? r.exactLength.value : void 0,
1452
1452
  maximum: e ? r.exactLength.value : void 0,
@@ -1456,23 +1456,23 @@ var Pt = class e extends V {
1456
1456
  message: r.exactLength.message
1457
1457
  }), n.dirty());
1458
1458
  }
1459
- if (r.minLength !== null && t.data.length < r.minLength.value && (P(t, {
1459
+ if (r.minLength !== null && t.data.length < r.minLength.value && (N(t, {
1460
1460
  code: y.too_small,
1461
1461
  minimum: r.minLength.value,
1462
1462
  type: "array",
1463
1463
  inclusive: !0,
1464
1464
  exact: !1,
1465
1465
  message: r.minLength.message
1466
- }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (P(t, {
1466
+ }), n.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (N(t, {
1467
1467
  code: y.too_big,
1468
1468
  maximum: r.maxLength.value,
1469
1469
  type: "array",
1470
1470
  inclusive: !0,
1471
1471
  exact: !1,
1472
1472
  message: r.maxLength.message
1473
- }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new z(t, e, t.path, n)))).then((e) => F.mergeArray(n, e));
1474
- let i = [...t.data].map((e, n) => r.type._parseSync(new z(t, e, t.path, n)));
1475
- return F.mergeArray(n, i);
1473
+ }), n.dirty()), t.common.async) return Promise.all([...t.data].map((e, n) => r.type._parseAsync(new R(t, e, t.path, n)))).then((e) => P.mergeArray(n, e));
1474
+ let i = [...t.data].map((e, n) => r.type._parseSync(new R(t, e, t.path, n)));
1475
+ return P.mergeArray(n, i);
1476
1476
  }
1477
1477
  get element() {
1478
1478
  return this._def.type;
@@ -1482,7 +1482,7 @@ var Pt = class e extends V {
1482
1482
  ...this._def,
1483
1483
  minLength: {
1484
1484
  value: t,
1485
- message: R.toString(n)
1485
+ message: L.toString(n)
1486
1486
  }
1487
1487
  });
1488
1488
  }
@@ -1491,7 +1491,7 @@ var Pt = class e extends V {
1491
1491
  ...this._def,
1492
1492
  maxLength: {
1493
1493
  value: t,
1494
- message: R.toString(n)
1494
+ message: L.toString(n)
1495
1495
  }
1496
1496
  });
1497
1497
  }
@@ -1500,7 +1500,7 @@ var Pt = class e extends V {
1500
1500
  ...this._def,
1501
1501
  exactLength: {
1502
1502
  value: t,
1503
- message: R.toString(n)
1503
+ message: L.toString(n)
1504
1504
  }
1505
1505
  });
1506
1506
  }
@@ -1513,15 +1513,15 @@ Pt.create = (e, t) => new Pt({
1513
1513
  minLength: null,
1514
1514
  maxLength: null,
1515
1515
  exactLength: null,
1516
- typeName: G.ZodArray,
1517
- ...B(t)
1516
+ typeName: K.ZodArray,
1517
+ ...z(t)
1518
1518
  });
1519
1519
  function Ft(e) {
1520
1520
  if (e instanceof H) {
1521
1521
  let t = {};
1522
1522
  for (let n in e.shape) {
1523
1523
  let r = e.shape[n];
1524
- t[n] = W.create(Ft(r));
1524
+ t[n] = G.create(Ft(r));
1525
1525
  }
1526
1526
  return new H({
1527
1527
  ...e._def,
@@ -1531,12 +1531,12 @@ function Ft(e) {
1531
1531
  ...e._def,
1532
1532
  type: Ft(e.element)
1533
1533
  });
1534
- else if (e instanceof W) return W.create(Ft(e.unwrap()));
1535
- else if (e instanceof Qt) return Qt.create(Ft(e.unwrap()));
1536
- else if (e instanceof Vt) return Vt.create(e.items.map((e) => Ft(e)));
1534
+ else if (e instanceof G) return G.create(Ft(e.unwrap()));
1535
+ else if (e instanceof Zt) return Zt.create(Ft(e.unwrap()));
1536
+ else if (e instanceof Bt) return Bt.create(e.items.map((e) => Ft(e)));
1537
1537
  else return e;
1538
1538
  }
1539
- var H = class e extends V {
1539
+ var H = class e extends B {
1540
1540
  constructor() {
1541
1541
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1542
1542
  }
@@ -1551,14 +1551,14 @@ var H = class e extends V {
1551
1551
  _parse(e) {
1552
1552
  if (this._getType(e) !== b.object) {
1553
1553
  let t = this._getOrReturnCtx(e);
1554
- return P(t, {
1554
+ return N(t, {
1555
1555
  code: y.invalid_type,
1556
1556
  expected: b.object,
1557
1557
  received: t.parsedType
1558
- }), I;
1558
+ }), F;
1559
1559
  }
1560
1560
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
1561
- if (!(this._def.catchall instanceof Mt && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1561
+ if (!(this._def.catchall instanceof V && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1562
1562
  let o = [];
1563
1563
  for (let e of i) {
1564
1564
  let t = r[e], i = n.data[e];
@@ -1567,11 +1567,11 @@ var H = class e extends V {
1567
1567
  status: "valid",
1568
1568
  value: e
1569
1569
  },
1570
- value: t._parse(new z(n, i, n.path, e)),
1570
+ value: t._parse(new R(n, i, n.path, e)),
1571
1571
  alwaysSet: e in n.data
1572
1572
  });
1573
1573
  }
1574
- if (this._def.catchall instanceof Mt) {
1574
+ if (this._def.catchall instanceof V) {
1575
1575
  let e = this._def.unknownKeys;
1576
1576
  if (e === "passthrough") for (let e of a) o.push({
1577
1577
  key: {
@@ -1583,7 +1583,7 @@ var H = class e extends V {
1583
1583
  value: n.data[e]
1584
1584
  }
1585
1585
  });
1586
- else if (e === "strict") a.length > 0 && (P(n, {
1586
+ else if (e === "strict") a.length > 0 && (N(n, {
1587
1587
  code: y.unrecognized_keys,
1588
1588
  keys: a
1589
1589
  }), t.dirty());
@@ -1597,7 +1597,7 @@ var H = class e extends V {
1597
1597
  status: "valid",
1598
1598
  value: t
1599
1599
  },
1600
- value: e._parse(new z(n, r, n.path, t)),
1600
+ value: e._parse(new R(n, r, n.path, t)),
1601
1601
  alwaysSet: t in n.data
1602
1602
  });
1603
1603
  }
@@ -1613,18 +1613,18 @@ var H = class e extends V {
1613
1613
  });
1614
1614
  }
1615
1615
  return e;
1616
- }).then((e) => F.mergeObjectSync(t, e)) : F.mergeObjectSync(t, o);
1616
+ }).then((e) => P.mergeObjectSync(t, e)) : P.mergeObjectSync(t, o);
1617
1617
  }
1618
1618
  get shape() {
1619
1619
  return this._def.shape();
1620
1620
  }
1621
1621
  strict(t) {
1622
- return R.errToObj, new e({
1622
+ return L.errToObj, new e({
1623
1623
  ...this._def,
1624
1624
  unknownKeys: "strict",
1625
1625
  ...t === void 0 ? {} : { errorMap: (e, n) => {
1626
1626
  let r = this._def.errorMap?.(e, n).message ?? n.defaultError;
1627
- return e.code === "unrecognized_keys" ? { message: R.errToObj(t).message ?? r } : { message: r };
1627
+ return e.code === "unrecognized_keys" ? { message: L.errToObj(t).message ?? r } : { message: r };
1628
1628
  } }
1629
1629
  });
1630
1630
  }
@@ -1657,7 +1657,7 @@ var H = class e extends V {
1657
1657
  ...this._def.shape(),
1658
1658
  ...t._def.shape()
1659
1659
  }),
1660
- typeName: G.ZodObject
1660
+ typeName: K.ZodObject
1661
1661
  });
1662
1662
  }
1663
1663
  setKey(e, t) {
@@ -1704,7 +1704,7 @@ var H = class e extends V {
1704
1704
  for (let e of _.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
1705
1705
  else {
1706
1706
  let t = this.shape[e];
1707
- for (; t instanceof W;) t = t._def.innerType;
1707
+ for (; t instanceof G;) t = t._def.innerType;
1708
1708
  n[e] = t;
1709
1709
  }
1710
1710
  return new e({
@@ -1713,39 +1713,39 @@ var H = class e extends V {
1713
1713
  });
1714
1714
  }
1715
1715
  keyof() {
1716
- return Jt(_.objectKeys(this.shape));
1716
+ return qt(_.objectKeys(this.shape));
1717
1717
  }
1718
1718
  };
1719
1719
  H.create = (e, t) => new H({
1720
1720
  shape: () => e,
1721
1721
  unknownKeys: "strip",
1722
- catchall: Mt.create(),
1723
- typeName: G.ZodObject,
1724
- ...B(t)
1722
+ catchall: V.create(),
1723
+ typeName: K.ZodObject,
1724
+ ...z(t)
1725
1725
  }), H.strictCreate = (e, t) => new H({
1726
1726
  shape: () => e,
1727
1727
  unknownKeys: "strict",
1728
- catchall: Mt.create(),
1729
- typeName: G.ZodObject,
1730
- ...B(t)
1728
+ catchall: V.create(),
1729
+ typeName: K.ZodObject,
1730
+ ...z(t)
1731
1731
  }), H.lazycreate = (e, t) => new H({
1732
1732
  shape: e,
1733
1733
  unknownKeys: "strip",
1734
- catchall: Mt.create(),
1735
- typeName: G.ZodObject,
1736
- ...B(t)
1734
+ catchall: V.create(),
1735
+ typeName: K.ZodObject,
1736
+ ...z(t)
1737
1737
  });
1738
- var It = class extends V {
1738
+ var It = class extends B {
1739
1739
  _parse(e) {
1740
1740
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
1741
1741
  function r(e) {
1742
1742
  for (let t of e) if (t.result.status === "valid") return t.result;
1743
1743
  for (let n of e) if (n.result.status === "dirty") return t.common.issues.push(...n.ctx.common.issues), n.result;
1744
1744
  let n = e.map((e) => new x(e.ctx.common.issues));
1745
- return P(t, {
1745
+ return N(t, {
1746
1746
  code: y.invalid_union,
1747
1747
  unionErrors: n
1748
- }), I;
1748
+ }), F;
1749
1749
  }
1750
1750
  if (t.common.async) return Promise.all(n.map(async (e) => {
1751
1751
  let n = {
@@ -1788,10 +1788,10 @@ var It = class extends V {
1788
1788
  }
1789
1789
  if (e) return t.common.issues.push(...e.ctx.common.issues), e.result;
1790
1790
  let i = r.map((e) => new x(e));
1791
- return P(t, {
1791
+ return N(t, {
1792
1792
  code: y.invalid_union,
1793
1793
  unionErrors: i
1794
- }), I;
1794
+ }), F;
1795
1795
  }
1796
1796
  }
1797
1797
  get options() {
@@ -1800,17 +1800,17 @@ var It = class extends V {
1800
1800
  };
1801
1801
  It.create = (e, t) => new It({
1802
1802
  options: e,
1803
- typeName: G.ZodUnion,
1804
- ...B(t)
1803
+ typeName: K.ZodUnion,
1804
+ ...z(t)
1805
1805
  });
1806
- var Lt = (e) => e instanceof Kt ? Lt(e.schema) : e instanceof U ? Lt(e.innerType()) : e instanceof qt ? [e.value] : e instanceof Yt ? e.options : e instanceof Xt ? _.objectValues(e.enum) : e instanceof $t ? Lt(e._def.innerType) : e instanceof Ot ? [void 0] : e instanceof kt ? [null] : e instanceof W ? [void 0, ...Lt(e.unwrap())] : e instanceof Qt ? [null, ...Lt(e.unwrap())] : e instanceof nn || e instanceof an ? Lt(e.unwrap()) : e instanceof en ? Lt(e._def.innerType) : [], Rt = class e extends V {
1806
+ var U = (e) => e instanceof Gt ? U(e.schema) : e instanceof W ? U(e.innerType()) : e instanceof Kt ? [e.value] : e instanceof Jt ? e.options : e instanceof Yt ? _.objectValues(e.enum) : e instanceof Qt ? U(e._def.innerType) : e instanceof kt ? [void 0] : e instanceof At ? [null] : e instanceof G ? [void 0, ...U(e.unwrap())] : e instanceof Zt ? [null, ...U(e.unwrap())] : e instanceof tn || e instanceof rn ? U(e.unwrap()) : e instanceof $t ? U(e._def.innerType) : [], Lt = class e extends B {
1807
1807
  _parse(e) {
1808
1808
  let { ctx: t } = this._processInputParams(e);
1809
- if (t.parsedType !== b.object) return P(t, {
1809
+ if (t.parsedType !== b.object) return N(t, {
1810
1810
  code: y.invalid_type,
1811
1811
  expected: b.object,
1812
1812
  received: t.parsedType
1813
- }), I;
1813
+ }), F;
1814
1814
  let n = this.discriminator, r = t.data[n], i = this.optionsMap.get(r);
1815
1815
  return i ? t.common.async ? i._parseAsync({
1816
1816
  data: t.data,
@@ -1820,11 +1820,11 @@ var Lt = (e) => e instanceof Kt ? Lt(e.schema) : e instanceof U ? Lt(e.innerType
1820
1820
  data: t.data,
1821
1821
  path: t.path,
1822
1822
  parent: t
1823
- }) : (P(t, {
1823
+ }) : (N(t, {
1824
1824
  code: y.invalid_union_discriminator,
1825
1825
  options: Array.from(this.optionsMap.keys()),
1826
1826
  path: [n]
1827
- }), I);
1827
+ }), F);
1828
1828
  }
1829
1829
  get discriminator() {
1830
1830
  return this._def.discriminator;
@@ -1838,7 +1838,7 @@ var Lt = (e) => e instanceof Kt ? Lt(e.schema) : e instanceof U ? Lt(e.innerType
1838
1838
  static create(t, n, r) {
1839
1839
  let i = /* @__PURE__ */ new Map();
1840
1840
  for (let e of n) {
1841
- let n = Lt(e.shape[t]);
1841
+ let n = U(e.shape[t]);
1842
1842
  if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
1843
1843
  for (let r of n) {
1844
1844
  if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
@@ -1846,15 +1846,15 @@ var Lt = (e) => e instanceof Kt ? Lt(e.schema) : e instanceof U ? Lt(e.innerType
1846
1846
  }
1847
1847
  }
1848
1848
  return new e({
1849
- typeName: G.ZodDiscriminatedUnion,
1849
+ typeName: K.ZodDiscriminatedUnion,
1850
1850
  discriminator: t,
1851
1851
  options: n,
1852
1852
  optionsMap: i,
1853
- ...B(r)
1853
+ ...z(r)
1854
1854
  });
1855
1855
  }
1856
1856
  };
1857
- function zt(e, t) {
1857
+ function Rt(e, t) {
1858
1858
  let n = v(e), r = v(t);
1859
1859
  if (e === t) return {
1860
1860
  valid: !0,
@@ -1866,7 +1866,7 @@ function zt(e, t) {
1866
1866
  ...t
1867
1867
  };
1868
1868
  for (let n of r) {
1869
- let r = zt(e[n], t[n]);
1869
+ let r = Rt(e[n], t[n]);
1870
1870
  if (!r.valid) return { valid: !1 };
1871
1871
  i[n] = r.data;
1872
1872
  }
@@ -1878,7 +1878,7 @@ function zt(e, t) {
1878
1878
  if (e.length !== t.length) return { valid: !1 };
1879
1879
  let n = [];
1880
1880
  for (let r = 0; r < e.length; r++) {
1881
- let i = e[r], a = t[r], o = zt(i, a);
1881
+ let i = e[r], a = t[r], o = Rt(i, a);
1882
1882
  if (!o.valid) return { valid: !1 };
1883
1883
  n.push(o.data);
1884
1884
  }
@@ -1892,15 +1892,15 @@ function zt(e, t) {
1892
1892
  };
1893
1893
  else return { valid: !1 };
1894
1894
  }
1895
- var Bt = class extends V {
1895
+ var zt = class extends B {
1896
1896
  _parse(e) {
1897
1897
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
1898
- if (Ke(e) || Ke(r)) return I;
1899
- let i = zt(e.value, r.value);
1900
- return i.valid ? ((qe(e) || qe(r)) && t.dirty(), {
1898
+ if (qe(e) || qe(r)) return F;
1899
+ let i = Rt(e.value, r.value);
1900
+ return i.valid ? ((Je(e) || Je(r)) && t.dirty(), {
1901
1901
  status: t.value,
1902
1902
  value: i.data
1903
- }) : (P(n, { code: y.invalid_intersection_types }), I);
1903
+ }) : (N(n, { code: y.invalid_intersection_types }), F);
1904
1904
  };
1905
1905
  return n.common.async ? Promise.all([this._def.left._parseAsync({
1906
1906
  data: n.data,
@@ -1921,28 +1921,28 @@ var Bt = class extends V {
1921
1921
  }));
1922
1922
  }
1923
1923
  };
1924
- Bt.create = (e, t, n) => new Bt({
1924
+ zt.create = (e, t, n) => new zt({
1925
1925
  left: e,
1926
1926
  right: t,
1927
- typeName: G.ZodIntersection,
1928
- ...B(n)
1927
+ typeName: K.ZodIntersection,
1928
+ ...z(n)
1929
1929
  });
1930
- var Vt = class e extends V {
1930
+ var Bt = class e extends B {
1931
1931
  _parse(e) {
1932
1932
  let { status: t, ctx: n } = this._processInputParams(e);
1933
- if (n.parsedType !== b.array) return P(n, {
1933
+ if (n.parsedType !== b.array) return N(n, {
1934
1934
  code: y.invalid_type,
1935
1935
  expected: b.array,
1936
1936
  received: n.parsedType
1937
- }), I;
1938
- if (n.data.length < this._def.items.length) return P(n, {
1937
+ }), F;
1938
+ if (n.data.length < this._def.items.length) return N(n, {
1939
1939
  code: y.too_small,
1940
1940
  minimum: this._def.items.length,
1941
1941
  inclusive: !0,
1942
1942
  exact: !1,
1943
1943
  type: "array"
1944
- }), I;
1945
- !this._def.rest && n.data.length > this._def.items.length && (P(n, {
1944
+ }), F;
1945
+ !this._def.rest && n.data.length > this._def.items.length && (N(n, {
1946
1946
  code: y.too_big,
1947
1947
  maximum: this._def.items.length,
1948
1948
  inclusive: !0,
@@ -1951,9 +1951,9 @@ var Vt = class e extends V {
1951
1951
  }), t.dirty());
1952
1952
  let r = [...n.data].map((e, t) => {
1953
1953
  let r = this._def.items[t] || this._def.rest;
1954
- return r ? r._parse(new z(n, e, n.path, t)) : null;
1954
+ return r ? r._parse(new R(n, e, n.path, t)) : null;
1955
1955
  }).filter((e) => !!e);
1956
- return n.common.async ? Promise.all(r).then((e) => F.mergeArray(t, e)) : F.mergeArray(t, r);
1956
+ return n.common.async ? Promise.all(r).then((e) => P.mergeArray(t, e)) : P.mergeArray(t, r);
1957
1957
  }
1958
1958
  get items() {
1959
1959
  return this._def.items;
@@ -1965,16 +1965,16 @@ var Vt = class e extends V {
1965
1965
  });
1966
1966
  }
1967
1967
  };
1968
- Vt.create = (e, t) => {
1968
+ Bt.create = (e, t) => {
1969
1969
  if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
1970
- return new Vt({
1970
+ return new Bt({
1971
1971
  items: e,
1972
- typeName: G.ZodTuple,
1972
+ typeName: K.ZodTuple,
1973
1973
  rest: null,
1974
- ...B(t)
1974
+ ...z(t)
1975
1975
  });
1976
1976
  };
1977
- var Ht = class e extends V {
1977
+ var Vt = class e extends B {
1978
1978
  get keySchema() {
1979
1979
  return this._def.keyType;
1980
1980
  }
@@ -1983,36 +1983,36 @@ var Ht = class e extends V {
1983
1983
  }
1984
1984
  _parse(e) {
1985
1985
  let { status: t, ctx: n } = this._processInputParams(e);
1986
- if (n.parsedType !== b.object) return P(n, {
1986
+ if (n.parsedType !== b.object) return N(n, {
1987
1987
  code: y.invalid_type,
1988
1988
  expected: b.object,
1989
1989
  received: n.parsedType
1990
- }), I;
1990
+ }), F;
1991
1991
  let r = [], i = this._def.keyType, a = this._def.valueType;
1992
1992
  for (let e in n.data) r.push({
1993
- key: i._parse(new z(n, e, n.path, e)),
1994
- value: a._parse(new z(n, n.data[e], n.path, e)),
1993
+ key: i._parse(new R(n, e, n.path, e)),
1994
+ value: a._parse(new R(n, n.data[e], n.path, e)),
1995
1995
  alwaysSet: e in n.data
1996
1996
  });
1997
- return n.common.async ? F.mergeObjectAsync(t, r) : F.mergeObjectSync(t, r);
1997
+ return n.common.async ? P.mergeObjectAsync(t, r) : P.mergeObjectSync(t, r);
1998
1998
  }
1999
1999
  get element() {
2000
2000
  return this._def.valueType;
2001
2001
  }
2002
2002
  static create(t, n, r) {
2003
- return n instanceof V ? new e({
2003
+ return n instanceof B ? new e({
2004
2004
  keyType: t,
2005
2005
  valueType: n,
2006
- typeName: G.ZodRecord,
2007
- ...B(r)
2006
+ typeName: K.ZodRecord,
2007
+ ...z(r)
2008
2008
  }) : new e({
2009
- keyType: xt.create(),
2009
+ keyType: St.create(),
2010
2010
  valueType: t,
2011
- typeName: G.ZodRecord,
2012
- ...B(n)
2011
+ typeName: K.ZodRecord,
2012
+ ...z(n)
2013
2013
  });
2014
2014
  }
2015
- }, Ut = class extends V {
2015
+ }, Ht = class extends B {
2016
2016
  get keySchema() {
2017
2017
  return this._def.keyType;
2018
2018
  }
@@ -2021,21 +2021,21 @@ var Ht = class e extends V {
2021
2021
  }
2022
2022
  _parse(e) {
2023
2023
  let { status: t, ctx: n } = this._processInputParams(e);
2024
- if (n.parsedType !== b.map) return P(n, {
2024
+ if (n.parsedType !== b.map) return N(n, {
2025
2025
  code: y.invalid_type,
2026
2026
  expected: b.map,
2027
2027
  received: n.parsedType
2028
- }), I;
2028
+ }), F;
2029
2029
  let r = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([e, t], a) => ({
2030
- key: r._parse(new z(n, e, n.path, [a, "key"])),
2031
- value: i._parse(new z(n, t, n.path, [a, "value"]))
2030
+ key: r._parse(new R(n, e, n.path, [a, "key"])),
2031
+ value: i._parse(new R(n, t, n.path, [a, "value"]))
2032
2032
  }));
2033
2033
  if (n.common.async) {
2034
2034
  let e = /* @__PURE__ */ new Map();
2035
2035
  return Promise.resolve().then(async () => {
2036
2036
  for (let n of a) {
2037
2037
  let r = await n.key, i = await n.value;
2038
- if (r.status === "aborted" || i.status === "aborted") return I;
2038
+ if (r.status === "aborted" || i.status === "aborted") return F;
2039
2039
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2040
2040
  }
2041
2041
  return {
@@ -2047,7 +2047,7 @@ var Ht = class e extends V {
2047
2047
  let e = /* @__PURE__ */ new Map();
2048
2048
  for (let n of a) {
2049
2049
  let r = n.key, i = n.value;
2050
- if (r.status === "aborted" || i.status === "aborted") return I;
2050
+ if (r.status === "aborted" || i.status === "aborted") return F;
2051
2051
  (r.status === "dirty" || i.status === "dirty") && t.dirty(), e.set(r.value, i.value);
2052
2052
  }
2053
2053
  return {
@@ -2057,29 +2057,29 @@ var Ht = class e extends V {
2057
2057
  }
2058
2058
  }
2059
2059
  };
2060
- Ut.create = (e, t, n) => new Ut({
2060
+ Ht.create = (e, t, n) => new Ht({
2061
2061
  valueType: t,
2062
2062
  keyType: e,
2063
- typeName: G.ZodMap,
2064
- ...B(n)
2063
+ typeName: K.ZodMap,
2064
+ ...z(n)
2065
2065
  });
2066
- var Wt = class e extends V {
2066
+ var Ut = class e extends B {
2067
2067
  _parse(e) {
2068
2068
  let { status: t, ctx: n } = this._processInputParams(e);
2069
- if (n.parsedType !== b.set) return P(n, {
2069
+ if (n.parsedType !== b.set) return N(n, {
2070
2070
  code: y.invalid_type,
2071
2071
  expected: b.set,
2072
2072
  received: n.parsedType
2073
- }), I;
2073
+ }), F;
2074
2074
  let r = this._def;
2075
- r.minSize !== null && n.data.size < r.minSize.value && (P(n, {
2075
+ r.minSize !== null && n.data.size < r.minSize.value && (N(n, {
2076
2076
  code: y.too_small,
2077
2077
  minimum: r.minSize.value,
2078
2078
  type: "set",
2079
2079
  inclusive: !0,
2080
2080
  exact: !1,
2081
2081
  message: r.minSize.message
2082
- }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (P(n, {
2082
+ }), t.dirty()), r.maxSize !== null && n.data.size > r.maxSize.value && (N(n, {
2083
2083
  code: y.too_big,
2084
2084
  maximum: r.maxSize.value,
2085
2085
  type: "set",
@@ -2091,7 +2091,7 @@ var Wt = class e extends V {
2091
2091
  function a(e) {
2092
2092
  let n = /* @__PURE__ */ new Set();
2093
2093
  for (let r of e) {
2094
- if (r.status === "aborted") return I;
2094
+ if (r.status === "aborted") return F;
2095
2095
  r.status === "dirty" && t.dirty(), n.add(r.value);
2096
2096
  }
2097
2097
  return {
@@ -2099,7 +2099,7 @@ var Wt = class e extends V {
2099
2099
  value: n
2100
2100
  };
2101
2101
  }
2102
- let o = [...n.data.values()].map((e, t) => i._parse(new z(n, e, n.path, t)));
2102
+ let o = [...n.data.values()].map((e, t) => i._parse(new R(n, e, n.path, t)));
2103
2103
  return n.common.async ? Promise.all(o).then((e) => a(e)) : a(o);
2104
2104
  }
2105
2105
  min(t, n) {
@@ -2107,7 +2107,7 @@ var Wt = class e extends V {
2107
2107
  ...this._def,
2108
2108
  minSize: {
2109
2109
  value: t,
2110
- message: R.toString(n)
2110
+ message: L.toString(n)
2111
2111
  }
2112
2112
  });
2113
2113
  }
@@ -2116,7 +2116,7 @@ var Wt = class e extends V {
2116
2116
  ...this._def,
2117
2117
  maxSize: {
2118
2118
  value: t,
2119
- message: R.toString(n)
2119
+ message: L.toString(n)
2120
2120
  }
2121
2121
  });
2122
2122
  }
@@ -2127,33 +2127,33 @@ var Wt = class e extends V {
2127
2127
  return this.min(1, e);
2128
2128
  }
2129
2129
  };
2130
- Wt.create = (e, t) => new Wt({
2130
+ Ut.create = (e, t) => new Ut({
2131
2131
  valueType: e,
2132
2132
  minSize: null,
2133
2133
  maxSize: null,
2134
- typeName: G.ZodSet,
2135
- ...B(t)
2134
+ typeName: K.ZodSet,
2135
+ ...z(t)
2136
2136
  });
2137
- var Gt = class e extends V {
2137
+ var Wt = class e extends B {
2138
2138
  constructor() {
2139
2139
  super(...arguments), this.validate = this.implement;
2140
2140
  }
2141
2141
  _parse(e) {
2142
2142
  let { ctx: t } = this._processInputParams(e);
2143
- if (t.parsedType !== b.function) return P(t, {
2143
+ if (t.parsedType !== b.function) return N(t, {
2144
2144
  code: y.invalid_type,
2145
2145
  expected: b.function,
2146
2146
  received: t.parsedType
2147
- }), I;
2147
+ }), F;
2148
2148
  function n(e, n) {
2149
- return We({
2149
+ return Ge({
2150
2150
  data: e,
2151
2151
  path: t.path,
2152
2152
  errorMaps: [
2153
2153
  t.common.contextualErrorMap,
2154
2154
  t.schemaErrorMap,
2155
- Ue(),
2156
- Ve
2155
+ We(),
2156
+ He
2157
2157
  ].filter((e) => !!e),
2158
2158
  issueData: {
2159
2159
  code: y.invalid_arguments,
@@ -2162,14 +2162,14 @@ var Gt = class e extends V {
2162
2162
  });
2163
2163
  }
2164
2164
  function r(e, n) {
2165
- return We({
2165
+ return Ge({
2166
2166
  data: e,
2167
2167
  path: t.path,
2168
2168
  errorMaps: [
2169
2169
  t.common.contextualErrorMap,
2170
2170
  t.schemaErrorMap,
2171
- Ue(),
2172
- Ve
2171
+ We(),
2172
+ He
2173
2173
  ].filter((e) => !!e),
2174
2174
  issueData: {
2175
2175
  code: y.invalid_return_type,
@@ -2178,9 +2178,9 @@ var Gt = class e extends V {
2178
2178
  });
2179
2179
  }
2180
2180
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
2181
- if (this._def.returns instanceof Zt) {
2181
+ if (this._def.returns instanceof Xt) {
2182
2182
  let e = this;
2183
- return L(async function(...t) {
2183
+ return I(async function(...t) {
2184
2184
  let o = new x([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
2185
2185
  throw o.addIssue(n(t, e)), o;
2186
2186
  }), c = await Reflect.apply(a, this, s);
@@ -2190,7 +2190,7 @@ var Gt = class e extends V {
2190
2190
  });
2191
2191
  } else {
2192
2192
  let e = this;
2193
- return L(function(...t) {
2193
+ return I(function(...t) {
2194
2194
  let o = e._def.args.safeParse(t, i);
2195
2195
  if (!o.success) throw new x([n(t, o.error)]);
2196
2196
  let s = Reflect.apply(a, this, o.data), c = e._def.returns.safeParse(s, i);
@@ -2208,7 +2208,7 @@ var Gt = class e extends V {
2208
2208
  args(...t) {
2209
2209
  return new e({
2210
2210
  ...this._def,
2211
- args: Vt.create(t).rest(jt.create())
2211
+ args: Bt.create(t).rest(Mt.create())
2212
2212
  });
2213
2213
  }
2214
2214
  returns(t) {
@@ -2225,13 +2225,13 @@ var Gt = class e extends V {
2225
2225
  }
2226
2226
  static create(t, n, r) {
2227
2227
  return new e({
2228
- args: t || Vt.create([]).rest(jt.create()),
2229
- returns: n || jt.create(),
2230
- typeName: G.ZodFunction,
2231
- ...B(r)
2228
+ args: t || Bt.create([]).rest(Mt.create()),
2229
+ returns: n || Mt.create(),
2230
+ typeName: K.ZodFunction,
2231
+ ...z(r)
2232
2232
  });
2233
2233
  }
2234
- }, Kt = class extends V {
2234
+ }, Gt = class extends B {
2235
2235
  get schema() {
2236
2236
  return this._def.getter();
2237
2237
  }
@@ -2244,20 +2244,20 @@ var Gt = class e extends V {
2244
2244
  });
2245
2245
  }
2246
2246
  };
2247
- Kt.create = (e, t) => new Kt({
2247
+ Gt.create = (e, t) => new Gt({
2248
2248
  getter: e,
2249
- typeName: G.ZodLazy,
2250
- ...B(t)
2249
+ typeName: K.ZodLazy,
2250
+ ...z(t)
2251
2251
  });
2252
- var qt = class extends V {
2252
+ var Kt = class extends B {
2253
2253
  _parse(e) {
2254
2254
  if (e.data !== this._def.value) {
2255
2255
  let t = this._getOrReturnCtx(e);
2256
- return P(t, {
2256
+ return N(t, {
2257
2257
  received: t.data,
2258
2258
  code: y.invalid_literal,
2259
2259
  expected: this._def.value
2260
- }), I;
2260
+ }), F;
2261
2261
  }
2262
2262
  return {
2263
2263
  status: "valid",
@@ -2268,37 +2268,37 @@ var qt = class extends V {
2268
2268
  return this._def.value;
2269
2269
  }
2270
2270
  };
2271
- qt.create = (e, t) => new qt({
2271
+ Kt.create = (e, t) => new Kt({
2272
2272
  value: e,
2273
- typeName: G.ZodLiteral,
2274
- ...B(t)
2273
+ typeName: K.ZodLiteral,
2274
+ ...z(t)
2275
2275
  });
2276
- function Jt(e, t) {
2277
- return new Yt({
2276
+ function qt(e, t) {
2277
+ return new Jt({
2278
2278
  values: e,
2279
- typeName: G.ZodEnum,
2280
- ...B(t)
2279
+ typeName: K.ZodEnum,
2280
+ ...z(t)
2281
2281
  });
2282
2282
  }
2283
- var Yt = class e extends V {
2283
+ var Jt = class e extends B {
2284
2284
  _parse(e) {
2285
2285
  if (typeof e.data != "string") {
2286
2286
  let t = this._getOrReturnCtx(e), n = this._def.values;
2287
- return P(t, {
2287
+ return N(t, {
2288
2288
  expected: _.joinValues(n),
2289
2289
  received: t.parsedType,
2290
2290
  code: y.invalid_type
2291
- }), I;
2291
+ }), F;
2292
2292
  }
2293
2293
  if (this._cache ||= new Set(this._def.values), !this._cache.has(e.data)) {
2294
2294
  let t = this._getOrReturnCtx(e), n = this._def.values;
2295
- return P(t, {
2295
+ return N(t, {
2296
2296
  received: t.data,
2297
2297
  code: y.invalid_enum_value,
2298
2298
  options: n
2299
- }), I;
2299
+ }), F;
2300
2300
  }
2301
- return L(e.data);
2301
+ return I(e.data);
2302
2302
  }
2303
2303
  get options() {
2304
2304
  return this._def.values;
@@ -2331,69 +2331,69 @@ var Yt = class e extends V {
2331
2331
  });
2332
2332
  }
2333
2333
  };
2334
- Yt.create = Jt;
2335
- var Xt = class extends V {
2334
+ Jt.create = qt;
2335
+ var Yt = class extends B {
2336
2336
  _parse(e) {
2337
2337
  let t = _.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
2338
2338
  if (n.parsedType !== b.string && n.parsedType !== b.number) {
2339
2339
  let e = _.objectValues(t);
2340
- return P(n, {
2340
+ return N(n, {
2341
2341
  expected: _.joinValues(e),
2342
2342
  received: n.parsedType,
2343
2343
  code: y.invalid_type
2344
- }), I;
2344
+ }), F;
2345
2345
  }
2346
2346
  if (this._cache ||= new Set(_.getValidEnumValues(this._def.values)), !this._cache.has(e.data)) {
2347
2347
  let e = _.objectValues(t);
2348
- return P(n, {
2348
+ return N(n, {
2349
2349
  received: n.data,
2350
2350
  code: y.invalid_enum_value,
2351
2351
  options: e
2352
- }), I;
2352
+ }), F;
2353
2353
  }
2354
- return L(e.data);
2354
+ return I(e.data);
2355
2355
  }
2356
2356
  get enum() {
2357
2357
  return this._def.values;
2358
2358
  }
2359
2359
  };
2360
- Xt.create = (e, t) => new Xt({
2360
+ Yt.create = (e, t) => new Yt({
2361
2361
  values: e,
2362
- typeName: G.ZodNativeEnum,
2363
- ...B(t)
2362
+ typeName: K.ZodNativeEnum,
2363
+ ...z(t)
2364
2364
  });
2365
- var Zt = class extends V {
2365
+ var Xt = class extends B {
2366
2366
  unwrap() {
2367
2367
  return this._def.type;
2368
2368
  }
2369
2369
  _parse(e) {
2370
2370
  let { ctx: t } = this._processInputParams(e);
2371
- return t.parsedType !== b.promise && t.common.async === !1 ? (P(t, {
2371
+ return t.parsedType !== b.promise && t.common.async === !1 ? (N(t, {
2372
2372
  code: y.invalid_type,
2373
2373
  expected: b.promise,
2374
2374
  received: t.parsedType
2375
- }), I) : L((t.parsedType === b.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2375
+ }), F) : I((t.parsedType === b.promise ? t.data : Promise.resolve(t.data)).then((e) => this._def.type.parseAsync(e, {
2376
2376
  path: t.path,
2377
2377
  errorMap: t.common.contextualErrorMap
2378
2378
  })));
2379
2379
  }
2380
2380
  };
2381
- Zt.create = (e, t) => new Zt({
2381
+ Xt.create = (e, t) => new Xt({
2382
2382
  type: e,
2383
- typeName: G.ZodPromise,
2384
- ...B(t)
2383
+ typeName: K.ZodPromise,
2384
+ ...z(t)
2385
2385
  });
2386
- var U = class extends V {
2386
+ var W = class extends B {
2387
2387
  innerType() {
2388
2388
  return this._def.schema;
2389
2389
  }
2390
2390
  sourceType() {
2391
- return this._def.schema._def.typeName === G.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2391
+ return this._def.schema._def.typeName === K.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2392
2392
  }
2393
2393
  _parse(e) {
2394
2394
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
2395
2395
  addIssue: (e) => {
2396
- P(n, e), e.fatal ? t.abort() : t.dirty();
2396
+ N(n, e), e.fatal ? t.abort() : t.dirty();
2397
2397
  },
2398
2398
  get path() {
2399
2399
  return n.path;
@@ -2402,22 +2402,22 @@ var U = class extends V {
2402
2402
  if (i.addIssue = i.addIssue.bind(i), r.type === "preprocess") {
2403
2403
  let e = r.transform(n.data, i);
2404
2404
  if (n.common.async) return Promise.resolve(e).then(async (e) => {
2405
- if (t.value === "aborted") return I;
2405
+ if (t.value === "aborted") return F;
2406
2406
  let r = await this._def.schema._parseAsync({
2407
2407
  data: e,
2408
2408
  path: n.path,
2409
2409
  parent: n
2410
2410
  });
2411
- return r.status === "aborted" ? I : r.status === "dirty" || t.value === "dirty" ? Ge(r.value) : r;
2411
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Ke(r.value) : r;
2412
2412
  });
2413
2413
  {
2414
- if (t.value === "aborted") return I;
2414
+ if (t.value === "aborted") return F;
2415
2415
  let r = this._def.schema._parseSync({
2416
2416
  data: e,
2417
2417
  path: n.path,
2418
2418
  parent: n
2419
2419
  });
2420
- return r.status === "aborted" ? I : r.status === "dirty" || t.value === "dirty" ? Ge(r.value) : r;
2420
+ return r.status === "aborted" ? F : r.status === "dirty" || t.value === "dirty" ? Ke(r.value) : r;
2421
2421
  }
2422
2422
  }
2423
2423
  if (r.type === "refinement") {
@@ -2433,7 +2433,7 @@ var U = class extends V {
2433
2433
  path: n.path,
2434
2434
  parent: n
2435
2435
  });
2436
- return r.status === "aborted" ? I : (r.status === "dirty" && t.dirty(), e(r.value), {
2436
+ return r.status === "aborted" ? F : (r.status === "dirty" && t.dirty(), e(r.value), {
2437
2437
  status: t.value,
2438
2438
  value: r.value
2439
2439
  });
@@ -2441,7 +2441,7 @@ var U = class extends V {
2441
2441
  data: n.data,
2442
2442
  path: n.path,
2443
2443
  parent: n
2444
- }).then((n) => n.status === "aborted" ? I : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2444
+ }).then((n) => n.status === "aborted" ? F : (n.status === "dirty" && t.dirty(), e(n.value).then(() => ({
2445
2445
  status: t.value,
2446
2446
  value: n.value
2447
2447
  }))));
@@ -2452,7 +2452,7 @@ var U = class extends V {
2452
2452
  path: n.path,
2453
2453
  parent: n
2454
2454
  });
2455
- if (!Je(e)) return I;
2455
+ if (!Ye(e)) return F;
2456
2456
  let a = r.transform(e.value, i);
2457
2457
  if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2458
2458
  return {
@@ -2463,54 +2463,54 @@ var U = class extends V {
2463
2463
  data: n.data,
2464
2464
  path: n.path,
2465
2465
  parent: n
2466
- }).then((e) => Je(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2466
+ }).then((e) => Ye(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2467
2467
  status: t.value,
2468
2468
  value: e
2469
- })) : I);
2469
+ })) : F);
2470
2470
  _.assertNever(r);
2471
2471
  }
2472
2472
  };
2473
- U.create = (e, t, n) => new U({
2473
+ W.create = (e, t, n) => new W({
2474
2474
  schema: e,
2475
- typeName: G.ZodEffects,
2475
+ typeName: K.ZodEffects,
2476
2476
  effect: t,
2477
- ...B(n)
2478
- }), U.createWithPreprocess = (e, t, n) => new U({
2477
+ ...z(n)
2478
+ }), W.createWithPreprocess = (e, t, n) => new W({
2479
2479
  schema: t,
2480
2480
  effect: {
2481
2481
  type: "preprocess",
2482
2482
  transform: e
2483
2483
  },
2484
- typeName: G.ZodEffects,
2485
- ...B(n)
2484
+ typeName: K.ZodEffects,
2485
+ ...z(n)
2486
2486
  });
2487
- var W = class extends V {
2487
+ var G = class extends B {
2488
2488
  _parse(e) {
2489
- return this._getType(e) === b.undefined ? L(void 0) : this._def.innerType._parse(e);
2489
+ return this._getType(e) === b.undefined ? I(void 0) : this._def.innerType._parse(e);
2490
2490
  }
2491
2491
  unwrap() {
2492
2492
  return this._def.innerType;
2493
2493
  }
2494
2494
  };
2495
- W.create = (e, t) => new W({
2495
+ G.create = (e, t) => new G({
2496
2496
  innerType: e,
2497
- typeName: G.ZodOptional,
2498
- ...B(t)
2497
+ typeName: K.ZodOptional,
2498
+ ...z(t)
2499
2499
  });
2500
- var Qt = class extends V {
2500
+ var Zt = class extends B {
2501
2501
  _parse(e) {
2502
- return this._getType(e) === b.null ? L(null) : this._def.innerType._parse(e);
2502
+ return this._getType(e) === b.null ? I(null) : this._def.innerType._parse(e);
2503
2503
  }
2504
2504
  unwrap() {
2505
2505
  return this._def.innerType;
2506
2506
  }
2507
2507
  };
2508
- Qt.create = (e, t) => new Qt({
2508
+ Zt.create = (e, t) => new Zt({
2509
2509
  innerType: e,
2510
- typeName: G.ZodNullable,
2511
- ...B(t)
2510
+ typeName: K.ZodNullable,
2511
+ ...z(t)
2512
2512
  });
2513
- var $t = class extends V {
2513
+ var Qt = class extends B {
2514
2514
  _parse(e) {
2515
2515
  let { ctx: t } = this._processInputParams(e), n = t.data;
2516
2516
  return t.parsedType === b.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -2523,13 +2523,13 @@ var $t = class extends V {
2523
2523
  return this._def.innerType;
2524
2524
  }
2525
2525
  };
2526
- $t.create = (e, t) => new $t({
2526
+ Qt.create = (e, t) => new Qt({
2527
2527
  innerType: e,
2528
- typeName: G.ZodDefault,
2528
+ typeName: K.ZodDefault,
2529
2529
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
2530
- ...B(t)
2530
+ ...z(t)
2531
2531
  });
2532
- var en = class extends V {
2532
+ var $t = class extends B {
2533
2533
  _parse(e) {
2534
2534
  let { ctx: t } = this._processInputParams(e), n = {
2535
2535
  ...t,
@@ -2542,7 +2542,7 @@ var en = class extends V {
2542
2542
  path: n.path,
2543
2543
  parent: { ...n }
2544
2544
  });
2545
- return Ye(r) ? r.then((e) => ({
2545
+ return Xe(r) ? r.then((e) => ({
2546
2546
  status: "valid",
2547
2547
  value: e.status === "valid" ? e.value : this._def.catchValue({
2548
2548
  get error() {
@@ -2564,21 +2564,21 @@ var en = class extends V {
2564
2564
  return this._def.innerType;
2565
2565
  }
2566
2566
  };
2567
- en.create = (e, t) => new en({
2567
+ $t.create = (e, t) => new $t({
2568
2568
  innerType: e,
2569
- typeName: G.ZodCatch,
2569
+ typeName: K.ZodCatch,
2570
2570
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
2571
- ...B(t)
2571
+ ...z(t)
2572
2572
  });
2573
- var tn = class extends V {
2573
+ var en = class extends B {
2574
2574
  _parse(e) {
2575
2575
  if (this._getType(e) !== b.nan) {
2576
2576
  let t = this._getOrReturnCtx(e);
2577
- return P(t, {
2577
+ return N(t, {
2578
2578
  code: y.invalid_type,
2579
2579
  expected: b.nan,
2580
2580
  received: t.parsedType
2581
- }), I;
2581
+ }), F;
2582
2582
  }
2583
2583
  return {
2584
2584
  status: "valid",
@@ -2586,11 +2586,11 @@ var tn = class extends V {
2586
2586
  };
2587
2587
  }
2588
2588
  };
2589
- tn.create = (e) => new tn({
2590
- typeName: G.ZodNaN,
2591
- ...B(e)
2589
+ en.create = (e) => new en({
2590
+ typeName: K.ZodNaN,
2591
+ ...z(e)
2592
2592
  });
2593
- var nn = class extends V {
2593
+ var tn = class extends B {
2594
2594
  _parse(e) {
2595
2595
  let { ctx: t } = this._processInputParams(e), n = t.data;
2596
2596
  return this._def.type._parse({
@@ -2602,7 +2602,7 @@ var nn = class extends V {
2602
2602
  unwrap() {
2603
2603
  return this._def.type;
2604
2604
  }
2605
- }, rn = class e extends V {
2605
+ }, nn = class e extends B {
2606
2606
  _parse(e) {
2607
2607
  let { status: t, ctx: n } = this._processInputParams(e);
2608
2608
  if (n.common.async) return (async () => {
@@ -2611,7 +2611,7 @@ var nn = class extends V {
2611
2611
  path: n.path,
2612
2612
  parent: n
2613
2613
  });
2614
- return e.status === "aborted" ? I : e.status === "dirty" ? (t.dirty(), Ge(e.value)) : this._def.out._parseAsync({
2614
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), Ke(e.value)) : this._def.out._parseAsync({
2615
2615
  data: e.value,
2616
2616
  path: n.path,
2617
2617
  parent: n
@@ -2623,7 +2623,7 @@ var nn = class extends V {
2623
2623
  path: n.path,
2624
2624
  parent: n
2625
2625
  });
2626
- return e.status === "aborted" ? I : e.status === "dirty" ? (t.dirty(), {
2626
+ return e.status === "aborted" ? F : e.status === "dirty" ? (t.dirty(), {
2627
2627
  status: "dirty",
2628
2628
  value: e.value
2629
2629
  }) : this._def.out._parseSync({
@@ -2637,38 +2637,38 @@ var nn = class extends V {
2637
2637
  return new e({
2638
2638
  in: t,
2639
2639
  out: n,
2640
- typeName: G.ZodPipeline
2640
+ typeName: K.ZodPipeline
2641
2641
  });
2642
2642
  }
2643
- }, an = class extends V {
2643
+ }, rn = class extends B {
2644
2644
  _parse(e) {
2645
- let t = this._def.innerType._parse(e), n = (e) => (Je(e) && (e.value = Object.freeze(e.value)), e);
2646
- return Ye(t) ? t.then((e) => n(e)) : n(t);
2645
+ let t = this._def.innerType._parse(e), n = (e) => (Ye(e) && (e.value = Object.freeze(e.value)), e);
2646
+ return Xe(t) ? t.then((e) => n(e)) : n(t);
2647
2647
  }
2648
2648
  unwrap() {
2649
2649
  return this._def.innerType;
2650
2650
  }
2651
2651
  };
2652
- an.create = (e, t) => new an({
2652
+ rn.create = (e, t) => new rn({
2653
2653
  innerType: e,
2654
- typeName: G.ZodReadonly,
2655
- ...B(t)
2654
+ typeName: K.ZodReadonly,
2655
+ ...z(t)
2656
2656
  }), H.lazycreate;
2657
- var G;
2657
+ var K;
2658
2658
  (function(e) {
2659
2659
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
2660
- })(G ||= {}), xt.create, Ct.create, tn.create, wt.create, Tt.create, Et.create, Dt.create, Ot.create, kt.create, At.create, jt.create, Mt.create, Nt.create, Pt.create, H.create, H.strictCreate, It.create, Rt.create, Bt.create, Vt.create, Ht.create, Ut.create, Wt.create, Gt.create, Kt.create, qt.create, Yt.create, Xt.create, Zt.create, U.create, W.create, Qt.create, U.createWithPreprocess, rn.create;
2660
+ })(K ||= {}), St.create, wt.create, en.create, Tt.create, Et.create, Dt.create, Ot.create, kt.create, At.create, jt.create, Mt.create, V.create, Nt.create, Pt.create, H.create, H.strictCreate, It.create, Lt.create, zt.create, Bt.create, Vt.create, Ht.create, Ut.create, Wt.create, Gt.create, Kt.create, Jt.create, Yt.create, Xt.create, W.create, G.create, Zt.create, W.createWithPreprocess, nn.create;
2661
2661
  //#endregion
2662
2662
  //#region ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js
2663
- var on = class extends Error {
2663
+ var an = class extends Error {
2664
2664
  constructor(e, t) {
2665
2665
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
2666
2666
  }
2667
- }, sn = 10, cn = 13, ln = 32;
2668
- function un(e) {}
2669
- function dn(e) {
2667
+ }, on = 10, sn = 13, cn = 32;
2668
+ function ln(e) {}
2669
+ function un(e) {
2670
2670
  if (typeof e == "function") throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");
2671
- let { onEvent: t = un, onError: n = un, onRetry: r = un, onComment: i, maxBufferSize: a } = e, o = [], s = 0, c = !0, l, u = "", d = 0, f, p = !1;
2671
+ let { onEvent: t = ln, onError: n = ln, onRetry: r = ln, onComment: i, maxBufferSize: a } = e, o = [], s = 0, c = !0, l, u = "", d = 0, f, p = !1;
2672
2672
  function m(e) {
2673
2673
  if (p) throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");
2674
2674
  if (c && (c = !1, e.charCodeAt(0) === 239 && e.charCodeAt(1) === 187 && e.charCodeAt(2) === 191 && (e = e.slice(3))), o.length === 0) {
@@ -2687,7 +2687,7 @@ function dn(e) {
2687
2687
  n !== "" && (o.push(n), s = n.length), h();
2688
2688
  }
2689
2689
  function h() {
2690
- a !== void 0 && (s + u.length <= a || (p = !0, o.length = 0, s = 0, l = void 0, u = "", d = 0, f = void 0, n(new on(`Buffered data exceeded max buffer size of ${a} characters`, { type: "max-buffer-size-exceeded" }))));
2690
+ a !== void 0 && (s + u.length <= a || (p = !0, o.length = 0, s = 0, l = void 0, u = "", d = 0, f = void 0, n(new an(`Buffered data exceeded max buffer size of ${a} characters`, { type: "max-buffer-size-exceeded" }))));
2691
2691
  }
2692
2692
  function ee(e) {
2693
2693
  let n = 0;
@@ -2703,9 +2703,9 @@ function dn(e) {
2703
2703
  continue;
2704
2704
  }
2705
2705
  let i = e.charCodeAt(n);
2706
- if (fn(e, n, i)) {
2707
- let i = e.charCodeAt(n + 5) === ln ? n + 6 : n + 5, a = e.slice(i, r);
2708
- if (d === 0 && e.charCodeAt(r + 1) === sn) {
2706
+ if (dn(e, n, i)) {
2707
+ let i = e.charCodeAt(n + 5) === cn ? n + 6 : n + 5, a = e.slice(i, r);
2708
+ if (d === 0 && e.charCodeAt(r + 1) === on) {
2709
2709
  t({
2710
2710
  id: l,
2711
2711
  event: f,
@@ -2715,7 +2715,7 @@ function dn(e) {
2715
2715
  }
2716
2716
  u = d === 0 ? a : `${u}
2717
2717
  ${a}`, d++;
2718
- } else pn(e, n, i) ? f = e.slice(e.charCodeAt(n + 6) === ln ? n + 7 : n + 6, r) || void 0 : g(e, n, r);
2718
+ } else fn(e, n, i) ? f = e.slice(e.charCodeAt(n + 6) === cn ? n + 7 : n + 6, r) || void 0 : g(e, n, r);
2719
2719
  n = r + 1, r = e.indexOf("\n", n);
2720
2720
  }
2721
2721
  return e.slice(n);
@@ -2723,7 +2723,7 @@ ${a}`, d++;
2723
2723
  for (; n < e.length;) {
2724
2724
  let t = e.indexOf("\r", n), r = e.indexOf("\n", n), i = -1;
2725
2725
  if (t !== -1 && r !== -1 ? i = t < r ? t : r : t === -1 ? r !== -1 && (i = r) : i = t === e.length - 1 ? -1 : t, i === -1) break;
2726
- g(e, n, i), n = i + 1, e.charCodeAt(n - 1) === cn && e.charCodeAt(n) === sn && n++;
2726
+ g(e, n, i), n = i + 1, e.charCodeAt(n - 1) === sn && e.charCodeAt(n) === on && n++;
2727
2727
  }
2728
2728
  return e.slice(n);
2729
2729
  }
@@ -2733,23 +2733,23 @@ ${a}`, d++;
2733
2733
  return;
2734
2734
  }
2735
2735
  let r = e.charCodeAt(t);
2736
- if (fn(e, t, r)) {
2737
- let r = e.charCodeAt(t + 5) === ln ? t + 6 : t + 5, i = e.slice(r, n);
2736
+ if (dn(e, t, r)) {
2737
+ let r = e.charCodeAt(t + 5) === cn ? t + 6 : t + 5, i = e.slice(r, n);
2738
2738
  u = d === 0 ? i : `${u}
2739
2739
  ${i}`, d++;
2740
2740
  return;
2741
2741
  }
2742
- if (pn(e, t, r)) {
2743
- f = e.slice(e.charCodeAt(t + 6) === ln ? t + 7 : t + 6, n) || void 0;
2742
+ if (fn(e, t, r)) {
2743
+ f = e.slice(e.charCodeAt(t + 6) === cn ? t + 7 : t + 6, n) || void 0;
2744
2744
  return;
2745
2745
  }
2746
2746
  if (r === 105 && e.charCodeAt(t + 1) === 100 && e.charCodeAt(t + 2) === 58) {
2747
- let r = e.slice(e.charCodeAt(t + 3) === ln ? t + 4 : t + 3, n);
2747
+ let r = e.slice(e.charCodeAt(t + 3) === cn ? t + 4 : t + 3, n);
2748
2748
  l = r.includes("\0") ? void 0 : r;
2749
2749
  return;
2750
2750
  }
2751
2751
  if (r === 58) {
2752
- i && i(e.slice(t, n).slice(e.charCodeAt(t + 1) === ln ? 2 : 1));
2752
+ i && i(e.slice(t, n).slice(e.charCodeAt(t + 1) === cn ? 2 : 1));
2753
2753
  return;
2754
2754
  }
2755
2755
  let a = e.slice(t, n), o = a.indexOf(":");
@@ -2757,7 +2757,7 @@ ${i}`, d++;
2757
2757
  te(a, "", a);
2758
2758
  return;
2759
2759
  }
2760
- let s = a.slice(0, o), c = a.charCodeAt(o + 1) === ln ? 2 : 1;
2760
+ let s = a.slice(0, o), c = a.charCodeAt(o + 1) === cn ? 2 : 1;
2761
2761
  te(s, a.slice(o + c), a);
2762
2762
  }
2763
2763
  function te(e, t, i) {
@@ -2773,14 +2773,14 @@ ${t}`, d++;
2773
2773
  l = t.includes("\0") ? void 0 : t;
2774
2774
  break;
2775
2775
  case "retry":
2776
- /^\d+$/.test(t) ? r(parseInt(t, 10)) : n(new on(`Invalid \`retry\` value: "${t}"`, {
2776
+ /^\d+$/.test(t) ? r(parseInt(t, 10)) : n(new an(`Invalid \`retry\` value: "${t}"`, {
2777
2777
  type: "invalid-retry",
2778
2778
  value: t,
2779
2779
  line: i
2780
2780
  }));
2781
2781
  break;
2782
2782
  default:
2783
- n(new on(`Unknown field "${e.length > 20 ? `${e.slice(0, 20)}\u2026` : e}"`, {
2783
+ n(new an(`Unknown field "${e.length > 20 ? `${e.slice(0, 20)}\u2026` : e}"`, {
2784
2784
  type: "unknown-field",
2785
2785
  field: e,
2786
2786
  value: t,
@@ -2808,20 +2808,20 @@ ${t}`, d++;
2808
2808
  reset: re
2809
2809
  };
2810
2810
  }
2811
- function fn(e, t, n) {
2811
+ function dn(e, t, n) {
2812
2812
  return n === 100 && e.charCodeAt(t + 1) === 97 && e.charCodeAt(t + 2) === 116 && e.charCodeAt(t + 3) === 97 && e.charCodeAt(t + 4) === 58;
2813
2813
  }
2814
- function pn(e, t, n) {
2814
+ function fn(e, t, n) {
2815
2815
  return n === 101 && e.charCodeAt(t + 1) === 118 && e.charCodeAt(t + 2) === 101 && e.charCodeAt(t + 3) === 110 && e.charCodeAt(t + 4) === 116 && e.charCodeAt(t + 5) === 58;
2816
2816
  }
2817
2817
  //#endregion
2818
2818
  //#region ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js
2819
- var mn = class extends TransformStream {
2819
+ var pn = class extends TransformStream {
2820
2820
  constructor({ onError: e, onRetry: t, onComment: n, maxBufferSize: r } = {}) {
2821
2821
  let i;
2822
2822
  super({
2823
2823
  start(a) {
2824
- i = dn({
2824
+ i = un({
2825
2825
  onEvent: (e) => {
2826
2826
  a.enqueue(e);
2827
2827
  },
@@ -2838,20 +2838,20 @@ var mn = class extends TransformStream {
2838
2838
  }
2839
2839
  });
2840
2840
  }
2841
- }, { btoa: hn, atob: gn } = globalThis, _n = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
2841
+ }, { btoa: mn, atob: hn } = globalThis, gn = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
2842
2842
  let i = () => {
2843
2843
  let e = n.length, r = Array(t);
2844
2844
  for (let i = 0; i < t; i++) r[i] = n[Math.random() * e | 0];
2845
2845
  return r.join("");
2846
2846
  };
2847
2847
  if (e == null) return i;
2848
- if (n.includes(r)) throw new Ae({
2848
+ if (n.includes(r)) throw new je({
2849
2849
  argument: "separator",
2850
2850
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
2851
2851
  });
2852
2852
  return () => `${e}${r}${i()}`;
2853
- }, vn = _n();
2854
- function yn(e) {
2853
+ }, _n = gn();
2854
+ function vn(e) {
2855
2855
  if (e == null) return {};
2856
2856
  let t = {};
2857
2857
  if (e instanceof Headers) e.forEach((e, n) => {
@@ -2863,12 +2863,12 @@ function yn(e) {
2863
2863
  }
2864
2864
  return t;
2865
2865
  }
2866
- var bn = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, xn = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
2867
- function Sn(e) {
2866
+ var yn = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, bn = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
2867
+ function xn(e) {
2868
2868
  let t = JSON.parse(e);
2869
- return typeof t != "object" || !t || bn.test(e) === !1 && xn.test(e) === !1 ? t : Cn(t);
2869
+ return typeof t != "object" || !t || yn.test(e) === !1 && bn.test(e) === !1 ? t : Sn(t);
2870
2870
  }
2871
- function Cn(e) {
2871
+ function Sn(e) {
2872
2872
  let t = [e];
2873
2873
  for (; t.length;) {
2874
2874
  let e = t;
@@ -2883,34 +2883,34 @@ function Cn(e) {
2883
2883
  }
2884
2884
  return e;
2885
2885
  }
2886
- function wn(e) {
2886
+ function Cn(e) {
2887
2887
  let { stackTraceLimit: t } = Error;
2888
2888
  try {
2889
2889
  Error.stackTraceLimit = 0;
2890
2890
  } catch {
2891
- return Sn(e);
2891
+ return xn(e);
2892
2892
  }
2893
2893
  try {
2894
- return Sn(e);
2894
+ return xn(e);
2895
2895
  } finally {
2896
2896
  Error.stackTraceLimit = t;
2897
2897
  }
2898
2898
  }
2899
- function Tn(e) {
2899
+ function wn(e) {
2900
2900
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
2901
2901
  e.additionalProperties = !1;
2902
2902
  let { properties: t } = e;
2903
- if (t != null) for (let e of Object.keys(t)) t[e] = En(t[e]);
2903
+ if (t != null) for (let e of Object.keys(t)) t[e] = Tn(t[e]);
2904
2904
  }
2905
- e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(En) : En(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(En)), e.allOf != null && (e.allOf = e.allOf.map(En)), e.oneOf != null && (e.oneOf = e.oneOf.map(En));
2905
+ e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(Tn) : Tn(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(Tn)), e.allOf != null && (e.allOf = e.allOf.map(Tn)), e.oneOf != null && (e.oneOf = e.oneOf.map(Tn));
2906
2906
  let { definitions: t } = e;
2907
- if (t != null) for (let e of Object.keys(t)) t[e] = En(t[e]);
2907
+ if (t != null) for (let e of Object.keys(t)) t[e] = Tn(t[e]);
2908
2908
  return e;
2909
2909
  }
2910
- function En(e) {
2911
- return typeof e == "boolean" ? e : Tn(e);
2910
+ function Tn(e) {
2911
+ return typeof e == "boolean" ? e : wn(e);
2912
2912
  }
2913
- var Dn = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), On = {
2913
+ var En = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use"), Dn = {
2914
2914
  name: void 0,
2915
2915
  $refStrategy: "root",
2916
2916
  basePath: ["#"],
@@ -2930,24 +2930,24 @@ var Dn = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to u
2930
2930
  emailStrategy: "format:email",
2931
2931
  base64Strategy: "contentEncoding:base64",
2932
2932
  nameStrategy: "ref"
2933
- }, kn = (e) => typeof e == "string" ? {
2934
- ...On,
2933
+ }, On = (e) => typeof e == "string" ? {
2934
+ ...Dn,
2935
2935
  name: e
2936
2936
  } : {
2937
- ...On,
2937
+ ...Dn,
2938
2938
  ...e
2939
2939
  };
2940
- function K() {
2940
+ function q() {
2941
2941
  return {};
2942
2942
  }
2943
- function An(e, t) {
2943
+ function kn(e, t) {
2944
2944
  let n = { type: "array" };
2945
- return e.type?._def && e.type?._def?.typeName !== G.ZodAny && (n.items = X(e.type._def, {
2945
+ return e.type?._def && e.type?._def?.typeName !== K.ZodAny && (n.items = Z(e.type._def, {
2946
2946
  ...t,
2947
2947
  currentPath: [...t.currentPath, "items"]
2948
2948
  })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n;
2949
2949
  }
2950
- function jn(e) {
2950
+ function An(e) {
2951
2951
  let t = {
2952
2952
  type: "integer",
2953
2953
  format: "int64"
@@ -2966,16 +2966,16 @@ function jn(e) {
2966
2966
  }
2967
2967
  return t;
2968
2968
  }
2969
- function Mn() {
2969
+ function jn() {
2970
2970
  return { type: "boolean" };
2971
2971
  }
2972
- function Nn(e, t) {
2973
- return X(e.type._def, t);
2972
+ function Mn(e, t) {
2973
+ return Z(e.type._def, t);
2974
2974
  }
2975
- var Pn = (e, t) => X(e.innerType._def, t);
2976
- function Fn(e, t, n) {
2975
+ var Nn = (e, t) => Z(e.innerType._def, t);
2976
+ function Pn(e, t, n) {
2977
2977
  let r = n ?? t.dateStrategy;
2978
- if (Array.isArray(r)) return { anyOf: r.map((n, r) => Fn(e, t, n)) };
2978
+ if (Array.isArray(r)) return { anyOf: r.map((n, r) => Pn(e, t, n)) };
2979
2979
  switch (r) {
2980
2980
  case "string":
2981
2981
  case "format:date-time": return {
@@ -2986,10 +2986,10 @@ function Fn(e, t, n) {
2986
2986
  type: "string",
2987
2987
  format: "date"
2988
2988
  };
2989
- case "integer": return In(e);
2989
+ case "integer": return Fn(e);
2990
2990
  }
2991
2991
  }
2992
- var In = (e) => {
2992
+ var Fn = (e) => {
2993
2993
  let t = {
2994
2994
  type: "integer",
2995
2995
  format: "unix-time"
@@ -3004,31 +3004,31 @@ var In = (e) => {
3004
3004
  }
3005
3005
  return t;
3006
3006
  };
3007
- function Ln(e, t) {
3007
+ function In(e, t) {
3008
3008
  return {
3009
- ...X(e.innerType._def, t),
3009
+ ...Z(e.innerType._def, t),
3010
3010
  default: e.defaultValue()
3011
3011
  };
3012
3012
  }
3013
- function Rn(e, t) {
3014
- return t.effectStrategy === "input" ? X(e.schema._def, t) : K();
3013
+ function Ln(e, t) {
3014
+ return t.effectStrategy === "input" ? Z(e.schema._def, t) : q();
3015
3015
  }
3016
- function zn(e) {
3016
+ function Rn(e) {
3017
3017
  return {
3018
3018
  type: "string",
3019
3019
  enum: Array.from(e.values)
3020
3020
  };
3021
3021
  }
3022
- var Bn = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3023
- function Vn(e, t) {
3024
- let n = [X(e.left._def, {
3022
+ var zn = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
3023
+ function Bn(e, t) {
3024
+ let n = [Z(e.left._def, {
3025
3025
  ...t,
3026
3026
  currentPath: [
3027
3027
  ...t.currentPath,
3028
3028
  "allOf",
3029
3029
  "0"
3030
3030
  ]
3031
- }), X(e.right._def, {
3031
+ }), Z(e.right._def, {
3032
3032
  ...t,
3033
3033
  currentPath: [
3034
3034
  ...t.currentPath,
@@ -3037,7 +3037,7 @@ function Vn(e, t) {
3037
3037
  ]
3038
3038
  })].filter((e) => !!e), r = [];
3039
3039
  return n.forEach((e) => {
3040
- if (Bn(e)) r.push(...e.allOf);
3040
+ if (zn(e)) r.push(...e.allOf);
3041
3041
  else {
3042
3042
  let t = e;
3043
3043
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -3048,19 +3048,19 @@ function Vn(e, t) {
3048
3048
  }
3049
3049
  }), r.length ? { allOf: r } : void 0;
3050
3050
  }
3051
- function Hn(e) {
3051
+ function Vn(e) {
3052
3052
  let t = typeof e.value;
3053
3053
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : {
3054
3054
  type: t === "bigint" ? "integer" : t,
3055
3055
  const: e.value
3056
3056
  };
3057
3057
  }
3058
- var Un = void 0, q = {
3058
+ var Hn = void 0, J = {
3059
3059
  cuid: /^[cC][^\s-]{8,}$/,
3060
3060
  cuid2: /^[0-9a-z]+$/,
3061
3061
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
3062
3062
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,
3063
- emoji: () => (Un === void 0 && (Un = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Un),
3063
+ emoji: () => (Hn === void 0 && (Hn = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), Hn),
3064
3064
  uuid: /^[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}$/,
3065
3065
  ipv4: /^(?:(?: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])$/,
3066
3066
  ipv4Cidr: /^(?:(?: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])$/,
@@ -3071,7 +3071,7 @@ var Un = void 0, q = {
3071
3071
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
3072
3072
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
3073
3073
  };
3074
- function Wn(e, t) {
3074
+ function Un(e, t) {
3075
3075
  let n = { type: "string" };
3076
3076
  if (e.checks) for (let r of e.checks) switch (r.kind) {
3077
3077
  case "min":
@@ -3083,87 +3083,87 @@ function Wn(e, t) {
3083
3083
  case "email":
3084
3084
  switch (t.emailStrategy) {
3085
3085
  case "format:email":
3086
- J(n, "email", r.message, t);
3086
+ Y(n, "email", r.message, t);
3087
3087
  break;
3088
3088
  case "format:idn-email":
3089
- J(n, "idn-email", r.message, t);
3089
+ Y(n, "idn-email", r.message, t);
3090
3090
  break;
3091
3091
  case "pattern:zod":
3092
- Y(n, q.email, r.message, t);
3092
+ X(n, J.email, r.message, t);
3093
3093
  break;
3094
3094
  }
3095
3095
  break;
3096
3096
  case "url":
3097
- J(n, "uri", r.message, t);
3097
+ Y(n, "uri", r.message, t);
3098
3098
  break;
3099
3099
  case "uuid":
3100
- J(n, "uuid", r.message, t);
3100
+ Y(n, "uuid", r.message, t);
3101
3101
  break;
3102
3102
  case "regex":
3103
- Y(n, r.regex, r.message, t);
3103
+ X(n, r.regex, r.message, t);
3104
3104
  break;
3105
3105
  case "cuid":
3106
- Y(n, q.cuid, r.message, t);
3106
+ X(n, J.cuid, r.message, t);
3107
3107
  break;
3108
3108
  case "cuid2":
3109
- Y(n, q.cuid2, r.message, t);
3109
+ X(n, J.cuid2, r.message, t);
3110
3110
  break;
3111
3111
  case "startsWith":
3112
- Y(n, RegExp(`^${Gn(r.value, t)}`), r.message, t);
3112
+ X(n, RegExp(`^${Wn(r.value, t)}`), r.message, t);
3113
3113
  break;
3114
3114
  case "endsWith":
3115
- Y(n, RegExp(`${Gn(r.value, t)}$`), r.message, t);
3115
+ X(n, RegExp(`${Wn(r.value, t)}$`), r.message, t);
3116
3116
  break;
3117
3117
  case "datetime":
3118
- J(n, "date-time", r.message, t);
3118
+ Y(n, "date-time", r.message, t);
3119
3119
  break;
3120
3120
  case "date":
3121
- J(n, "date", r.message, t);
3121
+ Y(n, "date", r.message, t);
3122
3122
  break;
3123
3123
  case "time":
3124
- J(n, "time", r.message, t);
3124
+ Y(n, "time", r.message, t);
3125
3125
  break;
3126
3126
  case "duration":
3127
- J(n, "duration", r.message, t);
3127
+ Y(n, "duration", r.message, t);
3128
3128
  break;
3129
3129
  case "length":
3130
3130
  n.minLength = typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value;
3131
3131
  break;
3132
3132
  case "includes":
3133
- Y(n, RegExp(Gn(r.value, t)), r.message, t);
3133
+ X(n, RegExp(Wn(r.value, t)), r.message, t);
3134
3134
  break;
3135
3135
  case "ip":
3136
- r.version !== "v6" && J(n, "ipv4", r.message, t), r.version !== "v4" && J(n, "ipv6", r.message, t);
3136
+ r.version !== "v6" && Y(n, "ipv4", r.message, t), r.version !== "v4" && Y(n, "ipv6", r.message, t);
3137
3137
  break;
3138
3138
  case "base64url":
3139
- Y(n, q.base64url, r.message, t);
3139
+ X(n, J.base64url, r.message, t);
3140
3140
  break;
3141
3141
  case "jwt":
3142
- Y(n, q.jwt, r.message, t);
3142
+ X(n, J.jwt, r.message, t);
3143
3143
  break;
3144
3144
  case "cidr":
3145
- r.version !== "v6" && Y(n, q.ipv4Cidr, r.message, t), r.version !== "v4" && Y(n, q.ipv6Cidr, r.message, t);
3145
+ r.version !== "v6" && X(n, J.ipv4Cidr, r.message, t), r.version !== "v4" && X(n, J.ipv6Cidr, r.message, t);
3146
3146
  break;
3147
3147
  case "emoji":
3148
- Y(n, q.emoji(), r.message, t);
3148
+ X(n, J.emoji(), r.message, t);
3149
3149
  break;
3150
3150
  case "ulid":
3151
- Y(n, q.ulid, r.message, t);
3151
+ X(n, J.ulid, r.message, t);
3152
3152
  break;
3153
3153
  case "base64":
3154
3154
  switch (t.base64Strategy) {
3155
3155
  case "format:binary":
3156
- J(n, "binary", r.message, t);
3156
+ Y(n, "binary", r.message, t);
3157
3157
  break;
3158
3158
  case "contentEncoding:base64":
3159
3159
  n.contentEncoding = "base64";
3160
3160
  break;
3161
3161
  case "pattern:zod":
3162
- Y(n, q.base64, r.message, t);
3162
+ X(n, J.base64, r.message, t);
3163
3163
  break;
3164
3164
  }
3165
3165
  break;
3166
- case "nanoid": Y(n, q.nanoid, r.message, t);
3166
+ case "nanoid": X(n, J.nanoid, r.message, t);
3167
3167
  case "toLowerCase":
3168
3168
  case "toUpperCase":
3169
3169
  case "trim": break;
@@ -3171,28 +3171,28 @@ function Wn(e, t) {
3171
3171
  }
3172
3172
  return n;
3173
3173
  }
3174
- function Gn(e, t) {
3175
- return t.patternStrategy === "escape" ? qn(e) : e;
3174
+ function Wn(e, t) {
3175
+ return t.patternStrategy === "escape" ? Kn(e) : e;
3176
3176
  }
3177
- var Kn = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3178
- function qn(e) {
3177
+ var Gn = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
3178
+ function Kn(e) {
3179
3179
  let t = "";
3180
- for (let n = 0; n < e.length; n++) Kn.has(e[n]) || (t += "\\"), t += e[n];
3180
+ for (let n = 0; n < e.length; n++) Gn.has(e[n]) || (t += "\\"), t += e[n];
3181
3181
  return t;
3182
3182
  }
3183
- function J(e, t, n, r) {
3183
+ function Y(e, t, n, r) {
3184
3184
  e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({ format: e.format }), delete e.format), e.anyOf.push({
3185
3185
  format: t,
3186
3186
  ...n && r.errorMessages && { errorMessage: { format: n } }
3187
3187
  })) : e.format = t;
3188
3188
  }
3189
- function Y(e, t, n, r) {
3189
+ function X(e, t, n, r) {
3190
3190
  e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({
3191
- pattern: Jn(t, r),
3191
+ pattern: qn(t, r),
3192
3192
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
3193
- })) : e.pattern = Jn(t, r);
3193
+ })) : e.pattern = qn(t, r);
3194
3194
  }
3195
- function Jn(e, t) {
3195
+ function qn(e, t) {
3196
3196
  if (!t.applyRegexFlags || !e.flags) return e.source;
3197
3197
  let n = {
3198
3198
  i: e.flags.includes("i"),
@@ -3239,26 +3239,26 @@ function Jn(e, t) {
3239
3239
  }
3240
3240
  return i;
3241
3241
  }
3242
- function Yn(e, t) {
3242
+ function Jn(e, t) {
3243
3243
  let n = {
3244
3244
  type: "object",
3245
- additionalProperties: X(e.valueType._def, {
3245
+ additionalProperties: Z(e.valueType._def, {
3246
3246
  ...t,
3247
3247
  currentPath: [...t.currentPath, "additionalProperties"]
3248
3248
  }) ?? t.allowedAdditionalProperties
3249
3249
  };
3250
- if (e.keyType?._def.typeName === G.ZodString && e.keyType._def.checks?.length) {
3251
- let { type: r, ...i } = Wn(e.keyType._def, t);
3250
+ if (e.keyType?._def.typeName === K.ZodString && e.keyType._def.checks?.length) {
3251
+ let { type: r, ...i } = Un(e.keyType._def, t);
3252
3252
  return {
3253
3253
  ...n,
3254
3254
  propertyNames: i
3255
3255
  };
3256
- } else if (e.keyType?._def.typeName === G.ZodEnum) return {
3256
+ } else if (e.keyType?._def.typeName === K.ZodEnum) return {
3257
3257
  ...n,
3258
3258
  propertyNames: { enum: e.keyType._def.values }
3259
3259
  };
3260
- else if (e.keyType?._def.typeName === G.ZodBranded && e.keyType._def.type._def.typeName === G.ZodString && e.keyType._def.type._def.checks?.length) {
3261
- let { type: r, ...i } = Nn(e.keyType._def, t);
3260
+ else if (e.keyType?._def.typeName === K.ZodBranded && e.keyType._def.type._def.typeName === K.ZodString && e.keyType._def.type._def.checks?.length) {
3261
+ let { type: r, ...i } = Mn(e.keyType._def, t);
3262
3262
  return {
3263
3263
  ...n,
3264
3264
  propertyNames: i
@@ -3266,13 +3266,13 @@ function Yn(e, t) {
3266
3266
  }
3267
3267
  return n;
3268
3268
  }
3269
- function Xn(e, t) {
3270
- return t.mapStrategy === "record" ? Yn(e, t) : {
3269
+ function Yn(e, t) {
3270
+ return t.mapStrategy === "record" ? Jn(e, t) : {
3271
3271
  type: "array",
3272
3272
  maxItems: 125,
3273
3273
  items: {
3274
3274
  type: "array",
3275
- items: [X(e.keyType._def, {
3275
+ items: [Z(e.keyType._def, {
3276
3276
  ...t,
3277
3277
  currentPath: [
3278
3278
  ...t.currentPath,
@@ -3280,7 +3280,7 @@ function Xn(e, t) {
3280
3280
  "items",
3281
3281
  "0"
3282
3282
  ]
3283
- }) || K(), X(e.valueType._def, {
3283
+ }) || q(), Z(e.valueType._def, {
3284
3284
  ...t,
3285
3285
  currentPath: [
3286
3286
  ...t.currentPath,
@@ -3288,37 +3288,37 @@ function Xn(e, t) {
3288
3288
  "items",
3289
3289
  "1"
3290
3290
  ]
3291
- }) || K()],
3291
+ }) || q()],
3292
3292
  minItems: 2,
3293
3293
  maxItems: 2
3294
3294
  }
3295
3295
  };
3296
3296
  }
3297
- function Zn(e) {
3297
+ function Xn(e) {
3298
3298
  let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
3299
3299
  return {
3300
3300
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
3301
3301
  enum: n
3302
3302
  };
3303
3303
  }
3304
- function Qn() {
3305
- return { not: K() };
3304
+ function Zn() {
3305
+ return { not: q() };
3306
3306
  }
3307
- function $n() {
3307
+ function Qn() {
3308
3308
  return { type: "null" };
3309
3309
  }
3310
- var er = {
3310
+ var $n = {
3311
3311
  ZodString: "string",
3312
3312
  ZodNumber: "number",
3313
3313
  ZodBigInt: "integer",
3314
3314
  ZodBoolean: "boolean",
3315
3315
  ZodNull: "null"
3316
3316
  };
3317
- function tr(e, t) {
3317
+ function er(e, t) {
3318
3318
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
3319
- if (n.every((e) => e._def.typeName in er && (!e._def.checks || !e._def.checks.length))) {
3319
+ if (n.every((e) => e._def.typeName in $n && (!e._def.checks || !e._def.checks.length))) {
3320
3320
  let e = n.reduce((e, t) => {
3321
- let n = er[t._def.typeName];
3321
+ let n = $n[t._def.typeName];
3322
3322
  return n && !e.includes(n) ? [...e, n] : e;
3323
3323
  }, []);
3324
3324
  return { type: e.length > 1 ? e : e[0] };
@@ -3345,10 +3345,10 @@ function tr(e, t) {
3345
3345
  type: "string",
3346
3346
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
3347
3347
  };
3348
- return nr(e, t);
3348
+ return tr(e, t);
3349
3349
  }
3350
- var nr = (e, t) => {
3351
- let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => X(e._def, {
3350
+ var tr = (e, t) => {
3351
+ let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => Z(e._def, {
3352
3352
  ...t,
3353
3353
  currentPath: [
3354
3354
  ...t.currentPath,
@@ -3358,15 +3358,15 @@ var nr = (e, t) => {
3358
3358
  })).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
3359
3359
  return n.length ? { anyOf: n } : void 0;
3360
3360
  };
3361
- function rr(e, t) {
3361
+ function nr(e, t) {
3362
3362
  if ([
3363
3363
  "ZodString",
3364
3364
  "ZodNumber",
3365
3365
  "ZodBigInt",
3366
3366
  "ZodBoolean",
3367
3367
  "ZodNull"
3368
- ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [er[e.innerType._def.typeName], "null"] };
3369
- let n = X(e.innerType._def, {
3368
+ ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [$n[e.innerType._def.typeName], "null"] };
3369
+ let n = Z(e.innerType._def, {
3370
3370
  ...t,
3371
3371
  currentPath: [
3372
3372
  ...t.currentPath,
@@ -3376,7 +3376,7 @@ function rr(e, t) {
3376
3376
  });
3377
3377
  return n && { anyOf: [n, { type: "null" }] };
3378
3378
  }
3379
- function ir(e) {
3379
+ function rr(e) {
3380
3380
  let t = { type: "number" };
3381
3381
  if (!e.checks) return t;
3382
3382
  for (let n of e.checks) switch (n.kind) {
@@ -3395,7 +3395,7 @@ function ir(e) {
3395
3395
  }
3396
3396
  return t;
3397
3397
  }
3398
- function ar(e, t) {
3398
+ function ir(e, t) {
3399
3399
  let n = {
3400
3400
  type: "object",
3401
3401
  properties: {}
@@ -3403,7 +3403,7 @@ function ar(e, t) {
3403
3403
  for (let e in i) {
3404
3404
  let a = i[e];
3405
3405
  if (a === void 0 || a._def === void 0) continue;
3406
- let o = sr(a), s = X(a._def, {
3406
+ let o = or(a), s = Z(a._def, {
3407
3407
  ...t,
3408
3408
  currentPath: [
3409
3409
  ...t.currentPath,
@@ -3419,11 +3419,11 @@ function ar(e, t) {
3419
3419
  s !== void 0 && (n.properties[e] = s, o || r.push(e));
3420
3420
  }
3421
3421
  r.length && (n.required = r);
3422
- let a = or(e, t);
3422
+ let a = ar(e, t);
3423
3423
  return a !== void 0 && (n.additionalProperties = a), n;
3424
3424
  }
3425
- function or(e, t) {
3426
- if (e.catchall._def.typeName !== "ZodNever") return X(e.catchall._def, {
3425
+ function ar(e, t) {
3426
+ if (e.catchall._def.typeName !== "ZodNever") return Z(e.catchall._def, {
3427
3427
  ...t,
3428
3428
  currentPath: [...t.currentPath, "additionalProperties"]
3429
3429
  });
@@ -3433,16 +3433,16 @@ function or(e, t) {
3433
3433
  case "strip": return t.removeAdditionalStrategy === "strict" ? t.allowedAdditionalProperties : t.rejectedAdditionalProperties;
3434
3434
  }
3435
3435
  }
3436
- function sr(e) {
3436
+ function or(e) {
3437
3437
  try {
3438
3438
  return e.isOptional();
3439
3439
  } catch {
3440
3440
  return !0;
3441
3441
  }
3442
3442
  }
3443
- var cr = (e, t) => {
3444
- if (t.currentPath.toString() === t.propertyPath?.toString()) return X(e.innerType._def, t);
3445
- let n = X(e.innerType._def, {
3443
+ var sr = (e, t) => {
3444
+ if (t.currentPath.toString() === t.propertyPath?.toString()) return Z(e.innerType._def, t);
3445
+ let n = Z(e.innerType._def, {
3446
3446
  ...t,
3447
3447
  currentPath: [
3448
3448
  ...t.currentPath,
@@ -3450,11 +3450,11 @@ var cr = (e, t) => {
3450
3450
  "1"
3451
3451
  ]
3452
3452
  });
3453
- return n ? { anyOf: [{ not: K() }, n] } : K();
3454
- }, lr = (e, t) => {
3455
- if (t.pipeStrategy === "input") return X(e.in._def, t);
3456
- if (t.pipeStrategy === "output") return X(e.out._def, t);
3457
- let n = X(e.in._def, {
3453
+ return n ? { anyOf: [{ not: q() }, n] } : q();
3454
+ }, cr = (e, t) => {
3455
+ if (t.pipeStrategy === "input") return Z(e.in._def, t);
3456
+ if (t.pipeStrategy === "output") return Z(e.out._def, t);
3457
+ let n = Z(e.in._def, {
3458
3458
  ...t,
3459
3459
  currentPath: [
3460
3460
  ...t.currentPath,
@@ -3462,7 +3462,7 @@ var cr = (e, t) => {
3462
3462
  "0"
3463
3463
  ]
3464
3464
  });
3465
- return { allOf: [n, X(e.out._def, {
3465
+ return { allOf: [n, Z(e.out._def, {
3466
3466
  ...t,
3467
3467
  currentPath: [
3468
3468
  ...t.currentPath,
@@ -3471,25 +3471,25 @@ var cr = (e, t) => {
3471
3471
  ]
3472
3472
  })].filter((e) => e !== void 0) };
3473
3473
  };
3474
- function ur(e, t) {
3475
- return X(e.type._def, t);
3474
+ function lr(e, t) {
3475
+ return Z(e.type._def, t);
3476
3476
  }
3477
- function dr(e, t) {
3477
+ function ur(e, t) {
3478
3478
  let n = {
3479
3479
  type: "array",
3480
3480
  uniqueItems: !0,
3481
- items: X(e.valueType._def, {
3481
+ items: Z(e.valueType._def, {
3482
3482
  ...t,
3483
3483
  currentPath: [...t.currentPath, "items"]
3484
3484
  })
3485
3485
  };
3486
3486
  return e.minSize && (n.minItems = e.minSize.value), e.maxSize && (n.maxItems = e.maxSize.value), n;
3487
3487
  }
3488
- function fr(e, t) {
3488
+ function dr(e, t) {
3489
3489
  return e.rest ? {
3490
3490
  type: "array",
3491
3491
  minItems: e.items.length,
3492
- items: e.items.map((e, n) => X(e._def, {
3492
+ items: e.items.map((e, n) => Z(e._def, {
3493
3493
  ...t,
3494
3494
  currentPath: [
3495
3495
  ...t.currentPath,
@@ -3497,7 +3497,7 @@ function fr(e, t) {
3497
3497
  `${n}`
3498
3498
  ]
3499
3499
  })).reduce((e, t) => t === void 0 ? e : [...e, t], []),
3500
- additionalItems: X(e.rest._def, {
3500
+ additionalItems: Z(e.rest._def, {
3501
3501
  ...t,
3502
3502
  currentPath: [...t.currentPath, "additionalItems"]
3503
3503
  })
@@ -3505,7 +3505,7 @@ function fr(e, t) {
3505
3505
  type: "array",
3506
3506
  minItems: e.items.length,
3507
3507
  maxItems: e.items.length,
3508
- items: e.items.map((e, n) => X(e._def, {
3508
+ items: e.items.map((e, n) => Z(e._def, {
3509
3509
  ...t,
3510
3510
  currentPath: [
3511
3511
  ...t.currentPath,
@@ -3515,65 +3515,65 @@ function fr(e, t) {
3515
3515
  })).reduce((e, t) => t === void 0 ? e : [...e, t], [])
3516
3516
  };
3517
3517
  }
3518
- function pr() {
3519
- return { not: K() };
3518
+ function fr() {
3519
+ return { not: q() };
3520
3520
  }
3521
- function mr() {
3522
- return K();
3521
+ function pr() {
3522
+ return q();
3523
3523
  }
3524
- var hr = (e, t) => X(e.innerType._def, t), gr = (e, t, n) => {
3524
+ var mr = (e, t) => Z(e.innerType._def, t), hr = (e, t, n) => {
3525
3525
  switch (t) {
3526
- case G.ZodString: return Wn(e, n);
3527
- case G.ZodNumber: return ir(e);
3528
- case G.ZodObject: return ar(e, n);
3529
- case G.ZodBigInt: return jn(e);
3530
- case G.ZodBoolean: return Mn();
3531
- case G.ZodDate: return Fn(e, n);
3532
- case G.ZodUndefined: return pr();
3533
- case G.ZodNull: return $n();
3534
- case G.ZodArray: return An(e, n);
3535
- case G.ZodUnion:
3536
- case G.ZodDiscriminatedUnion: return tr(e, n);
3537
- case G.ZodIntersection: return Vn(e, n);
3538
- case G.ZodTuple: return fr(e, n);
3539
- case G.ZodRecord: return Yn(e, n);
3540
- case G.ZodLiteral: return Hn(e);
3541
- case G.ZodEnum: return zn(e);
3542
- case G.ZodNativeEnum: return Zn(e);
3543
- case G.ZodNullable: return rr(e, n);
3544
- case G.ZodOptional: return cr(e, n);
3545
- case G.ZodMap: return Xn(e, n);
3546
- case G.ZodSet: return dr(e, n);
3547
- case G.ZodLazy: return () => e.getter()._def;
3548
- case G.ZodPromise: return ur(e, n);
3549
- case G.ZodNaN:
3550
- case G.ZodNever: return Qn();
3551
- case G.ZodEffects: return Rn(e, n);
3552
- case G.ZodAny: return K();
3553
- case G.ZodUnknown: return mr();
3554
- case G.ZodDefault: return Ln(e, n);
3555
- case G.ZodBranded: return Nn(e, n);
3556
- case G.ZodReadonly: return hr(e, n);
3557
- case G.ZodCatch: return Pn(e, n);
3558
- case G.ZodPipeline: return lr(e, n);
3559
- case G.ZodFunction:
3560
- case G.ZodVoid:
3561
- case G.ZodSymbol: return;
3526
+ case K.ZodString: return Un(e, n);
3527
+ case K.ZodNumber: return rr(e);
3528
+ case K.ZodObject: return ir(e, n);
3529
+ case K.ZodBigInt: return An(e);
3530
+ case K.ZodBoolean: return jn();
3531
+ case K.ZodDate: return Pn(e, n);
3532
+ case K.ZodUndefined: return fr();
3533
+ case K.ZodNull: return Qn();
3534
+ case K.ZodArray: return kn(e, n);
3535
+ case K.ZodUnion:
3536
+ case K.ZodDiscriminatedUnion: return er(e, n);
3537
+ case K.ZodIntersection: return Bn(e, n);
3538
+ case K.ZodTuple: return dr(e, n);
3539
+ case K.ZodRecord: return Jn(e, n);
3540
+ case K.ZodLiteral: return Vn(e);
3541
+ case K.ZodEnum: return Rn(e);
3542
+ case K.ZodNativeEnum: return Xn(e);
3543
+ case K.ZodNullable: return nr(e, n);
3544
+ case K.ZodOptional: return sr(e, n);
3545
+ case K.ZodMap: return Yn(e, n);
3546
+ case K.ZodSet: return ur(e, n);
3547
+ case K.ZodLazy: return () => e.getter()._def;
3548
+ case K.ZodPromise: return lr(e, n);
3549
+ case K.ZodNaN:
3550
+ case K.ZodNever: return Zn();
3551
+ case K.ZodEffects: return Ln(e, n);
3552
+ case K.ZodAny: return q();
3553
+ case K.ZodUnknown: return pr();
3554
+ case K.ZodDefault: return In(e, n);
3555
+ case K.ZodBranded: return Mn(e, n);
3556
+ case K.ZodReadonly: return mr(e, n);
3557
+ case K.ZodCatch: return Nn(e, n);
3558
+ case K.ZodPipeline: return cr(e, n);
3559
+ case K.ZodFunction:
3560
+ case K.ZodVoid:
3561
+ case K.ZodSymbol: return;
3562
3562
  default: return /* @__PURE__ */ ((e) => void 0)(t);
3563
3563
  }
3564
- }, _r = (e, t) => {
3564
+ }, gr = (e, t) => {
3565
3565
  let n = 0;
3566
3566
  for (; n < e.length && n < t.length && e[n] === t[n]; n++);
3567
3567
  return [(e.length - n).toString(), ...t.slice(n)].join("/");
3568
3568
  };
3569
- function X(e, t, n = !1) {
3569
+ function Z(e, t, n = !1) {
3570
3570
  let r = t.seen.get(e);
3571
3571
  if (t.override) {
3572
3572
  let i = t.override?.call(t, e, t, r, n);
3573
- if (i !== Dn) return i;
3573
+ if (i !== En) return i;
3574
3574
  }
3575
3575
  if (r && !n) {
3576
- let e = vr(r, t);
3576
+ let e = _r(r, t);
3577
3577
  if (e !== void 0) return e;
3578
3578
  }
3579
3579
  let i = {
@@ -3582,22 +3582,22 @@ function X(e, t, n = !1) {
3582
3582
  jsonSchema: void 0
3583
3583
  };
3584
3584
  t.seen.set(e, i);
3585
- let a = gr(e, e.typeName, t), o = typeof a == "function" ? X(a(), t) : a;
3586
- if (o && yr(e, t, o), t.postProcess) {
3585
+ let a = hr(e, e.typeName, t), o = typeof a == "function" ? Z(a(), t) : a;
3586
+ if (o && vr(e, t, o), t.postProcess) {
3587
3587
  let n = t.postProcess(o, e, t);
3588
3588
  return i.jsonSchema = o, n;
3589
3589
  }
3590
3590
  return i.jsonSchema = o, o;
3591
3591
  }
3592
- var vr = (e, t) => {
3592
+ var _r = (e, t) => {
3593
3593
  switch (t.$refStrategy) {
3594
3594
  case "root": return { $ref: e.path.join("/") };
3595
- case "relative": return { $ref: _r(t.currentPath, e.path) };
3595
+ case "relative": return { $ref: gr(t.currentPath, e.path) };
3596
3596
  case "none":
3597
- case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), K()) : t.$refStrategy === "seen" ? K() : void 0;
3597
+ case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), q()) : t.$refStrategy === "seen" ? q() : void 0;
3598
3598
  }
3599
- }, yr = (e, t, n) => (e.description && (n.description = e.description), n), br = (e) => {
3600
- let t = kn(e), n = t.name === void 0 ? t.basePath : [
3599
+ }, vr = (e, t, n) => (e.description && (n.description = e.description), n), yr = (e) => {
3600
+ let t = On(e), n = t.name === void 0 ? t.basePath : [
3601
3601
  ...t.basePath,
3602
3602
  t.definitionPath,
3603
3603
  t.name
@@ -3616,25 +3616,25 @@ var vr = (e, t) => {
3616
3616
  jsonSchema: void 0
3617
3617
  }]))
3618
3618
  };
3619
- }, xr = (e, t) => {
3620
- let n = br(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
3619
+ }, br = (e, t) => {
3620
+ let n = yr(t), r = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce((e, [t, r]) => ({
3621
3621
  ...e,
3622
- [t]: X(r._def, {
3622
+ [t]: Z(r._def, {
3623
3623
  ...n,
3624
3624
  currentPath: [
3625
3625
  ...n.basePath,
3626
3626
  n.definitionPath,
3627
3627
  t
3628
3628
  ]
3629
- }, !0) ?? K()
3630
- }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = X(e._def, i === void 0 ? n : {
3629
+ }, !0) ?? q()
3630
+ }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = Z(e._def, i === void 0 ? n : {
3631
3631
  ...n,
3632
3632
  currentPath: [
3633
3633
  ...n.basePath,
3634
3634
  n.definitionPath,
3635
3635
  i
3636
3636
  ]
3637
- }, !1) ?? K(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
3637
+ }, !1) ?? q(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
3638
3638
  o !== void 0 && (a.title = o);
3639
3639
  let s = i === void 0 ? r ? {
3640
3640
  ...a,
@@ -3651,14 +3651,14 @@ var vr = (e, t) => {
3651
3651
  }
3652
3652
  };
3653
3653
  return s.$schema = "http://json-schema.org/draft-07/schema#", s;
3654
- }, Sr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
3655
- function Cr(e) {
3654
+ }, xr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
3655
+ function Sr(e) {
3656
3656
  let t;
3657
3657
  return () => (t ??= e(), t);
3658
3658
  }
3659
- function wr(e, { validate: t } = {}) {
3659
+ function Cr(e, { validate: t } = {}) {
3660
3660
  return {
3661
- [Sr]: !0,
3661
+ [xr]: !0,
3662
3662
  _type: void 0,
3663
3663
  get jsonSchema() {
3664
3664
  return typeof e == "function" && (e = e()), e;
@@ -3666,33 +3666,33 @@ function wr(e, { validate: t } = {}) {
3666
3666
  validate: t
3667
3667
  };
3668
3668
  }
3669
- function Tr(e) {
3670
- return typeof e == "object" && !!e && Sr in e && e[Sr] === !0 && "jsonSchema" in e && "validate" in e;
3669
+ function wr(e) {
3670
+ return typeof e == "object" && !!e && xr in e && e[xr] === !0 && "jsonSchema" in e && "validate" in e;
3671
3671
  }
3672
- function Er(e) {
3673
- return e == null ? wr({
3672
+ function Tr(e) {
3673
+ return e == null ? Cr({
3674
3674
  properties: {},
3675
3675
  additionalProperties: !1
3676
- }) : Tr(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? jr(e) : Dr(e) : e();
3676
+ }) : wr(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Ar(e) : Er(e) : e();
3677
3677
  }
3678
- function Dr(e) {
3679
- return wr(() => Tn(e["~standard"].jsonSchema.input({ target: "draft-07" })), { validate: async (t) => {
3678
+ function Er(e) {
3679
+ return Cr(() => wn(e["~standard"].jsonSchema.input({ target: "draft-07" })), { validate: async (t) => {
3680
3680
  let n = await e["~standard"].validate(t);
3681
3681
  return "value" in n ? {
3682
3682
  success: !0,
3683
3683
  value: n.value
3684
3684
  } : {
3685
3685
  success: !1,
3686
- error: new Be({
3686
+ error: new Ve({
3687
3687
  value: t,
3688
3688
  cause: n.issues
3689
3689
  })
3690
3690
  };
3691
3691
  } });
3692
3692
  }
3693
- function Or(e, t) {
3693
+ function Dr(e, t) {
3694
3694
  let n = t?.useReferences ?? !1;
3695
- return wr(() => xr(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
3695
+ return Cr(() => br(e, { $refStrategy: n ? "root" : "none" }), { validate: async (t) => {
3696
3696
  let n = await e.safeParseAsync(t);
3697
3697
  return n.success ? {
3698
3698
  success: !0,
@@ -3703,9 +3703,9 @@ function Or(e, t) {
3703
3703
  };
3704
3704
  } });
3705
3705
  }
3706
- function kr(t, n) {
3706
+ function Or(t, n) {
3707
3707
  let r = n?.useReferences ?? !1;
3708
- return wr(() => Tn(ee(t, {
3708
+ return Cr(() => wn(ee(t, {
3709
3709
  target: "draft-7",
3710
3710
  io: "input",
3711
3711
  reused: r ? "ref" : "inline"
@@ -3720,27 +3720,27 @@ function kr(t, n) {
3720
3720
  };
3721
3721
  } });
3722
3722
  }
3723
- function Ar(e) {
3723
+ function kr(e) {
3724
3724
  return "_zod" in e;
3725
3725
  }
3726
- function jr(e, t) {
3727
- return Ar(e) ? kr(e, t) : Or(e, t);
3726
+ function Ar(e, t) {
3727
+ return kr(e) ? Or(e, t) : Dr(e, t);
3728
3728
  }
3729
- async function Mr({ value: e, schema: t, context: n }) {
3730
- let r = await Nr({
3729
+ async function jr({ value: e, schema: t, context: n }) {
3730
+ let r = await Mr({
3731
3731
  value: e,
3732
3732
  schema: t,
3733
3733
  context: n
3734
3734
  });
3735
- if (!r.success) throw Be.wrap({
3735
+ if (!r.success) throw Ve.wrap({
3736
3736
  value: e,
3737
3737
  cause: r.error,
3738
3738
  context: n
3739
3739
  });
3740
3740
  return r.value;
3741
3741
  }
3742
- async function Nr({ value: e, schema: t, context: n }) {
3743
- let r = Er(t);
3742
+ async function Mr({ value: e, schema: t, context: n }) {
3743
+ let r = Tr(t);
3744
3744
  try {
3745
3745
  if (r.validate == null) return {
3746
3746
  success: !0,
@@ -3754,7 +3754,7 @@ async function Nr({ value: e, schema: t, context: n }) {
3754
3754
  rawValue: e
3755
3755
  } : {
3756
3756
  success: !1,
3757
- error: Be.wrap({
3757
+ error: Ve.wrap({
3758
3758
  value: e,
3759
3759
  cause: t.error,
3760
3760
  context: n
@@ -3764,7 +3764,7 @@ async function Nr({ value: e, schema: t, context: n }) {
3764
3764
  } catch (t) {
3765
3765
  return {
3766
3766
  success: !1,
3767
- error: Be.wrap({
3767
+ error: Ve.wrap({
3768
3768
  value: e,
3769
3769
  cause: t,
3770
3770
  context: n
@@ -3773,21 +3773,21 @@ async function Nr({ value: e, schema: t, context: n }) {
3773
3773
  };
3774
3774
  }
3775
3775
  }
3776
- async function Pr({ text: e, schema: t }) {
3776
+ async function Nr({ text: e, schema: t }) {
3777
3777
  try {
3778
- let n = wn(e);
3778
+ let n = Cn(e);
3779
3779
  return t == null ? {
3780
3780
  success: !0,
3781
3781
  value: n,
3782
3782
  rawValue: n
3783
- } : await Nr({
3783
+ } : await Mr({
3784
3784
  value: n,
3785
3785
  schema: t
3786
3786
  });
3787
3787
  } catch (t) {
3788
3788
  return {
3789
3789
  success: !1,
3790
- error: N.isInstance(t) ? t : new N({
3790
+ error: M.isInstance(t) ? t : new M({
3791
3791
  text: e,
3792
3792
  cause: t
3793
3793
  }),
@@ -3795,15 +3795,15 @@ async function Pr({ text: e, schema: t }) {
3795
3795
  };
3796
3796
  }
3797
3797
  }
3798
- function Fr({ stream: e, schema: t }) {
3799
- return e.pipeThrough(new TextDecoderStream()).pipeThrough(new mn()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
3800
- e !== "[DONE]" && n.enqueue(await Pr({
3798
+ function Pr({ stream: e, schema: t }) {
3799
+ return e.pipeThrough(new TextDecoderStream()).pipeThrough(new pn()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
3800
+ e !== "[DONE]" && n.enqueue(await Nr({
3801
3801
  text: e,
3802
3802
  schema: t
3803
3803
  }));
3804
3804
  } }));
3805
3805
  }
3806
- async function Z(e) {
3806
+ async function Fr(e) {
3807
3807
  return typeof e == "function" && (e = e()), Promise.resolve(e);
3808
3808
  }
3809
3809
  //#endregion
@@ -4230,11 +4230,11 @@ async function si(e) {
4230
4230
  value: void 0,
4231
4231
  state: "undefined-input"
4232
4232
  };
4233
- let t = await Pr({ text: e });
4233
+ let t = await Nr({ text: e });
4234
4234
  return t.success ? {
4235
4235
  value: t.value,
4236
4236
  state: "successful-parse"
4237
- } : (t = await Pr({ text: oi(e) }), t.success ? {
4237
+ } : (t = await Nr({ text: oi(e) }), t.success ? {
4238
4238
  value: t.value,
4239
4239
  state: "repaired-parse"
4240
4240
  } : {
@@ -4253,17 +4253,17 @@ var ci = () => ({
4253
4253
  },
4254
4254
  createElementStreamTransform() {}
4255
4255
  }), li = ({ schema: e, name: t, description: n }) => {
4256
- let r = Er(e);
4256
+ let r = Tr(e);
4257
4257
  return {
4258
4258
  name: "object",
4259
- responseFormat: Z(r.jsonSchema).then((e) => ({
4259
+ responseFormat: Fr(r.jsonSchema).then((e) => ({
4260
4260
  type: "json",
4261
4261
  schema: e,
4262
4262
  ...t != null && { name: t },
4263
4263
  ...n != null && { description: n }
4264
4264
  })),
4265
4265
  async parseCompleteOutput({ text: e }, t) {
4266
- let n = await Pr({ text: e });
4266
+ let n = await Nr({ text: e });
4267
4267
  if (!n.success) throw new Hr({
4268
4268
  message: "No object generated: could not parse the response.",
4269
4269
  cause: n.error,
@@ -4272,7 +4272,7 @@ var ci = () => ({
4272
4272
  usage: t.usage,
4273
4273
  finishReason: t.finishReason
4274
4274
  });
4275
- let i = await Nr({
4275
+ let i = await Mr({
4276
4276
  value: n.value,
4277
4277
  schema: r
4278
4278
  });
@@ -4298,10 +4298,10 @@ var ci = () => ({
4298
4298
  createElementStreamTransform() {}
4299
4299
  };
4300
4300
  }, ui = ({ element: e, name: t, description: n }) => {
4301
- let r = Er(e);
4301
+ let r = Tr(e);
4302
4302
  return {
4303
4303
  name: "array",
4304
- responseFormat: Z(r.jsonSchema).then((e) => {
4304
+ responseFormat: Fr(r.jsonSchema).then((e) => {
4305
4305
  let { $schema: r, ...i } = e;
4306
4306
  return {
4307
4307
  type: "json",
@@ -4320,7 +4320,7 @@ var ci = () => ({
4320
4320
  };
4321
4321
  }),
4322
4322
  async parseCompleteOutput({ text: e }, t) {
4323
- let n = await Pr({ text: e });
4323
+ let n = await Nr({ text: e });
4324
4324
  if (!n.success) throw new Hr({
4325
4325
  message: "No object generated: could not parse the response.",
4326
4326
  cause: n.error,
@@ -4332,7 +4332,7 @@ var ci = () => ({
4332
4332
  let i = n.value;
4333
4333
  if (typeof i != "object" || !i || !("elements" in i) || !Array.isArray(i.elements)) throw new Hr({
4334
4334
  message: "No object generated: response did not match schema.",
4335
- cause: new Be({
4335
+ cause: new Ve({
4336
4336
  value: i,
4337
4337
  cause: "response must be an object with an elements array"
4338
4338
  }),
@@ -4342,7 +4342,7 @@ var ci = () => ({
4342
4342
  finishReason: t.finishReason
4343
4343
  });
4344
4344
  for (let n of i.elements) {
4345
- let i = await Nr({
4345
+ let i = await Mr({
4346
4346
  value: n,
4347
4347
  schema: r
4348
4348
  });
@@ -4368,7 +4368,7 @@ var ci = () => ({
4368
4368
  if (typeof e != "object" || !e || !("elements" in e) || !Array.isArray(e.elements)) return;
4369
4369
  let n = t.state === "repaired-parse" && e.elements.length > 0 ? e.elements.slice(0, -1) : e.elements, i = [];
4370
4370
  for (let e of n) {
4371
- let t = await Nr({
4371
+ let t = await Mr({
4372
4372
  value: e,
4373
4373
  schema: r
4374
4374
  });
@@ -4403,7 +4403,7 @@ var ci = () => ({
4403
4403
  ...n != null && { description: n }
4404
4404
  }),
4405
4405
  async parseCompleteOutput({ text: t }, n) {
4406
- let r = await Pr({ text: t });
4406
+ let r = await Nr({ text: t });
4407
4407
  if (!r.success) throw new Hr({
4408
4408
  message: "No object generated: could not parse the response.",
4409
4409
  cause: r.error,
@@ -4415,7 +4415,7 @@ var ci = () => ({
4415
4415
  let i = r.value;
4416
4416
  if (typeof i != "object" || !i || !("result" in i) || typeof i.result != "string" || !e.includes(i.result)) throw new Hr({
4417
4417
  message: "No object generated: response did not match schema.",
4418
- cause: new Be({
4418
+ cause: new Ve({
4419
4419
  value: i,
4420
4420
  cause: "response must be an object that contains a choice value."
4421
4421
  }),
@@ -4449,7 +4449,7 @@ var ci = () => ({
4449
4449
  ...t != null && { description: t }
4450
4450
  }),
4451
4451
  async parseCompleteOutput({ text: e }, t) {
4452
- let n = await Pr({ text: e });
4452
+ let n = await Nr({ text: e });
4453
4453
  if (!n.success) throw new Hr({
4454
4454
  message: "No object generated: could not parse the response.",
4455
4455
  cause: n.error,
@@ -4471,11 +4471,11 @@ var ci = () => ({
4471
4471
  },
4472
4472
  createElementStreamTransform() {}
4473
4473
  });
4474
- _n({
4474
+ gn({
4475
4475
  prefix: "aitxt",
4476
4476
  size: 24
4477
4477
  }), TransformStream;
4478
- var pi = o(h(), Yr.optional()), mi = Cr(() => jr(g([
4478
+ var pi = o(h(), Yr.optional()), mi = Sr(() => Ar(g([
4479
4479
  t({
4480
4480
  type: a("text-start"),
4481
4481
  id: h(),
@@ -4726,7 +4726,7 @@ function xi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
4726
4726
  async function f(e) {
4727
4727
  if (e != null) {
4728
4728
  let n = r.message.metadata == null ? e : ai(r.message.metadata, e);
4729
- t != null && await Mr({
4729
+ t != null && await jr({
4730
4730
  value: n,
4731
4731
  schema: t,
4732
4732
  context: {
@@ -5009,7 +5009,7 @@ function xi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
5009
5009
  default: if (hi(e)) {
5010
5010
  if (n?.[e.type] != null) {
5011
5011
  let t = r.message.parts.findIndex((t) => "id" in t && "data" in t && t.id === e.id && t.type === e.type), i = t >= 0 ? t : r.message.parts.length;
5012
- await Mr({
5012
+ await jr({
5013
5013
  value: e.data,
5014
5014
  schema: n[e.type],
5015
5015
  context: {
@@ -5045,10 +5045,10 @@ async function Si({ stream: e, onError: t }) {
5045
5045
  n.releaseLock();
5046
5046
  }
5047
5047
  }
5048
- _n({
5048
+ gn({
5049
5049
  prefix: "aitxt",
5050
5050
  size: 24
5051
- }), o(h(), Yr.optional()), _n({
5051
+ }), o(h(), Yr.optional()), gn({
5052
5052
  prefix: "aiobj",
5053
5053
  size: 24
5054
5054
  });
@@ -5074,7 +5074,7 @@ var Ci = class {
5074
5074
  });
5075
5075
  }
5076
5076
  };
5077
- _n({
5077
+ gn({
5078
5078
  prefix: "aiobj",
5079
5079
  size: 24
5080
5080
  });
@@ -5101,9 +5101,9 @@ var Ti = class {
5101
5101
  this.api = e, this.credentials = t, this.headers = n, this.body = r, this.fetch = i, this.prepareSendMessagesRequest = a, this.prepareReconnectToStreamRequest = o;
5102
5102
  }
5103
5103
  async sendMessages({ abortSignal: e, ...t }) {
5104
- let n = await Z(this.body), r = await Z(this.headers), i = await Z(this.credentials), a = {
5105
- ...yn(r),
5106
- ...yn(t.headers)
5104
+ let n = await Fr(this.body), r = await Fr(this.headers), i = await Fr(this.credentials), a = {
5105
+ ...vn(r),
5106
+ ...vn(t.headers)
5107
5107
  }, o = await this.prepareSendMessagesRequest?.call(this, {
5108
5108
  api: this.api,
5109
5109
  id: t.chatId,
@@ -5117,7 +5117,7 @@ var Ti = class {
5117
5117
  requestMetadata: t.metadata,
5118
5118
  trigger: t.trigger,
5119
5119
  messageId: t.messageId
5120
- }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : yn(o.headers), l = o?.body === void 0 ? {
5120
+ }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : vn(o.headers), l = o?.body === void 0 ? {
5121
5121
  ...n,
5122
5122
  ...t.body,
5123
5123
  id: t.chatId,
@@ -5139,9 +5139,9 @@ var Ti = class {
5139
5139
  return this.processResponseStream(d.body);
5140
5140
  }
5141
5141
  async reconnectToStream(e) {
5142
- let t = await Z(this.body), n = await Z(this.headers), r = await Z(this.credentials), i = {
5143
- ...yn(n),
5144
- ...yn(e.headers)
5142
+ let t = await Fr(this.body), n = await Fr(this.headers), r = await Fr(this.credentials), i = {
5143
+ ...vn(n),
5144
+ ...vn(e.headers)
5145
5145
  }, a = await this.prepareReconnectToStreamRequest?.call(this, {
5146
5146
  api: this.api,
5147
5147
  id: e.chatId,
@@ -5152,7 +5152,7 @@ var Ti = class {
5152
5152
  headers: i,
5153
5153
  credentials: r,
5154
5154
  requestMetadata: e.metadata
5155
- }), o = a?.api ?? `${this.api}/${e.chatId}/stream`, s = a?.headers === void 0 ? i : yn(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
5155
+ }), o = a?.api ?? `${this.api}/${e.chatId}/stream`, s = a?.headers === void 0 ? i : vn(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
5156
5156
  method: "GET",
5157
5157
  headers: s,
5158
5158
  credentials: c
@@ -5167,7 +5167,7 @@ var Ti = class {
5167
5167
  super(e);
5168
5168
  }
5169
5169
  processResponseStream(e) {
5170
- return Fr({
5170
+ return Pr({
5171
5171
  stream: e,
5172
5172
  schema: mi
5173
5173
  }).pipeThrough(new TransformStream({ async transform(e, t) {
@@ -5176,7 +5176,7 @@ var Ti = class {
5176
5176
  } }));
5177
5177
  }
5178
5178
  }, Di = class {
5179
- constructor({ generateId: e = vn, id: t = e(), transport: n = new Ei(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u }) {
5179
+ constructor({ generateId: e = _n, id: t = e(), transport: n = new Ei(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u }) {
5180
5180
  this.activeResponse = void 0, this.jobExecutor = new Ci(), this.sendMessage = async (e, t) => {
5181
5181
  if (e == null) {
5182
5182
  await this.makeRequest({
@@ -5969,7 +5969,7 @@ function ma(e) {
5969
5969
  onError: ve,
5970
5970
  onFinish: () => {
5971
5971
  let e = T.value;
5972
- !C.value && !k.value.some((t) => t.id === e) && Ie(o.value);
5972
+ !C.value && !k.value.some((t) => t.id === e) && Le(o.value);
5973
5973
  }
5974
5974
  })), be = S(() => {
5975
5975
  let e = u.value?.initialMessage;
@@ -6004,8 +6004,8 @@ function ma(e) {
6004
6004
  }), Ce = S(() => {
6005
6005
  let e = u.value?.messagePlaceholder;
6006
6006
  return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
6007
- }), k = w([]), we = w(!1), A = w([]), Te = w(!1), Ee = w("chat"), j = w([]), De = w(), Oe = w(!1), ke = w(!1), Ae = w(), je = w(!1), Me = w(!1), Ne = w(), Pe = w(""), M = w([]), N = w(""), Fe = w(0);
6008
- async function Ie(e) {
6007
+ }), k = w([]), we = w(!1), A = w([]), Te = w(!1), Ee = w("chat"), De = w([]), Oe = w(), ke = w(!1), Ae = w(!1), je = w(), Me = w(!1), Ne = w(!1), Pe = w(), Fe = w(""), j = w([]), M = w(""), Ie = w(0);
6008
+ async function Le(e) {
6009
6009
  if (C.value) {
6010
6010
  k.value = [];
6011
6011
  return;
@@ -6019,7 +6019,7 @@ function ma(e) {
6019
6019
  we.value = !1;
6020
6020
  }
6021
6021
  }
6022
- async function Le() {
6022
+ async function Re() {
6023
6023
  let e = T.value;
6024
6024
  if (!e) {
6025
6025
  A.value = [];
@@ -6034,13 +6034,16 @@ function ma(e) {
6034
6034
  Te.value = !1;
6035
6035
  }
6036
6036
  }
6037
- function Re(e, t = !1) {
6037
+ function ze(e, t = !1) {
6038
6038
  return D.value.getChatFileDownloadUrl(e, t);
6039
6039
  }
6040
- async function ze(e) {
6040
+ function Be(e) {
6041
+ return D.value.getChatFilePreviewUrl(e);
6042
+ }
6043
+ async function Ve(e) {
6041
6044
  await D.value.deleteChatFile(e), A.value = A.value.filter((t) => t.documentId !== e);
6042
6045
  }
6043
- async function Be(e, t) {
6046
+ async function He(e, t) {
6044
6047
  if (C.value) {
6045
6048
  O.value.messages = [];
6046
6049
  return;
@@ -6052,47 +6055,47 @@ function ma(e) {
6052
6055
  O.value.messages = [];
6053
6056
  }
6054
6057
  }
6055
- async function Ve(e) {
6058
+ async function Ue(e) {
6056
6059
  try {
6057
- j.value = await D.value.getMessageFeedbacks(e);
6060
+ De.value = await D.value.getMessageFeedbacks(e);
6058
6061
  } catch {
6059
- j.value = [];
6062
+ De.value = [];
6060
6063
  }
6061
6064
  }
6062
- function He(e) {
6063
- let t = j.value.findIndex((t) => t.messageId === e.messageId);
6064
- t >= 0 ? j.value[t] = e : j.value.push(e);
6065
+ function We(e) {
6066
+ let t = De.value.findIndex((t) => t.messageId === e.messageId);
6067
+ t >= 0 ? De.value[t] = e : De.value.push(e);
6065
6068
  }
6066
- function Ue(e) {
6069
+ function Ge(e) {
6067
6070
  let t = Se.value, n = t.findIndex((t) => t.id === e.id), r = re(e) ?? "";
6068
6071
  return {
6069
6072
  userQuestion: re(t.slice(0, n).reverse().find((e) => e.role === "user") ?? e) ?? "",
6070
6073
  assistantMessage: r
6071
6074
  };
6072
6075
  }
6073
- async function We(e, t) {
6076
+ async function N(e, t) {
6074
6077
  await Promise.all([
6075
- Be(e, t),
6076
- Ie(e),
6077
- Ve(t)
6078
+ He(e, t),
6079
+ Le(e),
6080
+ Ue(t)
6078
6081
  ]), ye.value || ie((e, t) => D.value.reverseGeocode(e, t, r.value)).then((e) => {
6079
6082
  e && (ye.value = e);
6080
6083
  });
6081
6084
  }
6082
6085
  async function P() {
6083
- let e = Pe.value.trim(), t = M.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
6086
+ let e = Fe.value.trim(), t = j.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
6084
6087
  type: "file",
6085
6088
  mediaType: e.mediaSource.mimeType,
6086
6089
  url: e.localUrl,
6087
6090
  filename: e.mediaSource.name,
6088
6091
  providerMetadata: { "8bot": { media: e.mediaSource } }
6089
6092
  }));
6090
- C.value && Se.value.length > 0 && await L(), N.value = e, Fe.value = O.value.messages.length;
6093
+ C.value && Se.value.length > 0 && await qe(), M.value = e, Ie.value = O.value.messages.length;
6091
6094
  let n = O.value.sendMessage;
6092
6095
  n({
6093
6096
  text: e,
6094
6097
  files: t.length > 0 ? t : void 0
6095
- }), Pe.value = "", Ge();
6098
+ }), Fe.value = "", I();
6096
6099
  }
6097
6100
  function F(e) {
6098
6101
  let t = e.trim();
@@ -6104,24 +6107,24 @@ function ma(e) {
6104
6107
  let n = O.value.sendMessage;
6105
6108
  n({ text: t });
6106
6109
  }
6107
- async function I() {
6108
- let e = N.value.length > 0;
6109
- await O.value.stop(), e && (Pe.value = N.value, O.value.messages = O.value.messages.slice(0, Fe.value), N.value = "");
6110
+ async function Ke() {
6111
+ let e = M.value.length > 0;
6112
+ await O.value.stop(), e && (Fe.value = M.value, O.value.messages = O.value.messages.slice(0, Ie.value), M.value = "");
6110
6113
  }
6111
6114
  de(() => O.value.status, (e) => {
6112
- e === "ready" && N.value.length > 0 && (N.value = "");
6115
+ e === "ready" && M.value.length > 0 && (M.value = "");
6113
6116
  });
6114
- function Ge(e = !1) {
6115
- for (let t of M.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
6116
- M.value = [];
6117
+ function I(e = !1) {
6118
+ for (let t of j.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
6119
+ j.value = [], B.value = null;
6117
6120
  }
6118
- async function L() {
6119
- return N.value = "", await I(), T.value = Bi(), O.value.clearError(), he.value = void 0, E.value = !1, Ge(!0), $e("chat"), T.value;
6121
+ async function qe() {
6122
+ return M.value = "", await Ke(), T.value = Bi(), O.value.clearError(), he.value = void 0, E.value = !1, I(!0), ct("chat"), T.value;
6120
6123
  }
6121
- async function Ke(e) {
6122
- O.value.status !== "ready" && (N.value = "", await I()), await O.value.regenerate(e);
6124
+ async function Je(e) {
6125
+ O.value.status !== "ready" && (M.value = "", await Ke()), await O.value.regenerate(e);
6123
6126
  }
6124
- function qe(e) {
6127
+ function Ye(e) {
6125
6128
  if (e.tool === "requestGeolocation") {
6126
6129
  let t = e.output;
6127
6130
  "latitude" in t && (ye.value = {
@@ -6133,33 +6136,49 @@ function ma(e) {
6133
6136
  }
6134
6137
  O.value.addToolOutput(e);
6135
6138
  }
6136
- async function Je(e) {
6139
+ let Xe = S(() => O.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), L = S(() => g.value?.maxFilesPerMessage ?? 5), R = S(() => g.value?.maxFilesPerChat ?? 20), Ze = S(() => Math.max(0, Math.min(L.value - j.value.length, R.value - Xe.value - j.value.length))), z = S(() => Ze.value <= 0), B = w(null), Qe = () => {
6140
+ B.value = null;
6141
+ };
6142
+ de(z, (e) => {
6143
+ e || (B.value = null);
6144
+ });
6145
+ async function $e(e) {
6146
+ if (z.value) {
6147
+ B.value = R.value - Xe.value - j.value.length <= L.value - j.value.length ? {
6148
+ reason: "per-chat",
6149
+ max: R.value
6150
+ } : {
6151
+ reason: "per-message",
6152
+ max: L.value
6153
+ };
6154
+ return;
6155
+ }
6137
6156
  let t = Bi(), n = {
6138
6157
  id: t,
6139
6158
  file: e,
6140
6159
  localUrl: URL.createObjectURL(e),
6141
6160
  state: "uploading"
6142
6161
  };
6143
- M.value = [...M.value, n];
6162
+ j.value = [...j.value, n];
6144
6163
  try {
6145
6164
  let n = await D.value.uploadMedia(o.value, T.value, e);
6146
- M.value = M.value.map((e) => e.id === t ? {
6165
+ j.value = j.value.map((e) => e.id === t ? {
6147
6166
  ...e,
6148
6167
  state: "done",
6149
6168
  mediaSource: n
6150
6169
  } : e);
6151
6170
  } catch (e) {
6152
6171
  let n = e instanceof Error ? e.message : "Upload failed";
6153
- M.value = M.value.map((e) => e.id === t ? {
6172
+ j.value = j.value.map((e) => e.id === t ? {
6154
6173
  ...e,
6155
6174
  state: "error",
6156
6175
  error: n
6157
6176
  } : e);
6158
6177
  }
6159
6178
  }
6160
- async function Ye(e, t) {
6161
- let { userQuestion: n, assistantMessage: r } = Ue(e);
6162
- He(await D.value.submitMessageFeedback({
6179
+ async function et(e, t) {
6180
+ let { userQuestion: n, assistantMessage: r } = Ge(e);
6181
+ We(await D.value.submitMessageFeedback({
6163
6182
  messageId: e.id,
6164
6183
  chatId: T.value,
6165
6184
  agentId: o.value,
@@ -6168,57 +6187,57 @@ function ma(e) {
6168
6187
  assistantMessage: r
6169
6188
  }));
6170
6189
  }
6171
- async function R(e) {
6172
- await Ye(e, "upvote");
6190
+ async function tt(e) {
6191
+ await et(e, "upvote");
6173
6192
  }
6174
- async function z(e) {
6175
- await Ye(e, "downvote");
6193
+ async function nt(e) {
6194
+ await et(e, "downvote");
6176
6195
  }
6177
- function Xe(e) {
6178
- ke.value = !1, Ae.value = void 0, De.value = e;
6196
+ function rt(e) {
6197
+ Ae.value = !1, je.value = void 0, Oe.value = e;
6179
6198
  }
6180
- async function B(e) {
6181
- if (De.value) try {
6182
- Oe.value = !0, ke.value = !1, Ae.value = void 0;
6183
- let { userQuestion: t, assistantMessage: n } = Ue(De.value);
6184
- He(await D.value.submitMessageFeedback({
6185
- messageId: De.value.id,
6199
+ async function it(e) {
6200
+ if (Oe.value) try {
6201
+ ke.value = !0, Ae.value = !1, je.value = void 0;
6202
+ let { userQuestion: t, assistantMessage: n } = Ge(Oe.value);
6203
+ We(await D.value.submitMessageFeedback({
6204
+ messageId: Oe.value.id,
6186
6205
  chatId: T.value,
6187
6206
  agentId: o.value,
6188
6207
  userQuestion: t,
6189
6208
  assistantMessage: n,
6190
6209
  comment: e
6191
- })), ke.value = !0, await Ve(T.value);
6210
+ })), Ae.value = !0, await Ue(T.value);
6192
6211
  } catch {
6193
- Ae.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
6212
+ je.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
6194
6213
  } finally {
6195
- Oe.value = !1;
6214
+ ke.value = !1;
6196
6215
  }
6197
6216
  }
6198
- async function V(e) {
6217
+ async function at(e) {
6199
6218
  try {
6200
- Me.value = !0, je.value = !1, Ne.value = void 0, await D.value.submitLead({
6219
+ Ne.value = !0, Me.value = !1, Pe.value = void 0, await D.value.submitLead({
6201
6220
  agentId: o.value,
6202
6221
  chatId: T.value,
6203
6222
  ...e
6204
- }), je.value = !0;
6223
+ }), Me.value = !0;
6205
6224
  } catch {
6206
- Ne.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
6225
+ Pe.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
6207
6226
  } finally {
6208
- Me.value = !1;
6227
+ Ne.value = !1;
6209
6228
  }
6210
6229
  }
6211
- async function Ze(e, t) {
6230
+ async function ot(e, t) {
6212
6231
  let n = await D.value.updateChatTitle(o.value, e, t);
6213
6232
  k.value = k.value.map((t) => t.id === e ? {
6214
6233
  ...t,
6215
6234
  title: n.title
6216
6235
  } : t);
6217
6236
  }
6218
- async function Qe(e) {
6219
- await D.value.deleteChat(o.value, e), k.value = k.value.filter((t) => t.id !== e), T.value === e && await L();
6237
+ async function st(e) {
6238
+ await D.value.deleteChat(o.value, e), k.value = k.value.filter((t) => t.id !== e), T.value === e && await qe();
6220
6239
  }
6221
- function $e(e) {
6240
+ function ct(e) {
6222
6241
  Ee.value = e;
6223
6242
  }
6224
6243
  return {
@@ -6250,46 +6269,50 @@ function ma(e) {
6250
6269
  isLoadingConversations: we,
6251
6270
  chatFiles: A,
6252
6271
  isLoadingChatFiles: Te,
6253
- input: Pe,
6254
- pendingAttachments: M,
6272
+ input: Fe,
6273
+ pendingAttachments: j,
6274
+ isAttachmentLimitReached: z,
6275
+ fileLimitError: B,
6255
6276
  localChatId: T,
6256
6277
  isConversationBlocked: E,
6257
6278
  inputMessagePlaceholder: Ce,
6258
6279
  chatError: he,
6259
6280
  activeView: Ee,
6260
- messageFeedbacks: j,
6261
- feedbackDialogMessage: De,
6262
- isFeedbackSubmitting: Oe,
6263
- isFeedbackSubmitted: ke,
6264
- feedbackSubmitError: Ae,
6265
- isLeadSubmitted: je,
6266
- isLoadingSubmitLead: Me,
6267
- submitLeadError: Ne,
6268
- initialize: We,
6269
- loadConversations: Ie,
6270
- loadChatFiles: Le,
6271
- getChatFileUrl: Re,
6272
- deleteChatFile: ze,
6281
+ messageFeedbacks: De,
6282
+ feedbackDialogMessage: Oe,
6283
+ isFeedbackSubmitting: ke,
6284
+ isFeedbackSubmitted: Ae,
6285
+ feedbackSubmitError: je,
6286
+ isLeadSubmitted: Me,
6287
+ isLoadingSubmitLead: Ne,
6288
+ submitLeadError: Pe,
6289
+ initialize: N,
6290
+ loadConversations: Le,
6291
+ loadChatFiles: Re,
6292
+ getChatFileUrl: ze,
6293
+ getChatFilePreviewUrl: Be,
6294
+ deleteChatFile: Ve,
6273
6295
  handleSubmit: P,
6274
6296
  sendMessage: F,
6275
- stopGeneration: I,
6276
- startNewChat: L,
6277
- regenerate: Ke,
6278
- addToolOutput: qe,
6279
- handleFileSelect: Je,
6280
- clearPendingAttachments: Ge,
6281
- onUpvote: R,
6282
- onDownvote: z,
6283
- onFeedback: Xe,
6284
- onFeedbackSubmit: B,
6285
- onLeadSubmit: V,
6286
- navigate: $e,
6287
- renameChatTitle: Ze,
6288
- deleteChat: Qe
6297
+ stopGeneration: Ke,
6298
+ startNewChat: qe,
6299
+ regenerate: Je,
6300
+ addToolOutput: Ye,
6301
+ handleFileSelect: $e,
6302
+ clearFileLimitError: Qe,
6303
+ clearPendingAttachments: I,
6304
+ onUpvote: tt,
6305
+ onDownvote: nt,
6306
+ onFeedback: rt,
6307
+ onFeedbackSubmit: it,
6308
+ onLeadSubmit: at,
6309
+ navigate: ct,
6310
+ renameChatTitle: ot,
6311
+ deleteChat: st
6289
6312
  };
6290
6313
  })();
6291
6314
  }
6292
6315
  //#endregion
6293
- export { G as a, N as c, O as d, xe as f, mn as i, Be as l, da as n, A as o, Bi as r, Ae as s, ma as t, ye as u };
6316
+ export { K as a, M as c, O as d, xe as f, pn as i, Ve as l, da as n, A as o, Bi as r, je as s, ma as t, ye as u };
6294
6317
 
6295
- //# sourceMappingURL=useChatbotStore-GEO6rQ74.js.map
6318
+ //# sourceMappingURL=useChatbotStore-WPRS7mhR.js.map