@agimon-ai/po-cloudflare 0.0.2-alpha.7 → 0.0.2-alpha.71

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 (355) hide show
  1. package/README.md +64 -241
  2. package/container/Dockerfile +27 -0
  3. package/dist/{BrowserWebSocketTransport-C2SC2VeJ.js → BrowserWebSocketTransport-B4heNdrp.js} +1 -1
  4. package/dist/{NodeWebSocketTransport-CKilJesa.js → NodeWebSocketTransport-BCiOXUEz.js} +2 -2
  5. package/dist/{abort-signals-Bkmp_euQ.js → abort-signals-C8CttjsR.js} +1 -1
  6. package/dist/agent-CEqvgRl6.js +3878 -0
  7. package/dist/{anthropic-messages-CkYm8M3V.js → anthropic-messages-DCLLLNuM.js} +292 -64
  8. package/dist/apiContracts-DaOpUHnu.js +1719 -0
  9. package/dist/{approval-CQ3ZuoTy.js → approval-DXPV7Vm5.js} +15 -2
  10. package/dist/{approvalPrompt-CylV3C84.js → approvalPrompt-CBaxjb_g.js} +1 -2
  11. package/dist/approvalSession-C9bg7tPo.js +132 -0
  12. package/dist/artifactFiles-5KwXIxYf.js +1 -0
  13. package/dist/artifactsApi-bg2wMYWg.js +200 -0
  14. package/dist/assets/assets/{CodeEditorView-D4q94XH-.js → CodeEditorView-CfrVwzvL.js} +2 -2
  15. package/dist/assets/assets/{abnfDiagram-WEYOIA3C-C85p4OYZ.js → abnfDiagram-WEYOIA3C-B80H4Cm4.js} +2 -2
  16. package/dist/assets/assets/{architecture-WOLXFQ4H-Bt_NOdwE.js → architecture-WOLXFQ4H-Dr4hXaql.js} +1 -1
  17. package/dist/assets/assets/{architectureDiagram-ZHVYKT53-DzH1GKMm.js → architectureDiagram-ZHVYKT53-DWyt7oXu.js} +2 -2
  18. package/dist/assets/assets/{blockDiagram-RJAE7QA3-BmWU34j3.js → blockDiagram-RJAE7QA3-OxNTLdmi.js} +2 -2
  19. package/dist/assets/assets/{c4Diagram-XDPPPE54-BpGOdOuo.js → c4Diagram-XDPPPE54-B4YtcH0s.js} +2 -2
  20. package/dist/assets/assets/channel-bXj00dGj.js +2 -0
  21. package/dist/assets/assets/{chunk-2E7WHVMD-AycP1cXU.js → chunk-2E7WHVMD-CD6FFMOX.js} +2 -2
  22. package/dist/assets/assets/{chunk-4EMNKR2T-DX-DrZzc.js → chunk-4EMNKR2T-CEIoX5oo.js} +2 -2
  23. package/dist/assets/assets/{chunk-55XCU76K-BdwnLWzI.js → chunk-55XCU76K-CD3t0IJi.js} +2 -2
  24. package/dist/assets/assets/{chunk-7S6XSTFO-D-RBAwAn.js → chunk-7S6XSTFO-Cyt75UCF.js} +2 -2
  25. package/dist/assets/assets/{chunk-AQDTSKZB-CCxNNhKs.js → chunk-AQDTSKZB-DRtqYBj9.js} +2 -2
  26. package/dist/assets/assets/{chunk-DSNLSHJZ-D2hGwWm1.js → chunk-DSNLSHJZ-C8Fx2F8s.js} +2 -2
  27. package/dist/assets/assets/{chunk-HAGFOTED-BPi-cqGh.js → chunk-HAGFOTED-wOLWRRnd.js} +2 -2
  28. package/dist/assets/assets/{chunk-HNE4Q36P-D-r1ChHT.js → chunk-HNE4Q36P-CurJg4Hf.js} +2 -2
  29. package/dist/assets/assets/{chunk-NQOKRVIF-RgmZCAdn.js → chunk-NQOKRVIF-Dzcc5nOG.js} +2 -2
  30. package/dist/assets/assets/{chunk-UHW7PFBP-B-Hul-rZ.js → chunk-UHW7PFBP-B_ULFf2h.js} +2 -2
  31. package/dist/assets/assets/{chunk-VQ5W62QI-D1zlXCt8.js → chunk-VQ5W62QI-DH0VY4_p.js} +2 -2
  32. package/dist/assets/assets/{chunk-WQQL4CDK-CtjIbVJn.js → chunk-WQQL4CDK-DNxfLyXM.js} +2 -2
  33. package/dist/assets/assets/chunk-XXDRQBXY-B2bMWgN9.js +2 -0
  34. package/dist/assets/assets/{chunk-YZO67HFG-BQOgXG99.js → chunk-YZO67HFG-COuMUh9U.js} +2 -2
  35. package/dist/assets/assets/{chunk-ZAUX2LTX-CsDDxmqv.js → chunk-ZAUX2LTX-BJrCnubF.js} +2 -2
  36. package/dist/assets/assets/{chunk-ZCHMQSOR-deyEYMjx.js → chunk-ZCHMQSOR-D1lFKPtk.js} +2 -2
  37. package/dist/assets/assets/{classDiagram-v2-4MYWR3UA-DVJHeFlq.js → classDiagram-v2-4MYWR3UA-DfZIbyVL.js} +2 -2
  38. package/dist/assets/assets/{cose-bilkent-JH36ORCC-ipcN28Fw.js → cose-bilkent-JH36ORCC-CpGhv9_S.js} +2 -2
  39. package/dist/assets/assets/{cynefin-EF2NZ3EQ-s9ZkPF55.js → cynefin-EF2NZ3EQ-Cxdc6nQl.js} +1 -1
  40. package/dist/assets/assets/{cynefinDiagram-WF24UDRP-Ksr2qjsS.js → cynefinDiagram-WF24UDRP-qoj0w3lp.js} +2 -2
  41. package/dist/assets/assets/{dagre-NK4GIZVX-2_Wl-XEW.js → dagre-NK4GIZVX-DL6QbNDS.js} +2 -2
  42. package/dist/assets/assets/{diagram-CBK3MWTC-C7PeyT7l.js → diagram-CBK3MWTC-CJB3jq1_.js} +2 -2
  43. package/dist/assets/assets/{diagram-I5XIIV2D-DPYzeKdj.js → diagram-I5XIIV2D-4cPOxCxF.js} +2 -2
  44. package/dist/assets/assets/{diagram-ODIL2UCW-DHw1cAmn.js → diagram-ODIL2UCW-BG3-jAxE.js} +2 -2
  45. package/dist/assets/assets/{diagram-PFBEJUXE-C2wA8i-1.js → diagram-PFBEJUXE-Bx8dFaXj.js} +2 -2
  46. package/dist/assets/assets/{diagram-RJA3I4VV-tM3moCIs.js → diagram-RJA3I4VV-CUUHND91.js} +2 -2
  47. package/dist/assets/assets/{diagram-TYUNFSNR-CInyJxF7.js → diagram-TYUNFSNR-BDMoN-kr.js} +2 -2
  48. package/dist/assets/assets/{dist-BDqjNLTC.js → dist-5AxNm-uy.js} +2 -2
  49. package/dist/assets/assets/{dist-hpZIQBl4.js → dist-9_Rmyj2I.js} +2 -2
  50. package/dist/assets/assets/{dist-DSLprmec.js → dist-BE3CLKv4.js} +2 -2
  51. package/dist/assets/assets/{dist-BASEd5LC.js → dist-BfNCu-7x.js} +2 -2
  52. package/dist/assets/assets/{dist-BuYBvf4F.js → dist-BjI0b36Z.js} +2 -2
  53. package/dist/assets/assets/{dist-DUS0U_ge.js → dist-CM7b5P9a.js} +2 -2
  54. package/dist/assets/assets/{dist-CeOy6PjJ.js → dist-Ccxb9U1G.js} +2 -2
  55. package/dist/assets/assets/{dist-ChXoRSS6.js → dist-CjCWP21A.js} +2 -2
  56. package/dist/assets/assets/{dist-07dRlnp1.js → dist-DSTAktnR.js} +2 -2
  57. package/dist/assets/assets/{ebnfDiagram-V4P3TTPT-4nZgqaSt.js → ebnfDiagram-V4P3TTPT-BivOMXZb.js} +2 -2
  58. package/dist/assets/assets/{elk-QONTBCTQ-nFh54c1Q.js → elk-QONTBCTQ-CrJ1Qpy_.js} +2 -2
  59. package/dist/assets/assets/{erDiagram-KYQIGQAA-CIQ0_IgZ.js → erDiagram-KYQIGQAA-w9Bqp4sV.js} +2 -2
  60. package/dist/assets/assets/{eventmodeling-K75KTNOO-Cw4BlbYP.js → eventmodeling-K75KTNOO-CBjFM3kV.js} +1 -1
  61. package/dist/assets/assets/flowDiagram-IUGLLWBU-C6Fnfgm0.js +1 -0
  62. package/dist/assets/assets/{ganttDiagram-R7GPNTJY-C97qoUpX.js → ganttDiagram-R7GPNTJY-CsWtGaqD.js} +2 -2
  63. package/dist/assets/assets/{gitGraph-VSP46ZUC-B8HWVkEX.js → gitGraph-VSP46ZUC-DsBSV9_h.js} +1 -1
  64. package/dist/assets/assets/{gitGraphDiagram-PDYL7XHY-B4Js56_8.js → gitGraphDiagram-PDYL7XHY-D5GxuYHW.js} +2 -2
  65. package/dist/assets/assets/index-CNDyKUDF.css +1 -0
  66. package/dist/assets/assets/index-DWDYnZsq.js +256 -0
  67. package/dist/assets/assets/{info-OHQRW6UA-A4qythhA.js → info-OHQRW6UA-C7x5dSJu.js} +1 -1
  68. package/dist/assets/assets/{infoDiagram-MVDRKAX5-BSNwG9yI.js → infoDiagram-MVDRKAX5-CwpI-uAa.js} +2 -2
  69. package/dist/assets/assets/{ishikawaDiagram-HPEHV2GE-D4gU-3RA.js → ishikawaDiagram-HPEHV2GE-DAa7J5G6.js} +2 -2
  70. package/dist/assets/assets/{journeyDiagram-BOSHW7O7-CxxDrw7o.js → journeyDiagram-BOSHW7O7-BmiZnxE_.js} +2 -2
  71. package/dist/assets/assets/{kanban-definition-FNSA4HC5-DUxQv3v0.js → kanban-definition-FNSA4HC5-DUR_mA3L.js} +2 -2
  72. package/dist/assets/assets/{line-BKODXUmk.js → line-DHY49wSg.js} +2 -2
  73. package/dist/assets/assets/{linear-Cm5uyUun.js → linear-pTo-a9xT.js} +2 -2
  74. package/dist/assets/assets/{mermaid-parser.core-CYst2kCg.js → mermaid-parser.core-DMg3hN3T.js} +4 -4
  75. package/dist/assets/assets/{mermaid.core-B4Qq8SMa.js → mermaid.core-DKtPCltA.js} +5 -5
  76. package/dist/assets/assets/{mindmap-definition-6OY57UG3-CZFvUTIM.js → mindmap-definition-6OY57UG3-DwTkFbnV.js} +2 -2
  77. package/dist/assets/assets/{packet-JDAUHWVQ-DZMlaiuy.js → packet-JDAUHWVQ-Tu9TrQ1x.js} +1 -1
  78. package/dist/assets/assets/{pegDiagram-ECIUJNBX-BjM668dT.js → pegDiagram-ECIUJNBX-B7My4tsz.js} +2 -2
  79. package/dist/assets/assets/{pie-XZMESJXO-CmpJ6vb8.js → pie-XZMESJXO-QPQm5Gdx.js} +1 -1
  80. package/dist/assets/assets/{pieDiagram-GNMPY74T-BCA9DCDe.js → pieDiagram-GNMPY74T-Bv-zAD_z.js} +2 -2
  81. package/dist/assets/assets/{quadrantDiagram-D57K4MC3-CUnpC-Rl.js → quadrantDiagram-D57K4MC3-HTjoGQPd.js} +2 -2
  82. package/dist/assets/assets/{radar-ABXABTNO-C9x42-KP.js → radar-ABXABTNO-LDBlEoFo.js} +1 -1
  83. package/dist/assets/assets/{railroad-I3PHUGI6-CLvHKrsC.js → railroad-I3PHUGI6-Dy3_ymgZ.js} +1 -1
  84. package/dist/assets/assets/{railroad-abnf-LNEFI6M7-B0LGF3gx.js → railroad-abnf-LNEFI6M7-QLVvYs6e.js} +1 -1
  85. package/dist/assets/assets/{railroad-ebnf-DWYD2UWJ-SKnYapAj.js → railroad-ebnf-DWYD2UWJ-CFRlv9a8.js} +1 -1
  86. package/dist/assets/assets/{railroad-peg-JR7BVNR7-wsUpPloN.js → railroad-peg-JR7BVNR7-BOlq3d9c.js} +1 -1
  87. package/dist/assets/assets/{railroadDiagram-Y72NRBL7-BYJtosKO.js → railroadDiagram-Y72NRBL7-Chg32HoU.js} +2 -2
  88. package/dist/assets/assets/{requirementDiagram-EQYSW5RA-YYdoWMnl.js → requirementDiagram-EQYSW5RA-VenIs_eg.js} +2 -2
  89. package/dist/assets/assets/{sankeyDiagram-SY24JHO5-DtZyCTdM.js → sankeyDiagram-SY24JHO5-BdByqMKF.js} +2 -2
  90. package/dist/assets/assets/{sequenceDiagram-BLEHNHQU-BPE8f413.js → sequenceDiagram-BLEHNHQU-D3Do4GJE.js} +2 -2
  91. package/dist/assets/assets/{src-BNTOLq2G.js → src-DmfN-DA-.js} +2 -2
  92. package/dist/assets/assets/{stateDiagram-v2-A6IESKWZ-9f8Ow4Fl.js → stateDiagram-v2-A6IESKWZ-CZkRbPlf.js} +2 -2
  93. package/dist/assets/assets/{swimlanes-B3ENRKFQ-DdAEbxGp.js → swimlanes-B3ENRKFQ-DRTdF9AF.js} +2 -2
  94. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-BYr_4JUb.js +9 -0
  95. package/dist/assets/assets/{timeline-definition-JXYKGLGB-DJNGd2mU.js → timeline-definition-JXYKGLGB-BVcuws_M.js} +2 -2
  96. package/dist/assets/assets/{treeView-D4JQ5SDB-BHONoCCw.js → treeView-D4JQ5SDB-BLtOJGqO.js} +1 -1
  97. package/dist/assets/assets/{treemap-SAJKECNS-pOaYkxq7.js → treemap-SAJKECNS-Dn3BWJ4v.js} +1 -1
  98. package/dist/assets/assets/{usecaseDiagram-WPOLBNNX-C3eDYL9v.js → usecaseDiagram-WPOLBNNX-CBExIKDY.js} +2 -2
  99. package/dist/assets/assets/{vennDiagram-Q3Y3IDCW-CJi1xfsR.js → vennDiagram-Q3Y3IDCW-C6FIx2L4.js} +2 -2
  100. package/dist/assets/assets/{wardley-7MLQ67FV-CEy4w7Ir.js → wardley-7MLQ67FV-Cjj2xSBp.js} +1 -1
  101. package/dist/assets/assets/{wardleyDiagram-IVAIDKWA-DfdLMMpN.js → wardleyDiagram-IVAIDKWA-sQPCBCFK.js} +2 -2
  102. package/dist/assets/assets/{webpack-v8XGbQTa.js → webpack-DDCA0aDL.js} +2 -2
  103. package/dist/assets/assets/{xychartDiagram-4URNHDU4-Aw-Ix4uC.js → xychartDiagram-4URNHDU4-bZ4rifSw.js} +2 -2
  104. package/dist/assets/bundle-asset-policy.json +1 -1
  105. package/dist/assets/index.html +8 -2
  106. package/dist/assets/mascot/cta-provider.png +0 -0
  107. package/dist/assets/mascot/cta-sign-in.png +0 -0
  108. package/dist/assets/plugins/assets/base-GzIOAd-t.css +2 -0
  109. package/dist/assets/plugins/assets/browserCaptureWorklet-Droj0fW0-Droj0fW0.js +13 -0
  110. package/dist/assets/plugins/assets/day-bottom-left-5um-x02r-5um-x02r.webp +0 -0
  111. package/dist/assets/plugins/assets/day-grain-CvEuNhlI-CvEuNhlI.webp +0 -0
  112. package/dist/assets/plugins/assets/day-right-C9W-XtjV-C9W-XtjV.webp +0 -0
  113. package/dist/assets/plugins/assets/day-top-left-B544Eq9J-B544Eq9J.webp +0 -0
  114. package/dist/assets/plugins/assets/night-bottom-left-N03ST5Uz-N03ST5Uz.webp +0 -0
  115. package/dist/assets/plugins/assets/night-grain-BY9q-tNN-BY9q-tNN.webp +0 -0
  116. package/dist/assets/plugins/assets/night-right-C6Denrqj-C6Denrqj.webp +0 -0
  117. package/dist/assets/plugins/assets/night-top-left-KOou6UxY-KOou6UxY.webp +0 -0
  118. package/dist/assets/plugins/assets/sileroVadWorker-D894njUe-DjN_BMWf.mjs +110 -0
  119. package/dist/assets/plugins/assets/silero_vad_v6.2.1-SjbCxFXk-SjbCxFXk.onnx +0 -0
  120. package/dist/assets/plugins/chunks/po-web-runtime-D8FIos2q.js +1 -0
  121. package/dist/assets/plugins/chunks/schemas-DVQ8BvvP.js +55 -0
  122. package/dist/assets/plugins/compositions.json +1 -1
  123. package/dist/assets/plugins/slots/approval.09e72f36-DxS_uibk.js +2 -0
  124. package/dist/assets/plugins/slots/artifacts.50b639bb-Cp37TAkd.js +1 -0
  125. package/dist/assets/plugins/slots/author.ea449ace-Ds9Y-tjN.js +93 -0
  126. package/dist/assets/plugins/slots/autocompact.6f428144-CDZpN7I7.js +1 -0
  127. package/dist/assets/plugins/slots/backdrop-bamboo.6e4c928d-qbifuMc6.js +1 -0
  128. package/dist/assets/plugins/slots/browse.fa1f1a50-CVYvo1M5.js +1 -0
  129. package/dist/assets/plugins/slots/builtin-tools.75108f21-Cq1ljoL-.js +7 -0
  130. package/dist/assets/plugins/slots/calendar.d8b70190-BBjpOs1v.js +2 -0
  131. package/dist/assets/plugins/slots/codemode.c58fb583-DOR6OR7R.js +11 -0
  132. package/dist/assets/plugins/slots/domain.753f9f92-CJrXxig9.js +1 -0
  133. package/dist/assets/plugins/slots/edit.804fec90-BFF7_xN9.js +7 -0
  134. package/dist/assets/plugins/slots/files.66ffc636-CzOlZrRm.js +2 -0
  135. package/dist/assets/plugins/slots/goal.45dffa01-BtQBp3sw.js +1 -0
  136. package/dist/assets/plugins/slots/grep.98262cff-9bUDfjyT.js +1 -0
  137. package/dist/assets/plugins/slots/help.5fbd20f7-B4-y6gYK.js +3 -0
  138. package/dist/assets/plugins/slots/log.cb964209-BRPa3cVs.js +4 -0
  139. package/dist/assets/plugins/slots/mcp.82cc1ff5-CFtzPkPC.js +55 -0
  140. package/dist/assets/plugins/slots/plan.3852ba52-CH59Ff49.js +3 -0
  141. package/dist/assets/plugins/slots/profile.ab16dcec-0e9fWWyE.js +1 -0
  142. package/dist/assets/plugins/slots/prompts.ae48c07a-BTqYnBX5.js +38 -0
  143. package/dist/assets/plugins/slots/read.4560591a-C7fMXDEH.js +1 -0
  144. package/dist/assets/plugins/slots/runner.6e494d59-CqrpqhW9.js +9 -0
  145. package/dist/assets/plugins/slots/scaffold.d87a6ee0-9qY5gkYW.js +1 -0
  146. package/dist/assets/plugins/slots/session-mcp.2be84084-Cf0cqopp.js +2 -0
  147. package/dist/assets/plugins/slots/sessions.6f47cb4c-B1_eqPJQ.js +1 -0
  148. package/dist/assets/plugins/slots/skill.62a0a1b3-D-SKX8iw.js +4 -0
  149. package/dist/assets/plugins/slots/space.65a27e5a-fbLHc-DX.js +1 -0
  150. package/dist/assets/plugins/slots/subagents.8bb9992c-Cm_YMEnn.js +7 -0
  151. package/dist/assets/plugins/slots/template-advanced.59f3f98a-L0WOM4JT.js +1 -0
  152. package/dist/assets/plugins/slots/template-desktop.0f0b8491-By9BZlaL.js +7 -0
  153. package/dist/assets/plugins/slots/template-elegant.0e3b0acf-El05x7HK.js +1 -0
  154. package/dist/assets/plugins/slots/vault.3cbfcdc3-DpU_65Wy.js +1 -0
  155. package/dist/assets/plugins/slots/voice.a952113d-CvcuL__m.js +1 -0
  156. package/dist/assets/plugins/slots/web-search.65013836-NVh9fdvE.js +1 -0
  157. package/dist/assets/plugins/slots/workflows.cbc5c5c0-OLKSY9PE.js +16 -0
  158. package/dist/assets/pwa/pwa.js +12 -12
  159. package/dist/assets/pwa/sw.js +58 -4
  160. package/dist/{atomicJson-wczZBXQP.js → atomicJson-XYtxz032.js} +2 -3
  161. package/dist/{azure-openai-config-DHMgdIa-.js → azure-openai-config-S-quxzTC.js} +2 -2
  162. package/dist/{azure-openai-responses-CTgRdQ4m.js → azure-openai-responses-DdpV5zh7.js} +13 -13
  163. package/dist/backgroundWork-Bv0ib_lY.js +49 -0
  164. package/dist/{layeredConfig-xmTHGrw8.js → browser-DwY5dXHX.js} +21 -983
  165. package/dist/{browser-EJ5_ffnN.js → browser-IsHIcvFg.js} +1 -1
  166. package/dist/browser-ks_k-6KA.js +36 -0
  167. package/dist/calendarSetup-CI3AACVo.js +3892 -0
  168. package/dist/childProcess-Cv8rJuUf.js +32 -0
  169. package/dist/childSession-BrDCrNtL.js +25 -0
  170. package/dist/{classifier-shared-jXm-plIK.js → classifier-shared-DFprgrML.js} +5 -5
  171. package/dist/{cloudflare-workers-ai-system-one-B0wH6HU5.js → cloudflare-workers-ai-system-one-B0MD19yZ.js} +3 -3
  172. package/dist/{codemode-CFVDmyGm.js → codemode-LpcMFMYM.js} +1 -1
  173. package/dist/coerce-DM9YrILC.js +13 -0
  174. package/dist/config-DeWkdjj7.js +1372 -0
  175. package/dist/contextContributions-C1bsEJef.js +13 -0
  176. package/dist/contracts-CW8o6Xyi.js +19 -0
  177. package/dist/contracts-WRa9e98H.js +40 -0
  178. package/dist/cordisHost-_-jtkneB.js +25 -0
  179. package/dist/delegation-B2rBgv8A.js +100 -0
  180. package/dist/{diagnostics-DPTP-yrt.js → diagnostics-BY5LXbHJ.js} +2 -2
  181. package/dist/{dist-BVBi6VMV.js → dist-B2ArMqge.js} +1 -1
  182. package/dist/{server-Cg07O2W6.js → dist-C6IqjC-m.js} +1 -546
  183. package/dist/{dist-PDDFdqDX.js → dist-CDz5dYMj.js} +1 -1
  184. package/dist/{dist-Dvx5mlIR.js → dist-kgi2Ix1y.js} +16 -3
  185. package/dist/{emscripten-module.cloudflare-D4Bc9Ykz.js → emscripten-module.cloudflare-B4fhfquU.js} +1 -1
  186. package/dist/{env-api-keys-CAnjjnsR.js → env-api-keys-BgCPpU9t.js} +1 -1
  187. package/dist/{error-body-DQZRsyL5.js → error-body-CeumezyR.js} +26 -4
  188. package/dist/esm-BKJy3O9-.js +1553 -0
  189. package/dist/{remoteMcp-DqE2xFWS.js → exports-BEEgtkya.js} +1588 -714
  190. package/dist/{exports-LjvSY7Y6.js → exports-CBp_9dVk.js} +47 -28
  191. package/dist/exports-CRjRvvX0.js +34 -0
  192. package/dist/exports-Cg0wxflf.js +1 -0
  193. package/dist/exports-Ct56PRB9.js +46 -0
  194. package/dist/extensionFile-B940JOEn.js +121 -0
  195. package/dist/{factory-Cs8iaUtc.js → factory-BU0cZY0I.js} +1 -1
  196. package/dist/{github-copilot-headers-DpQQAh-s.js → github-copilot-headers-Cq9pnpl2.js} +1 -1
  197. package/dist/{google-generative-ai-BTTOo5RQ.js → google-generative-ai-DmbUlCGv.js} +9 -9
  198. package/dist/{google-shared-S7bqOccz.js → google-shared-Diz2uk39.js} +6 -6
  199. package/dist/{google-vertex-BcMU_DMb.js → google-vertex-CGCpI9Po.js} +10 -10
  200. package/dist/{domains-B6Ae4swm.js → harnessState-Df--jB5z.js} +162 -42
  201. package/dist/{harnessStore-Ccbia9_u.js → harnessStore-DInwiLYb.js} +4 -5
  202. package/dist/{hash-B3RRpLS2.js → hash-IQBoLxOB.js} +1 -1
  203. package/dist/{headers-BEuxFxDI.js → headers-Dkgiqogr.js} +1 -1
  204. package/dist/help-C9UGKetC.js +100 -0
  205. package/dist/home-kwZFHqOx.js +60 -0
  206. package/dist/http-BekstF5S.js +64 -0
  207. package/dist/hubChannel-Dldv3EEb.js +32 -0
  208. package/dist/hubRevisions-BPoC6quI.js +364 -0
  209. package/dist/{identity-BIeAyilV.js → identity-BzB1N-Sn.js} +3 -3
  210. package/dist/index.edge-BiVQ9LoZ.js +198 -0
  211. package/dist/index.edge-CSGx6QOL.js +56 -0
  212. package/dist/index.edge-ClLTmPFz.js +191 -0
  213. package/dist/index.edge-CzoLWbyl.js +238 -0
  214. package/dist/index.edge-D1biKw71.js +946 -0
  215. package/dist/index.edge-D2RirEwK.js +14 -0
  216. package/dist/iso-BGFmgtky.js +27 -0
  217. package/dist/{kysely-adapter-D51abb3q.js → kysely-adapter-D8KUrWxm.js} +1 -1
  218. package/dist/liquid.browser-1BcykmIN.js +4596 -0
  219. package/dist/manualTranscription-DN56fzgj.js +96 -0
  220. package/dist/{mcpProjection-BXiECnW0.js → mcpProjection-D2U50Pel.js} +1 -2
  221. package/dist/meta-CVgfTHQP.js +1030 -0
  222. package/dist/migrations-DJBPDwSR.js +32 -0
  223. package/dist/{mistral-conversations-DN8VSERk.js → mistral-conversations-Bv_m1MRF.js} +12 -12
  224. package/dist/modeDefinition-Di95_IiU.js +44 -0
  225. package/dist/{models-D6d73jcW.js → models-D50yN8Ag.js} +41 -46
  226. package/dist/{node-UuMT2C3q.js → node-B4kSjHeD.js} +2 -2
  227. package/dist/{node-DytJOfYf.js → node-CBLSc-YH.js} +1 -1
  228. package/dist/notification-DjxbNoMR.js +143 -0
  229. package/dist/{openai-bt3ZRBZv.js → openai-D6Q-l6hT.js} +187 -187
  230. package/dist/{openai-codex-responses-cL36x0ml.js → openai-codex-responses-BnoiTqYV.js} +21 -25
  231. package/dist/{openai-completions-BWsTNYyT.js → openai-completions-C68qs5rI.js} +26 -19
  232. package/dist/{openai-decisions-Dfn_KgQd.js → openai-decisions-BSxU_aoV.js} +3 -3
  233. package/dist/{openai-responses-aa0LoyCJ.js → openai-responses-D6hXen-k.js} +17 -15
  234. package/dist/{openai-responses-shared-H-jH5SlM.js → openai-responses-shared-BD8K7FAC.js} +7 -7
  235. package/dist/{openrouter-cost-D99Qqcs6.js → openrouter-cost-BPam8wyW.js} +1 -1
  236. package/dist/{openrouter-images-BpwVpALC.js → openrouter-images-DylXiHy7.js} +7 -7
  237. package/dist/{hubChannel-Dn5NMpvu.js → packageApi-DYkaxP59.js} +33 -42
  238. package/dist/photon_rs_bg.wasm +0 -0
  239. package/dist/{pi-messages-BHAIkYBj.js → pi-messages-DaIlYYlO.js} +6 -6
  240. package/dist/piConfig-5tRPD0ov.js +126 -0
  241. package/dist/piSettings-ekBG5OeF.js +1 -0
  242. package/dist/platform-CQahdzpG.js +138 -0
  243. package/dist/pluginCatalog-BAALyedS.js +30 -0
  244. package/dist/pluginContributions-Be9EnCAW.js +16 -0
  245. package/dist/pluginProtocol-7_gVUeM9.js +1 -0
  246. package/dist/pluginProtocol-DVIfJnav.js +135 -0
  247. package/dist/portableConfig-0tnk9anb.js +49 -0
  248. package/dist/presetConfig-n-oiNd3h.js +541 -0
  249. package/dist/profileSources-D1rymC97.js +537 -0
  250. package/dist/{protocol-DUeE0Q8z.js → protocol-Cri0GpZR.js} +1 -2
  251. package/dist/{provider-env-DgfpjgTa.js → provider-env-DJb40UF7.js} +2 -2
  252. package/dist/{provider-retry-ChD-K2Gv.js → provider-retry-jpvs7ixx.js} +1 -1
  253. package/dist/{puppeteer-cloudflare-B-GHrPGO.js → puppeteer-cloudflare-D4l8smMS.js} +3 -3
  254. package/dist/{server-BWJmxCrm.js → readiness-Ydw5zrKy.js} +4 -169
  255. package/dist/{rolldown-runtime-B-lAHAz2.js → rolldown-runtime-DbVrKiKs.js} +1 -1
  256. package/dist/{sanitize-unicode-Dl4ROF7y.js → sanitize-unicode-B1ZFaEtf.js} +1 -1
  257. package/dist/scaffoldRegistry-CeFe3Pf0.js +1240 -0
  258. package/dist/{schemas-Vj8-rCR4.js → schemas-D2dRon18.js} +1901 -53
  259. package/dist/server-AKM07WcM.js +466 -0
  260. package/dist/server-B0tM5Ygf.js +1300 -0
  261. package/dist/server-B8-vStCx.js +1116 -0
  262. package/dist/server-BAbdiL38.js +15108 -0
  263. package/dist/server-BCZ_R3kX.js +3326 -0
  264. package/dist/server-BGKAeB3M.js +492 -0
  265. package/dist/server-BIQhg1jS.js +26985 -0
  266. package/dist/server-BcPD_6a2.js +1533 -0
  267. package/dist/server-BeoA0QB-.js +580 -0
  268. package/dist/server-BsgvOpBF.js +24 -0
  269. package/dist/server-BtnOqSB5.js +156 -0
  270. package/dist/server-C-HBjWRo.js +2800 -0
  271. package/dist/{server-CWg0m_wq.js → server-C0Lt6nTt.js} +269 -1062
  272. package/dist/server-C8NPfG1H.js +148 -0
  273. package/dist/server-CKkaxOc0.js +978 -0
  274. package/dist/server-CMaWF5UA.js +1379 -0
  275. package/dist/server-CQPI6jIa.js +295 -0
  276. package/dist/{server-BhYE7Vqk.js → server-CQmb0lYL.js} +114 -176
  277. package/dist/server-CWR34Vx6.js +1884 -0
  278. package/dist/server-CZiAy2v5.js +641 -0
  279. package/dist/server-Cjtr0oVJ.js +584 -0
  280. package/dist/server-CkJQJ3Oo.js +571 -0
  281. package/dist/server-ClQQGtsI.js +679 -0
  282. package/dist/server-Cy2FhGBm.js +1744 -0
  283. package/dist/server-D8yEblCB.js +24 -0
  284. package/dist/server-DF0YIUeI.js +9603 -0
  285. package/dist/server-DRFESCq1.js +1527 -0
  286. package/dist/{server-zkcrP99W.js → server-Df1defzp.js} +89 -87
  287. package/dist/server-DgZd_TuT.js +189 -0
  288. package/dist/server-Dkc9Kth2.js +1830 -0
  289. package/dist/server-DlRePYOB.js +343 -0
  290. package/dist/{server-BpPEzRes.js → server-_HZm8wEC.js} +654 -745
  291. package/dist/{server-yABhJa2K.js → server-_jWkMESg.js} +60 -39
  292. package/dist/server-lgV6liTt.js +140 -0
  293. package/dist/server-nHPXbRDA.js +742 -0
  294. package/dist/server-p7qANgrf.js +877 -0
  295. package/dist/server-vhmQi3co.js +112 -0
  296. package/dist/{server-SA0dsIJ2.js → server-w1aKMZOs.js} +3 -10
  297. package/dist/serverPlugin-4nI5J6Zt.js +39622 -0
  298. package/dist/session-resources-BvR3cwiH.js +10 -0
  299. package/dist/{sessionConfig-DgnPcGBu.js → sessionConfig-UMlgu98q.js} +926 -844
  300. package/dist/{simple-options-DWrW31_K.js → simple-options-Cp5p46f9.js} +13 -6
  301. package/dist/space-C3Wnli1l.js +92 -0
  302. package/dist/sse-XlzXs1es.js +151 -0
  303. package/dist/{streaming-json-t4rzNHEp.js → streaming-json-CZyrX_Ux.js} +6 -6
  304. package/dist/{system-one-shared-DLVLdzYL.js → system-one-shared-Du6bka0h.js} +3 -3
  305. package/dist/{notification-valMY1zH.js → telemetry-CrTcxeA5.js} +2 -93
  306. package/dist/{transform-messages-CjTSwW9q.js → transform-messages-CBj9g2mx.js} +3 -16
  307. package/dist/truncate-M3KbFyVj.js +89 -0
  308. package/dist/{server-BXjfQYeU.js → type-DppaYz6F.js} +955 -1187
  309. package/dist/type-yokaDI_F.js +7 -0
  310. package/dist/{typesafe-system-one-DBVcjcUQ.js → typesafe-system-one-C7YFgvrX.js} +3 -3
  311. package/dist/{uuid-mkNGilLv.js → uuid-BVI0BZsx.js} +1 -1
  312. package/dist/{validation-BLnxgJU_.js → validation-QWuk6kwJ.js} +79 -74
  313. package/dist/vaultSettings-Bq8wkbDv.js +292 -0
  314. package/dist/voiceTools-BdJyfzwB.js +246 -0
  315. package/dist/web-B2sdV-F2.js +4 -0
  316. package/dist/worker.js +97821 -72579
  317. package/dist/workflow-DTCt4n6k.js +171 -0
  318. package/dist/workflowServices-RlswfHWp.js +300 -0
  319. package/package.json +55 -25
  320. package/wrangler.jsonc +16 -3
  321. package/dist/apiContracts-sG5b90Qa.js +0 -4451
  322. package/dist/assets/assets/channel-BOT7In0s.js +0 -2
  323. package/dist/assets/assets/chunk-XXDRQBXY-Dp9-QbR6.js +0 -2
  324. package/dist/assets/assets/flowDiagram-IUGLLWBU-B9D9uWwn.js +0 -1
  325. package/dist/assets/assets/index-BlPEYpuN.css +0 -1
  326. package/dist/assets/assets/index-DS9w_Q1B.js +0 -155
  327. package/dist/assets/assets/swimlanesDiagram-AYQRV4AK-CyUKtW7v.js +0 -9
  328. package/dist/assets/plugins/assets/base-DyDpY0zD.css +0 -2
  329. package/dist/assets/plugins/chunks/po-web-runtime-4JiBsb_c.js +0 -1
  330. package/dist/assets/plugins/slots/approval.09e72f36-DwFz-UMh.js +0 -2
  331. package/dist/assets/plugins/slots/artifacts.50b639bb-CUtFC806.js +0 -1
  332. package/dist/assets/plugins/slots/builtin-tools.75108f21-B69GLfY_.js +0 -7
  333. package/dist/assets/plugins/slots/codemode.c58fb583-C0Gmb7_s.js +0 -9
  334. package/dist/assets/plugins/slots/domain.753f9f92-BTBYRLkE.js +0 -1
  335. package/dist/assets/plugins/slots/mcp.82cc1ff5-Ecacjn0a.js +0 -109
  336. package/dist/assets/plugins/slots/profile.ab16dcec-DIVXNHmh.js +0 -1
  337. package/dist/assets/plugins/slots/skill.62a0a1b3-BNr7DmPH.js +0 -4
  338. package/dist/backgroundWork-CSpsJ-Rg.js +0 -25
  339. package/dist/contextProjection-DDIQRgN4.js +0 -188
  340. package/dist/extensionFile-CacKVegY.js +0 -409
  341. package/dist/harnessState-gmzJcPGt.js +0 -88
  342. package/dist/harnessStore-Ch6hdYYe.js +0 -1
  343. package/dist/index.edge-BgSx_gRO.js +0 -45
  344. package/dist/majorModes-CCnwAjfF.js +0 -333
  345. package/dist/majorModes-DNQbxkpt.js +0 -1
  346. package/dist/piSettings-B6fsgIBA.js +0 -1
  347. package/dist/platform-Bs2_X_dK.js +0 -16
  348. package/dist/platformFiles-CCGujP9o.js +0 -39
  349. package/dist/server-5hLs7M43.js +0 -656
  350. package/dist/server-B3iqBHOP.js +0 -118
  351. package/dist/server-Dv0EKLwc.js +0 -108
  352. package/dist/server-Y5A21sJf.js +0 -591
  353. package/dist/server-a1K226XK.js +0 -279
  354. package/dist/serverPlugin-DUc4gGep.js +0 -7279
  355. package/dist/value-Bd477RDX.js +0 -2247
