@orgsdk/cli 0.1.0 → 0.2.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 (271) hide show
  1. package/README.md +21 -7
  2. package/bin/orgsdk.mjs +1 -1
  3. package/dist/THIRD_PARTY_NOTICES.txt +278 -0
  4. package/dist/runtime/README.md +9 -7
  5. package/dist/runtime/cli.js +12 -13
  6. package/dist/runtime/client.js +79 -17
  7. package/dist/runtime/contract.js +39 -6
  8. package/dist/runtime/executor-configuration.js +1 -1
  9. package/dist/runtime/isolated-actions.js +4 -5
  10. package/dist/runtime/isolated-worker.js +5 -0
  11. package/dist/runtime/mcp/aliases.js +29 -0
  12. package/dist/runtime/mcp/client.js +239 -0
  13. package/dist/runtime/mcp/contract.js +57 -0
  14. package/dist/runtime/mcp/functions.js +40 -0
  15. package/dist/runtime/mcp/network.js +61 -0
  16. package/dist/runtime/mcp/schema-types.js +35 -0
  17. package/dist/runtime/mcp/transport.js +18 -0
  18. package/dist/runtime/project-data.js +1 -1
  19. package/dist/runtime/register-executor.js +23 -0
  20. package/dist/runtime/runner.js +30 -24
  21. package/dist/runtime/sdk-declarations.js +8 -1
  22. package/dist/runtime/session-job-contract.js +29 -0
  23. package/dist/runtime/session-job.js +256 -0
  24. package/dist/runtime/session-plugin-call.js +33 -0
  25. package/dist/runtime/sessions/manager.js +5 -3
  26. package/dist/runtime/sessions/process.js +3 -3
  27. package/dist/runtime/sessions/session-runtime.js +7 -3
  28. package/dist/runtime/sessions/worker-guard.js +20 -0
  29. package/dist/runtime/spawn-job.js +69 -0
  30. package/dist/runtime/supervisor.js +102 -146
  31. package/dist/runtime/worker.js +48 -45
  32. package/dist/server/{bun-driver-JKOGHIVX.js → bun-driver-DTZUUCI3.js} +1 -1
  33. package/dist/server/{chunk-WCVBLUNL.js → chunk-S5SFX3JM.js} +24 -0
  34. package/dist/server/index.js +2628 -1230
  35. package/dist/server/migrations/0003_remote-mcp.sql +17 -0
  36. package/dist/server/migrations/meta/0003_snapshot.json +3395 -0
  37. package/dist/server/migrations/meta/_journal.json +7 -0
  38. package/dist/server/{node-driver-FRDSYDBU.js → node-driver-HDJKKWXQ.js} +1 -1
  39. package/dist/server/out/404/index.html +1 -1
  40. package/dist/server/out/404.html +1 -1
  41. package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +10 -10
  42. package/dist/server/out/__next._full.txt +10 -10
  43. package/dist/server/out/__next._tree.txt +2 -2
  44. package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +1 -0
  45. package/dist/server/out/_next/static/chunks/0c-3k17txbh0-.js +1 -0
  46. package/dist/server/out/_next/static/chunks/0cwfl2xanfapu.js +1 -0
  47. package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +1 -0
  48. package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +1 -0
  49. package/dist/server/out/_next/static/chunks/0huhp5j8dlai8.js +1 -0
  50. package/dist/server/out/_next/static/chunks/0khjy8qh1ll42.js +1 -0
  51. package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +1 -0
  52. package/dist/server/out/_next/static/chunks/0rlc9tihf4po6.css +1 -0
  53. package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +1 -0
  54. package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +1 -0
  55. package/dist/server/out/_next/static/chunks/{280w168xxgtwt.js → 0y5lgqdwpeabb.js} +4 -4
  56. package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +1 -0
  57. package/dist/server/out/_next/static/chunks/1-75euysc3lin.js +22 -0
  58. package/dist/server/out/_next/static/chunks/10aam78qxauw0.js +1 -0
  59. package/dist/server/out/_next/static/chunks/12ro_nqb83zku.js +1 -0
  60. package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +3 -0
  61. package/dist/server/out/_next/static/chunks/1c1ayx3fqtub5.js +31 -0
  62. package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +1 -0
  63. package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +1 -0
  64. package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +1 -0
  65. package/dist/server/out/_next/static/chunks/1iklteprcoims.js +1 -0
  66. package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +1 -0
  67. package/dist/server/out/_next/static/chunks/1tnzhqkfwk7l8.js +1 -0
  68. package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +3 -0
  69. package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +1 -0
  70. package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +1 -0
  71. package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +1 -0
  72. package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +1 -0
  73. package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +1 -0
  74. package/dist/server/out/_next/static/chunks/2lxgam-nk-e9a.js +3 -0
  75. package/dist/server/out/_next/static/chunks/{3dx108d0g6032.js → 2navy2mx7--vk.js} +1 -1
  76. package/dist/server/out/_next/static/chunks/2ngzwwqeitkk7.js +1 -0
  77. package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +1 -0
  78. package/dist/server/out/_next/static/chunks/2z60o39-yshg2.js +1 -0
  79. package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +1 -0
  80. package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +1 -0
  81. package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +1 -0
  82. package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +1 -0
  83. package/dist/server/out/_next/static/chunks/3xs2ji0dgkbmc.js +1 -0
  84. package/dist/server/out/_next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
  85. package/dist/server/out/_not-found/__next._full.txt +3 -3
  86. package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
  87. package/dist/server/out/_not-found/__next._tree.txt +2 -2
  88. package/dist/server/out/_not-found/index.html +1 -1
  89. package/dist/server/out/_not-found/index.txt +3 -3
  90. package/dist/server/out/accounts/2fa/__next._full.txt +8 -8
  91. package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
  92. package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +8 -8
  93. package/dist/server/out/accounts/2fa/index.html +1 -1
  94. package/dist/server/out/accounts/2fa/index.txt +8 -8
  95. package/dist/server/out/accounts/email/__next._full.txt +7 -7
  96. package/dist/server/out/accounts/email/__next._tree.txt +2 -2
  97. package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +7 -7
  98. package/dist/server/out/accounts/email/index.html +1 -1
  99. package/dist/server/out/accounts/email/index.txt +7 -7
  100. package/dist/server/out/accounts/login/__next._full.txt +7 -7
  101. package/dist/server/out/accounts/login/__next._tree.txt +2 -2
  102. package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +7 -7
  103. package/dist/server/out/accounts/login/index.html +1 -1
  104. package/dist/server/out/accounts/login/index.txt +7 -7
  105. package/dist/server/out/accounts/logout/__next._full.txt +7 -7
  106. package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
  107. package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +7 -7
  108. package/dist/server/out/accounts/logout/index.html +1 -1
  109. package/dist/server/out/accounts/logout/index.txt +7 -7
  110. package/dist/server/out/accounts/password/change/__next._full.txt +7 -7
  111. package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
  112. package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +7 -7
  113. package/dist/server/out/accounts/password/change/index.html +1 -1
  114. package/dist/server/out/accounts/password/change/index.txt +7 -7
  115. package/dist/server/out/accounts/password/reset/__next._full.txt +5 -5
  116. package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
  117. package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +5 -5
  118. package/dist/server/out/accounts/password/reset/index.html +1 -1
  119. package/dist/server/out/accounts/password/reset/index.txt +5 -5
  120. package/dist/server/out/accounts/signup/__next._full.txt +7 -7
  121. package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
  122. package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +7 -7
  123. package/dist/server/out/accounts/signup/index.html +1 -1
  124. package/dist/server/out/accounts/signup/index.txt +7 -7
  125. package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +15 -15
  126. package/dist/server/out/actions/__next._full.txt +15 -15
  127. package/dist/server/out/actions/__next._tree.txt +2 -2
  128. package/dist/server/out/actions/index.html +1 -1
  129. package/dist/server/out/actions/index.txt +15 -15
  130. package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +8 -8
  131. package/dist/server/out/agents/__next._full.txt +8 -8
  132. package/dist/server/out/agents/__next._tree.txt +2 -2
  133. package/dist/server/out/agents/index.html +1 -1
  134. package/dist/server/out/agents/index.txt +8 -8
  135. package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +10 -10
  136. package/dist/server/out/approvals/__next._full.txt +10 -10
  137. package/dist/server/out/approvals/__next._tree.txt +2 -2
  138. package/dist/server/out/approvals/index.html +1 -1
  139. package/dist/server/out/approvals/index.txt +10 -10
  140. package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +12 -12
  141. package/dist/server/out/artifacts/__next._full.txt +12 -12
  142. package/dist/server/out/artifacts/__next._tree.txt +2 -2
  143. package/dist/server/out/artifacts/index.html +1 -1
  144. package/dist/server/out/artifacts/index.txt +12 -12
  145. package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +10 -10
  146. package/dist/server/out/audit/__next._full.txt +10 -10
  147. package/dist/server/out/audit/__next._tree.txt +2 -2
  148. package/dist/server/out/audit/index.html +1 -1
  149. package/dist/server/out/audit/index.txt +10 -10
  150. package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +8 -8
  151. package/dist/server/out/chat/__next._full.txt +8 -8
  152. package/dist/server/out/chat/__next._tree.txt +2 -2
  153. package/dist/server/out/chat/index.html +1 -1
  154. package/dist/server/out/chat/index.txt +8 -8
  155. package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +10 -10
  156. package/dist/server/out/connections/__next._full.txt +10 -10
  157. package/dist/server/out/connections/__next._tree.txt +2 -2
  158. package/dist/server/out/connections/index.html +1 -1
  159. package/dist/server/out/connections/index.txt +10 -10
  160. package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +11 -11
  161. package/dist/server/out/credentials/__next._full.txt +11 -11
  162. package/dist/server/out/credentials/__next._tree.txt +2 -2
  163. package/dist/server/out/credentials/index.html +1 -1
  164. package/dist/server/out/credentials/index.txt +11 -11
  165. package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +10 -10
  166. package/dist/server/out/documents/__next._full.txt +10 -10
  167. package/dist/server/out/documents/__next._tree.txt +2 -2
  168. package/dist/server/out/documents/index.html +1 -1
  169. package/dist/server/out/documents/index.txt +10 -10
  170. package/dist/server/out/index.html +1 -1
  171. package/dist/server/out/index.txt +10 -10
  172. package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +10 -10
  173. package/dist/server/out/people/__next._full.txt +10 -10
  174. package/dist/server/out/people/__next._tree.txt +2 -2
  175. package/dist/server/out/people/index.html +1 -1
  176. package/dist/server/out/people/index.txt +10 -10
  177. package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +13 -13
  178. package/dist/server/out/plugins/__next._full.txt +13 -13
  179. package/dist/server/out/plugins/__next._tree.txt +2 -2
  180. package/dist/server/out/plugins/index.html +1 -1
  181. package/dist/server/out/plugins/index.txt +13 -13
  182. package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +10 -10
  183. package/dist/server/out/projects/__next._full.txt +10 -10
  184. package/dist/server/out/projects/__next._tree.txt +2 -2
  185. package/dist/server/out/projects/index.html +1 -1
  186. package/dist/server/out/projects/index.txt +10 -10
  187. package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +12 -12
  188. package/dist/server/out/runs/__next._full.txt +12 -12
  189. package/dist/server/out/runs/__next._tree.txt +2 -2
  190. package/dist/server/out/runs/index.html +1 -1
  191. package/dist/server/out/runs/index.txt +12 -12
  192. package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +12 -12
  193. package/dist/server/out/schedules/__next._full.txt +12 -12
  194. package/dist/server/out/schedules/__next._tree.txt +2 -2
  195. package/dist/server/out/schedules/index.html +1 -1
  196. package/dist/server/out/schedules/index.txt +12 -12
  197. package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +10 -10
  198. package/dist/server/out/settings/__next._full.txt +10 -10
  199. package/dist/server/out/settings/__next._tree.txt +2 -2
  200. package/dist/server/out/settings/index.html +1 -1
  201. package/dist/server/out/settings/index.txt +10 -10
  202. package/dist/server/out/setup/__next._full.txt +7 -7
  203. package/dist/server/out/setup/__next._tree.txt +2 -2
  204. package/dist/server/out/setup/__next.setup.__PAGE__.txt +7 -7
  205. package/dist/server/out/setup/index.html +1 -1
  206. package/dist/server/out/setup/index.txt +7 -7
  207. package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +10 -10
  208. package/dist/server/out/tables/__next._full.txt +10 -10
  209. package/dist/server/out/tables/__next._tree.txt +2 -2
  210. package/dist/server/out/tables/index.html +1 -1
  211. package/dist/server/out/tables/index.txt +10 -10
  212. package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +10 -10
  213. package/dist/server/out/webhooks/__next._full.txt +10 -10
  214. package/dist/server/out/webhooks/__next._tree.txt +2 -2
  215. package/dist/server/out/webhooks/index.html +1 -1
  216. package/dist/server/out/webhooks/index.txt +10 -10
  217. package/dist/server/out/workspaces/invite/__next._full.txt +6 -6
  218. package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
  219. package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +6 -6
  220. package/dist/server/out/workspaces/invite/index.html +1 -1
  221. package/dist/server/out/workspaces/invite/index.txt +6 -6
  222. package/docs/browser-sessions.md +85 -0
  223. package/docs/npm-distribution.md +13 -11
  224. package/docs/remote-mcp.md +51 -0
  225. package/package.json +53 -20
  226. package/runtime/README.md +9 -7
  227. package/dist/runtime/generated/schema.d.ts +0 -6443
  228. package/dist/server/out/THIRD_PARTY_NOTICES.md +0 -13
  229. package/dist/server/out/_next/static/chunks/016glzdsa3q5_.js +0 -1
  230. package/dist/server/out/_next/static/chunks/05i1qq0mw887k.js +0 -1
  231. package/dist/server/out/_next/static/chunks/06tt8wiyre1ez.js +0 -1
  232. package/dist/server/out/_next/static/chunks/0cm9i2msjsy--.js +0 -1
  233. package/dist/server/out/_next/static/chunks/0hq5dvj7fy64b.js +0 -1
  234. package/dist/server/out/_next/static/chunks/0ma4vl-fj0tmu.js +0 -1
  235. package/dist/server/out/_next/static/chunks/0noal-jqjivtf.js +0 -1
  236. package/dist/server/out/_next/static/chunks/0spckmsiek0gd.js +0 -1
  237. package/dist/server/out/_next/static/chunks/103sekujf0rxr.js +0 -1
  238. package/dist/server/out/_next/static/chunks/10h8kpcnjfe_v.js +0 -1
  239. package/dist/server/out/_next/static/chunks/16_aurf9162_6.js +0 -1
  240. package/dist/server/out/_next/static/chunks/1c48yx15nlt6w.js +0 -1
  241. package/dist/server/out/_next/static/chunks/1jp827_2p_wkf.js +0 -1
  242. package/dist/server/out/_next/static/chunks/1kdk-viqnjs3j.js +0 -1
  243. package/dist/server/out/_next/static/chunks/1mlfee105fhl7.js +0 -1
  244. package/dist/server/out/_next/static/chunks/1q9jpzm9b6zy9.js +0 -1
  245. package/dist/server/out/_next/static/chunks/1v0-a7pehktp9.js +0 -22
  246. package/dist/server/out/_next/static/chunks/24qxhh2dqvhaa.js +0 -1
  247. package/dist/server/out/_next/static/chunks/253gnn8ai3i89.js +0 -1
  248. package/dist/server/out/_next/static/chunks/27umf0z4povug.js +0 -1
  249. package/dist/server/out/_next/static/chunks/2a_c2xcjy62fq.css +0 -1
  250. package/dist/server/out/_next/static/chunks/2mvlvogrl6o0u.js +0 -1
  251. package/dist/server/out/_next/static/chunks/2xzrcwr9q6195.js +0 -1
  252. package/dist/server/out/_next/static/chunks/2yi6lq56xoijl.js +0 -31
  253. package/dist/server/out/_next/static/chunks/30g0jo299pr8e.js +0 -1
  254. package/dist/server/out/_next/static/chunks/36tf56rgybjz0.js +0 -3
  255. package/dist/server/out/_next/static/chunks/39dofrhzg_uju.js +0 -1
  256. package/dist/server/out/_next/static/chunks/3a8aanmz3kfof.js +0 -1
  257. package/dist/server/out/_next/static/chunks/3bd3k15tx3lj1.js +0 -1
  258. package/dist/server/out/_next/static/chunks/3d34pxerfr389.js +0 -1
  259. package/dist/server/out/_next/static/chunks/3elab9vgx7_ok.js +0 -1
  260. package/dist/server/out/_next/static/chunks/3gvae9c-5pi5z.js +0 -1
  261. package/dist/server/out/_next/static/chunks/3hzia782sc9pf.js +0 -1
  262. package/dist/server/out/_next/static/chunks/3jl4k-15i8847.js +0 -1
  263. package/dist/server/out/_next/static/chunks/3lb23el6qno6s.js +0 -1
  264. package/dist/server/out/_next/static/chunks/3prum3lr5470i.js +0 -3
  265. package/dist/server/out/_next/static/chunks/3prwkrciuqwjg.js +0 -1
  266. package/dist/server/out/_next/static/chunks/3txmqtuo5xgfd.js +0 -3
  267. package/dist/server/out/third-party-licenses/monaco-editor.txt +0 -21
  268. package/dist/server/out/third-party-licenses/zod.txt +0 -21
  269. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_buildManifest.js +0 -0
  270. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_clientMiddlewareManifest.js +0 -0
  271. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_ssgManifest.js +0 -0
