@zaip-ai/cli 6.3.0 → 7.5.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 (1252) hide show
  1. package/README.md +10 -0
  2. package/dist/commands/init.d.ts +1 -0
  3. package/dist/commands/init.d.ts.map +1 -1
  4. package/dist/commands/init.js +16 -3
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/index.js +1 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/services/adapter-codex-config.d.ts +3 -0
  9. package/dist/services/adapter-codex-config.d.ts.map +1 -0
  10. package/dist/services/adapter-codex-config.js +119 -0
  11. package/dist/services/adapter-codex-config.js.map +1 -0
  12. package/dist/services/adapter-config-overlay.d.ts +8 -0
  13. package/dist/services/adapter-config-overlay.d.ts.map +1 -0
  14. package/dist/services/adapter-config-overlay.js +17 -0
  15. package/dist/services/adapter-config-overlay.js.map +1 -0
  16. package/dist/services/adapters.d.ts +3 -2
  17. package/dist/services/adapters.d.ts.map +1 -1
  18. package/dist/services/adapters.js +34 -143
  19. package/dist/services/adapters.js.map +1 -1
  20. package/dist/services/adapters.test.js +12 -0
  21. package/dist/services/adapters.test.js.map +1 -1
  22. package/dist/services/agent-adapters.d.ts +2 -98
  23. package/dist/services/agent-adapters.d.ts.map +1 -1
  24. package/dist/services/agent-adapters.js +30 -29
  25. package/dist/services/agent-adapters.js.map +1 -1
  26. package/dist/services/agent-adapters.test.js +4 -2
  27. package/dist/services/agent-adapters.test.js.map +1 -1
  28. package/dist/services/agent-guidance-types.d.ts +98 -0
  29. package/dist/services/agent-guidance-types.d.ts.map +1 -0
  30. package/dist/services/agent-guidance-types.js +4 -0
  31. package/dist/services/agent-guidance-types.js.map +1 -0
  32. package/dist/services/catalog-toml.d.ts +4 -0
  33. package/dist/services/catalog-toml.d.ts.map +1 -0
  34. package/dist/services/catalog-toml.js +10 -0
  35. package/dist/services/catalog-toml.js.map +1 -0
  36. package/dist/services/catalog-write-scope.d.ts +4 -0
  37. package/dist/services/catalog-write-scope.d.ts.map +1 -0
  38. package/dist/services/catalog-write-scope.js +18 -0
  39. package/dist/services/catalog-write-scope.js.map +1 -0
  40. package/dist/services/claude-settings-overlay.d.ts +4 -0
  41. package/dist/services/claude-settings-overlay.d.ts.map +1 -0
  42. package/dist/services/claude-settings-overlay.js +58 -0
  43. package/dist/services/claude-settings-overlay.js.map +1 -0
  44. package/dist/services/client-selection.d.ts +17 -0
  45. package/dist/services/client-selection.d.ts.map +1 -0
  46. package/dist/services/client-selection.js +67 -0
  47. package/dist/services/client-selection.js.map +1 -0
  48. package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
  49. package/dist/services/codex-conversation-lifecycle-hook.js +20 -9
  50. package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
  51. package/dist/services/codex-git-publication-template.d.ts +2 -0
  52. package/dist/services/codex-git-publication-template.d.ts.map +1 -0
  53. package/dist/services/codex-git-publication-template.js +120 -0
  54. package/dist/services/codex-git-publication-template.js.map +1 -0
  55. package/dist/services/codex-github-setup-template.d.ts +3 -0
  56. package/dist/services/codex-github-setup-template.d.ts.map +1 -0
  57. package/dist/services/codex-github-setup-template.js +176 -0
  58. package/dist/services/codex-github-setup-template.js.map +1 -0
  59. package/dist/services/codex-hook-activation.d.ts +1 -1
  60. package/dist/services/codex-hook-activation.d.ts.map +1 -1
  61. package/dist/services/codex-hook-activation.js +55 -10
  62. package/dist/services/codex-hook-activation.js.map +1 -1
  63. package/dist/services/codex-host-diagnostic.d.ts +10 -0
  64. package/dist/services/codex-host-diagnostic.d.ts.map +1 -0
  65. package/dist/services/codex-host-diagnostic.js +5 -0
  66. package/dist/services/codex-host-diagnostic.js.map +1 -0
  67. package/dist/services/codex-host-diagnostic.test.d.ts +2 -0
  68. package/dist/services/codex-host-diagnostic.test.d.ts.map +1 -0
  69. package/dist/services/codex-host-diagnostic.test.js +24 -0
  70. package/dist/services/codex-host-diagnostic.test.js.map +1 -0
  71. package/dist/services/codex-literal-read-sequence-template.d.ts.map +1 -1
  72. package/dist/services/codex-literal-read-sequence-template.js +97 -6
  73. package/dist/services/codex-literal-read-sequence-template.js.map +1 -1
  74. package/dist/services/codex-native-authority-policy-template.d.ts +2 -0
  75. package/dist/services/codex-native-authority-policy-template.d.ts.map +1 -0
  76. package/dist/services/codex-native-authority-policy-template.js +132 -0
  77. package/dist/services/codex-native-authority-policy-template.js.map +1 -0
  78. package/dist/services/codex-native-tool-authority-template.d.ts.map +1 -1
  79. package/dist/services/codex-native-tool-authority-template.js +147 -145
  80. package/dist/services/codex-native-tool-authority-template.js.map +1 -1
  81. package/dist/services/codex-node-options-template.d.ts +3 -0
  82. package/dist/services/codex-node-options-template.d.ts.map +1 -0
  83. package/dist/services/codex-node-options-template.js +30 -0
  84. package/dist/services/codex-node-options-template.js.map +1 -0
  85. package/dist/services/codex-pre-tool-cli-capture-template.d.ts.map +1 -1
  86. package/dist/services/codex-pre-tool-cli-capture-template.js +214 -10
  87. package/dist/services/codex-pre-tool-cli-capture-template.js.map +1 -1
  88. package/dist/services/codex-pre-tool-cloud-template.d.ts.map +1 -1
  89. package/dist/services/codex-pre-tool-cloud-template.js +149 -12
  90. package/dist/services/codex-pre-tool-cloud-template.js.map +1 -1
  91. package/dist/services/codex-pre-tool-dependencies.test-support.d.ts.map +1 -1
  92. package/dist/services/codex-pre-tool-dependencies.test-support.js +12 -0
  93. package/dist/services/codex-pre-tool-dependencies.test-support.js.map +1 -1
  94. package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
  95. package/dist/services/codex-pre-tool-hook-template.js +53 -138
  96. package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
  97. package/dist/services/codex-pre-tool-hook-template.test.js +13 -7
  98. package/dist/services/codex-pre-tool-hook-template.test.js.map +1 -1
  99. package/dist/services/codex-pre-tool-host-context-template.d.ts.map +1 -1
  100. package/dist/services/codex-pre-tool-host-context-template.js +23 -0
  101. package/dist/services/codex-pre-tool-host-context-template.js.map +1 -1
  102. package/dist/services/codex-pre-tool-policy-template.d.ts.map +1 -1
  103. package/dist/services/codex-pre-tool-policy-template.js +5 -3
  104. package/dist/services/codex-pre-tool-policy-template.js.map +1 -1
  105. package/dist/services/codex-pre-tool-release-review-template.d.ts.map +1 -1
  106. package/dist/services/codex-pre-tool-release-review-template.js +161 -2
  107. package/dist/services/codex-pre-tool-release-review-template.js.map +1 -1
  108. package/dist/services/codex-pre-tool-support-template.d.ts.map +1 -1
  109. package/dist/services/codex-pre-tool-support-template.js +88 -129
  110. package/dist/services/codex-pre-tool-support-template.js.map +1 -1
  111. package/dist/services/codex-release-publication-template.d.ts +2 -0
  112. package/dist/services/codex-release-publication-template.d.ts.map +1 -0
  113. package/dist/services/codex-release-publication-template.js +127 -0
  114. package/dist/services/codex-release-publication-template.js.map +1 -0
  115. package/dist/services/codex-repository-profile-template.d.ts +2 -0
  116. package/dist/services/codex-repository-profile-template.d.ts.map +1 -0
  117. package/dist/services/codex-repository-profile-template.js +84 -0
  118. package/dist/services/codex-repository-profile-template.js.map +1 -0
  119. package/dist/services/codex-rules.d.ts +1 -1
  120. package/dist/services/codex-rules.d.ts.map +1 -1
  121. package/dist/services/codex-rules.js +2 -2
  122. package/dist/services/codex-storage-handoff-template.d.ts +2 -0
  123. package/dist/services/codex-storage-handoff-template.d.ts.map +1 -0
  124. package/dist/services/codex-storage-handoff-template.js +18 -0
  125. package/dist/services/codex-storage-handoff-template.js.map +1 -0
  126. package/dist/services/codex-subagent-hook-template.d.ts +1 -1
  127. package/dist/services/codex-subagent-hook-template.d.ts.map +1 -1
  128. package/dist/services/codex-subagent-hook-template.js +7 -6
  129. package/dist/services/codex-subagent-hook-template.js.map +1 -1
  130. package/dist/services/codex-task-delivery-authority-template.d.ts +3 -0
  131. package/dist/services/codex-task-delivery-authority-template.d.ts.map +1 -0
  132. package/dist/services/codex-task-delivery-authority-template.js +206 -0
  133. package/dist/services/codex-task-delivery-authority-template.js.map +1 -0
  134. package/dist/services/codex-validation-runtime-template.js +1 -1
  135. package/dist/services/codex-windows-hook-command.js +2 -2
  136. package/dist/services/codex-windows-hook-command.js.map +1 -1
  137. package/dist/services/developer-identity-fixture.d.ts.map +1 -1
  138. package/dist/services/developer-identity-fixture.js +3 -2
  139. package/dist/services/developer-identity-fixture.js.map +1 -1
  140. package/dist/services/doctor.d.ts.map +1 -1
  141. package/dist/services/doctor.js +5 -1
  142. package/dist/services/doctor.js.map +1 -1
  143. package/dist/services/github-setup-status.d.ts +6 -3
  144. package/dist/services/github-setup-status.d.ts.map +1 -1
  145. package/dist/services/github-setup-status.js +9 -5
  146. package/dist/services/github-setup-status.js.map +1 -1
  147. package/dist/services/github-setup-status.test.js +69 -3
  148. package/dist/services/github-setup-status.test.js.map +1 -1
  149. package/dist/services/global-codex-config.d.ts.map +1 -1
  150. package/dist/services/global-codex-config.js +3 -0
  151. package/dist/services/global-codex-config.js.map +1 -1
  152. package/dist/services/global-codex-project-trust.d.ts +17 -0
  153. package/dist/services/global-codex-project-trust.d.ts.map +1 -0
  154. package/dist/services/global-codex-project-trust.js +186 -0
  155. package/dist/services/global-codex-project-trust.js.map +1 -0
  156. package/dist/services/global-codex-project-trust.test.d.ts +2 -0
  157. package/dist/services/global-codex-project-trust.test.d.ts.map +1 -0
  158. package/dist/services/global-codex-project-trust.test.js +188 -0
  159. package/dist/services/global-codex-project-trust.test.js.map +1 -0
  160. package/dist/services/install-agents-template.d.ts.map +1 -1
  161. package/dist/services/install-agents-template.js +95 -190
  162. package/dist/services/install-agents-template.js.map +1 -1
  163. package/dist/services/install-client-selection.d.ts +6 -0
  164. package/dist/services/install-client-selection.d.ts.map +1 -0
  165. package/dist/services/install-client-selection.js +24 -0
  166. package/dist/services/install-client-selection.js.map +1 -0
  167. package/dist/services/install-result.d.ts +6 -0
  168. package/dist/services/install-result.d.ts.map +1 -0
  169. package/dist/services/install-result.js +14 -0
  170. package/dist/services/install-result.js.map +1 -0
  171. package/dist/services/install-storage-boundary.d.ts +6 -0
  172. package/dist/services/install-storage-boundary.d.ts.map +1 -0
  173. package/dist/services/install-storage-boundary.js +173 -0
  174. package/dist/services/install-storage-boundary.js.map +1 -0
  175. package/dist/services/install-storage-boundary.test.d.ts +2 -0
  176. package/dist/services/install-storage-boundary.test.d.ts.map +1 -0
  177. package/dist/services/install-storage-boundary.test.js +110 -0
  178. package/dist/services/install-storage-boundary.test.js.map +1 -0
  179. package/dist/services/install-template-backup.d.ts +3 -0
  180. package/dist/services/install-template-backup.d.ts.map +1 -0
  181. package/dist/services/install-template-backup.js +46 -0
  182. package/dist/services/install-template-backup.js.map +1 -0
  183. package/dist/services/install-template-lock.d.ts +2 -0
  184. package/dist/services/install-template-lock.d.ts.map +1 -0
  185. package/dist/services/install-template-lock.js +32 -0
  186. package/dist/services/install-template-lock.js.map +1 -0
  187. package/dist/services/install-template-policy.d.ts +16 -0
  188. package/dist/services/install-template-policy.d.ts.map +1 -1
  189. package/dist/services/install-template-policy.js +73 -1
  190. package/dist/services/install-template-policy.js.map +1 -1
  191. package/dist/services/install-template-render.d.ts +11 -0
  192. package/dist/services/install-template-render.d.ts.map +1 -0
  193. package/dist/services/install-template-render.js +53 -0
  194. package/dist/services/install-template-render.js.map +1 -0
  195. package/dist/services/install-template-rule-files.d.ts +3 -0
  196. package/dist/services/install-template-rule-files.d.ts.map +1 -0
  197. package/dist/services/install-template-rule-files.js +24 -0
  198. package/dist/services/install-template-rule-files.js.map +1 -0
  199. package/dist/services/logger.d.ts.map +1 -1
  200. package/dist/services/logger.js +35 -10
  201. package/dist/services/logger.js.map +1 -1
  202. package/dist/services/logger.test.js +65 -16
  203. package/dist/services/logger.test.js.map +1 -1
  204. package/dist/services/project-config-upgrade.d.ts +3 -0
  205. package/dist/services/project-config-upgrade.d.ts.map +1 -0
  206. package/dist/services/project-config-upgrade.js +58 -0
  207. package/dist/services/project-config-upgrade.js.map +1 -0
  208. package/dist/services/runtime-template-deploy-policy.test.d.ts +2 -0
  209. package/dist/services/runtime-template-deploy-policy.test.d.ts.map +1 -0
  210. package/dist/services/runtime-template-deploy-policy.test.js +26 -0
  211. package/dist/services/runtime-template-deploy-policy.test.js.map +1 -0
  212. package/dist/services/runtime-template-test-support.d.ts +14 -0
  213. package/dist/services/runtime-template-test-support.d.ts.map +1 -1
  214. package/dist/services/runtime-template-test-support.js +18 -0
  215. package/dist/services/runtime-template-test-support.js.map +1 -1
  216. package/dist/services/runtime-template.test.js +14 -63
  217. package/dist/services/runtime-template.test.js.map +1 -1
  218. package/dist/services/sqlite-bootstrap.js +2 -2
  219. package/dist/services/sqlite-bootstrap.js.map +1 -1
  220. package/dist/services/stack-node.js +2 -2
  221. package/dist/services/stack-node.js.map +1 -1
  222. package/dist/services/stack-terraform.d.ts.map +1 -1
  223. package/dist/services/stack-terraform.js +5 -5
  224. package/dist/services/stack-terraform.js.map +1 -1
  225. package/dist/services/template-packed-path.test.d.ts +2 -0
  226. package/dist/services/template-packed-path.test.d.ts.map +1 -0
  227. package/dist/services/template-packed-path.test.js +30 -0
  228. package/dist/services/template-packed-path.test.js.map +1 -0
  229. package/dist/types.d.ts +8 -0
  230. package/dist/types.d.ts.map +1 -1
  231. package/package.json +2 -1
  232. package/templates/.agents/README-ENG.md +3 -1
  233. package/templates/.agents/README.md +3 -1
  234. package/templates/.agents/architecture/software-architecture.md +7 -1
  235. package/templates/.agents/config/agents/catalog.yaml +25 -12
  236. package/templates/.agents/config/agents/discovery.json +2 -2
  237. package/templates/.agents/config/autonomous-cloud-inputs.json +3 -3
  238. package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +4 -2
  239. package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -1
  240. package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +6 -4
  241. package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +3 -1
  242. package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +6 -4
  243. package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +5 -3
  244. package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +3 -1
  245. package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +7 -4
  246. package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +1 -1
  247. package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +9 -6
  248. package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +3 -1
  249. package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +3 -1
  250. package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +3 -1
  251. package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -1
  252. package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +5 -3
  253. package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +4 -4
  254. package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +3 -1
  255. package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +3 -3
  256. package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +3 -1
  257. package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -1
  258. package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +6 -3
  259. package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +7 -4
  260. package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +3 -1
  261. package/templates/.agents/config/project.yaml +7 -2
  262. package/templates/.agents/dashboard/.zaip-managed.json +282 -142
  263. package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-DZ2mnR6k.js +1 -0
  264. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-BQOQCvcJ.js → DashboardHelpDialog-DnxpHJSo.js} +20 -10
  265. package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-CGET1J8Q.js → PricingSettingsDialog-DsFTUwhL.js} +1 -1
  266. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BCsdQtWG.js +3 -0
  267. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-Bw6xnXUN.js → TraceabilityWorkspace-BN8FwP5S.js} +1 -1
  268. package/templates/.agents/dashboard/apps/frontend/dist/assets/{cost-monitor-C2AFYBu_.css → cost-monitor-BESDS3aE.css} +1 -1
  269. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-YfoKMzCQ.js +59 -0
  270. package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-BZf8HWmm.js → dashboard-localization-BVBhiAAS.js} +3 -1
  271. package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-CjGGux6h.js → icons-vendor-DSdQAua1.js} +1 -1
  272. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-4cl5FQBn.css +1 -0
  273. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-uIVtG2ZR.js +2 -0
  274. package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-B9jZSAKf.js → react-vendor-rGvJzdn5.js} +1 -1
  275. package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-DFpwb0TN.js → traceability-Boz50W9b.js} +1 -1
  276. package/templates/.agents/dashboard/apps/frontend/dist/index.html +8 -7
  277. package/templates/.agents/dashboard/apps/frontend/index.html +1 -0
  278. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  279. package/templates/.agents/dashboard/apps/frontend/playwright.dom.config.ts +2 -2
  280. package/templates/.agents/dashboard/apps/frontend/src/AppLoadingPanels.tsx +10 -7
  281. package/templates/.agents/dashboard/apps/frontend/src/AppOverlays.tsx +22 -19
  282. package/templates/.agents/dashboard/apps/frontend/src/CostCalculationGuidePage.tsx +16 -117
  283. package/templates/.agents/dashboard/apps/frontend/src/CostCharts.percentages.test.tsx +75 -0
  284. package/templates/.agents/dashboard/apps/frontend/src/CostTelemetryGuide.tsx +36 -0
  285. package/templates/.agents/dashboard/apps/frontend/src/DashboardToast.tsx +9 -0
  286. package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.dom.test.ts +1 -1
  287. package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +1 -0
  288. package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.dom.test.ts +1 -1
  289. package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.tsx +22 -19
  290. package/templates/.agents/dashboard/apps/frontend/src/TraceabilityWorkspace.dom.e2e.ts +5 -2
  291. package/templates/.agents/dashboard/apps/frontend/src/WorkspaceStatus.dom.test.ts +86 -0
  292. package/templates/.agents/dashboard/apps/frontend/src/WorkspaceStatus.test.tsx +44 -0
  293. package/templates/.agents/dashboard/apps/frontend/src/WorkspaceStatus.tsx +37 -12
  294. package/templates/.agents/dashboard/apps/frontend/src/cost-guide-calculations.ts +118 -0
  295. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-sqlite-view.ts +3 -0
  296. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +15 -31
  297. package/templates/.agents/dashboard/apps/frontend/src/dashboard-http-transport.ts +30 -0
  298. package/templates/.agents/dashboard/apps/frontend/src/dashboard-runtime-status.ts +4 -1
  299. package/templates/.agents/dashboard/apps/frontend/src/main.tsx +1 -0
  300. package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +2 -0
  301. package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +17 -0
  302. package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +0 -20
  303. package/templates/.agents/dashboard/apps/frontend/src/snapshot-observer.test.ts +112 -0
  304. package/templates/.agents/dashboard/apps/frontend/src/snapshot-observer.ts +147 -0
  305. package/templates/.agents/dashboard/apps/frontend/src/sqlite-compact-cost-adapter.ts +100 -0
  306. package/templates/.agents/dashboard/apps/frontend/src/sqlite-page-export.test.ts +20 -0
  307. package/templates/.agents/dashboard/apps/frontend/src/sqlite-page-export.ts +15 -0
  308. package/templates/.agents/dashboard/apps/frontend/src/styles-pricing.css +265 -0
  309. package/templates/.agents/dashboard/apps/frontend/src/styles.css +21 -265
  310. package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +35 -0
  311. package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +11 -87
  312. package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +26 -199
  313. package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.navigation.test.tsx +1 -1
  314. package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.test.ts +65 -0
  315. package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.ts +17 -1
  316. package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +2 -2
  317. package/templates/.agents/dashboard/apps/frontend/src/use-operations-detail-export.ts +10 -0
  318. package/templates/.agents/dashboard/apps/frontend/src/use-runtime-status.dom.test.ts +86 -0
  319. package/templates/.agents/dashboard/apps/frontend/src/use-runtime-status.ts +4 -5
  320. package/templates/.agents/dashboard/apps/frontend/src/workspace-status.css +42 -0
  321. package/templates/.agents/dashboard/apps/frontend/vite.config.ts +1 -1
  322. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  323. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.test.ts +11 -10
  324. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CompactLifecycleCostTable.tsx +39 -15
  325. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.test.ts +27 -0
  326. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostCharts.tsx +89 -83
  327. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.tsx +14 -24
  328. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +1 -27
  329. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +12 -63
  330. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.availability.test.ts +60 -0
  331. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +1 -15
  332. package/templates/.agents/dashboard/modules/cost-monitor/src/react/compact-cost-export-source.ts +85 -0
  333. package/templates/.agents/dashboard/modules/cost-monitor/src/react/compact-cost-page-range.test.ts +34 -0
  334. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-chart-presentation.ts +74 -0
  335. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-charts.css +117 -0
  336. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-group-table-totals.ts +29 -0
  337. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-export-sources.ts +19 -0
  338. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-state.ts +27 -0
  339. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor.css +6 -117
  340. package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +3 -1
  341. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +9 -32
  342. package/templates/.agents/dashboard/modules/cost-monitor/src/server/cost-summary-metrics.ts +33 -0
  343. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  344. package/templates/.agents/dashboard/modules/operations/src/react/OperationsLocaleMenu.tsx +58 -0
  345. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewTopPanel.navigation.test.tsx +1 -1
  346. package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +16 -47
  347. package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.navigation.test.ts +1 -1
  348. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.test.ts +4 -100
  349. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportAction.tsx +25 -89
  350. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportColumns.ts +1 -0
  351. package/templates/.agents/dashboard/modules/operations/src/react/export/ExcelExportDuration.test.ts +105 -0
  352. package/templates/.agents/dashboard/modules/operations/src/react/export/export-duration-rows.ts +91 -0
  353. package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +4 -0
  354. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  355. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  356. package/templates/.agents/dashboard/packages/contracts/package.json +2 -2
  357. package/templates/.agents/dashboard/packages/contracts/src/export.ts +2 -0
  358. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  359. package/templates/.agents/dashboard/packages/data-export/src/index.test.ts +30 -0
  360. package/templates/.agents/dashboard/packages/data-export/src/index.ts +10 -0
  361. package/templates/.agents/dashboard/packages/data-export/src/ooxml-stream.ts +50 -3
  362. package/templates/.agents/dashboard/packages/local-runtime/DIAGNOSTICS.md +2 -1
  363. package/templates/.agents/dashboard/packages/local-runtime/dashboard-build-fingerprint.mjs +1 -1
  364. package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.mjs +4 -2
  365. package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.test.mjs +1 -1
  366. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +314 -269
  367. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +266 -222
  368. package/templates/.agents/dashboard/packages/local-runtime/package.json +3 -3
  369. package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-executable-startup.mjs +4 -1
  370. package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-reconciliation-executable.mjs +4 -4
  371. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +314 -269
  372. package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +51 -0
  373. package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +15 -1
  374. package/templates/.agents/dashboard/packages/local-runtime/src/dashboard-diagnostics.test.ts +1 -1
  375. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +3 -40
  376. package/templates/.agents/dashboard/packages/local-runtime/src/project-stack-labels.ts +40 -0
  377. package/templates/.agents/dashboard/packages/local-runtime/src/retained-worktree-capture.ts +81 -0
  378. package/templates/.agents/dashboard/packages/local-runtime/src/server-board.ts +11 -2
  379. package/templates/.agents/dashboard/packages/local-runtime/src/server-hono-security.test.ts +40 -0
  380. package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-routes.ts +33 -14
  381. package/templates/.agents/dashboard/packages/local-runtime/src/server-project-settings-routes.test.ts +83 -0
  382. package/templates/.agents/dashboard/packages/local-runtime/src/server-project-settings-routes.ts +41 -0
  383. package/templates/.agents/dashboard/packages/local-runtime/src/server-projections.ts +3 -19
  384. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-diagnostics.test.ts +2 -2
  385. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +61 -0
  386. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-route.ts +2 -2
  387. package/templates/.agents/dashboard/packages/local-runtime/src/server-run-range.ts +18 -0
  388. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +3 -36
  389. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-worker-receipt.ts +38 -0
  390. package/templates/.agents/dashboard/packages/local-runtime/src/server-work-priority-route.ts +18 -0
  391. package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +1 -0
  392. package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +6 -32
  393. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-summary-rollup.ts +47 -0
  394. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-financial-consistency.test.ts +133 -0
  395. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-financial-entity-page.ts +159 -0
  396. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +12 -2
  397. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-operations-work-list.ts +17 -0
  398. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-operation-pages.ts +71 -0
  399. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +5 -40
  400. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-temporal-dimension.ts +29 -7
  401. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +7 -55
  402. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +16 -24
  403. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-fixture.test-support.ts +27 -5
  404. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-filesystem.ts +20 -37
  405. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +9 -9
  406. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-marks-token-cost-telemetry-unavailable-when.test.ts +3 -3
  407. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +14 -20
  408. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuilds-disposable-snapshot-serves-zaip-records.test.ts +11 -1
  409. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +1 -1
  410. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-work-financial-summary.ts +38 -0
  411. package/templates/.agents/dashboard/packages/local-runtime/src/telemetry-reconciliation.integration.test.ts +223 -0
  412. package/templates/.agents/dashboard/packages/local-runtime/src/work-priority-contract.test.ts +5 -5
  413. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-launch-page.test.mjs +59 -3
  414. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  415. package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +1 -1
  416. package/templates/.agents/dashboard/packages/windows-launcher/build-dashboard-launcher.ps1 +1 -1
  417. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  418. package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +1 -0
  419. package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +11 -15
  420. package/templates/.agents/dashboard/tests/e2e/specs/work-board-hydration.ts +40 -11
  421. package/templates/.agents/dashboard/zaip-dashboard-windows.exe +0 -0
  422. package/templates/.agents/design/.zaip-managed.json +498 -54
  423. package/templates/.agents/design/apps/catalog/dist/assets/index-BH6Fxbj0.css +1 -0
  424. package/templates/.agents/design/apps/catalog/dist/assets/index-BK0aBll9.css +1 -0
  425. package/templates/.agents/design/apps/catalog/dist/assets/index-Bzhb1wb_.js +76 -0
  426. package/templates/.agents/design/apps/catalog/dist/assets/index-CB-MTaWq.js +76 -0
  427. package/templates/.agents/design/apps/catalog/dist/assets/index-CIqfUcy8.js +76 -0
  428. package/templates/.agents/design/apps/catalog/dist/assets/index-Ccq-NOLA.js +76 -0
  429. package/templates/.agents/design/apps/catalog/dist/assets/index-Ch2eyD9C.js +76 -0
  430. package/templates/.agents/design/apps/catalog/dist/assets/index-Cy64ytQr.js +67 -0
  431. package/templates/.agents/design/apps/catalog/dist/assets/index-DfxEbFlq.js +76 -0
  432. package/templates/.agents/design/apps/catalog/dist/assets/index-Dqt6mTvD.js +76 -0
  433. package/templates/.agents/design/apps/catalog/dist/assets/index-rz8gOc0a.js +76 -0
  434. package/templates/.agents/design/apps/catalog/dist/index.html +2 -2
  435. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{CatalogShell-BJ8b4xZr.js → CatalogShell-D2YyQQrT.js} +1 -1
  436. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-CQLHzznn.js → Color-6AOWCN3U-BmCuNXMg.js} +1 -1
  437. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-DF9KC_gA.js +158 -0
  438. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DashboardFilters.stories-D17Q1egS.js +5 -0
  439. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DashboardFiltersSpecimen-CEBrLT2k.js +1 -0
  440. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DesignSystem.stories-ED52wFjY.js → DesignSystem.stories-BibuRt_c.js} +1 -1
  441. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-BcLgM80v.js → DocsRenderer-JROSPFPF-GkfL8_gG.js} +4 -4
  442. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Maker.stories-Dv9Keun_.js +13 -0
  443. package/templates/.agents/design/apps/catalog/dist/storybook/assets/MakerSpecimen-DGwAKRi9.css +1 -0
  444. package/templates/.agents/design/apps/catalog/dist/storybook/assets/MakerSpecimen-mkkuFOp_.js +5 -0
  445. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Primitives-DV6Bpudf.js → Primitives-n1UqmNvo.js} +1 -1
  446. package/templates/.agents/design/apps/catalog/dist/storybook/assets/ReconciliationSpecimen-BJnfyyG3.js +1 -0
  447. package/templates/.agents/design/apps/catalog/dist/storybook/assets/ReconciliationSpecimen.stories-CH-GF9Rk.js +13 -0
  448. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-BKNiAz_E.js → WithTooltip-7X4HQR7L-BPXo6OoG.js} +1 -1
  449. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WorkspaceStatus.stories-BL19HGOo.js → WorkspaceStatus.stories-Cie1f_yU.js} +1 -1
  450. package/templates/.agents/design/apps/catalog/dist/storybook/assets/WorkspaceStatusSpecimen-GcYWBBSp.js +1 -0
  451. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-DZBcXL-p.js → chunk-DRQKCCAG-Cn4_bvJJ.js} +1 -1
  452. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-W22LQPXL-CF3y2mfo.js → chunk-W22LQPXL-CQrULeB4.js} +1 -1
  453. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-BVjxMRGq.js → components-uiaDZHE7.js} +5 -5
  454. package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-DfjRffT7.js +1 -0
  455. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-CTWGZcEe.js → iframe-BgEb-d5o.js} +4 -4
  456. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-D1JaPXfV.css +1 -0
  457. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{react-18-B9_a4mHb.js → react-18-BZ-Ne01c.js} +1 -1
  458. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-CwpjKEyW.js +1 -0
  459. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{syntaxhighlighter-YFXUGROL-F_p8E2xc.js → syntaxhighlighter-YFXUGROL-BvuP8St2.js} +1 -1
  460. package/templates/.agents/design/apps/catalog/dist/storybook/assets/{theming-fbSD9ZLF.js → theming-BGScn6Yf.js} +1 -1
  461. package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +2 -2
  462. package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
  463. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/a11y-2/manager-bundle.js +3 -3
  464. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/docs-1/manager-bundle.js +4 -4
  465. package/templates/.agents/design/apps/catalog/dist/storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -3
  466. package/templates/.agents/design/apps/catalog/package.json +2 -2
  467. package/templates/.agents/design/apps/catalog/src/components/WorkspaceStatusSpecimen.tsx +32 -1
  468. package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +14 -3
  469. package/templates/.agents/design/apps/catalog/src/specimens/MAKER-HANDOFF.md +134 -0
  470. package/templates/.agents/design/apps/catalog/src/specimens/MakerSpecimen.test.tsx +143 -0
  471. package/templates/.agents/design/apps/catalog/src/specimens/MakerSpecimen.tsx +132 -0
  472. package/templates/.agents/design/apps/catalog/src/specimens/maker-fixtures.d.ts +15 -0
  473. package/templates/.agents/design/apps/catalog/src/specimens/maker-fixtures.js +86 -0
  474. package/templates/.agents/design/apps/catalog/src/specimens/maker-native.d.ts +1 -0
  475. package/templates/.agents/design/apps/catalog/src/specimens/maker-native.js +332 -0
  476. package/templates/.agents/design/apps/catalog/src/stories/Maker.stories.tsx +24 -0
  477. package/templates/.agents/design/apps/catalog/src/stories/WorkspaceStatus.stories.tsx +1 -0
  478. package/templates/.agents/design/apps/catalog/src/styles/maker-specimen.css +285 -0
  479. package/templates/.agents/design/design-system-maker/API.md +468 -0
  480. package/templates/.agents/design/design-system-maker/NOTICE.md +13 -0
  481. package/templates/.agents/design/design-system-maker/README.md +138 -0
  482. package/templates/.agents/design/design-system-maker/SOURCE-PROVENANCE.json +62 -0
  483. package/templates/.agents/design/design-system-maker/build.json +524 -0
  484. package/templates/.agents/design/design-system-maker/frontend/ADAPTATION.md +351 -0
  485. package/templates/.agents/design/design-system-maker/frontend/MAKER-REPAIR-HANDOFF.md +134 -0
  486. package/templates/.agents/design/design-system-maker/frontend/advanced/examples.js +30 -0
  487. package/templates/.agents/design/design-system-maker/frontend/advanced/index.html +75 -0
  488. package/templates/.agents/design/design-system-maker/frontend/advanced/index.js +30 -0
  489. package/templates/.agents/design/design-system-maker/frontend/catalog/filters.js +132 -0
  490. package/templates/.agents/design/design-system-maker/frontend/catalog/index.html +17 -0
  491. package/templates/.agents/design/design-system-maker/frontend/catalog/index.js +82 -0
  492. package/templates/.agents/design/design-system-maker/frontend/generate.html +74 -0
  493. package/templates/.agents/design/design-system-maker/frontend/generate.js +226 -0
  494. package/templates/.agents/design/design-system-maker/frontend/shared/api.js +112 -0
  495. package/templates/.agents/design/design-system-maker/frontend/shared/components.js +200 -0
  496. package/templates/.agents/design/design-system-maker/frontend/shared/diagnostic-view.js +218 -0
  497. package/templates/.agents/design/design-system-maker/frontend/shared/extraction-state.js +38 -0
  498. package/templates/.agents/design/design-system-maker/frontend/shared/failure-view.js +54 -0
  499. package/templates/.agents/design/design-system-maker/frontend/shared/frontend-scenarios-2.test.mjs +138 -0
  500. package/templates/.agents/design/design-system-maker/frontend/shared/frontend.test.mjs +357 -0
  501. package/templates/.agents/design/design-system-maker/frontend/shared/job-view.js +81 -0
  502. package/templates/.agents/design/design-system-maker/frontend/shared/model-hydration.js +26 -0
  503. package/templates/.agents/design/design-system-maker/frontend/shared/model.js +103 -0
  504. package/templates/.agents/design/design-system-maker/frontend/shared/palette-evidence.js +106 -0
  505. package/templates/.agents/design/design-system-maker/frontend/shared/palette-evidence.test.mjs +210 -0
  506. package/templates/.agents/design/design-system-maker/frontend/shared/palette-view.js +149 -0
  507. package/templates/.agents/design/design-system-maker/frontend/shared/preview.test.mjs +263 -0
  508. package/templates/.agents/design/design-system-maker/frontend/shared/report-view.js +267 -0
  509. package/templates/.agents/design/design-system-maker/frontend/shared/reprocess-dialog.js +192 -0
  510. package/templates/.agents/design/design-system-maker/frontend/shared/specimens.js +231 -0
  511. package/templates/.agents/design/design-system-maker/frontend/shared/viewer-actions.js +78 -0
  512. package/templates/.agents/design/design-system-maker/frontend/shared/viewer-detail.js +121 -0
  513. package/templates/.agents/design/design-system-maker/frontend/shared/viewer-summary.js +91 -0
  514. package/templates/.agents/design/design-system-maker/frontend/shared/visual-model.js +255 -0
  515. package/templates/.agents/design/design-system-maker/frontend/styles/advanced.css +128 -0
  516. package/templates/.agents/design/design-system-maker/frontend/styles/base.css +318 -0
  517. package/templates/.agents/design/design-system-maker/frontend/styles/catalog-filters.css +114 -0
  518. package/templates/.agents/design/design-system-maker/frontend/styles/diagnostic.css +298 -0
  519. package/templates/.agents/design/design-system-maker/frontend/styles/layout.css +320 -0
  520. package/templates/.agents/design/design-system-maker/frontend/styles/maker.css +7 -0
  521. package/templates/.agents/design/design-system-maker/frontend/styles/report.css +173 -0
  522. package/templates/.agents/design/design-system-maker/frontend/styles/reprocess-dialog.css +34 -0
  523. package/templates/.agents/design/design-system-maker/frontend/styles/specimen-foundations.css +363 -0
  524. package/templates/.agents/design/design-system-maker/frontend/styles/specimens.css +59 -0
  525. package/templates/.agents/design/design-system-maker/frontend/styles/viewer-summary.css +308 -0
  526. package/templates/.agents/design/design-system-maker/frontend/viewer/diagnostic.html +3 -0
  527. package/templates/.agents/design/design-system-maker/frontend/viewer/index.html +8 -0
  528. package/templates/.agents/design/design-system-maker/frontend/viewer/index.js +233 -0
  529. package/templates/.agents/design/design-system-maker/frontend/viewer/preview.html +3 -0
  530. package/templates/.agents/design/design-system-maker/frontend/viewer/specimen.js +88 -0
  531. package/templates/.agents/design/design-system-maker/launcher/Program.cs +117 -0
  532. package/templates/.agents/design/design-system-maker/runtime/chat-cli.mjs +27 -0
  533. package/templates/.agents/design/design-system-maker/runtime/chat-client.mjs +170 -0
  534. package/templates/.agents/design/design-system-maker/runtime/chat-contract.mjs +13 -0
  535. package/templates/.agents/design/design-system-maker/runtime/collection.mjs +269 -0
  536. package/templates/.agents/design/design-system-maker/runtime/contracts.mjs +383 -0
  537. package/templates/.agents/design/design-system-maker/runtime/design-codes.mjs +46 -0
  538. package/templates/.agents/design/design-system-maker/runtime/design-compose.mjs +118 -0
  539. package/templates/.agents/design/design-system-maker/runtime/design-markdown.mjs +154 -0
  540. package/templates/.agents/design/design-system-maker/runtime/import.mjs +137 -0
  541. package/templates/.agents/design/design-system-maker/runtime/io.mjs +121 -0
  542. package/templates/.agents/design/design-system-maker/runtime/job-progress.mjs +50 -0
  543. package/templates/.agents/design/design-system-maker/runtime/json-tokens.mjs +88 -0
  544. package/templates/.agents/design/design-system-maker/runtime/launch-identity.mjs +100 -0
  545. package/templates/.agents/design/design-system-maker/runtime/launch-protocol.mjs +88 -0
  546. package/templates/.agents/design/design-system-maker/runtime/launch-server.mjs +51 -0
  547. package/templates/.agents/design/design-system-maker/runtime/launch.mjs +107 -0
  548. package/templates/.agents/design/design-system-maker/runtime/local-actions.mjs +184 -0
  549. package/templates/.agents/design/design-system-maker/runtime/local-artifacts.mjs +228 -0
  550. package/templates/.agents/design/design-system-maker/runtime/local-request.mjs +100 -0
  551. package/templates/.agents/design/design-system-maker/runtime/lock.mjs +23 -0
  552. package/templates/.agents/design/design-system-maker/runtime/presentation.mjs +107 -0
  553. package/templates/.agents/design/design-system-maker/runtime/repository-source.mjs +200 -0
  554. package/templates/.agents/design/design-system-maker/runtime/reprocess-mode.mjs +17 -0
  555. package/templates/.agents/design/design-system-maker/runtime/request-contracts.mjs +121 -0
  556. package/templates/.agents/design/design-system-maker/runtime/serve.mjs +53 -0
  557. package/templates/.agents/design/design-system-maker/runtime/server.mjs +363 -0
  558. package/templates/.agents/design/design-system-maker/runtime/service-actions.mjs +59 -0
  559. package/templates/.agents/design/design-system-maker/runtime/service-host.mjs +32 -0
  560. package/templates/.agents/design/design-system-maker/runtime/service-projections.mjs +87 -0
  561. package/templates/.agents/design/design-system-maker/runtime/service.mjs +393 -0
  562. package/templates/.agents/design/design-system-maker/runtime/stop.mjs +38 -0
  563. package/templates/.agents/design/design-system-maker/runtime/trash.mjs +95 -0
  564. package/templates/.agents/design/design-system-maker/zaip-design-system-maker.exe +0 -0
  565. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  566. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  567. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +9 -7
  568. package/templates/.agents/requirements/comparative-audit.md +1 -1
  569. package/templates/.agents/requirements/context-engine.md +1 -1
  570. package/templates/.agents/requirements/cost-observability.md +3 -3
  571. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  572. package/templates/.agents/requirements/data-export.md +1 -1
  573. package/templates/.agents/requirements/design-system.md +1 -1
  574. package/templates/.agents/requirements/execution-engine.md +1 -1
  575. package/templates/.agents/requirements/kanban-dashboard.md +3 -3
  576. package/templates/.agents/requirements/landing-page-forms.md +39 -0
  577. package/templates/.agents/requirements/model-orchestration.md +1 -1
  578. package/templates/.agents/requirements/public-distribution.md +4 -4
  579. package/templates/.agents/requirements/site-performance.md +41 -0
  580. package/templates/.agents/requirements/software-architecture.md +1 -1
  581. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  582. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  583. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  584. package/templates/.agents/rules/autonomy-decision.md +4 -1
  585. package/templates/.agents/rules/cloud-hostinger-autonomy.md +4 -1
  586. package/templates/.agents/rules/core.md +5 -2
  587. package/templates/.agents/rules/framework-maintenance.md +34 -0
  588. package/templates/.agents/rules/frontend-lite.md +2 -1
  589. package/templates/.agents/rules/github-deploy-auth.md +18 -0
  590. package/templates/.agents/rules/infisical-secrets.md +20 -0
  591. package/templates/.agents/rules/landing-page-forms.md +28 -0
  592. package/templates/.agents/rules/lead-measurement.md +20 -0
  593. package/templates/.agents/rules/local-sqlite-storage.md +2 -2
  594. package/templates/.agents/rules/local-state-storage.md +15 -0
  595. package/templates/.agents/rules/production-readiness.md +1 -1
  596. package/templates/.agents/rules/quality-assurance.md +36 -0
  597. package/templates/.agents/rules/repository-responsibility.md +38 -0
  598. package/templates/.agents/rules/security.md +1 -1
  599. package/templates/.agents/rules/site-performance.md +29 -0
  600. package/templates/.agents/rules/website-quality.md +31 -0
  601. package/templates/.agents/rules/workflow.md +1 -1
  602. package/templates/.agents/runtime/VERSION +1 -1
  603. package/templates/.agents/runtime/bin/zaip.mjs +2256 -802
  604. package/templates/.agents/runtime/checksums.sha256 +6 -6
  605. package/templates/.agents/runtime/manifest.json +1 -1
  606. package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
  607. package/templates/.agents/runtime/provenance.json +5 -5
  608. package/templates/.agents/runtime/sbom.cdx.json +7 -7
  609. package/templates/.agents/skills/criar-pasta-obsidian/SKILL.md +2 -2
  610. package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.mjs +7 -24
  611. package/templates/.agents/skills/criar-pasta-obsidian/scripts/generate-obsidian-vault.test.mjs +4 -2
  612. package/templates/.agents/skills/criar-pasta-obsidian/scripts/obsidian-format.mjs +20 -0
  613. package/templates/.agents/skills/zaip-skill-adapters/SKILL.md +6 -0
  614. package/templates/.agents/skills/zaip-skill-application-observability/references/lead-measurement.md +52 -0
  615. package/templates/.agents/skills/zaip-skill-architecture-design/SKILL.md +3 -1
  616. package/templates/.agents/skills/zaip-skill-auth-tenancy/references/lead-measurement.md +42 -0
  617. package/templates/.agents/skills/zaip-skill-author-skills/SKILL.md +1 -1
  618. package/templates/.agents/skills/zaip-skill-author-skills/references/engineering-skill-index.md +4 -0
  619. package/templates/.agents/skills/zaip-skill-author-skills/scripts/audit-skill-catalog.mjs +3 -0
  620. package/templates/.agents/skills/zaip-skill-author-skills/scripts/run-skill-tests.mjs +37 -7
  621. package/templates/.agents/skills/zaip-skill-author-skills/scripts/skill-test-plan.mjs +79 -0
  622. package/templates/.agents/skills/zaip-skill-author-skills/scripts/skill-test-plan.test.mjs +47 -0
  623. package/templates/.agents/skills/zaip-skill-backend/SKILL.md +2 -0
  624. package/templates/.agents/skills/zaip-skill-backend/references/deployment-environments.md +2 -2
  625. package/templates/.agents/skills/zaip-skill-change/references/observable-evidence.md +3 -3
  626. package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +2 -0
  627. package/templates/.agents/skills/zaip-skill-cloudflare-access-setup/SKILL.md +16 -0
  628. package/templates/.agents/skills/zaip-skill-cloudflare-access-setup/agents/openai.yaml +4 -0
  629. package/templates/.agents/skills/zaip-skill-cloudflare-access-setup/references/account-token.md +90 -0
  630. package/templates/.agents/skills/zaip-skill-cloudflare-access-setup/scripts/preview-access.mjs +91 -0
  631. package/templates/.agents/skills/zaip-skill-cloudflare-access-setup/scripts/preview-access.test.mjs +44 -0
  632. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/SKILL.md +4 -2
  633. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workers-static-assets.md +1 -1
  634. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workflow-templates.md +5 -5
  635. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/scripts/cloudflare-github-deploy-contract.test.mjs +24 -5
  636. package/templates/.agents/skills/zaip-skill-config/SKILL.md +33 -8
  637. package/templates/.agents/skills/zaip-skill-config/agents/openai.yaml +2 -2
  638. package/templates/.agents/skills/zaip-skill-config/references/repository-profiles.md +83 -0
  639. package/templates/.agents/skills/zaip-skill-dashboard-sqlite/SKILL.md +2 -2
  640. package/templates/.agents/skills/zaip-skill-data-modeling/references/lead-measurement.md +37 -0
  641. package/templates/.agents/skills/zaip-skill-database-migrations/references/lead-measurement.md +35 -0
  642. package/templates/.agents/skills/zaip-skill-decisions/SKILL.md +1 -0
  643. package/templates/.agents/skills/zaip-skill-deployment-pipeline/SKILL.md +11 -0
  644. package/templates/.agents/skills/zaip-skill-design-maker/SKILL.md +28 -0
  645. package/templates/.agents/skills/zaip-skill-design-maker/agents/openai.yaml +4 -0
  646. package/templates/.agents/skills/zaip-skill-design-maker/references/chat-contract.md +46 -0
  647. package/templates/.agents/skills/zaip-skill-design-maker/references/compose.md +20 -0
  648. package/templates/.agents/skills/zaip-skill-design-maker/references/markdown.md +26 -0
  649. package/templates/.agents/skills/zaip-skill-design-maker/references/repository.md +24 -0
  650. package/templates/.agents/skills/zaip-skill-design-maker/references/url.md +24 -0
  651. package/templates/.agents/skills/zaip-skill-design-redesign/SKILL.md +41 -0
  652. package/templates/.agents/skills/zaip-skill-design-redesign/agents/openai.yaml +6 -0
  653. package/templates/.agents/skills/zaip-skill-design-reproduction/SKILL.md +47 -0
  654. package/templates/.agents/skills/zaip-skill-design-reproduction/agents/openai.yaml +6 -0
  655. package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +6 -0
  656. package/templates/.agents/skills/zaip-skill-design-url-extraction/SKILL.md +50 -0
  657. package/templates/.agents/skills/zaip-skill-design-url-extraction/agents/openai.yaml +6 -0
  658. package/templates/.agents/skills/zaip-skill-design-url-extraction/references/capture-example.json +11 -0
  659. package/templates/.agents/skills/zaip-skill-design-url-extraction/references/runtime-workflow.md +127 -0
  660. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/SKILL.md +3 -1
  661. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-fence.mjs +2 -1
  662. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-lease.mjs +3 -1
  663. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-storage.mjs +40 -0
  664. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/ready-queue-storage.test.mjs +87 -0
  665. package/templates/.agents/skills/zaip-skill-executar-fila-pronta/scripts/scheduled-ready-queue-contract.test.mjs +1 -1
  666. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +11 -3
  667. package/templates/.agents/skills/zaip-skill-execution/references/autonomous-continuation.md +2 -0
  668. package/templates/.agents/skills/zaip-skill-execution/references/controlled-release-recovery.md +10 -4
  669. package/templates/.agents/skills/zaip-skill-execution/references/conversation-promotion.md +38 -0
  670. package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +3 -1
  671. package/templates/.agents/skills/zaip-skill-external-integrations/SKILL.md +2 -0
  672. package/templates/.agents/skills/zaip-skill-external-integrations/references/kommo.md +71 -0
  673. package/templates/.agents/skills/zaip-skill-figma-setup/SKILL.md +42 -0
  674. package/templates/.agents/skills/zaip-skill-figma-setup/agents/openai.yaml +6 -0
  675. package/templates/.agents/skills/zaip-skill-figma-setup/references/capability-contract.json +40 -0
  676. package/templates/.agents/skills/zaip-skill-figma-setup/references/figma-connection.md +60 -0
  677. package/templates/.agents/skills/zaip-skill-figma-setup/references/figma-handoff.md +71 -0
  678. package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +30 -1
  679. package/templates/.agents/skills/zaip-skill-frontend-data-flows/SKILL.md +3 -0
  680. package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +38 -5
  681. package/templates/.agents/skills/zaip-skill-github-deploy/references/authentication.md +15 -0
  682. package/templates/.agents/skills/zaip-skill-github-deploy/references/authorization.md +35 -0
  683. package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +21 -3
  684. package/templates/.agents/skills/zaip-skill-github-deploy/references/literal-read-sequence.md +28 -0
  685. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +4 -2
  686. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-notes.md +4 -4
  687. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/application-content.mjs +82 -0
  688. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/application-content.test.mjs +184 -0
  689. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-publication-authority.mjs +63 -0
  690. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.mjs +42 -36
  691. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.test.mjs +4 -5
  692. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-auth.mjs +400 -0
  693. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-auth.test.mjs +192 -0
  694. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-constraints.test.mjs +159 -0
  695. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract-cli.test.mjs +32 -24
  696. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract-range.test-support.mjs +51 -0
  697. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +213 -225
  698. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs +63 -56
  699. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-idempotent-intent.test.mjs +130 -0
  700. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-publication-intent.test.mjs +112 -5
  701. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deployment-request-conditions.test.mjs +117 -0
  702. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deployment-request-continuation.test.mjs +44 -0
  703. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deployment-request-preservation.test.mjs +58 -0
  704. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deployment-request.mjs +291 -0
  705. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/git-command.mjs +11 -0
  706. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/git-config-paths.mjs +10 -0
  707. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/git-destination.mjs +21 -0
  708. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/git-push-target.mjs +62 -0
  709. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/git-push-target.test.mjs +78 -0
  710. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +4 -2
  711. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/guarded-commits.mjs +132 -42
  712. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight-options.mjs +50 -0
  713. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight-worktree.test.mjs +52 -0
  714. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +70 -119
  715. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +11 -1
  716. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/project-restrictions.mjs +201 -0
  717. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/project-restrictions.test.mjs +154 -0
  718. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-authority-callbacks.test.mjs +46 -0
  719. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-conditions.mjs +193 -0
  720. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-intent.mjs +76 -0
  721. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-plan-binding.mjs +78 -0
  722. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-plan-refusal.mjs +30 -0
  723. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-project-policy.mjs +39 -0
  724. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-2457VC25.mjs +2 -0
  725. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-25VZXDBX.mjs +2 -0
  726. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-2JXOAZ2R.mjs +2 -0
  727. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-2OZK443Y.mjs +2 -0
  728. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-3BDTL55L.mjs +2 -0
  729. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-3MG57Y6I.mjs +2 -0
  730. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-3MQAJ6XX.mjs +2 -0
  731. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-3TUUBJPP.mjs +2 -0
  732. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-45Z34LBQ.mjs +140 -0
  733. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-4GJE2IXL.mjs +2 -0
  734. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-4HLOIRQU.mjs +2 -0
  735. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-55PSJJ75.mjs +2 -0
  736. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-5OTFTK2Y.mjs +2 -0
  737. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-7OFWNBZN.mjs +2 -0
  738. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-7R2IP55E.mjs +2 -0
  739. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-7SBOEN6U.mjs +24 -0
  740. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-A35CQWF4.mjs +2 -0
  741. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-A3ZCURGS.mjs +11 -0
  742. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-BC2LX3QU.mjs +2 -0
  743. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-C2Z26E6U.mjs +2 -0
  744. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-CHJGU2RU.mjs +2 -0
  745. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-D4LGE7UI.mjs +2 -0
  746. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-D5OUJS46.mjs +2 -0
  747. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-D6RZM5OT.mjs +2 -0
  748. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-DOK2R3GV.mjs +2 -0
  749. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-EAHVOUKK.mjs +2 -0
  750. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-FZUNFGZV.mjs +2 -0
  751. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-GGBPBQ6D.mjs +2 -0
  752. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-HFDX2GP6.mjs +2 -0
  753. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-HZ2NRMAG.mjs +2 -0
  754. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-IJKPDKXC.mjs +2 -0
  755. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-JEOOTEUX.mjs +2 -0
  756. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-JF3E72HZ.mjs +2 -0
  757. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-KRHOCS3C.mjs +2 -0
  758. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-LG5MJS2A.mjs +2 -0
  759. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-ML4PMB7C.mjs +2 -0
  760. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-MSCWMPU5.mjs +63 -0
  761. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-NJOFXS7P.mjs +137 -0
  762. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-NORNV3B2.mjs +2 -0
  763. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-PBU2HSKP.mjs +2 -0
  764. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-PG6LGVVW.mjs +2 -0
  765. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-PGYGDY3J.mjs +2 -0
  766. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-QFUQW6LE.mjs +2 -0
  767. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-QI32NI7M.mjs +2 -0
  768. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-R4HD7XOO.mjs +2 -0
  769. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-REHSM3G2.mjs +2 -0
  770. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-S22YDVTM.mjs +2 -0
  771. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-S5P4ZNUQ.mjs +2 -0
  772. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-SCK2RF6V.mjs +2 -0
  773. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-SWFLYM3O.mjs +2 -0
  774. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-TA7RY5MY.mjs +2 -0
  775. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-TM5WG7GR.mjs +2 -0
  776. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-TMVJHK37.mjs +2 -0
  777. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-TPDQAH7C.mjs +2 -0
  778. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-U2KO7ULM.mjs +2 -0
  779. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-U3ISMYJU.mjs +2 -0
  780. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-UKSDAS73.mjs +2 -0
  781. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-UNTPHSZO.mjs +2 -0
  782. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-V4MIRRUB.mjs +2 -0
  783. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-WNXOXX3Z.mjs +2 -0
  784. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-WQGTDRK7.mjs +2 -0
  785. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-WZJIRYT6.mjs +2 -0
  786. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-XED4KYQL.mjs +2 -0
  787. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-XEXCFKHI.mjs +2 -0
  788. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-XJJFARY4.mjs +2 -0
  789. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-XQOFL3K3.mjs +2 -0
  790. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-YAWUSDPM.mjs +2 -0
  791. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-YEUY7TMM.mjs +2 -0
  792. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-Z5X23XXT.mjs +2 -0
  793. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-Z7H2BHYQ.mjs +2 -0
  794. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/chunks/chunk-ZOGCYGYB.mjs +2 -0
  795. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/lifecycle-records.mjs +2 -0
  796. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ar.mjs +2 -0
  797. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-az.mjs +2 -0
  798. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-be.mjs +2 -0
  799. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-bg.mjs +2 -0
  800. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-bn.mjs +2 -0
  801. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ca.mjs +2 -0
  802. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ckb.mjs +2 -0
  803. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-cs.mjs +2 -0
  804. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-da.mjs +2 -0
  805. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-de.mjs +2 -0
  806. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-el.mjs +2 -0
  807. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-en.mjs +2 -0
  808. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-eo.mjs +2 -0
  809. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-es.mjs +2 -0
  810. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-fa.mjs +2 -0
  811. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-fi.mjs +2 -0
  812. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-fr-CA.mjs +2 -0
  813. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-fr.mjs +2 -0
  814. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-gu.mjs +2 -0
  815. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-he.mjs +2 -0
  816. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-hi.mjs +2 -0
  817. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-hr.mjs +2 -0
  818. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-hu.mjs +2 -0
  819. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-hy.mjs +2 -0
  820. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-id.mjs +2 -0
  821. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-is.mjs +2 -0
  822. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-it.mjs +2 -0
  823. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ja.mjs +2 -0
  824. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ka.mjs +2 -0
  825. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-kh.mjs +2 -0
  826. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-km.mjs +2 -0
  827. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-kn.mjs +2 -0
  828. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ko.mjs +2 -0
  829. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-lt.mjs +2 -0
  830. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-mk.mjs +2 -0
  831. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ms.mjs +2 -0
  832. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ne.mjs +2 -0
  833. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-nl.mjs +2 -0
  834. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-nn.mjs +2 -0
  835. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-no.mjs +2 -0
  836. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ota.mjs +2 -0
  837. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-pl.mjs +2 -0
  838. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ps.mjs +2 -0
  839. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-pt-BR.mjs +2 -0
  840. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-pt.mjs +2 -0
  841. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ro.mjs +2 -0
  842. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ru.mjs +2 -0
  843. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-sk.mjs +2 -0
  844. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-sl.mjs +2 -0
  845. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-sv.mjs +2 -0
  846. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ta.mjs +2 -0
  847. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-tg.mjs +2 -0
  848. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-th.mjs +2 -0
  849. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-tk.mjs +2 -0
  850. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-tr.mjs +2 -0
  851. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ua.mjs +2 -0
  852. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-uk.mjs +2 -0
  853. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-ur.mjs +2 -0
  854. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-uz.mjs +2 -0
  855. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-vi.mjs +2 -0
  856. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-yo.mjs +2 -0
  857. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-zh-CN.mjs +2 -0
  858. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/locale-zh-TW.mjs +2 -0
  859. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/manifest.json +565 -0
  860. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/native-authority.mjs +2 -0
  861. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/proof.mjs +2 -0
  862. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/run-records.mjs +2 -0
  863. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/yaml-runtime.mjs +2 -0
  864. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-runtime/zod-runtime.mjs +2 -0
  865. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof-schema.mjs +2 -0
  866. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/publication-proof.test.mjs +79 -0
  867. package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +14 -11
  868. package/templates/.agents/skills/zaip-skill-github-setup/references/bounded-setup.md +42 -0
  869. package/templates/.agents/skills/zaip-skill-github-setup/scripts/setup.mjs +365 -0
  870. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/SKILL.md +13 -3
  871. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/references/operational-procedure.md +4 -4
  872. package/templates/.agents/skills/zaip-skill-google-ads-conversions/SKILL.md +18 -0
  873. package/templates/.agents/skills/zaip-skill-google-ads-conversions/agents/openai.yaml +4 -0
  874. package/templates/.agents/skills/zaip-skill-google-ads-conversions/references/implementation.md +61 -0
  875. package/templates/.agents/skills/zaip-skill-google-analytics/SKILL.md +24 -0
  876. package/templates/.agents/skills/zaip-skill-google-analytics/agents/openai.yaml +4 -0
  877. package/templates/.agents/skills/zaip-skill-google-analytics/references/implementation.md +64 -0
  878. package/templates/.agents/skills/zaip-skill-google-tag-manager/SKILL.md +24 -0
  879. package/templates/.agents/skills/zaip-skill-google-tag-manager/agents/openai.yaml +4 -0
  880. package/templates/.agents/skills/zaip-skill-google-tag-manager/references/implementation.md +71 -0
  881. package/templates/.agents/skills/zaip-skill-google-tag-manager/references/operator-checklist.md +51 -0
  882. package/templates/.agents/skills/zaip-skill-google-tag-manager/references/operator-fixtures.json +93 -0
  883. package/templates/.agents/skills/zaip-skill-google-tag-manager/scripts/check-runbook-links.mjs +103 -0
  884. package/templates/.agents/skills/zaip-skill-google-tag-manager/scripts/google-runbooks.test.mjs +247 -0
  885. package/templates/.agents/skills/zaip-skill-google-tag-manager/scripts/operator-model.mjs +221 -0
  886. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +8 -2
  887. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-cloud-inputs.example.json +3 -3
  888. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/autonomous-runner.md +4 -2
  889. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/cloudflare-agent-setup.md +23 -0
  890. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/cloudflare-dns.md +36 -0
  891. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/guia-iniciante-hostinger-vps.md +4 -4
  892. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/operational-contract.md +3 -3
  893. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/vps-onboarding.md +97 -0
  894. package/templates/.agents/skills/zaip-skill-image-optimization/SKILL.md +31 -0
  895. package/templates/.agents/skills/zaip-skill-image-optimization/agents/openai.yaml +4 -0
  896. package/templates/.agents/skills/zaip-skill-image-optimization/references/adapters.md +36 -0
  897. package/templates/.agents/skills/zaip-skill-image-optimization/references/pipeline.md +35 -0
  898. package/templates/.agents/skills/zaip-skill-image-optimization/scripts/images.mjs +370 -0
  899. package/templates/.agents/skills/zaip-skill-image-optimization/scripts/images.test.mjs +385 -0
  900. package/templates/.agents/skills/zaip-skill-infisical/SKILL.md +20 -0
  901. package/templates/.agents/skills/zaip-skill-infisical/agents/openai.yaml +4 -0
  902. package/templates/.agents/skills/zaip-skill-infisical/assets/compose.yaml +62 -0
  903. package/templates/.agents/skills/zaip-skill-infisical/assets/terraform/infisical.tf +57 -0
  904. package/templates/.agents/skills/zaip-skill-infisical/references/credential-workflow.md +88 -0
  905. package/templates/.agents/skills/zaip-skill-infisical/references/first-initialization.md +51 -0
  906. package/templates/.agents/skills/zaip-skill-infisical/references/security-and-edition.md +19 -0
  907. package/templates/.agents/skills/zaip-skill-infisical/references/self-hosting.md +71 -0
  908. package/templates/.agents/skills/zaip-skill-infisical/references/terraform.md +54 -0
  909. package/templates/.agents/skills/zaip-skill-infisical/scripts/prepare-self-host.mjs +92 -0
  910. package/templates/.agents/skills/zaip-skill-infisical/scripts/prepare-self-host.test.mjs +69 -0
  911. package/templates/.agents/skills/zaip-skill-infisical/scripts/preview-terraform.mjs +70 -0
  912. package/templates/.agents/skills/zaip-skill-infisical/scripts/preview-terraform.test.mjs +51 -0
  913. package/templates/.agents/skills/zaip-skill-infisical/scripts/terraform-plan-integration.test.mjs +83 -0
  914. package/templates/.agents/skills/zaip-skill-landing-page-forms/SKILL.md +37 -0
  915. package/templates/.agents/skills/zaip-skill-landing-page-forms/agents/openai.yaml +4 -0
  916. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/accessibility.md +29 -0
  917. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/contact-then-qualification.example.json +83 -0
  918. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/contracts.md +70 -0
  919. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/examples.md +21 -0
  920. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/journey.md +30 -0
  921. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/multistep.example.json +84 -0
  922. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/single-screen.example.json +76 -0
  923. package/templates/.agents/skills/zaip-skill-landing-page-forms/references/verification.md +24 -0
  924. package/templates/.agents/skills/zaip-skill-landing-page-forms/scripts/validate-plan.mjs +306 -0
  925. package/templates/.agents/skills/zaip-skill-landing-page-forms/scripts/validate-plan.test.mjs +183 -0
  926. package/templates/.agents/skills/zaip-skill-lead-measurement/SKILL.md +32 -0
  927. package/templates/.agents/skills/zaip-skill-lead-measurement/agents/openai.yaml +4 -0
  928. package/templates/.agents/skills/zaip-skill-lead-measurement/references/architecture.md +51 -0
  929. package/templates/.agents/skills/zaip-skill-lead-measurement/references/authority.md +49 -0
  930. package/templates/.agents/skills/zaip-skill-lead-measurement/references/bant-contract.md +36 -0
  931. package/templates/.agents/skills/zaip-skill-lead-measurement/references/consent-contract.md +48 -0
  932. package/templates/.agents/skills/zaip-skill-lead-measurement/references/delivery-contract.md +65 -0
  933. package/templates/.agents/skills/zaip-skill-lead-measurement/references/event-contract.md +47 -0
  934. package/templates/.agents/skills/zaip-skill-lead-measurement/references/examples/escola.json +180 -0
  935. package/templates/.agents/skills/zaip-skill-lead-measurement/references/examples/moradigna-regression.json +158 -0
  936. package/templates/.agents/skills/zaip-skill-lead-measurement/references/examples/solar.json +165 -0
  937. package/templates/.agents/skills/zaip-skill-lead-measurement/references/identity-contract.md +53 -0
  938. package/templates/.agents/skills/zaip-skill-lead-measurement/references/implementation-plan.md +60 -0
  939. package/templates/.agents/skills/zaip-skill-lead-measurement/references/kommo-contract.md +83 -0
  940. package/templates/.agents/skills/zaip-skill-lead-measurement/references/meta-mapping.md +28 -0
  941. package/templates/.agents/skills/zaip-skill-lead-measurement/references/migration.md +65 -0
  942. package/templates/.agents/skills/zaip-skill-lead-measurement/references/operations.md +125 -0
  943. package/templates/.agents/skills/zaip-skill-lead-measurement/references/persistence-reference.md +65 -0
  944. package/templates/.agents/skills/zaip-skill-lead-measurement/references/questionnaire-v2.schema.json +136 -0
  945. package/templates/.agents/skills/zaip-skill-lead-measurement/references/synthetic-config.json +24 -0
  946. package/templates/.agents/skills/zaip-skill-lead-measurement/references/synthetic-event.json +19 -0
  947. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/check-questionnaire.mjs +314 -0
  948. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/check-questionnaire.test.mjs +338 -0
  949. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent-cases-core.mjs +144 -0
  950. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent-cases-privacy.mjs +183 -0
  951. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent-fixtures.mjs +60 -0
  952. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent-rollback-support.mjs +114 -0
  953. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent.mjs +222 -0
  954. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/consent.test.mjs +294 -0
  955. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-ledger.mjs +179 -0
  956. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-case-fixtures.mjs +118 -0
  957. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-cases.mjs +6 -0
  958. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-contract-cases.mjs +218 -0
  959. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-contract.mjs +182 -0
  960. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-proof-support.mjs +104 -0
  961. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-proof.mjs +272 -0
  962. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2-state-cases.mjs +248 -0
  963. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/delivery-v2.mjs +234 -0
  964. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/lead-measurement.mjs +277 -0
  965. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/lead-measurement.test.mjs +288 -0
  966. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/questionnaire-ast-cases.mjs +127 -0
  967. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/questionnaire-test-support.mjs +25 -0
  968. package/templates/.agents/skills/zaip-skill-lead-measurement/scripts/questionnaire-validation.mjs +155 -0
  969. package/templates/.agents/skills/zaip-skill-lifecycle-closure/SKILL.md +30 -2
  970. package/templates/.agents/skills/zaip-skill-lifecycle-closure/references/empty-usage-lock.md +56 -0
  971. package/templates/.agents/skills/zaip-skill-lifecycle-closure/references/late-finalization.md +158 -0
  972. package/templates/.agents/skills/zaip-skill-lifecycle-closure/references/local-catalog-closure.md +37 -0
  973. package/templates/.agents/skills/zaip-skill-lifecycle-closure/references/post-publication-task-first.md +1 -1
  974. package/templates/.agents/skills/zaip-skill-lifecycle-closure/scripts/empty-lock-native.cs +113 -0
  975. package/templates/.agents/skills/zaip-skill-lifecycle-closure/scripts/empty-lock-native.ps1 +9 -0
  976. package/templates/.agents/skills/zaip-skill-lifecycle-closure/scripts/recover-empty-usage-lock.mjs +194 -0
  977. package/templates/.agents/skills/zaip-skill-local-credentials/SKILL.md +27 -0
  978. package/templates/.agents/skills/zaip-skill-maintenance-enter/SKILL.md +8 -6
  979. package/templates/.agents/skills/zaip-skill-maintenance-enter/scripts/maintenance.mjs +4 -4
  980. package/templates/.agents/skills/zaip-skill-maintenance-enter/scripts/maintenance.test.mjs +2 -2
  981. package/templates/.agents/skills/zaip-skill-maintenance-exit/SKILL.md +3 -3
  982. package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +11 -0
  983. package/templates/.agents/skills/zaip-skill-marketing/references/search-content.md +17 -0
  984. package/templates/.agents/skills/zaip-skill-meta-conversions/SKILL.md +23 -0
  985. package/templates/.agents/skills/zaip-skill-meta-conversions/agents/openai.yaml +4 -0
  986. package/templates/.agents/skills/zaip-skill-meta-conversions/references/implementation.md +88 -0
  987. package/templates/.agents/skills/zaip-skill-meta-conversions/references/synthetic-meta.json +27 -0
  988. package/templates/.agents/skills/zaip-skill-meta-conversions/scripts/check-meta-links.mjs +88 -0
  989. package/templates/.agents/skills/zaip-skill-meta-conversions/scripts/meta-model.mjs +369 -0
  990. package/templates/.agents/skills/zaip-skill-meta-conversions/scripts/meta-model.test.mjs +394 -0
  991. package/templates/.agents/skills/zaip-skill-performance-engineering/SKILL.md +26 -1
  992. package/templates/.agents/skills/zaip-skill-performance-engineering/references/astro-islands.md +41 -0
  993. package/templates/.agents/skills/zaip-skill-performance-engineering/references/controlled-runner.md +38 -0
  994. package/templates/.agents/skills/zaip-skill-performance-engineering/references/google-diagnostics.md +46 -0
  995. package/templates/.agents/skills/zaip-skill-performance-engineering/references/report-contract.md +99 -0
  996. package/templates/.agents/skills/zaip-skill-performance-engineering/references/site-budgets.json +25 -0
  997. package/templates/.agents/skills/zaip-skill-performance-engineering/references/site-performance.md +83 -0
  998. package/templates/.agents/skills/zaip-skill-performance-engineering/references/third-party-performance.md +57 -0
  999. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/assess-reports.mjs +42 -0
  1000. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/capture-site.mjs +155 -0
  1001. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/local-preview.mjs +84 -0
  1002. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/performance-report.mjs +142 -0
  1003. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/performance-report.test.mjs +122 -0
  1004. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/report-fixtures.test-support.mjs +51 -0
  1005. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/report-import.mjs +209 -0
  1006. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/report-import.test.mjs +164 -0
  1007. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/run-lighthouse.mjs +151 -0
  1008. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/series-gate.mjs +225 -0
  1009. package/templates/.agents/skills/zaip-skill-performance-engineering/scripts/series-gate.test.mjs +143 -0
  1010. package/templates/.agents/skills/zaip-skill-qa/SKILL.md +54 -0
  1011. package/templates/.agents/skills/zaip-skill-qa/agents/openai.yaml +4 -0
  1012. package/templates/.agents/skills/zaip-skill-qa/references/host-protocol.md +125 -0
  1013. package/templates/.agents/skills/zaip-skill-qa/references/landing-page-forms.md +23 -0
  1014. package/templates/.agents/skills/zaip-skill-qa/references/proof-adapters.md +92 -0
  1015. package/templates/.agents/skills/zaip-skill-qa/references/scenarios.md +73 -0
  1016. package/templates/.agents/skills/zaip-skill-qa/references/seo-geo.md +33 -0
  1017. package/templates/.agents/skills/zaip-skill-qa/references/site-performance.md +20 -0
  1018. package/templates/.agents/skills/zaip-skill-qa/scripts/observe-dashboard-ui.mjs +152 -0
  1019. package/templates/.agents/skills/zaip-skill-qa/scripts/observe-dashboard-ui.test.mjs +65 -0
  1020. package/templates/.agents/skills/zaip-skill-qa/scripts/qa-contract.test.mjs +203 -0
  1021. package/templates/.agents/skills/zaip-skill-qa/scripts/run-behavior-tests.mjs +369 -0
  1022. package/templates/.agents/skills/zaip-skill-qa/scripts/run-behavior-tests.test.mjs +168 -0
  1023. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/SKILL.md +33 -0
  1024. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +42 -62
  1025. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-native-window.mjs +115 -0
  1026. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-native-window.test.mjs +123 -0
  1027. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-optional-timing.test.mjs +34 -0
  1028. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-reviewed-pairs-fixture.mjs +130 -0
  1029. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-deduplicate-apply.mjs +106 -0
  1030. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +22 -45
  1031. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +0 -24
  1032. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +73 -9
  1033. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-reviewed-order.mjs +48 -0
  1034. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-reviewed-pairs.mjs +255 -0
  1035. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-reviewed-pairs.test.mjs +329 -0
  1036. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-token-snapshots.mjs +49 -0
  1037. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-token-snapshots.test.mjs +33 -0
  1038. package/templates/.agents/skills/zaip-skill-refactor-landing-page/SKILL.md +6 -0
  1039. package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +19 -1
  1040. package/templates/.agents/skills/zaip-skill-release-qualification/references/frozen-task-recovery.md +47 -0
  1041. package/templates/.agents/skills/zaip-skill-release-qualification/references/local-catalog.md +136 -0
  1042. package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +7 -5
  1043. package/templates/.agents/skills/zaip-skill-release-qualification/references/remote-validation.md +147 -0
  1044. package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +1 -0
  1045. package/templates/.agents/skills/zaip-skill-sales-methodology/references/bant-discovery.md +28 -0
  1046. package/templates/.agents/skills/zaip-skill-screenshot-intake/SKILL.md +40 -0
  1047. package/templates/.agents/skills/zaip-skill-screenshot-intake/agents/openai.yaml +6 -0
  1048. package/templates/.agents/skills/zaip-skill-screenshot-intake/references/request-example.json +36 -0
  1049. package/templates/.agents/skills/zaip-skill-screenshot-intake/references/runtime-workflow.md +110 -0
  1050. package/templates/.agents/skills/zaip-skill-search-observability/SKILL.md +27 -0
  1051. package/templates/.agents/skills/zaip-skill-search-observability/agents/openai.yaml +4 -0
  1052. package/templates/.agents/skills/zaip-skill-search-observability/references/report-template.md +32 -0
  1053. package/templates/.agents/skills/zaip-skill-search-observability/references/workflow.md +56 -0
  1054. package/templates/.agents/skills/zaip-skill-search-observability/scripts/search-report.mjs +139 -0
  1055. package/templates/.agents/skills/zaip-skill-search-observability/scripts/search-report.test.mjs +72 -0
  1056. package/templates/.agents/skills/zaip-skill-setup/SKILL.md +51 -44
  1057. package/templates/.agents/skills/zaip-skill-setup/agents/openai.yaml +1 -1
  1058. package/templates/.agents/skills/zaip-skill-setup/references/basic-onboarding.md +41 -0
  1059. package/templates/.agents/skills/zaip-skill-setup/references/codex-activation.md +40 -0
  1060. package/templates/.agents/skills/zaip-skill-setup/scripts/onboarding-contract.test.mjs +41 -0
  1061. package/templates/.agents/skills/zaip-skill-spec/SKILL.md +1 -0
  1062. package/templates/.agents/skills/zaip-skill-sqlite-read-model/SKILL.md +4 -3
  1063. package/templates/.agents/skills/zaip-skill-task/SKILL.md +1 -0
  1064. package/templates/.agents/skills/zaip-skill-task/references/commit-policy.md +1 -1
  1065. package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +18 -0
  1066. package/templates/.agents/skills/zaip-skill-testing-strategy/references/frontend-impact.md +81 -0
  1067. package/templates/.agents/skills/zaip-skill-testing-strategy/references/verification-adoption.md +31 -0
  1068. package/templates/.agents/skills/zaip-skill-testing-strategy/scripts/validation-plan.mjs +168 -0
  1069. package/templates/.agents/skills/zaip-skill-testing-strategy/scripts/validation-plan.test.mjs +146 -0
  1070. package/templates/.agents/skills/zaip-skill-tool-setup/scripts/tool-state.mjs +1 -1
  1071. package/templates/.agents/skills/zaip-skill-use-connectors/SKILL.md +8 -0
  1072. package/templates/.agents/skills/zaip-skill-use-connectors/scripts/select-connector.mjs +73 -0
  1073. package/templates/.agents/skills/zaip-skill-use-connectors/scripts/select-connector.test.mjs +85 -0
  1074. package/templates/.agents/skills/zaip-skill-visual-report/SKILL.md +41 -0
  1075. package/templates/.agents/skills/zaip-skill-visual-report/agents/openai.yaml +6 -0
  1076. package/templates/.agents/skills/zaip-skill-visual-report/references/fidelity-proof.md +56 -0
  1077. package/templates/.agents/skills/zaip-skill-visual-report/references/intake-state.md +64 -0
  1078. package/templates/.agents/skills/zaip-skill-visual-report/references/source-contract.md +79 -0
  1079. package/templates/.agents/skills/zaip-skill-visual-report/references/synthesis-template.md +67 -0
  1080. package/templates/.agents/skills/zaip-skill-visual-report/references/visual-contract.json +40 -0
  1081. package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +73 -17
  1082. package/templates/.agents/skills/zaip-skill-website-readiness/agents/openai.yaml +2 -2
  1083. package/templates/.agents/skills/zaip-skill-website-readiness/references/capability-checklist.md +8 -4
  1084. package/templates/.agents/skills/zaip-skill-website-readiness/references/change-discovery.md +22 -0
  1085. package/templates/.agents/skills/zaip-skill-website-readiness/references/content-and-agents.md +25 -0
  1086. package/templates/.agents/skills/zaip-skill-website-readiness/references/crawler-policy.md +35 -0
  1087. package/templates/.agents/skills/zaip-skill-website-readiness/references/schema-matrix.md +23 -0
  1088. package/templates/.agents/skills/zaip-skill-website-readiness/references/search-evidence.md +36 -0
  1089. package/templates/.agents/skills/zaip-skill-website-readiness/references/site-quality.example.json +14 -0
  1090. package/templates/.agents/skills/zaip-skill-website-readiness/references/site-quality.md +109 -0
  1091. package/templates/.agents/skills/zaip-skill-website-readiness/references/site-validation.md +60 -0
  1092. package/templates/.agents/skills/zaip-skill-website-readiness/references/sources.md +37 -0
  1093. package/templates/.agents/skills/zaip-skill-website-readiness/references/visual-preservation.md +84 -0
  1094. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/agent-content.mjs +116 -0
  1095. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/agent-content.test.mjs +83 -0
  1096. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/audit-site.mjs +136 -0
  1097. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/html-facts.mjs +56 -0
  1098. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/index-directives.mjs +29 -0
  1099. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/quality-plan.mjs +62 -0
  1100. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/robots-policy.mjs +63 -0
  1101. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/search-policy.test.mjs +183 -0
  1102. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/site-audit.mjs +243 -0
  1103. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/site-audit.test.mjs +287 -0
  1104. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/sitemap-policy.mjs +111 -0
  1105. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/verify-site-design.mjs +130 -0
  1106. package/templates/.agents/skills/zaip-skill-website-readiness/scripts/visual-preservation.mjs +160 -0
  1107. package/templates/.agents/skills/zaip-skill-worktree-recovery/SKILL.md +70 -0
  1108. package/templates/.agents/skills/zaip-skill-worktree-recovery/agents/openai.yaml +4 -0
  1109. package/templates/.agents/skills/zaip-skill-worktree-recovery/references/complete-preservation.md +70 -0
  1110. package/templates/.agents/skills/zaip-skill-worktree-recovery/references/default-policy.md +53 -0
  1111. package/templates/.agents/skills/zaip-skill-worktree-recovery/references/lifecycle-roots.md +106 -0
  1112. package/templates/.agents/skills/zaip-skill-worktree-recovery/references/metadata-overlay.md +45 -0
  1113. package/templates/.agents/skills/zaip-skill-worktree-recovery/references/procedure.md +49 -0
  1114. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/complete-preservation.mjs +252 -0
  1115. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-local-archive.mjs +162 -0
  1116. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-local-git.mjs +111 -0
  1117. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-acl.ps1 +37 -0
  1118. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-activate.ps1 +66 -0
  1119. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-alias.mjs +202 -0
  1120. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-batches.mjs +88 -0
  1121. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-copy-session.mjs +84 -0
  1122. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-cutover.mjs +350 -0
  1123. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-files.mjs +109 -0
  1124. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-generation-posix.mjs +194 -0
  1125. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-generation.mjs +173 -0
  1126. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-journal.mjs +88 -0
  1127. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-layout.mjs +102 -0
  1128. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-lock.mjs +106 -0
  1129. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-migration.mjs +234 -0
  1130. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-observation-tail.mjs +148 -0
  1131. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-permissions.mjs +52 -0
  1132. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-plan.mjs +143 -0
  1133. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-preparation.mjs +110 -0
  1134. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-process-start.ps1 +7 -0
  1135. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-quiescence.ps1 +11 -0
  1136. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-receipt-lease.mjs +67 -0
  1137. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-reuse.mjs +68 -0
  1138. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/durable-state-telemetry-version.mjs +187 -0
  1139. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/git-process.mjs +85 -0
  1140. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/metadata-overlay.mjs +302 -0
  1141. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/metadata-secrets.mjs +44 -0
  1142. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/migrate-durable-state.mjs +49 -0
  1143. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/recovery.mjs +247 -0
  1144. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/retention-marker.mjs +44 -0
  1145. package/templates/.agents/skills/zaip-skill-worktree-recovery/scripts/worktree-proof.mjs +148 -0
  1146. package/templates/.agents/tools/api/kommo-crm/README.md +13 -9
  1147. package/templates/.agents/tools/cloud-onboarding-architecture.mjs +273 -0
  1148. package/templates/.agents/tools/cloud-onboarding-bootstrap.test.mjs +176 -0
  1149. package/templates/.agents/tools/cloud-onboarding-configure.mjs +146 -0
  1150. package/templates/.agents/tools/cloud-onboarding-credentials.mjs +279 -0
  1151. package/templates/.agents/tools/cloud-onboarding-files.mjs +190 -0
  1152. package/templates/.agents/tools/cloud-onboarding-files.test.mjs +72 -0
  1153. package/templates/.agents/tools/cloud-onboarding-generation.mjs +161 -0
  1154. package/templates/.agents/tools/cloud-onboarding-generation.test.mjs +129 -0
  1155. package/templates/.agents/tools/cloud-onboarding-policy.mjs +196 -0
  1156. package/templates/.agents/tools/cloud-onboarding-provider.mjs +228 -0
  1157. package/templates/.agents/tools/cloud-onboarding-provider.test.mjs +144 -0
  1158. package/templates/.agents/tools/cloud-onboarding-recovery.test.mjs +306 -0
  1159. package/templates/.agents/tools/cloud-onboarding-ssh.mjs +223 -0
  1160. package/templates/.agents/tools/cloud-onboarding-terraform.mjs +80 -0
  1161. package/templates/.agents/tools/cloud-onboarding-test-fixture.mjs +184 -0
  1162. package/templates/.agents/tools/cloud-onboarding-test-fixtures.mjs +117 -0
  1163. package/templates/.agents/tools/cloud-onboarding.mjs +196 -0
  1164. package/templates/.agents/tools/cloud-onboarding.ssh.integration.test.mjs +391 -0
  1165. package/templates/.agents/tools/cloud-onboarding.test.mjs +237 -0
  1166. package/templates/.agents/tools/cloud-runner-arguments.mjs +37 -0
  1167. package/templates/.agents/tools/cloud-runner-dns.mjs +234 -11
  1168. package/templates/.agents/tools/cloud-runner-dns.test.mjs +256 -0
  1169. package/templates/.agents/tools/cloud-runner-process.mjs +61 -0
  1170. package/templates/.agents/tools/cloud-runner-process.test.mjs +43 -0
  1171. package/templates/.agents/tools/cloud-runner.integration.test.mjs +19 -3
  1172. package/templates/.agents/tools/cloud-runner.mjs +49 -169
  1173. package/templates/.agents/tools/cloud-runner.test.mjs +7 -42
  1174. package/templates/.agents/tools/historical-local-archive.mjs +89 -0
  1175. package/templates/.agents/tools/infisical-bootstrap-windows.test.mjs +12 -0
  1176. package/templates/.agents/tools/infisical-bootstrap.mjs +240 -0
  1177. package/templates/.agents/tools/infisical-bootstrap.test-support.mjs +39 -0
  1178. package/templates/.agents/tools/infisical-bootstrap.test.mjs +193 -0
  1179. package/templates/.agents/tools/infisical-policy.mjs +134 -0
  1180. package/templates/.agents/tools/infisical-runner.mjs +349 -0
  1181. package/templates/.agents/tools/infisical-runner.test.mjs +266 -0
  1182. package/templates/.agents/tools/mcp/infra/cloudflare/README.md +3 -17
  1183. package/templates/.agents/tools/mcp/infra/cloudflare/manifest.yaml +6 -10
  1184. package/templates/.agents/tools/repository-cloud-boundary.test.mjs +41 -0
  1185. package/templates/.agents/tools/repository-policy.mjs +257 -0
  1186. package/templates/.agents/tools/repository-profile.mjs +116 -0
  1187. package/templates/.agents/tools/repository-profile.test.mjs +67 -0
  1188. package/templates/.agents/tools/secret-inventory.mjs +150 -0
  1189. package/templates/.agents/tools/secret-inventory.test.mjs +60 -0
  1190. package/templates/.agents/tools/visual-intake/cli.mjs +72 -0
  1191. package/templates/.agents/tools/visual-intake/fs.mjs +137 -0
  1192. package/templates/.agents/tools/visual-intake/lock.mjs +98 -0
  1193. package/templates/.agents/tools/visual-intake/report.mjs +69 -0
  1194. package/templates/.agents/tools/visual-intake/runtime.mjs +330 -0
  1195. package/templates/.agents/tools/visual-intake/schema.mjs +235 -0
  1196. package/templates/.agents/tools/visual-intake/transaction.mjs +206 -0
  1197. package/templates/.agents/tools/visual-url/browser-cdp.mjs +167 -0
  1198. package/templates/.agents/tools/visual-url/browser-page-evidence.mjs +111 -0
  1199. package/templates/.agents/tools/visual-url/browser-proxy.mjs +194 -0
  1200. package/templates/.agents/tools/visual-url/browser-rendered-sample.mjs +312 -0
  1201. package/templates/.agents/tools/visual-url/browser-source.mjs +398 -0
  1202. package/templates/.agents/tools/visual-url/capture.mjs +119 -0
  1203. package/templates/.agents/tools/visual-url/captured-visual.mjs +301 -0
  1204. package/templates/.agents/tools/visual-url/cli.mjs +29 -0
  1205. package/templates/.agents/tools/visual-url/color-candidates.mjs +161 -0
  1206. package/templates/.agents/tools/visual-url/colors.mjs +98 -0
  1207. package/templates/.agents/tools/visual-url/contrast.mjs +40 -0
  1208. package/templates/.agents/tools/visual-url/css-sample.mjs +109 -0
  1209. package/templates/.agents/tools/visual-url/design-lint.mjs +83 -0
  1210. package/templates/.agents/tools/visual-url/design-score.mjs +217 -0
  1211. package/templates/.agents/tools/visual-url/failure.mjs +56 -0
  1212. package/templates/.agents/tools/visual-url/files.mjs +176 -0
  1213. package/templates/.agents/tools/visual-url/generated-tokens.mjs +369 -0
  1214. package/templates/.agents/tools/visual-url/handoff.mjs +85 -0
  1215. package/templates/.agents/tools/visual-url/icon.mjs +110 -0
  1216. package/templates/.agents/tools/visual-url/local-source.mjs +63 -0
  1217. package/templates/.agents/tools/visual-url/parser.mjs +288 -0
  1218. package/templates/.agents/tools/visual-url/policy.mjs +201 -0
  1219. package/templates/.agents/tools/visual-url/proposal-markdown.mjs +39 -0
  1220. package/templates/.agents/tools/visual-url/proposal.mjs +388 -0
  1221. package/templates/.agents/tools/visual-url/report.mjs +305 -0
  1222. package/templates/.agents/tools/visual-url/runtime.mjs +218 -0
  1223. package/templates/.agents/tools/visual-url/safe-visual-value.mjs +49 -0
  1224. package/templates/.agents/tools/visual-url/transport.mjs +187 -0
  1225. package/templates/.agents/tools/visual-url/visual-model.mjs +393 -0
  1226. package/templates/.agents/zaip-aios/VERSION +1 -1
  1227. package/templates/.agents/zaip-aios/guides/06-execucao.md +1 -1
  1228. package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +1 -1
  1229. package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +2 -2
  1230. package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +60 -18
  1231. package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +8 -0
  1232. package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +2 -2
  1233. package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +2 -2
  1234. package/templates/infra/terraform/README.md +2 -0
  1235. package/templates/infra/terraform/infisical.tf +57 -0
  1236. package/templates/infra/terraform/terraform.tfvars.example +5 -0
  1237. package/templates/infra/terraform/variables.tf +1 -1
  1238. package/templates/scripts/validate-cloud-hostinger-contract.mjs +4 -1
  1239. package/templates/template-manifest.json +3848 -1119
  1240. package/templates/.agents/architecture/hostinger-cloudflare-terraform.md +0 -90
  1241. package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-uR-asJv_.js +0 -1
  1242. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-1gE8RHel.js +0 -3
  1243. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-B0Jwz_rk.js +0 -68
  1244. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DZhppOIk.css +0 -1
  1245. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DtLrd13g.js +0 -2
  1246. package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-kxWwSKin.js +0 -146
  1247. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DashboardFilters.stories-Chm_dXV7.js +0 -9
  1248. package/templates/.agents/design/apps/catalog/dist/storybook/assets/DashboardFiltersSpecimen-9CaCbGIZ.js +0 -1
  1249. package/templates/.agents/design/apps/catalog/dist/storybook/assets/WorkspaceStatusSpecimen-DQnSS6s9.js +0 -1
  1250. package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-Do9sjqiW.js +0 -1
  1251. package/templates/.agents/design/apps/catalog/dist/storybook/assets/iframe-0W0Gj_Gs.css +0 -1
  1252. package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-NrUxok8K.js +0 -1