@@ -1,3 +1,4 @@
1
+ import { n as __exportAll } from "./rolldown-runtime-DbVrKiKs.js";
1
2
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js
2
3
  function getEnumValues(entries) {
3
4
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
@@ -27,7 +28,7 @@ var Cached = class {
27
28
  function cached(getter) {
28
29
  return new Cached(getter);
29
30
  }
30
- function nullish(input) {
31
+ function nullish$1(input) {
31
32
  return input === null || input === void 0;
32
33
  }
33
34
  function cleanRegex(source) {
@@ -170,6 +171,14 @@ const propertyKeyTypes = /* @__PURE__*/ new Set([
170
171
  "number",
171
172
  "symbol"
172
173
  ]);
174
+ const primitiveTypes = /* @__PURE__*/ new Set([
175
+ "string",
176
+ "number",
177
+ "bigint",
178
+ "boolean",
179
+ "symbol",
180
+ "undefined"
181
+ ]);
173
182
  function escapeRegex(str) {
174
183
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
175
184
  }
@@ -357,6 +366,12 @@ function finalizeIssue(iss, ctx, config) {
357
366
  if (ctx?.reportInput) full.input = iss.input;
358
367
  return full;
359
368
  }
369
+ function getSizableOrigin(input) {
370
+ if (input instanceof Set) return "set";
371
+ if (input instanceof Map) return "map";
372
+ if (input instanceof File) return "file";
373
+ return "unknown";
374
+ }
360
375
  const highSurrogate = /[\uD800-\uDBFF]/;
361
376
  function codePointLength(str) {
362
377
  const units = str.length;
@@ -426,6 +441,7 @@ function hide(inst, key, value) {
426
441
  return own(inst, key, value, false);
427
442
  }
428
443
  /** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */
444
+ /* @__NO_SIDE_EFFECTS__ */
429
445
  function derived(computes, table) {
430
446
  for (const key in computes) {
431
447
  const compute = computes[key];
@@ -579,6 +595,7 @@ function newError(Definition) {
579
595
  }
580
596
  return new Definition();
581
597
  }
598
+ /* @__NO_SIDE_EFFECTS__ */
582
599
  function $constructor(name, initializer, proto, params) {
583
600
  const zodProto = {};
584
601
  function Internals(def) {
@@ -709,8 +726,8 @@ const initializer$1 = (inst, def) => {
709
726
  });
710
727
  }
711
728
  };
712
- const $ZodError = $constructor("$ZodError", initializer$1);
713
- $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
729
+ const $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer$1);
730
+ const $ZodRealError = /* @__PURE__ */ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
714
731
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
715
732
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
716
733
  * "__proto__" would hit the setter instead of creating a key. */
@@ -773,6 +790,59 @@ function formatError(error, mapper = (issue) => issue.message) {
773
790
  processError(error);
774
791
  return fieldErrors;
775
792
  }
793
+ /** Format a ZodError as a human-readable string in the following form.
794
+ *
795
+ * From
796
+ *
797
+ * ```ts
798
+ * ZodError {
799
+ * issues: [
800
+ * {
801
+ * expected: 'string',
802
+ * code: 'invalid_type',
803
+ * path: [ 'username' ],
804
+ * message: 'Invalid input: expected string'
805
+ * },
806
+ * {
807
+ * expected: 'number',
808
+ * code: 'invalid_type',
809
+ * path: [ 'favoriteNumbers', 1 ],
810
+ * message: 'Invalid input: expected number'
811
+ * }
812
+ * ];
813
+ * }
814
+ * ```
815
+ *
816
+ * to
817
+ *
818
+ * ```
819
+ * username
820
+ * ✖ Expected number, received string at "username
821
+ * favoriteNumbers[0]
822
+ * ✖ Invalid input: expected number
823
+ * ```
824
+ */
825
+ function toDotPath(_path) {
826
+ const segs = [];
827
+ const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
828
+ for (const seg of path) if (typeof seg === "number") segs.push(`[${seg}]`);
829
+ else if (typeof seg === "symbol") segs.push(`[${JSON.stringify(String(seg))}]`);
830
+ else if (/[^\w$]/.test(seg)) segs.push(`[${JSON.stringify(seg)}]`);
831
+ else {
832
+ if (segs.length) segs.push(".");
833
+ segs.push(seg);
834
+ }
835
+ return segs.join("");
836
+ }
837
+ function prettifyError(error) {
838
+ const lines = [];
839
+ const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
840
+ for (const issue of issues) {
841
+ lines.push(`✖ ${issue.message}`);
842
+ if (issue.path?.length) lines.push(` → at ${toDotPath(issue.path)}`);
843
+ }
844
+ return lines.join("\n");
845
+ }
776
846
  //#endregion
777
847
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js
778
848
  function finalizeParams(callee, params) {
@@ -801,6 +871,7 @@ const _parse = (_Err) => {
801
871
  };
802
872
  return fn;
803
873
  };
874
+ const parse$1 = /* @__PURE__*/ _parse($ZodRealError);
804
875
  const _parseAsync = (_Err) => {
805
876
  const fn = async (schema, value, _ctx, params) => {
806
877
  const ctx = _ctx ? {
@@ -821,6 +892,7 @@ const _parseAsync = (_Err) => {
821
892
  };
822
893
  return fn;
823
894
  };
895
+ const parseAsync$1 = /* @__PURE__*/ _parseAsync($ZodRealError);
824
896
  const _safeParse = (_Err) => (schema, value, _ctx) => {
825
897
  const ctx = _ctx ? {
826
898
  ..._ctx,
@@ -978,45 +1050,133 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
978
1050
  };
979
1051
  //#endregion
980
1052
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js
1053
+ var regexes_exports = /* @__PURE__ */ __exportAll({
1054
+ anyString: () => anyString,
1055
+ base64: () => base64$1,
1056
+ base64url: () => base64url$1,
1057
+ bigint: () => bigint$1,
1058
+ boolean: () => boolean$1,
1059
+ browserEmail: () => browserEmail,
1060
+ cidrv4: () => cidrv4$1,
1061
+ cidrv6: () => cidrv6$1,
1062
+ creditCard: () => creditCard$1,
1063
+ cuid: () => cuid$1,
1064
+ cuid2: () => cuid2$1,
1065
+ currencyCode: () => currencyCode$1,
1066
+ date: () => date$1,
1067
+ datetime: () => datetime,
1068
+ domain: () => domain,
1069
+ duration: () => duration,
1070
+ e164: () => e164$1,
1071
+ email: () => email$1,
1072
+ emoji: () => emoji$1,
1073
+ extendedDuration: () => extendedDuration,
1074
+ guid: () => guid$1,
1075
+ hex: () => hex$1,
1076
+ hostname: () => hostname$1,
1077
+ html5Email: () => html5Email,
1078
+ httpProtocol: () => httpProtocol,
1079
+ iban: () => iban$1,
1080
+ idnEmail: () => idnEmail,
1081
+ integer: () => integer,
1082
+ ipv4: () => ipv4$1,
1083
+ ipv6: () => ipv6$1,
1084
+ ksuid: () => ksuid$1,
1085
+ lowercase: () => lowercase,
1086
+ mac: () => mac$1,
1087
+ md5_base64: () => md5_base64,
1088
+ md5_base64url: () => md5_base64url,
1089
+ md5_hex: () => md5_hex,
1090
+ nanoid: () => nanoid$1,
1091
+ nanoidOfLength: () => nanoidOfLength,
1092
+ null: () => _null$2,
1093
+ number: () => number$1,
1094
+ rfc5322Email: () => rfc5322Email,
1095
+ sha1_base64: () => sha1_base64,
1096
+ sha1_base64url: () => sha1_base64url,
1097
+ sha1_hex: () => sha1_hex,
1098
+ sha256_base64: () => sha256_base64,
1099
+ sha256_base64url: () => sha256_base64url,
1100
+ sha256_hex: () => sha256_hex,
1101
+ sha384_base64: () => sha384_base64,
1102
+ sha384_base64url: () => sha384_base64url,
1103
+ sha384_hex: () => sha384_hex,
1104
+ sha512_base64: () => sha512_base64,
1105
+ sha512_base64url: () => sha512_base64url,
1106
+ sha512_hex: () => sha512_hex,
1107
+ string: () => string$1,
1108
+ time: () => time,
1109
+ ulid: () => ulid$1,
1110
+ undefined: () => _undefined$2,
1111
+ unicodeEmail: () => unicodeEmail,
1112
+ uppercase: () => uppercase,
1113
+ uuid: () => uuid$1,
1114
+ uuid4: () => uuid4,
1115
+ uuid6: () => uuid6,
1116
+ uuid7: () => uuid7,
1117
+ xid: () => xid$1
1118
+ });
981
1119
  /**
982
1120
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
983
1121
  * (timestamps embedded in the id). Use {@link cuid2} instead.
984
1122
  * See https://github.com/paralleldrive/cuid.
985
1123
  */
986
- const cuid = /^[cC][0-9a-z]{6,}$/;
987
- const cuid2 = /^[0-9a-z]+$/;
988
- const ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
989
- const xid = /^[0-9a-vA-V]{20}$/;
990
- const ksuid = /^[A-Za-z0-9]{27}$/;
991
- const nanoid = /^[a-zA-Z0-9_-]{21}$/;
1124
+ const cuid$1 = /^[cC][0-9a-z]{6,}$/;
1125
+ const cuid2$1 = /^[0-9a-z]+$/;
1126
+ const ulid$1 = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
1127
+ const xid$1 = /^[0-9a-vA-V]{20}$/;
1128
+ const ksuid$1 = /^[A-Za-z0-9]{27}$/;
1129
+ const nanoid$1 = /^[a-zA-Z0-9_-]{21}$/;
992
1130
  function nanoidOfLength(length) {
993
1131
  return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
994
1132
  }
995
1133
  /** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
996
1134
  const duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
1135
+ /** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
1136
+ const extendedDuration = /^[-+]?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)?)??$/;
997
1137
  /** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
998
- const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
1138
+ const guid$1 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
999
1139
  /** Returns a regex for validating an RFC 9562/4122 UUID.
1000
1140
  *
1001
1141
  * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
1002
- const uuid = (version) => {
1142
+ const uuid$1 = (version) => {
1003
1143
  if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
1004
1144
  return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1005
1145
  };
1146
+ const uuid4 = /*@__PURE__*/ uuid$1(4);
1147
+ const uuid6 = /*@__PURE__*/ uuid$1(6);
1148
+ const uuid7 = /*@__PURE__*/ uuid$1(7);
1006
1149
  /** Practical email validation */
1007
1150
  const email$1 = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
1151
+ /** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
1152
+ const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
1153
+ /** The classic emailregex.com regex for RFC 5322-compliant emails */
1154
+ const rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
1155
+ /** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
1156
+ const unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
1157
+ const idnEmail = unicodeEmail;
1158
+ const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
1008
1159
  const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
1009
- function emoji() {
1160
+ function emoji$1() {
1010
1161
  return new RegExp(_emoji$1, "u");
1011
1162
  }
1012
1163
  const ipv4$1 = /^(?:(?: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])$/;
1013
1164
  const ipv6$1 = /^(([0-9a-fA-F]{1,4}:){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}|:))$/;
1014
- const cidrv4 = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/;
1015
- const cidrv6 = /^(([0-9a-fA-F]{1,4}:){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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
1016
- const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
1017
- const base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
1165
+ const mac$1 = (delimiter) => {
1166
+ const escapedDelim = escapeRegex(delimiter ?? ":");
1167
+ return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
1168
+ };
1169
+ const cidrv4$1 = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/;
1170
+ const cidrv6$1 = /^(([0-9a-fA-F]{1,4}:){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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
1171
+ const base64$1 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
1172
+ const base64url$1 = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
1173
+ const hostname$1 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
1174
+ const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/;
1018
1175
  const httpProtocol = /^https?$/;
1019
- const e164 = /^\+[1-9]\d{6,14}$/;
1176
+ const e164$1 = /^\+[1-9]\d{6,14}$/;
1177
+ const creditCard$1 = /^\d(?:[ -]?\d){11,18}$/;
1178
+ const currencyCode$1 = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
1179
+ const iban$1 = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
1020
1180
  const dateSource = `(?:(?:\\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])))`;
1021
1181
  /** Anchors a pattern source. The interpolation lives here rather than at the call site because
1022
1182
  * esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it
@@ -1043,6 +1203,11 @@ function datetime(args) {
1043
1203
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
1044
1204
  }
1045
1205
  const anyString = /^[\s\S]{0,}$/;
1206
+ const string$1 = (params) => {
1207
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
1208
+ return new RegExp(`^${regex}$`);
1209
+ };
1210
+ const bigint$1 = /^-?\d+n?$/;
1046
1211
  const integer = /^-?\d+$/;
1047
1212
  const number$1 = /^-?\d+(?:\.\d+)?$/;
1048
1213
  const boolean$1 = /^(?:true|false)$/i;
@@ -1050,6 +1215,28 @@ const _null$2 = /^null$/i;
1050
1215
  const _undefined$2 = /^undefined$/i;
1051
1216
  const lowercase = /^[^A-Z]*$/;
1052
1217
  const uppercase = /^[^a-z]*$/;
1218
+ const hex$1 = /^[0-9a-fA-F]*$/;
1219
+ function fixedBase64(bodyLength, padding) {
1220
+ return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);
1221
+ }
1222
+ function fixedBase64url(length) {
1223
+ return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
1224
+ }
1225
+ const md5_hex = /^[0-9a-fA-F]{32}$/;
1226
+ const md5_base64 = /*@__PURE__*/ fixedBase64(22, "==");
1227
+ const md5_base64url = /*@__PURE__*/ fixedBase64url(22);
1228
+ const sha1_hex = /^[0-9a-fA-F]{40}$/;
1229
+ const sha1_base64 = /*@__PURE__*/ fixedBase64(27, "=");
1230
+ const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);
1231
+ const sha256_hex = /^[0-9a-fA-F]{64}$/;
1232
+ const sha256_base64 = /*@__PURE__*/ fixedBase64(43, "=");
1233
+ const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);
1234
+ const sha384_hex = /^[0-9a-fA-F]{96}$/;
1235
+ const sha384_base64 = /*@__PURE__*/ fixedBase64(64, "");
1236
+ const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);
1237
+ const sha512_hex = /^[0-9a-fA-F]{128}$/;
1238
+ const sha512_base64 = /*@__PURE__*/ fixedBase64(86, "==");
1239
+ const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);
1053
1240
  //#endregion
1054
1241
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js
1055
1242
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
@@ -1058,10 +1245,15 @@ const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1058
1245
  inst._zod.def = def;
1059
1246
  (_a = inst._zod).onattach ?? (_a.onattach = []);
1060
1247
  });
1248
+ /** Default `when` for size-based checks: run only on non-nullish values with a `size`. */
1249
+ const _whenHasSize = (payload) => {
1250
+ const val = payload.value;
1251
+ return !nullish$1(val) && val.size !== void 0;
1252
+ };
1061
1253
  /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
1062
1254
  const _whenHasLength = (payload) => {
1063
1255
  const val = payload.value;
1064
- return !nullish(val) && val.length !== void 0;
1256
+ return !nullish$1(val) && val.length !== void 0;
1065
1257
  };
1066
1258
  const numericOriginMap = {
1067
1259
  number: "number",
@@ -1179,6 +1371,93 @@ const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat"
1179
1371
  });
