zudoku 0.0.0-monetization-standalone.z2a065bd9 → 0.0.0-money-plugin.z605c614d

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 (235) hide show
  1. package/dist/config/create-plugin.d.ts +2 -2
  2. package/dist/config/create-plugin.js.map +1 -1
  3. package/dist/config/validators/InputNavigationSchema.d.ts +103 -53
  4. package/dist/config/validators/InputNavigationSchema.js +17 -0
  5. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  6. package/dist/config/validators/NavigationSchema.d.ts +10 -2
  7. package/dist/config/validators/NavigationSchema.js +7 -0
  8. package/dist/config/validators/NavigationSchema.js.map +1 -1
  9. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  10. package/dist/config/validators/validate.d.ts +3 -3
  11. package/dist/flat-config.d.ts +35 -24
  12. package/dist/lib/components/Heading.d.ts +1 -1
  13. package/dist/lib/components/MobileTopNavigation.js +2 -1
  14. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  15. package/dist/lib/components/TopNavigation.d.ts +7 -1
  16. package/dist/lib/components/TopNavigation.js +7 -2
  17. package/dist/lib/components/TopNavigation.js.map +1 -1
  18. package/dist/lib/components/context/ZudokuContext.d.ts +8 -1
  19. package/dist/lib/components/context/ZudokuContext.js +2 -0
  20. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  21. package/dist/lib/components/index.d.ts +18 -76
  22. package/dist/lib/components/index.js +19 -36
  23. package/dist/lib/components/index.js.map +1 -1
  24. package/dist/lib/components/navigation/Navigation.js +4 -3
  25. package/dist/lib/components/navigation/Navigation.js.map +1 -1
  26. package/dist/lib/components/navigation/NavigationCategory.js +8 -0
  27. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  28. package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
  29. package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
  30. package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
  31. package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
  32. package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
  33. package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
  34. package/dist/lib/components/navigation/NavigationItem.js +11 -1
  35. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  36. package/dist/lib/components/navigation/utils.d.ts +2 -1
  37. package/dist/lib/components/navigation/utils.js +22 -1
  38. package/dist/lib/components/navigation/utils.js.map +1 -1
  39. package/dist/lib/hooks/index.d.ts +7 -30
  40. package/dist/lib/hooks/index.js +7 -15
  41. package/dist/lib/hooks/index.js.map +1 -1
  42. package/dist/lib/oas/graphql/circular.d.ts +1 -1
  43. package/dist/lib/oas/graphql/circular.js +18 -35
  44. package/dist/lib/oas/graphql/circular.js.map +1 -1
  45. package/dist/lib/oas/graphql/circular.test.js +33 -2
  46. package/dist/lib/oas/graphql/circular.test.js.map +1 -1
  47. package/dist/lib/oas/parser/index.js +14 -5
  48. package/dist/lib/oas/parser/index.js.map +1 -1
  49. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
  50. package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
  51. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  52. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
  53. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
  54. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
  55. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
  56. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  57. package/dist/lib/ui/Alert.d.ts +3 -2
  58. package/dist/lib/ui/Alert.js +9 -5
  59. package/dist/lib/ui/Alert.js.map +1 -1
  60. package/dist/lib/ui/Command.d.ts +3 -3
  61. package/dist/lib/ui/InputGroup.d.ts +16 -0
  62. package/dist/lib/ui/InputGroup.js +65 -0
  63. package/dist/lib/ui/InputGroup.js.map +1 -0
  64. package/dist/lib/util/flattenAllOf.d.ts +0 -2
  65. package/dist/lib/util/flattenAllOf.js +0 -46
  66. package/dist/lib/util/flattenAllOf.js.map +1 -1
  67. package/dist/lib/util/flattenAllOf.test.js +2 -1
  68. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  69. package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
  70. package/dist/lib/util/flattenAllOfProcessor.js +48 -0
  71. package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
  72. package/dist/lib/util/readFrontmatter.js +2 -1
  73. package/dist/lib/util/readFrontmatter.js.map +1 -1
  74. package/dist/vite/api/SchemaManager.js +1 -1
  75. package/dist/vite/api/SchemaManager.js.map +1 -1
  76. package/dist/vite/api/SchemaManager.test.js +1 -1
  77. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  78. package/dist/vite/build.js +91 -73
  79. package/dist/vite/build.js.map +1 -1
  80. package/dist/vite/mdx/remark-inject-filepath.js +5 -1
  81. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  82. package/dist/vite/mdx/remark-link-rewrite.js +3 -2
  83. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  84. package/dist/vite/plugin-docs.js +9 -7
  85. package/dist/vite/plugin-docs.js.map +1 -1
  86. package/dist/vite/plugin-markdown-export.js +4 -2
  87. package/dist/vite/plugin-markdown-export.js.map +1 -1
  88. package/lib/{ClaudeLogo-K64Qm6gS.js → ClaudeLogo-DP6JOmz1.js} +26 -22
  89. package/lib/{ClaudeLogo-K64Qm6gS.js.map → ClaudeLogo-DP6JOmz1.js.map} +1 -1
  90. package/lib/{HydrationBoundary-CNF2ZV3E.js → HydrationBoundary-CJu4vUlG.js} +6 -6
  91. package/lib/{HydrationBoundary-CNF2ZV3E.js.map → HydrationBoundary-CJu4vUlG.js.map} +1 -1
  92. package/lib/{MdxPage-Cr99RARi.js → MdxPage-BR_7-0cT.js} +8 -8
  93. package/lib/{MdxPage-Cr99RARi.js.map → MdxPage-BR_7-0cT.js.map} +1 -1
  94. package/lib/Mermaid-DAWm9rzb.js +104 -0
  95. package/lib/Mermaid-DAWm9rzb.js.map +1 -0
  96. package/lib/{OAuthErrorPage-BRXS5AMu.js → OAuthErrorPage-l0orKh-A.js} +22 -19
  97. package/lib/{OAuthErrorPage-BRXS5AMu.js.map → OAuthErrorPage-l0orKh-A.js.map} +1 -1
  98. package/lib/{OasProvider-sP_SqSM7.js → OasProvider-DPW0x8dk.js} +3 -3
  99. package/lib/{OasProvider-sP_SqSM7.js.map → OasProvider-DPW0x8dk.js.map} +1 -1
  100. package/lib/{OperationList-DR0APPhk.js → OperationList-Dcm9TZG7.js} +952 -948
  101. package/lib/OperationList-Dcm9TZG7.js.map +1 -0
  102. package/lib/{RouteGuard-CZuPjknT.js → RouteGuard-CVs3yvEs.js} +5 -5
  103. package/lib/{RouteGuard-CZuPjknT.js.map → RouteGuard-CVs3yvEs.js.map} +1 -1
  104. package/lib/{SchemaList-DgqAAHSI.js → SchemaList-B7RzviG5.js} +8 -8
  105. package/lib/{SchemaList-DgqAAHSI.js.map → SchemaList-B7RzviG5.js.map} +1 -1
  106. package/lib/{SchemaView-7IyQYEqk.js → SchemaView-Dt5-T06r.js} +3 -3
  107. package/lib/{SchemaView-7IyQYEqk.js.map → SchemaView-Dt5-T06r.js.map} +1 -1
  108. package/lib/{Secret-BE7V0Vb5.js → Secret-DUpgv4V3.js} +4 -4
  109. package/lib/{Secret-BE7V0Vb5.js.map → Secret-DUpgv4V3.js.map} +1 -1
  110. package/lib/{SignUp-D3zhMk7q.js → SignUp-CifBTCq4.js} +31 -26
  111. package/lib/{SignUp-D3zhMk7q.js.map → SignUp-CifBTCq4.js.map} +1 -1
  112. package/lib/{SyntaxHighlight-paLQ8NP8.js → SyntaxHighlight-BMu0b_hF.js} +3 -3
  113. package/lib/{SyntaxHighlight-paLQ8NP8.js.map → SyntaxHighlight-BMu0b_hF.js.map} +1 -1
  114. package/lib/{Toc-GluXkcIk.js → Toc-CeMXYWgp.js} +2 -2
  115. package/lib/{Toc-GluXkcIk.js.map → Toc-CeMXYWgp.js.map} +1 -1
  116. package/lib/{index-DYfX9H7i.js → Zudoku-B5YsolG1.js} +2869 -2710
  117. package/lib/Zudoku-B5YsolG1.js.map +1 -0
  118. package/lib/ZudokuContext-CYyb_PB_.js +175 -0
  119. package/lib/ZudokuContext-CYyb_PB_.js.map +1 -0
  120. package/lib/ZudokuReactContext-DGJAP1sN.js +222 -0
  121. package/lib/ZudokuReactContext-DGJAP1sN.js.map +1 -0
  122. package/lib/{circular-Bunzbpsy.js → circular-BV9K7T3F.js} +1327 -1346
  123. package/lib/{circular-Bunzbpsy.js.map → circular-BV9K7T3F.js.map} +1 -1
  124. package/lib/createServer-DYUdwZG4.js +13036 -0
  125. package/lib/createServer-DYUdwZG4.js.map +1 -0
  126. package/lib/{errors-D2NINcVk.js → errors-C3XsqYso.js} +3 -3
  127. package/lib/{errors-D2NINcVk.js.map → errors-C3XsqYso.js.map} +1 -1
  128. package/lib/{firebase-BVAmGV_v.js → firebase-CL9aCRn0.js} +26 -25
  129. package/lib/firebase-CL9aCRn0.js.map +1 -0
  130. package/lib/{hook-Da8QTnPd.js → hook-Dz_n9SoE.js} +16 -15
  131. package/lib/{hook-Da8QTnPd.js.map → hook-Dz_n9SoE.js.map} +1 -1
  132. package/lib/{index-DTjrb36R.js → index-CFW_9FdI.js} +2 -2
  133. package/lib/{index-DTjrb36R.js.map → index-CFW_9FdI.js.map} +1 -1
  134. package/lib/index-DAWHN3cH.js +86 -0
  135. package/lib/index-DAWHN3cH.js.map +1 -0
  136. package/lib/{index-BfTLawvZ.js → index-DywuWe2u.js} +589 -551
  137. package/lib/index-DywuWe2u.js.map +1 -0
  138. package/lib/{index.esm-B_0dvNjB.js → index.esm-Ca5zvoff.js} +20 -20
  139. package/lib/{index.esm-B_0dvNjB.js.map → index.esm-Ca5zvoff.js.map} +1 -1
  140. package/lib/{index.esm-GMDd_9gw.js → index.esm-ld_S_9qs.js} +2 -2
  141. package/lib/index.esm-ld_S_9qs.js.map +1 -0
  142. package/lib/{invariant-BJAl77rw.js → invariant-B_t_F2s_.js} +3 -3
  143. package/lib/{invariant-BJAl77rw.js.map → invariant-B_t_F2s_.js.map} +1 -1
  144. package/lib/{mutation-BISOc7OM.js → mutation-B7eFBLZY.js} +2 -2
  145. package/lib/{mutation-BISOc7OM.js.map → mutation-B7eFBLZY.js.map} +1 -1
  146. package/lib/ui/Alert.js +36 -24
  147. package/lib/ui/Alert.js.map +1 -1
  148. package/lib/ui/InputGroup.js +155 -0
  149. package/lib/ui/InputGroup.js.map +1 -0
  150. package/lib/ui/SyntaxHighlight.js +3 -3
  151. package/lib/useExposedProps-CzTDfXfq.js +30 -0
  152. package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
  153. package/lib/{useMutation-CFMGlAMW.js → useMutation-CErliDZ9.js} +5 -5
  154. package/lib/{useMutation-CFMGlAMW.js.map → useMutation-CErliDZ9.js.map} +1 -1
  155. package/lib/{useSuspenseQuery-CSB_rVek.js → useQuery-ht7aWJ3S.js} +432 -446
  156. package/lib/useQuery-ht7aWJ3S.js.map +1 -0
  157. package/lib/useSuspenseQuery-DQH4Bmc2.js +18 -0
  158. package/lib/useSuspenseQuery-DQH4Bmc2.js.map +1 -0
  159. package/lib/zudoku.__internal.js +1504 -1041
  160. package/lib/zudoku.__internal.js.map +1 -1
  161. package/lib/zudoku.auth-auth0.js +6 -5
  162. package/lib/zudoku.auth-auth0.js.map +1 -1
  163. package/lib/zudoku.auth-azureb2c.js +14 -13
  164. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  165. package/lib/zudoku.auth-clerk.js +2 -2
  166. package/lib/zudoku.auth-firebase.js +5 -5
  167. package/lib/zudoku.auth-openid.js +8 -7
  168. package/lib/zudoku.auth-openid.js.map +1 -1
  169. package/lib/zudoku.auth-supabase.js +4 -4
  170. package/lib/zudoku.components.js +31 -29
  171. package/lib/zudoku.components.js.map +1 -1
  172. package/lib/zudoku.hooks.js +24 -11
  173. package/lib/zudoku.hooks.js.map +1 -1
  174. package/lib/zudoku.mermaid.js +5 -4
  175. package/lib/zudoku.mermaid.js.map +1 -1
  176. package/lib/zudoku.plugin-api-catalog.js +41 -36
  177. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  178. package/lib/zudoku.plugin-api-keys.js +156 -153
  179. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  180. package/lib/zudoku.plugin-custom-pages.js +1 -1
  181. package/lib/zudoku.plugin-markdown.js +1 -1
  182. package/lib/zudoku.plugin-openapi.js +2 -2
  183. package/lib/zudoku.plugin-search-pagefind.js +19 -18
  184. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  185. package/lib/zudoku.react-query.js +26 -25
  186. package/lib/zudoku.react-query.js.map +1 -1
  187. package/package.json +5 -4
  188. package/src/app/defaultTheme.css +4 -0
  189. package/src/app/main.css +2 -0
  190. package/src/lib/components/MobileTopNavigation.tsx +13 -8
  191. package/src/lib/components/TopNavigation.tsx +25 -7
  192. package/src/lib/components/context/ZudokuContext.ts +1 -0
  193. package/src/lib/components/index.ts +19 -39
  194. package/src/lib/components/navigation/Navigation.tsx +4 -3
  195. package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
  196. package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
  197. package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
  198. package/src/lib/components/navigation/NavigationItem.tsx +17 -1
  199. package/src/lib/components/navigation/utils.ts +32 -1
  200. package/src/lib/hooks/index.ts +7 -16
  201. package/src/lib/oas/graphql/circular.test.ts +37 -2
  202. package/src/lib/oas/graphql/circular.ts +25 -51
  203. package/src/lib/oas/parser/index.ts +17 -6
  204. package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
  205. package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
  206. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
  207. package/src/lib/ui/Alert.tsx +17 -5
  208. package/src/lib/ui/InputGroup.tsx +168 -0
  209. package/src/lib/util/flattenAllOf.test.ts +2 -1
  210. package/src/lib/util/flattenAllOf.ts +0 -57
  211. package/src/lib/util/flattenAllOfProcessor.ts +58 -0
  212. package/src/lib/util/readFrontmatter.ts +2 -1
  213. package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
  214. package/src/zuplo/enrich-with-zuplo.ts +254 -0
  215. package/src/zuplo/policy-types.ts +46 -0
  216. package/src/zuplo/with-zuplo-processors.ts +35 -0
  217. package/src/zuplo/with-zuplo.ts +14 -0
  218. package/lib/Mermaid-DEztDKFw.js +0 -102
  219. package/lib/Mermaid-DEztDKFw.js.map +0 -1
  220. package/lib/OperationList-DR0APPhk.js.map +0 -1
  221. package/lib/Separator-BXt1LYnm.js +0 -27
  222. package/lib/Separator-BXt1LYnm.js.map +0 -1
  223. package/lib/ZudokuContext-CnEI8jPU.js +0 -389
  224. package/lib/ZudokuContext-CnEI8jPU.js.map +0 -1
  225. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js +0 -9
  226. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +0 -1
  227. package/lib/createServer-Dl4Xwsm4.js +0 -16693
  228. package/lib/createServer-Dl4Xwsm4.js.map +0 -1
  229. package/lib/firebase-BVAmGV_v.js.map +0 -1
  230. package/lib/index-Ba6RP577.js +0 -133
  231. package/lib/index-Ba6RP577.js.map +0 -1
  232. package/lib/index-BfTLawvZ.js.map +0 -1
  233. package/lib/index-DYfX9H7i.js.map +0 -1
  234. package/lib/index.esm-GMDd_9gw.js.map +0 -1
  235. package/lib/useSuspenseQuery-CSB_rVek.js.map +0 -1
@@ -1,22 +1,24 @@
1
- import { a as Ie, H as Se } from "./index.esm-B_0dvNjB.js";
2
- import { j as a } from "./jsx-runtime-BzflLqGi.js";
3
- import { b as _t, H as vt } from "./HydrationBoundary-CNF2ZV3E.js";
4
- import { M as Ne, e as wt } from "./useSuspenseQuery-CSB_rVek.js";
5
- import * as F from "react";
6
- import { StrictMode as De, useEffect as K, useRef as Re, useState as zt, Suspense as bt, isValidElement as yt } from "react";
7
- import { n as kt, S as xt, a as Ce, b3 as Zt, O as $t, d as jt, L as Pt, h as Et, w as Tt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
8
- import * as At from "react-dom";
9
- import { B as Ue, R as Ot } from "./RouteGuard-CZuPjknT.js";
10
- import { CircleFadingArrowUpIcon as It, LoaderCircleIcon as St, ExternalLink as Nt, PanelLeftIcon as Dt, UnlinkIcon as Rt } from "lucide-react";
11
- import { Button as Ct } from "./ui/Button.js";
12
- import { a as Ut, c as E, A as Ft, s as Lt, P as Bt, N as pe, d as Mt, f as Wt, g as Vt, T as Fe, H as Le, D as qt, h as Be } from "./index-DYfX9H7i.js";
13
- import { c as x } from "./cn-5-Gd1Dss.js";
14
- import { a as G, e as Ht, j as Jt } from "./ZudokuContext-CnEI8jPU.js";
15
- import { D as $, a as Kt, b as Gt } from "./Drawer-Ch7927PF.js";
16
- import { VisuallyHidden as Yt } from "@radix-ui/react-visually-hidden";
17
- import { S as Qt } from "./Spinner-CI6bRyZw.js";
18
- import { C as Me } from "./CategoryHeading-DhmodDcq.js";
19
- import { isTransformConfigPlugin as Xt } from "./zudoku.plugins.js";
1
+ import { a as De, H as Ce } from "./index.esm-Ca5zvoff.js";
2
+ import { j as c } from "./jsx-runtime-BzflLqGi.js";
3
+ import { b as Ot, H as St } from "./HydrationBoundary-CJu4vUlG.js";
4
+ import { L as Ue, g as Pt } from "./useQuery-ht7aWJ3S.js";
5
+ import * as V from "react";
6
+ import { StrictMode as Fe, useEffect as te, useRef as Je, useState as Tt, Suspense as Et, isValidElement as Nt } from "react";
7
+ import { n as It, S as At, a as Le, b3 as Rt, O as Dt, d as Ct, L as Ut, h as Ft, w as Jt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
8
+ import * as Lt from "react-dom";
9
+ import { B as Me, R as Mt } from "./RouteGuard-CVs3yvEs.js";
10
+ import { CircleFadingArrowUpIcon as Bt, LoaderCircleIcon as Vt, ExternalLink as qt, PanelLeftIcon as Wt, UnlinkIcon as Kt } from "lucide-react";
11
+ import { Button as Ht } from "./ui/Button.js";
12
+ import { a as N, A as Gt, s as Yt, P as Qt, N as Xt, d as ge, f as en, g as tn, h as nn, T as Be, H as Ve, D as rn, i as qe } from "./Zudoku-B5YsolG1.js";
13
+ import { c as S } from "./cn-5-Gd1Dss.js";
14
+ import { a as q, d as on, j as sn } from "./ZudokuContext-CYyb_PB_.js";
15
+ import "./index-DAWHN3cH.js";
16
+ import "./ZudokuReactContext-DGJAP1sN.js";
17
+ import { D as T, a as an, b as cn } from "./Drawer-Ch7927PF.js";
18
+ import { VisuallyHidden as un } from "@radix-ui/react-visually-hidden";
19
+ import { S as ln } from "./Spinner-CI6bRyZw.js";
20
+ import { C as We } from "./CategoryHeading-DhmodDcq.js";
21
+ import { isTransformConfigPlugin as dn } from "./zudoku.plugins.js";
20
22
  /**
21
23
  * react-router v7.12.0
22
24
  *
@@ -27,74 +29,81 @@ import { isTransformConfigPlugin as Xt } from "./zudoku.plugins.js";
27
29
  *
28
30
  * @license MIT
29
31
  */
30
- function en(e) {
31
- return /* @__PURE__ */ F.createElement(kt, { flushSync: At.flushSync, ...e });
32
+ function fn(e) {
33
+ return /* @__PURE__ */ V.createElement(It, { flushSync: Lt.flushSync, ...e });
32
34
  }
33
- const tn = new _t({
35
+ const pn = new Ot({
34
36
  defaultOptions: {
35
37
  queries: {
36
38
  staleTime: 1e3 * 60 * 5
37
39
  }
38
40
  }
39
- }), nn = ({
41
+ }), hn = ({
40
42
  router: e,
41
43
  hydrate: t = !1
42
- }) => /* @__PURE__ */ a.jsx(De, { children: /* @__PURE__ */ a.jsx(Ne, { client: tn, children: /* @__PURE__ */ a.jsx(vt, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(Ue, { value: !1, children: /* @__PURE__ */ a.jsx(Ie, { children: /* @__PURE__ */ a.jsx(en, { router: e }) }) }) }) }) }), rn = ({
44
+ }) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: pn, children: /* @__PURE__ */ c.jsx(St, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ c.jsx(Me, { value: !1, children: /* @__PURE__ */ c.jsx(De, { children: /* @__PURE__ */ c.jsx(fn, { router: e }) }) }) }) }) }), mn = ({
43
45
  router: e,
44
46
  context: t,
45
47
  queryClient: n,
46
48
  helmetContext: r,
47
49
  bypassProtection: o = !1
48
- }) => /* @__PURE__ */ a.jsx(De, { children: /* @__PURE__ */ a.jsx(Ne, { client: n, children: /* @__PURE__ */ a.jsx(Ie, { context: r, children: /* @__PURE__ */ a.jsx(Ue, { value: o, children: /* @__PURE__ */ a.jsx(xt, { router: e, context: t }) }) }) }) });
49
- function c(e, t, n) {
50
- function r(u, l) {
51
- var d;
52
- Object.defineProperty(u, "_zod", {
53
- value: u._zod ?? {},
50
+ }) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: n, children: /* @__PURE__ */ c.jsx(De, { context: r, children: /* @__PURE__ */ c.jsx(Me, { value: o, children: /* @__PURE__ */ c.jsx(At, { router: e, context: t }) }) }) }) });
51
+ function u(e, t, n) {
52
+ function r(a, l) {
53
+ if (a._zod || Object.defineProperty(a, "_zod", {
54
+ value: {
55
+ def: l,
56
+ constr: s,
57
+ traits: /* @__PURE__ */ new Set()
58
+ },
54
59
  enumerable: !1
55
- }), (d = u._zod).traits ?? (d.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, l);
56
- for (const p in i.prototype)
57
- p in u || Object.defineProperty(u, p, { value: i.prototype[p].bind(u) });
58
- u._zod.constr = i, u._zod.def = l;
60
+ }), a._zod.traits.has(e))
61
+ return;
62
+ a._zod.traits.add(e), t(a, l);
63
+ const d = s.prototype, f = Object.keys(d);
64
+ for (let g = 0; g < f.length; g++) {
65
+ const h = f[g];
66
+ h in a || (a[h] = d[h].bind(a));
67
+ }
59
68
  }
