eve 0.84.0 → 0.85.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 (248) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/src/channel/channel-operations.d.ts +2 -18
  3. package/dist/src/channel/compiled-channel.d.ts +3 -7
  4. package/dist/src/channel/cross-channel-receive.d.ts +13 -11
  5. package/dist/src/channel/cross-channel-receive.js +1 -1
  6. package/dist/src/channel/delivery.js +1 -1
  7. package/dist/src/channel/schedule.js +1 -1
  8. package/dist/src/channel/session.d.ts +26 -4
  9. package/dist/src/channel/session.js +1 -1
  10. package/dist/src/channel/types.d.ts +2 -0
  11. package/dist/src/chunks/{use-eve-agent-BbbguIdB.js → use-eve-agent-B2jCfcnG.js} +29 -12
  12. package/dist/src/chunks/{use-eve-agent-DWjyzplb.js → use-eve-agent-DCLFi26P.js} +29 -12
  13. package/dist/src/cli/commands/init.js +1 -1
  14. package/dist/src/client/client.js +1 -1
  15. package/dist/src/client/delivery.d.ts +2 -0
  16. package/dist/src/client/delivery.js +1 -1
  17. package/dist/src/client/open-stream.js +1 -1
  18. package/dist/src/client/optimistic-message-submissions.js +1 -1
  19. package/dist/src/client/session-store.js +1 -1
  20. package/dist/src/client/session.js +1 -1
  21. package/dist/src/client/sessions.d.ts +1 -0
  22. package/dist/src/client/sessions.js +1 -1
  23. package/dist/src/client/types.d.ts +7 -4
  24. package/dist/src/compiled/.vendor-stamp.json +2 -2
  25. package/dist/src/compiled/@chat-adapter/slack/index.js +13 -13
  26. package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +75 -0
  27. package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +4 -0
  28. package/dist/src/compiled/@vercel/sandbox/command.d.ts +78 -0
  29. package/dist/src/compiled/@vercel/sandbox/drive.d.ts +41 -1
  30. package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
  31. package/dist/src/compiled/@vercel/sandbox/network-policy.d.ts +35 -4
  32. package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +18 -4
  33. package/dist/src/compiled/@vercel/sandbox/session.d.ts +29 -3
  34. package/dist/src/compiled/@vercel/sandbox/utils/pipe-stdin.d.ts +19 -0
  35. package/dist/src/compiled/_chunks/client/{core-CspsxXR-.js → core-BsvaaMUJ.js} +1 -1
  36. package/dist/src/compiled/_chunks/node/{auth-Dztlx9pE.js → auth-v5pS3mLo.js} +1 -1
  37. package/dist/src/compiled/_chunks/node/is-stream-DsuQX_bd.js +1 -0
  38. package/dist/src/compiled/_chunks/node/token-DHGH-jVc.js +1 -0
  39. package/dist/src/compiled/_chunks/node/token-util-BH2pw9Qm.js +25 -0
  40. package/dist/src/compiled/_chunks/node/token-util-CcvxNv76.js +1 -0
  41. package/dist/src/compiled/_chunks/node/version-C2PfNyEv.js +1 -0
  42. package/dist/src/compiled/zod/index.js +1 -1
  43. package/dist/src/compiled/zod/v4/core.js +1 -1
  44. package/dist/src/compiled/zod-validation-error/index.js +1 -1
  45. package/dist/src/compiler/artifacts.d.ts +1 -0
  46. package/dist/src/compiler/artifacts.js +1 -1
  47. package/dist/src/compiler/manifest.d.ts +2 -2
  48. package/dist/src/compiler/manifest.js +1 -1
  49. package/dist/src/compiler/model-catalog.d.ts +8 -18
  50. package/dist/src/compiler/model-catalog.js +1 -1
  51. package/dist/src/compiler/normalize-agent-config.js +1 -1
  52. package/dist/src/compiler/normalize-manifest-types.d.ts +3 -0
  53. package/dist/src/compiler/normalize-manifest.js +1 -1
  54. package/dist/src/context/keys.d.ts +7 -8
  55. package/dist/src/context/keys.js +1 -1
  56. package/dist/src/eve-channel/index.js +1 -1
  57. package/dist/src/eve-channel/request.d.ts +1 -0
  58. package/dist/src/eve-channel/request.js +1 -1
  59. package/dist/src/eve-channel/support.js +1 -1
  60. package/dist/src/execution/agent-sessions/context.d.ts +5 -1
  61. package/dist/src/execution/agent-sessions/context.js +1 -1
  62. package/dist/src/execution/agent-sessions/steps.js +1 -1
  63. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  64. package/dist/src/execution/legacy-session/snapshot.d.ts +1 -2
  65. package/dist/src/execution/legacy-session/snapshot.js +1 -1
  66. package/dist/src/execution/proxied-deliver-step.js +1 -1
  67. package/dist/src/execution/public-destination.d.ts +3 -0
  68. package/dist/src/execution/public-destination.js +1 -1
  69. package/dist/src/execution/publish-session-events.js +1 -1
  70. package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +2 -0
  71. package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
  72. package/dist/src/execution/sandbox/bindings/docker-connection.js +1 -1
  73. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  74. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  75. package/dist/src/execution/sandbox/multiplexed-command.d.ts +11 -1
  76. package/dist/src/execution/sandbox/multiplexed-command.js +1 -1
  77. package/dist/src/execution/sandbox/session.js +1 -1
  78. package/dist/src/execution/session/checkpoint-migrations.d.ts +16 -5
  79. package/dist/src/execution/session/checkpoint-migrations.js +1 -1
  80. package/dist/src/execution/session/checkpoint-refusal.d.ts +4 -0
  81. package/dist/src/execution/session/checkpoint-refusal.js +1 -0
  82. package/dist/src/execution/session/entry.js +1 -1
  83. package/dist/src/execution/session/handoff-steps.d.ts +7 -1
  84. package/dist/src/execution/session/handoff-steps.js +1 -1
  85. package/dist/src/execution/session/imported-conversation.d.ts +2 -0
  86. package/dist/src/execution/session/imported-conversation.js +1 -0
  87. package/dist/src/execution/session/interrupted-step.js +1 -1
  88. package/dist/src/execution/session/pre-v27-checkpoint.d.ts +36 -0
  89. package/dist/src/execution/session/pre-v27-checkpoint.js +1 -0
  90. package/dist/src/execution/session/program.d.ts +2 -0
  91. package/dist/src/execution/session/program.js +1 -1
  92. package/dist/src/execution/session/turn-step.js +1 -1
  93. package/dist/src/execution/session-callback-request.js +1 -1
  94. package/dist/src/execution/session-inbox/address.d.ts +1 -0
  95. package/dist/src/execution/session-inbox/handle.d.ts +7 -0
  96. package/dist/src/execution/session-inbox/handle.js +1 -0
  97. package/dist/src/execution/session-inbox/owner.d.ts +4 -4
  98. package/dist/src/execution/session-inbox/owner.js +1 -1
  99. package/dist/src/execution/session-inbox/resume.d.ts +1 -0
  100. package/dist/src/execution/session-inbox/resume.js +1 -1
  101. package/dist/src/execution/tool-auth.js +1 -1
  102. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  103. package/dist/src/execution/tools/channel-to.d.ts +12 -0
  104. package/dist/src/execution/tools/channel-to.js +1 -0
  105. package/dist/src/execution/tools/workflow/body.d.ts +3 -0
  106. package/dist/src/execution/tools/workflow/body.js +1 -1
  107. package/dist/src/execution/tools/workflow/step-context.d.ts +5 -0
  108. package/dist/src/execution/tools/workflow/step-execution.js +1 -1
  109. package/dist/src/execution/tools/workflow/step.js +1 -1
  110. package/dist/src/execution/workflow-callback-url.d.ts +2 -3
  111. package/dist/src/execution/workflow-callback-url.js +1 -1
  112. package/dist/src/execution/workflow-runtime.js +1 -1
  113. package/dist/src/harness/compaction/step.js +1 -1
  114. package/dist/src/harness/model-call/call.d.ts +3 -1
  115. package/dist/src/harness/model-call/call.js +1 -1
  116. package/dist/src/harness/model-call/run.js +1 -1
  117. package/dist/src/harness/semantic-errors/rules/gateway.js +1 -1
  118. package/dist/src/harness/session-machine/transitions.js +1 -1
  119. package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
  120. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  121. package/dist/src/internal/application/optional-package-install.js +1 -1
  122. package/dist/src/internal/application/stamped-package-version.js +1 -1
  123. package/dist/src/internal/attachments/limited-read.d.ts +2 -0
  124. package/dist/src/internal/attachments/limited-read.js +1 -1
  125. package/dist/src/internal/attachments/url-refs.js +1 -1
  126. package/dist/src/internal/capability-error.d.ts +3 -0
  127. package/dist/src/internal/capability-error.js +1 -0
  128. package/dist/src/internal/model-catalog.d.ts +39 -16
  129. package/dist/src/internal/model-catalog.js +1 -1
  130. package/dist/src/internal/nitro/host/dev-build-host.js +1 -1
  131. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  132. package/dist/src/protocol/delivery.d.ts +1 -0
  133. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
  134. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  135. package/dist/src/public/channels/github/githubChannel.js +1 -1
  136. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  137. package/dist/src/public/channels/linq/inboundContent.js +1 -1
  138. package/dist/src/public/channels/slack/answers.d.ts +2 -3
  139. package/dist/src/public/channels/slack/answers.js +1 -1
  140. package/dist/src/public/channels/slack/api.d.ts +23 -3
  141. package/dist/src/public/channels/slack/api.js +1 -1
  142. package/dist/src/public/channels/slack/app-manifest.d.ts +2 -0
  143. package/dist/src/public/channels/slack/app-manifest.js +1 -1
  144. package/dist/src/public/channels/slack/auth.d.ts +2 -1
  145. package/dist/src/public/channels/slack/auth.js +1 -1
  146. package/dist/src/public/channels/slack/code-channel.d.ts +42 -0
  147. package/dist/src/public/channels/slack/code-channel.js +1 -0
  148. package/dist/src/public/channels/slack/defaults.d.ts +7 -3
  149. package/dist/src/public/channels/slack/defaults.js +3 -3
  150. package/dist/src/public/channels/slack/hitl.d.ts +7 -17
  151. package/dist/src/public/channels/slack/hitl.js +1 -1
  152. package/dist/src/public/channels/slack/index.d.ts +4 -3
  153. package/dist/src/public/channels/slack/index.js +1 -1
  154. package/dist/src/public/channels/slack/interaction-cards.d.ts +0 -2
  155. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  156. package/dist/src/public/channels/slack/interactions.js +1 -1
  157. package/dist/src/public/channels/slack/open-code-channel.d.ts +30 -0
  158. package/dist/src/public/channels/slack/open-code-channel.js +1 -0
  159. package/dist/src/public/channels/slack/private-approval-delivery.d.ts +16 -4
  160. package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
  161. package/dist/src/public/channels/slack/renderers.d.ts +58 -6
  162. package/dist/src/public/channels/slack/renderers.js +1 -1
  163. package/dist/src/public/channels/slack/reply-delivery.d.ts +4 -0
  164. package/dist/src/public/channels/slack/reply-delivery.js +1 -1
  165. package/dist/src/public/channels/slack/request-card-render.d.ts +45 -0
  166. package/dist/src/public/channels/slack/request-card-render.js +1 -0
  167. package/dist/src/public/channels/slack/request-cards.d.ts +35 -0
  168. package/dist/src/public/channels/slack/request-cards.js +3 -0
  169. package/dist/src/public/channels/slack/sign-in-cancel.d.ts +3 -5
  170. package/dist/src/public/channels/slack/sign-in-cancel.js +1 -1
  171. package/dist/src/public/channels/slack/slackChannel.d.ts +109 -22
  172. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  173. package/dist/src/public/channels/slack/task-card.d.ts +3 -3
  174. package/dist/src/public/channels/slack/task-card.js +1 -1
  175. package/dist/src/public/channels/slack/thread-status.js +1 -1
  176. package/dist/src/public/channels/teams/api.js +1 -1
  177. package/dist/src/public/channels/teams/defaults.js +1 -1
  178. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  179. package/dist/src/public/channels/teams/verify.d.ts +9 -5
  180. package/dist/src/public/channels/teams/verify.js +1 -1
  181. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  182. package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
  183. package/dist/src/public/nuxt/module.js +1 -1
  184. package/dist/src/public/schedules/subscription.d.ts +10 -1
  185. package/dist/src/reactions/kinds/model.js +1 -1
  186. package/dist/src/reactions/kinds/subagent.js +1 -1
  187. package/dist/src/runtime/agent/resolve-model.d.ts +3 -4
  188. package/dist/src/runtime/agent/resolve-model.js +1 -1
  189. package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
  190. package/dist/src/runtime/loaders/artifact-paths.js +1 -1
  191. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +2 -0
  192. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  193. package/dist/src/runtime/loaders/model-metadata.d.ts +4 -0
  194. package/dist/src/runtime/loaders/model-metadata.js +1 -0
  195. package/dist/src/runtime/resolve-agent.js +1 -1
  196. package/dist/src/runtime/sessions/compiled-agent-cache.d.ts +3 -0
  197. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  198. package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +2 -2
  199. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  200. package/dist/src/runtime/subagents/workflow.js +1 -1
  201. package/dist/src/sandbox/provider.d.ts +2 -0
  202. package/dist/src/setup/flows/model-source-change.js +1 -1
  203. package/dist/src/setup/index.d.ts +1 -1
  204. package/dist/src/setup/primitives/index.d.ts +1 -1
  205. package/dist/src/setup/primitives/pm/run.d.ts +0 -2
  206. package/dist/src/setup/scaffold/create/project.js +1 -1
  207. package/dist/src/shared/agent-definition.d.ts +0 -1
  208. package/dist/src/shared/channel-definition.d.ts +4 -4
  209. package/dist/src/shared/sandbox-session.d.ts +4 -0
  210. package/dist/src/subagents/adapter.js +1 -1
  211. package/dist/src/subagents/parent-notification.js +1 -1
  212. package/dist/src/svelte/index.js +1 -1
  213. package/dist/src/svelte/use-eve-agent.js +1 -1
  214. package/dist/src/tools/definition.d.ts +21 -0
  215. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  216. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  217. package/dist/src/tools/workflow-definition.d.ts +4 -4
  218. package/dist/src/vue/index.js +1 -1
  219. package/dist/src/vue/use-eve-agent.js +1 -1
  220. package/docs/agent-config.md +5 -4
  221. package/docs/channels/custom.mdx +16 -3
  222. package/docs/channels/eve.mdx +2 -0
  223. package/docs/channels/linq.mdx +1 -1
  224. package/docs/channels/slack.mdx +185 -18
  225. package/docs/channels/teams.mdx +6 -2
  226. package/docs/concepts/default-harness.md +6 -0
  227. package/docs/concepts/upgrade-to-v27-events.md +2 -2
  228. package/docs/evals/judge.mdx +13 -0
  229. package/docs/experimental/dynamic-schedules.mdx +2 -2
  230. package/docs/guides/client/overview.mdx +24 -2
  231. package/docs/guides/remote-agents.md +8 -0
  232. package/docs/patterns/fork-conversations-into-new-threads.md +159 -0
  233. package/docs/patterns/meta.json +1 -0
  234. package/docs/reference/cli.md +1 -1
  235. package/docs/sandbox/custom-providers.mdx +1 -1
  236. package/docs/sandbox/index.mdx +1 -1
  237. package/docs/schedules.mdx +1 -1
  238. package/docs/tools/overview.mdx +34 -0
  239. package/docs/tools/workflows.mdx +51 -5
  240. package/package.json +2 -2
  241. package/dist/src/compiled/_chunks/node/token-Bedbhv5z.js +0 -1
  242. package/dist/src/compiled/_chunks/node/token-util-DpJNusVS.js +0 -1
  243. package/dist/src/compiled/_chunks/node/token-util-DwHQ2a3c.js +0 -1
  244. package/dist/src/compiled/_chunks/node/version-C__MqbLM.js +0 -1
  245. package/dist/src/public/channels/slack/approval-cards.d.ts +0 -25
  246. package/dist/src/public/channels/slack/approval-cards.js +0 -2
  247. package/dist/src/runtime/agent/model-catalog.d.ts +0 -10
  248. package/dist/src/runtime/agent/model-catalog.js +0 -1