1180
1372
  };
1181
1373
  });
1374
+ const $ZodCheckBigIntFormat = /*@__PURE__*/ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
1375
+ $ZodCheck.init(inst, def);
1376
+ const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
1377
+ inst._zod.check = (payload) => {
1378
+ const input = payload.value;
1379
+ if (input < minimum) payload.issues.push({
1380
+ origin: "bigint",
1381
+ input,
1382
+ code: "too_small",
1383
+ minimum,
1384
+ inclusive: true,
1385
+ inst,
1386
+ continue: !def.abort
1387
+ });
1388
+ if (input > maximum) payload.issues.push({
1389
+ origin: "bigint",
1390
+ input,
1391
+ code: "too_big",
1392
+ maximum,
1393
+ inclusive: true,
1394
+ inst,
1395
+ continue: !def.abort
1396
+ });
1397
+ };
1398
+ });
1399
+ const $ZodCheckMaxSize = /*@__PURE__*/ $constructor("$ZodCheckMaxSize", (inst, def) => {
1400
+ var _a;
1401
+ $ZodCheck.init(inst, def);
1402
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
1403
+ inst._zod.check = (payload) => {
1404
+ const input = payload.value;
1405
+ if (input.size <= def.maximum) return;
1406
+ payload.issues.push({
1407
+ origin: getSizableOrigin(input),
1408
+ code: "too_big",
1409
+ maximum: def.maximum,
1410
+ inclusive: true,
1411
+ input,
1412
+ inst,
1413
+ continue: !def.abort
1414
+ });
1415
+ };
1416
+ });
1417
+ const $ZodCheckMinSize = /*@__PURE__*/ $constructor("$ZodCheckMinSize", (inst, def) => {
1418
+ var _a;
1419
+ $ZodCheck.init(inst, def);
1420
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
1421
+ inst._zod.check = (payload) => {
1422
+ const input = payload.value;
1423
+ if (input.size >= def.minimum) return;
1424
+ payload.issues.push({
1425
+ origin: getSizableOrigin(input),
1426
+ code: "too_small",
1427
+ minimum: def.minimum,
1428
+ inclusive: true,
1429
+ input,
1430
+ inst,
1431
+ continue: !def.abort
1432
+ });
1433
+ };
1434
+ });
1435
+ const $ZodCheckSizeEquals = /*@__PURE__*/ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1436
+ var _a;
1437
+ $ZodCheck.init(inst, def);
1438
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);
1439
+ inst._zod.check = (payload) => {
1440
+ const input = payload.value;
1441
+ const size = input.size;
1442
+ if (size === def.size) return;
1443
+ const tooBig = size > def.size;
1444
+ payload.issues.push({
1445
+ origin: getSizableOrigin(input),
1446
+ ...tooBig ? {
1447
+ code: "too_big",
1448
+ maximum: def.size
1449
+ } : {
1450
+ code: "too_small",
1451
+ minimum: def.size
1452
+ },
1453
+ inclusive: true,
1454
+ exact: true,
1455
+ input: payload.value,
1456
+ inst,
1457
+ continue: !def.abort
1458
+ });
1459
+ };
1460
+ });
1182
1461
  const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