60
69
  const o = n?.Parent ?? Object;
61
- class s extends o {
70
+ class i extends o {
62
71
  }
63
- Object.defineProperty(s, "name", { value: e });
64
- function i(u) {
72
+ Object.defineProperty(i, "name", { value: e });
73
+ function s(a) {
65
74
  var l;
66
- const d = n?.Parent ? new s() : this;
67
- r(d, u), (l = d._zod).deferred ?? (l.deferred = []);
68
- for (const p of d._zod.deferred)
69
- p();
75
+ const d = n?.Parent ? new i() : this;
76
+ r(d, a), (l = d._zod).deferred ?? (l.deferred = []);
77
+ for (const f of d._zod.deferred)
78
+ f();
70
79
  return d;
71
80
  }
72
- return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
73
- value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
74
- }), Object.defineProperty(i, "name", { value: e }), i;
81
+ return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
82
+ value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
83
+ }), Object.defineProperty(s, "name", { value: e }), s;
75
84
  }
76
- class D extends Error {
85
+ class F extends Error {
77
86
  constructor() {
78
87
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
79
88
  }
80
89
  }
81
- class We extends Error {
90
+ class Ke extends Error {
82
91
  constructor(t) {
83
92
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
84
93
  }
85
94
  }
86
- const Ve = {};
87
- function A(e) {
88
- return Ve;
95
+ const He = {};
96
+ function R(e) {
97
+ return He;
89
98
  }
90
- function on(e) {
99
+ function Ge(e) {
91
100
  const t = Object.values(e).filter((r) => typeof r == "number");
92
101
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
93
102
  }
94
- function ne(e, t) {
103
+ function ie(e, t) {
95
104
  return typeof t == "bigint" ? t.toString() : t;
96
105
  }
97
- function se(e) {
106
+ function ue(e) {
98
107
  return {
99
108
  get value() {
100
109
  {
@@ -104,20 +113,20 @@ function se(e) {
104
113
  }
105
114
  };
106
115
  }
107
- function ie(e) {
116
+ function le(e) {
108
117
  return e == null;
109
118
  }
110
- function ae(e) {
119
+ function de(e) {
111
120
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
112
121
  return e.slice(t, n);
113
122
  }
114
- const he = Symbol("evaluating");
115
- function h(e, t, n) {
123
+ const _e = Symbol("evaluating");
124
+ function _(e, t, n) {
116
125
  let r;
117
126
  Object.defineProperty(e, t, {
118
127
  get() {
119
- if (r !== he)
120
- return r === void 0 && (r = he, r = n()), r;
128
+ if (r !== _e)
129
+ return r === void 0 && (r = _e, r = n()), r;
121
130
  },
122
131
  set(o) {
123
132
  Object.defineProperty(e, t, {
@@ -128,7 +137,7 @@ function h(e, t, n) {
128
137
  configurable: !0
129
138
  });
130
139
  }
131
- function I(e, t, n) {
140
+ function C(e, t, n) {
132
141
  Object.defineProperty(e, t, {
133
142
  value: n,
134
143
  writable: !0,
@@ -136,7 +145,7 @@ function I(e, t, n) {
136
145
  configurable: !0
137
146
  });
138
147
  }
139
- function S(...e) {
148
+ function I(...e) {
140
149
  const t = {};
141
150
  for (const n of e) {
142
151
  const r = Object.getOwnPropertyDescriptors(n);
@@ -144,15 +153,18 @@ function S(...e) {
144
153
  }
145
154
  return Object.defineProperties({}, t);
146
155
  }
147
- function me(e) {
156
+ function ve(e) {
148
157
  return JSON.stringify(e);
149
158
  }
150
- const qe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
159
+ function gn(e) {
160
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
161
+ }
162
+ const Ye = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
151
163
  };
152
- function q(e) {
164
+ function Y(e) {
153
165
  return typeof e == "object" && e !== null && !Array.isArray(e);
154
166
  }
155
- const sn = se(() => {
167
+ const _n = ue(() => {
156
168
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
157
169
  return !1;
158
170
  try {
@@ -162,27 +174,27 @@ const sn = se(() => {
162
174
  return !1;
163
175
  }
164
176
  });
165
- function C(e) {
166
- if (q(e) === !1)
177
+ function M(e) {
178
+ if (Y(e) === !1)
167
179
  return !1;
168
180
  const t = e.constructor;
169
- if (t === void 0)
181
+ if (t === void 0 || typeof t != "function")
170
182
  return !0;
171
183
  const n = t.prototype;
172
- return !(q(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
184
+ return !(Y(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
173
185
  }
174
- function He(e) {
175
- return C(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
186
+ function Qe(e) {
187
+ return M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
176
188
  }
177
- const an = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
178
- function Y(e) {
189
+ const vn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
190
+ function ne(e) {
179
191
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
180
192
  }
181
- function T(e, t, n) {
193
+ function A(e, t, n) {
182
194
  const r = new e._zod.constr(t ?? e._zod.def);
183
195
  return (!t || n?.parent) && (r._zod.parent = e), r;
184
196
  }
185
- function f(e) {
197
+ function p(e) {
186
198
  const t = e;
187
199
  if (!t)
188
200
  return {};
@@ -195,72 +207,79 @@ function f(e) {
195
207
  }
196
208
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
197
209
  }
198
- function cn(e) {
210
+ function yn(e) {
199
211
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
200
212
  }
201
- function un(e, t) {
202
- const n = e._zod.def, r = S(e._zod.def, {
213
+ function wn(e, t) {
214
+ const n = e._zod.def, r = n.checks;
215
+ if (r && r.length > 0)
216
+ throw new Error(".pick() cannot be used on object schemas containing refinements");
217
+ const i = I(e._zod.def, {
203
218
  get shape() {
204
- const o = {};
205
- for (const s in t) {
206
- if (!(s in n.shape))
207
- throw new Error(`Unrecognized key: "${s}"`);
208
- t[s] && (o[s] = n.shape[s]);
219
+ const s = {};
220
+ for (const a in t) {
221
+ if (!(a in n.shape))
222
+ throw new Error(`Unrecognized key: "${a}"`);
223
+ t[a] && (s[a] = n.shape[a]);
209
224
  }
210
- return I(this, "shape", o), o;
225
+ return C(this, "shape", s), s;
211
226
  },
212
227
  checks: []
213
228
  });
214
- return T(e, r);
229
+ return A(e, i);
215
230
  }
216
- function ln(e, t) {
217
- const n = e._zod.def, r = S(e._zod.def, {
231
+ function zn(e, t) {
232
+ const n = e._zod.def, r = n.checks;
233
+ if (r && r.length > 0)
234
+ throw new Error(".omit() cannot be used on object schemas containing refinements");
235
+ const i = I(e._zod.def, {
218
236
  get shape() {
219
- const o = { ...e._zod.def.shape };
220
- for (const s in t) {
221
- if (!(s in n.shape))
222
- throw new Error(`Unrecognized key: "${s}"`);
223
- t[s] && delete o[s];
237
+ const s = { ...e._zod.def.shape };
238
+ for (const a in t) {
239
+ if (!(a in n.shape))
240
+ throw new Error(`Unrecognized key: "${a}"`);
241
+ t[a] && delete s[a];
224
242
  }
225
- return I(this, "shape", o), o;
243
+ return C(this, "shape", s), s;
226
244
  },
227
245
  checks: []
228
246
  });
229
- return T(e, r);
247
+ return A(e, i);
230
248
  }
231
- function dn(e, t) {
232
- if (!C(t))
249
+ function bn(e, t) {
250
+ if (!M(t))
233
251
  throw new Error("Invalid input to extend: expected a plain object");
234
252
  const n = e._zod.def.checks;
235
- if (n && n.length > 0)
236
- throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
237
- const o = S(e._zod.def, {
253
+ if (n && n.length > 0) {
254
+ const i = e._zod.def.shape;
255
+ for (const s in t)
256
+ if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
257
+ throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
258
+ }
259
+ const o = I(e._zod.def, {
238
260
  get shape() {
239
- const s = { ...e._zod.def.shape, ...t };
240
- return I(this, "shape", s), s;
241
- },
242
- checks: []
261
+ const i = { ...e._zod.def.shape, ...t };
262
+ return C(this, "shape", i), i;
263
+ }
243
264
  });
244
- return T(e, o);
265
+ return A(e, o);
245
266
  }
246
- function fn(e, t) {
247
- if (!C(t))
267
+ function kn(e, t) {
268
+ if (!M(t))
248
269
  throw new Error("Invalid input to safeExtend: expected a plain object");
249
- const n = {
250
- ...e._zod.def,
270
+ const n = I(e._zod.def, {
251
271
  get shape() {
252
272
  const r = { ...e._zod.def.shape, ...t };
253
- return I(this, "shape", r), r;
254
- },
255
- checks: e._zod.def.checks
256
- };
257
- return T(e, n);
273
+ return C(this, "shape", r), r;
274
+ }
275
+ });
276
+ return A(e, n);
258
277
  }
259
- function pn(e, t) {
260
- const n = S(e._zod.def, {
278
+ function $n(e, t) {
279
+ const n = I(e._zod.def, {
261
280
  get shape() {
262
281
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
263
- return I(this, "shape", r), r;
282
+ return C(this, "shape", r), r;
264
283
  },
265
284
  get catchall() {
266
285
  return t._zod.def.catchall;
@@ -268,59 +287,61 @@ function pn(e, t) {
268
287
  checks: []
269
288
  // delete existing checks
270
289
  });
271
- return T(e, n);
290
+ return A(e, n);
272
291
  }
273
- function hn(e, t, n) {
274
- const r = S(t._zod.def, {
292
+ function jn(e, t, n) {
293
+ const o = t._zod.def.checks;
294
+ if (o && o.length > 0)
295
+ throw new Error(".partial() cannot be used on object schemas containing refinements");
296
+ const s = I(t._zod.def, {
275
297
  get shape() {
276
- const o = t._zod.def.shape, s = { ...o };
298
+ const a = t._zod.def.shape, l = { ...a };
277
299
  if (n)
278
- for (const i in n) {
279
- if (!(i in o))
280
- throw new Error(`Unrecognized key: "${i}"`);
281
- n[i] && (s[i] = e ? new e({
300
+ for (const d in n) {
301
+ if (!(d in a))
302
+ throw new Error(`Unrecognized key: "${d}"`);
303
+ n[d] && (l[d] = e ? new e({
282
304
  type: "optional",
283
- innerType: o[i]
284
- }) : o[i]);
305
+ innerType: a[d]
306
+ }) : a[d]);
285
307
  }
286
308
  else
287
- for (const i in o)
288
- s[i] = e ? new e({
309
+ for (const d in a)
310
+ l[d] = e ? new e({
289
311
  type: "optional",
290
- innerType: o[i]
291
- }) : o[i];
292
- return I(this, "shape", s), s;
312
+ innerType: a[d]
313
+ }) : a[d];
314
+ return C(this, "shape", l), l;
293
315
  },
294
316
  checks: []
295
317
  });
296
- return T(t, r);
318
+ return A(t, s);
297
319
  }
298
- function mn(e, t, n) {
299
- const r = S(t._zod.def, {
320
+ function xn(e, t, n) {
321
+ const r = I(t._zod.def, {
300
322
  get shape() {
301
- const o = t._zod.def.shape, s = { ...o };
323
+ const o = t._zod.def.shape, i = { ...o };
302
324
  if (n)
303
- for (const i in n) {
304
- if (!(i in s))
305
- throw new Error(`Unrecognized key: "${i}"`);
306
- n[i] && (s[i] = new e({
325
+ for (const s in n) {
326
+ if (!(s in i))
327
+ throw new Error(`Unrecognized key: "${s}"`);
328
+ n[s] && (i[s] = new e({
307
329
  type: "nonoptional",
308
- innerType: o[i]
330
+ innerType: o[s]
309
331
  }));
310
332
  }
311
333
  else
312
- for (const i in o)
313
- s[i] = new e({
334
+ for (const s in o)
335
+ i[s] = new e({
314
336
  type: "nonoptional",
315
- innerType: o[i]
337
+ innerType: o[s]
316
338
  });
317
- return I(this, "shape", s), s;
318
- },
319
- checks: []
339
+ return C(this, "shape", i), i;
340
+ }
320
341
  });
321
- return T(t, r);
342
+ return A(t, r);
322
343
  }
323
- function N(e, t = 0) {
344
+ function U(e, t = 0) {
324
345
  if (e.aborted === !0)
325
346
  return !0;
326
347
  for (let n = t; n < e.issues.length; n++)
@@ -328,27 +349,27 @@ function N(e, t = 0) {
328
349
  return !0;
329
350
  return !1;
330
351
  }
331
- function Je(e, t) {
352
+ function Xe(e, t) {
332
353
  return t.map((n) => {
333
354
  var r;
334
355
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
335
356
  });
336
357
  }
337
- function B(e) {
358
+ function K(e) {
338
359
  return typeof e == "string" ? e : e?.message;
339
360
  }
340
- function O(e, t, n) {
361
+ function D(e, t, n) {
341
362
  const r = { ...e, path: e.path ?? [] };
342
363
  if (!e.message) {
343
- const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
364
+ const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
344
365
  r.message = o;
345
366
  }
346
367
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
347
368
  }
348
- function ce(e) {
369
+ function fe(e) {
349
370
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
350
371
  }
351
- function U(...e) {
372
+ function B(...e) {
352
373
  const [t, n, r] = e;
353
374
  return typeof t == "string" ? {
354
375
  message: t,
@@ -357,118 +378,118 @@ function U(...e) {
357
378
  inst: r
358
379
  } : { ...t };
359
380
  }
360
- const Ke = (e, t) => {
381
+ const et = (e, t) => {
361
382
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
362
383
  value: e._zod,
363
384
  enumerable: !1
364
385
  }), Object.defineProperty(e, "issues", {
365
386
  value: t,
366
387
  enumerable: !1
367
- }), e.message = JSON.stringify(t, ne, 2), Object.defineProperty(e, "toString", {
388
+ }), e.message = JSON.stringify(t, ie, 2), Object.defineProperty(e, "toString", {
368
389
  value: () => e.message,
369
390
  enumerable: !1
370
391
  });
371
- }, Ge = c("$ZodError", Ke), Ye = c("$ZodError", Ke, { Parent: Error });
372
- function gn(e, t = (n) => n.message) {
392
+ }, tt = u("$ZodError", et), nt = u("$ZodError", et, { Parent: Error });
393
+ function Zn(e, t = (n) => n.message) {
373
394
  const n = {}, r = [];
374
395
  for (const o of e.issues)
375
396
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
376
397
  return { formErrors: r, fieldErrors: n };
377
398
  }
378
- function _n(e, t = (n) => n.message) {
399
+ function On(e, t = (n) => n.message) {
379
400
  const n = { _errors: [] }, r = (o) => {
380
- for (const s of o.issues)
381
- if (s.code === "invalid_union" && s.errors.length)
382
- s.errors.map((i) => r({ issues: i }));
383
- else if (s.code === "invalid_key")
384
- r({ issues: s.issues });
385
- else if (s.code === "invalid_element")
386
- r({ issues: s.issues });
387
- else if (s.path.length === 0)
388
- n._errors.push(t(s));
401
+ for (const i of o.issues)
402
+ if (i.code === "invalid_union" && i.errors.length)
403
+ i.errors.map((s) => r({ issues: s }));
404
+ else if (i.code === "invalid_key")
405
+ r({ issues: i.issues });
406
+ else if (i.code === "invalid_element")
407
+ r({ issues: i.issues });
408
+ else if (i.path.length === 0)
409
+ n._errors.push(t(i));
389
410
  else {
390
- let i = n, u = 0;
391
- for (; u < s.path.length; ) {
392
- const l = s.path[u];
393
- u === s.path.length - 1 ? (i[l] = i[l] || { _errors: [] }, i[l]._errors.push(t(s))) : i[l] = i[l] || { _errors: [] }, i = i[l], u++;
411
+ let s = n, a = 0;
412
+ for (; a < i.path.length; ) {
413
+ const l = i.path[a];
414
+ a === i.path.length - 1 ? (s[l] = s[l] || { _errors: [] }, s[l]._errors.push(t(i))) : s[l] = s[l] || { _errors: [] }, s = s[l], a++;
394
415
  }
395
416
  }
396
417
  };
397
418
  return r(e), n;
398
419
  }
399
- const ue = (e) => (t, n, r, o) => {
400
- const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
401
- if (i instanceof Promise)
402
- throw new D();
403
- if (i.issues.length) {
404
- const u = new (o?.Err ?? e)(i.issues.map((l) => O(l, s, A())));
405
- throw qe(u, o?.callee), u;
420
+ const pe = (e) => (t, n, r, o) => {
421
+ const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
422
+ if (s instanceof Promise)
423
+ throw new F();
424
+ if (s.issues.length) {
425
+ const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
426
+ throw Ye(a, o?.callee), a;
406
427
  }
407
- return i.value;
408
- }, le = (e) => async (t, n, r, o) => {
409
- const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
410
- let i = t._zod.run({ value: n, issues: [] }, s);
411
- if (i instanceof Promise && (i = await i), i.issues.length) {
412
- const u = new (o?.Err ?? e)(i.issues.map((l) => O(l, s, A())));
413
- throw qe(u, o?.callee), u;
428
+ return s.value;
429
+ }, he = (e) => async (t, n, r, o) => {
430
+ const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
431
+ let s = t._zod.run({ value: n, issues: [] }, i);
432
+ if (s instanceof Promise && (s = await s), s.issues.length) {
433
+ const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
434
+ throw Ye(a, o?.callee), a;
414
435
  }
415
- return i.value;
416
- }, Q = (e) => (t, n, r) => {
417
- const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
418
- if (s instanceof Promise)
419
- throw new D();
420
- return s.issues.length ? {
436
+ return s.value;
437
+ }, re = (e) => (t, n, r) => {
438
+ const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
439
+ if (i instanceof Promise)
440
+ throw new F();
441
+ return i.issues.length ? {
421
442
  success: !1,
422
- error: new (e ?? Ge)(s.issues.map((i) => O(i, o, A())))
423
- } : { success: !0, data: s.value };
424
- }, vn = /* @__PURE__ */ Q(Ye), X = (e) => async (t, n, r) => {
443
+ error: new (e ?? tt)(i.issues.map((s) => D(s, o, R())))
444
+ } : { success: !0, data: i.value };
445
+ }, Sn = /* @__PURE__ */ re(nt), oe = (e) => async (t, n, r) => {
425
446
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
426
- let s = t._zod.run({ value: n, issues: [] }, o);
427
- return s instanceof Promise && (s = await s), s.issues.length ? {
447
+ let i = t._zod.run({ value: n, issues: [] }, o);
448
+ return i instanceof Promise && (i = await i), i.issues.length ? {
428
449
  success: !1,
429
- error: new e(s.issues.map((i) => O(i, o, A())))
430
- } : { success: !0, data: s.value };
431
- }, wn = /* @__PURE__ */ X(Ye), zn = (e) => (t, n, r) => {
450
+ error: new e(i.issues.map((s) => D(s, o, R())))
451
+ } : { success: !0, data: i.value };
452
+ }, Pn = /* @__PURE__ */ oe(nt), Tn = (e) => (t, n, r) => {
432
453
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
433
- return ue(e)(t, n, o);
434
- }, bn = (e) => (t, n, r) => ue(e)(t, n, r), yn = (e) => async (t, n, r) => {
454
+ return pe(e)(t, n, o);
455
+ }, En = (e) => (t, n, r) => pe(e)(t, n, r), Nn = (e) => async (t, n, r) => {
435
456
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
436
- return le(e)(t, n, o);
437
- }, kn = (e) => async (t, n, r) => le(e)(t, n, r), xn = (e) => (t, n, r) => {
457
+ return he(e)(t, n, o);
458
+ }, In = (e) => async (t, n, r) => he(e)(t, n, r), An = (e) => (t, n, r) => {
438
459
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
439
- return Q(e)(t, n, o);
440
- }, Zn = (e) => (t, n, r) => Q(e)(t, n, r), $n = (e) => async (t, n, r) => {
460
+ return re(e)(t, n, o);
461
+ }, Rn = (e) => (t, n, r) => re(e)(t, n, r), Dn = (e) => async (t, n, r) => {
441
462
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
442
- return X(e)(t, n, o);
443
- }, jn = (e) => async (t, n, r) => X(e)(t, n, r), Pn = /^[cC][^\s-]{8,}$/, En = /^[0-9a-z]+$/, Tn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, An = /^[0-9a-vA-V]{20}$/, On = /^[A-Za-z0-9]{27}$/, In = /^[a-zA-Z0-9_-]{21}$/, Sn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Nn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ge = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Dn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Rn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
444
- function Cn() {
445
- return new RegExp(Rn, "u");
463
+ return oe(e)(t, n, o);
464
+ }, Cn = (e) => async (t, n, r) => oe(e)(t, n, r), Un = /^[cC][^\s-]{8,}$/, Fn = /^[0-9a-z]+$/, Jn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ln = /^[0-9a-vA-V]{20}$/, Mn = /^[A-Za-z0-9]{27}$/, Bn = /^[a-zA-Z0-9_-]{21}$/, Vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, qn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ye = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Wn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
465
+ function Hn() {
466
+ return new RegExp(Kn, "u");
446
467
  }
447
- const Un = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Fn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Ln = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Bn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Mn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Qe = /^[A-Za-z0-9_-]*$/, Wn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Vn = /^\+(?:[0-9]){6,14}[0-9]$/, Xe = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", qn = /* @__PURE__ */ new RegExp(`^${Xe}$`);
448
- function et(e) {
468
+ const Gn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Yn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Qn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Xn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, er = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, rt = /^[A-Za-z0-9_-]*$/, tr = /^\+[1-9]\d{6,14}$/, ot = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", nr = /* @__PURE__ */ new RegExp(`^${ot}$`);
469
+ function st(e) {
449
470
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
450
471
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
451
472
  }
452
- function Hn(e) {
453
- return new RegExp(`^${et(e)}$`);
473
+ function rr(e) {
474
+ return new RegExp(`^${st(e)}$`);
454
475
  }
455
- function Jn(e) {
456
- const t = et({ precision: e.precision }), n = ["Z"];
476
+ function or(e) {
477
+ const t = st({ precision: e.precision }), n = ["Z"];
457
478
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
458
479
  const r = `${t}(?:${n.join("|")})`;
459
- return new RegExp(`^${Xe}T(?:${r})$`);
480
+ return new RegExp(`^${ot}T(?:${r})$`);
460
481
  }
461
- const Kn = (e) => {
482
+ const sr = (e) => {
462
483
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
463
484
  return new RegExp(`^${t}$`);
464
- }, Gn = /^[^A-Z]*$/, Yn = /^[^a-z]*$/, j = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
485
+ }, ir = /^[^A-Z]*$/, ar = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
465
486
  var n;
466
487
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
467
- }), Qn = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
488
+ }), cr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
468
489
  var n;
469
- j.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
490
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
470
491
  const o = r.value;
471
- return !ie(o) && o.length !== void 0;
492
+ return !le(o) && o.length !== void 0;
472
493
  }), e._zod.onattach.push((r) => {
473
494
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
474
495
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -476,9 +497,9 @@ const Kn = (e) => {
476
497
  const o = r.value;
477
498
  if (o.length <= t.maximum)
478
499
  return;
479
- const i = ce(o);
500
+ const s = fe(o);
480
501
  r.issues.push({
481
- origin: i,
502
+ origin: s,
482
503
  code: "too_big",
483
504
  maximum: t.maximum,
484
505
  inclusive: !0,
@@ -487,11 +508,11 @@ const Kn = (e) => {
487
508
  continue: !t.abort
488
509
  });
489
510
  };
490
- }), Xn = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
511
+ }), ur = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
491
512
  var n;
492
- j.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
513
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
493
514
  const o = r.value;
494
- return !ie(o) && o.length !== void 0;
515
+ return !le(o) && o.length !== void 0;
495
516
  }), e._zod.onattach.push((r) => {
496
517
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
497
518
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -499,9 +520,9 @@ const Kn = (e) => {
499
520
  const o = r.value;
500
521
  if (o.length >= t.minimum)
501
522
  return;
502
- const i = ce(o);
523
+ const s = fe(o);
503
524
  r.issues.push({
504
- origin: i,
525
+ origin: s,
505
526
  code: "too_small",
506
527
  minimum: t.minimum,
507
528
  inclusive: !0,
@@ -510,22 +531,22 @@ const Kn = (e) => {
510
531
  continue: !t.abort
511
532
  });
512
533
  };
513
- }), er = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
534
+ }), lr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
514
535
  var n;
515
- j.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
536
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
516
537
  const o = r.value;
517
- return !ie(o) && o.length !== void 0;
538
+ return !le(o) && o.length !== void 0;
518
539
  }), e._zod.onattach.push((r) => {
519
540
  const o = r._zod.bag;
520
541
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
521
542
  }), e._zod.check = (r) => {
522
- const o = r.value, s = o.length;
523
- if (s === t.length)
543
+ const o = r.value, i = o.length;
544
+ if (i === t.length)
524
545
  return;
525
- const i = ce(o), u = s > t.length;
546
+ const s = fe(o), a = i > t.length;
526
547
  r.issues.push({
527
- origin: i,
528
- ...u ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
548
+ origin: s,
549
+ ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
529
550
  inclusive: !0,
530
551
  exact: !0,
531
552
  input: r.value,
@@ -533,11 +554,11 @@ const Kn = (e) => {
533
554
  continue: !t.abort
534
555
  });
535
556
  };
536
- }), ee = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
557
+ }), se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
537
558
  var n, r;
538
- j.init(e, t), e._zod.onattach.push((o) => {
539
- const s = o._zod.bag;
540
- s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
559
+ E.init(e, t), e._zod.onattach.push((o) => {
560
+ const i = o._zod.bag;
561
+ i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
541
562
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
542
563
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
543
564
  origin: "string",
@@ -550,8 +571,8 @@ const Kn = (e) => {
550
571
  });
551
572
  }) : (r = e._zod).check ?? (r.check = () => {
552
573
  });
553
- }), tr = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
554
- ee.init(e, t), e._zod.check = (n) => {
574
+ }), dr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
575
+ se.init(e, t), e._zod.check = (n) => {
555
576
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
556
577
  origin: "string",
557
578
  code: "invalid_format",
@@ -562,16 +583,16 @@ const Kn = (e) => {
562
583
  continue: !t.abort
563
584
  });
564
585
  };
565
- }), nr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
566
- t.pattern ?? (t.pattern = Gn), ee.init(e, t);
567
- }), rr = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
568
- t.pattern ?? (t.pattern = Yn), ee.init(e, t);
569
- }), or = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
570
- j.init(e, t);
571
- const n = Y(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
586
+ }), fr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
587
+ t.pattern ?? (t.pattern = ir), se.init(e, t);
588
+ }), pr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
589
+ t.pattern ?? (t.pattern = ar), se.init(e, t);
590
+ }), hr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
591
+ E.init(e, t);
592
+ const n = ne(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
572
593
  t.pattern = r, e._zod.onattach.push((o) => {
573
- const s = o._zod.bag;
574
- s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
594
+ const i = o._zod.bag;
595
+ i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
575
596
  }), e._zod.check = (o) => {
576
597
  o.value.includes(t.includes, t.position) || o.issues.push({
577
598
  origin: "string",
@@ -583,9 +604,9 @@ const Kn = (e) => {
583
604
  continue: !t.abort
584
605
  });
585
606
  };
586
- }), sr = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
587
- j.init(e, t);
588
- const n = new RegExp(`^${Y(t.prefix)}.*`);
607
+ }), mr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
608
+ E.init(e, t);
609
+ const n = new RegExp(`^${ne(t.prefix)}.*`);
589
610
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
590
611
  const o = r._zod.bag;
591
612
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -600,9 +621,9 @@ const Kn = (e) => {
600
621
  continue: !t.abort
601
622
  });
602
623
  };
603
- }), ir = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
604
- j.init(e, t);
605
- const n = new RegExp(`.*${Y(t.suffix)}$`);
624
+ }), gr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
625
+ E.init(e, t);
626
+ const n = new RegExp(`.*${ne(t.suffix)}$`);
606
627
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
607
628
  const o = r._zod.bag;
608
629
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -617,12 +638,12 @@ const Kn = (e) => {
617
638
  continue: !t.abort
618
639
  });
619
640
  };
620
- }), ar = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
621
- j.init(e, t), e._zod.check = (n) => {
641
+ }), _r = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
642
+ E.init(e, t), e._zod.check = (n) => {
622
643
  n.value = t.tx(n.value);
623
644
  };
624
645
  });
625
- class cr {
646
+ class vr {
626
647
  constructor(t = []) {
627
648
  this.content = [], this.indent = 0, this && (this.args = t);
628
649
  }
@@ -635,96 +656,96 @@ class cr {
635
656
  return;
636
657
  }
637
658
  const r = t.split(`
638
- `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
639
- for (const i of s)
640
- this.content.push(i);
659
+ `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
660
+ for (const s of i)
661
+ this.content.push(s);
641
662
  }
642
663
  compile() {
643
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
664
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
644
665
  return new t(...n, o.join(`
645
666
  `));
646
667
  }
647
668
  }
648
- const ur = {
669
+ const yr = {
649
670
  major: 4,
650
- minor: 1,
651
- patch: 12
652
- }, v = /* @__PURE__ */ c("$ZodType", (e, t) => {
671
+ minor: 3,
672
+ patch: 6
673
+ }, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
653
674
  var n;
654
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = ur;
675
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yr;
655
676
  const r = [...e._zod.def.checks ?? []];
656
677
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
657
678
  for (const o of r)
658
- for (const s of o._zod.onattach)
659
- s(e);
679
+ for (const i of o._zod.onattach)
680
+ i(e);
660
681
  if (r.length === 0)
661
682
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
662
683
  e._zod.run = e._zod.parse;
663
684
  });
664
685
  else {
665
- const o = (i, u, l) => {
666
- let d = N(i), p;
667
- for (const b of u) {
668
- if (b._zod.def.when) {
669
- if (!b._zod.def.when(i))
686
+ const o = (s, a, l) => {
687
+ let d = U(s), f;
688
+ for (const g of a) {
689
+ if (g._zod.def.when) {
690
+ if (!g._zod.def.when(s))
670
691
  continue;
671
692
  } else if (d)
672
693
  continue;
673
- const _ = i.issues.length, w = b._zod.check(i);
674
- if (w instanceof Promise && l?.async === !1)
675
- throw new D();
676
- if (p || w instanceof Promise)
677
- p = (p ?? Promise.resolve()).then(async () => {
678
- await w, i.issues.length !== _ && (d || (d = N(i, _)));
694
+ const h = s.issues.length, m = g._zod.check(s);
695
+ if (m instanceof Promise && l?.async === !1)
696
+ throw new F();
697
+ if (f || m instanceof Promise)
698
+ f = (f ?? Promise.resolve()).then(async () => {
699
+ await m, s.issues.length !== h && (d || (d = U(s, h)));
679
700
  });
680
701
  else {
681
- if (i.issues.length === _)
702
+ if (s.issues.length === h)
682
703
  continue;
683
- d || (d = N(i, _));
704
+ d || (d = U(s, h));
684
705
  }
685
706
  }
686
- return p ? p.then(() => i) : i;
687
- }, s = (i, u, l) => {
688
- if (N(i))
689
- return i.aborted = !0, i;
690
- const d = o(u, r, l);
707
+ return f ? f.then(() => s) : s;
708
+ }, i = (s, a, l) => {
709
+ if (U(s))
710
+ return s.aborted = !0, s;
711
+ const d = o(a, r, l);
691
712
  if (d instanceof Promise) {
692
713
  if (l.async === !1)
693
- throw new D();
694
- return d.then((p) => e._zod.parse(p, l));
714
+ throw new F();
715
+ return d.then((f) => e._zod.parse(f, l));
695
716
  }
696
717
  return e._zod.parse(d, l);
697
718
  };
698
- e._zod.run = (i, u) => {
699
- if (u.skipChecks)
700
- return e._zod.parse(i, u);
701
- if (u.direction === "backward") {
702
- const d = e._zod.parse({ value: i.value, issues: [] }, { ...u, skipChecks: !0 });
703
- return d instanceof Promise ? d.then((p) => s(p, i, u)) : s(d, i, u);
719
+ e._zod.run = (s, a) => {
720
+ if (a.skipChecks)
721
+ return e._zod.parse(s, a);
722
+ if (a.direction === "backward") {
723
+ const d = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
724
+ return d instanceof Promise ? d.then((f) => i(f, s, a)) : i(d, s, a);
704
725
  }
705
- const l = e._zod.parse(i, u);
726
+ const l = e._zod.parse(s, a);
706
727
  if (l instanceof Promise) {
707
- if (u.async === !1)
708
- throw new D();
709
- return l.then((d) => o(d, r, u));
728
+ if (a.async === !1)
729
+ throw new F();
730
+ return l.then((d) => o(d, r, a));
710
731
  }
711
- return o(l, r, u);
732
+ return o(l, r, a);
712
733
  };
713
734
  }
714
- e["~standard"] = {
735
+ _(e, "~standard", () => ({
715
736
  validate: (o) => {
716
737
  try {
717
- const s = vn(e, o);
718
- return s.success ? { value: s.data } : { issues: s.error?.issues };
738
+ const i = Sn(e, o);
739
+ return i.success ? { value: i.data } : { issues: i.error?.issues };
719
740
  } catch {
720
- return wn(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
741
+ return Pn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
721
742
  }
722
743
  },
723
744
  vendor: "zod",
724
745
  version: 1
725
- };
726
- }), de = /* @__PURE__ */ c("$ZodString", (e, t) => {
727
- v.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Kn(e._zod.bag), e._zod.parse = (n, r) => {
746
+ }));
747
+ }), me = /* @__PURE__ */ u("$ZodString", (e, t) => {
748
+ w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
728
749
  if (t.coerce)
729
750
  try {
730
751
  n.value = String(n.value);
@@ -737,11 +758,11 @@ const ur = {
737
758
  inst: e
738
759
  }), n;
739
760
  };
740
- }), m = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
741
- ee.init(e, t), de.init(e, t);
742
- }), lr = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
743
- t.pattern ?? (t.pattern = Nn), m.init(e, t);
744
- }), dr = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
761
+ }), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
762
+ se.init(e, t), me.init(e, t);
763
+ }), wr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
764
+ t.pattern ?? (t.pattern = qn), v.init(e, t);
765
+ }), zr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
745
766
  if (t.version) {
746
767
  const r = {
747
768
  v1: 1,
@@ -755,21 +776,21 @@ const ur = {
755
776
  }[t.version];
756
777
  if (r === void 0)
757
778
  throw new Error(`Invalid UUID version: "${t.version}"`);
758
- t.pattern ?? (t.pattern = ge(r));
779
+ t.pattern ?? (t.pattern = ye(r));
759
780
  } else
760
- t.pattern ?? (t.pattern = ge());
761
- m.init(e, t);
762
- }), fr = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
763
- t.pattern ?? (t.pattern = Dn), m.init(e, t);
764
- }), pr = /* @__PURE__ */ c("$ZodURL", (e, t) => {
765
- m.init(e, t), e._zod.check = (n) => {
781
+ t.pattern ?? (t.pattern = ye());
782
+ v.init(e, t);
783
+ }), br = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
784
+ t.pattern ?? (t.pattern = Wn), v.init(e, t);
785
+ }), kr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
786
+ v.init(e, t), e._zod.check = (n) => {
766
787
  try {
767
788
  const r = n.value.trim(), o = new URL(r);
768
789
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
769
790
  code: "invalid_format",
770
791
  format: "url",
771
792
  note: "Invalid hostname",
772
- pattern: Wn.source,
793
+ pattern: t.hostname.source,
773
794
  input: n.value,
774
795
  inst: e,
775
796
  continue: !t.abort
@@ -793,38 +814,32 @@ const ur = {
793
814
  });
794
815
  }
795
816
  };
796
- }), hr = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
797
- t.pattern ?? (t.pattern = Cn()), m.init(e, t);
798
- }), mr = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
799
- t.pattern ?? (t.pattern = In), m.init(e, t);
800
- }), gr = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
801
- t.pattern ?? (t.pattern = Pn), m.init(e, t);
802
- }), _r = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
803
- t.pattern ?? (t.pattern = En), m.init(e, t);
804
- }), vr = /* @__PURE__ */ c("$ZodULID", (e, t) => {
805
- t.pattern ?? (t.pattern = Tn), m.init(e, t);
806
- }), wr = /* @__PURE__ */ c("$ZodXID", (e, t) => {
807
- t.pattern ?? (t.pattern = An), m.init(e, t);
808
- }), zr = /* @__PURE__ */ c("$ZodKSUID", (e, t) => {
809
- t.pattern ?? (t.pattern = On), m.init(e, t);
810
- }), br = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
811
- t.pattern ?? (t.pattern = Jn(t)), m.init(e, t);
812
- }), yr = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
813
- t.pattern ?? (t.pattern = qn), m.init(e, t);
814
- }), kr = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
815
- t.pattern ?? (t.pattern = Hn(t)), m.init(e, t);
816
- }), xr = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
817
- t.pattern ?? (t.pattern = Sn), m.init(e, t);
818
- }), Zr = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
819
- t.pattern ?? (t.pattern = Un), m.init(e, t), e._zod.onattach.push((n) => {
820
- const r = n._zod.bag;
821
- r.format = "ipv4";
822
- });
823
- }), $r = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
824
- t.pattern ?? (t.pattern = Fn), m.init(e, t), e._zod.onattach.push((n) => {
825
- const r = n._zod.bag;
826
- r.format = "ipv6";
827
- }), e._zod.check = (n) => {
817
+ }), $r = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
818
+ t.pattern ?? (t.pattern = Hn()), v.init(e, t);
819
+ }), jr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
820
+ t.pattern ?? (t.pattern = Bn), v.init(e, t);
821
+ }), xr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
822
+ t.pattern ?? (t.pattern = Un), v.init(e, t);
823
+ }), Zr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
824
+ t.pattern ?? (t.pattern = Fn), v.init(e, t);
825
+ }), Or = /* @__PURE__ */ u("$ZodULID", (e, t) => {
826
+ t.pattern ?? (t.pattern = Jn), v.init(e, t);
827
+ }), Sr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
828
+ t.pattern ?? (t.pattern = Ln), v.init(e, t);
829
+ }), Pr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
830
+ t.pattern ?? (t.pattern = Mn), v.init(e, t);
831
+ }), Tr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
832
+ t.pattern ?? (t.pattern = or(t)), v.init(e, t);
833
+ }), Er = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
834
+ t.pattern ?? (t.pattern = nr), v.init(e, t);
835
+ }), Nr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
836
+ t.pattern ?? (t.pattern = rr(t)), v.init(e, t);
837
+ }), Ir = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
838
+ t.pattern ?? (t.pattern = Vn), v.init(e, t);
839
+ }), Ar = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
840
+ t.pattern ?? (t.pattern = Gn), v.init(e, t), e._zod.bag.format = "ipv4";
841
+ }), Rr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
842
+ t.pattern ?? (t.pattern = Yn), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
828
843
  try {
829
844
  new URL(`http://[${n.value}]`);
830
845
  } catch {
@@ -837,21 +852,21 @@ const ur = {
837
852
  });
838
853
  }
839
854
  };
840
- }), jr = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
841
- t.pattern ?? (t.pattern = Ln), m.init(e, t);
842
- }), Pr = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
843
- t.pattern ?? (t.pattern = Bn), m.init(e, t), e._zod.check = (n) => {
855
+ }), Dr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
856
+ t.pattern ?? (t.pattern = Qn), v.init(e, t);
857
+ }), Cr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
858
+ t.pattern ?? (t.pattern = Xn), v.init(e, t), e._zod.check = (n) => {
844
859
  const r = n.value.split("/");
845
860
  try {
846
861
  if (r.length !== 2)
847
862
  throw new Error();
848
- const [o, s] = r;
849
- if (!s)
863
+ const [o, i] = r;
864
+ if (!i)
850
865
  throw new Error();
851
- const i = Number(s);
852
- if (`${i}` !== s)
866
+ const s = Number(i);
867
+ if (`${s}` !== i)
853
868
  throw new Error();
854
- if (i < 0 || i > 128)
869
+ if (s < 0 || s > 128)
855
870
  throw new Error();
856
871
  new URL(`http://[${o}]`);
857
872
  } catch {
@@ -865,7 +880,7 @@ const ur = {
865
880
  }
866
881
  };
867
882
  });
868
- function tt(e) {
883
+ function it(e) {
869
884
  if (e === "")
870
885
  return !0;
871
886
  if (e.length % 4 !== 0)
@@ -876,11 +891,9 @@ function tt(e) {
876
891
  return !1;
877
892
  }
878
893
  }
879
- const Er = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
880
- t.pattern ?? (t.pattern = Mn), m.init(e, t), e._zod.onattach.push((n) => {
881
- n._zod.bag.contentEncoding = "base64";
882
- }), e._zod.check = (n) => {
883
- tt(n.value) || n.issues.push({
894
+ const Ur = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
895
+ t.pattern ?? (t.pattern = er), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
896
+ it(n.value) || n.issues.push({
884
897
  code: "invalid_format",
885
898
  format: "base64",
886
899
  input: n.value,
@@ -889,17 +902,15 @@ const Er = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
889
902
  });
890
903
  };
891
904
  });
892
- function Tr(e) {
893
- if (!Qe.test(e))
905
+ function Fr(e) {
906
+ if (!rt.test(e))
894
907
  return !1;
895
908
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
896
- return tt(n);
909
+ return it(n);
897
910
  }
898
- const Ar = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
899
- t.pattern ?? (t.pattern = Qe), m.init(e, t), e._zod.onattach.push((n) => {
900
- n._zod.bag.contentEncoding = "base64url";
901
- }), e._zod.check = (n) => {
902
- Tr(n.value) || n.issues.push({
911
+ const Jr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
912
+ t.pattern ?? (t.pattern = rt), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
913
+ Fr(n.value) || n.issues.push({
903
914
  code: "invalid_format",
904
915
  format: "base64url",
905
916
  input: n.value,
@@ -907,10 +918,10 @@ const Ar = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
907
918
  continue: !t.abort
908
919
  });
909
920
  };
910
- }), Or = /* @__PURE__ */ c("$ZodE164", (e, t) => {
911
- t.pattern ?? (t.pattern = Vn), m.init(e, t);
921
+ }), Lr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
922
+ t.pattern ?? (t.pattern = tr), v.init(e, t);
912
923
  });
913
- function Ir(e, t = null) {
924
+ function Mr(e, t = null) {
914
925
  try {
915
926
  const n = e.split(".");
916
927
  if (n.length !== 3)
@@ -924,9 +935,9 @@ function Ir(e, t = null) {
924
935
  return !1;
925
936
  }
926
937
  }
927
- const Sr = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
928
- m.init(e, t), e._zod.check = (n) => {
929
- Ir(n.value, t.alg) || n.issues.push({
938
+ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
939
+ v.init(e, t), e._zod.check = (n) => {
940
+ Mr(n.value, t.alg) || n.issues.push({
930
941
  code: "invalid_format",
931
942
  format: "jwt",
932
943
  input: n.value,
@@ -934,21 +945,21 @@ const Sr = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
934
945
  continue: !t.abort
935
946
  });
936
947
  };
937
- }), Nr = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
938
- v.init(e, t), e._zod.parse = (n) => n;
939
- }), Dr = /* @__PURE__ */ c("$ZodNever", (e, t) => {
940
- v.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
948
+ }), Vr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
949
+ w.init(e, t), e._zod.parse = (n) => n;
950
+ }), qr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
951
+ w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
941
952
  expected: "never",
942
953
  code: "invalid_type",
943
954
  input: n.value,
944
955
  inst: e
945
956
  }), n);
946
957
  });
947
- function _e(e, t, n) {
948
- e.issues.length && t.issues.push(...Je(n, e.issues)), t.value[n] = e.value;
958
+ function we(e, t, n) {
959
+ e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
949
960
  }
950
- const Rr = /* @__PURE__ */ c("$ZodArray", (e, t) => {
951
- v.init(e, t), e._zod.parse = (n, r) => {
961
+ const Wr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
962
+ w.init(e, t), e._zod.parse = (n, r) => {
952
963
  const o = n.value;
953
964
  if (!Array.isArray(o))
954
965
  return n.issues.push({
@@ -958,26 +969,31 @@ const Rr = /* @__PURE__ */ c("$ZodArray", (e, t) => {
958
969
  inst: e
959
970
  }), n;
960
971
  n.value = Array(o.length);
961
- const s = [];
962
- for (let i = 0; i < o.length; i++) {
963
- const u = o[i], l = t.element._zod.run({
964
- value: u,
972
+ const i = [];
973
+ for (let s = 0; s < o.length; s++) {
974
+ const a = o[s], l = t.element._zod.run({
975
+ value: a,
965
976
  issues: []
966
977
  }, r);
967
- l instanceof Promise ? s.push(l.then((d) => _e(d, n, i))) : _e(l, n, i);
978
+ l instanceof Promise ? i.push(l.then((d) => we(d, n, s))) : we(l, n, s);
968
979
  }
969
- return s.length ? Promise.all(s).then(() => n) : n;
980
+ return i.length ? Promise.all(i).then(() => n) : n;
970
981
  };
971
982
  });
972
- function H(e, t, n, r) {
973
- e.issues.length && t.issues.push(...Je(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
983
+ function Q(e, t, n, r, o) {
984
+ if (e.issues.length) {
985
+ if (o && !(n in r))
986
+ return;
987
+ t.issues.push(...Xe(n, e.issues));
988
+ }
989
+ e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
974
990
  }
975
- function nt(e) {
991
+ function at(e) {
976
992
  const t = Object.keys(e.shape);
977
993
  for (const r of t)
978
994
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
979
995
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
980
- const n = cn(e.shape);
996
+ const n = yn(e.shape);
981
997
  return {
982
998
  ...e,
983
999
  keys: t,
@@ -986,186 +1002,203 @@ function nt(e) {
986
1002
  optionalKeys: new Set(n)
987
1003
  };
988
1004
  }
989
- function rt(e, t, n, r, o, s) {
990
- const i = [], u = o.keySet, l = o.catchall._zod, d = l.def.type;
991
- for (const p of Object.keys(t)) {
992
- if (u.has(p))
1005
+ function ct(e, t, n, r, o, i) {
1006
+ const s = [], a = o.keySet, l = o.catchall._zod, d = l.def.type, f = l.optout === "optional";
1007
+ for (const g in t) {
1008
+ if (a.has(g))
993
1009
  continue;
994
1010
  if (d === "never") {
995
- i.push(p);
1011
+ s.push(g);
996
1012
  continue;
997
1013
  }
998
- const b = l.run({ value: t[p], issues: [] }, r);
999
- b instanceof Promise ? e.push(b.then((_) => H(_, n, p, t))) : H(b, n, p, t);
1014
+ const h = l.run({ value: t[g], issues: [] }, r);
1015
+ h instanceof Promise ? e.push(h.then((m) => Q(m, n, g, t, f))) : Q(h, n, g, t, f);
1000
1016
  }
1001
- return i.length && n.issues.push({
1017
+ return s.length && n.issues.push({
1002
1018
  code: "unrecognized_keys",
1003
- keys: i,
1019
+ keys: s,
1004
1020
  input: t,
1005
- inst: s
1021
+ inst: i
1006
1022
  }), e.length ? Promise.all(e).then(() => n) : n;
1007
1023
  }
1008
- const Cr = /* @__PURE__ */ c("$ZodObject", (e, t) => {
1009
- if (v.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1010
- const u = t.shape;
1024
+ const Kr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1025
+ if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1026
+ const a = t.shape;
1011
1027
  Object.defineProperty(t, "shape", {
1012
1028
  get: () => {
1013
- const l = { ...u };
1029
+ const l = { ...a };
1014
1030
  return Object.defineProperty(t, "shape", {
1015
1031
  value: l
1016
1032
  }), l;
1017
1033
  }
1018
1034
  });
1019
1035
  }
1020
- const r = se(() => nt(t));
1021
- h(e._zod, "propValues", () => {
1022
- const u = t.shape, l = {};
1023
- for (const d in u) {
1024
- const p = u[d]._zod;
1025
- if (p.values) {
1036
+ const r = ue(() => at(t));
1037
+ _(e._zod, "propValues", () => {
1038
+ const a = t.shape, l = {};
1039
+ for (const d in a) {
1040
+ const f = a[d]._zod;
1041
+ if (f.values) {
1026
1042
  l[d] ?? (l[d] = /* @__PURE__ */ new Set());
1027
- for (const b of p.values)
1028
- l[d].add(b);
1043
+ for (const g of f.values)
1044
+ l[d].add(g);
1029
1045
  }
1030
1046
  }
1031
1047
  return l;
1032
1048
  });
1033
- const o = q, s = t.catchall;
1034
- let i;
1035
- e._zod.parse = (u, l) => {
1036
- i ?? (i = r.value);
1037
- const d = u.value;
1049
+ const o = Y, i = t.catchall;
1050
+ let s;
1051
+ e._zod.parse = (a, l) => {
1052
+ s ?? (s = r.value);
1053
+ const d = a.value;
1038
1054
  if (!o(d))
1039
- return u.issues.push({
1055
+ return a.issues.push({
1040
1056
  expected: "object",
1041
1057
  code: "invalid_type",
1042
1058
  input: d,
1043
1059
  inst: e
1044
- }), u;
1045
- u.value = {};
1046
- const p = [], b = i.shape;
1047
- for (const _ of i.keys) {
1048
- const y = b[_]._zod.run({ value: d[_], issues: [] }, l);
1049
- y instanceof Promise ? p.push(y.then((te) => H(te, u, _, d))) : H(y, u, _, d);
1060
+ }), a;
1061
+ a.value = {};
1062
+ const f = [], g = s.shape;
1063
+ for (const h of s.keys) {
1064
+ const m = g[h], $ = m._zod.optout === "optional", b = m._zod.run({ value: d[h], issues: [] }, l);
1065
+ b instanceof Promise ? f.push(b.then((W) => Q(W, a, h, d, $))) : Q(b, a, h, d, $);
1050
1066
  }
1051
- return s ? rt(p, d, u, l, r.value, e) : p.length ? Promise.all(p).then(() => u) : u;
1067
+ return i ? ct(f, d, a, l, r.value, e) : f.length ? Promise.all(f).then(() => a) : a;
1052
1068
  };
1053
- }), Ur = /* @__PURE__ */ c("$ZodObjectJIT", (e, t) => {
1054
- Cr.init(e, t);
1055
- const n = e._zod.parse, r = se(() => nt(t)), o = (_) => {
1056
- const w = new cr(["shape", "payload", "ctx"]), y = r.value, te = (P) => {
1057
- const Z = me(P);
1058
- return `shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`;
1069
+ }), Hr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1070
+ Kr.init(e, t);
1071
+ const n = e._zod.parse, r = ue(() => at(t)), o = (h) => {
1072
+ const m = new vr(["shape", "payload", "ctx"]), $ = r.value, b = (P) => {
1073
+ const x = ve(P);
1074
+ return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
1059
1075
  };
1060
- w.write("const input = payload.value;");
1061
- const fe = /* @__PURE__ */ Object.create(null);
1062
- let mt = 0;
1063
- for (const P of y.keys)
1064
- fe[P] = `key_${mt++}`;
1065
- w.write("const newResult = {};");
1066
- for (const P of y.keys) {
1067
- const Z = fe[P], R = me(P);
1068
- w.write(`const ${Z} = ${te(P)};`), w.write(`
1069
- if (${Z}.issues.length) {
1070
- payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
1076
+ m.write("const input = payload.value;");
1077
+ const W = /* @__PURE__ */ Object.create(null);
1078
+ let jt = 0;
1079
+ for (const P of $.keys)
1080
+ W[P] = `key_${jt++}`;
1081
+ m.write("const newResult = {};");
1082
+ for (const P of $.keys) {
1083
+ const x = W[P], O = ve(P), Zt = h[P]?._zod?.optout === "optional";
1084
+ m.write(`const ${x} = ${b(P)};`), Zt ? m.write(`
1085
+ if (${x}.issues.length) {
1086
+ if (${O} in input) {
1087
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1088
+ ...iss,
1089
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
1090
+ })));
1091
+ }
1092
+ }
1093
+
1094
+ if (${x}.value === undefined) {
1095
+ if (${O} in input) {
1096
+ newResult[${O}] = undefined;
1097
+ }
1098
+ } else {
1099
+ newResult[${O}] = ${x}.value;
1100
+ }
1101
+
1102
+ `) : m.write(`
1103
+ if (${x}.issues.length) {
1104
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1071
1105
  ...iss,
1072
- path: iss.path ? [${R}, ...iss.path] : [${R}]
1106
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
1073
1107
  })));
1074
1108
  }
1075
1109
 
1076
-
1077
- if (${Z}.value === undefined) {
1078
- if (${R} in input) {
1079
- newResult[${R}] = undefined;
1110
+ if (${x}.value === undefined) {
1111
+ if (${O} in input) {
1112
+ newResult[${O}] = undefined;
1080
1113
  }
1081
1114
  } else {
1082
- newResult[${R}] = ${Z}.value;
1115
+ newResult[${O}] = ${x}.value;
1083
1116
  }
1084
1117
 
1085
1118
  `);
1086
1119
  }
1087
- w.write("payload.value = newResult;"), w.write("return payload;");
1088
- const gt = w.compile();
1089
- return (P, Z) => gt(_, P, Z);
1120
+ m.write("payload.value = newResult;"), m.write("return payload;");
1121
+ const xt = m.compile();
1122
+ return (P, x) => xt(h, P, x);
1090
1123
  };
1091
- let s;
1092
- const i = q, u = !Ve.jitless, d = u && sn.value, p = t.catchall;
1093
- let b;
1094
- e._zod.parse = (_, w) => {
1095
- b ?? (b = r.value);
1096
- const y = _.value;
1097
- return i(y) ? u && d && w?.async === !1 && w.jitless !== !0 ? (s || (s = o(t.shape)), _ = s(_, w), p ? rt([], y, _, w, b, e) : _) : n(_, w) : (_.issues.push({
1124
+ let i;
1125
+ const s = Y, a = !He.jitless, d = a && _n.value, f = t.catchall;
1126
+ let g;
1127
+ e._zod.parse = (h, m) => {
1128
+ g ?? (g = r.value);
1129
+ const $ = h.value;
1130
+ return s($) ? a && d && m?.async === !1 && m.jitless !== !0 ? (i || (i = o(t.shape)), h = i(h, m), f ? ct([], $, h, m, g, e) : h) : n(h, m) : (h.issues.push({
1098
1131
  expected: "object",
1099
1132
  code: "invalid_type",
1100
- input: y,
1133
+ input: $,
1101
1134
  inst: e
1102
- }), _);
1135
+ }), h);
1103
1136
  };
1104
1137
  });
1105
- function ve(e, t, n, r) {
1106
- for (const s of e)
1107
- if (s.issues.length === 0)
1108
- return t.value = s.value, t;
1109
- const o = e.filter((s) => !N(s));
1138
+ function ze(e, t, n, r) {
1139
+ for (const i of e)
1140
+ if (i.issues.length === 0)
1141
+ return t.value = i.value, t;
1142
+ const o = e.filter((i) => !U(i));
1110
1143
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1111
1144
  code: "invalid_union",
1112
1145
  input: t.value,
1113
1146
  inst: n,
1114
- errors: e.map((s) => s.issues.map((i) => O(i, r, A())))
1147
+ errors: e.map((i) => i.issues.map((s) => D(s, r, R())))
1115
1148
  }), t);
1116
1149
  }
1117
- const Fr = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1118
- v.init(e, t), h(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), h(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), h(e._zod, "values", () => {
1150
+ const Gr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1151
+ w.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
1119
1152
  if (t.options.every((o) => o._zod.values))
1120
1153
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1121
- }), h(e._zod, "pattern", () => {
1154
+ }), _(e._zod, "pattern", () => {
1122
1155
  if (t.options.every((o) => o._zod.pattern)) {
1123
- const o = t.options.map((s) => s._zod.pattern);
1124
- return new RegExp(`^(${o.map((s) => ae(s.source)).join("|")})$`);
1156
+ const o = t.options.map((i) => i._zod.pattern);
1157
+ return new RegExp(`^(${o.map((i) => de(i.source)).join("|")})$`);
1125
1158
  }
1126
1159
  });
1127
1160
  const n = t.options.length === 1, r = t.options[0]._zod.run;
1128
- e._zod.parse = (o, s) => {
1161
+ e._zod.parse = (o, i) => {
1129
1162
  if (n)
1130
- return r(o, s);
1131
- let i = !1;
1132
- const u = [];
1163
+ return r(o, i);
1164
+ let s = !1;
1165
+ const a = [];
1133
1166
  for (const l of t.options) {
1134
1167
  const d = l._zod.run({
1135
1168
  value: o.value,
1136
1169
  issues: []
1137
- }, s);
1170
+ }, i);
1138
1171
  if (d instanceof Promise)
1139
- u.push(d), i = !0;
1172
+ a.push(d), s = !0;
1140
1173
  else {
1141
1174
  if (d.issues.length === 0)
1142
1175
  return d;
1143
- u.push(d);
1176
+ a.push(d);
1144
1177
  }
1145
1178
  }
1146
- return i ? Promise.all(u).then((l) => ve(l, o, e, s)) : ve(u, o, e, s);
1179
+ return s ? Promise.all(a).then((l) => ze(l, o, e, i)) : ze(a, o, e, i);
1147
1180
  };
1148
- }), Lr = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1149
- v.init(e, t), e._zod.parse = (n, r) => {
1150
- const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1151
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, d]) => we(n, l, d)) : we(n, s, i);
1181
+ }), Yr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1182
+ w.init(e, t), e._zod.parse = (n, r) => {
1183
+ const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1184
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([l, d]) => be(n, l, d)) : be(n, i, s);
1152
1185
  };
1153
1186
  });
1154
- function re(e, t) {
1187
+ function ae(e, t) {
1155
1188
  if (e === t)
1156
1189
  return { valid: !0, data: e };
1157
1190
  if (e instanceof Date && t instanceof Date && +e == +t)
1158
1191
  return { valid: !0, data: e };
1159
- if (C(e) && C(t)) {
1160
- const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1161
- for (const s of r) {
1162
- const i = re(e[s], t[s]);
1163
- if (!i.valid)
1192
+ if (M(e) && M(t)) {
1193
+ const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1194
+ for (const i of r) {
1195
+ const s = ae(e[i], t[i]);
1196
+ if (!s.valid)
1164
1197
  return {
1165
1198
  valid: !1,
1166
- mergeErrorPath: [s, ...i.mergeErrorPath]
1199
+ mergeErrorPath: [i, ...s.mergeErrorPath]
1167
1200
  };
1168
- o[s] = i.data;
1201
+ o[i] = s.data;
1169
1202
  }
1170
1203
  return { valid: !0, data: o };
1171
1204
  }
@@ -1174,94 +1207,112 @@ function re(e, t) {
1174
1207
  return { valid: !1, mergeErrorPath: [] };
1175
1208
  const n = [];
1176
1209
  for (let r = 0; r < e.length; r++) {
1177
- const o = e[r], s = t[r], i = re(o, s);
1178
- if (!i.valid)
1210
+ const o = e[r], i = t[r], s = ae(o, i);
1211
+ if (!s.valid)
1179
1212
  return {
1180
1213
  valid: !1,
1181
- mergeErrorPath: [r, ...i.mergeErrorPath]
1214
+ mergeErrorPath: [r, ...s.mergeErrorPath]
1182
1215
  };
1183
- n.push(i.data);
1216
+ n.push(s.data);
1184
1217
  }
1185
1218
  return { valid: !0, data: n };
1186
1219
  }
1187
1220
  return { valid: !1, mergeErrorPath: [] };
1188
1221
  }
1189
- function we(e, t, n) {
1190
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), N(e))
1222
+ function be(e, t, n) {
1223
+ const r = /* @__PURE__ */ new Map();
1224
+ let o;
1225
+ for (const a of t.issues)
1226
+ if (a.code === "unrecognized_keys") {
1227
+ o ?? (o = a);
1228
+ for (const l of a.keys)
1229
+ r.has(l) || r.set(l, {}), r.get(l).l = !0;
1230
+ } else
1231
+ e.issues.push(a);
1232
+ for (const a of n.issues)
1233
+ if (a.code === "unrecognized_keys")
1234
+ for (const l of a.keys)
1235
+ r.has(l) || r.set(l, {}), r.get(l).r = !0;
1236
+ else
1237
+ e.issues.push(a);
1238
+ const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1239
+ if (i.length && o && e.issues.push({ ...o, keys: i }), U(e))
1191
1240
  return e;
1192
- const r = re(t.value, n.value);
1193
- if (!r.valid)
1194
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1195
- return e.value = r.data, e;
1196
- }
1197
- const Br = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1198
- v.init(e, t);
1199
- const n = on(t.entries), r = new Set(n);
1200
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => an.has(typeof o)).map((o) => typeof o == "string" ? Y(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1201
- const i = o.value;
1202
- return r.has(i) || o.issues.push({
1241
+ const s = ae(t.value, n.value);
1242
+ if (!s.valid)
1243
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1244
+ return e.value = s.data, e;
1245
+ }
1246
+ const Qr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1247
+ w.init(e, t);
1248
+ const n = Ge(t.entries), r = new Set(n);
1249
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => vn.has(typeof o)).map((o) => typeof o == "string" ? ne(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1250
+ const s = o.value;
1251
+ return r.has(s) || o.issues.push({
1203
1252
  code: "invalid_value",
1204
1253
  values: n,
1205
- input: i,
1254
+ input: s,
1206
1255
  inst: e
1207
1256
  }), o;
1208
1257
  };
1209
- }), Mr = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
1210
- v.init(e, t), e._zod.parse = (n, r) => {
1258
+ }), Xr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1259
+ w.init(e, t), e._zod.parse = (n, r) => {
1211
1260
  if (r.direction === "backward")
1212
- throw new We(e.constructor.name);
1261
+ throw new Ke(e.constructor.name);
1213
1262
  const o = t.transform(n.value, n);
1214
1263
  if (r.async)
1215
- return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
1264
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1216
1265
  if (o instanceof Promise)
1217
- throw new D();
1266
+ throw new F();
1218
1267
  return n.value = o, n;
1219
1268
  };
1220
1269
  });
1221
- function ze(e, t) {
1270
+ function ke(e, t) {
1222
1271
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1223
1272
  }
1224
- const Wr = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
1225
- v.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", h(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), h(e._zod, "pattern", () => {
1273
+ const ut = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1274
+ w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
1226
1275
  const n = t.innerType._zod.pattern;
1227
- return n ? new RegExp(`^(${ae(n.source)})?$`) : void 0;
1276
+ return n ? new RegExp(`^(${de(n.source)})?$`) : void 0;
1228
1277
  }), e._zod.parse = (n, r) => {
1229
1278
  if (t.innerType._zod.optin === "optional") {
1230
1279
  const o = t.innerType._zod.run(n, r);
1231
- return o instanceof Promise ? o.then((s) => ze(s, n.value)) : ze(o, n.value);
1280
+ return o instanceof Promise ? o.then((i) => ke(i, n.value)) : ke(o, n.value);
1232
1281
  }
1233
1282
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1234
1283
  };
1235
- }), Vr = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
1236
- v.init(e, t), h(e._zod, "optin", () => t.innerType._zod.optin), h(e._zod, "optout", () => t.innerType._zod.optout), h(e._zod, "pattern", () => {
1284
+ }), eo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1285
+ ut.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1286
+ }), to = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1287
+ w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
1237
1288
  const n = t.innerType._zod.pattern;
1238
- return n ? new RegExp(`^(${ae(n.source)}|null)$`) : void 0;
1239
- }), h(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1240
- }), qr = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
1241
- v.init(e, t), e._zod.optin = "optional", h(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1289
+ return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
1290
+ }), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1291
+ }), no = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1292
+ w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1242
1293
  if (r.direction === "backward")
1243
1294
  return t.innerType._zod.run(n, r);
1244
1295
  if (n.value === void 0)
1245
1296
  return n.value = t.defaultValue, n;
1246
1297
  const o = t.innerType._zod.run(n, r);
1247
- return o instanceof Promise ? o.then((s) => be(s, t)) : be(o, t);
1298
+ return o instanceof Promise ? o.then((i) => $e(i, t)) : $e(o, t);
1248
1299
  };
1249
1300
  });
1250
- function be(e, t) {
1301
+ function $e(e, t) {
1251
1302
  return e.value === void 0 && (e.value = t.defaultValue), e;
1252
1303
  }
1253
- const Hr = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
1254
- v.init(e, t), e._zod.optin = "optional", h(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1255
- }), Jr = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
1256
- v.init(e, t), h(e._zod, "values", () => {
1304
+ const ro = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1305
+ w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1306
+ }), oo = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1307
+ w.init(e, t), _(e._zod, "values", () => {
1257
1308
  const n = t.innerType._zod.values;
1258
1309
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1259
1310
  }), e._zod.parse = (n, r) => {
1260
1311
  const o = t.innerType._zod.run(n, r);
1261
- return o instanceof Promise ? o.then((s) => ye(s, e)) : ye(o, e);
1312
+ return o instanceof Promise ? o.then((i) => je(i, e)) : je(o, e);
1262
1313
  };
1263
1314
  });
1264
- function ye(e, t) {
1315
+ function je(e, t) {
1265
1316
  return !e.issues.length && e.value === void 0 && e.issues.push({
1266
1317
  code: "invalid_type",
1267
1318
  expected: "nonoptional",
@@ -1269,58 +1320,58 @@ function ye(e, t) {
1269
1320
  inst: t
1270
1321
  }), e;
1271
1322
  }
1272
- const Kr = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1273
- v.init(e, t), h(e._zod, "optin", () => t.innerType._zod.optin), h(e._zod, "optout", () => t.innerType._zod.optout), h(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1323
+ const so = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1324
+ w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1274
1325
  if (r.direction === "backward")
1275
1326
  return t.innerType._zod.run(n, r);
1276
1327
  const o = t.innerType._zod.run(n, r);
1277
- return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1328
+ return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1278
1329
  ...n,
1279
1330
  error: {
1280
- issues: s.issues.map((i) => O(i, r, A()))
1331
+ issues: i.issues.map((s) => D(s, r, R()))
1281
1332
  },
1282
1333
  input: n.value
1283
1334
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1284
1335
  ...n,
1285
1336
  error: {
1286
- issues: o.issues.map((s) => O(s, r, A()))
1337
+ issues: o.issues.map((i) => D(i, r, R()))
1287
1338
  },
1288
1339
  input: n.value
1289
1340
  }), n.issues = []), n);
1290
1341
  };
1291
- }), Gr = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1292
- v.init(e, t), h(e._zod, "values", () => t.in._zod.values), h(e._zod, "optin", () => t.in._zod.optin), h(e._zod, "optout", () => t.out._zod.optout), h(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1342
+ }), io = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1343
+ w.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1293
1344
  if (r.direction === "backward") {
1294
- const s = t.out._zod.run(n, r);
1295
- return s instanceof Promise ? s.then((i) => M(i, t.in, r)) : M(s, t.in, r);
1345
+ const i = t.out._zod.run(n, r);
1346
+ return i instanceof Promise ? i.then((s) => H(s, t.in, r)) : H(i, t.in, r);
1296
1347
  }
1297
1348
  const o = t.in._zod.run(n, r);
1298
- return o instanceof Promise ? o.then((s) => M(s, t.out, r)) : M(o, t.out, r);
1349
+ return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
1299
1350
  };
1300
1351
  });
1301
- function M(e, t, n) {
1352
+ function H(e, t, n) {
1302
1353
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1303
1354
  }
1304
- const Yr = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1305
- v.init(e, t), h(e._zod, "propValues", () => t.innerType._zod.propValues), h(e._zod, "values", () => t.innerType._zod.values), h(e._zod, "optin", () => t.innerType._zod.optin), h(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1355
+ const ao = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1356
+ w.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1306
1357
  if (r.direction === "backward")
1307
1358
  return t.innerType._zod.run(n, r);
1308
1359
  const o = t.innerType._zod.run(n, r);
1309
- return o instanceof Promise ? o.then(ke) : ke(o);
1360
+ return o instanceof Promise ? o.then(xe) : xe(o);
1310
1361
  };
1311
1362
  });
1312
- function ke(e) {
1363
+ function xe(e) {
1313
1364
  return e.value = Object.freeze(e.value), e;
1314
1365
  }
1315
- const Qr = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
1316
- j.init(e, t), v.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1366
+ const co = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1367
+ E.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1317
1368
  const r = n.value, o = t.fn(r);
1318
1369
  if (o instanceof Promise)
1319
- return o.then((s) => xe(s, n, r, e));
1320
- xe(o, n, r, e);
1370
+ return o.then((i) => Ze(i, n, r, e));
1371
+ Ze(o, n, r, e);
1321
1372
  };
1322
1373
  });
1323
- function xe(e, t, n, r) {
1374
+ function Ze(e, t, n, r) {
1324
1375
  if (!e) {
1325
1376
  const o = {
1326
1377
  code: "custom",
@@ -1332,21 +1383,17 @@ function xe(e, t, n, r) {
1332
1383
  continue: !r._zod.def.abort
1333
1384
  // params: inst._zod.def.params,
1334
1385
  };
1335
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(U(o));
1386
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(B(o));
1336
1387
  }
1337
1388
  }
1338
- class Xr {
1389
+ var Oe;
1390
+ class uo {
1339
1391
  constructor() {
1340
1392
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1341
1393
  }
1342
1394
  add(t, ...n) {
1343
1395
  const r = n[0];
1344
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
1345
- if (this._idmap.has(r.id))
1346
- throw new Error(`ID ${r.id} already exists in the registry`);
1347
- this._idmap.set(r.id, t);
1348
- }
1349
- return this;
1396
+ return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
1350
1397
  }
1351
1398
  clear() {
1352
1399
  return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
@@ -1369,218 +1416,243 @@ class Xr {
1369
1416
  return this._map.has(t);
1370
1417
  }
1371
1418
  }
1372
- function eo() {
1373
- return new Xr();
1419
+ function lo() {
1420
+ return new uo();
1374
1421
  }
1375
- const W = /* @__PURE__ */ eo();
1376
- function to(e, t) {
1422
+ (Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = lo());
1423
+ const L = globalThis.__zod_globalRegistry;
1424
+ // @__NO_SIDE_EFFECTS__
1425
+ function fo(e, t) {
1377
1426
  return new e({
1378
1427
  type: "string",
1379
- ...f(t)
1428
+ ...p(t)
1380
1429
  });
1381
1430
  }
1382
- function no(e, t) {
1431
+ // @__NO_SIDE_EFFECTS__
1432
+ function po(e, t) {
1383
1433
  return new e({
1384
1434
  type: "string",
1385
1435
  format: "email",
1386
1436
  check: "string_format",
1387
1437
  abort: !1,
1388
- ...f(t)
1438
+ ...p(t)
1389
1439
  });
1390
1440
  }
1391
- function Ze(e, t) {
1441
+ // @__NO_SIDE_EFFECTS__
1442
+ function Se(e, t) {
1392
1443
  return new e({
1393
1444
  type: "string",
1394
1445
  format: "guid",
1395
1446
  check: "string_format",
1396
1447
  abort: !1,
1397
- ...f(t)
1448
+ ...p(t)
1398
1449
  });
1399
1450
  }
1400
- function ro(e, t) {
1451
+ // @__NO_SIDE_EFFECTS__
1452
+ function ho(e, t) {
1401
1453
  return new e({
1402
1454
  type: "string",
1403
1455
  format: "uuid",
1404
1456
  check: "string_format",
1405
1457
  abort: !1,
1406
- ...f(t)
1458
+ ...p(t)
1407
1459
  });
1408
1460
  }
1409
- function oo(e, t) {
1461
+ // @__NO_SIDE_EFFECTS__
1462
+ function mo(e, t) {
1410
1463
  return new e({
1411
1464
  type: "string",
1412
1465
  format: "uuid",
1413
1466
  check: "string_format",
1414
1467
  abort: !1,
1415
1468
  version: "v4",
1416
- ...f(t)
1469
+ ...p(t)
1417
1470
  });
1418
1471
  }
1419
- function so(e, t) {
1472
+ // @__NO_SIDE_EFFECTS__
1473
+ function go(e, t) {
1420
1474
  return new e({
1421
1475
  type: "string",
1422
1476
  format: "uuid",
1423
1477
  check: "string_format",
1424
1478
  abort: !1,
1425
1479
  version: "v6",
1426
- ...f(t)
1480
+ ...p(t)
1427
1481
  });
1428
1482
  }
1429
- function io(e, t) {
1483
+ // @__NO_SIDE_EFFECTS__
1484
+ function _o(e, t) {
1430
1485
  return new e({
1431
1486
  type: "string",
1432
1487
  format: "uuid",
1433
1488
  check: "string_format",
1434
1489
  abort: !1,
1435
1490
  version: "v7",
1436
- ...f(t)
1491
+ ...p(t)
1437
1492
  });
1438
1493
  }
1439
- function ao(e, t) {
1494
+ // @__NO_SIDE_EFFECTS__
1495
+ function vo(e, t) {
1440
1496
  return new e({
1441
1497
  type: "string",
1442
1498
  format: "url",
1443
1499
  check: "string_format",
1444
1500
  abort: !1,
1445
- ...f(t)
1501
+ ...p(t)
1446
1502
  });
1447
1503
  }
1448
- function co(e, t) {
1504
+ // @__NO_SIDE_EFFECTS__
1505
+ function yo(e, t) {
1449
1506
  return new e({
1450
1507
  type: "string",
1451
1508
  format: "emoji",
1452
1509
  check: "string_format",
1453
1510
  abort: !1,
1454
- ...f(t)
1511
+ ...p(t)
1455
1512
  });
1456
1513
  }
1457
- function uo(e, t) {
1514
+ // @__NO_SIDE_EFFECTS__
1515
+ function wo(e, t) {
1458
1516
  return new e({
1459
1517
  type: "string",
1460
1518
  format: "nanoid",
1461
1519
  check: "string_format",
1462
1520
  abort: !1,
1463
- ...f(t)
1521
+ ...p(t)
1464
1522
  });
1465
1523
  }
1466
- function lo(e, t) {
1524
+ // @__NO_SIDE_EFFECTS__
1525
+ function zo(e, t) {
1467
1526
  return new e({
1468
1527
  type: "string",
1469
1528
  format: "cuid",
1470
1529
  check: "string_format",
1471
1530
  abort: !1,
1472
- ...f(t)
1531
+ ...p(t)
1473
1532
  });
1474
1533
  }
1475
- function fo(e, t) {
1534
+ // @__NO_SIDE_EFFECTS__
1535
+ function bo(e, t) {
1476
1536
  return new e({
1477
1537
  type: "string",
1478
1538
  format: "cuid2",
1479
1539
  check: "string_format",
1480
1540
  abort: !1,
1481
- ...f(t)
1541
+ ...p(t)
1482
1542
  });
1483
1543
  }
1484
- function po(e, t) {
1544
+ // @__NO_SIDE_EFFECTS__
1545
+ function ko(e, t) {
1485
1546
  return new e({
1486
1547
  type: "string",
1487
1548
  format: "ulid",
1488
1549
  check: "string_format",
1489
1550
  abort: !1,
1490
- ...f(t)
1551
+ ...p(t)
1491
1552
  });
1492
1553
  }
1493
- function ho(e, t) {
1554
+ // @__NO_SIDE_EFFECTS__
1555
+ function $o(e, t) {
1494
1556
  return new e({
1495
1557
  type: "string",
1496
1558
  format: "xid",
1497
1559
  check: "string_format",
1498
1560
  abort: !1,
1499
- ...f(t)
1561
+ ...p(t)
1500
1562
  });
1501
1563
  }
1502
- function mo(e, t) {
1564
+ // @__NO_SIDE_EFFECTS__
1565
+ function jo(e, t) {
1503
1566
  return new e({
1504
1567
  type: "string",
1505
1568
  format: "ksuid",
1506
1569
  check: "string_format",
1507
1570
  abort: !1,
1508
- ...f(t)
1571
+ ...p(t)
1509
1572
  });
1510
1573
  }
1511
- function go(e, t) {
1574
+ // @__NO_SIDE_EFFECTS__
1575
+ function xo(e, t) {
1512
1576
  return new e({
1513
1577
  type: "string",
1514
1578
  format: "ipv4",
1515
1579
  check: "string_format",
1516
1580
  abort: !1,
1517
- ...f(t)
1581
+ ...p(t)
1518
1582
  });
1519
1583
  }
1520
- function _o(e, t) {
1584
+ // @__NO_SIDE_EFFECTS__
1585
+ function Zo(e, t) {
1521
1586
  return new e({
1522
1587
  type: "string",
1523
1588
  format: "ipv6",
1524
1589
  check: "string_format",
1525
1590
  abort: !1,
1526
- ...f(t)
1591
+ ...p(t)
1527
1592
  });
1528
1593
  }
1529
- function vo(e, t) {
1594
+ // @__NO_SIDE_EFFECTS__
1595
+ function Oo(e, t) {
1530
1596
  return new e({
1531
1597
  type: "string",
1532
1598
  format: "cidrv4",
1533
1599
  check: "string_format",
1534
1600
  abort: !1,
1535
- ...f(t)
1601
+ ...p(t)
1536
1602
  });
1537
1603
  }
1538
- function wo(e, t) {
1604
+ // @__NO_SIDE_EFFECTS__
1605
+ function So(e, t) {
1539
1606
  return new e({
1540
1607
  type: "string",
1541
1608
  format: "cidrv6",
1542
1609
  check: "string_format",
1543
1610
  abort: !1,
1544
- ...f(t)
1611
+ ...p(t)
1545
1612
  });
1546
1613
  }
1547
- function zo(e, t) {
1614
+ // @__NO_SIDE_EFFECTS__
1615
+ function Po(e, t) {
1548
1616
  return new e({
1549
1617
  type: "string",
1550
1618
  format: "base64",
1551
1619
  check: "string_format",
1552
1620
  abort: !1,
1553
- ...f(t)
1621
+ ...p(t)
1554
1622
  });
1555
1623
  }
1556
- function bo(e, t) {
1624
+ // @__NO_SIDE_EFFECTS__
1625
+ function To(e, t) {
1557
1626
  return new e({
1558
1627
  type: "string",
1559
1628
  format: "base64url",
1560
1629
  check: "string_format",
1561
1630
  abort: !1,
1562
- ...f(t)
1631
+ ...p(t)
1563
1632
  });
1564
1633
  }
1565
- function yo(e, t) {
1634
+ // @__NO_SIDE_EFFECTS__
1635
+ function Eo(e, t) {
1566
1636
  return new e({
1567
1637
  type: "string",
1568
1638
  format: "e164",
1569
1639
  check: "string_format",
1570
1640
  abort: !1,
1571
- ...f(t)
1641
+ ...p(t)
1572
1642
  });
1573
1643
  }
1574
- function ko(e, t) {
1644
+ // @__NO_SIDE_EFFECTS__
1645
+ function No(e, t) {
1575
1646
  return new e({
1576
1647
  type: "string",
1577
1648
  format: "jwt",
1578
1649
  check: "string_format",
1579
1650
  abort: !1,
1580
- ...f(t)
1651
+ ...p(t)
1581
1652
  });
1582
1653
  }
1583
- function xo(e, t) {
1654
+ // @__NO_SIDE_EFFECTS__
1655
+ function Io(e, t) {
1584
1656
  return new e({
1585
1657
  type: "string",
1586
1658
  format: "datetime",
@@ -1588,209 +1660,584 @@ function xo(e, t) {
1588
1660
  offset: !1,
1589
1661
  local: !1,
1590
1662
  precision: null,
1591
- ...f(t)
1663
+ ...p(t)
1592
1664
  });
1593
1665
  }
1594
- function Zo(e, t) {
1666
+ // @__NO_SIDE_EFFECTS__
1667
+ function Ao(e, t) {
1595
1668
  return new e({
1596
1669
  type: "string",
1597
1670
  format: "date",
1598
1671
  check: "string_format",
1599
- ...f(t)
1672
+ ...p(t)
1600
1673
  });
1601
1674
  }
1602
- function $o(e, t) {
1675
+ // @__NO_SIDE_EFFECTS__
1676
+ function Ro(e, t) {
1603
1677
  return new e({
1604
1678
  type: "string",
1605
1679
  format: "time",
1606
1680
  check: "string_format",
1607
1681
  precision: null,
1608
- ...f(t)
1682
+ ...p(t)
1609
1683
  });
1610
1684
  }
1611
- function jo(e, t) {
1685
+ // @__NO_SIDE_EFFECTS__
1686
+ function Do(e, t) {
1612
1687
  return new e({
1613
1688
  type: "string",
1614
1689
  format: "duration",
1615
1690
  check: "string_format",
1616
- ...f(t)
1691
+ ...p(t)
1617
1692
  });
1618
1693
  }
1619
- function Po(e) {
1694
+ // @__NO_SIDE_EFFECTS__
1695
+ function Co(e) {
1620
1696
  return new e({
1621
1697
  type: "unknown"
1622
1698
  });
1623
1699
  }
1624
- function Eo(e, t) {
1700
+ // @__NO_SIDE_EFFECTS__
1701
+ function Uo(e, t) {
1625
1702
  return new e({
1626
1703
  type: "never",
1627
- ...f(t)
1704
+ ...p(t)
1628
1705
  });
1629
1706
  }
1630
- function ot(e, t) {
1631
- return new Qn({
1707
+ // @__NO_SIDE_EFFECTS__
1708
+ function lt(e, t) {
1709
+ return new cr({
1632
1710
  check: "max_length",
1633
- ...f(t),
1711
+ ...p(t),
1634
1712
  maximum: e
1635
1713
  });
1636
1714
  }
1637
- function J(e, t) {
1638
- return new Xn({
1715
+ // @__NO_SIDE_EFFECTS__
1716
+ function X(e, t) {
1717
+ return new ur({
1639
1718
  check: "min_length",
1640
- ...f(t),
1719
+ ...p(t),
1641
1720
  minimum: e
1642
1721
  });
1643
1722
  }
1644
- function st(e, t) {
1645
- return new er({
1723
+ // @__NO_SIDE_EFFECTS__
1724
+ function dt(e, t) {
1725
+ return new lr({
1646
1726
  check: "length_equals",
1647
- ...f(t),
1727
+ ...p(t),
1648
1728
  length: e
1649
1729
  });
1650
1730
  }
1651
- function To(e, t) {
1652
- return new tr({
1731
+ // @__NO_SIDE_EFFECTS__
1732
+ function Fo(e, t) {
1733
+ return new dr({
1653
1734
  check: "string_format",
1654
1735
  format: "regex",
1655
- ...f(t),
1736
+ ...p(t),
1656
1737
  pattern: e
1657
1738
  });
1658
1739
  }
1659
- function Ao(e) {
1660
- return new nr({
1740
+ // @__NO_SIDE_EFFECTS__
1741
+ function Jo(e) {
1742
+ return new fr({
1661
1743
  check: "string_format",
1662
1744
  format: "lowercase",
1663
- ...f(e)
1745
+ ...p(e)
1664
1746
  });
1665
1747
  }
1666
- function Oo(e) {
1667
- return new rr({
1748
+ // @__NO_SIDE_EFFECTS__
1749
+ function Lo(e) {
1750
+ return new pr({
1668
1751
  check: "string_format",
1669
1752
  format: "uppercase",
1670
- ...f(e)
1753
+ ...p(e)
1671
1754
  });
1672
1755
  }
1673
- function Io(e, t) {
1674
- return new or({
1756
+ // @__NO_SIDE_EFFECTS__
1757
+ function Mo(e, t) {
1758
+ return new hr({
1675
1759
  check: "string_format",
1676
1760
  format: "includes",
1677
- ...f(t),
1761
+ ...p(t),
1678
1762
  includes: e
1679
1763
  });
1680
1764
  }
1681
- function So(e, t) {
1682
- return new sr({
1765
+ // @__NO_SIDE_EFFECTS__
1766
+ function Bo(e, t) {
1767
+ return new mr({
1683
1768
  check: "string_format",
1684
1769
  format: "starts_with",
1685
- ...f(t),
1770
+ ...p(t),
1686
1771
  prefix: e
1687
1772
  });
1688
1773
  }
1689
- function No(e, t) {
1690
- return new ir({
1774
+ // @__NO_SIDE_EFFECTS__
1775
+ function Vo(e, t) {
1776
+ return new gr({
1691
1777
  check: "string_format",
1692
1778
  format: "ends_with",
1693
- ...f(t),
1779
+ ...p(t),
1694
1780
  suffix: e
1695
1781
  });
1696
1782
  }
1697
- function L(e) {
1698
- return new ar({
1783
+ // @__NO_SIDE_EFFECTS__
1784
+ function J(e) {
1785
+ return new _r({
1699
1786
  check: "overwrite",
1700
1787
  tx: e
1701
1788
  });
1702
1789
  }
1703
- function Do(e) {
1704
- return L((t) => t.normalize(e));
1790
+ // @__NO_SIDE_EFFECTS__
1791
+ function qo(e) {
1792
+ return /* @__PURE__ */ J((t) => t.normalize(e));
1793
+ }
1794
+ // @__NO_SIDE_EFFECTS__
1795
+ function Wo() {
1796
+ return /* @__PURE__ */ J((e) => e.trim());
1705
1797
  }
1706
- function Ro() {
1707
- return L((e) => e.trim());
1798
+ // @__NO_SIDE_EFFECTS__
1799
+ function Ko() {
1800
+ return /* @__PURE__ */ J((e) => e.toLowerCase());
1708
1801
  }
1709
- function Co() {
1710
- return L((e) => e.toLowerCase());
1802
+ // @__NO_SIDE_EFFECTS__
1803
+ function Ho() {
1804
+ return /* @__PURE__ */ J((e) => e.toUpperCase());
1711
1805
  }
1712
- function Uo() {
1713
- return L((e) => e.toUpperCase());
1806
+ // @__NO_SIDE_EFFECTS__
1807
+ function Go() {
1808
+ return /* @__PURE__ */ J((e) => gn(e));
1714
1809
  }
1715
- function Fo(e, t, n) {
1810
+ // @__NO_SIDE_EFFECTS__
1811
+ function Yo(e, t, n) {
1716
1812
  return new e({
1717
1813
  type: "array",
1718
1814
  element: t,
1719
1815
  // get element() {
1720
1816
  // return element;
1721
1817
  // },
1722
- ...f(n)
1818
+ ...p(n)
1723
1819
  });
1724
1820
  }
1725
- function Lo(e, t, n) {
1821
+ // @__NO_SIDE_EFFECTS__
1822
+ function Qo(e, t, n) {
1726
1823
  return new e({
1727
1824
  type: "custom",
1728
1825
  check: "custom",
1729
1826
  fn: t,
1730
- ...f(n)
1827
+ ...p(n)
1731
1828
  });
1732
1829
  }
1733
- function Bo(e) {
1734
- const t = Mo((n) => (n.addIssue = (r) => {
1830
+ // @__NO_SIDE_EFFECTS__
1831
+ function Xo(e) {
1832
+ const t = /* @__PURE__ */ es((n) => (n.addIssue = (r) => {
1735
1833
  if (typeof r == "string")
1736
- n.issues.push(U(r, n.value, t._zod.def));
1834
+ n.issues.push(B(r, n.value, t._zod.def));
1737
1835
  else {
1738
1836
  const o = r;
1739
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(U(o));
1837
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(B(o));
1740
1838
  }
1741
1839
  }, e(n.value, n)));
1742
1840
  return t;
1743
1841
  }
1744
- function Mo(e, t) {
1745
- const n = new j({
1842
+ // @__NO_SIDE_EFFECTS__
1843
+ function es(e, t) {
1844
+ const n = new E({
1746
1845
  check: "custom",
1747
- ...f(t)
1846
+ ...p(t)
1748
1847
  });
1749
1848
  return n._zod.check = e, n;
1750
1849
  }
1751
- const Wo = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
1752
- br.init(e, t), g.init(e, t);
1850
+ function ft(e) {
1851
+ let t = e?.target ?? "draft-2020-12";
1852
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
1853
+ processors: e.processors ?? {},
1854
+ metadataRegistry: e?.metadata ?? L,
1855
+ target: t,
1856
+ unrepresentable: e?.unrepresentable ?? "throw",
1857
+ override: e?.override ?? (() => {
1858
+ }),
1859
+ io: e?.io ?? "output",
1860
+ counter: 0,
1861
+ seen: /* @__PURE__ */ new Map(),
1862
+ cycles: e?.cycles ?? "ref",
1863
+ reused: e?.reused ?? "inline",
1864
+ external: e?.external ?? void 0
1865
+ };
1866
+ }
1867
+ function k(e, t, n = { path: [], schemaPath: [] }) {
1868
+ var r;
1869
+ const o = e._zod.def, i = t.seen.get(e);
1870
+ if (i)
1871
+ return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
1872
+ const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
1873
+ t.seen.set(e, s);
1874
+ const a = e._zod.toJSONSchema?.();
1875
+ if (a)
1876
+ s.schema = a;
1877
+ else {
1878
+ const f = {
1879
+ ...n,
1880
+ schemaPath: [...n.schemaPath, e],
1881
+ path: n.path
1882
+ };
1883
+ if (e._zod.processJSONSchema)
1884
+ e._zod.processJSONSchema(t, s.schema, f);
1885
+ else {
1886
+ const h = s.schema, m = t.processors[o.type];
1887
+ if (!m)
1888
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1889
+ m(e, t, h, f);
1890
+ }
1891
+ const g = e._zod.parent;
1892
+ g && (s.ref || (s.ref = g), k(g, t, f), t.seen.get(g).isParent = !0);
1893
+ }
1894
+ const l = t.metadataRegistry.get(e);
1895
+ return l && Object.assign(s.schema, l), t.io === "input" && j(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
1896
+ }
1897
+ function pt(e, t) {
1898
+ const n = e.seen.get(t);
1899
+ if (!n)
1900
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1901
+ const r = /* @__PURE__ */ new Map();
1902
+ for (const s of e.seen.entries()) {
1903
+ const a = e.metadataRegistry.get(s[0])?.id;
1904
+ if (a) {
1905
+ const l = r.get(a);
1906
+ if (l && l !== s[0])
1907
+ throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
1908
+ r.set(a, s[0]);
1909
+ }
1910
+ }
1911
+ const o = (s) => {
1912
+ const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
1913
+ if (e.external) {
1914
+ const g = e.external.registry.get(s[0])?.id, h = e.external.uri ?? (($) => $);
1915
+ if (g)
1916
+ return { ref: h(g) };
1917
+ const m = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
1918
+ return s[1].defId = m, { defId: m, ref: `${h("__shared")}#/${a}/${m}` };
1919
+ }
1920
+ if (s[1] === n)
1921
+ return { ref: "#" };
1922
+ const d = `#/${a}/`, f = s[1].schema.id ?? `__schema${e.counter++}`;
1923
+ return { defId: f, ref: d + f };
1924
+ }, i = (s) => {
1925
+ if (s[1].schema.$ref)
1926
+ return;
1927
+ const a = s[1], { ref: l, defId: d } = o(s);
1928
+ a.def = { ...a.schema }, d && (a.defId = d);
1929
+ const f = a.schema;
1930
+ for (const g in f)
1931
+ delete f[g];
1932
+ f.$ref = l;
1933
+ };
1934
+ if (e.cycles === "throw")
1935
+ for (const s of e.seen.entries()) {
1936
+ const a = s[1];
1937
+ if (a.cycle)
1938
+ throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
1939
+
1940
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
1941
+ }
1942
+ for (const s of e.seen.entries()) {
1943
+ const a = s[1];
1944
+ if (t === s[0]) {
1945
+ i(s);
1946
+ continue;
1947
+ }
1948
+ if (e.external) {
1949
+ const d = e.external.registry.get(s[0])?.id;
1950
+ if (t !== s[0] && d) {
1951
+ i(s);
1952
+ continue;
1953
+ }
1954
+ }
1955
+ if (e.metadataRegistry.get(s[0])?.id) {
1956
+ i(s);
1957
+ continue;
1958
+ }
1959
+ if (a.cycle) {
1960
+ i(s);
1961
+ continue;
1962
+ }
1963
+ if (a.count > 1 && e.reused === "ref") {
1964
+ i(s);
1965
+ continue;
1966
+ }
1967
+ }
1968
+ }
1969
+ function ht(e, t) {
1970
+ const n = e.seen.get(t);
1971
+ if (!n)
1972
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1973
+ const r = (s) => {
1974
+ const a = e.seen.get(s);
1975
+ if (a.ref === null)
1976
+ return;
1977
+ const l = a.def ?? a.schema, d = { ...l }, f = a.ref;
1978
+ if (a.ref = null, f) {
1979
+ r(f);
1980
+ const h = e.seen.get(f), m = h.schema;
1981
+ if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(m)) : Object.assign(l, m), Object.assign(l, d), s._zod.parent === f)
1982
+ for (const b in l)
1983
+ b === "$ref" || b === "allOf" || b in d || delete l[b];
1984
+ if (m.$ref && h.def)
1985
+ for (const b in l)
1986
+ b === "$ref" || b === "allOf" || b in h.def && JSON.stringify(l[b]) === JSON.stringify(h.def[b]) && delete l[b];
1987
+ }
1988
+ const g = s._zod.parent;
1989
+ if (g && g !== f) {
1990
+ r(g);
1991
+ const h = e.seen.get(g);
1992
+ if (h?.schema.$ref && (l.$ref = h.schema.$ref, h.def))
1993
+ for (const m in l)
1994
+ m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(l[m]) === JSON.stringify(h.def[m]) && delete l[m];
1995
+ }
1996
+ e.override({
1997
+ zodSchema: s,
1998
+ jsonSchema: l,
1999
+ path: a.path ?? []
2000
+ });
2001
+ };
2002
+ for (const s of [...e.seen.entries()].reverse())
2003
+ r(s[0]);
2004
+ const o = {};
2005
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2006
+ const s = e.external.registry.get(t)?.id;
2007
+ if (!s)
2008
+ throw new Error("Schema is missing an `id` property");
2009
+ o.$id = e.external.uri(s);
2010
+ }
2011
+ Object.assign(o, n.def ?? n.schema);
2012
+ const i = e.external?.defs ?? {};
2013
+ for (const s of e.seen.entries()) {
2014
+ const a = s[1];
2015
+ a.def && a.defId && (i[a.defId] = a.def);
2016
+ }
2017
+ e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2018
+ try {
2019
+ const s = JSON.parse(JSON.stringify(o));
2020
+ return Object.defineProperty(s, "~standard", {
2021
+ value: {
2022
+ ...t["~standard"],
2023
+ jsonSchema: {
2024
+ input: ee(t, "input", e.processors),
2025
+ output: ee(t, "output", e.processors)
2026
+ }
2027
+ },
2028
+ enumerable: !1,
2029
+ writable: !1
2030
+ }), s;
2031
+ } catch {
2032
+ throw new Error("Error converting schema to JSON.");
2033
+ }
2034
+ }
2035
+ function j(e, t) {
2036
+ const n = t ?? { seen: /* @__PURE__ */ new Set() };
2037
+ if (n.seen.has(e))
2038
+ return !1;
2039
+ n.seen.add(e);
2040
+ const r = e._zod.def;
2041
+ if (r.type === "transform")
2042
+ return !0;
2043
+ if (r.type === "array")
2044
+ return j(r.element, n);
2045
+ if (r.type === "set")
2046
+ return j(r.valueType, n);
2047
+ if (r.type === "lazy")
2048
+ return j(r.getter(), n);
2049
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2050
+ return j(r.innerType, n);
2051
+ if (r.type === "intersection")
2052
+ return j(r.left, n) || j(r.right, n);
2053
+ if (r.type === "record" || r.type === "map")
2054
+ return j(r.keyType, n) || j(r.valueType, n);
2055
+ if (r.type === "pipe")
2056
+ return j(r.in, n) || j(r.out, n);
2057
+ if (r.type === "object") {
2058
+ for (const o in r.shape)
2059
+ if (j(r.shape[o], n))
2060
+ return !0;
2061
+ return !1;
2062
+ }
2063
+ if (r.type === "union") {
2064
+ for (const o of r.options)
2065
+ if (j(o, n))
2066
+ return !0;
2067
+ return !1;
2068
+ }
2069
+ if (r.type === "tuple") {
2070
+ for (const o of r.items)
2071
+ if (j(o, n))
2072
+ return !0;
2073
+ return !!(r.rest && j(r.rest, n));
2074
+ }
2075
+ return !1;
2076
+ }
2077
+ const ts = (e, t = {}) => (n) => {
2078
+ const r = ft({ ...n, processors: t });
2079
+ return k(e, r), pt(r, e), ht(r, e);
2080
+ }, ee = (e, t, n = {}) => (r) => {
2081
+ const { libraryOptions: o, target: i } = r ?? {}, s = ft({ ...o ?? {}, target: i, io: t, processors: n });
2082
+ return k(e, s), pt(s, e), ht(s, e);
2083
+ }, ns = {
2084
+ guid: "uuid",
2085
+ url: "uri",
2086
+ datetime: "date-time",
2087
+ json_string: "json-string",
2088
+ regex: ""
2089
+ // do not set
2090
+ }, rs = (e, t, n, r) => {
2091
+ const o = n;
2092
+ o.type = "string";
2093
+ const { minimum: i, maximum: s, format: a, patterns: l, contentEncoding: d } = e._zod.bag;
2094
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = ns[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), d && (o.contentEncoding = d), l && l.size > 0) {
2095
+ const f = [...l];
2096
+ f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
2097
+ ...f.map((g) => ({
2098
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2099
+ pattern: g.source
2100
+ }))
2101
+ ]);
2102
+ }
2103
+ }, os = (e, t, n, r) => {
2104
+ n.not = {};
2105
+ }, ss = (e, t, n, r) => {
2106
+ }, is = (e, t, n, r) => {
2107
+ const o = e._zod.def, i = Ge(o.entries);
2108
+ i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2109
+ }, as = (e, t, n, r) => {
2110
+ if (t.unrepresentable === "throw")
2111
+ throw new Error("Custom types cannot be represented in JSON Schema");
2112
+ }, cs = (e, t, n, r) => {
2113
+ if (t.unrepresentable === "throw")
2114
+ throw new Error("Transforms cannot be represented in JSON Schema");
2115
+ }, us = (e, t, n, r) => {
2116
+ const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
2117
+ typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
2118
+ }, ls = (e, t, n, r) => {
2119
+ const o = n, i = e._zod.def;
2120
+ o.type = "object", o.properties = {};
2121
+ const s = i.shape;
2122
+ for (const d in s)
2123
+ o.properties[d] = k(s[d], t, {
2124
+ ...r,
2125
+ path: [...r.path, "properties", d]
2126
+ });
2127
+ const a = new Set(Object.keys(s)), l = new Set([...a].filter((d) => {
2128
+ const f = i.shape[d]._zod;
2129
+ return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
2130
+ }));
2131
+ l.size > 0 && (o.required = Array.from(l)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
2132
+ ...r,
2133
+ path: [...r.path, "additionalProperties"]
2134
+ })) : t.io === "output" && (o.additionalProperties = !1);
2135
+ }, ds = (e, t, n, r) => {
2136
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, l) => k(a, t, {
2137
+ ...r,
2138
+ path: [...r.path, i ? "oneOf" : "anyOf", l]
2139
+ }));
2140
+ i ? n.oneOf = s : n.anyOf = s;
2141
+ }, fs = (e, t, n, r) => {
2142
+ const o = e._zod.def, i = k(o.left, t, {
2143
+ ...r,
2144
+ path: [...r.path, "allOf", 0]
2145
+ }), s = k(o.right, t, {
2146
+ ...r,
2147
+ path: [...r.path, "allOf", 1]
2148
+ }), a = (d) => "allOf" in d && Object.keys(d).length === 1, l = [
2149
+ ...a(i) ? i.allOf : [i],
2150
+ ...a(s) ? s.allOf : [s]
2151
+ ];
2152
+ n.allOf = l;
2153
+ }, ps = (e, t, n, r) => {
2154
+ const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
2155
+ t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2156
+ }, hs = (e, t, n, r) => {
2157
+ const o = e._zod.def;
2158
+ k(o.innerType, t, r);
2159
+ const i = t.seen.get(e);
2160
+ i.ref = o.innerType;
2161
+ }, ms = (e, t, n, r) => {
2162
+ const o = e._zod.def;
2163
+ k(o.innerType, t, r);
2164
+ const i = t.seen.get(e);
2165
+ i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2166
+ }, gs = (e, t, n, r) => {
2167
+ const o = e._zod.def;
2168
+ k(o.innerType, t, r);
2169
+ const i = t.seen.get(e);
2170
+ i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2171
+ }, _s = (e, t, n, r) => {
2172
+ const o = e._zod.def;
2173
+ k(o.innerType, t, r);
2174
+ const i = t.seen.get(e);
2175
+ i.ref = o.innerType;
2176
+ let s;
2177
+ try {
2178
+ s = o.catchValue(void 0);
2179
+ } catch {
2180
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
2181
+ }
2182
+ n.default = s;
2183
+ }, vs = (e, t, n, r) => {
2184
+ const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2185
+ k(i, t, r);
2186
+ const s = t.seen.get(e);
2187
+ s.ref = i;
2188
+ }, ys = (e, t, n, r) => {
2189
+ const o = e._zod.def;
2190
+ k(o.innerType, t, r);
2191
+ const i = t.seen.get(e);
2192
+ i.ref = o.innerType, n.readOnly = !0;
2193
+ }, mt = (e, t, n, r) => {
2194
+ const o = e._zod.def;
2195
+ k(o.innerType, t, r);
2196
+ const i = t.seen.get(e);
2197
+ i.ref = o.innerType;
2198
+ }, ws = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2199
+ Tr.init(e, t), y.init(e, t);
1753
2200
  });
1754
- function Vo(e) {
1755
- return xo(Wo, e);
2201
+ function zs(e) {
2202
+ return /* @__PURE__ */ Io(ws, e);
1756
2203
  }
1757
- const qo = /* @__PURE__ */ c("ZodISODate", (e, t) => {
1758
- yr.init(e, t), g.init(e, t);
2204
+ const bs = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2205
+ Er.init(e, t), y.init(e, t);
1759
2206
  });
1760
- function Ho(e) {
1761
- return Zo(qo, e);
2207
+ function ks(e) {
2208
+ return /* @__PURE__ */ Ao(bs, e);
1762
2209
  }
1763
- const Jo = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
1764
- kr.init(e, t), g.init(e, t);
2210
+ const $s = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2211
+ Nr.init(e, t), y.init(e, t);
1765
2212
  });
1766
- function Ko(e) {
1767
- return $o(Jo, e);
2213
+ function js(e) {
2214
+ return /* @__PURE__ */ Ro($s, e);
1768
2215
  }
1769
- const Go = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
1770
- xr.init(e, t), g.init(e, t);
2216
+ const xs = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2217
+ Ir.init(e, t), y.init(e, t);
1771
2218
  });
1772
- function Yo(e) {
1773
- return jo(Go, e);
2219
+ function Zs(e) {
2220
+ return /* @__PURE__ */ Do(xs, e);
1774
2221
  }
1775
- const Qo = (e, t) => {
1776
- Ge.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2222
+ const Os = (e, t) => {
2223
+ tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
1777
2224
  format: {
1778
- value: (n) => _n(e, n)
2225
+ value: (n) => On(e, n)
1779
2226
  // enumerable: false,
1780
2227
  },
1781
2228
  flatten: {
1782
- value: (n) => gn(e, n)
2229
+ value: (n) => Zn(e, n)
1783
2230
  // enumerable: false,
1784
2231
  },
1785
2232
  addIssue: {
1786
2233
  value: (n) => {
1787
- e.issues.push(n), e.message = JSON.stringify(e.issues, ne, 2);
2234
+ e.issues.push(n), e.message = JSON.stringify(e.issues, ie, 2);
1788
2235
  }
1789
2236
  // enumerable: false,
1790
2237
  },
1791
2238
  addIssues: {
1792
2239
  value: (n) => {
1793
- e.issues.push(...n), e.message = JSON.stringify(e.issues, ne, 2);
2240
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, ie, 2);
1794
2241
  }
1795
2242
  // enumerable: false,
1796
2243
  },
@@ -1801,312 +2248,328 @@ const Qo = (e, t) => {
1801
2248
  // enumerable: false,
1802
2249
  }
1803
2250
  });
1804
- }, k = c("ZodError", Qo, {
2251
+ }, Z = u("ZodError", Os, {
1805
2252
  Parent: Error
1806
- }), Xo = /* @__PURE__ */ ue(k), es = /* @__PURE__ */ le(k), ts = /* @__PURE__ */ Q(k), ns = /* @__PURE__ */ X(k), rs = /* @__PURE__ */ zn(k), os = /* @__PURE__ */ bn(k), ss = /* @__PURE__ */ yn(k), is = /* @__PURE__ */ kn(k), as = /* @__PURE__ */ xn(k), cs = /* @__PURE__ */ Zn(k), us = /* @__PURE__ */ $n(k), ls = /* @__PURE__ */ jn(k), z = /* @__PURE__ */ c("ZodType", (e, t) => (v.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(S(t, {
2253
+ }), Ss = /* @__PURE__ */ pe(Z), Ps = /* @__PURE__ */ he(Z), Ts = /* @__PURE__ */ re(Z), Es = /* @__PURE__ */ oe(Z), Ns = /* @__PURE__ */ Tn(Z), Is = /* @__PURE__ */ En(Z), As = /* @__PURE__ */ Nn(Z), Rs = /* @__PURE__ */ In(Z), Ds = /* @__PURE__ */ An(Z), Cs = /* @__PURE__ */ Rn(Z), Us = /* @__PURE__ */ Dn(Z), Fs = /* @__PURE__ */ Cn(Z), z = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
2254
+ jsonSchema: {
2255
+ input: ee(e, "input"),
2256
+ output: ee(e, "output")
2257
+ }
2258
+ }), e.toJSONSchema = ts(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(I(t, {
1807
2259
  checks: [
1808
2260
  ...t.checks ?? [],
1809
2261
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1810
2262
  ]
1811
- })), e.clone = (n, r) => T(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ts(e, n, r), e.parseAsync = async (n, r) => es(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ns(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => rs(e, n, r), e.decode = (n, r) => os(e, n, r), e.encodeAsync = async (n, r) => ss(e, n, r), e.decodeAsync = async (n, r) => is(e, n, r), e.safeEncode = (n, r) => as(e, n, r), e.safeDecode = (n, r) => cs(e, n, r), e.safeEncodeAsync = async (n, r) => us(e, n, r), e.safeDecodeAsync = async (n, r) => ls(e, n, r), e.refine = (n, r) => e.check(ei(n, r)), e.superRefine = (n) => e.check(ti(n)), e.overwrite = (n) => e.check(L(n)), e.optional = () => Ee(e), e.nullable = () => Te(e), e.nullish = () => Ee(Te(e)), e.nonoptional = (n) => Hs(e, n), e.array = () => Is(e), e.or = (n) => Rs([e, n]), e.and = (n) => Us(e, n), e.transform = (n) => Ae(e, Ls(n)), e.default = (n) => Ws(e, n), e.prefault = (n) => qs(e, n), e.catch = (n) => Ks(e, n), e.pipe = (n) => Ae(e, n), e.readonly = () => Qs(e), e.describe = (n) => {
2263
+ }), {
2264
+ parent: !0
2265
+ }), e.with = e.check, e.clone = (n, r) => A(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ss(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ts(e, n, r), e.parseAsync = async (n, r) => Ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Ns(e, n, r), e.decode = (n, r) => Is(e, n, r), e.encodeAsync = async (n, r) => As(e, n, r), e.decodeAsync = async (n, r) => Rs(e, n, r), e.safeEncode = (n, r) => Ds(e, n, r), e.safeDecode = (n, r) => Cs(e, n, r), e.safeEncodeAsync = async (n, r) => Us(e, n, r), e.safeDecodeAsync = async (n, r) => Fs(e, n, r), e.refine = (n, r) => e.check(Ei(n, r)), e.superRefine = (n) => e.check(Ni(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ J(n)), e.optional = () => Ne(e), e.exactOptional = () => yi(e), e.nullable = () => Ie(e), e.nullish = () => Ne(Ie(e)), e.nonoptional = (n) => ji(e, n), e.array = () => ui(e), e.or = (n) => pi([e, n]), e.and = (n) => mi(e, n), e.transform = (n) => Ae(e, _i(n)), e.default = (n) => bi(e, n), e.prefault = (n) => $i(e, n), e.catch = (n) => Zi(e, n), e.pipe = (n) => Ae(e, n), e.readonly = () => Pi(e), e.describe = (n) => {
1812
2266
  const r = e.clone();
1813
- return W.add(r, { description: n }), r;
2267
+ return L.add(r, { description: n }), r;
1814
2268
  }, Object.defineProperty(e, "description", {
1815
2269
  get() {
1816
- return W.get(e)?.description;
2270
+ return L.get(e)?.description;
1817
2271
  },
1818
2272
  configurable: !0
1819
2273
  }), e.meta = (...n) => {
1820
2274
  if (n.length === 0)
1821
- return W.get(e);
2275
+ return L.get(e);
1822
2276
  const r = e.clone();
1823
- return W.add(r, n[0]), r;
1824
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), it = /* @__PURE__ */ c("_ZodString", (e, t) => {
1825
- de.init(e, t), z.init(e, t);
2277
+ return L.add(r, n[0]), r;
2278
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), gt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2279
+ me.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => rs(e, r, o);
1826
2280
  const n = e._zod.bag;
1827
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(To(...r)), e.includes = (...r) => e.check(Io(...r)), e.startsWith = (...r) => e.check(So(...r)), e.endsWith = (...r) => e.check(No(...r)), e.min = (...r) => e.check(J(...r)), e.max = (...r) => e.check(ot(...r)), e.length = (...r) => e.check(st(...r)), e.nonempty = (...r) => e.check(J(1, ...r)), e.lowercase = (r) => e.check(Ao(r)), e.uppercase = (r) => e.check(Oo(r)), e.trim = () => e.check(Ro()), e.normalize = (...r) => e.check(Do(...r)), e.toLowerCase = () => e.check(Co()), e.toUpperCase = () => e.check(Uo());
1828
- }), ds = /* @__PURE__ */ c("ZodString", (e, t) => {
1829
- de.init(e, t), it.init(e, t), e.email = (n) => e.check(no(fs, n)), e.url = (n) => e.check(ao(ps, n)), e.jwt = (n) => e.check(ko(Ps, n)), e.emoji = (n) => e.check(co(hs, n)), e.guid = (n) => e.check(Ze(je, n)), e.uuid = (n) => e.check(ro(V, n)), e.uuidv4 = (n) => e.check(oo(V, n)), e.uuidv6 = (n) => e.check(so(V, n)), e.uuidv7 = (n) => e.check(io(V, n)), e.nanoid = (n) => e.check(uo(ms, n)), e.guid = (n) => e.check(Ze(je, n)), e.cuid = (n) => e.check(lo(gs, n)), e.cuid2 = (n) => e.check(fo(_s, n)), e.ulid = (n) => e.check(po(vs, n)), e.base64 = (n) => e.check(zo(Zs, n)), e.base64url = (n) => e.check(bo($s, n)), e.xid = (n) => e.check(ho(ws, n)), e.ksuid = (n) => e.check(mo(zs, n)), e.ipv4 = (n) => e.check(go(bs, n)), e.ipv6 = (n) => e.check(_o(ys, n)), e.cidrv4 = (n) => e.check(vo(ks, n)), e.cidrv6 = (n) => e.check(wo(xs, n)), e.e164 = (n) => e.check(yo(js, n)), e.datetime = (n) => e.check(Vo(n)), e.date = (n) => e.check(Ho(n)), e.time = (n) => e.check(Ko(n)), e.duration = (n) => e.check(Yo(n));
2281
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Fo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Mo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ X(...r)), e.max = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ dt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ X(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Jo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Lo(r)), e.trim = () => e.check(/* @__PURE__ */ Wo()), e.normalize = (...r) => e.check(/* @__PURE__ */ qo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ko()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ho()), e.slugify = () => e.check(/* @__PURE__ */ Go());
2282
+ }), Js = /* @__PURE__ */ u("ZodString", (e, t) => {
2283
+ me.init(e, t), gt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ po(Ls, n)), e.url = (n) => e.check(/* @__PURE__ */ vo(Ms, n)), e.jwt = (n) => e.check(/* @__PURE__ */ No(oi, n)), e.emoji = (n) => e.check(/* @__PURE__ */ yo(Bs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.uuid = (n) => e.check(/* @__PURE__ */ ho(G, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ mo(G, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ go(G, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ _o(G, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ wo(Vs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.cuid = (n) => e.check(/* @__PURE__ */ zo(qs, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ bo(Ws, n)), e.ulid = (n) => e.check(/* @__PURE__ */ ko(Ks, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Po(ti, n)), e.base64url = (n) => e.check(/* @__PURE__ */ To(ni, n)), e.xid = (n) => e.check(/* @__PURE__ */ $o(Hs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ jo(Gs, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ xo(Ys, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Zo(Qs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Oo(Xs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ So(ei, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Eo(ri, n)), e.datetime = (n) => e.check(zs(n)), e.date = (n) => e.check(ks(n)), e.time = (n) => e.check(js(n)), e.duration = (n) => e.check(Zs(n));
1830
2284
  });
1831
- function $e(e) {
1832
- return to(ds, e);
1833
- }
1834
- const g = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
1835
- m.init(e, t), it.init(e, t);
1836
- }), fs = /* @__PURE__ */ c("ZodEmail", (e, t) => {
1837
- fr.init(e, t), g.init(e, t);
1838
- }), je = /* @__PURE__ */ c("ZodGUID", (e, t) => {
1839
- lr.init(e, t), g.init(e, t);
1840
- }), V = /* @__PURE__ */ c("ZodUUID", (e, t) => {
1841
- dr.init(e, t), g.init(e, t);
1842
- }), ps = /* @__PURE__ */ c("ZodURL", (e, t) => {
1843
- pr.init(e, t), g.init(e, t);
1844
- }), hs = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
1845
- hr.init(e, t), g.init(e, t);
1846
- }), ms = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
1847
- mr.init(e, t), g.init(e, t);
1848
- }), gs = /* @__PURE__ */ c("ZodCUID", (e, t) => {
1849
- gr.init(e, t), g.init(e, t);
1850
- }), _s = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
1851
- _r.init(e, t), g.init(e, t);
1852
- }), vs = /* @__PURE__ */ c("ZodULID", (e, t) => {
1853
- vr.init(e, t), g.init(e, t);
1854
- }), ws = /* @__PURE__ */ c("ZodXID", (e, t) => {
1855
- wr.init(e, t), g.init(e, t);
1856
- }), zs = /* @__PURE__ */ c("ZodKSUID", (e, t) => {
1857
- zr.init(e, t), g.init(e, t);
1858
- }), bs = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
1859
- Zr.init(e, t), g.init(e, t);
1860
- }), ys = /* @__PURE__ */ c("ZodIPv6", (e, t) => {
1861
- $r.init(e, t), g.init(e, t);
1862
- }), ks = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
1863
- jr.init(e, t), g.init(e, t);
1864
- }), xs = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
1865
- Pr.init(e, t), g.init(e, t);
1866
- }), Zs = /* @__PURE__ */ c("ZodBase64", (e, t) => {
1867
- Er.init(e, t), g.init(e, t);
1868
- }), $s = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
1869
- Ar.init(e, t), g.init(e, t);
1870
- }), js = /* @__PURE__ */ c("ZodE164", (e, t) => {
1871
- Or.init(e, t), g.init(e, t);
1872
- }), Ps = /* @__PURE__ */ c("ZodJWT", (e, t) => {
1873
- Sr.init(e, t), g.init(e, t);
1874
- }), Es = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
1875
- Nr.init(e, t), z.init(e, t);
2285
+ function Pe(e) {
2286
+ return /* @__PURE__ */ fo(Js, e);
2287
+ }
2288
+ const y = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2289
+ v.init(e, t), gt.init(e, t);
2290
+ }), Ls = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2291
+ br.init(e, t), y.init(e, t);
2292
+ }), Te = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2293
+ wr.init(e, t), y.init(e, t);
2294
+ }), G = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2295
+ zr.init(e, t), y.init(e, t);
2296
+ }), Ms = /* @__PURE__ */ u("ZodURL", (e, t) => {
2297
+ kr.init(e, t), y.init(e, t);
2298
+ }), Bs = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2299
+ $r.init(e, t), y.init(e, t);
2300
+ }), Vs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2301
+ jr.init(e, t), y.init(e, t);
2302
+ }), qs = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2303
+ xr.init(e, t), y.init(e, t);
2304
+ }), Ws = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2305
+ Zr.init(e, t), y.init(e, t);
2306
+ }), Ks = /* @__PURE__ */ u("ZodULID", (e, t) => {
2307
+ Or.init(e, t), y.init(e, t);
2308
+ }), Hs = /* @__PURE__ */ u("ZodXID", (e, t) => {
2309
+ Sr.init(e, t), y.init(e, t);
2310
+ }), Gs = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2311
+ Pr.init(e, t), y.init(e, t);
2312
+ }), Ys = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2313
+ Ar.init(e, t), y.init(e, t);
2314
+ }), Qs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2315
+ Rr.init(e, t), y.init(e, t);
2316
+ }), Xs = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2317
+ Dr.init(e, t), y.init(e, t);
2318
+ }), ei = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2319
+ Cr.init(e, t), y.init(e, t);
2320
+ }), ti = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2321
+ Ur.init(e, t), y.init(e, t);
2322
+ }), ni = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2323
+ Jr.init(e, t), y.init(e, t);
2324
+ }), ri = /* @__PURE__ */ u("ZodE164", (e, t) => {
2325
+ Lr.init(e, t), y.init(e, t);
2326
+ }), oi = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2327
+ Br.init(e, t), y.init(e, t);
2328
+ }), si = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2329
+ Vr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ss();
1876
2330
  });