@@ -0,0 +1,25 @@
1
+ import{i as e,t}from"./rolldown-runtime-tZXQYakl.js";import{t as n}from"./is-stream-DsuQX_bd.js";var r=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{VercelOidcTokenError:()=>u}),t.exports=c(l);var u=class extends Error{constructor(e,t){super(e),this.name=`VercelOidcTokenError`,this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}};0&&(t.exports={VercelOidcTokenError:u})})),i=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{AccessTokenMissingError:()=>u,RefreshAccessTokenFailedError:()=>d}),t.exports=c(l);var u=class extends Error{constructor(){super(`No authentication found. Please log in with the Vercel CLI (vercel login).`),this.name=`AccessTokenMissingError`}},d=class extends Error{constructor(e){super(`Failed to refresh authentication token.`),this.name=`RefreshAccessTokenFailedError`,e!==void 0&&(this.cause=e)}};0&&(t.exports={AccessTokenMissingError:u,RefreshAccessTokenFailedError:d})})),a=t(((t,n)=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!o.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},l=e=>c(r({},`__esModule`,{value:!0}),e),u={};s(u,{VercelCliError:()=>f,assertValidCwd:()=>m,getCliNotFoundMessage:()=>p,toVercelCliError:()=>h}),n.exports=l(u);var d=e(`node:fs/promises`),f=class extends Error{constructor(e){super(e.message),this.name=`VercelCliError`,this.code=e.code,this.invocation=e.invocation,this.stdout=e.stdout,this.stderr=e.stderr,this.exitCode=e.exitCode,e.cause!==void 0&&(this.cause=e.cause)}};function p(e){let t=[],{localBinSearch:n}=e;n.stopReason===`project-root-marker`?t.push(`Local bin lookup stopped at ${JSON.stringify(n.stoppedAt)} (${JSON.stringify(n.markerPath)}).`):n.stopReason===`filesystem-root`&&t.push(`No project root marker was found from ${JSON.stringify(n.searchRoot)}; local bin lookup reached the filesystem root.`);for(let e of n.skippedNodeModules)t.push(`Skipped ${JSON.stringify(e.directory)}: ${e.reason}.`);for(let n of e.skippedLocalBins)t.push(`Skipped ${JSON.stringify(n.candidate)}: ${n.reason}.`);return t.length===0?`Unable to find a usable Vercel CLI installation.`:[`Unable to find a usable Vercel CLI installation.`,...t].join(`
2
+ `)}async function m(e){try{if(!(await(0,d.stat)(e)).isDirectory())throw Error(`not a directory`)}catch{throw new f({code:`VERCEL_CLI_INVALID_CWD`,message:`Working directory ${JSON.stringify(e)} does not exist or is not a directory.`})}}function h(e,t){if(typeof t==`object`&&t){let n=t;if(n.code===`ENOENT`)return new f({code:`VERCEL_CLI_NOT_FOUND`,message:`Unable to find Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t});if(n.code===`EACCES`||n.code===`EPERM`)return new f({code:`VERCEL_CLI_PERMISSION_DENIED`,message:`Permission denied while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t});if(n.timedOut)return new f({code:`VERCEL_CLI_TIMED_OUT`,message:`Timed out while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,stdout:n.stdout,stderr:n.stderr,cause:t});if(n.isCanceled)return new f({code:`VERCEL_CLI_CANCELED`,message:`Canceled while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,stdout:n.stdout,stderr:n.stderr,cause:t});if(n.signal)return new f({code:`VERCEL_CLI_SIGNALED`,message:`Vercel CLI command ${JSON.stringify(e.command)} exited due to signal ${n.signal}.`,invocation:e,stdout:n.stdout,stderr:n.stderr,cause:t});if(typeof n.exitCode==`number`)return new f({code:`VERCEL_CLI_ERRORED`,message:n.shortMessage??n.message??`Vercel CLI command ${JSON.stringify(e.command)} exited with code ${n.exitCode}.`,invocation:e,stdout:n.stdout,stderr:n.stderr,exitCode:n.exitCode,cause:t})}return new f({code:`VERCEL_CLI_EXEC_FAILED`,message:`Could not execute Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t})}0&&(n.exports={VercelCliError:f,assertValidCwd:m,getCliNotFoundMessage:p,toVercelCliError:h})})),o=t(((t,n)=>{n.exports=o,o.sync=s;var r=e(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function a(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:i(t,n)}function o(e,t,n){r.stat(e,function(r,i){n(r,!r&&a(i,e,t))})}function s(e,t){return a(r.statSync(e),e,t)}})),s=t(((t,n)=>{n.exports=i,i.sync=a;var r=e(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,!e&&o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),c=t(((t,n)=>{e(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?o():s();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),l=t(((t,n)=>{let r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=e(`path`),a=r?`;`:`:`,o=c(),s=e=>Object.assign(Error(`not found: ${e}`),{code:`ENOENT`}),l=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},u=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:a,pathExtExe:c}=l(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;a(f(p,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let l=a[r];o(e+l,{pathExt:c},(a,o)=>{if(!a&&o){if(t.all)u.push(e+l);else return i(e+l)}return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=u,u.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:a}=l(e,t),c=[];for(let s=0;s<n.length;s++){let l=n[s],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){let n=f+r[e];try{if(o.sync(n,{pathExt:a})){if(t.all)c.push(n);else return n}}catch{}}}if(t.all&&c.length)return c;if(t.nothrow)return null;throw s(e)}})),u=t(((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),d=t(((t,n)=>{let r=e(`path`),i=l(),a=u();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=r.resolve(s?e.options.cwd:``,l),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),f=t(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),p=t(((e,t)=>{t.exports=/^#!(.*)/})),m=t(((e,t)=>{let n=p();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),h=t(((t,n)=>{let r=e(`fs`),i=m();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),g=t(((t,n)=>{let r=e(`path`),i=d(),a=f(),o=h(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function p(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function m(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:p(r)}n.exports=m})),_=t(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),v=t(((t,n)=>{let r=e(`child_process`),i=g(),a=_();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a})),y=t(((e,t)=>{t.exports=e=>{let t=typeof e==`string`?`
3
+ `:10,n=typeof e==`string`?`\r`:13;return e[e.length-1]===t&&(e=e.slice(0,e.length-1)),e[e.length-1]===n&&(e=e.slice(0,e.length-1)),e}})),b=t(((t,n)=>{let r=e(`path`),i=u(),a=e=>{e={cwd:process.cwd(),path:process.env[i()],execPath:process.execPath,...e};let t,n=r.resolve(e.cwd),a=[];for(;t!==n;)a.push(r.join(n,`node_modules/.bin`)),t=n,n=r.resolve(n,`..`);let o=r.resolve(e.cwd,e.execPath,`..`);return a.push(o),a.concat(e.path).join(r.delimiter)};n.exports=a,n.exports.default=a,n.exports.env=e=>{e={env:process.env,...e};let t={...e.env},r=i({env:t});return e.path=t[r],t[r]=n.exports(e),t}})),x=t(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n})),S=t(((e,t)=>{let n=x(),r=new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})),C=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNALS=void 0,e.SIGNALS=[{name:`SIGHUP`,number:1,action:`terminate`,description:`Terminal closed`,standard:`posix`},{name:`SIGINT`,number:2,action:`terminate`,description:`User interruption with CTRL-C`,standard:`ansi`},{name:`SIGQUIT`,number:3,action:`core`,description:`User interruption with CTRL-\\`,standard:`posix`},{name:`SIGILL`,number:4,action:`core`,description:`Invalid machine instruction`,standard:`ansi`},{name:`SIGTRAP`,number:5,action:`core`,description:`Debugger breakpoint`,standard:`posix`},{name:`SIGABRT`,number:6,action:`core`,description:`Aborted`,standard:`ansi`},{name:`SIGIOT`,number:6,action:`core`,description:`Aborted`,standard:`bsd`},{name:`SIGBUS`,number:7,action:`core`,description:`Bus error due to misaligned, non-existing address or paging error`,standard:`bsd`},{name:`SIGEMT`,number:7,action:`terminate`,description:`Command should be emulated but is not implemented`,standard:`other`},{name:`SIGFPE`,number:8,action:`core`,description:`Floating point arithmetic error`,standard:`ansi`},{name:`SIGKILL`,number:9,action:`terminate`,description:`Forced termination`,standard:`posix`,forced:!0},{name:`SIGUSR1`,number:10,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGSEGV`,number:11,action:`core`,description:`Segmentation fault`,standard:`ansi`},{name:`SIGUSR2`,number:12,action:`terminate`,description:`Application-specific signal`,standard:`posix`},{name:`SIGPIPE`,number:13,action:`terminate`,description:`Broken pipe or socket`,standard:`posix`},{name:`SIGALRM`,number:14,action:`terminate`,description:`Timeout or timer`,standard:`posix`},{name:`SIGTERM`,number:15,action:`terminate`,description:`Termination`,standard:`ansi`},{name:`SIGSTKFLT`,number:16,action:`terminate`,description:`Stack is empty or overflowed`,standard:`other`},{name:`SIGCHLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`posix`},{name:`SIGCLD`,number:17,action:`ignore`,description:`Child process terminated, paused or unpaused`,standard:`other`},{name:`SIGCONT`,number:18,action:`unpause`,description:`Unpaused`,standard:`posix`,forced:!0},{name:`SIGSTOP`,number:19,action:`pause`,description:`Paused`,standard:`posix`,forced:!0},{name:`SIGTSTP`,number:20,action:`pause`,description:`Paused using CTRL-Z or "suspend"`,standard:`posix`},{name:`SIGTTIN`,number:21,action:`pause`,description:`Background process cannot read terminal input`,standard:`posix`},{name:`SIGBREAK`,number:21,action:`terminate`,description:`User interruption with CTRL-BREAK`,standard:`other`},{name:`SIGTTOU`,number:22,action:`pause`,description:`Background process cannot write to terminal output`,standard:`posix`},{name:`SIGURG`,number:23,action:`ignore`,description:`Socket received out-of-band data`,standard:`bsd`},{name:`SIGXCPU`,number:24,action:`core`,description:`Process timed out`,standard:`bsd`},{name:`SIGXFSZ`,number:25,action:`core`,description:`File too big`,standard:`bsd`},{name:`SIGVTALRM`,number:26,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGPROF`,number:27,action:`terminate`,description:`Timeout or timer`,standard:`bsd`},{name:`SIGWINCH`,number:28,action:`ignore`,description:`Terminal window size changed`,standard:`bsd`},{name:`SIGIO`,number:29,action:`terminate`,description:`I/O is available`,standard:`other`},{name:`SIGPOLL`,number:29,action:`terminate`,description:`Watched event`,standard:`other`},{name:`SIGINFO`,number:29,action:`ignore`,description:`Request for process information`,standard:`other`},{name:`SIGPWR`,number:30,action:`terminate`,description:`Device running out of power`,standard:`systemv`},{name:`SIGSYS`,number:31,action:`core`,description:`Invalid system call`,standard:`other`},{name:`SIGUNUSED`,number:31,action:`terminate`,description:`Invalid system call`,standard:`other`}]})),w=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGRTMAX=e.getRealtimeSignals=void 0,e.getRealtimeSignals=function(){let e=r-n+1;return Array.from({length:e},t)};let t=function(e,t){return{name:`SIGRT${t+1}`,number:n+t,action:`terminate`,description:`Application-specific signal (realtime)`,standard:`posix`}},n=34,r=64;e.SIGRTMAX=64})),T=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var n=e(`os`),r=C(),i=w();t.getSignals=function(){let e=(0,i.getRealtimeSignals)();return[...r.SIGNALS,...e].map(a)};let a=function({name:e,number:t,description:r,action:i,forced:a=!1,standard:o}){let{signals:{[e]:s}}=n.constants,c=s!==void 0;return{name:e,number:c?s:t,description:r,supported:c,action:i,forced:a,standard:o}}})),E=t((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var n=e(`os`),r=T(),i=w();let a=function(){return(0,r.getSignals)().reduce(o,{})},o=function(e,{name:t,number:n,description:r,supported:i,action:a,forced:o,standard:s}){return{...e,[t]:{name:t,number:n,description:r,supported:i,action:a,forced:o,standard:s}}};t.signalsByName=a();let s=function(){let e=(0,r.getSignals)(),t=i.SIGRTMAX+1,n=Array.from({length:t},(t,n)=>c(n,e));return Object.assign({},...n)},c=function(e,t){let n=l(e,t);if(n===void 0)return{};let{name:r,description:i,supported:a,action:o,forced:s,standard:c}=n;return{[e]:{name:r,number:e,description:i,supported:a,action:o,forced:s,standard:c}}},l=function(e,t){let r=t.find(({name:t})=>n.constants.signals[t]===e);return r===void 0?t.find(t=>t.number===e):r};t.signalsByNumber=s()})),ee=t(((e,t)=>{let{signalsByName:n}=E(),r=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:i,exitCode:a,isCanceled:o})=>e?`timed out after ${t} milliseconds`:o?`was canceled`:n===void 0?r===void 0?a===void 0?`failed`:`failed with exit code ${a}`:`was killed with ${r} (${i})`:`failed with ${n}`;t.exports=({stdout:e,stderr:t,all:i,error:a,signal:o,exitCode:s,command:c,escapedCommand:l,timedOut:u,isCanceled:d,killed:f,parsed:{options:{timeout:p}}})=>{s=s===null?void 0:s,o=o===null?void 0:o;let m=o===void 0?void 0:n[o].description,h=a&&a.code,g=`Command ${r({timedOut:u,timeout:p,errorCode:h,signal:o,signalDescription:m,exitCode:s,isCanceled:d})}: ${c}`,_=Object.prototype.toString.call(a)===`[object Error]`,v=_?`${g}\n${a.message}`:g,y=[v,t,e].filter(Boolean).join(`
4
+ `);return _?(a.originalMessage=a.message,a.message=y):a=Error(y),a.shortMessage=v,a.command=c,a.escapedCommand=l,a.exitCode=s,a.signal=o,a.signalDescription=m,a.stdout=e,a.stderr=t,i!==void 0&&(a.all=i),`bufferedData`in a&&delete a.bufferedData,a.failed=!0,a.timedOut=!!u,a.isCanceled=d,a.killed=f&&!u,a}})),D=t(((e,t)=>{let n=[`stdin`,`stdout`,`stderr`],r=e=>n.some(t=>e[t]!==void 0),i=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return n.map(t=>e[t]);if(r(e))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${n.map(e=>`\`${e}\``).join(`, `)}`);if(typeof t==`string`)return t;if(!Array.isArray(t))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let i=Math.max(t.length,n.length);return Array.from({length:i},(e,n)=>t[n])};t.exports=i,t.exports.node=e=>{let t=i(e);return t===`ipc`?`ipc`:t===void 0||typeof t==`string`?[t,t,t,`ipc`]:t.includes(`ipc`)?t:[...t,`ipc`]}})),O=t(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),k=t(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=O(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){p&&i(global.process)&&(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){!p&&i(global.process)&&(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})),te=t(((t,n)=>{let r=e(`os`),i=k(),a=(e,t=`SIGTERM`,n={})=>{let r=e(t);return o(e,t,n,r),r},o=(e,t,n,r)=>{if(!s(t,n,r))return;let i=l(n),a=setTimeout(()=>{e(`SIGKILL`)},i);a.unref&&a.unref()},s=(e,{forceKillAfterTimeout:t},n)=>c(e)&&t!==!1&&n,c=e=>e===r.constants.signals.SIGTERM||typeof e==`string`&&e.toUpperCase()===`SIGTERM`,l=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},u=(e,t)=>{e.kill()&&(t.isCanceled=!0)},d=(e,t,n)=>{e.kill(t),n(Object.assign(Error(`Timed out`),{timedOut:!0,signal:t}))};n.exports={spawnedKill:a,spawnedCancel:u,setupTimeout:(e,{timeout:t,killSignal:n=`SIGTERM`},r)=>{if(t===0||t===void 0)return r;let i,a=new Promise((r,a)=>{i=setTimeout(()=>{d(e,n,a)},t)}),o=r.finally(()=>{clearTimeout(i)});return Promise.race([a,o])},validateTimeout:({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let a=i(()=>{e.kill()});return r.finally(()=>{a()})}}})),A=t(((t,n)=>{let{PassThrough:r}=e(`stream`);n.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,i=n===`buffer`,a=!1;t?a=!(n||i):n||=`utf8`,i&&(n=null);let o=new r({objectMode:a});n&&o.setEncoding(n);let s=0,c=[];return o.on(`data`,e=>{c.push(e),a?s=c.length:s+=e.length}),o.getBufferedValue=()=>t?c:i?Buffer.concat(c,s):c.join(``),o.getBufferedLength=()=>s,o}})),j=t(((t,n)=>{let{constants:r}=e(`buffer`),i=e(`stream`),{promisify:a}=e(`util`),o=A(),s=a(i.pipeline);var c=class extends Error{constructor(){super(`maxBuffer exceeded`),this.name=`MaxBufferError`}};async function l(e,t){if(!e)throw Error(`Expected a stream`);t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,i=o(t);return await new Promise((t,a)=>{let o=e=>{e&&i.getBufferedLength()<=r.MAX_LENGTH&&(e.bufferedData=i.getBufferedValue()),a(e)};(async()=>{try{await s(e,i),t()}catch(e){o(e)}})(),i.on(`data`,()=>{i.getBufferedLength()>n&&o(new c)})}),i.getBufferedValue()}n.exports=l,n.exports.buffer=(e,t)=>l(e,{...t,encoding:`buffer`}),n.exports.array=(e,t)=>l(e,{...t,array:!0}),n.exports.MaxBufferError=c})),M=t(((t,n)=>{let{PassThrough:r}=e(`stream`);n.exports=function(){var e=[],t=new r({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=i,t.on(`unpipe`,a),Array.prototype.slice.call(arguments).forEach(n),t;function n(r){return Array.isArray(r)?(r.forEach(n),this):(e.push(r),r.once(`end`,a.bind(null,r)),r.once(`error`,t.emit.bind(t,`error`)),r.pipe(t,{end:!1}),this)}function i(){return e.length==0}function a(n){e=e.filter(function(e){return e!==n}),!e.length&&t.readable&&t.end()}}})),N=t(((e,t)=>{let r=n(),i=j(),a=M(),o=(e,t)=>{t!==void 0&&e.stdin!==void 0&&(r(t)?t.pipe(e.stdin):e.stdin.end(t))},s=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=a();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},c=async(e,t)=>{if(e){e.destroy();try{return await t}catch(e){return e.bufferedData}}},l=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(e&&n)return t?i(e,{encoding:t,maxBuffer:r}):i.buffer(e,{maxBuffer:r})};t.exports={handleInput:o,makeAllStream:s,getSpawnedResult:async({stdout:e,stderr:t,all:n},{encoding:r,buffer:i,maxBuffer:a},o)=>{let s=l(e,{encoding:r,buffer:i,maxBuffer:a}),u=l(t,{encoding:r,buffer:i,maxBuffer:a}),d=l(n,{encoding:r,buffer:i,maxBuffer:a*2});try{return await Promise.all([o,s,u,d])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},c(e,s),c(t,u),c(n,d)])}},validateInputSync:({input:e})=>{if(r(e))throw TypeError("The `input` option cannot be a stream in sync mode")}}})),P=t(((e,t)=>{let n=(async()=>{})().constructor.prototype,r=[`then`,`catch`,`finally`].map(e=>[e,Reflect.getOwnPropertyDescriptor(n,e)]);t.exports={mergePromise:(e,t)=>{for(let[n,i]of r){let r=typeof t==`function`?(...e)=>Reflect.apply(i.value,t(),e):i.value.bind(t);Reflect.defineProperty(e,n,{...i,value:r})}return e},getSpawnedPromise:e=>new Promise((t,n)=>{e.on(`exit`,(e,n)=>{t({exitCode:e,signal:n})}),e.on(`error`,e=>{n(e)}),e.stdin&&e.stdin.on(`error`,e=>{n(e)})})}})),F=t(((e,t)=>{let n=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],r=/^[\w.-]+$/,i=/"/g,a=e=>typeof e!=`string`||r.test(e)?e:`"${e.replace(i,`\\"`)}"`,o=(e,t)=>n(e,t).join(` `),s=(e,t)=>n(e,t).map(e=>a(e)).join(` `),c=/ +/g;t.exports={joinCommand:o,getEscapedCommand:s,parseCommand:e=>{let t=[];for(let n of e.trim().split(c)){let e=t[t.length-1];e&&e.endsWith(`\\`)?t[t.length-1]=`${e.slice(0,-1)} ${n}`:t.push(n)}return t}}})),I=t(((t,n)=>{let r=e(`path`),i=e(`child_process`),a=v(),o=y(),s=b(),c=S(),l=ee(),u=D(),{spawnedKill:d,spawnedCancel:f,setupTimeout:p,validateTimeout:m,setExitHandler:h}=te(),{handleInput:g,getSpawnedResult:_,makeAllStream:x,validateInputSync:C}=N(),{mergePromise:w,getSpawnedPromise:T}=P(),{joinCommand:E,parseCommand:O,getEscapedCommand:k}=F(),A=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:i})=>{let a=t?{...process.env,...e}:e;return n?s.env({env:a,cwd:r,execPath:i}):a},j=(e,t,n={})=>{let i=a._parse(e,t,n);return e=i.command,t=i.args,n=i.options,n={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:`utf8`,reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=A(n),n.stdio=u(n),process.platform===`win32`&&r.basename(e,`.exe`)===`cmd`&&t.unshift(`/q`),{file:e,args:t,options:n,parsed:i}},M=(e,t,n)=>typeof t!=`string`&&!Buffer.isBuffer(t)?n===void 0?void 0:``:e.stripFinalNewline?o(t):t,I=(e,t,n)=>{let r=j(e,t,n),a=E(e,t),o=k(e,t);m(r.options);let s;try{s=i.spawn(r.file,r.args,r.options)}catch(e){let t=new i.ChildProcess,n=Promise.reject(l({error:e,stdout:``,stderr:``,all:``,command:a,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return w(t,n)}let u=T(s),v=p(s,r.options,u),y=h(s,r.options,v),b={isCanceled:!1};s.kill=d.bind(null,s.kill.bind(s)),s.cancel=f.bind(null,s,b);let S=c(async()=>{let[{error:e,exitCode:t,signal:n,timedOut:i},c,u,d]=await _(s,r.options,y),f=M(r.options,c),p=M(r.options,u),m=M(r.options,d);if(e||t!==0||n!==null){let c=l({error:e,exitCode:t,signal:n,stdout:f,stderr:p,all:m,command:a,escapedCommand:o,parsed:r,timedOut:i,isCanceled:b.isCanceled,killed:s.killed});if(!r.options.reject)return c;throw c}return{command:a,escapedCommand:o,exitCode:0,stdout:f,stderr:p,all:m,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return g(s,r.options.input),s.all=x(s,r.options),w(s,S)};n.exports=I,n.exports.sync=(e,t,n)=>{let r=j(e,t,n),a=E(e,t),o=k(e,t);C(r.options);let s;try{s=i.spawnSync(r.file,r.args,r.options)}catch(e){throw l({error:e,stdout:``,stderr:``,all:``,command:a,escapedCommand:o,parsed:r,timedOut:!1,isCanceled:!1,killed:!1})}let c=M(r.options,s.stdout,s.error),u=M(r.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let e=l({stdout:c,stderr:u,error:s.error,signal:s.signal,exitCode:s.status,command:a,escapedCommand:o,parsed:r,timedOut:s.error&&s.error.code===`ETIMEDOUT`,isCanceled:!1,killed:s.signal!==null});if(!r.options.reject)return e;throw e}return{command:a,escapedCommand:o,exitCode:0,stdout:c,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},n.exports.command=(e,t)=>{let[n,...r]=O(e);return I(n,r,t)},n.exports.commandSync=(e,t)=>{let[n,...r]=O(e);return I.sync(n,r,t)},n.exports.node=(e,t,n={})=>{t&&!Array.isArray(t)&&typeof t==`object`&&(n=t,t=[]);let r=u.node(n),i=process.execArgv.filter(e=>!e.startsWith(`--inspect`)),{nodePath:a=process.execPath,nodeOptions:o=i}=n;return I(a,[...o,e,...Array.isArray(t)?t:[]],{...n,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r,shell:!1})}})),ne=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{getEnvPath:()=>_,prependPathEntries:()=>h,setEnvPath:()=>v,splitPath:()=>g}),n.exports=f(p);var m=d(e(`node:path`));function h(e,t){let n=e.split(m.default.delimiter).filter(Boolean),r=[];for(let e of t)!n.includes(e)&&!r.includes(e)&&r.push(e);return r.length===0?e:e===``||e===m.default.delimiter?`${r.join(m.default.delimiter)}${e}`:[...r,e].join(m.default.delimiter)}function g(e){return e.split(m.default.delimiter).filter(Boolean)}function _(e=process.env){if(process.platform!==`win32`)return e.PATH??``;let t=Object.keys(e).filter(e=>e.toLowerCase()===`path`);for(let n=t.length-1;n>=0;n--){let r=e[t[n]];if(r!==void 0)return r}return``}function v(e=process.env,t){if(process.platform!==`win32`)return{...e,PATH:t};let n={...e};for(let e of Object.keys(n))e!==`PATH`&&e.toLowerCase()===`path`&&delete n[e];return n.PATH=t,n}0&&(n.exports={getEnvPath:_,prependPathEntries:h,setEnvPath:v,splitPath:g})})),L=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},c=e=>s(n({},`__esModule`,{value:!0}),e),l={};o(l,{getErrorMessage:()=>u,isMissingPathError:()=>d}),t.exports=c(l);function u(e){return e instanceof Error?e.message:String(e)}function d(e){return typeof e==`object`&&!!e&&`code`in e&&(e.code===`ENOENT`||e.code===`ENOTDIR`)}0&&(t.exports={getErrorMessage:u,isMissingPathError:d})})),re=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{getCanonicalPath:()=>_,getCommandBase:()=>S,getDirectoriesBetween:()=>v,isNodeScript:()=>b,isSubpath:()=>x,statIfExists:()=>y}),n.exports=f(p);var m=e(`node:fs/promises`),h=d(e(`node:path`)),g=L();async function _(e){try{return await(0,m.realpath)(e)}catch{return e}}function v(e,t){let n=[],r=h.default.resolve(t),i=h.default.resolve(e);for(;;){if(n.push(r),r===i)return n.reverse();let e=h.default.dirname(r);if(e===r)return[];r=e}}async function y(e){try{return{stats:await(0,m.stat)(e)}}catch(e){return(0,g.isMissingPathError)(e)?{missing:!0}:{reason:`could not inspect: ${(0,g.getErrorMessage)(e)}`}}}function b(e){return[`.js`,`.cjs`,`.mjs`].includes(h.default.extname(e))}function x(e,t){let n=h.default.relative(e,t);return n===``||n!==``&&!n.startsWith(`..`)&&!h.default.isAbsolute(n)}function S(e){let t=h.default.extname(e).toLowerCase();return process.platform===`win32`&&[`.cmd`,`.exe`].includes(t)?h.default.basename(e,t):h.default.basename(e)}0&&(n.exports={getCanonicalPath:_,getCommandBase:S,getDirectoriesBetween:v,isNodeScript:b,isSubpath:x,statIfExists:y})})),R=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{getSkippedNodeModulesReason:()=>v,getUnsafeDirectoryReason:()=>C,getUnsafePackageBinReason:()=>b,getUnsafePackageDirectoryReason:()=>x,getUnsafePackageFileReason:()=>S,getUnsafeStatsReason:()=>T}),n.exports=f(p);var m=e(`node:fs/promises`),h=d(e(`node:path`)),g=L(),_=re();async function v(e,t){let n=h.default.dirname(e);t??=[n];for(let e of t){let t;try{t=await C(e)}catch(e){t=`could not inspect: ${(0,g.getErrorMessage)(e)}`}if(t)return`${e} is ${t}`}let r=await(0,_.statIfExists)(e);return`missing`in r?null:`reason`in r?r.reason:r.stats.isDirectory()?T(r.stats)||await y(h.default.join(e,`.bin`)):`not a directory`}async function y(e){let t=await(0,_.statIfExists)(e);if(`missing`in t)return null;if(`reason`in t)return`${e} ${t.reason}`;if(!t.stats.isDirectory())return`${e} is not a directory`;let n=T(t.stats);return n?`${e} is ${n}`:null}async function b(e,t,n){return await x(e,t)||await S(t,n)}async function x(e,t){let n=(0,_.getDirectoriesBetween)(e,t);if(n.length===0)return`${t} resolves outside local node_modules`;for(let e of n){let t=await C(e);if(t)return`${e} is ${t}`}return null}async function S(e,t){let n=(0,_.getDirectoriesBetween)(e,h.default.dirname(t));if(n.length===0)return`${t} resolves outside package`;for(let e of n){let t=await C(e);if(t)return`${e} is ${t}`}let r=await w(t);return r?`${t} is ${r}`:null}async function C(e){let t=await(0,m.stat)(e);return t.isDirectory()?T(t):`not a directory`}async function w(e){let t=await(0,m.stat)(e);return t.isFile()?T(t):`not a file`}function T(e){let t=process.geteuid??process.getuid;if(typeof t!=`function`)return null;let n=t();return e.mode&18?e.mode&2?`world-writable`:`group-writable`:e.uid===n?null:`owned by uid ${e.uid}, current uid is ${n}`}0&&(n.exports={getSkippedNodeModulesReason:v,getUnsafeDirectoryReason:C,getUnsafePackageBinReason:b,getUnsafePackageDirectoryReason:x,getUnsafePackageFileReason:S,getUnsafeStatsReason:T})})),z=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{clearCachedCliInvocation:()=>T,clearVercelCliLookupCache:()=>w,findVercelCli:()=>x,getLocalBinSearch:()=>M,resolveCachedCliInvocation:()=>S,toVercelCliInvocation:()=>C}),n.exports=f(p);var m=e(`node:fs/promises`),h=d(e(`node:path`)),g=ne(),_=L(),v=re(),y=R();let b=new Map;async function x(e={}){let t=await S(h.default.resolve(e.cwd??process.cwd()),e.path??(0,g.getEnvPath)(process.env));return t.found?C(t):null}function S(e,t){let n=le(e,t);if(b.has(n))return b.get(n);let r=E(e,t).catch(e=>{throw b.delete(n),e});return b.set(n,r),r}function C(e){return{command:e.command,commandArgs:e.commandArgs,source:e.source}}function w(){b.clear()}function T(e,t){b.delete(le(e,t))}async function E(e,t){let n=await M(e),r={localBinSearch:n.diagnostics,skippedLocalBins:[]},i=(0,g.prependPathEntries)(t,n.directories);for(let t of j()){let a=await ee(t,i,e,n,r);if(a)return(0,v.isNodeScript)(a.realPath)?{found:!0,command:process.execPath,commandArgs:[a.realPath],source:a.source,diagnostics:r}:{found:!0,command:a.realPath,commandArgs:[],source:a.source,diagnostics:r}}return{found:!1,diagnostics:r}}async function ee(e,t,n,r,i){for(let a of(0,g.splitPath)(t)){let t=D(a,e,n);try{if(await O(t,r,i)){let n=await te(e,t,r,i);if(n)return n}}catch{}}return null}function D(e,t,n){let r=h.default.isAbsolute(e)?e:h.default.resolve(n,e);return h.default.join(r,t)}async function O(e,t,n){try{return await(0,m.access)(e,process.platform===`win32`?m.constants.F_OK:m.constants.F_OK|m.constants.X_OK),!0}catch(r){return(0,_.isMissingPathError)(r)||await k(e,r,t,n),!1}}async function k(e,t,n,r){let i=await z(e,n.directories);i&&A(r,e,`reason`in i?i.reason:`local bin is not accessible: ${(0,_.getErrorMessage)(t)}`)}async function te(e,t,n,r){if(!(await(0,m.stat)(t)).isFile())return null;let i=await(0,m.realpath)(t),a=await z(t,n.directories);if(!a)return{realPath:i,source:`path`};if(`reason`in a)return A(r,t,a.reason),null;let o=await ie(e,a.directory);return`reason`in o?(A(r,t,o.reason),null):{realPath:o.binPath,source:`local-bin`}}function A(e,t,n){e.skippedLocalBins.push({candidate:t,reason:n})}function j(){let e=[`vercel`];if(process.platform!==`win32`)return e;let t=[`.cmd`,`.exe`,``];return e.flatMap(e=>t.map(t=>`${e}${t}`))}async function M(e){let t=await(0,v.getCanonicalPath)(h.default.resolve(e)),n=await N(t),r=[],i=[];for(let e of n.directories){let a=h.default.join(e,`node_modules`),o=n.stopReason===`project-root-marker`?(0,v.getDirectoriesBetween)(n.stoppedAt,e):(0,v.getDirectoriesBetween)(e,t),s=await(0,y.getSkippedNodeModulesReason)(a,o);if(s){r.push({directory:a,reason:s});continue}i.push(h.default.join(a,`.bin`))}return{directories:i,diagnostics:{searchRoot:t,stoppedAt:n.stoppedAt,stopReason:n.stopReason,markerPath:n.markerPath,skippedNodeModules:r}}}async function N(e){let t=[],n=h.default.resolve(e);for(;;){t.push(n);let e=await P(n);if(e)return{directories:t,stoppedAt:n,stopReason:`project-root-marker`,markerPath:e.path};let r=h.default.dirname(n);if(r===n)return{directories:t,stoppedAt:n,stopReason:`filesystem-root`};n=r}}async function P(e){let t=h.default.join(e,`.git`);try{return await(0,m.stat)(t),{path:t}}catch{}return null}async function F(e,t){let n=h.default.resolve(e),r=n;try{r=h.default.join(await(0,m.realpath)(h.default.dirname(n)),h.default.basename(n))}catch{}for(let e of t){try{e=await(0,m.realpath)(e)}catch{}if(r.startsWith(`${e}${h.default.sep}`))return e}return null}async function I(e){let t=h.default.resolve(h.default.dirname(e)),n=[t];try{let e=await(0,m.realpath)(t);n.includes(e)||n.push(e)}catch{}for(let e of n)if(h.default.basename(e)===`.bin`&&h.default.basename(h.default.dirname(e))===`node_modules`)return e;return null}async function z(e,t){let n=await F(e,t);if(n)return{directory:n};let r=await I(e);if(!r)return null;let i=h.default.dirname(r),a=await(0,y.getSkippedNodeModulesReason)(i);return a?{reason:`local node_modules is ${a}`}:{reason:`local bin is outside project lookup boundary`}}async function ie(e,t){let n=(0,v.getCommandBase)(e),r=h.default.dirname(t);if(n!==`vercel`||h.default.basename(r)!==`node_modules`)return{reason:`not a local vercel bin`};try{let e=await ae(r);if(`reason`in e)return e;let t=await oe(e.realPackageDirectory);return`reason`in t?t:(e.packageJson=t.packageJson,await se(e,n))}catch(e){return{reason:`could not validate local vercel package: ${(0,_.getErrorMessage)(e)}`}}}async function ae(e){let t=h.default.join(e,`vercel`),n=await(0,m.realpath)(e),r=await(0,m.realpath)(t);if(!(0,v.isSubpath)(n,r))return{reason:`local vercel package resolves outside local node_modules`};let i=await(0,y.getUnsafePackageDirectoryReason)(n,r);return i?{reason:`local vercel package is unsafe: ${i}`}:{realNodeModulesDirectory:n,realPackageDirectory:r,packageJson:{}}}async function oe(e){let t=h.default.join(e,`package.json`),n=await(0,m.realpath)(t);if(!(0,v.isSubpath)(e,n))return{reason:`local vercel package.json resolves outside package`};let r=await(0,y.getUnsafePackageFileReason)(e,n);if(r)return{reason:`local vercel package.json is unsafe: ${r}`};let i=JSON.parse(await(0,m.readFile)(n,`utf8`));return i.name===`vercel`?{packageJson:i}:{reason:`local vercel package.json does not have name "vercel"`}}async function se(e,t){let{packageJson:n,realNodeModulesDirectory:r,realPackageDirectory:i}=e,a=ce(n,t);if(!a)return{reason:`local vercel package does not declare bin.vercel`};let o=h.default.resolve(i,a),s=await(0,m.realpath)(o);if(!(0,v.isSubpath)(i,s))return{reason:`local vercel package bin resolves outside package`};let c=await(0,y.getUnsafePackageBinReason)(r,i,s);if(c)return{reason:`local vercel package bin is unsafe: ${c}`};if(process.platform!==`win32`&&!(0,v.isNodeScript)(s))try{await(0,m.access)(s,m.constants.F_OK|m.constants.X_OK)}catch(e){return{reason:`local vercel package bin is not executable: ${(0,_.getErrorMessage)(e)}`}}return{binPath:s}}function ce(e,t){let n=e.bin;if(typeof n==`string`)return t===`vercel`?n:null;if(n&&typeof n==`object`){let e=n[t];if(typeof e==`string`)return e}return null}function le(e,t){return`${e}\0${t}`}0&&(n.exports={clearCachedCliInvocation:T,clearVercelCliLookupCache:w,findVercelCli:x,getLocalBinSearch:M,resolveCachedCliInvocation:S,toVercelCliInvocation:C})})),ie=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let a of s(t))!l.call(e,a)&&a!==n&&i(e,a,{get:()=>t[a],enumerable:!(r=o(t,a))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(c(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(i({},`__esModule`,{value:!0}),e),m={};u(m,{execVercelCli:()=>b}),n.exports=p(m);var h=f(e(`node:path`)),g=f(I()),_=ne(),v=a(),y=z();async function b(e,t={}){let n=h.default.resolve(t.cwd??process.cwd());await(0,v.assertValidCwd)(n);let r=C(t.env),i=(0,_.getEnvPath)(r);try{return await x(e,t,n,r,i)}catch(a){if(a instanceof v.VercelCliError&&a.code===`VERCEL_CLI_NOT_FOUND`)return(0,y.clearCachedCliInvocation)(n,i),await x(e,t,n,r,i);throw a}}async function x(e,t,n,r,i){let a=await S(n,i);try{let i={input:t.input,stdio:t.stdio,stdin:t.stdin,stdout:t.stdout,stderr:t.stderr,timeout:t.timeout,cwd:n,env:await w(n,r),windowsHide:!0};t.signal&&(i.signal=t.signal);let{stdout:o,stderr:s}=await(0,g.default)(a.command,[...a.commandArgs,...e],i);return{stdout:o,stderr:s,invocation:a}}catch(e){throw(0,v.toVercelCliError)(a,e)}}async function S(e,t){let n=await(0,y.resolveCachedCliInvocation)(e,t);if(!n.found)throw new v.VercelCliError({code:`VERCEL_CLI_NOT_FOUND`,message:(0,v.getCliNotFoundMessage)(n.diagnostics)});return(0,y.toVercelCliInvocation)(n)}function C(e){return e?{...process.env,...e}:process.env}async function w(e,t=process.env){let n=await T(e,(0,_.getEnvPath)(t));return(0,_.setEnvPath)(t,(0,_.prependPathEntries)(n,[h.default.dirname(process.execPath)]))}async function T(e,t=``){return(0,_.prependPathEntries)(t,(await(0,y.getLocalBinSearch)(e)).directories)}0&&(n.exports={execVercelCli:b})})),ae=t(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!o.call(e,c)&&c!==a&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},l=e=>c(n({},`__esModule`,{value:!0}),e),u={};s(u,{VercelCliError:()=>d.VercelCliError,clearVercelCliLookupCache:()=>p.clearVercelCliLookupCache,execVercelCli:()=>f.execVercelCli,findVercelCli:()=>p.findVercelCli}),t.exports=l(u);var d=a(),f=ie(),p=z();0&&(t.exports={VercelCliError,clearVercelCliLookupCache,execVercelCli,findVercelCli})})),oe=t(((t,n)=>{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},u=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(i({},`__esModule`,{value:!0}),e),m=l({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(t,n){var r=e(`os`),i=e(`path`),a=/^win/i.test(process.platform);function o(e){return i.normalize(i.join(e,`.`))}var s=()=>{let{env:e}=process,t={};return t.home=()=>o(r.homedir?r.homedir():e.HOME),t.temp=()=>o(r.tmpdir?r.tmpdir():e.TMPDIR||e.TEMP||e.TMP),t},c=()=>{let{env:e}=process,t={};return t.home=()=>o(r.homedir?r.homedir():e.USERPROFILE||i.join(e.HOMEDRIVE,e.HOMEPATH)||e.HOME),t.temp=()=>o(r.tmpdir?r.tmpdir():e.TEMP||e.TMP||i.join(e.LOCALAPPDATA||e.SystemRoot||e.windir,`Temp`)),t};n.exports=new class e{constructor(){let t=function(){return new e};this._fn=t;let n=a?c():s();return Object.keys(n).forEach(e=>{this._fn[e]=n[e]}),this._fn}}}}),h=l({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(t,n){var r=e(`path`),i=m(),a=()=>{let e={};return e.cache=()=>process.env.XDG_CACHE_HOME||r.join(i.home()||i.temp(),`.cache`),e.config=()=>process.env.XDG_CONFIG_HOME||r.join(i.home()||i.temp(),`.config`),e.data=()=>process.env.XDG_DATA_HOME||r.join(i.home()||i.temp(),`.local`,`share`),e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>process.env.XDG_STATE_HOME||r.join(i.home()||i.temp(),`.local`,`state`),e},o=()=>{let e={};return e.cache=()=>process.env.XDG_CACHE_HOME||r.join(r.join(i.home()||i.temp(),`Library`),`Caches`),e.config=()=>process.env.XDG_CONFIG_HOME||r.join(r.join(i.home()||i.temp(),`Library`),`Preferences`),e.data=()=>process.env.XDG_DATA_HOME||r.join(r.join(i.home()||i.temp(),`Library`),`Application Support`),e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>process.env.XDG_STATE_HOME||r.join(r.join(i.home()||i.temp(),`Library`),`State`),e},s=()=>{let e={};return e.cache=()=>{let e=process.env.LOCALAPPDATA||r.join(i.home()||i.temp(),`AppData`,`Local`);return process.env.XDG_CACHE_HOME||r.join(e,`xdg.cache`)},e.config=()=>{let e=process.env.APPDATA||r.join(i.home()||i.temp(),`AppData`,`Roaming`);return process.env.XDG_CONFIG_HOME||r.join(e,`xdg.config`)},e.data=()=>{let e=process.env.APPDATA||r.join(i.home()||i.temp(),`AppData`,`Roaming`);return process.env.XDG_DATA_HOME||r.join(e,`xdg.data`)},e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>{let e=process.env.LOCALAPPDATA||r.join(i.home()||i.temp(),`AppData`,`Local`);return process.env.XDG_STATE_HOME||r.join(e,`xdg.state`)},e},c=()=>{let e=function(){return c()},t={};return t=/^darwin$/i.test(process.platform)?o():/^win/i.test(process.platform)?s():a(),t.configDirs=()=>{let e=[];return e.push(t.config()),process.env.XDG_CONFIG_DIRS&&e.push(...process.env.XDG_CONFIG_DIRS.split(r.delimiter)),e},t.dataDirs=()=>{let e=[];return e.push(t.data()),process.env.XDG_DATA_DIRS&&e.push(...process.env.XDG_DATA_DIRS.split(r.delimiter)),e},Object.keys(t).forEach(n=>{e[n]=t[n]}),e};n.exports=c()}}),g=l({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(t,n){var r=e(`path`),i=e(`os`),a=h(),o=/^win/i.test(process.platform);function s(e,t){if(e||={},typeof e!=`object`&&(e={isolated:e}),e.isolated=e.isolated===void 0||e.isolated===null?t:e.isolated,typeof e.isolated!=`boolean`)throw TypeError(`Expected boolean for "isolated" argument, got ${typeof e.isolated}`);return e}var c=(e,t)=>{let n={};return n.cache=(n={isolated:null})=>(n=s(n,t),r.join(a.cache(),n.isolated?e:``)),n.config=(n={isolated:null})=>(n=s(n,t),r.join(a.config(),n.isolated?e:``)),n.data=(n={isolated:null})=>(n=s(n,t),r.join(a.data(),n.isolated?e:``)),n.runtime=(n={isolated:null})=>(n=s(n,t),a.runtime()?r.join(a.runtime(),n.isolated?e:``):void 0),n.state=(n={isolated:null})=>(n=s(n,t),r.join(a.state(),n.isolated?e:``)),n.configDirs=(n={isolated:null})=>(n=s(n,t),a.configDirs().map(t=>r.join(t,n.isolated?e:``))),n.dataDirs=(n={isolated:null})=>(n=s(n,t),a.dataDirs().map(t=>r.join(t,n.isolated?e:``))),n},l=(e,t)=>{let{env:n}=process,o=i.homedir(),c=i.tmpdir(),l=n.APPDATA||r.join(o||c,`AppData`,`Roaming`),u=n.LOCALAPPDATA||r.join(o||c,`AppData`,`Local`),d={};return d.cache=(i={isolated:null})=>(i=s(i,t),!i.isolated||n.XDG_CACHE_HOME?r.join(a.cache(),i.isolated?e:``):r.join(u,i.isolated?e:``,`Cache`)),d.config=(i={isolated:null})=>(i=s(i,t),!i.isolated||n.XDG_CONFIG_HOME?r.join(a.config(),i.isolated?e:``):r.join(l,i.isolated?e:``,`Config`)),d.data=(i={isolated:null})=>(i=s(i,t),!i.isolated||n.XDG_DATA_HOME?r.join(a.data(),i.isolated?e:``):r.join(l,i.isolated?e:``,`Data`)),d.runtime=(n={isolated:null})=>(n=s(n,t),a.runtime()?r.join(a.runtime(),n.isolated?e:``):void 0),d.state=(i={isolated:null})=>(i=s(i,t),!i.isolated||n.XDG_STATE_HOME?r.join(a.state(),i.isolated?e:``):r.join(u,i.isolated?e:``,`State`)),d.configDirs=(i={isolated:null})=>{i=s(i,t);let a=[d.config(i)];return n.XDG_CONFIG_DIRS&&a.push(...n.XDG_CONFIG_DIRS.split(r.delimiter).map(t=>r.join(t,i.isolated?e:``))),a},d.dataDirs=(i={isolated:null})=>{i=s(i,t);let a=[d.data(i)];return n.XDG_DATA_DIRS&&a.push(...n.XDG_DATA_DIRS.split(r.delimiter).map(t=>r.join(t,i.isolated?e:``))),a},d};n.exports=new class t{constructor(n={name:null,suffix:null,isolated:!0}){let i=function(e={name:null,suffix:null,isolated:!0}){return new t(e)};this._fn=i,n||={},typeof n!=`object`&&(n={name:n});let a=n.name||``;if(typeof a!=`string`)throw TypeError(`Expected string for "name" argument, got ${typeof a}`);let s=n.suffix||``;if(typeof s!=`string`)throw TypeError(`Expected string for "suffix" argument, got ${typeof s}`);let u=n.isolated===void 0||n.isolated===null||n.isolated;if(typeof u!=`boolean`)throw TypeError(`Expected boolean for "isolated" argument, got ${typeof u}`);a||=r.parse(process.pkg?process.execPath:e.main?e.main.filename:process.argv[0]).name,s&&(a+=s),this._fn.$name=()=>a,this._fn.$isolated=()=>u;let d=o?l(a,u):c(a,u);return Object.keys(d).forEach(e=>{this._fn[e]=d[e]}),this._fn}}}}),_={};u(_,{CRED_STORAGE_CONFIG_VALUES:()=>v,CRED_STORAGE_VALUES:()=>y,DEFAULT_CRED_STORAGE:()=>b,authConfigHasUsableTokenData:()=>Ko,authConfigSchema:()=>io,credStorageSchema:()=>no,defaultAuthConfig:()=>So,defaultGlobalConfig:()=>bo,deleteAuthConfig:()=>Bo,deleteAuthConfigFile:()=>zo,getAuthConfigFilePath:()=>vo,getCachePath:()=>ho,getConfigFilePath:()=>_o,getDataPath:()=>mo,getDefaultAuthConfig:()=>xo,getGlobalPathConfig:()=>go,getLikelyEffectiveCredStorage:()=>Yo,globalConfigSchema:()=>ro,guidanceConfigSchema:()=>eo,parseAuthConfig:()=>To,parseAuthFileConfig:()=>Eo,parseGlobalConfig:()=>wo,readAuthConfig:()=>Fo,readAuthConfigFile:()=>No,readAuthFileConfig:()=>Po,readConfigFile:()=>ko,readGlobalConfigFile:()=>jo,telemetryConfigSchema:()=>$a,tryReadAuthConfig:()=>Io,updatesConfigSchema:()=>to,writeAuthConfig:()=>Ro,writeAuthConfigFile:()=>Lo,writeConfigFile:()=>Ao,writeGlobalConfigFile:()=>Mo}),n.exports=p(_);var v=[`auto`,`file`,`keyring`],y=v.filter(e=>e!==`auto`),b=`file`;Object.freeze({status:`aborted`});function x(e,t,n){function r(n,r){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,r);for(let e in o.prototype)e in n||Object.defineProperty(n,e,{value:o.prototype[e].bind(n)});n._zod.constr=o,n._zod.def=r}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var S=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},C=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},w={};function T(e){return e&&Object.assign(w,e),w}var E={};u(E,{BIGINT_FORMAT_RANGES:()=>xe,Class:()=>Ve,NUMBER_FORMAT_RANGES:()=>be,aborted:()=>W,allowsEval:()=>de,assert:()=>te,assertEqual:()=>ee,assertIs:()=>O,assertNever:()=>k,assertNotEqual:()=>D,assignProp:()=>R,base64ToUint8Array:()=>Fe,base64urlToUint8Array:()=>Le,cached:()=>N,captureStackTrace:()=>le,cleanEnum:()=>Pe,cleanRegex:()=>F,clone:()=>H,cloneDef:()=>ie,createTransparentProxy:()=>_e,defineLazy:()=>L,esc:()=>ce,escapeRegex:()=>V,extend:()=>we,finalizeIssue:()=>G,floatSafeRemainder:()=>I,getElementAtPath:()=>ae,getEnumValues:()=>A,getLengthableOrigin:()=>Me,getParsedType:()=>me,getSizableOrigin:()=>je,hexToUint8Array:()=>ze,isObject:()=>ue,isPlainObject:()=>B,issue:()=>Ne,joinValues:()=>j,jsonStringifyReplacer:()=>M,merge:()=>Ee,mergeDefs:()=>z,normalizeParams:()=>U,nullish:()=>P,numKeys:()=>pe,objectClone:()=>re,omit:()=>Ce,optionalKeys:()=>ye,partial:()=>De,pick:()=>Se,prefixIssues:()=>ke,primitiveTypes:()=>ge,promiseAllObject:()=>oe,propertyKeyTypes:()=>he,randomString:()=>se,required:()=>Oe,safeExtend:()=>Te,shallowClone:()=>fe,stringifyPrimitive:()=>ve,uint8ArrayToBase64:()=>Ie,uint8ArrayToBase64url:()=>Re,uint8ArrayToHex:()=>Be,unwrapMessage:()=>Ae});function ee(e){return e}function D(e){return e}function O(e){}function k(e){throw Error()}function te(e){}function A(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function j(e,t=`|`){return e.map(e=>ve(e)).join(t)}function M(e,t){return typeof t==`bigint`?t.toString():t}function N(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function P(e){return e==null}function F(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function I(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var ne=Symbol(`evaluating`);function L(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ne)return r===void 0&&(r=ne,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function re(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function R(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function z(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ie(e){return z(e._zod.def)}function ae(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function oe(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function se(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function ce(e){return JSON.stringify(e)}var le=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ue(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var de=N(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function B(e){if(ue(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return ue(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function fe(e){return B(e)?{...e}:Array.isArray(e)?[...e]:e}function pe(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var me=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},he=new Set([`string`,`number`,`symbol`]),ge=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function V(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function H(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function U(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function _e(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function ve(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ye(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var be={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xe={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Se(e,t){let n=e._zod.def;return H(e,z(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return R(this,`shape`,e),e},checks:[]}))}function Ce(e,t){let n=e._zod.def;return H(e,z(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return R(this,`shape`,r),r},checks:[]}))}function we(e,t){if(!B(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return H(e,z(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return R(this,`shape`,n),n},checks:[]}))}function Te(e,t){if(!B(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return H(e,{...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return R(this,`shape`,n),n},checks:e._zod.def.checks})}function Ee(e,t){return H(e,z(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return R(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function De(e,t,n){return H(t,z(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return R(this,`shape`,i),i},checks:[]}))}function Oe(e,t,n){return H(t,z(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return R(this,`shape`,i),i},checks:[]}))}function W(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ke(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ae(e){return typeof e==`string`?e:e?.message}function G(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=Ae(e.inst?._zod.def?.error?.(e))??Ae(t?.error?.(e))??Ae(n.customError?.(e))??Ae(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function je(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Me(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Ne(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Pe(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Fe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Ie(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Le(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Fe(t+`=`.repeat((4-t.length%4)%4))}function Re(e){return Ie(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function ze(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function Be(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var Ve=class{constructor(...e){}},He=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,M,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ue=x(`$ZodError`,He),We=x(`$ZodError`,He,{Parent:Error});function Ge(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ke(e,t){let n=t||function(e){return e.message},r={_errors:[]},i=e=>{for(let t of e.issues)if(t.code===`invalid_union`&&t.errors.length)t.errors.map(e=>i({issues:e}));else if(t.code===`invalid_key`)i({issues:t.issues});else if(t.code===`invalid_element`)i({issues:t.issues});else if(t.path.length===0)r._errors.push(n(t));else{let e=r,i=0;for(;i<t.path.length;){let r=t.path[i];i===t.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(n(t))):e[r]=e[r]||{_errors:[]},e=e[r],i++}}};return i(e),r}var qe=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new S;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>G(e,a,T())));throw le(t,i?.callee),t}return o.value},Je=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>G(e,a,T())));throw le(t,i?.callee),t}return o.value},Ye=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new S;return a.issues.length?{success:!1,error:new(e??Ue)(a.issues.map(e=>G(e,i,T())))}:{success:!0,data:a.value}},Xe=Ye(We),Ze=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>G(e,i,T())))}:{success:!0,data:a.value}},Qe=Ze(We),$e=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return qe(e)(t,n,i)},et=e=>(t,n,r)=>qe(e)(t,n,r),tt=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Je(e)(t,n,i)},nt=e=>async(t,n,r)=>Je(e)(t,n,r),rt=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ye(e)(t,n,i)},it=e=>(t,n,r)=>Ye(e)(t,n,r),at=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ze(e)(t,n,i)},ot=e=>async(t,n,r)=>Ze(e)(t,n,r),st=/^[cC][^\s-]{8,}$/,ct=/^[0-9a-z]+$/,lt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ut=/^[0-9a-vA-V]{20}$/,dt=/^[A-Za-z0-9]{27}$/,ft=/^[a-zA-Z0-9_-]{21}$/,pt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mt=/^([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})$/,ht=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_t=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function vt(){return new RegExp(_t,`u`)}var yt=/^(?:(?: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])$/,bt=/^(([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}|:))$/,xt=/^((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])$/,St=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ct=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wt=/^[A-Za-z0-9_-]*$/,Tt=/^(?=.{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])?)*\.?$/,Et=/^\+(?:[0-9]){6,14}[0-9]$/,Dt=`(?:(?:\\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])))`,Ot=RegExp(`^${Dt}$`);function kt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function At(e){return RegExp(`^${kt(e)}$`)}function jt(e){let t=kt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Dt}T(?:${r})$`)}var Mt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Nt=/^-?\d+$/,Pt=/^-?\d+(?:\.\d+)?/,Ft=/^(?:true|false)$/i,It=/^[^A-Z]*$/,Lt=/^[^a-z]*$/,K=x(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Rt={number:`number`,bigint:`bigint`,object:`date`},zt=x(`$ZodCheckLessThan`,(e,t)=>{K.init(e,t);let n=Rt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Bt=x(`$ZodCheckGreaterThan`,(e,t)=>{K.init(e,t);let n=Rt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vt=x(`$ZodCheckMultipleOf`,(e,t)=>{K.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):I(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ht=x(`$ZodCheckNumberFormat`,(e,t)=>{K.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=be[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Nt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inst:e})}}),Ut=x(`$ZodCheckMaxLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!P(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Me(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Wt=x(`$ZodCheckMinLength`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!P(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Me(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Gt=x(`$ZodCheckLengthEquals`,(e,t)=>{var n;K.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!P(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Me(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Kt=x(`$ZodCheckStringFormat`,(e,t)=>{var n,r;K.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),qt=x(`$ZodCheckRegex`,(e,t)=>{Kt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Jt=x(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=It,Kt.init(e,t)}),Yt=x(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Lt,Kt.init(e,t)}),Xt=x(`$ZodCheckIncludes`,(e,t)=>{K.init(e,t);let n=V(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Zt=x(`$ZodCheckStartsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`^${V(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Qt=x(`$ZodCheckEndsWith`,(e,t)=>{K.init(e,t);let n=RegExp(`.*${V(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),$t=x(`$ZodCheckOverwrite`,(e,t)=>{K.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),en=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
5
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
6
+ `))}},tn={major:4,minor:1,patch:11},q=x(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tn;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=W(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new S;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=W(e,t))});else{if(e.issues.length===t)continue;r||=W(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(W(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new S;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new S;return o.then(e=>t(e,r,a))}return t(o,r,a)}}e[`~standard`]={validate:t=>{try{let n=Xe(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Qe(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}}),nn=x(`$ZodString`,(e,t)=>{q.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Mt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),J=x(`$ZodStringFormat`,(e,t)=>{Kt.init(e,t),nn.init(e,t)}),rn=x(`$ZodGUID`,(e,t)=>{t.pattern??=mt,J.init(e,t)}),an=x(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ht(e)}else t.pattern??=ht();J.init(e,t)}),on=x(`$ZodEmail`,(e,t)=>{t.pattern??=gt,J.init(e,t)}),sn=x(`$ZodURL`,(e,t)=>{J.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:Tt.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),cn=x(`$ZodEmoji`,(e,t)=>{t.pattern??=vt(),J.init(e,t)}),ln=x(`$ZodNanoID`,(e,t)=>{t.pattern??=ft,J.init(e,t)}),un=x(`$ZodCUID`,(e,t)=>{t.pattern??=st,J.init(e,t)}),dn=x(`$ZodCUID2`,(e,t)=>{t.pattern??=ct,J.init(e,t)}),fn=x(`$ZodULID`,(e,t)=>{t.pattern??=lt,J.init(e,t)}),pn=x(`$ZodXID`,(e,t)=>{t.pattern??=ut,J.init(e,t)}),mn=x(`$ZodKSUID`,(e,t)=>{t.pattern??=dt,J.init(e,t)}),hn=x(`$ZodISODateTime`,(e,t)=>{t.pattern??=jt(t),J.init(e,t)}),gn=x(`$ZodISODate`,(e,t)=>{t.pattern??=Ot,J.init(e,t)}),_n=x(`$ZodISOTime`,(e,t)=>{t.pattern??=At(t),J.init(e,t)}),vn=x(`$ZodISODuration`,(e,t)=>{t.pattern??=pt,J.init(e,t)}),yn=x(`$ZodIPv4`,(e,t)=>{t.pattern??=yt,J.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv4`})}),bn=x(`$ZodIPv6`,(e,t)=>{t.pattern??=bt,J.init(e,t),e._zod.onattach.push(e=>{let t=e._zod.bag;t.format=`ipv6`}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),xn=x(`$ZodCIDRv4`,(e,t)=>{t.pattern??=xt,J.init(e,t)}),Sn=x(`$ZodCIDRv6`,(e,t)=>{t.pattern??=St,J.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Cn(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var wn=x(`$ZodBase64`,(e,t)=>{t.pattern??=Ct,J.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64`}),e._zod.check=n=>{Cn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Tn(e){if(!wt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Cn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var En=x(`$ZodBase64URL`,(e,t)=>{t.pattern??=wt,J.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding=`base64url`}),e._zod.check=n=>{Tn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Dn=x(`$ZodE164`,(e,t)=>{t.pattern??=Et,J.init(e,t)});function On(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var kn=x(`$ZodJWT`,(e,t)=>{J.init(e,t),e._zod.check=n=>{On(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),An=x(`$ZodNumber`,(e,t)=>{q.init(e,t),e._zod.pattern=e._zod.bag.pattern??Pt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),jn=x(`$ZodNumber`,(e,t)=>{Ht.init(e,t),An.init(e,t)}),Mn=x(`$ZodBoolean`,(e,t)=>{q.init(e,t),e._zod.pattern=Ft,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Nn=x(`$ZodUnknown`,(e,t)=>{q.init(e,t),e._zod.parse=e=>e}),Pn=x(`$ZodNever`,(e,t)=>{q.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Fn(e,t,n){e.issues.length&&t.issues.push(...ke(n,e.issues)),t.value[n]=e.value}var In=x(`$ZodArray`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Fn(t,n,e))):Fn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Ln(e,t,n,r){e.issues.length&&t.issues.push(...ke(n,e.issues)),e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Rn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ye(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function zn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type;for(let i of Object.keys(t)){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ln(e,n,i,t))):Ln(a,n,i,t)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Bn=x(`$ZodObject`,(e,t)=>{if(q.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=N(()=>Rn(t));L(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=ue,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e]._zod.run({value:s[e],issues:[]},o);n instanceof Promise?c.push(n.then(n=>Ln(n,t,e,s))):Ln(n,t,e,s)}return i?zn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Vn=x(`$ZodObjectJIT`,(e,t)=>{Bn.init(e,t);let n=e._zod.parse,r=N(()=>Rn(t)),i=e=>{let t=new en([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ce(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let e of n.keys){let n=a[e],r=ce(e);t.write(`const ${n} = ${i(e)};`),t.write(`
7
+ if (${n}.issues.length) {
8
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
9
+ ...iss,
10
+ path: iss.path ? [${r}, ...iss.path] : [${r}]
11
+ })));
12
+ }
13
+
14
+
15
+ if (${n}.value === undefined) {
16
+ if (${r} in input) {
17
+ newResult[${r}] = undefined;
18
+ }
19
+ } else {
20
+ newResult[${r}] = ${n}.value;
21
+ }
22
+
23
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=ue,s=!w.jitless,c=s&&de.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?zn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Hn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!W(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>G(e,r,T())))}),t)}var Un=x(`$ZodUnion`,(e,t)=>{q.init(e,t),L(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),L(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),L(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),L(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>F(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Hn(t,i,e,a)):Hn(s,i,e,a)}}),Wn=x(`$ZodIntersection`,(e,t)=>{q.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Kn(e,t,n)):Kn(e,i,a)}});function Gn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(B(e)&&B(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Gn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Gn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Kn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),W(e))return e;let r=Gn(t.value,n.value);if(!r.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}var qn=x(`$ZodEnum`,(e,t)=>{q.init(e,t);let n=A(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>he.has(typeof e)).map(e=>typeof e==`string`?V(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Jn=x(`$ZodLiteral`,(e,t)=>{if(q.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?V(e):e?V(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),Yn=x(`$ZodTransform`,(e,t)=>{q.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new C(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new S;return n.value=i,n}});function Xn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Zn=x(`$ZodOptional`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,L(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),L(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${F(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Xn(t,e.value)):Xn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Qn=x(`$ZodNullable`,(e,t)=>{q.init(e,t),L(e._zod,`optin`,()=>t.innerType._zod.optin),L(e._zod,`optout`,()=>t.innerType._zod.optout),L(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${F(e.source)}|null)$`):void 0}),L(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$n=x(`$ZodDefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,L(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>er(e,t)):er(r,t)}});function er(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tr=x(`$ZodPrefault`,(e,t)=>{q.init(e,t),e._zod.optin=`optional`,L(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nr=x(`$ZodNonOptional`,(e,t)=>{q.init(e,t),L(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rr(t,e)):rr(i,e)}});function rr(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 ir=x(`$ZodCatch`,(e,t)=>{q.init(e,t),L(e._zod,`optin`,()=>t.innerType._zod.optin),L(e._zod,`optout`,()=>t.innerType._zod.optout),L(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>G(e,n,T()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>G(e,n,T()))},input:e.value}),e.issues=[]),e)}}),ar=x(`$ZodPipe`,(e,t)=>{q.init(e,t),L(e._zod,`values`,()=>t.in._zod.values),L(e._zod,`optin`,()=>t.in._zod.optin),L(e._zod,`optout`,()=>t.out._zod.optout),L(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>or(e,t.in,n)):or(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>or(e,t.out,n)):or(r,t.out,n)}});function or(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var sr=x(`$ZodReadonly`,(e,t)=>{q.init(e,t),L(e._zod,`propValues`,()=>t.innerType._zod.propValues),L(e._zod,`values`,()=>t.innerType._zod.values),L(e._zod,`optin`,()=>t.innerType._zod.optin),L(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(cr):cr(r)}});function cr(e){return e.value=Object.freeze(e.value),e}var lr=x(`$ZodCustom`,(e,t)=>{K.init(e,t),q.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ur(t,n,r,e));ur(i,n,r,e)}});function ur(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ne(e))}}var dr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fr(){return new dr}var pr=fr();function mr(e,t){return new e({type:`string`,...U(t)})}function hr(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...U(t)})}function gr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...U(t)})}function _r(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...U(t)})}function vr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...U(t)})}function yr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...U(t)})}function br(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...U(t)})}function xr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...U(t)})}function Sr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...U(t)})}function Cr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...U(t)})}function wr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...U(t)})}function Tr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...U(t)})}function Er(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...U(t)})}function Dr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...U(t)})}function Or(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...U(t)})}function kr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...U(t)})}function Ar(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...U(t)})}function jr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...U(t)})}function Mr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...U(t)})}function Nr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...U(t)})}function Pr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...U(t)})}function Fr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...U(t)})}function Ir(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...U(t)})}function Lr(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...U(t)})}function Rr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...U(t)})}function zr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...U(t)})}function Br(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...U(t)})}function Vr(e,t){return new e({type:`number`,checks:[],...U(t)})}function Hr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...U(t)})}function Ur(e,t){return new e({type:`boolean`,...U(t)})}function Wr(e){return new e({type:`unknown`})}function Gr(e,t){return new e({type:`never`,...U(t)})}function Kr(e,t){return new zt({check:`less_than`,...U(t),value:e,inclusive:!1})}function qr(e,t){return new zt({check:`less_than`,...U(t),value:e,inclusive:!0})}function Jr(e,t){return new Bt({check:`greater_than`,...U(t),value:e,inclusive:!1})}function Yr(e,t){return new Bt({check:`greater_than`,...U(t),value:e,inclusive:!0})}function Xr(e,t){return new Vt({check:`multiple_of`,...U(t),value:e})}function Zr(e,t){return new Ut({check:`max_length`,...U(t),maximum:e})}function Qr(e,t){return new Wt({check:`min_length`,...U(t),minimum:e})}function $r(e,t){return new Gt({check:`length_equals`,...U(t),length:e})}function ei(e,t){return new qt({check:`string_format`,format:`regex`,...U(t),pattern:e})}function ti(e){return new Jt({check:`string_format`,format:`lowercase`,...U(e)})}function ni(e){return new Yt({check:`string_format`,format:`uppercase`,...U(e)})}function ri(e,t){return new Xt({check:`string_format`,format:`includes`,...U(t),includes:e})}function ii(e,t){return new Zt({check:`string_format`,format:`starts_with`,...U(t),prefix:e})}function ai(e,t){return new Qt({check:`string_format`,format:`ends_with`,...U(t),suffix:e})}function oi(e){return new $t({check:`overwrite`,tx:e})}function si(e){return oi(t=>t.normalize(e))}function ci(){return oi(e=>e.trim())}function li(){return oi(e=>e.toLowerCase())}function ui(){return oi(e=>e.toUpperCase())}function di(e,t,n){return new e({type:`array`,element:t,...U(n)})}function fi(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...U(n)})}function pi(e){let t=mi(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Ne(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Ne(r))}},e(n.value,n)));return t}function mi(e,t){let n=new K({check:`custom`,...U(t)});return n._zod.check=e,n}var hi=x(`ZodISODateTime`,(e,t)=>{hn.init(e,t),Q.init(e,t)});function gi(e){return Lr(hi,e)}var _i=x(`ZodISODate`,(e,t)=>{gn.init(e,t),Q.init(e,t)});function vi(e){return Rr(_i,e)}var yi=x(`ZodISOTime`,(e,t)=>{_n.init(e,t),Q.init(e,t)});function bi(e){return zr(yi,e)}var xi=x(`ZodISODuration`,(e,t)=>{vn.init(e,t),Q.init(e,t)});function Si(e){return Br(xi,e)}var Ci=(e,t)=>{Ue.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ke(e,t)},flatten:{value:t=>Ge(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,M,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,M,2)}},isEmpty:{get(){return e.issues.length===0}}})},wi=x(`ZodError`,Ci),Y=x(`ZodError`,Ci,{Parent:Error}),Ti=qe(Y),Ei=Je(Y),Di=Ye(Y),Oi=Ze(Y),ki=$e(Y),Ai=et(Y),ji=tt(Y),Mi=nt(Y),Ni=rt(Y),Pi=it(Y),Fi=at(Y),Ii=ot(Y),X=x(`ZodType`,(e,t)=>(q.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(E.mergeDefs(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]})),e.clone=(t,n)=>H(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Ti(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Di(e,t,n),e.parseAsync=async(t,n)=>Ei(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Oi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>ki(e,t,n),e.decode=(t,n)=>Ai(e,t,n),e.encodeAsync=async(t,n)=>ji(e,t,n),e.decodeAsync=async(t,n)=>Mi(e,t,n),e.safeEncode=(t,n)=>Ni(e,t,n),e.safeDecode=(t,n)=>Pi(e,t,n),e.safeEncodeAsync=async(t,n)=>Fi(e,t,n),e.safeDecodeAsync=async(t,n)=>Ii(e,t,n),e.refine=(t,n)=>e.check(Wa(t,n)),e.superRefine=t=>e.check(Ga(t)),e.overwrite=t=>e.check(oi(t)),e.optional=()=>Oa(e),e.nullable=()=>Aa(e),e.nullish=()=>Oa(Aa(e)),e.nonoptional=t=>Ia(e,t),e.array=()=>ma(e),e.or=t=>va([e,t]),e.and=t=>ba(e,t),e.transform=t=>Ba(e,Ea(t)),e.default=t=>Ma(e,t),e.prefault=t=>Pa(e,t),e.catch=t=>Ra(e,t),e.pipe=t=>Ba(e,t),e.readonly=()=>Ha(e),e.describe=t=>{let n=e.clone();return pr.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return pr.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return pr.get(e);let n=e.clone();return pr.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Li=x(`_ZodString`,(e,t)=>{nn.init(e,t),X.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(ei(...t)),e.includes=(...t)=>e.check(ri(...t)),e.startsWith=(...t)=>e.check(ii(...t)),e.endsWith=(...t)=>e.check(ai(...t)),e.min=(...t)=>e.check(Qr(...t)),e.max=(...t)=>e.check(Zr(...t)),e.length=(...t)=>e.check($r(...t)),e.nonempty=(...t)=>e.check(Qr(1,...t)),e.lowercase=t=>e.check(ti(t)),e.uppercase=t=>e.check(ni(t)),e.trim=()=>e.check(ci()),e.normalize=(...t)=>e.check(si(...t)),e.toLowerCase=()=>e.check(li()),e.toUpperCase=()=>e.check(ui())}),Ri=x(`ZodString`,(e,t)=>{nn.init(e,t),Li.init(e,t),e.email=t=>e.check(hr(zi,t)),e.url=t=>e.check(xr(Hi,t)),e.jwt=t=>e.check(Ir(ra,t)),e.emoji=t=>e.check(Sr(Ui,t)),e.guid=t=>e.check(gr(Bi,t)),e.uuid=t=>e.check(_r(Vi,t)),e.uuidv4=t=>e.check(vr(Vi,t)),e.uuidv6=t=>e.check(yr(Vi,t)),e.uuidv7=t=>e.check(br(Vi,t)),e.nanoid=t=>e.check(Cr(Wi,t)),e.guid=t=>e.check(gr(Bi,t)),e.cuid=t=>e.check(wr(Gi,t)),e.cuid2=t=>e.check(Tr(Ki,t)),e.ulid=t=>e.check(Er(qi,t)),e.base64=t=>e.check(Nr(ea,t)),e.base64url=t=>e.check(Pr(ta,t)),e.xid=t=>e.check(Dr(Ji,t)),e.ksuid=t=>e.check(Or(Yi,t)),e.ipv4=t=>e.check(kr(Xi,t)),e.ipv6=t=>e.check(Ar(Zi,t)),e.cidrv4=t=>e.check(jr(Qi,t)),e.cidrv6=t=>e.check(Mr($i,t)),e.e164=t=>e.check(Fr(na,t)),e.datetime=t=>e.check(gi(t)),e.date=t=>e.check(vi(t)),e.time=t=>e.check(bi(t)),e.duration=t=>e.check(Si(t))});function Z(e){return mr(Ri,e)}var Q=x(`ZodStringFormat`,(e,t)=>{J.init(e,t),Li.init(e,t)}),zi=x(`ZodEmail`,(e,t)=>{on.init(e,t),Q.init(e,t)}),Bi=x(`ZodGUID`,(e,t)=>{rn.init(e,t),Q.init(e,t)}),Vi=x(`ZodUUID`,(e,t)=>{an.init(e,t),Q.init(e,t)}),Hi=x(`ZodURL`,(e,t)=>{sn.init(e,t),Q.init(e,t)}),Ui=x(`ZodEmoji`,(e,t)=>{cn.init(e,t),Q.init(e,t)}),Wi=x(`ZodNanoID`,(e,t)=>{ln.init(e,t),Q.init(e,t)}),Gi=x(`ZodCUID`,(e,t)=>{un.init(e,t),Q.init(e,t)}),Ki=x(`ZodCUID2`,(e,t)=>{dn.init(e,t),Q.init(e,t)}),qi=x(`ZodULID`,(e,t)=>{fn.init(e,t),Q.init(e,t)}),Ji=x(`ZodXID`,(e,t)=>{pn.init(e,t),Q.init(e,t)}),Yi=x(`ZodKSUID`,(e,t)=>{mn.init(e,t),Q.init(e,t)}),Xi=x(`ZodIPv4`,(e,t)=>{yn.init(e,t),Q.init(e,t)}),Zi=x(`ZodIPv6`,(e,t)=>{bn.init(e,t),Q.init(e,t)}),Qi=x(`ZodCIDRv4`,(e,t)=>{xn.init(e,t),Q.init(e,t)}),$i=x(`ZodCIDRv6`,(e,t)=>{Sn.init(e,t),Q.init(e,t)}),ea=x(`ZodBase64`,(e,t)=>{wn.init(e,t),Q.init(e,t)}),ta=x(`ZodBase64URL`,(e,t)=>{En.init(e,t),Q.init(e,t)}),na=x(`ZodE164`,(e,t)=>{Dn.init(e,t),Q.init(e,t)}),ra=x(`ZodJWT`,(e,t)=>{kn.init(e,t),Q.init(e,t)}),ia=x(`ZodNumber`,(e,t)=>{An.init(e,t),X.init(e,t),e.gt=(t,n)=>e.check(Jr(t,n)),e.gte=(t,n)=>e.check(Yr(t,n)),e.min=(t,n)=>e.check(Yr(t,n)),e.lt=(t,n)=>e.check(Kr(t,n)),e.lte=(t,n)=>e.check(qr(t,n)),e.max=(t,n)=>e.check(qr(t,n)),e.int=t=>e.check(sa(t)),e.safe=t=>e.check(sa(t)),e.positive=t=>e.check(Jr(0,t)),e.nonnegative=t=>e.check(Yr(0,t)),e.negative=t=>e.check(Kr(0,t)),e.nonpositive=t=>e.check(qr(0,t)),e.multipleOf=(t,n)=>e.check(Xr(t,n)),e.step=(t,n)=>e.check(Xr(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function aa(e){return Vr(ia,e)}var oa=x(`ZodNumberFormat`,(e,t)=>{jn.init(e,t),ia.init(e,t)});function sa(e){return Hr(oa,e)}var ca=x(`ZodBoolean`,(e,t)=>{Mn.init(e,t),X.init(e,t)});function $(e){return Ur(ca,e)}var la=x(`ZodUnknown`,(e,t)=>{Nn.init(e,t),X.init(e,t)});function ua(){return Wr(la)}var da=x(`ZodNever`,(e,t)=>{Pn.init(e,t),X.init(e,t)});function fa(e){return Gr(da,e)}var pa=x(`ZodArray`,(e,t)=>{In.init(e,t),X.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Qr(t,n)),e.nonempty=t=>e.check(Qr(1,t)),e.max=(t,n)=>e.check(Zr(t,n)),e.length=(t,n)=>e.check($r(t,n)),e.unwrap=()=>e.element});function ma(e,t){return di(pa,e,t)}var ha=x(`ZodObject`,(e,t)=>{Vn.init(e,t),X.init(e,t),E.defineLazy(e,`shape`,()=>t.shape),e.keyof=()=>Sa(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ua()}),e.loose=()=>e.clone({...e._zod.def,catchall:ua()}),e.strict=()=>e.clone({...e._zod.def,catchall:fa()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>E.extend(e,t),e.safeExtend=t=>E.safeExtend(e,t),e.merge=t=>E.merge(e,t),e.pick=t=>E.pick(e,t),e.omit=t=>E.omit(e,t),e.partial=(...t)=>E.partial(Da,e,t[0]),e.required=(...t)=>E.required(Fa,e,t[0])});function ga(e,t){return new ha({type:`object`,shape:e??{},...E.normalizeParams(t)})}var _a=x(`ZodUnion`,(e,t)=>{Un.init(e,t),X.init(e,t),e.options=t.options});function va(e,t){return new _a({type:`union`,options:e,...E.normalizeParams(t)})}var ya=x(`ZodIntersection`,(e,t)=>{Wn.init(e,t),X.init(e,t)});function ba(e,t){return new ya({type:`intersection`,left:e,right:t})}var xa=x(`ZodEnum`,(e,t)=>{qn.init(e,t),X.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new xa({...t,checks:[],...E.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new xa({...t,checks:[],...E.normalizeParams(r),entries:i})}});function Sa(e,t){return new xa({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...E.normalizeParams(t)})}var Ca=x(`ZodLiteral`,(e,t)=>{Jn.init(e,t),X.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function wa(e,t){return new Ca({type:`literal`,values:Array.isArray(e)?e:[e],...E.normalizeParams(t)})}var Ta=x(`ZodTransform`,(e,t)=>{Yn.init(e,t),X.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new C(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(E.issue(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(E.issue(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ea(e){return new Ta({type:`transform`,transform:e})}var Da=x(`ZodOptional`,(e,t)=>{Zn.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oa(e){return new Da({type:`optional`,innerType:e})}var ka=x(`ZodNullable`,(e,t)=>{Qn.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Aa(e){return new ka({type:`nullable`,innerType:e})}var ja=x(`ZodDefault`,(e,t)=>{$n.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ma(e,t){return new ja({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():E.shallowClone(t)}})}var Na=x(`ZodPrefault`,(e,t)=>{tr.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Pa(e,t){return new Na({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():E.shallowClone(t)}})}var Fa=x(`ZodNonOptional`,(e,t)=>{nr.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ia(e,t){return new Fa({type:`nonoptional`,innerType:e,...E.normalizeParams(t)})}var La=x(`ZodCatch`,(e,t)=>{ir.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ra(e,t){return new La({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var za=x(`ZodPipe`,(e,t)=>{ar.init(e,t),X.init(e,t),e.in=t.in,e.out=t.out});function Ba(e,t){return new za({type:`pipe`,in:e,out:t})}var Va=x(`ZodReadonly`,(e,t)=>{sr.init(e,t),X.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Ha(e){return new Va({type:`readonly`,innerType:e})}var Ua=x(`ZodCustom`,(e,t)=>{lr.init(e,t),X.init(e,t)});function Wa(e,t={}){return fi(Ua,e,t)}function Ga(e){return pi(e)}var Ka=ga({enabled:$().optional()}),qa=ga({enabled:$().optional()}),Ja=ga({auto:$().optional(),bypassMinReleaseAge:$().optional()}),Ya=va([wa(`auto`),wa(`file`),wa(`keyring`)]),Xa=ga({"// Note":Z().optional(),"// Docs":Z().optional(),skipWrite:$().optional(),token:Z().optional(),userId:Z().optional(),refreshToken:Z().optional(),expiresAt:aa().optional(),tokenSource:va([wa(`flag`),wa(`env`)]).optional()});Xa.omit({tokenSource:!0});var Za=ga({"// Note":Z().optional(),"// Docs":Z().optional(),credStorage:Ya.optional(),currentTeam:Z().optional(),api:Z().optional(),telemetry:Ka.optional(),guidance:qa.optional(),updates:Ja.optional(),useNativeBinary:$().optional(),nativeBinaryAutoOptIn:$().optional()});function Qa(e){return`Invalid value for \`credStorage\`: ${JSON.stringify(e)}. Expected one of: ${v.map(e=>JSON.stringify(e)).join(`, `)}.`}var $a=Ka.passthrough(),eo=qa.passthrough(),to=Ja.passthrough(),no=Sa(v,{error:e=>Qa(e.input)}).optional(),ro=Za.extend({credStorage:no,telemetry:$a.optional(),guidance:eo.optional(),updates:to.optional()}).passthrough(),io=Xa.passthrough(),ao=f(e(`fs`)),oo=f(e(`path`)),so=f(e(`fs`)),co=f(e(`path`)),lo=e(`os`);function uo(e){try{return so.default.lstatSync(e).isDirectory()}catch{return!1}}function fo(e){return g()(e)}function po(e){return fo(e).dataDirs()}function mo(){return po(`com.vercel.cli`)[0]}function ho(){return fo(`com.vercel.cli`).cache()}function go(){let e=po(`com.vercel.cli`);return[...e,co.default.join((0,lo.homedir)(),`.now`),...po(`now`)].find(e=>uo(e))||e[0]}function _o(e){return co.default.join(e,`config.json`)}function vo(e){return co.default.join(e,`auth.json`)}var yo=`https://vercel.com/docs/projects/project-configuration/global-configuration`,bo={"// Note":`This is your Vercel config file. For more information see the global configuration documentation.`,"// Docs":`${yo}#config.json`};function xo(){return{"// Note":`This is your Vercel credentials file. DO NOT SHARE!`,"// Docs":`${yo}#auth.json`}}var So=xo();function Co(e){if(e instanceof wi){let t=e.issues.find(e=>e.path[0]===`credStorage`);if(t)throw Error(t.message)}throw e}function wo(e){try{return ro.parse(e)}catch(e){Co(e)}}function To(e){return io.parse(e)}function Eo(e){let{tokenSource:t,...n}=To(e);return n}function Do(e){let t=ao.default.readFileSync(e,`utf8`).replace(/^\uFEFF/,``);return JSON.parse(t)}function Oo(e,t,n={}){let r=oo.default.dirname(e),i=oo.default.join(r,`.${oo.default.basename(e)}.${process.pid}.${Date.now()}.tmp`),a=`${JSON.stringify(t,null,n.indent??2)}
24
+ `;ao.default.mkdirSync(r,{recursive:!0});try{ao.default.writeFileSync(i,a,{encoding:`utf8`,mode:n.mode}),ao.default.renameSync(i,e)}catch(e){try{ao.default.rmSync(i,{force:!0})}catch{}throw e}}function ko(e,t){return t.parse(Do(e))}function Ao(e,t,n,r){Oo(e,ki(t,n),{indent:2,...r})}function jo(e){try{return ko(e,ro)}catch(e){Co(e)}}function Mo(e,t){Ao(e,ro,t)}function No(e){return ko(e,io)}function Po(e){return Eo(Do(e))}function Fo(e){return No(vo(e))}function Io(e){try{return Fo(e)}catch{return null}}function Lo(e,t){t.skipWrite||Ao(e,io,t,{mode:384})}function Ro(e,t){Lo(vo(e),t)}function zo(e){ao.default.rmSync(e,{force:!0})}function Bo(e){zo(vo(e))}var Vo=`VERCEL_TOKEN_STORAGE`;function Ho(e){return typeof e==`object`&&!!e&&`code`in e}function Uo(e){return v.includes(e)}function Wo(e,t){return`Invalid value for \`${t}\`: ${JSON.stringify(e)}. Expected one of: ${v.map(e=>JSON.stringify(e)).join(`, `)}.`}function Go(e,t=`credStorage`){if(typeof e<`u`){if(Uo(e))return e;throw Error(Wo(e,t))}}function Ko(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.token==`string`&&t.token.length>0||typeof t.refreshToken==`string`&&t.refreshToken.length>0}function qo(e){try{return Ko(No(vo(e)))?`file`:`keyring`}catch{return`keyring`}}function Jo(e,t){return t===`keyring`?`keyring`:t===`auto`?qo(e):b}function Yo(e){let t={},n=process.env[Vo];if(typeof n<`u`)return Jo(e,Go(n,Vo));try{let n=jo(_o(e));t={...n,credStorage:Go(n.credStorage)}}catch(e){if(!(Ho(e)&&e.code===`ENOENT`))throw e}return Jo(e,t.credStorage)}0&&(n.exports={CRED_STORAGE_CONFIG_VALUES:v,CRED_STORAGE_VALUES:y,DEFAULT_CRED_STORAGE:b,authConfigHasUsableTokenData:Ko,authConfigSchema:Xa,credStorageSchema:Ya,defaultAuthConfig:So,defaultGlobalConfig:bo,deleteAuthConfig:Bo,deleteAuthConfigFile:zo,getAuthConfigFilePath:vo,getCachePath:ho,getConfigFilePath:_o,getDataPath:mo,getDefaultAuthConfig:xo,getGlobalPathConfig:go,getLikelyEffectiveCredStorage:Yo,globalConfigSchema:Za,guidanceConfigSchema:qa,parseAuthConfig:To,parseAuthFileConfig:Eo,parseGlobalConfig:wo,readAuthConfig:Fo,readAuthConfigFile:No,readAuthFileConfig:Po,readConfigFile:ko,readGlobalConfigFile:jo,telemetryConfigSchema:Ka,tryReadAuthConfig:Io,updatesConfigSchema:Ja,writeAuthConfig:Ro,writeAuthConfigFile:Lo,writeConfigFile:Ao,writeGlobalConfigFile:Mo})})),se=t(((t,n)=>{var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of s(t))!l.call(e,i)&&i!==n&&a(e,i,{get:()=>t[i],enumerable:!(r=o(t,i))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule?a(n,`default`,{value:e,enumerable:!0}):n,e)),p=e=>d(a({},`__esModule`,{value:!0}),e),m={};u(m,{findRootDir:()=>y,getUserDataDir:()=>b}),n.exports=p(m);var h=f(e(`path`)),g=f(e(`fs`)),_=f(e(`os`)),v=r();function y(){try{let e=process.cwd();for(;e!==h.default.dirname(e);){let t=h.default.join(e,`.vercel`);if(g.default.existsSync(t))return e;e=h.default.dirname(e)}}catch{throw new v.VercelOidcTokenError(`Token refresh only supported in node server environments`)}return null}function b(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(_.default.platform()){case`darwin`:return h.default.join(_.default.homedir(),`Library/Application Support`);case`linux`:return h.default.join(_.default.homedir(),`.local/share`);case`win32`:return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}0&&(n.exports={findRootDir:y,getUserDataDir:b})})),ce=t(((t,n)=>{var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!o.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},l=e=>c(r({},`__esModule`,{value:!0}),e),u={};s(u,{processTokenResponse:()=>g,refreshTokenRequest:()=>h}),n.exports=l(u);var d=e(`os`);let f=`@vercel/oidc node-${process.version} ${(0,d.platform)()} (${(0,d.arch)()}) ${(0,d.hostname)()}`,p=null;async function m(){if(p)return p;let e=await fetch(`https://vercel.com/.well-known/openid-configuration`,{headers:{"user-agent":f}});if(!e.ok)throw Error(`Failed to discover OAuth endpoints`);let t=await e.json();if(!t||typeof t.token_endpoint!=`string`)throw Error(`Invalid OAuth discovery response`);let n=t.token_endpoint;return p=n,n}async function h(e){let t=await m();return await fetch(t,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,"user-agent":f},body:new URLSearchParams({client_id:`cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp`,grant_type:`refresh_token`,...e})})}async function g(e){let t=await e.json();if(!e.ok){let e=typeof t==`object`&&t&&`error`in t?String(t.error):`Token refresh failed`;return[Error(e)]}return typeof t!=`object`||!t?[Error(`Invalid token response`)]:typeof t.access_token==`string`?t.token_type===`Bearer`?typeof t.expires_in==`number`?[null,t]:[Error(`Missing expires_in in response`)]:[Error(`Invalid token_type in response`)]:[Error(`Missing access_token in response`)]}0&&(n.exports={processTokenResponse:g,refreshTokenRequest:h})})),le=t(((t,n)=>{var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},f=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of c(t))!u.call(e,i)&&i!==n&&o(e,i,{get:()=>t[i],enumerable:!(r=s(t,i))||r.enumerable});return e},p=(e,t,n)=>(n=e==null?{}:a(l(e)),f(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e)),m=e=>f(o({},`__esModule`,{value:!0}),e),h={};d(h,{assertVercelOidcTokenResponse:()=>D,findProjectInfo:()=>O,getTokenPayload:()=>A,getVercelOidcToken:()=>ee,getVercelOidcTokenFromCli:()=>E,getVercelToken:()=>w,isExpired:()=>j,loadToken:()=>te,saveToken:()=>k}),n.exports=m(h);var g=p(e(`path`)),_=p(e(`fs`)),v=ae(),y=oe(),b=r(),x=se(),S=ce(),C=i();async function w(e){let t=(0,y.getGlobalPathConfig)(),n=(0,y.tryReadAuthConfig)(t);if(!n||!n.token&&!n.refreshToken)throw new C.AccessTokenMissingError;if(T(n,e?.expirationBufferMs))return n.token;if(!n.refreshToken)throw(0,y.writeAuthConfig)(t,{}),new C.RefreshAccessTokenFailedError(`No refresh token available`);try{let e=await(0,S.refreshTokenRequest)({refresh_token:n.refreshToken}),[r,i]=await(0,S.processTokenResponse)(e);if(r||!i)throw(0,y.writeAuthConfig)(t,{}),new C.RefreshAccessTokenFailedError(r);let a={token:i.access_token,expiresAt:Math.floor(Date.now()/1e3)+i.expires_in,refreshToken:i.refresh_token};return(0,y.writeAuthConfig)(t,a),a.token}catch(e){throw(0,y.writeAuthConfig)(t,{}),e instanceof C.AccessTokenMissingError||e instanceof C.RefreshAccessTokenFailedError?e:new C.RefreshAccessTokenFailedError(e)}}function T(e,t=0){if(!e.token)return!1;if(typeof e.expiresAt!=`number`)return!0;let n=Math.floor(Date.now()/1e3),r=t/1e3;return e.expiresAt>=n+r}async function E(e,t){let n=[`project`,`token`,e,`--format=json`];t&&n.push(`--scope`,t);try{let{stdout:e}=await(0,v.execVercelCli)(n),t;if(typeof e!=`string`)throw new b.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` did not return stdout");try{t=JSON.parse(e)}catch{throw new b.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` returned invalid JSON: "+e)}return D(t),t}catch(e){if(e instanceof b.VercelOidcTokenError)throw e;let t=e instanceof Error?e.message:``,n=e instanceof v.VercelCliError?e.stderr?.trim():void 0;throw n&&!t.includes(n)&&(t=`${t}
25
+ ${n}`.trim()),new b.VercelOidcTokenError(t?`Failed to refresh OIDC token with the Vercel CLI: ${t}`:`Failed to refresh OIDC token with the Vercel CLI`)}}async function ee(e,t,n){let r=`https://api.vercel.com/v1/projects/${t}/token?source=vercel-oidc-refresh${n?`&teamId=${n}`:``}`,i=await fetch(r,{method:`POST`,headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw new b.VercelOidcTokenError(`Failed to refresh OIDC token: ${i.statusText}`);let a=await i.json();return D(a),a}function D(e){if(!e||typeof e!=`object`)throw TypeError(`Vercel OIDC token is malformed. Expected an object.`);if(!(`token`in e)||typeof e.token!=`string`)throw TypeError(`Vercel OIDC token is malformed. Expected a string-valued token property.`)}function O(){let e=(0,x.findRootDir)();if(!e)throw new b.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t=g.join(e,`.vercel`,`project.json`);if(!_.existsSync(t))throw new b.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let n=JSON.parse(_.readFileSync(t,`utf8`));if(typeof n.projectId!=`string`&&typeof n.orgId!=`string`)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:n.projectId,teamId:n.orgId}}function k(e,t){let n=(0,x.getUserDataDir)();if(!n)throw new b.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`);let r=g.join(n,`com.vercel.token`,`${t}.json`),i=JSON.stringify(e);_.mkdirSync(g.dirname(r),{mode:504,recursive:!0}),_.writeFileSync(r,i),_.chmodSync(r,432)}function te(e){let t=(0,x.getUserDataDir)();if(!t)throw new b.VercelOidcTokenError(`Unable to find user data directory. Please reach out to Vercel support.`);let n=g.join(t,`com.vercel.token`,`${e}.json`);if(!_.existsSync(n))return null;let r=JSON.parse(_.readFileSync(n,`utf8`));return D(r),r}function A(e){let t=e.split(`.`);if(t.length!==3)throw new b.VercelOidcTokenError(`Invalid token.`);let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`),r=n.padEnd(n.length+(4-n.length%4)%4,`=`);return JSON.parse(Buffer.from(r,`base64`).toString(`utf8`))}function j(e,t=0){return e.exp*1e3<Date.now()+t}0&&(n.exports={assertVercelOidcTokenResponse:D,findProjectInfo:O,getTokenPayload:A,getVercelOidcToken:ee,getVercelOidcTokenFromCli:E,getVercelToken:w,isExpired:j,loadToken:te,saveToken:k})}));export{r as i,oe as n,i as r,le as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./token-util-BH2pw9Qm.js";export default e();export{};
@@ -0,0 +1 @@
1
+ const e=`3.9.0`;export{e as t};
@@ -1 +1 @@
1
- import{t as e}from"../_chunks/client/rolldown-runtime-DK3Fl9T5.js";import{$ as t,$n as n,$r as r,$t as i,A as a,Aa as o,Ai as s,An as c,Ao as l,Ar as ee,At as te,B as ne,Ba as re,Bi as ie,Br as ae,Bt as oe,C as se,Ci as ce,Co as le,Cr as ue,Ct as de,D as fe,Di as pe,Do as me,Dr as he,Dt as ge,E as _e,Ei as ve,En as ye,Eo as be,Er as xe,Et as Se,F as Ce,Fa as we,Fi as Te,Fn as Ee,Fo as De,Fr as Oe,G as ke,Gi as Ae,Gn as je,Gr as Me,Gt as Ne,H as Pe,Ha as Fe,Hi as Ie,Hr as Le,Ht as Re,I as ze,Ia as Be,Ii as Ve,In as He,Io as Ue,Ir as We,It as Ge,Jn as Ke,Jr as qe,Jt as u,Kn as Je,Kr as Ye,L as Xe,La as Ze,Li as Qe,Lo as $e,Lr as et,Lt as tt,M as nt,Ma as rt,Mi as it,Mn as at,Mo as ot,Mr as st,Mt as ct,N as lt,Na as ut,Ni as dt,Nn as ft,No as pt,Nr as mt,Nt as ht,O as gt,Oa as _t,Oi as vt,On as yt,Oo as bt,Or as xt,Ot as d,P as St,Pa as Ct,Pi as wt,Po as Tt,Pr as Et,Pt as Dt,Q as Ot,Qn as kt,Qr as At,Qt as jt,R as Mt,Ra as Nt,Ri as Pt,Rn as Ft,Ro as It,Rr as Lt,Rt,S as zt,Si as Bt,Sn as Vt,So as Ht,Sr as Ut,St as Wt,T as Gt,Ti as Kt,Tn as qt,To as Jt,Tr as Yt,Tt as Xt,U as Zt,Ua as Qt,Un as $t,Ur as en,Ut as tn,V as nn,Va as rn,Vi as an,Vn as on,Vr as sn,Vt as cn,W as ln,Wa as un,Wn as dn,Wr as fn,Xn as pn,Xr as mn,Xt as hn,Yn as gn,Yr as _n,Yt as f,Z as vn,Zn as yn,Zr as bn,_ as xn,_i as Sn,_n as Cn,_o as p,_r as wn,_t as Tn,a as En,ai as Dn,an as On,ao as kn,ar as An,b as jn,bi as Mn,bo as m,bt as Nn,c as Pn,ci as Fn,cn as In,co as Ln,cr as Rn,ct as zn,d as Bn,di as Vn,dn as Hn,do as Un,dt as Wn,ea as Gn,ei as Kn,en as qn,er as Jn,et as Yn,f as Xn,fi as Zn,fn as Qn,fr as $n,ft as er,g as tr,go as nr,gr as rr,gt as ir,h as ar,hi as or,hn as sr,ho as h,hr as cr,ht as lr,i as ur,ii as dr,in as fr,io as pr,ir as mr,j as hr,ja as gr,ji as _r,jn as vr,jo as yr,jr as br,jt as xr,k as Sr,ka as Cr,ki as wr,kn as Tr,ko as Er,kr as Dr,kt as g,l as Or,li as kr,ln as Ar,lo as jr,lr as Mr,lt as Nr,m as Pr,mi as Fr,mo as Ir,mr as _,mt as Lr,ni as Rr,nn as v,nr as zr,nt as Br,o as Vr,oa as Hr,oi as Ur,ot as Wr,p as Gr,pi as Kr,pn as qr,po as Jr,pr as Yr,pt as Xr,qr as Zr,qt as Qr,ri as $r,rn as y,ro as ei,rt as ti,s as ni,si as ri,sn as ii,so as ai,sr as oi,st as si,t as ci,ti as li,tn as b,tr as ui,tt as di,u as fi,ui as pi,ut as mi,v as hi,vi as gi,vo as _i,w as vi,wi as yi,wo as bi,wr as xi,x as Si,xi as Ci,xn as wi,xo as Ti,xr as Ei,xt as Di,y as Oi,yi as ki,yn as Ai,yo as ji,z as Mi,za as Ni,zi as Pi,zn as Fi,zo as Ii,zr as Li,zt as Ri}from"../_chunks/client/core-CspsxXR-.js";var zi=e({endsWith:()=>de,gt:()=>d,gte:()=>g,includes:()=>xr,length:()=>Ne,lowercase:()=>Qr,lt:()=>u,lte:()=>f,maxLength:()=>jt,maxSize:()=>i,mime:()=>qn,minLength:()=>b,minSize:()=>v,multipleOf:()=>y,negative:()=>ii,nonnegative:()=>Ar,nonpositive:()=>Hn,normalize:()=>Qn,overwrite:()=>Cn,positive:()=>Ai,properties:()=>wi,property:()=>Vt,regex:()=>ye,size:()=>yt,slugify:()=>Tr,startsWith:()=>c,toLowerCase:()=>Ft,toUpperCase:()=>Fi,trim:()=>on,uppercase:()=>gn});const Bi=new WeakSet([Object.prototype,Error.prototype]);function Vi(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const Hi=(e,t)=>{kn.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Bi.has(n)||(Bi.add(n),Vi(n,`format`,e=>t=>Ln(e,t)),Vi(n,`flatten`,e=>t=>ai(e,t)),Vi(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,me,2)}),Vi(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,me,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Ui=h(`ZodError`,Hi),x=h(`ZodError`,Hi,void 0,{Parent:Error}),Wi=Ze(x),Gi=Nt(x),Ki=Qt(x),qi=un(x),Ji=we(x),Yi=ut(x),Xi=Be(x),Zi=Ct(x),Qi=rn(x),$i=Ni(x),ea=Fe(x),ta=re(x);var na=e({ZodAny:()=>_o,ZodArray:()=>Eo,ZodBase64:()=>za,ZodBase64URL:()=>Va,ZodBigInt:()=>L,ZodBigIntFormat:()=>so,ZodBoolean:()=>I,ZodCIDRv4:()=>Fa,ZodCIDRv6:()=>La,ZodCUID:()=>ya,ZodCUID2:()=>xa,ZodCatch:()=>fs,ZodCodec:()=>Y,ZodCreditCard:()=>Ga,ZodCustom:()=>Z,ZodCustomStringFormat:()=>N,ZodDate:()=>wo,ZodDefault:()=>is,ZodDiscriminatedUnion:()=>No,ZodE164:()=>Ua,ZodEmail:()=>aa,ZodEmoji:()=>ha,ZodEnum:()=>W,ZodExactOptional:()=>es,ZodFile:()=>Xo,ZodFunction:()=>Os,ZodGUID:()=>sa,ZodIPv4:()=>ka,ZodIPv6:()=>Na,ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,ZodIntersection:()=>Fo,ZodJWT:()=>qa,ZodKSUID:()=>Da,ZodLazy:()=>ws,ZodLiteral:()=>Jo,ZodMAC:()=>ja,ZodMap:()=>Ho,ZodNaN:()=>ms,ZodNanoID:()=>_a,ZodNever:()=>bo,ZodNonOptional:()=>cs,ZodNull:()=>ho,ZodNullable:()=>ns,ZodNumber:()=>P,ZodNumberFormat:()=>F,ZodObject:()=>B,ZodOptional:()=>G,ZodPipe:()=>J,ZodPrefault:()=>os,ZodPreprocess:()=>ys,ZodPromise:()=>Es,ZodReadonly:()=>bs,ZodRecord:()=>U,ZodSet:()=>Wo,ZodString:()=>w,ZodStringFormat:()=>E,ZodSuccess:()=>us,ZodSymbol:()=>uo,ZodTemplateLiteral:()=>Ss,ZodTransform:()=>Qo,ZodTuple:()=>Lo,ZodType:()=>C,ZodULID:()=>Ca,ZodURL:()=>M,ZodUUID:()=>j,ZodUndefined:()=>po,ZodUnion:()=>V,ZodUnknown:()=>yo,ZodVoid:()=>So,ZodXID:()=>Ta,ZodXor:()=>jo,_ZodString:()=>ia,_default:()=>as,_function:()=>X,any:()=>vo,array:()=>z,base64:()=>Ba,base64url:()=>Ha,bigint:()=>oo,boolean:()=>ao,catch:()=>ps,check:()=>ks,cidrv4:()=>Ia,cidrv6:()=>Ra,codec:()=>_s,creditCard:()=>Ka,cuid:()=>ba,cuid2:()=>Sa,custom:()=>As,date:()=>To,describe:()=>Ns,discriminatedUnion:()=>Po,e164:()=>Wa,email:()=>oa,emoji:()=>ga,enum:()=>Ko,exactOptional:()=>ts,file:()=>Zo,float32:()=>to,float64:()=>no,function:()=>X,guid:()=>ca,hash:()=>Qa,hex:()=>Za,hostname:()=>Xa,httpUrl:()=>ma,instanceof:()=>Fs,int:()=>eo,int32:()=>ro,int64:()=>co,intersection:()=>Io,invertCodec:()=>vs,ipv4:()=>Aa,ipv6:()=>Pa,json:()=>Ls,jwt:()=>Ja,keyof:()=>Do,ksuid:()=>Oa,lazy:()=>Ts,literal:()=>Yo,looseObject:()=>Ao,looseRecord:()=>Vo,mac:()=>Ma,map:()=>Uo,meta:()=>Ps,nan:()=>hs,nanoid:()=>va,nativeEnum:()=>qo,never:()=>xo,nonoptional:()=>ls,null:()=>go,nullable:()=>q,nullish:()=>rs,number:()=>$a,object:()=>Oo,optional:()=>K,partialRecord:()=>Bo,pipe:()=>gs,prefault:()=>ss,preprocess:()=>Rs,promise:()=>Ds,readonly:()=>xs,record:()=>zo,refine:()=>js,set:()=>Go,strictObject:()=>ko,string:()=>T,stringFormat:()=>Ya,stringbool:()=>Is,success:()=>ds,superRefine:()=>Ms,symbol:()=>fo,templateLiteral:()=>Cs,transform:()=>$o,tuple:()=>Ro,uint32:()=>io,uint64:()=>lo,ulid:()=>wa,undefined:()=>mo,union:()=>H,unknown:()=>R,url:()=>pa,uuid:()=>la,uuidv4:()=>ua,uuidv6:()=>da,uuidv7:()=>fa,void:()=>Co,xid:()=>Ea,xor:()=>Mo});function ra(){_i.localeError||p(wn())}function S(){_i.memoizer||p({memoizer:Ei()})}const C=h(`ZodType`,(e,t)=>(ra(),dt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Er(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return m(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(js(e,t))},superRefine(e,t){return this.check(Ms(e,t))},overwrite(e){return this.check(Cn(e))},optional(){return K(this)},exactOptional(){return ts(this)},nullable(){return q(this)},nullish(){return K(q(this))},nonoptional(e){return ls(this,e)},array(){return z(this)},or(e){return H([this,e])},and(e){return Io(this,e)},transform(e){return gs(this,$o(e))},default(e){return as(this,e)},prefault(e){return ss(this,e)},catch(e){return ps(this,e)},pipe(e){return gs(this,e)},readonly(){return xs(this)},describe(e){let t=this.clone();return _.add(t,{description:e}),t},meta(...e){if(e.length===0)return _.get(this);let t=this.clone();return _.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 le(this,`~standard`,{...Gn(this),jsonSchema:{input:ln(this,`input`),output:ln(this,`output`)}})},set"~standard"(e){ot(this,`~standard`,e)},parse:function e(t,n){return Wi(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Gi(this,t,n,{callee:e})},safeParse(e,t){return Ki(this,e,t)},async safeParseAsync(e,t){return qi(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ot(this,`spa`,e)},encode:function e(t,n){return Ji(this,t,n,{callee:e})},decode:function e(t,n){return Yi(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Xi(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Zi(this,t,n,{callee:e})},safeEncode(e,t){return Qi(this,e,t)},safeDecode(e,t){return $i(this,e,t)},async safeEncodeAsync(e,t){return ea(this,e,t)},async safeDecodeAsync(e,t){return ta(this,e,t)},toJSONSchema(e){return ke(this,{})(e)},get description(){return _.get(this)?.description},get _def(){return this._zod.def}}),ia=h(`_ZodString`,(e,t)=>{ve.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lt(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(ye(...e))},includes(...e){return this.check(xr(...e))},startsWith(...e){return this.check(c(...e))},endsWith(...e){return this.check(de(...e))},min(...e){return this.check(b(...e))},max(...e){return this.check(jt(...e))},length(...e){return this.check(Ne(...e))},nonempty(...e){return this.check(b(1,...e))},lowercase(e){return this.check(Qr(e))},uppercase(e){return this.check(gn(e))},trim(){return this.check(on())},normalize(...e){return this.check(Qn(...e))},toLowerCase(){return this.check(Ft())},toUpperCase(){return this.check(Fi())},slugify(){return this.check(Tr())}}),w=h(`ZodString`,(e,t)=>{ve.init(e,t),ia.init(e,t)},{email(e){return this.check(Di(aa,e))},url(e){return this.check(pn(M,e))},jwt(e){return this.check(Re(qa,e))},emoji(e){return this.check(Wt(ha,e))},guid(e){return this.check(te(sa,e))},uuid(e){return this.check(yn(j,e))},uuidv4(e){return this.check(kt(j,e))},uuidv6(e){return this.check(n(j,e))},uuidv7(e){return this.check(Jn(j,e))},nanoid(e){return this.check(On(_a,e))},cuid(e){return this.check(Lr(ya,e))},cuid2(e){return this.check(lr(xa,e))},ulid(e){return this.check(je(Ca,e))},base64(e){return this.check(Yn(za,e))},base64url(e){return this.check(di(Va,e))},xid(e){return this.check(zr(Ta,e))},ksuid(e){return this.check(tn(Da,e))},ipv4(e){return this.check(Ge(ka,e))},ipv6(e){return this.check(tt(Na,e))},cidrv4(e){return this.check(Wr(Fa,e))},cidrv6(e){return this.check(si(La,e))},e164(e){return this.check(Nn(Ua,e))},datetime(e){return this.check(Ri(D,e))},date(e){return this.check(Rt(O,e))},time(e){return this.check(cn(k,e))},duration(e){return this.check(oe(A,e))}});function T(e){return vr(w,e)}const E=h(`ZodStringFormat`,(e,t)=>{pe.init(e,t),ia.init(e,t)}),D=h(`ZodISODateTime`,(e,t)=>{At.init(e,t),E.init(e,t)}),O=h(`ZodISODate`,(e,t)=>{bn.init(e,t),E.init(e,t)}),k=h(`ZodISOTime`,(e,t)=>{Kn.init(e,t),E.init(e,t)}),A=h(`ZodISODuration`,(e,t)=>{r.init(e,t),E.init(e,t)}),aa=h(`ZodEmail`,(e,t)=>{Le.init(e,t),E.init(e,t)});function oa(e){return Di(aa,e)}const sa=h(`ZodGUID`,(e,t)=>{qe.init(e,t),E.init(e,t)});function ca(e){return te(sa,e)}const j=h(`ZodUUID`,(e,t)=>{Ve.init(e,t),E.init(e,t)});function la(e){return yn(j,e)}function ua(e){return kt(j,e)}function da(e){return n(j,e)}function fa(e){return Jn(j,e)}const M=h(`ZodURL`,(e,t)=>{Te.init(e,t),E.init(e,t)});function pa(e){return pn(M,e)}function ma(e){return pn(M,{protocol:gr,hostname:_t,...l(e)})}const ha=h(`ZodEmoji`,(e,t)=>{en.init(e,t),E.init(e,t)});function ga(e){return Wt(ha,e)}const _a=h(`ZodNanoID`,(e,t)=>{kr.init(e,t),E.init(e,t)});function va(e){return On(_a,e)}const ya=h(`ZodCUID`,(e,t)=>{br.init(e,t),E.init(e,t)});function ba(e){return Lr(ya,e)}const xa=h(`ZodCUID2`,(e,t)=>{st.init(e,t),E.init(e,t)});function Sa(e){return lr(xa,e)}const Ca=h(`ZodULID`,(e,t)=>{wt.init(e,t),E.init(e,t)});function wa(e){return je(Ca,e)}const Ta=h(`ZodXID`,(e,t)=>{an.init(e,t),E.init(e,t)});function Ea(e){return zr(Ta,e)}const Da=h(`ZodKSUID`,(e,t)=>{$r.init(e,t),E.init(e,t)});function Oa(e){return tn(Da,e)}const ka=h(`ZodIPv4`,(e,t)=>{_n.init(e,t),E.init(e,t)});function Aa(e){return Ge(ka,e)}const ja=h(`ZodMAC`,(e,t)=>{Ur.init(e,t),E.init(e,t)});function Ma(e){return hn(ja,e)}const Na=h(`ZodIPv6`,(e,t)=>{mn.init(e,t),E.init(e,t)});function Pa(e){return tt(Na,e)}const Fa=h(`ZodCIDRv4`,(e,t)=>{Dr.init(e,t),E.init(e,t)});function Ia(e){return Wr(Fa,e)}const La=h(`ZodCIDRv6`,(e,t)=>{ee.init(e,t),E.init(e,t)});function Ra(e){return si(La,e)}const za=h(`ZodBase64`,(e,t)=>{xi.init(e,t),E.init(e,t)});function Ba(e){return Yn(za,e)}const Va=h(`ZodBase64URL`,(e,t)=>{Yt.init(e,t),E.init(e,t)});function Ha(e){return di(Va,e)}const Ua=h(`ZodE164`,(e,t)=>{sn.init(e,t),E.init(e,t)});function Wa(e){return Nn(Ua,e)}const Ga=h(`ZodCreditCard`,(e,t)=>{Oe.init(e,t),E.init(e,t)});function Ka(e){return Xr(Ga,e)}const qa=h(`ZodJWT`,(e,t)=>{Rr.init(e,t),E.init(e,t)});function Ja(e){return Re(qa,e)}const N=h(`ZodCustomStringFormat`,(e,t)=>{et.init(e,t),E.init(e,t)});function Ya(e,t,n={}){return at(N,e,t,n)}function Xa(e){return at(N,`hostname`,o,e)}function Za(e){return at(N,`hex`,Cr,e)}function Qa(e,t){let n=`${e}_${t?.enc??`hex`}`,r=rt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return at(N,n,r,t)}const P=h(`ZodNumber`,(e,t)=>{Fr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(d(e,t))},gte(e,t){return this.check(g(e,t))},min(e,t){return this.check(g(e,t))},lt(e,t){return this.check(u(e,t))},lte(e,t){return this.check(f(e,t))},max(e,t){return this.check(f(e,t))},int(e){return this.check(eo(e))},safe(e){return this.check(eo(e))},positive(e){return this.check(d(0,e))},nonnegative(e){return this.check(g(0,e))},negative(e){return this.check(u(0,e))},nonpositive(e){return this.check(f(0,e))},multipleOf(e,t){return this.check(y(e,t))},step(e,t){return this.check(y(e,t))},finite(){return this}});function $a(e){return sr(P,e)}const F=h(`ZodNumberFormat`,(e,t)=>{or.init(e,t),P.init(e,t)});function eo(e){return ct(F,e)}function to(e){return Se(F,e)}function no(e){return ge(F,e)}function ro(e){return ht(F,e)}function io(e){return $t(F,e)}const I=h(`ZodBoolean`,(e,t)=>{xt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r)});function ao(e){return ti(I,e)}const L=h(`ZodBigInt`,(e,t)=>{xe.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(g(e,t))},min(e,t){return this.check(g(e,t))},gt(e,t){return this.check(d(e,t))},lt(e,t){return this.check(u(e,t))},lte(e,t){return this.check(f(e,t))},max(e,t){return this.check(f(e,t))},positive(e){return this.check(d(BigInt(0),e))},negative(e){return this.check(u(BigInt(0),e))},nonpositive(e){return this.check(f(BigInt(0),e))},nonnegative(e){return this.check(g(BigInt(0),e))},multipleOf(e,t){return this.check(y(e,t))}});function oo(e){return Br(L,e)}const so=h(`ZodBigIntFormat`,(e,t)=>{he.init(e,t),L.init(e,t)});function co(e){return Dt(so,e)}function lo(e){return dn(so,e)}const uo=h(`ZodSymbol`,(e,t)=>{wr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ce(e,t,n,r)});function fo(e){return He(uo,e)}const po=h(`ZodUndefined`,(e,t)=>{Qe.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ne(e,t,n,r)});function mo(e){return Je(po,e)}const ho=h(`ZodNull`,(e,t)=>{Zn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zt(e,t,n,r)});function go(e){return qr(ho,e)}const _o=h(`ZodAny`,(e,t)=>{Ut.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ur(e,t,n,r)});function vo(){return Ot(_o)}const yo=h(`ZodUnknown`,(e,t)=>{Pi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pe(e,t,n,r)});function R(){return Ke(yo)}const bo=h(`ZodNever`,(e,t)=>{pi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jn(e,t,n,r)});function xo(e){return In(bo,e)}const So=h(`ZodVoid`,(e,t)=>{ie.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zt(e,t,n,r)});function Co(e){return ui(So,e)}const wo=h(`ZodDate`,(e,t)=>{Lt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.min=(t,n)=>e.check(g(t,n)),e.max=(t,n)=>e.check(f(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function To(e){return Tn(wo,e)}const Eo=h(`ZodArray`,(e,t)=>{S(),ue.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>En(e,t,n,r),e.element=t.element},{min(e,t){return this.check(b(e,t))},nonempty(e){return this.check(b(1,e))},max(e,t){return this.check(jt(e,t))},length(e,t){return this.check(Ne(e,t))},unwrap(){return this.element}});function z(e,n){return t(Eo,e,n)}function Do(e){let t=e._zod.def.shape;return Ko(Object.keys(t))}const B=h(`ZodObject`,(e,t)=>{S(),Sn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gt(e,t,n,r),bi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Ko(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:R()})},loose(){return this.clone({...this._zod.def,catchall:R()})},strict(){return this.clone({...this._zod.def,catchall:xo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ht(this,e)},safeExtend(e){return Ue(this,e)},merge(e){return bt(this,e)},pick(e){return Tt(this,e)},omit(e){return yr(this,e)},partial(...e){return pt(G,this,e[0])},exactPartial(...e){return pt(es,this,e[0],`exactPartial`)},required(...e){return De(cs,this,e[0])}});function Oo(e,t){let n={type:`object`,shape:e??{},...l(t)};return new B(n)}function ko(e,t){return new B({type:`object`,shape:e,catchall:xo(),...l(t)})}function Ao(e,t){return new B({type:`object`,shape:e,catchall:R(),...l(t)})}const V=h(`ZodUnion`,(e,t)=>{Pt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,n,r),e.options=t.options});function H(e,t){return new V({type:`union`,options:e,...l(t)})}const jo=h(`ZodXor`,(e,t)=>{V.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,n,r),e.options=t.options});function Mo(e,t){return new jo({type:`union`,options:e,inclusive:!1,...l(t)})}const No=h(`ZodDiscriminatedUnion`,(e,t)=>{V.init(e,t),ae.init(e,t)});function Po(e,t,n){return new No({type:`union`,options:t,discriminator:e,...l(n)})}const Fo=h(`ZodIntersection`,(e,t)=>{li.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ar(e,t,n,r)});function Io(e,t){return new Fo({type:`intersection`,left:e,right:t})}const Lo=h(`ZodTuple`,(e,t)=>{S(),it.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new G({type:`optional`,innerType:e}))})}});function Ro(e,t,n){let r=t instanceof dt;return new Lo({type:`tuple`,items:e,rest:r?t:null,...l(r?n:t)})}const U=h(`ZodRecord`,(e,t)=>{S(),yi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hr(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function zo(e,t,n){return!t||!t._zod?new U({type:`record`,keyType:T(),valueType:e,...l(t)}):new U({type:`record`,keyType:e,valueType:t,...l(n)})}function Bo(e,t,n){return new U({type:`record`,keyType:e,valueType:t,...l(n),partial:!0})}function Vo(e,t,n){return new U({type:`record`,keyType:e,valueType:t,mode:`loose`,...l(n)})}const Ho=h(`ZodMap`,(e,t)=>{S(),ri.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(v(...t)),e.nonempty=t=>e.check(v(1,t)),e.max=(...t)=>e.check(i(...t)),e.size=(...t)=>e.check(yt(...t))});function Uo(e,t,n){return new Ho({type:`map`,keyType:e,valueType:t,...l(n)})}const Wo=h(`ZodSet`,(e,t)=>{S(),Kt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nt(e,t,n,r),e.min=(...t)=>e.check(v(...t)),e.nonempty=t=>e.check(v(1,t)),e.max=(...t)=>e.check(i(...t)),e.size=(...t)=>e.check(yt(...t))});function Go(e,t){return new Wo({type:`set`,valueType:e,...l(t)})}const W=h(`ZodEnum`,(e,t)=>{fn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xn(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new W({...t,checks:[],...l(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new W({...t,checks:[],...l(r),entries:i})}});function Ko(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new W({type:`enum`,entries:n,...l(t)})}function qo(e,t){return new W({type:`enum`,entries:e,...l(t)})}const Jo=h(`ZodLiteral`,(e,t)=>{Dn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xn(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Yo(e,t){return new Jo({type:`literal`,values:Array.isArray(e)?e:[e],...l(t)})}const Xo=h(`ZodFile`,(e,t)=>{Ye.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gr(e,t,n,r),e.min=(t,n)=>e.check(v(t,n)),e.max=(t,n)=>e.check(i(t,n)),e.mime=(t,n)=>e.check(qn(Array.isArray(t)?t:[t],n))});function Zo(e){return Xt(Xo,e)}const Qo=h(`ZodTransform`,(e,t)=>{S(),_r.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mt(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Jr(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(be(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(be(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function $o(e){return new Qo({type:`transform`,transform:e})}const G=h(`ZodOptional`,(e,t)=>{gi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_e(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function K(e){return new G({type:`optional`,innerType:e})}const es=h(`ZodExactOptional`,(e,t)=>{Me.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_e(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ts(e){return new es({type:`optional`,innerType:e})}const ns=h(`ZodNullable`,(e,t)=>{Kr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>se(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q(e){return new ns({type:`nullable`,innerType:e})}function rs(e){return K(q(e))}const is=h(`ZodDefault`,(e,t)=>{Li.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bn(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function as(e,t){return new is({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():$e(t)}})}const os=h(`ZodPrefault`,(e,t)=>{Mn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ss(e,t){return new os({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():$e(t)}})}const cs=h(`ZodNonOptional`,(e,t)=>{Vn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ls(e,t){return new cs({type:`nonoptional`,innerType:e,...l(t)})}const us=h(`ZodSuccess`,(e,t)=>{vt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>St(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ds(e){return new us({type:`success`,innerType:e})}const fs=h(`ZodCatch`,(e,t)=>{mt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pn(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ps(e,t){return new fs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ti(t)})}const ms=h(`ZodNaN`,(e,t)=>{Fn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r)});function hs(e){return fr(ms,e)}const J=h(`ZodPipe`,(e,t)=>{ki.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fe(e,t,n,r),e.in=t.in,e.out=t.out});function gs(e,t){return new J({type:`pipe`,in:e,out:t})}const Y=h(`ZodCodec`,(e,t)=>{J.init(e,t),Et.init(e,t)});function _s(e,t,n){return new Y({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function vs(e){let t=e._zod.def;return new Y({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const ys=h(`ZodPreprocess`,(e,t)=>{J.init(e,t),Ci.init(e,t)}),bs=h(`ZodReadonly`,(e,t)=>{ce.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xs(e){return new bs({type:`readonly`,innerType:e})}const Ss=h(`ZodTemplateLiteral`,(e,t)=>{s.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ze(e,t,n,r)});function Cs(e,t){return new Ss({type:`template_literal`,parts:e,...l(t)})}const ws=h(`ZodLazy`,(e,t)=>{dr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tr(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Ts(e){return new ws({type:`lazy`,getter:e})}const Es=h(`ZodPromise`,(e,t)=>{Bt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Es({type:`promise`,innerType:e})}const Os=h(`ZodFunction`,(e,t)=>{Zr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pr(e,t,n,r)});function X(e){return new Os({type:`function`,input:Array.isArray(e?.input)?Ro(e?.input):e?.input??z(R()),output:e?.output??R()})}const Z=h(`ZodCustom`,(e,t)=>{We.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Or(e,t,n,r)});function ks(e){let t=new Hr({check:`custom`});return t._zod.check=e,t}function As(e,t){return ir(Z,e??(()=>!0),t)}function js(e,t={}){return qt(Z,e,t)}function Ms(e,t){return Ee(e,t)}const Ns=mr,Ps=An;function Fs(e,t={}){let n=new Z({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...l(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const Is=(...e)=>ft({Codec:Y,Boolean:I,String:w},...e);function Ls(e){let t=Ts(()=>H([T(e),$a(),ao(),go(),z(t),zo(T(),t)]));return t}function Rs(e,t){return new ys({type:`pipe`,in:$o(e),out:t})}const zs={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 Bs(e){p({customError:e})}function Vs(){return p().customError}var Hs;Hs||={};var Us=e({ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,date:()=>Gs,datetime:()=>Ws,duration:()=>qs,time:()=>Ks});function Ws(e){return Ri(D,e)}function Gs(e){return Rt(O,e)}function Ks(e){return cn(k,e)}function qs(e){return oe(A,e)}const Q={...na,...zi,iso:Us},Js=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`.split(`.`));function Ys(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Xs(e,t){return e.map((e,n)=>n<t?e:e.optional())}function Zs(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Qs(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1]===void 0?void 0:Zs(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function $s(e,t){return Q.transform(e=>e).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function ec(e,t){if(e!==!1)return e===void 0||e===!0?Q.any():$(e,t)}const tc=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function nc(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(Qs(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>nc({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime({offset:!0})):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.regex(tc)):n===`duration`?t=t.check(Q.iso.duration()):n===`hostname`?t=t.check(Q.hostname()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`credit_card`?t=t.check(Q.creditCard()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?$(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=$(r,t);ji(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}if(e.additionalProperties===!1){let e=Object.keys(n),t=a.map(e=>new RegExp(e)),i=r;r=r.check(n=>{if(!Jt(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=Q.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=$s(r,$(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=Xs(n.map(e=>$(e,t)),a),s=Array.isArray(i)?void 0:ec(i,t),c=Q.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=Xs(i.map(e=>$(e,t)),n),o=ec(e.additionalItems,t),s=Q.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=nc(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);e.propertyNames!==void 0&&e.type===`object`&&e.$ref===void 0&&(i.propertyNames=e.propertyNames);for(let t of Object.keys(e))Js.has(t)||ji(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function rc(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Ys(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??_};return $(n,r)}const ic=Symbol(`z.visit/resolving`);function ac(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===ic)return new dr({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,ic);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?m(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:m(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?m(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:m(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:m(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?m(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:m(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:m(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:m(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:m(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return m(e,{...a,getter:()=>i(n())})}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 e;default:return e}}return i(e)}function oc(e){return ac(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:H(t.options)}})}function sc(e,t){if(!t?.length)return e;let n=e._zod.def;return m(e,Er(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function cc(e){return sc(e.out,e.checks)}function lc(e){return e.in._zod.traits.has(`$ZodTransform`)?cc(e):e.in}function uc(e){return ac(e,{pipe:e=>lc(e._zod.def),default:(e,t)=>t?K(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function dc(e){return ac(e,{pipe:e=>cc(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var fc=e({bigint:()=>gc,boolean:()=>hc,date:()=>_c,number:()=>mc,string:()=>pc});function pc(e){return er(w,e)}function mc(e){return Wn(P,e)}function hc(e){return Nr(I,e)}function gc(e){return zn(L,e)}function _c(e){return mi(wo,e)}var vc=e({$brand:()=>Ir,$input:()=>$n,$output:()=>Yr,NEVER:()=>nr,TimePrecision:()=>vn,ZodAny:()=>_o,ZodArray:()=>Eo,ZodBase64:()=>za,ZodBase64URL:()=>Va,ZodBigInt:()=>L,ZodBigIntFormat:()=>so,ZodBoolean:()=>I,ZodCIDRv4:()=>Fa,ZodCIDRv6:()=>La,ZodCUID:()=>ya,ZodCUID2:()=>xa,ZodCatch:()=>fs,ZodCodec:()=>Y,ZodCompileAsyncError:()=>oi,ZodCompileUnsupportedError:()=>Rn,ZodCreditCard:()=>Ga,ZodCustom:()=>Z,ZodCustomStringFormat:()=>N,ZodDate:()=>wo,ZodDefault:()=>is,ZodDiscriminatedUnion:()=>No,ZodE164:()=>Ua,ZodEmail:()=>aa,ZodEmoji:()=>ha,ZodEnum:()=>W,ZodError:()=>Ui,ZodExactOptional:()=>es,ZodFile:()=>Xo,ZodFirstPartyTypeKind:()=>Hs,ZodFunction:()=>Os,ZodGUID:()=>sa,ZodIPv4:()=>ka,ZodIPv6:()=>Na,ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,ZodIntersection:()=>Fo,ZodIssueCode:()=>zs,ZodJWT:()=>qa,ZodKSUID:()=>Da,ZodLazy:()=>ws,ZodLiteral:()=>Jo,ZodMAC:()=>ja,ZodMap:()=>Ho,ZodNaN:()=>ms,ZodNanoID:()=>_a,ZodNever:()=>bo,ZodNonOptional:()=>cs,ZodNull:()=>ho,ZodNullable:()=>ns,ZodNumber:()=>P,ZodNumberFormat:()=>F,ZodObject:()=>B,ZodOptional:()=>G,ZodPipe:()=>J,ZodPrefault:()=>os,ZodPreprocess:()=>ys,ZodPromise:()=>Es,ZodReadonly:()=>bs,ZodRealError:()=>x,ZodRecord:()=>U,ZodSet:()=>Wo,ZodString:()=>w,ZodStringFormat:()=>E,ZodSuccess:()=>us,ZodSymbol:()=>uo,ZodTemplateLiteral:()=>Ss,ZodTransform:()=>Qo,ZodTuple:()=>Lo,ZodType:()=>C,ZodULID:()=>Ca,ZodURL:()=>M,ZodUUID:()=>j,ZodUndefined:()=>po,ZodUnion:()=>V,ZodUnknown:()=>yo,ZodVoid:()=>So,ZodXID:()=>Ta,ZodXor:()=>jo,_ZodString:()=>ia,_default:()=>as,_function:()=>X,any:()=>vo,array:()=>z,base64:()=>Ba,base64url:()=>Ha,bigint:()=>oo,boolean:()=>ao,catch:()=>ps,check:()=>ks,cidrv4:()=>Ia,cidrv6:()=>Ra,clone:()=>m,codec:()=>_s,coerce:()=>fc,compile:()=>Mr,config:()=>p,core:()=>ci,creditCard:()=>Ka,cuid:()=>ba,cuid2:()=>Sa,custom:()=>As,date:()=>To,decode:()=>Yi,decodeAsync:()=>Zi,deepPartial:()=>oc,describe:()=>Ns,discriminatedUnion:()=>Po,e164:()=>Wa,email:()=>oa,emoji:()=>ga,encode:()=>Ji,encodeAsync:()=>Xi,endsWith:()=>de,enum:()=>Ko,exactOptional:()=>ts,file:()=>Zo,flattenError:()=>ai,float32:()=>to,float64:()=>no,formatError:()=>Ln,fromJSONSchema:()=>rc,function:()=>X,getDiscriminatedOption:()=>Ae,getErrorMap:()=>Vs,globalRegistry:()=>_,gt:()=>d,gte:()=>g,guid:()=>ca,hash:()=>Qa,hex:()=>Za,hostname:()=>Xa,httpUrl:()=>ma,includes:()=>xr,input:()=>uc,instanceof:()=>Fs,int:()=>eo,int32:()=>ro,int64:()=>co,intersection:()=>Io,invertCodec:()=>vs,ipv4:()=>Aa,ipv6:()=>Pa,iso:()=>Us,json:()=>Ls,jwt:()=>Ja,keyof:()=>Do,ksuid:()=>Oa,lazy:()=>Ts,length:()=>Ne,literal:()=>Yo,locales:()=>rr,looseObject:()=>Ao,looseRecord:()=>Vo,lowercase:()=>Qr,lt:()=>u,lte:()=>f,mac:()=>Ma,map:()=>Uo,maxLength:()=>jt,maxSize:()=>i,memoizer:()=>Ei,meta:()=>Ps,mime:()=>qn,minLength:()=>b,minSize:()=>v,multipleOf:()=>y,nan:()=>hs,nanoid:()=>va,nativeEnum:()=>qo,negative:()=>ii,never:()=>xo,nonnegative:()=>Ar,nonoptional:()=>ls,nonpositive:()=>Hn,normalize:()=>Qn,null:()=>go,nullable:()=>q,nullish:()=>rs,number:()=>$a,object:()=>Oo,optional:()=>K,output:()=>dc,overwrite:()=>Cn,parse:()=>Wi,parseAsync:()=>Gi,partialRecord:()=>Bo,pipe:()=>gs,positive:()=>Ai,prefault:()=>ss,preprocess:()=>Rs,prettifyError:()=>jr,promise:()=>Ds,properties:()=>wi,property:()=>Vt,readonly:()=>xs,record:()=>zo,refine:()=>js,regex:()=>ye,regexes:()=>rt,registry:()=>cr,safeDecode:()=>$i,safeDecodeAsync:()=>ta,safeEncode:()=>Qi,safeEncodeAsync:()=>ea,safeParse:()=>Ki,safeParseAsync:()=>qi,set:()=>Go,setErrorMap:()=>Bs,size:()=>yt,slugify:()=>Tr,startsWith:()=>c,strictObject:()=>ko,string:()=>T,stringFormat:()=>Ya,stringbool:()=>Is,success:()=>ds,superRefine:()=>Ms,symbol:()=>fo,templateLiteral:()=>Cs,toJSONSchema:()=>Xe,toLowerCase:()=>Ft,toUpperCase:()=>Fi,toZod:()=>It,transform:()=>$o,treeifyError:()=>Un,trim:()=>on,tuple:()=>Ro,uint32:()=>io,uint64:()=>lo,ulid:()=>wa,undefined:()=>mo,union:()=>H,unknown:()=>R,uppercase:()=>gn,url:()=>pa,util:()=>Ii,uuid:()=>la,uuidv4:()=>ua,uuidv6:()=>da,uuidv7:()=>fa,validate:()=>ei,validateAsync:()=>pr,void:()=>Co,xid:()=>Ea,xor:()=>Mo});export{Ir as $brand,$n as $input,Yr as $output,nr as NEVER,vn as TimePrecision,_o as ZodAny,Eo as ZodArray,za as ZodBase64,Va as ZodBase64URL,L as ZodBigInt,so as ZodBigIntFormat,I as ZodBoolean,Fa as ZodCIDRv4,La as ZodCIDRv6,ya as ZodCUID,xa as ZodCUID2,fs as ZodCatch,Y as ZodCodec,oi as ZodCompileAsyncError,Rn as ZodCompileUnsupportedError,Ga as ZodCreditCard,Z as ZodCustom,N as ZodCustomStringFormat,wo as ZodDate,is as ZodDefault,No as ZodDiscriminatedUnion,Ua as ZodE164,aa as ZodEmail,ha as ZodEmoji,W as ZodEnum,Ui as ZodError,es as ZodExactOptional,Xo as ZodFile,Hs as ZodFirstPartyTypeKind,Os as ZodFunction,sa as ZodGUID,ka as ZodIPv4,Na as ZodIPv6,O as ZodISODate,D as ZodISODateTime,A as ZodISODuration,k as ZodISOTime,Fo as ZodIntersection,zs as ZodIssueCode,qa as ZodJWT,Da as ZodKSUID,ws as ZodLazy,Jo as ZodLiteral,ja as ZodMAC,Ho as ZodMap,ms as ZodNaN,_a as ZodNanoID,bo as ZodNever,cs as ZodNonOptional,ho as ZodNull,ns as ZodNullable,P as ZodNumber,F as ZodNumberFormat,B as ZodObject,G as ZodOptional,J as ZodPipe,os as ZodPrefault,ys as ZodPreprocess,Es as ZodPromise,bs as ZodReadonly,x as ZodRealError,U as ZodRecord,Wo as ZodSet,w as ZodString,E as ZodStringFormat,us as ZodSuccess,uo as ZodSymbol,Ss as ZodTemplateLiteral,Qo as ZodTransform,Lo as ZodTuple,C as ZodType,Ca as ZodULID,M as ZodURL,j as ZodUUID,po as ZodUndefined,V as ZodUnion,yo as ZodUnknown,So as ZodVoid,Ta as ZodXID,jo as ZodXor,ia as _ZodString,as as _default,X as _function,X as function,vo as any,z as array,Ba as base64,Ha as base64url,oo as bigint,ao as boolean,ps as catch,ks as check,Ia as cidrv4,Ra as cidrv6,m as clone,_s as codec,fc as coerce,Mr as compile,p as config,ci as core,Ka as creditCard,ba as cuid,Sa as cuid2,As as custom,To as date,Yi as decode,Zi as decodeAsync,oc as deepPartial,vc as default,vc as z,Ns as describe,Po as discriminatedUnion,Wa as e164,oa as email,ga as emoji,Ji as encode,Xi as encodeAsync,de as endsWith,Ko as enum,ts as exactOptional,Zo as file,ai as flattenError,to as float32,no as float64,Ln as formatError,rc as fromJSONSchema,Ae as getDiscriminatedOption,Vs as getErrorMap,_ as globalRegistry,d as gt,g as gte,ca as guid,Qa as hash,Za as hex,Xa as hostname,ma as httpUrl,xr as includes,uc as input,Fs as instanceof,eo as int,ro as int32,co as int64,Io as intersection,vs as invertCodec,Aa as ipv4,Pa as ipv6,Us as iso,Ls as json,Ja as jwt,Do as keyof,Oa as ksuid,Ts as lazy,Ne as length,Yo as literal,rr as locales,Ao as looseObject,Vo as looseRecord,Qr as lowercase,u as lt,f as lte,Ma as mac,Uo as map,jt as maxLength,i as maxSize,Ei as memoizer,Ps as meta,qn as mime,b as minLength,v as minSize,y as multipleOf,hs as nan,va as nanoid,qo as nativeEnum,ii as negative,xo as never,Ar as nonnegative,ls as nonoptional,Hn as nonpositive,Qn as normalize,go as null,q as nullable,rs as nullish,$a as number,Oo as object,K as optional,dc as output,Cn as overwrite,Wi as parse,Gi as parseAsync,Bo as partialRecord,gs as pipe,Ai as positive,ss as prefault,Rs as preprocess,jr as prettifyError,Ds as promise,wi as properties,Vt as property,xs as readonly,zo as record,js as refine,ye as regex,rt as regexes,cr as registry,$i as safeDecode,ta as safeDecodeAsync,Qi as safeEncode,ea as safeEncodeAsync,Ki as safeParse,qi as safeParseAsync,Go as set,Bs as setErrorMap,yt as size,Tr as slugify,c as startsWith,ko as strictObject,T as string,Ya as stringFormat,Is as stringbool,ds as success,Ms as superRefine,fo as symbol,Cs as templateLiteral,Xe as toJSONSchema,Ft as toLowerCase,Fi as toUpperCase,It as toZod,$o as transform,Un as treeifyError,on as trim,Ro as tuple,io as uint32,lo as uint64,wa as ulid,mo as undefined,H as union,R as unknown,gn as uppercase,pa as url,Ii as util,la as uuid,ua as uuidv4,da as uuidv6,fa as uuidv7,ei as validate,pr as validateAsync,Co as void,Ea as xid,Mo as xor};
1
+ import{t as e}from"../_chunks/client/rolldown-runtime-DK3Fl9T5.js";import{$ as t,$n as n,$r as r,$t as i,A as a,Aa as o,Ai as s,An as c,Ao as l,Ar as ee,At as te,B as ne,Ba as re,Bi as ie,Br as ae,Bt as oe,C as se,Ci as ce,Co as le,Cr as ue,Ct as de,D as fe,Di as pe,Do as me,Dr as he,Dt as ge,E as _e,Ei as ve,En as ye,Eo as be,Er as xe,Et as Se,F as Ce,Fa as we,Fi as Te,Fn as Ee,Fo as De,Fr as Oe,G as ke,Gi as Ae,Gn as je,Gr as Me,Gt as Ne,H as Pe,Ha as Fe,Hi as Ie,Hr as Le,Ht as Re,I as ze,Ia as Be,Ii as Ve,In as He,Io as Ue,Ir as We,It as Ge,Jn as Ke,Jr as qe,Jt as u,Kn as Je,Kr as Ye,L as Xe,La as Ze,Li as Qe,Lo as $e,Lr as et,Lt as tt,M as nt,Ma as rt,Mi as it,Mn as at,Mo as ot,Mr as st,Mt as ct,N as lt,Na as ut,Ni as dt,Nn as ft,No as pt,Nr as mt,Nt as ht,O as gt,Oa as _t,Oi as vt,On as yt,Oo as bt,Or as xt,Ot as d,P as St,Pa as Ct,Pi as wt,Po as Tt,Pr as Et,Pt as Dt,Q as Ot,Qn as kt,Qr as At,Qt as jt,R as Mt,Ra as Nt,Ri as Pt,Rn as Ft,Ro as It,Rr as Lt,Rt,S as zt,Si as Bt,Sn as Vt,So as Ht,Sr as Ut,St as Wt,T as Gt,Ti as Kt,Tn as qt,To as Jt,Tr as Yt,Tt as Xt,U as Zt,Ua as Qt,Un as $t,Ur as en,Ut as tn,V as nn,Va as rn,Vi as an,Vn as on,Vr as sn,Vt as cn,W as ln,Wa as un,Wn as dn,Wr as fn,Xn as pn,Xr as mn,Xt as hn,Yn as gn,Yr as _n,Yt as f,Z as vn,Zn as yn,Zr as bn,_ as xn,_i as Sn,_n as Cn,_o as p,_r as wn,_t as Tn,a as En,ai as Dn,an as On,ao as kn,ar as An,b as jn,bi as Mn,bo as m,bt as Nn,c as Pn,ci as Fn,cn as In,co as Ln,cr as Rn,ct as zn,d as Bn,di as Vn,dn as Hn,do as Un,dt as Wn,ea as Gn,ei as Kn,en as qn,er as Jn,et as Yn,f as Xn,fi as Zn,fn as Qn,fr as $n,ft as er,g as tr,go as nr,gr as rr,gt as ir,h as ar,hi as or,hn as sr,ho as h,hr as cr,ht as lr,i as ur,ii as dr,in as fr,io as pr,ir as mr,j as hr,ja as gr,ji as _r,jn as vr,jo as yr,jr as br,jt as xr,k as Sr,ka as Cr,ki as wr,kn as Tr,ko as Er,kr as Dr,kt as g,l as Or,li as kr,ln as Ar,lo as jr,lr as Mr,lt as Nr,m as Pr,mi as Fr,mo as Ir,mr as _,mt as Lr,ni as Rr,nn as v,nr as zr,nt as Br,o as Vr,oa as Hr,oi as Ur,ot as Wr,p as Gr,pi as Kr,pn as qr,po as Jr,pr as Yr,pt as Xr,qr as Zr,qt as Qr,ri as $r,rn as y,ro as ei,rt as ti,s as ni,si as ri,sn as ii,so as ai,sr as oi,st as si,t as ci,ti as li,tn as b,tr as ui,tt as di,u as fi,ui as pi,ut as mi,v as hi,vi as gi,vo as _i,w as vi,wi as yi,wo as bi,wr as xi,x as Si,xi as Ci,xn as wi,xo as Ti,xr as Ei,xt as Di,y as Oi,yi as ki,yn as Ai,yo as ji,z as Mi,za as Ni,zi as Pi,zn as Fi,zo as Ii,zr as Li,zt as Ri}from"../_chunks/client/core-BsvaaMUJ.js";var zi=e({endsWith:()=>de,gt:()=>d,gte:()=>g,includes:()=>xr,length:()=>Ne,lowercase:()=>Qr,lt:()=>u,lte:()=>f,maxLength:()=>jt,maxSize:()=>i,mime:()=>qn,minLength:()=>b,minSize:()=>v,multipleOf:()=>y,negative:()=>ii,nonnegative:()=>Ar,nonpositive:()=>Hn,normalize:()=>Qn,overwrite:()=>Cn,positive:()=>Ai,properties:()=>wi,property:()=>Vt,regex:()=>ye,size:()=>yt,slugify:()=>Tr,startsWith:()=>c,toLowerCase:()=>Ft,toUpperCase:()=>Fi,trim:()=>on,uppercase:()=>gn});const Bi=new WeakSet([Object.prototype,Error.prototype]);function Vi(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}const Hi=(e,t)=>{kn.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Bi.has(n)||(Bi.add(n),Vi(n,`format`,e=>t=>Ln(e,t)),Vi(n,`flatten`,e=>t=>ai(e,t)),Vi(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,me,2)}),Vi(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,me,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Ui=h(`ZodError`,Hi),x=h(`ZodError`,Hi,void 0,{Parent:Error}),Wi=Ze(x),Gi=Nt(x),Ki=Qt(x),qi=un(x),Ji=we(x),Yi=ut(x),Xi=Be(x),Zi=Ct(x),Qi=rn(x),$i=Ni(x),ea=Fe(x),ta=re(x);var na=e({ZodAny:()=>_o,ZodArray:()=>Eo,ZodBase64:()=>za,ZodBase64URL:()=>Va,ZodBigInt:()=>L,ZodBigIntFormat:()=>so,ZodBoolean:()=>I,ZodCIDRv4:()=>Fa,ZodCIDRv6:()=>La,ZodCUID:()=>ya,ZodCUID2:()=>xa,ZodCatch:()=>fs,ZodCodec:()=>Y,ZodCreditCard:()=>Ga,ZodCustom:()=>Z,ZodCustomStringFormat:()=>N,ZodDate:()=>wo,ZodDefault:()=>is,ZodDiscriminatedUnion:()=>No,ZodE164:()=>Ua,ZodEmail:()=>aa,ZodEmoji:()=>ha,ZodEnum:()=>W,ZodExactOptional:()=>es,ZodFile:()=>Xo,ZodFunction:()=>Os,ZodGUID:()=>sa,ZodIPv4:()=>ka,ZodIPv6:()=>Na,ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,ZodIntersection:()=>Fo,ZodJWT:()=>qa,ZodKSUID:()=>Da,ZodLazy:()=>ws,ZodLiteral:()=>Jo,ZodMAC:()=>ja,ZodMap:()=>Ho,ZodNaN:()=>ms,ZodNanoID:()=>_a,ZodNever:()=>bo,ZodNonOptional:()=>cs,ZodNull:()=>ho,ZodNullable:()=>ns,ZodNumber:()=>P,ZodNumberFormat:()=>F,ZodObject:()=>B,ZodOptional:()=>G,ZodPipe:()=>J,ZodPrefault:()=>os,ZodPreprocess:()=>ys,ZodPromise:()=>Es,ZodReadonly:()=>bs,ZodRecord:()=>U,ZodSet:()=>Wo,ZodString:()=>w,ZodStringFormat:()=>E,ZodSuccess:()=>us,ZodSymbol:()=>uo,ZodTemplateLiteral:()=>Ss,ZodTransform:()=>Qo,ZodTuple:()=>Lo,ZodType:()=>C,ZodULID:()=>Ca,ZodURL:()=>M,ZodUUID:()=>j,ZodUndefined:()=>po,ZodUnion:()=>V,ZodUnknown:()=>yo,ZodVoid:()=>So,ZodXID:()=>Ta,ZodXor:()=>jo,_ZodString:()=>ia,_default:()=>as,_function:()=>X,any:()=>vo,array:()=>z,base64:()=>Ba,base64url:()=>Ha,bigint:()=>oo,boolean:()=>ao,catch:()=>ps,check:()=>ks,cidrv4:()=>Ia,cidrv6:()=>Ra,codec:()=>_s,creditCard:()=>Ka,cuid:()=>ba,cuid2:()=>Sa,custom:()=>As,date:()=>To,describe:()=>Ns,discriminatedUnion:()=>Po,e164:()=>Wa,email:()=>oa,emoji:()=>ga,enum:()=>Ko,exactOptional:()=>ts,file:()=>Zo,float32:()=>to,float64:()=>no,function:()=>X,guid:()=>ca,hash:()=>Qa,hex:()=>Za,hostname:()=>Xa,httpUrl:()=>ma,instanceof:()=>Fs,int:()=>eo,int32:()=>ro,int64:()=>co,intersection:()=>Io,invertCodec:()=>vs,ipv4:()=>Aa,ipv6:()=>Pa,json:()=>Ls,jwt:()=>Ja,keyof:()=>Do,ksuid:()=>Oa,lazy:()=>Ts,literal:()=>Yo,looseObject:()=>Ao,looseRecord:()=>Vo,mac:()=>Ma,map:()=>Uo,meta:()=>Ps,nan:()=>hs,nanoid:()=>va,nativeEnum:()=>qo,never:()=>xo,nonoptional:()=>ls,null:()=>go,nullable:()=>q,nullish:()=>rs,number:()=>$a,object:()=>Oo,optional:()=>K,partialRecord:()=>Bo,pipe:()=>gs,prefault:()=>ss,preprocess:()=>Rs,promise:()=>Ds,readonly:()=>xs,record:()=>zo,refine:()=>js,set:()=>Go,strictObject:()=>ko,string:()=>T,stringFormat:()=>Ya,stringbool:()=>Is,success:()=>ds,superRefine:()=>Ms,symbol:()=>fo,templateLiteral:()=>Cs,transform:()=>$o,tuple:()=>Ro,uint32:()=>io,uint64:()=>lo,ulid:()=>wa,undefined:()=>mo,union:()=>H,unknown:()=>R,url:()=>pa,uuid:()=>la,uuidv4:()=>ua,uuidv6:()=>da,uuidv7:()=>fa,void:()=>Co,xid:()=>Ea,xor:()=>Mo});function ra(){_i.localeError||p(wn())}function S(){_i.memoizer||p({memoizer:Ei()})}const C=h(`ZodType`,(e,t)=>(ra(),dt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Er(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return m(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(js(e,t))},superRefine(e,t){return this.check(Ms(e,t))},overwrite(e){return this.check(Cn(e))},optional(){return K(this)},exactOptional(){return ts(this)},nullable(){return q(this)},nullish(){return K(q(this))},nonoptional(e){return ls(this,e)},array(){return z(this)},or(e){return H([this,e])},and(e){return Io(this,e)},transform(e){return gs(this,$o(e))},default(e){return as(this,e)},prefault(e){return ss(this,e)},catch(e){return ps(this,e)},pipe(e){return gs(this,e)},readonly(){return xs(this)},describe(e){let t=this.clone();return _.add(t,{description:e}),t},meta(...e){if(e.length===0)return _.get(this);let t=this.clone();return _.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 le(this,`~standard`,{...Gn(this),jsonSchema:{input:ln(this,`input`),output:ln(this,`output`)}})},set"~standard"(e){ot(this,`~standard`,e)},parse:function e(t,n){return Wi(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Gi(this,t,n,{callee:e})},safeParse(e,t){return Ki(this,e,t)},async safeParseAsync(e,t){return qi(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ot(this,`spa`,e)},encode:function e(t,n){return Ji(this,t,n,{callee:e})},decode:function e(t,n){return Yi(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Xi(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Zi(this,t,n,{callee:e})},safeEncode(e,t){return Qi(this,e,t)},safeDecode(e,t){return $i(this,e,t)},async safeEncodeAsync(e,t){return ea(this,e,t)},async safeDecodeAsync(e,t){return ta(this,e,t)},toJSONSchema(e){return ke(this,{})(e)},get description(){return _.get(this)?.description},get _def(){return this._zod.def}}),ia=h(`_ZodString`,(e,t)=>{ve.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lt(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(ye(...e))},includes(...e){return this.check(xr(...e))},startsWith(...e){return this.check(c(...e))},endsWith(...e){return this.check(de(...e))},min(...e){return this.check(b(...e))},max(...e){return this.check(jt(...e))},length(...e){return this.check(Ne(...e))},nonempty(...e){return this.check(b(1,...e))},lowercase(e){return this.check(Qr(e))},uppercase(e){return this.check(gn(e))},trim(){return this.check(on())},normalize(...e){return this.check(Qn(...e))},toLowerCase(){return this.check(Ft())},toUpperCase(){return this.check(Fi())},slugify(){return this.check(Tr())}}),w=h(`ZodString`,(e,t)=>{ve.init(e,t),ia.init(e,t)},{email(e){return this.check(Di(aa,e))},url(e){return this.check(pn(M,e))},jwt(e){return this.check(Re(qa,e))},emoji(e){return this.check(Wt(ha,e))},guid(e){return this.check(te(sa,e))},uuid(e){return this.check(yn(j,e))},uuidv4(e){return this.check(kt(j,e))},uuidv6(e){return this.check(n(j,e))},uuidv7(e){return this.check(Jn(j,e))},nanoid(e){return this.check(On(_a,e))},cuid(e){return this.check(Lr(ya,e))},cuid2(e){return this.check(lr(xa,e))},ulid(e){return this.check(je(Ca,e))},base64(e){return this.check(Yn(za,e))},base64url(e){return this.check(di(Va,e))},xid(e){return this.check(zr(Ta,e))},ksuid(e){return this.check(tn(Da,e))},ipv4(e){return this.check(Ge(ka,e))},ipv6(e){return this.check(tt(Na,e))},cidrv4(e){return this.check(Wr(Fa,e))},cidrv6(e){return this.check(si(La,e))},e164(e){return this.check(Nn(Ua,e))},datetime(e){return this.check(Ri(D,e))},date(e){return this.check(Rt(O,e))},time(e){return this.check(cn(k,e))},duration(e){return this.check(oe(A,e))}});function T(e){return vr(w,e)}const E=h(`ZodStringFormat`,(e,t)=>{pe.init(e,t),ia.init(e,t)}),D=h(`ZodISODateTime`,(e,t)=>{At.init(e,t),E.init(e,t)}),O=h(`ZodISODate`,(e,t)=>{bn.init(e,t),E.init(e,t)}),k=h(`ZodISOTime`,(e,t)=>{Kn.init(e,t),E.init(e,t)}),A=h(`ZodISODuration`,(e,t)=>{r.init(e,t),E.init(e,t)}),aa=h(`ZodEmail`,(e,t)=>{Le.init(e,t),E.init(e,t)});function oa(e){return Di(aa,e)}const sa=h(`ZodGUID`,(e,t)=>{qe.init(e,t),E.init(e,t)});function ca(e){return te(sa,e)}const j=h(`ZodUUID`,(e,t)=>{Ve.init(e,t),E.init(e,t)});function la(e){return yn(j,e)}function ua(e){return kt(j,e)}function da(e){return n(j,e)}function fa(e){return Jn(j,e)}const M=h(`ZodURL`,(e,t)=>{Te.init(e,t),E.init(e,t)});function pa(e){return pn(M,e)}function ma(e){return pn(M,{protocol:gr,hostname:_t,...l(e)})}const ha=h(`ZodEmoji`,(e,t)=>{en.init(e,t),E.init(e,t)});function ga(e){return Wt(ha,e)}const _a=h(`ZodNanoID`,(e,t)=>{kr.init(e,t),E.init(e,t)});function va(e){return On(_a,e)}const ya=h(`ZodCUID`,(e,t)=>{br.init(e,t),E.init(e,t)});function ba(e){return Lr(ya,e)}const xa=h(`ZodCUID2`,(e,t)=>{st.init(e,t),E.init(e,t)});function Sa(e){return lr(xa,e)}const Ca=h(`ZodULID`,(e,t)=>{wt.init(e,t),E.init(e,t)});function wa(e){return je(Ca,e)}const Ta=h(`ZodXID`,(e,t)=>{an.init(e,t),E.init(e,t)});function Ea(e){return zr(Ta,e)}const Da=h(`ZodKSUID`,(e,t)=>{$r.init(e,t),E.init(e,t)});function Oa(e){return tn(Da,e)}const ka=h(`ZodIPv4`,(e,t)=>{_n.init(e,t),E.init(e,t)});function Aa(e){return Ge(ka,e)}const ja=h(`ZodMAC`,(e,t)=>{Ur.init(e,t),E.init(e,t)});function Ma(e){return hn(ja,e)}const Na=h(`ZodIPv6`,(e,t)=>{mn.init(e,t),E.init(e,t)});function Pa(e){return tt(Na,e)}const Fa=h(`ZodCIDRv4`,(e,t)=>{Dr.init(e,t),E.init(e,t)});function Ia(e){return Wr(Fa,e)}const La=h(`ZodCIDRv6`,(e,t)=>{ee.init(e,t),E.init(e,t)});function Ra(e){return si(La,e)}const za=h(`ZodBase64`,(e,t)=>{xi.init(e,t),E.init(e,t)});function Ba(e){return Yn(za,e)}const Va=h(`ZodBase64URL`,(e,t)=>{Yt.init(e,t),E.init(e,t)});function Ha(e){return di(Va,e)}const Ua=h(`ZodE164`,(e,t)=>{sn.init(e,t),E.init(e,t)});function Wa(e){return Nn(Ua,e)}const Ga=h(`ZodCreditCard`,(e,t)=>{Oe.init(e,t),E.init(e,t)});function Ka(e){return Xr(Ga,e)}const qa=h(`ZodJWT`,(e,t)=>{Rr.init(e,t),E.init(e,t)});function Ja(e){return Re(qa,e)}const N=h(`ZodCustomStringFormat`,(e,t)=>{et.init(e,t),E.init(e,t)});function Ya(e,t,n={}){return at(N,e,t,n)}function Xa(e){return at(N,`hostname`,o,e)}function Za(e){return at(N,`hex`,Cr,e)}function Qa(e,t){let n=`${e}_${t?.enc??`hex`}`,r=rt[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return at(N,n,r,t)}const P=h(`ZodNumber`,(e,t)=>{Fr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(d(e,t))},gte(e,t){return this.check(g(e,t))},min(e,t){return this.check(g(e,t))},lt(e,t){return this.check(u(e,t))},lte(e,t){return this.check(f(e,t))},max(e,t){return this.check(f(e,t))},int(e){return this.check(eo(e))},safe(e){return this.check(eo(e))},positive(e){return this.check(d(0,e))},nonnegative(e){return this.check(g(0,e))},negative(e){return this.check(u(0,e))},nonpositive(e){return this.check(f(0,e))},multipleOf(e,t){return this.check(y(e,t))},step(e,t){return this.check(y(e,t))},finite(){return this}});function $a(e){return sr(P,e)}const F=h(`ZodNumberFormat`,(e,t)=>{or.init(e,t),P.init(e,t)});function eo(e){return ct(F,e)}function to(e){return Se(F,e)}function no(e){return ge(F,e)}function ro(e){return ht(F,e)}function io(e){return $t(F,e)}const I=h(`ZodBoolean`,(e,t)=>{xt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r)});function ao(e){return ti(I,e)}const L=h(`ZodBigInt`,(e,t)=>{xe.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vr(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(g(e,t))},min(e,t){return this.check(g(e,t))},gt(e,t){return this.check(d(e,t))},lt(e,t){return this.check(u(e,t))},lte(e,t){return this.check(f(e,t))},max(e,t){return this.check(f(e,t))},positive(e){return this.check(d(BigInt(0),e))},negative(e){return this.check(u(BigInt(0),e))},nonpositive(e){return this.check(f(BigInt(0),e))},nonnegative(e){return this.check(g(BigInt(0),e))},multipleOf(e,t){return this.check(y(e,t))}});function oo(e){return Br(L,e)}const so=h(`ZodBigIntFormat`,(e,t)=>{he.init(e,t),L.init(e,t)});function co(e){return Dt(so,e)}function lo(e){return dn(so,e)}const uo=h(`ZodSymbol`,(e,t)=>{wr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ce(e,t,n,r)});function fo(e){return He(uo,e)}const po=h(`ZodUndefined`,(e,t)=>{Qe.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ne(e,t,n,r)});function mo(e){return Je(po,e)}const ho=h(`ZodNull`,(e,t)=>{Zn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zt(e,t,n,r)});function go(e){return qr(ho,e)}const _o=h(`ZodAny`,(e,t)=>{Ut.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ur(e,t,n,r)});function vo(){return Ot(_o)}const yo=h(`ZodUnknown`,(e,t)=>{Pi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pe(e,t,n,r)});function R(){return Ke(yo)}const bo=h(`ZodNever`,(e,t)=>{pi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jn(e,t,n,r)});function xo(e){return In(bo,e)}const So=h(`ZodVoid`,(e,t)=>{ie.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zt(e,t,n,r)});function Co(e){return ui(So,e)}const wo=h(`ZodDate`,(e,t)=>{Lt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.min=(t,n)=>e.check(g(t,n)),e.max=(t,n)=>e.check(f(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function To(e){return Tn(wo,e)}const Eo=h(`ZodArray`,(e,t)=>{S(),ue.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>En(e,t,n,r),e.element=t.element},{min(e,t){return this.check(b(e,t))},nonempty(e){return this.check(b(1,e))},max(e,t){return this.check(jt(e,t))},length(e,t){return this.check(Ne(e,t))},unwrap(){return this.element}});function z(e,n){return t(Eo,e,n)}function Do(e){let t=e._zod.def.shape;return Ko(Object.keys(t))}const B=h(`ZodObject`,(e,t)=>{S(),Sn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gt(e,t,n,r),bi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Ko(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:R()})},loose(){return this.clone({...this._zod.def,catchall:R()})},strict(){return this.clone({...this._zod.def,catchall:xo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ht(this,e)},safeExtend(e){return Ue(this,e)},merge(e){return bt(this,e)},pick(e){return Tt(this,e)},omit(e){return yr(this,e)},partial(...e){return pt(G,this,e[0])},exactPartial(...e){return pt(es,this,e[0],`exactPartial`)},required(...e){return De(cs,this,e[0])}});function Oo(e,t){let n={type:`object`,shape:e??{},...l(t)};return new B(n)}function ko(e,t){return new B({type:`object`,shape:e,catchall:xo(),...l(t)})}function Ao(e,t){return new B({type:`object`,shape:e,catchall:R(),...l(t)})}const V=h(`ZodUnion`,(e,t)=>{Pt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,n,r),e.options=t.options});function H(e,t){return new V({type:`union`,options:e,...l(t)})}const jo=h(`ZodXor`,(e,t)=>{V.init(e,t),Ie.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nn(e,t,n,r),e.options=t.options});function Mo(e,t){return new jo({type:`union`,options:e,inclusive:!1,...l(t)})}const No=h(`ZodDiscriminatedUnion`,(e,t)=>{V.init(e,t),ae.init(e,t)});function Po(e,t,n){return new No({type:`union`,options:t,discriminator:e,...l(n)})}const Fo=h(`ZodIntersection`,(e,t)=>{li.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ar(e,t,n,r)});function Io(e,t){return new Fo({type:`intersection`,left:e,right:t})}const Lo=h(`ZodTuple`,(e,t)=>{S(),it.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new G({type:`optional`,innerType:e}))})}});function Ro(e,t,n){let r=t instanceof dt;return new Lo({type:`tuple`,items:e,rest:r?t:null,...l(r?n:t)})}const U=h(`ZodRecord`,(e,t)=>{S(),yi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hr(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function zo(e,t,n){return!t||!t._zod?new U({type:`record`,keyType:T(),valueType:e,...l(t)}):new U({type:`record`,keyType:e,valueType:t,...l(n)})}function Bo(e,t,n){return new U({type:`record`,keyType:e,valueType:t,...l(n),partial:!0})}function Vo(e,t,n){return new U({type:`record`,keyType:e,valueType:t,mode:`loose`,...l(n)})}const Ho=h(`ZodMap`,(e,t)=>{S(),ri.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(v(...t)),e.nonempty=t=>e.check(v(1,t)),e.max=(...t)=>e.check(i(...t)),e.size=(...t)=>e.check(yt(...t))});function Uo(e,t,n){return new Ho({type:`map`,keyType:e,valueType:t,...l(n)})}const Wo=h(`ZodSet`,(e,t)=>{S(),Kt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nt(e,t,n,r),e.min=(...t)=>e.check(v(...t)),e.nonempty=t=>e.check(v(1,t)),e.max=(...t)=>e.check(i(...t)),e.size=(...t)=>e.check(yt(...t))});function Go(e,t){return new Wo({type:`set`,valueType:e,...l(t)})}const W=h(`ZodEnum`,(e,t)=>{fn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xn(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new W({...t,checks:[],...l(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new W({...t,checks:[],...l(r),entries:i})}});function Ko(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new W({type:`enum`,entries:n,...l(t)})}function qo(e,t){return new W({type:`enum`,entries:e,...l(t)})}const Jo=h(`ZodLiteral`,(e,t)=>{Dn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xn(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Yo(e,t){return new Jo({type:`literal`,values:Array.isArray(e)?e:[e],...l(t)})}const Xo=h(`ZodFile`,(e,t)=>{Ye.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gr(e,t,n,r),e.min=(t,n)=>e.check(v(t,n)),e.max=(t,n)=>e.check(i(t,n)),e.mime=(t,n)=>e.check(qn(Array.isArray(t)?t:[t],n))});function Zo(e){return Xt(Xo,e)}const Qo=h(`ZodTransform`,(e,t)=>{S(),_r.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mt(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Jr(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(be(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(be(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function $o(e){return new Qo({type:`transform`,transform:e})}const G=h(`ZodOptional`,(e,t)=>{gi.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_e(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function K(e){return new G({type:`optional`,innerType:e})}const es=h(`ZodExactOptional`,(e,t)=>{Me.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_e(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ts(e){return new es({type:`optional`,innerType:e})}const ns=h(`ZodNullable`,(e,t)=>{Kr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>se(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q(e){return new ns({type:`nullable`,innerType:e})}function rs(e){return K(q(e))}const is=h(`ZodDefault`,(e,t)=>{Li.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bn(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function as(e,t){return new is({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():$e(t)}})}const os=h(`ZodPrefault`,(e,t)=>{Mn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gt(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ss(e,t){return new os({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():$e(t)}})}const cs=h(`ZodNonOptional`,(e,t)=>{Vn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ls(e,t){return new cs({type:`nonoptional`,innerType:e,...l(t)})}const us=h(`ZodSuccess`,(e,t)=>{vt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>St(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ds(e){return new us({type:`success`,innerType:e})}const fs=h(`ZodCatch`,(e,t)=>{mt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pn(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ps(e,t){return new fs({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Ti(t)})}const ms=h(`ZodNaN`,(e,t)=>{Fn.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r)});function hs(e){return fr(ms,e)}const J=h(`ZodPipe`,(e,t)=>{ki.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fe(e,t,n,r),e.in=t.in,e.out=t.out});function gs(e,t){return new J({type:`pipe`,in:e,out:t})}const Y=h(`ZodCodec`,(e,t)=>{J.init(e,t),Et.init(e,t)});function _s(e,t,n){return new Y({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function vs(e){let t=e._zod.def;return new Y({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const ys=h(`ZodPreprocess`,(e,t)=>{J.init(e,t),Ci.init(e,t)}),bs=h(`ZodReadonly`,(e,t)=>{ce.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xs(e){return new bs({type:`readonly`,innerType:e})}const Ss=h(`ZodTemplateLiteral`,(e,t)=>{s.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ze(e,t,n,r)});function Cs(e,t){return new Ss({type:`template_literal`,parts:e,...l(t)})}const ws=h(`ZodLazy`,(e,t)=>{dr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tr(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Ts(e){return new ws({type:`lazy`,getter:e})}const Es=h(`ZodPromise`,(e,t)=>{Bt.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sr(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ds(e){return new Es({type:`promise`,innerType:e})}const Os=h(`ZodFunction`,(e,t)=>{Zr.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pr(e,t,n,r)});function X(e){return new Os({type:`function`,input:Array.isArray(e?.input)?Ro(e?.input):e?.input??z(R()),output:e?.output??R()})}const Z=h(`ZodCustom`,(e,t)=>{We.init(e,t),C.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Or(e,t,n,r)});function ks(e){let t=new Hr({check:`custom`});return t._zod.check=e,t}function As(e,t){return ir(Z,e??(()=>!0),t)}function js(e,t={}){return qt(Z,e,t)}function Ms(e,t){return Ee(e,t)}const Ns=mr,Ps=An;function Fs(e,t={}){let n=new Z({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...l(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}const Is=(...e)=>ft({Codec:Y,Boolean:I,String:w},...e);function Ls(e){let t=Ts(()=>H([T(e),$a(),ao(),go(),z(t),zo(T(),t)]));return t}function Rs(e,t){return new ys({type:`pipe`,in:$o(e),out:t})}const zs={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 Bs(e){p({customError:e})}function Vs(){return p().customError}var Hs;Hs||={};var Us=e({ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,date:()=>Gs,datetime:()=>Ws,duration:()=>qs,time:()=>Ks});function Ws(e){return Ri(D,e)}function Gs(e){return Rt(O,e)}function Ks(e){return cn(k,e)}function qs(e){return oe(A,e)}const Q={...na,...zi,iso:Us},Js=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`.split(`.`));function Ys(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Xs(e,t){return e.map((e,n)=>n<t?e:e.optional())}function Zs(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Qs(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1]===void 0?void 0:Zs(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function $s(e,t){return Q.transform(e=>e).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function ec(e,t){if(e!==!1)return e===void 0||e===!0?Q.any():$(e,t)}const tc=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function nc(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=$(Qs(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>nc({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime({offset:!0})):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.regex(tc)):n===`duration`?t=t.check(Q.iso.duration()):n===`hostname`?t=t.check(Q.hostname()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`credit_card`?t=t.check(Q.creditCard()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?$(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=$(r,t);ji(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=$(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}if(e.additionalProperties===!1){let e=Object.keys(n),t=a.map(e=>new RegExp(e)),i=r;r=r.check(n=>{if(!Jt(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=Q.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=$s(r,$(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=Xs(n.map(e=>$(e,t)),a),s=Array.isArray(i)?void 0:ec(i,t),c=Q.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=Xs(i.map(e=>$(e,t)),n),o=ec(e.additionalItems,t),s=Q.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=$(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function $(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=nc(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>$(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>$(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:$(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,$(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);e.propertyNames!==void 0&&e.type===`object`&&e.$ref===void 0&&(i.propertyNames=e.propertyNames);for(let t of Object.keys(e))Js.has(t)||ji(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function rc(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Ys(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??_};return $(n,r)}const ic=Symbol(`z.visit/resolving`);function ac(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===ic)return new dr({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,ic);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?m(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:m(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?m(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:m(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:m(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?m(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:m(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:m(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:m(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:m(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return m(e,{...a,getter:()=>i(n())})}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 e;default:return e}}return i(e)}function oc(e){return ac(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:H(t.options)}})}function sc(e,t){if(!t?.length)return e;let n=e._zod.def;return m(e,Er(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function cc(e){return sc(e.out,e.checks)}function lc(e){return e.in._zod.traits.has(`$ZodTransform`)?cc(e):e.in}function uc(e){return ac(e,{pipe:e=>lc(e._zod.def),default:(e,t)=>t?K(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function dc(e){return ac(e,{pipe:e=>cc(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var fc=e({bigint:()=>gc,boolean:()=>hc,date:()=>_c,number:()=>mc,string:()=>pc});function pc(e){return er(w,e)}function mc(e){return Wn(P,e)}function hc(e){return Nr(I,e)}function gc(e){return zn(L,e)}function _c(e){return mi(wo,e)}var vc=e({$brand:()=>Ir,$input:()=>$n,$output:()=>Yr,NEVER:()=>nr,TimePrecision:()=>vn,ZodAny:()=>_o,ZodArray:()=>Eo,ZodBase64:()=>za,ZodBase64URL:()=>Va,ZodBigInt:()=>L,ZodBigIntFormat:()=>so,ZodBoolean:()=>I,ZodCIDRv4:()=>Fa,ZodCIDRv6:()=>La,ZodCUID:()=>ya,ZodCUID2:()=>xa,ZodCatch:()=>fs,ZodCodec:()=>Y,ZodCompileAsyncError:()=>oi,ZodCompileUnsupportedError:()=>Rn,ZodCreditCard:()=>Ga,ZodCustom:()=>Z,ZodCustomStringFormat:()=>N,ZodDate:()=>wo,ZodDefault:()=>is,ZodDiscriminatedUnion:()=>No,ZodE164:()=>Ua,ZodEmail:()=>aa,ZodEmoji:()=>ha,ZodEnum:()=>W,ZodError:()=>Ui,ZodExactOptional:()=>es,ZodFile:()=>Xo,ZodFirstPartyTypeKind:()=>Hs,ZodFunction:()=>Os,ZodGUID:()=>sa,ZodIPv4:()=>ka,ZodIPv6:()=>Na,ZodISODate:()=>O,ZodISODateTime:()=>D,ZodISODuration:()=>A,ZodISOTime:()=>k,ZodIntersection:()=>Fo,ZodIssueCode:()=>zs,ZodJWT:()=>qa,ZodKSUID:()=>Da,ZodLazy:()=>ws,ZodLiteral:()=>Jo,ZodMAC:()=>ja,ZodMap:()=>Ho,ZodNaN:()=>ms,ZodNanoID:()=>_a,ZodNever:()=>bo,ZodNonOptional:()=>cs,ZodNull:()=>ho,ZodNullable:()=>ns,ZodNumber:()=>P,ZodNumberFormat:()=>F,ZodObject:()=>B,ZodOptional:()=>G,ZodPipe:()=>J,ZodPrefault:()=>os,ZodPreprocess:()=>ys,ZodPromise:()=>Es,ZodReadonly:()=>bs,ZodRealError:()=>x,ZodRecord:()=>U,ZodSet:()=>Wo,ZodString:()=>w,ZodStringFormat:()=>E,ZodSuccess:()=>us,ZodSymbol:()=>uo,ZodTemplateLiteral:()=>Ss,ZodTransform:()=>Qo,ZodTuple:()=>Lo,ZodType:()=>C,ZodULID:()=>Ca,ZodURL:()=>M,ZodUUID:()=>j,ZodUndefined:()=>po,ZodUnion:()=>V,ZodUnknown:()=>yo,ZodVoid:()=>So,ZodXID:()=>Ta,ZodXor:()=>jo,_ZodString:()=>ia,_default:()=>as,_function:()=>X,any:()=>vo,array:()=>z,base64:()=>Ba,base64url:()=>Ha,bigint:()=>oo,boolean:()=>ao,catch:()=>ps,check:()=>ks,cidrv4:()=>Ia,cidrv6:()=>Ra,clone:()=>m,codec:()=>_s,coerce:()=>fc,compile:()=>Mr,config:()=>p,core:()=>ci,creditCard:()=>Ka,cuid:()=>ba,cuid2:()=>Sa,custom:()=>As,date:()=>To,decode:()=>Yi,decodeAsync:()=>Zi,deepPartial:()=>oc,describe:()=>Ns,discriminatedUnion:()=>Po,e164:()=>Wa,email:()=>oa,emoji:()=>ga,encode:()=>Ji,encodeAsync:()=>Xi,endsWith:()=>de,enum:()=>Ko,exactOptional:()=>ts,file:()=>Zo,flattenError:()=>ai,float32:()=>to,float64:()=>no,formatError:()=>Ln,fromJSONSchema:()=>rc,function:()=>X,getDiscriminatedOption:()=>Ae,getErrorMap:()=>Vs,globalRegistry:()=>_,gt:()=>d,gte:()=>g,guid:()=>ca,hash:()=>Qa,hex:()=>Za,hostname:()=>Xa,httpUrl:()=>ma,includes:()=>xr,input:()=>uc,instanceof:()=>Fs,int:()=>eo,int32:()=>ro,int64:()=>co,intersection:()=>Io,invertCodec:()=>vs,ipv4:()=>Aa,ipv6:()=>Pa,iso:()=>Us,json:()=>Ls,jwt:()=>Ja,keyof:()=>Do,ksuid:()=>Oa,lazy:()=>Ts,length:()=>Ne,literal:()=>Yo,locales:()=>rr,looseObject:()=>Ao,looseRecord:()=>Vo,lowercase:()=>Qr,lt:()=>u,lte:()=>f,mac:()=>Ma,map:()=>Uo,maxLength:()=>jt,maxSize:()=>i,memoizer:()=>Ei,meta:()=>Ps,mime:()=>qn,minLength:()=>b,minSize:()=>v,multipleOf:()=>y,nan:()=>hs,nanoid:()=>va,nativeEnum:()=>qo,negative:()=>ii,never:()=>xo,nonnegative:()=>Ar,nonoptional:()=>ls,nonpositive:()=>Hn,normalize:()=>Qn,null:()=>go,nullable:()=>q,nullish:()=>rs,number:()=>$a,object:()=>Oo,optional:()=>K,output:()=>dc,overwrite:()=>Cn,parse:()=>Wi,parseAsync:()=>Gi,partialRecord:()=>Bo,pipe:()=>gs,positive:()=>Ai,prefault:()=>ss,preprocess:()=>Rs,prettifyError:()=>jr,promise:()=>Ds,properties:()=>wi,property:()=>Vt,readonly:()=>xs,record:()=>zo,refine:()=>js,regex:()=>ye,regexes:()=>rt,registry:()=>cr,safeDecode:()=>$i,safeDecodeAsync:()=>ta,safeEncode:()=>Qi,safeEncodeAsync:()=>ea,safeParse:()=>Ki,safeParseAsync:()=>qi,set:()=>Go,setErrorMap:()=>Bs,size:()=>yt,slugify:()=>Tr,startsWith:()=>c,strictObject:()=>ko,string:()=>T,stringFormat:()=>Ya,stringbool:()=>Is,success:()=>ds,superRefine:()=>Ms,symbol:()=>fo,templateLiteral:()=>Cs,toJSONSchema:()=>Xe,toLowerCase:()=>Ft,toUpperCase:()=>Fi,toZod:()=>It,transform:()=>$o,treeifyError:()=>Un,trim:()=>on,tuple:()=>Ro,uint32:()=>io,uint64:()=>lo,ulid:()=>wa,undefined:()=>mo,union:()=>H,unknown:()=>R,uppercase:()=>gn,url:()=>pa,util:()=>Ii,uuid:()=>la,uuidv4:()=>ua,uuidv6:()=>da,uuidv7:()=>fa,validate:()=>ei,validateAsync:()=>pr,void:()=>Co,xid:()=>Ea,xor:()=>Mo});export{Ir as $brand,$n as $input,Yr as $output,nr as NEVER,vn as TimePrecision,_o as ZodAny,Eo as ZodArray,za as ZodBase64,Va as ZodBase64URL,L as ZodBigInt,so as ZodBigIntFormat,I as ZodBoolean,Fa as ZodCIDRv4,La as ZodCIDRv6,ya as ZodCUID,xa as ZodCUID2,fs as ZodCatch,Y as ZodCodec,oi as ZodCompileAsyncError,Rn as ZodCompileUnsupportedError,Ga as ZodCreditCard,Z as ZodCustom,N as ZodCustomStringFormat,wo as ZodDate,is as ZodDefault,No as ZodDiscriminatedUnion,Ua as ZodE164,aa as ZodEmail,ha as ZodEmoji,W as ZodEnum,Ui as ZodError,es as ZodExactOptional,Xo as ZodFile,Hs as ZodFirstPartyTypeKind,Os as ZodFunction,sa as ZodGUID,ka as ZodIPv4,Na as ZodIPv6,O as ZodISODate,D as ZodISODateTime,A as ZodISODuration,k as ZodISOTime,Fo as ZodIntersection,zs as ZodIssueCode,qa as ZodJWT,Da as ZodKSUID,ws as ZodLazy,Jo as ZodLiteral,ja as ZodMAC,Ho as ZodMap,ms as ZodNaN,_a as ZodNanoID,bo as ZodNever,cs as ZodNonOptional,ho as ZodNull,ns as ZodNullable,P as ZodNumber,F as ZodNumberFormat,B as ZodObject,G as ZodOptional,J as ZodPipe,os as ZodPrefault,ys as ZodPreprocess,Es as ZodPromise,bs as ZodReadonly,x as ZodRealError,U as ZodRecord,Wo as ZodSet,w as ZodString,E as ZodStringFormat,us as ZodSuccess,uo as ZodSymbol,Ss as ZodTemplateLiteral,Qo as ZodTransform,Lo as ZodTuple,C as ZodType,Ca as ZodULID,M as ZodURL,j as ZodUUID,po as ZodUndefined,V as ZodUnion,yo as ZodUnknown,So as ZodVoid,Ta as ZodXID,jo as ZodXor,ia as _ZodString,as as _default,X as _function,X as function,vo as any,z as array,Ba as base64,Ha as base64url,oo as bigint,ao as boolean,ps as catch,ks as check,Ia as cidrv4,Ra as cidrv6,m as clone,_s as codec,fc as coerce,Mr as compile,p as config,ci as core,Ka as creditCard,ba as cuid,Sa as cuid2,As as custom,To as date,Yi as decode,Zi as decodeAsync,oc as deepPartial,vc as default,vc as z,Ns as describe,Po as discriminatedUnion,Wa as e164,oa as email,ga as emoji,Ji as encode,Xi as encodeAsync,de as endsWith,Ko as enum,ts as exactOptional,Zo as file,ai as flattenError,to as float32,no as float64,Ln as formatError,rc as fromJSONSchema,Ae as getDiscriminatedOption,Vs as getErrorMap,_ as globalRegistry,d as gt,g as gte,ca as guid,Qa as hash,Za as hex,Xa as hostname,ma as httpUrl,xr as includes,uc as input,Fs as instanceof,eo as int,ro as int32,co as int64,Io as intersection,vs as invertCodec,Aa as ipv4,Pa as ipv6,Us as iso,Ls as json,Ja as jwt,Do as keyof,Oa as ksuid,Ts as lazy,Ne as length,Yo as literal,rr as locales,Ao as looseObject,Vo as looseRecord,Qr as lowercase,u as lt,f as lte,Ma as mac,Uo as map,jt as maxLength,i as maxSize,Ei as memoizer,Ps as meta,qn as mime,b as minLength,v as minSize,y as multipleOf,hs as nan,va as nanoid,qo as nativeEnum,ii as negative,xo as never,Ar as nonnegative,ls as nonoptional,Hn as nonpositive,Qn as normalize,go as null,q as nullable,rs as nullish,$a as number,Oo as object,K as optional,dc as output,Cn as overwrite,Wi as parse,Gi as parseAsync,Bo as partialRecord,gs as pipe,Ai as positive,ss as prefault,Rs as preprocess,jr as prettifyError,Ds as promise,wi as properties,Vt as property,xs as readonly,zo as record,js as refine,ye as regex,rt as regexes,cr as registry,$i as safeDecode,ta as safeDecodeAsync,Qi as safeEncode,ea as safeEncodeAsync,Ki as safeParse,qi as safeParseAsync,Go as set,Bs as setErrorMap,yt as size,Tr as slugify,c as startsWith,ko as strictObject,T as string,Ya as stringFormat,Is as stringbool,ds as success,Ms as superRefine,fo as symbol,Cs as templateLiteral,Xe as toJSONSchema,Ft as toLowerCase,Fi as toUpperCase,It as toZod,$o as transform,Un as treeifyError,on as trim,Ro as tuple,io as uint32,lo as uint64,wa as ulid,mo as undefined,H as union,R as unknown,gn as uppercase,pa as url,Ii as util,la as uuid,ua as uuidv4,da as uuidv6,fa as uuidv7,ei as validate,pr as validateAsync,Co as void,Ea as xid,Mo as xor};
@@ -1 +1 @@
1
- import{$ as ee,$a as te,$i as ne,$n as re,$r as e,$t as t,Ai as n,An as r,Ar as i,At as a,Ba as o,Bi as s,Bn as c,Br as l,Bt as u,Ca as d,Ci as f,Cn as p,Cr as m,Ct as h,Da as g,Di as _,Dn as v,Dr as y,Dt as b,Ea as x,Ei as S,En as C,Er as w,Et as T,Fa as E,Fi as D,Fn as O,Fr as k,Ft as A,G as j,Ga as M,Gi as N,Gn as P,Gr as F,Gt as I,Ha as L,Hi as R,Hn as z,Hr as B,Ht as V,Ia as H,Ii as U,In as W,Ir as G,It as K,J as q,Ja as J,Ji as Y,Jn as X,Jr as ie,Jt as ae,K as oe,Ka as se,Ki as ce,Kn as le,Kr as ue,Kt as de,L as fe,La as pe,Li as me,Ln as he,Lr as ge,Lt as _e,Ma as ve,Mi as ye,Mn as be,Mr as xe,Mt as Se,Na as Ce,Ni as we,Nn as Te,Nr as Ee,Nt as De,Oi as Oe,On as ke,Or as Ae,Ot as je,Pa as Me,Pi as Ne,Pn as Pe,Pr as Fe,Pt as Ie,Q as Le,Qa as Re,Qi as ze,Qn as Be,Qr as Ve,Qt as He,Ra as Ue,Ri as We,Rn as Ge,Ro as Ke,Rr as qe,Rt as Je,Sa as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,Ta as et,Ti as tt,Tn as nt,Tr as rt,Tt as it,Ua as at,Ui as ot,Un as st,Ur as ct,Ut as lt,Va as ut,Vi as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wa as gt,Wi as _t,Wn as vt,Wr as yt,Wt as bt,X as xt,Xa as St,Xi as Ct,Xn as wt,Xr as Tt,Xt as Et,Y as Dt,Ya as Ot,Yi as kt,Yn as At,Yr as jt,Yt as Z,Z as Mt,Za as Nt,Zi as Pt,Zn as Ft,Zr as It,Zt as Lt,_a as Rt,_i as zt,_n as Bt,_o as Vt,_t as Ht,aa as Ut,ai as Wt,an as Gt,ao as Kt,ar as qt,at as Jt,ba as Yt,bi as Xt,bn as Zt,bo as Qt,br as $t,bt as en,ca as tn,ci as nn,cn as rn,co as Q,cr as an,ct as on,da as sn,di as cn,dn as ln,do as un,dr as dn,dt as fn,ea as pn,ei as mn,en as hn,eo as gn,er as _n,et as vn,fa as yn,fi as bn,fn as xn,fo as Sn,fr as Cn,ft as wn,ga as Tn,gi as En,gn as Dn,go as On,gr as kn,gt as An,ha as jn,hi as Mn,hn as Nn,ho as Pn,hr as Fn,ht as In,ia as Ln,ii as Rn,in as zn,io as Bn,ir as Vn,it as Hn,ji as Un,jn as Wn,jr as Gn,jt as Kn,ki as qn,kn as Jn,kr as Yn,kt as $,la as Xn,li as Zn,ln as Qn,lo as $n,lr as er,lt as tr,ma as nr,mi as rr,mn as ir,mo as ar,mr as or,mt as sr,n as cr,na as lr,ni as ur,nn as dr,no as fr,nr as pr,nt as mr,oa as hr,oi as gr,on as _r,oo as vr,or as yr,ot as br,pa as xr,pi as Sr,pn as Cr,po as wr,pr as Tr,pt as Er,q as Dr,qa as Or,qi as kr,qn as Ar,qr as jr,qt as Mr,r as Nr,ra as Pr,ri as Fr,rn as Ir,ro as Lr,rr as Rr,rt as zr,sa as Br,si as Vr,sn as Hr,so as Ur,sr as Wr,st as Gr,ta as Kr,ti as qr,tn as Jr,to as Yr,tr as Xr,tt as Zr,ua as Qr,ui as $r,un as ei,uo as ti,ur as ni,ut as ri,va as ii,vi as ai,vn as oi,vo as si,vr as ci,vt as li,wa as ui,wi as di,wn as fi,wr as pi,wt as mi,xa as hi,xi as gi,xn as _i,xr as vi,xt as yi,ya as bi,yi as xi,yn as Si,yr as Ci,yt as wi,za as Ti,zi as Ei,zn as Di,zo as Oi,zr as ki,zt as Ai}from"../../_chunks/client/core-CspsxXR-.js";export{Qe as $ZodAny,m as $ZodArray,Sn as $ZodAsyncError,pi as $ZodBase64,rt as $ZodBase64URL,w as $ZodBigInt,y as $ZodBigIntFormat,Ae as $ZodBoolean,Yn as $ZodCIDRv4,i as $ZodCIDRv6,Gn as $ZodCUID,xe as $ZodCUID2,Ee as $ZodCatch,hr as $ZodCheck,Br as $ZodCheckBigIntFormat,tn as $ZodCheckEndsWith,Xn as $ZodCheckGreaterThan,Qr as $ZodCheckIncludes,sn as $ZodCheckLengthEquals,yn as $ZodCheckLessThan,xr as $ZodCheckLowerCase,nr as $ZodCheckMaxLength,jn as $ZodCheckMaxSize,Tn as $ZodCheckMimeType,Rt as $ZodCheckMinLength,ii as $ZodCheckMinSize,bi as $ZodCheckMultipleOf,Yt as $ZodCheckNumberFormat,hi as $ZodCheckOverwrite,Ye as $ZodCheckProperty,d as $ZodCheckRegex,ui as $ZodCheckSizeEquals,et as $ZodCheckStartsWith,x as $ZodCheckStringFormat,g as $ZodCheckUpperCase,Fe as $ZodCodec,k as $ZodCreditCard,G as $ZodCustom,ge as $ZodCustomStringFormat,ci as $ZodCyclicError,qe as $ZodDate,ki as $ZodDefault,l as $ZodDiscriminatedUnion,pt as $ZodE164,B as $ZodEmail,ct as $ZodEmoji,wr as $ZodEncodeError,yt as $ZodEnum,Kt as $ZodError,F as $ZodExactOptional,ue as $ZodFile,jr as $ZodFunction,ie as $ZodGUID,jt as $ZodIPv4,Tt as $ZodIPv6,It as $ZodISODate,Ve as $ZodISODateTime,e as $ZodISODuration,mn as $ZodISOTime,qr as $ZodIntersection,ur as $ZodJWT,Fr as $ZodKSUID,Rn as $ZodLazy,Wt as $ZodLiteral,gr as $ZodMAC,Vr as $ZodMap,nn as $ZodNaN,Zn as $ZodNanoID,$r as $ZodNever,cn as $ZodNonOptional,bn as $ZodNull,Sr as $ZodNullable,rr as $ZodNumber,Mn as $ZodNumberFormat,En as $ZodObject,zt as $ZodObjectJIT,ai as $ZodOptional,xi as $ZodPipe,Xt as $ZodPrefault,gi as $ZodPreprocess,Xe as $ZodPromise,f as $ZodReadonly,vr as $ZodRealError,di as $ZodRecord,dn as $ZodRegistry,tt as $ZodSet,S as $ZodString,_ as $ZodStringFormat,Oe as $ZodSuccess,qn as $ZodSymbol,n as $ZodTemplateLiteral,Un as $ZodTransform,ye as $ZodTuple,we as $ZodType,Ne as $ZodULID,D as $ZodURL,U as $ZodUUID,me as $ZodUndefined,We as $ZodUnion,Ei as $ZodUnknown,s as $ZodVoid,dt as $ZodXID,R as $ZodXor,ar as $brand,Pn as $constructor,Cn as $input,Tr as $output,Ut as Doc,yr as INVALID,cr as JSONSchema,Nr as JSONSchemaGenerator,On as NEVER,Mt as TimePrecision,ot as URL_BAD_FORMAT,_t as URL_UNPARSEABLE,Wr as ZodCompileAsyncError,an as ZodCompileUnsupportedError,Le as _any,ee as _array,vn as _base64,Zr as _base64url,mr as _bigint,zr as _boolean,Hn as _catch,Jt as _check,br as _cidrv4,Gr as _cidrv6,on as _coercedBigint,tr as _coercedBoolean,ri as _coercedDate,fn as _coercedNumber,wn as _coercedString,Er as _creditCard,sr as _cuid,In as _cuid2,An as _custom,Ht as _date,Ce as _decode,Me as _decodeAsync,li as _default,wi as _discriminatedUnion,en as _e164,yi as _email,$e as _emoji,E as _encode,H as _encodeAsync,h as _endsWith,mi as _enum,it as _file,T as _float32,b as _float64,je as _gt,$ as _gte,$ as _min,a as _guid,Kn as _includes,Se as _int,De as _int32,Ie as _int64,A as _intersection,K as _ipv4,_e as _ipv6,Je as _isoDate,Ai as _isoDateTime,u as _isoDuration,mt as _isoTime,V as _jwt,lt as _ksuid,bt as _lazy,I as _length,de as _literal,Mr as _lowercase,ae as _lt,Z as _lte,Z as _max,Et as _mac,Lt as _map,He as _maxLength,t as _maxSize,hn as _mime,Jr as _minLength,dr as _minSize,Ir as _multipleOf,zn as _nan,Gt as _nanoid,_r as _nativeEnum,Hr as _negative,rn as _never,Qn as _nonnegative,ei as _nonoptional,ln as _nonpositive,xn as _normalize,Cr as _null,ir as _nullable,Nn as _number,Dn as _optional,Bt as _overwrite,pe as _parse,Ue as _parseAsync,oi as _pipe,Si as _positive,Zt as _promise,_i as _properties,Ze as _property,p as _readonly,fi as _record,nt as _refine,C as _regex,Ti as _safeDecode,o as _safeDecodeAsync,ut as _safeEncode,L as _safeEncodeAsync,at as _safeParse,gt as _safeParseAsync,v as _set,ke as _size,Jn as _slugify,r as _startsWith,Wn as _string,be as _stringFormat,Te as _stringbool,Pe as _success,O as _superRefine,W as _symbol,he as _templateLiteral,Ge as _toLowerCase,Di as _toUpperCase,c as _transform,ft as _trim,z as _tuple,st as _uint32,vt as _uint64,P as _ulid,le as _undefined,Ar as _union,X as _unknown,At as _uppercase,wt as _url,Ft as _uuid,Be as _uuidv4,re as _uuidv6,_n as _uuidv7,Xr as _void,pr as _xid,Rr as _xor,Qt as clone,er as compile,ni as compileFn,Vt as config,ht as createStandardJSONSchemaMethod,j as createToJSONSchemaMethod,M as decode,se as decodeAsync,Vn as describe,Or as encode,J as encodeAsync,oe as extractDefs,Dr as finalize,Ur as flattenError,Q as formatError,N as getDiscriminatedOption,si as globalConfig,or as globalRegistry,q as handleUnrepresentable,Dt as initializeContext,Ci as isBackEdge,$t as isRecursiveSchema,ce as isValidBase64,kr as isValidBase64URL,Y as isValidCIDRv6,kt as isValidCreditCard,Ct as isValidIPv6,Pt as isValidJWT,kn as locales,vi as memoizer,ze as mergeValues,qt as meta,Ot as parse,St as parseAsync,ne as parseURLObject,$n as prettifyError,xt as process,ve as regexes,Fn as registry,Nt as safeDecode,Re as safeDecodeAsync,te as safeEncode,gn as safeEncodeAsync,Yr as safeParse,fr as safeParseAsync,pn as standardProps,Kr as stripTabAndNewline,ti as toDotPath,fe as toJSONSchema,Ke as toZod,un as treeifyError,lr as urlHostnameOk,Pr as urlProtocolOk,Oi as util,Lr as validate,Bn as validateAsync,Ln as version};
1
+ import{$ as ee,$a as te,$i as ne,$n as re,$r as e,$t as t,Ai as n,An as r,Ar as i,At as a,Ba as o,Bi as s,Bn as c,Br as l,Bt as u,Ca as d,Ci as f,Cn as p,Cr as m,Ct as h,Da as g,Di as _,Dn as v,Dr as y,Dt as b,Ea as x,Ei as S,En as C,Er as w,Et as T,Fa as E,Fi as D,Fn as O,Fr as k,Ft as A,G as j,Ga as M,Gi as N,Gn as P,Gr as F,Gt as I,Ha as L,Hi as R,Hn as z,Hr as B,Ht as V,Ia as H,Ii as U,In as W,Ir as G,It as K,J as q,Ja as J,Ji as Y,Jn as X,Jr as ie,Jt as ae,K as oe,Ka as se,Ki as ce,Kn as le,Kr as ue,Kt as de,L as fe,La as pe,Li as me,Ln as he,Lr as ge,Lt as _e,Ma as ve,Mi as ye,Mn as be,Mr as xe,Mt as Se,Na as Ce,Ni as we,Nn as Te,Nr as Ee,Nt as De,Oi as Oe,On as ke,Or as Ae,Ot as je,Pa as Me,Pi as Ne,Pn as Pe,Pr as Fe,Pt as Ie,Q as Le,Qa as Re,Qi as ze,Qn as Be,Qr as Ve,Qt as He,Ra as Ue,Ri as We,Rn as Ge,Ro as Ke,Rr as qe,Rt as Je,Sa as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,Ta as et,Ti as tt,Tn as nt,Tr as rt,Tt as it,Ua as at,Ui as ot,Un as st,Ur as ct,Ut as lt,Va as ut,Vi as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wa as gt,Wi as _t,Wn as vt,Wr as yt,Wt as bt,X as xt,Xa as St,Xi as Ct,Xn as wt,Xr as Tt,Xt as Et,Y as Dt,Ya as Ot,Yi as kt,Yn as At,Yr as jt,Yt as Z,Z as Mt,Za as Nt,Zi as Pt,Zn as Ft,Zr as It,Zt as Lt,_a as Rt,_i as zt,_n as Bt,_o as Vt,_t as Ht,aa as Ut,ai as Wt,an as Gt,ao as Kt,ar as qt,at as Jt,ba as Yt,bi as Xt,bn as Zt,bo as Qt,br as $t,bt as en,ca as tn,ci as nn,cn as rn,co as Q,cr as an,ct as on,da as sn,di as cn,dn as ln,do as un,dr as dn,dt as fn,ea as pn,ei as mn,en as hn,eo as gn,er as _n,et as vn,fa as yn,fi as bn,fn as xn,fo as Sn,fr as Cn,ft as wn,ga as Tn,gi as En,gn as Dn,go as On,gr as kn,gt as An,ha as jn,hi as Mn,hn as Nn,ho as Pn,hr as Fn,ht as In,ia as Ln,ii as Rn,in as zn,io as Bn,ir as Vn,it as Hn,ji as Un,jn as Wn,jr as Gn,jt as Kn,ki as qn,kn as Jn,kr as Yn,kt as $,la as Xn,li as Zn,ln as Qn,lo as $n,lr as er,lt as tr,ma as nr,mi as rr,mn as ir,mo as ar,mr as or,mt as sr,n as cr,na as lr,ni as ur,nn as dr,no as fr,nr as pr,nt as mr,oa as hr,oi as gr,on as _r,oo as vr,or as yr,ot as br,pa as xr,pi as Sr,pn as Cr,po as wr,pr as Tr,pt as Er,q as Dr,qa as Or,qi as kr,qn as Ar,qr as jr,qt as Mr,r as Nr,ra as Pr,ri as Fr,rn as Ir,ro as Lr,rr as Rr,rt as zr,sa as Br,si as Vr,sn as Hr,so as Ur,sr as Wr,st as Gr,ta as Kr,ti as qr,tn as Jr,to as Yr,tr as Xr,tt as Zr,ua as Qr,ui as $r,un as ei,uo as ti,ur as ni,ut as ri,va as ii,vi as ai,vn as oi,vo as si,vr as ci,vt as li,wa as ui,wi as di,wn as fi,wr as pi,wt as mi,xa as hi,xi as gi,xn as _i,xr as vi,xt as yi,ya as bi,yi as xi,yn as Si,yr as Ci,yt as wi,za as Ti,zi as Ei,zn as Di,zo as Oi,zr as ki,zt as Ai}from"../../_chunks/client/core-BsvaaMUJ.js";export{Qe as $ZodAny,m as $ZodArray,Sn as $ZodAsyncError,pi as $ZodBase64,rt as $ZodBase64URL,w as $ZodBigInt,y as $ZodBigIntFormat,Ae as $ZodBoolean,Yn as $ZodCIDRv4,i as $ZodCIDRv6,Gn as $ZodCUID,xe as $ZodCUID2,Ee as $ZodCatch,hr as $ZodCheck,Br as $ZodCheckBigIntFormat,tn as $ZodCheckEndsWith,Xn as $ZodCheckGreaterThan,Qr as $ZodCheckIncludes,sn as $ZodCheckLengthEquals,yn as $ZodCheckLessThan,xr as $ZodCheckLowerCase,nr as $ZodCheckMaxLength,jn as $ZodCheckMaxSize,Tn as $ZodCheckMimeType,Rt as $ZodCheckMinLength,ii as $ZodCheckMinSize,bi as $ZodCheckMultipleOf,Yt as $ZodCheckNumberFormat,hi as $ZodCheckOverwrite,Ye as $ZodCheckProperty,d as $ZodCheckRegex,ui as $ZodCheckSizeEquals,et as $ZodCheckStartsWith,x as $ZodCheckStringFormat,g as $ZodCheckUpperCase,Fe as $ZodCodec,k as $ZodCreditCard,G as $ZodCustom,ge as $ZodCustomStringFormat,ci as $ZodCyclicError,qe as $ZodDate,ki as $ZodDefault,l as $ZodDiscriminatedUnion,pt as $ZodE164,B as $ZodEmail,ct as $ZodEmoji,wr as $ZodEncodeError,yt as $ZodEnum,Kt as $ZodError,F as $ZodExactOptional,ue as $ZodFile,jr as $ZodFunction,ie as $ZodGUID,jt as $ZodIPv4,Tt as $ZodIPv6,It as $ZodISODate,Ve as $ZodISODateTime,e as $ZodISODuration,mn as $ZodISOTime,qr as $ZodIntersection,ur as $ZodJWT,Fr as $ZodKSUID,Rn as $ZodLazy,Wt as $ZodLiteral,gr as $ZodMAC,Vr as $ZodMap,nn as $ZodNaN,Zn as $ZodNanoID,$r as $ZodNever,cn as $ZodNonOptional,bn as $ZodNull,Sr as $ZodNullable,rr as $ZodNumber,Mn as $ZodNumberFormat,En as $ZodObject,zt as $ZodObjectJIT,ai as $ZodOptional,xi as $ZodPipe,Xt as $ZodPrefault,gi as $ZodPreprocess,Xe as $ZodPromise,f as $ZodReadonly,vr as $ZodRealError,di as $ZodRecord,dn as $ZodRegistry,tt as $ZodSet,S as $ZodString,_ as $ZodStringFormat,Oe as $ZodSuccess,qn as $ZodSymbol,n as $ZodTemplateLiteral,Un as $ZodTransform,ye as $ZodTuple,we as $ZodType,Ne as $ZodULID,D as $ZodURL,U as $ZodUUID,me as $ZodUndefined,We as $ZodUnion,Ei as $ZodUnknown,s as $ZodVoid,dt as $ZodXID,R as $ZodXor,ar as $brand,Pn as $constructor,Cn as $input,Tr as $output,Ut as Doc,yr as INVALID,cr as JSONSchema,Nr as JSONSchemaGenerator,On as NEVER,Mt as TimePrecision,ot as URL_BAD_FORMAT,_t as URL_UNPARSEABLE,Wr as ZodCompileAsyncError,an as ZodCompileUnsupportedError,Le as _any,ee as _array,vn as _base64,Zr as _base64url,mr as _bigint,zr as _boolean,Hn as _catch,Jt as _check,br as _cidrv4,Gr as _cidrv6,on as _coercedBigint,tr as _coercedBoolean,ri as _coercedDate,fn as _coercedNumber,wn as _coercedString,Er as _creditCard,sr as _cuid,In as _cuid2,An as _custom,Ht as _date,Ce as _decode,Me as _decodeAsync,li as _default,wi as _discriminatedUnion,en as _e164,yi as _email,$e as _emoji,E as _encode,H as _encodeAsync,h as _endsWith,mi as _enum,it as _file,T as _float32,b as _float64,je as _gt,$ as _gte,$ as _min,a as _guid,Kn as _includes,Se as _int,De as _int32,Ie as _int64,A as _intersection,K as _ipv4,_e as _ipv6,Je as _isoDate,Ai as _isoDateTime,u as _isoDuration,mt as _isoTime,V as _jwt,lt as _ksuid,bt as _lazy,I as _length,de as _literal,Mr as _lowercase,ae as _lt,Z as _lte,Z as _max,Et as _mac,Lt as _map,He as _maxLength,t as _maxSize,hn as _mime,Jr as _minLength,dr as _minSize,Ir as _multipleOf,zn as _nan,Gt as _nanoid,_r as _nativeEnum,Hr as _negative,rn as _never,Qn as _nonnegative,ei as _nonoptional,ln as _nonpositive,xn as _normalize,Cr as _null,ir as _nullable,Nn as _number,Dn as _optional,Bt as _overwrite,pe as _parse,Ue as _parseAsync,oi as _pipe,Si as _positive,Zt as _promise,_i as _properties,Ze as _property,p as _readonly,fi as _record,nt as _refine,C as _regex,Ti as _safeDecode,o as _safeDecodeAsync,ut as _safeEncode,L as _safeEncodeAsync,at as _safeParse,gt as _safeParseAsync,v as _set,ke as _size,Jn as _slugify,r as _startsWith,Wn as _string,be as _stringFormat,Te as _stringbool,Pe as _success,O as _superRefine,W as _symbol,he as _templateLiteral,Ge as _toLowerCase,Di as _toUpperCase,c as _transform,ft as _trim,z as _tuple,st as _uint32,vt as _uint64,P as _ulid,le as _undefined,Ar as _union,X as _unknown,At as _uppercase,wt as _url,Ft as _uuid,Be as _uuidv4,re as _uuidv6,_n as _uuidv7,Xr as _void,pr as _xid,Rr as _xor,Qt as clone,er as compile,ni as compileFn,Vt as config,ht as createStandardJSONSchemaMethod,j as createToJSONSchemaMethod,M as decode,se as decodeAsync,Vn as describe,Or as encode,J as encodeAsync,oe as extractDefs,Dr as finalize,Ur as flattenError,Q as formatError,N as getDiscriminatedOption,si as globalConfig,or as globalRegistry,q as handleUnrepresentable,Dt as initializeContext,Ci as isBackEdge,$t as isRecursiveSchema,ce as isValidBase64,kr as isValidBase64URL,Y as isValidCIDRv6,kt as isValidCreditCard,Ct as isValidIPv6,Pt as isValidJWT,kn as locales,vi as memoizer,ze as mergeValues,qt as meta,Ot as parse,St as parseAsync,ne as parseURLObject,$n as prettifyError,xt as process,ve as regexes,Fn as registry,Nt as safeDecode,Re as safeDecodeAsync,te as safeEncode,gn as safeEncodeAsync,Yr as safeParse,fr as safeParseAsync,pn as standardProps,Kr as stripTabAndNewline,ti as toDotPath,fe as toJSONSchema,Ke as toZod,un as treeifyError,lr as urlHostnameOk,Pr as urlProtocolOk,Oi as util,Lr as validate,Bn as validateAsync,Ln as version};