1183
1462
  var _a;
1184
1463
  $ZodCheck.init(inst, def);
@@ -1340,6 +1619,66 @@ const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst,
1340
1619
  });
1341
1620
  };
1342
1621
  });
1622
+ function handleCheckPropertyResult(result, payload, property) {
1623
+ if (result.issues.length) payload.issues.push(...prefixIssues(property, result.issues));
1624
+ }
1625
+ const $ZodCheckProperty = /*@__PURE__*/ $constructor("$ZodCheckProperty", (inst, def) => {
1626
+ $ZodCheck.init(inst, def);
1627
+ inst._zod.check = (payload) => {
1628
+ const result = def.schema._zod.run({
1629
+ value: payload.value[def.property],
1630
+ issues: []
1631
+ }, {});
1632
+ if (result instanceof Promise) return result.then((result) => handleCheckPropertyResult(result, payload, def.property));
1633
+ handleCheckPropertyResult(result, payload, def.property);
1634
+ };
1635
+ });
1636
+ const $ZodCheckProperties = /*@__PURE__*/ $constructor("$ZodCheckProperties", (inst, def) => {
1637
+ $ZodCheck.init(inst, def);
1638
+ hide(inst, Symbol.iterator, function* () {
1639
+ yield inst;
1640
+ });
1641
+ let entries;
1642
+ inst._zod.check = (payload) => {
1643
+ if (payload.value == null) {
1644
+ payload.issues.push({
1645
+ expected: "object",
1646
+ code: "invalid_type",
1647
+ input: payload.value,
1648
+ inst
1649
+ });
1650
+ return;
1651
+ }
1652
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
1653
+ const input = payload.value;
1654
+ let proms;
1655
+ for (const [key, schema] of entries) {
1656
+ const result = schema._zod.run({
1657
+ value: input[key],
1658
+ issues: []
1659
+ }, {});
1660
+ if (result instanceof Promise) {
1661
+ proms ?? (proms = []);
1662
+ proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));
1663
+ } else handleCheckPropertyResult(result, payload, key);
1664
+ }
1665
+ if (proms) return Promise.all(proms).then(() => void 0);
1666
+ };
1667
+ });
1668
+ const $ZodCheckMimeType = /*@__PURE__*/ $constructor("$ZodCheckMimeType", (inst, def) => {
1669
+ $ZodCheck.init(inst, def);
1670
+ const mimeSet = new Set(def.mime);
1671
+ inst._zod.check = (payload) => {
1672
+ if (mimeSet.has(payload.value.type)) return;
1673
+ payload.issues.push({
1674
+ code: "invalid_value",
1675
+ values: def.mime,
1676
+ input: payload.value.type,
1677
+ inst,
1678
+ continue: !def.abort
1679
+ });
1680
+ };
1681
+ });
1343
1682
  const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
1344
1683
  $ZodCheck.init(inst, def);
1345
1684
  inst._zod.check = (payload) => {
@@ -1524,7 +1863,7 @@ const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, d
1524
1863
  $ZodString.init(inst, def);
1525
1864
  });
1526
1865
  const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
1527
- def.pattern ?? (def.pattern = guid);
1866
+ def.pattern ?? (def.pattern = guid$1);
1528
1867
  $ZodStringFormat.init(inst, def);
1529
1868
  });
1530
1869
  const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
@@ -1540,8 +1879,8 @@ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
1540
1879
  v8: 8
1541
1880
  }[def.version];
1542
1881
  if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1543
- def.pattern ?? (def.pattern = uuid(v));
1544
- } else def.pattern ?? (def.pattern = uuid());
1882
+ def.pattern ?? (def.pattern = uuid$1(v));
1883
+ } else def.pattern ?? (def.pattern = uuid$1());
1545
1884
  $ZodStringFormat.init(inst, def);
1546
1885
  });
1547
1886
  const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
@@ -1650,12 +1989,12 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1650
1989
  };
1651
1990
  });
1652
1991
  const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
1653
- def.pattern ?? (def.pattern = emoji());
1992
+ def.pattern ?? (def.pattern = emoji$1());
1654
1993
  $ZodStringFormat.init(inst, def);
1655
1994
  });
1656
1995
  const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1657
1996
  if (def.length !== void 0 && (!Number.isInteger(def.length) || def.length < 1)) throw new Error(`Invalid nanoid length: ${def.length}`);
1658
- def.pattern ?? (def.pattern = def.length === void 0 ? nanoid : nanoidOfLength(def.length));
1997
+ def.pattern ?? (def.pattern = def.length === void 0 ? nanoid$1 : nanoidOfLength(def.length));
1659
1998
  $ZodStringFormat.init(inst, def);
1660
1999
  });
1661
2000
  /**
@@ -1664,23 +2003,23 @@ const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1664
2003
  * See https://github.com/paralleldrive/cuid.
1665
2004
  */
1666
2005
  const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
1667
- def.pattern ?? (def.pattern = cuid);
2006
+ def.pattern ?? (def.pattern = cuid$1);
1668
2007
  $ZodStringFormat.init(inst, def);
1669
2008
  });
1670
2009
  const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
1671
- def.pattern ?? (def.pattern = cuid2);
2010
+ def.pattern ?? (def.pattern = cuid2$1);
1672
2011
  $ZodStringFormat.init(inst, def);
1673
2012
  });
1674
2013
  const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
1675
- def.pattern ?? (def.pattern = ulid);
2014
+ def.pattern ?? (def.pattern = ulid$1);
1676
2015
  $ZodStringFormat.init(inst, def);
1677
2016
  });
1678
2017
  const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
1679
- def.pattern ?? (def.pattern = xid);
2018
+ def.pattern ?? (def.pattern = xid$1);
1680
2019
  $ZodStringFormat.init(inst, def);
1681
2020
  });
1682
2021
  const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
1683
- def.pattern ?? (def.pattern = ksuid);
2022
+ def.pattern ?? (def.pattern = ksuid$1);
1684
2023
  $ZodStringFormat.init(inst, def);
1685
2024
  });
1686
2025
  const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
@@ -1722,8 +2061,12 @@ const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1722
2061
  });
1723
2062
  };
1724
2063
  });
2064
+ const $ZodMAC = /*@__PURE__*/ $constructor("$ZodMAC", (inst, def) => {
2065
+ def.pattern ?? (def.pattern = mac$1(def.delimiter));
2066
+ $ZodStringFormat.init(inst, def);
2067
+ });
1725
2068
  const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
1726
- def.pattern ?? (def.pattern = cidrv4);
2069
+ def.pattern ?? (def.pattern = cidrv4$1);
1727
2070
  $ZodStringFormat.init(inst, def);
1728
2071
  });
1729
2072
  function isValidCIDRv6(value) {
@@ -1737,7 +2080,7 @@ function isValidCIDRv6(value) {
1737
2080
  return isValidIPv6(address);
1738
2081
  }
1739
2082
  const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
1740
- def.pattern ?? (def.pattern = cidrv6);
2083
+ def.pattern ?? (def.pattern = cidrv6$1);
1741
2084
  $ZodStringFormat.init(inst, def);
1742
2085
  inst._zod.check = (payload) => {
1743
2086
  if (!isValidCIDRv6(payload.value)) payload.issues.push({
@@ -1796,8 +2139,81 @@ const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) =>
1796
2139
  };
1797
2140
  });
1798
2141
  const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
1799
- def.pattern ?? (def.pattern = e164);
2142
+ def.pattern ?? (def.pattern = e164$1);
2143
+ $ZodStringFormat.init(inst, def);
2144
+ });
2145
+ const CC_SANITIZE = /[- ]/g;
2146
+ /** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */
2147
+ function isLuhnAlgo(digits) {
2148
+ let length = digits.length;
2149
+ let bit = 1;
2150
+ let sum = 0;
2151
+ while (length) {
2152
+ const value = digits.charCodeAt(--length) - 48;
2153
+ bit ^= 1;
2154
+ sum += bit ? [
2155
+ 0,
2156
+ 2,
2157
+ 4,
2158
+ 6,
2159
+ 8,
2160
+ 1,
2161
+ 3,
2162
+ 5,
2163
+ 7,
2164
+ 9
2165
+ ][value] : value;
2166
+ }
2167
+ return sum % 10 === 0;
2168
+ }
2169
+ function isValidCreditCard(input) {
2170
+ if (!creditCard$1.test(input)) return false;
2171
+ return isLuhnAlgo(input.replace(CC_SANITIZE, ""));
2172
+ }
2173
+ const $ZodCreditCard = /*@__PURE__*/ $constructor("$ZodCreditCard", (inst, def) => {
2174
+ def.pattern ?? (def.pattern = creditCard$1);
2175
+ $ZodStringFormat.init(inst, def);
2176
+ inst._zod.check = (payload) => {
2177
+ if (isValidCreditCard(payload.value)) return;
2178
+ payload.issues.push({
2179
+ code: "invalid_format",
2180
+ format: "credit_card",
2181
+ input: payload.value,
2182
+ inst,
2183
+ continue: !def.abort
2184
+ });
2185
+ };
2186
+ });
2187
+ function isIso7064Mod97(iban) {
2188
+ let remainder = 0;
2189
+ const len = iban.length;
2190
+ for (let i = 4; i < len; i++) {
2191
+ const code = iban.charCodeAt(i);
2192
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
2193
+ }
2194
+ for (let i = 0; i < 4; i++) {
2195
+ const code = iban.charCodeAt(i);
2196
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
2197
+ }
2198
+ return remainder === 1;
2199
+ }
2200
+ function isValidIBAN(input) {
2201
+ if (!iban$1.test(input)) return false;
2202
+ return isIso7064Mod97(input);
2203
+ }
2204
+ const $ZodIBAN = /*@__PURE__*/ $constructor("$ZodIBAN", (inst, def) => {
2205
+ def.pattern ?? (def.pattern = iban$1);
1800
2206
  $ZodStringFormat.init(inst, def);
2207
+ inst._zod.check = (payload) => {
2208
+ if (isValidIBAN(payload.value)) return;
2209
+ payload.issues.push({
2210
+ code: "invalid_format",
2211
+ format: "iban",
2212
+ input: payload.value,
2213
+ inst,
2214
+ continue: !def.abort
2215
+ });
2216
+ };
1801
2217
  });
1802
2218
  function isValidJWT(token, algorithm = null) {
1803
2219
  try {
@@ -1827,6 +2243,19 @@ const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
1827
2243
  });
1828
2244
  };
1829
2245
  });
2246
+ const $ZodCustomStringFormat = /*@__PURE__*/ $constructor("$ZodCustomStringFormat", (inst, def) => {
2247
+ $ZodStringFormat.init(inst, def);
2248
+ inst._zod.check = (payload) => {
2249
+ if (def.fn(payload.value)) return;
2250
+ payload.issues.push({
2251
+ code: "invalid_format",
2252
+ format: def.format,
2253
+ input: payload.value,
2254
+ inst,
2255
+ continue: !def.abort
2256
+ });
2257
+ };
2258
+ });
1830
2259
  const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
1831
2260
  $ZodType.init(inst, def);
1832
2261
  inst._zod.pattern = number$1;
@@ -1869,6 +2298,41 @@ const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1869
2298
  return payload;
1870
2299
  };
1871
2300
  });
2301
+ const $ZodBigInt = /*@__PURE__*/ $constructor("$ZodBigInt", (inst, def) => {
2302
+ $ZodType.init(inst, def);
2303
+ inst._zod.pattern = bigint$1;
2304
+ inst._zod.parse = (payload, _ctx) => {
2305
+ if (def.coerce) try {
2306
+ payload.value = BigInt(payload.value);
2307
+ } catch (_) {}
2308
+ if (typeof payload.value === "bigint") return payload;
2309
+ payload.issues.push({
2310
+ expected: "bigint",
2311
+ code: "invalid_type",
2312
+ input: payload.value,
2313
+ inst
2314
+ });
2315
+ return payload;
2316
+ };
2317
+ });
2318
+ const $ZodBigIntFormat = /*@__PURE__*/ $constructor("$ZodBigIntFormat", (inst, def) => {
2319
+ $ZodCheckBigIntFormat.init(inst, def);
2320
+ $ZodBigInt.init(inst, def);
2321
+ });
2322
+ const $ZodSymbol = /*@__PURE__*/ $constructor("$ZodSymbol", (inst, def) => {
2323
+ $ZodType.init(inst, def);
2324
+ inst._zod.parse = (payload, _ctx) => {
2325
+ const input = payload.value;
2326
+ if (typeof input === "symbol") return payload;
2327
+ payload.issues.push({
2328
+ expected: "symbol",
2329
+ code: "invalid_type",
2330
+ input,
2331
+ inst
2332
+ });
2333
+ return payload;
2334
+ };
2335
+ });
1872
2336
  const $ZodUndefined = /*@__PURE__*/ $constructor("$ZodUndefined", (inst, def) => {
1873
2337
  $ZodType.init(inst, def);
1874
2338
  inst._zod.pattern = _undefined$2;
@@ -1921,6 +2385,20 @@ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
1921
2385
  return payload;
1922
2386
  };
1923
2387
  });
