zudoku 0.51.0 → 0.52.1

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 (322) hide show
  1. package/dist/config/validators/InputNavigationSchema.d.ts +152 -0
  2. package/dist/config/validators/NavigationSchema.js +1 -1
  3. package/dist/config/validators/NavigationSchema.js.map +1 -1
  4. package/dist/config/validators/icon-types.d.ts +1 -1
  5. package/dist/config/validators/icon-types.js +38 -0
  6. package/dist/config/validators/icon-types.js.map +1 -1
  7. package/dist/config/validators/validate.d.ts +10 -0
  8. package/dist/config/validators/validate.js +7 -0
  9. package/dist/config/validators/validate.js.map +1 -1
  10. package/dist/lib/components/Autocomplete.js +1 -1
  11. package/dist/lib/components/Autocomplete.js.map +1 -1
  12. package/dist/lib/components/ErrorPage.js +2 -2
  13. package/dist/lib/components/ErrorPage.js.map +1 -1
  14. package/dist/lib/components/Markdown.d.ts +0 -1
  15. package/dist/lib/components/Markdown.js +2 -3
  16. package/dist/lib/components/Markdown.js.map +1 -1
  17. package/dist/lib/components/NotFoundPage.js +2 -2
  18. package/dist/lib/components/NotFoundPage.js.map +1 -1
  19. package/dist/lib/components/Pagination.js +1 -1
  20. package/dist/lib/components/Pagination.js.map +1 -1
  21. package/dist/lib/components/Typography.d.ts +5 -0
  22. package/dist/lib/components/Typography.js +8 -0
  23. package/dist/lib/components/Typography.js.map +1 -0
  24. package/dist/lib/components/index.d.ts +4 -0
  25. package/dist/lib/components/index.js +2 -0
  26. package/dist/lib/components/index.js.map +1 -1
  27. package/dist/lib/errors/ErrorAlert.js +2 -3
  28. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  29. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  30. package/dist/lib/hooks/useHotkey.js +58 -0
  31. package/dist/lib/hooks/useHotkey.js.map +1 -0
  32. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
  33. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  34. package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
  35. package/dist/lib/plugins/custom-pages/index.js +1 -3
  36. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  37. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
  38. package/dist/lib/plugins/markdown/MdxPage.js +22 -6
  39. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  40. package/dist/lib/plugins/markdown/index.d.ts +8 -1
  41. package/dist/lib/plugins/markdown/index.js +1 -1
  42. package/dist/lib/plugins/markdown/index.js.map +1 -1
  43. package/dist/lib/plugins/openapi/OperationList.js +2 -3
  44. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  45. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  46. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  47. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  48. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  49. package/dist/lib/plugins/openapi/SchemaList.js +2 -3
  50. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  51. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  52. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  53. package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
  54. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  55. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  56. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  57. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  58. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
  59. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  60. package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
  61. package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
  62. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  63. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  64. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  65. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
  66. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  67. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  68. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  69. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  70. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  71. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  72. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  73. package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
  74. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  75. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  76. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
  78. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  79. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  80. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  81. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  82. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  87. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  88. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  89. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  90. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  91. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
  93. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
  94. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  98. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  99. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  100. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  101. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
  102. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  103. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
  104. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  105. package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
  106. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  107. package/dist/lib/plugins/openapi/schema/utils.js +3 -2
  108. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  109. package/dist/lib/ui/CodeBlock.js +5 -6
  110. package/dist/lib/ui/CodeBlock.js.map +1 -1
  111. package/dist/lib/ui/Dialog.js +1 -1
  112. package/dist/lib/ui/Dialog.js.map +1 -1
  113. package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
  114. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  115. package/dist/lib/ui/Select.js +1 -1
  116. package/dist/lib/util/os.d.ts +2 -0
  117. package/dist/lib/util/os.js +21 -0
  118. package/dist/lib/util/os.js.map +1 -0
  119. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  120. package/dist/lib/util/useCopyToClipboard.js +11 -0
  121. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  122. package/dist/vite/api/SchemaManager.js +6 -2
  123. package/dist/vite/api/SchemaManager.js.map +1 -1
  124. package/dist/vite/api/schema-codegen.js +42 -11
  125. package/dist/vite/api/schema-codegen.js.map +1 -1
  126. package/dist/vite/api/schema-codegen.test.js +82 -0
  127. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  128. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  129. package/dist/vite/mdx/remark-last-modified.js +56 -0
  130. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  131. package/dist/vite/mdx/utils.d.ts +2 -0
  132. package/dist/vite/mdx/utils.js +31 -0
  133. package/dist/vite/mdx/utils.js.map +1 -0
  134. package/dist/vite/plugin-frontmatter.js +4 -2
  135. package/dist/vite/plugin-frontmatter.js.map +1 -1
  136. package/dist/vite/plugin-mdx.js +11 -33
  137. package/dist/vite/plugin-mdx.js.map +1 -1
  138. package/dist/vite/plugin-theme.js +21 -9
  139. package/dist/vite/plugin-theme.js.map +1 -1
  140. package/dist/vite/plugin-theme.test.js +22 -1
  141. package/dist/vite/plugin-theme.test.js.map +1 -1
  142. package/lib/Alert-CT_ViLrJ.js +161 -0
  143. package/lib/Alert-CT_ViLrJ.js.map +1 -0
  144. package/lib/CodeBlock-DAKxs_Tu.js +85 -0
  145. package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
  146. package/lib/Command-CPtGTZAL.js +140 -0
  147. package/lib/Command-CPtGTZAL.js.map +1 -0
  148. package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
  149. package/lib/Dialog-DGlrUTCS.js.map +1 -0
  150. package/lib/MdxPage-D-QSUlMf.js +110 -0
  151. package/lib/MdxPage-D-QSUlMf.js.map +1 -0
  152. package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DKB2uJU-.js} +3 -3
  153. package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DKB2uJU-.js.map} +1 -1
  154. package/lib/{OperationList-Dpip6ozi.js → OperationList-CccIt45w.js} +579 -567
  155. package/lib/OperationList-CccIt45w.js.map +1 -0
  156. package/lib/Pagination-ClHXydm9.js +36 -0
  157. package/lib/Pagination-ClHXydm9.js.map +1 -0
  158. package/lib/RouteGuard-Bd-ppFbi.js +737 -0
  159. package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
  160. package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-DY3FBF2U.js} +26 -37
  161. package/lib/SchemaList-DY3FBF2U.js.map +1 -0
  162. package/lib/{SchemaView-CLxthVcA.js → SchemaView-matL2maR.js} +94 -103
  163. package/lib/SchemaView-matL2maR.js.map +1 -0
  164. package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
  165. package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
  166. package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
  167. package/lib/Slot-DwZlQ-vX.js.map +1 -0
  168. package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
  169. package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
  170. package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
  171. package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
  172. package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
  173. package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
  174. package/lib/{circular-DfOaDE_x.js → circular-CqHpo7-e.js} +2 -2
  175. package/lib/{circular-DfOaDE_x.js.map → circular-CqHpo7-e.js.map} +1 -1
  176. package/lib/clerk-BDZ31hjU.js +25190 -0
  177. package/lib/clerk-BDZ31hjU.js.map +1 -0
  178. package/lib/{createServer-DjOMygls.js → createServer-ByKo3XCG.js} +4 -4
  179. package/lib/{createServer-DjOMygls.js.map → createServer-ByKo3XCG.js.map} +1 -1
  180. package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
  181. package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
  182. package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
  183. package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
  184. package/lib/index-BIbCx5Fh.js +3919 -0
  185. package/lib/index-BIbCx5Fh.js.map +1 -0
  186. package/lib/index-CEfpz8vY.js +3458 -0
  187. package/lib/index-CEfpz8vY.js.map +1 -0
  188. package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
  189. package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
  190. package/lib/index-ClhS5TxS.js +107 -0
  191. package/lib/index-ClhS5TxS.js.map +1 -0
  192. package/lib/ui/CodeBlock.js +6 -73
  193. package/lib/ui/CodeBlock.js.map +1 -1
  194. package/lib/ui/Command.js +1 -1
  195. package/lib/ui/Dialog.js +1 -1
  196. package/lib/ui/Dialog.js.map +1 -1
  197. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  198. package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
  199. package/lib/ui/Select.js +1 -1
  200. package/lib/ui/Select.js.map +1 -1
  201. package/lib/ui/SyntaxHighlight.js +3 -3
  202. package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
  203. package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
  204. package/lib/zudoku.auth-auth0.js +1 -1
  205. package/lib/zudoku.auth-azureb2c.js +2 -2
  206. package/lib/zudoku.auth-clerk.js +3 -3
  207. package/lib/zudoku.auth-openid.js +2 -2
  208. package/lib/zudoku.components.js +33 -3534
  209. package/lib/zudoku.components.js.map +1 -1
  210. package/lib/zudoku.hooks.js +10 -11
  211. package/lib/zudoku.hooks.js.map +1 -1
  212. package/lib/zudoku.plugin-api-catalog.js +6 -6
  213. package/lib/zudoku.plugin-api-keys.js +268 -321
  214. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  215. package/lib/zudoku.plugin-custom-pages.js +8 -20
  216. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  217. package/lib/zudoku.plugin-markdown.js +4 -5
  218. package/lib/zudoku.plugin-markdown.js.map +1 -1
  219. package/lib/zudoku.plugin-openapi.js +3 -3
  220. package/lib/zudoku.plugin-redirect.js +1 -1
  221. package/lib/zudoku.plugin-search-pagefind.js +201 -111
  222. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  223. package/package.json +5 -4
  224. package/src/lib/components/Autocomplete.tsx +1 -0
  225. package/src/lib/components/ErrorPage.tsx +3 -3
  226. package/src/lib/components/Markdown.tsx +3 -5
  227. package/src/lib/components/NotFoundPage.tsx +3 -3
  228. package/src/lib/components/Pagination.tsx +4 -4
  229. package/src/lib/components/Typography.tsx +14 -0
  230. package/src/lib/components/index.ts +2 -0
  231. package/src/lib/errors/ErrorAlert.tsx +3 -9
  232. package/src/lib/hooks/useHotkey.ts +70 -0
  233. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
  234. package/src/lib/plugins/custom-pages/index.tsx +2 -6
  235. package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
  236. package/src/lib/plugins/markdown/index.tsx +10 -2
  237. package/src/lib/plugins/openapi/OperationList.tsx +7 -17
  238. package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
  239. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
  240. package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
  241. package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
  242. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
  243. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  244. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
  245. package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
  246. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
  247. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
  248. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  249. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  250. package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
  251. package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
  252. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  253. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
  254. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  255. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  256. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  257. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  258. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
  259. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
  260. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
  261. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
  262. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
  263. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
  264. package/src/lib/plugins/openapi/schema/utils.ts +3 -2
  265. package/src/lib/ui/CodeBlock.tsx +5 -6
  266. package/src/lib/ui/Dialog.tsx +1 -1
  267. package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
  268. package/src/lib/ui/Select.tsx +1 -1
  269. package/src/lib/util/os.ts +18 -0
  270. package/src/lib/util/useCopyToClipboard.ts +17 -0
  271. package/dist/flat-config.d.ts +0 -320
  272. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  273. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  274. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  275. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  276. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  277. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  278. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  279. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  280. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  281. package/lib/Callout-CoVxYafP.js +0 -231
  282. package/lib/Callout-CoVxYafP.js.map +0 -1
  283. package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
  284. package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
  285. package/lib/Dialog-BxpuVLh9.js.map +0 -1
  286. package/lib/Markdown-BQ8YqLsz.js.map +0 -1
  287. package/lib/MdxPage-DJvKmI-r.js +0 -84
  288. package/lib/MdxPage-DJvKmI-r.js.map +0 -1
  289. package/lib/OperationList-Dpip6ozi.js.map +0 -1
  290. package/lib/Pagination-CCxhL836.js +0 -36
  291. package/lib/Pagination-CCxhL836.js.map +0 -1
  292. package/lib/RouteGuard-gV7nvzi7.js +0 -55
  293. package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
  294. package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
  295. package/lib/SchemaView-CLxthVcA.js.map +0 -1
  296. package/lib/Slot-CSEIvwwO.js +0 -161
  297. package/lib/Slot-CSEIvwwO.js.map +0 -1
  298. package/lib/clerk-yAKDC3Qz.js +0 -24812
  299. package/lib/clerk-yAKDC3Qz.js.map +0 -1
  300. package/lib/index--oeBayMa.js +0 -86
  301. package/lib/index--oeBayMa.js.map +0 -1
  302. package/lib/index-Bn6Lc9tq.js +0 -9
  303. package/lib/index-Bn6Lc9tq.js.map +0 -1
  304. package/lib/index-DW2qmCJa.js +0 -3227
  305. package/lib/index-DW2qmCJa.js.map +0 -1
  306. package/lib/index-QzXzw_ra.js +0 -24
  307. package/lib/index-QzXzw_ra.js.map +0 -1
  308. package/lib/index.esm-BFcSKCe-.js +0 -683
  309. package/lib/index.esm-BFcSKCe-.js.map +0 -1
  310. package/lib/mutation-BpcyTgWI.js +0 -196
  311. package/lib/mutation-BpcyTgWI.js.map +0 -1
  312. package/lib/objectEntries-yMIkr2mI.js +0 -5
  313. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  314. package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
  315. package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
  316. package/lib/useLatest-hmRS46UF.js +0 -11
  317. package/lib/useLatest-hmRS46UF.js.map +0 -1
  318. package/lib/useMutation-N4ockVKi.js +0 -97
  319. package/lib/useMutation-N4ockVKi.js.map +0 -1
  320. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  321. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  322. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
