cf 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +15 -5
  2. package/dist/_meta/agent-context.json +12 -4
  3. package/dist/_meta/commands.json +2249 -262
  4. package/dist/_meta/hand-written-commands.json +784 -0
  5. package/dist/_meta/schemas.json +1882 -155
  6. package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-sDBTV0qZ.mjs} +2 -2
  7. package/dist/{access-lhLJo1v2.mjs → access-DcNzuCue.mjs} +1 -1
  8. package/dist/account-BX90zXn5.mjs +2 -0
  9. package/dist/{account-tags-B88TotoH.mjs → account-tags-Bz3JG5hI.mjs} +4 -4
  10. package/dist/{accounts-BSIAT_iP.mjs → accounts-DCuW3xyZ.mjs} +12 -12
  11. package/dist/{acm-VULm1djv.mjs → acm-zjfShZLS.mjs} +1 -1
  12. package/dist/{addressing-BHPBIkRY.mjs → addressing-DORQ64Ux.mjs} +11 -11
  13. package/dist/{agent-context-KBy48G1b.mjs → agent-context-BgPR_aQr.mjs} +1 -1
  14. package/dist/agent-memory-C0hAUMeC.mjs +6 -0
  15. package/dist/ai-BpEBGMT2.mjs +5 -0
  16. package/dist/ai-audit-DnU3vn3E.mjs +2 -0
  17. package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
  18. package/dist/ai-search-DKbN9Tyd.mjs +7 -0
  19. package/dist/ai-security-C_I5lo58.mjs +4 -0
  20. package/dist/{alerting-Bl8OqViR.mjs → alerting-4T8gmZs-.mjs} +1 -1
  21. package/dist/analytics-Bxh4TCP7.mjs +3 -0
  22. package/dist/analytics_engine-fV56bjVN.mjs +2 -0
  23. package/dist/{api-security-4FVrD4n8.mjs → api-security-COk_i184.mjs} +20 -20
  24. package/dist/argo-DIRfvxvv.mjs +2 -0
  25. package/dist/{artifacts-CVDGnr2V.mjs → artifacts-BBfXNfUg.mjs} +1 -1
  26. package/dist/audit-logs-BlOrlAWe.mjs +2 -0
  27. package/dist/{auth-MQEamPN9.mjs → auth-D3X9HYhD.mjs} +3 -3
  28. package/dist/auth-DPhNN3Ly.mjs +5 -0
  29. package/dist/billing-B9e4PnvN.mjs +3 -0
  30. package/dist/body-parser-BshbixEq.mjs +2 -0
  31. package/dist/bot-management-D2JVeS-V.mjs +5 -0
  32. package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
  33. package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
  34. package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
  35. package/dist/browser-run-CHGOCTdG.mjs +4 -0
  36. package/dist/build-D0FhOj40.mjs +8 -0
  37. package/dist/{cache-VyWK1SjY.mjs → cache-C6V7PbQM.mjs} +1 -1
  38. package/dist/{calls-BxoRYxs4.mjs → calls-Bye8Tyy-.mjs} +1 -1
  39. package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
  40. package/dist/cf-Ds4JFovl.mjs +18 -0
  41. package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
  42. package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
  43. package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
  44. package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
  45. package/dist/cloud-connector-CL1jPQud.mjs +2 -0
  46. package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
  47. package/dist/command-C9VP3xaA.mjs +2 -0
  48. package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
  49. package/dist/config.d.mts +1460 -1348
  50. package/dist/config.mjs +1 -1
  51. package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
  52. package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
  53. package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
  54. package/dist/{connectors-BqxYMMtQ.mjs → connectors-BQwyBJ4_.mjs} +1 -1
  55. package/dist/{containers-CKW081JA.mjs → containers-BrQtGiNp.mjs} +12 -8
  56. package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-DNzhXYkY.mjs} +1 -1
  57. package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
  58. package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
  59. package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
  60. package/dist/custom-csrs-bhClr2SU.mjs +3 -0
  61. package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-C0eiGvG9.mjs} +1 -1
  62. package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
  63. package/dist/custom-pages-DTINMR30.mjs +3 -0
  64. package/dist/d1-sKdExJYF.mjs +20 -0
  65. package/dist/data-security-mV3a6UfW.mjs +7 -0
  66. package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
  67. package/dist/delegate.mjs +1 -1
  68. package/dist/{deploy-CZ7bgNDu.mjs → deploy-BL59O1O1.mjs} +1 -1
  69. package/dist/deploy-input-Dz6q-__n.mjs +2 -0
  70. package/dist/{dev-V10MG-Bg.mjs → dev-BDaavgH1.mjs} +2 -2
  71. package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-CJV6qWUA.mjs} +1 -1
  72. package/dist/{directory-BlH6N6Qy.mjs → directory-B5zCMusW.mjs} +1 -1
  73. package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
  74. package/dist/dist-BHi7UhXO.mjs +72 -0
  75. package/dist/dist-BWpErtDM.mjs +384 -0
  76. package/dist/{dls-BF5iN78p.mjs → dls-t0hnIe_P.mjs} +1 -1
  77. package/dist/{dns-CeCTNqRk.mjs → dns-C8FC2hbh.mjs} +13 -13
  78. package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
  79. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
  80. package/dist/dry-run-DL2V6yFm.mjs +2 -0
  81. package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
  82. package/dist/email-auth-BmYrl0pO.mjs +2 -0
  83. package/dist/email-routing-CF3_Z957.mjs +6 -0
  84. package/dist/email-security-F7OYcMkZ.mjs +18 -0
  85. package/dist/email-sending-EyU3WvGQ.mjs +7 -0
  86. package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
  87. package/dist/{firewall-CBPGJ43p.mjs → firewall-8YWWy4iB.mjs} +9 -9
  88. package/dist/flagship-C4x0l-8J.mjs +4 -0
  89. package/dist/{fraud-BIhS8pLf.mjs → fraud-HR_SdUx3.mjs} +1 -1
  90. package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
  91. package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-4qOvjrTN.mjs} +1 -1
  92. package/dist/{hostnames-Bx0mykMR.mjs → hostnames-DehdYOMz.mjs} +1 -1
  93. package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
  94. package/dist/iam-DR72hmii.mjs +6 -0
  95. package/dist/images-CeKc5JPh.mjs +8 -0
  96. package/dist/index.mjs +1 -1
  97. package/dist/{intel-B-9Z_sJs.mjs → intel-DtFix9WL.mjs} +1 -1
  98. package/dist/{interactive-DtsCYfrK.mjs → interactive-C7M55Wxx.mjs} +1 -1
  99. package/dist/ips-CtWCjXAN.mjs +2 -0
  100. package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
  101. package/dist/keys-BmhG6Kn1.mjs +2 -0
  102. package/dist/{kv-BFDUCnft.mjs → kv-BuVPAuZP.mjs} +1 -1
  103. package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
  104. package/dist/load-balancers-CylN-l7n.mjs +6 -0
  105. package/dist/{local-D-aVNu6A.mjs → local-Be3lg_9E.mjs} +1 -1
  106. package/dist/{local-runtime-Dh3keC5v.mjs → local-runtime-Ce7k598H.mjs} +1 -1
  107. package/dist/logexplorer-CvRPoKbj.mjs +17 -0
  108. package/dist/logo-matches-Heuft3yF.mjs +2 -0
  109. package/dist/logos-DRYjGBDq.mjs +3 -0
  110. package/dist/{logpush-BK34mMQs.mjs → logpush-Dve9jOMp.mjs} +1 -1
  111. package/dist/{logs-CLAqX9h2.mjs → logs-SC86FE89.mjs} +1 -1
  112. package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
  113. package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
  114. package/dist/magic-transit-BK_3asH2.mjs +111 -0
  115. package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
  116. package/dist/matches-Iss9Fo4R.mjs +2 -0
  117. package/dist/mcp-8wxXT6JU.mjs +4 -0
  118. package/dist/mesh-Bf9UAS4J.mjs +4 -0
  119. package/dist/{moq-qmuVPAO0.mjs → moq-ZKMFOeVz.mjs} +1 -1
  120. package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
  121. package/dist/{network-D74cSy3t.mjs → network-B1lBARU9.mjs} +1 -1
  122. package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
  123. package/dist/oauth-DuEONNgC.mjs +14 -0
  124. package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
  125. package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
  126. package/dist/observability-Jya7-zkl.mjs +4 -0
  127. package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
  128. package/dist/{organization-NX7yCZrq.mjs → organization-CYxYV4e0.mjs} +6 -6
  129. package/dist/organizations-SacGUW44.mjs +2 -0
  130. package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
  131. package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
  132. package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
  133. package/dist/{output-DrpYYfnB.mjs → output-Ccqw2WOb.mjs} +1 -1
  134. package/dist/page-rules-BqEyFR2c.mjs +27 -0
  135. package/dist/pages-CQ7ZVWk1.mjs +14 -0
  136. package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
  137. package/dist/pipelines-6De2Pe2C.mjs +6 -0
  138. package/dist/precursor-iwK-1P_d.mjs +4 -0
  139. package/dist/progress-BqQcF5QH.mjs +2 -0
  140. package/dist/project-settings-C_1-JI6Y.mjs +3 -0
  141. package/dist/prompt-B0sWIs9c.mjs +3 -0
  142. package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
  143. package/dist/queries-c7zvnfEQ.mjs +3 -0
  144. package/dist/queues-BU6y16qS.mjs +6 -0
  145. package/dist/r2-Jo3QMahK.mjs +24 -0
  146. package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
  147. package/dist/radar-DIYAMEof.mjs +2 -0
  148. package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-DewOcznT.mjs} +1 -1
  149. package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
  150. package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-cnZEVNDn.mjs} +1 -1
  151. package/dist/registrar-BsWr_aPM.mjs +23 -0
  152. package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-BlcpUyIH.mjs} +4 -4
  153. package/dist/{registry-Bck_zFkz.mjs → registry-jifR3_Y6.mjs} +1 -1
  154. package/dist/reporting--1AyTV7k.mjs +2 -0
  155. package/dist/request-tracers-C_VX7X6-.mjs +2 -0
  156. package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
  157. package/dist/resource-tagging-C33U6T74.mjs +2 -0
  158. package/dist/rules-BfjzALMi.mjs +4 -0
  159. package/dist/rulesets-3i_1Vwt-.mjs +5 -0
  160. package/dist/rum-CjmIckiR.mjs +4 -0
  161. package/dist/{schema-B34Q9tLF.mjs → schema-1mwmslUV.mjs} +1 -1
  162. package/dist/schema-flags-llLJuFFw.mjs +5 -0
  163. package/dist/{scim-CcSyfKCH.mjs → scim-pApmzA5B.mjs} +1 -1
  164. package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-DBC9WJau.mjs} +1 -1
  165. package/dist/security-center-Djm06dq-.mjs +2 -0
  166. package/dist/{security-txt-DqnFpjMI.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
  167. package/dist/{share-BuwYUzOL.mjs → share-Dj-MNXrw.mjs} +4 -4
  168. package/dist/shared-BJvq4DkR.mjs +290 -0
  169. package/dist/smart-shield--8EpJjrF.mjs +4 -0
  170. package/dist/snippets-Dyz0PH60.mjs +4 -0
  171. package/dist/{spawn-O1RS01vr.mjs → spawn-C5Z7oWdp.mjs} +108 -112
  172. package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-rAHWz8rH.mjs} +1 -1
  173. package/dist/{speed-cw31yFva.mjs → speed-BKepWBXj.mjs} +1 -1
  174. package/dist/src-gJma71Ec.mjs +108 -0
  175. package/dist/{ssl-CsEhRVTO.mjs → ssl-KdFiY3ev.mjs} +1 -1
  176. package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
  177. package/dist/{state-Bb5Cbc_L.mjs → state-Cu3cItUg.mjs} +1 -1
  178. package/dist/{stream-DFOao6Gu.mjs → stream-CKJ6Tb0M.mjs} +13 -13
  179. package/dist/submit-BxbKKhBn.mjs +2 -0
  180. package/dist/tags-DA8dq9fx.mjs +2 -0
  181. package/dist/tenant-DLXw48hS.mjs +2 -0
  182. package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
  183. package/dist/{tools-BHfBOZOU.mjs → tools-x8bj9E6b.mjs} +1 -1
  184. package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CNQA5Flp.mjs} +1 -1
  185. package/dist/tunnels-CC10EOsU.mjs +2 -0
  186. package/dist/turnstile-CH58hnf4.mjs +23 -0
  187. package/dist/{ui-DE8CNn6c.mjs → ui-CmnnBm_O.mjs} +1 -1
  188. package/dist/url-info-BpCgdUtL.mjs +2 -0
  189. package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BzuynEy1.mjs} +1 -1
  190. package/dist/url-scanner-APIZbhB7.mjs +2 -0
  191. package/dist/user-2-NGebfI.mjs +12 -0
  192. package/dist/values-S_bNv819.mjs +2 -0
  193. package/dist/{vectorize-CVKu7lEt.mjs → vectorize-Bv7feLBC.mjs} +1 -1
  194. package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
  195. package/dist/{web-assets-C2s9kzWf.mjs → web-assets-C1UmOyzD.mjs} +1 -1
  196. package/dist/web3-GnUocVYH.mjs +4 -0
  197. package/dist/workers-J1-PLwdl.mjs +28 -0
  198. package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-DCHmWOMS.mjs} +1 -1
  199. package/dist/{workflows-B-kGHxFu.mjs → workflows-CArfEI2c.mjs} +1 -1
  200. package/dist/zaraz-mg2YlR3_.mjs +2 -0
  201. package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DVdUPtj1.mjs} +67 -66
  202. package/dist/zone-DMAfrDJX.mjs +2 -0
  203. package/dist/zones-CNwxUi7I.mjs +21 -0
  204. package/package.json +10 -7
  205. package/dist/account-CYRm3yoN.mjs +0 -2
  206. package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
  207. package/dist/ai-audit-BWZGvbca.mjs +0 -2
  208. package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
  209. package/dist/ai-search-BmdskMjR.mjs +0 -7
  210. package/dist/ai-security-CsmfcaUx.mjs +0 -4
  211. package/dist/ai-viHB1tgI.mjs +0 -5
  212. package/dist/analytics-vOxw8Hy0.mjs +0 -3
  213. package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
  214. package/dist/argo-CQfCgazW.mjs +0 -2
  215. package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
  216. package/dist/auth-D0xZxAEa.mjs +0 -5
  217. package/dist/billing-aJgapeRm.mjs +0 -3
  218. package/dist/body-parser-C-c9gfH1.mjs +0 -2
  219. package/dist/bot-management-Y2q5d-pi.mjs +0 -5
  220. package/dist/botnet-feed-DANJqfmE.mjs +0 -3
  221. package/dist/brand-protection-CjpZWBjp.mjs +0 -3
  222. package/dist/browser-run-BFn9h2Tz.mjs +0 -4
  223. package/dist/build-DcflwvqN.mjs +0 -2
  224. package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
  225. package/dist/cf-C7DU4819.mjs +0 -18
  226. package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
  227. package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
  228. package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
  229. package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
  230. package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
  231. package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
  232. package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
  233. package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
  234. package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
  235. package/dist/custom-pages-M7jA2Hit.mjs +0 -3
  236. package/dist/d1-BFvMd6-S.mjs +0 -20
  237. package/dist/data-security-Bji4Or_j.mjs +0 -7
  238. package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
  239. package/dist/deploy-input-CrvuoDGJ.mjs +0 -242
  240. package/dist/dist-CgrMkXFx.mjs +0 -72
  241. package/dist/durable-objects-D8FQORrL.mjs +0 -2
  242. package/dist/email-auth-DJK0Eb30.mjs +0 -2
  243. package/dist/email-routing-NpmiKIrl.mjs +0 -6
  244. package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
  245. package/dist/email-sending-dn-353Nx.mjs +0 -7
  246. package/dist/fieldExtractors-ahysj57J.mjs +0 -3
  247. package/dist/flagship-BusjRNIb.mjs +0 -4
  248. package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
  249. package/dist/iam-Cj63Kjc6.mjs +0 -6
  250. package/dist/images-CBWXCDhy.mjs +0 -8
  251. package/dist/ips-qs9eGJnI.mjs +0 -2
  252. package/dist/keys-D7N0j4-x.mjs +0 -2
  253. package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
  254. package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
  255. package/dist/logo-matches-CJcthPHf.mjs +0 -2
  256. package/dist/logos-BS65zN8q.mjs +0 -3
  257. package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
  258. package/dist/magic-transit-BtsFePMx.mjs +0 -111
  259. package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
  260. package/dist/matches-InA1hwII.mjs +0 -2
  261. package/dist/mcp-mJ7bekNJ.mjs +0 -4
  262. package/dist/mesh-BK4S1Ezy.mjs +0 -4
  263. package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
  264. package/dist/oauth-B0ETkNcX.mjs +0 -15
  265. package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
  266. package/dist/observability-BWE0Gg3V.mjs +0 -4
  267. package/dist/organizations-DLhiRt8g.mjs +0 -2
  268. package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
  269. package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
  270. package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
  271. package/dist/page-rules-BSz1gO-_.mjs +0 -18
  272. package/dist/pages-DVDogxPs.mjs +0 -14
  273. package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
  274. package/dist/pipelines-BszRk4sM.mjs +0 -6
  275. package/dist/precursor-BPNjQr76.mjs +0 -4
  276. package/dist/progress-CsHIt3Tp.mjs +0 -2
  277. package/dist/prompt-DdegNPpg.mjs +0 -3
  278. package/dist/queries-JL1H1Biz.mjs +0 -3
  279. package/dist/queues-DpkYdRUE.mjs +0 -6
  280. package/dist/r2-CKozthw_.mjs +0 -24
  281. package/dist/radar-C-92vggG.mjs +0 -2
  282. package/dist/raw-fetch-CteyTOM2.mjs +0 -2
  283. package/dist/registrar-DKKN0M29.mjs +0 -21
  284. package/dist/reporting-fg_GKXe1.mjs +0 -2
  285. package/dist/request-tracers-CkMya96z.mjs +0 -2
  286. package/dist/resource-tagging-z48JGHCq.mjs +0 -2
  287. package/dist/rules-BTmNjDN-.mjs +0 -4
  288. package/dist/rulesets-CsoSM-17.mjs +0 -5
  289. package/dist/rum-DB4iO2q5.mjs +0 -4
  290. package/dist/schema-flags-iGoOriJt.mjs +0 -5
  291. package/dist/security-center-DFKeHq5c.mjs +0 -2
  292. package/dist/session-D6KHthHf.mjs +0 -2
  293. package/dist/shared-VppSAQf4.mjs +0 -2
  294. package/dist/smart-shield-D6X8L7p8.mjs +0 -4
  295. package/dist/snippets-DIpc9pb_.mjs +0 -4
  296. package/dist/src-D_HETJNy.mjs +0 -108
  297. package/dist/submit--xTzyNPy.mjs +0 -2
  298. package/dist/tags-efICDkah.mjs +0 -2
  299. package/dist/tenant-CerHuToJ.mjs +0 -2
  300. package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
  301. package/dist/triggers-BEsiiKAf.mjs +0 -2
  302. package/dist/tunnels-D0J8lJoI.mjs +0 -2
  303. package/dist/turnstile-CFmtY5bn.mjs +0 -23
  304. package/dist/url-info-DBCeRWwb.mjs +0 -2
  305. package/dist/url-scanner-CNyvg65L.mjs +0 -2
  306. package/dist/user-bifVEQq5.mjs +0 -12
  307. package/dist/values-OxkdP1tV.mjs +0 -2
  308. package/dist/versions-BVL-Ludh.mjs +0 -2
  309. package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
  310. package/dist/web3-y_cY91V_.mjs +0 -4
  311. package/dist/workers-jDcq14GH.mjs +0 -24
  312. package/dist/zaraz-27zwjLvv.mjs +0 -2
  313. package/dist/zone-BJix2KQ9.mjs +0 -2
  314. package/dist/zones-Bkj5i92c.mjs +0 -21
  315. /package/dist/{alerts-CRmjqOZi.mjs → alerts-15-IW4jE.mjs} +0 -0
  316. /package/dist/{autorag-BD7cu5NU.mjs → autorag-CFwRkEKw.mjs} +0 -0
  317. /package/dist/{brands-BhALBkX2.mjs → brands-BgT1vu9B.mjs} +0 -0
  318. /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
  319. /package/dist/{clear-BgF8No7D.mjs → clear-BlCK85Me.mjs} +0 -0
  320. /package/dist/{cli-types-BsTty22w.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
  321. /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-BbpcII3_.mjs} +0 -0
  322. /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-DuCiimXl.mjs} +0 -0
  323. /package/dist/{domain-info-C50W5GhA.mjs → domain-info-C7LBxPBt.mjs} +0 -0
  324. /package/dist/{health-BFNZqiAm.mjs → health-DZFfafkX.mjs} +0 -0
  325. /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
  326. /package/dist/{internal-BTeSewwB.mjs → internal-BKHC2D1Y.mjs} +0 -0
  327. /package/dist/{live-Dkiyu30_.mjs → live-DwCvDmaH.mjs} +0 -0
  328. /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
  329. /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
  330. /package/dist/{ready-TKOkKeRg.mjs → ready-D9H2zHHI.mjs} +0 -0
  331. /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
  332. /package/dist/{refute-BVz9nMyd.mjs → refute-2W8NLCN4.mjs} +0 -0
  333. /package/dist/{resolve-CeBbH6Pq.mjs → resolve-B8CyM1mi.mjs} +0 -0
  334. /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
  335. /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-CWhta3x7.mjs} +0 -0
  336. /package/dist/{search-DGNc37HK.mjs → search-DZmBQJL9.mjs} +0 -0
  337. /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-CQrmWgz5.mjs} +0 -0
  338. /package/dist/{submission-info-FjUolE6A.mjs → submission-info-C98A0bqq.mjs} +0 -0
  339. /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
  340. /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-BZoaFoDE.mjs} +0 -0
  341. /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
  342. /package/dist/{verify-DS1PWAJe.mjs → verify-4e4L9IRk.mjs} +0 -0
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e}from"./chunk-vbHwaUoU.mjs";import{a as t}from"./public-BwQqexwo-CNW_dPly.mjs";import*as n from"node:module";import{fileURLToPath as r,pathToFileURL as i}from"node:url";import{AsyncLocalStorage as a}from"node:async_hooks";var o;const s=Object.freeze({status:`aborted`});function c(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var l=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},u=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(o=globalThis).__zod_globalConfig??(o.__zod_globalConfig={});const d=globalThis.__zod_globalConfig;function f(e){return e&&Object.assign(d,e),d}function p(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function m(e,t){return typeof t==`bigint`?t.toString():t}function h(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function g(e){return e==null}function _(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}const v=Symbol(`evaluating`);function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==v)return r===void 0&&(r=v,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function b(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function x(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function te(e){return JSON.stringify(e)}function ne(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}const re=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function S(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const ie=h(()=>{if(d.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function C(e){if(S(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(S(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function w(e){return C(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const ae=new Set([`string`,`number`,`symbol`]),oe=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function T(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}const ce={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function le(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return b(this,`shape`,e),e},checks:[]}))}function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,x(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return b(this,`shape`,r),r},checks:[]}))}function de(e,t){if(!C(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function fe(e,t){if(!C(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return b(this,`shape`,n),n}}))}function pe(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,x(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return b(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function me(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return b(this,`shape`,i),i},checks:[]}))}function he(e,t,n){return E(t,x(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return b(this,`shape`,i),i}}))}function O(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ge(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function k(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function _e(e){return typeof e==`string`?e:e?.message}function A(e,t,n){let r=e.message?e.message:_e(e.inst?._zod.def?.error?.(e))??_e(t?.error?.(e))??_e(n.customError?.(e))??_e(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ve(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function j(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}const ye=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,m,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},be=c(`$ZodError`,ye),xe=c(`$ZodError`,ye,{Parent:Error});function Se(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ce(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}const we=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new l;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Te=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>A(e,a,f())));throw re(t,i?.callee),t}return o.value},Ee=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new l;return a.issues.length?{success:!1,error:new(e??be)(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},De=Ee(xe),Oe=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>A(e,i,f())))}:{success:!0,data:a.value}},ke=Oe(xe),Ae=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return we(e)(t,n,i)},je=e=>(t,n,r)=>we(e)(t,n,r),Me=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Te(e)(t,n,i)},Ne=e=>async(t,n,r)=>Te(e)(t,n,r),Pe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ee(e)(t,n,i)},Fe=e=>(t,n,r)=>Ee(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oe(e)(t,n,i)},Le=e=>async(t,n,r)=>Oe(e)(t,n,r),Re=/^[cC][0-9a-z]{6,}$/,ze=/^[0-9a-z]+$/,Be=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ve=/^[0-9a-vA-V]{20}$/,He=/^[A-Za-z0-9]{27}$/,Ue=/^[a-zA-Z0-9_-]{21}$/,We=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ge=/^([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})$/,Ke=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,qe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;function Je(){return RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)}const Ye=/^(?:(?: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])$/,Xe=/^(([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}|:))$/,Ze=/^((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])$/,Qe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$e=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,et=/^[A-Za-z0-9_-]*$/,tt=/^https?$/,nt=/^\+[1-9]\d{6,14}$/,rt=`(?:(?:\\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])))`,it=RegExp(`^${rt}$`);function at(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ot(e){return RegExp(`^${at(e)}$`)}function st(e){let t=at({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${rt}T(?:${r})$`)}const ct=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},lt=/^-?\d+$/,ut=/^-?\d+(?:\.\d+)?$/,dt=/^(?:true|false)$/i,ft=/^null$/i,pt=/^[^A-Z]*$/,mt=/^[^a-z]*$/,M=c(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ht={number:`number`,bigint:`bigint`,object:`date`},gt=c(`$ZodCheckLessThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_t=c(`$ZodCheckGreaterThan`,(e,t)=>{M.init(e,t);let n=ht[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vt=c(`$ZodCheckMultipleOf`,(e,t)=>{M.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),yt=c(`$ZodCheckNumberFormat`,(e,t)=>{M.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ce[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=lt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),bt=c(`$ZodCheckMaxLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=ve(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xt=c(`$ZodCheckMinLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=ve(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),St=c(`$ZodCheckLengthEquals`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!g(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=ve(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Ct=c(`$ZodCheckStringFormat`,(e,t)=>{var n,r;M.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),wt=c(`$ZodCheckRegex`,(e,t)=>{Ct.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tt=c(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pt,Ct.init(e,t)}),Et=c(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mt,Ct.init(e,t)}),Dt=c(`$ZodCheckIncludes`,(e,t)=>{M.init(e,t);let n=T(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ot=c(`$ZodCheckStartsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`^${T(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),kt=c(`$ZodCheckEndsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`.*${T(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),At=c(`$ZodCheckOverwrite`,(e,t)=>{M.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});var jt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
3
- `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
4
- `))}};const Mt={major:4,minor:4,patch:3},N=c(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Mt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=O(e),i;for(let a of t){if(a._zod.def.when){if(ge(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new l;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=O(e,t))});else{if(e.issues.length===t)continue;r||=O(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(O(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new l;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new l;return o.then(e=>t(e,r,a))}return t(o,r,a)}}y(e,`~standard`,()=>({validate:t=>{try{let n=De(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ke(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Nt=c(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ct(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=c(`$ZodStringFormat`,(e,t)=>{Ct.init(e,t),Nt.init(e,t)}),Pt=c(`$ZodGUID`,(e,t)=>{t.pattern??=Ge,P.init(e,t)}),Ft=c(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ke(e)}else t.pattern??=Ke();P.init(e,t)}),It=c(`$ZodEmail`,(e,t)=>{t.pattern??=qe,P.init(e,t)}),Lt=c(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===tt.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Rt=c(`$ZodEmoji`,(e,t)=>{t.pattern??=Je(),P.init(e,t)}),zt=c(`$ZodNanoID`,(e,t)=>{t.pattern??=Ue,P.init(e,t)}),Bt=c(`$ZodCUID`,(e,t)=>{t.pattern??=Re,P.init(e,t)}),Vt=c(`$ZodCUID2`,(e,t)=>{t.pattern??=ze,P.init(e,t)}),Ht=c(`$ZodULID`,(e,t)=>{t.pattern??=Be,P.init(e,t)}),Ut=c(`$ZodXID`,(e,t)=>{t.pattern??=Ve,P.init(e,t)}),Wt=c(`$ZodKSUID`,(e,t)=>{t.pattern??=He,P.init(e,t)}),Gt=c(`$ZodISODateTime`,(e,t)=>{t.pattern??=st(t),P.init(e,t)}),Kt=c(`$ZodISODate`,(e,t)=>{t.pattern??=it,P.init(e,t)}),qt=c(`$ZodISOTime`,(e,t)=>{t.pattern??=ot(t),P.init(e,t)}),Jt=c(`$ZodISODuration`,(e,t)=>{t.pattern??=We,P.init(e,t)}),Yt=c(`$ZodIPv4`,(e,t)=>{t.pattern??=Ye,P.init(e,t),e._zod.bag.format=`ipv4`}),Xt=c(`$ZodIPv6`,(e,t)=>{t.pattern??=Xe,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Zt=c(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ze,P.init(e,t)}),Qt=c(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Qe,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function $t(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const en=c(`$ZodBase64`,(e,t)=>{t.pattern??=$e,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$t(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tn(e){if(!et.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $t(t.padEnd(Math.ceil(t.length/4)*4,`=`))}const nn=c(`$ZodBase64URL`,(e,t)=>{t.pattern??=et,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rn=c(`$ZodE164`,(e,t)=>{t.pattern??=nt,P.init(e,t)});function an(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}const on=c(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{an(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),sn=c(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??ut,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),cn=c(`$ZodNumberFormat`,(e,t)=>{yt.init(e,t),sn.init(e,t)}),ln=c(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=dt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),un=c(`$ZodNull`,(e,t)=>{N.init(e,t),e._zod.pattern=ft,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),dn=c(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),fn=c(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function pn(e,t,n){e.issues.length&&t.issues.push(...k(n,e.issues)),t.value[n]=e.value}const mn=c(`$ZodArray`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>pn(t,n,e))):pn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function hn(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...k(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function gn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=se(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _n(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>hn(e,n,i,t,u,d))):hn(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}const vn=c(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=h(()=>gn(t));y(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=S,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>hn(n,t,e,s,r,i))):hn(a,t,e,s,r,i)}return i?_n(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),yn=c(`$ZodObjectJIT`,(e,t)=>{vn.init(e,t);let n=e._zod.parse,r=h(()=>gn(t)),i=e=>{let t=new jt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=te(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=te(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
5
- if (${n}.issues.length) {
6
- if (${o} in input) {
7
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
8
- ...iss,
9
- path: iss.path ? [${o}, ...iss.path] : [${o}]
10
- })));
11
- }
12
- }
13
-
14
- if (${n}.value === undefined) {
15
- if (${o} in input) {
16
- newResult[${o}] = undefined;
17
- }
18
- } else {
19
- newResult[${o}] = ${n}.value;
20
- }
21
-
22
- `):c?t.write(`
23
- if (${n}.issues.length) {
24
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
25
- ...iss,
26
- path: iss.path ? [${o}, ...iss.path] : [${o}]
27
- })));
28
- }
29
-
30
- if (${n}.value === undefined) {
31
- if (${o} in input) {
32
- newResult[${o}] = undefined;
33
- }
34
- } else {
35
- newResult[${o}] = ${n}.value;
36
- }
37
-
38
- `):t.write(`
39
- const ${n}_present = ${o} in input;
40
- if (${n}.issues.length) {
41
- payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
42
- ...iss,
43
- path: iss.path ? [${o}, ...iss.path] : [${o}]
44
- })));
45
- }
46
- if (!${n}_present && !${n}.issues.length) {
47
- payload.issues.push({
48
- code: "invalid_type",
49
- expected: "nonoptional",
50
- input: undefined,
51
- path: [${o}]
52
- });
53
- }
54
-
55
- if (${n}_present) {
56
- if (${n}.value === undefined) {
57
- newResult[${o}] = undefined;
58
- } else {
59
- newResult[${o}] = ${n}.value;
60
- }
61
- }
62
-
63
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=S,s=!d.jitless,c=s&&ie.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?_n([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function bn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!O(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>A(e,r,f())))}),t)}const xn=c(`$ZodUnion`,(e,t)=>{N.init(e,t),y(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),y(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),y(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),y(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>_(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>bn(t,r,e,i)):bn(o,r,e,i)}}),Sn=c(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,xn.init(e,t);let n=e._zod.parse;y(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=h(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!S(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Cn=c(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Tn(e,t,n)):Tn(e,i,a)}});function wn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(C(e)&&C(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=wn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=wn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Tn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),O(e))return e;let o=wn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const En=c(`$ZodRecord`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!C(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>A(e,r,f())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...k(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...k(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ut.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>A(e,r,f())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...k(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...k(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Dn=c(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=p(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ae.has(typeof e)).map(e=>typeof e==`string`?T(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),On=c(`$ZodLiteral`,(e,t)=>{if(N.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?T(e):e?T(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),kn=c(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new u(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new l;return n.value=i,n.fallback=!0,n}});function An(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const jn=c(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${_(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>An(e,r)):An(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Mn=c(`$ZodExactOptional`,(e,t)=>{jn.init(e,t),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Nn=c(`$ZodNullable`,(e,t)=>{N.init(e,t),y(e._zod,`optin`,()=>t.innerType._zod.optin),y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${_(e.source)}|null)$`):void 0}),y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Pn=c(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Fn(e,t)):Fn(r,t)}});function Fn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const In=c(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ln=c(`$ZodNonOptional`,(e,t)=>{N.init(e,t),y(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Rn(t,e)):Rn(i,e)}});function Rn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const zn=c(`$ZodCatch`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>A(e,n,f()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>A(e,n,f()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Bn=c(`$ZodPipe`,(e,t)=>{N.init(e,t),y(e._zod,`values`,()=>t.in._zod.values),y(e._zod,`optin`,()=>t.in._zod.optin),y(e._zod,`optout`,()=>t.out._zod.optout),y(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Vn(e,t.in,n)):Vn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Vn(e,t.out,n)):Vn(r,t.out,n)}});function Vn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}const Hn=c(`$ZodReadonly`,(e,t)=>{N.init(e,t),y(e._zod,`propValues`,()=>t.innerType._zod.propValues),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`optin`,()=>t.innerType?._zod?.optin),y(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Un):Un(r)}});function Un(e){return e.value=Object.freeze(e.value),e}const Wn=c(`$ZodTemplateLiteral`,(e,t)=>{N.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||oe.has(typeof e))n.push(T(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Gn=c(`$ZodLazy`,(e,t)=>{N.init(e,t),y(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),y(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),y(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),y(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),y(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Kn=c(`$ZodCustom`,(e,t)=>{M.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>qn(t,n,r,e));qn(i,n,r,e)}});function qn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(j(e))}}var Jn,Yn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Xn(){return new Yn}(Jn=globalThis).__zod_globalRegistry??(Jn.__zod_globalRegistry=Xn());const Zn=globalThis.__zod_globalRegistry;function Qn(e,t){return new e({type:`string`,...D(t)})}function $n(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...D(t)})}function er(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...D(t)})}function tr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...D(t)})}function nr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...D(t)})}function rr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...D(t)})}function ir(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...D(t)})}function ar(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...D(t)})}function or(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...D(t)})}function sr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...D(t)})}function cr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...D(t)})}function lr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...D(t)})}function ur(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...D(t)})}function dr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...D(t)})}function fr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...D(t)})}function pr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...D(t)})}function mr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...D(t)})}function hr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...D(t)})}function gr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...D(t)})}function _r(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...D(t)})}function vr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...D(t)})}function yr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...D(t)})}function br(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...D(t)})}function xr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...D(t)})}function Sr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...D(t)})}function Cr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...D(t)})}function wr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...D(t)})}function Tr(e,t){return new e({type:`number`,checks:[],...D(t)})}function Er(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...D(t)})}function Dr(e,t){return new e({type:`boolean`,...D(t)})}function Or(e,t){return new e({type:`null`,...D(t)})}function kr(e){return new e({type:`unknown`})}function Ar(e,t){return new e({type:`never`,...D(t)})}function jr(e,t){return new gt({check:`less_than`,...D(t),value:e,inclusive:!1})}function Mr(e,t){return new gt({check:`less_than`,...D(t),value:e,inclusive:!0})}function Nr(e,t){return new _t({check:`greater_than`,...D(t),value:e,inclusive:!1})}function Pr(e,t){return new _t({check:`greater_than`,...D(t),value:e,inclusive:!0})}function Fr(e,t){return new vt({check:`multiple_of`,...D(t),value:e})}function Ir(e,t){return new bt({check:`max_length`,...D(t),maximum:e})}function Lr(e,t){return new xt({check:`min_length`,...D(t),minimum:e})}function Rr(e,t){return new St({check:`length_equals`,...D(t),length:e})}function zr(e,t){return new wt({check:`string_format`,format:`regex`,...D(t),pattern:e})}function Br(e){return new Tt({check:`string_format`,format:`lowercase`,...D(e)})}function Vr(e){return new Et({check:`string_format`,format:`uppercase`,...D(e)})}function Hr(e,t){return new Dt({check:`string_format`,format:`includes`,...D(t),includes:e})}function Ur(e,t){return new Ot({check:`string_format`,format:`starts_with`,...D(t),prefix:e})}function Wr(e,t){return new kt({check:`string_format`,format:`ends_with`,...D(t),suffix:e})}function F(e){return new At({check:`overwrite`,tx:e})}function Gr(e){return F(t=>t.normalize(e))}function Kr(){return F(e=>e.trim())}function qr(){return F(e=>e.toLowerCase())}function Jr(){return F(e=>e.toUpperCase())}function Yr(){return F(e=>ne(e))}function Xr(e,t,n){return new e({type:`array`,element:t,...D(n)})}function Zr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...D(n)})}function Qr(e,t){let n=$r(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(j(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(j(r))}},e(t.value,t)),t);return n}function $r(e,t){let n=new M({check:`custom`,...D(t)});return n._zod.check=e,n}function ei(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Zn,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function I(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,I(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&L(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ti(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
64
-
65
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ni(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:ii(t,`input`,e.processors),output:ii(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function L(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return L(r.element,n);if(r.type===`set`)return L(r.valueType,n);if(r.type===`lazy`)return L(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return L(r.innerType,n);if(r.type===`intersection`)return L(r.left,n)||L(r.right,n);if(r.type===`record`||r.type===`map`)return L(r.keyType,n)||L(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:L(r.in,n)||L(r.out,n);if(r.type===`object`){for(let e in r.shape)if(L(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(L(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(L(e,n))return!0;return!!(r.rest&&L(r.rest,n))}return!1}const ri=(e,t={})=>n=>{let r=ei({...n,processors:t});return I(e,r),ti(r,e),ni(r,e)},ii=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ei({...i??{},target:a,io:t,processors:n});return I(e,o),ti(o,e),ni(o,e)},ai={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},oi=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ai[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},si=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ci=(e,t,n,r)=>{n.type=`boolean`},li=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ui=(e,t,n,r)=>{n.not={}},di=(e,t,n,r)=>{let i=e._zod.def,a=p(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},fi=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},pi=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},mi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},hi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},gi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=I(a.element,t,{...r,path:[...r.path,`items`]})},_i=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=I(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=I(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},vi=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>I(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},yi=(e,t,n,r)=>{let i=e._zod.def,a=I(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=I(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},bi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=I(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=I(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=I(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},xi=(e,t,n,r)=>{let i=e._zod.def,a=I(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Si=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ci=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},wi=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Ti=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ei=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;I(o,t,r);let s=t.seen.get(e);s.ref=o},Di=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Oi=(e,t,n,r)=>{let i=e._zod.def;I(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ki=(e,t,n,r)=>{let i=e._zod.innerType;I(i,t,r);let a=t.seen.get(e);a.ref=i},Ai=c(`ZodISODateTime`,(e,t)=>{Gt.init(e,t),V.init(e,t)});function ji(e){return xr(Ai,e)}const Mi=c(`ZodISODate`,(e,t)=>{Kt.init(e,t),V.init(e,t)});function Ni(e){return Sr(Mi,e)}const Pi=c(`ZodISOTime`,(e,t)=>{qt.init(e,t),V.init(e,t)});function Fi(e){return Cr(Pi,e)}const Ii=c(`ZodISODuration`,(e,t)=>{Jt.init(e,t),V.init(e,t)});function Li(e){return wr(Ii,e)}const R=c(`ZodError`,(e,t)=>{be.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ce(e,t)},flatten:{value:t=>Se(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,m,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,m,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Ri=we(R),zi=Te(R),Bi=Ee(R),Vi=Oe(R),Hi=Ae(R),Ui=je(R),Wi=Me(R),Gi=Ne(R),Ki=Pe(R),qi=Fe(R),Ji=Ie(R),Yi=Le(R),Xi=new WeakMap;function Zi(e,t,n){let r=Object.getPrototypeOf(e),i=Xi.get(r);if(i||(i=new Set,Xi.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const z=c(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ii(e,`input`),output:ii(e,`output`)}}),e.toJSONSchema=ri(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Ri(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Bi(e,t,n),e.parseAsync=async(t,n)=>zi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Vi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Hi(e,t,n),e.decode=(t,n)=>Ui(e,t,n),e.encodeAsync=async(t,n)=>Wi(e,t,n),e.decodeAsync=async(t,n)=>Gi(e,t,n),e.safeEncode=(t,n)=>Ki(e,t,n),e.safeDecode=(t,n)=>qi(e,t,n),e.safeEncodeAsync=async(t,n)=>Ji(e,t,n),e.safeDecodeAsync=async(t,n)=>Yi(e,t,n),Zi(e,`ZodType`,{check(...e){let t=this.def;return this.clone(x(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return E(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fo(e,t))},superRefine(e,t){return this.check(po(e,t))},overwrite(e){return this.check(F(e))},optional(){return Ua(this)},exactOptional(){return Ga(this)},nullable(){return qa(this)},nullish(){return Ua(qa(this))},nonoptional(e){return $a(this,e)},array(){return G(this)},or(e){return q([this,e])},and(e){return Ia(this,e)},transform(e){return ro(this,Va(e))},default(e){return Ya(this,e)},prefault(e){return Za(this,e)},catch(e){return to(this,e)},pipe(e){return ro(this,e)},readonly(){return ao(this)},describe(e){let t=this.clone();return Zn.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zn.get(this);let t=this.clone();return Zn.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return Zn.get(e)?.description},configurable:!0}),e)),Qi=c(`_ZodString`,(e,t)=>{Nt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oi(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Zi(e,`_ZodString`,{regex(...e){return this.check(zr(...e))},includes(...e){return this.check(Hr(...e))},startsWith(...e){return this.check(Ur(...e))},endsWith(...e){return this.check(Wr(...e))},min(...e){return this.check(Lr(...e))},max(...e){return this.check(Ir(...e))},length(...e){return this.check(Rr(...e))},nonempty(...e){return this.check(Lr(1,...e))},lowercase(e){return this.check(Br(e))},uppercase(e){return this.check(Vr(e))},trim(){return this.check(Kr())},normalize(...e){return this.check(Gr(...e))},toLowerCase(){return this.check(qr())},toUpperCase(){return this.check(Jr())},slugify(){return this.check(Yr())}})}),$i=c(`ZodString`,(e,t)=>{Nt.init(e,t),Qi.init(e,t),e.email=t=>e.check($n(ea,t)),e.url=t=>e.check(ar(ra,t)),e.jwt=t=>e.check(br(va,t)),e.emoji=t=>e.check(or(ia,t)),e.guid=t=>e.check(er(ta,t)),e.uuid=t=>e.check(tr(na,t)),e.uuidv4=t=>e.check(nr(na,t)),e.uuidv6=t=>e.check(rr(na,t)),e.uuidv7=t=>e.check(ir(na,t)),e.nanoid=t=>e.check(sr(aa,t)),e.guid=t=>e.check(er(ta,t)),e.cuid=t=>e.check(cr(oa,t)),e.cuid2=t=>e.check(lr(sa,t)),e.ulid=t=>e.check(ur(ca,t)),e.base64=t=>e.check(_r(ha,t)),e.base64url=t=>e.check(vr(ga,t)),e.xid=t=>e.check(dr(la,t)),e.ksuid=t=>e.check(fr(ua,t)),e.ipv4=t=>e.check(pr(da,t)),e.ipv6=t=>e.check(mr(fa,t)),e.cidrv4=t=>e.check(hr(pa,t)),e.cidrv6=t=>e.check(gr(ma,t)),e.e164=t=>e.check(yr(_a,t)),e.datetime=t=>e.check(ji(t)),e.date=t=>e.check(Ni(t)),e.time=t=>e.check(Fi(t)),e.duration=t=>e.check(Li(t))});function B(e){return Qn($i,e)}const V=c(`ZodStringFormat`,(e,t)=>{P.init(e,t),Qi.init(e,t)}),ea=c(`ZodEmail`,(e,t)=>{It.init(e,t),V.init(e,t)}),ta=c(`ZodGUID`,(e,t)=>{Pt.init(e,t),V.init(e,t)}),na=c(`ZodUUID`,(e,t)=>{Ft.init(e,t),V.init(e,t)}),ra=c(`ZodURL`,(e,t)=>{Lt.init(e,t),V.init(e,t)}),ia=c(`ZodEmoji`,(e,t)=>{Rt.init(e,t),V.init(e,t)}),aa=c(`ZodNanoID`,(e,t)=>{zt.init(e,t),V.init(e,t)}),oa=c(`ZodCUID`,(e,t)=>{Bt.init(e,t),V.init(e,t)}),sa=c(`ZodCUID2`,(e,t)=>{Vt.init(e,t),V.init(e,t)}),ca=c(`ZodULID`,(e,t)=>{Ht.init(e,t),V.init(e,t)}),la=c(`ZodXID`,(e,t)=>{Ut.init(e,t),V.init(e,t)}),ua=c(`ZodKSUID`,(e,t)=>{Wt.init(e,t),V.init(e,t)}),da=c(`ZodIPv4`,(e,t)=>{Yt.init(e,t),V.init(e,t)}),fa=c(`ZodIPv6`,(e,t)=>{Xt.init(e,t),V.init(e,t)}),pa=c(`ZodCIDRv4`,(e,t)=>{Zt.init(e,t),V.init(e,t)}),ma=c(`ZodCIDRv6`,(e,t)=>{Qt.init(e,t),V.init(e,t)}),ha=c(`ZodBase64`,(e,t)=>{en.init(e,t),V.init(e,t)}),ga=c(`ZodBase64URL`,(e,t)=>{nn.init(e,t),V.init(e,t)}),_a=c(`ZodE164`,(e,t)=>{rn.init(e,t),V.init(e,t)}),va=c(`ZodJWT`,(e,t)=>{on.init(e,t),V.init(e,t)}),ya=c(`ZodNumber`,(e,t)=>{sn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>si(e,t,n,r),Zi(e,`ZodNumber`,{gt(e,t){return this.check(Nr(e,t))},gte(e,t){return this.check(Pr(e,t))},min(e,t){return this.check(Pr(e,t))},lt(e,t){return this.check(jr(e,t))},lte(e,t){return this.check(Mr(e,t))},max(e,t){return this.check(Mr(e,t))},int(e){return this.check(xa(e))},safe(e){return this.check(xa(e))},positive(e){return this.check(Nr(0,e))},nonnegative(e){return this.check(Pr(0,e))},negative(e){return this.check(jr(0,e))},nonpositive(e){return this.check(Mr(0,e))},multipleOf(e,t){return this.check(Fr(e,t))},step(e,t){return this.check(Fr(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function H(e){return Tr(ya,e)}const ba=c(`ZodNumberFormat`,(e,t)=>{cn.init(e,t),ya.init(e,t)});function xa(e){return Er(ba,e)}const Sa=c(`ZodBoolean`,(e,t)=>{ln.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ci(e,t,n,r)});function U(e){return Dr(Sa,e)}const Ca=c(`ZodNull`,(e,t)=>{un.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>li(e,t,n,r)});function wa(e){return Or(Ca,e)}const Ta=c(`ZodUnknown`,(e,t)=>{dn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function W(){return kr(Ta)}const Ea=c(`ZodNever`,(e,t)=>{fn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r)});function Da(e){return Ar(Ea,e)}const Oa=c(`ZodArray`,(e,t)=>{mn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r),e.element=t.element,Zi(e,`ZodArray`,{min(e,t){return this.check(Lr(e,t))},nonempty(e){return this.check(Lr(1,e))},max(e,t){return this.check(Ir(e,t))},length(e,t){return this.check(Rr(e,t))},unwrap(){return this.element}})});function G(e,t){return Xr(Oa,e,t)}const ka=c(`ZodObject`,(e,t)=>{yn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),y(e,`shape`,()=>t.shape),Zi(e,`ZodObject`,{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:W()})},loose(){return this.clone({...this._zod.def,catchall:W()})},strict(){return this.clone({...this._zod.def,catchall:Da()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return de(this,e)},safeExtend(e){return fe(this,e)},merge(e){return pe(this,e)},pick(e){return le(this,e)},omit(e){return ue(this,e)},partial(...e){return me(Ha,this,e[0])},required(...e){return he(Qa,this,e[0])}})});function Aa(e,t){return new ka({type:`object`,shape:e??{},...D(t)})}function K(e,t){return new ka({type:`object`,shape:e,catchall:Da(),...D(t)})}function ja(e,t){return new ka({type:`object`,shape:e,catchall:W(),...D(t)})}const Ma=c(`ZodUnion`,(e,t)=>{xn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.options=t.options});function q(e,t){return new Ma({type:`union`,options:e,...D(t)})}const Na=c(`ZodDiscriminatedUnion`,(e,t)=>{Ma.init(e,t),Sn.init(e,t)});function Pa(e,t,n){return new Na({type:`union`,options:t,discriminator:e,...D(n)})}const Fa=c(`ZodIntersection`,(e,t)=>{Cn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r)});function Ia(e,t){return new Fa({type:`intersection`,left:e,right:t})}const La=c(`ZodRecord`,(e,t)=>{En.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function J(e,t,n){return!t||!t._zod?new La({type:`record`,keyType:B(),valueType:e,...D(t)}):new La({type:`record`,keyType:e,valueType:t,...D(n)})}const Ra=c(`ZodEnum`,(e,t)=>{Dn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ra({...t,checks:[],...D(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ra({...t,checks:[],...D(r),entries:i})}});function Y(e,t){return new Ra({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...D(t)})}const za=c(`ZodLiteral`,(e,t)=>{On.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function X(e,t){return new za({type:`literal`,values:Array.isArray(e)?e:[e],...D(t)})}const Ba=c(`ZodTransform`,(e,t)=>{kn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new u(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(j(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(j(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Va(e){return new Ba({type:`transform`,transform:e})}const Ha=c(`ZodOptional`,(e,t)=>{jn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ua(e){return new Ha({type:`optional`,innerType:e})}const Wa=c(`ZodExactOptional`,(e,t)=>{Mn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Wa({type:`optional`,innerType:e})}const Ka=c(`ZodNullable`,(e,t)=>{Nn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ka({type:`nullable`,innerType:e})}const Ja=c(`ZodDefault`,(e,t)=>{Pn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ya(e,t){return new Ja({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():w(t)}})}const Xa=c(`ZodPrefault`,(e,t)=>{In.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Za(e,t){return new Xa({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():w(t)}})}const Qa=c(`ZodNonOptional`,(e,t)=>{Ln.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $a(e,t){return new Qa({type:`nonoptional`,innerType:e,...D(t)})}const eo=c(`ZodCatch`,(e,t)=>{zn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function to(e,t){return new eo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const no=c(`ZodPipe`,(e,t)=>{Bn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.in=t.in,e.out=t.out});function ro(e,t){return new no({type:`pipe`,in:e,out:t})}const io=c(`ZodReadonly`,(e,t)=>{Hn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new io({type:`readonly`,innerType:e})}const oo=c(`ZodTemplateLiteral`,(e,t)=>{Wn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r)});function so(e,t){return new oo({type:`template_literal`,parts:e,...D(t)})}const co=c(`ZodLazy`,(e,t)=>{Gn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function lo(e){return new co({type:`lazy`,getter:e})}const uo=c(`ZodCustom`,(e,t)=>{Kn.init(e,t),z.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r)});function fo(e,t={}){return Zr(uo,e,t)}function po(e,t){return Qr(e,t)}function mo(e){let t=lo(()=>q([B(e),H(),U(),wa(),G(t),J(B(),t)]));return t}var ho=e({AnalyticsEngineDatasetBindingSchema:()=>To,AssetsSchema:()=>vo,BindingSchema:()=>Ao,BrowserBindingSchema:()=>yo,ConfigExportsSchema:()=>as,D1BindingSchema:()=>xo,DurableObjectCreatedExportSchema:()=>Lo,DurableObjectDeletedExportSchema:()=>Ro,DurableObjectExpectingTransferExportSchema:()=>Vo,DurableObjectRenamedExportSchema:()=>zo,DurableObjectTransferredExportSchema:()=>Bo,ExportSchema:()=>Uo,FlagshipBindingSchema:()=>Eo,HyperdriveBindingSchema:()=>Do,InputSettingsSchema:()=>Qo,InputWorkerSchema:()=>Zo,KVBindingSchema:()=>So,KnownBindingSchema:()=>Oo,ModuleTypeSchema:()=>os,OutputSettingsSchema:()=>$o,OutputWorkerSchema:()=>ls,QueueBindingSchema:()=>Co,R2BindingSchema:()=>wo,TailConsumerSchema:()=>qo,UnsafeBindingSchema:()=>ko,WorkerBindingSchema:()=>bo,WorkerEntrypointExportSchema:()=>Ho,convertToWranglerConfig:()=>hs,loadAndValidateConfig:()=>Is,loadConfig:()=>As,registerConfigHooks:()=>Ms,resolveExportDefinition:()=>t,validateSingletonBindings:()=>Fo}),go=Object.getOwnPropertyNames,_o=(e,t)=>function(){return t||(0,e[go(e)[0]])((t={exports:{}}).exports,t),t.exports};const Z=K({remote:U().optional()}),vo=K({htmlHandling:Y([`auto-trailing-slash`,`drop-trailing-slash`,`force-trailing-slash`,`none`]).optional(),notFoundHandling:Y([`single-page-application`,`404-page`,`none`]).optional(),runWorkerFirst:q([G(B()),U()]).optional()}),yo=K({type:X(`browser`),dev:Z.optional()}),bo=K({type:X(`worker`),worker:B(),exportName:B().optional(),props:J(B(),W()).optional(),dev:Z.optional()}),xo=K({type:X(`d1`),name:B().optional(),id:B().optional(),dev:Z.optional()}),So=K({type:X(`kv`),id:B().optional(),dev:Z.optional()}),Co=K({type:X(`queue`),name:B().optional(),deliveryDelay:H().optional(),dev:Z.optional()}),wo=K({type:X(`r2`),name:B().optional(),jurisdiction:B().optional(),dev:Z.extend({experimentalS3Credentials:Aa({accessKeyId:B(),secretAccessKey:B()}).optional()}).optional()}),To=K({type:X(`analytics-engine-dataset`),name:B().optional()}),Eo=K({type:X(`flagship`),id:B().optional(),dev:Z.optional()}),Do=K({type:X(`hyperdrive`),id:B(),dev:K({connectionString:B().optional()}).optional()}),Oo=Pa(`type`,[K({type:X(`agent-memory`),namespace:B(),dev:Z.optional()}),K({type:X(`ai`),dev:Z.optional()}),K({type:X(`ai-search`),name:B(),dev:Z.optional()}),K({type:X(`ai-search-namespace`),namespace:B(),dev:Z.optional()}),To,K({type:X(`artifacts`),namespace:B(),dev:Z.optional()}),K({type:X(`assets`)}),yo,xo,K({type:X(`dispatch-namespace`),namespace:B().optional(),outbound:K({worker:B(),parameters:G(B()).optional()}).optional(),dev:Z.optional()}),K({type:X(`durable-object`),worker:B(),exportName:B()}),Eo,Do,K({type:X(`images`),dev:Z.optional()}),K({type:X(`json`),value:mo()}),So,K({type:X(`logfwdr`),destination:B()}),K({type:X(`media`),dev:Z.optional()}),K({type:X(`mtls-certificate`),id:B(),dev:Z.optional()}),K({type:X(`pipeline`),name:B(),dev:Z.optional()}),Co,K({type:X(`rate-limit`),namespace:B(),simple:K({limit:H(),period:q([X(10),X(60)])})}),wo,K({type:X(`secret`)}),K({type:X(`secrets-store-secret`),storeId:B(),secretName:B()}),K({type:X(`send-email`),destinationAddress:B().optional(),allowedDestinationAddresses:G(B()).optional(),allowedSenderAddresses:G(B()).optional(),dev:Z.optional()}).refine(e=>e.destinationAddress===void 0||e.allowedDestinationAddresses===void 0,{message:`"send-email" bindings cannot specify both "destinationAddress" and "allowedDestinationAddresses"`}),K({type:X(`stream`),dev:Z.optional()}),K({type:X(`text`),value:B()}),K({type:X(`vectorize`),name:B(),dev:Z.optional()}),K({type:X(`version-metadata`)}),K({type:X(`vpc-service`),id:B(),dev:Z.optional()}),K({type:X(`vpc-network`),tunnelId:B().optional(),networkId:B().optional(),dev:Z.optional()}).refine(e=>e.tunnelId!==void 0!=(e.networkId!==void 0),{error:({input:e})=>{let t=e;return t.tunnelId!==void 0&&t.networkId!==void 0?`"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both`:`"vpc-network" bindings must specify either "tunnelId" or "networkId"`}}),K({type:X(`web-search`),dev:Z.optional()}),bo,K({type:X(`worker-loader`)})]),ko=ja({type:so([`unsafe:`,B().min(1)]),dev:K({plugin:K({package:B(),name:B()}),options:J(B(),W()).optional()}).optional()}),Ao=W().transform((e,t)=>{let n=(typeof e==`object`&&e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`unsafe:`)?ko:Oo).safeParse(e);return n.success?n.data:(t.issues.push(...n.error.issues),s)});function jo(e){return e.type.startsWith(`unsafe:`)}const Mo=K({enabled:U(),crossVersionCache:U().optional()}),No=new Set([`ai`,`assets`,`browser`,`images`,`media`,`stream`,`version-metadata`,`web-search`]),Po=new Intl.ListFormat(`en-US`);function Fo(e,t){let n=new Set,r=new Set;for(let t of Object.values(e)){let e=t.type;No.has(e)&&(n.has(e)&&r.add(e),n.add(e))}r.size>0&&t.addIssue({code:`custom`,message:`${Po.format([...r].sort())} bindings can only be defined once`})}const Io=J(B(),Ao).superRefine(Fo).optional(),Lo=K({type:X(`durable-object`),state:X(`created`).optional(),storage:Y([`sqlite`,`legacy-kv`]),container:B().optional()}),Ro=K({type:X(`durable-object`),state:X(`deleted`)}),zo=K({type:X(`durable-object`),state:X(`renamed`),renamedTo:B()}),Bo=K({type:X(`durable-object`),state:X(`transferred`),transferredTo:B()}),Vo=K({type:X(`durable-object`),state:X(`expecting-transfer`),storage:Y([`sqlite`,`legacy-kv`]),transferFrom:B(),container:B().optional()}),Ho=K({type:X(`worker`),cache:K({enabled:U()}).optional()}),Uo=q([Lo.extend({storage:X(`sqlite`)}),Lo.omit({container:!0}).extend({storage:X(`legacy-kv`)}),Ro,zo,Bo,Vo.extend({storage:X(`sqlite`)}),Vo.omit({container:!0}).extend({storage:X(`legacy-kv`)}),Ho]),Wo=K({cpuMs:H().optional(),subrequests:H().optional()}),Go=K({enabled:U().optional(),headSamplingRate:H().optional(),redactQueryString:U().optional(),logs:K({enabled:U().optional(),headSamplingRate:H().optional(),invocationLogs:U().optional(),persist:U().optional(),destinations:G(B()).optional()}).optional(),traces:K({enabled:U().optional(),headSamplingRate:H().optional(),persist:U().optional(),destinations:G(B()).optional()}).optional()}),Ko=q([K({mode:Y([`off`,`smart`]),hint:B().optional()}),K({mode:X(`targeted`).optional(),region:B()}),K({mode:X(`targeted`).optional(),host:B()}),K({mode:X(`targeted`).optional(),hostname:B()})]),qo=K({worker:B(),streaming:U().optional()}),Jo=Pa(`type`,[K({type:X(`email`),addresses:G(B())}),K({type:X(`fetch`),pattern:B(),zone:B().optional()}),K({type:X(`queue`),name:B(),deadLetterQueue:B().optional(),maxBatchSize:H().optional(),maxBatchTimeout:H().optional(),maxConcurrency:H().nullable().optional(),maxRetries:H().optional(),retryDelay:H().optional(),visibilityTimeoutMs:H().optional()}),K({type:X(`scheduled`),schedule:B()}),K({type:X(`connect`),protocol:Y([`tcp`]),port:H(),address:B().optional()})]),Yo=K({metadata:J(B(),W()).optional(),capnp:q([K({basePath:B(),sourceSchemas:G(B()),compiledSchema:Da().optional()}),K({basePath:Da().optional(),sourceSchemas:Da().optional(),compiledSchema:B()})]).optional()}),Xo=K({type:X(`worker`),name:B(),compatibilityDate:B(),compatibilityFlags:G(B()).optional(),assets:vo.optional(),domains:G(B()).optional(),triggers:G(Jo).optional(),tailConsumers:G(qo).optional(),cache:Mo.optional(),placement:Ko.optional(),limits:Wo.optional(),logpush:U().optional(),observability:Go.optional(),workersDev:U().optional(),previewUrls:U().optional(),firstPartyWorker:U().optional(),unsafe:Yo.optional(),env:Io,exports:J(B(),Uo).optional()}),Zo=Xo.extend({entrypoint:q([B(),K({default:B()})]).transform(e=>typeof e==`string`?e:e.default).optional()}),Qo=K({type:X(`settings`),accountId:B().optional(),complianceRegion:Y([`public`,`fedramp-high`]).optional()}),$o=Qo.extend({mode:B().optional()}),es=`settings`,ts=new Set([`worker`,`settings`]);function ns(e){return`The \`${e}\` export is not a supported export type. Move constants, helper functions, and other unsupported exports to a separate module.`}const rs=J(B(),W()).check(e=>{for(let[t,n]of Object.entries(e.value)){let r=typeof n==`object`&&!!n,i=r&&`type`in n?n.type:void 0;if(typeof i!=`string`||!ts.has(i)){e.issues.push({code:`custom`,input:n,path:r?[t,`type`]:[t],message:ns(t)});continue}let a=t===es,o=i===`settings`;o&&!a?e.issues.push({code:`custom`,input:n,path:[t],message:`A \`settings\` config is only allowed on the \`${es}\` export; found one on the \`${t}\` export.`}):a&&!o&&e.issues.push({code:`custom`,input:n,path:[t],message:`The \`${es}\` export is reserved for a \`settings\` config; found a \`${i}\` config.`})}}),is=Aa({settings:Qo.optional()}).catchall(Zo),as=rs.pipe(is),os=Y([`esm`,`cjs`,`python`,`python-requirement`,`wasm`,`text`,`data`,`json`,`sourcemap`]),ss=J(B(),K({type:os})),cs=K({type:Y([`partial`,`complete`]),mainModule:B(),modules:ss}).superRefine((e,t)=>{let n=e.modules[e.mainModule];e.type===`complete`&&n===void 0&&t.addIssue({code:`custom`,path:[`modules`,e.mainModule],message:`A complete manifest must include its main module.`}),e.type===`partial`&&n!==void 0&&t.addIssue({code:`custom`,path:[`modules`,e.mainModule],message:`A partial manifest must not include its main module.`})}),ls=Xo.extend({manifest:cs.optional()});_o({"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/dist/index.js":(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dedent=void 0;function t(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
66
- [ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
67
- `)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
68
- `)&&(o=String(e).split(`
69
- `).map(function(e,t){return t===0?e:``+i+e}).join(`
70
- `)),a+=o+n[t+1]}),a}e.dedent=t})})();var us=Object.defineProperty,Q=(e,t)=>us(e,`name`,{value:t,configurable:!0}),ds=class extends Error{static{Q(this,`UserError`)}telemetryMessage;constructor(e,t){super(e,t),Object.setPrototypeOf(this,new.target.prototype),this.telemetryMessage=typeof t?.telemetryMessage==`string`?t.telemetryMessage:t?.telemetryMessage?e:void 0}};(class extends ds{static{Q(this,`DeprecationError`)}constructor(e,t){super(`Deprecation:
71
- ${e}`,t)}});var fs=class extends ds{static{Q(this,`FatalError`)}code;constructor(e,t){super(e,t),this.code=t.code}};(class extends ds{static{Q(this,`CommandLineArgsError`)}});var ps=class extends fs{static{Q(this,`JsonFriendlyFatalError`)}};(class extends Error{static{Q(this,`MissingConfigError`)}telemetryMessage;constructor(e){super(`Missing config value for ${e}`),this.telemetryMessage=`Missing config value for ${e}`}});function ms(e,t,n){return t?new ps(JSON.stringify(e),n):new fs(`${e}`,n)}Q(ms,`createFatalError`);function hs(e,t){let n={};return _s(e,n),bs(e,n),xs(e,n),Cs(e,n),Ss(e,n),ws(e,n),t!==void 0&&gs(t,n),n}function gs(e,t){e.accountId!==void 0&&(t.account_id=e.accountId),e.complianceRegion!==void 0&&(t.compliance_region=e.complianceRegion===`fedramp-high`?`fedramp_high`:`public`)}function _s(e,t){if(e.name!==void 0&&(t.name=e.name),typeof e.entrypoint==`string`&&(t.main=e.entrypoint),e.compatibilityDate!==void 0&&(t.compatibility_date=e.compatibilityDate),e.compatibilityFlags!==void 0&&(t.compatibility_flags=e.compatibilityFlags),e.workersDev!==void 0&&(t.workers_dev=e.workersDev),e.previewUrls!==void 0&&(t.preview_urls=e.previewUrls),e.logpush!==void 0&&(t.logpush=e.logpush),e.firstPartyWorker!==void 0&&(t.first_party_worker=e.firstPartyWorker),e.placement!==void 0&&(t.placement=e.placement),e.limits!==void 0){let n={};e.limits.cpuMs!==void 0&&(n.cpu_ms=e.limits.cpuMs),e.limits.subrequests!==void 0&&(n.subrequests=e.limits.subrequests),t.limits=n}if(e.observability!==void 0&&(t.observability=vs(e.observability)),e.cache!==void 0){let n={enabled:e.cache.enabled};e.cache.crossVersionCache!==void 0&&(n.cross_version_cache=e.cache.crossVersionCache),t.cache=n}e.unsafe!==void 0&&(t.unsafe=ys(e.unsafe))}function vs(e){let t={};if(e.enabled!==void 0&&(t.enabled=e.enabled),e.headSamplingRate!==void 0&&(t.head_sampling_rate=e.headSamplingRate),e.redactQueryString!==void 0&&(t.redact_query_string=e.redactQueryString),e.logs!==void 0){let n={},{logs:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.invocationLogs!==void 0&&(n.invocation_logs=r.invocationLogs),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.logs=n}if(e.traces!==void 0){let n={},{traces:r}=e;r.enabled!==void 0&&(n.enabled=r.enabled),r.headSamplingRate!==void 0&&(n.head_sampling_rate=r.headSamplingRate),r.persist!==void 0&&(n.persist=r.persist),r.destinations!==void 0&&(n.destinations=r.destinations),t.traces=n}return t}function ys(e){let t={};return e.metadata!==void 0&&(t.metadata=e.metadata),e.capnp!==void 0&&(`compiledSchema`in e.capnp&&e.capnp.compiledSchema?t.capnp={compiled_schema:e.capnp.compiledSchema}:`basePath`in e.capnp&&e.capnp.basePath&&(t.capnp={base_path:e.capnp.basePath,source_schemas:e.capnp.sourceSchemas??[]})),t}function bs(e,t){let n,r=e.env??{},i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[],ee=[],v=[],y=[],b=[],x=[],te=[],ne=[],re=[],S=[],ie=[],C=[],w=[],ae={},oe=[];for(let[e,S]of Object.entries(r)){if(jo(S)){w.push({...S,name:e,type:S.type.slice(7)});continue}switch(S.type){case`agent-memory`:m.push($({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`ai`:t.ai=$({binding:e,remote:S.dev?.remote});break;case`ai-search`:f.push($({binding:e,instance_name:S.name,remote:S.dev?.remote}));break;case`ai-search-namespace`:p.push($({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`analytics-engine-dataset`:h.push($({binding:e,dataset:S.name}));break;case`artifacts`:g.push($({binding:e,namespace:S.namespace,remote:S.dev?.remote}));break;case`assets`:n=e;break;case`browser`:t.browser=$({binding:e,remote:S.dev?.remote});break;case`d1`:a.push($({binding:e,database_id:S.id,database_name:S.name,remote:S.dev?.remote}));break;case`dispatch-namespace`:{let t={binding:e,namespace:S.namespace};S.outbound&&(t.outbound=$({service:S.outbound.worker,parameters:S.outbound.parameters})),S.dev?.remote!==void 0&&(t.remote=S.dev.remote),_.push(t);break}case`durable-object`:re.push({name:e,class_name:S.exportName,script_name:S.worker});break;case`flagship`:d.push($({binding:e,app_id:S.id,remote:S.dev?.remote}));break;case`hyperdrive`:l.push($({binding:e,id:S.id,localConnectionString:S.dev?.connectionString}));break;case`images`:t.images=$({binding:e,remote:S.dev?.remote});break;case`json`:ae[e]=S.value;break;case`kv`:i.push($({binding:e,id:S.id,remote:S.dev?.remote}));break;case`logfwdr`:C.push({name:e,destination:S.destination});break;case`media`:t.media=$({binding:e,remote:S.dev?.remote});break;case`mtls-certificate`:c.push($({binding:e,certificate_id:S.id,remote:S.dev?.remote}));break;case`pipeline`:u.push($({binding:e,stream:S.name,remote:S.dev?.remote}));break;case`queue`:ie.push($({binding:e,queue:S.name,delivery_delay:S.deliveryDelay,remote:S.dev?.remote}));break;case`rate-limit`:te.push({name:e,namespace_id:S.namespace,simple:S.simple});break;case`r2`:{let t=S.dev?.experimentalS3Credentials;o.push($({binding:e,bucket_name:S.name,jurisdiction:S.jurisdiction,remote:S.dev?.remote,local_dev:t===void 0?void 0:{experimental_s3_credentials:t}}));break}case`secret`:oe.push(e);break;case`secrets-store-secret`:ee.push({binding:e,store_id:S.storeId,secret_name:S.secretName});break;case`send-email`:v.push($({name:e,destination_address:S.destinationAddress,allowed_destination_addresses:S.allowedDestinationAddresses,allowed_sender_addresses:S.allowedSenderAddresses,remote:S.dev?.remote}));break;case`stream`:t.stream=$({binding:e,remote:S.dev?.remote});break;case`text`:ae[e]=S.value;break;case`vectorize`:s.push($({binding:e,index_name:S.name,remote:S.dev?.remote}));break;case`version-metadata`:t.version_metadata={binding:e};break;case`vpc-service`:y.push($({binding:e,service_id:S.id,remote:S.dev?.remote}));break;case`vpc-network`:S.tunnelId===void 0?S.networkId!==void 0&&b.push($({binding:e,network_id:S.networkId,remote:S.dev?.remote})):b.push($({binding:e,tunnel_id:S.tunnelId,remote:S.dev?.remote}));break;case`web-search`:t.websearch=$({binding:e,remote:S.dev?.remote});break;case`worker`:ne.push($({binding:e,service:S.worker,entrypoint:S.exportName,props:S.props,remote:S.dev?.remote}));break;case`worker-loader`:x.push({binding:e});break}}if(i.length&&(t.kv_namespaces=i),a.length&&(t.d1_databases=a),o.length&&(t.r2_buckets=o),s.length&&(t.vectorize=s),c.length&&(t.mtls_certificates=c),l.length&&(t.hyperdrive=l),u.length&&(t.pipelines=u),d.length&&(t.flagship=d),f.length&&(t.ai_search=f),p.length&&(t.ai_search_namespaces=p),m.length&&(t.agent_memory=m),h.length&&(t.analytics_engine_datasets=h),g.length&&(t.artifacts=g),_.length&&(t.dispatch_namespaces=_),ee.length&&(t.secrets_store_secrets=ee),v.length&&(t.send_email=v),y.length&&(t.vpc_services=y),b.length&&(t.vpc_networks=b),x.length&&(t.worker_loaders=x),te.length&&(t.ratelimits=te),ne.length&&(t.services=ne),re.length&&(t.durable_objects={bindings:re}),S.length&&(t.workflows=S),ie.length&&(t.queues={...t.queues??{},producers:ie}),C.length&&(t.logfwdr={bindings:C}),w.length&&(t.unsafe={...t.unsafe??{},bindings:w}),Object.keys(ae).length&&(t.vars=ae),oe.length&&(t.secrets={required:oe}),e.assets!==void 0||n!==void 0){let r={};n!==void 0&&(r.binding=n),e.assets?.htmlHandling!==void 0&&(r.html_handling=e.assets.htmlHandling),e.assets?.notFoundHandling!==void 0&&(r.not_found_handling=e.assets.notFoundHandling),e.assets?.runWorkerFirst!==void 0&&(r.run_worker_first=e.assets.runWorkerFirst),t.assets=r}}function xs(e,t){let n=e.exports;if(!n)return;let r={},i={};for(let[e,t]of Object.entries(n)){if(t.type===`worker`){r[e]=t;continue}if(t.type!==`durable-object`){i[e]=t;continue}switch(t.state){case void 0:case`created`:r[e]={type:`durable-object`,storage:t.storage,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break;case`deleted`:r[e]={type:`durable-object`,state:`deleted`};break;case`renamed`:r[e]={type:`durable-object`,state:`renamed`,renamed_to:t.renamedTo};break;case`transferred`:r[e]={type:`durable-object`,state:`transferred`,transferred_to:t.transferredTo};break;case`expecting-transfer`:r[e]={type:`durable-object`,state:`expecting-transfer`,storage:t.storage,transfer_from:t.transferFrom,...t.storage===`sqlite`&&t.container!==void 0&&{container:t.container}};break}}if(Object.keys(i).length>0)throw new ds(`Unknown export types found: `+Object.entries(i).map(([e,{type:t}])=>`- ${e} : ${t}`).join(`
72
- `),{telemetryMessage:`Unknown export types found`});Object.keys(r).length>0&&(t.exports=r)}function Ss(e,t){let n=e.triggers;if(!n||n.length===0)return;let r=[],i=t.routes?[...t.routes]:[],a=t.queues?.consumers?[...t.queues.consumers]:[],o=t.connect?[...t.connect]:[],s;for(let e of n)switch(e.type){case`email`:s??=[],s.push(...e.addresses);break;case`scheduled`:r.push(e.schedule);break;case`fetch`:e.zone===void 0?i.push(e.pattern):e.zone.includes(`.`)?i.push({pattern:e.pattern,zone_name:e.zone}):i.push({pattern:e.pattern,zone_id:e.zone});break;case`queue`:a.push($({queue:e.name,dead_letter_queue:e.deadLetterQueue,max_batch_size:e.maxBatchSize,max_batch_timeout:e.maxBatchTimeout,max_concurrency:e.maxConcurrency,max_retries:e.maxRetries,retry_delay:e.retryDelay,visibility_timeout_ms:e.visibilityTimeoutMs}));break;case`connect`:o.push($({protocol:e.protocol,port:e.port,address:e.address}));break}r.length&&(t.triggers={crons:r}),i.length&&(t.routes=i),a.length&&(t.queues={...t.queues??{},consumers:a}),o.length&&(t.connect=o),s!==void 0&&(t.addresses=s)}function Cs(e,t){if(!e.domains||e.domains.length===0)return;let n=t.routes?[...t.routes]:[];for(let t of e.domains)n.push({pattern:t,custom_domain:!0});t.routes=n}function ws(e,t){let n=e.tailConsumers;if(!n||n.length===0)return;let r=[],i=[];for(let e of n)e.streaming?i.push({service:e.worker}):r.push({service:e.worker});r.length&&(t.tail_consumers=r),i.length&&(t.streaming_tail_consumers=i)}function $(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}const Ts=`cf-worker:`,Es=`no-cache`,Ds=`cf-no-cache`,Os=/[/\\]node_modules[/\\]/,ks=new a;async function As(e,t){Ms();let n=i(e).href,r=new Set,a=await ks.run(r,()=>import(n,{with:{cf:Es}})),o={};for(let[e,n]of Object.entries(a))t?.include&&!t.include.includes(e)||(o[e]=n);return{exports:o,dependencies:r}}let js;function Ms(){if(js)return js;if(typeof process<`u`&&process.versions.bun)throw Error(`cloudflare.config.ts loading is not supported on Bun. Please use Node.js v22.18.0 or higher.`);let e=n.registerHooks;if(typeof e!=`function`)throw Error(`cloudflare.config.ts loading requires Node.js v22.18.0 or higher.`);let t=e({resolve(e,t,n){let i=t.importAttributes??{};if(i.type===`cf-worker`){let n=(e.startsWith(`./`)||e.startsWith(`../`))&&t.parentURL?r(new URL(e,t.parentURL)):e;return{url:`${Ts}${encodeURIComponent(n)}`,format:`module`,shortCircuit:!0}}let a=i.cf===Es,o=n(e,t);if(Os.test(o.url)||!o.url.startsWith(`file://`))return o;let s=Ns(t.parentURL);return!s&&!a?o:(ks.getStore()?.add(r(o.url)),o.url=Ps(o.url,s||crypto.randomUUID()),o)},load(e,t,n){if(e.startsWith(Ts)){let t=decodeURIComponent(e.slice(10));return{format:`module`,source:`export default ${JSON.stringify(t)};`,shortCircuit:!0}}return Fs(t),n(e,t)}});return js=()=>{t.deregister(),js=void 0},js}function Ns(e){if(e)return new URL(e).searchParams.get(Ds)??void 0}function Ps(e,t){let n=new URL(e);return n.searchParams.set(Ds,t),n.toString()}function Fs(e){if(!e.importAttributes?.cf)return;let t=Object.assign(Object.create(null),e.importAttributes);delete t.cf,e.importAttributes=t,Object.freeze(e.importAttributes)}async function Is(e,n,r){let{exports:i,dependencies:a}=await As(e,r),o={};for(let[e,r]of Object.entries(i))o[e]=await t(r,n);return{result:as.safeParse(o),dependencies:a}}export{ho as a,hs as i,$o as n,ls as r,Zo as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.mjs";function s(e){return e.option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`Returns the Durable Object namespaces owned by an account.`,builder:s,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})}};function l(e){return e.option(`id`,{type:`string`,description:`ID of the namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:`The number of objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`Opaque token indicating the position from which to continue when requesting the next set of records. A valid value for the cursor can be obtained from the cursors object in the result_info structure.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Returns the Durable Objects in a given namespace.`,builder:l,handler:async s=>{let c={limit:s.limit,cursor:s.cursor};if(s.dryRun){a({command:`cf durable-objects namespaces objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}/objects`,pathParams:{id:String(s.id??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.objects.list({account_id:u,id:s.id,...c})),{successLabel:`Loaded`})}},d={command:`objects`,describe:`Operations for namespaces.objects`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},f={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(c).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`durable-objects`,describe:`durable-objects`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{h as e}from"./oauth-B0ETkNcX.mjs";import{r as t}from"./auth-MQEamPN9.mjs";import{t as n}from"./output-DrpYYfnB.mjs";import{n as r,t as i}from"./progress-CsHIt3Tp.mjs";import{n as a,t as o}from"./body-parser-C-c9gfH1.mjs";function s(e){return e.option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const c={command:`edit`,describe:"Updates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.",builder:s,handler:async s=>{if(s.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?o({enabled:s.enabled,skip_wizard:s[`skip-wizard`]}):a(s.body)});return}let c=await t(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=a(s.body);n(await i(`Updating`,async()=>c.emailAuth.dmarcReports.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=o({enabled:s.enabled,skip_wizard:s[`skip-wizard`]});n(await i(`Updating`,async()=>c.emailAuth.dmarcReports.edit({...u,zone_id:l})),{successLabel:`Updated`})}};function l(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`,builder:l,handler:async a=>{if(a.dryRun){r({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.emailAuth.dmarcReports.get({zone_id:s})),{successLabel:`Loaded`})}},d={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.option(`id`,{type:`string`,description:`DNS record ID (rec_tag) to inspect`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`inspect`,describe:"Inspects a specific SPF TXT record and returns a parsed tree structure in the spflimit-worker format. The record ID must be provided via the `id` query parameter. Returns a recursive tree showing: - Parsed components with their qualifiers and types - Nested includes recursively resolved within components - Per-component and total lookup counts - Detailed error information with context",builder:f,handler:async a=>{let o={id:a.id};if(a.dryRun){r({command:`cf email-auth spf inspect`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/email/auth/spf/inspect`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.emailAuth.spf.inspect({zone_id:c,...o})),{successLabel:`Loaded`})}},m={command:`spf`,describe:`Operations for spf`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`email-auth`,describe:`email-auth`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n,h as r}from"./oauth-B0ETkNcX.mjs";import{r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./body-parser-C-c9gfH1.mjs";import{n as u}from"./input-validation-Bav2M9F-.mjs";import{a as d,i as f,n as p}from"./prompt-DdegNPpg.mjs";import{t as m}from"./cli-types-BsTty22w.mjs";function ee(e){return e.option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`,builder:ee,handler:async r=>{if(r.dryRun){o({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({email:u(r.email,`email`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.emailRouting.addresses.create({...e,account_id:p})),{successLabel:`Created`});return}r.email===void 0&&(r.email=await d(`email`,`The contact email address of the user.`));let m=l({email:u(r.email,`email`,`text`)});a(await s(`Creating`,async()=>f.emailRouting.addresses.create({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <destination-address-identifier>`,describe:`Deletes a specific destination address.`,builder:g,handler:async r=>{if(r.dryRun){o({command:`cf email-routing addresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
3
- `);return}a(await s(`Deleting`,async()=>c.emailRouting.addresses.delete({account_id:l,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <destination-address-identifier>`,describe:`Gets information for a specific destination email already created.`,builder:v,handler:async r=>{if(r.dryRun){o({command:`cf email-routing addresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.emailRouting.addresses.get({account_id:l,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Loaded`})}};function b(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sorts results in an ascending or descending order.`,choices:[`asc`,`desc`]}).option(`verified`,{type:`string`,description:`Filter by verified destination addresses.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists existing destination addresses.`,builder:m(b),handler:async r=>{let c={page:r.page,per_page:r[`per-page`],direction:r.direction,verified:r.verified};if(r.dryRun){o({command:`cf email-routing addresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.emailRouting.addresses.list({account_id:u,...c})),{successLabel:`Loaded`})}};function S(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Destination address status. Non-admin callers may only set verified addresses back to unverified; setting to verified requires admin privileges.`,choices:[`unverified`,`verified`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`update <destination-address-identifier>`,describe:`Updates the status of a specific destination address.`,builder:S,handler:async r=>{if(r.dryRun){o({command:`cf email-routing addresses update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`json`,body:r.body===void 0?l({status:u(r.status,`status`,`text`)}):c(r.body)});return}let d=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.emailRouting.addresses.update({...e,account_id:p,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Updated`});return}r.status===void 0&&(r.status=await f(`status`,`Destination address status. Non-admin callers may only set verified addresses back to unverified; setting to verified requires admin privileges.`,[`unverified`,`verified`]));let m=l({status:u(r.status,`status`,`text`)});a(await s(`Updating`,async()=>d.emailRouting.addresses.update({...m,account_id:p,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Updated`})}},w={command:`addresses`,describe:`Verified destination email addresses that can receive forwarded mail`,builder:e=>e.command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`disable`,describe:`Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.`,builder:T,handler:async e=>{if(e.dryRun){o({command:`cf email-routing disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/disable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await p({force:!!e.force,message:`This operation turns off email routing for a zone.`})){process.stderr.write(`Aborted.
4
- `);return}a(await s(`Deleting`,async()=>t.emailRouting.disable({zone_id:n})),{successLabel:`Deleted`})}};function D(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`create`,describe:`Enable you Email Routing zone. Add and lock the necessary MX and SPF records.`,builder:D,handler:async e=>{if(e.dryRun){o({command:`cf email-routing dns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.emailRouting.dns.create({body:r,zone_id:n})),{successLabel:`Created`});return}let d=l({name:u(e.name,`name`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.dns.create({body:d,zone_id:n})),{successLabel:`Created`})}};function k(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`delete`,describe:`Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.`,builder:k,handler:async e=>{if(e.dryRun){o({command:`cf email-routing dns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await p({force:!!e.force})){process.stderr.write(`Aborted.
5
- `);return}if(e.body){let r=c(e.body);a(await s(`Deleting`,async()=>t.emailRouting.dns.delete({body:r,zone_id:n})),{successLabel:`Deleted`});return}let d=l({name:u(e.name,`name`,`text`)});a(await s(`Deleting`,async()=>t.emailRouting.dns.delete({body:d,zone_id:n})),{successLabel:`Deleted`})}};function j(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit`,describe:`Unlock MX Records previously locked by Email Routing.`,builder:j,handler:async e=>{if(e.dryRun){o({command:`cf email-routing dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.emailRouting.dns.edit({body:r,zone_id:n})),{successLabel:`Updated`});return}let d=l({name:u(e.name,`name`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.dns.edit({body:d,zone_id:n})),{successLabel:`Updated`})}};function N(e){return e.option(`subdomain`,{type:`string`,description:`Deprecated. When supplied, the response shape differs from the documented default and is not modeled in generated SDKs. Do not rely on this parameter.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get`,describe:`Show the DNS records needed to configure your Email Routing zone.`,builder:N,handler:async e=>{let t={subdomain:e.subdomain};if(e.dryRun){o({command:`cf email-routing dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.emailRouting.dns.get({zone_id:c,...t})),{successLabel:`Loaded`})}},F={command:`dns`,describe:`DNS records required for email routing (MX, SPF, DKIM) — enable, lock, or disable`,builder:e=>e.command(O).command(A).command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.option(`enabled`,{type:`boolean`,description:"State of your zone Email Routing settings. No-op on this endpoint - use `POST`/`DELETE /zones/{zone_id}/email/routing/dns`."}).option(`skip-wizard`,{type:`boolean`,description:`Flag to check if the user skipped the configuration wizard.`}).option(`support-subaddress`,{type:`boolean`,description:`Whether subaddressing (plus-addressing) is honored when matching incoming mail against routing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`edit`,describe:`Update the settings for your Email Routing zone.`,builder:I,handler:async e=>{if(e.dryRun){o({command:`cf email-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.emailRouting.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let u=l({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]});a(await s(`Updating`,async()=>t.emailRouting.edit({...u,zone_id:n})),{successLabel:`Updated`})}};function R(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`enable`,describe:`Enable you Email Routing zone. Add and lock the necessary MX and SPF records.`,builder:R,handler:async e=>{if(e.dryRun){o({command:`cf email-routing enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Creating`,async()=>t.emailRouting.enable({zone_id:n})),{successLabel:`Created`})}};function z(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`Get information about the settings for your Email Routing zone.`,builder:z,handler:async e=>{if(e.dryRun){o({command:`cf email-routing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.get({zone_id:n})),{successLabel:`Loaded`})}};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`Get information on the default catch-all routing rule.`,builder:V,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules catch-alls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/catch_all`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.rules.catchAlls.get({zone_id:n})),{successLabel:`Loaded`})}};function U(e){return e.option(`enabled`,{type:`boolean`,description:`Routing rule status.`}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const W={command:`update`,describe:`Enable or disable catch-all routing rule, or change action to forward to a specific destination address. Forward actions require exactly one verified destination address.`,builder:U,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules catch-alls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/catch_all`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),source:u(e.source,`source`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.emailRouting.rules.catchAlls.update({...r,zone_id:n})),{successLabel:`Updated`});return}let d=l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),source:u(e.source,`source`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.rules.catchAlls.update({...d,zone_id:n})),{successLabel:`Updated`})}},G={command:`catch-alls`,describe:`Operations for rules.catch-alls`,builder:e=>e.command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.option(`enabled`,{type:`boolean`,description:`Routing rule status.`,default:!0}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`priority`,{type:`number`,description:`Priority of the routing rule.`,default:0}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`],default:`api`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`create`,describe:`Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address). Forward actions require exactly one verified destination address.`,builder:K,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:u(e.source,`source`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.emailRouting.rules.create({...r,zone_id:n})),{successLabel:`Created`});return}let d=l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:u(e.source,`source`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.rules.create({...d,zone_id:n})),{successLabel:`Created`})}};function J(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Y={command:`delete <rule-identifier>`,describe:`Delete a specific routing rule.`,builder:J,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await p({force:!!e.force})){process.stderr.write(`Aborted.
6
- `);return}a(await s(`Deleting`,async()=>t.emailRouting.rules.delete({zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Deleted`})}};function X(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <rule-identifier>`,describe:`Get information for a specific routing rule already created.`,builder:X,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.rules.get({zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Loaded`})}};function Q(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`enabled`,{type:`string`,description:`Filter by enabled routing rules.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`list-account`,describe:`Lists existing routing rules across all zones in the account or zone.`,builder:m(Q),handler:async c=>{let l={page:c.page,per_page:c[`per-page`],enabled:c.enabled};if(c.dryRun){let e=c.zone===void 0?await n():void 0,t=c.zone===void 0?`accounts`:`zones`,r=c.zone??e??`<account-id>`;o({command:`cf email-routing rules list-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/email/routing/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await i(c),d=c.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:c.zone},u,{quiet:c.quiet}):c.local?e:await t();d===`zones`?c.zoneId=f:c.accountId=f,a(await s(`Loading`,async()=>u.emailRouting.rules.listAccount({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})}};function re(e){return e.option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`plan`,describe:`Computes the Email Routing rule changes that would be needed to reconcile a Wrangler-managed desired ruleset. This endpoint is read-only and does not create, update, or delete rules.`,builder:re,handler:async r=>{if(r.dryRun){o({command:`cf email-routing rules plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/rules/plan`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({owner_worker_tag:u(r[`owner-worker-tag`],`owner-worker-tag`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.emailRouting.rules.plan({...e,account_id:p})),{successLabel:`Created`});return}r[`owner-worker-tag`]===void 0&&(r[`owner-worker-tag`]=await d(`owner-worker-tag`,"Public tag (script_tag) of the Worker that owns this rule. Required when `source` is `wrangler`. "));let m=l({owner_worker_tag:u(r[`owner-worker-tag`],`owner-worker-tag`,`text`)});a(await s(`Creating`,async()=>f.emailRouting.rules.plan({...m,account_id:p})),{successLabel:`Created`})}};function ae(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Routing rule status.`}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`priority`,{type:`number`,description:`Priority of the routing rule.`}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`update <rule-identifier>`,describe:`Update actions and matches, or enable/disable specific routing rules. Forward actions require exactly one verified destination address.`,builder:ae,handler:async e=>{if(e.dryRun){o({command:`cf email-routing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:u(e.source,`source`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.emailRouting.rules.update({...r,zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Updated`});return}let d=l({enabled:e.enabled,name:u(e.name,`name`,`text`),owner_worker_tag:u(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:u(e.source,`source`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.rules.update({...d,zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Updated`})}},$={command:`rules`,describe:`Routing rules that match incoming email addresses and forward to destination mailboxes`,builder:e=>e.command(q).command(Y).command(Z).command(ne).command(ie).command(oe).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`unlock`,describe:`Unlock MX records previously locked by Email Routing. Deprecated - use PATCH /zones/{zone_id}/email/routing/dns instead.`,builder:se,handler:async e=>{if(e.dryRun){o({command:`cf email-routing unlock`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/unlock`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({name:u(e.name,`name`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.emailRouting.unlock({body:r,zone_id:n})),{successLabel:`Created`});return}let d=l({name:u(e.name,`name`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.unlock({body:d,zone_id:n})),{successLabel:`Created`})}};function le(e){return e.option(`enabled`,{type:`boolean`,description:"State of your zone Email Routing settings. No-op on this endpoint - use `POST`/`DELETE /zones/{zone_id}/email/routing/dns`."}).option(`skip-wizard`,{type:`boolean`,description:`Flag to check if the user skipped the configuration wizard.`}).option(`support-subaddress`,{type:`boolean`,description:`Whether subaddressing (plus-addressing) is honored when matching incoming mail against routing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update`,describe:`Update the settings for your Email Routing zone.`,builder:le,handler:async e=>{if(e.dryRun){o({command:`cf email-routing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.emailRouting.update({...r,zone_id:n})),{successLabel:`Updated`});return}let u=l({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]});a(await s(`Updating`,async()=>t.emailRouting.update({...u,zone_id:n})),{successLabel:`Updated`})}},de={command:`email-routing`,describe:`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,builder:e=>e.command(E).command(L).command(te).command(B).command(ce).command(ue).command(w).command(F).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{de as default};