2388
+ const $ZodVoid = /*@__PURE__*/ $constructor("$ZodVoid", (inst, def) => {
2389
+ $ZodType.init(inst, def);
2390
+ inst._zod.parse = (payload, _ctx) => {
2391
+ const input = payload.value;
2392
+ if (typeof input === "undefined") return payload;
2393
+ payload.issues.push({
2394
+ expected: "void",
2395
+ code: "invalid_type",
2396
+ input,
2397
+ inst
2398
+ });
2399
+ return payload;
2400
+ };
2401
+ });
1924
2402
  const $ZodDate = /*@__PURE__*/ $constructor("$ZodDate", (inst, def) => {
1925
2403
  $ZodType.init(inst, def);
1926
2404
  inst._zod.parse = (payload, _ctx) => {
@@ -1960,6 +2438,8 @@ function capSize(inst, size) {
1960
2438
  };
1961
2439
  }
1962
2440
  const arraySize = (input) => Array.isArray(input) ? input.length : -1;
2441
+ const mapSize = (input) => input instanceof Map ? input.size : -1;
2442
+ const setSize = (input) => input instanceof Set ? input.size : -1;
1963
2443
  function handleArrayResult(result, final, index) {
1964
2444
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1965
2445
  final.value[index] = result.value;
@@ -2550,6 +3030,114 @@ function handleIntersectionResults(result, left, right) {
2550
3030
  result.value = merged.data;
2551
3031
  return result;
2552
3032
  }
3033
+ const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
3034
+ $ZodType.init(inst, def);
3035
+ const items = def.items;
3036
+ const memo = globalConfig.memoizer;
3037
+ memo?.attach(inst);
3038
+ inst._zod.parse = (payload, ctx) => {
3039
+ const input = payload.value;
3040
+ if (!Array.isArray(input)) {
3041
+ payload.issues.push({
3042
+ input,
3043
+ inst,
3044
+ expected: "tuple",
3045
+ code: "invalid_type"
3046
+ });
3047
+ return payload;
3048
+ }
3049
+ payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
3050
+ const proms = [];
3051
+ const optinStart = getTupleOptStart(items, "optin");
3052
+ const optoutStart = getTupleOptStart(items, "optout");
3053
+ if (!def.rest) {
3054
+ if (input.length < optinStart) {
3055
+ payload.issues.push({
3056
+ code: "too_small",
3057
+ minimum: optinStart,
3058
+ inclusive: true,
3059
+ input,
3060
+ inst,
3061
+ origin: "array"
3062
+ });
3063
+ return payload;
3064
+ }
3065
+ if (input.length > items.length) payload.issues.push({
3066
+ code: "too_big",
3067
+ maximum: items.length,
3068
+ inclusive: true,
3069
+ input,
3070
+ inst,
3071
+ origin: "array"
3072
+ });
3073
+ }
3074
+ const itemResults = new Array(items.length);
3075
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
3076
+ let itemAborted = false;
3077
+ for (let i = 0; i < items.length; i++) {
3078
+ const r = items[i]._zod.run({
3079
+ value: input[i],
3080
+ issues: []
3081
+ }, ctx);
3082
+ if (r instanceof Promise) proms.push(r.then((rr) => {
3083
+ itemResults[i] = rr;
3084
+ }));
3085
+ else {
3086
+ itemResults[i] = r;
3087
+ if (abortEarly && !itemAborted && r.issues.length) itemAborted = aborted(r);
3088
+ }
3089
+ }
3090
+ if (def.rest && !itemAborted) {
3091
+ let i = items.length - 1;
3092
+ const rest = input.slice(items.length);
3093
+ let seen = payload.issues.length;
3094
+ for (const el of rest) {
3095
+ if (abortEarly && payload.issues.length !== seen) {
3096
+ if (aborted(payload, seen)) break;
3097
+ seen = payload.issues.length;
3098
+ }
3099
+ i++;
3100
+ const result = def.rest._zod.run({
3101
+ value: el,
3102
+ issues: []
3103
+ }, ctx);
3104
+ if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3105
+ else handleTupleResult(result, payload, i);
3106
+ }
3107
+ }
3108
+ if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3109
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3110
+ };
3111
+ });
3112
+ function getTupleOptStart(items, key) {
3113
+ for (let i = items.length - 1; i >= 0; i--) if (!(key === "optin" ? items[i]._zod.optin !== void 0 : items[i]._zod.optout === "optional")) return i + 1;
3114
+ return 0;
3115
+ }
3116
+ function handleTupleResult(result, final, index) {
3117
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
3118
+ final.value[index] = result.value;
3119
+ }
3120
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3121
+ for (let i = 0; i < items.length; i++) {
3122
+ const r = itemResults[i];
3123
+ const isPresent = i < input.length;
3124
+ if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
3125
+ final.value.length = i;
3126
+ break;
3127
+ }
3128
+ if (r.issues.length) {
3129
+ if (!isPresent && i >= optoutStart) {
3130
+ final.value.length = i;
3131
+ break;
3132
+ }
3133
+ final.issues.push(...prefixIssues(i, r.issues));
3134
+ }
3135
+ final.value[i] = r.value;
3136
+ }
3137
+ for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
3138
+ else break;
3139
+ return final;
3140
+ }
2553
3141
  const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2554
3142
  $ZodType.init(inst, def);
2555
3143
  const memo = globalConfig.memoizer;
@@ -2682,16 +3270,122 @@ const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2682
3270
  return payload;
2683
3271
  };
2684
3272
  });
2685
- const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
3273
+ const $ZodMap = /*@__PURE__*/ $constructor("$ZodMap", (inst, def) => {
2686
3274
  $ZodType.init(inst, def);
2687
- const values = getEnumValues(def.entries);
2688
- const valuesSet = new Set(values);
2689
- inst._zod.values = valuesSet;
2690
- defineLazyInternal(inst, "pattern", (zod) => {
2691
- const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
2692
- return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
2693
- });
2694
- inst._zod.parse = (payload, _ctx) => {
3275
+ const memo = globalConfig.memoizer;
3276
+ memo?.attach(inst);
3277
+ inst._zod.parse = (payload, ctx) => {
3278
+ const input = payload.value;
3279
+ if (!(input instanceof Map)) {
3280
+ payload.issues.push({
3281
+ expected: "map",
3282
+ code: "invalid_type",
3283
+ input,
3284
+ inst
3285
+ });
3286
+ return payload;
3287
+ }
3288
+ const proms = [];
3289
+ payload.value = memo ? memo.alloc(inst, payload, /* @__PURE__ */ new Map(), ctx) : /* @__PURE__ */ new Map();
3290
+ const abortEarly = ctx?.abortEarly;
3291
+ let seen = payload.issues.length;
3292
+ for (const [key, value] of input) {
3293
+ if (abortEarly && payload.issues.length !== seen) {
3294
+ if (aborted(payload, seen)) break;
3295
+ seen = payload.issues.length;
3296
+ }
3297
+ const keyResult = def.keyType._zod.run({
3298
+ value: key,
3299
+ issues: []
3300
+ }, ctx);
3301
+ const valueResult = def.valueType._zod.run({
3302
+ value,
3303
+ issues: []
3304
+ }, ctx);
3305
+ if (keyResult instanceof Promise || valueResult instanceof Promise) proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
3306
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
3307
+ }));
3308
+ else handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
3309
+ }
3310
+ if (proms.length) return Promise.all(proms).then(() => payload);
3311
+ return payload;
3312
+ };
3313
+ capSize(inst, mapSize);
3314
+ });
3315
+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
3316
+ if (keyResult.issues.length) {
3317
+ if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, keyResult.issues));
3318
+ else final.issues.push({
3319
+ code: "invalid_key",
3320
+ origin: "map",
3321
+ input,
3322
+ inst,
3323
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3324
+ });
3325
+ }
3326
+ if (valueResult.issues.length) {
3327
+ if (propertyKeyTypes.has(typeof key)) final.issues.push(...prefixIssues(key, valueResult.issues));
3328
+ else final.issues.push({
3329
+ origin: "map",
3330
+ code: "invalid_element",
3331
+ input,
3332
+ inst,
3333
+ key,
3334
+ issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3335
+ });
3336
+ }
3337
+ final.value.set(keyResult.value, valueResult.value);
3338
+ }
3339
+ const $ZodSet = /*@__PURE__*/ $constructor("$ZodSet", (inst, def) => {
3340
+ $ZodType.init(inst, def);
3341
+ const memo = globalConfig.memoizer;
3342
+ memo?.attach(inst);
3343
+ inst._zod.parse = (payload, ctx) => {
3344
+ const input = payload.value;
3345
+ if (!(input instanceof Set)) {
3346
+ payload.issues.push({
3347
+ input,
3348
+ inst,
3349
+ expected: "set",
3350
+ code: "invalid_type"
3351
+ });
3352
+ return payload;
3353
+ }
3354
+ const proms = [];
3355
+ payload.value = memo ? memo.alloc(inst, payload, /* @__PURE__ */ new Set(), ctx) : /* @__PURE__ */ new Set();
3356
+ const abortEarly = ctx?.abortEarly;
3357
+ let seen = payload.issues.length;
3358
+ for (const item of input) {
3359
+ if (abortEarly && payload.issues.length !== seen) {
3360
+ if (aborted(payload, seen)) break;
3361
+ seen = payload.issues.length;
3362
+ }
3363
+ const result = def.valueType._zod.run({
3364
+ value: item,
3365
+ issues: []
3366
+ }, ctx);
3367
+ if (result instanceof Promise) proms.push(result.then((result) => handleSetResult(result, payload)));
3368
+ else handleSetResult(result, payload);
3369
+ }
3370
+ if (proms.length) return Promise.all(proms).then(() => payload);
3371
+ return payload;
3372
+ };
3373
+ capSize(inst, setSize);
3374
+ });
3375
+ function handleSetResult(result, final) {
3376
+ if (result.issues.length) final.issues.push(...result.issues);
3377
+ final.value.add(result.value);
3378
+ }
3379
+ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
3380
+ $ZodType.init(inst, def);
3381
+ const values = getEnumValues(def.entries);
3382
+ const valuesSet = new Set(values);
3383
+ inst._zod.values = valuesSet;
3384
+ defineLazyInternal(inst, "pattern", (zod) => {
3385
+ const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
3386
+ return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
3387
+ });
3388
+ inst._zod.parse = (payload, _ctx) => {
2695
3389
  const input = payload.value;
2696
3390
  if (valuesSet.has(input)) return payload;
2697
3391
  payload.issues.push({
@@ -2723,6 +3417,20 @@ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
2723
3417
  return payload;
2724
3418
  };
2725
3419
  });
3420
+ const $ZodFile = /*@__PURE__*/ $constructor("$ZodFile", (inst, def) => {
3421
+ $ZodType.init(inst, def);
3422
+ inst._zod.parse = (payload, _ctx) => {
3423
+ const input = payload.value;
3424
+ if (input instanceof File) return payload;
3425
+ payload.issues.push({
3426
+ expected: "file",
3427
+ code: "invalid_type",
3428
+ input,
3429
+ inst
3430
+ });
3431
+ return payload;
3432
+ };
3433
+ });
2726
3434
  const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
2727
3435
  $ZodType.init(inst, def);
2728
3436
  inst._zod.optin = "optional";
@@ -2845,6 +3553,19 @@ function handleNonOptionalResult(payload, inst) {
2845
3553
  });
2846
3554
  return payload;
2847
3555
  }
3556
+ const $ZodSuccess = /*@__PURE__*/ $constructor("$ZodSuccess", (inst, def) => {
3557
+ $ZodType.init(inst, def);
3558
+ inst._zod.parse = (payload, ctx) => {
3559
+ if (ctx.direction === "backward") throw new $ZodEncodeError("ZodSuccess");
3560
+ const result = def.innerType._zod.run(payload, ctx);
3561
+ if (result instanceof Promise) return result.then((result) => {
3562
+ payload.value = result.issues.length === 0;
3563
+ return payload;
3564
+ });
3565
+ payload.value = result.issues.length === 0;
3566
+ return payload;
3567
+ };
3568
+ });
2848
3569
  function handleCatchResult(payload, result, def, ctx) {
2849
3570
  if (!result.issues.length) {
2850
3571
  payload.value = result.value;
@@ -2874,6 +3595,21 @@ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2874
3595
  return handleCatchResult(payload, result, def, ctx);
2875
3596
  };
2876
3597
  });
3598
+ const $ZodNaN = /*@__PURE__*/ $constructor("$ZodNaN", (inst, def) => {
3599
+ $ZodType.init(inst, def);
3600
+ inst._zod.parse = (payload, _ctx) => {
3601
+ if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
3602
+ payload.issues.push({
3603
+ input: payload.value,
3604
+ inst,
3605
+ expected: "nan",
3606
+ code: "invalid_type"
3607
+ });
3608
+ return payload;
3609
+ }
3610
+ return payload;
3611
+ };
3612
+ });
2877
3613
  const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
2878
3614
  $ZodType.init(inst, def);
2879
3615
  defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
@@ -2901,6 +3637,49 @@ function handlePipeResult(left, next, ctx) {
2901
3637
  issues: left.issues
2902
3638
  }, ctx);
2903
3639
  }
3640
+ const $ZodCodec = /*@__PURE__*/ $constructor("$ZodCodec", (inst, def) => {
3641
+ $ZodType.init(inst, def);
3642
+ defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
3643
+ defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
3644
+ defineLazyInternal(inst, "optout", (zod) => zod.def.out._zod.optout);
3645
+ defineLazyInternal(inst, "propValues", (zod) => zod.def.in._zod.propValues);
3646
+ inst._zod.parse = (payload, ctx) => {
3647
+ if ((ctx.direction || "forward") === "forward") {
3648
+ const left = def.in._zod.run(payload, ctx);
3649
+ if (left instanceof Promise) return left.then((left) => handleCodecAResult(left, def, ctx));
3650
+ return handleCodecAResult(left, def, ctx);
3651
+ } else {
3652
+ const right = def.out._zod.run(payload, ctx);
3653
+ if (right instanceof Promise) return right.then((right) => handleCodecAResult(right, def, ctx));
3654
+ return handleCodecAResult(right, def, ctx);
3655
+ }
3656
+ };
3657
+ });
3658
+ function handleCodecAResult(result, def, ctx) {
3659
+ if (result.issues.length) {
3660
+ result.aborted = true;
3661
+ return result;
3662
+ }
3663
+ if ((ctx.direction || "forward") === "forward") {
3664
+ const transformed = def.transform(result.value, result);
3665
+ if (transformed instanceof Promise) return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));
3666
+ return handleCodecTxResult(result, transformed, def.out, ctx);
3667
+ } else {
3668
+ const transformed = def.reverseTransform(result.value, result);
3669
+ if (transformed instanceof Promise) return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));
3670
+ return handleCodecTxResult(result, transformed, def.in, ctx);
3671
+ }
3672
+ }
3673
+ function handleCodecTxResult(left, value, nextSchema, ctx) {
3674
+ if (left.issues.length) {
3675
+ left.aborted = true;
3676
+ return left;
3677
+ }
3678
+ return nextSchema._zod.run({
3679
+ value,
3680
+ issues: left.issues
3681
+ }, ctx);
3682
+ }
2904
3683
  const $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
2905
3684
  $ZodPipe.init(inst, def);
2906
3685
  });
@@ -2921,6 +3700,158 @@ function handleReadonlyResult(payload) {
2921
3700
  if (!payload.memo) payload.value = Object.freeze(payload.value);
2922
3701
  return payload;
2923
3702
  }
3703
+ function leafPattern(schema) {
3704
+ const def = schema._zod.def;
3705
+ let pattern = def.pattern;
3706
+ let isInt = !!def.format?.includes("int");
3707
+ let minimum;
3708
+ let maximum;
3709
+ for (const ch of def.checks ?? []) {
3710
+ const d = ch._zod.def;
3711
+ if (d.pattern) pattern = d.pattern;
3712
+ isInt || (isInt = !!d.format?.includes("int"));
3713
+ const lo = d.minimum ?? d.length;
3714
+ const hi = d.maximum ?? d.length;
3715
+ if (lo !== void 0 && (minimum === void 0 || lo > minimum)) minimum = lo;
3716
+ if (hi !== void 0 && (maximum === void 0 || hi < maximum)) maximum = hi;
3717
+ }
3718
+ if (pattern) return pattern.source;
3719
+ if (minimum !== void 0 && maximum !== void 0 && minimum > maximum) return "(?!)";
3720
+ if (minimum !== void 0 || maximum !== void 0) return string$1({
3721
+ minimum,
3722
+ maximum
3723
+ }).source;
3724
+ const own = schema._zod.pattern;
3725
+ return (isInt && own === number$1 ? integer : own)?.source;
3726
+ }
3727
+ function partPattern(schema) {
3728
+ const def = schema._zod.def;
3729
+ const own = schema._zod.pattern?.source;
3730
+ const inner = def.innerType ?? schema._zod.innerType;
3731
+ if (inner) {
3732
+ const before = inner._zod.pattern?.source;
3733
+ const after = partPattern(inner);
3734
+ if (own && before && after && after !== before) return own.replace(cleanRegex(before), () => cleanRegex(after));
3735
+ return own;
3736
+ }
3737
+ if (def.options) {
3738
+ const sources = def.options.map(partPattern);
3739
+ if (sources.every(Boolean)) return `^(${sources.map((s) => cleanRegex(s)).join("|")})$`;
3740
+ }
3741
+ return leafPattern(schema);
3742
+ }
3743
+ const $ZodTemplateLiteral = /*@__PURE__*/ $constructor("$ZodTemplateLiteral", (inst, def) => {
3744
+ $ZodType.init(inst, def);
3745
+ const regexParts = [];
3746
+ for (const part of def.parts) if (typeof part === "object" && part !== null) {
3747
+ const source = partPattern(part);
3748
+ if (!source) throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
3749
+ regexParts.push(cleanRegex(source));
3750
+ } else if (part === null || primitiveTypes.has(typeof part)) regexParts.push(escapeRegex(`${part}`));
3751
+ else throw new Error(`Invalid template literal part: ${part}`);
3752
+ inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
3753
+ inst._zod.parse = (payload, _ctx) => {
3754
+ if (typeof payload.value !== "string") {
3755
+ payload.issues.push({
3756
+ input: payload.value,
3757
+ inst,
3758
+ expected: "string",
3759
+ code: "invalid_type"
3760
+ });
3761
+ return payload;
3762
+ }
3763
+ inst._zod.pattern.lastIndex = 0;
3764
+ if (!inst._zod.pattern.test(payload.value)) {
3765
+ payload.issues.push({
3766
+ input: payload.value,
3767
+ inst,
3768
+ code: "invalid_format",
3769
+ format: def.format ?? "template_literal",
3770
+ pattern: inst._zod.pattern.source
3771
+ });
3772
+ return payload;
3773
+ }
3774
+ return payload;
3775
+ };
3776
+ });
3777
+ const $ZodFunction = /*@__PURE__*/ $constructor("$ZodFunction", (inst, def) => {
3778
+ $ZodType.init(inst, def);
3779
+ Object.defineProperty(inst, "_def", { value: def });
3780
+ inst._zod.def = def;
3781
+ inst.implement = (func) => {
3782
+ if (typeof func !== "function") throw new Error("implement() must be called with a function");
3783
+ return Object.defineProperty(function(...args) {
3784
+ const parsedArgs = inst._def.input ? parse$1(inst._def.input, args) : args;
3785
+ const result = Reflect.apply(func, this, parsedArgs);
3786
+ if (inst._def.output) return parse$1(inst._def.output, result);
3787
+ return result;
3788
+ }, "_zod", {
3789
+ value: inst._zod,
3790
+ enumerable: false
3791
+ });
3792
+ };
3793
+ inst.implementAsync = (func) => {
3794
+ if (typeof func !== "function") throw new Error("implementAsync() must be called with a function");
3795
+ return Object.defineProperty(async function(...args) {
3796
+ const parsedArgs = inst._def.input ? await parseAsync$1(inst._def.input, args) : args;
3797
+ const result = await Reflect.apply(func, this, parsedArgs);
3798
+ if (inst._def.output) return await parseAsync$1(inst._def.output, result);
3799
+ return result;
3800
+ }, "_zod", {
3801
+ value: inst._zod,
3802
+ enumerable: false
3803
+ });
3804
+ };
3805
+ inst._zod.parse = (payload, _ctx) => {
3806
+ if (typeof payload.value !== "function") {
3807
+ payload.issues.push({
3808
+ code: "invalid_type",
3809
+ expected: "function",
3810
+ input: payload.value,
3811
+ inst
3812
+ });
3813
+ return payload;
3814
+ }
3815
+ if (inst._def.output && inst._def.output._zod.def.type === "promise") payload.value = inst.implementAsync(payload.value);
3816
+ else payload.value = inst.implement(payload.value);
3817
+ return payload;
3818
+ };
3819
+ inst.input = (...args) => {
3820
+ const F = inst.constructor;
3821
+ if (Array.isArray(args[0])) return new F({
3822
+ type: "function",
3823
+ input: new $ZodTuple({
3824
+ type: "tuple",
3825
+ items: args[0],
3826
+ rest: args[1]
3827
+ }),
3828
+ output: inst._def.output
3829
+ });
3830
+ return new F({
3831
+ type: "function",
3832
+ input: args[0],
3833
+ output: inst._def.output
3834
+ });
3835
+ };
3836
+ inst.output = (output) => {
3837
+ const F = inst.constructor;
3838
+ return new F({
3839
+ type: "function",
3840
+ input: inst._def.input,
3841
+ output
3842
+ });
3843
+ };
3844
+ return inst;
3845
+ });
3846
+ const $ZodPromise = /*@__PURE__*/ $constructor("$ZodPromise", (inst, def) => {
3847
+ $ZodType.init(inst, def);
3848
+ inst._zod.parse = (payload, ctx) => {
3849
+ return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({
3850
+ value: inner,
3851
+ issues: []
3852
+ }, ctx));
3853
+ };
3854
+ });
2924
3855
  const $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