@@ -1,3537 +1,36 @@
1
- import { a as dt, H as xe } from "./index.esm-BFcSKCe-.js";
2
- import { z as ht, J as cn } from "./index--oeBayMa.js";
3
- import { R as un, S as ln, u as se, f as ye, g as dn, L as we, O as ft } from "./chunk-DQRVZFIR-BblmKnHy.js";
4
- import { S as pt, r as mt, Q as hn, n as C, v as Oe, w as Se, x as T, y as fn, z as pn, A as mn, B as gn, D as Ie, E as Te, F as vn, h as Ae, G as De, H as xn, e as gt, I as vt, l as yn, k as E, i as H, J as xt, K as yt, j as F, L as wn, u as _n, d as bn, N as jn, Z as kn, m as zn, C as Zn } from "./hook-CHXroBFt.js";
5
- import { B as wt, R as $n } from "./RouteGuard-gV7nvzi7.js";
6
- import { E as _t, S as N, a as Pn, R as Nn } from "./Slot-CSEIvwwO.js";
7
- import { j as s } from "./jsx-runtime-C5mzlN2N.js";
8
- import { Button as bt } from "./ui/Button.js";
9
- import { Callout as Cn } from "./ui/Callout.js";
10
- import { M as En } from "./mutation-BpcyTgWI.js";
11
- import * as A from "react";
12
- import { createContext as _e, StrictMode as jt, useRef as be, useEffect as M, useState as q, useCallback as On, Suspense as je, memo as kt, Component as Sn, createElement as Re, useMemo as le, useContext as In } from "react";
13
- import * as Tn from "react-dom";
14
- import { CircleFadingArrowUpIcon as An, LoaderCircleIcon as Dn, ExternalLink as Rn, CircleXIcon as Mn, ChevronRightIcon as Un, SearchIcon as Fn, SunIcon as qn, MoonIcon as Ln, MenuIcon as Qn, PanelLeftIcon as Bn } from "lucide-react";
15
- import { C as ie } from "./ClientOnly-E7hGysn1.js";
16
- import { c as $ } from "./cn-wvCW-ho6.js";
17
- import { A as Hn, d as Kn, s as Wn, N as Me, a as Vn, H as Jn, P as Gn, b as Xn, V as Yn, M as er } from "./Markdown-BQ8YqLsz.js";
18
- import { S as zt } from "./Spinner-mNLZ6awP.js";
19
- import { C as tr } from "./CategoryHeading-Cu2RwgjC.js";
20
- import { isSearchPlugin as nr, isProfileMenuPlugin as rr, isNavigationPlugin as Ue, isAuthenticationPlugin as or, isEventConsumerPlugin as sr, needsInitialization as ir, isApiIdentityPlugin as ar, isMdxProviderPlugin as cr, hasHead as ur } from "./zudoku.plugins.js";
21
- import { o as lr } from "./objectEntries-yMIkr2mI.js";
22
- import { B as fe } from "./Button-BE9IVkWV.js";
23
- import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as pr, DropdownMenuSeparator as de, DropdownMenuSub as mr, DropdownMenuSubTrigger as gr, DropdownMenuPortal as vr, DropdownMenuSubContent as xr, DropdownMenuItem as yr } from "./ui/DropdownMenu.js";
24
- import { VisuallyHidden as Zt } from "@radix-ui/react-visually-hidden";
25
- import { D as wr, a as _r, b as $t, c as Pt, d as O } from "./Drawer-BzkOKwgC.js";
26
- import { u as br } from "./react-nprogress.esm-C2MPXjiJ.js";
27
- import { a as jr } from "./index-DI5SPFK9.js";
28
- import { M as kr, u as zr } from "./index-QzXzw_ra.js";
29
- var Zr = class extends pt {
30
- constructor(e = {}) {
31
- super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
32
- }
33
- #e;
34
- build(e, t, n) {
35
- const r = t.queryKey, o = t.queryHash ?? mt(r, t);
36
- let i = this.get(o);
37
- return i || (i = new hn({
38
- client: e,
39
- queryKey: r,
40
- queryHash: o,
41
- options: e.defaultQueryOptions(t),
42
- state: n,
43
- defaultOptions: e.getQueryDefaults(r)
44
- }), this.add(i)), i;
45
- }
46
- add(e) {
47
- this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
48
- type: "added",
49
- query: e
50
- }));
51
- }
52
- remove(e) {
53
- const t = this.#e.get(e.queryHash);
54
- t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
55
- }
56
- clear() {
57
- C.batch(() => {
58
- this.getAll().forEach((e) => {
59
- this.remove(e);
60
- });
61
- });
62
- }
63
- get(e) {
64
- return this.#e.get(e);
65
- }
66
- getAll() {
67
- return [...this.#e.values()];
68
- }
69
- find(e) {
70
- const t = { exact: !0, ...e };
71
- return this.getAll().find(
72
- (n) => Oe(t, n)
73
- );
74
- }
75
- findAll(e = {}) {
76
- const t = this.getAll();
77
- return Object.keys(e).length > 0 ? t.filter((n) => Oe(e, n)) : t;
78
- }
79
- notify(e) {
80
- C.batch(() => {
81
- this.listeners.forEach((t) => {
82
- t(e);
83
- });
84
- });
85
- }
86
- onFocus() {
87
- C.batch(() => {
88
- this.getAll().forEach((e) => {
89
- e.onFocus();
90
- });
91
- });
92
- }
93
- onOnline() {
94
- C.batch(() => {
95
- this.getAll().forEach((e) => {
96
- e.onOnline();
97
- });
98
- });
99
- }
100
- }, $r = class extends pt {
101
- constructor(e = {}) {
102
- super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
103
- }
104
- #e;
105
- #t;
106
- #n;
107
- build(e, t, n) {
108
- const r = new En({
109
- mutationCache: this,
110
- mutationId: ++this.#n,
111
- options: e.defaultMutationOptions(t),
112
- state: n
113
- });
114
- return this.add(r), r;
115
- }
116
- add(e) {
117
- this.#e.add(e);
118
- const t = G(e);
119
- if (typeof t == "string") {
120
- const n = this.#t.get(t);
121
- n ? n.push(e) : this.#t.set(t, [e]);
122
- }
123
- this.notify({ type: "added", mutation: e });
124
- }
125
- remove(e) {
126
- if (this.#e.delete(e)) {
127
- const t = G(e);
128
- if (typeof t == "string") {
129
- const n = this.#t.get(t);
130
- if (n)
131
- if (n.length > 1) {
132
- const r = n.indexOf(e);
133
- r !== -1 && n.splice(r, 1);
134
- } else n[0] === e && this.#t.delete(t);
135
- }
136
- }
137
- this.notify({ type: "removed", mutation: e });
138
- }
139
- canRun(e) {
140
- const t = G(e);
141
- if (typeof t == "string") {
142
- const r = this.#t.get(t)?.find(
143
- (o) => o.state.status === "pending"
144
- );
145
- return !r || r === e;
146
- } else
147
- return !0;
148
- }
149
- runNext(e) {
150
- const t = G(e);
151
- return typeof t == "string" ? this.#t.get(t)?.find((r) => r !== e && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
152
- }
153
- clear() {
154
- C.batch(() => {
155
- this.#e.forEach((e) => {
156
- this.notify({ type: "removed", mutation: e });
157
- }), this.#e.clear(), this.#t.clear();
158
- });
159
- }
160
- getAll() {
161
- return Array.from(this.#e);
162
- }
163
- find(e) {
164
- const t = { exact: !0, ...e };
165
- return this.getAll().find(
166
- (n) => Se(t, n)
167
- );
168
- }
169
- findAll(e = {}) {
170
- return this.getAll().filter((t) => Se(e, t));
171
- }
172
- notify(e) {
173
- C.batch(() => {
174
- this.listeners.forEach((t) => {
175
- t(e);
176
- });
177
- });
178
- }
179
- resumePausedMutations() {
180
- const e = this.getAll().filter((t) => t.state.isPaused);
181
- return C.batch(
182
- () => Promise.all(
183
- e.map((t) => t.continue().catch(T))
184
- )
185
- );
186
- }
187
- };
188
- function G(e) {
189
- return e.options.scope?.id;
190
- }
191
- function Fe(e) {
192
- return {
193
- onFetch: (t, n) => {
194
- const r = t.options, o = t.fetchOptions?.meta?.fetchMore?.direction, i = t.state.data?.pages || [], a = t.state.data?.pageParams || [];
195
- let u = { pages: [], pageParams: [] }, f = 0;
196
- const h = async () => {
197
- let g = !1;
198
- const m = (v) => {
199
- Object.defineProperty(v, "signal", {
200
- enumerable: !0,
201
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
202
- g = !0;
203
- }), t.signal)
204
- });
205
- }, d = fn(t.options, t.fetchOptions), l = async (v, w, P) => {
206
- if (g)
207
- return Promise.reject();
208
- if (w == null && v.pages.length)
209
- return Promise.resolve(v);
210
- const I = {
211
- client: t.client,
212
- queryKey: t.queryKey,
213
- pageParam: w,
214
- direction: P ? "backward" : "forward",
215
- meta: t.options.meta
216
- };
217
- m(I);
218
- const z = await d(
219
- I
220
- ), { maxPages: x } = t.options, b = P ? pn : mn;
221
- return {
222
- pages: b(v.pages, z, x),
223
- pageParams: b(v.pageParams, w, x)
224
- };
225
- };
226
- if (o && i.length) {
227
- const v = o === "backward", w = v ? Pr : qe, P = {
228
- pages: i,
229
- pageParams: a
230
- }, I = w(r, P);
231
- u = await l(P, I, v);
232
- } else {
233
- const v = e ?? i.length;
234
- do {
235
- const w = f === 0 ? a[0] ?? r.initialPageParam : qe(r, u);
236
- if (f > 0 && w == null)
237
- break;
238
- u = await l(u, w), f++;
239
- } while (f < v);
240
- }
241
- return u;
242
- };
243
- t.options.persister ? t.fetchFn = () => t.options.persister?.(
244
- h,
245
- {
246
- client: t.client,
247
- queryKey: t.queryKey,
248
- meta: t.options.meta,
249
- signal: t.signal
250
- },
251
- n
252
- ) : t.fetchFn = h;
253
- }
254
- };
255
- }
256
- function qe(e, { pages: t, pageParams: n }) {
257
- const r = t.length - 1;
258
- return t.length > 0 ? e.getNextPageParam(
259
- t[r],
260
- t,
261
- n[r],
262
- n
263
- ) : void 0;
264
- }
265
- function Pr(e, { pages: t, pageParams: n }) {
266
- return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, n[0], n) : void 0;
267
- }
268
- var Nr = class {
269
- #e;
270
- #t;
271
- #n;
272
- #o;
273
- #s;
274
- #r;
275
- #i;
276
- #a;
277
- constructor(e = {}) {
278
- this.#e = e.queryCache || new Zr(), this.#t = e.mutationCache || new $r(), this.#n = e.defaultOptions || {}, this.#o = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#r = 0;
279
- }
280
- mount() {
281
- this.#r++, this.#r === 1 && (this.#i = gn.subscribe(async (e) => {
282
- e && (await this.resumePausedMutations(), this.#e.onFocus());
283
- }), this.#a = Ie.subscribe(async (e) => {
284
- e && (await this.resumePausedMutations(), this.#e.onOnline());
285
- }));
286
- }
287
- unmount() {
288
- this.#r--, this.#r === 0 && (this.#i?.(), this.#i = void 0, this.#a?.(), this.#a = void 0);
289
- }
290
- isFetching(e) {
291
- return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
292
- }
293
- isMutating(e) {
294
- return this.#t.findAll({ ...e, status: "pending" }).length;
295
- }
296
- /**
297
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
298
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
299
- *
300
- * Hint: Do not use this function inside a component, because it won't receive updates.
301
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
302
- */
303
- getQueryData(e) {
304
- const t = this.defaultQueryOptions({ queryKey: e });
305
- return this.#e.get(t.queryHash)?.state.data;
306
- }
307
- ensureQueryData(e) {
308
- const t = this.defaultQueryOptions(e), n = this.#e.build(this, t), r = n.state.data;
309
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(Te(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
310
- }
311
- getQueriesData(e) {
312
- return this.#e.findAll(e).map(({ queryKey: t, state: n }) => {
313
- const r = n.data;
314
- return [t, r];
315
- });
316
- }
317
- setQueryData(e, t, n) {
318
- const r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(
319
- r.queryHash
320
- )?.state.data, a = vn(t, i);
321
- if (a !== void 0)
322
- return this.#e.build(this, r).setData(a, { ...n, manual: !0 });
323
- }
324
- setQueriesData(e, t, n) {
325
- return C.batch(
326
- () => this.#e.findAll(e).map(({ queryKey: r }) => [
327
- r,
328
- this.setQueryData(r, t, n)
329
- ])
330
- );
331
- }
332
- getQueryState(e) {
333
- const t = this.defaultQueryOptions({ queryKey: e });
334
- return this.#e.get(
335
- t.queryHash
336
- )?.state;
337
- }
338
- removeQueries(e) {
339
- const t = this.#e;
340
- C.batch(() => {
341
- t.findAll(e).forEach((n) => {
342
- t.remove(n);
343
- });
344
- });
345
- }
346
- resetQueries(e, t) {
347
- const n = this.#e;
348
- return C.batch(() => (n.findAll(e).forEach((r) => {
349
- r.reset();
350
- }), this.refetchQueries(
351
- {
352
- type: "active",
353
- ...e
354
- },
355
- t
356
- )));
357
- }
358
- cancelQueries(e, t = {}) {
359
- const n = { revert: !0, ...t }, r = C.batch(
360
- () => this.#e.findAll(e).map((o) => o.cancel(n))
361
- );
362
- return Promise.all(r).then(T).catch(T);
363
- }
364
- invalidateQueries(e, t = {}) {
365
- return C.batch(() => (this.#e.findAll(e).forEach((n) => {
366
- n.invalidate();
367
- }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
368
- {
369
- ...e,
370
- type: e?.refetchType ?? e?.type ?? "active"
371
- },
372
- t
373
- )));
374
- }
375
- refetchQueries(e, t = {}) {
376
- const n = {
377
- ...t,
378
- cancelRefetch: t.cancelRefetch ?? !0
379
- }, r = C.batch(
380
- () => this.#e.findAll(e).filter((o) => !o.isDisabled()).map((o) => {
381
- let i = o.fetch(void 0, n);
382
- return n.throwOnError || (i = i.catch(T)), o.state.fetchStatus === "paused" ? Promise.resolve() : i;
383
- })
384
- );
385
- return Promise.all(r).then(T);
386
- }
387
- fetchQuery(e) {
388
- const t = this.defaultQueryOptions(e);
389
- t.retry === void 0 && (t.retry = !1);
390
- const n = this.#e.build(this, t);
391
- return n.isStaleByTime(
392
- Te(t.staleTime, n)
393
- ) ? n.fetch(t) : Promise.resolve(n.state.data);
394
- }
395
- prefetchQuery(e) {
396
- return this.fetchQuery(e).then(T).catch(T);
397
- }
398
- fetchInfiniteQuery(e) {
399
- return e.behavior = Fe(e.pages), this.fetchQuery(e);
400
- }
401
- prefetchInfiniteQuery(e) {
402
- return this.fetchInfiniteQuery(e).then(T).catch(T);
403
- }
404
- ensureInfiniteQueryData(e) {
405
- return e.behavior = Fe(e.pages), this.ensureQueryData(e);
406
- }
407
- resumePausedMutations() {
408
- return Ie.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
409
- }
410
- getQueryCache() {
411
- return this.#e;
412
- }
413
- getMutationCache() {
414
- return this.#t;
415
- }
416
- getDefaultOptions() {
417
- return this.#n;
418
- }
419
- setDefaultOptions(e) {
420
- this.#n = e;
421
- }
422
- setQueryDefaults(e, t) {
423
- this.#o.set(Ae(e), {
424
- queryKey: e,
425
- defaultOptions: t
426
- });
427
- }
428
- getQueryDefaults(e) {
429
- const t = [...this.#o.values()], n = {};
430
- return t.forEach((r) => {
431
- De(e, r.queryKey) && Object.assign(n, r.defaultOptions);
432
- }), n;
433
- }
434
- setMutationDefaults(e, t) {
435
- this.#s.set(Ae(e), {
436
- mutationKey: e,
437
- defaultOptions: t
438
- });
439
- }
440
- getMutationDefaults(e) {
441
- const t = [...this.#s.values()], n = {};
442
- return t.forEach((r) => {
443
- De(e, r.mutationKey) && Object.assign(n, r.defaultOptions);
444
- }), n;
445
- }
446
- defaultQueryOptions(e) {
447
- if (e._defaulted)
448
- return e;
449
- const t = {
450
- ...this.#n.queries,
451
- ...this.getQueryDefaults(e.queryKey),
452
- ...e,
453
- _defaulted: !0
454
- };
455
- return t.queryHash || (t.queryHash = mt(
456
- t.queryKey,
457
- t
458
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === xn && (t.enabled = !1), t;
459
- }
460
- defaultMutationOptions(e) {
461
- return e?._defaulted ? e : {
462
- ...this.#n.mutations,
463
- ...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
464
- ...e,
465
- _defaulted: !0
466
- };
467
- }
468
- clear() {
469
- this.#e.clear(), this.#t.clear();
470
- }
471
- };
472
- function Cr(e) {
473
- return e;
474
- }
475
- function Le(e, t, n) {
476
- if (typeof t != "object" || t === null)
477
- return;
478
- const r = e.getMutationCache(), o = e.getQueryCache(), i = n?.defaultOptions?.deserializeData ?? e.getDefaultOptions().hydrate?.deserializeData ?? Cr, a = t.mutations || [], u = t.queries || [];
479
- a.forEach(({ state: f, ...h }) => {
480
- r.build(
481
- e,
482
- {
483
- ...e.getDefaultOptions().hydrate?.mutations,
484
- ...n?.defaultOptions?.mutations,
485
- ...h
486
- },
487
- f
488
- );
489
- }), u.forEach(({ queryKey: f, state: h, queryHash: g, meta: m, promise: d }) => {
490
- let l = o.get(g);
491
- const v = h.data === void 0 ? h.data : i(h.data);
492
- if (l) {
493
- if (l.state.dataUpdatedAt < h.dataUpdatedAt) {
494
- const { fetchStatus: w, ...P } = h;
495
- l.setState({
496
- ...P,
497
- data: v
498
- });
499
- }
500
- } else
501
- l = o.build(
502
- e,
503
- {
504
- ...e.getDefaultOptions().hydrate?.queries,
505
- ...n?.defaultOptions?.queries,
506
- queryKey: f,
507
- queryHash: g,
508
- meta: m
509
- },
510
- // Reset fetch status to idle to avoid
511
- // query being stuck in fetching state upon hydration
512
- {
513
- ...h,
514
- data: v,
515
- fetchStatus: "idle"
516
- }
517
- );
518
- if (d) {
519
- const w = Promise.resolve(d).then(i);
520
- l.fetch(void 0, { initialPromise: w });
521
- }
522
- });
523
- }
524
- var Qe = (e, t) => typeof e == "object" && e !== null && t in e, Er = ({
525
- children: e,
526
- options: t = {},
527
- state: n,
528
- queryClient: r
529
- }) => {
530
- const o = gt(r), [i, a] = A.useState(), u = A.useRef(t);
531
- return u.current = t, A.useMemo(() => {
532
- if (n) {
533
- if (typeof n != "object")
534
- return;
535
- const f = o.getQueryCache(), h = n.queries || [], g = [], m = [];
536
- for (const d of h) {
537
- const l = f.get(d.queryHash);
538
- if (!l)
539
- g.push(d);
540
- else {
541
- const v = d.state.dataUpdatedAt > l.state.dataUpdatedAt || // RSC special serialized then-able chunks
542
- Qe(d.promise, "status") && Qe(l.promise, "status") && d.promise.status !== l.promise.status, w = i?.find(
543
- (P) => P.queryHash === d.queryHash
544
- );
545
- v && (!w || d.state.dataUpdatedAt > w.state.dataUpdatedAt) && m.push(d);
546
- }
547
- }
548
- g.length > 0 && Le(o, { queries: g }, u.current), m.length > 0 && a(
549
- (d) => d ? [...d, ...m] : m
550
- );
551
- }
552
- }, [o, i, n]), A.useEffect(() => {
553
- i && (Le(o, { queries: i }, u.current), a(void 0));
554
- }, [o, i]), e;
555
- };
556
- function Or({ error: e }) {
557
- return /* @__PURE__ */ s.jsx(_t, { error: e });
558
- }
559
- /**
560
- * react-router v7.6.1
561
- *
562
- * Copyright (c) Remix Software Inc.
563
- *
564
- * This source code is licensed under the MIT license found in the
565
- * LICENSE.md file in the root directory of this source tree.
566
- *
567
- * @license MIT
568
- */
569
- function Sr(e) {
570
- return /* @__PURE__ */ A.createElement(un, { flushSync: Tn.flushSync, ...e });
571
- }
572
- const pe = _e({ stagger: !1 }), Ir = new Nr({
573
- defaultOptions: {
574
- queries: {
575
- staleTime: 1e3 * 60 * 5
576
- }
577
- }
578
- }), Tr = ({
579
- router: e,
580
- hydrate: t = !1
581
- }) => /* @__PURE__ */ s.jsx(jt, { children: /* @__PURE__ */ s.jsx(vt, { client: Ir, children: /* @__PURE__ */ s.jsx(Er, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ s.jsx(wt, { value: !1, children: /* @__PURE__ */ s.jsx(dt, { children: /* @__PURE__ */ s.jsx(pe.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ s.jsx(Sr, { router: e }) }) }) }) }) }) }), Ar = ({
582
- router: e,
583
- context: t,
584
- queryClient: n,
585
- helmetContext: r,
586
- bypassProtection: o = !1
587
- }) => /* @__PURE__ */ s.jsx(jt, { children: /* @__PURE__ */ s.jsx(vt, { client: n, children: /* @__PURE__ */ s.jsx(dt, { context: r, children: /* @__PURE__ */ s.jsx(wt, { value: o, children: /* @__PURE__ */ s.jsx(ln, { router: e, context: t }) }) }) }) });
588
- function c(e, t, n) {
589
- function r(u, f) {
590
- var h;
591
- Object.defineProperty(u, "_zod", {
592
- value: u._zod ?? {},
593
- enumerable: !1
594
- }), (h = u._zod).traits ?? (h.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, f);
595
- for (const g in a.prototype)
596
- g in u || Object.defineProperty(u, g, { value: a.prototype[g].bind(u) });
597
- u._zod.constr = a, u._zod.def = f;
598
- }
599
- const o = n?.Parent ?? Object;
600
- class i extends o {
601
- }
602
- Object.defineProperty(i, "name", { value: e });
603
- function a(u) {
604
- var f;
605
- const h = n?.Parent ? new i() : this;
606
- r(h, u), (f = h._zod).deferred ?? (f.deferred = []);
607
- for (const g of h._zod.deferred)
608
- g();
609
- return h;
610
- }
611
- return Object.defineProperty(a, "init", { value: r }), Object.defineProperty(a, Symbol.hasInstance, {
612
- value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
613
- }), Object.defineProperty(a, "name", { value: e }), a;
614
- }
615
- class K extends Error {
616
- constructor() {
617
- super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
618
- }
619
- }
620
- const Nt = {};
621
- function D(e) {
622
- return Nt;
623
- }
624
- function Dr(e) {
625
- const t = Object.values(e).filter((r) => typeof r == "number");
626
- return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
627
- }
628
- function Rr(e, t) {
629
- return typeof t == "bigint" ? t.toString() : t;
630
- }
631
- function Ct(e) {
632
- return {
633
- get value() {
634
- {
635
- const t = e();
636
- return Object.defineProperty(this, "value", { value: t }), t;
637
- }
638
- }
639
- };
640
- }
641
- function ke(e) {
642
- return e == null;
643
- }
644
- function ze(e) {
645
- const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
646
- return e.slice(t, n);
647
- }
648
- function j(e, t, n) {
649
- Object.defineProperty(e, t, {
650
- get() {
651
- {
652
- const r = n();
653
- return e[t] = r, r;
654
- }
655
- },
656
- set(r) {
657
- Object.defineProperty(e, t, {
658
- value: r
659
- // configurable: true,
660
- });
661
- },
662
- configurable: !0
663
- });
664
- }
665
- function Ze(e, t, n) {
666
- Object.defineProperty(e, t, {
667
- value: n,
668
- writable: !0,
669
- enumerable: !0,
670
- configurable: !0
671
- });
672
- }
673
- function Et(e = 10) {
674
- const t = "abcdefghijklmnopqrstuvwxyz";
675
- let n = "";
676
- for (let r = 0; r < e; r++)
677
- n += t[Math.floor(Math.random() * t.length)];
678
- return n;
679
- }
680
- function Q(e) {
681
- return JSON.stringify(e);
682
- }
683
- function me(e) {
684
- return typeof e == "object" && e !== null && !Array.isArray(e);
685
- }
686
- const Mr = Ct(() => {
687
- try {
688
- const e = Function;
689
- return new e(""), !0;
690
- } catch {
691
- return !1;
692
- }
693
- });
694
- function Be(e) {
695
- if (me(e) === !1)
696
- return !1;
697
- const t = e.constructor;
698
- if (t === void 0)
699
- return !0;
700
- const n = t.prototype;
701
- return !(me(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
702
- }
703
- const Ur = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
704
- function ae(e) {
705
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
706
- }
707
- function U(e, t, n) {
708
- const r = new e._zod.constr(t ?? e._zod.def);
709
- return (!t || n?.parent) && (r._zod.parent = e), r;
710
- }
711
- function p(e) {
712
- const t = e;
713
- if (!t)
714
- return {};
715
- if (typeof t == "string")
716
- return { error: () => t };
717
- if (t?.message !== void 0) {
718
- if (t?.error !== void 0)
719
- throw new Error("Cannot specify both `message` and `error` params");
720
- t.error = t.message;
721
- }
722
- return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
723
- }
724
- function Fr(e) {
725
- return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
726
- }
727
- function qr(e, t) {
728
- const n = {}, r = e._zod.def;
729
- for (const o in t) {
730
- if (!(o in r.shape))
731
- throw new Error(`Unrecognized key: "${o}"`);
732
- t[o] && (n[o] = r.shape[o]);
733
- }
734
- return U(e, {
735
- ...e._zod.def,
736
- shape: n,
737
- checks: []
738
- });
739
- }
740
- function Lr(e, t) {
741
- const n = { ...e._zod.def.shape }, r = e._zod.def;
742
- for (const o in t) {
743
- if (!(o in r.shape))
744
- throw new Error(`Unrecognized key: "${o}"`);
745
- t[o] && delete n[o];
746
- }
747
- return U(e, {
748
- ...e._zod.def,
749
- shape: n,
750
- checks: []
751
- });
752
- }
753
- function Qr(e, t) {
754
- const n = {
755
- ...e._zod.def,
756
- get shape() {
757
- const r = { ...e._zod.def.shape, ...t };
758
- return Ze(this, "shape", r), r;
759
- },
760
- checks: []
761
- // delete existing checks
762
- };
763
- return U(e, n);
764
- }
765
- function Br(e, t) {
766
- return U(e, {
767
- ...e._zod.def,
768
- get shape() {
769
- const n = { ...e._zod.def.shape, ...t._zod.def.shape };
770
- return Ze(this, "shape", n), n;
771
- },
772
- catchall: t._zod.def.catchall,
773
- checks: []
774
- // delete existing checks
775
- });
776
- }
777
- function Hr(e, t, n) {
778
- const r = t._zod.def.shape, o = { ...r };
779
- if (n)
780
- for (const i in n) {
781
- if (!(i in r))
782
- throw new Error(`Unrecognized key: "${i}"`);
783
- n[i] && (o[i] = e ? new e({
784
- type: "optional",
785
- innerType: r[i]
786
- }) : r[i]);
787
- }
788
- else
789
- for (const i in r)
790
- o[i] = e ? new e({
791
- type: "optional",
792
- innerType: r[i]
793
- }) : r[i];
794
- return U(t, {
795
- ...t._zod.def,
796
- shape: o,
797
- checks: []
798
- });
799
- }
800
- function Kr(e, t, n) {
801
- const r = t._zod.def.shape, o = { ...r };
802
- if (n)
803
- for (const i in n) {
804
- if (!(i in o))
805
- throw new Error(`Unrecognized key: "${i}"`);
806
- n[i] && (o[i] = new e({
807
- type: "nonoptional",
808
- innerType: r[i]
809
- }));
810
- }
811
- else
812
- for (const i in r)
813
- o[i] = new e({
814
- type: "nonoptional",
815
- innerType: r[i]
816
- });
817
- return U(t, {
818
- ...t._zod.def,
819
- shape: o,
820
- // optional: [],
821
- checks: []
822
- });
823
- }
824
- function B(e, t = 0) {
825
- for (let n = t; n < e.issues.length; n++)
826
- if (e.issues[n].continue !== !0)
827
- return !0;
828
- return !1;
829
- }
830
- function $e(e, t) {
831
- return t.map((n) => {
832
- var r;
833
- return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
834
- });
835
- }
836
- function X(e) {
837
- return typeof e == "string" ? e : e?.message;
838
- }
839
- function R(e, t, n) {
840
- const r = { ...e, path: e.path ?? [] };
841
- if (!e.message) {
842
- const o = X(e.inst?._zod.def?.error?.(e)) ?? X(t?.error?.(e)) ?? X(n.customError?.(e)) ?? X(n.localeError?.(e)) ?? "Invalid input";
843
- r.message = o;
844
- }
845
- return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
846
- }
847
- function Pe(e) {
848
- return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
849
- }
850
- function W(...e) {
851
- const [t, n, r] = e;
852
- return typeof t == "string" ? {
853
- message: t,
854
- code: "custom",
855
- input: n,
856
- inst: r
857
- } : { ...t };
858
- }
859
- const Ot = (e, t) => {
860
- e.name = "$ZodError", Object.defineProperty(e, "_zod", {
861
- value: e._zod,
862
- enumerable: !1
863
- }), Object.defineProperty(e, "issues", {
864
- value: t,
865
- enumerable: !1
866
- }), Object.defineProperty(e, "message", {
867
- get() {
868
- return JSON.stringify(t, Rr, 2);
869
- },
870
- enumerable: !0
871
- // configurable: false,
872
- });
873
- }, St = c("$ZodError", Ot), It = c("$ZodError", Ot, { Parent: Error });
874
- function Wr(e, t = (n) => n.message) {
875
- const n = {}, r = [];
876
- for (const o of e.issues)
877
- o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
878
- return { formErrors: r, fieldErrors: n };
879
- }
880
- function Vr(e, t) {
881
- const n = t || function(i) {
882
- return i.message;
883
- }, r = { _errors: [] }, o = (i) => {
884
- for (const a of i.issues)
885
- if (a.code === "invalid_union" && a.errors.length)
886
- a.errors.map((u) => o({ issues: u }));
887
- else if (a.code === "invalid_key")
888
- o({ issues: a.issues });
889
- else if (a.code === "invalid_element")
890
- o({ issues: a.issues });
891
- else if (a.path.length === 0)
892
- r._errors.push(n(a));
893
- else {
894
- let u = r, f = 0;
895
- for (; f < a.path.length; ) {
896
- const h = a.path[f];
897
- f === a.path.length - 1 ? (u[h] = u[h] || { _errors: [] }, u[h]._errors.push(n(a))) : u[h] = u[h] || { _errors: [] }, u = u[h], f++;
898
- }
899
- }
900
- };
901
- return o(e), r;
902
- }
903
- const Jr = (e) => (t, n, r, o) => {
904
- const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i);
905
- if (a instanceof Promise)
906
- throw new K();
907
- if (a.issues.length) {
908
- const u = new (o?.Err ?? e)(a.issues.map((f) => R(f, i, D())));
909
- throw Error.captureStackTrace(u, o?.callee), u;
910
- }
911
- return a.value;
912
- }, Gr = (e) => async (t, n, r, o) => {
913
- const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
914
- let a = t._zod.run({ value: n, issues: [] }, i);
915
- if (a instanceof Promise && (a = await a), a.issues.length) {
916
- const u = new (o?.Err ?? e)(a.issues.map((f) => R(f, i, D())));
917
- throw Error.captureStackTrace(u, o?.callee), u;
918
- }
919
- return a.value;
920
- }, Tt = (e) => (t, n, r) => {
921
- const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
922
- if (i instanceof Promise)
923
- throw new K();
924
- return i.issues.length ? {
925
- success: !1,
926
- error: new (e ?? St)(i.issues.map((a) => R(a, o, D())))
927
- } : { success: !0, data: i.value };
928
- }, Xr = /* @__PURE__ */ Tt(It), At = (e) => async (t, n, r) => {
929
- const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
930
- let i = t._zod.run({ value: n, issues: [] }, o);
931
- return i instanceof Promise && (i = await i), i.issues.length ? {
932
- success: !1,
933
- error: new e(i.issues.map((a) => R(a, o, D())))
934
- } : { success: !0, data: i.value };
935
- }, Yr = /* @__PURE__ */ At(It), eo = /^[cC][^\s-]{8,}$/, to = /^[0-9a-z]+$/, no = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ro = /^[0-9a-vA-V]{20}$/, oo = /^[A-Za-z0-9]{27}$/, so = /^[a-zA-Z0-9_-]{21}$/, io = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ao = /^([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})$/, He = (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)$/, co = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, uo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
936
- function lo() {
937
- return new RegExp(uo, "u");
938
- }
939
- const ho = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, fo = /^(([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})$/, po = /^((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])$/, mo = /^(([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])$/, go = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Dt = /^[A-Za-z0-9_-]*$/, vo = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, xo = /^\+(?:[0-9]){6,14}[0-9]$/, Rt = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", yo = /* @__PURE__ */ new RegExp(`^${Rt}$`);
940
- function Mt(e) {
941
- let t = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
942
- return e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`), t;
943
- }
944
- function wo(e) {
945
- return new RegExp(`^${Mt(e)}$`);
946
- }
947
- function _o(e) {
948
- let t = `${Rt}T${Mt(e)}`;
949
- const n = [];
950
- return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, new RegExp(`^${t}$`);
951
- }
952
- const bo = (e) => {
953
- const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
954
- return new RegExp(`^${t}$`);
955
- }, jo = /^[^A-Z]*$/, ko = /^[^a-z]*$/, S = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
956
- var n;
957
- e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
958
- }), zo = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
959
- S.init(e, t), e._zod.when = (n) => {
960
- const r = n.value;
961
- return !ke(r) && r.length !== void 0;
962
- }, e._zod.onattach.push((n) => {
963
- const r = n._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
964
- t.maximum < r && (n._zod.bag.maximum = t.maximum);
965
- }), e._zod.check = (n) => {
966
- const r = n.value;
967
- if (r.length <= t.maximum)
968
- return;
969
- const i = Pe(r);
970
- n.issues.push({
971
- origin: i,
972
- code: "too_big",
973
- maximum: t.maximum,
974
- inclusive: !0,
975
- input: r,
976
- inst: e,
977
- continue: !t.abort
978
- });
979
- };
980
- }), Zo = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
981
- S.init(e, t), e._zod.when = (n) => {
982
- const r = n.value;
983
- return !ke(r) && r.length !== void 0;
984
- }, e._zod.onattach.push((n) => {
985
- const r = n._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
986
- t.minimum > r && (n._zod.bag.minimum = t.minimum);
987
- }), e._zod.check = (n) => {
988
- const r = n.value;
989
- if (r.length >= t.minimum)
990
- return;
991
- const i = Pe(r);
992
- n.issues.push({
993
- origin: i,
994
- code: "too_small",
995
- minimum: t.minimum,
996
- inclusive: !0,
997
- input: r,
998
- inst: e,
999
- continue: !t.abort
1000
- });
1001
- };
1002
- }), $o = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
1003
- S.init(e, t), e._zod.when = (n) => {
1004
- const r = n.value;
1005
- return !ke(r) && r.length !== void 0;
1006
- }, e._zod.onattach.push((n) => {
1007
- const r = n._zod.bag;
1008
- r.minimum = t.length, r.maximum = t.length, r.length = t.length;
1009
- }), e._zod.check = (n) => {
1010
- const r = n.value, o = r.length;
1011
- if (o === t.length)
1012
- return;
1013
- const i = Pe(r), a = o > t.length;
1014
- n.issues.push({
1015
- origin: i,
1016
- ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
1017
- input: n.value,
1018
- inst: e,
1019
- continue: !t.abort
1020
- });
1021
- };
1022
- }), ce = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
1023
- var n;
1024
- S.init(e, t), e._zod.onattach.push((r) => {
1025
- const o = r._zod.bag;
1026
- o.format = t.format, t.pattern && (o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t.pattern));
1027
- }), (n = e._zod).check ?? (n.check = (r) => {
1028
- if (!t.pattern)
1029
- throw new Error("Not implemented.");
1030
- t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
1031
- origin: "string",
1032
- code: "invalid_format",
1033
- format: t.format,
1034
- input: r.value,
1035
- ...t.pattern ? { pattern: t.pattern.toString() } : {},
1036
- inst: e,
1037
- continue: !t.abort
1038
- });
1039
- });
1040
- }), Po = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
1041
- ce.init(e, t), e._zod.check = (n) => {
1042
- t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1043
- origin: "string",
1044
- code: "invalid_format",
1045
- format: "regex",
1046
- input: n.value,
1047
- pattern: t.pattern.toString(),
1048
- inst: e,
1049
- continue: !t.abort
1050
- });
1051
- };
1052
- }), No = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
1053
- t.pattern ?? (t.pattern = jo), ce.init(e, t);
1054
- }), Co = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
1055
- t.pattern ?? (t.pattern = ko), ce.init(e, t);
1056
- }), Eo = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
1057
- S.init(e, t);
1058
- const n = ae(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1059
- t.pattern = r, e._zod.onattach.push((o) => {
1060
- const i = o._zod.bag;
1061
- i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
1062
- }), e._zod.check = (o) => {
1063
- o.value.includes(t.includes, t.position) || o.issues.push({
1064
- origin: "string",
1065
- code: "invalid_format",
1066
- format: "includes",
1067
- includes: t.includes,
1068
- input: o.value,
1069
- inst: e,
1070
- continue: !t.abort
1071
- });
1072
- };
1073
- }), Oo = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
1074
- S.init(e, t);
1075
- const n = new RegExp(`^${ae(t.prefix)}.*`);
1076
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1077
- const o = r._zod.bag;
1078
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
1079
- }), e._zod.check = (r) => {
1080
- r.value.startsWith(t.prefix) || r.issues.push({
1081
- origin: "string",
1082
- code: "invalid_format",
1083
- format: "starts_with",
1084
- prefix: t.prefix,
1085
- input: r.value,
1086
- inst: e,
1087
- continue: !t.abort
1088
- });
1089
- };
1090
- }), So = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
1091
- S.init(e, t);
1092
- const n = new RegExp(`.*${ae(t.suffix)}$`);
1093
- t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1094
- const o = r._zod.bag;
1095
- o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
1096
- }), e._zod.check = (r) => {
1097
- r.value.endsWith(t.suffix) || r.issues.push({
1098
- origin: "string",
1099
- code: "invalid_format",
1100
- format: "ends_with",
1101
- suffix: t.suffix,
1102
- input: r.value,
1103
- inst: e,
1104
- continue: !t.abort
1105
- });
1106
- };
1107
- }), Io = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
1108
- S.init(e, t), e._zod.check = (n) => {
1109
- n.value = t.tx(n.value);
1110
- };
1111
- });
1112
- class To {
1113
- constructor(t = []) {
1114
- this.content = [], this.indent = 0, this && (this.args = t);
1115
- }
1116
- indented(t) {
1117
- this.indent += 1, t(this), this.indent -= 1;
1118
- }
1119
- write(t) {
1120
- if (typeof t == "function") {
1121
- t(this, { execution: "sync" }), t(this, { execution: "async" });
1122
- return;
1123
- }
1124
- const r = t.split(`
1125
- `).filter((a) => a), o = Math.min(...r.map((a) => a.length - a.trimStart().length)), i = r.map((a) => a.slice(o)).map((a) => " ".repeat(this.indent * 2) + a);
1126
- for (const a of i)
1127
- this.content.push(a);
1128
- }
1129
- compile() {
1130
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
1131
- return new t(...n, o.join(`
1132
- `));
1133
- }
1134
- }
1135
- const Ao = {
1136
- major: 4,
1137
- minor: 0,
1138
- patch: 0
1139
- }, k = /* @__PURE__ */ c("$ZodType", (e, t) => {
1140
- var n;
1141
- e ?? (e = {}), e._zod.id = t.type + "_" + Et(10), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ao;
1142
- const r = [...e._zod.def.checks ?? []];
1143
- e._zod.traits.has("$ZodCheck") && r.unshift(e);
1144
- for (const o of r)
1145
- for (const i of o._zod.onattach)
1146
- i(e);
1147
- if (r.length === 0)
1148
- (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1149
- e._zod.run = e._zod.parse;
1150
- });
1151
- else {
1152
- const o = (i, a, u) => {
1153
- let f = B(i), h;
1154
- for (const g of a) {
1155
- if (g._zod.when) {
1156
- if (!g._zod.when(i))
1157
- continue;
1158
- } else if (f)
1159
- continue;
1160
- const m = i.issues.length, d = g._zod.check(i);
1161
- if (d instanceof Promise && u?.async === !1)
1162
- throw new K();
1163
- if (h || d instanceof Promise)
1164
- h = (h ?? Promise.resolve()).then(async () => {
1165
- await d, i.issues.length !== m && (f || (f = B(i, m)));
1166
- });
1167
- else {
1168
- if (i.issues.length === m)
1169
- continue;
1170
- f || (f = B(i, m));
1171
- }
1172
- }
1173
- return h ? h.then(() => i) : i;
1174
- };
1175
- e._zod.run = (i, a) => {
1176
- const u = e._zod.parse(i, a);
1177
- if (u instanceof Promise) {
1178
- if (a.async === !1)
1179
- throw new K();
1180
- return u.then((f) => o(f, r, a));
1181
- }
1182
- return o(u, r, a);
1183
- };
1184
- }
1185
- e["~standard"] = {
1186
- validate: (o) => {
1187
- try {
1188
- const i = Xr(e, o);
1189
- return i.success ? { value: i.data } : { issues: i.error?.issues };
1190
- } catch {
1191
- return Yr(e, o).then((a) => a.success ? { value: a.data } : { issues: a.error?.issues });
1192
- }
1193
- },
1194
- vendor: "zod",
1195
- version: 1
1196
- };
1197
- }), Ne = /* @__PURE__ */ c("$ZodString", (e, t) => {
1198
- k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? bo(e._zod.bag), e._zod.parse = (n, r) => {
1199
- if (t.coerce)
1200
- try {
1201
- n.value = String(n.value);
1202
- } catch {
1203
- }
1204
- return typeof n.value == "string" || n.issues.push({
1205
- expected: "string",
1206
- code: "invalid_type",
1207
- input: n.value,
1208
- inst: e
1209
- }), n;
1210
- };
1211
- }), y = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
1212
- ce.init(e, t), Ne.init(e, t);
1213
- }), Do = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
1214
- t.pattern ?? (t.pattern = ao), y.init(e, t);
1215
- }), Ro = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
1216
- if (t.version) {
1217
- const r = {
1218
- v1: 1,
1219
- v2: 2,
1220
- v3: 3,
1221
- v4: 4,
1222
- v5: 5,
1223
- v6: 6,
1224
- v7: 7,
1225
- v8: 8
1226
- }[t.version];
1227
- if (r === void 0)
1228
- throw new Error(`Invalid UUID version: "${t.version}"`);
1229
- t.pattern ?? (t.pattern = He(r));
1230
- } else
1231
- t.pattern ?? (t.pattern = He());
1232
- y.init(e, t);
1233
- }), Mo = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
1234
- t.pattern ?? (t.pattern = co), y.init(e, t);
1235
- }), Uo = /* @__PURE__ */ c("$ZodURL", (e, t) => {
1236
- y.init(e, t), e._zod.check = (n) => {
1237
- try {
1238
- const r = new URL(n.value);
1239
- t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(r.hostname) || n.issues.push({
1240
- code: "invalid_format",
1241
- format: "url",
1242
- note: "Invalid hostname",
1243
- pattern: vo.source,
1244
- input: n.value,
1245
- inst: e,
1246
- continue: !t.abort
1247
- })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(r.protocol.endsWith(":") ? r.protocol.slice(0, -1) : r.protocol) || n.issues.push({
1248
- code: "invalid_format",
1249
- format: "url",
1250
- note: "Invalid protocol",
1251
- pattern: t.protocol.source,
1252
- input: n.value,
1253
- inst: e,
1254
- continue: !t.abort
1255
- }));
1256
- return;
1257
- } catch {
1258
- n.issues.push({
1259
- code: "invalid_format",
1260
- format: "url",
1261
- input: n.value,
1262
- inst: e,
1263
- continue: !t.abort
1264
- });
1265
- }
1266
- };
1267
- }), Fo = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
1268
- t.pattern ?? (t.pattern = lo()), y.init(e, t);
1269
- }), qo = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
1270
- t.pattern ?? (t.pattern = so), y.init(e, t);
1271
- }), Lo = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
1272
- t.pattern ?? (t.pattern = eo), y.init(e, t);
1273
- }), Qo = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
1274
- t.pattern ?? (t.pattern = to), y.init(e, t);
1275
- }), Bo = /* @__PURE__ */ c("$ZodULID", (e, t) => {
1276
- t.pattern ?? (t.pattern = no), y.init(e, t);
1277
- }), Ho = /* @__PURE__ */ c("$ZodXID", (e, t) => {
1278
- t.pattern ?? (t.pattern = ro), y.init(e, t);
1279
- }), Ko = /* @__PURE__ */ c("$ZodKSUID", (e, t) => {
1280
- t.pattern ?? (t.pattern = oo), y.init(e, t);
1281
- }), Wo = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
1282
- t.pattern ?? (t.pattern = _o(t)), y.init(e, t);
1283
- }), Vo = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
1284
- t.pattern ?? (t.pattern = yo), y.init(e, t);
1285
- }), Jo = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
1286
- t.pattern ?? (t.pattern = wo(t)), y.init(e, t);
1287
- }), Go = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
1288
- t.pattern ?? (t.pattern = io), y.init(e, t);
1289
- }), Xo = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
1290
- t.pattern ?? (t.pattern = ho), y.init(e, t), e._zod.onattach.push((n) => {
1291
- const r = n._zod.bag;
1292
- r.format = "ipv4";
1293
- });
1294
- }), Yo = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
1295
- t.pattern ?? (t.pattern = fo), y.init(e, t), e._zod.onattach.push((n) => {
1296
- const r = n._zod.bag;
1297
- r.format = "ipv6";
1298
- }), e._zod.check = (n) => {
1299
- try {
1300
- new URL(`http://[${n.value}]`);
1301
- } catch {
1302
- n.issues.push({
1303
- code: "invalid_format",
1304
- format: "ipv6",
1305
- input: n.value,
1306
- inst: e,
1307
- continue: !t.abort
1308
- });
1309
- }
1310
- };
1311
- }), es = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
1312
- t.pattern ?? (t.pattern = po), y.init(e, t);
1313
- }), ts = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
1314
- t.pattern ?? (t.pattern = mo), y.init(e, t), e._zod.check = (n) => {
1315
- const [r, o] = n.value.split("/");
1316
- try {
1317
- if (!o)
1318
- throw new Error();
1319
- const i = Number(o);
1320
- if (`${i}` !== o)
1321
- throw new Error();
1322
- if (i < 0 || i > 128)
1323
- throw new Error();
1324
- new URL(`http://[${r}]`);
1325
- } catch {
1326
- n.issues.push({
1327
- code: "invalid_format",
1328
- format: "cidrv6",
1329
- input: n.value,
1330
- inst: e,
1331
- continue: !t.abort
1332
- });
1333
- }
1334
- };
1335
- });
1336
- function Ut(e) {
1337
- if (e === "")
1338
- return !0;
1339
- if (e.length % 4 !== 0)
1340
- return !1;
1341
- try {
1342
- return atob(e), !0;
1343
- } catch {
1344
- return !1;
1345
- }
1346
- }
1347
- const ns = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1348
- t.pattern ?? (t.pattern = go), y.init(e, t), e._zod.onattach.push((n) => {
1349
- n._zod.bag.contentEncoding = "base64";
1350
- }), e._zod.check = (n) => {
1351
- Ut(n.value) || n.issues.push({
1352
- code: "invalid_format",
1353
- format: "base64",
1354
- input: n.value,
1355
- inst: e,
1356
- continue: !t.abort
1357
- });
1358
- };
1359
- });
1360
- function rs(e) {
1361
- if (!Dt.test(e))
1362
- return !1;
1363
- const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1364
- return Ut(n);
1365
- }
1366
- const os = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1367
- t.pattern ?? (t.pattern = Dt), y.init(e, t), e._zod.onattach.push((n) => {
1368
- n._zod.bag.contentEncoding = "base64url";
1369
- }), e._zod.check = (n) => {
1370
- rs(n.value) || n.issues.push({
1371
- code: "invalid_format",
1372
- format: "base64url",
1373
- input: n.value,
1374
- inst: e,
1375
- continue: !t.abort
1376
- });
1377
- };
1378
- }), ss = /* @__PURE__ */ c("$ZodE164", (e, t) => {
1379
- t.pattern ?? (t.pattern = xo), y.init(e, t);
1380
- });
1381
- function is(e, t = null) {
1382
- try {
1383
- const n = e.split(".");
1384
- if (n.length !== 3)
1385
- return !1;
1386
- const [r] = n, o = JSON.parse(atob(r));
1387
- return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1388
- } catch {
1389
- return !1;
1390
- }
1391
- }
1392
- const as = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1393
- y.init(e, t), e._zod.check = (n) => {
1394
- is(n.value, t.alg) || n.issues.push({
1395
- code: "invalid_format",
1396
- format: "jwt",
1397
- input: n.value,
1398
- inst: e,
1399
- continue: !t.abort
1400
- });
1401
- };
1402
- }), cs = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
1403
- k.init(e, t), e._zod.parse = (n) => n;
1404
- }), us = /* @__PURE__ */ c("$ZodNever", (e, t) => {
1405
- k.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1406
- expected: "never",
1407
- code: "invalid_type",
1408
- input: n.value,
1409
- inst: e
1410
- }), n);
1411
- });
1412
- function Ke(e, t, n) {
1413
- e.issues.length && t.issues.push(...$e(n, e.issues)), t.value[n] = e.value;
1414
- }
1415
- const ls = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1416
- k.init(e, t), e._zod.parse = (n, r) => {
1417
- const o = n.value;
1418
- if (!Array.isArray(o))
1419
- return n.issues.push({
1420
- expected: "array",
1421
- code: "invalid_type",
1422
- input: o,
1423
- inst: e
1424
- }), n;
1425
- n.value = Array(o.length);
1426
- const i = [];
1427
- for (let a = 0; a < o.length; a++) {
1428
- const u = o[a], f = t.element._zod.run({
1429
- value: u,
1430
- issues: []
1431
- }, r);
1432
- f instanceof Promise ? i.push(f.then((h) => Ke(h, n, a))) : Ke(f, n, a);
1433
- }
1434
- return i.length ? Promise.all(i).then(() => n) : n;
1435
- };
1436
- });
1437
- function Y(e, t, n) {
1438
- e.issues.length && t.issues.push(...$e(n, e.issues)), t.value[n] = e.value;
1439
- }
1440
- function We(e, t, n, r) {
1441
- e.issues.length ? r[n] === void 0 ? n in r ? t.value[n] = void 0 : t.value[n] = e.value : t.issues.push(...$e(n, e.issues)) : e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1442
- }
1443
- const ds = /* @__PURE__ */ c("$ZodObject", (e, t) => {
1444
- k.init(e, t);
1445
- const n = Ct(() => {
1446
- const m = Object.keys(t.shape);
1447
- for (const l of m)
1448
- if (!(t.shape[l] instanceof k))
1449
- throw new Error(`Invalid element at key "${l}": expected a Zod schema`);
1450
- const d = Fr(t.shape);
1451
- return {
1452
- shape: t.shape,
1453
- keys: m,
1454
- keySet: new Set(m),
1455
- numKeys: m.length,
1456
- optionalKeys: new Set(d)
1457
- };
1458
- });
1459
- j(e._zod, "propValues", () => {
1460
- const m = t.shape, d = {};
1461
- for (const l in m) {
1462
- const v = m[l]._zod;
1463
- if (v.values) {
1464
- d[l] ?? (d[l] = /* @__PURE__ */ new Set());
1465
- for (const w of v.values)
1466
- d[l].add(w);
1467
- }
1468
- }
1469
- return d;
1470
- });
1471
- const r = (m) => {
1472
- const d = new To(["shape", "payload", "ctx"]), { keys: l, optionalKeys: v } = n.value, w = (z) => {
1473
- const x = Q(z);
1474
- return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
1475
- };
1476
- d.write("const input = payload.value;");
1477
- const P = /* @__PURE__ */ Object.create(null);
1478
- for (const z of l)
1479
- P[z] = Et(15);
1480
- d.write("const newResult = {}");
1481
- for (const z of l)
1482
- if (v.has(z)) {
1483
- const x = P[z];
1484
- d.write(`const ${x} = ${w(z)};`);
1485
- const b = Q(z);
1486
- d.write(`
1487
- if (${x}.issues.length) {
1488
- if (input[${b}] === undefined) {
1489
- if (${b} in input) {
1490
- newResult[${b}] = undefined;
1491
- }
1492
- } else {
1493
- payload.issues = payload.issues.concat(
1494
- ${x}.issues.map((iss) => ({
1495
- ...iss,
1496
- path: iss.path ? [${b}, ...iss.path] : [${b}],
1497
- }))
1498
- );
1499
- }
1500
- } else if (${x}.value === undefined) {
1501
- if (${b} in input) newResult[${b}] = undefined;
1502
- } else {
1503
- newResult[${b}] = ${x}.value;
1504
- }
1505
- `);
1506
- } else {
1507
- const x = P[z];
1508
- d.write(`const ${x} = ${w(z)};`), d.write(`
1509
- if (${x}.issues.length) payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1510
- ...iss,
1511
- path: iss.path ? [${Q(z)}, ...iss.path] : [${Q(z)}]
1512
- })));`), d.write(`newResult[${Q(z)}] = ${x}.value`);
1513
- }
1514
- d.write("payload.value = newResult;"), d.write("return payload;");
1515
- const I = d.compile();
1516
- return (z, x) => I(m, z, x);
1517
- };
1518
- let o;
1519
- const i = me, a = !Nt.jitless, f = a && Mr.value, { catchall: h } = t;
1520
- let g;
1521
- e._zod.parse = (m, d) => {
1522
- g ?? (g = n.value);
1523
- const l = m.value;
1524
- if (!i(l))
1525
- return m.issues.push({
1526
- expected: "object",
1527
- code: "invalid_type",
1528
- input: l,
1529
- inst: e
1530
- }), m;
1531
- const v = [];
1532
- if (a && f && d?.async === !1 && d.jitless !== !0)
1533
- o || (o = r(t.shape)), m = o(m, d);
1534
- else {
1535
- m.value = {};
1536
- const x = g.shape;
1537
- for (const b of g.keys) {
1538
- const L = x[b], J = L._zod.run({ value: l[b], issues: [] }, d), Ce = L._zod.optin === "optional" && L._zod.optout === "optional";
1539
- J instanceof Promise ? v.push(J.then((Ee) => Ce ? We(Ee, m, b, l) : Y(Ee, m, b))) : Ce ? We(J, m, b, l) : Y(J, m, b);
1540
- }
1541
- }
1542
- if (!h)
1543
- return v.length ? Promise.all(v).then(() => m) : m;
1544
- const w = [], P = g.keySet, I = h._zod, z = I.def.type;
1545
- for (const x of Object.keys(l)) {
1546
- if (P.has(x))
1547
- continue;
1548
- if (z === "never") {
1549
- w.push(x);
1550
- continue;
1551
- }
1552
- const b = I.run({ value: l[x], issues: [] }, d);
1553
- b instanceof Promise ? v.push(b.then((L) => Y(L, m, x))) : Y(b, m, x);
1554
- }
1555
- return w.length && m.issues.push({
1556
- code: "unrecognized_keys",
1557
- keys: w,
1558
- input: l,
1559
- inst: e
1560
- }), v.length ? Promise.all(v).then(() => m) : m;
1561
- };
1562
- });
1563
- function Ve(e, t, n, r) {
1564
- for (const o of e)
1565
- if (o.issues.length === 0)
1566
- return t.value = o.value, t;
1567
- return t.issues.push({
1568
- code: "invalid_union",
1569
- input: t.value,
1570
- inst: n,
1571
- errors: e.map((o) => o.issues.map((i) => R(i, r, D())))
1572
- }), t;
1573
- }
1574
- const hs = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1575
- k.init(e, t), j(e._zod, "values", () => {
1576
- if (t.options.every((n) => n._zod.values))
1577
- return new Set(t.options.flatMap((n) => Array.from(n._zod.values)));
1578
- }), j(e._zod, "pattern", () => {
1579
- if (t.options.every((n) => n._zod.pattern)) {
1580
- const n = t.options.map((r) => r._zod.pattern);
1581
- return new RegExp(`^(${n.map((r) => ze(r.source)).join("|")})$`);
1582
- }
1583
- }), e._zod.parse = (n, r) => {
1584
- let o = !1;
1585
- const i = [];
1586
- for (const a of t.options) {
1587
- const u = a._zod.run({
1588
- value: n.value,
1589
- issues: []
1590
- }, r);
1591
- if (u instanceof Promise)
1592
- i.push(u), o = !0;
1593
- else {
1594
- if (u.issues.length === 0)
1595
- return u;
1596
- i.push(u);
1597
- }
1598
- }
1599
- return o ? Promise.all(i).then((a) => Ve(a, n, e, r)) : Ve(i, n, e, r);
1600
- };
1601
- }), fs = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1602
- k.init(e, t), e._zod.parse = (n, r) => {
1603
- const { value: o } = n, i = t.left._zod.run({ value: o, issues: [] }, r), a = t.right._zod.run({ value: o, issues: [] }, r);
1604
- return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([f, h]) => Je(n, f, h)) : Je(n, i, a);
1605
- };
1606
- });
1607
- function ge(e, t) {
1608
- if (e === t)
1609
- return { valid: !0, data: e };
1610
- if (e instanceof Date && t instanceof Date && +e == +t)
1611
- return { valid: !0, data: e };
1612
- if (Be(e) && Be(t)) {
1613
- const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1614
- for (const i of r) {
1615
- const a = ge(e[i], t[i]);
1616
- if (!a.valid)
1617
- return {
1618
- valid: !1,
1619
- mergeErrorPath: [i, ...a.mergeErrorPath]
1620
- };
1621
- o[i] = a.data;
1622
- }
1623
- return { valid: !0, data: o };
1624
- }
1625
- if (Array.isArray(e) && Array.isArray(t)) {
1626
- if (e.length !== t.length)
1627
- return { valid: !1, mergeErrorPath: [] };
1628
- const n = [];
1629
- for (let r = 0; r < e.length; r++) {
1630
- const o = e[r], i = t[r], a = ge(o, i);
1631
- if (!a.valid)
1632
- return {
1633
- valid: !1,
1634
- mergeErrorPath: [r, ...a.mergeErrorPath]
1635
- };
1636
- n.push(a.data);
1637
- }
1638
- return { valid: !0, data: n };
1639
- }
1640
- return { valid: !1, mergeErrorPath: [] };
1641
- }
1642
- function Je(e, t, n) {
1643
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), B(e))
1644
- return e;
1645
- const r = ge(t.value, n.value);
1646
- if (!r.valid)
1647
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1648
- return e.value = r.data, e;
1649
- }
1650
- const ps = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1651
- k.init(e, t);
1652
- const n = Dr(t.entries);
1653
- e._zod.values = new Set(n), e._zod.pattern = new RegExp(`^(${n.filter((r) => Ur.has(typeof r)).map((r) => typeof r == "string" ? ae(r) : r.toString()).join("|")})$`), e._zod.parse = (r, o) => {
1654
- const i = r.value;
1655
- return e._zod.values.has(i) || r.issues.push({
1656
- code: "invalid_value",
1657
- values: n,
1658
- input: i,
1659
- inst: e
1660
- }), r;
1661
- };
1662
- }), ms = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
1663
- k.init(e, t), e._zod.parse = (n, r) => {
1664
- const o = t.transform(n.value, n);
1665
- if (r.async)
1666
- return (o instanceof Promise ? o : Promise.resolve(o)).then((a) => (n.value = a, n));
1667
- if (o instanceof Promise)
1668
- throw new K();
1669
- return n.value = o, n;
1670
- };
1671
- }), gs = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
1672
- k.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", j(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), j(e._zod, "pattern", () => {
1673
- const n = t.innerType._zod.pattern;
1674
- return n ? new RegExp(`^(${ze(n.source)})?$`) : void 0;
1675
- }), e._zod.parse = (n, r) => n.value === void 0 ? n : t.innerType._zod.run(n, r);
1676
- }), vs = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
1677
- k.init(e, t), j(e._zod, "optin", () => t.innerType._zod.optin), j(e._zod, "optout", () => t.innerType._zod.optout), j(e._zod, "pattern", () => {
1678
- const n = t.innerType._zod.pattern;
1679
- return n ? new RegExp(`^(${ze(n.source)}|null)$`) : void 0;
1680
- }), j(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);
1681
- }), xs = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
1682
- k.init(e, t), e._zod.optin = "optional", j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1683
- if (n.value === void 0)
1684
- return n.value = t.defaultValue, n;
1685
- const o = t.innerType._zod.run(n, r);
1686
- return o instanceof Promise ? o.then((i) => Ge(i, t)) : Ge(o, t);
1687
- };
1688
- });
1689
- function Ge(e, t) {
1690
- return e.value === void 0 && (e.value = t.defaultValue), e;
1691
- }
1692
- const ys = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
1693
- k.init(e, t), e._zod.optin = "optional", j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1694
- }), ws = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
1695
- k.init(e, t), j(e._zod, "values", () => {
1696
- const n = t.innerType._zod.values;
1697
- return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1698
- }), e._zod.parse = (n, r) => {
1699
- const o = t.innerType._zod.run(n, r);
1700
- return o instanceof Promise ? o.then((i) => Xe(i, e)) : Xe(o, e);
1701
- };
1702
- });
1703
- function Xe(e, t) {
1704
- return !e.issues.length && e.value === void 0 && e.issues.push({
1705
- code: "invalid_type",
1706
- expected: "nonoptional",
1707
- input: e.value,
1708
- inst: t
1709
- }), e;
1710
- }
1711
- const _s = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1712
- k.init(e, t), j(e._zod, "optin", () => t.innerType._zod.optin), j(e._zod, "optout", () => t.innerType._zod.optout), j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1713
- const o = t.innerType._zod.run(n, r);
1714
- return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1715
- ...n,
1716
- error: {
1717
- issues: i.issues.map((a) => R(a, r, D()))
1718
- },
1719
- input: n.value
1720
- }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1721
- ...n,
1722
- error: {
1723
- issues: o.issues.map((i) => R(i, r, D()))
1724
- },
1725
- input: n.value
1726
- }), n.issues = []), n);
1727
- };
1728
- }), bs = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1729
- k.init(e, t), j(e._zod, "values", () => t.in._zod.values), j(e._zod, "optin", () => t.in._zod.optin), j(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (n, r) => {
1730
- const o = t.in._zod.run(n, r);
1731
- return o instanceof Promise ? o.then((i) => Ye(i, t, r)) : Ye(o, t, r);
1732
- };
1733
- });
1734
- function Ye(e, t, n) {
1735
- return B(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, n);
1736
- }
1737
- const js = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1738
- k.init(e, t), j(e._zod, "propValues", () => t.innerType._zod.propValues), j(e._zod, "optin", () => t.innerType._zod.optin), j(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1739
- const o = t.innerType._zod.run(n, r);
1740
- return o instanceof Promise ? o.then(et) : et(o);
1741
- };
1742
- });
1743
- function et(e) {
1744
- return e.value = Object.freeze(e.value), e;
1745
- }
1746
- const ks = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
1747
- S.init(e, t), k.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1748
- const r = n.value, o = t.fn(r);
1749
- if (o instanceof Promise)
1750
- return o.then((i) => tt(i, n, r, e));
1751
- tt(o, n, r, e);
1752
- };
1753
- });
1754
- function tt(e, t, n, r) {
1755
- if (!e) {
1756
- const o = {
1757
- code: "custom",
1758
- input: n,
1759
- inst: r,
1760
- // incorporates params.error into issue reporting
1761
- path: [...r._zod.def.path ?? []],
1762
- // incorporates params.error into issue reporting
1763
- continue: !r._zod.def.abort
1764
- // params: inst._zod.def.params,
1765
- };
1766
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(W(o));
1767
- }
1768
- }
1769
- class zs {
1770
- constructor() {
1771
- this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1772
- }
1773
- add(t, ...n) {
1774
- const r = n[0];
1775
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
1776
- if (this._idmap.has(r.id))
1777
- throw new Error(`ID ${r.id} already exists in the registry`);
1778
- this._idmap.set(r.id, t);
1779
- }
1780
- return this;
1781
- }
1782
- remove(t) {
1783
- return this._map.delete(t), this;
1784
- }
1785
- get(t) {
1786
- const n = t._zod.parent;
1787
- if (n) {
1788
- const r = { ...this.get(n) ?? {} };
1789
- return delete r.id, { ...r, ...this._map.get(t) };
1790
- }
1791
- return this._map.get(t);
1792
- }
1793
- has(t) {
1794
- return this._map.has(t);
1795
- }
1796
- }
1797
- function Zs() {
1798
- return new zs();
1799
- }
1800
- const ee = /* @__PURE__ */ Zs();
1801
- function $s(e, t) {
1802
- return new e({
1803
- type: "string",
1804
- ...p(t)
1805
- });
1806
- }
1807
- function Ps(e, t) {
1808
- return new e({
1809
- type: "string",
1810
- format: "email",
1811
- check: "string_format",
1812
- abort: !1,
1813
- ...p(t)
1814
- });
1815
- }
1816
- function nt(e, t) {
1817
- return new e({
1818
- type: "string",
1819
- format: "guid",
1820
- check: "string_format",
1821
- abort: !1,
1822
- ...p(t)
1823
- });
1824
- }
1825
- function Ns(e, t) {
1826
- return new e({
1827
- type: "string",
1828
- format: "uuid",
1829
- check: "string_format",
1830
- abort: !1,
1831
- ...p(t)
1832
- });
1833
- }
1834
- function Cs(e, t) {
1835
- return new e({
1836
- type: "string",
1837
- format: "uuid",
1838
- check: "string_format",
1839
- abort: !1,
1840
- version: "v4",
1841
- ...p(t)
1842
- });
1843
- }
1844
- function Es(e, t) {
1845
- return new e({
1846
- type: "string",
1847
- format: "uuid",
1848
- check: "string_format",
1849
- abort: !1,
1850
- version: "v6",
1851
- ...p(t)
1852
- });
1853
- }
1854
- function Os(e, t) {
1855
- return new e({
1856
- type: "string",
1857
- format: "uuid",
1858
- check: "string_format",
1859
- abort: !1,
1860
- version: "v7",
1861
- ...p(t)
1862
- });
1863
- }
1864
- function Ss(e, t) {
1865
- return new e({
1866
- type: "string",
1867
- format: "url",
1868
- check: "string_format",
1869
- abort: !1,
1870
- ...p(t)
1871
- });
1872
- }
1873
- function Is(e, t) {
1874
- return new e({
1875
- type: "string",
1876
- format: "emoji",
1877
- check: "string_format",
1878
- abort: !1,
1879
- ...p(t)
1880
- });
1881
- }
1882
- function Ts(e, t) {
1883
- return new e({
1884
- type: "string",
1885
- format: "nanoid",
1886
- check: "string_format",
1887
- abort: !1,
1888
- ...p(t)
1889
- });
1890
- }
1891
- function As(e, t) {
1892
- return new e({
1893
- type: "string",
1894
- format: "cuid",
1895
- check: "string_format",
1896
- abort: !1,
1897
- ...p(t)
1898
- });
1899
- }
1900
- function Ds(e, t) {
1901
- return new e({
1902
- type: "string",
1903
- format: "cuid2",
1904
- check: "string_format",
1905
- abort: !1,
1906
- ...p(t)
1907
- });
1908
- }
1909
- function Rs(e, t) {
1910
- return new e({
1911
- type: "string",
1912
- format: "ulid",
1913
- check: "string_format",
1914
- abort: !1,
1915
- ...p(t)
1916
- });
1917
- }
1918
- function Ms(e, t) {
1919
- return new e({
1920
- type: "string",
1921
- format: "xid",
1922
- check: "string_format",
1923
- abort: !1,
1924
- ...p(t)
1925
- });
1926
- }
1927
- function Us(e, t) {
1928
- return new e({
1929
- type: "string",
1930
- format: "ksuid",
1931
- check: "string_format",
1932
- abort: !1,
1933
- ...p(t)
1934
- });
1935
- }
1936
- function Fs(e, t) {
1937
- return new e({
1938
- type: "string",
1939
- format: "ipv4",
1940
- check: "string_format",
1941
- abort: !1,
1942
- ...p(t)
1943
- });
1944
- }
1945
- function qs(e, t) {
1946
- return new e({
1947
- type: "string",
1948
- format: "ipv6",
1949
- check: "string_format",
1950
- abort: !1,
1951
- ...p(t)
1952
- });
1953
- }
1954
- function Ls(e, t) {
1955
- return new e({
1956
- type: "string",
1957
- format: "cidrv4",
1958
- check: "string_format",
1959
- abort: !1,
1960
- ...p(t)
1961
- });
1962
- }
1963
- function Qs(e, t) {
1964
- return new e({
1965
- type: "string",
1966
- format: "cidrv6",
1967
- check: "string_format",
1968
- abort: !1,
1969
- ...p(t)
1970
- });
1971
- }
1972
- function Bs(e, t) {
1973
- return new e({
1974
- type: "string",
1975
- format: "base64",
1976
- check: "string_format",
1977
- abort: !1,
1978
- ...p(t)
1979
- });
1980
- }
1981
- function Hs(e, t) {
1982
- return new e({
1983
- type: "string",
1984
- format: "base64url",
1985
- check: "string_format",
1986
- abort: !1,
1987
- ...p(t)
1988
- });
1989
- }
1990
- function Ks(e, t) {
1991
- return new e({
1992
- type: "string",
1993
- format: "e164",
1994
- check: "string_format",
1995
- abort: !1,
1996
- ...p(t)
1997
- });
1998
- }
1999
- function Ws(e, t) {
2000
- return new e({
2001
- type: "string",
2002
- format: "jwt",
2003
- check: "string_format",
2004
- abort: !1,
2005
- ...p(t)
2006
- });
2007
- }
2008
- function Vs(e, t) {
2009
- return new e({
2010
- type: "string",
2011
- format: "datetime",
2012
- check: "string_format",
2013
- offset: !1,
2014
- local: !1,
2015
- precision: null,
2016
- ...p(t)
2017
- });
2018
- }
2019
- function Js(e, t) {
2020
- return new e({
2021
- type: "string",
2022
- format: "date",
2023
- check: "string_format",
2024
- ...p(t)
2025
- });
2026
- }
2027
- function Gs(e, t) {
2028
- return new e({
2029
- type: "string",
2030
- format: "time",
2031
- check: "string_format",
2032
- precision: null,
2033
- ...p(t)
2034
- });
2035
- }
2036
- function Xs(e, t) {
2037
- return new e({
2038
- type: "string",
2039
- format: "duration",
2040
- check: "string_format",
2041
- ...p(t)
2042
- });
2043
- }
2044
- function Ys(e) {
2045
- return new e({
2046
- type: "unknown"
2047
- });
2048
- }
2049
- function ei(e, t) {
2050
- return new e({
2051
- type: "never",
2052
- ...p(t)
2053
- });
2054
- }
2055
- function Ft(e, t) {
2056
- return new zo({
2057
- check: "max_length",
2058
- ...p(t),
2059
- maximum: e
2060
- });
2061
- }
2062
- function oe(e, t) {
2063
- return new Zo({
2064
- check: "min_length",
2065
- ...p(t),
2066
- minimum: e
2067
- });
2068
- }
2069
- function qt(e, t) {
2070
- return new $o({
2071
- check: "length_equals",
2072
- ...p(t),
2073
- length: e
2074
- });
2075
- }
2076
- function ti(e, t) {
2077
- return new Po({
2078
- check: "string_format",
2079
- format: "regex",
2080
- ...p(t),
2081
- pattern: e
2082
- });
2083
- }
2084
- function ni(e) {
2085
- return new No({
2086
- check: "string_format",
2087
- format: "lowercase",
2088
- ...p(e)
2089
- });
2090
- }
2091
- function ri(e) {
2092
- return new Co({
2093
- check: "string_format",
2094
- format: "uppercase",
2095
- ...p(e)
2096
- });
2097
- }
2098
- function oi(e, t) {
2099
- return new Eo({
2100
- check: "string_format",
2101
- format: "includes",
2102
- ...p(t),
2103
- includes: e
2104
- });
2105
- }
2106
- function si(e, t) {
2107
- return new Oo({
2108
- check: "string_format",
2109
- format: "starts_with",
2110
- ...p(t),
2111
- prefix: e
2112
- });
2113
- }
2114
- function ii(e, t) {
2115
- return new So({
2116
- check: "string_format",
2117
- format: "ends_with",
2118
- ...p(t),
2119
- suffix: e
2120
- });
2121
- }
2122
- function V(e) {
2123
- return new Io({
2124
- check: "overwrite",
2125
- tx: e
2126
- });
2127
- }
2128
- function ai(e) {
2129
- return V((t) => t.normalize(e));
2130
- }
2131
- function ci() {
2132
- return V((e) => e.trim());
2133
- }
2134
- function ui() {
2135
- return V((e) => e.toLowerCase());
2136
- }
2137
- function li() {
2138
- return V((e) => e.toUpperCase());
2139
- }
2140
- function di(e, t, n) {
2141
- return new e({
2142
- type: "array",
2143
- element: t,
2144
- // get element() {
2145
- // return element;
2146
- // },
2147
- ...p(n)
2148
- });
2149
- }
2150
- function hi(e, t, n) {
2151
- return new e({
2152
- type: "custom",
2153
- check: "custom",
2154
- fn: t,
2155
- ...p(n)
2156
- });
2157
- }
2158
- const fi = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
2159
- Wo.init(e, t), _.init(e, t);
2160
- });
2161
- function pi(e) {
2162
- return Vs(fi, e);
2163
- }
2164
- const mi = /* @__PURE__ */ c("ZodISODate", (e, t) => {
2165
- Vo.init(e, t), _.init(e, t);
2166
- });
2167
- function gi(e) {
2168
- return Js(mi, e);
2169
- }
2170
- const vi = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
2171
- Jo.init(e, t), _.init(e, t);
2172
- });
2173
- function xi(e) {
2174
- return Gs(vi, e);
2175
- }
2176
- const yi = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
2177
- Go.init(e, t), _.init(e, t);
2178
- });
2179
- function wi(e) {
2180
- return Xs(yi, e);
2181
- }
2182
- const _i = (e, t) => {
2183
- St.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2184
- format: {
2185
- value: (n) => Vr(e, n)
2186
- // enumerable: false,
2187
- },
2188
- flatten: {
2189
- value: (n) => Wr(e, n)
2190
- // enumerable: false,
2191
- },
2192
- addIssue: {
2193
- value: (n) => e.issues.push(n)
2194
- // enumerable: false,
2195
- },
2196
- addIssues: {
2197
- value: (n) => e.issues.push(...n)
2198
- // enumerable: false,
2199
- },
2200
- isEmpty: {
2201
- get() {
2202
- return e.issues.length === 0;
2203
- }
2204
- // enumerable: false,
2205
- }
2206
- });
2207
- }, ue = c("ZodError", _i, {
2208
- Parent: Error
2209
- }), bi = /* @__PURE__ */ Jr(ue), ji = /* @__PURE__ */ Gr(ue), ki = /* @__PURE__ */ Tt(ue), zi = /* @__PURE__ */ At(ue), Z = /* @__PURE__ */ c("ZodType", (e, t) => (k.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
2210
- {
2211
- ...t,
2212
- checks: [
2213
- ...t.checks ?? [],
2214
- ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2215
- ]
2216
- }
2217
- // { parent: true }
2218
- ), e.clone = (n, r) => U(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => bi(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ki(e, n, r), e.parseAsync = async (n, r) => ji(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => zi(e, n, r), e.spa = e.safeParseAsync, e.refine = (n, r) => e.check(ga(n, r)), e.superRefine = (n) => e.check(va(n)), e.overwrite = (n) => e.check(V(n)), e.optional = () => it(e), e.nullable = () => at(e), e.nullish = () => it(at(e)), e.nonoptional = (n) => ca(e, n), e.array = () => Wi(e), e.or = (n) => Xi([e, n]), e.and = (n) => ea(e, n), e.transform = (n) => ct(e, na(n)), e.default = (n) => sa(e, n), e.prefault = (n) => aa(e, n), e.catch = (n) => la(e, n), e.pipe = (n) => ct(e, n), e.readonly = () => fa(e), e.describe = (n) => {
2219
- const r = e.clone();
2220
- return ee.add(r, { description: n }), r;
2221
- }, Object.defineProperty(e, "description", {
2222
- get() {
2223
- return ee.get(e)?.description;
2224
- },
2225
- configurable: !0
2226
- }), e.meta = (...n) => {
2227
- if (n.length === 0)
2228
- return ee.get(e);
2229
- const r = e.clone();
2230
- return ee.add(r, n[0]), r;
2231
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Lt = /* @__PURE__ */ c("_ZodString", (e, t) => {
2232
- Ne.init(e, t), Z.init(e, t);
2233
- const n = e._zod.bag;
2234
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(ti(...r)), e.includes = (...r) => e.check(oi(...r)), e.startsWith = (...r) => e.check(si(...r)), e.endsWith = (...r) => e.check(ii(...r)), e.min = (...r) => e.check(oe(...r)), e.max = (...r) => e.check(Ft(...r)), e.length = (...r) => e.check(qt(...r)), e.nonempty = (...r) => e.check(oe(1, ...r)), e.lowercase = (r) => e.check(ni(r)), e.uppercase = (r) => e.check(ri(r)), e.trim = () => e.check(ci()), e.normalize = (...r) => e.check(ai(...r)), e.toLowerCase = () => e.check(ui()), e.toUpperCase = () => e.check(li());
2235
- }), Zi = /* @__PURE__ */ c("ZodString", (e, t) => {
2236
- Ne.init(e, t), Lt.init(e, t), e.email = (n) => e.check(Ps($i, n)), e.url = (n) => e.check(Ss(Pi, n)), e.jwt = (n) => e.check(Ws(Li, n)), e.emoji = (n) => e.check(Is(Ni, n)), e.guid = (n) => e.check(nt(ot, n)), e.uuid = (n) => e.check(Ns(te, n)), e.uuidv4 = (n) => e.check(Cs(te, n)), e.uuidv6 = (n) => e.check(Es(te, n)), e.uuidv7 = (n) => e.check(Os(te, n)), e.nanoid = (n) => e.check(Ts(Ci, n)), e.guid = (n) => e.check(nt(ot, n)), e.cuid = (n) => e.check(As(Ei, n)), e.cuid2 = (n) => e.check(Ds(Oi, n)), e.ulid = (n) => e.check(Rs(Si, n)), e.base64 = (n) => e.check(Bs(Ui, n)), e.base64url = (n) => e.check(Hs(Fi, n)), e.xid = (n) => e.check(Ms(Ii, n)), e.ksuid = (n) => e.check(Us(Ti, n)), e.ipv4 = (n) => e.check(Fs(Ai, n)), e.ipv6 = (n) => e.check(qs(Di, n)), e.cidrv4 = (n) => e.check(Ls(Ri, n)), e.cidrv6 = (n) => e.check(Qs(Mi, n)), e.e164 = (n) => e.check(Ks(qi, n)), e.datetime = (n) => e.check(pi(n)), e.date = (n) => e.check(gi(n)), e.time = (n) => e.check(xi(n)), e.duration = (n) => e.check(wi(n));
2237
- });
2238
- function rt(e) {
2239
- return $s(Zi, e);
2240
- }
2241
- const _ = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
2242
- y.init(e, t), Lt.init(e, t);
2243
- }), $i = /* @__PURE__ */ c("ZodEmail", (e, t) => {
2244
- Mo.init(e, t), _.init(e, t);
2245
- }), ot = /* @__PURE__ */ c("ZodGUID", (e, t) => {
2246
- Do.init(e, t), _.init(e, t);
2247
- }), te = /* @__PURE__ */ c("ZodUUID", (e, t) => {
2248
- Ro.init(e, t), _.init(e, t);
2249
- }), Pi = /* @__PURE__ */ c("ZodURL", (e, t) => {
2250
- Uo.init(e, t), _.init(e, t);
2251
- }), Ni = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
2252
- Fo.init(e, t), _.init(e, t);
2253
- }), Ci = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
2254
- qo.init(e, t), _.init(e, t);
2255
- }), Ei = /* @__PURE__ */ c("ZodCUID", (e, t) => {
2256
- Lo.init(e, t), _.init(e, t);
2257
- }), Oi = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
2258
- Qo.init(e, t), _.init(e, t);
2259
- }), Si = /* @__PURE__ */ c("ZodULID", (e, t) => {
2260
- Bo.init(e, t), _.init(e, t);
2261
- }), Ii = /* @__PURE__ */ c("ZodXID", (e, t) => {
2262
- Ho.init(e, t), _.init(e, t);
2263
- }), Ti = /* @__PURE__ */ c("ZodKSUID", (e, t) => {
2264
- Ko.init(e, t), _.init(e, t);
2265
- }), Ai = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
2266
- Xo.init(e, t), _.init(e, t);
2267
- }), Di = /* @__PURE__ */ c("ZodIPv6", (e, t) => {
2268
- Yo.init(e, t), _.init(e, t);
2269
- }), Ri = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
2270
- es.init(e, t), _.init(e, t);
2271
- }), Mi = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
2272
- ts.init(e, t), _.init(e, t);
2273
- }), Ui = /* @__PURE__ */ c("ZodBase64", (e, t) => {
2274
- ns.init(e, t), _.init(e, t);
2275
- }), Fi = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
2276
- os.init(e, t), _.init(e, t);
2277
- }), qi = /* @__PURE__ */ c("ZodE164", (e, t) => {
2278
- ss.init(e, t), _.init(e, t);
2279
- }), Li = /* @__PURE__ */ c("ZodJWT", (e, t) => {
2280
- as.init(e, t), _.init(e, t);
2281
- }), Qi = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
2282
- cs.init(e, t), Z.init(e, t);
2283
- });
2284
- function st() {
2285
- return Ys(Qi);
2286
- }
2287
- const Bi = /* @__PURE__ */ c("ZodNever", (e, t) => {
2288
- us.init(e, t), Z.init(e, t);
2289
- });
2290
- function Hi(e) {
2291
- return ei(Bi, e);
2292
- }
2293
- const Ki = /* @__PURE__ */ c("ZodArray", (e, t) => {
2294
- ls.init(e, t), Z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(oe(n, r)), e.nonempty = (n) => e.check(oe(1, n)), e.max = (n, r) => e.check(Ft(n, r)), e.length = (n, r) => e.check(qt(n, r)), e.unwrap = () => e.element;
2295
- });
2296
- function Wi(e, t) {
2297
- return di(Ki, e, t);
2298
- }
2299
- const Vi = /* @__PURE__ */ c("ZodObject", (e, t) => {
2300
- ds.init(e, t), Z.init(e, t), j(e, "shape", () => Object.fromEntries(Object.entries(e._zod.def.shape))), e.keyof = () => Qt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: st() }), e.loose = () => e.clone({ ...e._zod.def, catchall: st() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Hi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Qr(e, n), e.merge = (n) => Br(e, n), e.pick = (n) => qr(e, n), e.omit = (n) => Lr(e, n), e.partial = (...n) => Hr(Bt, e, n[0]), e.required = (...n) => Kr(Ht, e, n[0]);
2301
- });
2302
- function Ji(e, t) {
2303
- const n = {
2304
- type: "object",
2305
- get shape() {
2306
- return Ze(this, "shape", { ...e }), this.shape;
2307
- },
2308
- ...p(t)
2309
- };
2310
- return new Vi(n);
2311
- }
2312
- const Gi = /* @__PURE__ */ c("ZodUnion", (e, t) => {
2313
- hs.init(e, t), Z.init(e, t), e.options = t.options;
2314
- });
2315
- function Xi(e, t) {
2316
- return new Gi({
2317
- type: "union",
2318
- options: e,
2319
- ...p(t)
2320
- });
2321
- }
2322
- const Yi = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
2323
- fs.init(e, t), Z.init(e, t);
2324
- });
2325
- function ea(e, t) {
2326
- return new Yi({
2327
- type: "intersection",
2328
- left: e,
2329
- right: t
2330
- });
2331
- }
2332
- const ve = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2333
- ps.init(e, t), Z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2334
- const n = new Set(Object.keys(t.entries));
2335
- e.extract = (r, o) => {
2336
- const i = {};
2337
- for (const a of r)
2338
- if (n.has(a))
2339
- i[a] = t.entries[a];
2340
- else
2341
- throw new Error(`Key ${a} not found in enum`);
2342
- return new ve({
2343
- ...t,
2344
- checks: [],
2345
- ...p(o),
2346
- entries: i
2347
- });
2348
- }, e.exclude = (r, o) => {
2349
- const i = { ...t.entries };
2350
- for (const a of r)
2351
- if (n.has(a))
2352
- delete i[a];
2353
- else
2354
- throw new Error(`Key ${a} not found in enum`);
2355
- return new ve({
2356
- ...t,
2357
- checks: [],
2358
- ...p(o),
2359
- entries: i
2360
- });
2361
- };
2362
- });
2363
- function Qt(e, t) {
2364
- const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2365
- return new ve({
2366
- type: "enum",
2367
- entries: n,
2368
- ...p(t)
2369
- });
2370
- }
2371
- const ta = /* @__PURE__ */ c("ZodTransform", (e, t) => {
2372
- ms.init(e, t), Z.init(e, t), e._zod.parse = (n, r) => {
2373
- n.addIssue = (i) => {
2374
- if (typeof i == "string")
2375
- n.issues.push(W(i, n.value, t));
2376
- else {
2377
- const a = i;
2378
- a.fatal && (a.continue = !1), a.code ?? (a.code = "custom"), a.input ?? (a.input = n.value), a.inst ?? (a.inst = e), a.continue ?? (a.continue = !0), n.issues.push(W(a));
2379
- }
2380
- };
2381
- const o = t.transform(n.value, n);
2382
- return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2383
- };
2384
- });
2385
- function na(e) {
2386
- return new ta({
2387
- type: "transform",
2388
- transform: e
2389
- });
2390
- }
2391
- const Bt = /* @__PURE__ */ c("ZodOptional", (e, t) => {
2392
- gs.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2393
- });
2394
- function it(e) {
2395
- return new Bt({
2396
- type: "optional",
2397
- innerType: e
2398
- });
2399
- }
2400
- const ra = /* @__PURE__ */ c("ZodNullable", (e, t) => {
2401
- vs.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2402
- });
2403
- function at(e) {
2404
- return new ra({
2405
- type: "nullable",
2406
- innerType: e
2407
- });
2408
- }
2409
- const oa = /* @__PURE__ */ c("ZodDefault", (e, t) => {
2410
- xs.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2411
- });
2412
- function sa(e, t) {
2413
- return new oa({
2414
- type: "default",
2415
- innerType: e,
2416
- get defaultValue() {
2417
- return typeof t == "function" ? t() : t;
2418
- }
2419
- });
2420
- }
2421
- const ia = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
2422
- ys.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2423
- });
2424
- function aa(e, t) {
2425
- return new ia({
2426
- type: "prefault",
2427
- innerType: e,
2428
- get defaultValue() {
2429
- return typeof t == "function" ? t() : t;
2430
- }
2431
- });
2432
- }
2433
- const Ht = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2434
- ws.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2435
- });
2436
- function ca(e, t) {
2437
- return new Ht({
2438
- type: "nonoptional",
2439
- innerType: e,
2440
- ...p(t)
2441
- });
2442
- }
2443
- const ua = /* @__PURE__ */ c("ZodCatch", (e, t) => {
2444
- _s.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2445
- });
2446
- function la(e, t) {
2447
- return new ua({
2448
- type: "catch",
2449
- innerType: e,
2450
- catchValue: typeof t == "function" ? t : () => t
2451
- });
2452
- }
2453
- const da = /* @__PURE__ */ c("ZodPipe", (e, t) => {
2454
- bs.init(e, t), Z.init(e, t), e.in = t.in, e.out = t.out;
2455
- });
2456
- function ct(e, t) {
2457
- return new da({
2458
- type: "pipe",
2459
- in: e,
2460
- out: t
2461
- // ...util.normalizeParams(params),
2462
- });
2463
- }
2464
- const ha = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
2465
- js.init(e, t), Z.init(e, t);
2466
- });
2467
- function fa(e) {
2468
- return new ha({
2469
- type: "readonly",
2470
- innerType: e
2471
- });
2472
- }
2473
- const pa = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2474
- ks.init(e, t), Z.init(e, t);
2475
- });
2476
- function ma(e, t) {
2477
- const n = new S({
2478
- check: "custom",
2479
- ...p(t)
2480
- });
2481
- return n._zod.check = e, n;
2482
- }
2483
- function ga(e, t = {}) {
2484
- return hi(pa, e, t);
2485
- }
2486
- function va(e, t) {
2487
- const n = ma((r) => (r.addIssue = (o) => {
2488
- if (typeof o == "string")
2489
- r.issues.push(W(o, r.value, n._zod.def));
2490
- else {
2491
- const i = o;
2492
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = n), i.continue ?? (i.continue = !n._zod.def.abort), r.issues.push(W(i));
2493
- }
2494
- }, e(r.value, r)), t);
2495
- return n;
2496
- }
2497
- const xa = Ji({
2498
- buildId: rt(),
2499
- timestamp: rt(),
2500
- status: Qt(["in-progress", "success", "failed"])
2501
- }), ya = ({
2502
- buildId: e,
2503
- endpoint: t = "/__zuplo/docs"
2504
- }) => {
2505
- const n = yn({
2506
- queryKey: ["zuplo-build-check", e, t],
2507
- refetchInterval: 3e3,
2508
- enabled: typeof e < "u" && !1,
2509
- retry: !1,
2510
- queryFn: () => fetch(t, { signal: AbortSignal.timeout(2e3) }).then((o) => {
2511
- if (!o.ok) throw new Error("Failed to fetch build status");
2512
- return o.json();
2513
- }).then((o) => xa.parse(o))
2514
- });
2515
- if (n.isError || !n.data || n.data.buildId === e)
2516
- return null;
2517
- const r = n.data.status === "success";
2518
- return /* @__PURE__ */ s.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: [
2519
- r ? /* @__PURE__ */ s.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2520
- /* @__PURE__ */ s.jsx(An, { size: 16 }),
2521
- /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "New version available" })
2522
- ] }) : /* @__PURE__ */ s.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2523
- /* @__PURE__ */ s.jsx(Dn, { size: 16, className: "animate-spin" }),
2524
- /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "Building new version..." })
2525
- ] }),
2526
- /* @__PURE__ */ s.jsx("span", { className: "text-xs", children: r ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2527
- /* @__PURE__ */ s.jsx(
2528
- bt,
2529
- {
2530
- variant: "outline",
2531
- size: "sm",
2532
- className: "w-full",
2533
- onClick: () => {
2534
- window.location.reload();
2535
- },
2536
- children: "Reload"
2537
- }
2538
- )
2539
- ] });
2540
- }, wa = () => {
2541
- const e = se(), t = be(e.pathname);
2542
- M(() => {
2543
- const n = t.current !== e.pathname, r = e.hash !== "";
2544
- n && !r && window.scrollTo(0, 0), t.current = e.pathname;
2545
- }, [e.pathname, e.hash]);
2546
- }, _a = ({
2547
- icon: e
2548
- }) => typeof e == "string" ? /* @__PURE__ */ s.jsx(
2549
- "img",
2550
- {
2551
- src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
2552
- className: "size-5",
2553
- alt: e
2554
- }
2555
- ) : e, ba = (e) => /^https?:/.test(e), ja = () => {
2556
- const { page: e } = Xa(), t = e?.footer;
2557
- return t ? /* @__PURE__ */ s.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ s.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
2558
- /* @__PURE__ */ s.jsxs(
2559
- "div",
2560
- {
2561
- className: $("flex flex-row gap-8", {
2562
- "justify-center": !t.position || t.position === "center",
2563
- "justify-start": t.position === "start",
2564
- "justify-end": t.position === "end"
2565
- }),
2566
- children: [
2567
- /* @__PURE__ */ s.jsx(N.Target, { name: "footer-before" }),
2568
- t.columns && /* @__PURE__ */ s.jsx(
2569
- "div",
2570
- {
2571
- className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
2572
- style: { "--columns": t.columns.length },
2573
- children: t.columns.map((n) => /* @__PURE__ */ s.jsxs(
2574
- "div",
2575
- {
2576
- className: $({
2577
- "justify-self-center": !n.position || n.position === "center",
2578
- "justify-self-start": n.position === "start",
2579
- "justify-self-end": n.position === "end"
2580
- }),
2581
- children: [
2582
- /* @__PURE__ */ s.jsx("span", { className: "text-sm font-semibold", children: n.title }),
2583
- /* @__PURE__ */ s.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
2584
- const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
2585
- return /* @__PURE__ */ s.jsx("li", { children: ba(r.href) ? /* @__PURE__ */ s.jsxs(
2586
- "a",
2587
- {
2588
- href: r.href,
2589
- target: "_blank",
2590
- rel: "noopener noreferrer",
2591
- className: o,
2592
- children: [
2593
- /* @__PURE__ */ s.jsx("span", { children: r.label }),
2594
- /* @__PURE__ */ s.jsx(Rn, { size: 12 })
2595
- ]
2596
- }
2597
- ) : /* @__PURE__ */ s.jsx(Hn, { to: r.href, className: o, children: /* @__PURE__ */ s.jsx("span", { children: r.label }) }) }, r.href + r.label);
2598
- }) })
2599
- ]
2600
- },
2601
- n.title
2602
- ))
2603
- }
2604
- ),
2605
- /* @__PURE__ */ s.jsx(N.Target, { name: "footer-after" })
2606
- ]
2607
- }
2608
- ),
2609
- /* @__PURE__ */ s.jsxs(
2610
- "div",
2611
- {
2612
- className: $(
2613
- "flex items-center justify-between",
2614
- t.columns && "border-t mt-8 pt-8"
2615
- ),
2616
- children: [
2617
- t.logo && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2618
- /* @__PURE__ */ s.jsx(
2619
- "img",
2620
- {
2621
- src: t.logo.src.light,
2622
- alt: t.logo.alt,
2623
- className: "w-8 dark:hidden",
2624
- style: { width: t.logo.width }
2625
- }
2626
- ),
2627
- /* @__PURE__ */ s.jsx(
2628
- "img",
2629
- {
2630
- src: t.logo.src.dark,
2631
- alt: t.logo.alt,
2632
- className: "w-8 hidden dark:block",
2633
- style: { width: t.logo.width }
2634
- }
2635
- )
2636
- ] }),
2637
- t.copyright && /* @__PURE__ */ s.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2638
- /* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ s.jsxs(
2639
- "a",
2640
- {
2641
- href: n.href,
2642
- target: "_blank",
2643
- rel: "noopener noreferrer",
2644
- className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
2645
- children: [
2646
- /* @__PURE__ */ s.jsx(_a, { icon: n.icon }),
2647
- n.label
2648
- ]
2649
- },
2650
- n.href
2651
- )) })
2652
- ]
2653
- }
2654
- )
2655
- ] }) }) : null;
2656
- };
2657
- function ka({
2658
- className: e,
2659
- ...t
2660
- }) {
2661
- return /* @__PURE__ */ s.jsx(
2662
- "div",
2663
- {
2664
- className: $("animate-pulse rounded-md bg-muted", e),
2665
- ...t
2666
- }
2667
- );
2668
- }
2669
- const ut = {
2670
- info: "bg-blue-500",
2671
- note: "bg-gray-500",
2672
- tip: "bg-green-600",
2673
- caution: "bg-orange-500",
2674
- danger: "bg-rose-500"
2675
- }, za = () => {
2676
- const { page: e } = E(), [t, n] = q(!0);
2677
- if (!e?.banner || !t)
2678
- return /* @__PURE__ */ s.jsx("style", { children: ":root { --banner-height: 0px; }" });
2679
- const r = e.banner.color && e.banner.color in ut ? ut[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
2680
- return /* @__PURE__ */ s.jsxs(
2681
- "div",
2682
- {
2683
- className: $(
2684
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center lg:h-(--banner-height)",
2685
- r
2686
- ),
2687
- "data-pagefind-ignore": "all",
2688
- style: o,
2689
- children: [
2690
- /* @__PURE__ */ s.jsx("div", { className: "w-full", children: e.banner.message }),
2691
- e.banner.dismissible && /* @__PURE__ */ s.jsx(
2692
- "button",
2693
- {
2694
- type: "button",
2695
- className: "md:absolute md:end-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
2696
- onClick: () => n(!1),
2697
- children: /* @__PURE__ */ s.jsx(Mn, { size: 16 })
2698
- }
2699
- )
2700
- ]
2701
- }
2702
- );
2703
- }, Kt = (e) => /* @__PURE__ */ s.jsxs(
2704
- "svg",
2705
- {
2706
- xmlns: "http://www.w3.org/2000/svg",
2707
- viewBox: "0 0 132 100",
2708
- fill: "none",
2709
- ...e,
2710
- children: [
2711
- /* @__PURE__ */ s.jsx(
2712
- "path",
2713
- {
2714
- fill: "currentColor",
2715
- fillRule: "evenodd",
2716
- d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
2717
- clipRule: "evenodd"
2718
- }
2719
- ),
2720
- /* @__PURE__ */ s.jsx(
2721
- "path",
2722
- {
2723
- fill: "currentColor",
2724
- d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
2725
- }
2726
- )
2727
- ]
2728
- }
2729
- );
2730
- Kt.displayName = "ZudokuLogo";
2731
- const Wt = ({ className: e }) => /* @__PURE__ */ s.jsxs(
2732
- "a",
2733
- {
2734
- href: "https://zudoku.dev",
2735
- target: "_blank",
2736
- rel: "noopener noreferrer",
2737
- className: $(
2738
- "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
2739
- e
2740
- ),
2741
- children: [
2742
- /* @__PURE__ */ s.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
2743
- /* @__PURE__ */ s.jsx(Kt, { className: "w-3.5 h-3.5 dark:fill-white" }),
2744
- "powered by ",
2745
- "Zudoku"
2746
- ] }),
2747
- /* @__PURE__ */ s.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ s.jsx(
2748
- Un,
2749
- {
2750
- size: 12,
2751
- absoluteStrokeWidth: !0,
2752
- strokeWidth: 1.5,
2753
- className: "rtl:rotate-180"
2754
- }
2755
- ) })
2756
- ]
2757
- }
2758
- ), Vt = () => {
2759
- const t = ye().state === "loading", [n, r] = q(!1);
2760
- M(() => {
2761
- const a = setTimeout(() => r(t), 200);
2762
- return () => clearTimeout(a);
2763
- }, [t]);
2764
- const { isFinished: o, progress: i } = br({ isAnimating: n });
2765
- return /* @__PURE__ */ s.jsx(
2766
- "div",
2767
- {
2768
- className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
2769
- style: {
2770
- opacity: o ? 0 : 1,
2771
- width: o ? 0 : `${i * 100}%`
2772
- }
2773
- }
2774
- );
2775
- };
2776
- function Za() {
2777
- const e = navigator.userAgent.toLowerCase();
2778
- if (e.includes("win")) return "Windows";
2779
- if (e.includes("mac")) return "macOS";
2780
- if (e.includes("linux")) return "Linux";
2781
- }
2782
- const Jt = ({ className: e }) => {
2783
- const t = E(), [n, r] = q(!1), o = On(() => r(!1), []);
2784
- M(() => {
2785
- if (n)
2786
- return;
2787
- function a(u) {
2788
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), r(!0));
2789
- }
2790
- return window.addEventListener("keydown", a), () => {
2791
- window.removeEventListener("keydown", a);
2792
- };
2793
- }, [n, r]);
2794
- const i = t.plugins.find(nr);
2795
- return i ? /* @__PURE__ */ s.jsxs("div", { className: e, children: [
2796
- /* @__PURE__ */ s.jsxs(
2797
- "button",
2798
- {
2799
- type: "button",
2800
- onClick: () => r(!0),
2801
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
2802
- children: [
2803
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 grow", children: [
2804
- /* @__PURE__ */ s.jsx(Fn, { size: 14 }),
2805
- "Search"
2806
- ] }),
2807
- /* @__PURE__ */ s.jsx(ie, { children: /* @__PURE__ */ s.jsx($a, {}) })
2808
- ]
2809
- }
2810
- ),
2811
- /* @__PURE__ */ s.jsx(je, { fallback: null, children: i.renderSearch({
2812
- isOpen: n,
2813
- onClose: o
2814
- }) })
2815
- ] }) : null;
2816
- }, $a = () => {
2817
- const e = Za();
2818
- return /* @__PURE__ */ s.jsxs("kbd", { className: "absolute end-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
2819
- e === "macOS" ? "⌘" : "Ctrl",
2820
- "+K"
2821
- ] });
2822
- }, Gt = () => {
2823
- const { resolvedTheme: e, setTheme: t } = ht();
2824
- return /* @__PURE__ */ s.jsx(ie, { fallback: /* @__PURE__ */ s.jsx(fe, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ s.jsxs(
2825
- "button",
2826
- {
2827
- type: "button",
2828
- className: "flex rounded-full border p-0.5 gap-0.5 group",
2829
- onClick: () => t(e === "dark" ? "light" : "dark"),
2830
- "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
2831
- children: [
2832
- /* @__PURE__ */ s.jsx(
2833
- "div",
2834
- {
2835
- className: $(
2836
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
2837
- e === "light" && "border-border bg-muted",
2838
- e === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
2839
- ),
2840
- children: /* @__PURE__ */ s.jsx(qn, { size: 16 })
2841
- }
2842
- ),
2843
- /* @__PURE__ */ s.jsx(
2844
- "div",
2845
- {
2846
- className: $(
2847
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
2848
- e === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
2849
- e === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
2850
- ),
2851
- children: /* @__PURE__ */ s.jsx(Ln, { size: 16 })
2852
- }
2853
- )
2854
- ]
2855
- }
2856
- ) });
2857
- }, Pa = () => {
2858
- const { navigation: e } = E(), { isAuthenticated: t } = H(), n = e.filter(xt(t));
2859
- return n.length === 0 ? /* @__PURE__ */ s.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ s.jsx(je, { children: /* @__PURE__ */ s.jsxs("div", { className: "items-center justify-between px-8 h-(--top-nav-height) hidden lg:flex text-sm relative", children: [
2860
- /* @__PURE__ */ s.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-row items-center gap-8", children: n.map((r) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(Yt, { ...r }) }, r.label + r.type)) }) }),
2861
- /* @__PURE__ */ s.jsx(N.Target, { name: "top-navigation-side" })
2862
- ] }) });
2863
- }, Xt = (e) => {
2864
- switch (e.type) {
2865
- case "doc":
2866
- return F(e.path);
2867
- case "link":
2868
- return e.to;
2869
- case "category":
2870
- return e.link?.path ? F(e.link.path) : wn(e, (t) => {
2871
- if (t.type !== "category")
2872
- return Xt(t);
2873
- }) ?? "";
2874
- case "custom-page":
2875
- return e.path;
2876
- }
2877
- }, Yt = (e) => {
2878
- const t = yt(), n = Kn(t.topNavItem, e), r = Xt(e);
2879
- return (
2880
- // We don't use isActive here because it has to be inside the navigation,
2881
- // the top nav id doesn't necessarily start with the navigation id
2882
- /* @__PURE__ */ s.jsxs(
2883
- dn,
2884
- {
2885
- viewTransition: !0,
2886
- to: r,
2887
- className: ({ isActive: o, isPending: i }) => {
2888
- const a = o || n;
2889
- return jr(
2890
- "flex items-center gap-2 lg:py-3.5 font-medium -mb-px transition duration-150 delay-75 relative",
2891
- a || i ? [
2892
- "text-foreground",
2893
- // underline with view transition animation
2894
- "after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0",
2895
- "after:h-0.5 after:bg-primary",
2896
- a && "after:[view-transition-name:top-nav-underline]",
2897
- i && "after:bg-primary/25"
2898
- ] : "text-foreground/75 hover:text-foreground"
2899
- );
2900
- },
2901
- children: [
2902
- e.icon && /* @__PURE__ */ s.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
2903
- e.label
2904
- ]
2905
- }
2906
- )
2907
- );
2908
- }, Na = () => {
2909
- const { navigation: e, options: t } = E(), { isAuthenticated: n } = H(), [r, o] = q(!1), i = e.filter(xt(n));
2910
- return /* @__PURE__ */ s.jsxs(
2911
- wr,
2912
- {
2913
- direction: t.page?.dir === "rtl" ? "left" : "right",
2914
- open: r,
2915
- onOpenChange: (a) => o(a),
2916
- children: [
2917
- /* @__PURE__ */ s.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
2918
- /* @__PURE__ */ s.jsx(_r, { className: "lg:hidden", children: /* @__PURE__ */ s.jsx(Qn, { size: 22 }) }),
2919
- /* @__PURE__ */ s.jsx(Vt, {})
2920
- ] }),
2921
- /* @__PURE__ */ s.jsx(
2922
- $t,
2923
- {
2924
- className: "lg:hidden h-[100dvh] end-0 start-auto w-[320px] rounded-none",
2925
- "aria-describedby": void 0,
2926
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
2927
- /* @__PURE__ */ s.jsxs("div", { children: [
2928
- /* @__PURE__ */ s.jsx(Zt, { children: /* @__PURE__ */ s.jsx(Pt, { children: "Navigation" }) }),
2929
- /* @__PURE__ */ s.jsx(Jt, { className: "flex p-4" }),
2930
- /* @__PURE__ */ s.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
2931
- /* @__PURE__ */ s.jsx("li", { className: "empty:hidden", children: /* @__PURE__ */ s.jsx(N.Target, { name: "top-navigation-side" }) }),
2932
- /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(Gt, {}) }),
2933
- i.map((a) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => o(!1), children: /* @__PURE__ */ s.jsx(Yt, { ...a }) }) }, a.label))
2934
- ] })
2935
- ] }),
2936
- t.page?.showPoweredBy !== !1 && /* @__PURE__ */ s.jsx(Wt, { className: "grow-0 justify-center gap-1" })
2937
- ] })
2938
- }
2939
- )
2940
- ]
2941
- }
2942
- );
2943
- }, re = ({ item: e }) => e.children ? /* @__PURE__ */ s.jsxs(mr, { children: [
2944
- /* @__PURE__ */ s.jsx(gr, { children: e.label }),
2945
- /* @__PURE__ */ s.jsx(vr, { children: /* @__PURE__ */ s.jsx(xr, { children: e.children.map((t, n) => (
2946
- // eslint-disable-next-line react/no-array-index-key
2947
- /* @__PURE__ */ s.jsx(re, { item: t }, n)
2948
- )) }) })
2949
- ] }, e.label) : /* @__PURE__ */ s.jsx(we, { to: e.path ?? "", children: /* @__PURE__ */ s.jsxs(yr, { className: "flex gap-2", children: [
2950
- e.icon && /* @__PURE__ */ s.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
2951
- e.label
2952
- ] }, e.label) }), en = kt(function() {
2953
- const t = H(), { isAuthenticated: n, profile: r, isAuthEnabled: o } = H(), i = E(), { page: a, plugins: u, options: f } = i, h = u.filter((l) => rr(l)).flatMap((l) => l.getProfileMenuItems(i)).sort((l) => l.weight ?? 0), g = a?.logo ? /https?:\/\//.test(a.logo.src.light) ? a.logo.src.light : F(f.basePath, a.logo.src.light) : void 0, m = a?.logo ? /https?:\/\//.test(a.logo.src.dark) ? a.logo.src.dark : F(f.basePath, a.logo.src.dark) : void 0, d = "inset-shadow-[0_-1px_0_0_var(--border)]";
2954
- return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2955
- /* @__PURE__ */ s.jsx(za, {}),
2956
- /* @__PURE__ */ s.jsxs("div", { className: $(d, "relative"), children: [
2957
- /* @__PURE__ */ s.jsx(Vt, {}),
2958
- /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto flex items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent", children: [
2959
- /* @__PURE__ */ s.jsx("div", { className: "flex", children: /* @__PURE__ */ s.jsx(we, { to: "/", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3.5", children: [
2960
- a?.logo && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2961
- /* @__PURE__ */ s.jsx(
2962
- "img",
2963
- {
2964
- src: g,
2965
- alt: a.logo.alt ?? a.pageTitle,
2966
- style: { width: a.logo.width },
2967
- className: "max-h-(--top-header-height) dark:hidden",
2968
- loading: "lazy"
2969
- }
2970
- ),
2971
- /* @__PURE__ */ s.jsx(
2972
- "img",
2973
- {
2974
- src: m,
2975
- alt: a.logo.alt ?? a.pageTitle,
2976
- style: { width: a.logo.width },
2977
- className: "max-h-(--top-header-height) hidden dark:block",
2978
- loading: "lazy"
2979
- }
2980
- )
2981
- ] }),
2982
- /* @__PURE__ */ s.jsx("span", { className: "font-semibold text-2xl", children: a?.pageTitle })
2983
- ] }) }) }),
2984
- /* @__PURE__ */ s.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ s.jsx(Jt, { className: "pointer-events-auto" }) }),
2985
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-8", children: [
2986
- /* @__PURE__ */ s.jsx(Na, {}),
2987
- /* @__PURE__ */ s.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
2988
- /* @__PURE__ */ s.jsx(N.Target, { name: "head-navigation-start" }),
2989
- o && /* @__PURE__ */ s.jsx(
2990
- ie,
2991
- {
2992
- fallback: /* @__PURE__ */ s.jsx(ka, { className: "rounded-sm h-5 w-24 mr-4" }),
2993
- children: n ? Object.values(h).length > 0 && /* @__PURE__ */ s.jsxs(dr, { modal: !1, children: [
2994
- /* @__PURE__ */ s.jsx(hr, { asChild: !0, children: /* @__PURE__ */ s.jsx(fe, { variant: "ghost", children: r?.name ?? "My Account" }) }),
2995
- /* @__PURE__ */ s.jsxs(fr, { className: "w-56", children: [
2996
- /* @__PURE__ */ s.jsxs(pr, { children: [
2997
- r?.name ? `${r.name}` : "My Account",
2998
- r?.email && /* @__PURE__ */ s.jsx("div", { className: "font-normal text-muted-foreground", children: r.email })
2999
- ] }),
3000
- h.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ s.jsx(de, {}),
3001
- h.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ s.jsx(re, { item: l }, l.label)),
3002
- h.filter(
3003
- (l) => !l.category || l.category === "middle"
3004
- ).length > 0 && /* @__PURE__ */ s.jsx(de, {}),
3005
- h.filter(
3006
- (l) => !l.category || l.category === "middle"
3007
- ).map((l) => /* @__PURE__ */ s.jsx(re, { item: l }, l.label)),
3008
- h.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ s.jsx(de, {}),
3009
- h.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ s.jsx(re, { item: l }, l.label))
3010
- ] })
3011
- ] }) : /* @__PURE__ */ s.jsx(fe, { variant: "ghost", onClick: () => t.login(), children: "Login" })
3012
- }
3013
- ),
3014
- /* @__PURE__ */ s.jsx(N.Target, { name: "head-navigation-end" }),
3015
- /* @__PURE__ */ s.jsx(Gt, {})
3016
- ] })
3017
- ] })
3018
- ] })
3019
- ] }),
3020
- /* @__PURE__ */ s.jsx("div", { className: $("hidden lg:block", d), children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent relative", children: [
3021
- /* @__PURE__ */ s.jsx(N.Target, { name: "top-navigation-before" }),
3022
- /* @__PURE__ */ s.jsx(Pa, {}),
3023
- /* @__PURE__ */ s.jsx(N.Target, { name: "top-navigation-after" })
3024
- ] }) })
3025
- ] });
3026
- }), tn = ({
3027
- shouldScaleBackground: e = !0,
3028
- ...t
3029
- }) => /* @__PURE__ */ s.jsx(
3030
- O.Root,
3031
- {
3032
- shouldScaleBackground: e,
3033
- ...t
3034
- }
3035
- );
3036
- tn.displayName = "Drawer";
3037
- const Ca = O.Trigger, Ea = O.Portal, nn = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s.jsx(
3038
- O.Overlay,
3039
- {
3040
- ref: n,
3041
- className: $("fixed inset-0 z-50 bg-black/80", e),
3042
- ...t
3043
- }
3044
- ));
3045
- nn.displayName = O.Overlay.displayName;
3046
- const Oa = A.forwardRef(
3047
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ s.jsxs(Ea, { children: [
3048
- /* @__PURE__ */ s.jsx(nn, {}),
3049
- /* @__PURE__ */ s.jsxs(
3050
- O.Content,
3051
- {
3052
- ref: o,
3053
- className: $(
3054
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
3055
- e
3056
- ),
3057
- ...r,
3058
- children: [
3059
- !n && /* @__PURE__ */ s.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
3060
- t
3061
- ]
3062
- }
3063
- )
3064
- ] })
3065
- );
3066
- Oa.displayName = "DrawerContent";
3067
- const Sa = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s.jsx(
3068
- O.Title,
3069
- {
3070
- ref: n,
3071
- className: $(
3072
- "text-lg font-semibold leading-none tracking-tight",
3073
- e
3074
- ),
3075
- ...t
3076
- }
3077
- ));
3078
- Sa.displayName = O.Title.displayName;
3079
- const Ia = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s.jsx(
3080
- O.Description,
3081
- {
3082
- ref: n,
3083
- className: $("text-sm text-muted-foreground", e),
3084
- ...t
3085
- }
3086
- ));
3087
- Ia.displayName = O.Description.displayName;
3088
- const rn = ({
3089
- children: e,
3090
- className: t
3091
- }) => {
3092
- const { options: n } = E(), r = be(null);
3093
- return M(() => {
3094
- const o = r.current?.querySelector('[aria-current="page"]');
3095
- Wn(o ?? null);
3096
- }, []), /* @__PURE__ */ s.jsxs("div", { className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r", children: [
3097
- /* @__PURE__ */ s.jsx(
3098
- "nav",
3099
- {
3100
- ref: r,
3101
- className: $(
3102
- "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",
3103
- "-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
3104
- // Revert the padding/margin on the first child
3105
- "-mt-2.5",
3106
- t
3107
- ),
3108
- style: {
3109
- maskImage: "linear-gradient(180deg, transparent 1%, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 90%, transparent 99%)"
3110
- },
3111
- children: e
3112
- }
3113
- ),
3114
- /* @__PURE__ */ s.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.page?.showPoweredBy !== !1 && /* @__PURE__ */ s.jsx(Wt, {}) })
3115
- ] });
3116
- };
3117
- rn.displayName = "NavigationWrapper";
3118
- const Ta = ({
3119
- onRequestClose: e,
3120
- navigation: t
3121
- }) => /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3122
- /* @__PURE__ */ s.jsxs(rn, { children: [
3123
- /* @__PURE__ */ s.jsx(N.Target, { name: "navigation-before" }),
3124
- t.map((n) => /* @__PURE__ */ s.jsx(
3125
- Me,
3126
- {
3127
- item: n
3128
- },
3129
- n.type + (n.label ?? "") + ("path" in n ? n.path : "") + ("file" in n ? n.file : "") + ("to" in n ? n.to : "")
3130
- )),
3131
- /* @__PURE__ */ s.jsx(N.Target, { name: "navigation-after" })
3132
- ] }),
3133
- /* @__PURE__ */ s.jsx(
3134
- $t,
3135
- {
3136
- className: "lg:hidden h-[100dvh] start-0 w-[320px] rounded-none",
3137
- "aria-describedby": void 0,
3138
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
3139
- /* @__PURE__ */ s.jsx(Zt, { children: /* @__PURE__ */ s.jsx(Pt, { children: "Navigation" }) }),
3140
- t.map((n) => /* @__PURE__ */ s.jsx(
3141
- Me,
3142
- {
3143
- item: n,
3144
- onRequestClose: e
3145
- },
3146
- n.label
3147
- ))
3148
- ] })
3149
- }
3150
- )
3151
- ] }), Aa = ({ children: e }) => {
3152
- const [t, n] = q(!1), { navigation: r } = yt(), o = r.length > 0, i = ye().state === "loading", { options: a } = E();
3153
- return /* @__PURE__ */ s.jsxs(
3154
- tn,
3155
- {
3156
- direction: a.page?.dir === "rtl" ? "right" : "left",
3157
- open: t,
3158
- onOpenChange: (u) => n(u),
3159
- children: [
3160
- o && /* @__PURE__ */ s.jsx(
3161
- Ta,
3162
- {
3163
- onRequestClose: () => n(!1),
3164
- navigation: r
3165
- }
3166
- ),
3167
- o && /* @__PURE__ */ s.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ s.jsxs(Ca, { className: "flex items-center gap-2 px-4", children: [
3168
- /* @__PURE__ */ s.jsx(Bn, { size: 16, strokeWidth: 1.5 }),
3169
- /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "Menu" })
3170
- ] }) }),
3171
- /* @__PURE__ */ s.jsxs(
3172
- "main",
3173
- {
3174
- "data-pagefind-body": !0,
3175
- className: $(
3176
- "px-4 lg:pe-8 lg:px-8",
3177
- !o && "col-span-full",
3178
- i && "animate-pulse"
3179
- ),
3180
- children: [
3181
- /* @__PURE__ */ s.jsx(N.Target, { name: "content-before" }),
3182
- e,
3183
- /* @__PURE__ */ s.jsx(N.Target, { name: "content-after" })
3184
- ]
3185
- }
3186
- )
3187
- ]
3188
- }
3189
- );
3190
- }, Da = () => /* @__PURE__ */ s.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ s.jsx(zt, {}) }), Ra = ({ children: e }) => {
3191
- const { meta: t, authentication: n, options: r } = E(), o = se();
3192
- return Vn(), wa(), M(() => {
3193
- n?.onPageLoad?.();
3194
- }, [n]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3195
- /* @__PURE__ */ s.jsxs(xe, { titleTemplate: t?.title, children: [
3196
- r.canonicalUrlOrigin && /* @__PURE__ */ s.jsx(
3197
- "link",
3198
- {
3199
- rel: "canonical",
3200
- href: F(
3201
- r.canonicalUrlOrigin,
3202
- r.basePath,
3203
- o.pathname
3204
- )
3205
- }
3206
- ),
3207
- t?.description && /* @__PURE__ */ s.jsx("meta", { name: "description", content: t.description }),
3208
- t?.favicon && /* @__PURE__ */ s.jsx("link", { rel: "icon", href: t.favicon })
3209
- ] }),
3210
- /* @__PURE__ */ s.jsx(N.Target, { name: "layout-before-head" }),
3211
- /* @__PURE__ */ s.jsx(en, {}),
3212
- /* @__PURE__ */ s.jsx(N.Target, { name: "layout-after-head" }),
3213
- /* @__PURE__ */ s.jsx(
3214
- "div",
3215
- {
3216
- className: $(
3217
- "grid max-w-screen-2xl w-full lg:mx-auto",
3218
- "[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
3219
- "grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
3220
- ),
3221
- children: /* @__PURE__ */ s.jsx(je, { fallback: /* @__PURE__ */ s.jsx(Da, {}), children: /* @__PURE__ */ s.jsx(Aa, { children: e ?? /* @__PURE__ */ s.jsx(ft, {}) }) })
3222
- }
3223
- ),
3224
- /* @__PURE__ */ s.jsx(ja, {})
3225
- ] });
3226
- }, Ma = ({
3227
- title: e = "An error occurred",
3228
- message: t,
3229
- category: n
3230
- }) => /* @__PURE__ */ s.jsxs("div", { className: Gn + " h-full pt-(--padding-content-top)", children: [
3231
- n && /* @__PURE__ */ s.jsx(tr, { children: n }),
3232
- e && /* @__PURE__ */ s.jsx(Jn, { level: 1, className: "flex gap-3.5 items-center", children: e }),
3233
- /* @__PURE__ */ s.jsx("p", { children: t })
3234
- ] }), Ua = (e) => {
3235
- switch (e) {
3236
- case 400:
3237
- return {
3238
- title: "Bad Request",
3239
- message: "The request could not be understood by the server due to malformed syntax."
3240
- };
3241
- case 403:
3242
- return {
3243
- title: "Forbidden",
3244
- message: "You don't have permission to access this resource."
3245
- };
3246
- case 404:
3247
- return {
3248
- title: "Not Found",
3249
- message: "The requested resource could not be found."
3250
- };
3251
- case 405:
3252
- return {
3253
- title: "Method Not Allowed",
3254
- message: "The request method is not supported for the requested resource."
3255
- };
3256
- case 414:
3257
- return {
3258
- title: "Request URI Too Large",
3259
- message: "The request URI is too large."
3260
- };
3261
- case 416:
3262
- return {
3263
- title: "Range Not Satisfiable",
3264
- message: "The server cannot satisfy the request range."
3265
- };
3266
- case 500:
3267
- return {
3268
- title: "Internal Server Error",
3269
- message: "An unexpected error occurred while processing your request."
3270
- };
3271
- case 501:
3272
- return {
3273
- title: "Not Implemented",
3274
- message: "The server does not support the functionality required to fulfill the request."
3275
- };
3276
- case 502:
3277
- return {
3278
- title: "Bad Gateway",
3279
- message: "The server received an invalid response from the upstream server."
3280
- };
3281
- case 503:
3282
- return {
3283
- title: "Service Unavailable",
3284
- message: "The server is temporarily unable to handle the request."
3285
- };
3286
- case 504:
3287
- return {
3288
- title: "Gateway Timeout",
3289
- message: "The server did not receive a timely response from the upstream server."
3290
- };
3291
- default:
3292
- return {
3293
- title: "An error occurred",
3294
- message: "Something went wrong while processing your request."
3295
- };
3296
- }
3297
- }, Fa = ({ statusCode: e, message: t }) => {
3298
- const n = Ua(e);
3299
- return /* @__PURE__ */ s.jsx(
3300
- Ma,
3301
- {
3302
- title: n.title,
3303
- message: t ?? n.message,
3304
- category: e
3305
- }
3306
- );
3307
- }, qa = _e(null), he = {
3308
- didCatch: !1,
3309
- error: null
3310
- };
3311
- class La extends Sn {
3312
- constructor(t) {
3313
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = he;
3314
- }
3315
- static getDerivedStateFromError(t) {
3316
- return {
3317
- didCatch: !0,
3318
- error: t
3319
- };
3320
- }
3321
- resetErrorBoundary() {
3322
- const {
3323
- error: t
3324
- } = this.state;
3325
- if (t !== null) {
3326
- for (var n, r, o = arguments.length, i = new Array(o), a = 0; a < o; a++)
3327
- i[a] = arguments[a];
3328
- (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
3329
- args: i,
3330
- reason: "imperative-api"
3331
- }), this.setState(he);
3332
- }
3333
- }
3334
- componentDidCatch(t, n) {
3335
- var r, o;
3336
- (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
3337
- }
3338
- componentDidUpdate(t, n) {
3339
- const {
3340
- didCatch: r
3341
- } = this.state, {
3342
- resetKeys: o
3343
- } = this.props;
3344
- if (r && n.error !== null && Qa(t.resetKeys, o)) {
3345
- var i, a;
3346
- (i = (a = this.props).onReset) === null || i === void 0 || i.call(a, {
3347
- next: o,
3348
- prev: t.resetKeys,
3349
- reason: "keys"
3350
- }), this.setState(he);
3351
- }
3352
- }
3353
- render() {
3354
- const {
3355
- children: t,
3356
- fallbackRender: n,
3357
- FallbackComponent: r,
3358
- fallback: o
3359
- } = this.props, {
3360
- didCatch: i,
3361
- error: a
3362
- } = this.state;
3363
- let u = t;
3364
- if (i) {
3365
- const f = {
3366
- error: a,
3367
- resetErrorBoundary: this.resetErrorBoundary
3368
- };
3369
- if (typeof n == "function")
3370
- u = n(f);
3371
- else if (r)
3372
- u = Re(r, f);
3373
- else if (o !== void 0)
3374
- u = o;
3375
- else
3376
- throw a;
3377
- }
3378
- return Re(qa.Provider, {
3379
- value: {
3380
- didCatch: i,
3381
- error: a,
3382
- resetErrorBoundary: this.resetErrorBoundary
3383
- }
3384
- }, u);
3385
- }
3386
- }
3387
- function Qa() {
3388
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
3389
- return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
3390
- }
3391
- let Ba = () => ({
3392
- emit(e, ...t) {
3393
- for (let n = this.events[e] || [], r = 0, o = n.length; r < o; r++)
3394
- n[r](...t);
3395
- },
3396
- events: {},
3397
- on(e, t) {
3398
- return (this.events[e] ||= []).push(t), () => {
3399
- this.events[e] = this.events[e]?.filter((n) => t !== n);
3400
- };
3401
- }
3402
- });
3403
- class Ha {
3404
- plugins;
3405
- navigation;
3406
- meta;
3407
- page;
3408
- authentication;
3409
- queryClient;
3410
- options;
3411
- navigationPlugins;
3412
- emitter = Ba();
3413
- constructor(t, n) {
3414
- const r = (t.protectedRoutes ?? []).concat(
3415
- t.plugins?.flatMap(
3416
- (o) => Ue(o) ? o.getProtectedRoutes?.() ?? [] : []
3417
- ) ?? []
3418
- );
3419
- this.queryClient = n, this.options = { ...t, protectedRoutes: r }, this.plugins = t.plugins ?? [], this.navigation = t.navigation ?? [], this.navigationPlugins = this.plugins.filter(Ue), this.authentication = this.plugins.find(or), this.meta = t.metadata, this.page = t.page, this.plugins.forEach((o) => {
3420
- sr(o) && lr(o.events).forEach(([i, a]) => {
3421
- this.emitter.on(i, a);
3422
- });
3423
- }), _n.subscribe((o, i) => {
3424
- this.emitEvent("auth", {
3425
- prev: i,
3426
- next: o
3427
- });
3428
- });
3429
- }
3430
- initialize = async () => {
3431
- await Promise.all(
3432
- this.plugins.filter(ir).map((t) => t.initialize?.(this))
3433
- );
3434
- };
3435
- getApiIdentities = async () => (await Promise.all(
3436
- this.plugins.filter(ar).map((n) => n.getIdentities(this))
3437
- )).flat();
3438
- addEventListener(t, n) {
3439
- return this.emitter.on(t, n);
3440
- }
3441
- emitEvent = (t, ...n) => this.emitter.emit(t, ...n);
3442
- getPluginNavigation = async (t) => (await Promise.all(
3443
- this.navigationPlugins.map(
3444
- (r) => r.getNavigation?.(F(t), this)
3445
- )
3446
- )).flatMap((r) => r ?? []);
3447
- signRequest = async (t) => {
3448
- if (!this.authentication)
3449
- throw new Error("No authentication provider configured");
3450
- return await this.authentication.signRequest(t);
3451
- };
3452
- }
3453
- function Ka({ error: e, resetErrorBoundary: t }) {
3454
- return /* @__PURE__ */ s.jsx(_t, { error: e });
3455
- }
3456
- const ne = globalThis;
3457
- (!ne.requestIdleCallback || !ne.cancelIdleCallback) && (ne.requestIdleCallback = (e) => setTimeout(e, 1), ne.cancelIdleCallback = clearTimeout);
3458
- const on = {
3459
- Header: en
3460
- }, Wa = _e(on), Va = Wa.Provider, Ja = () => {
3461
- const e = se(), t = E(), n = be(void 0);
3462
- return M(() => {
3463
- t.emitEvent("location", {
3464
- from: n.current,
3465
- to: e
3466
- }), n.current = e;
3467
- }, [t, e]), null;
3468
- }, Ga = ({
3469
- children: e,
3470
- context: t
3471
- }) => (bn({
3472
- queryFn: async () => (await t.initialize(), !0),
3473
- queryKey: ["zudoku-initialize", jn]
3474
- }), /* @__PURE__ */ s.jsx(kn.Provider, { value: t, children: e }));
3475
- let lt;
3476
- const sn = kt(
3477
- ({ children: e, ...t }) => {
3478
- const n = le(
3479
- () => ({ ...on, ...t.overrides }),
3480
- [t.overrides]
3481
- ), r = se(), o = le(() => ({
3482
- ...(t.plugins ?? []).filter(cr).flatMap(
3483
- (l) => l.getMdxComponents ? [l.getMdxComponents()] : []
3484
- ).reduce(
3485
- (l, v) => ({ ...l, ...v }),
3486
- {}
3487
- ),
3488
- ...Xn,
3489
- ...t.mdx?.components
3490
- }), [t.mdx?.components, t.plugins]), { stagger: i } = In(pe), [a, u] = q(!1), f = le(
3491
- () => a ? { stagger: !0 } : { stagger: i },
3492
- [i, a]
3493
- ), h = ye(), g = gt();
3494
- M(() => {
3495
- a || u(!0);
3496
- }, [a, h.location]), lt ??= new Ha(t, g);
3497
- const m = t.plugins?.flatMap(
3498
- (d) => ur(d) ? d.getHead?.({ location: r }) ?? [] : []
3499
- ).map((d, l) => /* @__PURE__ */ s.jsx(xe, { children: d }, l));
3500
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3501
- m,
3502
- /* @__PURE__ */ s.jsx(pe.Provider, { value: f, children: /* @__PURE__ */ s.jsxs(Ga, { context: lt, children: [
3503
- /* @__PURE__ */ s.jsx(Ja, {}),
3504
- /* @__PURE__ */ s.jsx(Pn, { slots: t.slots ?? t.UNSAFE_slotlets, children: /* @__PURE__ */ s.jsx(kr, { components: o, children: /* @__PURE__ */ s.jsx(cn, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ s.jsx(Va, { value: n, children: /* @__PURE__ */ s.jsx(Yn, { children: e ?? /* @__PURE__ */ s.jsx(ft, {}) }) }) }) }) })
3505
- ] }) })
3506
- ] });
3507
- }
3508
- );
3509
- sn.displayName = "ZudokoInner";
3510
- const an = (e) => /* @__PURE__ */ s.jsx(La, { FallbackComponent: Ka, children: /* @__PURE__ */ s.jsx(sn, { ...e }) });
3511
- an.displayName = "Zudoku";
3512
- const zc = Ra, Zc = Nn, $c = Or, Pc = Tr, Nc = Ar, Cc = $n, Ec = xe, Oc = Fa, Sc = Cn, Ic = er, Tc = zt, Ac = ie, Dc = bt, Rc = we, Mc = ya, Uc = an, Fc = zr, Xa = E, qc = H, Lc = zn, Qc = Zn, Bc = ht;
1
+ import "./RouteGuard-Bd-ppFbi.js";
2
+ import "./index-ClhS5TxS.js";
3
+ import "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
+ import "./hook-Bd0yS8M0.js";
5
+ import "./Slot-DwZlQ-vX.js";
6
+ import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-BIbCx5Fh.js";
7
+ import "./ui/Button.js";
8
+ import "./ui/Callout.js";
9
+ import "./ClientOnly-E7hGysn1.js";
10
+ import "./Spinner-mNLZ6awP.js";
3513
11
  export {
3514
- Pc as Bootstrap,
3515
- Nc as BootstrapStatic,
3516
- Mc as BuildCheck,
3517
- Dc as Button,
3518
- Qc as CACHE_KEYS,
3519
- Sc as Callout,
3520
- Ac as ClientOnly,
3521
- Ec as Head,
3522
- zc as Layout,
3523
- Rc as Link,
3524
- Ic as Markdown,
3525
- Cc as RouteGuard,
3526
- Zc as RouterError,
3527
- $c as ServerError,
3528
- Tc as Spinner,
3529
- Oc as StatusPage,
3530
- Uc as Zudoku,
3531
- qc as useAuth,
3532
- Lc as useCache,
3533
- Fc as useMDXComponents,
3534
- Bc as useTheme,
3535
- Xa as useZudoku
12
+ C as Bootstrap,
13
+ d as BootstrapStatic,
14
+ h as BuildCheck,
15
+ k as Button,
16
+ l as CACHE_KEYS,
17
+ S as Callout,
18
+ B as ClientOnly,
19
+ c as Head,
20
+ y as Layout,
21
+ E as Link,
22
+ g as Markdown,
23
+ H as RouteGuard,
24
+ L as RouterError,
25
+ M as ServerError,
26
+ R as Spinner,
27
+ T as StatusPage,
28
+ Z as Typography,
29
+ f as Zudoku,
30
+ A as useAuth,
31
+ b as useCache,
32
+ j as useMDXComponents,
33
+ v as useTheme,
34
+ w as useZudoku
3536
35
  };
3537
36
  //# sourceMappingURL=zudoku.components.js.map