@@ -0,0 +1,63 @@
1
+ import {createRequire as __zaipCreateRequire} from "node:module";const require=__zaipCreateRequire(import.meta.url);
2
+ import{a as af}from"./chunk-UNTPHSZO.mjs";import{a as lf}from"./chunk-TM5WG7GR.mjs";import{a as df}from"./chunk-D4LGE7UI.mjs";import{a as ff}from"./chunk-V4MIRRUB.mjs";import{a as pf}from"./chunk-XQOFL3K3.mjs";import{a as ef}from"./chunk-U3ISMYJU.mjs";import{a as tf}from"./chunk-4GJE2IXL.mjs";import{a as rf}from"./chunk-FZUNFGZV.mjs";import{a as nf}from"./chunk-XJJFARY4.mjs";import{a as of}from"./chunk-KRHOCS3C.mjs";import{a as uf}from"./chunk-BC2LX3QU.mjs";import{a as sf}from"./chunk-3MG57Y6I.mjs";import{a as cf}from"./chunk-2JXOAZ2R.mjs";import{a as Jl}from"./chunk-7R2IP55E.mjs";import{a as Gl}from"./chunk-Z5X23XXT.mjs";import{a as Wl}from"./chunk-D5OUJS46.mjs";import{a as ql}from"./chunk-GGBPBQ6D.mjs";import{a as Xl}from"./chunk-REHSM3G2.mjs";import{a as Yl}from"./chunk-QFUQW6LE.mjs";import{a as Hl}from"./chunk-3TUUBJPP.mjs";import{a as Ql}from"./chunk-Z7H2BHYQ.mjs";import{a as Rl}from"./chunk-HZ2NRMAG.mjs";import{a as Vl}from"./chunk-IJKPDKXC.mjs";import{a as jl}from"./chunk-PGYGDY3J.mjs";import{a as Fl}from"./chunk-U2KO7ULM.mjs";import{a as Ml}from"./chunk-YAWUSDPM.mjs";import{a as Ul}from"./chunk-3MQAJ6XX.mjs";import{a as Bl}from"./chunk-DOK2R3GV.mjs";import{a as Kl}from"./chunk-5OTFTK2Y.mjs";import{a as Al}from"./chunk-7OFWNBZN.mjs";import{a as Ol}from"./chunk-C2Z26E6U.mjs";import{a as Nl}from"./chunk-SWFLYM3O.mjs";import{a as Tl}from"./chunk-CHJGU2RU.mjs";import{a as Cl}from"./chunk-S5P4ZNUQ.mjs";import{a as Dl}from"./chunk-ML4PMB7C.mjs";import{a as El}from"./chunk-NORNV3B2.mjs";import{a as Ll}from"./chunk-55PSJJ75.mjs";import{a as vl}from"./chunk-PG6LGVVW.mjs";import{a as zl}from"./chunk-XEXCFKHI.mjs";import{a as kl}from"./chunk-QI32NI7M.mjs";import{a as xl}from"./chunk-HFDX2GP6.mjs";import{a as Il}from"./chunk-WNXOXX3Z.mjs";import{a as Zl}from"./chunk-SCK2RF6V.mjs";import{a as Sl}from"./chunk-25VZXDBX.mjs";import{a as Pl}from"./chunk-UKSDAS73.mjs";import{a as hl}from"./chunk-2457VC25.mjs";import{a as Ar}from"./chunk-PBU2HSKP.mjs";import{a as gl}from"./chunk-D6RZM5OT.mjs";import{a as _l}from"./chunk-A35CQWF4.mjs";import{a as $l}from"./chunk-4HLOIRQU.mjs";import{a as yl}from"./chunk-S22YDVTM.mjs";import{a as bl}from"./chunk-EAHVOUKK.mjs";import{a as wl}from"./chunk-3BDTL55L.mjs";import{a as ul}from"./chunk-R4HD7XOO.mjs";import{a as cl}from"./chunk-LG5MJS2A.mjs";import{a as al}from"./chunk-TPDQAH7C.mjs";import{a as ll}from"./chunk-WZJIRYT6.mjs";import{a as fl}from"./chunk-TMVJHK37.mjs";import{a as pl}from"./chunk-WQGTDRK7.mjs";import{a as dl}from"./chunk-JEOOTEUX.mjs";import{a as ml}from"./chunk-XED4KYQL.mjs";import{a as il}from"./chunk-JF3E72HZ.mjs";import{a as sl}from"./chunk-TA7RY5MY.mjs";import{A as kr,B as xr,C as X,D as tl,E as ee,F as Zt,G as Ir,H as te,I as Zr,J as Be,K as Sr,M as St,N as rl,O as Pr,P as S,Q as nl,R as ol,S as w,T as To,U as p,V as Do,W as oe,X as Je,Y,Z as V,a as _r,b as xt,d as It,e as $r,f as No,g as _e,h as yr,i as qa,j as G,k as wr,l as Xa,m as q,n as Ya,o as Co,p as br,q as Ha,r as $e,s as vr,t as zr,u as Qa,v as se,w as R,x as _,z as el}from"./chunk-2OZK443Y.mjs";import{c as ge}from"./chunk-YEUY7TMM.mjs";var t_={};ge(t_,{$brand:()=>Do,$input:()=>su,$output:()=>iu,INVALID:()=>J,NEVER:()=>To,TimePrecision:()=>$u,ZodAny:()=>ia,ZodArray:()=>aa,ZodBase64:()=>bo,ZodBase64URL:()=>vo,ZodBigInt:()=>bt,ZodBigIntFormat:()=>xo,ZodBoolean:()=>wt,ZodCIDRv4:()=>yo,ZodCIDRv6:()=>wo,ZodCUID:()=>fo,ZodCUID2:()=>po,ZodCatch:()=>Aa,ZodCodec:()=>pr,ZodCompileAsyncError:()=>ue,ZodCompileUnsupportedError:()=>P,ZodCreditCard:()=>Yc,ZodCustom:()=>dr,ZodCustomStringFormat:()=>Me,ZodDate:()=>sr,ZodDefault:()=>ka,ZodDiscriminatedUnion:()=>fa,ZodE164:()=>zo,ZodEmail:()=>uo,ZodEmoji:()=>ao,ZodEnum:()=>_t,ZodError:()=>Pg,ZodExactOptional:()=>Po,ZodFile:()=>wa,ZodFirstPartyTypeKind:()=>Ba,ZodFunction:()=>ja,ZodGUID:()=>co,ZodIBAN:()=>Hc,ZodIPv4:()=>_o,ZodIPv6:()=>$o,ZodISODate:()=>Ie,ZodISODateTime:()=>xe,ZodISODuration:()=>Se,ZodISOTime:()=>Ze,ZodInstanceOf:()=>Ua,ZodIntersection:()=>pa,ZodIssueCode:()=>Ng,ZodJWT:()=>ko,ZodKSUID:()=>go,ZodLazy:()=>La,ZodLiteral:()=>ya,ZodMAC:()=>Xc,ZodMap:()=>_a,ZodNaN:()=>Na,ZodNanoID:()=>lo,ZodNever:()=>ua,ZodNonOptional:()=>Ao,ZodNull:()=>na,ZodNullable:()=>za,ZodNumber:()=>yt,ZodNumberFormat:()=>Ue,ZodObject:()=>cr,ZodOptional:()=>lr,ZodPipe:()=>fr,ZodPrefault:()=>Ia,ZodPreprocess:()=>Ca,ZodPromise:()=>Va,ZodReadonly:()=>Ta,ZodRealError:()=>Q,ZodRecord:()=>gt,ZodSet:()=>$a,ZodString:()=>$t,ZodStringFormat:()=>T,ZodSuccess:()=>Pa,ZodSymbol:()=>ta,ZodTemplateLiteral:()=>Ea,ZodTransform:()=>ba,ZodTuple:()=>ma,ZodType:()=>Z,ZodULID:()=>mo,ZodURL:()=>ir,ZodUUID:()=>pe,ZodUndefined:()=>ra,ZodUnion:()=>ar,ZodUnknown:()=>sa,ZodVoid:()=>ca,ZodXID:()=>ho,ZodXor:()=>la,_ZodString:()=>so,_default:()=>xa,_function:()=>Ad,any:()=>ud,array:()=>ur,base64:()=>Fp,base64url:()=>Mp,bigint:()=>rd,boolean:()=>ea,catch:()=>Oa,check:()=>Od,cidrv4:()=>Vp,cidrv6:()=>jp,clone:()=>R,codec:()=>Id,coerce:()=>Ka,compile:()=>lu,config:()=>V,core:()=>he,creditCard:()=>Bp,cuid:()=>Op,cuid2:()=>Np,currencyCode:()=>Xp,custom:()=>Nd,date:()=>ad,decode:()=>Uc,decodeAsync:()=>Jc,deepPartial:()=>Jd,describe:()=>Cd,discriminatedUnion:()=>hd,e164:()=>Up,email:()=>bp,emoji:()=>Pp,encode:()=>Mc,encodeAsync:()=>Bc,endsWith:()=>it,enum:()=>Zo,exactOptional:()=>va,file:()=>vd,flattenError:()=>Pt,float32:()=>Hp,float64:()=>Qp,formatError:()=>At,fromJSONSchema:()=>Ud,function:()=>Ad,getDiscriminatedOption:()=>Cs,getErrorMap:()=>Tg,globalRegistry:()=>M,gt:()=>le,gte:()=>ne,guid:()=>vp,hash:()=>Yp,hex:()=>qp,hostname:()=>Gp,httpUrl:()=>Sp,iban:()=>Jp,includes:()=>nt,input:()=>Wd,instanceof:()=>Dd,int:()=>oo,int32:()=>ed,int64:()=>nd,intersection:()=>da,invertCodec:()=>Zd,ipv4:()=>Ep,ipv6:()=>Rp,iso:()=>mr,json:()=>Ld,jwt:()=>Kp,keyof:()=>ld,ksuid:()=>Dp,lazy:()=>Ra,length:()=>Le,literal:()=>bd,locales:()=>qt,looseObject:()=>dd,looseRecord:()=>_d,lowercase:()=>tt,lt:()=>ae,lte:()=>re,mac:()=>Lp,map:()=>$d,maxLength:()=>Ee,maxSize:()=>be,memoizer:()=>Gt,meta:()=>Td,mime:()=>ut,minLength:()=>me,minSize:()=>fe,multipleOf:()=>we,nan:()=>xd,nanoid:()=>Ap,nativeEnum:()=>wd,negative:()=>Wn,never:()=>Io,nonnegative:()=>qn,nonoptional:()=>Sa,nonpositive:()=>Gn,normalize:()=>ct,null:()=>oa,nullable:()=>or,nullish:()=>zd,number:()=>Qc,object:()=>fd,optional:()=>je,output:()=>Gd,overwrite:()=>ce,parse:()=>Rc,parseAsync:()=>Vc,partialRecord:()=>gd,pipe:()=>io,positive:()=>Kn,prefault:()=>Za,preprocess:()=>Rd,prettifyError:()=>Vo,promise:()=>Pd,properties:()=>st,property:()=>Xn,readonly:()=>Da,record:()=>ga,refine:()=>Fa,regex:()=>et,regexes:()=>ie,registry:()=>bn,safeDecode:()=>Wc,safeDecodeAsync:()=>qc,safeEncode:()=>Kc,safeEncodeAsync:()=>Gc,safeParse:()=>jc,safeParseAsync:()=>Fc,set:()=>yd,setErrorMap:()=>Cg,size:()=>De,slugify:()=>pt,startsWith:()=>ot,strictObject:()=>pd,string:()=>nr,stringFormat:()=>Wp,stringbool:()=>Ed,success:()=>kd,superRefine:()=>Ma,symbol:()=>id,templateLiteral:()=>Sd,toJSONSchema:()=>eo,toLowerCase:()=>lt,toUpperCase:()=>ft,toZod:()=>_r,transform:()=>So,treeifyError:()=>Ro,trim:()=>at,tuple:()=>ha,uint32:()=>td,uint64:()=>od,ulid:()=>Cp,undefined:()=>sd,union:()=>vt,unknown:()=>Ve,uppercase:()=>rt,url:()=>Zp,util:()=>w,uuid:()=>zp,uuidv4:()=>kp,uuidv6:()=>xp,uuidv7:()=>Ip,validate:()=>Ot,validateAsync:()=>Nt,void:()=>cd,withParser:()=>vn,xid:()=>Tp,xor:()=>md});var he={};ge(he,{$ZodAny:()=>ks,$ZodArray:()=>As,$ZodAsyncError:()=>oe,$ZodBase64:()=>ps,$ZodBase64URL:()=>ds,$ZodBigInt:()=>ln,$ZodBigIntFormat:()=>ws,$ZodBoolean:()=>Mt,$ZodCIDRv4:()=>ls,$ZodCIDRv6:()=>fs,$ZodCUID:()=>Hi,$ZodCUID2:()=>Qi,$ZodCatch:()=>qs,$ZodCheck:()=>D,$ZodCheckBigIntFormat:()=>xi,$ZodCheckEndsWith:()=>Li,$ZodCheckGreaterThan:()=>Wr,$ZodCheckIncludes:()=>Di,$ZodCheckLengthEquals:()=>Oi,$ZodCheckLessThan:()=>Kr,$ZodCheckLowerCase:()=>Ci,$ZodCheckMaxLength:()=>Pi,$ZodCheckMaxSize:()=>Ii,$ZodCheckMimeType:()=>ji,$ZodCheckMinLength:()=>Ai,$ZodCheckMinSize:()=>Zi,$ZodCheckMultipleOf:()=>zi,$ZodCheckNumberFormat:()=>ki,$ZodCheckOverwrite:()=>Fi,$ZodCheckProperties:()=>Vi,$ZodCheckProperty:()=>Ri,$ZodCheckRegex:()=>Ni,$ZodCheckSizeEquals:()=>Si,$ZodCheckStartsWith:()=>Ei,$ZodCheckStringFormat:()=>Xe,$ZodCheckUpperCase:()=>Ti,$ZodCodec:()=>Bt,$ZodCreditCard:()=>hs,$ZodCustom:()=>ru,$ZodCustomStringFormat:()=>$s,$ZodCyclicError:()=>_n,$ZodDate:()=>Ss,$ZodDefault:()=>Js,$ZodDiscriminatedUnion:()=>Ts,$ZodE164:()=>ms,$ZodEmail:()=>Ki,$ZodEmoji:()=>Xi,$ZodEncodeError:()=>Je,$ZodEnum:()=>Vs,$ZodError:()=>Lo,$ZodExactOptional:()=>Us,$ZodFile:()=>Fs,$ZodFunction:()=>eu,$ZodGUID:()=>Bi,$ZodIBAN:()=>gs,$ZodIPv4:()=>us,$ZodIPv6:()=>cs,$ZodISODate:()=>os,$ZodISODateTime:()=>ns,$ZodISODuration:()=>ss,$ZodISOTime:()=>is,$ZodIntersection:()=>Ds,$ZodJWT:()=>_s,$ZodKSUID:()=>rs,$ZodLazy:()=>Jt,$ZodLiteral:()=>js,$ZodMAC:()=>as,$ZodMap:()=>Ls,$ZodNaN:()=>Xs,$ZodNanoID:()=>Yi,$ZodNever:()=>Is,$ZodNonOptional:()=>Ws,$ZodNull:()=>zs,$ZodNullable:()=>Bs,$ZodNumber:()=>an,$ZodNumberFormat:()=>ys,$ZodObject:()=>Ff,$ZodObjectJIT:()=>Os,$ZodOptional:()=>pn,$ZodPipe:()=>dn,$ZodPrefault:()=>Ks,$ZodPreprocess:()=>Ys,$ZodPromise:()=>tu,$ZodReadonly:()=>Hs,$ZodRealError:()=>H,$ZodRecord:()=>Es,$ZodRegistry:()=>wn,$ZodSet:()=>Rs,$ZodString:()=>Oe,$ZodStringFormat:()=>N,$ZodSuccess:()=>Gs,$ZodSymbol:()=>bs,$ZodTemplateLiteral:()=>Qs,$ZodTransform:()=>Ms,$ZodTuple:()=>fn,$ZodType:()=>k,$ZodULID:()=>es,$ZodURL:()=>qi,$ZodUUID:()=>Ji,$ZodUndefined:()=>vs,$ZodUnion:()=>Ut,$ZodUnknown:()=>xs,$ZodVoid:()=>Zs,$ZodXID:()=>ts,$ZodXor:()=>Ns,$brand:()=>Do,$constructor:()=>p,$input:()=>su,$output:()=>iu,Doc:()=>Ae,INVALID:()=>J,JSONSchema:()=>$p,JSONSchemaGenerator:()=>to,NEVER:()=>To,TimePrecision:()=>$u,URL_BAD_FORMAT:()=>Wi,URL_UNPARSEABLE:()=>Lt,ZodCompileAsyncError:()=>ue,ZodCompileUnsupportedError:()=>P,_any:()=>Du,_array:()=>Mu,_base64:()=>Mn,_base64url:()=>Un,_bigint:()=>Su,_boolean:()=>Iu,_catch:()=>_g,_check:()=>rp,_cidrv4:()=>jn,_cidrv6:()=>Fn,_coercedBigint:()=>Pu,_coercedBoolean:()=>Zu,_coercedDate:()=>ju,_coercedNumber:()=>wu,_coercedString:()=>mu,_creditCard:()=>gu,_cuid:()=>Cn,_cuid2:()=>Tn,_custom:()=>Bu,_date:()=>Vu,_decode:()=>Dr,_decodeAsync:()=>Lr,_default:()=>mg,_discriminatedUnion:()=>rg,_e164:()=>Bn,_email:()=>xn,_emoji:()=>On,_encode:()=>Tr,_encodeAsync:()=>Er,_endsWith:()=>it,_enum:()=>cg,_file:()=>Uu,_float32:()=>vu,_float64:()=>zu,_gt:()=>le,_gte:()=>ne,_guid:()=>In,_iban:()=>_u,_includes:()=>nt,_int:()=>bu,_int32:()=>ku,_int64:()=>Au,_intersection:()=>ng,_ipv4:()=>Rn,_ipv6:()=>Vn,_isoDate:()=>Ht,_isoDateTime:()=>Yt,_isoDuration:()=>er,_isoTime:()=>Qt,_jwt:()=>Jn,_ksuid:()=>Ln,_lazy:()=>bg,_length:()=>Le,_literal:()=>lg,_lowercase:()=>tt,_lt:()=>ae,_lte:()=>re,_mac:()=>hu,_map:()=>sg,_max:()=>re,_maxLength:()=>Ee,_maxSize:()=>be,_mime:()=>ut,_min:()=>ne,_minLength:()=>me,_minSize:()=>fe,_multipleOf:()=>we,_nan:()=>Fu,_nanoid:()=>Nn,_nativeEnum:()=>ag,_negative:()=>Wn,_never:()=>Lu,_nonnegative:()=>qn,_nonoptional:()=>hg,_nonpositive:()=>Gn,_normalize:()=>ct,_null:()=>Tu,_nullable:()=>dg,_number:()=>yu,_optional:()=>pg,_overwrite:()=>ce,_parse:()=>Ke,_parseAsync:()=>We,_pipe:()=>$g,_positive:()=>Kn,_promise:()=>vg,_properties:()=>st,_property:()=>Xn,_readonly:()=>yg,_record:()=>ig,_refine:()=>Ju,_regex:()=>et,_safeDecode:()=>Vr,_safeDecodeAsync:()=>Fr,_safeEncode:()=>Rr,_safeEncodeAsync:()=>jr,_safeParse:()=>Ge,_safeParseAsync:()=>qe,_set:()=>ug,_size:()=>De,_slugify:()=>pt,_startsWith:()=>ot,_string:()=>du,_stringFormat:()=>Re,_stringbool:()=>qu,_success:()=>gg,_superRefine:()=>Ku,_symbol:()=>Nu,_templateLiteral:()=>wg,_toLowerCase:()=>lt,_toUpperCase:()=>ft,_transform:()=>fg,_trim:()=>at,_tuple:()=>og,_uint32:()=>xu,_uint64:()=>Ou,_ulid:()=>Dn,_undefined:()=>Cu,_union:()=>eg,_unknown:()=>Eu,_uppercase:()=>rt,_url:()=>Xt,_uuid:()=>Zn,_uuidv4:()=>Sn,_uuidv6:()=>Pn,_uuidv7:()=>An,_void:()=>Ru,_xid:()=>En,_xor:()=>tg,base64Charset:()=>nn,base64urlCharset:()=>Ft,canParseURL:()=>Gi,clone:()=>R,compile:()=>lu,compileFn:()=>zn,config:()=>V,createStandardJSONSchemaMethod:()=>dt,createToJSONSchemaMethod:()=>Yu,decode:()=>cm,decodeAsync:()=>lm,describe:()=>Wu,encode:()=>um,encodeAsync:()=>am,extractDefs:()=>ze,finalize:()=>ke,flattenError:()=>Pt,formatError:()=>At,getDiscriminatedOption:()=>Cs,globalConfig:()=>Y,globalRegistry:()=>M,handleUnrepresentable:()=>j,initializeContext:()=>ve,isBackEdge:()=>yn,isRecursiveSchema:()=>$n,isValidBase64:()=>jt,isValidBase64URL:()=>on,isValidCIDRv6:()=>rn,isValidCreditCard:()=>sn,isValidIBAN:()=>un,isValidIPv6:()=>Vt,isValidJWT:()=>cn,locales:()=>qt,memoizer:()=>Gt,mergeValues:()=>Ye,meta:()=>Gu,parse:()=>Nr,parseAsync:()=>Cr,parseURLObject:()=>Rf,prettifyError:()=>Vo,process:()=>C,processSchema:()=>C,regexes:()=>ie,registry:()=>bn,safeDecode:()=>pm,safeDecodeAsync:()=>mm,safeEncode:()=>fm,safeEncodeAsync:()=>dm,safeParse:()=>rm,safeParseAsync:()=>nm,standardProps:()=>Hr,stripTabAndNewline:()=>Rt,toDotPath:()=>gf,toJSONSchema:()=>eo,toZod:()=>_r,treeifyError:()=>Ro,urlHostnameOk:()=>en,urlProtocolOk:()=>tn,util:()=>w,validate:()=>Ot,validateAsync:()=>Nt,validateURL:()=>Qr,version:()=>Mi,withParser:()=>vn});function Yd(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,It,2)),e.message}function Hd(e){this._zod.message=e}var Qd={get:Yd,set:Hd,enumerable:!0,configurable:!0},Eo={value:void 0,enumerable:!1},mf=new WeakSet([Object.prototype,Error.prototype]),hf=(e,t)=>{e.name="$ZodError",Eo.value=t,Object.defineProperty(e,"issues",Eo),Eo.value=void 0,Object.defineProperty(e,"message",Qd);let r=Object.getPrototypeOf(e);mf.has(r)||(mf.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Lo=p("$ZodError",hf),H=p("$ZodError",hf,void 0,{Parent:Error});function em(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function Pt(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?em(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function At(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>n({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0)r._errors.push(t(s));else{let c=r,a=0;for(;a<u.length;){let l=u[a],f=a===u.length-1;if(l==="_errors"){f&&c._errors.push(t(s)),a++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let m=c[l];f&&m._errors.push(t(s)),c=m,a++}}}};return n(e),r}function Ro(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var s;for(let u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>n({issues:c},[...i,...u.path]));else if(u.code==="invalid_key")n({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")n({issues:u.issues},[...i,...u.path]);else{let c=[...i,...u.path];if(c.length===0){r.errors.push(t(u));continue}let a=r,l=0;for(;l<c.length;){let f=c[l],m=l===c.length-1;typeof f=="string"?(a.properties??(a.properties={}),Object.prototype.hasOwnProperty.call(a.properties,f)||Object.defineProperty(a.properties,f,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),a=a.properties[f]):(a.items??(a.items=[]),(s=a.items)[f]??(s[f]={errors:[]}),a=a.items[f]),m&&a.errors.push(t(u)),l++}}};return n(e),r}function gf(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Vo(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${gf(n.path)}`);return t.join(`
3
+ `)}function Or(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Ke=e=>{let t=(r,n,o,i)=>{let s=o?{...o,async:!1}:{async:!1},u=r._zod.run({value:n,issues:[]},s);if(u instanceof Promise)throw new oe;if(u.issues.length){let c=new(i?.Err??e)(u.issues.map(a=>te(a,s,V())));throw Co(c,i?.callee??t),c}return u.value};return t},Nr=Ke(H),We=e=>{let t=async(r,n,o,i)=>{let s=o?{...o,async:!0}:{async:!0},u=r._zod.run({value:n,issues:[]},s);if(u instanceof Promise&&(u=await u),u.issues.length){let c=new(i?.Err??e)(u.issues.map(a=>te(a,s,V())));throw Co(c,i?.callee??t),c}return u.value};return t},Cr=We(H),Ge=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new oe;return i.issues.length?$f(e,i.issues,o):{success:!0,data:i.value}},rm=Ge(H);function $f(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>te(o,r,V()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var qe=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?$f(e,i.issues,o):{success:!0,data:i.value}},nm=qe(H),om=Symbol.for("zod.compile.invalid"),im=Symbol.for("zod.compile.fallback"),Ot=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==om)return!0;if(n.definite===!0&&r===void 0)return!1}return sm(e,t,r)});function sm(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[im]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new oe;return i.issues.length===0}var Nt=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Tr=e=>{let t=Ke(e),r=(n,o,i,s)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,u,Or(r,s))};return r},um=Tr(H),Dr=e=>{let t=Ke(e),r=(n,o,i,s)=>t(n,o,i,Or(r,s));return r},cm=Dr(H),Er=e=>{let t=We(e),r=async(n,o,i,s)=>{let u=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,u,Or(r,s))};return r},am=Er(H),Lr=e=>{let t=We(e),r=async(n,o,i,s)=>await t(n,o,i,Or(r,s));return r},lm=Lr(H),Rr=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Ge(e)(t,r,o)},fm=Rr(H),Vr=e=>(t,r,n)=>Ge(e)(t,r,n),pm=Vr(H),jr=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return qe(e)(t,r,o)},dm=jr(H),Fr=e=>async(t,r,n)=>qe(e)(t,r,n),mm=Fr(H);var ie={};ge(ie,{anyString:()=>pi,base64:()=>ni,base64url:()=>oi,bigint:()=>mi,boolean:()=>hi,browserEmail:()=>vm,cidrv4:()=>ti,cidrv6:()=>ri,creditCard:()=>Mr,cuid:()=>Fo,cuid2:()=>Mo,currencyCode:()=>ci,date:()=>ai,datetime:()=>fi,domain:()=>si,duration:()=>Go,e164:()=>ui,email:()=>Xo,emoji:()=>Yo,extendedDuration:()=>hm,guid:()=>qo,hex:()=>wi,hostname:()=>ii,html5Email:()=>ym,httpProtocol:()=>Ct,iban:()=>Ur,idnEmail:()=>bm,integer:()=>Tt,ipv4:()=>Ho,ipv6:()=>Qo,ksuid:()=>Jo,lowercase:()=>$i,mac:()=>ei,md5_base64:()=>Im,md5_base64url:()=>Zm,md5_hex:()=>xm,nanoid:()=>Ko,nanoidOfLength:()=>Wo,null:()=>gi,number:()=>de,rfc5322Email:()=>wm,sha1_base64:()=>Pm,sha1_base64url:()=>Am,sha1_hex:()=>Sm,sha256_base64:()=>Nm,sha256_base64url:()=>Cm,sha256_hex:()=>Om,sha384_base64:()=>Dm,sha384_base64url:()=>Em,sha384_hex:()=>Tm,sha512_base64:()=>Rm,sha512_base64url:()=>Vm,sha512_hex:()=>Lm,string:()=>di,time:()=>li,ulid:()=>Uo,undefined:()=>_i,unicodeEmail:()=>yf,uppercase:()=>yi,uuid:()=>Pe,uuid4:()=>gm,uuid6:()=>_m,uuid7:()=>$m,xid:()=>Bo});var Fo=/^[cC][0-9a-z]{6,}$/,Mo=/^[0-9a-z]+$/,Uo=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Bo=/^[0-9a-vA-V]{20}$/,Jo=/^[A-Za-z0-9]{27}$/,Ko=/^[a-zA-Z0-9_-]{21}$/;function Wo(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Go=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hm=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qo=/^([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})$/,Pe=e=>e?new 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)$/,gm=Pe(4),_m=Pe(6),$m=Pe(7),Xo=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ym=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,wm=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,yf=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,bm=yf,vm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,zm="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Yo(){return new RegExp(zm,"u")}var Ho=/^(?:(?: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])$/,Qo=/^(([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}|:))$/,ei=e=>{let t=se(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ti=/^((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])$/,ri=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ni=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,oi=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ii=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,si=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ct=/^https?$/,ui=/^\+[1-9]\d{6,14}$/,Mr=/^\d(?:[ -]?\d){11,18}$/,ci=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Ur=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,wf="(?:(?:\\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])))";function km(e){return new RegExp(`^${e}$`)}var ai=km(wf);function jo(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function li(e){return new RegExp(`^${jo(e)}$`)}function fi(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${jo({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${jo({precision:e.precision})}`:r;return new RegExp(`^${wf}T(?:${n})$`)}var pi=/^[\s\S]{0,}$/,di=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},mi=/^-?\d+n?$/,Tt=/^-?\d+$/,de=/^-?\d+(?:\.\d+)?$/,hi=/^(?:true|false)$/i,gi=/^null$/i;var _i=/^undefined$/i;var $i=/^[^A-Z]*$/,yi=/^[^a-z]*$/,wi=/^[0-9a-fA-F]*$/;function Dt(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Et(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var xm=/^[0-9a-fA-F]{32}$/,Im=Dt(22,"=="),Zm=Et(22),Sm=/^[0-9a-fA-F]{40}$/,Pm=Dt(27,"="),Am=Et(27),Om=/^[0-9a-fA-F]{64}$/,Nm=Dt(43,"="),Cm=Et(43),Tm=/^[0-9a-fA-F]{96}$/,Dm=Dt(64,""),Em=Et(64),Lm=/^[0-9a-fA-F]{128}$/,Rm=Dt(86,"=="),Vm=Et(86);var D=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),bi=e=>{let t=e.value;return!No(t)&&t.size!==void 0},vi=e=>{let t=e.value;return!No(t)&&t.length!==void 0},Br={number:"number",bigint:"bigint",object:"date"},Kr=p("$ZodCheckLessThan",(e,t)=>{D.init(e,t);let r=Br[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Br[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Wr=p("$ZodCheckGreaterThan",(e,t)=>{D.init(e,t);let r=Br[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Br[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),zi=p("$ZodCheckMultipleOf",(e,t)=>{D.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):yr(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ki=p("$ZodCheckNumberFormat",(e,t)=>{D.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=kr[t.format];e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),xi=p("$ZodCheckBigIntFormat",(e,t)=>{D.init(e,t);let[r,n]=xr[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),Ii=p("$ZodCheckMaxSize",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=bi),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:Zr(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Zi=p("$ZodCheckMinSize",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=bi),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:Zr(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Si=p("$ZodCheckSizeEquals",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=bi),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let s=i>t.size;n.issues.push({origin:Zr(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Pi=p("$ZodCheckMaxLength",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=vi),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?Be(o):i)<=t.maximum)return;let u=Sr(o);n.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ai=p("$ZodCheckMinLength",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=vi),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?Be(o):i)>=t.minimum)return;let u=Sr(o);n.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Oi=p("$ZodCheckLengthEquals",(e,t)=>{var r;D.init(e,t),(r=e._zod.def).when??(r.when=vi),e._zod.check=n=>{let o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?Be(o):i;if(s===t.length)return;let u=Sr(o),c=s>t.length;n.issues.push({origin:u,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Xe=p("$ZodCheckStringFormat",(e,t)=>{var r,n;D.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),Ni=p("$ZodCheckRegex",(e,t)=>{Xe.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ci=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$i),Xe.init(e,t)}),Ti=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=yi),Xe.init(e,t)}),Di=p("$ZodCheckIncludes",(e,t)=>{D.init(e,t);let r=se(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Ei=p("$ZodCheckStartsWith",(e,t)=>{D.init(e,t);let r=new RegExp(`^${se(t.prefix)}.*`);t.pattern??(t.pattern=r),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})}}),Li=p("$ZodCheckEndsWith",(e,t)=>{D.init(e,t);let r=new RegExp(`.*${se(t.suffix)}$`);t.pattern??(t.pattern=r),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})}});function Jr(e,t,r){e.issues.length&&t.issues.push(...ee(r,e.issues))}var Ri=p("$ZodCheckProperty",(e,t)=>{D.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Jr(o,r,t.property));Jr(n,r,t.property)}}),Vi=p("$ZodCheckProperties",(e,t)=>{D.init(e,t),Pr(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(s=>[s,t.shape[s]]));let o=n.value,i;for(let[s,u]of r){let c=u._zod.run({value:o[s],issues:[]},{});c instanceof Promise?(i??(i=[]),i.push(c.then(a=>Jr(a,n,s)))):Jr(c,n,s)}if(i)return Promise.all(i).then(()=>{})}}),ji=p("$ZodCheckMimeType",(e,t)=>{D.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),Fi=p("$ZodCheckOverwrite",(e,t)=>{D.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ae=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
4
+ `).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
5
+ ${r.join(`
6
+ `)}
7
+ };`)(...Object.values(this.closed))}};var Mi={major:4,minor:6,patch:6};var k=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Mi;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let s of i._zod.onattach)s(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(u,c,a)=>{if(u.memo)return u;let l=X(u),f;for(let m of c){if(m._zod.def.when){if(tl(u)||!m._zod.def.when(u))continue}else if(l)continue;let d=u.issues.length,h=m._zod.check(u);if(h instanceof Promise&&a?.async===!1)throw new oe;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,u.issues.length!==d&&(Ir(u.issues,d,e),l||(l=X(u,d)))});else{if(u.issues.length===d)continue;Ir(u.issues,d,e),l||(l=X(u,d))}}return f?f.then(()=>u):u},s=(u,c,a)=>{if(X(u))return u.aborted=!0,u;let l=i(c,o,a);if(l instanceof Promise){if(a.async===!1)throw new oe;return l.then(f=>e._zod.parse(f,a))}return e._zod.parse(l,a)};e._zod.run=(u,c)=>{if(c.skipChecks)return e._zod.parse(u,c);if(c.direction==="backward"){let l=e._zod.parse({value:u.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(f=>s(f,u,c)):s(l,u,c)}let a=e._zod.parse(u,c);if(a instanceof Promise){if(c.async===!1)throw new oe;return a.then(l=>i(l,o,c))}return i(a,o,c)}}},{get"~standard"(){return Pr(this,"~standard",Hr(this))},set"~standard"(e){rl(this,"~standard",e)}}),Lf=(e,t)=>e.issues.length?{issues:e.issues.map(r=>te(r,t,V()))}:{value:e.value};async function jm(e,t){let r={async:!0};return Lf(await e._zod.run({value:t,issues:[]},r),r)}function Hr(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return Lf(n,r)}catch{}return jm(e,t)},vendor:"zod",version:1}}var Oe=p("$ZodString",(e,t)=>{k.init(e,t),e._zod.pattern=t.pattern??pi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),N=p("$ZodStringFormat",(e,t)=>{Xe.init(e,t),Oe.init(e,t)}),Bi=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=qo),N.init(e,t)}),Ji=p("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Pe(n))}else t.pattern??(t.pattern=Pe());N.init(e,t)}),Ki=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Xo),N.init(e,t)}),Wi=1,Lt=2;function Gi(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Qr(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?Gi(e)||Lt:Rf(e,t)}function Rf(e,t){if(!t.normalize&&t.protocol?.source===Ct.source&&!/^https?:\/\//i.test(e))return Wi;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??Lt}return new URL(e)}catch{return Lt}}var Fm=/[\t\n\r]/g;function Rt(e){return e.replace(Fm,"")}function en(e,t){return t.lastIndex=0,t.test(e.hostname)}function tn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var qi=p("$ZodURL",(e,t)=>{N.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=Qr(n,t);if(o===Wi){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===Lt){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=Rt(n);return}t.hostname&&!en(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!tn(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:Rt(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Xi=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Yo()),N.init(e,t)}),Yi=p("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?Ko:Wo(t.length)),N.init(e,t)}),Hi=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Fo),N.init(e,t)}),Qi=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Mo),N.init(e,t)}),es=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Uo),N.init(e,t)}),ts=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Bo),N.init(e,t)}),rs=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jo),N.init(e,t)}),ns=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=fi(t)),N.init(e,t)}),os=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ai),N.init(e,t)}),is=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=li(t)),N.init(e,t)}),ss=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Go),N.init(e,t)}),us=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ho),N.init(e,t)}),Mm=/^[0-9a-fA-F:.]+$/;function Vt(e){return Mm.test(e)?Gi(`http://[${e}]`):!1}var cs=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Qo),N.init(e,t),e._zod.check=r=>{Vt(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),as=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ei(t.delimiter)),N.init(e,t)}),ls=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ti),N.init(e,t)});function rn(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:Vt(r)}var fs=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ri),N.init(e,t),e._zod.check=r=>{rn(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function jt(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var nn=/^[0-9a-zA-Z+/]*={0,2}$/,ps=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=nn),N.init(e,t),e._zod.check=r=>{jt(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Ft=/^[A-Za-z0-9_-]*$/;function on(e){if(!Ft.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return jt(r)}var ds=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ft),N.init(e,t),e._zod.check=r=>{on(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ms=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=ui),N.init(e,t)}),Um=/[- ]/g;function Bm(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function sn(e){return Mr.test(e)?Bm(e.replace(Um,"")):!1}var hs=p("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Mr),N.init(e,t),e._zod.check=r=>{sn(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function Jm(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function un(e){return Ur.test(e)?Jm(e):!1}var gs=p("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Ur),N.init(e,t),e._zod.check=r=>{un(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function cn(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var _s=p("$ZodJWT",(e,t)=>{N.init(e,t),e._zod.check=r=>{cn(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),$s=p("$ZodCustomStringFormat",(e,t)=>{N.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),an=p("$ZodNumber",(e,t)=>{k.init(e,t),e._zod.pattern=de,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),ys=p("$ZodNumberFormat",(e,t)=>{ki.init(e,t),an.init(e,t)}),Mt=p("$ZodBoolean",(e,t)=>{k.init(e,t),e._zod.pattern=hi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),ln=p("$ZodBigInt",(e,t)=>{k.init(e,t),e._zod.pattern=mi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),ws=p("$ZodBigIntFormat",(e,t)=>{xi.init(e,t),ln.init(e,t)}),bs=p("$ZodSymbol",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),vs=p("$ZodUndefined",(e,t)=>{k.init(e,t),e._zod.pattern=_i,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),zs=p("$ZodNull",(e,t)=>{k.init(e,t),e._zod.pattern=gi,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),ks=p("$ZodAny",(e,t)=>{k.init(e,t),e._zod.parse=r=>r}),xs=p("$ZodUnknown",(e,t)=>{k.init(e,t),e._zod.parse=r=>r}),Is=p("$ZodNever",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Zs=p("$ZodVoid",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),Ss=p("$ZodDate",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Ps(e,t){let r=Zt(e._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(i=>i[0])),o=e._zod.parse;e._zod.parse=(i,s)=>{let u=t(i.value);if(u>n&&!s?.skipChecks&&s?.direction!=="backward"){for(let[c,a]of Zt(e._zod.def.checks))if(u>c&&a._zod.def.when(i)){let l=i.issues.length;return a._zod.check(i),i.issues[l].continue=!1,Ir(i.issues,l,e),i}}return o(i,s)}}var Km=e=>Array.isArray(e)?e.length:-1,Wm=e=>e instanceof Map?e.size:-1,Gm=e=>e instanceof Set?e.size:-1;function vf(e,t,r){e.issues.length&&t.issues.push(...ee(r,e.issues)),t.value[r]=e.value}var As=p("$ZodArray",(e,t)=>{k.init(e,t);let r=Y.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let s=[],u=o?.abortEarly;for(let c=0;c<i.length;c++){let a=i[c],l=t.element._zod.run({value:a,issues:[]},o);if(l instanceof Promise)s.push(l.then(f=>vf(f,n,c)));else if(vf(l,n,c),u&&l.issues.length!==0&&X(l))break}return s.length?Promise.all(s).then(()=>n):n},Ps(e,Km)});function Yr(e,t,r,n,o,i){let s=r in n,u=i==="optional";if(!(!s&&u&&o==="optional")){if(e.issues.length){if(o!==void 0&&u&&!s)return;t.issues.push(...ee(r,e.issues))}if(!s&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(s||o==="defaulted"&&!u)&&(t.value[r]=void 0):t.value[r]=e.value}}var qm=[];function Vf(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:qm,o=n.length?[...t,...n]:t;for(let s of o)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=el(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function jf(e,t,r,n,o,i,s){let u=[],c=o.keySet,a=o.catchall._zod,l=a.def.type,f=a.optin,m=a.optout,d=0;for(let h in t){if(s&&r.issues.length!==d){if(X(r,d))break;d=r.issues.length}if(c.has(h))continue;if(h==="__proto__"){l==="never"&&u.push(h);continue}if(l==="never"){u.push(h);continue}let g=a.run({value:t[h],issues:[]},n);g instanceof Promise?e.push(g.then(y=>Yr(y,r,h,t,f,m))):Yr(g,r,h,t,f,m)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var Ff=p("$ZodObject",(e,t)=>{k.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let a=()=>{let l={...n};return Object.defineProperty(t,"shape",{value:l}),a.raw=l,l};a.raw=n,Object.defineProperty(t,"shape",{get:a})}let o=$r(()=>Vf(t));S(e,"propValues",a=>{let l=a.def.shape,f={};for(let m in l){let d=l[m]._zod;if(d.values){Object.prototype.hasOwnProperty.call(f,m)||G(f,m,new Set);for(let h of d.values)f[m].add(h);d.optin!==void 0&&f[m].add(void 0)}}return f});let i=br,s=t.catchall,u,c=Y.memoizer;c?.attach(e),e._zod.parse=(a,l)=>{u??(u=o.value);let f=a.value;if(!i(f))return a.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),a;a.value=c?c.alloc(e,a,{},l):{};let m=[],d=u.shape,h=l?.abortEarly,g=a.issues.length;for(let y of u.allKeys){if(h&&a.issues.length!==g){if(X(a,g))break;g=a.issues.length}if(y==="__proto__")continue;let x=d[y],b=x._zod.optin,I=x._zod.optout,O=x._zod.run({value:f[y],issues:[]},l);O instanceof Promise?m.push(O.then(E=>Yr(E,a,y,f,b,I))):Yr(O,a,y,f,b,I)}return s?jf(m,f,a,l,o.value,e,h===!0):m.length?Promise.all(m).then(()=>a):a}}),Os=p("$ZodObjectJIT",(e,t)=>{Ff.init(e,t);let r=e._zod.parse,n=$r(()=>Vf(t)),o=Y.memoizer,i=d=>{let h=n.value,g=h.symbolKeys,y=new Ae(["payload","ctx"],{shape:d,inst:e,memo:o,syms:g}),x=E=>`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`,b=(E,A)=>`
8
+ let ${E}_ab = false;
9
+ for (let i = 0; i < ${E}.issues.length; i++) {
10
+ const iss = ${E}.issues[i];
11
+ iss.path = iss.path ? [${A}, ...iss.path] : [${A}];
12
+ payload.issues.push(iss);
13
+ if (iss.continue !== true) ${E}_ab = true;
14
+ }
15
+ if (${E}_ab && ctx && ctx.abortEarly) {
16
+ payload.value = newResult;
17
+ return payload;
18
+ }`;y.write("const input = payload.value;");let I=Object.create(null),O=0;for(let E of h.allKeys)I[E]=`key_${O++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let E of h.allKeys){if(E==="__proto__")continue;let A=I[E],U=typeof E=="symbol"?`syms[${g.indexOf(E)}]`:q(E),kt=`${U} in input`,Wa=d[E],Oo=Wa?._zod?.optin,Ga=Oo!==void 0,qd=Wa?._zod?.optout==="optional";if(y.write(`const ${A} = ${x(U)};`),Ga&&qd){let Xd=Oo==="optional"?`${A}_present`:`${A}.value !== undefined || ${A}_present`;y.write(`
19
+ const ${A}_present = ${kt};
20
+ if (!${A}.issues.length || ${A}_present) {
21
+ if (${A}.issues.length) {${b(A,U)}
22
+ }
23
+
24
+ if (${Xd}) {
25
+ newResult[${U}] = ${A}.value;
26
+ }
27
+ }
28
+
29
+ `)}else Ga?(y.write(`
30
+ if (${A}.issues.length) {${b(A,U)}
31
+ }
32
+ `),Oo==="defaulted"?y.write(`newResult[${U}] = ${A}.value;`):y.write(`
33
+ if (${A}.value !== undefined || ${kt}) {
34
+ newResult[${U}] = ${A}.value;
35
+ }
36
+ `)):y.write(`
37
+ const ${A}_present = ${kt};
38
+ if (${A}.issues.length) {${b(A,U)}
39
+ }
40
+ if (!${A}_present && !${A}.issues.length) {
41
+ payload.issues.push({
42
+ code: "invalid_type",
43
+ expected: "nonoptional",
44
+ input: undefined,
45
+ path: [${U}]
46
+ });
47
+ if (ctx && ctx.abortEarly) {
48
+ payload.value = newResult;
49
+ return payload;
50
+ }
51
+ }
52
+
53
+ if (${A}_present) {
54
+ newResult[${U}] = ${A}.value;
55
+ }
56
+
57
+ `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()},s,u=br,c=!Y.jitless,l=c&&Ha.value,f=t.catchall,m;e._zod.parse=(d,h)=>{m??(m=n.value);let g=d.value;return u(g)?c&&l&&h?.async===!1&&h.jitless!==!0?(s||(s=i(t.shape)),d=s(d,h),f?jf([],g,d,h,m,e,h?.abortEarly===!0):d):r(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),d)}});function zf(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!X(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>te(s,n,V())))}),t)}var Ut=p("$ZodUnion",(e,t)=>{k.init(e,t),S(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),S(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),S(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),S(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>_e(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}return i?Promise.all(s).then(u=>zf(u,n,e,o)):zf(s,n,e,o)}});function kf(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>te(s,n,V())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var Ns=p("$ZodXor",(e,t)=>{Ut.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(s.push(c),i=!0):s.push(c)}return i?Promise.all(s).then(u=>kf(u,n,e,o)):kf(s,n,e,o)}});function Cs(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=Mf(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function Mf(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var Ts=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ut.init(e,t);let r=e._zod.parse;S(e,"propValues",o=>{let i={},s=0;for(let u of o.def.options){let c=u._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(u)}"`);c[o.def.discriminator]?.has(void 0)&&s++;for(let[a,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,a)||G(i,a,new Set);for(let f of l)i[a].add(f)}}return!o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let s=wr(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=$r(()=>Mf(t));e._zod.parse=(o,i)=>{let s=o.value;if(!br(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=s?.[t.discriminator],c=n.value.get(u);return c&&(u!==void 0||i.direction!=="backward")?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(a=>n.value.get(a)!==null),input:s,path:[t.discriminator],inst:e}),o)}}),Ds=p("$ZodIntersection",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,a])=>xf(r,c,a)):xf(r,i,s)}});function Ye(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($e(e)&&$e(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let s=Ye(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=Ye(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function xf(e,t,r){let n=new Map,o,i=new Map,s=(a,l)=>{let f;if(a.code==="unrecognized_keys"&&!a.path?.length)o??(o=a),f=a.keys;else if(a.code==="invalid_key"&&a.origin==="record"&&a.path?.length===1){let m=String(a.path[0]);i.has(m)||i.set(m,a),f=[m]}else return!1;for(let m of f)n.has(m)||n.set(m,{}),n.get(m)[l]=!0;return!0};for(let a of t.issues)s(a,"l")||e.issues.push(a);for(let a of r.issues)s(a,"r")||e.issues.push(a);let u=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(u.length){let a=o?u.filter(l=>o.keys.includes(l)):[];a.length&&e.issues.push({...o,keys:a});for(let l of u)!a.includes(l)&&i.has(l)&&e.issues.push(i.get(l))}let c=Ye(t.value,r.value);if(!c.valid){if(X(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fn=p("$ZodTuple",(e,t)=>{k.init(e,t);let r=t.items,n=Y.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let u=[],c=If(r,"optin"),a=If(r,"optout");if(!t.rest){if(s.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:s,inst:e,origin:"array"}),o;s.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:s,inst:e,origin:"array"})}let l=new Array(r.length),f=t.rest?i?.abortEarly:void 0,m=!1;for(let d=0;d<r.length;d++){let h=r[d]._zod.run({value:s[d],issues:[]},i);h instanceof Promise?u.push(h.then(g=>{l[d]=g})):(l[d]=h,f&&!m&&h.issues.length&&(m=X(h)))}if(t.rest&&!m){let d=r.length-1,h=s.slice(r.length),g=o.issues.length;for(let y of h){if(f&&o.issues.length!==g){if(X(o,g))break;g=o.issues.length}d++;let x=t.rest._zod.run({value:y,issues:[]},i);x instanceof Promise?u.push(x.then(b=>Zf(b,o,d))):Zf(x,o,d)}}return u.length?Promise.all(u).then(()=>Sf(l,o,r,s,a)):Sf(l,o,r,s,a)}});function If(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Zf(e,t,r){e.issues.length&&t.issues.push(...ee(r,e.issues)),t.value[r]=e.value}function Sf(e,t,r,n,o){for(let i=0;i<r.length;i++){let s=e[i],u=i<n.length;if(!u&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(s.issues.length){if(!u&&i>=o){t.value.length=i;break}t.issues.push(...ee(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var Es=p("$ZodRecord",(e,t)=>{k.init(e,t);let r=Y.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!$e(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let s=[],u=t.keyType._zod.values;if(u&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let c=new Set;for(let l of u)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>te(h,o,V())),input:l,path:[l],inst:e});continue}let m=f.value;if(m==="__proto__")continue;let d=t.valueType._zod.run({value:i[l],issues:[]},o);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...ee(l,h.issues)),n.value[m]=h.value})):(d.issues.length&&n.issues.push(...ee(l,d.issues)),n.value[m]=d.value)}let a;for(let l in i)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;n.value[l]=i[l]}else a=a??[],a.push(l);a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:a,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let c;for(let a of Reflect.ownKeys(i)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,a))continue;let l=t.keyType._zod.run({value:a,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&de.test(a)&&l.issues.length){let h=t.keyType._zod.run({value:Number(a),issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(l=h)}if(l.issues.length){t.mode==="loose"?n.value[a]=i[a]:u?(c=c??[],c.push(a)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(h=>te(h,o,V())),input:a,path:[a],inst:e});continue}let m=l.value;if(m==="__proto__")continue;let d=t.valueType._zod.run({value:i[a],issues:[]},o);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...ee(a,h.issues)),n.value[m]=h.value})):(d.issues.length&&n.issues.push(...ee(a,d.issues)),n.value[m]=d.value)}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),Ls=p("$ZodMap",(e,t)=>{k.init(e,t);let r=Y.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let s=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let u=o?.abortEarly,c=n.issues.length;for(let[a,l]of i){if(u&&n.issues.length!==c){if(X(n,c))break;c=n.issues.length}let f=t.keyType._zod.run({value:a,issues:[]},o),m=t.valueType._zod.run({value:l,issues:[]},o);f instanceof Promise||m instanceof Promise?s.push(Promise.all([f,m]).then(([d,h])=>{Pf(d,h,n,a,i,e,o)})):Pf(f,m,n,a,i,e,o)}return s.length?Promise.all(s).then(()=>n):n},Ps(e,Wm)});function Pf(e,t,r,n,o,i,s){e.issues.length&&(zr.has(typeof n)?r.issues.push(...ee(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(u=>te(u,s,V()))})),t.issues.length&&(zr.has(typeof n)?r.issues.push(...ee(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(u=>te(u,s,V()))})),r.value.set(e.value,t.value)}var Rs=p("$ZodSet",(e,t)=>{k.init(e,t);let r=Y.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let s=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let u=o?.abortEarly,c=n.issues.length;for(let a of i){if(u&&n.issues.length!==c){if(X(n,c))break;c=n.issues.length}let l=t.valueType._zod.run({value:a,issues:[]},o);l instanceof Promise?s.push(l.then(f=>Af(f,n))):Af(l,n)}return s.length?Promise.all(s).then(()=>n):n},Ps(e,Gm)});function Af(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Vs=p("$ZodEnum",(e,t)=>{k.init(e,t);let r=xt(t.entries),n=new Set(r);e._zod.values=n,S(e,"pattern",o=>{let i=xt(o.def.entries).filter(s=>zr.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>se(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),js=p("$ZodLiteral",(e,t)=>{k.init(e,t);let r=new Set(t.values);e._zod.values=r,S(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?se(i):i?se(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),Fs=p("$ZodFile",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),Ms=p("$ZodTransform",(e,t)=>{k.init(e,t),e._zod.optin="optional",Y.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Je(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new oe;return r.value=o,r}});function Of(e,t){return e.value=t.issues.length?void 0:t.value,e}var pn=p("$ZodOptional",(e,t)=>{k.init(e,t),S(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",S(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),S(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${_e(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Of(r,i)):Of(r,o)}return t.innerType._zod.run(r,n)}}),Us=p("$ZodExactOptional",(e,t)=>{pn.init(e,t),S(e,"values",r=>r.def.innerType._zod.values),S(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),Bs=p("$ZodNullable",(e,t)=>{k.init(e,t),S(e,"optin",r=>r.def.innerType._zod.optin),S(e,"optout",r=>r.def.innerType._zod.optout),S(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${_e(n.source)}|null)$`):void 0}),S(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),Js=p("$ZodDefault",(e,t)=>{k.init(e,t),e._zod.optin="defaulted",S(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Nf(i,t)):Nf(o,t)}});function Nf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ks=p("$ZodPrefault",(e,t)=>{k.init(e,t),e._zod.optin="defaulted",S(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Ws=p("$ZodNonOptional",(e,t)=>{k.init(e,t),S(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Cf(i,e)):Cf(o,e)}});function Cf(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Gs=p("$ZodSuccess",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Je("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function Tf(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>te(o,n,V()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var qs=p("$ZodCatch",(e,t)=>{k.init(e,t),S(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),S(e,"optout",r=>r.def.innerType._zod.optout),S(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Tf(r,i,t,n)):Tf(r,o,t,n)}}),Xs=p("$ZodNaN",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),dn=p("$ZodPipe",(e,t)=>{k.init(e,t),S(e,"values",r=>r.def.in._zod.values),S(e,"optin",r=>r.def.in._zod.optin),S(e,"optout",r=>r.def.out._zod.optout),S(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Gr(s,t.in,n)):Gr(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Gr(i,t.out,n)):Gr(o,t.out,n)}});function Gr(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Bt=p("$ZodCodec",(e,t)=>{k.init(e,t),S(e,"values",r=>r.def.in._zod.values),S(e,"optin",r=>r.def.in._zod.optin),S(e,"optout",r=>r.def.out._zod.optout),S(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>qr(s,t,n)):qr(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>qr(s,t,n)):qr(i,t,n)}}});function qr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>Xr(e,i,t.out,r)):Xr(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>Xr(e,i,t.in,r)):Xr(e,o,t.in,r)}}function Xr(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var Ys=p("$ZodPreprocess",(e,t)=>{dn.init(e,t)}),Hs=p("$ZodReadonly",(e,t)=>{k.init(e,t),S(e,"propValues",r=>r.def.innerType._zod.propValues),S(e,"values",r=>r.def.innerType._zod.values),S(e,"optin",r=>r.def.innerType?._zod?.optin),S(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Df):Df(o)}});function Df(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Xm(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let u of t.checks??[]){let c=u._zod.def;c.pattern&&(r=c.pattern),n||(n=!!c.format?.includes("int"));let a=c.minimum??c.length,l=c.maximum??c.length;a!==void 0&&(o===void 0||a>o)&&(o=a),l!==void 0&&(i===void 0||l<i)&&(i=l)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return di({minimum:o,maximum:i}).source;let s=e._zod.pattern;return(n&&s===de?Tt:s)?.source}function Ui(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=Ui(n);return r&&o&&i&&i!==o?r.replace(_e(o),()=>_e(i)):r}if(t.options){let o=t.options.map(Ui);if(o.every(Boolean))return`^(${o.map(i=>_e(i)).join("|")})$`}return Xm(e)}var Qs=p("$ZodTemplateLiteral",(e,t)=>{k.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=Ui(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(_e(o))}else if(n===null||Qa.has(typeof n))r.push(se(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(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)}),eu=p("$ZodFunction",(e,t)=>(k.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?Nr(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?Nr(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Cr(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Cr(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new fn({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),tu=p("$ZodPromise",(e,t)=>{k.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),Jt=p("$ZodLazy",(e,t)=>{k.init(e,t),qa(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),S(e,"pattern",r=>r.innerType?._zod?.pattern),S(e,"propValues",r=>r.innerType?._zod?.propValues),S(e,"optin",r=>r.innerType?._zod?.optin??void 0),S(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),ru=p("$ZodCustom",(e,t)=>{D.init(e,t),k.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Ef(i,r,n,e));Ef(o,r,n,e)}});function Ef(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(St(o))}}var _n=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},ou="~memo",Bf=[];function Jf(e){return e!==null&&typeof e=="object"}function nu(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var Kf=new WeakMap,He=0,gn=1,Kt=2;function Wt(e,t,r){let n=Kf.get(e);if(n!==void 0)return n?Kt:He;if(t.has(e))return Kt;t.add(e);let o=He,i=l=>{if(o!==Kt&&l?._zod){let f=Wt(l,t,r);f>o&&(o=f)}},s=(l,f)=>{let m=He;for(let d of Reflect.ownKeys(l)){let h=Object.getOwnPropertyDescriptor(l,d);if(f&&!h.enumerable)continue;let g=h.get?gn:h.value?._zod?Wt(h.value,t,r):He;g>m&&(m=g)}return m},u=l=>{l>o&&(o=l)},c=e._zod.def,a=c.type;switch(a){case"object":{let l=wr(c);u(l?s(l,!0):gn),i(c.catchall);break}case"array":i(c.element);break;case"tuple":for(let l of c.items)i(l);i(c.rest);break;case"record":case"map":i(c.keyType),i(c.valueType);break;case"set":i(c.valueType);break;case"union":for(let l of c.options)i(l);break;case"intersection":i(c.left),i(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(c.innerType);break;case"pipe":i(c.in),i(c.out);break;case"function":i(c.input),i(c.output);break;case"lazy":{let l=c._cachedInner??(r?e._zod.innerType:void 0);u(l?Wt(l,t,!1):gn);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let l in c){let f=Object.getOwnPropertyDescriptor(c,l);if(!f||f.get)continue;let m=f.value;if(!(!m||typeof m!="object")){if(m._zod)i(m);else if(Array.isArray(m))for(let d of m)i(d)}}}return t.delete(e),Ym(e,o)}function Ym(e,t){return t!==gn&&Kf.set(e,t===Kt),t}function $n(e){return Wt(e,new Set,!0)!==He}function Hm(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var mn,hn=[],Qm={alloc(e,t,r){let n=mn;if(!n)return r;mn=void 0;let o={value:r,issues:null};return n.set(t.value,o),hn.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&yn(i,o.value))throw new _n;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,u=(c,a)=>{if(r===void 0){let x=Wt(e,new Set,!1);if(x===He)return e._zod.parse=s,e._zod.run===u&&(e._zod.run=s),s(c,a);x===Kt||n?r=!0:n=!0}let l=c.value;if(!Jf(l))return s(c,a);let f=a[ou];f||(f={buckets:new WeakMap,backEdges:void 0},a[ou]=f);let m;o===a?m=i:(m=Hm(f,e),o=a,i=m);let d=m.get(l);if(d)return c.value=d.value,d.issues?d.issues.length&&c.issues.push(...nu(d.issues)):(c.memo=!0,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(d.value)),c;mn=m;let h=hn.length,g=s(c,a);mn=void 0;let y=hn.length>h?hn.pop():void 0;return g instanceof Promise?g.then(x=>(y&&(y.issues=x.issues.length?nu(x.issues):Bf),x)):(y&&(y.issues=g.issues.length?nu(g.issues):Bf),g)};e._zod.parse=u,e._zod.run===s&&(e._zod.run=u)})}};function Gt(){return Qm}function yn(e,t){let r=e[ou]?.backEdges;return r!==void 0&&Jf(t)&&r.has(t)}var qt={};ge(qt,{ar:()=>il,az:()=>sl,be:()=>ul,bg:()=>cl,bn:()=>al,ca:()=>ll,ckb:()=>fl,cs:()=>pl,da:()=>dl,de:()=>ml,el:()=>hl,en:()=>Ar,eo:()=>gl,es:()=>_l,fa:()=>$l,fi:()=>yl,fr:()=>wl,frCA:()=>bl,gu:()=>vl,he:()=>zl,hi:()=>kl,hr:()=>xl,hu:()=>Il,hy:()=>Zl,id:()=>Sl,is:()=>Pl,it:()=>Al,ja:()=>Ol,ka:()=>Nl,kh:()=>Tl,km:()=>Cl,kn:()=>Dl,ko:()=>El,lt:()=>Ll,mk:()=>Rl,ms:()=>Vl,ne:()=>jl,nl:()=>Fl,nn:()=>Ml,no:()=>Ul,ota:()=>Bl,pl:()=>Kl,ps:()=>Jl,pt:()=>Wl,ptBR:()=>Gl,ro:()=>ql,ru:()=>Xl,sk:()=>Yl,sl:()=>Hl,sv:()=>Ql,ta:()=>ef,tg:()=>tf,th:()=>rf,tk:()=>nf,tr:()=>of,ua:()=>uf,uk:()=>sf,ur:()=>cf,uz:()=>af,vi:()=>lf,yo:()=>df,zhCN:()=>ff,zhTW:()=>pf});var Wf,iu=Symbol("ZodOutput"),su=Symbol("ZodInput"),wn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function bn(){return new wn}(Wf=globalThis).__zod_globalRegistry??(Wf.__zod_globalRegistry=bn());var M=globalThis.__zod_globalRegistry;var J=Symbol.for("zod.compile.invalid"),Gf=Symbol.for("zod.compile.fallback"),ue=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},P=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function th(e,t){try{return zn(e,{assertOnly:!0})}catch{return t}}function lu(e,t){try{let r=zn(e),n=vn(e,r);return n._zod.bag.validator=th(e,r),n}catch(r){if(t?.strict)throw r;return e}}function vn(e,t){if($n(e))throw new P("a schema whose subtree contains a reference cycle");let r=R(e),n=e._zod.run,o=n.__originalRun??n,i=(s,u)=>{if(u?.async||u?.direction==="backward"||u?.skipChecks||u?.[Gf]||u&&yn(u,s.value))return o(s,u);let c=t(s.value);return c!==J?(s.value=c,s):(u&&(u[Gf]=!0),o(s,u))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||rh(r,e,t),r}function rh(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(s,u)=>{let c=r(s);return c!==J?{success:!0,data:c}:i(s,u)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(s,u)=>{let c=r(s);return c!==J?c:i(s,u)}}}function zn(e,t){let r=!0;try{r=$n(e)}catch{}if(r)throw new P("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new Ae(["input"]),i=L(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let s=["INVALID",...n.constants.keys()],u=[J,...n.constants.values()],c=o.content.join(`
58
+ `),a=t?.debug?s.length>0?`// Constants: ${s.join(", ")}
59
+ ${c}`:c:"",l=Function,f=`return (input) => {
60
+ ${c}
61
+ }`,m;try{m=new l(...s,f)(...u)}catch(d){throw new P(`this schema (generated code failed to evaluate: ${d.message})`)}return t?.debug&&(m.code=a),m.definite=n.definite,m}function z(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Ce(e,t){return e.definite=!1,z(e,t)}function v(e){return`v${e.varCounter++}`}function nh(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return J;let n=r;return n.issues.length===0?n.value:J}function B(e,t,r,n,o=!0){let i=e.content.length,s=t.constants.size,u=t.constantCounter,c=t.varCounter;try{return L(e,t,r,n,o)}catch(a){if(!(a instanceof P)||!a.islandable)throw a;if(e.content.length=i,t.constants.size>s){let l=Array.from(t.constants.keys()).slice(s);for(let f of l)t.constants.delete(f)}return t.constantCounter=u,t.varCounter=c,oh(e,t,r,n)}}function oh(e,t,r,n){t.definite=!1;let o=z(t,r),i=z(t,nh),s=v(t);return e.write(`const ${s} = ${i}(${o}, ${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}var ih=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function sh(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let s of o){let u=s._zod.def;if(u.when&&!ih.has(u.check))throw new P('check with a custom "when" condition');switch(u.check){case"greater_than":uh(e,t,u,i);break;case"less_than":ch(e,t,u,i);break;case"multiple_of":ah(e,t,u,i);break;case"number_format":ep(e,u,i);break;case"min_length":{let c=ye(u.minimum,"min_length"),a=uu(e,t,i,`${i}.length >= ${c} && ${i}.length < ${u.minimum*2}`);e.write(`if (${a} < ${c}) return INVALID;`);break}case"max_length":{let c=ye(u.maximum,"max_length"),a=uu(e,t,i,`${i}.length > ${c}`);e.write(`if (${a} > ${c}) return INVALID;`);break}case"length_equals":{let c=ye(u.length,"length_equals"),a=uu(e,t,i,`${i}.length >= ${c} && ${i}.length <= ${u.length*2}`);e.write(`if (${a} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${ye(u.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${ye(u.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${ye(u.size,"size_equals")}) return INVALID;`);break;case"string_format":i=tp(e,t,u,i);break;case"custom":i=hh(e,t,s,i);break;case"bigint_format":lh(e,u,i);break;case"mime_type":fh(e,t,u,i);break;case"property":dh(e,t,u,i);break;case"properties":ph(e,t,u,i);break;case"overwrite":{let c=v(t);mh(e,t,s,i,c),i=c;break}default:throw new P(`check type ${u.check}`)}}return i}function uu(e,t,r,n){let o=z(t,Be),i=v(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function ye(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new P(`${t} bound of type ${typeof e}`);return`${e}`}function Qf(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new P("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new P("comparison check with Invalid Date bound");return z(e,t)}throw new P(`comparison check bound of type ${typeof t}`)}function uh(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${Qf(t,r.value)}) return INVALID;`)}function ch(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${Qf(t,r.value)}) return INVALID;`)}function ah(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new P("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=z(t,yr);e.write(`if (${o}(${n}, ${ye(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function ep(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new P(`number format ${n}`)}}function lh(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new P(`bigint format ${n}`)}}function fh(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=z(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function ph(e,t,r,n){if(r.when)throw new P('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let s=typeof i=="symbol"?z(t,i):q(i),u=v(t);e.write(`const ${u} = ${n}[${s}];`),B(e,t,o[i],u,!1)}}function dh(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;L(e,t,r.schema,o)}function mh(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new P("overwrite check without a transform function");if(Te(i))throw new ue("z.compile: async overwrite transforms are not supported");let s=z(t,i);e.write(`const ${o} = ${s}(${n});`)}function cu(){throw new oe}function fu(e){this.issues.push(e)}function hh(e,t,r,n){let o=r._zod.def;if(o.fn){if(Te(o.fn))throw new ue("z.compile: async .refine() predicates are not supported");let i=Ce(t,o.fn),s=z(t,cu),u=v(t);return e.write(`const ${u} = ${i}(${n});`),e.write(`if (${u} instanceof Promise) ${s}();`),e.write(`if (!${u}) return INVALID;`),n}if(r._zod.check){if(Te(r._zod.check))throw new ue("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,u=Ce(t,a=>{let l={value:a,issues:[],addIssue:fu};return i(l)instanceof Promise&&cu(),l.issues.length===0?l.value:J}),c=v(t);return e.write(`const ${c} = ${u}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new P("custom check without a predicate or check function")}var gh=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function tp(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let a=z(t,jt);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="base64url"){let a=z(t,on);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="jwt"){let a=z(t,cn),l=z(t,r.alg??null);return e.write(`if (!${a}(${n}, ${l})) return INVALID;`),n}if(i==="ipv6"){let a=z(t,Vt);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="cidrv6"){let a=z(t,rn);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="credit_card"){let a=z(t,sn);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(i==="iban"){let a=z(t,un);return e.write(`if (!${a}(${n})) return INVALID;`),n}let s=r;if(i==="url"||i==="httpurl"||s.normalize||s.hostname!==void 0||s.protocol!==void 0){let a=z(t,Qr),l=z(t,r),f=v(t),m=v(t);if(e.write(`const ${f} = ${n}.trim();`),e.write(`const ${m} = ${a}(${f}, ${l});`),e.write(`if (typeof ${m} === "number") return INVALID;`),s.hostname!==void 0){let g=z(t,en);e.write(`if (!${g}(${m}, ${l}.hostname)) return INVALID;`)}if(s.protocol!==void 0){let g=z(t,tn);e.write(`if (!${g}(${m}, ${l}.protocol)) return INVALID;`)}if(!o)return null;let d=v(t),h=s.normalize?`${m}.href`:`${z(t,Rt)}(${f})`;return e.write(`const ${d} = ${h};`),d}let u=r.fn;if(u){if(Te(u))throw new P(`async string format ${i}`);let a=z(t,u);return e.write(`if (!${a}(${n})) return INVALID;`),n}if(gh.has(i)&&r.pattern){let a=z(t,r.pattern);return e.write(`${a}.lastIndex = 0;`),e.write(`if (!${a}.test(${n})) return INVALID;`),n}let c=r.format;switch(c){case"regex":throw new P("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${q(r.includes)})) return INVALID;`);break;case"starts_with":{let a=r.prefix;e.write(`if (${n}.slice(0, ${a.length}) !== ${q(a)}) return INVALID;`);break}case"ends_with":{let a=r.suffix;e.write(`if (${n}.slice(-${a.length}) !== ${q(a)}) return INVALID;`);break}default:throw new P(`string format ${c}`)}return n}function L(e,t,r,n,o=!0){let i=r._zod.def,s=i.type;if(i.coerce)throw new P(`coercion (z.coerce.${s}())`);let u=o||!!i.checks?.length,c;switch(s){case"string":c=_h(e,t,r,n,u);break;case"number":c=$h(e,r,n);break;case"boolean":c=yh(e,n);break;case"bigint":c=wh(e,r,n);break;case"symbol":c=bh(e,n);break;case"undefined":c=vh(e,n);break;case"null":c=zh(e,n);break;case"any":case"unknown":c=n;break;case"never":e.write("return INVALID;"),c=n;break;case"void":c=kh(e,n);break;case"nan":c=xh(e,n);break;case"date":c=Ih(e,n);break;case"object":c=Zh(e,t,r,n,u);break;case"optional":c=Sh(e,t,r,n,u);break;case"nullable":c=Oh(e,t,r,n,u);break;case"array":c=Nh(e,t,r,n,u);break;case"literal":c=Ch(e,t,r,n);break;case"enum":c=Th(e,t,r,n);break;case"readonly":{let a=Xf(e,t,r,n),l=v(t);e.write(`const ${l} = Object.freeze(${a});`),c=l;break}case"success":Xf(e,t,r,n),c="true";break;case"default":case"prefault":c=Dh(e,t,r,n);break;case"nonoptional":c=Eh(e,t,r,n);break;case"tuple":c=Lh(e,t,r,n);break;case"union":c=Rh(e,t,r,n);break;case"intersection":c=Fh(e,t,r,n);break;case"record":c=Mh(e,t,r,n);break;case"map":c=Bh(e,t,r,n);break;case"set":c=Jh(e,t,r,n);break;case"file":c=Kh(e,n);break;case"template_literal":c=Wh(e,t,r,n);break;case"lazy":c=Gh(e,t,r,n);break;case"pipe":c=qh(e,t,r,n);break;case"custom":c=Xh(e,t,r,n);break;case"transform":c=Qh(e,t,r,n);break;case"catch":c=Hh(e,t,r,n);break;default:throw new P(`schema type ${s}`)}return c===null?null:sh(e,t,r,c)}function _h(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:tp(e,t,i,n,o)}function $h(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&ep(e,{format:n.format},r),r}function yh(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function wh(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function bh(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function vh(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function zh(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function kh(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function xh(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function Ih(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function Zh(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let s=i.shape,u=Object.keys(s),c=Object.getOwnPropertySymbols(s),a=c.length?[...u,...c]:u,l=b=>typeof b=="symbol"?z(t,b):q(b),f=b=>typeof b=="symbol"?`[${l(b)}]`:q(b),m=s;if(u.includes("__proto__"))throw new P('object shape key "__proto__"');let d=new Map;for(let b of a){let I=m[b],O=l(b),E=v(t);if(e.write(`const ${E} = ${n}[${O}];`),I._zod.optin!==void 0){let A=v(t);e.write(`let ${A} = (() => {`),e.indented(U=>{let kt=B(U,t,I,E);U.write(`return ${kt};`)}),e.write("})();"),I._zod.optout==="optional"?(e.write(`if (${A} === INVALID) {`),e.indented(U=>{U.write(`if (${O} in ${n}) return INVALID;`),U.write(`${A} = undefined;`)}),e.write("}")):e.write(`if (${A} === INVALID) return INVALID;`),d.set(b,A)}else{Ah(I)&&e.write(`if (!(${O} in ${n})) return INVALID;`);let A=B(e,t,I,E,o);A!==null&&d.set(b,A)}}let h=i.catchall,g="none";if(h){let b=h._zod.def.type;if(b==="never"){let I=u.map(O=>`k !== ${q(O)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(O=>{O.write(`if (${I}) return INVALID;`)}),e.write("}")}else(b==="unknown"||b==="any")&&!h._zod.def.checks?.length?g="passthrough":g="schema"}let y=v(t),x=a.some(b=>qf(m[b])||au(m[b]));if(!o){if(g==="schema"){let b=u.length>0?z(t,new Set(u)):null;e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write('if (k === "__proto__") continue;'),b&&I.write(`if (${b}.has(k)) continue;`);let O=v(t);I.write(`const ${O} = ${n}[k];`),B(I,t,h,O,!1)}),e.write("}")}return null}if(x){e.write(`const ${y} = {};`);for(let b of a){let I=l(b),O=d.get(b);au(m[b])?e.write(`if (${I} in ${n}) ${y}[${I}] = ${O};`):qf(m[b])?e.write(`if (${O} !== undefined || ${I} in ${n}) ${y}[${I}] = ${O};`):e.write(`${y}[${I}] = ${O};`)}}else{let b=a.map(I=>`${f(I)}: ${d.get(I)}`).join(", ");e.write(`const ${y} = { ${b} };`)}if(g!=="none"){let b=u.length>0?z(t,new Set(u)):null;e.write(`for (const k in ${n}) {`),e.indented(I=>{if(I.write('if (k === "__proto__") continue;'),b&&I.write(`if (${b}.has(k)) continue;`),g==="passthrough")I.write(`${y}[k] = ${n}[k];`);else{let O=v(t);I.write(`const ${O} = ${n}[k];`);let E=B(I,t,h,O);I.write(`${y}[k] = ${E};`)}}),e.write("}")}return y}function Sh(e,t,r,n,o=!0){let i=r._zod.def;if(Ph(r))return L(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let u=v(t),c=v(t);return e.write(`let ${u};`),e.write(`if (${n} === undefined) {`),e.indented(a=>{a.write(`const ${c} = (() => {`),a.indented(l=>{let f=L(l,t,i.innerType,n);l.write(`return ${f};`)}),a.write("})();"),a.write(`if (${c} !== INVALID) ${u} = ${c};`)}),e.write("} else {"),e.indented(a=>{let l=L(a,t,i.innerType,n);a.write(`${u} = ${l};`)}),e.write("}"),u}let s=o?v(t):null;return s&&e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(u=>{let c=L(u,t,i.innerType,n,o);s&&c!==null&&u.write(`${s} = ${c};`)}),e.write("}"),s}function Ph(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function Ah(e){return e._zod.optin===void 0&&Ne(e)}function Ne(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Ne(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Ne(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Ne):!0;case"intersection":return!t.left||!t.right?!0:Ne(t.left)&&Ne(t.right);case"pipe":return t.in?Ne(t.in):!0;default:return!0}}function au(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function qf(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Qe(e)}function Qe(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Qe(t.innerType):!0;case"union":return t.options?t.options.some(Qe):!0;case"intersection":return!t.left||!t.right||Qe(t.left)||Qe(t.right);case"pipe":return t.out?Qe(t.out):!0;default:return!0}}function Oh(e,t,r,n,o=!0){let i=r._zod.def,s=o?v(t):null;return s&&e.write(`let ${s} = null;`),e.write(`if (${n} !== null) {`),e.indented(u=>{let c=L(u,t,i.innerType,n,o);s&&c!==null&&u.write(`${s} = ${c};`)}),e.write("}"),s}function pu(e,t,r){for(let[n,o]of Zt(t._zod.def.checks))e.write(`if (${r} > ${ye(n,o._zod.def.check)}) return INVALID;`)}function Nh(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`),pu(e,r,`${n}.length`);let s=o?v(t):null,u=v(t),c=v(t);return s&&e.write(`const ${s} = new Array(${n}.length);`),e.write(`for (let ${u} = 0; ${u} < ${n}.length; ${u}++) {`),e.indented(a=>{a.write(`const ${c} = ${n}[${u}];`);let l=B(a,t,i.element,c,o);s&&l!==null&&a.write(`${s}[${u}] = ${l};`)}),e.write("}"),s}function Ch(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let u=z(t,new Set(i));return e.write(`if (!${u}.has(${n})) return INVALID;`),n}let s=i[0];if(typeof s=="number"&&Number.isNaN(s)){let u=z(t,new Set(i));return e.write(`if (!${u}.has(${n})) return INVALID;`),n}if(typeof s=="string")e.write(`if (${n} !== ${q(s)}) return INVALID;`);else if(typeof s=="number"||typeof s=="boolean")e.write(`if (${n} !== ${s}) return INVALID;`);else if(s===null)e.write(`if (${n} !== null) return INVALID;`);else if(s===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof s=="bigint")e.write(`if (${n} !== ${s}n) return INVALID;`);else throw new P(`literal type ${typeof s}`);return n}function Th(e,t,r,n){let o=r._zod.values;if(!o)throw new P("enum schema without enumerated values");let i=z(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function Xf(e,t,r,n){let o=r._zod.def;return L(e,t,o.innerType,n)}function Dh(e,t,r,n){let o=r._zod.def,s=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!s)return L(e,t,o.innerType,n);let c=z(t,s),a=v(t);return e.write(`let ${a} = ${n};`),e.write(`if (${n} === undefined) ${a} = ${c}();`),L(e,t,o.innerType,a)}let u=v(t);if(s){let c=z(t,s),a=z(t,vr);e.write(`let ${u};`),e.write(`if (${n} === undefined) {`),e.indented(l=>{l.write(`${u} = ${a}(${c}());`)}),e.write("} else {"),e.indented(l=>{let f=L(l,t,o.innerType,n);l.write(`${u} = ${f} === undefined ? ${a}(${c}()) : ${f};`)}),e.write("}")}else e.write(`let ${u};`),e.write(`if (${n} !== undefined) {`),e.indented(c=>{let a=L(c,t,o.innerType,n);c.write(`${u} = ${a};`)}),e.write("}");return u}function Eh(e,t,r,n){let o=r._zod.def,i=L(e,t,o.innerType,n),s=v(t);return e.write(`const ${s} = ${i};`),e.write(`if (${s} === undefined) return INVALID;`),s}function Lh(e,t,r,n){let o=r._zod.def,i=o.items,s=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let u=Yf(i,"optin"),c=Yf(i,"optout");s?e.write(`if (${n}.length < ${u}) return INVALID;`):e.write(`if (${n}.length < ${u} || ${n}.length > ${i.length}) return INVALID;`);let a=v(t);e.write(`const ${a} = [];`);for(let l=0;l<i.length;l++){let f=i[l];if(l>=c)e.write(`if (${a}.length === ${l}) {`),e.indented(m=>{m.write(`if (${l} < ${n}.length) {`),m.indented(d=>{let h=v(t);d.write(`const ${h} = ${n}[${l}];`);let g=B(d,t,f,h);d.write(`${a}[${l}] = ${g};`)}),m.write("} else {"),m.indented(d=>{if(au(f)){d.write(`${a}.length = ${l};`);return}let h=v(t),g=v(t);d.write(`const ${h} = undefined;`),d.write(`const ${g} = (() => {`),d.indented(y=>{let x=B(y,t,f,h);y.write(`return ${x};`)}),d.write("})();"),d.write(`if (${g} === INVALID || ${g} === undefined) ${a}.length = ${l};`),d.write(`else ${a}[${l}] = ${g};`)}),m.write("}")}),e.write("}");else{let m=v(t);e.write(`const ${m} = ${n}[${l}];`);let d=B(e,t,f,m);e.write(`${a}[${l}] = ${d};`)}}if(s){let l=v(t),f=v(t);e.write(`for (let ${l} = ${i.length}; ${l} < ${n}.length; ${l}++) {`),e.indented(m=>{m.write(`const ${f} = ${n}[${l}];`);let d=B(m,t,s,f);m.write(`${a}[${l}] = ${d};`)}),e.write("}")}return a}function Yf(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Rh(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return Vh(e,t,o,n);if(o.inclusive===!1)throw new P("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return L(e,t,i[0],n);if(i.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(i.flatMap(l=>l._zod.def.values)),a=z(t,c);return e.write(`if (!${a}.has(${n})) return INVALID;`),n}let u=v(t);e.write(`let ${u};`);for(let c=0;c<i.length;c++){let a=i[c];c===0?e.write(`${u} = (() => {`):e.write(`if (${u} === INVALID) ${u} = (() => {`),e.indented(l=>{let f=L(l,t,a,n);l.write(`return ${f};`)}),e.write("})();")}return e.write(`if (${u} === INVALID) return INVALID;`),u}function Vh(e,t,r,n){if(r.unionFallback)throw new P("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=v(t),i=v(t);e.write(`const ${o} = ${n}?.[${q(r.discriminator)}];`),e.write(`let ${i};`);let s=!0,u=new Set;for(let c of r.options){let a=c._zod.propValues?.[r.discriminator];if(!a||a.size===0)throw new P("discriminated union option without static discriminator values");for(let m of a){if(u.has(m))throw new P(`duplicate discriminator value ${String(m)}`);u.add(m)}let l=Array.from(a,m=>jh(t,o,m)),f=s?"if":"else if";e.write(`${f} (${l.join(" || ")}) {`),e.indented(m=>{let d=L(m,t,c,n);m.write(`${i} = ${d};`)}),e.write("}"),s=!1}return e.write("else { return INVALID; }"),i}function jh(e,t,r){if(typeof r=="string")return`${t} === ${q(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=z(e,r);return`${t} === ${n}`}throw new P(`literal discriminator value ${String(r)}`)}function Fh(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=B(e,t,o.left,n),s=B(e,t,o.right,n),u=z(t,Ye),c=v(t);return e.write(`const ${c} = ${u}(${i}, ${s});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function Mh(e,t,r,n){let o=r._zod.def,i=z(t,$e);e.write(`if (!${i}(${n})) return INVALID;`);let s=v(t),u=v(t),c=v(t);e.write(`const ${s} = {};`);let a=o,l=a.partial?void 0:o.keyType._zod.values;if(l){let d=[];for(let g of l){if(!(typeof g=="string"||typeof g=="number"||typeof g=="symbol"))throw new P(`record key value ${String(g)}`);let y=typeof g=="number"?g.toString():g;if(y==="__proto__")throw new P('record key "__proto__"');d.push(y);let x=z(t,g),b=L(e,t,o.keyType,x),I=v(t);e.write(`const ${I} = ${n}[${Uh(t,y)}];`);let O=B(e,t,o.valueType,I);e.write(`${s}[${b}] = ${O};`)}let h=z(t,new Set(d));return e.write(`for (const ${u} in ${n}) {`),e.indented(g=>{g.write(`if (${h}.has(${u})) continue;`),a.mode==="loose"?g.write(`if (${u} !== "__proto__") ${s}[${u}] = ${n}[${u}];`):g.write("return INVALID;")}),e.write("}"),s}let f=o.keyType._zod.def;if(!(f.type==="string"&&f.format===void 0&&!f.coerce&&(f.checks?.length??0)===0)){let d=o.mode==="loose",h=zn(o.keyType);h.definite===!1&&(t.definite=!1);let g=z(t,h),y=z(t,de),x=v(t);return Hf(e,t,n,u,b=>{b.write(`let ${x} = ${g}(${u});`),b.write(`if (${x} === INVALID && typeof ${u} === "string" && ${y}.test(${u})) ${x} = ${g}(Number(${u}));`),d?b.write(`if (${x} === INVALID) { ${s}[${u}] = ${n}[${u}]; continue; }`):b.write(`if (${x} === INVALID) return INVALID;`),b.write(`if (${x} === "__proto__") continue;`);let I=v(t);b.write(`const ${I} = ${n}[${u}];`);let O=B(b,t,o.valueType,I);b.write(`${s}[${x}] = ${O};`)}),s}return Hf(e,t,n,u,d=>{d.write(`const ${c} = ${n}[${u}];`);let h=B(d,t,o.valueType,c);d.write(`${s}[${u}] = ${h};`)},"return INVALID;"),s}function Hf(e,t,r,n,o,i){let s=z(t,Object.prototype.propertyIsEnumerable),u=v(t),c=v(t),a=v(t);e.write(`const ${u} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${a} = 0; ${a} < ${c}.length; ${a}++) {`),e.indented(l=>{l.write(`const ${n} = ${c}[${a}];`),l.write(`if (${n} === "__proto__" || !${s}.call(${r}, ${n})) continue;`),o(l)}),e.write("}"),e.write(`for (let ${a} = 0; ${a} < ${u}.length; ${a}++) {`),e.indented(l=>{l.write(`const ${n} = ${u}[${a}];`),l.write(`if (!${s}.call(${r}, ${n})) continue;`),i?l.write(i):o(l)}),e.write("}")}function Uh(e,t){return typeof t=="string"?q(t):z(e,t)}function Bh(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`),pu(e,r,`${n}.size`);let i=v(t),s=v(t),u=v(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${s}, ${u}] of ${n}) {`),e.indented(c=>{let a=L(c,t,o.keyType,s),l=L(c,t,o.valueType,u);c.write(`${i}.set(${a}, ${l});`)}),e.write("}"),i}function Jh(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`),pu(e,r,`${n}.size`);let i=v(t),s=v(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${s} of ${n}) {`),e.indented(u=>{let c=L(u,t,o.valueType,s);u.write(`${i}.add(${c});`)}),e.write("}"),i}function Kh(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function Wh(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=z(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function Gh(e,t,r,n){let o=r._zod.def,i=Ce(t,o.getter),s=z(t,{parser:null});e.write(`if (!${s}.parser) {`),e.indented(c=>{c.write(`const inner = ${i}();`),c.write(`${s}.parser = function(input) {`),c.indented(a=>{a.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),a.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let u=v(t);return e.write(`const ${u} = ${s}.parser(${n});`),e.write(`if (${u} === INVALID) return INVALID;`),u}function qh(e,t,r,n){let o=r._zod.def,i=L(e,t,o.in,n);if(o.transform){if(Te(o.transform))throw new ue("z.compile: async transforms in pipes are not supported");let s=o.transform,c=Ce(t,l=>{let f={value:l,issues:[],addIssue:fu},m=s(l,f);return m instanceof Promise?J:f.issues.length===0?m:J}),a=v(t);return e.write(`const ${a} = ${c}(${i});`),e.write(`if (${a} === INVALID) return INVALID;`),L(e,t,o.out,a)}else return L(e,t,o.out,i)}function Te(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Xh(e,t,r,n){let o=r._zod.def;if(o.fn){if(Te(o.fn))throw new ue("z.compile: async custom predicates are not supported");let i=Ce(t,o.fn),s=z(t,cu),u=v(t);e.write(`const ${u} = ${i}(${n});`),e.write(`if (${u} instanceof Promise) ${s}();`),e.write(`if (!${u}) return INVALID;`)}else throw new P("custom schema without a predicate function");return n}function Yh(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return J;let o=n;return o.issues.length===0?o.value:t()}function Hh(e,t,r,n){let o=r._zod.def;if(!o.catchValue[nl])throw new P("catch with a callback (only a constant catch value compiles)",!1);let i=v(t);e.write(`let ${i} = (() => {`),e.indented(a=>{let l=B(a,t,o.innerType,n);a.write(`return ${l};`)}),e.write("})();");let s=z(t,o.innerType),u=Ce(t,o.catchValue),c=z(t,Yh);return e.write(`if (${i} === INVALID) {`),e.indented(a=>{a.write(`${i} = ${c}(${s}, ${u}, ${n});`),a.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function Qh(e,t,r,n){let o=r._zod.def;if(o.transform){if(Te(o.transform))throw new ue("z.compile: async transforms are not supported");let i=o.transform,u=Ce(t,a=>{let l={value:a,issues:[],addIssue:fu},f=i(a,l);return f instanceof Promise?J:l.issues.length===0?f:J}),c=v(t);return e.write(`const ${c} = ${u}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return n}function kn(e){return e.checks&&(e.checks=[...e.checks]),e}function du(e,t){return new e(kn({type:"string",..._(t)}))}function mu(e,t){return new e(kn({type:"string",coerce:!0,..._(t)}))}function xn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}function In(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function Zn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}function Sn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}function Pn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}function An(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}function Xt(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}function On(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}function Nn(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}function Cn(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}function Tn(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}function Dn(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}function En(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}function Ln(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}function Rn(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}function Vn(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}function hu(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,..._(t)})}function jn(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}function Fn(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}function Mn(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}function Un(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}function Bn(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}function gu(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,..._(t)})}function _u(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,..._(t)})}function Jn(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}var $u={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Yt(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}function Ht(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}function Qt(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}function er(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}function yu(e,t){return new e(kn({type:"number",checks:[],..._(t)}))}function wu(e,t){return new e(kn({type:"number",coerce:!0,checks:[],..._(t)}))}function bu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}function vu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",..._(t)})}function zu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",..._(t)})}function ku(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",..._(t)})}function xu(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",..._(t)})}function Iu(e,t){return new e({type:"boolean",..._(t)})}function Zu(e,t){return new e({type:"boolean",coerce:!0,..._(t)})}function Su(e,t){return new e({type:"bigint",..._(t)})}function Pu(e,t){return new e({type:"bigint",coerce:!0,..._(t)})}function Au(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",..._(t)})}function Ou(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",..._(t)})}function Nu(e,t){return new e({type:"symbol",..._(t)})}function Cu(e,t){return new e({type:"undefined",..._(t)})}function Tu(e,t){return new e({type:"null",..._(t)})}function Du(e){return new e({type:"any"})}function Eu(e){return new e({type:"unknown"})}function Lu(e,t){return new e({type:"never",..._(t)})}function Ru(e,t){return new e({type:"void",..._(t)})}function Vu(e,t){return new e({type:"date",..._(t)})}function ju(e,t){return new e({type:"date",coerce:!0,..._(t)})}function Fu(e,t){return new e({type:"nan",..._(t)})}function ae(e,t){return new Kr({check:"less_than",..._(t),value:e,inclusive:!1})}function re(e,t){return new Kr({check:"less_than",..._(t),value:e,inclusive:!0})}function le(e,t){return new Wr({check:"greater_than",..._(t),value:e,inclusive:!1})}function ne(e,t){return new Wr({check:"greater_than",..._(t),value:e,inclusive:!0})}function Kn(e){return le(0,e)}function Wn(e){return ae(0,e)}function Gn(e){return re(0,e)}function qn(e){return ne(0,e)}function we(e,t){return new zi({check:"multiple_of",..._(t),value:e})}function be(e,t){return new Ii({check:"max_size",..._(t),maximum:e})}function fe(e,t){return new Zi({check:"min_size",..._(t),minimum:e})}function De(e,t){return new Si({check:"size_equals",..._(t),size:e})}function Ee(e,t){return new Pi({check:"max_length",..._(t),maximum:e})}function me(e,t){return new Ai({check:"min_length",..._(t),minimum:e})}function Le(e,t){return new Oi({check:"length_equals",..._(t),length:e})}function et(e,t){return new Ni({check:"string_format",format:"regex",..._(t),pattern:e})}function tt(e){return new Ci({check:"string_format",format:"lowercase",..._(e)})}function rt(e){return new Ti({check:"string_format",format:"uppercase",..._(e)})}function nt(e,t){return new Di({check:"string_format",format:"includes",..._(t),includes:e})}function ot(e,t){return new Ei({check:"string_format",format:"starts_with",..._(t),prefix:e})}function it(e,t){return new Li({check:"string_format",format:"ends_with",..._(t),suffix:e})}function Xn(e,t,r){return new Ri({check:"property",property:e,schema:t,..._(r)})}function st(e,t){return new Vi({check:"properties",shape:e,..._(t)})}function ut(e,t){return new ji({check:"mime_type",mime:e,..._(t)})}function ce(e){return new Fi({check:"overwrite",tx:e})}function ct(e){return ce(t=>t.normalize(e))}function at(){return ce(e=>e.trim())}function lt(){return ce(e=>e.toLowerCase())}function ft(){return ce(e=>e.toUpperCase())}function pt(){return ce(e=>Ya(e))}function Mu(e,t,r){return new e({type:"array",element:t,..._(r)})}function eg(e,t,r){return new e({type:"union",options:t,..._(r)})}function tg(e,t,r){return new e({type:"union",options:t,inclusive:!1,..._(r)})}function rg(e,t,r,n){return new e({type:"union",options:r,discriminator:t,..._(n)})}function ng(e,t,r){return new e({type:"intersection",left:t,right:r})}function og(e,t,r,n){let o=r instanceof k,i=o?n:r,s=o?r:null;return new e({type:"tuple",items:t,rest:s,..._(i)})}function ig(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,..._(n)})}function sg(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,..._(n)})}function ug(e,t,r){return new e({type:"set",valueType:t,..._(r)})}function cg(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,..._(r)})}function ag(e,t,r){return new e({type:"enum",entries:t,..._(r)})}function lg(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],..._(r)})}function Uu(e,t){return new e({type:"file",..._(t)})}function fg(e,t){return new e({type:"transform",transform:t})}function pg(e,t){return new e({type:"optional",innerType:t})}function dg(e,t){return new e({type:"nullable",innerType:t})}function mg(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():vr(r)}})}function hg(e,t,r){return new e({type:"nonoptional",innerType:t,..._(r)})}function gg(e,t){return new e({type:"success",innerType:t})}function _g(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:ol(r)})}function $g(e,t,r){return new e({type:"pipe",in:t,out:r})}function yg(e,t){return new e({type:"readonly",innerType:t})}function wg(e,t,r){return new e({type:"template_literal",parts:t,..._(r)})}function bg(e,t){return new e({type:"lazy",getter:t})}function vg(e,t){return new e({type:"promise",innerType:t})}function Bu(e,t,r){let n=_(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Ju(e,t,r){return new e({type:"custom",check:"custom",fn:t,..._(r)})}function Ku(e,t){let r=rp(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(St(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(St(i))}},e(n.value,n)),t);return r}function rp(e,t){let r=new D({check:"custom",..._(t)});return r._zod.check=e,r}function Wu(e){let t=new D({check:"describe"});return t._zod.onattach=[r=>{let n=M.get(r)??{};M.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function Gu(e){let t=new D({check:"meta"});return t._zod.onattach=[r=>{let n=M.get(r)??{};M.add(r,{...n,...e})}],t._zod.check=()=>{},t}function qu(e,t){let r=_(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(d=>typeof d=="string"?d.toLowerCase():d),o=o.map(d=>typeof d=="string"?d.toLowerCase():d));let i=new Set(n),s=new Set(o),u=e.Codec??Bt,c=e.Boolean??Mt,a=e.String??Oe,l=new a({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),m=new u({type:"pipe",in:l,out:f,transform:((d,h)=>{let g=d;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:s.has(g)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((d,h)=>d===!0?n[0]||"true":o[0]||"false"),error:r.error});return m._zod.bag.truthy=n,m._zod.bag.falsy=o,m._zod.bag.case=r.case??"insensitive",m}function Re(e,t,r,n={}){let o=_(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function tr(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&G(e,n,r[n]);return e}function ve(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??M,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function j(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function C(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let m=s.schema,d=t.processors[o.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);d(e,t,m,l)}let f=e._zod.parent;f&&(s.ref||(s.ref=f),C(f,t,l),t.seen.get(f).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&tr(s.schema,c),t.io==="input"&&K(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function np(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function ze(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let c=n.get(u);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(u,s[0])}}let o=s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(s[0])?.id,m=e.external.uri??(h=>h);if(f)return{ref:m(f)};let d=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=d,{defId:d,ref:`${m("__shared")}#/${u}/${np(d)}`}}let c="#",a=`${c}/${u}/`;if(s[1]===r&&!s[1].schema.id)return{ref:c};let l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:a+np(l)}},i=s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:c,defId:a}=o(s);u.def={...u.schema},a&&(u.defId=a);let l=u.schema;for(let f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
62
+
63
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let a=e.external.registry.get(s[0])?.id;if(t!==s[0]&&a){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}u.count>1&&e.reused==="ref"&&i(s)}e.external&&(e.sharedDefsExtractedFor=e.external)}function sp(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;sp(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var up=new Set(["type","properties","required","additionalProperties"]),op=["oneOf","anyOf"];function ip(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Xu(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let s in i)if(!up.has(s))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let u=[];for(let a of t){let l=a.properties?.[s]??ip(a);l!=null&&(u.some(f=>JSON.stringify(f)===JSON.stringify(l))||u.push(l))}let c=u.length===1?u[0]:Xu(u)??{allOf:u};G(r,s,c)}for(let s of i.required??[])n.add(s)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let s of t){let u=ip(s);u&&!i.some(c=>JSON.stringify(c)===JSON.stringify(u))&&i.push(u)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function zg(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of up)if(o in e)return;let r=t.filter(o=>op.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=Xu(t);else{let o=r[0],i=op.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;let s=t.filter(c=>c!==o),u=o[i].map(c=>Xu([...s,c]));if(u.some(c=>!c))return;n={[i]:u}}n&&(delete e.allOf,tr(e,n))}function ke(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=u=>{let c=e.seen.get(u);if(c.ref===null)return;let a=c.def??c.schema,l={...a},f=c.ref;if(c.ref=null,f){n(f);let d=e.seen.get(f),h=d.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):tr(a,h),tr(a,l),u._zod.parent===f)for(let y in a)y==="$ref"||y==="allOf"||y in l||delete a[y];if(h.$ref&&d.def)for(let y in a)y==="$ref"||y==="allOf"||y in d.def&&JSON.stringify(a[y])===JSON.stringify(d.def[y])&&delete a[y]}let m=u._zod.parent;if(m&&m!==f){n(m);let d=e.seen.get(m);if(d?.schema.$ref&&(a.$ref=d.schema.$ref,d.def))for(let h in a)h==="$ref"||h==="allOf"||h in d.def&&JSON.stringify(a[h])===JSON.stringify(d.def[h])&&delete a[h]}e.override({zodSchema:u,jsonSchema:a,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let u of[...e.seen.entries()].reverse())n(u[0]);if(e.target!=="openapi-3.0")for(let u of e.seen.entries())sp(u[1].def??u[1].schema);for(let u of e.deferred)u();if(e.intersections.length){let u=new Map;for(let c of e.seen.values())for(let a of[c.schema,c.def]){let l=a?.allOf;if(!Array.isArray(l))continue;let f=u.get(l);f?f.push(a):u.set(l,[a])}for(let c of e.intersections)for(let a of u.get(c)??[])zg(a)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}tr(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let u of e.seen.entries()){let c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,G(s,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:dt(t,"input",e.processors),output:dt(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function K(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return K(n.element,r);if(n.type==="set")return K(n.valueType,r);if(n.type==="lazy")return K(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return K(n.innerType,r);if(n.type==="intersection")return K(n.left,r)||K(n.right,r);if(n.type==="record"||n.type==="map")return K(n.keyType,r)||K(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:K(n.in,r)||K(n.out,r);if(n.type==="object"){for(let o in n.shape)if(K(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(K(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(K(o,r))return!0;return!!(n.rest&&K(n.rest,r))}return!1}var Yu=(e,t={})=>r=>{let n=ve({...r,processors:t});return C(e,n),ze(n,e),ke(n,e)},dt=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},s=ve({...o??{},target:i,io:t,processors:r});return C(e,s),ze(s,e),ke(s,e)};var mt=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},ht=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},cp=(e,t)=>{mt(e,"minimum",t),ht(e,"maximum",t)},pp=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},dp=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},mp=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},hp=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},ap=(e,t)=>mt(e,"minimum",t.minimum),lp=(e,t)=>ht(e,"maximum",t.maximum),fp=e=>(t,r)=>{hp(t,r.format);let[n,o]=e[r.format];mt(t,"minimum",n),ht(t,"maximum",o)},kg={greater_than:(e,t)=>mt(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ht(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>pp(e,t.value),number_format:fp(kr),bigint_format:fp(xr),min_length:ap,max_length:lp,length_equals:(e,t)=>cp(e,t.length),min_size:ap,max_size:lp,size_equals:(e,t)=>cp(e,t.size),string_format:(e,t)=>{hp(e,t.format),t.pattern&&dp(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>mp(e,t.mime)};function F(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)kg[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&mt(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&mt(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ht(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ht(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&pp(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&mp(t,o.mime);for(let i of o.patterns??[])dp(t,i);return t}var xg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ig=new Map([[nn,ni],[Ft,oi]]),gp=e=>Ig.get(e)??e,ec=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:s,format:u,patterns:c,contentEncoding:a,laxFormat:l}=F(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=xg[u]??u,o.format===""&&delete o.format,(u==="time"||l)&&delete o.format),a&&(o.contentEncoding=a),c&&c.size>0){let f=[...c].map(gp);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},tc=(e,t,r,n)=>{let o=r,{minimum:i,maximum:s,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:a,isInt:l}=F(e);o.type=l?"integer":"number";let f=typeof a=="number"&&a>=(i??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),d=t.target==="draft-04"||t.target==="openapi-3.0";if(f?d?(o.minimum=a,o.exclusiveMinimum=!0):o.exclusiveMinimum=a:typeof i=="number"&&(o.minimum=i),m?d?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),u){let h=new Set;for(let x of u)Number.isFinite(x)&&x!==0?h.add(Math.abs(x)):j(e,t,o,n,`A multipleOf divisor of ${x} cannot be represented in JSON Schema`);let[g,...y]=h;g!==void 0&&(o.multipleOf=g),y.length&&(o.allOf=[...o.allOf??[],...y.map(x=>({multipleOf:x}))])}},rc=(e,t,r,n)=>{r.type="boolean"},nc=(e,t,r,n)=>{j(e,t,r,n,"BigInt cannot be represented in JSON Schema")},oc=(e,t,r,n)=>{j(e,t,r,n,"Symbols cannot be represented in JSON Schema")},ic=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},sc=(e,t,r,n)=>{j(e,t,r,n,"Undefined cannot be represented in JSON Schema")},uc=(e,t,r,n)=>{j(e,t,r,n,"Void cannot be represented in JSON Schema")},cc=(e,t,r,n)=>{r.not={}},ac=(e,t,r,n)=>{},lc=(e,t,r,n)=>{},fc=(e,t,r,n)=>{j(e,t,r,n,"Date cannot be represented in JSON Schema")},pc=(e,t,r,n)=>{let o=e._zod.def,i=xt(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},dc=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let s of o.values)if(s===void 0){if(j(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(j(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},mc=(e,t,r,n)=>{j(e,t,r,n,"NaN cannot be represented in JSON Schema")},hc=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},gc=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:s,mime:u}=F(e);i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),u&&(u.length===0?o.not={}:u.length===1?o.contentMediaType=u[0]:o.anyOf=u.map(c=>({contentMediaType:c})))},_c=(e,t,r,n)=>{r.type="boolean"},$c=(e,t,r,n)=>{j(e,t,r,n,"Custom types cannot be represented in JSON Schema")},yc=(e,t,r,n)=>{j(e,t,r,n,"Function types cannot be represented in JSON Schema")},wc=(e,t,r,n)=>{j(e,t,r,n,"Transforms cannot be represented in JSON Schema")},bc=(e,t,r,n)=>{j(e,t,r,n,"Map cannot be represented in JSON Schema")},vc=(e,t,r,n)=>{j(e,t,r,n,"Set cannot be represented in JSON Schema")},zc=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:s,maximum:u}=F(e);typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=C(i.element,t,{...n,path:[...n.path,"items"]})};function rr(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?rr(t.out):t.type==="catch"?rr(t.innerType):e._zod.optin}var kc=(e,t,r,n)=>{let o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&j(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let a in s)G(o.properties,a,C(s[a],t,{...n,path:[...n.path,"properties",a]}));let c=[];for(let a of Object.keys(s)){let l=i.shape[a];(t.io==="input"?rr(l)===void 0:l._zod.optout===void 0)&&c.push(a)}c.length>0&&(o.required=c),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=C(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},Hn=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,c)=>C(u,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},xc=(e,t,r,n)=>{let o=e._zod.def,i=C(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=C(o.right,t,{...n,path:[...n.path,"allOf",1]}),u=a=>"allOf"in a&&Object.keys(a).length===1,c=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c)},Ic=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((g,y)=>C(g,t,{...n,path:[...n.path,s,y]})),a=i.rest?C(i.rest,t,{...n,path:[...n.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,l=i.items.length;for(;l>0;){let g=i.items[l-1];if(!(t.io==="input"?rr(g)!==void 0:g._zod.optout==="optional"))break;l--}let f=i.items.length,m=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,m?o.items=!1:a&&(o.items=a),l>0&&(o.minItems=l),m&&(o.maxItems=f)):t.target==="openapi-3.0"?(o.items={anyOf:c},a&&o.items.anyOf.push(a),l>0&&(o.minItems=l),m&&(o.maxItems=f)):(o.items=c,m?o.additionalItems=!1:a&&(o.additionalItems=a),l>0&&(o.minItems=l),m&&(o.maxItems=f));let{minimum:d,maximum:h}=F(e);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h)};function Hu(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let h=e.get(t)?.def;if(!h)return t;let g=Hu(e,h,r);return g===h?t:g}for(let h of["anyOf","oneOf"]){let g=t[h];if(!Array.isArray(g))continue;let y=g.map(x=>Hu(e,x,r));y.some((x,b)=>x!==g[b])&&(t={...t,[h]:y})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(h=>h==="number"||h==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(h=>typeof h=="number"))return t;let{minimum:s,maximum:u,exclusiveMinimum:c,exclusiveMaximum:a,multipleOf:l,format:f,id:m,...d}=t;return d.enum?d.enum=d.enum.map(h=>typeof h=="number"?String(h):h):typeof d.const=="number"&&(d.const=String(d.const)),o&&(d.type="string",i||(d.pattern=(n.includes("number")?de:Tt).source)),d}var Qu=new WeakMap;function Zg(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of Qu.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let s=Hu(t,i,new Set);s!==i&&r.set(i,s)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var Zc=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let s=i.keyType,u=F(s).patterns;if(i.mode==="loose"&&u&&u.size>0){let l=C(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let f of u)G(o.patternProperties,gp(f).source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=C(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=Qu.get(t);l||(l=[],Qu.set(t,l),t.deferred.push(()=>Zg(t))),l.push(e)}o.additionalProperties=C(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let c=s._zod.values,a=t.io==="input"&&rr(i.valueType)!==void 0;if(c&&!i.partial&&!a){let l=[...c].filter(f=>typeof f=="string"||typeof f=="number");l.length>0&&(o.required=l.map(String))}},Sc=(e,t,r,n)=>{let o=e._zod.def,i=C(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Pc=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Ac=Symbol();function _p(e,t,r,n,o){let i=!1,s=JSON.stringify(e,(u,c)=>typeof c!="bigint"?c:(i=!0,null));return i?(j(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Ac):JSON.parse(s)}var Oc=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s=_p(o.defaultValue,e,t,r,n);s!==Ac&&(r.default=s)},Nc=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let s=_p(o.defaultValue,e,t,r,n);s!==Ac&&(r._prefault=s)},Cc=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{j(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},Tc=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;C(s,t,n);let u=t.seen.get(e);u.ref=s},Dc=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Ec=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Qn=(e,t,r,n)=>{let o=e._zod.def;C(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Lc=(e,t,r,n)=>{let o=e._zod.innerType;C(o,t,n);let i=t.seen.get(e);i.ref=o},Yn={string:ec,number:tc,boolean:rc,bigint:nc,symbol:oc,null:ic,undefined:sc,void:uc,never:cc,any:ac,unknown:lc,date:fc,enum:pc,literal:dc,nan:mc,template_literal:hc,file:gc,success:_c,custom:$c,function:yc,transform:wc,map:bc,set:vc,array:zc,object:kc,union:Hn,intersection:xc,tuple:Ic,record:Zc,nullable:Sc,nonoptional:Pc,default:Oc,prefault:Nc,catch:Cc,pipe:Tc,readonly:Dc,promise:Ec,optional:Qn,lazy:Lc};function eo(e,t){if("_idmap"in e){let n=e,o=ve({...t,processors:Yn}),i={};for(let c of n._idmap.entries()){let[a,l]=c;C(l,o)}let s={},u={registry:n,uri:t?.uri,defs:i};o.external=u;for(let c of n._idmap.entries()){let[a,l]=c;ze(o,l),G(s,a,ke(o,l))}if(Object.keys(i).length>0){let c=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i}}return{schemas:s}}let r=ve({...t,processors:Yn});return C(e,r),ze(r,e),ke(r,e)}var to=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=ve({processors:Yn,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return C(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,ze(this.ctx,t);let n=ke(this.ctx,t),{"~standard":o,...i}=n;return i}};var $p={};var zt={};ge(zt,{ZodAny:()=>ia,ZodArray:()=>aa,ZodBase64:()=>bo,ZodBase64URL:()=>vo,ZodBigInt:()=>bt,ZodBigIntFormat:()=>xo,ZodBoolean:()=>wt,ZodCIDRv4:()=>yo,ZodCIDRv6:()=>wo,ZodCUID:()=>fo,ZodCUID2:()=>po,ZodCatch:()=>Aa,ZodCodec:()=>pr,ZodCreditCard:()=>Yc,ZodCustom:()=>dr,ZodCustomStringFormat:()=>Me,ZodDate:()=>sr,ZodDefault:()=>ka,ZodDiscriminatedUnion:()=>fa,ZodE164:()=>zo,ZodEmail:()=>uo,ZodEmoji:()=>ao,ZodEnum:()=>_t,ZodExactOptional:()=>Po,ZodFile:()=>wa,ZodFunction:()=>ja,ZodGUID:()=>co,ZodIBAN:()=>Hc,ZodIPv4:()=>_o,ZodIPv6:()=>$o,ZodISODate:()=>Ie,ZodISODateTime:()=>xe,ZodISODuration:()=>Se,ZodISOTime:()=>Ze,ZodInstanceOf:()=>Ua,ZodIntersection:()=>pa,ZodJWT:()=>ko,ZodKSUID:()=>go,ZodLazy:()=>La,ZodLiteral:()=>ya,ZodMAC:()=>Xc,ZodMap:()=>_a,ZodNaN:()=>Na,ZodNanoID:()=>lo,ZodNever:()=>ua,ZodNonOptional:()=>Ao,ZodNull:()=>na,ZodNullable:()=>za,ZodNumber:()=>yt,ZodNumberFormat:()=>Ue,ZodObject:()=>cr,ZodOptional:()=>lr,ZodPipe:()=>fr,ZodPrefault:()=>Ia,ZodPreprocess:()=>Ca,ZodPromise:()=>Va,ZodReadonly:()=>Ta,ZodRecord:()=>gt,ZodSet:()=>$a,ZodString:()=>$t,ZodStringFormat:()=>T,ZodSuccess:()=>Pa,ZodSymbol:()=>ta,ZodTemplateLiteral:()=>Ea,ZodTransform:()=>ba,ZodTuple:()=>ma,ZodType:()=>Z,ZodULID:()=>mo,ZodURL:()=>ir,ZodUUID:()=>pe,ZodUndefined:()=>ra,ZodUnion:()=>ar,ZodUnknown:()=>sa,ZodVoid:()=>ca,ZodXID:()=>ho,ZodXor:()=>la,_ZodString:()=>so,_default:()=>xa,_function:()=>Ad,any:()=>ud,array:()=>ur,base64:()=>Fp,base64url:()=>Mp,bigint:()=>rd,boolean:()=>ea,catch:()=>Oa,check:()=>Od,cidrv4:()=>Vp,cidrv6:()=>jp,codec:()=>Id,creditCard:()=>Bp,cuid:()=>Op,cuid2:()=>Np,currencyCode:()=>Xp,custom:()=>Nd,date:()=>ad,describe:()=>Cd,discriminatedUnion:()=>hd,e164:()=>Up,email:()=>bp,emoji:()=>Pp,enum:()=>Zo,exactOptional:()=>va,file:()=>vd,float32:()=>Hp,float64:()=>Qp,function:()=>Ad,guid:()=>vp,hash:()=>Yp,hex:()=>qp,hostname:()=>Gp,httpUrl:()=>Sp,iban:()=>Jp,instanceof:()=>Dd,int:()=>oo,int32:()=>ed,int64:()=>nd,intersection:()=>da,invertCodec:()=>Zd,ipv4:()=>Ep,ipv6:()=>Rp,json:()=>Ld,jwt:()=>Kp,keyof:()=>ld,ksuid:()=>Dp,lazy:()=>Ra,literal:()=>bd,looseObject:()=>dd,looseRecord:()=>_d,mac:()=>Lp,map:()=>$d,meta:()=>Td,nan:()=>xd,nanoid:()=>Ap,nativeEnum:()=>wd,never:()=>Io,nonoptional:()=>Sa,null:()=>oa,nullable:()=>or,nullish:()=>zd,number:()=>Qc,object:()=>fd,optional:()=>je,partialRecord:()=>gd,pipe:()=>io,prefault:()=>Za,preprocess:()=>Rd,promise:()=>Pd,readonly:()=>Da,record:()=>ga,refine:()=>Fa,set:()=>yd,strictObject:()=>pd,string:()=>nr,stringFormat:()=>Wp,stringbool:()=>Ed,success:()=>kd,superRefine:()=>Ma,symbol:()=>id,templateLiteral:()=>Sd,transform:()=>So,tuple:()=>ha,uint32:()=>td,uint64:()=>od,ulid:()=>Cp,undefined:()=>sd,union:()=>vt,unknown:()=>Ve,url:()=>Zp,uuid:()=>zp,uuidv4:()=>kp,uuidv6:()=>xp,uuidv7:()=>Ip,void:()=>cd,xid:()=>Tp,xor:()=>md});var ro={};ge(ro,{endsWith:()=>it,gt:()=>le,gte:()=>ne,includes:()=>nt,length:()=>Le,lowercase:()=>tt,lt:()=>ae,lte:()=>re,maxLength:()=>Ee,maxSize:()=>be,mime:()=>ut,minLength:()=>me,minSize:()=>fe,multipleOf:()=>we,negative:()=>Wn,nonnegative:()=>qn,nonpositive:()=>Gn,normalize:()=>ct,overwrite:()=>ce,positive:()=>Kn,properties:()=>st,property:()=>Xn,regex:()=>et,size:()=>De,slugify:()=>pt,startsWith:()=>ot,toLowerCase:()=>lt,toUpperCase:()=>ft,trim:()=>at,uppercase:()=>rt});var yp=new WeakSet([Object.prototype,Error.prototype]);function no(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var wp=(e,t)=>{Lo.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);yp.has(r)||(yp.add(r),no(r,"format",n=>o=>At(n,o)),no(r,"flatten",n=>o=>Pt(n,o)),no(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,It,2)}),no(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,It,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Pg=p("ZodError",wp),Q=p("ZodError",wp,void 0,{Parent:Error});var Rc=Ke(Q),Vc=We(Q),jc=Ge(Q),Fc=qe(Q),Mc=Tr(Q),Uc=Dr(Q),Bc=Er(Q),Jc=Lr(Q),Kc=Rr(Q),Wc=Vr(Q),Gc=jr(Q),qc=Fr(Q);function Og(){Y.localeError||V(Ar())}function Fe(){Y.memoizer||V({memoizer:Gt()})}var Z=p("ZodType",(e,t)=>(Og(),k.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(w.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return R(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Fa(e,t))},superRefine(e,t){return this.check(Ma(e,t))},overwrite(e){return this.check(ce(e))},optional(){return je(this)},exactOptional(){return va(this)},nullable(){return or(this)},nullish(){return je(or(this))},nonoptional(e){return Sa(this,e)},array(){return ur(this)},or(e){return vt([this,e])},and(e){return da(this,e)},transform(e){return io(this,So(e))},default(e){return xa(this,e)},prefault(e){return Za(this,e)},catch(e){return Oa(this,e)},pipe(e){return io(this,e)},readonly(){return Da(this)},describe(e){let t=this.clone();return M.add(t,{description:e}),t},meta(...e){if(e.length===0)return M.get(this);let t=this.clone();return M.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return w.hide(this,"~standard",{...Hr(this),jsonSchema:{input:dt(this,"input"),output:dt(this,"output")}})},set"~standard"(e){w.own(this,"~standard",e)},parse:function e(t,r){return Rc(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Vc(this,t,r,{callee:e})},safeParse(e,t){return jc(this,e,t)},async safeParseAsync(e,t){return Fc(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){w.own(this,"spa",e)},validate(e,t){return Ot(this,e,t)},validateAsync(e,t){return Nt(this,e,t)},encode:function e(t,r){return Mc(this,t,r,{callee:e})},decode:function e(t,r){return Uc(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await Bc(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await Jc(this,t,r,{callee:e})},safeEncode(e,t){return Kc(this,e,t)},safeDecode(e,t){return Wc(this,e,t)},async safeEncodeAsync(e,t){return Gc(this,e,t)},async safeDecodeAsync(e,t){return qc(this,e,t)},toJSONSchema(e){return Yu(this,{})(e)},get description(){return M.get(this)?.description},get _def(){return this._zod.def}}),so=p("_ZodString",(e,t)=>{Oe.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ec(e,r,n,o)},w.derived({format:e=>F(e).format??null,minLength:e=>F(e).minimum??null,maxLength:e=>F(e).maximum??null},{regex(...e){return this.check(et(...e))},includes(...e){return this.check(nt(...e))},startsWith(...e){return this.check(ot(...e))},endsWith(...e){return this.check(it(...e))},min(...e){return this.check(me(...e))},max(...e){return this.check(Ee(...e))},length(...e){return this.check(Le(...e))},nonempty(...e){return this.check(me(1,...e))},lowercase(e){return this.check(tt(e))},uppercase(e){return this.check(rt(e))},trim(){return this.check(at())},normalize(...e){return this.check(ct(...e))},toLowerCase(){return this.check(lt())},toUpperCase(){return this.check(ft())},slugify(){return this.check(pt())}})),$t=p("ZodString",(e,t)=>{Oe.init(e,t),so.init(e,t)},{email(e){return this.check(xn(uo,e))},url(e){return this.check(Xt(ir,e))},jwt(e){return this.check(Jn(ko,e))},emoji(e){return this.check(On(ao,e))},guid(e){return this.check(In(co,e))},uuid(e){return this.check(Zn(pe,e))},uuidv4(e){return this.check(Sn(pe,e))},uuidv6(e){return this.check(Pn(pe,e))},uuidv7(e){return this.check(An(pe,e))},nanoid(e){return this.check(Nn(lo,e))},cuid(e){return this.check(Cn(fo,e))},cuid2(e){return this.check(Tn(po,e))},ulid(e){return this.check(Dn(mo,e))},base64(e){return this.check(Mn(bo,e))},base64url(e){return this.check(Un(vo,e))},xid(e){return this.check(En(ho,e))},ksuid(e){return this.check(Ln(go,e))},ipv4(e){return this.check(Rn(_o,e))},ipv6(e){return this.check(Vn($o,e))},cidrv4(e){return this.check(jn(yo,e))},cidrv6(e){return this.check(Fn(wo,e))},e164(e){return this.check(Bn(zo,e))},datetime(e){return this.check(Yt(xe,e))},date(e){return this.check(Ht(Ie,e))},time(e){return this.check(Qt(Ze,e))},duration(e){return this.check(er(Se,e))}});function nr(e){return du($t,e)}var T=p("ZodStringFormat",(e,t)=>{N.init(e,t),so.init(e,t)}),xe=p("ZodISODateTime",(e,t)=>{ns.init(e,t),T.init(e,t)}),Ie=p("ZodISODate",(e,t)=>{os.init(e,t),T.init(e,t)}),Ze=p("ZodISOTime",(e,t)=>{is.init(e,t),T.init(e,t)}),Se=p("ZodISODuration",(e,t)=>{ss.init(e,t),T.init(e,t)}),uo=p("ZodEmail",(e,t)=>{Ki.init(e,t),T.init(e,t)});function bp(e){return xn(uo,e)}var co=p("ZodGUID",(e,t)=>{Bi.init(e,t),T.init(e,t)});function vp(e){return In(co,e)}var pe=p("ZodUUID",(e,t)=>{Ji.init(e,t),T.init(e,t)});function zp(e){return Zn(pe,e)}function kp(e){return Sn(pe,e)}function xp(e){return Pn(pe,e)}function Ip(e){return An(pe,e)}var ir=p("ZodURL",(e,t)=>{qi.init(e,t),T.init(e,t)});function Zp(e){return Xt(ir,e)}function Sp(e){return Xt(ir,{protocol:Ct,hostname:si,...w.normalizeParams(e)})}var ao=p("ZodEmoji",(e,t)=>{Xi.init(e,t),T.init(e,t)});function Pp(e){return On(ao,e)}var lo=p("ZodNanoID",(e,t)=>{Yi.init(e,t),T.init(e,t)});function Ap(e){return Nn(lo,e)}var fo=p("ZodCUID",(e,t)=>{Hi.init(e,t),T.init(e,t)});function Op(e){return Cn(fo,e)}var po=p("ZodCUID2",(e,t)=>{Qi.init(e,t),T.init(e,t)});function Np(e){return Tn(po,e)}var mo=p("ZodULID",(e,t)=>{es.init(e,t),T.init(e,t)});function Cp(e){return Dn(mo,e)}var ho=p("ZodXID",(e,t)=>{ts.init(e,t),T.init(e,t)});function Tp(e){return En(ho,e)}var go=p("ZodKSUID",(e,t)=>{rs.init(e,t),T.init(e,t)});function Dp(e){return Ln(go,e)}var _o=p("ZodIPv4",(e,t)=>{us.init(e,t),T.init(e,t)});function Ep(e){return Rn(_o,e)}var Xc=p("ZodMAC",(e,t)=>{as.init(e,t),T.init(e,t)});function Lp(e){return hu(Xc,e)}var $o=p("ZodIPv6",(e,t)=>{cs.init(e,t),T.init(e,t)});function Rp(e){return Vn($o,e)}var yo=p("ZodCIDRv4",(e,t)=>{ls.init(e,t),T.init(e,t)});function Vp(e){return jn(yo,e)}var wo=p("ZodCIDRv6",(e,t)=>{fs.init(e,t),T.init(e,t)});function jp(e){return Fn(wo,e)}var bo=p("ZodBase64",(e,t)=>{ps.init(e,t),T.init(e,t)});function Fp(e){return Mn(bo,e)}var vo=p("ZodBase64URL",(e,t)=>{ds.init(e,t),T.init(e,t)});function Mp(e){return Un(vo,e)}var zo=p("ZodE164",(e,t)=>{ms.init(e,t),T.init(e,t)});function Up(e){return Bn(zo,e)}var Yc=p("ZodCreditCard",(e,t)=>{hs.init(e,t),T.init(e,t)});function Bp(e){return gu(Yc,e)}var Hc=p("ZodIBAN",(e,t)=>{gs.init(e,t),T.init(e,t)});function Jp(e){return _u(Hc,e)}var ko=p("ZodJWT",(e,t)=>{_s.init(e,t),T.init(e,t)});function Kp(e){return Jn(ko,e)}var Me=p("ZodCustomStringFormat",(e,t)=>{$s.init(e,t),T.init(e,t)});function Wp(e,t,r={}){return Re(Me,e,t,r)}function Gp(e){return Re(Me,"hostname",ii,e)}function qp(e){return Re(Me,"hex",wi,e)}function Xp(e){return Re(Me,"currency_code",ci,e)}function Yp(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=ie[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Re(Me,n,o,t)}var yt=p("ZodNumber",(e,t)=>{an.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>tc(e,r,n,o),e.isFinite=!0},w.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=F(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=F(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=F(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>F(e).format??null},{gt(e,t){return this.check(le(e,t))},gte(e,t){return this.check(ne(e,t))},min(e,t){return this.check(ne(e,t))},lt(e,t){return this.check(ae(e,t))},lte(e,t){return this.check(re(e,t))},max(e,t){return this.check(re(e,t))},int(e){return this.check(oo(e))},safe(e){return this.check(oo(e))},positive(e){return this.check(le(0,e))},nonnegative(e){return this.check(ne(0,e))},negative(e){return this.check(ae(0,e))},nonpositive(e){return this.check(re(0,e))},multipleOf(e,t){return this.check(we(e,t))},step(e,t){return this.check(we(e,t))},finite(){return this}}));function Qc(e){return yu(yt,e)}var Ue=p("ZodNumberFormat",(e,t)=>{ys.init(e,t),yt.init(e,t)});function oo(e){return bu(Ue,e)}function Hp(e){return vu(Ue,e)}function Qp(e){return zu(Ue,e)}function ed(e){return ku(Ue,e)}function td(e){return xu(Ue,e)}var wt=p("ZodBoolean",(e,t)=>{Mt.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>rc(e,r,n,o)});function ea(e){return Iu(wt,e)}var bt=p("ZodBigInt",(e,t)=>{ln.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>nc(e,r,n,o)},w.derived({minValue:e=>F(e).minimum??null,maxValue:e=>F(e).maximum??null,format:e=>F(e).format??null},{gte(e,t){return this.check(ne(e,t))},min(e,t){return this.check(ne(e,t))},gt(e,t){return this.check(le(e,t))},lt(e,t){return this.check(ae(e,t))},lte(e,t){return this.check(re(e,t))},max(e,t){return this.check(re(e,t))},positive(e){return this.check(le(BigInt(0),e))},negative(e){return this.check(ae(BigInt(0),e))},nonpositive(e){return this.check(re(BigInt(0),e))},nonnegative(e){return this.check(ne(BigInt(0),e))},multipleOf(e,t){return this.check(we(e,t))}}));function rd(e){return Su(bt,e)}var xo=p("ZodBigIntFormat",(e,t)=>{ws.init(e,t),bt.init(e,t)});function nd(e){return Au(xo,e)}function od(e){return Ou(xo,e)}var ta=p("ZodSymbol",(e,t)=>{bs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>oc(e,r,n,o)});function id(e){return Nu(ta,e)}var ra=p("ZodUndefined",(e,t)=>{vs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sc(e,r,n,o)});function sd(e){return Cu(ra,e)}var na=p("ZodNull",(e,t)=>{zs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ic(e,r,n,o)});function oa(e){return Tu(na,e)}var ia=p("ZodAny",(e,t)=>{ks.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ac(e,r,n,o)});function ud(){return Du(ia)}var sa=p("ZodUnknown",(e,t)=>{xs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>lc(e,r,n,o)});function Ve(){return Eu(sa)}var ua=p("ZodNever",(e,t)=>{Is.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>cc(e,r,n,o)});function Io(e){return Lu(ua,e)}var ca=p("ZodVoid",(e,t)=>{Zs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>uc(e,r,n,o)});function cd(e){return Ru(ca,e)}var sr=p("ZodDate",(e,t)=>{Ss.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fc(e,r,n,o),e.min=(r,n)=>e.check(ne(r,n)),e.max=(r,n)=>e.check(re(r,n))},w.derived({minDate:e=>{let{minimum:t}=F(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=F(e);return t?new Date(t):null}},{}));function ad(e){return Vu(sr,e)}var aa=p("ZodArray",(e,t)=>{Fe(),As.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zc(e,r,n,o),e.element=t.element},{min(e,t){return this.check(me(e,t))},nonempty(e){return this.check(me(1,e))},max(e,t){return this.check(Ee(e,t))},length(e,t){return this.check(Le(e,t))},unwrap(){return this.element}});function ur(e,t){return Mu(aa,e,t)}function ld(e){let t=e._zod.def.shape;return Zo(Object.keys(t))}var cr=p("ZodObject",(e,t)=>{Fe(),Os.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kc(e,r,n,o),w.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return Zo(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(w.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Ve()}))},loose(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Ve()}))},strict(){return this.clone(w.mergeDefs(this._zod.def,{catchall:Io()}))},strip(){return this.clone(w.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return w.extend(this,e)},safeExtend(e){return w.safeExtend(this,e)},merge(e){return w.merge(this,e)},pick(e){return w.pick(this,e)},omit(e){return w.omit(this,e)},partial(...e){return w.partial(lr,this,e[0])},exactPartial(...e){return w.partial(Po,this,e[0],"exactPartial")},required(...e){return w.required(Ao,this,e[0])}});function fd(e,t){let r={type:"object",shape:e??{},...w.normalizeParams(t)};return new cr(r)}function pd(e,t){return new cr({type:"object",shape:e,catchall:Io(),...w.normalizeParams(t)})}function dd(e,t){return new cr({type:"object",shape:e,catchall:Ve(),...w.normalizeParams(t)})}var ar=p("ZodUnion",(e,t)=>{Ut.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hn(e,r,n,o),e.options=t.options});function vt(e,t){return new ar({type:"union",options:e,...w.normalizeParams(t)})}var la=p("ZodXor",(e,t)=>{ar.init(e,t),Ns.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hn(e,r,n,o),e.options=t.options});function md(e,t){return new la({type:"union",options:e,inclusive:!1,...w.normalizeParams(t)})}var fa=p("ZodDiscriminatedUnion",(e,t)=>{ar.init(e,t),Ts.init(e,t)});function hd(e,t,r){return new fa({type:"union",options:t,discriminator:e,...w.normalizeParams(r)})}var pa=p("ZodIntersection",(e,t)=>{Ds.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xc(e,r,n,o)});function da(e,t){return new pa({type:"intersection",left:e,right:t})}var ma=p("ZodTuple",(e,t)=>{Fe(),fn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ic(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new lr({type:"optional",innerType:t}))})}});function ha(e,t,r){let n=t instanceof k,o=n?r:t,i=n?t:null;return new ma({type:"tuple",items:e,rest:i,...w.normalizeParams(o)})}var gt=p("ZodRecord",(e,t)=>{Fe(),Es.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zc(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function ga(e,t,r){return!t||!t._zod?new gt({type:"record",keyType:nr(),valueType:e,...w.normalizeParams(t)}):new gt({type:"record",keyType:e,valueType:t,...w.normalizeParams(r)})}function gd(e,t,r){return new gt({type:"record",keyType:e,valueType:t,...w.normalizeParams(r),partial:!0})}function _d(e,t,r){return new gt({type:"record",keyType:e,valueType:t,mode:"loose",...w.normalizeParams(r)})}var _a=p("ZodMap",(e,t)=>{Fe(),Ls.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bc(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(fe(...r)),e.nonempty=r=>e.check(fe(1,r)),e.max=(...r)=>e.check(be(...r)),e.size=(...r)=>e.check(De(...r))});function $d(e,t,r){return new _a({type:"map",keyType:e,valueType:t,...w.normalizeParams(r)})}var $a=p("ZodSet",(e,t)=>{Fe(),Rs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vc(e,r,n,o),e.min=(...r)=>e.check(fe(...r)),e.nonempty=r=>e.check(fe(1,r)),e.max=(...r)=>e.check(be(...r)),e.size=(...r)=>e.check(De(...r))});function yd(e,t){return new $a({type:"set",valueType:e,...w.normalizeParams(t)})}var _t=p("ZodEnum",(e,t)=>{Vs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(n,o,i)=>pc(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...w.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new _t({...t,checks:[],...w.normalizeParams(o),entries:i})}});function Zo(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new _t({type:"enum",entries:r,...w.normalizeParams(t)})}function wd(e,t){return new _t({type:"enum",entries:e,...w.normalizeParams(t)})}var ya=p("ZodLiteral",(e,t)=>{js.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dc(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function bd(e,t){return new ya({type:"literal",values:Array.isArray(e)?e:[e],...w.normalizeParams(t)})}var wa=p("ZodFile",(e,t)=>{Fs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gc(e,r,n,o),e.min=(r,n)=>e.check(fe(r,n)),e.max=(r,n)=>e.check(be(r,n)),e.mime=(r,n)=>e.check(ut(Array.isArray(r)?r:[r],n))});function vd(e){return Uu(wa,e)}var ba=p("ZodTransform",(e,t)=>{Fe(),Ms.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wc(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Je(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(w.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(w.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function So(e){return new ba({type:"transform",transform:e})}var lr=p("ZodOptional",(e,t)=>{pn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function je(e){return new lr({type:"optional",innerType:e})}var Po=p("ZodExactOptional",(e,t)=>{Us.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qn(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function va(e){return new Po({type:"optional",innerType:e})}var za=p("ZodNullable",(e,t)=>{Bs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function or(e){return new za({type:"nullable",innerType:e})}function zd(e){return je(or(e))}var ka=p("ZodDefault",(e,t)=>{Js.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Oc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xa(e,t){return new ka({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var Ia=p("ZodPrefault",(e,t)=>{Ks.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Nc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Za(e,t){return new Ia({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():w.shallowClone(t)}})}var Ao=p("ZodNonOptional",(e,t)=>{Ws.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Sa(e,t){return new Ao({type:"nonoptional",innerType:e,...w.normalizeParams(t)})}var Pa=p("ZodSuccess",(e,t)=>{Gs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_c(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function kd(e){return new Pa({type:"success",innerType:e})}var Aa=p("ZodCatch",(e,t)=>{qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Oa(e,t){return new Aa({type:"catch",innerType:e,catchValue:typeof t=="function"?t:w.constantCatch(t)})}var Na=p("ZodNaN",(e,t)=>{Xs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mc(e,r,n,o)});function xd(e){return Fu(Na,e)}var fr=p("ZodPipe",(e,t)=>{dn.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tc(e,r,n,o),e.in=t.in,e.out=t.out});function io(e,t){return new fr({type:"pipe",in:e,out:t})}var pr=p("ZodCodec",(e,t)=>{fr.init(e,t),Bt.init(e,t)});function Id(e,t,r){return new pr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Zd(e){let t=e._zod.def;return new pr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Ca=p("ZodPreprocess",(e,t)=>{fr.init(e,t),Ys.init(e,t)}),Ta=p("ZodReadonly",(e,t)=>{Hs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Da(e){return new Ta({type:"readonly",innerType:e})}var Ea=p("ZodTemplateLiteral",(e,t)=>{Qs.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hc(e,r,n,o)});function Sd(e,t){return new Ea({type:"template_literal",parts:e,...w.normalizeParams(t)})}var La=p("ZodLazy",(e,t)=>{Jt.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lc(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function Ra(e){return new La({type:"lazy",getter:e})}var Va=p("ZodPromise",(e,t)=>{tu.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ec(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Pd(e){return new Va({type:"promise",innerType:e})}var ja=p("ZodFunction",(e,t)=>{eu.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yc(e,r,n,o)});function Ad(e){return new ja({type:"function",input:Array.isArray(e?.input)?ha(e?.input):e?.input??ur(Ve()),output:e?.output??Ve()})}var dr=p("ZodCustom",(e,t)=>{ru.init(e,t),Z.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$c(e,r,n,o)});function Od(e){let t=new D({check:"custom"});return t._zod.check=e,t}function Nd(e,t){return Bu(dr,e??(()=>!0),t)}function Fa(e,t={}){return Ju(dr,e,t)}function Ma(e,t){return Ku(e,t)}var Cd=Wu,Td=Gu,Ua=p("ZodInstanceOf",(e,t)=>{dr.init(e,t)},{properties(e,t){return this.check(st(e,t))}});function Dd(e,t={}){let r=new Ua({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...w.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Ed=(...e)=>qu({Codec:pr,Boolean:wt,String:$t},...e);function Ld(e){let t=Ra(()=>vt([nr(e),Qc(),ea(),oa(),ur(t),ga(nr(),t)]));return t}function Rd(e,t){return new Ca({type:"pipe",in:So(e),out:t})}var Ng={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Cg(e){V({customError:e})}function Tg(){return V().customError}var Ba;Ba||(Ba={});var mr={};ge(mr,{ZodISODate:()=>Ie,ZodISODateTime:()=>xe,ZodISODuration:()=>Se,ZodISOTime:()=>Ze,date:()=>Eg,datetime:()=>Dg,duration:()=>Rg,time:()=>Lg});function Dg(e){return Yt(xe,e)}function Eg(e){return Ht(Ie,e)}function Lg(e){return Qt(Ze,e)}function Rg(e){return er(Se,e)}var $={...zt,...ro,iso:mr},Vg=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function jg(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Vd(e,t){return e.map((r,n)=>n<t?r:r.optional())}function Fg(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Mg(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:Fg(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function Ug(e,t){return $.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let s of i){let u=t.keySchema.safeParse(s);u.success||n.issues.push({code:"invalid_key",origin:"record",issues:u.error.issues,input:s,path:[s],continue:!0})}}).pipe(e)}function Ja(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let s of e){let u=Ja(s,t);if(u===null)return null;i.push(u)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let s=Ja(e[i],t);if(s===null)return null;o.push(`${i.length}:${i}=${s}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var Bg=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Jg=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function hr(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(hr):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>Bg.has(t)?hr(r):!Jg.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(hr))}function jd(e){return e===1?"element":"elements"}function Kg(e,t){return $.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let s=0;s<o.length;s++){let u=Ja(o[s],new Set);if(u===null)continue;let c=i.get(u);if(c===void 0){i.set(u,s);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${s} duplicates the one at index ${c}`,input:o,path:[s],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,s=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,u=0;for(let c of o)if(t.containsSchema.safeParse(c).success&&++u>=s)break;u<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${jd(i)}; found ${u}`,input:o,continue:!0}),t.maxContains!==void 0&&u>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${jd(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function Fd(e,t){if(e!==!1)return e===void 0||e===!0?$.any():W(e,t)}var Wg=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Md(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return $.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return $.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=Mg(o,t),s=W(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return $.null();if(o.length===0)return $.never();if(o.length===1)return $.literal(o[0]);if(o.every(s=>typeof s=="string"))return $.enum(o);let i=o.map(s=>$.literal(s));return i.length<2?i[0]:$.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let s={...e,type:i};return Md(s,t)});return o.length===0?$.never():o.length===1?o[0]:$.union(o)}if(!r)return $.any();let n;switch(r){case"string":{let o=$.string();if(e.format){let i=e.format;i==="email"?o=o.check($.email()):i==="uri"||i==="uri-reference"?o=o.check($.url()):i==="uuid"||i==="guid"?o=o.check($.uuid()):i==="date-time"?o=o.check($.iso.datetime({offset:!0})):i==="date"?o=o.check($.iso.date()):i==="time"?o=o.check($.regex(Wg)):i==="duration"?o=o.check($.iso.duration()):i==="hostname"?o=o.check($.hostname()):i==="ipv4"?o=o.check($.ipv4()):i==="ipv6"?o=o.check($.ipv6()):i==="mac"?o=o.check($.mac()):i==="cidr"?o=o.check($.cidrv4()):i==="cidr-v6"?o=o.check($.cidrv6()):i==="base64"?o=o.check($.base64()):i==="base64url"?o=o.check($.base64url()):i==="e164"?o=o.check($.e164()):i==="credit_card"?o=o.check($.creditCard()):i==="iban"?o=o.check($.iban()):i==="jwt"?o=o.check($.jwt()):i==="emoji"?o=o.check($.emoji()):i==="nanoid"?o=o.check($.nanoid()):i==="cuid"?o=o.check($.cuid()):i==="cuid2"?o=o.check($.cuid2()):i==="ulid"?o=o.check($.ulid()):i==="xid"?o=o.check($.xid()):i==="ksuid"&&(o=o.check($.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?$.number().int():$.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=$.boolean();break}case"null":{n=$.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]),u=typeof e.additionalProperties=="object"?W(e.additionalProperties,t):void 0;for(let[f,m]of Object.entries(i)){let d=W(m,t);G(o,f,s.has(f)?d:d.optional())}if(e.patternProperties){let f=e.patternProperties,m=Object.keys(f),d=[];for(let g of m){let y=W(f[g],t),x=$.string().regex(new RegExp(g));d.push($.looseRecord(x,y))}let h=[];if(Object.keys(o).length>0&&h.push($.object(o).passthrough()),h.push(...d),h.length===0)n=$.object({}).passthrough();else if(h.length===1)n=h[0];else{let g=$.intersection(h[0],h[1]);for(let y=2;y<h.length;y++)g=$.intersection(g,h[y]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),y=m.map(b=>new RegExp(b)),x=n;n=n.check(b=>{if(!$e(b.value))return;let I=[];for(let O of Object.keys(b.value))g.includes(O)||y.some(E=>E.test(O))||I.push(O);I.length&&b.issues.push({code:"unrecognized_keys",keys:I,input:b.value,inst:x})})}}else{let f=$.object(o);e.additionalProperties===!1?n=f.strict():u?n=f.catchall(u):n=f.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,a=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||a!==void 0||l!==void 0){let f;if(c){let m=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;f=W(m,t)}n=Ug(n,{keySchema:f,minProperties:a,maxProperties:l})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=typeof e.minItems=="number"?e.minItems:0,u=o.map(f=>W(f,t)),c=Vd(u,s),a=Array.isArray(i)?void 0:Fd(i,t),l=$.tuple(c);n=a?l.rest(a):l,typeof e.minItems=="number"&&(n=n.check($.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=typeof e.minItems=="number"?e.minItems:0,u=i.map(f=>W(f,t)),c=Vd(u,s),a=Fd(e.additionalItems,t),l=$.tuple(c);n=a?l.rest(a):l,typeof e.minItems=="number"&&(n=n.check($.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check($.maxLength(e.maxItems)))}else if(i!==void 0){let s=W(i,t),u=$.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),n=u}else n=$.array($.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Kg(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?W(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function W(e,t){if(typeof e=="boolean")return e?$.any():$.never();let r=Md(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(a=>W(a,t)),c=$.union(u);r=n?$.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(a=>W(a,t)),c=$.xor(u);r=n?$.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:$.any();else{let u=n?r:W(e.allOf[0],t),c=n?0:1;for(let a=c;a<e.allOf.length;a++)u=$.intersection(u,W(e.allOf[a],t));r=u}e.nullable===!0&&t.version==="openapi-3.0"&&(r=$.nullable(r)),e.readOnly===!0&&(r=$.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!hr(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let u of["minProperties","maxProperties"])e[u]!==void 0&&(o[u]=e[u])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!hr(e.contains)&&(o.contains=e.contains);for(let u of["uniqueItems","minContains","maxContains"])e[u]!==void 0&&(o[u]=e[u])}for(let u of Object.keys(e))Vg.has(u)||G(o,u,e[u]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function Ud(e,t){if(typeof e=="boolean")return e?$.any():$.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=jg(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??M};return W(r,i)}var Bd=Symbol("z.visit/resolving");function gr(e,t){let r=typeof t=="function"?t:(s,u)=>{let c=t[s._zod.def.type];return c?c(s,u):s},n=new Map;function o(s){let u=n.get(s);if(u===Bd)return new Jt({type:"lazy",getter:()=>n.get(s)});if(u!==void 0)return u;n.set(s,Bd);let c=i(s),a=r(c,c!==s);return n.set(s,a),a}function i(s){let u=s._zod.def,c=u.type;switch(c){case"object":{let a=u.shape,l=Object.keys(a),f=!1,m={};for(let h of l){let g=o(a[h]);g!==a[h]&&(f=!0),m[h]=g}let d=u.catchall;return u.catchall&&(d=o(u.catchall),d!==u.catchall&&(f=!0)),f?R(s,{...u,shape:m,catchall:d}):s}case"array":{let a=o(u.element);return a===u.element?s:R(s,{...u,element:a})}case"tuple":{let a=u.items,l=!1,f=[];for(let d of a){let h=o(d);h!==d&&(l=!0),f.push(h)}let m=u.rest;return u.rest&&(m=o(u.rest),m!==u.rest&&(l=!0)),l?R(s,{...u,items:f,rest:m}):s}case"record":case"map":{let a=o(u.keyType),l=o(u.valueType);return a===u.keyType&&l===u.valueType?s:R(s,{...u,keyType:a,valueType:l})}case"set":{let a=o(u.valueType);return a===u.valueType?s:R(s,{...u,valueType:a})}case"union":{let a=u.options,l=!1,f=[];for(let m of a){let d=o(m);d!==m&&(l=!0),f.push(d)}return l?R(s,{...u,options:f}):s}case"intersection":{let a=o(u.left),l=o(u.right);return a===u.left&&l===u.right?s:R(s,{...u,left:a,right:l})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let a=o(u.innerType);return a===u.innerType?s:R(s,{...u,innerType:a})}case"pipe":{let a=o(u.in),l=o(u.out);return a===u.in&&l===u.out?s:R(s,{...u,in:a,out:l})}case"function":{let a=o(u.input),l=o(u.output);return a===u.input&&l===u.output?s:R(s,{...u,input:a,output:l})}case"lazy":{let a=u.getter,{_cachedInner:l,...f}=u;return R(s,{...f,getter:()=>o(a())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return s;default:return s}}return o(e)}function Jd(e){return gr(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:vt(r.options)}})}function Gg(e,t){if(!t?.length)return e;let r=e._zod.def;return R(e,Xa(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function Kd(e){return Gg(e.out,e.checks)}function qg(e){return e.in._zod.traits.has("$ZodTransform")?Kd(e):e.in}function Wd(e){return gr(e,{pipe:t=>qg(t._zod.def),default:(t,r)=>r?je(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function Gd(e){return gr(e,{pipe:t=>Kd(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var Ka={};ge(Ka,{bigint:()=>Qg,boolean:()=>Hg,date:()=>e_,number:()=>Yg,string:()=>Xg});function Xg(e){return mu($t,e)}function Yg(e){return wu(yt,e)}function Hg(e){return Zu(wt,e)}function Qg(e){return Pu(bt,e)}function e_(e){return ju(sr,e)}export{Pt as a,At as b,Ro as c,Vo as d,Ot as e,Nt as f,ie as g,Cs as h,Gt as i,qt as j,iu as k,su as l,bn as m,M as n,J as o,ue as p,P as q,lu as r,vn as s,$u as t,ae as u,re as v,le as w,ne as x,Kn as y,Wn as z,Gn as A,qn as B,we as C,be as D,fe as E,De as F,Ee as G,me as H,Le as I,et as J,tt as K,rt as L,nt as M,ot as N,it as O,Xn as P,st as Q,ut as R,ce as S,ct as T,at as U,lt as V,ft as W,pt as X,eo as Y,he as Z,Pg as _,Q as $,Rc as aa,Vc as ba,jc as ca,Fc as da,Mc as ea,Uc as fa,Bc as ga,Jc as ha,Kc as ia,Wc as ja,Gc as ka,qc as la,Z as ma,so as na,$t as oa,nr as pa,T as qa,xe as ra,Ie as sa,Ze as ta,Se as ua,uo as va,bp as wa,co as xa,vp as ya,pe as za,zp as Aa,kp as Ba,xp as Ca,Ip as Da,ir as Ea,Zp as Fa,Sp as Ga,ao as Ha,Pp as Ia,lo as Ja,Ap as Ka,fo as La,Op as Ma,po as Na,Np as Oa,mo as Pa,Cp as Qa,ho as Ra,Tp as Sa,go as Ta,Dp as Ua,_o as Va,Ep as Wa,Xc as Xa,Lp as Ya,$o as Za,Rp as _a,yo as $a,Vp as ab,wo as bb,jp as cb,bo as db,Fp as eb,vo as fb,Mp as gb,zo as hb,Up as ib,Yc as jb,Bp as kb,Hc as lb,Jp as mb,ko as nb,Kp as ob,Me as pb,Wp as qb,Gp as rb,qp as sb,Xp as tb,Yp as ub,yt as vb,Qc as wb,Ue as xb,oo as yb,Hp as zb,Qp as Ab,ed as Bb,td as Cb,wt as Db,ea as Eb,bt as Fb,rd as Gb,xo as Hb,nd as Ib,od as Jb,ta as Kb,id as Lb,ra as Mb,sd as Nb,na as Ob,oa as Pb,ia as Qb,ud as Rb,sa as Sb,Ve as Tb,ua as Ub,Io as Vb,ca as Wb,cd as Xb,sr as Yb,ad as Zb,aa as _b,ur as $b,ld as ac,cr as bc,fd as cc,pd as dc,dd as ec,ar as fc,vt as gc,la as hc,md as ic,fa as jc,hd as kc,pa as lc,da as mc,ma as nc,ha as oc,gt as pc,ga as qc,gd as rc,_d as sc,_a as tc,$d as uc,$a as vc,yd as wc,_t as xc,Zo as yc,wd as zc,ya as Ac,bd as Bc,wa as Cc,vd as Dc,ba as Ec,So as Fc,lr as Gc,je as Hc,Po as Ic,va as Jc,za as Kc,or as Lc,zd as Mc,ka as Nc,xa as Oc,Ia as Pc,Za as Qc,Ao as Rc,Sa as Sc,Pa as Tc,kd as Uc,Aa as Vc,Oa as Wc,Na as Xc,xd as Yc,fr as Zc,io as _c,pr as $c,Id as ad,Zd as bd,Ca as cd,Ta as dd,Da as ed,Ea as fd,Sd as gd,La as hd,Ra as id,Va as jd,Pd as kd,ja as ld,Ad as md,dr as nd,Od as od,Nd as pd,Fa as qd,Ma as rd,Cd as sd,Td as td,Ua as ud,Dd as vd,Ed as wd,Ld as xd,Rd as yd,Ng as zd,Cg as Ad,Tg as Bd,Ba as Cd,mr as Dd,Ud as Ed,Jd as Fd,Wd as Gd,Gd as Hd,Ka as Id,t_ as Jd};