2925
3856
  $ZodType.init(inst, def);
2926
3857
  defineLazy(inst._zod, "innerType", () => {
@@ -3560,6 +4491,16 @@ function _ipv6(Class, params) {
3560
4491
  });
3561
4492
  }
3562
4493
  // @__NO_SIDE_EFFECTS__
4494
+ function _mac(Class, params) {
4495
+ return new Class({
4496
+ type: "string",
4497
+ format: "mac",
4498
+ check: "string_format",
4499
+ abort: false,
4500
+ ...normalizeParams(params)
4501
+ });
4502
+ }
4503
+ // @__NO_SIDE_EFFECTS__
3563
4504
  function _cidrv4(Class, params) {
3564
4505
  return new Class({
3565
4506
  type: "string",
@@ -3610,6 +4551,26 @@ function _e164(Class, params) {
3610
4551
  });
3611
4552
  }
3612
4553
  // @__NO_SIDE_EFFECTS__
4554
+ function _creditCard(Class, params) {
4555
+ return new Class({
4556
+ type: "string",
4557
+ format: "credit_card",
4558
+ check: "string_format",
4559
+ abort: false,
4560
+ ...normalizeParams(params)
4561
+ });
4562
+ }
4563
+ // @__NO_SIDE_EFFECTS__
4564
+ function _iban(Class, params) {
4565
+ return new Class({
4566
+ type: "string",
4567
+ format: "iban",
4568
+ check: "string_format",
4569
+ abort: false,
4570
+ ...normalizeParams(params)
4571
+ });
4572
+ }
4573
+ // @__NO_SIDE_EFFECTS__
3613
4574
  function _jwt(Class, params) {
3614
4575
  return new Class({
3615
4576
  type: "string",
@@ -3687,6 +4648,46 @@ function _int(Class, params) {
3687
4648
  });
3688
4649
  }
3689
4650
  // @__NO_SIDE_EFFECTS__
4651
+ function _float32(Class, params) {
4652
+ return new Class({
4653
+ type: "number",
4654
+ check: "number_format",
4655
+ abort: false,
4656
+ format: "float32",
4657
+ ...normalizeParams(params)
4658
+ });
4659
+ }
4660
+ // @__NO_SIDE_EFFECTS__
4661
+ function _float64(Class, params) {
4662
+ return new Class({
4663
+ type: "number",
4664
+ check: "number_format",
4665
+ abort: false,
4666
+ format: "float64",
4667
+ ...normalizeParams(params)
4668
+ });
4669
+ }
4670
+ // @__NO_SIDE_EFFECTS__
4671
+ function _int32(Class, params) {
4672
+ return new Class({
4673
+ type: "number",
4674
+ check: "number_format",
4675
+ abort: false,
4676
+ format: "int32",
4677
+ ...normalizeParams(params)
4678
+ });
4679
+ }
4680
+ // @__NO_SIDE_EFFECTS__
4681
+ function _uint32(Class, params) {
4682
+ return new Class({
4683
+ type: "number",
4684
+ check: "number_format",
4685
+ abort: false,
4686
+ format: "uint32",
4687
+ ...normalizeParams(params)
4688
+ });
4689
+ }
4690
+ // @__NO_SIDE_EFFECTS__
3690
4691
  function _boolean(Class, params) {
3691
4692
  return new Class({
3692
4693
  type: "boolean",
@@ -3702,6 +4703,40 @@ function _coercedBoolean(Class, params) {
3702
4703
  });
3703
4704
  }
3704
4705
  // @__NO_SIDE_EFFECTS__
4706
+ function _bigint(Class, params) {
4707
+ return new Class({
4708
+ type: "bigint",
4709
+ ...normalizeParams(params)
4710
+ });
4711
+ }
4712
+ // @__NO_SIDE_EFFECTS__
4713
+ function _int64(Class, params) {
4714
+ return new Class({
4715
+ type: "bigint",
4716
+ check: "bigint_format",
4717
+ abort: false,
4718
+ format: "int64",
4719
+ ...normalizeParams(params)
4720
+ });
4721
+ }
4722
+ // @__NO_SIDE_EFFECTS__
4723
+ function _uint64(Class, params) {
4724
+ return new Class({
4725
+ type: "bigint",
4726
+ check: "bigint_format",
4727
+ abort: false,
4728
+ format: "uint64",
4729
+ ...normalizeParams(params)
4730
+ });
4731
+ }
4732
+ // @__NO_SIDE_EFFECTS__
4733
+ function _symbol(Class, params) {
4734
+ return new Class({
4735
+ type: "symbol",
4736
+ ...normalizeParams(params)
4737
+ });
4738
+ }
4739
+ // @__NO_SIDE_EFFECTS__
3705
4740
  function _undefined$1(Class, params) {
3706
4741
  return new Class({
3707
4742
  type: "undefined",
@@ -3731,6 +4766,13 @@ function _never(Class, params) {
3731
4766
  });
3732
4767
  }
3733
4768
  // @__NO_SIDE_EFFECTS__
4769
+ function _void$1(Class, params) {
4770
+ return new Class({
4771
+ type: "void",
4772
+ ...normalizeParams(params)
4773
+ });
4774
+ }
4775
+ // @__NO_SIDE_EFFECTS__
3734
4776
  function _date(Class, params) {
3735
4777
  return new Class({
3736
4778
  type: "date",
@@ -3738,6 +4780,13 @@ function _date(Class, params) {
3738
4780
  });
3739
4781
  }
3740
4782
  // @__NO_SIDE_EFFECTS__
4783
+ function _nan(Class, params) {
4784
+ return new Class({
4785
+ type: "nan",
4786
+ ...normalizeParams(params)
4787
+ });
4788
+ }
4789
+ // @__NO_SIDE_EFFECTS__
3741
4790
  function _lt(value, params) {
3742
4791
  return new $ZodCheckLessThan({
3743
4792
  check: "less_than",
@@ -3760,25 +4809,65 @@ function _gt(value, params) {
3760
4809
  return new $ZodCheckGreaterThan({
3761
4810
  check: "greater_than",
3762
4811
  ...normalizeParams(params),
3763
- value,
3764
- inclusive: false
4812
+ value,
4813
+ inclusive: false
4814
+ });
4815
+ }
4816
+ // @__NO_SIDE_EFFECTS__
4817
+ function _gte(value, params) {
4818
+ return new $ZodCheckGreaterThan({
4819
+ check: "greater_than",
4820
+ ...normalizeParams(params),
4821
+ value,
4822
+ inclusive: true
4823
+ });
4824
+ }
4825
+ // @__NO_SIDE_EFFECTS__
4826
+ function _positive(params) {
4827
+ return /* @__PURE__ */ _gt(0, params);
4828
+ }
4829
+ // @__NO_SIDE_EFFECTS__
4830
+ function _negative(params) {
4831
+ return /* @__PURE__ */ _lt(0, params);
4832
+ }
4833
+ // @__NO_SIDE_EFFECTS__
4834
+ function _nonpositive(params) {
4835
+ return /* @__PURE__ */ _lte(0, params);
4836
+ }
4837
+ // @__NO_SIDE_EFFECTS__
4838
+ function _nonnegative(params) {
4839
+ return /* @__PURE__ */ _gte(0, params);
4840
+ }
4841
+ // @__NO_SIDE_EFFECTS__
4842
+ function _multipleOf(value, params) {
4843
+ return new $ZodCheckMultipleOf({
4844
+ check: "multiple_of",
4845
+ ...normalizeParams(params),
4846
+ value
4847
+ });
4848
+ }
4849
+ // @__NO_SIDE_EFFECTS__
4850
+ function _maxSize(maximum, params) {
4851
+ return new $ZodCheckMaxSize({
4852
+ check: "max_size",
4853
+ ...normalizeParams(params),
4854
+ maximum
3765
4855
  });
3766
4856
  }
3767
4857
  // @__NO_SIDE_EFFECTS__
3768
- function _gte(value, params) {
3769
- return new $ZodCheckGreaterThan({
3770
- check: "greater_than",
4858
+ function _minSize(minimum, params) {
4859
+ return new $ZodCheckMinSize({
4860
+ check: "min_size",
3771
4861
  ...normalizeParams(params),
3772
- value,
3773
- inclusive: true
4862
+ minimum
3774
4863
  });
3775
4864
  }
3776
4865
  // @__NO_SIDE_EFFECTS__
3777
- function _multipleOf(value, params) {
3778
- return new $ZodCheckMultipleOf({
3779
- check: "multiple_of",
4866
+ function _size(size, params) {
4867
+ return new $ZodCheckSizeEquals({
4868
+ check: "size_equals",
3780
4869
  ...normalizeParams(params),
3781
- value
4870
+ size
3782
4871
  });
3783
4872
  }
3784
4873
  // @__NO_SIDE_EFFECTS__
@@ -3858,6 +4947,31 @@ function _endsWith(suffix, params) {
3858
4947
  });
3859
4948
  }
3860
4949
  // @__NO_SIDE_EFFECTS__
4950
+ function _property(property, schema, params) {
4951
+ return new $ZodCheckProperty({
4952
+ check: "property",
4953
+ property,
4954
+ schema,
4955
+ ...normalizeParams(params)
4956
+ });
4957
+ }
4958
+ // @__NO_SIDE_EFFECTS__
4959
+ function _properties(shape, params) {
4960
+ return new $ZodCheckProperties({
4961
+ check: "properties",
4962
+ shape,
4963
+ ...normalizeParams(params)
4964
+ });
4965
+ }
4966
+ // @__NO_SIDE_EFFECTS__
4967
+ function _mime(types, params) {
4968
+ return new $ZodCheckMimeType({
4969
+ check: "mime_type",
4970
+ mime: types,
4971
+ ...normalizeParams(params)
4972
+ });
4973
+ }
4974
+ // @__NO_SIDE_EFFECTS__
3861
4975
  function _overwrite(tx) {
3862
4976
  return new $ZodCheckOverwrite({
3863
4977
  check: "overwrite",
@@ -3893,6 +5007,24 @@ function _array(Class, element, params) {
3893
5007
  });
3894
5008
  }
3895
5009
  // @__NO_SIDE_EFFECTS__
5010
+ function _file(Class, params) {
5011
+ return new Class({
5012
+ type: "file",
5013
+ ...normalizeParams(params)
5014
+ });
5015
+ }
5016
+ // @__NO_SIDE_EFFECTS__
5017
+ function _custom(Class, fn, _params) {
5018
+ const norm = normalizeParams(_params);
5019
+ norm.abort ?? (norm.abort = true);
5020
+ return new Class({
5021
+ type: "custom",
5022
+ check: "custom",
5023
+ fn,
5024
+ ...norm
5025
+ });
5026
+ }
5027
+ // @__NO_SIDE_EFFECTS__
3896
5028
  function _refine(Class, fn, _params) {
3897
5029
  return new Class({
3898
5030
  type: "custom",
@@ -3929,6 +5061,110 @@ function _check(fn, params) {
3929
5061
  ch._zod.check = fn;
3930
5062
  return ch;
3931
5063
  }
5064
+ // @__NO_SIDE_EFFECTS__
5065
+ function describe$1(description) {
5066
+ const ch = new $ZodCheck({ check: "describe" });
5067
+ ch._zod.onattach = [(inst) => {
5068
+ const existing = globalRegistry.get(inst) ?? {};
5069
+ globalRegistry.add(inst, {
5070
+ ...existing,
5071
+ description
5072
+ });
5073
+ }];
5074
+ ch._zod.check = () => {};
5075
+ return ch;
5076
+ }
5077
+ // @__NO_SIDE_EFFECTS__
5078
+ function meta$1(metadata) {
5079
+ const ch = new $ZodCheck({ check: "meta" });
5080
+ ch._zod.onattach = [(inst) => {
5081
+ const existing = globalRegistry.get(inst) ?? {};
5082
+ globalRegistry.add(inst, {
5083
+ ...existing,
5084
+ ...metadata
5085
+ });
5086
+ }];
5087
+ ch._zod.check = () => {};
5088
+ return ch;
5089
+ }
5090
+ // @__NO_SIDE_EFFECTS__
5091
+ function _stringbool(Classes, _params) {
5092
+ const params = normalizeParams(_params);
5093
+ let truthyArray = params.truthy ?? [
5094
+ "true",
5095
+ "1",
5096
+ "yes",
5097
+ "on",
5098
+ "y",
5099
+ "enabled"
5100
+ ];
5101
+ let falsyArray = params.falsy ?? [
5102
+ "false",
5103
+ "0",
5104
+ "no",
5105
+ "off",
5106
+ "n",
5107
+ "disabled"
5108
+ ];
5109
+ if (params.case !== "sensitive") {
5110
+ truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
5111
+ falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
5112
+ }
5113
+ const truthySet = new Set(truthyArray);
5114
+ const falsySet = new Set(falsyArray);
5115
+ const _Codec = Classes.Codec ?? $ZodCodec;
5116
+ const _Boolean = Classes.Boolean ?? $ZodBoolean;
5117
+ const codec = new _Codec({
5118
+ type: "pipe",
5119
+ in: new (Classes.String ?? $ZodString)({
5120
+ type: "string",
5121
+ error: params.error
5122
+ }),
5123
+ out: new _Boolean({
5124
+ type: "boolean",
5125
+ error: params.error
5126
+ }),
5127
+ transform: ((input, payload) => {
5128
+ let data = input;
5129
+ if (params.case !== "sensitive") data = data.toLowerCase();
5130
+ if (truthySet.has(data)) return true;
5131
+ else if (falsySet.has(data)) return false;
5132
+ else {
5133
+ payload.issues.push({
5134
+ code: "invalid_value",
5135
+ expected: "stringbool",
5136
+ values: [...truthySet, ...falsySet],
5137
+ input: payload.value,
5138
+ inst: codec,
5139
+ continue: false
5140
+ });
5141
+ return {};
5142
+ }
5143
+ }),
5144
+ reverseTransform: ((input, _payload) => {
5145
+ if (input === true) return truthyArray[0] || "true";
5146
+ else return falsyArray[0] || "false";
5147
+ }),
5148
+ error: params.error
5149
+ });
5150
+ codec._zod.bag.truthy = truthyArray;
5151
+ codec._zod.bag.falsy = falsyArray;
5152
+ codec._zod.bag.case = params.case ?? "insensitive";
5153
+ return codec;
5154
+ }
5155
+ // @__NO_SIDE_EFFECTS__
5156
+ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
5157
+ const params = normalizeParams(_params);
5158
+ const def = {
5159
+ check: "string_format",
5160
+ type: "string",
5161
+ format,
5162
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
5163
+ ...params
5164
+ };
5165
+ if (fnOrRegex instanceof RegExp) def.pattern = fnOrRegex;
5166
+ return new Class(def);
5167
+ }
3932
5168
  //#endregion
3933
5169
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
3934
5170
  function assignProps(target, ...sources) {
@@ -4454,7 +5690,7 @@ const formatMap = {
4454
5690
  json_string: "json-string",
4455
5691
  regex: ""
4456
5692
  };
4457
- const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
5693
+ const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64$1], [base64urlCharset, base64url$1]]);
4458
5694
  const exactPattern = (p) => exactPatterns.get(p) ?? p;
4459
5695
  const stringProcessor = (schema, ctx, _json, _params) => {
4460
5696
  const json = _json;
@@ -5085,6 +6321,184 @@ const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
5085
6321
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
5086
6322
  //#endregion
5087
6323
  //#region ../../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
6324
+ var schemas_exports = /* @__PURE__ */ __exportAll({
6325
+ ZodAny: () => ZodAny,
6326
+ ZodArray: () => ZodArray,
6327
+ ZodBase64: () => ZodBase64,
6328
+ ZodBase64URL: () => ZodBase64URL,
6329
+ ZodBigInt: () => ZodBigInt,
6330
+ ZodBigIntFormat: () => ZodBigIntFormat,
6331
+ ZodBoolean: () => ZodBoolean,
6332
+ ZodCIDRv4: () => ZodCIDRv4,
6333
+ ZodCIDRv6: () => ZodCIDRv6,
6334
+ ZodCUID: () => ZodCUID,
6335
+ ZodCUID2: () => ZodCUID2,
6336
+ ZodCatch: () => ZodCatch,
6337
+ ZodCodec: () => ZodCodec,
6338
+ ZodCreditCard: () => ZodCreditCard,
6339
+ ZodCustom: () => ZodCustom,
6340
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
6341
+ ZodDate: () => ZodDate,
6342
+ ZodDefault: () => ZodDefault,
6343
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
6344
+ ZodE164: () => ZodE164,
6345
+ ZodEmail: () => ZodEmail,
6346
+ ZodEmoji: () => ZodEmoji,
6347
+ ZodEnum: () => ZodEnum,
6348
+ ZodExactOptional: () => ZodExactOptional,
6349
+ ZodFile: () => ZodFile,
6350
+ ZodFunction: () => ZodFunction,
6351
+ ZodGUID: () => ZodGUID,
6352
+ ZodIBAN: () => ZodIBAN,
6353
+ ZodIPv4: () => ZodIPv4,
6354
+ ZodIPv6: () => ZodIPv6,
6355
+ ZodISODate: () => ZodISODate,
6356
+ ZodISODateTime: () => ZodISODateTime,
6357
+ ZodISODuration: () => ZodISODuration,
6358
+ ZodISOTime: () => ZodISOTime,
6359
+ ZodInstanceOf: () => ZodInstanceOf,
6360
+ ZodIntersection: () => ZodIntersection,
6361
+ ZodJWT: () => ZodJWT,
6362
+ ZodKSUID: () => ZodKSUID,
6363
+ ZodLazy: () => ZodLazy,
6364
+ ZodLiteral: () => ZodLiteral,
6365
+ ZodMAC: () => ZodMAC,
6366
+ ZodMap: () => ZodMap,
6367
+ ZodNaN: () => ZodNaN,
6368
+ ZodNanoID: () => ZodNanoID,
6369
+ ZodNever: () => ZodNever,
6370
+ ZodNonOptional: () => ZodNonOptional,
6371
+ ZodNull: () => ZodNull,
6372
+ ZodNullable: () => ZodNullable,
6373
+ ZodNumber: () => ZodNumber,
6374
+ ZodNumberFormat: () => ZodNumberFormat,
6375
+ ZodObject: () => ZodObject,
6376
+ ZodOptional: () => ZodOptional,
6377
+ ZodPipe: () => ZodPipe,
6378
+ ZodPrefault: () => ZodPrefault,
6379
+ ZodPreprocess: () => ZodPreprocess,
6380
+ ZodPromise: () => ZodPromise,
6381
+ ZodReadonly: () => ZodReadonly,
6382
+ ZodRecord: () => ZodRecord,
6383
+ ZodSet: () => ZodSet,
6384
+ ZodString: () => ZodString,
6385
+ ZodStringFormat: () => ZodStringFormat,
6386
+ ZodSuccess: () => ZodSuccess,
6387
+ ZodSymbol: () => ZodSymbol,
6388
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
6389
+ ZodTransform: () => ZodTransform,
6390
+ ZodTuple: () => ZodTuple,
6391
+ ZodType: () => ZodType,
6392
+ ZodULID: () => ZodULID,
6393
+ ZodURL: () => ZodURL,
6394
+ ZodUUID: () => ZodUUID,
6395
+ ZodUndefined: () => ZodUndefined,
6396
+ ZodUnion: () => ZodUnion,
6397
+ ZodUnknown: () => ZodUnknown,
6398
+ ZodVoid: () => ZodVoid,
6399
+ ZodXID: () => ZodXID,
6400
+ ZodXor: () => ZodXor,
6401
+ _ZodString: () => _ZodString,
6402
+ _default: () => _default,
6403
+ _function: () => _function,
6404
+ any: () => any,
6405
+ array: () => array,
6406
+ base64: () => base64,
6407
+ base64url: () => base64url,
6408
+ bigint: () => bigint,
6409
+ boolean: () => boolean,
6410
+ catch: () => _catch,
6411
+ check: () => check,
6412
+ cidrv4: () => cidrv4,
6413
+ cidrv6: () => cidrv6,
6414
+ codec: () => codec,
6415
+ creditCard: () => creditCard,
6416
+ cuid: () => cuid,
6417
+ cuid2: () => cuid2,
6418
+ currencyCode: () => currencyCode,
6419
+ custom: () => custom,
6420
+ date: () => date,
6421
+ describe: () => describe,
6422
+ discriminatedUnion: () => discriminatedUnion,
6423
+ e164: () => e164,
6424
+ email: () => email,
6425
+ emoji: () => emoji,
6426
+ enum: () => _enum,
6427
+ exactOptional: () => exactOptional,
6428
+ file: () => file,
6429
+ float32: () => float32,
6430
+ float64: () => float64,
6431
+ function: () => _function,
6432
+ guid: () => guid,
6433
+ hash: () => hash,
6434
+ hex: () => hex,
6435
+ hostname: () => hostname,
6436
+ httpUrl: () => httpUrl,
6437
+ iban: () => iban,
6438
+ instanceof: () => _instanceof,
6439
+ int: () => int,
6440
+ int32: () => int32,
6441
+ int64: () => int64,
6442
+ intersection: () => intersection,
6443
+ invertCodec: () => invertCodec,
6444
+ ipv4: () => ipv4,
6445
+ ipv6: () => ipv6,
6446
+ json: () => json,
6447
+ jwt: () => jwt,
6448
+ keyof: () => keyof,
6449
+ ksuid: () => ksuid,
6450
+ lazy: () => lazy,
6451
+ literal: () => literal,
6452
+ looseObject: () => looseObject,
6453
+ looseRecord: () => looseRecord,
6454
+ mac: () => mac,
6455
+ map: () => map,
6456
+ meta: () => meta,
6457
+ nan: () => nan,
6458
+ nanoid: () => nanoid,
6459
+ nativeEnum: () => nativeEnum,
6460
+ never: () => never,
6461
+ nonoptional: () => nonoptional,
6462
+ null: () => _null,
6463
+ nullable: () => nullable,
6464
+ nullish: () => nullish,
6465
+ number: () => number,
6466
+ object: () => object,
6467
+ optional: () => optional,
6468
+ partialRecord: () => partialRecord,
6469
+ pipe: () => pipe,
6470
+ prefault: () => prefault,
6471
+ preprocess: () => preprocess,
6472
+ promise: () => promise,
6473
+ readonly: () => readonly,
6474
+ record: () => record,
6475
+ refine: () => refine,
6476
+ set: () => set,
6477
+ strictObject: () => strictObject,
6478
+ string: () => string,
6479
+ stringFormat: () => stringFormat,
6480
+ stringbool: () => stringbool,
6481
+ success: () => success,
6482
+ superRefine: () => superRefine,
6483
+ symbol: () => symbol,
6484
+ templateLiteral: () => templateLiteral,
6485
+ transform: () => transform,
6486
+ tuple: () => tuple,
6487
+ uint32: () => uint32,
6488
+ uint64: () => uint64,
6489
+ ulid: () => ulid,
6490
+ undefined: () => _undefined,
6491
+ union: () => union,
6492
+ unknown: () => unknown,
6493
+ url: () => url,
6494
+ uuid: () => uuid,
6495
+ uuidv4: () => uuidv4,
6496
+ uuidv6: () => uuidv6,
6497
+ uuidv7: () => uuidv7,
6498
+ void: () => _void,
6499
+ xid: () => xid,
6500
+ xor: () => xor
6501
+ });
5088
6502
  function _ensureDefaultLocale() {
5089
6503
  if (!globalConfig.localeError) config(en_default());
5090
6504
  }
@@ -5433,10 +6847,25 @@ const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
5433
6847
  $ZodGUID.init(inst, def);
5434
6848
  ZodStringFormat.init(inst, def);
5435
6849
  });
6850
+ function guid(params) {
6851
+ return /* @__PURE__ */ _guid(ZodGUID, params);
6852
+ }
5436
6853
  const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
5437
6854
  $ZodUUID.init(inst, def);
5438
6855
  ZodStringFormat.init(inst, def);
5439
6856
  });
6857
+ function uuid(params) {
6858
+ return /* @__PURE__ */ _uuid(ZodUUID, params);
6859
+ }
6860
+ function uuidv4(params) {
6861
+ return /* @__PURE__ */ _uuidv4(ZodUUID, params);
6862
+ }
6863
+ function uuidv6(params) {
6864
+ return /* @__PURE__ */ _uuidv6(ZodUUID, params);
6865
+ }
6866
+ function uuidv7(params) {
6867
+ return /* @__PURE__ */ _uuidv7(ZodUUID, params);
6868
+ }
5440
6869
  const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
5441
6870
  $ZodURL.init(inst, def);
5442
6871
  ZodStringFormat.init(inst, def);
@@ -5444,14 +6873,27 @@ const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
5444
6873
  function url(params) {
5445
6874
  return /* @__PURE__ */ _url(ZodURL, params);
5446
6875
  }
6876
+ function httpUrl(params) {
6877
+ return /* @__PURE__ */ _url(ZodURL, {
6878
+ protocol: httpProtocol,
6879
+ hostname: domain,
6880
+ ...normalizeParams(params)
6881
+ });
6882
+ }
5447
6883
  const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
5448
6884
  $ZodEmoji.init(inst, def);
5449
6885
  ZodStringFormat.init(inst, def);
5450
6886
  });
6887
+ function emoji(params) {
6888
+ return /* @__PURE__ */ _emoji(ZodEmoji, params);
6889
+ }
5451
6890
  const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
5452
6891
  $ZodNanoID.init(inst, def);
5453
6892
  ZodStringFormat.init(inst, def);
5454
6893
  });
6894
+ function nanoid(params) {
6895
+ return /* @__PURE__ */ _nanoid(ZodNanoID, params);
6896
+ }
5455
6897
  /**
5456
6898
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
5457
6899
  * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
@@ -5461,22 +6903,44 @@ const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
5461
6903
  $ZodCUID.init(inst, def);
5462
6904
  ZodStringFormat.init(inst, def);
5463
6905
  });
6906
+ /**
6907
+ * Validates a CUID v1 string.
6908
+ *
6909
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
6910
+ * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
6911
+ * See https://github.com/paralleldrive/cuid.
6912
+ */
6913
+ function cuid(params) {
6914
+ return /* @__PURE__ */ _cuid(ZodCUID, params);
6915
+ }
5464
6916
  const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
5465
6917
  $ZodCUID2.init(inst, def);
5466
6918
  ZodStringFormat.init(inst, def);
5467
6919
  });
6920
+ function cuid2(params) {
6921
+ return /* @__PURE__ */ _cuid2(ZodCUID2, params);
6922
+ }
5468
6923
  const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
5469
6924
  $ZodULID.init(inst, def);
5470
6925
  ZodStringFormat.init(inst, def);
5471
6926
  });
6927
+ function ulid(params) {
6928
+ return /* @__PURE__ */ _ulid(ZodULID, params);
6929
+ }
5472
6930
  const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
5473
6931
  $ZodXID.init(inst, def);
5474
6932
  ZodStringFormat.init(inst, def);
5475
6933
  });