1877
- function Pe() {
1878
- return Po(Es);
2331
+ function Ee() {
2332
+ return /* @__PURE__ */ Co(si);
1879
2333
  }
1880
- const Ts = /* @__PURE__ */ c("ZodNever", (e, t) => {
1881
- Dr.init(e, t), z.init(e, t);
2334
+ const ii = /* @__PURE__ */ u("ZodNever", (e, t) => {
2335
+ qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => os(e, n, r);
1882
2336
  });
1883
- function As(e) {
1884
- return Eo(Ts, e);
2337
+ function ai(e) {
2338
+ return /* @__PURE__ */ Uo(ii, e);
1885
2339
  }
1886
- const Os = /* @__PURE__ */ c("ZodArray", (e, t) => {
1887
- Rr.init(e, t), z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(J(n, r)), e.nonempty = (n) => e.check(J(1, n)), e.max = (n, r) => e.check(ot(n, r)), e.length = (n, r) => e.check(st(n, r)), e.unwrap = () => e.element;
2340
+ const ci = /* @__PURE__ */ u("ZodArray", (e, t) => {
2341
+ Wr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => us(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ X(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ X(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ dt(n, r)), e.unwrap = () => e.element;
1888
2342
  });
1889
- function Is(e, t) {
1890
- return Fo(Os, e, t);
2343
+ function ui(e, t) {
2344
+ return /* @__PURE__ */ Yo(ci, e, t);
1891
2345
  }
1892
- const Ss = /* @__PURE__ */ c("ZodObject", (e, t) => {
1893
- Ur.init(e, t), z.init(e, t), h(e, "shape", () => t.shape), e.keyof = () => at(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Pe() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Pe() }), e.strict = () => e.clone({ ...e._zod.def, catchall: As() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => dn(e, n), e.safeExtend = (n) => fn(e, n), e.merge = (n) => pn(e, n), e.pick = (n) => un(e, n), e.omit = (n) => ln(e, n), e.partial = (...n) => hn(ct, e, n[0]), e.required = (...n) => mn(ut, e, n[0]);
2346
+ const li = /* @__PURE__ */ u("ZodObject", (e, t) => {
2347
+ Hr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ls(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => _t(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ai() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => bn(e, n), e.safeExtend = (n) => kn(e, n), e.merge = (n) => $n(e, n), e.pick = (n) => wn(e, n), e.omit = (n) => zn(e, n), e.partial = (...n) => jn(vt, e, n[0]), e.required = (...n) => xn(yt, e, n[0]);
1894
2348
  });
1895
- function Ns(e, t) {
2349
+ function di(e, t) {
1896
2350
  const n = {
1897
2351
  type: "object",
1898
2352
  shape: e ?? {},
1899
- ...f(t)
2353
+ ...p(t)
1900
2354
  };
1901
- return new Ss(n);
2355
+ return new li(n);
1902
2356
  }
1903
- const Ds = /* @__PURE__ */ c("ZodUnion", (e, t) => {
1904
- Fr.init(e, t), z.init(e, t), e.options = t.options;
2357
+ const fi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2358
+ Gr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n, r, o), e.options = t.options;
1905
2359
  });
1906
- function Rs(e, t) {
1907
- return new Ds({
2360
+ function pi(e, t) {
2361
+ return new fi({
1908
2362
  type: "union",
1909
2363
  options: e,
1910
- ...f(t)
2364
+ ...p(t)
1911
2365
  });
1912
2366
  }
1913
- const Cs = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
1914
- Lr.init(e, t), z.init(e, t);
2367
+ const hi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2368
+ Yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n, r, o);
1915
2369
  });
1916
- function Us(e, t) {
1917
- return new Cs({
2370
+ function mi(e, t) {
2371
+ return new hi({
1918
2372
  type: "intersection",
1919
2373
  left: e,
1920
2374
  right: t
1921
2375
  });
1922
2376
  }
1923
- const oe = /* @__PURE__ */ c("ZodEnum", (e, t) => {
1924
- Br.init(e, t), z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2377
+ const ce = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2378
+ Qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => is(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
1925
2379
  const n = new Set(Object.keys(t.entries));
1926
2380
  e.extract = (r, o) => {
1927
- const s = {};
1928
- for (const i of r)
1929
- if (n.has(i))
1930
- s[i] = t.entries[i];
2381
+ const i = {};
2382
+ for (const s of r)
2383
+ if (n.has(s))
2384
+ i[s] = t.entries[s];
1931
2385
  else
1932
- throw new Error(`Key ${i} not found in enum`);
1933
- return new oe({
2386
+ throw new Error(`Key ${s} not found in enum`);
2387
+ return new ce({
1934
2388
  ...t,
1935
2389
  checks: [],
1936
- ...f(o),
1937
- entries: s
2390
+ ...p(o),
2391
+ entries: i
1938
2392
  });
1939
2393
  }, e.exclude = (r, o) => {
1940
- const s = { ...t.entries };
1941
- for (const i of r)
1942
- if (n.has(i))
1943
- delete s[i];
2394
+ const i = { ...t.entries };
2395
+ for (const s of r)
2396
+ if (n.has(s))
2397
+ delete i[s];
1944
2398
  else
1945
- throw new Error(`Key ${i} not found in enum`);
1946
- return new oe({
2399
+ throw new Error(`Key ${s} not found in enum`);
2400
+ return new ce({
1947
2401
  ...t,
1948
2402
  checks: [],
1949
- ...f(o),
1950
- entries: s
2403
+ ...p(o),
2404
+ entries: i
1951
2405
  });
1952
2406
  };
1953
2407
  });
1954
- function at(e, t) {
2408
+ function _t(e, t) {
1955
2409
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
1956
- return new oe({
2410
+ return new ce({
1957
2411
  type: "enum",
1958
2412
  entries: n,
1959
- ...f(t)
2413
+ ...p(t)
1960
2414
  });
1961
2415
  }
1962
- const Fs = /* @__PURE__ */ c("ZodTransform", (e, t) => {
1963
- Mr.init(e, t), z.init(e, t), e._zod.parse = (n, r) => {
2416
+ const gi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2417
+ Xr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n), e._zod.parse = (n, r) => {
1964
2418
  if (r.direction === "backward")
1965
- throw new We(e.constructor.name);
1966
- n.addIssue = (s) => {
1967
- if (typeof s == "string")
1968
- n.issues.push(U(s, n.value, t));
2419
+ throw new Ke(e.constructor.name);
2420
+ n.addIssue = (i) => {
2421
+ if (typeof i == "string")
2422
+ n.issues.push(B(i, n.value, t));
1969
2423
  else {
1970
- const i = s;
1971
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(U(i));
2424
+ const s = i;
2425
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(B(s));
1972
2426
  }
1973
2427
  };
1974
2428
  const o = t.transform(n.value, n);
1975
- return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2429
+ return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
1976
2430
  };
1977
2431
  });
1978
- function Ls(e) {
1979
- return new Fs({
2432
+ function _i(e) {
2433
+ return new gi({
1980
2434
  type: "transform",
1981
2435
  transform: e
1982
2436
  });
1983
2437
  }
1984
- const ct = /* @__PURE__ */ c("ZodOptional", (e, t) => {
1985
- Wr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2438
+ const vt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2439
+ ut.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2440
+ });
2441
+ function Ne(e) {
2442
+ return new vt({
2443
+ type: "optional",
2444
+ innerType: e
2445
+ });
2446
+ }
2447
+ const vi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2448
+ eo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
1986
2449
  });
1987
- function Ee(e) {
1988
- return new ct({
2450
+ function yi(e) {
2451
+ return new vi({
1989
2452
  type: "optional",
1990
2453
  innerType: e
1991
2454
  });
1992
2455
  }
1993
- const Bs = /* @__PURE__ */ c("ZodNullable", (e, t) => {
1994
- Vr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2456
+ const wi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2457
+ to.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
1995
2458
  });
1996
- function Te(e) {
1997
- return new Bs({
2459
+ function Ie(e) {
2460
+ return new wi({
1998
2461
  type: "nullable",
1999
2462
  innerType: e
2000
2463
  });
2001
2464
  }
2002
- const Ms = /* @__PURE__ */ c("ZodDefault", (e, t) => {
2003
- qr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2465
+ const zi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2466
+ no.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2004
2467
  });
2005
- function Ws(e, t) {
2006
- return new Ms({
2468
+ function bi(e, t) {
2469
+ return new zi({
2007
2470
  type: "default",
2008
2471
  innerType: e,
2009
2472
  get defaultValue() {
2010
- return typeof t == "function" ? t() : He(t);
2473
+ return typeof t == "function" ? t() : Qe(t);
2011
2474
  }
2012
2475
  });
2013
2476
  }
2014
- const Vs = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
2015
- Hr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2477
+ const ki = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2478
+ ro.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2016
2479
  });
2017
- function qs(e, t) {
2018
- return new Vs({
2480
+ function $i(e, t) {
2481
+ return new ki({
2019
2482
  type: "prefault",
2020
2483
  innerType: e,
2021
2484
  get defaultValue() {
2022
- return typeof t == "function" ? t() : He(t);
2485
+ return typeof t == "function" ? t() : Qe(t);
2023
2486
  }
2024
2487
  });
2025
2488
  }
2026
- const ut = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2027
- Jr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2489
+ const yt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2490
+ oo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2028
2491
  });
2029
- function Hs(e, t) {
2030
- return new ut({
2492
+ function ji(e, t) {
2493
+ return new yt({
2031
2494
  type: "nonoptional",
2032
2495
  innerType: e,
2033
- ...f(t)
2496
+ ...p(t)
2034
2497
  });
2035
2498
  }
2036
- const Js = /* @__PURE__ */ c("ZodCatch", (e, t) => {
2037
- Kr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2499
+ const xi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2500
+ so.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2038
2501
  });
2039
- function Ks(e, t) {
2040
- return new Js({
2502
+ function Zi(e, t) {
2503
+ return new xi({
2041
2504
  type: "catch",
2042
2505
  innerType: e,
2043
2506
  catchValue: typeof t == "function" ? t : () => t
2044
2507
  });
2045
2508
  }
2046
- const Gs = /* @__PURE__ */ c("ZodPipe", (e, t) => {
2047
- Gr.init(e, t), z.init(e, t), e.in = t.in, e.out = t.out;
2509
+ const Oi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2510
+ io.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.in = t.in, e.out = t.out;
2048
2511
  });
2049
2512
  function Ae(e, t) {
2050
- return new Gs({
2513
+ return new Oi({
2051
2514
  type: "pipe",
2052
2515
  in: e,
2053
2516
  out: t
2054
2517
  // ...util.normalizeParams(params),
2055
2518
  });
2056
2519
  }
2057
- const Ys = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
2058
- Yr.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2520
+ const Si = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2521
+ ao.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2059
2522
  });
2060
- function Qs(e) {
2061
- return new Ys({
2523
+ function Pi(e) {
2524
+ return new Si({
2062
2525
  type: "readonly",
2063
2526
  innerType: e
2064
2527
  });
2065
2528
  }
2066
- const Xs = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2067
- Qr.init(e, t), z.init(e, t);
2529
+ const Ti = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2530
+ co.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => as(e, n);
2068
2531
  });
2069
- function ei(e, t = {}) {
2070
- return Lo(Xs, e, t);
2532
+ function Ei(e, t = {}) {
2533
+ return /* @__PURE__ */ Qo(Ti, e, t);
2071
2534
  }
2072
- function ti(e) {
2073
- return Bo(e);
2535
+ function Ni(e) {
2536
+ return /* @__PURE__ */ Xo(e);
2074
2537
  }
2075
- const ni = Ns({
2076
- buildId: $e(),
2077
- timestamp: $e(),
2078
- status: at(["in-progress", "success", "failed"])
2079
- }), ri = ({
2538
+ const Ii = di({
2539
+ buildId: Pe(),
2540
+ timestamp: Pe(),
2541
+ status: _t(["in-progress", "success", "failed"])
2542
+ }), Ai = ({
2080
2543
  buildId: e,
2081
2544
  environmentType: t,
2082
2545
  endpoint: n = "/__zuplo/docs"
2083
2546
  }) => {
2084
- const r = wt({
2547
+ const r = Pt({
2085
2548
  queryKey: ["zuplo-build-check", e, n],
2086
2549
  refetchInterval: 3e3,
2087
2550
  enabled: e !== void 0 && t === "WORKING_COPY",
2088
2551
  retry: !1,
2089
- queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((s) => {
2090
- if (!s.ok) throw new Error("Failed to fetch build status");
2091
- return s.json();
2092
- }).then((s) => ni.parse(s))
2552
+ queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((i) => {
2553
+ if (!i.ok) throw new Error("Failed to fetch build status");
2554
+ return i.json();
2555
+ }).then((i) => Ii.parse(i))
2093
2556
  });
2094
- if (K(() => {
2557
+ if (te(() => {
2095
2558
  r.data?.status === "success" && r.data.buildId && (document.cookie = `zuplo-build=${r.data.buildId}; path=/; max-age=300; secure; SameSite=None`);
2096
2559
  }, [r.data]), r.isError || !r.data || r.data.buildId === e)
2097
2560
  return null;
2098
2561
  const o = r.data.status === "success";
2099
- return /* @__PURE__ */ a.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
2100
- o ? /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2101
- /* @__PURE__ */ a.jsx(It, { size: 16 }),
2102
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "New version available" })
2103
- ] }) : /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2104
- /* @__PURE__ */ a.jsx(St, { size: 16, className: "animate-spin" }),
2105
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Building new version..." })
2562
+ return /* @__PURE__ */ c.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
2563
+ o ? /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2564
+ /* @__PURE__ */ c.jsx(Bt, { size: 16 }),
2565
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "New version available" })
2566
+ ] }) : /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2567
+ /* @__PURE__ */ c.jsx(Vt, { size: 16, className: "animate-spin" }),
2568
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Building new version..." })
2106
2569
  ] }),
2107
- /* @__PURE__ */ a.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2108
- o && /* @__PURE__ */ a.jsx(
2109
- Ct,
2570
+ /* @__PURE__ */ c.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2571
+ o && /* @__PURE__ */ c.jsx(
2572
+ Ht,
2110
2573
  {
2111
2574
  variant: "outline",
2112
2575
  size: "sm",
@@ -2118,52 +2581,52 @@ const ni = Ns({
2118
2581
  }
2119
2582
  )
2120
2583
  ] });
2121
- }, oi = () => {
2122
- const e = Ce(), t = Re(e.pathname);
2123
- K(() => {
2584
+ }, Ri = () => {
2585
+ const e = Le(), t = Je(e.pathname);
2586
+ te(() => {
2124
2587
  const n = t.current !== e.pathname, r = e.hash !== "";
2125
2588
  n && !r && window.scrollTo(0, 0), t.current = e.pathname;
2126
2589
  }, [e.pathname, e.hash]);
2127
- }, si = ({
2590
+ }, Di = ({
2128
2591
  icon: e
2129
- }) => typeof e == "string" ? /* @__PURE__ */ a.jsx(
2592
+ }) => typeof e == "string" ? /* @__PURE__ */ c.jsx(
2130
2593
  "img",
2131
2594
  {
2132
2595
  src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
2133
2596
  className: "size-5",
2134
2597
  alt: e
2135
2598
  }
2136
- ) : e, ii = (e) => /^https?:/.test(e), ai = () => {
2137
- const { site: e } = Ut(), t = e?.footer;
2138
- return t ? /* @__PURE__ */ a.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ a.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
2139
- /* @__PURE__ */ a.jsxs(
2599
+ ) : e, Ci = (e) => /^https?:/.test(e), Ui = () => {
2600
+ const { site: e } = q(), t = e?.footer;
2601
+ return t ? /* @__PURE__ */ c.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ c.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
2602
+ /* @__PURE__ */ c.jsxs(
2140
2603
  "div",
2141
2604
  {
2142
- className: x("flex flex-row gap-8", {
2605
+ className: S("flex flex-row gap-8", {
2143
2606
  "justify-center": !t.position || t.position === "center",
2144
2607
  "justify-start": t.position === "start",
2145
2608
  "justify-end": t.position === "end"
2146
2609
  }),
2147
2610
  children: [
2148
- /* @__PURE__ */ a.jsx(E.Target, { name: "footer-before" }),
2149
- t.columns && /* @__PURE__ */ a.jsx(
2611
+ /* @__PURE__ */ c.jsx(N.Target, { name: "footer-before" }),
2612
+ t.columns && /* @__PURE__ */ c.jsx(
2150
2613
  "div",
2151
2614
  {
2152
2615
  className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
2153
2616
  style: { "--columns": t.columns.length },
2154
- children: t.columns.map((n) => /* @__PURE__ */ a.jsxs(
2617
+ children: t.columns.map((n) => /* @__PURE__ */ c.jsxs(
2155
2618
  "div",
2156
2619
  {
2157
- className: x({
2620
+ className: S({
2158
2621
  "justify-self-center": !n.position || n.position === "center",
2159
2622
  "justify-self-start": n.position === "start",
2160
2623
  "justify-self-end": n.position === "end"
2161
2624
  }),
2162
2625
  children: [
2163
- /* @__PURE__ */ a.jsx("span", { className: "text-sm font-semibold", children: n.title }),
2164
- /* @__PURE__ */ a.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
2626
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm font-semibold", children: n.title }),
2627
+ /* @__PURE__ */ c.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
2165
2628
  const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
2166
- return /* @__PURE__ */ a.jsx("li", { children: ii(r.href) ? /* @__PURE__ */ a.jsxs(
2629
+ return /* @__PURE__ */ c.jsx("li", { children: Ci(r.href) ? /* @__PURE__ */ c.jsxs(
2167
2630
  "a",
2168
2631
  {
2169
2632
  href: r.href,
@@ -2171,11 +2634,11 @@ const ni = Ns({
2171
2634
  rel: "noopener noreferrer",
2172
2635
  className: o,
2173
2636
  children: [
2174
- /* @__PURE__ */ a.jsx("span", { children: r.label }),
2175
- /* @__PURE__ */ a.jsx(Nt, { size: 12 })
2637
+ /* @__PURE__ */ c.jsx("span", { children: r.label }),
2638
+ /* @__PURE__ */ c.jsx(qt, { size: 12 })
2176
2639
  ]
2177
2640
  }
2178
- ) : /* @__PURE__ */ a.jsx(Ft, { to: r.href, className: o, children: /* @__PURE__ */ a.jsx("span", { children: r.label }) }) }, r.href + r.label);
2641
+ ) : /* @__PURE__ */ c.jsx(Gt, { to: r.href, className: o, children: /* @__PURE__ */ c.jsx("span", { children: r.label }) }) }, r.href + r.label);
2179
2642
  }) })
2180
2643
  ]
2181
2644
  },
@@ -2183,20 +2646,20 @@ const ni = Ns({
2183
2646
  ))
2184
2647
  }
2185
2648
  ),
2186
- /* @__PURE__ */ a.jsx(E.Target, { name: "footer-after" })
2649
+ /* @__PURE__ */ c.jsx(N.Target, { name: "footer-after" })
2187
2650
  ]
2188
2651
  }
2189
2652
  ),
2190
- /* @__PURE__ */ a.jsxs(
2653
+ /* @__PURE__ */ c.jsxs(
2191
2654
  "div",
2192
2655
  {
2193
- className: x(
2656
+ className: S(
2194
2657
  "flex items-center justify-between",
2195
2658
  t.columns && "border-t mt-8 pt-8"
2196
2659
  ),
2197
2660
  children: [
2198
- t.logo && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2199
- /* @__PURE__ */ a.jsx(
2661
+ t.logo && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2662
+ /* @__PURE__ */ c.jsx(
2200
2663
  "img",
2201
2664
  {
2202
2665
  src: t.logo.src.light,
@@ -2205,7 +2668,7 @@ const ni = Ns({
2205
2668
  style: { width: t.logo.width }
2206
2669
  }
2207
2670
  ),
2208
- /* @__PURE__ */ a.jsx(
2671
+ /* @__PURE__ */ c.jsx(
2209
2672
  "img",
2210
2673
  {
2211
2674
  src: t.logo.src.dark,
@@ -2215,8 +2678,8 @@ const ni = Ns({
2215
2678
  }
2216
2679
  )
2217
2680
  ] }),
2218
- t.copyright && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2219
- /* @__PURE__ */ a.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ a.jsxs(
2681
+ t.copyright && /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2682
+ /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ c.jsxs(
2220
2683
  "a",
2221
2684
  {
2222
2685
  href: n.href,
@@ -2224,7 +2687,7 @@ const ni = Ns({
2224
2687
  rel: "noopener noreferrer",
2225
2688
  className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
2226
2689
  children: [
2227
- /* @__PURE__ */ a.jsx(si, { icon: n.icon }),
2690
+ /* @__PURE__ */ c.jsx(Di, { icon: n.icon }),
2228
2691
  n.label
2229
2692
  ]
2230
2693
  },
@@ -2234,87 +2697,87 @@ const ni = Ns({
2234
2697
  }
2235
2698
  )
2236
2699
  ] }) }) : null;
2237
- }, lt = ({
2700
+ }, wt = ({
2238
2701
  shouldScaleBackground: e = !0,
2239
2702
  ...t
2240
- }) => /* @__PURE__ */ a.jsx(
2241
- $.Root,
2703
+ }) => /* @__PURE__ */ c.jsx(
2704
+ T.Root,
2242
2705
  {
2243
2706
  shouldScaleBackground: e,
2244
2707
  ...t
2245
2708
  }
2246
2709
  );
2247
- lt.displayName = "Drawer";
2248
- const ci = $.Trigger, ui = $.Portal, dt = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2249
- $.Overlay,
2710
+ wt.displayName = "Drawer";
2711
+ const Fi = T.Trigger, Ji = T.Portal, zt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2712
+ T.Overlay,
2250
2713
  {
2251
2714
  ref: n,
2252
- className: x("fixed inset-0 z-50 bg-black/80", e),
2715
+ className: S("fixed inset-0 z-50 bg-black/80", e),
2253
2716
  ...t
2254
2717
  }
2255
2718
  ));
2256
- dt.displayName = $.Overlay.displayName;
2257
- const li = F.forwardRef(
2258
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(ui, { children: [
2259
- /* @__PURE__ */ a.jsx(dt, {}),
2260
- /* @__PURE__ */ a.jsxs(
2261
- $.Content,
2719
+ zt.displayName = T.Overlay.displayName;
2720
+ const Li = V.forwardRef(
2721
+ ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ c.jsxs(Ji, { children: [
2722
+ /* @__PURE__ */ c.jsx(zt, {}),
2723
+ /* @__PURE__ */ c.jsxs(
2724
+ T.Content,
2262
2725
  {
2263
2726
  ref: o,
2264
- className: x(
2727
+ className: S(
2265
2728
  "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2266
2729
  e
2267
2730
  ),
2268
2731
  ...r,
2269
2732
  children: [
2270
- !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2733
+ !n && /* @__PURE__ */ c.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2271
2734
  t
2272
2735
  ]
2273
2736
  }
2274
2737
  )
2275
2738
  ] })
2276
2739
  );
2277
- li.displayName = "DrawerContent";
2278
- const di = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2279
- $.Title,
2740
+ Li.displayName = "DrawerContent";
2741
+ const Mi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2742
+ T.Title,
2280
2743
  {
2281
2744
  ref: n,
2282
- className: x(
2745
+ className: S(
2283
2746
  "text-lg font-semibold leading-none tracking-tight",
2284
2747
  e
2285
2748
  ),
2286
2749
  ...t
2287
2750
  }
2288
2751
  ));
2289
- di.displayName = $.Title.displayName;
2290
- const fi = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2291
- $.Description,
2752
+ Mi.displayName = T.Title.displayName;
2753
+ const Bi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2754
+ T.Description,
2292
2755
  {
2293
2756
  ref: n,
2294
- className: x("text-sm text-muted-foreground", e),
2757
+ className: S("text-sm text-muted-foreground", e),
2295
2758
  ...t
2296
2759
  }
2297
2760
  ));
2298
- fi.displayName = $.Description.displayName;
2299
- const ft = ({
2761
+ Bi.displayName = T.Description.displayName;
2762
+ const bt = ({
2300
2763
  children: e,
2301
2764
  className: t
2302
2765
  }) => {
2303
- const { options: n } = G(), r = Re(null);
2304
- return K(() => {
2766
+ const { options: n } = q(), r = Je(null);
2767
+ return te(() => {
2305
2768
  const o = r.current?.querySelector('[aria-current="page"]');
2306
- Lt(o ?? null);
2307
- }, []), /* @__PURE__ */ a.jsxs(
2769
+ Yt(o ?? null);
2770
+ }, []), /* @__PURE__ */ c.jsxs(
2308
2771
  "div",
2309
2772
  {
2310
2773
  className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r",
2311
2774
  "data-pagefind-ignore": "all",
2312
2775
  children: [
2313
- /* @__PURE__ */ a.jsx(
2776
+ /* @__PURE__ */ c.jsx(
2314
2777
  "nav",
2315
2778
  {
2316
2779
  ref: r,
2317
- className: x(
2780
+ className: S(
2318
2781
  "hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
2319
2782
  "-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
2320
2783
  // Revert the padding/margin on the first child
@@ -2327,36 +2790,36 @@ const ft = ({
2327
2790
  children: e
2328
2791
  }
2329
2792
  ),
2330
- /* @__PURE__ */ a.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ a.jsx(Bt, {}) })
2793
+ /* @__PURE__ */ c.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ c.jsx(Qt, {}) })
2331
2794
  ]
2332
2795
  }
2333
2796
  );
2334
2797
  };
2335
- ft.displayName = "NavigationWrapper";
2336
- const pi = ({
2798
+ bt.displayName = "NavigationWrapper";
2799
+ const Vi = ({
2337
2800
  onRequestClose: e,
2338
2801
  navigation: t
2339
- }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2340
- /* @__PURE__ */ a.jsxs(ft, { children: [
2341
- /* @__PURE__ */ a.jsx(E.Target, { name: "navigation-before" }),
2342
- t.map((n) => /* @__PURE__ */ a.jsx(
2343
- pe,
2802
+ }) => /* @__PURE__ */ c.jsxs(Xt, { children: [
2803
+ /* @__PURE__ */ c.jsxs(bt, { children: [
2804
+ /* @__PURE__ */ c.jsx(N.Target, { name: "navigation-before" }),
2805
+ t.map((n) => /* @__PURE__ */ c.jsx(
2806
+ ge,
2344
2807
  {
2345
2808
  item: n
2346
2809
  },
2347
2810
  n.type + (n.label ?? "") + ("path" in n ? n.path : "") + ("file" in n ? n.file : "") + ("to" in n ? n.to : "")
2348
2811
  )),
2349
- /* @__PURE__ */ a.jsx(E.Target, { name: "navigation-after" })
2812
+ /* @__PURE__ */ c.jsx(N.Target, { name: "navigation-after" })
2350
2813
  ] }),
2351
- /* @__PURE__ */ a.jsx(
2352
- Kt,
2814
+ /* @__PURE__ */ c.jsx(
2815
+ an,
2353
2816
  {
2354
- className: "lg:hidden h-[100dvh] start-0 w-[320px] rounded-none",
2817
+ className: "lg:hidden h-dvh start-0 w-[320px] rounded-none",
2355
2818
  "aria-describedby": void 0,
2356
- children: /* @__PURE__ */ a.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
2357
- /* @__PURE__ */ a.jsx(Yt, { children: /* @__PURE__ */ a.jsx(Gt, { children: "Navigation" }) }),
2358
- t.map((n) => /* @__PURE__ */ a.jsx(
2359
- pe,
2819
+ children: /* @__PURE__ */ c.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
2820
+ /* @__PURE__ */ c.jsx(un, { children: /* @__PURE__ */ c.jsx(cn, { children: "Navigation" }) }),
2821
+ t.map((n) => /* @__PURE__ */ c.jsx(
2822
+ ge,
2360
2823
  {
2361
2824
  item: n,
2362
2825
  onRequestClose: e
@@ -2366,113 +2829,113 @@ const pi = ({
2366
2829
  ] })
2367
2830
  }
2368
2831
  )
2369
- ] }), hi = ({ children: e }) => {
2370
- const [t, n] = zt(!1), { navigation: r } = Ht(), o = r.length > 0, s = Zt().state === "loading", { options: i } = G();
2371
- return /* @__PURE__ */ a.jsxs(
2372
- lt,
2832
+ ] }), qi = ({ children: e }) => {
2833
+ const [t, n] = Tt(!1), { navigation: r } = on(), o = r.length > 0, i = Rt().state === "loading", { options: s } = q();
2834
+ return /* @__PURE__ */ c.jsxs(
2835
+ wt,
2373
2836
  {
2374
- direction: i.site?.dir === "rtl" ? "right" : "left",
2837
+ direction: s.site?.dir === "rtl" ? "right" : "left",
2375
2838
  open: t,
2376
- onOpenChange: (u) => n(u),
2839
+ onOpenChange: (a) => n(a),
2377
2840
  children: [
2378
- o && /* @__PURE__ */ a.jsx(
2379
- pi,
2841
+ o && /* @__PURE__ */ c.jsx(
2842
+ Vi,
2380
2843
  {
2381
2844
  onRequestClose: () => n(!1),
2382
2845
  navigation: r
2383
2846
  }
2384
2847
  ),
2385
- o && /* @__PURE__ */ a.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ a.jsxs(ci, { className: "flex items-center gap-2 px-4", children: [
2386
- /* @__PURE__ */ a.jsx(Dt, { size: 16, strokeWidth: 1.5 }),
2387
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
2848
+ o && /* @__PURE__ */ c.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ c.jsxs(Fi, { className: "flex items-center gap-2 px-4", children: [
2849
+ /* @__PURE__ */ c.jsx(Wt, { size: 16, strokeWidth: 1.5 }),
2850
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Menu" })
2388
2851
  ] }) }),
2389
- /* @__PURE__ */ a.jsxs(
2852
+ /* @__PURE__ */ c.jsxs(
2390
2853
  "main",
2391
2854
  {
2392
2855
  "data-pagefind-body": !0,
2393
- className: x(
2856
+ className: S(
2394
2857
  "px-4 lg:pe-8 lg:px-8",
2395
2858
  !o && "col-span-full",
2396
- s && "animate-pulse"
2859
+ i && "animate-pulse"
2397
2860
  ),
2398
2861
  children: [
2399
- /* @__PURE__ */ a.jsx(E.Target, { name: "content-before" }),
2862
+ /* @__PURE__ */ c.jsx(N.Target, { name: "content-before" }),
2400
2863
  e,
2401
- /* @__PURE__ */ a.jsx(E.Target, { name: "content-after" })
2864
+ /* @__PURE__ */ c.jsx(N.Target, { name: "content-after" })
2402
2865
  ]
2403
2866
  }
2404
2867
  )
2405
2868
  ]
2406
2869
  }
2407
2870
  );
2408
- }, mi = () => /* @__PURE__ */ a.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ a.jsx(Qt, {}) }), gi = ({ children: e }) => {
2409
- const { authentication: t } = G();
2410
- return Mt(), oi(), K(() => {
2871
+ }, Wi = () => /* @__PURE__ */ c.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ c.jsx(ln, {}) }), Ki = ({ children: e }) => {
2872
+ const { authentication: t } = q();
2873
+ return en(), Ri(), te(() => {
2411
2874
  t?.onPageLoad?.();
2412
- }, [t]), /* @__PURE__ */ a.jsxs(Wt, { children: [
2413
- /* @__PURE__ */ a.jsx(E.Target, { name: "layout-before-head" }),
2414
- /* @__PURE__ */ a.jsx(Vt, {}),
2415
- /* @__PURE__ */ a.jsx(E.Target, { name: "layout-after-head" }),
2416
- /* @__PURE__ */ a.jsx(
2875
+ }, [t]), /* @__PURE__ */ c.jsxs(tn, { children: [
2876
+ /* @__PURE__ */ c.jsx(N.Target, { name: "layout-before-head" }),
2877
+ /* @__PURE__ */ c.jsx(nn, {}),
2878
+ /* @__PURE__ */ c.jsx(N.Target, { name: "layout-after-head" }),
2879
+ /* @__PURE__ */ c.jsx(
2417
2880
  "div",
2418
2881
  {
2419
- className: x(
2882
+ className: S(
2420
2883
  "grid max-w-screen-2xl w-full lg:mx-auto",
2421
2884
  "[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
2422
2885
  "grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
2423
2886
  ),
2424
- children: /* @__PURE__ */ a.jsx(bt, { fallback: /* @__PURE__ */ a.jsx(mi, {}), children: /* @__PURE__ */ a.jsx(hi, { children: e ?? /* @__PURE__ */ a.jsx($t, {}) }) })
2887
+ children: /* @__PURE__ */ c.jsx(Et, { fallback: /* @__PURE__ */ c.jsx(Wi, {}), children: /* @__PURE__ */ c.jsx(qi, { children: e ?? /* @__PURE__ */ c.jsx(Dt, {}) }) })
2425
2888
  }
2426
2889
  ),
2427
- /* @__PURE__ */ a.jsx(ai, {})
2890
+ /* @__PURE__ */ c.jsx(Ui, {})
2428
2891
  ] });
2429
- }, _i = ({ children: e }) => {
2430
- const { meta: t, options: n } = G(), r = Ce();
2431
- return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2432
- /* @__PURE__ */ a.jsxs(Se, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
2433
- n.canonicalUrlOrigin && /* @__PURE__ */ a.jsx(
2892
+ }, Hi = ({ children: e }) => {
2893
+ const { meta: t, options: n } = q(), r = Le();
2894
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2895
+ /* @__PURE__ */ c.jsxs(Ce, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
2896
+ n.canonicalUrlOrigin && /* @__PURE__ */ c.jsx(
2434
2897
  "link",
2435
2898
  {
2436
2899
  rel: "canonical",
2437
- href: Jt(
2900
+ href: sn(
2438
2901
  n.canonicalUrlOrigin,
2439
2902
  n.basePath,
2440
2903
  r.pathname
2441
2904
  )
2442
2905
  }
2443
2906
  ),
2444
- t?.description && /* @__PURE__ */ a.jsx("meta", { name: "description", content: t.description }),
2445
- t?.favicon && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: t.favicon }),
2446
- t?.generator && /* @__PURE__ */ a.jsx("meta", { name: "generator", content: t.generator }),
2447
- t?.applicationName && /* @__PURE__ */ a.jsx("meta", { name: "application-name", content: t.applicationName }),
2448
- t?.referrer && /* @__PURE__ */ a.jsx("meta", { name: "referrer", content: t.referrer }),
2449
- t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ a.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
2450
- t?.authors?.map((o) => /* @__PURE__ */ a.jsx("meta", { name: "author", content: o }, o)),
2451
- t?.creator && /* @__PURE__ */ a.jsx("meta", { name: "creator", content: t.creator }),
2452
- t?.publisher && /* @__PURE__ */ a.jsx("meta", { name: "publisher", content: t.publisher })
2907
+ t?.description && /* @__PURE__ */ c.jsx("meta", { name: "description", content: t.description }),
2908
+ t?.favicon && /* @__PURE__ */ c.jsx("link", { rel: "icon", href: t.favicon }),
2909
+ t?.generator && /* @__PURE__ */ c.jsx("meta", { name: "generator", content: t.generator }),
2910
+ t?.applicationName && /* @__PURE__ */ c.jsx("meta", { name: "application-name", content: t.applicationName }),
2911
+ t?.referrer && /* @__PURE__ */ c.jsx("meta", { name: "referrer", content: t.referrer }),
2912
+ t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ c.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
2913
+ t?.authors?.map((o) => /* @__PURE__ */ c.jsx("meta", { name: "author", content: o }, o)),
2914
+ t?.creator && /* @__PURE__ */ c.jsx("meta", { name: "creator", content: t.creator }),
2915
+ t?.publisher && /* @__PURE__ */ c.jsx("meta", { name: "publisher", content: t.publisher })
2453
2916
  ] }),
2454
2917
  e
2455
2918
  ] });
2456
- }, vi = ({
2919
+ }, Gi = ({
2457
2920
  title: e = "An error occurred",
2458
2921
  message: t,
2459
2922
  category: n
2460
- }) => /* @__PURE__ */ a.jsxs(Fe, { className: "h-full pt-(--padding-content-top)", children: [
2461
- n && /* @__PURE__ */ a.jsx(Me, { children: n }),
2462
- e && /* @__PURE__ */ a.jsx(Le, { level: 1, className: "flex gap-3.5 items-center", children: e }),
2463
- /* @__PURE__ */ a.jsx("p", { children: t })
2464
- ] }), pt = () => {
2465
- const e = jt();
2466
- return /* @__PURE__ */ a.jsxs(Fe, { className: "h-full pt-(--padding-content-top)", children: [
2467
- /* @__PURE__ */ a.jsx(Me, { children: "404" }),
2468
- /* @__PURE__ */ a.jsxs(Le, { level: 1, className: "flex gap-3.5 items-center", children: [
2923
+ }) => /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
2924
+ n && /* @__PURE__ */ c.jsx(We, { children: n }),
2925
+ e && /* @__PURE__ */ c.jsx(Ve, { level: 1, className: "flex gap-3.5 items-center", children: e }),
2926
+ /* @__PURE__ */ c.jsx("p", { children: t })
2927
+ ] }), kt = () => {
2928
+ const e = Ct();
2929
+ return /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
2930
+ /* @__PURE__ */ c.jsx(We, { children: "404" }),
2931
+ /* @__PURE__ */ c.jsxs(Ve, { level: 1, className: "flex gap-3.5 items-center", children: [
2469
2932
  "Page not found",
2470
- /* @__PURE__ */ a.jsx(Rt, { size: 24 })
2933
+ /* @__PURE__ */ c.jsx(Kt, { size: 24 })
2471
2934
  ] }),
2472
- /* @__PURE__ */ a.jsxs(qt, { children: [
2935
+ /* @__PURE__ */ c.jsxs(rn, { children: [
2473
2936
  "Start by adding a file at",
2474
2937
  " ",
2475
- /* @__PURE__ */ a.jsxs("code", { children: [
2938
+ /* @__PURE__ */ c.jsxs("code", { children: [
2476
2939
  "{DOCUMENT_ROOT}",
2477
2940
  "/",
2478
2941
  e["*"],
@@ -2481,13 +2944,13 @@ const pi = ({
2481
2944
  " ",
2482
2945
  "and add some content to make this error go away. By default",
2483
2946
  " ",
2484
- /* @__PURE__ */ a.jsx("code", { children: "DOCUMENT_ROOT" }),
2947
+ /* @__PURE__ */ c.jsx("code", { children: "DOCUMENT_ROOT" }),
2485
2948
  " is the `pages` directory."
2486
2949
  ] }),
2487
- /* @__PURE__ */ a.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
2488
- /* @__PURE__ */ a.jsx(Pt, { to: "/", children: "Go back home" })
2950
+ /* @__PURE__ */ c.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
2951
+ /* @__PURE__ */ c.jsx(Ut, { to: "/", children: "Go back home" })
2489
2952
  ] });
2490
- }, wi = (e) => {
2953
+ }, Yi = (e) => {
2491
2954
  switch (e) {
2492
2955
  case 400:
2493
2956
  return {
@@ -2550,12 +3013,12 @@ const pi = ({
2550
3013
  message: "Something went wrong while processing your request."
2551
3014
  };
2552
3015
  }
2553
- }, zi = ({ statusCode: e, message: t }) => {
3016
+ }, Qi = ({ statusCode: e, message: t }) => {
2554
3017
  if (e === 404)
2555
- return /* @__PURE__ */ a.jsx(pt, {});
2556
- const n = wi(e);
2557
- return /* @__PURE__ */ a.jsx(
2558
- vi,
3018
+ return /* @__PURE__ */ c.jsx(kt, {});
3019
+ const n = Yi(e);
3020
+ return /* @__PURE__ */ c.jsx(
3021
+ Gi,
2559
3022
  {
2560
3023
  title: n.title,
2561
3024
  message: t ?? n.message,
@@ -2563,46 +3026,46 @@ const pi = ({
2563
3026
  }
2564
3027
  );
2565
3028
  };
2566
- function bi({ className: e }) {
2567
- const t = Et();
2568
- return Tt(t) && t.status === 404 ? /* @__PURE__ */ a.jsx(pt, {}) : /* @__PURE__ */ a.jsx("div", { className: x("mx-4 max-w-2xl", e), children: /* @__PURE__ */ a.jsx(Be, { error: t }) });
3029
+ function Xi({ className: e }) {
3030
+ const t = Ft();
3031
+ return Jt(t) && t.status === 404 ? /* @__PURE__ */ c.jsx(kt, {}) : /* @__PURE__ */ c.jsx("div", { className: S("mx-4 max-w-2xl", e), children: /* @__PURE__ */ c.jsx(qe, { error: t }) });
2569
3032
  }
2570
- function yi({ error: e }) {
2571
- return /* @__PURE__ */ a.jsx(Be, { error: e });
3033
+ function ea({ error: e }) {
3034
+ return /* @__PURE__ */ c.jsx(qe, { error: e });
2572
3035
  }
2573
- const Oe = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype, ht = (e, t) => {
3036
+ const Re = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype, $t = (e, t) => {
2574
3037
  const n = { ...e };
2575
3038
  for (const r of Object.keys(t)) {
2576
- const o = t[r], s = e[r];
2577
- yt(o) || Array.isArray(o) || !Oe(o) ? n[r] = o : Oe(s) ? n[r] = ht(
2578
- s,
3039
+ const o = t[r], i = e[r];
3040
+ Nt(o) || Array.isArray(o) || !Re(o) ? n[r] = o : Re(i) ? n[r] = $t(
3041
+ i,
2579
3042
  o
2580
3043
  ) : n[r] = o;
2581
3044
  }
2582
3045
  return n;
2583
- }, ki = async (e) => {
3046
+ }, ta = async (e) => {
2584
3047
  const t = e.plugins ?? [];
2585
3048
  let n = e;
2586
- for (const r of t.filter(Xt)) {
2587
- const o = (i) => ht(n, i), s = await r.transformConfig?.({
3049
+ for (const r of t.filter(dn)) {
3050
+ const o = (s) => $t(n, s), i = await r.transformConfig?.({
2588
3051
  config: n,
2589
3052
  merge: o
2590
3053
  });
2591
- s && (n = s);
3054
+ i && (n = i);
2592
3055
  }
2593
3056
  return n;
2594
- }, Li = gi, Bi = bi, Mi = yi, Wi = nn, Vi = rn, qi = Ot, Hi = Se, Ji = zi, Ki = ri, Gi = _i, Yi = ki;
3057
+ }, ba = Ki, ka = Xi, $a = ea, ja = hn, xa = mn, Za = Mt, Oa = Ce, Sa = Qi, Pa = Ai, Ta = Hi, Ea = ta;
2595
3058
  export {
2596
- Wi as Bootstrap,
2597
- Vi as BootstrapStatic,
2598
- Ki as BuildCheck,
2599
- Hi as Head,
2600
- Li as Layout,
2601
- Gi as Meta,
2602
- qi as RouteGuard,
2603
- Bi as RouterError,
2604
- Mi as ServerError,
2605
- Ji as StatusPage,
2606
- Yi as runPluginTransformConfig
3059
+ ja as Bootstrap,
3060
+ xa as BootstrapStatic,
3061
+ Pa as BuildCheck,
3062
+ Oa as Head,
3063
+ ba as Layout,
3064
+ Ta as Meta,
3065
+ Za as RouteGuard,
3066
+ ka as RouterError,
3067
+ $a as ServerError,
3068
+ Sa as StatusPage,
3069
+ Ea as runPluginTransformConfig
2607
3070
  };
2608
3071
  //# sourceMappingURL=zudoku.__internal.js.map