@@ -52,4 +52,4 @@ ${t.join("\n")}
52
52
 
53
53
  `)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),c=n(c,d),l)?r_([],f,c,d,r,e,d?.abortEarly===!0):c:i(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c)}});function rw(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!ep(e));return 1===i.length?(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=>e_(e,r,eH())))}),t)}let rk=eV("$ZodUnion",(e,t)=>{nA.init(e,t),eM(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),eM(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),eM(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),eM(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>k(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>rw(t,r,e,i)):rw(a,r,e,i)}});function r$(e,t,n,r){let i=[];for(let t=0;t<e.length;t++)0===e[t].issues.length&&i.push(t);return 1===i.length?t.value=e[i[0]].value:0===i.length?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>e_(e,r,eH())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t}(e,t)=>{rk.init(e,t),t.inclusive=!1;let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(a.push(t),o=!0):a.push(t)}return o?Promise.all(a).then(t=>r$(t,r,e,i)):r$(a,r,e,i)}},(e,t)=>{t.inclusive=!1,rk.init(e,t);let n=e._zod.parse;eM(e,"propValues",e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);for(let[r,o]of(i[e.def.discriminator]?.has(void 0)&&n++,Object.entries(i)))for(let e of(Object.prototype.hasOwnProperty.call(t,r)||x(t,r,new Set),o))t[r].add(e)}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=A(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=z(()=>(function(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t})(t));e._zod.parse=(i,o)=>{let a=i.value;if(!J(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=a?.[t.discriminator],u=r.value.get(s);return u&&(void 0!==s||"backward"!==o.direction)?u._zod.run(i,o):t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:a,path:[t.discriminator],inst:e}),i)}};let rO=eV("$ZodIntersection",(e,t)=>{nA.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>rS(e,t,n)):rS(e,i,o)}});function rS(e,t,n){let r,i=new Map,o=new Map,a=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}else r??(r=e),n=e.keys;for(let e of n)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let n of t.issues)a(n,"l")||e.issues.push(n);for(let t of n.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=r?s.filter(e=>r.keys.includes(e)):[];for(let n of(t.length&&e.issues.push({...r,keys:t}),s))!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}let u=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(B(t)&&B(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===r)continue;let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<t.length;i++){let o=e(t[i],n[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}(t.value,n.value);if(!u.valid){if(ep(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}let rP=eV("$ZodTuple",(e,t)=>{nA.init(e,t);let n=t.items,r=eX.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=r?r.alloc(e,i,[],o):[];let s=[],u=rx(n,"optin"),l=rx(n,"optout");if(!t.rest){if(a.length<u)return i.issues.push({code:"too_small",minimum:u,inclusive:!0,input:a,inst:e,origin:"array"}),i;a.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let c=Array(n.length),d=t.rest?o?.abortEarly:void 0,f=!1;for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},o);t instanceof Promise?s.push(t.then(t=>{c[e]=t})):(c[e]=t,d&&!f&&t.issues.length&&(f=ep(t)))}if(t.rest&&!f){let e=n.length-1,r=a.slice(n.length),u=i.issues.length;for(let n of r){if(d&&i.issues.length!==u){if(ep(i,u))break;u=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},o);r instanceof Promise?s.push(r.then(t=>rA(t,i,e))):rA(r,i,e)}}return s.length?Promise.all(s).then(()=>rZ(c,i,n,a,l)):rZ(c,i,n,a,l)}});function rx(e,t){for(let n=e.length-1;n>=0;n--)if(!("optin"===t?void 0!==e[n]._zod.optin:"optional"===e[n]._zod.optout))return n+1;return 0}function rA(e,t,n){e.issues.length&&t.issues.push(...em(n,e.issues)),t.value[n]=e.value}function rZ(e,t,n,r,i){for(let o=0;o<n.length;o++){let a=e[o],s=o<r.length;if(!s&&o>=i&&"optional"===n[o]._zod.optin){t.value.length=o;break}if(a.issues.length){if(!s&&o>=i){t.value.length=o;break}t.issues.push(...em(o,a.issues))}t.value[o]=a.value}for(let e=t.value.length-1;e>=r.length;e--)if("optional"===n[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}let rT=eV("$ZodRecord",(e,t)=>{nA.init(e,t);let n=eX.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!B(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){let u;r.value=n?n.alloc(e,r,{},i):{};let l=new Set;for(let n of s)if("string"==typeof n||"number"==typeof n||"symbol"==typeof n){if(l.add("number"==typeof n?n.toString():n),"__proto__"===n)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(e=>e_(e,i,eH())),input:n,path:[n],inst:e});continue}let u=s.value;if("__proto__"===u)continue;let c=t.valueType._zod.run({value:o[n],issues:[]},i);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&r.issues.push(...em(n,e.issues)),r.value[u]=e.value})):(c.issues.length&&r.issues.push(...em(n,c.issues)),r.value[u]=c.value)}for(let e in o)if(!l.has(e))if("loose"===t.mode){if("__proto__"===e)continue;r.value[e]=o[e]}else(u=u??[]).push(e);u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}else{let u;for(let l of(r.value=n?n.alloc(e,r,{},i):{},Reflect.ownKeys(o))){if("__proto__"===l||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let n=t.keyType._zod.run({value:l,issues:[]},i);if(n instanceof Promise)throw Error("Async schemas not supported in object keys currently");if("string"==typeof l&&tE.test(l)&&n.issues.length){let e=t.keyType._zod.run({value:Number(l),issues:[]},i);if(e instanceof Promise)throw Error("Async schemas not supported in object keys currently");0===e.issues.length&&(n=e)}if(n.issues.length){"loose"===t.mode?r.value[l]=o[l]:s?(u=u??[]).push(l):r.issues.push({code:"invalid_key",origin:"record",issues:n.issues.map(e=>e_(e,i,eH())),input:l,path:[l],inst:e});continue}let c=n.value;if("__proto__"===c)continue;let d=t.valueType._zod.run({value:o[l],issues:[]},i);d instanceof Promise?a.push(d.then(e=>{e.issues.length&&r.issues.push(...em(l,e.issues)),r.value[c]=e.value})):(d.issues.length&&r.issues.push(...em(l,d.issues)),r.value[c]=d.value)}u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}});function rE(e,t,n,r,i,o,a){e.issues.length&&(G.has(typeof r)?n.issues.push(...em(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(e=>e_(e,a,eH()))})),t.issues.length&&(G.has(typeof r)?n.issues.push(...em(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(e=>e_(e,a,eH()))})),n.value.set(e.value,t.value)}function rj(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}(e,t)=>{nA.init(e,t);let n=eX.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),r;let a=[];r.value=n?n.alloc(e,r,new Map,i):new Map;let s=i?.abortEarly,u=r.issues.length;for(let[n,l]of o){if(s&&r.issues.length!==u){if(ep(r,u))break;u=r.issues.length}let c=t.keyType._zod.run({value:n,issues:[]},i),d=t.valueType._zod.run({value:l,issues:[]},i);c instanceof Promise||d instanceof Promise?a.push(Promise.all([c,d]).then(([t,a])=>{rE(t,a,r,n,o,e,i)})):rE(c,d,r,n,o,e,i)}return a.length?Promise.all(a).then(()=>r):r},rc(e,rf)},(e,t)=>{nA.init(e,t);let n=eX.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!(o instanceof Set))return r.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),r;let a=[];r.value=n?n.alloc(e,r,new Set,i):new Set;let s=i?.abortEarly,u=r.issues.length;for(let e of o){if(s&&r.issues.length!==u){if(ep(r,u))break;u=r.issues.length}let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?a.push(n.then(e=>rj(e,r))):rj(n,r)}return a.length?Promise.all(a).then(()=>r):r},rc(e,rp)};let rN=eV("$ZodEnum",(e,t)=>{nA.init(e,t);let n=v(t.entries),r=new Set(n);e._zod.values=r,eM(e,"pattern",e=>{let t=v(e.def.entries).filter(e=>G.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>H(e.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),rI=eV("$ZodLiteral",(e,t)=>{nA.init(e,t);let n=new Set(t.values);e._zod.values=n,eM(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?H(e):e?H(e.toString()):String(e)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),rD=((e,t)=>{nA.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),t}},eV("$ZodTransform",(e,t)=>{nA.init(e,t),e._zod.optin="optional",eX.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eG(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 eW;return n.value=i,n}}));function rR(e,t){return e.value=t.issues.length?void 0:t.value,e}let rF=eV("$ZodOptional",(e,t)=>{nA.init(e,t),eM(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",eM(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),eM(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${k(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>rR(e,t)):rR(e,r)}return t.innerType._zod.run(e,n)}}),rC=eV("$ZodExactOptional",(e,t)=>{rF.init(e,t),eM(e,"values",e=>e.def.innerType._zod.values),eM(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),rM=eV("$ZodNullable",(e,t)=>{nA.init(e,t),eM(e,"optin",e=>e.def.innerType._zod.optin),eM(e,"optout",e=>e.def.innerType._zod.optout),eM(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${k(t.source)}|null)$`):void 0}),eM(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),rU=eV("$ZodDefault",(e,t)=>{nA.init(e,t),e._zod.optin="defaulted",eM(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>rJ(e,t)):rJ(r,t)}});function rJ(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}let rL=eV("$ZodPrefault",(e,t)=>{nA.init(e,t),e._zod.optin="defaulted",eM(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),rB=eV("$ZodNonOptional",(e,t)=>{nA.init(e,t),eM(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rK(t,e)):rK(i,e)}});function rK(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function rV(e,t,n,r){return t.issues.length?e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>e_(e,r,eH()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}(e,t)=>{nA.init(e,t),e._zod.parse=(e,n)=>{if("backward"===n.direction)throw new eG("ZodSuccess");let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===r.issues.length,e)}};let rW=eV("$ZodCatch",(e,t)=>{nA.init(e,t),eM(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),eM(e,"optout",e=>e.def.innerType._zod.optout),eM(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>rV(e,r,t,n)):rV(e,r,t,n)}}),rG=((e,t)=>{nA.init(e,t),e._zod.parse=(t,n)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)},eV("$ZodPipe",(e,t)=>{nA.init(e,t),eM(e,"values",e=>e.def.in._zod.values),eM(e,"optin",e=>e.def.in._zod.optin),eM(e,"optout",e=>e.def.out._zod.optout),eM(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>rX(e,t.in,n)):rX(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>rX(e,t.out,n)):rX(r,t.out,n)}}));function rX(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function rH(e,t,n){if(e.issues.length)return e.aborted=!0,e;if("forward"===(n.direction||"forward")){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>rq(e,r,t.out,n)):rq(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>rq(e,r,t.in,n)):rq(e,r,t.in,n)}}function rq(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}(e,t)=>{nA.init(e,t),eM(e,"values",e=>e.def.in._zod.values),eM(e,"optin",e=>e.def.in._zod.optin),eM(e,"optout",e=>e.def.out._zod.optout),eM(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("forward"===(n.direction||"forward")){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>rH(e,t,n)):rH(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>rH(e,t,n)):rH(r,t,n)}}},(e,t)=>{rG.init(e,t)};let rY=eV("$ZodReadonly",(e,t)=>{nA.init(e,t),eM(e,"propValues",e=>e.def.innerType._zod.propValues),eM(e,"values",e=>e.def.innerType._zod.values),eM(e,"optin",e=>e.def.innerType?._zod?.optin),eM(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(rQ):rQ(r)}});function rQ(e){return e.memo||(e.value=Object.freeze(e.value)),e}(e,t)=>{nA.init(e,t);let n=[];for(let e of t.parts)if("object"==typeof e&&null!==e){let t=function e(t){let n=t._zod.def,r=t._zod.pattern?.source,i=n.innerType??t._zod.innerType;if(i){let t=i._zod.pattern?.source,n=e(i);return r&&t&&n&&n!==t?r.replace(k(t),()=>k(n)):r}if(n.options){let t=n.options.map(e);if(t.every(Boolean))return`^(${t.map(e=>k(e)).join("|")})$`}return function(e){let t,n,r=e._zod.def,i=r.pattern,o=!!r.format?.includes("int");for(let e of r.checks??[]){let r=e._zod.def;r.pattern&&(i=r.pattern),o||(o=!!r.format?.includes("int"));let a=r.minimum??r.length,s=r.maximum??r.length;void 0!==a&&(void 0===t||a>t)&&(t=a),void 0!==s&&(void 0===n||s<n)&&(n=s)}if(i)return i.source;if(void 0!==t&&void 0!==n&&t>n)return"(?!)";if(void 0!==t||void 0!==n)return tA({minimum:t,maximum:n}).source;let a=e._zod.pattern;return(o&&a===tE?tT:a)?.source}(t)}(e);if(!t)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);n.push(k(t))}else if(null===e||X.has(typeof e))n.push(H(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join("")}$`),e._zod.parse=(n,r)=>("string"!=typeof n.value?n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source})),n)},(e,t)=>{nA.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))};let r0=eV("$ZodLazy",(e,t)=>{nA.init(e,t),S(e._zod,"innerType",()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner)),eM(e,"pattern",e=>e.innerType?._zod?.pattern),eM(e,"propValues",e=>e.innerType?._zod?.propValues),eM(e,"optin",e=>e.innerType?._zod?.optin??void 0),eM(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),r1=eV("$ZodCustom",(e,t)=>{tH.init(e,t),nA.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=>r4(t,n,r,e));r4(i,n,r,e)}});function r4(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(eO(e))}}function r2(e){return e.checks&&(e.checks=[...e.checks]),e}function r9(e,t){return new t0({check:"less_than",...Y(t),value:e,inclusive:!1})}function r6(e,t){return new t0({check:"less_than",...Y(t),value:e,inclusive:!0})}function r3(e,t){return new t1({check:"greater_than",...Y(t),value:e,inclusive:!1})}function r5(e,t){return new t1({check:"greater_than",...Y(t),value:e,inclusive:!0})}function r8(e,t){return new t4({check:"multiple_of",...Y(t),value:e})}function r7(e,t){return new t8({check:"max_length",...Y(t),maximum:e})}function ie(e,t){return new t7({check:"min_length",...Y(t),minimum:e})}function it(e,t){return new ne({check:"length_equals",...Y(t),length:e})}function ir(e){return new nl({check:"overwrite",tx:e})}e.i(82358);var ii,io,ia=e.i(22143),ia=ia,is=ia,iu=ia,il=ia,ic=ia,id=ia,ip=ia,ih=ia,im=ia,iy=ia,iv=ia,ig=ia,i_=ia,ib=ia,iz=ia,iw=ia;function ik(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&x(e,t,n[t]);return e}function i$(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??e6,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function iO(e,t,n,r,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(n,o),!0}function iS(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),iS(o,t,r),t.seen.get(o).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&ik(a.schema,u),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function iP(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function ix(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${iP(o)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+iP(o)}})(t);r.def={...r.schema},o&&(r.defId=o);let a=r.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
54
54
 
55
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iA=new Set(["type","properties","required","additionalProperties"]),iZ=["oneOf","anyOf"];function iT(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iE(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!iA.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??iT(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}x(n,r,1===e.length?e[0]:iE(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=iT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ij(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):ik(i,s),ik(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iA)if(t in e)return;let n=t.filter(e=>iZ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=iZ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>iE([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=iE(t);r&&(delete e.allOf,ik(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ik(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,x(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:iN(t,"input",e.processors),output:iN(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let iN=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=i$({...i??{},target:o,io:t,processors:n});return iS(e,a),ix(a,e),ij(a,e)},iI=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},iD=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},iR=(e,t)=>{iI(e,"minimum",t),iD(e,"maximum",t)},iF=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iC=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},iM=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},iU=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},iJ=(e,t)=>iI(e,"minimum",t.minimum),iL=(e,t)=>iD(e,"maximum",t.maximum),iB=e=>(t,n)=>{iU(t,n.format);let[r,i]=e[n.format];iI(t,"minimum",r),iD(t,"maximum",i)},iK={greater_than:(e,t)=>iI(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iD(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iF(e,t.value),number_format:iB(en),bigint_format:iB(er),min_length:iJ,max_length:iL,length_equals:(e,t)=>iR(e,t.length),min_size:iJ,max_size:iL,size_equals:(e,t)=>iR(e,t.size),string_format:(e,t)=>{iU(e,t.format),t.pattern&&iC(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>iM(e,t.mime)};function iV(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])iK[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&iI(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&iI(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&iD(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&iD(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&iF(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&iM(t,r.mime),r.patterns??[]))iC(t,e);return t}let iW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iG=new Map([[n3,tv],[n8,tg]]),iX=e=>iG.get(e)??e;function iH(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?iH(t.out):"catch"===t.type?iH(t.innerType):e._zod.optin}let iq=new WeakMap,iY=Symbol();function iQ(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(iO(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),iY):JSON.parse(a)}let i0=(e,t,n,r)=>{let i=e._zod.def;iS(i.innerType,t,r),t.seen.get(e).ref=i.innerType},i1=new WeakSet([Object.prototype,Error.prototype]);function i4(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})}})}let i2=eV("ZodError",(e,t)=>{nm.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);i1.has(n)||(i1.add(n),i4(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){let n=e[i],a=i===e.length-1;if("_errors"===n){a&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];a&&s._errors.push(t(o)),r=s,i++}}}};return r(e),n})(e,t)),i4(n,"flatten",e=>t=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),i4(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_,2)}),i4(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error});e.s(["ZodRealError",0,i2],89282);let i9=ng(i2),i6=nb(i2),i3=nw(i2),i5=n$(i2),i8=(r=ng(i2),i=(e,t,n,o)=>r(e,t,n?{...n,direction:"backward"}:{direction:"backward"},nv(i,o))),i7=(o=ng(i2),a=(e,t,n,r)=>o(e,t,n,nv(a,r))),oe=(s=nb(i2),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await s(e,t,i,nv(u,r))}),ot=(l=nb(i2),c=async(e,t,n,r)=>await l(e,t,n,nv(c,r))),on=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nw(i2)(e,t,r)},or=(e,t,n)=>nw(i2)(e,t,n),oi=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return n$(i2)(e,t,r)},oo=async(e,t,n)=>n$(i2)(e,t,n);function oa(){eX.memoizer||eH({memoizer:e9})}let os=eV("ZodType",(e,t)=>(eX.localeError||eH({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(e$(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${ee(n.values[0])}`;return`Invalid option: expected one of ${g(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${g(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),nA.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(is.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return q(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new ao({type:"custom",check:"custom",fn:e,...Y(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eO(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(eO(e)))},e(t.value,t)),(i=new tH({check:"custom",...Y(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(ir(e))},optional(){return o2(this)},exactOptional(){var e;return e=this,new o9({type:"optional",innerType:e})},nullable(){return o3(this)},nullish(){return o2(o3(this))},nonoptional(e){var t,n;return t=this,n=e,new o7({type:"nonoptional",innerType:t,...id.normalizeParams(n)})},array(){return oB(this)},or(e){return oG([this,e])},and(e){var t;return t=this,new oX({type:"intersection",left:t,right:e})},transform(e){return an(this,new o1({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new o5({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():iw.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new o8({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():iw.shallowClone(n)}})},catch(e){var t,n;return t=this,new ae({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:ia.constantCatch(n)})},pipe(e){return an(this,e)},readonly(){var e;return e=this,new ar({type:"readonly",innerType:e})},describe(e){let t=this.clone();return e6.add(t,{description:e}),t},meta(...e){if(0===e.length)return e6.get(this);let t=this.clone();return e6.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return iu.hide(this,"~standard",{...nE(this),jsonSchema:{input:iN(this,"input"),output:iN(this,"output")}})},set"~standard"(e){il.own(this,"~standard",e)},parse:function e(t,n){return i9(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await i6(this,t,n,{callee:e})},safeParse(e,t){return i3(this,e,t)},async safeParseAsync(e,t){return i5(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){il.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==nO)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nS]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new eW;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return nP(this,e,t)},encode:function e(t,n){return i8(this,t,n,{callee:e})},decode:function e(t,n){return i7(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await oe(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ot(this,t,n,{callee:e})},safeEncode(e,t){return on(this,e,t)},safeDecode(e,t){return or(this,e,t)},async safeEncodeAsync(e,t){return oi(this,e,t)},async safeDecodeAsync(e,t){return oo(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=i$({...n,processors:t});return iS(e,r),ix(r,e),ij(r,e)})(this,{})(e)},get description(){return e6.get(this)?.description},get _def(){return this._zod.def}}),ou=eV("_ZodString",(e,t)=>{nj.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:u}=iV(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=iW[o]??o,""===n.format&&delete n.format,("time"===o||u)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(iX);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},ic.derived({format:e=>iV(e).format??null,minLength:e=>iV(e).minimum??null,maxLength:e=>iV(e).maximum??null},{regex(...e){return this.check(function(e,t){return new nn({check:"string_format",format:"regex",...Y(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new no({check:"string_format",format:"includes",...Y(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new na({check:"string_format",format:"starts_with",...Y(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ns({check:"string_format",format:"ends_with",...Y(t),suffix:e})}(...e))},min(...e){return this.check(ie(...e))},max(...e){return this.check(r7(...e))},length(...e){return this.check(it(...e))},nonempty(...e){return this.check(ie(1,...e))},lowercase(e){return this.check(new nr({check:"string_format",format:"lowercase",...Y(e)}))},uppercase(e){return this.check(new ni({check:"string_format",format:"uppercase",...Y(e)}))},trim(){return this.check(ir(e=>e.trim()))},normalize(...e){return this.check(function(e){return ir(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(ir(e=>e.toLowerCase()))},toUpperCase(){return this.check(ir(e=>e.toUpperCase()))},slugify(){return this.check(ir(e=>M(e)))}})),ol=eV("ZodString",(e,t)=>{nj.init(e,t),ou.init(e,t)},{email(e){return this.check(new oy({type:"string",format:"email",check:"string_format",abort:!1,...Y(e)}))},url(e){return this.check(new o_({type:"string",format:"url",check:"string_format",abort:!1,...Y(e)}))},jwt(e){return this.check(new oN({type:"string",format:"jwt",check:"string_format",abort:!1,...Y(e)}))},emoji(e){return this.check(new ob({type:"string",format:"emoji",check:"string_format",abort:!1,...Y(e)}))},guid(e){return this.check(new ov({type:"string",format:"guid",check:"string_format",abort:!1,...Y(e)}))},uuid(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,...Y(e)}))},uuidv4(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Y(e)}))},uuidv6(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Y(e)}))},uuidv7(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Y(e)}))},nanoid(e){return this.check(new oz({type:"string",format:"nanoid",check:"string_format",abort:!1,...Y(e)}))},cuid(e){return this.check(new ow({type:"string",format:"cuid",check:"string_format",abort:!1,...Y(e)}))},cuid2(e){return this.check(new ok({type:"string",format:"cuid2",check:"string_format",abort:!1,...Y(e)}))},ulid(e){return this.check(new o$({type:"string",format:"ulid",check:"string_format",abort:!1,...Y(e)}))},base64(e){return this.check(new oT({type:"string",format:"base64",check:"string_format",abort:!1,...Y(e)}))},base64url(e){return this.check(new oE({type:"string",format:"base64url",check:"string_format",abort:!1,...Y(e)}))},xid(e){return this.check(new oO({type:"string",format:"xid",check:"string_format",abort:!1,...Y(e)}))},ksuid(e){return this.check(new oS({type:"string",format:"ksuid",check:"string_format",abort:!1,...Y(e)}))},ipv4(e){return this.check(new oP({type:"string",format:"ipv4",check:"string_format",abort:!1,...Y(e)}))},ipv6(e){return this.check(new ox({type:"string",format:"ipv6",check:"string_format",abort:!1,...Y(e)}))},cidrv4(e){return this.check(new oA({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Y(e)}))},cidrv6(e){return this.check(new oZ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Y(e)}))},e164(e){return this.check(new oj({type:"string",format:"e164",check:"string_format",abort:!1,...Y(e)}))},datetime(e){return this.check(new of({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Y(e)}))},date(e){return this.check(new op({type:"string",format:"date",check:"string_format",...Y(e)}))},time(e){return this.check(new oh({type:"string",format:"time",check:"string_format",precision:null,...Y(e)}))},duration(e){return this.check(new om({type:"string",format:"duration",check:"string_format",...Y(e)}))}});function oc(e){return new ol(r2({type:"string",...Y(e)}))}let od=eV("ZodStringFormat",(e,t)=>{nN.init(e,t),ou.init(e,t)}),of=eV("ZodISODateTime",(e,t)=>{nX.init(e,t),od.init(e,t)}),op=eV("ZodISODate",(e,t)=>{nH.init(e,t),od.init(e,t)}),oh=eV("ZodISOTime",(e,t)=>{nq.init(e,t),od.init(e,t)}),om=eV("ZodISODuration",(e,t)=>{nY.init(e,t),od.init(e,t)}),oy=eV("ZodEmail",(e,t)=>{nR.init(e,t),od.init(e,t)}),ov=eV("ZodGUID",(e,t)=>{nI.init(e,t),od.init(e,t)}),og=eV("ZodUUID",(e,t)=>{nD.init(e,t),od.init(e,t)}),o_=eV("ZodURL",(e,t)=>{nU.init(e,t),od.init(e,t)}),ob=eV("ZodEmoji",(e,t)=>{nJ.init(e,t),od.init(e,t)}),oz=eV("ZodNanoID",(e,t)=>{nL.init(e,t),od.init(e,t)}),ow=eV("ZodCUID",(e,t)=>{nB.init(e,t),od.init(e,t)}),ok=eV("ZodCUID2",(e,t)=>{nK.init(e,t),od.init(e,t)}),o$=eV("ZodULID",(e,t)=>{nV.init(e,t),od.init(e,t)}),oO=eV("ZodXID",(e,t)=>{nW.init(e,t),od.init(e,t)}),oS=eV("ZodKSUID",(e,t)=>{nG.init(e,t),od.init(e,t)}),oP=eV("ZodIPv4",(e,t)=>{nQ.init(e,t),od.init(e,t)}),ox=eV("ZodIPv6",(e,t)=>{n4.init(e,t),od.init(e,t)}),oA=eV("ZodCIDRv4",(e,t)=>{n2.init(e,t),od.init(e,t)}),oZ=eV("ZodCIDRv6",(e,t)=>{n9.init(e,t),od.init(e,t)}),oT=eV("ZodBase64",(e,t)=>{n5.init(e,t),od.init(e,t)}),oE=eV("ZodBase64URL",(e,t)=>{n7.init(e,t),od.init(e,t)}),oj=eV("ZodE164",(e,t)=>{re.init(e,t),od.init(e,t)}),oN=eV("ZodJWT",(e,t)=>{rn.init(e,t),od.init(e,t)}),oI=eV("ZodNumber",(e,t)=>{rr.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:u,isInt:l}=iV(e);n.type=l?"integer":"number";let c="number"==typeof u&&u>=(i??-1/0),d="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(c?f?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:"number"==typeof i&&(n.minimum=i),d?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):iO(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},ic.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=iV(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=iV(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=iV(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>iV(e).format??null},{gt(e,t){return this.check(r3(e,t))},gte(e,t){return this.check(r5(e,t))},min(e,t){return this.check(r5(e,t))},lt(e,t){return this.check(r9(e,t))},lte(e,t){return this.check(r6(e,t))},max(e,t){return this.check(r6(e,t))},int(e){return this.check(oR(e))},safe(e){return this.check(oR(e))},positive(e){return this.check(r3(0,e))},nonnegative(e){return this.check(r5(0,e))},negative(e){return this.check(r9(0,e))},nonpositive(e){return this.check(r6(0,e))},multipleOf(e,t){return this.check(r8(e,t))},step(e,t){return this.check(r8(e,t))},finite(){return this}})),oD=eV("ZodNumberFormat",(e,t)=>{ri.init(e,t),oI.init(e,t)});function oR(e){return new oD({type:"number",check:"number_format",abort:!1,format:"safeint",...Y(e)})}let oF=eV("ZodBoolean",(e,t)=>{ro.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}}),oC=((e,t)=>{ra.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"BigInt cannot be represented in JSON Schema")}},eV("ZodNull",(e,t)=>{rs.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{"openapi-3.0"===e.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"}})),oM=eV("ZodUnknown",(e,t)=>{ru.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oU(){return new oM({type:"unknown"})}let oJ=eV("ZodNever",(e,t)=>{rl.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),oL=eV("ZodArray",(e,t)=>{oa(),rm.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=iV(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=iS(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ie(e,t))},nonempty(e){return this.check(ie(1,e))},max(e,t){return this.check(r7(e,t))},length(e,t){return this.check(it(e,t))},unwrap(){return this.element}});function oB(e,t){return new oL({type:"array",element:e,...Y(t)})}let oK=eV("ZodObject",(e,t)=>{oa(),rz.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&iO(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)x(n.properties,e,iS(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===iH(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=iS(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),ib.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){var e;return new oY({type:"enum",entries:Array.isArray(e=Object.keys(this._zod.def.shape))?Object.fromEntries(e.map(e=>[e,e])):e,...id.normalizeParams(void 0)})},catchall(e){return this.clone(is.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(is.mergeDefs(this._zod.def,{catchall:oU()}))},loose(){return this.clone(is.mergeDefs(this._zod.def,{catchall:oU()}))},strict(){return this.clone(is.mergeDefs(this._zod.def,{catchall:new oJ({type:"never",...Y(void 0)})}))},strip(){return this.clone(is.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return ip.extend(this,e)},safeExtend(e){return ih.safeExtend(this,e)},merge(e){return im.merge(this,e)},pick(e){return iy.pick(this,e)},omit(e){return iv.omit(this,e)},partial(...e){return ig.partial(o4,this,e[0])},exactPartial(...e){return ig.partial(o9,this,e[0],"exactPartial")},required(...e){return i_.required(o7,this,e[0])}});function oV(e,t){return new oK({type:"object",shape:e??{},...id.normalizeParams(t)})}let oW=eV("ZodUnion",(e,t)=>{rk.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{var i,o,a,s;let u,l,c;return i=e,o=t,a=n,s=r,l=!1===(u=i._zod.def).inclusive,c=u.options.map((e,t)=>iS(e,o,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?a.oneOf=c:a.anyOf=c)},e.options=t.options});function oG(e,t){return new oW({type:"union",options:e,...id.normalizeParams(t)})}let oX=eV("ZodIntersection",(e,t)=>{rO.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,u;return o=iS((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=iS(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=u=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(u))}}),oH=eV("ZodRecord",(e,t)=>{oa(),rT.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object";let o=i.keyType,a=iV(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=iS(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},a))x(n.patternProperties,iX(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){n.propertyNames=iS(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});let o=iq.get(t);o||(o=[],iq.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of iq.get(e)??[]){let i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||n.has(o))continue;let a=function e(t,n,r){if(n.$ref){if(r.has(n))return n;r.add(n);let i=t.get(n)?.def;if(!i)return n;let o=e(t,i,r);return o===i?n:o}for(let i of["anyOf","oneOf"]){let o=n[i];if(!Array.isArray(o))continue;let a=o.map(n=>e(t,n,r));a.some((e,t)=>e!==o[t])&&(n={...n,[i]:a})}let i=Array.isArray(n.type)?n.type:[n.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=n.enum??(void 0!==n.const?[n.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return n;let{minimum:s,maximum:u,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:f,id:p,...h}=n;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?tE:tT).source)),h}(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}n.additionalProperties=iS(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let s=o._zod.values,u="input"===t.io&&void 0!==iH(i.valueType);if(s&&!i.partial&&!u){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e.map(String))}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function oq(e,t,n){return new oH(t&&t._zod?{type:"record",keyType:e,valueType:t,...id.normalizeParams(n)}:{type:"record",keyType:oc(),valueType:e,...id.normalizeParams(t)})}let oY=eV("ZodEnum",(e,t)=>{rN.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=v(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];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 oY({...t,checks:[],...id.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 oY({...t,checks:[],...id.normalizeParams(r),entries:i})}}),oQ=eV("ZodLiteral",(e,t)=>{rI.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(iO(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iO(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(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 o0(e,t){return new oQ({type:"literal",values:Array.isArray(e)?e:[e],...id.normalizeParams(t)})}let o1=eV("ZodTransform",(e,t)=>{oa(),rD.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eG(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(iz.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(iz.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),o4=eV("ZodOptional",(e,t)=>{rF.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i0(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function o2(e){return new o4({type:"optional",innerType:e})}let o9=eV("ZodExactOptional",(e,t)=>{rC.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i0(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),o6=eV("ZodNullable",(e,t)=>{rM.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=iS((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function o3(e){return new o6({type:"nullable",innerType:e})}let o5=eV("ZodDefault",(e,t)=>{rU.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=iQ(i.defaultValue,e,t,n,r))!==iY&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),o8=eV("ZodPrefault",(e,t)=>{rL.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(iS(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=iQ(i.defaultValue,e,t,n,r);o!==iY&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),o7=eV("ZodNonOptional",(e,t)=>{rB.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),ae=eV("ZodCatch",(e,t)=>{rW.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;iS(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{iO(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),at=eV("ZodPipe",(e,t)=>{rG.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(iS(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function an(e,t){return new at({type:"pipe",in:e,out:t})}let ar=eV("ZodReadonly",(e,t)=>{rY.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),ai=eV("ZodLazy",(e,t)=>{r0.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS(i=e._zod.innerType,t,r),t.seen.get(e).ref=i},e.unwrap=()=>e._zod.def.getter()}),ao=eV("ZodCustom",(e,t)=>{r1.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});function aa(e){let t=new ai({type:"lazy",getter:()=>oG([oc(e),new oI(r2({type:"number",checks:[],...Y(void 0)})),new oF({type:"boolean",...Y(void 0)}),new oC({type:"null",...Y(void 0)}),oB(t),oq(oc(),t)])});return t}e.s(["array",0,oB,"json",0,aa,"literal",0,o0,"object",0,oV,"record",0,oq,"string",0,oc],62201),e.i(62201),e.s([],30421),e.i(30421),e.i(89282),e.s([],364),e.i(364),e.s([],58829),e.i(58829),e.s(["array",0,oB,"json",0,aa,"literal",0,o0,"object",0,oV,"record",0,oq,"string",0,oc],22219);var as=e.i(22219);e.s(["z",0,as],40192),e.s(["z",0,as],54105),e.s(["z",0,as],19877)}]);
55
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}let iA=new Set(["type","properties","required","additionalProperties"]),iZ=["oneOf","anyOf"];function iT(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function iE(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!iA.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??iT(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}x(n,r,1===e.length?e[0]:iE(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=iT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ij(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):ik(i,s),ik(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of iA)if(t in e)return;let n=t.filter(e=>iZ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=iZ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>iE([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=iE(t);r&&(delete e.allOf,ik(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}ik(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,x(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:iN(t,"input",e.processors),output:iN(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch(e){throw Error("Error converting schema to JSON.")}}let iN=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=i$({...i??{},target:o,io:t,processors:n});return iS(e,a),ix(a,e),ij(a,e)},iI=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},iD=(e,t,n)=>{(void 0===e[t]||n<e[t])&&(e[t]=n)},iR=(e,t)=>{iI(e,"minimum",t),iD(e,"maximum",t)},iF=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},iC=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},iM=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},iU=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},iJ=(e,t)=>iI(e,"minimum",t.minimum),iL=(e,t)=>iD(e,"maximum",t.maximum),iB=e=>(t,n)=>{iU(t,n.format);let[r,i]=e[n.format];iI(t,"minimum",r),iD(t,"maximum",i)},iK={greater_than:(e,t)=>iI(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>iD(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>iF(e,t.value),number_format:iB(en),bigint_format:iB(er),min_length:iJ,max_length:iL,length_equals:(e,t)=>iR(e,t.length),min_size:iJ,max_size:iL,size_equals:(e,t)=>iR(e,t.size),string_format:(e,t)=>{iU(e,t.format),t.pattern&&iC(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>iM(e,t.mime)};function iV(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])iK[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&iI(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&iI(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&iD(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&iD(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&iF(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&iM(t,r.mime),r.patterns??[]))iC(t,e);return t}let iW={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},iG=new Map([[n3,tv],[n8,tg]]),iX=e=>iG.get(e)??e;function iH(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?iH(t.out):"catch"===t.type?iH(t.innerType):e._zod.optin}let iq=new WeakMap,iY=Symbol();function iQ(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(iO(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),iY):JSON.parse(a)}let i0=(e,t,n,r)=>{let i=e._zod.def;iS(i.innerType,t,r),t.seen.get(e).ref=i.innerType},i1=new WeakSet([Object.prototype,Error.prototype]);function i4(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})}})}let i2=eV("ZodError",(e,t)=>{nm.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);i1.has(n)||(i1.add(n),i4(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;i<e.length;){let n=e[i],a=i===e.length-1;if("_errors"===n){a&&r._errors.push(t(o)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];a&&s._errors.push(t(o)),r=s,i++}}}};return r(e),n})(e,t)),i4(n,"flatten",e=>t=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),i4(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,_,2)}),i4(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error});e.s(["ZodRealError",0,i2],89282);let i9=ng(i2),i6=nb(i2),i3=nw(i2),i5=n$(i2),i8=(r=ng(i2),i=(e,t,n,o)=>r(e,t,n?{...n,direction:"backward"}:{direction:"backward"},nv(i,o))),i7=(o=ng(i2),a=(e,t,n,r)=>o(e,t,n,nv(a,r))),oe=(s=nb(i2),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await s(e,t,i,nv(u,r))}),ot=(l=nb(i2),c=async(e,t,n,r)=>await l(e,t,n,nv(c,r))),on=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return nw(i2)(e,t,r)},or=(e,t,n)=>nw(i2)(e,t,n),oi=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return n$(i2)(e,t,r)},oo=async(e,t,n)=>n$(i2)(e,t,n);function oa(){eX.memoizer||eH({memoizer:e9})}let os=eV("ZodType",(e,t)=>(eX.localeError||eH({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(e$(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${ee(n.values[0])}`;return`Invalid option: expected one of ${g(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${g(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`'${e}'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),nA.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(is.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return q(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new aa({type:"custom",check:"custom",fn:e,...Y(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(eO(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(eO(e)))},e(t.value,t)),(i=new tH({check:"custom",...Y(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(ir(e))},optional(){return o9(this)},exactOptional(){var e;return e=this,new o6({type:"optional",innerType:e})},nullable(){return o5(this)},nullish(){return o9(o5(this))},nonoptional(e){var t,n;return t=this,n=e,new ae({type:"nonoptional",innerType:t,...id.normalizeParams(n)})},array(){return oB(this)},or(e){return oG([this,e])},and(e){var t;return t=this,new oX({type:"intersection",left:t,right:e})},transform(e){return ar(this,new o4({type:"transform",transform:e}))},default(e){var t,n;return t=this,n=e,new o8({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():iw.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new o7({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():iw.shallowClone(n)}})},catch(e){var t,n;return t=this,new at({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:ia.constantCatch(n)})},pipe(e){return ar(this,e)},readonly(){var e;return e=this,new ai({type:"readonly",innerType:e})},describe(e){let t=this.clone();return e6.add(t,{description:e}),t},meta(...e){if(0===e.length)return e6.get(this);let t=this.clone();return e6.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return iu.hide(this,"~standard",{...nE(this),jsonSchema:{input:iN(this,"input"),output:iN(this,"output")}})},set"~standard"(e){il.own(this,"~standard",e)},parse:function e(t,n){return i9(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await i6(this,t,n,{callee:e})},safeParse(e,t){return i3(this,e,t)},async safeParseAsync(e,t){return i5(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){il.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==nO)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[nS]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new eW;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return nP(this,e,t)},encode:function e(t,n){return i8(this,t,n,{callee:e})},decode:function e(t,n){return i7(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await oe(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ot(this,t,n,{callee:e})},safeEncode(e,t){return on(this,e,t)},safeDecode(e,t){return or(this,e,t)},async safeEncodeAsync(e,t){return oi(this,e,t)},async safeDecodeAsync(e,t){return oo(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=i$({...n,processors:t});return iS(e,r),ix(r,e),ij(r,e)})(this,{})(e)},get description(){return e6.get(this)?.description},get _def(){return this._zod.def}}),ou=eV("_ZodString",(e,t)=>{nj.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:u}=iV(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=iW[o]??o,""===n.format&&delete n.format,("time"===o||u)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(iX);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},ic.derived({format:e=>iV(e).format??null,minLength:e=>iV(e).minimum??null,maxLength:e=>iV(e).maximum??null},{regex(...e){return this.check(function(e,t){return new nn({check:"string_format",format:"regex",...Y(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new no({check:"string_format",format:"includes",...Y(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new na({check:"string_format",format:"starts_with",...Y(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new ns({check:"string_format",format:"ends_with",...Y(t),suffix:e})}(...e))},min(...e){return this.check(ie(...e))},max(...e){return this.check(r7(...e))},length(...e){return this.check(it(...e))},nonempty(...e){return this.check(ie(1,...e))},lowercase(e){return this.check(new nr({check:"string_format",format:"lowercase",...Y(e)}))},uppercase(e){return this.check(new ni({check:"string_format",format:"uppercase",...Y(e)}))},trim(){return this.check(ir(e=>e.trim()))},normalize(...e){return this.check(function(e){return ir(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(ir(e=>e.toLowerCase()))},toUpperCase(){return this.check(ir(e=>e.toUpperCase()))},slugify(){return this.check(ir(e=>M(e)))}})),ol=eV("ZodString",(e,t)=>{nj.init(e,t),ou.init(e,t)},{email(e){return this.check(new oy({type:"string",format:"email",check:"string_format",abort:!1,...Y(e)}))},url(e){return this.check(new o_({type:"string",format:"url",check:"string_format",abort:!1,...Y(e)}))},jwt(e){return this.check(new oN({type:"string",format:"jwt",check:"string_format",abort:!1,...Y(e)}))},emoji(e){return this.check(new ob({type:"string",format:"emoji",check:"string_format",abort:!1,...Y(e)}))},guid(e){return this.check(new ov({type:"string",format:"guid",check:"string_format",abort:!1,...Y(e)}))},uuid(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,...Y(e)}))},uuidv4(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Y(e)}))},uuidv6(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Y(e)}))},uuidv7(e){return this.check(new og({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Y(e)}))},nanoid(e){return this.check(new oz({type:"string",format:"nanoid",check:"string_format",abort:!1,...Y(e)}))},cuid(e){return this.check(new ow({type:"string",format:"cuid",check:"string_format",abort:!1,...Y(e)}))},cuid2(e){return this.check(new ok({type:"string",format:"cuid2",check:"string_format",abort:!1,...Y(e)}))},ulid(e){return this.check(new o$({type:"string",format:"ulid",check:"string_format",abort:!1,...Y(e)}))},base64(e){return this.check(new oT({type:"string",format:"base64",check:"string_format",abort:!1,...Y(e)}))},base64url(e){return this.check(new oE({type:"string",format:"base64url",check:"string_format",abort:!1,...Y(e)}))},xid(e){return this.check(new oO({type:"string",format:"xid",check:"string_format",abort:!1,...Y(e)}))},ksuid(e){return this.check(new oS({type:"string",format:"ksuid",check:"string_format",abort:!1,...Y(e)}))},ipv4(e){return this.check(new oP({type:"string",format:"ipv4",check:"string_format",abort:!1,...Y(e)}))},ipv6(e){return this.check(new ox({type:"string",format:"ipv6",check:"string_format",abort:!1,...Y(e)}))},cidrv4(e){return this.check(new oA({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Y(e)}))},cidrv6(e){return this.check(new oZ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Y(e)}))},e164(e){return this.check(new oj({type:"string",format:"e164",check:"string_format",abort:!1,...Y(e)}))},datetime(e){return this.check(new of({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Y(e)}))},date(e){return this.check(new op({type:"string",format:"date",check:"string_format",...Y(e)}))},time(e){return this.check(new oh({type:"string",format:"time",check:"string_format",precision:null,...Y(e)}))},duration(e){return this.check(new om({type:"string",format:"duration",check:"string_format",...Y(e)}))}});function oc(e){return new ol(r2({type:"string",...Y(e)}))}let od=eV("ZodStringFormat",(e,t)=>{nN.init(e,t),ou.init(e,t)}),of=eV("ZodISODateTime",(e,t)=>{nX.init(e,t),od.init(e,t)}),op=eV("ZodISODate",(e,t)=>{nH.init(e,t),od.init(e,t)}),oh=eV("ZodISOTime",(e,t)=>{nq.init(e,t),od.init(e,t)}),om=eV("ZodISODuration",(e,t)=>{nY.init(e,t),od.init(e,t)}),oy=eV("ZodEmail",(e,t)=>{nR.init(e,t),od.init(e,t)}),ov=eV("ZodGUID",(e,t)=>{nI.init(e,t),od.init(e,t)}),og=eV("ZodUUID",(e,t)=>{nD.init(e,t),od.init(e,t)}),o_=eV("ZodURL",(e,t)=>{nU.init(e,t),od.init(e,t)}),ob=eV("ZodEmoji",(e,t)=>{nJ.init(e,t),od.init(e,t)}),oz=eV("ZodNanoID",(e,t)=>{nL.init(e,t),od.init(e,t)}),ow=eV("ZodCUID",(e,t)=>{nB.init(e,t),od.init(e,t)}),ok=eV("ZodCUID2",(e,t)=>{nK.init(e,t),od.init(e,t)}),o$=eV("ZodULID",(e,t)=>{nV.init(e,t),od.init(e,t)}),oO=eV("ZodXID",(e,t)=>{nW.init(e,t),od.init(e,t)}),oS=eV("ZodKSUID",(e,t)=>{nG.init(e,t),od.init(e,t)}),oP=eV("ZodIPv4",(e,t)=>{nQ.init(e,t),od.init(e,t)}),ox=eV("ZodIPv6",(e,t)=>{n4.init(e,t),od.init(e,t)}),oA=eV("ZodCIDRv4",(e,t)=>{n2.init(e,t),od.init(e,t)}),oZ=eV("ZodCIDRv6",(e,t)=>{n9.init(e,t),od.init(e,t)}),oT=eV("ZodBase64",(e,t)=>{n5.init(e,t),od.init(e,t)}),oE=eV("ZodBase64URL",(e,t)=>{n7.init(e,t),od.init(e,t)}),oj=eV("ZodE164",(e,t)=>{re.init(e,t),od.init(e,t)}),oN=eV("ZodJWT",(e,t)=>{rn.init(e,t),od.init(e,t)}),oI=eV("ZodNumber",(e,t)=>{rr.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:u,isInt:l}=iV(e);n.type=l?"integer":"number";let c="number"==typeof u&&u>=(i??-1/0),d="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(c?f?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u:"number"==typeof i&&(n.minimum=i),d?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):iO(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},ic.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=iV(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=iV(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=iV(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>iV(e).format??null},{gt(e,t){return this.check(r3(e,t))},gte(e,t){return this.check(r5(e,t))},min(e,t){return this.check(r5(e,t))},lt(e,t){return this.check(r9(e,t))},lte(e,t){return this.check(r6(e,t))},max(e,t){return this.check(r6(e,t))},int(e){return this.check(oR(e))},safe(e){return this.check(oR(e))},positive(e){return this.check(r3(0,e))},nonnegative(e){return this.check(r5(0,e))},negative(e){return this.check(r9(0,e))},nonpositive(e){return this.check(r6(0,e))},multipleOf(e,t){return this.check(r8(e,t))},step(e,t){return this.check(r8(e,t))},finite(){return this}})),oD=eV("ZodNumberFormat",(e,t)=>{ri.init(e,t),oI.init(e,t)});function oR(e){return new oD({type:"number",check:"number_format",abort:!1,format:"safeint",...Y(e)})}let oF=eV("ZodBoolean",(e,t)=>{ro.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}}),oC=((e,t)=>{ra.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"BigInt cannot be represented in JSON Schema")}},eV("ZodNull",(e,t)=>{rs.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{"openapi-3.0"===e.target?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"}})),oM=eV("ZodUnknown",(e,t)=>{ru.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function oU(){return new oM({type:"unknown"})}let oJ=eV("ZodNever",(e,t)=>{rl.init(e,t),os.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}}),oL=eV("ZodArray",(e,t)=>{oa(),rm.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=iV(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=iS(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ie(e,t))},nonempty(e){return this.check(ie(1,e))},max(e,t){return this.check(r7(e,t))},length(e,t){return this.check(it(e,t))},unwrap(){return this.element}});function oB(e,t){return new oL({type:"array",element:e,...Y(t)})}let oK=eV("ZodObject",(e,t)=>{oa(),rz.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&iO(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)x(n.properties,e,iS(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===iH(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=iS(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),ib.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return oQ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(is.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(is.mergeDefs(this._zod.def,{catchall:oU()}))},loose(){return this.clone(is.mergeDefs(this._zod.def,{catchall:oU()}))},strict(){return this.clone(is.mergeDefs(this._zod.def,{catchall:new oJ({type:"never",...Y(void 0)})}))},strip(){return this.clone(is.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return ip.extend(this,e)},safeExtend(e){return ih.safeExtend(this,e)},merge(e){return im.merge(this,e)},pick(e){return iy.pick(this,e)},omit(e){return iv.omit(this,e)},partial(...e){return ig.partial(o2,this,e[0])},exactPartial(...e){return ig.partial(o6,this,e[0],"exactPartial")},required(...e){return i_.required(ae,this,e[0])}});function oV(e,t){return new oK({type:"object",shape:e??{},...id.normalizeParams(t)})}let oW=eV("ZodUnion",(e,t)=>{rk.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{var i,o,a,s;let u,l,c;return i=e,o=t,a=n,s=r,l=!1===(u=i._zod.def).inclusive,c=u.options.map((e,t)=>iS(e,o,{...s,path:[...s.path,l?"oneOf":"anyOf",t]})),void(l?a.oneOf=c:a.anyOf=c)},e.options=t.options});function oG(e,t){return new oW({type:"union",options:e,...id.normalizeParams(t)})}let oX=eV("ZodIntersection",(e,t)=>{rO.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,u;return o=iS((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=iS(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=u=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(u))}}),oH=eV("ZodRecord",(e,t)=>{oa(),rT.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="object";let o=i.keyType,a=iV(o).patterns;if("loose"===i.mode&&a&&a.size>0){let e=iS(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});for(let t of(n.patternProperties={},a))x(n.patternProperties,iX(t).source,e)}else{if("draft-07"===t.target||"draft-2020-12"===t.target){n.propertyNames=iS(i.keyType,t,{...r,path:[...r.path,"propertyNames"]});let o=iq.get(t);o||(o=[],iq.set(t,o),t.deferred.push(()=>(function(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of iq.get(e)??[]){let i=e.seen.get(r),o=(i?.def??i?.schema)?.propertyNames;if(!o||!0===o||n.has(o))continue;let a=function e(t,n,r){if(n.$ref){if(r.has(n))return n;r.add(n);let i=t.get(n)?.def;if(!i)return n;let o=e(t,i,r);return o===i?n:o}for(let i of["anyOf","oneOf"]){let o=n[i];if(!Array.isArray(o))continue;let a=o.map(n=>e(t,n,r));a.some((e,t)=>e!==o[t])&&(n={...n,[i]:a})}let i=Array.isArray(n.type)?n.type:[n.type],o=!i.includes("string")&&i.some(e=>"number"===e||"integer"===e),a=n.enum??(void 0!==n.const?[n.const]:void 0);if(!o&&!a?.some(e=>"number"==typeof e))return n;let{minimum:s,maximum:u,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:f,id:p,...h}=n;return h.enum?h.enum=h.enum.map(e=>"number"==typeof e?String(e):e):"number"==typeof h.const&&(h.const=String(h.const)),o&&(h.type="string",a||(h.pattern=(i.includes("number")?tE:tT).source)),h}(t,o,new Set);a!==o&&n.set(o,a)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}})(t))),o.push(e)}n.additionalProperties=iS(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let s=o._zod.values,u="input"===t.io&&void 0!==iH(i.valueType);if(s&&!i.partial&&!u){let e=[...s].filter(e=>"string"==typeof e||"number"==typeof e);e.length>0&&(n.required=e.map(String))}})(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function oq(e,t,n){return new oH(t&&t._zod?{type:"record",keyType:e,valueType:t,...id.normalizeParams(n)}:{type:"record",keyType:oc(),valueType:e,...id.normalizeParams(t)})}let oY=eV("ZodEnum",(e,t)=>{rN.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=v(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];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 oY({...t,checks:[],...id.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 oY({...t,checks:[],...id.normalizeParams(r),entries:i})}});function oQ(e,t){return new oY({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...id.normalizeParams(t)})}let o0=eV("ZodLiteral",(e,t)=>{rI.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(iO(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(iO(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(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 o1(e,t){return new o0({type:"literal",values:Array.isArray(e)?e:[e],...id.normalizeParams(t)})}let o4=eV("ZodTransform",(e,t)=>{oa(),rD.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new eG(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(iz.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(iz.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),o2=eV("ZodOptional",(e,t)=>{rF.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i0(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function o9(e){return new o2({type:"optional",innerType:e})}let o6=eV("ZodExactOptional",(e,t)=>{rC.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i0(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),o3=eV("ZodNullable",(e,t)=>{rM.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=iS((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function o5(e){return new o3({type:"nullable",innerType:e})}let o8=eV("ZodDefault",(e,t)=>{rU.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=iQ(i.defaultValue,e,t,n,r))!==iY&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),o7=eV("ZodPrefault",(e,t)=>{rL.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(iS(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=iQ(i.defaultValue,e,t,n,r);o!==iY&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ae=eV("ZodNonOptional",(e,t)=>{rB.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),at=eV("ZodCatch",(e,t)=>{rW.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;iS(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{iO(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),an=eV("ZodPipe",(e,t)=>{rG.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(iS(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function ar(e,t){return new an({type:"pipe",in:e,out:t})}let ai=eV("ZodReadonly",(e,t)=>{rY.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),ao=eV("ZodLazy",(e,t)=>{r0.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;iS(i=e._zod.innerType,t,r),t.seen.get(e).ref=i},e.unwrap=()=>e._zod.def.getter()}),aa=eV("ZodCustom",(e,t)=>{r1.init(e,t),os.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{iO(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});function as(e){let t=new ao({type:"lazy",getter:()=>oG([oc(e),new oI(r2({type:"number",checks:[],...Y(void 0)})),new oF({type:"boolean",...Y(void 0)}),new oC({type:"null",...Y(void 0)}),oB(t),oq(oc(),t)])});return t}e.s(["array",0,oB,"enum",0,oQ,"json",0,as,"literal",0,o1,"object",0,oV,"record",0,oq,"string",0,oc],62201),e.i(62201),e.s([],30421),e.i(30421),e.i(89282),e.s([],364),e.i(364),e.s([],58829),e.i(58829),e.s(["array",0,oB,"enum",0,oQ,"json",0,as,"literal",0,o1,"object",0,oV,"record",0,oq,"string",0,oc],22219);var au=e.i(22219);e.s(["z",0,au],40192),e.s(["z",0,au],54105),e.s(["z",0,au],19877)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,28298,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t,r){let[l,u]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let a={tree:e,renderTree:t,stateKey:r,next:null},o=1,s=l,d=a;for(;null!==s&&o<1;){if(s.stateKey===r){d.next=s.next;break}{o++;let e={tree:s.tree,renderTree:s.renderTree,stateKey:s.stateKey,next:null};d.next=e,d=e}s=s.next}return u(a),a}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return u.createRenderParamsFromClient},createClientSearchParams:function(){return a.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(97689),a=e.r(66996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},47257,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return d}});let n=e.r(18050),l=e.r(8372),u=e.r(71645),a=e.r(33906),o=e.r(61994),s=e.r(15783);function d({Component:e,serverProvidedParams:t}){let r,i;if(null!==t)r=t.searchParams,i=t.params;else{let e=(0,u.use)(l.LayoutRouterContext);i=null!==e?e.parentParams:{},r=(0,a.urlSearchParamsToParsedUrlQuery)((0,u.use)(o.SearchParamsContext))}let c=(0,s.createClientSearchParams)(r),f=(0,s.createClientParams)(i);return(0,n.jsx)(e,{params:f,searchParams:c})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=e.r(18050),l=e.r(8372),u=e.r(71645),a=e.r(15783);function o({Component:e,slots:t,serverProvidedParams:r}){let s;if(null!==r)s=r.params;else{let e=(0,u.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{}}let d=(0,a.createClientParams)(s);return(0,n.jsx)(e,{...t,params:d})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68017,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return i}});let n=e.r(90809),l=e.r(18050),u=n._(e.r(71645)),a=e.r(90373),o=e.r(54394),s=e.r(8372);class d extends u.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,o.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,o.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:u}=this.state,a={[o.HTTPAccessErrorStatus.NOT_FOUND]:e,[o.HTTPAccessErrorStatus.FORBIDDEN]:t,[o.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(u){let s=u===o.HTTPAccessErrorStatus.NOT_FOUND&&e,d=u===o.HTTPAccessErrorStatus.FORBIDDEN&&t,i=u===o.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return s||d||i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,a[u]]}):n}return n}}function i({notFound:e,forbidden:t,unauthorized:r,children:n}){let o=(0,a.useUntrackedPathname)(),c=(0,u.useContext)(s.MissingSlotContext);return e||t||r?(0,l.jsx)(d,{pathname:o,notFound:e,forbidden:t,unauthorized:r,missingSlots:c,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77694,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return u.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return u.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return u.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return u.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(22976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},22976,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return u},PlaceValidationBoundaryBelowThisLevel:function(){return a},RenderValidationBoundaryAtThisLevel:function(){return o},SlotMarker:function(){return s}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=null,a=null,o=null,s=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},39756,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(90809),a=e.r(18050),o=u._(e.r(71645)),s=e.r(8372),d=e.r(1244),i=e.r(72383),c=e.r(91915),f=e.r(58442),p=e.r(68017);e.r(77694);let y=e.r(27828),m=e.r(28298);e.r(74180);let b=e.r(61994),P=e.r(33906),h=e.r(24988);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function g(e){let t=o.default.useRef(null);return(0,o.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let u=null,a=r.hashFragment;if(a){if(null===(u="top"===a?document.body:document.getElementById(a)??document.getElementsByName(a)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else u=t.current;if(null===u)return;let o=!1;(0,c.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,s=()=>{var r;let l,u;return null===n&&(r=t,n=!Number.isFinite(u=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||u<0?0:l.endsWith("px")?u:l.endsWith("%")?u/100*r:0),n};(a||(t=e.clientHeight,0!==(r=v(u,t,s))))&&((o=!0,l.current=!1,a)?u.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(u,t,s)&&u.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),o&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,a.jsx)(o.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,o.useContext)(s.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,a.jsx)(g,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:u,isActive:i}){let c,f=(0,o.useContext)(s.GlobalLayoutRouterContext);if((0,o.useContext)(b.NavigationPromisesContext),!f)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,y=(0,o.useDeferredValue)(n.data.rsc,p);if((0,h.isDeferredRsc)(y)){let e=(0,o.use)(y);null===e&&(0,o.use)(d.unresolvedThenable),c=e}else null===y&&(0,o.use)(d.unresolvedThenable),c=y;let m=c;return(0,a.jsx)(s.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:u,isActive:i},children:m})}function x({loading:e,children:t}){let r=(0,o.use)(s.LayoutRouterContext);return null===r?t:(0,a.jsx)(s.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],u=t[2];return(0,a.jsx)(o.Suspense,{name:e,fallback:(0,a.jsxs)(a.Fragment,{children:[l,u,n]}),children:r})}return(0,a.jsx)(a.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:u,template:c,notFound:b,forbidden:h,unauthorized:v,segmentViewBoundaries:g}){let x=(0,o.useContext)(s.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:M,parentSegmentPath:R,parentParams:S,parentLoadingData:F,url:B,isActive:A,debugNameContext:E}=x,L=C[0],H=null===R?[e]:R.concat([L,e]),D=C[1][e],N=M.slots?.get(e);(void 0===D||void 0===N)&&(0,o.use)(d.unresolvedThenable);let w=D[0],k=(0,y.createSegmentKey)(w),V=(0,m.useRouterBFCache)(D,N,k),I=[];do{let e=V.tree,o=V.renderTree,d=V.stateKey,y=e[0],m=S;if(Array.isArray(y)){let e=y[0],t=y[1],r=y[2],n=(0,P.getParamValueFromCacheKey)(t,r);null!==n&&(m={...S,[e]:n})}let g=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(y),x=g??E,T=void 0===g?void 0:E,C=(0,a.jsxs)(j,{renderTree:o,children:[(0,a.jsx)(i.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,a.jsx)(O,{name:T,loading:F,children:(0,a.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:h,unauthorized:v,children:(0,a.jsxs)(f.RedirectBoundary,{children:[(0,a.jsx)(_,{url:B,tree:e,params:m,renderTree:o,segmentPath:H,debugNameContext:x,isActive:A&&d===k}),null]})})})}),null]}),M=(0,a.jsxs)(s.TemplateContext.Provider,{value:C,children:[l,u,c]},d);I.push(M),V=V.next}while(null!==V)return I}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37457,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(90809),l=e.r(18050),u=n._(e.r(71645)),a=e.r(8372);function o(){let e=(0,u.useContext)(a.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},97689,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(6831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},6831,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66996,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(93504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},93504,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(18050),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},91915,(e,t,r)=>{"use strict";function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(47167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),s=e.r(18050),i=a._(e.r(71645)),c=e.r(95057),u=e.r(8372),l=e.r(18581),d=e.r(18967),f=e.r(5550),h=e.r(88540),p=e.r(91949),m=e.r(73668),y=e.r(9396);function x(t){var r;let n,o,a,[x,b]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:w,as:v,children:S,prefetch:N=null,passHref:P,replace:C,shallow:T,scroll:U,onClick:E,onMouseEnter:_,onTouchStart:R,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:k,unstable_dynamicOnHover:A,...F}=t;n=S,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,s.jsx)("a",{children:n}));let I=i.default.useContext(u.AppRouterContext),M=!1!==N,B=!1===N?"none":!0===N?"full":"auto",D="none"!==B?"auto"===B?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,K="string"==typeof(r=v||w)?r:(0,c.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=i.default.Children.only(n)}let q=L?o&&"object"==typeof o&&o.ref:k,z,G=i.default.useCallback(e=>(null!==I&&(j.current=(0,p.mountLinkInstance)(e,K,I,D,M,b,z)),()=>{j.current&&((0,p.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,p.unmountPrefetchableInstance)(e)}),[M,K,I,D,b,z]),W={ref:(0,l.useMergedRef)(G,q),onClick(t){L||"function"!=typeof E||E(t),L&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,o,a,s,i,c="none"){if("u">typeof window){let u,{nodeName:l}=t.currentTarget;if("A"===l.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{navigate:d}=e.r(32916);d(r,o?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,i,c)}}(t,K,j,C,U,O,$,B)},onMouseEnter(e){L||"function"!=typeof _||_(e),L&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),I&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),I&&M&&(0,p.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,d.isAbsoluteUrl)(K)?W.href=K:L&&!P&&("a"!==o.type||"href"in o.props)||(W.href=(0,f.addBasePath)(K)),a=L?i.default.cloneElement(o,W):(0,s.jsx)("a",{...F,...W,children:n}),(0,s.jsx)(g.Provider,{value:x,children:a})}let g=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",i=e.hash||"",c=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),c&&"object"==typeof c&&(c=String(a.urlQueryToSearchParams(c)));let l=e.search||c&&`?${c}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),l&&"?"!==l[0]&&(l="?"+l),o=o.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),`${n}${u}${o}${l}${i}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return j},NormalizeError:function(){return g},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return a},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return l},isAbsoluteUrl:function(){return c},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function l(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class g extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},86441,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(73656),o=e.i(71645),a=e.i(92229),s=e.i(18879),i=e.i(11105);function c(){return(0,t.jsxs)("details",{open:!0,className:"mt-6 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Confirm your identity"}),(0,t.jsxs)("p",{className:"text-sm",children:["Session expired? ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"Sign in again"}),"."]}),(0,t.jsx)("p",{className:"text-sm",children:"If a security change asks you to confirm your identity, enter your password or an authenticator code, then retry the change."}),(0,t.jsx)(i.F,{submitLabel:"Confirm password",onSubmit:async e=>(await n.U.auth.reauthenticate.mutate({password:(0,s.f)(e,"password")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Password",type:"password",name:"password",autoComplete:"current-password",required:!0})}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(i.F,{submitLabel:"Confirm code",onSubmit:async e=>(await n.U.auth.mfaReauthenticate.mutate({code:(0,s.f)(e,"code")}),"Identity confirmed. Retry your change."),children:(0,t.jsx)(i.j,{label:"Authenticator or recovery code",name:"code",autoComplete:"one-time-code",required:!0})})})]})}e.s(["f",0,function({children:e}){let[s,i]=(0,o.useState)(),[u,l]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=new AbortController;return(0,n.m)(e.signal).then(t=>{e.signal.aborted||i(t)}).catch(()=>{e.signal.aborted||l(!0)}),()=>{e.abort()}},[]);let[d,f]=(0,o.useState)(!1);return u?(0,t.jsx)("p",{role:"alert",children:"Unable to load your account. Reload to try again."}):s?s.is_authenticated?(0,t.jsxs)(a.T,{value:()=>{f(!0)},children:[e,d&&(0,t.jsx)(c,{})]}):(0,t.jsxs)("p",{children:["Please ",(0,t.jsx)(r.default,{href:"/accounts/login/",children:"sign in"})," to manage your account."]}):(0,t.jsx)("p",{role:"status",children:"Loading your account…"})}],86441)},11105,92229,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(76046),o=e.i(95813);let a=(0,r.createContext)(void 0);function s(){let e=(0,r.useContext)(a);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,o.f)(t,r)}e.s(["T",0,a,"G",0,s],92229);var i=e.i(19455),c=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(c.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:o}){let a=s(),[c,u]=(0,r.useState)(!1),[l,d]=(0,r.useState)(""),[f,h]=(0,r.useState)("");async function p(e){e.preventDefault();let t=new FormData(e.currentTarget);u(!0),d(""),h("");try{h(await o(t)??"")}catch(e){d(a(e,"Unable to save. Please try again."))}finally{u(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{p(e)},children:[(0,t.jsxs)("fieldset",{disabled:c,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(i.f,{type:"submit",disabled:c,children:c?"Please wait…":n})]}),l&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:l}),f&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:f})]})}],11105)},15448,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:o,children:a,showAccountNavigation:s=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[s&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),o&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:o}),a]})]})]})}])},81010,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(73656),o=e.i(95813),a=e.i(18879),s=e.i(19455),i=e.i(15448),c=e.i(86441),u=e.i(92229),l=e.i(11105);function d(){let e=(0,u.G)(),[i,c]=(0,r.useState)(),[d,f]=(0,r.useState)(!1),[h,p]=(0,r.useState)(""),[m,y]=(0,r.useState)([]),[x,g]=(0,r.useState)("");return(0,r.useEffect)(()=>{let e=!0;return n.U.auth.authenticators.query().then(t=>{e&&c(t.some(e=>"totp"===e.type))}).catch(t=>{e&&g((0,o.f)(t,"Unable to load authenticators."))}),()=>{e=!1}},[]),(0,t.jsxs)(t.Fragment,{children:[x&&(0,t.jsx)("p",{role:"alert",className:"error",children:x}),void 0===i&&!x&&(0,t.jsx)("p",{role:"status",children:"Loading security settings…"}),!1===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Add two-factor authentication using an authenticator app. You will enter a code when signing in."}),h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Add an account in your authenticator app with this setup key. Select time-based codes."}),(0,t.jsx)("code",{className:"block break-all rounded bg-slate-100 p-3 text-sm",children:h}),(0,t.jsx)("div",{className:"mt-5",children:(0,t.jsx)(l.F,{submitLabel:"Enable two-factor authentication",onSubmit:async e=>(await n.U.auth.enableTotp.mutate({code:(0,a.f)(e,"code")}),c(!0),p(""),"Two-factor authentication enabled. Generate recovery codes below."),children:(0,t.jsx)(l.j,{label:"Code from your authenticator",name:"code",autoComplete:"one-time-code",inputMode:"numeric",required:!0})})})]}):(0,t.jsx)(s.f,{disabled:d,onClick:()=>{g(""),f(!0),n.U.auth.totpSetup.mutate().then(e=>{if(c(e.enabled),!e.enabled){if(!e.secret)throw Error("Unable to start authenticator setup. Reload and try again.");p(e.secret)}}).catch(t=>{g(e(t,"Unable to start setup."))}).finally(()=>{f(!1)})},children:d?"Preparing setup…":"Set up authenticator"})]}),!0===i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm",children:"Two-factor authentication is enabled."}),(0,t.jsx)("h2",{className:"mt-6",children:"Recovery codes"}),(0,t.jsx)("p",{className:"text-sm",children:"Save these codes somewhere safe. Each code can be used once if you lose access to your authenticator. Generating new codes replaces your previous codes."}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(l.F,{submitLabel:"Show recovery codes",onSubmit:async()=>{let e=await n.U.auth.recoveryCodes.query();return 0===e.unused_codes.length?"These codes have already been shown. Use your saved copy or generate new codes.":(y(e.unused_codes),"Store these codes somewhere safe.")},children:null})}),(0,t.jsx)(l.F,{submitLabel:"Generate new recovery codes",onSubmit:async()=>(y((await n.U.auth.generateRecoveryCodes.mutate()).unused_codes),"Store your recovery codes before leaving this page."),children:null}),m.length>0&&(0,t.jsx)("pre",{className:"mt-4 overflow-x-auto rounded bg-slate-100 p-4","aria-label":"Recovery codes",children:m.join("\n")}),(0,t.jsxs)("details",{className:"mt-8 border-t border-slate-200 pt-4",children:[(0,t.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Disable two-factor authentication"}),(0,t.jsx)("p",{className:"text-sm",children:"Your next sign-in will require only your password. Confirm your identity below if requested."}),(0,t.jsx)(l.F,{submitLabel:"Disable two-factor authentication",onSubmit:async()=>(await n.U.auth.disableTotp.mutate(),c(!1),y([]),"Two-factor authentication disabled."),children:null})]})]})]})}e.s(["TwoFactor",0,function(){return(0,t.jsx)(i.f,{title:"Two-factor authentication",description:"Protect your account with an authenticator and recovery codes.",showAccountNavigation:!0,children:(0,t.jsx)(c.f,{children:(0,t.jsx)(d,{})})})}])},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let o=r.forwardRef(({className:e,type:r,...o},a)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));o.displayName="Input",e.s(["f",0,o])},2716,e=>{"use strict";var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59659,e=>{"use strict";var a=e.i(56420);let r={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};r.node;let i=(0,a.f)(r);e.s(["f",0,i],59659)},13581,29487,e=>{"use strict";var a=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,i=0){let[s,t]=(0,a.useState)(),[n,l]=(0,a.useState)(""),[o,d]=(0,a.useState)(!0),c=(0,a.useRef)(void 0),m=(0,a.useRef)(!1),u=(0,a.useCallback)(async()=>{c.current?.abort();let a=new AbortController;c.current=a;try{let r=await e(a.signal);if(a.signal.aborted||!m.current)return;t(r),l("")}catch(e){!a.signal.aborted&&m.current&&l((0,r.f)(e))}finally{!a.signal.aborted&&m.current&&d(!1)}},[e]);return(0,a.useEffect)(()=>{m.current=!0,queueMicrotask(()=>{m.current&&u()});let e=i>0?setInterval(()=>{u()},i):void 0;return()=>{m.current=!1,c.current?.abort(),clearInterval(e)}},[u,i]),{data:s,error:n,isLoading:o,refresh:u}}],13581);var i=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:a,refresh:r}){return(0,i.jsxs)(i.Fragment,{children:[e?(0,i.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,a?(0,i.jsxs)("div",{className:"error",role:"alert",children:[(0,i.jsx)("p",{children:a}),(0,i.jsx)(s.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],29487)},82609,e=>{"use strict";var a=e.i(18050),r=e.i(56420);let i={name:"mail-plus",size:24,node:[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M16 19h6",key:"xwg31i"}]]};i.node;let s=(0,r.f)(i);var t=e.i(59659),n=e.i(82303),l=e.i(71645),o=e.i(73656),d=e.i(95813),c=e.i(13581),m=e.i(19455),u=e.i(93479),h=e.i(29487),v=e.i(87309);function p({onChanged:e}){let r=(0,c.f)((0,l.useCallback)(e=>o.U.workspace.current.query(void 0,{signal:e}),[])),i=(0,v.h)(),[b,x]=(0,l.useState)(""),[f,j]=(0,l.useState)("member"),[w,g]=(0,l.useState)(!1),[k,y]=(0,l.useState)(""),[N,M]=(0,l.useState)(""),C=r.data?.role,I="owner"===C||"admin"===C,R=async a=>{g(!0),y(""),M("");try{await a(),await r.refresh(),await e()}catch(e){y((0,d.f)(e))}finally{g(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:"panel",children:[(0,a.jsxs)("div",{className:"panel-title",children:[(0,a.jsxs)("h2",{children:[(0,a.jsx)(n.f,{size:18})," Workspace members"]}),(0,a.jsxs)("span",{className:"badge",children:[r.data?.members.length??0," people"]})]}),(0,a.jsx)(h.f,{...r}),r.data?.members.map(e=>(0,a.jsxs)("div",{className:"resource-row",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:e.email}),(0,a.jsx)("small",{children:e.username})]}),"owner"===C&&"owner"!==e.role?(0,a.jsxs)("select",{className:"member-role","aria-label":`Role for ${e.email}`,value:e.role,disabled:w,onChange:a=>{let r="admin"===a.target.value?"admin":"member";R(async()=>{await o.U.workspace.updateMember.mutate({id:e.id,role:r}),M("Member role updated.")})},children:[(0,a.jsx)("option",{value:"member",children:"Member"}),(0,a.jsx)("option",{value:"admin",children:"Admin"})]}):(0,a.jsx)("span",{className:"badge",children:e.role}),I&&"owner"!==e.role&&("owner"===C||"member"===e.role)?(0,a.jsx)(m.f,{variant:"ghost",size:"icon","aria-label":`Remove ${e.email}`,disabled:w,onClick:()=>{R(async()=>{await i({title:"Remove this member?",description:`${e.email} will lose access to this workspace.`,actionLabel:"Remove member"})&&(await o.U.workspace.removeMember.mutate({id:e.id}),M("Member removed."))})},children:(0,a.jsx)(t.f,{size:14})}):void 0,"owner"===C&&"owner"!==e.role?(0,a.jsx)(m.f,{variant:"outline",size:"sm",disabled:w,onClick:()=>{R(async()=>{await i({title:"Transfer workspace ownership?",description:`${e.email} will become the owner. Your own role will change to admin.`,actionLabel:"Transfer ownership"})&&(await o.U.workspace.transferOwnership.mutate({membership_id:e.id}),M("Ownership transferred."))})},children:"Make owner"}):void 0]},e.id))]}),I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:"panel",children:[(0,a.jsxs)("h2",{children:[(0,a.jsx)(s,{size:18})," Invite a teammate"]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),R(async()=>{await o.U.workspace.invite.mutate({email:b,role:f}),x(""),M("Invitation queued.")})},children:[(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("label",{children:["Invite by email",(0,a.jsx)(u.f,{type:"email",required:!0,value:b,disabled:w,onChange:e=>{x(e.target.value)}})]}),(0,a.jsxs)("label",{children:["Invitation role",(0,a.jsxs)("select",{value:f,disabled:w,onChange:e=>{j("admin"===e.target.value?"admin":"member")},children:[(0,a.jsx)("option",{value:"member",children:"Member"}),"owner"===C?(0,a.jsx)("option",{value:"admin",children:"Admin"}):void 0]})]})]}),(0,a.jsx)(m.f,{type:"submit",disabled:w,children:"Invite member"})]})]}),(0,a.jsxs)("section",{className:"panel",children:[(0,a.jsx)("h2",{children:"Invitations"}),r.data?.invitations.length===0?(0,a.jsx)("p",{className:"small",children:"No invitations have been sent."}):void 0,r.data?.invitations.map(e=>(0,a.jsxs)("div",{className:"resource-row",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:e.email}),(0,a.jsxs)("small",{children:[e.role," · Expires"," ",new Date(e.expires_at).toLocaleString()]})]}),(0,a.jsx)("span",{className:"badge",children:e.accepted_at?"Accepted":e.revoked_at?"Revoked":new Date(e.expires_at)<new Date?"Expired":"Pending"}),e.accepted_at||e.revoked_at||"owner"!==C&&"member"!==e.role?void 0:(0,a.jsx)(m.f,{variant:"outline",size:"sm",disabled:w,onClick:()=>{R(async()=>{await o.U.workspace.revokeInvitation.mutate({id:e.id}),M("Invitation revoked.")})},children:"Revoke"})]},e.id))]})]}):void 0,k?(0,a.jsx)("p",{className:"error",role:"alert",children:k}):void 0,N?(0,a.jsx)("p",{className:"notice",role:"status",children:N}):void 0]})}var b=e.i(94757);e.s(["default",0,function(){let{refresh:e}=(0,b.useWorkspace)();return(0,a.jsx)(p,{onChanged:e})}],82609)},93479,e=>{"use strict";var a=e.i(18050),r=e.i(71645),i=e.i(39689);let s=r.forwardRef(({className:e,type:r,...s},t)=>(0,a.jsx)("input",{type:r,className:(0,i.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:t,...s}));s.displayName="Input",e.s(["f",0,s])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var i=e.i(56420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let a=(0,i.f)(t);e.s(["f",0,a],11241)},13581,29487,e=>{"use strict";var i=e.i(71645),t=e.i(95813);e.s(["f",0,function(e,a=0){let[r,s]=(0,i.useState)(),[n,o]=(0,i.useState)(""),[l,c]=(0,i.useState)(!0),d=(0,i.useRef)(void 0),h=(0,i.useRef)(!1),u=(0,i.useCallback)(async()=>{d.current?.abort();let i=new AbortController;d.current=i;try{let t=await e(i.signal);if(i.signal.aborted||!h.current)return;s(t),o("")}catch(e){!i.signal.aborted&&h.current&&o((0,t.f)(e))}finally{!i.signal.aborted&&h.current&&c(!1)}},[e]);return(0,i.useEffect)(()=>{h.current=!0,queueMicrotask(()=>{h.current&&u()});let e=a>0?setInterval(()=>{u()},a):void 0;return()=>{h.current=!1,d.current?.abort(),clearInterval(e)}},[u,a]),{data:r,error:n,isLoading:l,refresh:u}}],13581);var a=e.i(18050),r=e.i(19455);e.s(["f",0,function({isLoading:e,error:i,refresh:t}){return(0,a.jsxs)(a.Fragment,{children:[e?(0,a.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,i?(0,a.jsxs)("div",{className:"error",role:"alert",children:[(0,a.jsx)("p",{children:i}),(0,a.jsx)(r.f,{variant:"outline",onClick:()=>{t()},children:"Try again"})]}):void 0]})}],29487)},65983,e=>{"use strict";var i=e.i(18050),t=e.i(71645),a=e.i(73656),r=e.i(95813),s=e.i(13581),n=e.i(15080),o=e.i(19455),l=e.i(93479),c=e.i(29487),d=e.i(94757),h=e.i(75016),u=e.i(87309),p=e.i(59037);async function x(e){let[i,t]=await Promise.all([a.U.webhooks.list.query(void 0,{signal:e}),(0,n.t)(e)]);return{hooks:i.results,actions:t}}function f(e){return e?new Date(e).toLocaleString():"Never"}function b({actionId:e=""}){let{canManage:n,selected:j,setDirty:m}=(0,d.useWorkspace)(),v=(0,s.f)(x,1e4),g=(v.data?.actions??[]).filter(i=>i.project===j&&(!e||i.id===e)),w=new Set(g.map(e=>e.id)),k=(v.data?.hooks??[]).filter(e=>w.has(e.action_id)),y=(0,u.h)(),[S,N]=(0,t.useState)(""),[R,_]=(0,t.useState)(e),[C,L]=(0,t.useState)(!1),[U,T]=(0,t.useState)(""),[$,E]=(0,t.useState)(""),[W,q]=(0,t.useState)();async function P(e){L(!0),T(""),E("");try{await e(),await v.refresh()}catch(e){T((0,r.f)(e))}finally{L(!1)}}return(0,p.f)(""!==S.trim()||R!==e||!!W,m),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("section",{className:"panel",children:[(0,i.jsx)("h2",{children:"Webhook triggers"}),(0,i.jsx)("p",{children:"Send JSON inputs to queue an action. Each registration keeps its saved action version. Delivery acceptance and action execution are tracked separately."}),(0,i.jsxs)("p",{children:["Send ",(0,i.jsx)("code",{children:"X-Webhook-Secret"})," and a stable, unique"," ",(0,i.jsx)("code",{children:"X-Webhook-Delivery"})," header with"," ",(0,i.jsx)("code",{children:'{"inputs": {}}'}),". JSON bodies are limited to 200 KB. Retrying the same delivery never queues another run."]}),(0,i.jsx)(c.f,{...v}),v.isLoading||v.error||0!==k.length?void 0:(0,i.jsx)("p",{children:"No webhook triggers yet."}),k.map(e=>(0,i.jsxs)("article",{className:"panel",children:[(0,i.jsxs)("div",{className:"panel-title",children:[(0,i.jsx)("h3",{children:e.name}),(0,i.jsx)("span",{className:"badge",children:e.enabled?"Enabled":"Disabled"})]}),(0,i.jsxs)("p",{children:[(0,i.jsx)(h.f,{href:`/actions/?${new URLSearchParams({project:j,action:e.action_id}).toString()}`,children:e.action_name})," ","· Version ",e.version]}),(0,i.jsxs)("label",{children:["Endpoint",(0,i.jsx)(l.f,{readOnly:!0,value:location.origin+e.endpoint})]}),(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)(o.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText(location.origin+e.endpoint),E("Endpoint copied.")})},children:"Copy endpoint"}),n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await a.U.webhooks.update.mutate({id:e.id,enabled:!e.enabled}),E(e.enabled?"Webhook disabled.":"Webhook enabled.")})},children:e.enabled?"Disable":"Enable"}),(0,i.jsx)(o.f,{variant:"outline",disabled:C,onClick:()=>{P(async()=>{await y({title:"Rotate webhook secret?",description:"The previous secret will stop working immediately. Update the sending service with the new secret.",actionLabel:"Rotate secret"})&&q(await a.U.webhooks.rotate.mutate({id:e.id}))})},children:"Rotate secret"})]}):void 0]}),(0,i.jsxs)("p",{children:["Last receipt: ",f(e.last_received_at)," · Last accepted:"," ",f(e.last_accepted_at)]}),(0,i.jsxs)("p",{children:["Last rejection: ",e.last_rejection||"None",e.last_rejected_at?` (${f(e.last_rejected_at)})`:""," ","· Secret rotated: ",f(e.rotated_at)]}),(0,i.jsxs)("details",{children:[(0,i.jsxs)("summary",{children:["Recent deliveries (",e.deliveries.length,")"]}),0===e.deliveries.length?(0,i.jsx)("p",{children:"No authenticated deliveries recorded."}):void 0,e.deliveries.map(t=>(0,i.jsxs)("div",{className:"resource-row",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("strong",{children:t.delivery_id}),(0,i.jsxs)("small",{children:[f(t.received_at)," · ",t.outcome]})]}),t.run?(0,i.jsxs)(h.f,{href:`/runs/?${new URLSearchParams({project:j,action:e.action_id,run:t.run}).toString()}`,children:["Run: ",t.run_status??"Unavailable"]}):(0,i.jsx)("span",{children:"No run queued"})]},t.id))]})]},e.id))]}),n?(0,i.jsxs)("section",{className:"panel",children:[(0,i.jsx)("h2",{children:"Register a webhook"}),(0,i.jsxs)("form",{onSubmit:i=>{i.preventDefault(),P(async()=>{q(await a.U.webhooks.create.mutate({name:S,action:R})),N(""),_(e)})},children:[(0,i.jsxs)("label",{children:["Name",(0,i.jsx)(l.f,{required:!0,maxLength:100,value:S,disabled:C,onChange:e=>{N(e.target.value)}})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"webhook-action",children:"Action"}),(0,i.jsxs)("select",{id:"webhook-action",required:!0,value:R,disabled:C,onChange:e=>{_(e.target.value)},children:[(0,i.jsx)("option",{value:"",children:"Choose an action"}),g.filter(e=>e.enabled).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,i.jsx)("p",{children:"The latest saved version is pinned at registration. Register a new webhook to use a different version."}),(0,i.jsx)(o.f,{disabled:C||g.every(e=>e.id!==R||!e.enabled),type:"submit",children:"Register webhook"})]})]}):(0,i.jsx)("p",{children:"Workspace owners and admins manage webhook registrations."}),W?(0,i.jsxs)("section",{className:"panel","aria-label":"One-time webhook secret",children:[(0,i.jsxs)("h2",{children:["Save the secret for ",W.webhook.name]}),(0,i.jsx)("p",{children:"This secret is shown once. Store it in your sending service and keep it out of URLs."}),(0,i.jsxs)("label",{children:["Secret",(0,i.jsx)(l.f,{readOnly:!0,type:"password",value:W.secret})]}),(0,i.jsxs)("div",{className:"row",children:[(0,i.jsx)(o.f,{disabled:C,onClick:()=>{P(async()=>{await navigator.clipboard.writeText(W.secret),E("Secret copied.")})},children:"Copy secret"}),(0,i.jsx)(o.f,{variant:"outline",onClick:()=>{q(void 0)},children:"Dismiss secret"})]})]}):void 0,U?(0,i.jsx)("p",{className:"error",role:"alert",children:U}):void 0,$?(0,i.jsx)("p",{className:"notice",role:"status",children:$}):void 0]})}var j=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,d.useWorkspace)();return(0,i.jsx)(j.c,{current:"webhooks",children:t=>(0,i.jsx)(b,{actionId:t},`${e}:${t}`)})}],65983)},93479,e=>{"use strict";var i=e.i(18050),t=e.i(71645),a=e.i(39689);let r=t.forwardRef(({className:e,type:t,...r},s)=>(0,i.jsx)("input",{type:t,className:(0,a.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...r}));r.displayName="Input",e.s(["f",0,r])},59140,e=>{"use strict";var i=e.i(18050),t=e.i(71645),a=e.i(18566),r=e.i(11241),s=e.i(73656),n=e.i(13581),o=e.i(94757),l=e.i(75016),c=e.i(29487);let d=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function h({action:e,current:t}){let a=e.project,s=new URLSearchParams({project:a,action:e.id});return(0,i.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)(l.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:a}).toString()}`,children:[(0,i.jsx)(r.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,i.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,i.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,i.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:d.map(e=>(0,i.jsx)(l.f,{href:`${e.path}?${s.toString()}`,"aria-current":t===e.id?"page":void 0,className:t===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function u({project:e,actionId:a,current:r,children:o}){let d=(0,t.useCallback)(async i=>{if(!a)return;let t=await s.U.actions.get.query({id:a},{signal:i});if(t.project!==e)throw Error("This action is not available in the selected project.");return t},[a,e]),p=(0,n.f)(d);return a&&(p.isLoading||p.error||p.data?.id!==a)?(0,i.jsx)(c.f,{...p}):(0,i.jsxs)(i.Fragment,{children:[p.data?(0,i.jsx)(h,{action:p.data,current:r}):(0,i.jsx)("p",{className:"mb-5",children:(0,i.jsx)(l.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),o(a)]})}e.s(["F",0,h,"c",0,function({current:e,children:t}){let{selected:r}=(0,o.useWorkspace)(),s=(0,a.useSearchParams)().get("action")??"";return(0,i.jsx)(u,{project:r,actionId:s,current:e,children:t},`${r}:${s}`)}])},59037,e=>{"use strict";var i=e.i(71645);e.s(["f",0,function(e,t){(0,i.useEffect)(()=>{t(e);let i=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",i),()=>{removeEventListener("beforeunload",i),t(!1)}},[e,t])}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809),i=e.r(18050),a=u._(e.r(71645)),c=e.r(95057),l=e.r(8372),s=e.r(18581),f=e.r(18967),p=e.r(5550),d=e.r(88540),h=e.r(91949),g=e.r(73668),y=e.r(9396);function m(t){var r;let n,o,u,[m,b]=(0,a.useOptimistic)(h.IDLE_LINK_STATUS),P=(0,a.useRef)(null),{href:S,as:x,children:E,prefetch:C=null,passHref:_,replace:j,shallow:w,scroll:O,onClick:T,onMouseEnter:$,onTouchStart:R,legacyBehavior:L=!1,onNavigate:U,transitionTypes:N,ref:k,unstable_dynamicOnHover:A,...I}=t;n=E,L&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let M=a.default.useContext(l.AppRouterContext),B=!1!==C,F=!1===C?"none":!0===C?"full":"auto",D="none"!==F?"auto"===F?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,K="string"==typeof(r=x||S)?r:(0,c.formatUrl)(r);if(L){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=a.default.Children.only(n)}let z=L?o&&"object"==typeof o&&o.ref:k,W,Z=a.default.useCallback(e=>(null!==M&&(P.current=(0,h.mountLinkInstance)(e,K,M,D,B,b,W)),()=>{P.current&&((0,h.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,h.unmountPrefetchableInstance)(e)}),[B,K,M,D,b,W]),q={ref:(0,s.useMergedRef)(Z,z),onClick(t){L||"function"!=typeof T||T(t),L&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,o,u,i,a,c="none"){if("u">typeof window){let l,{nodeName:s}=t.currentTarget;if("A"===s.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,o?"replace":"push",!1===u?d.ScrollBehavior.NoScroll:d.ScrollBehavior.Default,n.current,a,c)}}(t,K,P,j,O,U,N,F)},onMouseEnter(e){L||"function"!=typeof $||$(e),L&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),M&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){L||"function"!=typeof R||R(e),L&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),M&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,f.isAbsoluteUrl)(K)?q.href=K:L&&!_&&("a"!==o.type||"href"in o.props)||(q.href=(0,p.addBasePath)(K)),u=L?a.default.cloneElement(o,q):(0,i.jsx)("a",{...I,...q,children:n}),(0,i.jsx)(v.Provider,{value:m,children:u})}let v=(0,a.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,a.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return c}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",a=e.hash||"",c=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),c&&"object"==typeof c&&(c=String(u.urlQueryToSearchParams(c)));let s=e.search||c&&`?${c}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),a&&"#"!==a[0]&&(a="#"+a),s&&"?"!==s[0]&&(s="?"+s),o=o.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${l}${o}${s}${a}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(18967),o=e.r(52817);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return P},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return y},WEB_VITALS:function(){return u},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return l},getURL:function(){return s},isAbsoluteUrl:function(){return c},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return x}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function s(){let{href:e}=window.location,t=l();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,y=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class P extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(e){return JSON.stringify({message:e.message,stack:e.stack})}},18566,(e,t,r)=>{t.exports=e.r(76562)},76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},2716,e=>{"use strict";var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,14778,e=>{"use strict";var t=e.i(42765);e.s(["f",()=>t.n])},35921,78337,e=>{"use strict";var t=e.i(24408);e.s(["f",()=>t.t],35921);var r=e.i(6245);e.s(["f",()=>r.t],78337)},44362,6245,42765,24408,e=>{"use strict";let t;function r(e){let t={subscribe(t){let r=null,n=!1,o=!1,i=!1;function s(){if(null===r){i=!0;return}!o&&(o=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){var r;n||null==(r=t.next)||r.call(t,e)},error(e){var r;n||(n=!0,null==(r=t.error)||r.call(t,e),s())},complete(){var e;n||(n=!0,null==(e=t.complete)||e.call(t),s())}}),i&&s(),{unsubscribe:s}},pipe:(...e)=>e.reduce(n,t)};return t}function n(e,t){return t(e)}function o(e){return r(t=>(function t(r=0,n=e.op){let o=e.links[r];if(!o)throw Error("No more links to execute - did you forget to add an ending link?");return o({op:n,next:e=>t(r+1,e)})})().subscribe(t))}function i(e){return Array.isArray(e)?e:[e]}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t,r){var n;return(n=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==s(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){l(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function f(){return Object.create(null)}e.s(["n",0,o,"t",0,function(e){return t=>{let n=i(e.true).map(e=>e(t)),s=i(e.false).map(e=>e(t));return t=>r(r=>{let i=e.condition(t.op)?n:s;return o({op:t.op,links:i}).subscribe(r)})}}],6245);let p=[-32603,-32603,-32603,-32603];function y(e){return e instanceof b}var h,d,b=class e extends Error{constructor(t,r){var n,o;let i=null==r?void 0:r.cause;super(t,{cause:i}),l(this,"cause",void 0),l(this,"shape",void 0),l(this,"data",void 0),l(this,"meta",void 0),this.meta=null==r?void 0:r.meta,this.cause=i,this.shape=null==r||null==(n=r.result)?void 0:n.error,this.data=null==r||null==(o=r.result)?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,e.prototype)}static from(t,r={}){return y(t)?(r.meta&&(t.meta=u(u({},t.meta),r.meta)),t):c(t)&&c(t.error)&&"number"==typeof t.error.code&&"string"==typeof t.error.message?new e(t.error.message,u(u({},r),{},{result:t,cause:r.cause})):new e("string"==typeof t?t:c(t)&&"string"==typeof t.message?t.message:"Unknown error",u(u({},r),{},{cause:t}))}};function m(e){return e?"input"in e?e:{input:e,output:e}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}e.s(["n",0,y,"t",0,b],42765);let v=()=>{},w=e=>{Object.freeze&&Object.freeze(e)};function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e,t,r){var n;return(n=function(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==g(n)?n:n+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Symbol("trpc_formattedErrorShape");var j=class extends Error{constructor(){super("Unable to transform response from server")}};function k(e){return null!=e?e:"."}function E(e,t){this.v=e,this.k=t}function x(e){var t,r;function n(t,r){try{var i=e[t](r),s=i.value,l=s instanceof E;Promise.resolve(l?s.v:s).then(function(r){if(l){var a="return"===t?"return":"next";if(!s.k||r.done)return n(a,r);r=e[a](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,s){var l={key:e,arg:o,resolve:i,reject:s,next:null};r?r=r.next=l:(t=r=l,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function T(...e){let t=new AbortController,r=()=>{for(let t of e)null==t||t.removeEventListener("abort",n)},n=()=>{r(),t.abort()};for(let t of e){if(null==t?void 0:t.aborted){n();break}null==t||t.addEventListener("abort",n,{once:!0})}return{signal:t.signal,cleanup:r}}x.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},x.prototype.next=function(e){return this._invoke("next",e)},x.prototype.throw=function(e){return this._invoke("throw",e)},x.prototype.return=function(e){return this._invoke("return",e)},Symbol();let A={query:"GET",mutation:"POST",subscription:"PATCH"};function L(e){return"input"in e?e.transformer.input.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[r]=n}return t}(e.inputs.map(t=>e.transformer.input.serialize(t)))}let C=e=>{var t,r;let n=e.url.split("?"),o=n[0].replace(/\/$/,"")+"/"+(t=e.path,"."===(r=e.pathSeparator)?t:t.split(".").join(r)),i=[];if(n[1]&&i.push(n[1]),"inputs"in e&&i.push("batch=1"),"query"===e.type||"subscription"===e.type){let t=L(e);void 0!==t&&"POST"!==e.methodOverride&&i.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return i.length&&(o+="?"+i.join("&")),o},q=e=>{if("query"===e.type&&"POST"!==e.methodOverride)return;let t=L(e);return void 0!==t?JSON.stringify(t):void 0};var I=class extends Error{constructor(){let e="AbortError";super(e),this.name=e,this.message=e}};async function D(e){var t,r,n,o=e.signal;if(null==o?void 0:o.aborted){if(null==(n=o.throwIfAborted)||n.call(o),"u">typeof DOMException)throw new DOMException("AbortError","AbortError");throw new I}let i=e.getUrl(e),s=e.getBody(e),l=null!=(t=e.methodOverride)?t:A[e.type],a=await (async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),c=Object.keys(a).some(e=>"content-type"===e.toLowerCase()),f=u(u(u({},e.contentTypeHeader&&"GET"!==l&&!c?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[null!=(r=e.trpcAcceptHeaderKey)?r:"trpc-accept"]:e.trpcAcceptHeader}:void 0),a);return(function(e){if(e)return e;if("u">typeof window&&"function"==typeof window.fetch)return window.fetch.bind(window);if("u">typeof globalThis&&"function"==typeof globalThis.fetch)return globalThis.fetch;throw Error("No fetch implementation found")})(e.fetch)(i,{method:l,signal:e.signal,body:s,headers:f})}async function N(e){let t={},r=await D(e);t.response=r;let n=await r.json();return t.responseJSON=n,{json:n,meta:t}}let z=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function _(e){let t=null,r=null;function n(){let n=function(t){let r=[[]],n=0;for(;;){var o,i,s;let l,a=t[n];if(!a)break;let u=r[r.length-1];if(a.aborted){null==(o=a.reject)||o.call(a,Error("Aborted")),n++;continue}try{l=e.validate(u.concat(a).map(e=>e.key))}catch(e){null==(i=a.reject)||i.call(a,e),n++;continue}if(l){u.push(a),n++;continue}if(0===u.length){null==(s=a.reject)||s.call(a,Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let o of(clearTimeout(r),r=null,t=null,n)){if(!o.length)continue;let t={items:o};for(let e of o)e.batch=t;e.fetch(t.items.map(e=>e.key)).then(async e=>{for(let n of(await Promise.all(e.map(async(e,r)=>{var n,o;let i=t.items[r];try{let t=await Promise.resolve(e);null==(n=i.resolve)||n.call(i,t)}catch(e){null==(o=i.reject)||o.call(i,e)}i.batch=null,i.reject=null,i.resolve=null})),t.items)){var r;null==(r=n.reject)||r.call(n,Error("Missing result")),n.batch=null}}).catch(e=>{for(let n of t.items){var r;null==(r=n.reject)||r.call(n,e),n.batch=null}})}}return{load:function(e){let o={aborted:!1,key:e,batch:null,resolve:z,reject:z},i=new Promise((e,r)=>{o.reject=r,o.resolve=e,null!=t||(t=[]),t.push(o)});return null!=r||(r=setTimeout(n)),i}}}function R(e){let t=e,n=new Set,o=r(e=>(void 0!==t&&e.next(t),n.add(e),()=>{n.delete(e)}));return o.next=e=>{if(t!==e)for(let r of(t=e,[...n]))n.has(r)&&r.next(e)},o.get=()=>t,o}e.s(["n",0,_,"t",0,function(e){var t,n;let o={url:e.url.toString(),fetch:e.fetch,transformer:m(e.transformer),methodOverride:e.methodOverride,pathSeparator:k(e.pathSeparator)},i=null!=(t=e.maxURLLength)?t:1/0,s=null!=(n=e.maxItems)?n:1/0;return()=>{let t=t=>({validate(e){if(1/0===i&&1/0===s)return!0;if(e.length>s)return!1;let r=e.map(e=>e.path).join(","),n=e.map(e=>e.input);return C(u(u({},o),{},{type:t,path:r,inputs:n,signal:null})).length<=i},async fetch(r){let n,i=r.map(e=>e.path).join(","),s=r.map(e=>e.input),l=function(...e){let t=new AbortController,r=e.length,n=0,o=()=>{++n===r&&t.abort()};for(let t of e)(null==t?void 0:t.aborted)?o():null==t||t.addEventListener("abort",o,{once:!0});return t.signal}(...r.map(e=>e.signal)),a=await (n=u(u({},o),{},{path:i,inputs:s,type:t,headers:()=>e.headers?"function"==typeof e.headers?e.headers({opList:r}):e.headers:{},signal:l}),N(u(u({},n),{},{contentTypeHeader:"application/json",getUrl:C,getBody:q})));return(Array.isArray(a.json)?a.json:r.map(()=>a.json)).map(e=>({meta:a.meta,json:e}))}}),n={query:_(t("query")),mutation:_(t("mutation"))};return({op:e})=>r(t=>{let r;if("subscription"===e.type)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let i=new AbortController,{signal:s,cleanup:l}=T(e.signal,i.signal),a=n[e.type].load(u(u({},e),{},{signal:s})),f=!1;return a.then(e=>{f=!0,r=e;let n=function(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.deserialize(e.error);return{ok:!1,error:O(O({},e),{},{error:r})}}return{ok:!0,result:O(O({},e.result),(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.deserialize(e.result.data)})}}(e,t)}catch(e){throw new j}if(!r.ok&&(!c(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!c(r.result))throw new j;return r}(e.json,o.transformer.output);n.ok?(t.next({context:e.meta,result:n.result}),t.complete()):t.error(b.from(n.error,{meta:e.meta}))}).catch(e=>{f=!0,t.error(b.from(e,{meta:null==r?void 0:r.meta}))}),()=>{f||i.abort(),l()}})}}],24408),Symbol();let W=(e,...t)=>"function"==typeof e?e(...t):e;async function U(e){let t=await W(e.url);return e.connectionParams?t+`${t.includes("?")?"&":"?"}connectionParams=1`:t}async function $(e,t){let r={method:"connectionParams",data:await W(e)};return t.encode(r)}var J=class e{constructor(t){var r;if(l(this,"id",++e.connectCount),l(this,"WebSocketPonyfill",void 0),l(this,"urlOptions",void 0),l(this,"keepAliveOpts",void 0),l(this,"encoder",void 0),l(this,"wsObservable",R(null)),l(this,"openPromise",null),this.WebSocketPonyfill=null!=(r=t.WebSocketPonyfill)?r:WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++e.connectCount;let t=U(this.urlOptions).then(e=>new this.WebSocketPonyfill(e));this.openPromise=t.then(async e=>{this.ws=e,e.binaryType="arraybuffer",e.addEventListener("message",function({data:e}){"PING"===e&&this.send("PONG")}),this.keepAliveOpts.enabled&&function(e,{intervalMs:t,pongTimeoutMs:r}){let n,o;function i(){n=setTimeout(()=>{e.send("PING"),o=setTimeout(()=>{e.close()},r)},t)}e.addEventListener("open",i),e.addEventListener("message",({data:e})=>{clearTimeout(n),i(),"PONG"===e&&(clearTimeout(o),clearTimeout(n),i())}),e.addEventListener("close",()=>{clearTimeout(n),clearTimeout(o)})}(e,this.keepAliveOpts),e.addEventListener("close",()=>{this.ws===e&&(this.ws=null)}),await function(e){let t,r,{promise:n,resolve:o,reject:i}={promise:new Promise((e,n)=>{t=e,r=n}),resolve:t,reject:r};return e.addEventListener("open",()=>{e.removeEventListener("error",i),o()}),e.addEventListener("error",i),n}(e),this.urlOptions.connectionParams&&e.send(await $(this.urlOptions.connectionParams,this.encoder))});try{await this.openPromise}finally{this.openPromise=null}}async close(){try{await this.openPromise}finally{var e;null==(e=this.ws)||e.close()}}};l(J,"connectCount",0);let G=new WeakMap,H=()=>{};t=Symbol.toStringTag;var M=class e{constructor(e){S(this,"promise",void 0),S(this,"subscribers",[]),S(this,"settlement",null),S(this,t,"Unpromise"),"function"==typeof e?this.promise=new Promise(e):this.promise=e;let r=this.promise.then(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:e},null==t||t.forEach(({resolve:t})=>{t(e)})});"catch"in r&&r.catch(e=>{let{subscribers:t}=this;this.subscribers=null,this.settlement={status:"rejected",reason:e},null==t||t.forEach(({reject:t})=>{t(e)})})}subscribe(){let e,t,{settlement:r}=this;if(null===r){var n;let r,o;if(null===this.subscribers)throw Error("Unpromise settled but still has subscribers");let i={promise:new Promise((e,t)=>{r=e,o=t}),resolve:r,reject:o};this.subscribers=(n=this.subscribers,[...n,i]),e=i.promise,t=()=>{null!==this.subscribers&&(this.subscribers=function(e,t){let r=e.indexOf(t);if(-1!==r)return[...e.slice(0,r),...e.slice(r+1)];return e}(this.subscribers,i))}}else{let{status:n}=r;e="fulfilled"===n?Promise.resolve(r.value):Promise.reject(r.reason),t=H}return Object.assign(e,{unsubscribe:t})}then(e,t){let r=this.subscribe(),{unsubscribe:n}=r;return Object.assign(r.then(e,t),{unsubscribe:n})}catch(e){let t=this.subscribe(),{unsubscribe:r}=t;return Object.assign(t.catch(e),{unsubscribe:r})}finally(e){let t=this.subscribe(),{unsubscribe:r}=t;return Object.assign(t.finally(e),{unsubscribe:r})}static proxy(t){let r=e.getSubscribablePromise(t);return void 0!==r?r:e.createSubscribablePromise(t)}static createSubscribablePromise(t){let r=new e(t);return G.set(t,r),G.set(r,r),r}static getSubscribablePromise(e){return G.get(e)}static resolve(t){let r="object"==typeof t&&null!==t&&"then"in t&&"function"==typeof t.then?t:Promise.resolve(t);return e.proxy(r).subscribe()}static async any(t){let r=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.any(r)}finally{r.forEach(({unsubscribe:e})=>{e()})}}static async race(t){let r=(Array.isArray(t)?t:[...t]).map(e.resolve);try{return await Promise.race(r)}finally{r.forEach(({unsubscribe:e})=>{e()})}}static async raceReferences(e){let t=e.map(B);try{return await Promise.race(t)}finally{for(let e of t)e.unsubscribe()}}};function B(e){return M.proxy(e).then(()=>[e])}null!=(h=Symbol).dispose||(h.dispose=Symbol()),null!=(d=Symbol).asyncDispose||(d.asyncDispose=Symbol());let K=Symbol();function F(){var e="function"==typeof SuppressedError?SuppressedError:function(e,t){var r=Error();return r.name="SuppressedError",r.error=e,r.suppressed=t,r},t={},r=[];function n(e,t){if(null!=t){if(Object(t)!==t)throw TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(e)var n=t[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(void 0===n&&(n=t[Symbol.dispose||Symbol.for("Symbol.dispose")],e))var o=n;if("function"!=typeof n)throw TypeError("Object is not disposable.");o&&(n=function(){try{o.call(t)}catch(e){return Promise.reject(e)}}),r.push({v:t,d:n,a:e})}else e&&r.push({d:t,a:e});return t}return{e:t,u:n.bind(null,!1),a:n.bind(null,!0),d:function(){var n,o=this.e,i=0;function s(){for(;n=r.pop();)try{if(!n.a&&1===i)return i=0,r.push(n),Promise.resolve().then(s);if(n.d){var e=n.d.call(n.v);if(n.a)return i|=2,Promise.resolve(e).then(s,l)}else i|=1}catch(e){return l(e)}if(1===i)return o!==t?Promise.reject(o):Promise.resolve();if(o!==t)throw o}function l(r){return o=o!==t?new e(r,o):r,s()}return s()}}}async function X(e){try{let i,s;var t,r,n,o=F();let l=o.u((t=e.timeoutMs,i=null,r={start(){if(i)throw Error("Timer already started");return new Promise(e=>{i=setTimeout(()=>e(K),t)})}},n=()=>{i&&clearTimeout(i)},s=r[Symbol.dispose],r[Symbol.dispose]=()=>{n(),null==s||s.call(r)},r)),a=await M.race([e.promise,l.start()]);if(a===K)return await e.onTimeout();return a}catch(e){o.e=e}finally{o.d()}}Symbol("ping");var Q=class{constructor(e){l(this,"links",void 0),l(this,"runtime",void 0),l(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){var t;return o({links:this.links,op:u(u({},e),{},{context:null!=(t=e.context)?t:{},id:++this.requestId})}).pipe(e=>{let t=0,n=null,o=!1,i=new Set;function s(e,t){for(let r of[...e])e.has(r)&&t(r)}function l(e){let t=n,r=i;n=null,i=new Set,o=!1;try{s(r,e)}finally{null==t||t.unsubscribe()}}return r(r=>{t++;let a=i;return a.add(r),!function(){let t;if(n||o)return;o=!0;let r=!1;try{t=e.subscribe({next(e){s(i,t=>{var r;return null==(r=t.next)?void 0:r.call(t,e)})},error(e){r=!0,l(t=>{var r;return null==(r=t.error)?void 0:r.call(t,e)})},complete(){r=!0,l(e=>{var t;return null==(t=e.complete)?void 0:t.call(e)})}})}finally{o=!1}r?t.unsubscribe():n=t}(),{unsubscribe(){let e;0==--t&&n&&(e=n,n=null,null==e||e.unsubscribe()),a.delete(r)}}})})}async requestAsPromise(e){try{let t,r=this.$request(e);return(await (t=new AbortController,new Promise((e,n)=>{let o=!1;function i(){o||(o=!0,s.unsubscribe())}t.signal.addEventListener("abort",()=>{n(t.signal.reason)});let s=r.subscribe({next(t){o=!0,e(t),i()},error(e){n(e)},complete(){t.abort(),i()}})}))).result.data}catch(e){throw b.from(e)}}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r.context,signal:r.signal}).subscribe({next(e){var t,n,o,i;switch(e.result.type){case"state":null==(t=r.onConnectionStateChange)||t.call(r,e.result);break;case"started":null==(n=r.onStarted)||n.call(r,{context:e.context});break;case"stopped":null==(o=r.onStopped)||o.call(r);break;case"data":case void 0:null==(i=r.onData)||i.call(r,e.result.data)}},error(e){var t;null==(t=r.onError)||t.call(r,e)},complete(){var e;null==(e=r.onComplete)||e.call(r)}})}};let V=Symbol.for("trpc_untypedClient"),Y={query:"query",mutate:"mutation",subscribe:"subscription"};function Z(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(Z=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new Z(e)}async function ee(e){let t=await W(e.url);if(e.connectionParams){let r=await W(e.connectionParams),n=t.includes("?")?"&":"?";t+=n+"connectionParams="+encodeURIComponent(JSON.stringify(r))}return t}function et(e,t){this.v=e,this.k=t}function er(e){var t,r;function n(t,r){try{var i=e[t](r),s=i.value,l=s instanceof et;Promise.resolve(l?s.v:s).then(function(r){if(l){var a="return"===t?"return":"next";if(!s.k||r.done)return n(a,r);r=e[a](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,s){var l={key:e,arg:o,resolve:i,reject:s,next:null};r?r=r.next=l:(t=r=l,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}er.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},er.prototype.next=function(e){return this._invoke("next",e)},er.prototype.throw=function(e){return this._invoke("throw",e)},er.prototype.return=function(e){return this._invoke("return",e)},e.s(["$",0,function(e){let t;var r=new Q(e);let n=function e(t,r,n){let o=r.join(".");return null!=n[o]||(n[o]=new Proxy(v,{get(o,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i],n)},apply(e,n,o){let i=r[r.length-1];if("valueOf"===i||"toString"===i||"toJSON"===i)return`tRPC.proxy(${r.slice(0,-1).join(".")})`;let s={args:o,path:r};return"call"===i?s={args:o.length>=2?[o[1]]:[],path:r.slice(0,-1)}:"apply"===i&&(s={args:o.length>=2?o[1]:[],path:r.slice(0,-1)}),w(s.args),w(s.path),t(s)}})),n[o]}(({path:e,args:t})=>{let n=[...e],o=Y[n.pop()],i=n.join(".");return r[o](i,...t)},[],f());return t=e=>e===V?r:n[e],new Proxy(v,{get(e,r){if("then"!==r)return t(r)}})},"I",0,function(e){let t=m(e.transformer),n=k(e.pathSeparator);return()=>({op:o})=>r(r=>{var i;let s,{type:l,path:a,input:c}=o;if("subscription"!==l)throw Error("httpSubscriptionLink only supports subscriptions");let y=new AbortController,h=function(e){var t;let{deserialize:r=e=>e}=e,n=f(),o=e.signal,i=null,s=()=>new ReadableStream({async start(t){let[s,l]=await Promise.all([e.url(),e.init()]),a=i=new e.EventSource(s,l);t.enqueue({type:"connecting",eventSource:i,event:null});let u=(e,r)=>{a.addEventListener(e,e=>{try{r(e)}catch(e){a.close(),t.error(e)}})};u("connected",e=>{let r=JSON.parse(e.data);n=r,t.enqueue({type:"connected",options:r,eventSource:a})}),u("serialized-error",e=>{t.enqueue({type:"serialized-error",error:r(JSON.parse(e.data)),eventSource:a})}),a.addEventListener("ping",()=>{t.enqueue({type:"ping",eventSource:a})}),a.addEventListener("return",()=>{a.close(),t.close(),i=null}),a.addEventListener("error",e=>{a.readyState===a.CLOSED?t.error(e):t.enqueue({type:"connecting",eventSource:a,event:e})}),u("message",e=>{let n={data:r(JSON.parse(e.data))};e.lastEventId&&(n.id=e.lastEventId),t.enqueue({type:"data",data:n,eventSource:a})});let c=()=>{try{a.close(),t.close()}catch(e){}};o.aborted?c():o.addEventListener("abort",c)},cancel(){null==i||i.close()}});return t=function*(){try{var e,t=F();let r=t.a((()=>{var e;let t,r=s(),n=r.getReader();async function o(){await n.cancel().catch(()=>{}),i=null}return e={read:()=>n.read(),async recreate(){await o(),n=(r=s()).getReader()}},t=e[Symbol.asyncDispose],e[Symbol.asyncDispose]=async()=>{await o(),await (null==t?void 0:t.call(e))},e})());for(;;){let t=r.read(),o=n.reconnectAfterInactivityMs;o&&(t=X({promise:t,timeoutMs:o,onTimeout:async()=>{let e={value:{type:"timeout",ms:o,eventSource:i},done:!1};return await r.recreate(),e}}));let s=yield(e=t,new E(e,0));if(s.done)return s.value;yield s.value}}catch(e){t.e=e}finally{yield new E(t.d(),0)}},function(){return new x(t.apply(this,arguments))}()}({url:async()=>{var r;return C({transformer:t,url:await ee(e),input:(r=s)&&(null==c||"object"==typeof c)?u(u({},null!=c?c:{}),{},{lastEventId:r}):c,path:a,pathSeparator:n,type:l,signal:null})},init:()=>W(e.eventSourceOptions,{op:o}),signal:function(...e){return T(...e).signal}(o.signal,y.signal),deserialize:e=>t.output.deserialize(e),EventSource:null!=(i=e.EventSource)?i:globalThis.EventSource}),d=R({type:"state",state:"connecting",error:null}),m=d.subscribe({next(e){r.next({result:e})}});return(async()=>{var e=!1,t=!1;try{for(var n,o,i=function(e){var t,r,n,o=2;for("u">typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new Z(t.call(e));r="@@asyncIterator",n="@@iterator"}throw TypeError("Object is not async iterable")}(h);e=!(o=await i.next()).done;e=!1){let e=o.value;switch(e.type){case"ping":break;case"data":let t,n=e.data;n.id?(s=n.id,t={id:n.id,data:n}):t={data:n.data},r.next({result:t,context:{eventSource:e.eventSource}});break;case"connected":r.next({result:{type:"started"},context:{eventSource:e.eventSource}}),d.next({type:"state",state:"pending",error:null});break;case"serialized-error":{let t=b.from({error:e.error});if(p.includes(e.error.code)){d.next({type:"state",state:"connecting",error:t});break}throw t}case"connecting":{let t=d.get(),r=e.event&&b.from(e.event);if(!r&&"connecting"===t.state)break;d.next({type:"state",state:"connecting",error:r});break}case"timeout":d.next({type:"state",state:"connecting",error:new b(`Timeout of ${e.ms}ms reached while waiting for a response`)})}}}catch(e){t=!0,n=e}finally{try{e&&null!=i.return&&await i.return()}finally{if(t)throw n}}r.next({result:{type:"stopped"}}),d.next({type:"state",state:"idle",error:null}),r.complete()})().catch(e=>{r.error(b.from(e))}),()=>{r.complete(),y.abort(),m.unsubscribe()}})}],44362)},95813,e=>{"use strict";e.s(["f",0,function(e,t="The request failed. Please try again."){return e instanceof Error?e.message:t}])},73656,e=>{"use strict";var t=e.i(44362),r=e.i(35921),n=e.i(78337),o=e.i(14778);let i=function(e={}){let o=e.url??"/trpc";return(0,t.$)({links:[(0,n.f)({condition:e=>"subscription"===e.type,true:(0,t.I)({url:o,eventSourceOptions:{withCredentials:!0}}),false:(0,r.f)({url:o,fetch:(t,r)=>(e.fetch??globalThis.fetch)(t,{...r,signal:r?.signal??null,credentials:"same-origin"}),headers(){let t=(e.csrfToken??function(){return"u"<typeof document?void 0:document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith("csrftoken="))?.slice(10)})();return t?{"X-CSRFToken":t}:{}}})})]})}();async function s(e){try{return await i.auth.session.query(void 0,e?{signal:e}:void 0)}catch(e){throw(0,o.f)(e)&&e.data?.code==="PRECONDITION_FAILED"&&location.assign(new URL("/setup/",location.origin).href),e}}e.s(["m",0,s,"U",0,i])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96001,t=>{t.v(e=>Promise.all(["static/chunks/0y5lgqdwpeabb.js"].map(e=>t.l(e))).then(()=>e(160)))}]);