6934
+ function xid(params) {
6935
+ return /* @__PURE__ */ _xid(ZodXID, params);
6936
+ }
5476
6937
  const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
5477
6938
  $ZodKSUID.init(inst, def);
5478
6939
  ZodStringFormat.init(inst, def);
5479
6940
  });
6941
+ function ksuid(params) {
6942
+ return /* @__PURE__ */ _ksuid(ZodKSUID, params);
6943
+ }
5480
6944
  const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
5481
6945
  $ZodIPv4.init(inst, def);
5482
6946
  ZodStringFormat.init(inst, def);
@@ -5484,6 +6948,13 @@ const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
5484
6948
  function ipv4(params) {
5485
6949
  return /* @__PURE__ */ _ipv4(ZodIPv4, params);
5486
6950
  }
6951
+ const ZodMAC = /*@__PURE__*/ $constructor("ZodMAC", (inst, def) => {
6952
+ $ZodMAC.init(inst, def);
6953
+ ZodStringFormat.init(inst, def);
6954
+ });
6955
+ function mac(params) {
6956
+ return /* @__PURE__ */ _mac(ZodMAC, params);
6957
+ }
5487
6958
  const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
5488
6959
  $ZodIPv6.init(inst, def);
5489
6960
  ZodStringFormat.init(inst, def);
@@ -5495,26 +6966,80 @@ const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
5495
6966
  $ZodCIDRv4.init(inst, def);
5496
6967
  ZodStringFormat.init(inst, def);
5497
6968
  });
6969
+ function cidrv4(params) {
6970
+ return /* @__PURE__ */ _cidrv4(ZodCIDRv4, params);
6971
+ }
5498
6972
  const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
5499
6973
  $ZodCIDRv6.init(inst, def);
5500
6974
  ZodStringFormat.init(inst, def);
5501
6975
  });
6976
+ function cidrv6(params) {
6977
+ return /* @__PURE__ */ _cidrv6(ZodCIDRv6, params);
6978
+ }
5502
6979
  const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
5503
6980
  $ZodBase64.init(inst, def);
5504
6981
  ZodStringFormat.init(inst, def);
5505
6982
  });
6983
+ function base64(params) {
6984
+ return /* @__PURE__ */ _base64(ZodBase64, params);
6985
+ }
5506
6986
  const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
5507
6987
  $ZodBase64URL.init(inst, def);
5508
6988
  ZodStringFormat.init(inst, def);
5509
6989
  });
6990
+ function base64url(params) {
6991
+ return /* @__PURE__ */ _base64url(ZodBase64URL, params);
6992
+ }
5510
6993
  const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
5511
6994
  $ZodE164.init(inst, def);
5512
6995
  ZodStringFormat.init(inst, def);
5513
6996
  });
6997
+ function e164(params) {
6998
+ return /* @__PURE__ */ _e164(ZodE164, params);
6999
+ }
7000
+ const ZodCreditCard = /*@__PURE__*/ $constructor("ZodCreditCard", (inst, def) => {
7001
+ $ZodCreditCard.init(inst, def);
7002
+ ZodStringFormat.init(inst, def);
7003
+ });
7004
+ function creditCard(params) {
7005
+ return /* @__PURE__ */ _creditCard(ZodCreditCard, params);
7006
+ }
7007
+ const ZodIBAN = /*@__PURE__*/ $constructor("ZodIBAN", (inst, def) => {
7008
+ $ZodIBAN.init(inst, def);
7009
+ ZodStringFormat.init(inst, def);
7010
+ });
7011
+ function iban(params) {
7012
+ return /* @__PURE__ */ _iban(ZodIBAN, params);
7013
+ }
5514
7014
  const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
5515
7015
  $ZodJWT.init(inst, def);
5516
7016
  ZodStringFormat.init(inst, def);
5517
7017
  });
7018
+ function jwt(params) {
7019
+ return /* @__PURE__ */ _jwt(ZodJWT, params);
7020
+ }
7021
+ const ZodCustomStringFormat = /*@__PURE__*/ $constructor("ZodCustomStringFormat", (inst, def) => {
7022
+ $ZodCustomStringFormat.init(inst, def);
7023
+ ZodStringFormat.init(inst, def);
7024
+ });
7025
+ function stringFormat(format, fnOrRegex, _params = {}) {
7026
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
7027
+ }
7028
+ function hostname(_params) {
7029
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
7030
+ }
7031
+ function hex(_params) {
7032
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
7033
+ }
7034
+ function currencyCode(_params) {
7035
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode$1, _params);
7036
+ }
7037
+ function hash(alg, params) {
7038
+ const format = `${alg}_${params?.enc ?? "hex"}`;
7039
+ const regex = regexes_exports[format];
7040
+ if (!regex) throw new Error(`Unrecognized hash format: ${format}`);
7041
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, regex, params);
7042
+ }
5518
7043
  const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
5519
7044
  $ZodNumber.init(inst, def);
5520
7045
  ZodType.init(inst, def);
@@ -5591,6 +7116,18 @@ const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def
5591
7116
  function int(params) {
5592
7117
  return /* @__PURE__ */ _int(ZodNumberFormat, params);
5593
7118
  }
7119
+ function float32(params) {
7120
+ return /* @__PURE__ */ _float32(ZodNumberFormat, params);
7121
+ }
7122
+ function float64(params) {
7123
+ return /* @__PURE__ */ _float64(ZodNumberFormat, params);
7124
+ }
7125
+ function int32(params) {
7126
+ return /* @__PURE__ */ _int32(ZodNumberFormat, params);
7127
+ }
7128
+ function uint32(params) {
7129
+ return /* @__PURE__ */ _uint32(ZodNumberFormat, params);
7130
+ }
5594
7131
  const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
5595
7132
  $ZodBoolean.init(inst, def);
5596
7133
  ZodType.init(inst, def);
@@ -5599,6 +7136,70 @@ const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
5599
7136
  function boolean(params) {
5600
7137
  return /* @__PURE__ */ _boolean(ZodBoolean, params);
5601
7138
  }
7139
+ const ZodBigInt = /*@__PURE__*/ $constructor("ZodBigInt", (inst, def) => {
7140
+ $ZodBigInt.init(inst, def);
7141
+ ZodType.init(inst, def);
7142
+ inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
7143
+ }, /*@__PURE__*/ derived({
7144
+ minValue: (inst) => aggregateChecks(inst).minimum ?? null,
7145
+ maxValue: (inst) => aggregateChecks(inst).maximum ?? null,
7146
+ format: (inst) => aggregateChecks(inst).format ?? null
7147
+ }, {
7148
+ gte(value, params) {
7149
+ return this.check(/* @__PURE__ */ _gte(value, params));
7150
+ },
7151
+ min(value, params) {
7152
+ return this.check(/* @__PURE__ */ _gte(value, params));
7153
+ },
7154
+ gt(value, params) {
7155
+ return this.check(/* @__PURE__ */ _gt(value, params));
7156
+ },
7157
+ lt(value, params) {
7158
+ return this.check(/* @__PURE__ */ _lt(value, params));
7159
+ },
7160
+ lte(value, params) {
7161
+ return this.check(/* @__PURE__ */ _lte(value, params));
7162
+ },
7163
+ max(value, params) {
7164
+ return this.check(/* @__PURE__ */ _lte(value, params));
7165
+ },
7166
+ positive(params) {
7167
+ return this.check(/* @__PURE__ */ _gt(BigInt(0), params));
7168
+ },
7169
+ negative(params) {
7170
+ return this.check(/* @__PURE__ */ _lt(BigInt(0), params));
7171
+ },
7172
+ nonpositive(params) {
7173
+ return this.check(/* @__PURE__ */ _lte(BigInt(0), params));
7174
+ },
7175
+ nonnegative(params) {
7176
+ return this.check(/* @__PURE__ */ _gte(BigInt(0), params));
7177
+ },
7178
+ multipleOf(value, params) {
7179
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
7180
+ }
7181
+ }));
7182
+ function bigint(params) {
7183
+ return /* @__PURE__ */ _bigint(ZodBigInt, params);
7184
+ }
7185
+ const ZodBigIntFormat = /*@__PURE__*/ $constructor("ZodBigIntFormat", (inst, def) => {
7186
+ $ZodBigIntFormat.init(inst, def);
7187
+ ZodBigInt.init(inst, def);
7188
+ });
7189
+ function int64(params) {
7190
+ return /* @__PURE__ */ _int64(ZodBigIntFormat, params);
7191
+ }
7192
+ function uint64(params) {
7193
+ return /* @__PURE__ */ _uint64(ZodBigIntFormat, params);
7194
+ }
7195
+ const ZodSymbol = /*@__PURE__*/ $constructor("ZodSymbol", (inst, def) => {
7196
+ $ZodSymbol.init(inst, def);
7197
+ ZodType.init(inst, def);
7198
+ inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
7199
+ });
7200
+ function symbol(params) {
7201
+ return /* @__PURE__ */ _symbol(ZodSymbol, params);
7202
+ }
5602
7203
  const ZodUndefined = /*@__PURE__*/ $constructor("ZodUndefined", (inst, def) => {
5603
7204
  $ZodUndefined.init(inst, def);
5604
7205
  ZodType.init(inst, def);
@@ -5639,6 +7240,14 @@ const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
5639
7240
  function never(params) {
5640
7241
  return /* @__PURE__ */ _never(ZodNever, params);
5641
7242
  }
7243
+ const ZodVoid = /*@__PURE__*/ $constructor("ZodVoid", (inst, def) => {
7244
+ $ZodVoid.init(inst, def);
7245
+ ZodType.init(inst, def);
7246
+ inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
7247
+ });
7248
+ function _void(params) {
7249
+ return /* @__PURE__ */ _void$1(ZodVoid, params);
7250
+ }
5642
7251
  const ZodDate = /*@__PURE__*/ $constructor("ZodDate", (inst, def) => {
5643
7252
  $ZodDate.init(inst, def);
5644
7253
  ZodType.init(inst, def);
@@ -5684,6 +7293,10 @@ const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
5684
7293
  function array(element, params) {
5685
7294
  return /* @__PURE__ */ _array(ZodArray, element, params);
5686
7295
  }
7296
+ function keyof(schema) {
7297
+ const shape = schema._zod.def.shape;
7298
+ return _enum(Object.keys(shape));
7299
+ }
5687
7300
  const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
5688
7301
  _ensureDefaultMemoizer();
5689
7302
  $ZodObjectJIT.init(inst, def);
@@ -5812,6 +7425,39 @@ function intersection(left, right) {
5812
7425
  right
5813
7426
  });
5814
7427
  }
7428
+ const ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
7429
+ _ensureDefaultMemoizer();
7430
+ $ZodTuple.init(inst, def);
7431
+ ZodType.init(inst, def);
7432
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
7433
+ }, {
7434
+ rest(rest) {
7435
+ return this.clone({
7436
+ ...this._zod.def,
7437
+ rest
7438
+ });
7439
+ },
7440
+ partial() {
7441
+ const def = this._zod.def;
7442
+ if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
7443
+ return this.clone({
7444
+ ...def,
7445
+ items: def.items.map((item) => new ZodOptional({
7446
+ type: "optional",
7447
+ innerType: item
7448
+ }))
7449
+ });
7450
+ }
7451
+ });
7452
+ function tuple(items, _paramsOrRest, _params) {
7453
+ const hasRest = _paramsOrRest instanceof $ZodType;
7454
+ return new ZodTuple({
7455
+ type: "tuple",
7456
+ items,
7457
+ rest: hasRest ? _paramsOrRest : null,
7458
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
7459
+ });
7460
+ }
5815
7461
  const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5816
7462
  _ensureDefaultMemoizer();
5817
7463
  $ZodRecord.init(inst, def);
@@ -5834,6 +7480,61 @@ function record(keyType, valueType, params) {
5834
7480
  ...normalizeParams(params)
5835
7481
  });
5836
7482
  }
7483
+ function partialRecord(keyType, valueType, params) {
7484
+ return new ZodRecord({
7485
+ type: "record",
7486
+ keyType,
7487
+ valueType,
7488
+ ...normalizeParams(params),
7489
+ partial: true
7490
+ });
7491
+ }
7492
+ function looseRecord(keyType, valueType, params) {
7493
+ return new ZodRecord({
7494
+ type: "record",
7495
+ keyType,
7496
+ valueType,
7497
+ mode: "loose",
7498
+ ...normalizeParams(params)
7499
+ });
7500
+ }
7501
+ const ZodMap = /*@__PURE__*/ $constructor("ZodMap", (inst, def) => {
7502
+ _ensureDefaultMemoizer();
7503
+ $ZodMap.init(inst, def);
7504
+ ZodType.init(inst, def);
7505
+ inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx, json, params);
7506
+ inst.keyType = def.keyType;
7507
+ inst.valueType = def.valueType;
7508
+ inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
7509
+ inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
7510
+ inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
7511
+ inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
7512
+ });
7513
+ function map(keyType, valueType, params) {
7514
+ return new ZodMap({
7515
+ type: "map",
7516
+ keyType,
7517
+ valueType,
7518
+ ...normalizeParams(params)
7519
+ });
7520
+ }
7521
+ const ZodSet = /*@__PURE__*/ $constructor("ZodSet", (inst, def) => {
7522
+ _ensureDefaultMemoizer();
7523
+ $ZodSet.init(inst, def);
7524
+ ZodType.init(inst, def);
7525
+ inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx, json, params);
7526
+ inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
7527
+ inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
7528
+ inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
7529
+ inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
7530
+ });
7531
+ function set(valueType, params) {
7532
+ return new ZodSet({
7533
+ type: "set",
7534
+ valueType,
7535
+ ...normalizeParams(params)
7536
+ });
7537
+ }
5837
7538
  const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
5838
7539
  $ZodEnum.init(inst, def);
5839
7540
  ZodType.init(inst, def);
@@ -5872,6 +7573,20 @@ function _enum(values, params) {
5872
7573
  ...normalizeParams(params)
5873
7574
  });
5874
7575
  }
7576
+ /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
7577
+ *
7578
+ * ```ts
7579
+ * enum Colors { red, green, blue }
7580
+ * z.enum(Colors);
7581
+ * ```
7582
+ */
7583
+ function nativeEnum(entries, params) {
7584
+ return new ZodEnum({
7585
+ type: "enum",
7586
+ entries,
7587
+ ...normalizeParams(params)
7588
+ });
7589
+ }
5875
7590
  const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
5876
7591
  $ZodLiteral.init(inst, def);
5877
7592
  ZodType.init(inst, def);
@@ -5889,6 +7604,17 @@ function literal(value, params) {
5889
7604
  ...normalizeParams(params)
5890
7605
  });
5891
7606
  }
7607
+ const ZodFile = /*@__PURE__*/ $constructor("ZodFile", (inst, def) => {
7608
+ $ZodFile.init(inst, def);
7609
+ ZodType.init(inst, def);
7610
+ inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
7611
+ inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize(size, params));
7612
+ inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize(size, params));
7613
+ inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime(Array.isArray(types) ? types : [types], params));
7614
+ });
7615
+ function file(params) {
7616
+ return /* @__PURE__ */ _file(ZodFile, params);
7617
+ }
5892
7618
  const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
5893
7619
  _ensureDefaultMemoizer();
5894
7620
  $ZodTransform.init(inst, def);
@@ -5958,6 +7684,9 @@ function nullable(innerType) {
5958
7684
  innerType
5959
7685
  });
5960
7686
  }
7687
+ function nullish(innerType) {
7688
+ return optional(nullable(innerType));
7689
+ }
5961
7690
  const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
5962
7691
  $ZodDefault.init(inst, def);
5963
7692
  ZodType.init(inst, def);
@@ -6002,6 +7731,18 @@ function nonoptional(innerType, params) {
6002
7731
  ...normalizeParams(params)
6003
7732
  });
6004
7733
  }
7734
+ const ZodSuccess = /*@__PURE__*/ $constructor("ZodSuccess", (inst, def) => {
7735
+ $ZodSuccess.init(inst, def);
7736
+ ZodType.init(inst, def);
7737
+ inst._zod.processJSONSchema = (ctx, json, params) => successProcessor(inst, ctx, json, params);
7738
+ inst.unwrap = () => inst._zod.def.innerType;
7739
+ });
7740
+ function success(innerType) {
7741
+ return new ZodSuccess({
7742
+ type: "success",
7743
+ innerType
7744
+ });
7745
+ }
6005
7746
  const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
6006
7747
  $ZodCatch.init(inst, def);
6007
7748
  ZodType.init(inst, def);
@@ -6016,6 +7757,14 @@ function _catch(innerType, catchValue) {
6016
7757
  catchValue: typeof catchValue === "function" ? catchValue : constantCatch(catchValue)
6017
7758
  });
6018
7759
  }
7760
+ const ZodNaN = /*@__PURE__*/ $constructor("ZodNaN", (inst, def) => {
7761
+ $ZodNaN.init(inst, def);
7762
+ ZodType.init(inst, def);
7763
+ inst._zod.processJSONSchema = (ctx, json, params) => nanProcessor(inst, ctx, json, params);
7764
+ });
7765
+ function nan(params) {
7766
+ return /* @__PURE__ */ _nan(ZodNaN, params);
7767
+ }
6019
7768
  const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
6020
7769
  $ZodPipe.init(inst, def);
6021
7770
  ZodType.init(inst, def);
@@ -6030,6 +7779,29 @@ function pipe(in_, out) {
6030
7779
  out
6031
7780
  });
6032
7781
  }
7782
+ const ZodCodec = /*@__PURE__*/ $constructor("ZodCodec", (inst, def) => {
7783
+ ZodPipe.init(inst, def);
7784
+ $ZodCodec.init(inst, def);
7785
+ });
7786
+ function codec(in_, out, params) {
7787
+ return new ZodCodec({
7788
+ type: "pipe",
7789
+ in: in_,
7790
+ out,
7791
+ transform: params.decode,
7792
+ reverseTransform: params.encode
7793
+ });
7794
+ }
7795
+ function invertCodec(codec) {
7796
+ const def = codec._zod.def;
7797
+ return new ZodCodec({
7798
+ type: "pipe",
7799
+ in: def.out,
7800
+ out: def.in,
7801
+ transform: def.reverseTransform,
7802
+ reverseTransform: def.transform
7803
+ });
7804
+ }
6033
7805
  const ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
6034
7806
  ZodPipe.init(inst, def);
6035
7807
  $ZodPreprocess.init(inst, def);
@@ -6046,6 +7818,18 @@ function readonly(innerType) {
6046
7818
  innerType
6047
7819
  });
6048
7820
  }
7821
+ const ZodTemplateLiteral = /*@__PURE__*/ $constructor("ZodTemplateLiteral", (inst, def) => {
7822
+ $ZodTemplateLiteral.init(inst, def);
7823
+ ZodType.init(inst, def);
7824
+ inst._zod.processJSONSchema = (ctx, json, params) => templateLiteralProcessor(inst, ctx, json, params);
7825
+ });
7826
+ function templateLiteral(parts, params) {
7827
+ return new ZodTemplateLiteral({
7828
+ type: "template_literal",
7829
+ parts,
7830
+ ...normalizeParams(params)
7831
+ });
7832
+ }
6049
7833
  const ZodLazy = /*@__PURE__*/ $constructor("ZodLazy", (inst, def) => {
6050
7834
  $ZodLazy.init(inst, def);
6051
7835
  ZodType.init(inst, def);
@@ -6058,17 +7842,81 @@ function lazy(getter) {
6058
7842
  getter
6059
7843
  });
6060
7844
  }
7845
+ const ZodPromise = /*@__PURE__*/ $constructor("ZodPromise", (inst, def) => {
7846
+ $ZodPromise.init(inst, def);
7847
+ ZodType.init(inst, def);
7848
+ inst._zod.processJSONSchema = (ctx, json, params) => promiseProcessor(inst, ctx, json, params);
7849
+ inst.unwrap = () => inst._zod.def.innerType;
7850
+ });
7851
+ function promise(innerType) {
7852
+ return new ZodPromise({
7853
+ type: "promise",
7854
+ innerType
7855
+ });
7856
+ }
7857
+ const ZodFunction = /*@__PURE__*/ $constructor("ZodFunction", (inst, def) => {
7858
+ $ZodFunction.init(inst, def);
7859
+ ZodType.init(inst, def);
7860
+ inst._zod.processJSONSchema = (ctx, json, params) => functionProcessor(inst, ctx, json, params);
7861
+ });
7862
+ function _function(params) {
7863
+ return new ZodFunction({
7864
+ type: "function",
7865
+ input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()),
7866
+ output: params?.output ?? unknown()
7867
+ });
7868
+ }
6061
7869
  const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
6062
7870
  $ZodCustom.init(inst, def);
6063
7871
  ZodType.init(inst, def);
6064
7872
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
6065
7873
  });
7874
+ function check(fn) {
7875
+ const ch = new $ZodCheck({ check: "custom" });
7876
+ ch._zod.check = fn;
7877
+ return ch;
7878
+ }
7879
+ function custom(fn, _params) {
7880
+ return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
7881
+ }
6066
7882
  function refine(fn, _params = {}) {
6067
7883
  return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
6068
7884
  }
6069
7885
  function superRefine(fn, params) {
6070
7886
  return /* @__PURE__ */ _superRefine(fn, params);
6071
7887
  }
7888
+ const describe = describe$1;
7889
+ const meta = meta$1;
7890
+ const ZodInstanceOf = /*@__PURE__*/ $constructor("ZodInstanceOf", (inst, def) => {
7891
+ ZodCustom.init(inst, def);
7892
+ }, { properties(shape, params) {
7893
+ return this.check(/* @__PURE__ */ _properties(shape, params));
7894
+ } });
7895
+ function _instanceof(cls, params = {}) {
7896
+ const inst = new ZodInstanceOf({
7897
+ type: "custom",
7898
+ check: "custom",
7899
+ fn: (data) => data instanceof cls,
7900
+ abort: true,
7901
+ ...normalizeParams(params)
7902
+ });
7903
+ inst._zod.bag.Class = cls;
7904
+ inst._zod.check = (payload) => {
7905
+ if (!(payload.value instanceof cls)) payload.issues.push({
7906
+ code: "invalid_type",
7907
+ expected: cls.name,
7908
+ input: payload.value,
7909
+ inst,
7910
+ path: [...inst._zod.def.path ?? []]
7911
+ });
7912
+ };
7913
+ return inst;
7914
+ }
7915
+ const stringbool = (...args) => /* @__PURE__ */ _stringbool({
7916
+ Codec: ZodCodec,
7917
+ Boolean: ZodBoolean,
7918
+ String: ZodString
7919
+ }, ...args);
6072
7920
  function json(params) {
6073
7921
  const jsonSchema = lazy(() => {
6074
7922
  return union([
@@ -6090,4 +7938,4 @@ function preprocess(fn, schema) {
6090
7938
  });
6091
7939
  }
6092
7940
  //#endregion
6093
- export { string as A, _isoDate as B, looseObject as C, preprocess as D, optional as E, safeParse as F, validate as H, toJSONSchema as I, _coercedBoolean as L, unknown as M, url as N, record as O, xor as P, _coercedNumber as R, literal as S, object as T, NEVER as U, _isoDateTime as V, intersection as _, ZodObject as a, json as b, _enum as c, any as d, array as f, email as g, discriminatedUnion as h, ZodNumber as i, union as j, strictObject as k, _null as l, date as m, ZodISODate as n, ZodOptional as o, boolean as p, ZodISODateTime as r, ZodString as s, ZodBoolean as t, _undefined as u, ipv4 as v, number as w, lazy as x, ipv6 as y, _coercedString as z };
7941
+ export { _length as $, optional as A, isPlainObject as At, safeParse as B, json as C, _trim as Ct, never as D, prettifyError as Dt, looseObject as E, validate as Et, string as F, _endsWith as G, _coercedBoolean as H, union as I, _includes as J, _gt as K, unknown as L, record as M, schemas_exports as N, number as O, NEVER as Ot, strictObject as P, _isoTime as Q, url as R, ipv6 as S, _toUpperCase as St, literal as T, globalRegistry as Tt, _coercedNumber as U, toJSONSchema as V, _coercedString as W, _isoDateTime as X, _isoDate as Y, _isoDuration as Z, date as _, _regex as _t, ZodISOTime as a, _mime as at, intersection as b, _startsWith as bt, ZodOptional as c, _multipleOf as ct, _null as d, _nonpositive as dt, _lowercase as et, _undefined as f, _normalize as ft, custom as g, _property as gt, boolean as h, _properties as ht, ZodISODuration as i, _maxSize as it, preprocess as j, object as k, assignProp as kt, ZodString as l, _negative as lt, array as m, _positive as mt, ZodISODate as n, _lte as nt, ZodNumber as o, _minLength as ot, any as p, _overwrite as pt, _gte as q, ZodISODateTime as r, _maxLength as rt, ZodObject as s, _minSize as st, ZodBoolean as t, _lt as tt, _enum as u, _nonnegative as ut, discriminatedUnion as v, _size as vt, lazy as w, _uppercase as wt, ipv4 as x, _toLowerCase as xt, email as y, _slugify as yt, xor as z };