zudoku 0.0.0-f2a195f → 0.0.0-f2fd45c

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 (475) hide show
  1. package/cli.js +2 -2
  2. package/dist/app/entry.client.js +2 -2
  3. package/dist/app/entry.client.js.map +1 -1
  4. package/dist/app/entry.server.js +3 -0
  5. package/dist/app/entry.server.js.map +1 -1
  6. package/dist/app/main.d.ts +1 -0
  7. package/dist/app/main.js +9 -26
  8. package/dist/app/main.js.map +1 -1
  9. package/dist/app/standalone.js.map +1 -1
  10. package/dist/cli/cli.js +1 -2
  11. package/dist/cli/cli.js.map +1 -1
  12. package/dist/cli/common/machine-id/lib.js.map +1 -1
  13. package/dist/cli/common/outdated.js.map +1 -1
  14. package/dist/cli/common/utils/box.js.map +1 -1
  15. package/dist/config/validators/InputSidebarSchema.d.ts +21 -6
  16. package/dist/config/validators/InputSidebarSchema.js +7 -28
  17. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  18. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  19. package/dist/config/validators/SidebarSchema.js +80 -44
  20. package/dist/config/validators/SidebarSchema.js.map +1 -1
  21. package/dist/config/validators/validate.d.ts +431 -271
  22. package/dist/config/validators/validate.js +26 -8
  23. package/dist/config/validators/validate.js.map +1 -1
  24. package/dist/index.d.ts +5 -2
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  28. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  29. package/dist/lib/authentication/hook.d.ts +1 -1
  30. package/dist/lib/authentication/hook.js +1 -1
  31. package/dist/lib/authentication/hook.js.map +1 -1
  32. package/dist/lib/authentication/providers/auth0.js +1 -0
  33. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  34. package/dist/lib/components/Header.js +6 -1
  35. package/dist/lib/components/Header.js.map +1 -1
  36. package/dist/lib/components/Heading.d.ts +1 -1
  37. package/dist/lib/components/MobileTopNavigation.js +4 -1
  38. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  39. package/dist/lib/components/SlotletProvider.d.ts +7 -2
  40. package/dist/lib/components/SlotletProvider.js +3 -5
  41. package/dist/lib/components/SlotletProvider.js.map +1 -1
  42. package/dist/lib/components/SyntaxHighlight.js +4 -1
  43. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  44. package/dist/lib/components/TopNavigation.d.ts +3 -0
  45. package/dist/lib/components/TopNavigation.js +38 -5
  46. package/dist/lib/components/TopNavigation.js.map +1 -1
  47. package/dist/lib/components/context/ZudokuContext.d.ts +6 -10
  48. package/dist/lib/components/context/ZudokuContext.js +26 -20
  49. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  50. package/dist/lib/components/index.d.ts +17 -8
  51. package/dist/lib/components/index.js +10 -3
  52. package/dist/lib/components/index.js.map +1 -1
  53. package/dist/lib/components/navigation/Sidebar.js +3 -3
  54. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  55. package/dist/lib/components/navigation/SidebarCategory.js +18 -9
  56. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  57. package/dist/lib/components/navigation/SidebarItem.js +12 -7
  58. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  59. package/dist/lib/components/navigation/utils.js +10 -14
  60. package/dist/lib/components/navigation/utils.js.map +1 -1
  61. package/dist/lib/core/DevPortalContext.d.ts +3 -6
  62. package/dist/lib/core/DevPortalContext.js.map +1 -1
  63. package/dist/lib/core/plugins.d.ts +1 -0
  64. package/dist/lib/core/plugins.js.map +1 -1
  65. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  66. package/dist/lib/errors/ErrorAlert.js +8 -3
  67. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  68. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  69. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  70. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  71. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  72. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  73. package/dist/lib/plugins/custom-pages/index.d.ts +8 -6
  74. package/dist/lib/plugins/custom-pages/index.js +3 -4
  75. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  76. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  77. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  78. package/dist/lib/plugins/markdown/index.d.ts +5 -6
  79. package/dist/lib/plugins/markdown/index.js +31 -3
  80. package/dist/lib/plugins/markdown/index.js.map +1 -1
  81. package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
  82. package/dist/lib/plugins/markdown/resolver.js +75 -0
  83. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  84. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  85. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  86. package/dist/lib/plugins/openapi/Sidecar.js +2 -2
  87. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  88. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  89. package/dist/lib/plugins/openapi/index.js.map +1 -1
  90. package/dist/lib/plugins/openapi/playground/Playground.js +2 -1
  91. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  92. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  93. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  94. package/dist/lib/plugins/redirect/index.d.ts +2 -5
  95. package/dist/lib/plugins/redirect/index.js +1 -1
  96. package/dist/lib/plugins/redirect/index.js.map +1 -1
  97. package/dist/lib/ui/Accordion.d.ts +7 -0
  98. package/dist/lib/ui/Accordion.js +14 -0
  99. package/dist/lib/ui/Accordion.js.map +1 -0
  100. package/dist/lib/ui/Alert.d.ts +8 -0
  101. package/dist/lib/ui/Alert.js +23 -0
  102. package/dist/lib/ui/Alert.js.map +1 -0
  103. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  104. package/dist/lib/ui/AlertDialog.js +27 -0
  105. package/dist/lib/ui/AlertDialog.js.map +1 -0
  106. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  107. package/dist/lib/ui/AspectRatio.js +4 -0
  108. package/dist/lib/ui/AspectRatio.js.map +1 -0
  109. package/dist/lib/ui/Badge.d.ts +9 -0
  110. package/dist/lib/ui/Badge.js +21 -0
  111. package/dist/lib/ui/Badge.js.map +1 -0
  112. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  113. package/dist/lib/ui/Breadcrumb.js +24 -0
  114. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  115. package/dist/lib/ui/Button.d.ts +2 -3
  116. package/dist/lib/ui/Button.js +1 -1
  117. package/dist/lib/ui/Button.js.map +1 -1
  118. package/dist/lib/ui/Carousel.d.ts +18 -0
  119. package/dist/lib/ui/Carousel.js +99 -0
  120. package/dist/lib/ui/Carousel.js.map +1 -0
  121. package/dist/lib/ui/Checkbox.d.ts +4 -0
  122. package/dist/lib/ui/Checkbox.js +9 -0
  123. package/dist/lib/ui/Checkbox.js.map +1 -0
  124. package/dist/lib/ui/Collapsible.d.ts +5 -0
  125. package/dist/lib/ui/Collapsible.js +6 -0
  126. package/dist/lib/ui/Collapsible.js.map +1 -0
  127. package/dist/lib/ui/Command.d.ts +80 -0
  128. package/dist/lib/ui/Command.js +31 -0
  129. package/dist/lib/ui/Command.js.map +1 -0
  130. package/dist/lib/{components → ui}/Dialog.js +2 -2
  131. package/dist/lib/ui/Dialog.js.map +1 -0
  132. package/dist/lib/ui/Form.d.ts +23 -0
  133. package/dist/lib/ui/Form.js +63 -0
  134. package/dist/lib/ui/Form.js.map +1 -0
  135. package/dist/lib/ui/HoverCard.d.ts +6 -0
  136. package/dist/lib/ui/HoverCard.js +10 -0
  137. package/dist/lib/ui/HoverCard.js.map +1 -0
  138. package/dist/lib/ui/Label.d.ts +5 -0
  139. package/dist/lib/ui/Label.js +10 -0
  140. package/dist/lib/ui/Label.js.map +1 -0
  141. package/dist/lib/ui/Pagination.d.ts +28 -0
  142. package/dist/lib/ui/Pagination.js +24 -0
  143. package/dist/lib/ui/Pagination.js.map +1 -0
  144. package/dist/lib/ui/Popover.d.ts +6 -0
  145. package/dist/lib/ui/Popover.js +10 -0
  146. package/dist/lib/ui/Popover.js.map +1 -0
  147. package/dist/lib/ui/Progress.d.ts +4 -0
  148. package/dist/lib/ui/Progress.js +8 -0
  149. package/dist/lib/ui/Progress.js.map +1 -0
  150. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  151. package/dist/lib/ui/RadioGroup.js +15 -0
  152. package/dist/lib/ui/RadioGroup.js.map +1 -0
  153. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  154. package/dist/lib/ui/ScrollArea.js +12 -0
  155. package/dist/lib/ui/ScrollArea.js.map +1 -0
  156. package/dist/lib/ui/Select.js.map +1 -0
  157. package/dist/lib/ui/Skeleton.d.ts +2 -0
  158. package/dist/lib/ui/Skeleton.js +7 -0
  159. package/dist/lib/ui/Skeleton.js.map +1 -0
  160. package/dist/lib/ui/Slider.d.ts +4 -0
  161. package/dist/lib/ui/Slider.js +8 -0
  162. package/dist/lib/ui/Slider.js.map +1 -0
  163. package/dist/lib/ui/Switch.d.ts +4 -0
  164. package/dist/lib/ui/Switch.js +8 -0
  165. package/dist/lib/ui/Switch.js.map +1 -0
  166. package/dist/lib/ui/Textarea.d.ts +4 -0
  167. package/dist/lib/ui/Textarea.js +9 -0
  168. package/dist/lib/ui/Textarea.js.map +1 -0
  169. package/dist/lib/ui/Toggle.d.ts +12 -0
  170. package/dist/lib/ui/Toggle.js +26 -0
  171. package/dist/lib/ui/Toggle.js.map +1 -0
  172. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  173. package/dist/lib/ui/ToggleGroup.js +21 -0
  174. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  175. package/dist/lib/ui/Tooltip.d.ts +7 -0
  176. package/dist/lib/ui/Tooltip.js +11 -0
  177. package/dist/lib/ui/Tooltip.js.map +1 -0
  178. package/dist/lib/util/MdxComponents.js.map +1 -1
  179. package/dist/lib/util/invariant.d.ts +9 -0
  180. package/dist/lib/util/invariant.js +7 -3
  181. package/dist/lib/util/invariant.js.map +1 -1
  182. package/dist/lib/util/useExposedProps.d.ts +2 -0
  183. package/dist/lib/util/useExposedProps.js +9 -0
  184. package/dist/lib/util/useExposedProps.js.map +1 -0
  185. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  186. package/dist/vite/build.js +12 -3
  187. package/dist/vite/build.js.map +1 -1
  188. package/dist/vite/config.d.ts +2 -8
  189. package/dist/vite/config.js +24 -59
  190. package/dist/vite/config.js.map +1 -1
  191. package/dist/vite/debug.d.ts +1 -0
  192. package/dist/vite/debug.js +10 -0
  193. package/dist/vite/debug.js.map +1 -0
  194. package/dist/vite/dev-server.js +1 -1
  195. package/dist/vite/dev-server.js.map +1 -1
  196. package/dist/vite/output.d.ts +101 -0
  197. package/dist/vite/output.js +30 -0
  198. package/dist/vite/output.js.map +1 -0
  199. package/dist/vite/plugin-component.js +17 -7
  200. package/dist/vite/plugin-component.js.map +1 -1
  201. package/dist/vite/plugin-config-reload.js +0 -2
  202. package/dist/vite/plugin-config-reload.js.map +1 -1
  203. package/dist/vite/plugin-config.d.ts +2 -3
  204. package/dist/vite/plugin-config.js +2 -3
  205. package/dist/vite/plugin-config.js.map +1 -1
  206. package/dist/vite/plugin-docs.js +37 -26
  207. package/dist/vite/plugin-docs.js.map +1 -1
  208. package/dist/vite/plugin-frontmatter.d.ts +2 -1
  209. package/dist/vite/plugin-frontmatter.js +27 -24
  210. package/dist/vite/plugin-frontmatter.js.map +1 -1
  211. package/dist/vite/plugin-mdx.js +17 -0
  212. package/dist/vite/plugin-mdx.js.map +1 -1
  213. package/dist/vite/plugin-search.d.ts +3 -0
  214. package/dist/vite/plugin-search.js +26 -0
  215. package/dist/vite/plugin-search.js.map +1 -0
  216. package/dist/vite/plugin-sidebar.js +7 -6
  217. package/dist/vite/plugin-sidebar.js.map +1 -1
  218. package/dist/vite/plugin.js +4 -2
  219. package/dist/vite/plugin.js.map +1 -1
  220. package/dist/vite/prerender.d.ts +5 -1
  221. package/dist/vite/prerender.js +6 -5
  222. package/dist/vite/prerender.js.map +1 -1
  223. package/lib/{utils-CCcr3AZm.js → AnchorLink-BbB2q-jx.js} +231 -275
  224. package/lib/AnchorLink-BbB2q-jx.js.map +1 -0
  225. package/lib/{AuthenticationPlugin-D_5jC4vE.js → AuthenticationPlugin-C9BHGXlE.js} +3 -3
  226. package/lib/{AuthenticationPlugin-D_5jC4vE.js.map → AuthenticationPlugin-C9BHGXlE.js.map} +1 -1
  227. package/lib/{CategoryHeading-C7VfgpFZ.js → CategoryHeading-Bb9dqxD3.js} +4 -4
  228. package/lib/{CategoryHeading-C7VfgpFZ.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
  229. package/lib/ClientOnly-CVN6leDu.js +11 -0
  230. package/lib/ClientOnly-CVN6leDu.js.map +1 -0
  231. package/lib/{DeveloperHint-CNyuFROc.js → DeveloperHint-DHdLXGHA.js} +2 -2
  232. package/lib/{DeveloperHint-CNyuFROc.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
  233. package/lib/Dialog-k70Qfukb.js +67 -0
  234. package/lib/Dialog-k70Qfukb.js.map +1 -0
  235. package/lib/{Markdown-C-0TaxoY.js → Markdown-BDcCAWwm.js} +4268 -6650
  236. package/lib/Markdown-BDcCAWwm.js.map +1 -0
  237. package/lib/{MdxPage-Cbj8ILOL.js → MdxPage-DKMH_t0f.js} +33 -31
  238. package/lib/MdxPage-DKMH_t0f.js.map +1 -0
  239. package/lib/{OperationList-Dto8Wvgo.js → OperationList-Tj7ubW_t.js} +131 -128
  240. package/lib/OperationList-Tj7ubW_t.js.map +1 -0
  241. package/lib/{Route-DLH-PALM.js → Route-C3DGB6OS.js} +3 -3
  242. package/lib/{Route-DLH-PALM.js.map → Route-C3DGB6OS.js.map} +1 -1
  243. package/lib/Select-Bagt3Bme.js +223 -0
  244. package/lib/Select-Bagt3Bme.js.map +1 -0
  245. package/lib/SlotletProvider-Da7eFgd2.js +241 -0
  246. package/lib/SlotletProvider-Da7eFgd2.js.map +1 -0
  247. package/lib/Spinner-C6zroowC.js +40 -0
  248. package/lib/Spinner-C6zroowC.js.map +1 -0
  249. package/lib/StaggeredRender-DDHSzQKE.js +17 -0
  250. package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
  251. package/lib/{ZudokuContext-uV_XfHPK.js → ZudokuContext-BKXGJTmu.js} +460 -411
  252. package/lib/ZudokuContext-BKXGJTmu.js.map +1 -0
  253. package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
  254. package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
  255. package/lib/_commonjsHelpers-BkfeUUK-.js +29 -0
  256. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  257. package/lib/assets/worker-Bf8vjASY.js.map +1 -1
  258. package/lib/cn-BmFQLtkS.js +2279 -0
  259. package/lib/cn-BmFQLtkS.js.map +1 -0
  260. package/lib/hook-sn0zMTkE.js +229 -0
  261. package/lib/hook-sn0zMTkE.js.map +1 -0
  262. package/lib/{index-aHWE7ArR.js → index-AjWCJNGC.js} +1332 -1606
  263. package/lib/index-AjWCJNGC.js.map +1 -0
  264. package/lib/index-Bn6Lc9tq.js +9 -0
  265. package/lib/{index-DJqnphbT.js.map → index-Bn6Lc9tq.js.map} +1 -1
  266. package/lib/index-BuAyrJe3.js +46 -0
  267. package/lib/index-BuAyrJe3.js.map +1 -0
  268. package/lib/{index-SrtqdZ3j.js → index-CRo94sKK.js} +8 -6
  269. package/lib/{index-SrtqdZ3j.js.map → index-CRo94sKK.js.map} +1 -1
  270. package/lib/{index-D06ATMgg.js → index-LNp6rxyU.js} +2 -2
  271. package/lib/{index-D06ATMgg.js.map → index-LNp6rxyU.js.map} +1 -1
  272. package/lib/index.esm-C5mr_sKO.js +1193 -0
  273. package/lib/index.esm-C5mr_sKO.js.map +1 -0
  274. package/lib/invariant-Caa8-XvF.js +26 -0
  275. package/lib/invariant-Caa8-XvF.js.map +1 -0
  276. package/lib/{router-Oe6YmY6B.js → router-BsfSoK2j.js} +3 -3
  277. package/lib/{router-Oe6YmY6B.js.map → router-BsfSoK2j.js.map} +1 -1
  278. package/lib/ui/Accordion.js +47 -0
  279. package/lib/ui/Accordion.js.map +1 -0
  280. package/lib/ui/Alert.js +51 -0
  281. package/lib/ui/Alert.js.map +1 -0
  282. package/lib/ui/AlertDialog.js +114 -0
  283. package/lib/ui/AlertDialog.js.map +1 -0
  284. package/lib/ui/AspectRatio.js +6 -0
  285. package/lib/ui/AspectRatio.js.map +1 -0
  286. package/lib/ui/Badge.js +27 -0
  287. package/lib/ui/Badge.js.map +1 -0
  288. package/lib/ui/Breadcrumb.js +94 -0
  289. package/lib/ui/Breadcrumb.js.map +1 -0
  290. package/lib/ui/Button.js +49 -0
  291. package/lib/ui/Button.js.map +1 -0
  292. package/lib/ui/Callout.js +77 -0
  293. package/lib/ui/Callout.js.map +1 -0
  294. package/lib/ui/Card.js +62 -0
  295. package/lib/ui/Card.js.map +1 -0
  296. package/lib/ui/Carousel.js +1410 -0
  297. package/lib/ui/Carousel.js.map +1 -0
  298. package/lib/ui/Checkbox.js +28 -0
  299. package/lib/ui/Checkbox.js.map +1 -0
  300. package/lib/ui/Collapsible.js +8 -0
  301. package/lib/ui/Collapsible.js.map +1 -0
  302. package/lib/ui/Command.js +550 -0
  303. package/lib/ui/Command.js.map +1 -0
  304. package/lib/ui/Dialog.js +101 -0
  305. package/lib/ui/Dialog.js.map +1 -0
  306. package/lib/ui/Drawer.js +1153 -0
  307. package/lib/ui/Drawer.js.map +1 -0
  308. package/lib/ui/DropdownMenu.js +145 -0
  309. package/lib/ui/DropdownMenu.js.map +1 -0
  310. package/lib/ui/Form.js +95 -0
  311. package/lib/ui/Form.js.map +1 -0
  312. package/lib/ui/HoverCard.js +24 -0
  313. package/lib/ui/HoverCard.js.map +1 -0
  314. package/lib/ui/Input.js +22 -0
  315. package/lib/ui/Input.js.map +1 -0
  316. package/lib/ui/Label.js +20 -0
  317. package/lib/ui/Label.js.map +1 -0
  318. package/lib/ui/Pagination.js +106 -0
  319. package/lib/ui/Pagination.js.map +1 -0
  320. package/lib/ui/Popover.js +24 -0
  321. package/lib/ui/Popover.js.map +1 -0
  322. package/lib/ui/Progress.js +27 -0
  323. package/lib/ui/Progress.js.map +1 -0
  324. package/lib/ui/RadioGroup.js +32 -0
  325. package/lib/ui/RadioGroup.js.map +1 -0
  326. package/lib/ui/ScrollArea.js +39 -0
  327. package/lib/ui/ScrollArea.js.map +1 -0
  328. package/lib/ui/Select.js +122 -0
  329. package/lib/ui/Select.js.map +1 -0
  330. package/lib/ui/Skeleton.js +18 -0
  331. package/lib/ui/Skeleton.js.map +1 -0
  332. package/lib/ui/Slider.js +24 -0
  333. package/lib/ui/Slider.js.map +1 -0
  334. package/lib/ui/Switch.js +28 -0
  335. package/lib/ui/Switch.js.map +1 -0
  336. package/lib/ui/Tabs.js +47 -0
  337. package/lib/ui/Tabs.js.map +1 -0
  338. package/lib/ui/Textarea.js +21 -0
  339. package/lib/ui/Textarea.js.map +1 -0
  340. package/lib/ui/Toggle.js +38 -0
  341. package/lib/ui/Toggle.js.map +1 -0
  342. package/lib/ui/ToggleGroup.js +42 -0
  343. package/lib/ui/ToggleGroup.js.map +1 -0
  344. package/lib/ui/Tooltip.js +24 -0
  345. package/lib/ui/Tooltip.js.map +1 -0
  346. package/lib/urql-core-KJnLL26g.js.map +1 -1
  347. package/lib/useExposedProps-ChOIUaS4.js +9 -0
  348. package/lib/useExposedProps-ChOIUaS4.js.map +1 -0
  349. package/lib/zudoku.auth-auth0.js +4 -4
  350. package/lib/zudoku.auth-auth0.js.map +1 -1
  351. package/lib/zudoku.auth-clerk.js +1 -1
  352. package/lib/zudoku.auth-openid.js +477 -483
  353. package/lib/zudoku.auth-openid.js.map +1 -1
  354. package/lib/zudoku.components.js +920 -2889
  355. package/lib/zudoku.components.js.map +1 -1
  356. package/lib/zudoku.openapi-worker.js +2 -2
  357. package/lib/zudoku.plugin-api-keys.js +69 -76
  358. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  359. package/lib/zudoku.plugin-custom-pages.js +17 -8
  360. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  361. package/lib/zudoku.plugin-markdown.js +93 -27
  362. package/lib/zudoku.plugin-markdown.js.map +1 -1
  363. package/lib/zudoku.plugin-openapi.js +8 -9
  364. package/lib/zudoku.plugin-openapi.js.map +1 -1
  365. package/lib/zudoku.plugin-redirect.js +2 -2
  366. package/lib/zudoku.plugin-redirect.js.map +1 -1
  367. package/lib/zudoku.plugin-search-inkeep.js +9 -13
  368. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  369. package/package.json +32 -9
  370. package/src/app/entry.client.tsx +4 -2
  371. package/src/app/entry.server.tsx +4 -0
  372. package/src/app/main.css +4 -1
  373. package/src/app/main.tsx +12 -30
  374. package/src/app/standalone.tsx +1 -1
  375. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  376. package/src/lib/authentication/hook.ts +1 -1
  377. package/src/lib/authentication/providers/auth0.tsx +1 -0
  378. package/src/lib/components/Header.tsx +17 -2
  379. package/src/lib/components/MobileTopNavigation.tsx +6 -2
  380. package/src/lib/components/SlotletProvider.tsx +16 -7
  381. package/src/lib/components/SyntaxHighlight.tsx +5 -1
  382. package/src/lib/components/TopNavigation.tsx +70 -23
  383. package/src/lib/components/context/ZudokuContext.ts +28 -20
  384. package/src/lib/components/index.ts +13 -4
  385. package/src/lib/components/navigation/Sidebar.tsx +6 -6
  386. package/src/lib/components/navigation/SidebarCategory.tsx +35 -29
  387. package/src/lib/components/navigation/SidebarItem.tsx +17 -20
  388. package/src/lib/components/navigation/utils.ts +11 -16
  389. package/src/lib/core/DevPortalContext.ts +3 -2
  390. package/src/lib/core/plugins.ts +2 -0
  391. package/src/lib/errors/ErrorAlert.tsx +18 -5
  392. package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
  393. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  394. package/src/lib/plugins/custom-pages/index.tsx +11 -9
  395. package/src/lib/plugins/markdown/MdxPage.tsx +10 -8
  396. package/src/lib/plugins/markdown/index.tsx +49 -12
  397. package/src/lib/plugins/markdown/resolver.ts +92 -0
  398. package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
  399. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
  400. package/src/lib/plugins/openapi/Sidecar.tsx +3 -3
  401. package/src/lib/plugins/openapi/client/worker.ts +2 -2
  402. package/src/lib/plugins/openapi/index.tsx +1 -1
  403. package/src/lib/plugins/openapi/playground/Playground.tsx +4 -3
  404. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  405. package/src/lib/plugins/redirect/index.tsx +3 -7
  406. package/src/lib/ui/Accordion.tsx +56 -0
  407. package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
  408. package/src/lib/ui/AlertDialog.tsx +139 -0
  409. package/src/lib/ui/AspectRatio.tsx +5 -0
  410. package/src/lib/ui/Badge.tsx +36 -0
  411. package/src/lib/ui/Breadcrumb.tsx +115 -0
  412. package/src/lib/ui/Button.tsx +1 -1
  413. package/src/lib/ui/Carousel.tsx +260 -0
  414. package/src/lib/ui/Checkbox.tsx +28 -0
  415. package/src/lib/ui/Collapsible.tsx +9 -0
  416. package/src/lib/ui/Command.tsx +151 -0
  417. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  418. package/src/lib/ui/Form.tsx +177 -0
  419. package/src/lib/ui/HoverCard.tsx +27 -0
  420. package/src/lib/ui/Label.tsx +24 -0
  421. package/src/lib/ui/Pagination.tsx +117 -0
  422. package/src/lib/ui/Popover.tsx +29 -0
  423. package/src/lib/ui/Progress.tsx +26 -0
  424. package/src/lib/ui/RadioGroup.tsx +42 -0
  425. package/src/lib/ui/ScrollArea.tsx +46 -0
  426. package/src/lib/ui/Skeleton.tsx +15 -0
  427. package/src/lib/ui/Slider.tsx +26 -0
  428. package/src/lib/ui/Switch.tsx +27 -0
  429. package/src/lib/ui/Textarea.tsx +23 -0
  430. package/src/lib/ui/Toggle.tsx +43 -0
  431. package/src/lib/ui/ToggleGroup.tsx +59 -0
  432. package/src/lib/ui/Tooltip.tsx +28 -0
  433. package/src/lib/util/MdxComponents.tsx +0 -1
  434. package/src/lib/util/invariant.ts +15 -3
  435. package/src/lib/util/useExposedProps.tsx +16 -0
  436. package/src/lib/util/useScrollToAnchor.ts +1 -1
  437. package/dist/internal.d.ts +0 -1
  438. package/dist/internal.js +0 -2
  439. package/dist/internal.js.map +0 -1
  440. package/dist/lib/components/Dialog.js.map +0 -1
  441. package/dist/lib/components/Select.js.map +0 -1
  442. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  443. package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
  444. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  445. package/dist/lib/ui/Note.d.ts +0 -8
  446. package/dist/lib/ui/Note.js +0 -23
  447. package/dist/lib/ui/Note.js.map +0 -1
  448. package/lib/ErrorPage-CUz-Zzmx.js +0 -16
  449. package/lib/ErrorPage-CUz-Zzmx.js.map +0 -1
  450. package/lib/Input-CYTkk51A.js +0 -2229
  451. package/lib/Input-CYTkk51A.js.map +0 -1
  452. package/lib/Markdown-C-0TaxoY.js.map +0 -1
  453. package/lib/MdxPage-Cbj8ILOL.js.map +0 -1
  454. package/lib/OperationList-Dto8Wvgo.js.map +0 -1
  455. package/lib/SidebarBadge-BWvFQTc1.js +0 -503
  456. package/lib/SidebarBadge-BWvFQTc1.js.map +0 -1
  457. package/lib/SlotletProvider-BGEs7yyu.js +0 -240
  458. package/lib/SlotletProvider-BGEs7yyu.js.map +0 -1
  459. package/lib/Spinner-3cQDBVGr.js +0 -7
  460. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  461. package/lib/ZudokuContext-uV_XfHPK.js.map +0 -1
  462. package/lib/index-DJqnphbT.js +0 -35
  463. package/lib/index-LstIRx3V.js +0 -124
  464. package/lib/index-LstIRx3V.js.map +0 -1
  465. package/lib/index-SyxHzsgJ.js +0 -2867
  466. package/lib/index-SyxHzsgJ.js.map +0 -1
  467. package/lib/index-aHWE7ArR.js.map +0 -1
  468. package/lib/joinPath-B7kNnUX4.js +0 -8
  469. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  470. package/lib/utils-CCcr3AZm.js.map +0 -1
  471. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
  472. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  473. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  474. /package/dist/lib/{components → ui}/Select.js +0 -0
  475. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -1,174 +1,181 @@
1
- var Ba = Object.defineProperty;
2
- var fn = (e) => {
3
- throw TypeError(e);
1
+ var ut = Object.defineProperty;
2
+ var ye = (t) => {
3
+ throw TypeError(t);
4
4
  };
5
- var Ha = (e, t, n) => t in e ? Ba(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var ae = (e, t, n) => Ha(e, typeof t != "symbol" ? t + "" : t, n), hn = (e, t, n) => t.has(e) || fn("Cannot " + n);
7
- var w = (e, t, n) => (hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? fn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (hn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
- var ut = (e, t, n, r) => ({
9
- set _(o) {
10
- X(e, t, o, n);
5
+ var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
+ var v = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), je = (t, e, r) => e.has(t) || ye("Cannot " + r);
7
+ var l = (t, e, r) => (je(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), g = (t, e, r, s) => (je(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
+ var X = (t, e, r, s) => ({
9
+ set _(n) {
10
+ g(t, e, n, r);
11
11
  },
12
12
  get _() {
13
- return w(e, t, r);
13
+ return l(t, e, s);
14
14
  }
15
15
  });
16
- import { c as On, H as It, M as Ua, d as za, A as Ka, b as qa } from "./utils-CCcr3AZm.js";
17
- import { e as Qa, f as Va, R as Ga, N as Ze, L as At, g as Wa, O as In, u as Ya, b as kt } from "./index-SrtqdZ3j.js";
18
- import { E as An, S as xe, a as Xa, R as Ja } from "./SlotletProvider-BGEs7yyu.js";
16
+ import { a as Te, H as ce, M as ht, A as ft, u as gt } from "./AnchorLink-BbB2q-jx.js";
17
+ import { e as mt, f as pt, R as vt, L as te, g as G, h as xt, O as _e, i as bt, b as yt, u as ue } from "./index-CRo94sKK.js";
18
+ import { u as jt } from "./state-CsuHT8ZO.js";
19
+ import { E as Fe, S as k, a as wt, R as Nt } from "./SlotletProvider-Da7eFgd2.js";
19
20
  import { j as a } from "./jsx-runtime-B6kdoens.js";
20
- import { M as Za, f as eo, c as kn, p as $n, A as to, d as rt, j as no, b as A, k as ro, F as ao, D as oo, C as so, P as Ke, i as $t, q as io, s as Fn, R as lo, S as co, t as uo, h as fo, r as Ln, m as ho, a as gt, u as Bn, V as Hn, n as pn, B as Pt } from "./index-SyxHzsgJ.js";
21
- import { a as O, c as Un, b as po, T as mo, d as go, V as vo, u as Ft, e as wo, C as xo } from "./Markdown-C-0TaxoY.js";
22
- import * as h from "react";
23
- import p, { StrictMode as zn, createContext as Kn, Component as yo, createElement as mn, isValidElement as bo, useState as Ie, useMemo as mt, useLayoutEffect as So, useEffect as Ce, useCallback as qn, Suspense as Qn, memo as Vn, useContext as Co, Fragment as Mo, useRef as Lt, forwardRef as Ro } from "react";
24
- import { a as Bt } from "./index-DJqnphbT.js";
25
- import { B as Eo } from "./router-Oe6YmY6B.js";
26
- import { a as jt, R as Do, T as Po, C as jo } from "./index-LstIRx3V.js";
27
- import { S as Gn, f as Wn, Q as No, n as se, m as gn, g as vn, i as be, j as To, k as _o, l as Oo, o as Io, p as wn, r as xn, q as Ao, h as yn, t as bn, v as ko, u as qe, b as $o, Z as Fo, w as Lo, c as Yn, x as Bo } from "./ZudokuContext-uV_XfHPK.js";
28
- import { j as Ht } from "./joinPath-B7kNnUX4.js";
29
- import { ChevronRightIcon as Xn, CheckIcon as Ho, DotIcon as Uo, CircleXIcon as zo, SearchIcon as Ko, MenuIcon as qo, MoonStarIcon as Qo, SunIcon as Vo, ExternalLinkIcon as Go, PanelLeftIcon as Wo } from "lucide-react";
30
- import { c as Jn, P as xt, R as Yo, I as Xo, O as Jo, C as Zo, T as es, a as ts, b as ns, D as rs, d as as, e as os, S as St } from "./SidebarBadge-BWvFQTc1.js";
31
- import { S as ss } from "./Spinner-3cQDBVGr.js";
32
- function is({ error: e }) {
33
- return /* @__PURE__ */ a.jsx(An, { error: e });
34
- }
35
- var at = {};
36
- const ls = /* @__PURE__ */ Bt(Eo), cs = /* @__PURE__ */ Bt(Qa), us = /* @__PURE__ */ Bt(Va);
37
- Object.defineProperty(at, "__esModule", { value: !0 });
38
- var ds = p, we = ls, Ut = cs, Se = us;
39
- function fs(e) {
40
- if (e && e.__esModule) return e;
41
- var t = /* @__PURE__ */ Object.create(null);
42
- return e && Object.keys(e).forEach(function(n) {
43
- if (n !== "default") {
44
- var r = Object.getOwnPropertyDescriptor(e, n);
45
- Object.defineProperty(t, n, r.get ? r : {
21
+ import { Button as ie } from "./ui/Button.js";
22
+ import { Callout as Pt } from "./ui/Callout.js";
23
+ import St, { StrictMode as Qe, createContext as Le, Component as Ct, createElement as we, useState as Q, useCallback as Be, useEffect as _, Suspense as de, memo as He, useMemo as re, useContext as Et, Fragment as kt, useRef as he, forwardRef as At } from "react";
24
+ import { a as fe } from "./_commonjsHelpers-BkfeUUK-.js";
25
+ import { B as Mt } from "./router-BsfSoK2j.js";
26
+ import { a as oe } from "./StaggeredRender-DDHSzQKE.js";
27
+ import { C as Dt } from "./ClientOnly-CVN6leDu.js";
28
+ import { S as ze, i as qe, Q as Ot, n as b, m as Ne, j as Pe, k as M, l as Rt, o as It, p as Tt, q as _t, r as Se, t as Ce, v as Ft, h as Ee, w as ke, x as Qt, y as L, u as F, z as Ke, A as Lt, g as Bt, Z as Ht, B as zt, C as qt } from "./ZudokuContext-BKXGJTmu.js";
29
+ import { M as Kt, u as ee } from "./hook-sn0zMTkE.js";
30
+ import { a as $t, T as Ut, b as Vt, V as Wt, u as ge } from "./Markdown-BDcCAWwm.js";
31
+ import { CircleXIcon as Yt, SearchIcon as Xt, MenuIcon as Zt, MoonStarIcon as Jt, SunIcon as Gt, ChevronRightIcon as er, ExternalLinkIcon as tr, PanelLeftIcon as rr } from "lucide-react";
32
+ import { DropdownMenu as ar, DropdownMenuTrigger as sr, DropdownMenuContent as nr, DropdownMenuLabel as ir, DropdownMenuSeparator as or, DropdownMenuSub as lr, DropdownMenuSubTrigger as cr, DropdownMenuPortal as ur, DropdownMenuSubContent as dr, DropdownMenuItem as hr } from "./ui/DropdownMenu.js";
33
+ import { c as A } from "./cn-BmFQLtkS.js";
34
+ import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
35
+ import { a as Ue, c as fr } from "./index-BuAyrJe3.js";
36
+ import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as gr } from "./ui/Drawer.js";
37
+ import { S as ae, a as mr } from "./Spinner-C6zroowC.js";
38
+ import * as se from "@radix-ui/react-collapsible";
39
+ function pr({ error: t }) {
40
+ return /* @__PURE__ */ a.jsx(Fe, { error: t });
41
+ }
42
+ var W = {};
43
+ const vr = /* @__PURE__ */ fe(Mt), xr = /* @__PURE__ */ fe(mt), br = /* @__PURE__ */ fe(pt);
44
+ Object.defineProperty(W, "__esModule", { value: !0 });
45
+ var yr = St, E = vr, me = xr, D = br;
46
+ function jr(t) {
47
+ if (t && t.__esModule) return t;
48
+ var e = /* @__PURE__ */ Object.create(null);
49
+ return t && Object.keys(t).forEach(function(r) {
50
+ if (r !== "default") {
51
+ var s = Object.getOwnPropertyDescriptor(t, r);
52
+ Object.defineProperty(e, r, s.get ? s : {
46
53
  enumerable: !0,
47
54
  get: function() {
48
- return e[n];
55
+ return t[r];
49
56
  }
50
57
  });
51
58
  }
52
- }), t.default = e, Object.freeze(t);
59
+ }), e.default = t, Object.freeze(e);
53
60
  }
54
- var ge = /* @__PURE__ */ fs(ds);
55
- function hs({
56
- basename: e,
57
- children: t,
58
- location: n = "/",
59
- future: r
61
+ var S = /* @__PURE__ */ jr(yr);
62
+ function wr({
63
+ basename: t,
64
+ children: e,
65
+ location: r = "/",
66
+ future: s
60
67
  }) {
61
- typeof n == "string" && (n = Se.parsePath(n));
62
- let o = we.Action.Pop, s = {
63
- pathname: n.pathname || "/",
64
- search: n.search || "",
65
- hash: n.hash || "",
66
- state: n.state != null ? n.state : null,
67
- key: n.key || "default"
68
- }, i = Zn();
69
- return /* @__PURE__ */ ge.createElement(Se.Router, {
70
- basename: e,
71
- children: t,
72
- location: s,
73
- navigationType: o,
74
- navigator: i,
75
- future: r,
68
+ typeof r == "string" && (r = D.parsePath(r));
69
+ let n = E.Action.Pop, i = {
70
+ pathname: r.pathname || "/",
71
+ search: r.search || "",
72
+ hash: r.hash || "",
73
+ state: r.state != null ? r.state : null,
74
+ key: r.key || "default"
75
+ }, o = Ze();
76
+ return /* @__PURE__ */ S.createElement(D.Router, {
77
+ basename: t,
78
+ children: e,
79
+ location: i,
80
+ navigationType: n,
81
+ navigator: o,
82
+ future: s,
76
83
  static: !0
77
84
  });
78
85
  }
79
- function ps({
80
- context: e,
81
- router: t,
82
- hydrate: n = !0,
83
- nonce: r
86
+ function Nr({
87
+ context: t,
88
+ router: e,
89
+ hydrate: r = !0,
90
+ nonce: s
84
91
  }) {
85
- t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
86
- let o = {
87
- router: t,
88
- navigator: Zn(),
92
+ e && t || (process.env.NODE_ENV !== "production" ? E.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : E.UNSAFE_invariant(!1));
93
+ let n = {
94
+ router: e,
95
+ navigator: Ze(),
89
96
  static: !0,
90
- staticContext: e,
91
- basename: e.basename || "/"
92
- }, s = /* @__PURE__ */ new Map(), i = "";
93
- if (n !== !1) {
94
- let u = {
95
- loaderData: e.loaderData,
96
- actionData: e.actionData,
97
- errors: gs(e.errors)
97
+ staticContext: t,
98
+ basename: t.basename || "/"
99
+ }, i = /* @__PURE__ */ new Map(), o = "";
100
+ if (r !== !1) {
101
+ let c = {
102
+ loaderData: t.loaderData,
103
+ actionData: t.actionData,
104
+ errors: Sr(t.errors)
98
105
  };
99
- i = `window.__staticRouterHydrationData = JSON.parse(${Ss(JSON.stringify(JSON.stringify(u)))});`;
106
+ o = `window.__staticRouterHydrationData = JSON.parse(${Dr(JSON.stringify(JSON.stringify(c)))});`;
100
107
  }
101
108
  let {
102
- state: l
103
- } = o.router;
104
- return /* @__PURE__ */ ge.createElement(ge.Fragment, null, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterContext.Provider, {
105
- value: o
106
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterStateContext.Provider, {
107
- value: l
108
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_FetchersContext.Provider, {
109
- value: s
110
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_ViewTransitionContext.Provider, {
109
+ state: u
110
+ } = n.router;
111
+ return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterContext.Provider, {
112
+ value: n
113
+ }, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
114
+ value: u
115
+ }, /* @__PURE__ */ S.createElement(D.UNSAFE_FetchersContext.Provider, {
116
+ value: i
117
+ }, /* @__PURE__ */ S.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
111
118
  value: {
112
119
  isTransitioning: !1
113
120
  }
114
- }, /* @__PURE__ */ ge.createElement(Se.Router, {
115
- basename: o.basename,
116
- location: l.location,
117
- navigationType: l.historyAction,
118
- navigator: o.navigator,
119
- static: o.static,
121
+ }, /* @__PURE__ */ S.createElement(D.Router, {
122
+ basename: n.basename,
123
+ location: u.location,
124
+ navigationType: u.historyAction,
125
+ navigator: n.navigator,
126
+ static: n.static,
120
127
  future: {
121
- v7_relativeSplatPath: t.future.v7_relativeSplatPath
128
+ v7_relativeSplatPath: e.future.v7_relativeSplatPath
122
129
  }
123
- }, /* @__PURE__ */ ge.createElement(ms, {
124
- routes: t.routes,
125
- future: t.future,
126
- state: l
127
- })))))), i ? /* @__PURE__ */ ge.createElement("script", {
130
+ }, /* @__PURE__ */ S.createElement(Pr, {
131
+ routes: e.routes,
132
+ future: e.future,
133
+ state: u
134
+ })))))), o ? /* @__PURE__ */ S.createElement("script", {
128
135
  suppressHydrationWarning: !0,
129
- nonce: r,
136
+ nonce: s,
130
137
  dangerouslySetInnerHTML: {
131
- __html: i
138
+ __html: o
132
139
  }
133
140
  }) : null);
134
141
  }
135
- function ms({
136
- routes: e,
137
- future: t,
138
- state: n
142
+ function Pr({
143
+ routes: t,
144
+ future: e,
145
+ state: r
139
146
  }) {
140
- return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
141
- }
142
- function gs(e) {
143
- if (!e) return null;
144
- let t = Object.entries(e), n = {};
145
- for (let [r, o] of t)
146
- we.isRouteErrorResponse(o) ? n[r] = {
147
- ...o,
147
+ return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
148
+ }
149
+ function Sr(t) {
150
+ if (!t) return null;
151
+ let e = Object.entries(t), r = {};
152
+ for (let [s, n] of e)
153
+ E.isRouteErrorResponse(n) ? r[s] = {
154
+ ...n,
148
155
  __type: "RouteErrorResponse"
149
- } : o instanceof Error ? n[r] = {
150
- message: o.message,
156
+ } : n instanceof Error ? r[s] = {
157
+ message: n.message,
151
158
  __type: "Error",
152
159
  // If this is a subclass (i.e., ReferenceError), send up the type so we
153
160
  // can re-create the same type during hydration.
154
- ...o.name !== "Error" ? {
155
- __subType: o.name
161
+ ...n.name !== "Error" ? {
162
+ __subType: n.name
156
163
  } : {}
157
- } : n[r] = o;
158
- return n;
164
+ } : r[s] = n;
165
+ return r;
159
166
  }
160
- function Zn() {
167
+ function Ze() {
161
168
  return {
162
- createHref: er,
163
- encodeLocation: tr,
164
- push(e) {
165
- throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
169
+ createHref: Je,
170
+ encodeLocation: Ge,
171
+ push(t) {
172
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
166
173
  },
167
- replace(e) {
168
- throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
174
+ replace(t) {
175
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`);
169
176
  },
170
- go(e) {
171
- throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
177
+ go(t) {
178
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`);
172
179
  },
173
180
  back() {
174
181
  throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
@@ -178,45 +185,45 @@ function Zn() {
178
185
  }
179
186
  };
180
187
  }
181
- function vs(e, t) {
182
- return we.createStaticHandler(e, {
183
- ...t,
184
- mapRouteProperties: Ut.UNSAFE_mapRouteProperties
188
+ function Cr(t, e) {
189
+ return E.createStaticHandler(t, {
190
+ ...e,
191
+ mapRouteProperties: me.UNSAFE_mapRouteProperties
185
192
  });
186
193
  }
187
- function ws(e, t, n = {}) {
188
- let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
189
- let u = r[l.route.id] || l.route;
194
+ function Er(t, e, r = {}) {
195
+ let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), i = e.matches.map((u) => {
196
+ let c = s[u.route.id] || u.route;
190
197
  return {
191
- ...l,
192
- route: u
198
+ ...u,
199
+ route: c
193
200
  };
194
- }), i = (l) => `You cannot use router.${l}() on the server because it is a stateless environment`;
201
+ }), o = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
195
202
  return {
196
203
  get basename() {
197
- return t.basename;
204
+ return e.basename;
198
205
  },
199
206
  get future() {
200
- var l, u;
207
+ var u, c;
201
208
  return {
202
209
  v7_fetcherPersist: !1,
203
210
  v7_normalizeFormMethod: !1,
204
- v7_partialHydration: ((l = n.future) == null ? void 0 : l.v7_partialHydration) === !0,
211
+ v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
205
212
  v7_prependBasename: !1,
206
- v7_relativeSplatPath: ((u = n.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
213
+ v7_relativeSplatPath: ((c = r.future) == null ? void 0 : c.v7_relativeSplatPath) === !0,
207
214
  v7_skipActionErrorRevalidation: !1
208
215
  };
209
216
  },
210
217
  get state() {
211
218
  return {
212
- historyAction: we.Action.Pop,
213
- location: t.location,
214
- matches: s,
215
- loaderData: t.loaderData,
216
- actionData: t.actionData,
217
- errors: t.errors,
219
+ historyAction: E.Action.Pop,
220
+ location: e.location,
221
+ matches: i,
222
+ loaderData: e.loaderData,
223
+ actionData: e.actionData,
224
+ errors: e.errors,
218
225
  initialized: !0,
219
- navigation: we.IDLE_NAVIGATION,
226
+ navigation: E.IDLE_NAVIGATION,
220
227
  restoreScrollPosition: null,
221
228
  preventScrollReset: !1,
222
229
  revalidation: "idle",
@@ -225,2910 +232,923 @@ function ws(e, t, n = {}) {
225
232
  };
226
233
  },
227
234
  get routes() {
228
- return o;
235
+ return n;
229
236
  },
230
237
  get window() {
231
238
  },
232
239
  initialize() {
233
- throw i("initialize");
240
+ throw o("initialize");
234
241
  },
235
242
  subscribe() {
236
- throw i("subscribe");
243
+ throw o("subscribe");
237
244
  },
238
245
  enableScrollRestoration() {
239
- throw i("enableScrollRestoration");
246
+ throw o("enableScrollRestoration");
240
247
  },
241
248
  navigate() {
242
- throw i("navigate");
249
+ throw o("navigate");
243
250
  },
244
251
  fetch() {
245
- throw i("fetch");
252
+ throw o("fetch");
246
253
  },
247
254
  revalidate() {
248
- throw i("revalidate");
255
+ throw o("revalidate");
249
256
  },
250
- createHref: er,
251
- encodeLocation: tr,
257
+ createHref: Je,
258
+ encodeLocation: Ge,
252
259
  getFetcher() {
253
- return we.IDLE_FETCHER;
260
+ return E.IDLE_FETCHER;
254
261
  },
255
262
  deleteFetcher() {
256
- throw i("deleteFetcher");
263
+ throw o("deleteFetcher");
257
264
  },
258
265
  dispose() {
259
- throw i("dispose");
266
+ throw o("dispose");
260
267
  },
261
268
  getBlocker() {
262
- return we.IDLE_BLOCKER;
269
+ return E.IDLE_BLOCKER;
263
270
  },
264
271
  deleteBlocker() {
265
- throw i("deleteBlocker");
272
+ throw o("deleteBlocker");
266
273
  },
267
274
  patchRoutes() {
268
- throw i("patchRoutes");
275
+ throw o("patchRoutes");
269
276
  },
270
277
  _internalFetchControllers: /* @__PURE__ */ new Map(),
271
278
  _internalActiveDeferreds: /* @__PURE__ */ new Map(),
272
279
  _internalSetRoutes() {
273
- throw i("_internalSetRoutes");
280
+ throw o("_internalSetRoutes");
274
281
  }
275
282
  };
276
283
  }
277
- function er(e) {
278
- return typeof e == "string" ? e : Se.createPath(e);
284
+ function Je(t) {
285
+ return typeof t == "string" ? t : D.createPath(t);
279
286
  }
280
- function tr(e) {
281
- let t = typeof e == "string" ? e : Se.createPath(e);
282
- t = t.replace(/ $/, "%20");
283
- let n = xs.test(t) ? new URL(t) : new URL(t, "http://localhost");
287
+ function Ge(t) {
288
+ let e = typeof t == "string" ? t : D.createPath(t);
289
+ e = e.replace(/ $/, "%20");
290
+ let r = kr.test(e) ? new URL(e) : new URL(e, "http://localhost");
284
291
  return {
285
- pathname: n.pathname,
286
- search: n.search,
287
- hash: n.hash
292
+ pathname: r.pathname,
293
+ search: r.search,
294
+ hash: r.hash
288
295
  };
289
296
  }
290
- const xs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ys = {
297
+ const kr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ar = {
291
298
  "&": "\\u0026",
292
299
  ">": "\\u003e",
293
300
  "<": "\\u003c",
294
301
  "\u2028": "\\u2028",
295
302
  "\u2029": "\\u2029"
296
- }, bs = /[&><\u2028\u2029]/g;
297
- function Ss(e) {
298
- return e.replace(bs, (t) => ys[t]);
299
- }
300
- at.StaticRouter = hs;
301
- var Cs = at.StaticRouterProvider = ps;
302
- at.createStaticHandler = vs;
303
- at.createStaticRouter = ws;
304
- const Ms = ({
305
- router: e,
306
- hydrate: t = !1
307
- }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(jt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Ga, { router: e }) }) }) }), Rs = ({
308
- router: e,
309
- context: t,
310
- helmetContext: n
311
- }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(Cs, { router: e, context: t }) }) });
312
- var ve, Nn, Es = (Nn = class extends Gn {
313
- constructor(t = {}) {
303
+ }, Mr = /[&><\u2028\u2029]/g;
304
+ function Dr(t) {
305
+ return t.replace(Mr, (e) => Ar[e]);
306
+ }
307
+ W.StaticRouter = wr;
308
+ var Or = W.StaticRouterProvider = Nr;
309
+ W.createStaticHandler = Cr;
310
+ W.createStaticRouter = Er;
311
+ const Rr = ({
312
+ router: t,
313
+ hydrate: e = !1
314
+ }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(vt, { router: t }) }) }) }), Ir = ({
315
+ router: t,
316
+ context: e,
317
+ helmetContext: r
318
+ }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Or, { router: t, context: e }) }) });
319
+ var C, Oe, Tr = (Oe = class extends ze {
320
+ constructor(e = {}) {
314
321
  super();
315
- ce(this, ve);
316
- this.config = t, X(this, ve, /* @__PURE__ */ new Map());
322
+ y(this, C);
323
+ this.config = e, g(this, C, /* @__PURE__ */ new Map());
317
324
  }
318
- build(t, n, r) {
319
- const o = n.queryKey, s = n.queryHash ?? Wn(o, n);
320
- let i = this.get(s);
321
- return i || (i = new No({
325
+ build(e, r, s) {
326
+ const n = r.queryKey, i = r.queryHash ?? qe(n, r);
327
+ let o = this.get(i);
328
+ return o || (o = new Ot({
322
329
  cache: this,
323
- queryKey: o,
324
- queryHash: s,
325
- options: t.defaultQueryOptions(n),
326
- state: r,
327
- defaultOptions: t.getQueryDefaults(o)
328
- }), this.add(i)), i;
329
- }
330
- add(t) {
331
- w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
330
+ queryKey: n,
331
+ queryHash: i,
332
+ options: e.defaultQueryOptions(r),
333
+ state: s,
334
+ defaultOptions: e.getQueryDefaults(n)
335
+ }), this.add(o)), o;
336
+ }
337
+ add(e) {
338
+ l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
332
339
  type: "added",
333
- query: t
340
+ query: e
334
341
  }));
335
342
  }
336
- remove(t) {
337
- const n = w(this, ve).get(t.queryHash);
338
- n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
343
+ remove(e) {
344
+ const r = l(this, C).get(e.queryHash);
345
+ r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
339
346
  }
340
347
  clear() {
341
- se.batch(() => {
342
- this.getAll().forEach((t) => {
343
- this.remove(t);
348
+ b.batch(() => {
349
+ this.getAll().forEach((e) => {
350
+ this.remove(e);
344
351
  });
345
352
  });
346
353
  }
347
- get(t) {
348
- return w(this, ve).get(t);
354
+ get(e) {
355
+ return l(this, C).get(e);
349
356
  }
350
357
  getAll() {
351
- return [...w(this, ve).values()];
358
+ return [...l(this, C).values()];
352
359
  }
353
- find(t) {
354
- const n = { exact: !0, ...t };
360
+ find(e) {
361
+ const r = { exact: !0, ...e };
355
362
  return this.getAll().find(
356
- (r) => gn(n, r)
363
+ (s) => Ne(r, s)
357
364
  );
358
365
  }
359
- findAll(t = {}) {
360
- const n = this.getAll();
361
- return Object.keys(t).length > 0 ? n.filter((r) => gn(t, r)) : n;
366
+ findAll(e = {}) {
367
+ const r = this.getAll();
368
+ return Object.keys(e).length > 0 ? r.filter((s) => Ne(e, s)) : r;
362
369
  }
363
- notify(t) {
364
- se.batch(() => {
365
- this.listeners.forEach((n) => {
366
- n(t);
370
+ notify(e) {
371
+ b.batch(() => {
372
+ this.listeners.forEach((r) => {
373
+ r(e);
367
374
  });
368
375
  });
369
376
  }
370
377
  onFocus() {
371
- se.batch(() => {
372
- this.getAll().forEach((t) => {
373
- t.onFocus();
378
+ b.batch(() => {
379
+ this.getAll().forEach((e) => {
380
+ e.onFocus();
374
381
  });
375
382
  });
376
383
  }
377
384
  onOnline() {
378
- se.batch(() => {
379
- this.getAll().forEach((t) => {
380
- t.onOnline();
385
+ b.batch(() => {
386
+ this.getAll().forEach((e) => {
387
+ e.onOnline();
381
388
  });
382
389
  });
383
390
  }
384
- }, ve = new WeakMap(), Nn), oe, nt, Tn, Ds = (Tn = class extends Gn {
385
- constructor(t = {}) {
391
+ }, C = new WeakMap(), Oe), x, V, Re, _r = (Re = class extends ze {
392
+ constructor(e = {}) {
386
393
  super();
387
- ce(this, oe);
388
- ce(this, nt);
389
- this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
394
+ y(this, x);
395
+ y(this, V);
396
+ this.config = e, g(this, x, /* @__PURE__ */ new Map()), g(this, V, Date.now());
390
397
  }
391
- build(t, n, r) {
392
- const o = new Za({
398
+ build(e, r, s) {
399
+ const n = new Kt({
393
400
  mutationCache: this,
394
- mutationId: ++ut(this, nt)._,
395
- options: t.defaultMutationOptions(n),
396
- state: r
401
+ mutationId: ++X(this, V)._,
402
+ options: e.defaultMutationOptions(r),
403
+ state: s
397
404
  });
398
- return this.add(o), o;
399
- }
400
- add(t) {
401
- const n = dt(t), r = w(this, oe).get(n) ?? [];
402
- r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
403
- }
404
- remove(t) {
405
- var r;
406
- const n = dt(t);
407
- if (w(this, oe).has(n)) {
408
- const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
409
- o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
405
+ return this.add(n), n;
406
+ }
407
+ add(e) {
408
+ const r = Z(e), s = l(this, x).get(r) ?? [];
409
+ s.push(e), l(this, x).set(r, s), this.notify({ type: "added", mutation: e });
410
+ }
411
+ remove(e) {
412
+ var s;
413
+ const r = Z(e);
414
+ if (l(this, x).has(r)) {
415
+ const n = (s = l(this, x).get(r)) == null ? void 0 : s.filter((i) => i !== e);
416
+ n && (n.length === 0 ? l(this, x).delete(r) : l(this, x).set(r, n));
410
417
  }
411
- this.notify({ type: "removed", mutation: t });
418
+ this.notify({ type: "removed", mutation: e });
412
419
  }
413
- canRun(t) {
414
- var r;
415
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
416
- return !n || n === t;
420
+ canRun(e) {
421
+ var s;
422
+ const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
423
+ return !r || r === e;
417
424
  }
418
- runNext(t) {
419
- var r;
420
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
421
- return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
425
+ runNext(e) {
426
+ var s;
427
+ const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
428
+ return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
422
429
  }
423
430
  clear() {
424
- se.batch(() => {
425
- this.getAll().forEach((t) => {
426
- this.remove(t);
431
+ b.batch(() => {
432
+ this.getAll().forEach((e) => {
433
+ this.remove(e);
427
434
  });
428
435
  });
429
436
  }
430
437
  getAll() {
431
- return [...w(this, oe).values()].flat();
438
+ return [...l(this, x).values()].flat();
432
439
  }
433
- find(t) {
434
- const n = { exact: !0, ...t };
440
+ find(e) {
441
+ const r = { exact: !0, ...e };
435
442
  return this.getAll().find(
436
- (r) => vn(n, r)
443
+ (s) => Pe(r, s)
437
444
  );
438
445
  }
439
- findAll(t = {}) {
440
- return this.getAll().filter((n) => vn(t, n));
446
+ findAll(e = {}) {
447
+ return this.getAll().filter((r) => Pe(e, r));
441
448
  }
442
- notify(t) {
443
- se.batch(() => {
444
- this.listeners.forEach((n) => {
445
- n(t);
449
+ notify(e) {
450
+ b.batch(() => {
451
+ this.listeners.forEach((r) => {
452
+ r(e);
446
453
  });
447
454
  });
448
455
  }
449
456
  resumePausedMutations() {
450
- const t = this.getAll().filter((n) => n.state.isPaused);
451
- return se.batch(
457
+ const e = this.getAll().filter((r) => r.state.isPaused);
458
+ return b.batch(
452
459
  () => Promise.all(
453
- t.map((n) => n.continue().catch(be))
460
+ e.map((r) => r.continue().catch(M))
454
461
  )
455
462
  );
456
463
  }
457
- }, oe = new WeakMap(), nt = new WeakMap(), Tn);
458
- function dt(e) {
459
- var t;
460
- return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
464
+ }, x = new WeakMap(), V = new WeakMap(), Re);
465
+ function Z(t) {
466
+ var e;
467
+ return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
461
468
  }
462
- function Sn(e) {
469
+ function Ae(t) {
463
470
  return {
464
- onFetch: (t, n) => {
465
- var f, c, d, v, M;
466
- const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((v = t.state.data) == null ? void 0 : v.pages) || [], i = ((M = t.state.data) == null ? void 0 : M.pageParams) || [];
467
- let l = { pages: [], pageParams: [] }, u = 0;
471
+ onFetch: (e, r) => {
472
+ var j, N, p, P, h;
473
+ const s = e.options, n = (p = (N = (j = e.fetchOptions) == null ? void 0 : j.meta) == null ? void 0 : N.fetchMore) == null ? void 0 : p.direction, i = ((P = e.state.data) == null ? void 0 : P.pages) || [], o = ((h = e.state.data) == null ? void 0 : h.pageParams) || [];
474
+ let u = { pages: [], pageParams: [] }, c = 0;
468
475
  const m = async () => {
469
- let C = !1;
470
- const _ = (P) => {
471
- Object.defineProperty(P, "signal", {
476
+ let f = !1;
477
+ const B = (w) => {
478
+ Object.defineProperty(w, "signal", {
472
479
  enumerable: !0,
473
- get: () => (t.signal.aborted ? C = !0 : t.signal.addEventListener("abort", () => {
474
- C = !0;
475
- }), t.signal)
480
+ get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
481
+ f = !0;
482
+ }), e.signal)
476
483
  });
477
- }, R = To(t.options, t.fetchOptions), k = async (P, g, z) => {
478
- if (C)
484
+ }, lt = Rt(e.options, e.fetchOptions), ve = async (w, O, $) => {
485
+ if (f)
479
486
  return Promise.reject();
480
- if (g == null && P.pages.length)
481
- return Promise.resolve(P);
482
- const Z = {
483
- queryKey: t.queryKey,
484
- pageParam: g,
485
- direction: z ? "backward" : "forward",
486
- meta: t.options.meta
487
+ if (O == null && w.pages.length)
488
+ return Promise.resolve(w);
489
+ const Y = {
490
+ queryKey: e.queryKey,
491
+ pageParam: O,
492
+ direction: $ ? "backward" : "forward",
493
+ meta: e.options.meta
487
494
  };
488
- _(Z);
489
- const b = await R(
490
- Z
491
- ), { maxPages: j } = t.options, D = z ? _o : Oo;
495
+ B(Y);
496
+ const ct = await lt(
497
+ Y
498
+ ), { maxPages: xe } = e.options, be = $ ? It : Tt;
492
499
  return {
493
- pages: D(P.pages, b, j),
494
- pageParams: D(P.pageParams, g, j)
500
+ pages: be(w.pages, ct, xe),
501
+ pageParams: be(w.pageParams, O, xe)
495
502
  };
496
503
  };
497
- if (o && s.length) {
498
- const P = o === "backward", g = P ? Ps : Cn, z = {
499
- pages: s,
500
- pageParams: i
501
- }, Z = g(r, z);
502
- l = await k(z, Z, P);
504
+ if (n && i.length) {
505
+ const w = n === "backward", O = w ? Fr : Me, $ = {
506
+ pages: i,
507
+ pageParams: o
508
+ }, Y = O(s, $);
509
+ u = await ve($, Y, w);
503
510
  } else {
504
- const P = e ?? s.length;
511
+ const w = t ?? i.length;
505
512
  do {
506
- const g = u === 0 ? i[0] ?? r.initialPageParam : Cn(r, l);
507
- if (u > 0 && g == null)
513
+ const O = c === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
514
+ if (c > 0 && O == null)
508
515
  break;
509
- l = await k(l, g), u++;
510
- } while (u < P);
516
+ u = await ve(u, O), c++;
517
+ } while (c < w);
511
518
  }
512
- return l;
519
+ return u;
513
520
  };
514
- t.options.persister ? t.fetchFn = () => {
515
- var C, _;
516
- return (_ = (C = t.options).persister) == null ? void 0 : _.call(
517
- C,
521
+ e.options.persister ? e.fetchFn = () => {
522
+ var f, B;
523
+ return (B = (f = e.options).persister) == null ? void 0 : B.call(
524
+ f,
518
525
  m,
519
526
  {
520
- queryKey: t.queryKey,
521
- meta: t.options.meta,
522
- signal: t.signal
527
+ queryKey: e.queryKey,
528
+ meta: e.options.meta,
529
+ signal: e.signal
523
530
  },
524
- n
531
+ r
525
532
  );
526
- } : t.fetchFn = m;
533
+ } : e.fetchFn = m;
527
534
  }
528
535
  };
529
536
  }
530
- function Cn(e, { pages: t, pageParams: n }) {
531
- const r = t.length - 1;
532
- return t.length > 0 ? e.getNextPageParam(
533
- t[r],
534
- t,
535
- n[r],
536
- n
537
+ function Me(t, { pages: e, pageParams: r }) {
538
+ const s = e.length - 1;
539
+ return e.length > 0 ? t.getNextPageParam(
540
+ e[s],
541
+ e,
542
+ r[s],
543
+ r
537
544
  ) : void 0;
538
545
  }
539
- function Ps(e, { pages: t, pageParams: n }) {
540
- var r;
541
- return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
546
+ function Fr(t, { pages: e, pageParams: r }) {
547
+ var s;
548
+ return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
542
549
  }
543
- var F, Pe, je, Be, He, Ne, Ue, ze, _n, js = (_n = class {
544
- constructor(e = {}) {
545
- ce(this, F);
546
- ce(this, Pe);
547
- ce(this, je);
548
- ce(this, Be);
549
- ce(this, He);
550
- ce(this, Ne);
551
- ce(this, Ue);
552
- ce(this, ze);
553
- X(this, F, e.queryCache || new Es()), X(this, Pe, e.mutationCache || new Ds()), X(this, je, e.defaultOptions || {}), X(this, Be, /* @__PURE__ */ new Map()), X(this, He, /* @__PURE__ */ new Map()), X(this, Ne, 0);
550
+ var d, R, I, H, z, T, q, K, Ie, Qr = (Ie = class {
551
+ constructor(t = {}) {
552
+ y(this, d);
553
+ y(this, R);
554
+ y(this, I);
555
+ y(this, H);
556
+ y(this, z);
557
+ y(this, T);
558
+ y(this, q);
559
+ y(this, K);
560
+ g(this, d, t.queryCache || new Tr()), g(this, R, t.mutationCache || new _r()), g(this, I, t.defaultOptions || {}), g(this, H, /* @__PURE__ */ new Map()), g(this, z, /* @__PURE__ */ new Map()), g(this, T, 0);
554
561
  }
555
562
  mount() {
556
- ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue, Io.subscribe(async (e) => {
557
- e && (await this.resumePausedMutations(), w(this, F).onFocus());
558
- })), X(this, ze, wn.subscribe(async (e) => {
559
- e && (await this.resumePausedMutations(), w(this, F).onOnline());
563
+ X(this, T)._++, l(this, T) === 1 && (g(this, q, _t.subscribe(async (t) => {
564
+ t && (await this.resumePausedMutations(), l(this, d).onFocus());
565
+ })), g(this, K, Se.subscribe(async (t) => {
566
+ t && (await this.resumePausedMutations(), l(this, d).onOnline());
560
567
  })));
561
568
  }
562
569
  unmount() {
563
- var e, t;
564
- ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, Ue)) == null || e.call(this), X(this, Ue, void 0), (t = w(this, ze)) == null || t.call(this), X(this, ze, void 0));
570
+ var t, e;
571
+ X(this, T)._--, l(this, T) === 0 && ((t = l(this, q)) == null || t.call(this), g(this, q, void 0), (e = l(this, K)) == null || e.call(this), g(this, K, void 0));
565
572
  }
566
- isFetching(e) {
567
- return w(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
573
+ isFetching(t) {
574
+ return l(this, d).findAll({ ...t, fetchStatus: "fetching" }).length;
568
575
  }
569
- isMutating(e) {
570
- return w(this, Pe).findAll({ ...e, status: "pending" }).length;
576
+ isMutating(t) {
577
+ return l(this, R).findAll({ ...t, status: "pending" }).length;
571
578
  }
572
- getQueryData(e) {
573
- var n;
574
- const t = this.defaultQueryOptions({ queryKey: e });
575
- return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state.data;
579
+ getQueryData(t) {
580
+ var r;
581
+ const e = this.defaultQueryOptions({ queryKey: t });
582
+ return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state.data;
576
583
  }
577
- ensureQueryData(e) {
578
- const t = this.getQueryData(e.queryKey);
579
- if (t === void 0)
580
- return this.fetchQuery(e);
584
+ ensureQueryData(t) {
585
+ const e = this.getQueryData(t.queryKey);
586
+ if (e === void 0)
587
+ return this.fetchQuery(t);
581
588
  {
582
- const n = this.defaultQueryOptions(e), r = w(this, F).build(this, n);
583
- return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
589
+ const r = this.defaultQueryOptions(t), s = l(this, d).build(this, r);
590
+ return t.revalidateIfStale && s.isStaleByTime(Ce(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
584
591
  }
585
592
  }
586
- getQueriesData(e) {
587
- return w(this, F).findAll(e).map(({ queryKey: t, state: n }) => {
588
- const r = n.data;
589
- return [t, r];
593
+ getQueriesData(t) {
594
+ return l(this, d).findAll(t).map(({ queryKey: e, state: r }) => {
595
+ const s = r.data;
596
+ return [e, s];
590
597
  });
591
598
  }
592
- setQueryData(e, t, n) {
593
- const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, F).get(
594
- r.queryHash
595
- ), s = o == null ? void 0 : o.state.data, i = Ao(t, s);
596
- if (i !== void 0)
597
- return w(this, F).build(this, r).setData(i, { ...n, manual: !0 });
598
- }
599
- setQueriesData(e, t, n) {
600
- return se.batch(
601
- () => w(this, F).findAll(e).map(({ queryKey: r }) => [
602
- r,
603
- this.setQueryData(r, t, n)
599
+ setQueryData(t, e, r) {
600
+ const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, d).get(
601
+ s.queryHash
602
+ ), i = n == null ? void 0 : n.state.data, o = Ft(e, i);
603
+ if (o !== void 0)
604
+ return l(this, d).build(this, s).setData(o, { ...r, manual: !0 });
605
+ }
606
+ setQueriesData(t, e, r) {
607
+ return b.batch(
608
+ () => l(this, d).findAll(t).map(({ queryKey: s }) => [
609
+ s,
610
+ this.setQueryData(s, e, r)
604
611
  ])
605
612
  );
606
613
  }
607
- getQueryState(e) {
608
- var n;
609
- const t = this.defaultQueryOptions({ queryKey: e });
610
- return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state;
611
- }
612
- removeQueries(e) {
613
- const t = w(this, F);
614
- se.batch(() => {
615
- t.findAll(e).forEach((n) => {
616
- t.remove(n);
614
+ getQueryState(t) {
615
+ var r;
616
+ const e = this.defaultQueryOptions({ queryKey: t });
617
+ return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state;
618
+ }
619
+ removeQueries(t) {
620
+ const e = l(this, d);
621
+ b.batch(() => {
622
+ e.findAll(t).forEach((r) => {
623
+ e.remove(r);
617
624
  });
618
625
  });
619
626
  }
620
- resetQueries(e, t) {
621
- const n = w(this, F), r = {
627
+ resetQueries(t, e) {
628
+ const r = l(this, d), s = {
622
629
  type: "active",
623
- ...e
630
+ ...t
624
631
  };
625
- return se.batch(() => (n.findAll(e).forEach((o) => {
626
- o.reset();
627
- }), this.refetchQueries(r, t)));
632
+ return b.batch(() => (r.findAll(t).forEach((n) => {
633
+ n.reset();
634
+ }), this.refetchQueries(s, e)));
628
635
  }
629
- cancelQueries(e = {}, t = {}) {
630
- const n = { revert: !0, ...t }, r = se.batch(
631
- () => w(this, F).findAll(e).map((o) => o.cancel(n))
636
+ cancelQueries(t = {}, e = {}) {
637
+ const r = { revert: !0, ...e }, s = b.batch(
638
+ () => l(this, d).findAll(t).map((n) => n.cancel(r))
632
639
  );
633
- return Promise.all(r).then(be).catch(be);
640
+ return Promise.all(s).then(M).catch(M);
634
641
  }
635
- invalidateQueries(e = {}, t = {}) {
636
- return se.batch(() => {
637
- if (w(this, F).findAll(e).forEach((r) => {
638
- r.invalidate();
639
- }), e.refetchType === "none")
642
+ invalidateQueries(t = {}, e = {}) {
643
+ return b.batch(() => {
644
+ if (l(this, d).findAll(t).forEach((s) => {
645
+ s.invalidate();
646
+ }), t.refetchType === "none")
640
647
  return Promise.resolve();
641
- const n = {
642
- ...e,
643
- type: e.refetchType ?? e.type ?? "active"
648
+ const r = {
649
+ ...t,
650
+ type: t.refetchType ?? t.type ?? "active"
644
651
  };
645
- return this.refetchQueries(n, t);
652
+ return this.refetchQueries(r, e);
646
653
  });
647
654
  }
648
- refetchQueries(e = {}, t) {
649
- const n = {
650
- ...t,
651
- cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
652
- }, r = se.batch(
653
- () => w(this, F).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
654
- let s = o.fetch(void 0, n);
655
- return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
655
+ refetchQueries(t = {}, e) {
656
+ const r = {
657
+ ...e,
658
+ cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
659
+ }, s = b.batch(
660
+ () => l(this, d).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
661
+ let i = n.fetch(void 0, r);
662
+ return r.throwOnError || (i = i.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
656
663
  })
657
664
  );
658
- return Promise.all(r).then(be);
665
+ return Promise.all(s).then(M);
659
666
  }
660
- fetchQuery(e) {
661
- const t = this.defaultQueryOptions(e);
662
- t.retry === void 0 && (t.retry = !1);
663
- const n = w(this, F).build(this, t);
664
- return n.isStaleByTime(
665
- xn(t.staleTime, n)
666
- ) ? n.fetch(t) : Promise.resolve(n.state.data);
667
+ fetchQuery(t) {
668
+ const e = this.defaultQueryOptions(t);
669
+ e.retry === void 0 && (e.retry = !1);
670
+ const r = l(this, d).build(this, e);
671
+ return r.isStaleByTime(
672
+ Ce(e.staleTime, r)
673
+ ) ? r.fetch(e) : Promise.resolve(r.state.data);
667
674
  }
668
- prefetchQuery(e) {
669
- return this.fetchQuery(e).then(be).catch(be);
675
+ prefetchQuery(t) {
676
+ return this.fetchQuery(t).then(M).catch(M);
670
677
  }
671
- fetchInfiniteQuery(e) {
672
- return e.behavior = Sn(e.pages), this.fetchQuery(e);
678
+ fetchInfiniteQuery(t) {
679
+ return t.behavior = Ae(t.pages), this.fetchQuery(t);
673
680
  }
674
- prefetchInfiniteQuery(e) {
675
- return this.fetchInfiniteQuery(e).then(be).catch(be);
681
+ prefetchInfiniteQuery(t) {
682
+ return this.fetchInfiniteQuery(t).then(M).catch(M);
676
683
  }
677
- ensureInfiniteQueryData(e) {
678
- return e.behavior = Sn(e.pages), this.ensureQueryData(e);
684
+ ensureInfiniteQueryData(t) {
685
+ return t.behavior = Ae(t.pages), this.ensureQueryData(t);
679
686
  }
680
687
  resumePausedMutations() {
681
- return wn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
688
+ return Se.isOnline() ? l(this, R).resumePausedMutations() : Promise.resolve();
682
689
  }
683
690
  getQueryCache() {
684
- return w(this, F);
691
+ return l(this, d);
685
692
  }
686
693
  getMutationCache() {
687
- return w(this, Pe);
694
+ return l(this, R);
688
695
  }
689
696
  getDefaultOptions() {
690
- return w(this, je);
697
+ return l(this, I);
691
698
  }
692
- setDefaultOptions(e) {
693
- X(this, je, e);
699
+ setDefaultOptions(t) {
700
+ g(this, I, t);
694
701
  }
695
- setQueryDefaults(e, t) {
696
- w(this, Be).set(yn(e), {
697
- queryKey: e,
698
- defaultOptions: t
702
+ setQueryDefaults(t, e) {
703
+ l(this, H).set(Ee(t), {
704
+ queryKey: t,
705
+ defaultOptions: e
699
706
  });
700
707
  }
701
- getQueryDefaults(e) {
702
- const t = [...w(this, Be).values()];
703
- let n = {};
704
- return t.forEach((r) => {
705
- bn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
706
- }), n;
707
- }
708
- setMutationDefaults(e, t) {
709
- w(this, He).set(yn(e), {
710
- mutationKey: e,
711
- defaultOptions: t
708
+ getQueryDefaults(t) {
709
+ const e = [...l(this, H).values()];
710
+ let r = {};
711
+ return e.forEach((s) => {
712
+ ke(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
713
+ }), r;
714
+ }
715
+ setMutationDefaults(t, e) {
716
+ l(this, z).set(Ee(t), {
717
+ mutationKey: t,
718
+ defaultOptions: e
712
719
  });
713
720
  }
714
- getMutationDefaults(e) {
715
- const t = [...w(this, He).values()];
716
- let n = {};
717
- return t.forEach((r) => {
718
- bn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
719
- }), n;
720
- }
721
- defaultQueryOptions(e) {
722
- if (e._defaulted)
723
- return e;
724
- const t = {
725
- ...w(this, je).queries,
726
- ...this.getQueryDefaults(e.queryKey),
727
- ...e,
721
+ getMutationDefaults(t) {
722
+ const e = [...l(this, z).values()];
723
+ let r = {};
724
+ return e.forEach((s) => {
725
+ ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
726
+ }), r;
727
+ }
728
+ defaultQueryOptions(t) {
729
+ if (t._defaulted)
730
+ return t;
731
+ const e = {
732
+ ...l(this, I).queries,
733
+ ...this.getQueryDefaults(t.queryKey),
734
+ ...t,
728
735
  _defaulted: !0
729
736
  };
730
- return t.queryHash || (t.queryHash = Wn(
731
- t.queryKey,
732
- t
733
- )), 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.enabled !== !0 && t.queryFn === ko && (t.enabled = !1), t;
734
- }
735
- defaultMutationOptions(e) {
736
- return e != null && e._defaulted ? e : {
737
- ...w(this, je).mutations,
738
- ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
739
- ...e,
737
+ return e.queryHash || (e.queryHash = qe(
738
+ e.queryKey,
739
+ e
740
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Qt && (e.enabled = !1), e;
741
+ }
742
+ defaultMutationOptions(t) {
743
+ return t != null && t._defaulted ? t : {
744
+ ...l(this, I).mutations,
745
+ ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
746
+ ...t,
740
747
  _defaulted: !0
741
748
  };
742
749
  }
743
750
  clear() {
744
- w(this, F).clear(), w(this, Pe).clear();
751
+ l(this, d).clear(), l(this, R).clear();
745
752
  }
746
- }, F = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), Be = new WeakMap(), He = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), ze = new WeakMap(), _n);
747
- const Ns = Kn(null), Ct = {
753
+ }, d = new WeakMap(), R = new WeakMap(), I = new WeakMap(), H = new WeakMap(), z = new WeakMap(), T = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Ie);
754
+ const Lr = Le(null), ne = {
748
755
  didCatch: !1,
749
756
  error: null
750
757
  };
751
- class Ts extends yo {
752
- constructor(t) {
753
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ct;
758
+ class Br extends Ct {
759
+ constructor(e) {
760
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
754
761
  }
755
- static getDerivedStateFromError(t) {
762
+ static getDerivedStateFromError(e) {
756
763
  return {
757
764
  didCatch: !0,
758
- error: t
765
+ error: e
759
766
  };
760
767
  }
761
768
  resetErrorBoundary() {
762
769
  const {
763
- error: t
770
+ error: e
764
771
  } = this.state;
765
- if (t !== null) {
766
- for (var n, r, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
767
- s[i] = arguments[i];
768
- (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
769
- args: s,
772
+ if (e !== null) {
773
+ for (var r, s, n = arguments.length, i = new Array(n), o = 0; o < n; o++)
774
+ i[o] = arguments[o];
775
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
776
+ args: i,
770
777
  reason: "imperative-api"
771
- }), this.setState(Ct);
778
+ }), this.setState(ne);
772
779
  }
773
780
  }
774
- componentDidCatch(t, n) {
775
- var r, o;
776
- (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
781
+ componentDidCatch(e, r) {
782
+ var s, n;
783
+ (s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, r);
777
784
  }
778
- componentDidUpdate(t, n) {
785
+ componentDidUpdate(e, r) {
779
786
  const {
780
- didCatch: r
787
+ didCatch: s
781
788
  } = this.state, {
782
- resetKeys: o
789
+ resetKeys: n
783
790
  } = this.props;
784
- if (r && n.error !== null && _s(t.resetKeys, o)) {
785
- var s, i;
786
- (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
787
- next: o,
788
- prev: t.resetKeys,
791
+ if (s && r.error !== null && Hr(e.resetKeys, n)) {
792
+ var i, o;
793
+ (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
794
+ next: n,
795
+ prev: e.resetKeys,
789
796
  reason: "keys"
790
- }), this.setState(Ct);
797
+ }), this.setState(ne);
791
798
  }
792
799
  }
793
800
  render() {
794
801
  const {
795
- children: t,
796
- fallbackRender: n,
797
- FallbackComponent: r,
798
- fallback: o
802
+ children: e,
803
+ fallbackRender: r,
804
+ FallbackComponent: s,
805
+ fallback: n
799
806
  } = this.props, {
800
- didCatch: s,
801
- error: i
807
+ didCatch: i,
808
+ error: o
802
809
  } = this.state;
803
- let l = t;
804
- if (s) {
805
- const u = {
806
- error: i,
810
+ let u = e;
811
+ if (i) {
812
+ const c = {
813
+ error: o,
807
814
  resetErrorBoundary: this.resetErrorBoundary
808
815
  };
809
- if (typeof n == "function")
810
- l = n(u);
811
- else if (r)
812
- l = mn(r, u);
813
- else if (o === null || bo(o))
814
- l = o;
816
+ if (typeof r == "function")
817
+ u = r(c);
818
+ else if (s)
819
+ u = we(s, c);
820
+ else if (n !== void 0)
821
+ u = n;
815
822
  else
816
- throw i;
823
+ throw o;
817
824
  }
818
- return mn(Ns.Provider, {
825
+ return we(Lr.Provider, {
819
826
  value: {
820
- didCatch: s,
821
- error: i,
827
+ didCatch: i,
828
+ error: o,
822
829
  resetErrorBoundary: this.resetErrorBoundary
823
830
  }
824
- }, l);
825
- }
826
- }
827
- function _s() {
828
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
829
- return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
830
- }
831
- const Os = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Is = (e) => "getRoutes" in e && typeof e.getRoutes == "function", As = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ks = (e) => "initialize" in e && typeof e.initialize == "function", $s = (e) => "getHead" in e && typeof e.getHead == "function", Fs = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Ls = (e) => "getIdentities" in e && typeof e.getIdentities == "function", nr = new js();
832
- class Bs {
833
- constructor(t) {
834
- ae(this, "plugins");
835
- ae(this, "sidebars");
836
- ae(this, "topNavigation");
837
- ae(this, "meta");
838
- ae(this, "page");
839
- ae(this, "authentication");
840
- ae(this, "navigationPlugins");
841
- ae(this, "initialize", async () => {
831
+ }, u);
832
+ }
833
+ }
834
+ function Hr() {
835
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
836
+ return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
837
+ }
838
+ const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", qr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Kr = (t) => "renderSearch" in t && typeof t.renderSearch == "function", $r = (t) => "initialize" in t && typeof t.initialize == "function", Ur = (t) => "getHead" in t && typeof t.getHead == "function", Vr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Wr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Qr();
839
+ class Yr {
840
+ constructor(e) {
841
+ v(this, "plugins");
842
+ v(this, "sidebars");
843
+ v(this, "topNavigation");
844
+ v(this, "meta");
845
+ v(this, "page");
846
+ v(this, "authentication");
847
+ v(this, "navigationPlugins");
848
+ v(this, "initialize", async () => {
842
849
  await Promise.all(
843
- this.plugins.filter(ks).map((t) => {
844
- var n;
845
- return (n = t.initialize) == null ? void 0 : n.call(t, this);
850
+ this.plugins.filter($r).map((e) => {
851
+ var r;
852
+ return (r = e.initialize) == null ? void 0 : r.call(e, this);
846
853
  })
847
854
  );
848
855
  });
849
- ae(this, "invalidateCache", async (t) => {
850
- await nr.invalidateQueries({ queryKey: t });
856
+ v(this, "invalidateCache", async (e) => {
857
+ await et.invalidateQueries({ queryKey: e });
851
858
  });
852
- ae(this, "getApiIdentities", async () => (await Promise.all(
853
- this.plugins.filter(Ls).map((n) => n.getIdentities(this))
859
+ v(this, "getApiIdentities", async () => (await Promise.all(
860
+ this.plugins.filter(Wr).map((r) => r.getIdentities(this))
854
861
  )).flat());
855
- ae(this, "getPluginSidebar", async (t) => (await Promise.all(
862
+ v(this, "getPluginSidebar", async (e) => (await Promise.all(
856
863
  this.navigationPlugins.map(
857
- (r) => {
858
- var o;
859
- return (o = r.getSidebar) == null ? void 0 : o.call(r, Ht(t));
864
+ (s) => {
865
+ var n;
866
+ return (n = s.getSidebar) == null ? void 0 : n.call(s, L(e));
860
867
  }
861
868
  )
862
- )).flatMap((r) => r ?? []));
863
- ae(this, "signRequest", async (t) => {
869
+ )).flatMap((s) => s ?? []));
870
+ v(this, "signRequest", async (e) => {
864
871
  if (!this.authentication)
865
872
  throw new Error("No authentication provider configured");
866
- const n = await this.authentication.getAccessToken();
867
- return t.headers.set("Authorization", `Bearer ${n}`), t;
873
+ const r = await this.authentication.getAccessToken();
874
+ return e.headers.set("Authorization", `Bearer ${r}`), e;
868
875
  });
869
- this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Is), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
870
- }
871
- }
872
- function Hs({ error: e, resetErrorBoundary: t }) {
873
- return /* @__PURE__ */ a.jsx(An, { error: e });
874
- }
875
- const ft = globalThis;
876
- (!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
877
- var Nt = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp", "PageDown", "End"], zs = [...Us, ...rr], Ks = {
878
- ltr: [...Nt, "ArrowRight"],
879
- rtl: [...Nt, "ArrowLeft"]
880
- }, qs = {
881
- ltr: ["ArrowLeft"],
882
- rtl: ["ArrowRight"]
883
- }, ot = "Menu", [et, Qs, Vs] = eo(ot), [Ae, ar] = kn(ot, [
884
- Vs,
885
- $n,
886
- Jn
887
- ]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [Gs, it] = Ae(ot), ir = (e) => {
888
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = $t(s), d = fo(o);
889
- return h.useEffect(() => {
890
- const v = () => {
891
- f.current = !0, document.addEventListener("pointerdown", M, { capture: !0, once: !0 }), document.addEventListener("pointermove", M, { capture: !0, once: !0 });
892
- }, M = () => f.current = !1;
893
- return document.addEventListener("keydown", v, { capture: !0 }), () => {
894
- document.removeEventListener("keydown", v, { capture: !0 }), document.removeEventListener("pointerdown", M, { capture: !0 }), document.removeEventListener("pointermove", M, { capture: !0 });
895
- };
896
- }, []), /* @__PURE__ */ a.jsx(Ln, { ...l, children: /* @__PURE__ */ a.jsx(
897
- sr,
898
- {
899
- scope: t,
900
- open: n,
901
- onOpenChange: c,
902
- content: u,
903
- onContentChange: m,
904
- children: /* @__PURE__ */ a.jsx(
905
- Gs,
906
- {
907
- scope: t,
908
- onClose: h.useCallback(() => c(!1), [c]),
909
- isUsingKeyboardRef: f,
910
- dir: d,
911
- modal: i,
912
- children: r
913
- }
914
- )
915
- }
916
- ) });
917
- };
918
- ir.displayName = ot;
919
- var Ws = "MenuAnchor", zt = h.forwardRef(
920
- (e, t) => {
921
- const { __scopeMenu: n, ...r } = e, o = st(n);
922
- return /* @__PURE__ */ a.jsx(to, { ...o, ...r, ref: t });
923
- }
924
- );
925
- zt.displayName = Ws;
926
- var Kt = "MenuPortal", [Ys, lr] = Ae(Kt, {
927
- forceMount: void 0
928
- }), cr = (e) => {
929
- const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(Kt, t);
930
- return /* @__PURE__ */ a.jsx(Ys, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(ho, { asChild: !0, container: o, children: r }) }) });
931
- };
932
- cr.displayName = Kt;
933
- var ue = "MenuContent", [Xs, qt] = Ae(ue), ur = h.forwardRef(
934
- (e, t) => {
935
- const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
936
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Js, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(Zs, { ...o, ref: t }) }) }) });
937
- }
938
- ), Js = h.forwardRef(
939
- (e, t) => {
940
- const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
941
- return h.useEffect(() => {
942
- const s = r.current;
943
- if (s) return no(s);
944
- }, []), /* @__PURE__ */ a.jsx(
945
- Qt,
946
- {
947
- ...e,
948
- ref: o,
949
- trapFocus: n.open,
950
- disableOutsidePointerEvents: n.open,
951
- disableOutsideScroll: !0,
952
- onFocusOutside: A(
953
- e.onFocusOutside,
954
- (s) => s.preventDefault(),
955
- { checkForDefaultPrevented: !1 }
956
- ),
957
- onDismiss: () => n.onOpenChange(!1)
958
- }
959
- );
960
- }
961
- ), Zs = h.forwardRef((e, t) => {
962
- const n = Te(ue, e.__scopeMenu);
963
- return /* @__PURE__ */ a.jsx(
964
- Qt,
965
- {
966
- ...e,
967
- ref: t,
968
- trapFocus: !1,
969
- disableOutsidePointerEvents: !1,
970
- disableOutsideScroll: !1,
971
- onDismiss: () => n.onOpenChange(!1)
972
- }
973
- );
974
- }), Qt = h.forwardRef(
975
- (e, t) => {
976
- const {
977
- __scopeMenu: n,
978
- loop: r = !1,
979
- trapFocus: o,
980
- onOpenAutoFocus: s,
981
- onCloseAutoFocus: i,
982
- disableOutsidePointerEvents: l,
983
- onEntryFocus: u,
984
- onEscapeKeyDown: m,
985
- onPointerDownOutside: f,
986
- onFocusOutside: c,
987
- onInteractOutside: d,
988
- onDismiss: v,
989
- disableOutsideScroll: M,
990
- ...C
991
- } = e, _ = Te(ue, n), R = it(ue, n), k = st(n), P = or(n), g = Qs(n), [z, Z] = h.useState(null), b = h.useRef(null), j = rt(t, b, _.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), x = h.useRef("right"), V = h.useRef(0), G = M ? lo : h.Fragment, te = M ? { as: co, allowPinchZoom: !0 } : void 0, q = (y) => {
992
- var le, Re;
993
- const Q = B.current + y, ie = g().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), ke = di(Me, Q, pe), ye = (Re = ie.find((re) => re.textValue === ke)) == null ? void 0 : Re.ref.current;
994
- (function re($e) {
995
- B.current = $e, window.clearTimeout(D.current), $e !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
996
- })(Q), ye && setTimeout(() => ye.focus());
997
- };
998
- h.useEffect(() => () => window.clearTimeout(D.current), []), ro();
999
- const Y = h.useCallback((y) => {
1000
- var ie, de;
1001
- return x.current === ((ie = W.current) == null ? void 0 : ie.side) && hi(y, (de = W.current) == null ? void 0 : de.area);
1002
- }, []);
1003
- return /* @__PURE__ */ a.jsx(
1004
- Xs,
1005
- {
1006
- scope: n,
1007
- searchRef: B,
1008
- onItemEnter: h.useCallback(
1009
- (y) => {
1010
- Y(y) && y.preventDefault();
1011
- },
1012
- [Y]
1013
- ),
1014
- onItemLeave: h.useCallback(
1015
- (y) => {
1016
- var Q;
1017
- Y(y) || ((Q = b.current) == null || Q.focus(), Z(null));
1018
- },
1019
- [Y]
1020
- ),
1021
- onTriggerLeave: h.useCallback(
1022
- (y) => {
1023
- Y(y) && y.preventDefault();
1024
- },
1025
- [Y]
1026
- ),
1027
- pointerGraceTimerRef: K,
1028
- onPointerGraceIntentChange: h.useCallback((y) => {
1029
- W.current = y;
1030
- }, []),
1031
- children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
1032
- ao,
1033
- {
1034
- asChild: !0,
1035
- trapped: o,
1036
- onMountAutoFocus: A(s, (y) => {
1037
- var Q;
1038
- y.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
1039
- }),
1040
- onUnmountAutoFocus: i,
1041
- children: /* @__PURE__ */ a.jsx(
1042
- oo,
1043
- {
1044
- asChild: !0,
1045
- disableOutsidePointerEvents: l,
1046
- onEscapeKeyDown: m,
1047
- onPointerDownOutside: f,
1048
- onFocusOutside: c,
1049
- onInteractOutside: d,
1050
- onDismiss: v,
1051
- children: /* @__PURE__ */ a.jsx(
1052
- Yo,
1053
- {
1054
- asChild: !0,
1055
- ...P,
1056
- dir: R.dir,
1057
- orientation: "vertical",
1058
- loop: r,
1059
- currentTabStopId: z,
1060
- onCurrentTabStopIdChange: Z,
1061
- onEntryFocus: A(u, (y) => {
1062
- R.isUsingKeyboardRef.current || y.preventDefault();
1063
- }),
1064
- preventScrollOnEntryFocus: !0,
1065
- children: /* @__PURE__ */ a.jsx(
1066
- so,
1067
- {
1068
- role: "menu",
1069
- "aria-orientation": "vertical",
1070
- "data-state": Dr(_.open),
1071
- "data-radix-menu-content": "",
1072
- dir: R.dir,
1073
- ...k,
1074
- ...C,
1075
- ref: j,
1076
- style: { outline: "none", ...C.style },
1077
- onKeyDown: A(C.onKeyDown, (y) => {
1078
- const ie = y.target.closest("[data-radix-menu-content]") === y.currentTarget, de = y.ctrlKey || y.altKey || y.metaKey, pe = y.key.length === 1;
1079
- ie && (y.key === "Tab" && y.preventDefault(), !de && pe && q(y.key));
1080
- const Me = b.current;
1081
- if (y.target !== Me || !zs.includes(y.key)) return;
1082
- y.preventDefault();
1083
- const ye = g().filter((le) => !le.disabled).map((le) => le.ref.current);
1084
- rr.includes(y.key) && ye.reverse(), ci(ye);
1085
- }),
1086
- onBlur: A(e.onBlur, (y) => {
1087
- y.currentTarget.contains(y.target) || (window.clearTimeout(D.current), B.current = "");
1088
- }),
1089
- onPointerMove: A(
1090
- e.onPointerMove,
1091
- tt((y) => {
1092
- const Q = y.target, ie = V.current !== y.clientX;
1093
- if (y.currentTarget.contains(Q) && ie) {
1094
- const de = y.clientX > V.current ? "right" : "left";
1095
- x.current = de, V.current = y.clientX;
1096
- }
1097
- })
1098
- )
1099
- }
1100
- )
1101
- }
1102
- )
1103
- }
1104
- )
1105
- }
1106
- ) })
1107
- }
1108
- );
1109
- }
1110
- );
1111
- ur.displayName = ue;
1112
- var ei = "MenuGroup", Vt = h.forwardRef(
1113
- (e, t) => {
1114
- const { __scopeMenu: n, ...r } = e;
1115
- return /* @__PURE__ */ a.jsx(Ke.div, { role: "group", ...r, ref: t });
1116
- }
1117
- );
1118
- Vt.displayName = ei;
1119
- var ti = "MenuLabel", dr = h.forwardRef(
1120
- (e, t) => {
1121
- const { __scopeMenu: n, ...r } = e;
1122
- return /* @__PURE__ */ a.jsx(Ke.div, { ...r, ref: t });
1123
- }
1124
- );
1125
- dr.displayName = ti;
1126
- var vt = "MenuItem", Mn = "menu.itemSelect", yt = h.forwardRef(
1127
- (e, t) => {
1128
- const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(vt, e.__scopeMenu), l = qt(vt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
1129
- const c = s.current;
1130
- if (!n && c) {
1131
- const d = new CustomEvent(Mn, { bubbles: !0, cancelable: !0 });
1132
- c.addEventListener(Mn, (v) => r == null ? void 0 : r(v), { once: !0 }), uo(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
1133
- }
1134
- };
1135
- return /* @__PURE__ */ a.jsx(
1136
- fr,
1137
- {
1138
- ...o,
1139
- ref: u,
1140
- disabled: n,
1141
- onClick: A(e.onClick, f),
1142
- onPointerDown: (c) => {
1143
- var d;
1144
- (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
1145
- },
1146
- onPointerUp: A(e.onPointerUp, (c) => {
1147
- var d;
1148
- m.current || (d = c.currentTarget) == null || d.click();
1149
- }),
1150
- onKeyDown: A(e.onKeyDown, (c) => {
1151
- const d = l.searchRef.current !== "";
1152
- n || d && c.key === " " || Nt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
1153
- })
1154
- }
1155
- );
1156
- }
1157
- );
1158
- yt.displayName = vt;
1159
- var fr = h.forwardRef(
1160
- (e, t) => {
1161
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(vt, n), l = or(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, v] = h.useState("");
1162
- return h.useEffect(() => {
1163
- const M = u.current;
1164
- M && v((M.textContent ?? "").trim());
1165
- }, [s.children]), /* @__PURE__ */ a.jsx(
1166
- et.ItemSlot,
1167
- {
1168
- scope: n,
1169
- disabled: r,
1170
- textValue: o ?? d,
1171
- children: /* @__PURE__ */ a.jsx(Xo, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
1172
- Ke.div,
1173
- {
1174
- role: "menuitem",
1175
- "data-highlighted": f ? "" : void 0,
1176
- "aria-disabled": r || void 0,
1177
- "data-disabled": r ? "" : void 0,
1178
- ...s,
1179
- ref: m,
1180
- onPointerMove: A(
1181
- e.onPointerMove,
1182
- tt((M) => {
1183
- r ? i.onItemLeave(M) : (i.onItemEnter(M), M.defaultPrevented || M.currentTarget.focus({ preventScroll: !0 }));
1184
- })
1185
- ),
1186
- onPointerLeave: A(
1187
- e.onPointerLeave,
1188
- tt((M) => i.onItemLeave(M))
1189
- ),
1190
- onFocus: A(e.onFocus, () => c(!0)),
1191
- onBlur: A(e.onBlur, () => c(!1))
1192
- }
1193
- ) })
1194
- }
1195
- );
1196
- }
1197
- ), ni = "MenuCheckboxItem", hr = h.forwardRef(
1198
- (e, t) => {
1199
- const { checked: n = !1, onCheckedChange: r, ...o } = e;
1200
- return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
1201
- yt,
1202
- {
1203
- role: "menuitemcheckbox",
1204
- "aria-checked": wt(n) ? "mixed" : n,
1205
- ...o,
1206
- ref: t,
1207
- "data-state": Yt(n),
1208
- onSelect: A(
1209
- o.onSelect,
1210
- () => r == null ? void 0 : r(wt(n) ? !0 : !n),
1211
- { checkForDefaultPrevented: !1 }
1212
- )
1213
- }
1214
- ) });
1215
- }
1216
- );
1217
- hr.displayName = ni;
1218
- var pr = "MenuRadioGroup", [ri, ai] = Ae(
1219
- pr,
1220
- { value: void 0, onValueChange: () => {
1221
- } }
1222
- ), mr = h.forwardRef(
1223
- (e, t) => {
1224
- const { value: n, onValueChange: r, ...o } = e, s = $t(r);
1225
- return /* @__PURE__ */ a.jsx(ri, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
1226
- }
1227
- );
1228
- mr.displayName = pr;
1229
- var gr = "MenuRadioItem", vr = h.forwardRef(
1230
- (e, t) => {
1231
- const { value: n, ...r } = e, o = ai(gr, e.__scopeMenu), s = n === o.value;
1232
- return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
1233
- yt,
1234
- {
1235
- role: "menuitemradio",
1236
- "aria-checked": s,
1237
- ...r,
1238
- ref: t,
1239
- "data-state": Yt(s),
1240
- onSelect: A(
1241
- r.onSelect,
1242
- () => {
1243
- var i;
1244
- return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
1245
- },
1246
- { checkForDefaultPrevented: !1 }
1247
- )
1248
- }
1249
- ) });
1250
- }
1251
- );
1252
- vr.displayName = gr;
1253
- var Gt = "MenuItemIndicator", [wr, oi] = Ae(
1254
- Gt,
1255
- { checked: !1 }
1256
- ), xr = h.forwardRef(
1257
- (e, t) => {
1258
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = oi(Gt, n);
1259
- return /* @__PURE__ */ a.jsx(
1260
- xt,
1261
- {
1262
- present: r || wt(s.checked) || s.checked === !0,
1263
- children: /* @__PURE__ */ a.jsx(
1264
- Ke.span,
1265
- {
1266
- ...o,
1267
- ref: t,
1268
- "data-state": Yt(s.checked)
1269
- }
1270
- )
1271
- }
1272
- );
1273
- }
1274
- );
1275
- xr.displayName = Gt;
1276
- var si = "MenuSeparator", yr = h.forwardRef(
1277
- (e, t) => {
1278
- const { __scopeMenu: n, ...r } = e;
1279
- return /* @__PURE__ */ a.jsx(
1280
- Ke.div,
1281
- {
1282
- role: "separator",
1283
- "aria-orientation": "horizontal",
1284
- ...r,
1285
- ref: t
1286
- }
1287
- );
876
+ this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(qr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1288
877
  }
1289
- );
1290
- yr.displayName = si;
1291
- var ii = "MenuArrow", br = h.forwardRef(
1292
- (e, t) => {
1293
- const { __scopeMenu: n, ...r } = e, o = st(n);
1294
- return /* @__PURE__ */ a.jsx(io, { ...o, ...r, ref: t });
1295
- }
1296
- );
1297
- br.displayName = ii;
1298
- var Wt = "MenuSub", [li, Sr] = Ae(Wt), Cr = (e) => {
1299
- const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Wt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = $t(o);
1300
- return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Ln, { ...i, children: /* @__PURE__ */ a.jsx(
1301
- sr,
1302
- {
1303
- scope: t,
1304
- open: r,
1305
- onOpenChange: c,
1306
- content: m,
1307
- onContentChange: f,
1308
- children: /* @__PURE__ */ a.jsx(
1309
- li,
1310
- {
1311
- scope: t,
1312
- contentId: gt(),
1313
- triggerId: gt(),
1314
- trigger: l,
1315
- onTriggerChange: u,
1316
- children: n
1317
- }
1318
- )
1319
- }
1320
- ) });
1321
- };
1322
- Cr.displayName = Wt;
1323
- var Xe = "MenuSubTrigger", Mr = h.forwardRef(
1324
- (e, t) => {
1325
- const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Sr(Xe, e.__scopeMenu), s = qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
1326
- i.current && window.clearTimeout(i.current), i.current = null;
1327
- }, []);
1328
- return h.useEffect(() => f, [f]), h.useEffect(() => {
1329
- const c = l.current;
1330
- return () => {
1331
- window.clearTimeout(c), u(null);
1332
- };
1333
- }, [l, u]), /* @__PURE__ */ a.jsx(zt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
1334
- fr,
1335
- {
1336
- id: o.triggerId,
1337
- "aria-haspopup": "menu",
1338
- "aria-expanded": n.open,
1339
- "aria-controls": o.contentId,
1340
- "data-state": Dr(n.open),
1341
- ...e,
1342
- ref: Fn(t, o.onTriggerChange),
1343
- onClick: (c) => {
1344
- var d;
1345
- (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
1346
- },
1347
- onPointerMove: A(
1348
- e.onPointerMove,
1349
- tt((c) => {
1350
- s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
1351
- n.onOpenChange(!0), f();
1352
- }, 100));
1353
- })
1354
- ),
1355
- onPointerLeave: A(
1356
- e.onPointerLeave,
1357
- tt((c) => {
1358
- var v, M;
1359
- f();
1360
- const d = (v = n.content) == null ? void 0 : v.getBoundingClientRect();
1361
- if (d) {
1362
- const C = (M = n.content) == null ? void 0 : M.dataset.side, _ = C === "right", R = _ ? -5 : 5, k = d[_ ? "left" : "right"], P = d[_ ? "right" : "left"];
1363
- s.onPointerGraceIntentChange({
1364
- area: [
1365
- // Apply a bleed on clientX to ensure that our exit point is
1366
- // consistently within polygon bounds
1367
- { x: c.clientX + R, y: c.clientY },
1368
- { x: k, y: d.top },
1369
- { x: P, y: d.top },
1370
- { x: P, y: d.bottom },
1371
- { x: k, y: d.bottom }
1372
- ],
1373
- side: C
1374
- }), window.clearTimeout(l.current), l.current = window.setTimeout(
1375
- () => s.onPointerGraceIntentChange(null),
1376
- 300
1377
- );
1378
- } else {
1379
- if (s.onTriggerLeave(c), c.defaultPrevented) return;
1380
- s.onPointerGraceIntentChange(null);
1381
- }
1382
- })
1383
- ),
1384
- onKeyDown: A(e.onKeyDown, (c) => {
1385
- var v;
1386
- const d = s.searchRef.current !== "";
1387
- e.disabled || d && c.key === " " || Ks[r.dir].includes(c.key) && (n.onOpenChange(!0), (v = n.content) == null || v.focus(), c.preventDefault());
1388
- })
1389
- }
1390
- ) });
1391
- }
1392
- );
1393
- Mr.displayName = Xe;
1394
- var Rr = "MenuSubContent", Er = h.forwardRef(
1395
- (e, t) => {
1396
- const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Sr(Rr, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
1397
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
1398
- Qt,
1399
- {
1400
- id: l.contentId,
1401
- "aria-labelledby": l.triggerId,
1402
- ...o,
1403
- ref: m,
1404
- align: "start",
1405
- side: i.dir === "rtl" ? "left" : "right",
1406
- disableOutsidePointerEvents: !1,
1407
- disableOutsideScroll: !1,
1408
- trapFocus: !1,
1409
- onOpenAutoFocus: (f) => {
1410
- var c;
1411
- i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
1412
- },
1413
- onCloseAutoFocus: (f) => f.preventDefault(),
1414
- onFocusOutside: A(e.onFocusOutside, (f) => {
1415
- f.target !== l.trigger && s.onOpenChange(!1);
1416
- }),
1417
- onEscapeKeyDown: A(e.onEscapeKeyDown, (f) => {
1418
- i.onClose(), f.preventDefault();
1419
- }),
1420
- onKeyDown: A(e.onKeyDown, (f) => {
1421
- var v;
1422
- const c = f.currentTarget.contains(f.target), d = qs[i.dir].includes(f.key);
1423
- c && d && (s.onOpenChange(!1), (v = l.trigger) == null || v.focus(), f.preventDefault());
1424
- })
1425
- }
1426
- ) }) }) });
1427
- }
1428
- );
1429
- Er.displayName = Rr;
1430
- function Dr(e) {
1431
- return e ? "open" : "closed";
1432
- }
1433
- function wt(e) {
1434
- return e === "indeterminate";
1435
- }
1436
- function Yt(e) {
1437
- return wt(e) ? "indeterminate" : e ? "checked" : "unchecked";
1438
878
  }
1439
- function ci(e) {
1440
- const t = document.activeElement;
1441
- for (const n of e)
1442
- if (n === t || (n.focus(), document.activeElement !== t)) return;
879
+ function Xr({ error: t, resetErrorBoundary: e }) {
880
+ return /* @__PURE__ */ a.jsx(Fe, { error: t });
1443
881
  }
1444
- function ui(e, t) {
1445
- return e.map((n, r) => e[(t + r) % e.length]);
1446
- }
1447
- function di(e, t, n) {
1448
- const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1449
- let i = ui(e, Math.max(s, 0));
1450
- o.length === 1 && (i = i.filter((m) => m !== n));
1451
- const u = i.find(
1452
- (m) => m.toLowerCase().startsWith(o.toLowerCase())
1453
- );
1454
- return u !== n ? u : void 0;
1455
- }
1456
- function fi(e, t) {
1457
- const { x: n, y: r } = e;
1458
- let o = !1;
1459
- for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
1460
- const l = t[s].x, u = t[s].y, m = t[i].x, f = t[i].y;
1461
- u > r != f > r && n < (m - l) * (r - u) / (f - u) + l && (o = !o);
1462
- }
1463
- return o;
1464
- }
1465
- function hi(e, t) {
1466
- if (!t) return !1;
1467
- const n = { x: e.clientX, y: e.clientY };
1468
- return fi(n, t);
1469
- }
1470
- function tt(e) {
1471
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1472
- }
1473
- var pi = ir, mi = zt, gi = cr, vi = ur, wi = Vt, xi = dr, yi = yt, bi = hr, Si = mr, Ci = vr, Mi = xr, Ri = yr, Ei = br, Di = Cr, Pi = Mr, ji = Er, Xt = "DropdownMenu", [Ni, uc] = kn(
1474
- Xt,
1475
- [ar]
1476
- ), J = ar(), [Ti, Pr] = Ni(Xt), jr = (e) => {
1477
- const {
1478
- __scopeDropdownMenu: t,
1479
- children: n,
1480
- dir: r,
1481
- open: o,
1482
- defaultOpen: s,
1483
- onOpenChange: i,
1484
- modal: l = !0
1485
- } = e, u = J(t), m = h.useRef(null), [f = !1, c] = Bn({
1486
- prop: o,
1487
- defaultProp: s,
1488
- onChange: i
1489
- });
1490
- return /* @__PURE__ */ a.jsx(
1491
- Ti,
1492
- {
1493
- scope: t,
1494
- triggerId: gt(),
1495
- triggerRef: m,
1496
- contentId: gt(),
1497
- open: f,
1498
- onOpenChange: c,
1499
- onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
1500
- modal: l,
1501
- children: /* @__PURE__ */ a.jsx(pi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
1502
- }
1503
- );
1504
- };
1505
- jr.displayName = Xt;
1506
- var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
1507
- (e, t) => {
1508
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Pr(Nr, n), i = J(n);
1509
- return /* @__PURE__ */ a.jsx(mi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
1510
- Ke.button,
1511
- {
1512
- type: "button",
1513
- id: s.triggerId,
1514
- "aria-haspopup": "menu",
1515
- "aria-expanded": s.open,
1516
- "aria-controls": s.open ? s.contentId : void 0,
1517
- "data-state": s.open ? "open" : "closed",
1518
- "data-disabled": r ? "" : void 0,
1519
- disabled: r,
1520
- ...o,
1521
- ref: Fn(t, s.triggerRef),
1522
- onPointerDown: A(e.onPointerDown, (l) => {
1523
- !r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
1524
- }),
1525
- onKeyDown: A(e.onKeyDown, (l) => {
1526
- r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
1527
- })
1528
- }
1529
- ) });
1530
- }
1531
- );
1532
- Tr.displayName = Nr;
1533
- var _i = "DropdownMenuPortal", _r = (e) => {
1534
- const { __scopeDropdownMenu: t, ...n } = e, r = J(t);
1535
- return /* @__PURE__ */ a.jsx(gi, { ...r, ...n });
1536
- };
1537
- _r.displayName = _i;
1538
- var Or = "DropdownMenuContent", Ir = h.forwardRef(
1539
- (e, t) => {
1540
- const { __scopeDropdownMenu: n, ...r } = e, o = Pr(Or, n), s = J(n), i = h.useRef(!1);
1541
- return /* @__PURE__ */ a.jsx(
1542
- vi,
1543
- {
1544
- id: o.contentId,
1545
- "aria-labelledby": o.triggerId,
1546
- ...s,
1547
- ...r,
1548
- ref: t,
1549
- onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
1550
- var u;
1551
- i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
1552
- }),
1553
- onInteractOutside: A(e.onInteractOutside, (l) => {
1554
- const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
1555
- (!o.modal || f) && (i.current = !0);
1556
- }),
1557
- style: {
1558
- ...e.style,
1559
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1560
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1561
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1562
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1563
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1564
- }
1565
- }
1566
- );
1567
- }
1568
- );
1569
- Ir.displayName = Or;
1570
- var Oi = "DropdownMenuGroup", Ii = h.forwardRef(
1571
- (e, t) => {
1572
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1573
- return /* @__PURE__ */ a.jsx(wi, { ...o, ...r, ref: t });
1574
- }
1575
- );
1576
- Ii.displayName = Oi;
1577
- var Ai = "DropdownMenuLabel", Ar = h.forwardRef(
1578
- (e, t) => {
1579
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1580
- return /* @__PURE__ */ a.jsx(xi, { ...o, ...r, ref: t });
1581
- }
1582
- );
1583
- Ar.displayName = Ai;
1584
- var ki = "DropdownMenuItem", kr = h.forwardRef(
1585
- (e, t) => {
1586
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1587
- return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
1588
- }
1589
- );
1590
- kr.displayName = ki;
1591
- var $i = "DropdownMenuCheckboxItem", $r = h.forwardRef((e, t) => {
1592
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1593
- return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
1594
- });
1595
- $r.displayName = $i;
1596
- var Fi = "DropdownMenuRadioGroup", Li = h.forwardRef((e, t) => {
1597
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1598
- return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
1599
- });
1600
- Li.displayName = Fi;
1601
- var Bi = "DropdownMenuRadioItem", Fr = h.forwardRef((e, t) => {
1602
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1603
- return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
1604
- });
1605
- Fr.displayName = Bi;
1606
- var Hi = "DropdownMenuItemIndicator", Lr = h.forwardRef((e, t) => {
1607
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1608
- return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
1609
- });
1610
- Lr.displayName = Hi;
1611
- var Ui = "DropdownMenuSeparator", Br = h.forwardRef((e, t) => {
1612
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1613
- return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
1614
- });
1615
- Br.displayName = Ui;
1616
- var zi = "DropdownMenuArrow", Ki = h.forwardRef(
1617
- (e, t) => {
1618
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1619
- return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
1620
- }
1621
- );
1622
- Ki.displayName = zi;
1623
- var qi = (e) => {
1624
- const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = J(t), [l = !1, u] = Bn({
1625
- prop: r,
1626
- defaultProp: s,
1627
- onChange: o
1628
- });
1629
- return /* @__PURE__ */ a.jsx(Di, { ...i, open: l, onOpenChange: u, children: n });
1630
- }, Qi = "DropdownMenuSubTrigger", Hr = h.forwardRef((e, t) => {
1631
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1632
- return /* @__PURE__ */ a.jsx(Pi, { ...o, ...r, ref: t });
1633
- });
1634
- Hr.displayName = Qi;
1635
- var Vi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
1636
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1637
- return /* @__PURE__ */ a.jsx(
1638
- ji,
1639
- {
1640
- ...o,
1641
- ...r,
1642
- ref: t,
1643
- style: {
1644
- ...e.style,
1645
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1646
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1647
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1648
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1649
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1650
- }
1651
- }
1652
- );
1653
- });
1654
- Ur.displayName = Vi;
1655
- var Gi = jr, Wi = Tr, zr = _r, Kr = Ir, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Yi = qi, Xr = Hr, Jr = Ur;
1656
- const Xi = Gi, Ji = Wi, Zi = zr, el = Yi, Zr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1657
- Xr,
1658
- {
1659
- ref: o,
1660
- className: O(
1661
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1662
- t && "pl-8",
1663
- e
1664
- ),
1665
- ...r,
1666
- children: [
1667
- n,
1668
- /* @__PURE__ */ a.jsx(Xn, { className: "ml-auto h-4 w-4" })
1669
- ]
1670
- }
1671
- ));
1672
- Zr.displayName = Xr.displayName;
1673
- const ea = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1674
- Jr,
1675
- {
1676
- ref: n,
1677
- className: O(
1678
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1679
- e
1680
- ),
1681
- ...t
1682
- }
1683
- ));
1684
- ea.displayName = Jr.displayName;
1685
- const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(
1686
- Kr,
1687
- {
1688
- ref: r,
1689
- sideOffset: t,
1690
- className: O(
1691
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1692
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1693
- e
1694
- ),
1695
- ...n
1696
- }
1697
- ) }));
1698
- ta.displayName = Kr.displayName;
1699
- const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1700
- Qr,
1701
- {
1702
- ref: r,
1703
- className: O(
1704
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1705
- t && "pl-8",
1706
- e
1707
- ),
1708
- ...n
1709
- }
1710
- ));
1711
- na.displayName = Qr.displayName;
1712
- const tl = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1713
- Vr,
1714
- {
1715
- ref: o,
1716
- className: O(
1717
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1718
- e
1719
- ),
1720
- checked: n,
1721
- ...r,
1722
- children: [
1723
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Ho, { className: "h-4 w-4" }) }) }),
1724
- t
1725
- ]
1726
- }
1727
- ));
1728
- tl.displayName = Vr.displayName;
1729
- const nl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
1730
- Gr,
1731
- {
1732
- ref: r,
1733
- className: O(
1734
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1735
- e
1736
- ),
1737
- ...n,
1738
- children: [
1739
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Uo, { className: "h-4 w-4 fill-current" }) }) }),
1740
- t
1741
- ]
1742
- }
1743
- ));
1744
- nl.displayName = Gr.displayName;
1745
- const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1746
- qr,
1747
- {
1748
- ref: r,
1749
- className: O(
1750
- "px-2 py-1.5 text-sm font-semibold",
1751
- t && "pl-8",
1752
- e
1753
- ),
1754
- ...n
1755
- }
1756
- ));
1757
- ra.displayName = qr.displayName;
1758
- const aa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1759
- Yr,
1760
- {
1761
- ref: n,
1762
- className: O("-mx-1 my-1 h-px bg-muted", e),
1763
- ...t
1764
- }
1765
- ));
1766
- aa.displayName = Yr.displayName;
1767
- const Rn = {
882
+ const J = globalThis;
883
+ (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
884
+ const De = {
1768
885
  info: "bg-blue-500",
1769
886
  note: "bg-gray-500",
1770
887
  tip: "bg-green-600",
1771
888
  caution: "bg-orange-500",
1772
889
  danger: "bg-rose-500"
1773
- }, rl = () => {
1774
- const { page: e } = qe(), [t, n] = Ie(!0);
1775
- if (!(e != null && e.banner) || !t)
890
+ }, Zr = () => {
891
+ const { page: t } = F(), [e, r] = Q(!0);
892
+ if (!(t != null && t.banner) || !e)
1776
893
  return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1777
- const r = e.banner.color && e.banner.color in Rn ? Rn[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
894
+ const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
1778
895
  return /* @__PURE__ */ a.jsxs(
1779
896
  "div",
1780
897
  {
1781
- className: O(
898
+ className: A(
1782
899
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1783
- r
900
+ s
1784
901
  ),
1785
- style: o,
902
+ style: n,
1786
903
  children: [
1787
- /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1788
- e.banner.dismissible && /* @__PURE__ */ a.jsx(
904
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: t.banner.message }),
905
+ t.banner.dismissible && /* @__PURE__ */ a.jsx(
1789
906
  "button",
1790
907
  {
1791
908
  type: "button",
1792
909
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1793
- onClick: () => n(!1),
1794
- children: /* @__PURE__ */ a.jsx(zo, { size: 16 })
910
+ onClick: () => r(!1),
911
+ children: /* @__PURE__ */ a.jsx(Yt, { size: 16 })
1795
912
  }
1796
913
  )
1797
914
  ]
1798
915
  }
1799
916
  );
1800
- };
1801
- function al(e) {
1802
- if (typeof document > "u") return;
1803
- let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1804
- n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
1805
- }
1806
- const oa = p.createContext({
1807
- drawerRef: {
1808
- current: null
1809
- },
1810
- overlayRef: {
1811
- current: null
1812
- },
1813
- onPress: () => {
1814
- },
1815
- onRelease: () => {
1816
- },
1817
- onDrag: () => {
1818
- },
1819
- onNestedDrag: () => {
1820
- },
1821
- onNestedOpenChange: () => {
1822
- },
1823
- onNestedRelease: () => {
1824
- },
1825
- openProp: void 0,
1826
- dismissible: !1,
1827
- isOpen: !1,
1828
- isDragging: !1,
1829
- keyboardIsOpen: {
1830
- current: !1
1831
- },
1832
- snapPointsOffset: null,
1833
- snapPoints: null,
1834
- handleOnly: !1,
1835
- modal: !1,
1836
- shouldFade: !1,
1837
- activeSnapPoint: null,
1838
- onOpenChange: () => {
1839
- },
1840
- setActiveSnapPoint: () => {
1841
- },
1842
- closeDrawer: () => {
1843
- },
1844
- direction: "bottom",
1845
- shouldAnimate: {
1846
- current: !0
1847
- },
1848
- shouldScaleBackground: !1,
1849
- setBackgroundColorOnScale: !0,
1850
- noBodyStyles: !1,
1851
- container: null,
1852
- autoFocus: !1
1853
- }), Qe = () => {
1854
- const e = p.useContext(oa);
1855
- if (!e)
1856
- throw new Error("useDrawerContext must be used within a Drawer.Root");
1857
- return e;
1858
- };
1859
- al(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
1860
- [data-state=closed]
1861
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
1862
- function ol() {
1863
- const e = navigator.userAgent;
1864
- return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
1865
- /FxiOS/.test(e));
1866
- }
1867
- function sl() {
1868
- return Jt(/^Mac/);
1869
- }
1870
- function il() {
1871
- return Jt(/^iPhone/);
1872
- }
1873
- function En() {
1874
- return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1875
- }
1876
- function ll() {
1877
- return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1878
- sl() && navigator.maxTouchPoints > 1;
1879
- }
1880
- function sa() {
1881
- return il() || ll();
1882
- }
1883
- function Jt(e) {
1884
- return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
1885
- }
1886
- const cl = 24, ul = typeof window < "u" ? So : Ce;
1887
- function Dn(...e) {
1888
- return (...t) => {
1889
- for (let n of e)
1890
- typeof n == "function" && n(...t);
1891
- };
1892
- }
1893
- const Mt = typeof document < "u" && window.visualViewport;
1894
- function Pn(e) {
1895
- let t = window.getComputedStyle(e);
1896
- return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
1897
- }
1898
- function ia(e) {
1899
- for (Pn(e) && (e = e.parentElement); e && !Pn(e); )
1900
- e = e.parentElement;
1901
- return e || document.scrollingElement || document.documentElement;
1902
- }
1903
- const dl = /* @__PURE__ */ new Set([
1904
- "checkbox",
1905
- "radio",
1906
- "range",
1907
- "color",
1908
- "file",
1909
- "image",
1910
- "button",
1911
- "submit",
1912
- "reset"
1913
- ]);
1914
- let ht = 0, Rt;
1915
- function fl(e = {}) {
1916
- let { isDisabled: t } = e;
1917
- ul(() => {
1918
- if (!t)
1919
- return ht++, ht === 1 && sa() && (Rt = hl()), () => {
1920
- ht--, ht === 0 && (Rt == null || Rt());
1921
- };
1922
- }, [
1923
- t
1924
- ]);
1925
- }
1926
- function hl() {
1927
- let e, t = 0, n = (c) => {
1928
- e = ia(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
1929
- }, r = (c) => {
1930
- if (!e || e === document.documentElement || e === document.body) {
1931
- c.preventDefault();
1932
- return;
1933
- }
1934
- let d = c.changedTouches[0].pageY, v = e.scrollTop, M = e.scrollHeight - e.clientHeight;
1935
- M !== 0 && ((v <= 0 && d > t || v >= M && d < t) && c.preventDefault(), t = d);
1936
- }, o = (c) => {
1937
- let d = c.target;
1938
- Tt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
1939
- d.style.transform = "";
1940
- }));
1941
- }, s = (c) => {
1942
- let d = c.target;
1943
- Tt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1944
- d.style.transform = "", Mt && (Mt.height < window.innerHeight ? requestAnimationFrame(() => {
1945
- jn(d);
1946
- }) : Mt.addEventListener("resize", () => jn(d), {
1947
- once: !0
1948
- }));
1949
- }));
1950
- }, i = () => {
1951
- window.scrollTo(0, 0);
1952
- }, l = window.pageXOffset, u = window.pageYOffset, m = Dn(pl(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1953
- window.scrollTo(0, 0);
1954
- let f = Dn(We(document, "touchstart", n, {
1955
- passive: !1,
1956
- capture: !0
1957
- }), We(document, "touchmove", r, {
1958
- passive: !1,
1959
- capture: !0
1960
- }), We(document, "touchend", o, {
1961
- passive: !1,
1962
- capture: !0
1963
- }), We(document, "focus", s, !0), We(window, "scroll", i));
1964
- return () => {
1965
- m(), f(), window.scrollTo(l, u);
1966
- };
1967
- }
1968
- function pl(e, t, n) {
1969
- let r = e.style[t];
1970
- return e.style[t] = n, () => {
1971
- e.style[t] = r;
1972
- };
1973
- }
1974
- function We(e, t, n, r) {
1975
- return e.addEventListener(t, n, r), () => {
1976
- e.removeEventListener(t, n, r);
1977
- };
1978
- }
1979
- function jn(e) {
1980
- let t = document.scrollingElement || document.documentElement;
1981
- for (; e && e !== t; ) {
1982
- let n = ia(e);
1983
- if (n !== document.documentElement && n !== document.body && n !== e) {
1984
- let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
1985
- const i = n.getBoundingClientRect().bottom + cl;
1986
- s > i && (n.scrollTop += o - r);
1987
- }
1988
- e = n.parentElement;
1989
- }
1990
- }
1991
- function Tt(e) {
1992
- return e instanceof HTMLInputElement && !dl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1993
- }
1994
- function ml(e, t) {
1995
- typeof e == "function" ? e(t) : e != null && (e.current = t);
1996
- }
1997
- function gl(...e) {
1998
- return (t) => e.forEach((n) => ml(n, t));
1999
- }
2000
- function la(...e) {
2001
- return h.useCallback(gl(...e), e);
2002
- }
2003
- const ca = /* @__PURE__ */ new WeakMap();
2004
- function H(e, t, n = !1) {
2005
- if (!e || !(e instanceof HTMLElement)) return;
2006
- let r = {};
2007
- Object.entries(t).forEach(([o, s]) => {
2008
- if (o.startsWith("--")) {
2009
- e.style.setProperty(o, s);
2010
- return;
2011
- }
2012
- r[o] = e.style[o], e.style[o] = s;
2013
- }), !n && ca.set(e, r);
2014
- }
2015
- function vl(e, t) {
2016
- if (!e || !(e instanceof HTMLElement)) return;
2017
- let n = ca.get(e);
2018
- n && (e.style[t] = n[t]);
2019
- }
2020
- const U = (e) => {
2021
- switch (e) {
2022
- case "top":
2023
- case "bottom":
2024
- return !0;
2025
- case "left":
2026
- case "right":
2027
- return !1;
2028
- default:
2029
- return e;
2030
- }
2031
- };
2032
- function pt(e, t) {
2033
- if (!e)
2034
- return null;
2035
- const n = window.getComputedStyle(e), r = (
2036
- // @ts-ignore
2037
- n.transform || n.webkitTransform || n.mozTransform
2038
- );
2039
- let o = r.match(/^matrix3d\((.+)\)$/);
2040
- return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
2041
- }
2042
- function wl(e) {
2043
- return 8 * (Math.log(e + 1) - 2);
2044
- }
2045
- function Et(e, t) {
2046
- if (!e) return () => {
2047
- };
2048
- const n = e.style.cssText;
2049
- return Object.assign(e.style, t), () => {
2050
- e.style.cssText = n;
2051
- };
2052
- }
2053
- function xl(...e) {
2054
- return (...t) => {
2055
- for (const n of e)
2056
- typeof n == "function" && n(...t);
2057
- };
2058
- }
2059
- const $ = {
2060
- DURATION: 0.5,
2061
- EASE: [
2062
- 0.32,
2063
- 0.72,
2064
- 0,
2065
- 1
2066
- ]
2067
- }, ua = 0.4, yl = 0.25, bl = 100, da = 8, Oe = 16, _t = 26, Dt = "vaul-dragging";
2068
- function fa(e) {
2069
- const t = p.useRef(e);
2070
- return p.useEffect(() => {
2071
- t.current = e;
2072
- }), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
2073
- }
2074
- function Sl({ defaultProp: e, onChange: t }) {
2075
- const n = p.useState(e), [r] = n, o = p.useRef(r), s = fa(t);
2076
- return p.useEffect(() => {
2077
- o.current !== r && (s(r), o.current = r);
2078
- }, [
2079
- r,
2080
- o,
2081
- s
2082
- ]), n;
2083
- }
2084
- function ha({ prop: e, defaultProp: t, onChange: n = () => {
2085
- } }) {
2086
- const [r, o] = Sl({
2087
- defaultProp: t,
2088
- onChange: n
2089
- }), s = e !== void 0, i = s ? e : r, l = fa(n), u = p.useCallback((m) => {
2090
- if (s) {
2091
- const c = typeof m == "function" ? m(e) : m;
2092
- c !== e && l(c);
2093
- } else
2094
- o(m);
2095
- }, [
2096
- s,
2097
- e,
2098
- o,
2099
- l
2100
- ]);
2101
- return [
2102
- i,
2103
- u
2104
- ];
2105
- }
2106
- function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
2107
- const [f, c] = ha({
2108
- prop: e,
2109
- defaultProp: n == null ? void 0 : n[0],
2110
- onChange: t
2111
- }), [d, v] = p.useState(typeof window < "u" ? {
2112
- innerWidth: window.innerWidth,
2113
- innerHeight: window.innerHeight
2114
- } : void 0);
2115
- p.useEffect(() => {
2116
- function b() {
2117
- v({
2118
- innerWidth: window.innerWidth,
2119
- innerHeight: window.innerHeight
2120
- });
2121
- }
2122
- return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
2123
- }, []);
2124
- const M = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
2125
- n,
2126
- f
2127
- ]), C = p.useMemo(() => {
2128
- var b;
2129
- return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
2130
- }, [
2131
- n,
2132
- f
2133
- ]), _ = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, R = p.useMemo(() => {
2134
- const b = u ? {
2135
- width: u.getBoundingClientRect().width,
2136
- height: u.getBoundingClientRect().height
2137
- } : typeof window < "u" ? {
2138
- width: window.innerWidth,
2139
- height: window.innerHeight
2140
- } : {
2141
- width: 0,
2142
- height: 0
2143
- };
2144
- var j;
2145
- return (j = n == null ? void 0 : n.map((D) => {
2146
- const B = typeof D == "string";
2147
- let K = 0;
2148
- if (B && (K = parseInt(D, 10)), U(l)) {
2149
- const x = B ? K : d ? D * b.height : 0;
2150
- return d ? l === "bottom" ? b.height - x : -b.height + x : x;
2151
- }
2152
- const W = B ? K : d ? D * b.width : 0;
2153
- return d ? l === "right" ? b.width - W : -b.width + W : W;
2154
- })) != null ? j : [];
2155
- }, [
2156
- n,
2157
- d,
2158
- u
2159
- ]), k = p.useMemo(() => C !== null ? R == null ? void 0 : R[C] : null, [
2160
- R,
2161
- C
2162
- ]), P = p.useCallback((b) => {
2163
- var j;
2164
- const D = (j = R == null ? void 0 : R.findIndex((B) => B === b)) != null ? j : null;
2165
- i(D), H(r.current, {
2166
- transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2167
- transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
2168
- }), R && D !== R.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
2169
- transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2170
- opacity: "0"
2171
- }) : H(o.current, {
2172
- transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2173
- opacity: "1"
2174
- }), c(n == null ? void 0 : n[Math.max(D, 0)]);
2175
- }, [
2176
- r.current,
2177
- n,
2178
- R,
2179
- s,
2180
- o,
2181
- c
2182
- ]);
2183
- p.useEffect(() => {
2184
- if (f || e) {
2185
- var b;
2186
- const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
2187
- R && j !== -1 && typeof R[j] == "number" && P(R[j]);
2188
- }
2189
- }, [
2190
- f,
2191
- e,
2192
- n,
2193
- R,
2194
- P
2195
- ]);
2196
- function g({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
2197
- if (s === void 0) return;
2198
- const K = l === "bottom" || l === "right" ? (k ?? 0) - b : (k ?? 0) + b, W = C === s - 1, x = C === 0, V = b > 0;
2199
- if (W && H(o.current, {
2200
- transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
2201
- }), !m && D > 2 && !V) {
2202
- B ? j() : P(R[0]);
2203
- return;
2204
- }
2205
- if (!m && D > 2 && V && R && n) {
2206
- P(R[n.length - 1]);
2207
- return;
2208
- }
2209
- const G = R == null ? void 0 : R.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
2210
- if (D > ua && Math.abs(b) < te * 0.4) {
2211
- const q = V ? 1 : -1;
2212
- if (q > 0 && M && n) {
2213
- P(R[n.length - 1]);
2214
- return;
2215
- }
2216
- if (x && q < 0 && B && j(), C === null) return;
2217
- P(R[C + q]);
2218
- return;
2219
- }
2220
- P(G);
2221
- }
2222
- function z({ draggedDistance: b }) {
2223
- if (k === null) return;
2224
- const j = l === "bottom" || l === "right" ? k - b : k + b;
2225
- (l === "bottom" || l === "right") && j < R[R.length - 1] || (l === "top" || l === "left") && j > R[R.length - 1] || H(r.current, {
2226
- transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
2227
- });
2228
- }
2229
- function Z(b, j) {
2230
- if (!n || typeof C != "number" || !R || s === void 0) return null;
2231
- const D = C === s - 1;
2232
- if (C >= s && j)
2233
- return 0;
2234
- if (D && !j) return 1;
2235
- if (!_ && !D) return null;
2236
- const K = D ? C + 1 : C - 1, W = D ? R[K] - R[K - 1] : R[K + 1] - R[K], x = b / Math.abs(W);
2237
- return D ? 1 - x : x;
2238
- }
2239
- return {
2240
- isLastSnapPoint: M,
2241
- activeSnapPoint: f,
2242
- shouldFade: _,
2243
- getPercentageDragged: Z,
2244
- setActiveSnapPoint: c,
2245
- activeSnapPointIndex: C,
2246
- onRelease: g,
2247
- onDrag: z,
2248
- snapPointsOffset: R
2249
- };
2250
- }
2251
- const Ml = () => () => {
2252
- };
2253
- function Rl() {
2254
- const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
2255
- function l() {
2256
- return (window.innerWidth - _t) / window.innerWidth;
2257
- }
2258
- p.useEffect(() => {
2259
- if (t && n) {
2260
- s.current && clearTimeout(s.current);
2261
- const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
2262
- if (!u) return;
2263
- xl(r && !o ? Et(document.body, {
2264
- background: "black"
2265
- }) : Ml, Et(u, {
2266
- transformOrigin: U(e) ? "top" : "left",
2267
- transitionProperty: "transform, border-radius",
2268
- transitionDuration: `${$.DURATION}s`,
2269
- transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
2270
- }));
2271
- const m = Et(u, {
2272
- borderRadius: `${da}px`,
2273
- overflow: "hidden",
2274
- ...U(e) ? {
2275
- transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
2276
- } : {
2277
- transform: `scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
2278
- }
2279
- });
2280
- return () => {
2281
- m(), s.current = window.setTimeout(() => {
2282
- i ? document.body.style.background = i : document.body.style.removeProperty("background");
2283
- }, $.DURATION * 1e3);
2284
- };
2285
- }
2286
- }, [
2287
- t,
2288
- n,
2289
- i
2290
- ]);
2291
- }
2292
- let Ye = null;
2293
- function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
2294
- const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
2295
- if (En() && Ye === null && e && !s) {
2296
- Ye = {
2297
- position: document.body.style.position,
2298
- top: document.body.style.top,
2299
- left: document.body.style.left,
2300
- height: document.body.style.height,
2301
- right: "unset"
2302
- };
2303
- const { scrollX: c, innerHeight: d } = window;
2304
- document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
2305
- top: `${-u.current}px`,
2306
- left: `${-c}px`,
2307
- right: "0px",
2308
- height: "auto"
2309
- }), window.setTimeout(() => window.requestAnimationFrame(() => {
2310
- const v = d - window.innerHeight;
2311
- v && u.current >= d && (document.body.style.top = `${-(u.current + v)}px`);
2312
- }), 300);
2313
- }
2314
- }, [
2315
- e
2316
- ]), f = p.useCallback(() => {
2317
- if (En() && Ye !== null && !s) {
2318
- const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
2319
- Object.assign(document.body.style, Ye), window.requestAnimationFrame(() => {
2320
- if (o && i !== window.location.href) {
2321
- l(window.location.href);
2322
- return;
2323
- }
2324
- window.scrollTo(d, c);
2325
- }), Ye = null;
2326
- }
2327
- }, [
2328
- i
2329
- ]);
2330
- return p.useEffect(() => {
2331
- function c() {
2332
- u.current = window.scrollY;
2333
- }
2334
- return c(), window.addEventListener("scroll", c), () => {
2335
- window.removeEventListener("scroll", c);
2336
- };
2337
- }, []), p.useEffect(() => {
2338
- if (t)
2339
- return () => {
2340
- typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
2341
- };
2342
- }, [
2343
- t,
2344
- f
2345
- ]), p.useEffect(() => {
2346
- n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && m(), t || window.setTimeout(() => {
2347
- f();
2348
- }, 500)) : f());
2349
- }, [
2350
- e,
2351
- r,
2352
- i,
2353
- t,
2354
- n,
2355
- m,
2356
- f
2357
- ]), {
2358
- restorePositionSetting: f
2359
- };
2360
- }
2361
- function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = yl, scrollLockTimeout: m = bl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: v, setActiveSnapPoint: M, fixed: C, modal: _ = !0, onClose: R, nested: k, noBodyStyles: P = !1, direction: g = "bottom", defaultOpen: z = !1, disablePreventScroll: Z = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
2362
- var x, V;
2363
- const [G = !1, te] = ha({
2364
- defaultProp: z,
2365
- prop: e,
2366
- onChange: (S) => {
2367
- t == null || t(S), !S && !k && _a(), setTimeout(() => {
2368
- B == null || B(S);
2369
- }, $.DURATION * 1e3), S && !_ && typeof window < "u" && window.requestAnimationFrame(() => {
2370
- document.body.style.pointerEvents = "auto";
2371
- }), S || (document.body.style.pointerEvents = "auto");
2372
- }
2373
- }), [q, Y] = p.useState(!1), [y, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), ke = p.useRef(null), ye = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), $e = p.useRef(0), Fe = p.useRef(!1), nn = p.useRef(!z), rn = p.useRef(0), E = p.useRef(null), an = p.useRef(((x = E.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), on = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), bt = p.useRef(0), Da = p.useCallback((S) => {
2374
- s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
2375
- }, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } = Cl({
2376
- snapPoints: s,
2377
- activeSnapPointProp: v,
2378
- setActiveSnapPointProp: M,
2379
- drawerRef: E,
2380
- fadeFromIndex: d,
2381
- overlayRef: pe,
2382
- onSnapPointChange: Da,
2383
- direction: g,
2384
- container: K,
2385
- snapToSequentialPoint: b
2386
- });
2387
- fl({
2388
- isDisabled: !G || y || !_ || ie || !q || !D || !Z
2389
- });
2390
- const { restorePositionSetting: _a } = El({
2391
- isOpen: G,
2392
- modal: _,
2393
- nested: k ?? !1,
2394
- hasBeenOpened: q,
2395
- preventScrollRestoration: j,
2396
- noBodyStyles: P
2397
- });
2398
- function lt() {
2399
- return (window.innerWidth - _t) / window.innerWidth;
2400
- }
2401
- function Oa(S) {
2402
- var T, I;
2403
- !f && !s || E.current && !E.current.contains(S.target) || (an.current = ((T = E.current) == null ? void 0 : T.getBoundingClientRect().height) || 0, on.current = ((I = E.current) == null ? void 0 : I.getBoundingClientRect().width) || 0, Q(!0), ke.current = /* @__PURE__ */ new Date(), sa() && window.addEventListener("touchend", () => Re.current = !1, {
2404
- once: !0
2405
- }), S.target.setPointerCapture(S.pointerId), $e.current = U(g) ? S.pageY : S.pageX);
2406
- }
2407
- function cn(S, T) {
2408
- var I;
2409
- let N = S;
2410
- const L = (I = window.getSelection()) == null ? void 0 : I.toString(), ne = E.current ? pt(E.current, g) : null, ee = /* @__PURE__ */ new Date();
2411
- if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
2412
- return !1;
2413
- if (g === "right" || g === "left")
2414
- return !0;
2415
- if (Me.current && ee.getTime() - Me.current.getTime() < 500)
2416
- return !1;
2417
- if (ne !== null && (g === "bottom" ? ne > 0 : ne < 0))
2418
- return !0;
2419
- if (L && L.length > 0)
2420
- return !1;
2421
- if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || T)
2422
- return le.current = ee, !1;
2423
- for (; N; ) {
2424
- if (N.scrollHeight > N.clientHeight) {
2425
- if (N.scrollTop !== 0)
2426
- return le.current = /* @__PURE__ */ new Date(), !1;
2427
- if (N.getAttribute("role") === "dialog")
2428
- return !0;
2429
- }
2430
- N = N.parentNode;
2431
- }
2432
- return !0;
2433
- }
2434
- function Ia(S) {
2435
- if (E.current && y) {
2436
- const T = g === "bottom" || g === "right" ? 1 : -1, I = ($e.current - (U(g) ? S.pageY : S.pageX)) * T, N = I > 0, L = s && !f && !N;
2437
- if (L && Le === 0) return;
2438
- const ne = Math.abs(I), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = g === "bottom" || g === "top" ? an.current : on.current;
2439
- let fe = ne / Ee;
2440
- const _e = Ta(ne, N);
2441
- if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !cn(S.target, N)) return;
2442
- if (E.current.classList.add(Dt), Re.current = !0, H(E.current, {
2443
- transition: "none"
2444
- }), H(pe.current, {
2445
- transition: "none"
2446
- }), s && Na({
2447
- draggedDistance: I
2448
- }), N && !s) {
2449
- const me = wl(I), ct = Math.min(me * -1, 0) * T;
2450
- H(E.current, {
2451
- transform: U(g) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
2452
- });
2453
- return;
2454
- }
2455
- const De = 1 - fe;
2456
- if ((ln || d && Le === d - 1) && (r == null || r(S, fe), H(pe.current, {
2457
- opacity: `${De}`,
2458
- transition: "none"
2459
- }, !0)), ee && pe.current && i) {
2460
- const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, dn = Math.max(0, 14 - fe * 14);
2461
- H(ee, {
2462
- borderRadius: `${ct}px`,
2463
- transform: U(g) ? `scale(${me}) translate3d(0, ${dn}px, 0)` : `scale(${me}) translate3d(${dn}px, 0, 0)`,
2464
- transition: "none"
2465
- }, !0);
2466
- }
2467
- if (!s) {
2468
- const me = ne * T;
2469
- H(E.current, {
2470
- transform: U(g) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
2471
- });
2472
- }
2473
- }
2474
- }
2475
- p.useEffect(() => {
2476
- window.requestAnimationFrame(() => {
2477
- nn.current = !0;
2478
- });
2479
- }, []), p.useEffect(() => {
2480
- var S;
2481
- function T() {
2482
- if (!E.current || !D) return;
2483
- const I = document.activeElement;
2484
- if (Tt(I) || Fe.current) {
2485
- var N;
2486
- const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
2487
- let ee = ne - L;
2488
- const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
2489
- bt.current || (bt.current = Ee);
2490
- const _e = E.current.getBoundingClientRect().top;
2491
- if (Math.abs(rn.current - ee) > 60 && (Fe.current = !Fe.current), s && s.length > 0 && Ve && Le) {
2492
- const De = Ve[Le] || 0;
2493
- ee += De;
2494
- }
2495
- if (rn.current = ee, Ee > L || Fe.current) {
2496
- const De = E.current.getBoundingClientRect().height;
2497
- let me = De;
2498
- De > L && (me = L - (fe ? _e : _t)), C ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
2499
- } else ol() || (E.current.style.height = `${bt.current}px`);
2500
- s && s.length > 0 && !Fe.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
2501
- }
2502
- }
2503
- return (S = window.visualViewport) == null || S.addEventListener("resize", T), () => {
2504
- var I;
2505
- return (I = window.visualViewport) == null ? void 0 : I.removeEventListener("resize", T);
2506
- };
2507
- }, [
2508
- Le,
2509
- s,
2510
- Ve
2511
- ]);
2512
- function Ge(S) {
2513
- Aa(), R == null || R(), S || te(!1), setTimeout(() => {
2514
- s && sn(s[0]);
2515
- }, $.DURATION * 1e3);
2516
- }
2517
- function un() {
2518
- if (!E.current) return;
2519
- const S = document.querySelector("[data-vaul-drawer-wrapper]"), T = pt(E.current, g);
2520
- H(E.current, {
2521
- transform: "translate3d(0, 0, 0)",
2522
- transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`
2523
- }), H(pe.current, {
2524
- transition: `opacity ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2525
- opacity: "1"
2526
- }), i && T && T > 0 && G && H(S, {
2527
- borderRadius: `${da}px`,
2528
- overflow: "hidden",
2529
- ...U(g) ? {
2530
- transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2531
- transformOrigin: "top"
2532
- } : {
2533
- transform: `scale(${lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2534
- transformOrigin: "left"
2535
- },
2536
- transitionProperty: "transform, border-radius",
2537
- transitionDuration: `${$.DURATION}s`,
2538
- transitionTimingFunction: `cubic-bezier(${$.EASE.join(",")})`
2539
- }, !0);
2540
- }
2541
- function Aa() {
2542
- !y || !E.current || (E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date());
2543
- }
2544
- function ka(S) {
2545
- if (!y || !E.current) return;
2546
- E.current.classList.remove(Dt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date();
2547
- const T = pt(E.current, g);
2548
- if (!S || !cn(S.target, !1) || !T || Number.isNaN(T) || ke.current === null) return;
2549
- const I = ye.current.getTime() - ke.current.getTime(), N = $e.current - (U(g) ? S.pageY : S.pageX), L = Math.abs(N) / I;
2550
- if (L > 0.05 && (de(!0), setTimeout(() => {
2551
- de(!1);
2552
- }, 200)), s) {
2553
- ja({
2554
- draggedDistance: N * (g === "bottom" || g === "right" ? 1 : -1),
2555
- closeDrawer: Ge,
2556
- velocity: L,
2557
- dismissible: f
2558
- }), o == null || o(S, !0);
2559
- return;
2560
- }
2561
- if (g === "bottom" || g === "right" ? N > 0 : N < 0) {
2562
- un(), o == null || o(S, !0);
2563
- return;
2564
- }
2565
- if (L > ua) {
2566
- Ge(), o == null || o(S, !1);
2567
- return;
2568
- }
2569
- var ne;
2570
- const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
2571
- var Ee;
2572
- const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = g === "left" || g === "right";
2573
- if (Math.abs(T) >= (_e ? fe : ee) * u) {
2574
- Ge(), o == null || o(S, !1);
917
+ }, tt = () => {
918
+ const t = F(), [e, r] = Q(!1), s = Be(() => r(!1), []);
919
+ _(() => {
920
+ if (e)
2575
921
  return;
922
+ function i(o) {
923
+ o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!0));
2576
924
  }
2577
- o == null || o(S, !0), un();
2578
- }
2579
- p.useEffect(() => (G && (H(document.documentElement, {
2580
- scrollBehavior: "auto"
2581
- }), Me.current = /* @__PURE__ */ new Date()), () => {
2582
- vl(document.documentElement, "scrollBehavior");
2583
- }), [
2584
- G
2585
- ]);
2586
- function $a(S) {
2587
- const T = S ? (window.innerWidth - Oe) / window.innerWidth : 1, I = S ? -Oe : 0;
2588
- re.current && window.clearTimeout(re.current), H(E.current, {
2589
- transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2590
- transform: `scale(${T}) translate3d(0, ${I}px, 0)`
2591
- }), !S && E.current && (re.current = setTimeout(() => {
2592
- const N = pt(E.current, g);
2593
- H(E.current, {
2594
- transition: "none",
2595
- transform: U(g) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
2596
- });
2597
- }, 500));
2598
- }
2599
- function Fa(S, T) {
2600
- if (T < 0) return;
2601
- const I = (window.innerWidth - Oe) / window.innerWidth, N = I + T * (1 - I), L = -Oe + T * Oe;
2602
- H(E.current, {
2603
- transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
2604
- transition: "none"
2605
- });
2606
- }
2607
- function La(S, T) {
2608
- const I = U(g) ? window.innerHeight : window.innerWidth, N = T ? (I - Oe) / I : 1, L = T ? -Oe : 0;
2609
- T && H(E.current, {
2610
- transition: `transform ${$.DURATION}s cubic-bezier(${$.EASE.join(",")})`,
2611
- transform: U(g) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
2612
- });
2613
- }
2614
- return p.useEffect(() => {
2615
- _ || window.requestAnimationFrame(() => {
2616
- document.body.style.pointerEvents = "auto";
2617
- });
2618
- }, [
2619
- _
2620
- ]), /* @__PURE__ */ p.createElement(as, {
2621
- defaultOpen: z,
2622
- onOpenChange: (S) => {
2623
- !f && !S || (S ? Y(!0) : Ge(!0), te(S));
2624
- },
2625
- open: G
2626
- }, /* @__PURE__ */ p.createElement(oa.Provider, {
2627
- value: {
2628
- activeSnapPoint: Pa,
2629
- snapPoints: s,
2630
- setActiveSnapPoint: sn,
2631
- drawerRef: E,
2632
- overlayRef: pe,
2633
- onOpenChange: t,
2634
- onPress: Oa,
2635
- onRelease: ka,
2636
- onDrag: Ia,
2637
- dismissible: f,
2638
- shouldAnimate: nn,
2639
- handleOnly: c,
2640
- isOpen: G,
2641
- isDragging: y,
2642
- shouldFade: ln,
2643
- closeDrawer: Ge,
2644
- onNestedDrag: Fa,
2645
- onNestedOpenChange: $a,
2646
- onNestedRelease: La,
2647
- keyboardIsOpen: Fe,
2648
- modal: _,
2649
- snapPointsOffset: Ve,
2650
- activeSnapPointIndex: Le,
2651
- direction: g,
2652
- shouldScaleBackground: i,
2653
- setBackgroundColorOnScale: l,
2654
- noBodyStyles: P,
2655
- container: K,
2656
- autoFocus: W
2657
- }
2658
- }, n));
2659
- }
2660
- const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
2661
- const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = la(t, n), f = r && r.length > 0;
2662
- if (!l)
2663
- return null;
2664
- const c = p.useCallback((d) => o(d), [
2665
- o
2666
- ]);
2667
- return /* @__PURE__ */ p.createElement(Jo, {
2668
- onMouseUp: c,
2669
- ref: m,
2670
- "data-vaul-overlay": "",
2671
- "data-vaul-snap-points": i && f ? "true" : "false",
2672
- "data-vaul-snap-points-overlay": i && s ? "true" : "false",
2673
- "data-vaul-animate": u != null && u.current ? "true" : "false",
2674
- ...e
2675
- });
2676
- });
2677
- ma.displayName = "Drawer.Overlay";
2678
- const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
2679
- const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: v, direction: M, snapPoints: C, container: _, handleOnly: R, shouldAnimate: k, autoFocus: P } = Qe(), [g, z] = p.useState(!1), Z = la(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = C && C.length > 0;
2680
- Rl();
2681
- const K = (x, V, G = 0) => {
2682
- if (D.current) return !0;
2683
- const te = Math.abs(x.y), q = Math.abs(x.x), Y = q > te, y = [
2684
- "bottom",
2685
- "right"
2686
- ].includes(V) ? 1 : -1;
2687
- if (V === "left" || V === "right") {
2688
- if (!(x.x * y < 0) && q >= 0 && q <= G)
2689
- return Y;
2690
- } else if (!(x.y * y < 0) && te >= 0 && te <= G)
2691
- return !Y;
2692
- return D.current = !0, !0;
2693
- };
2694
- p.useEffect(() => {
2695
- B && window.requestAnimationFrame(() => {
2696
- z(!0);
2697
- });
2698
- }, []);
2699
- function W(x) {
2700
- b.current = null, D.current = !1, l(x);
2701
- }
2702
- return /* @__PURE__ */ p.createElement(Zo, {
2703
- "data-vaul-drawer-direction": M,
2704
- "data-vaul-drawer": "",
2705
- "data-vaul-delayed-snap-points": g ? "true" : "false",
2706
- "data-vaul-snap-points": v && B ? "true" : "false",
2707
- "data-vaul-custom-container": _ ? "true" : "false",
2708
- "data-vaul-animate": k != null && k.current ? "true" : "false",
2709
- ...r,
2710
- ref: Z,
2711
- style: f && f.length > 0 ? {
2712
- "--snap-point-height": `${f[c ?? 0]}px`,
2713
- ...t
2714
- } : t,
2715
- onPointerDown: (x) => {
2716
- R || (r.onPointerDown == null || r.onPointerDown.call(r, x), b.current = {
2717
- x: x.pageX,
2718
- y: x.pageY
2719
- }, i(x));
2720
- },
2721
- onOpenAutoFocus: (x) => {
2722
- n == null || n(x), P || x.preventDefault();
2723
- },
2724
- onPointerDownOutside: (x) => {
2725
- if (e == null || e(x), !d || x.defaultPrevented) {
2726
- x.preventDefault();
2727
- return;
2728
- }
2729
- m.current && (m.current = !1);
2730
- },
2731
- onFocusOutside: (x) => {
2732
- if (!d) {
2733
- x.preventDefault();
2734
- return;
2735
- }
2736
- },
2737
- onPointerMove: (x) => {
2738
- if (j.current = x, R || (r.onPointerMove == null || r.onPointerMove.call(r, x), !b.current)) return;
2739
- const V = x.pageY - b.current.y, G = x.pageX - b.current.x, te = x.pointerType === "touch" ? 10 : 2;
2740
- K({
2741
- x: G,
2742
- y: V
2743
- }, M, te) ? u(x) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
2744
- },
2745
- onPointerUp: (x) => {
2746
- r.onPointerUp == null || r.onPointerUp.call(r, x), b.current = null, D.current = !1, l(x);
2747
- },
2748
- onPointerOut: (x) => {
2749
- r.onPointerOut == null || r.onPointerOut.call(r, x), W(j.current);
2750
- },
2751
- onContextMenu: (x) => {
2752
- r.onContextMenu == null || r.onContextMenu.call(r, x), j.current && W(j.current);
2753
- }
2754
- });
2755
- });
2756
- ga.displayName = "Drawer.Content";
2757
- const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
2758
- const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: v } = Qe(), M = p.useRef(null), C = p.useRef(!1);
2759
- function _() {
2760
- if (C.current) {
2761
- P();
2762
- return;
2763
- }
2764
- window.setTimeout(() => {
2765
- R();
2766
- }, Pl);
2767
- }
2768
- function R() {
2769
- if (s || e || C.current) {
2770
- P();
2771
- return;
2772
- }
2773
- if (P(), !i || i.length === 0) {
2774
- m || o();
2775
- return;
2776
- }
2777
- if (l === i[i.length - 1] && m) {
2778
- o();
2779
- return;
2780
- }
2781
- const z = i.findIndex((b) => b === l);
2782
- if (z === -1) return;
2783
- const Z = i[z + 1];
2784
- u(Z);
2785
- }
2786
- function k() {
2787
- M.current = window.setTimeout(() => {
2788
- C.current = !0;
2789
- }, Dl);
2790
- }
2791
- function P() {
2792
- M.current && window.clearTimeout(M.current), C.current = !1;
2793
- }
2794
- return /* @__PURE__ */ p.createElement("div", {
2795
- onClick: _,
2796
- onPointerCancel: P,
2797
- onPointerDown: (g) => {
2798
- f && d(g), k();
2799
- },
2800
- onPointerMove: (g) => {
2801
- f && v(g);
2802
- },
2803
- // onPointerUp is already handled by the content component
2804
- ref: r,
2805
- "data-vaul-drawer-visible": c ? "true" : "false",
2806
- "data-vaul-handle": "",
2807
- "aria-hidden": "true",
2808
- ...n
2809
- }, /* @__PURE__ */ p.createElement("span", {
2810
- "data-vaul-handle-hitarea": "",
2811
- "aria-hidden": "true"
2812
- }, t));
2813
- });
2814
- va.displayName = "Drawer.Handle";
2815
- function jl({ onDrag: e, onOpenChange: t, ...n }) {
2816
- const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
2817
- if (!r)
2818
- throw new Error("Drawer.NestedRoot must be placed in another drawer");
2819
- return /* @__PURE__ */ p.createElement(pa, {
2820
- nested: !0,
2821
- onClose: () => {
2822
- o(!1);
2823
- },
2824
- onDrag: (i, l) => {
2825
- r(i, l), e == null || e(i, l);
2826
- },
2827
- onOpenChange: (i) => {
2828
- i && o(i);
2829
- },
2830
- onRelease: s,
2831
- ...n
2832
- });
2833
- }
2834
- function Nl(e) {
2835
- const t = Qe(), { container: n = t.container, ...r } = e;
2836
- return /* @__PURE__ */ p.createElement(os, {
2837
- container: n,
2838
- ...r
2839
- });
2840
- }
2841
- const he = {
2842
- Root: pa,
2843
- NestedRoot: jl,
2844
- Content: ga,
2845
- Overlay: ma,
2846
- Trigger: es,
2847
- Portal: Nl,
2848
- Handle: va,
2849
- Close: ts,
2850
- Title: ns,
2851
- Description: rs
2852
- }, Zt = ({
2853
- shouldScaleBackground: e = !0,
2854
- ...t
2855
- }) => /* @__PURE__ */ a.jsx(
2856
- he.Root,
2857
- {
2858
- shouldScaleBackground: e,
2859
- ...t
2860
- }
2861
- );
2862
- Zt.displayName = "Drawer";
2863
- const wa = he.Trigger, Tl = he.Portal, _l = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2864
- he.Overlay,
2865
- {
2866
- ref: n,
2867
- className: O("fixed inset-0 z-50 bg-black/80", e),
2868
- ...t
2869
- }
2870
- ));
2871
- xa.displayName = he.Overlay.displayName;
2872
- const en = h.forwardRef(
2873
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Tl, { children: [
2874
- /* @__PURE__ */ a.jsx(xa, {}),
2875
- /* @__PURE__ */ a.jsxs(
2876
- he.Content,
2877
- {
2878
- ref: o,
2879
- className: O(
2880
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2881
- e
2882
- ),
2883
- ...r,
2884
- children: [
2885
- !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2886
- t
2887
- ]
2888
- }
2889
- )
2890
- ] })
2891
- );
2892
- en.displayName = "DrawerContent";
2893
- const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2894
- he.Title,
2895
- {
2896
- ref: n,
2897
- className: O(
2898
- "text-lg font-semibold leading-none tracking-tight",
2899
- e
2900
- ),
2901
- ...t
2902
- }
2903
- ));
2904
- tn.displayName = he.Title.displayName;
2905
- const Ol = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2906
- he.Description,
2907
- {
2908
- ref: n,
2909
- className: O("text-sm text-muted-foreground", e),
2910
- ...t
2911
- }
2912
- ));
2913
- Ol.displayName = he.Description.displayName;
2914
- const ya = () => {
2915
- const e = qe(), [t, n] = Ie(!1), r = qn(() => n(!1), []);
2916
- Ce(() => {
2917
- if (t)
2918
- return;
2919
- function s(i) {
2920
- i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
2921
- }
2922
- return window.addEventListener("keydown", s), () => {
2923
- window.removeEventListener("keydown", s);
925
+ return window.addEventListener("keydown", i), () => {
926
+ window.removeEventListener("keydown", i);
2924
927
  };
2925
- }, [t, n]);
2926
- const o = e.plugins.find(As);
2927
- return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
928
+ }, [e, r]);
929
+ const n = t.plugins.find(Kr);
930
+ return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2928
931
  /* @__PURE__ */ a.jsxs(
2929
932
  "button",
2930
933
  {
2931
934
  type: "button",
2932
- onClick: () => n(!0),
935
+ onClick: () => r(!0),
2933
936
  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",
2934
937
  children: [
2935
938
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
2936
- /* @__PURE__ */ a.jsx(Ko, { size: 14 }),
939
+ /* @__PURE__ */ a.jsx(Xt, { size: 14 }),
2937
940
  "Search"
2938
941
  ] }),
2939
942
  /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
2940
943
  ]
2941
944
  }
2942
945
  ),
2943
- /* @__PURE__ */ a.jsx(Qn, { fallback: null, children: o.renderSearch({
2944
- isOpen: t,
2945
- onClose: r
946
+ /* @__PURE__ */ a.jsx(de, { fallback: null, children: n.renderSearch({
947
+ isOpen: e,
948
+ onClose: s
2946
949
  }) })
2947
950
  ] }) : null;
2948
- }, Il = () => {
2949
- const { topNavigation: e } = qe();
2950
- return /* @__PURE__ */ a.jsxs(Zt, { direction: "right", children: [
2951
- /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(wa, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(qo, { size: 22 }) }) }),
951
+ }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Jr = () => {
952
+ const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
953
+ return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(de, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(Gr, { ...r }) }, r.id)) }) }) });
954
+ }, Gr = ({ id: t, label: e, default: r }) => {
955
+ var c;
956
+ const { sidebars: s } = F(), n = Ke(), i = s[t], o = r ?? (i ? Lt(i, (m) => {
957
+ if (m.type === "doc") return L(m.id);
958
+ }) : L(t));
959
+ if (!o)
960
+ throw new Error(
961
+ `No links found in top navigation for top navigation '${t}'. Check that the sidebar isn't empty or that a default link set.`
962
+ );
963
+ const u = ((c = n.data.topNavItem) == null ? void 0 : c.id) === t;
964
+ return /* @__PURE__ */ a.jsx(
965
+ te,
966
+ {
967
+ className: Ue(
968
+ "block py-3.5 font-medium -mb-px border-b-2",
969
+ u ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
970
+ ),
971
+ to: o,
972
+ children: e
973
+ }
974
+ );
975
+ }, ea = () => {
976
+ const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
977
+ return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
978
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Zt, { size: 22 }) }) }),
2952
979
  /* @__PURE__ */ a.jsxs(
2953
- en,
980
+ Ye,
2954
981
  {
2955
- className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
982
+ className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
2956
983
  "aria-describedby": void 0,
2957
984
  children: [
2958
- /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Navigation" }) }),
2959
- /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ya, {}) }),
2960
- /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2961
- Ze,
985
+ /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
986
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
987
+ /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
988
+ G,
2962
989
  {
2963
- className: ({ isActive: n }) => Un(
990
+ className: ({ isActive: s }) => Ue(
2964
991
  "block font-medium border-b-2",
2965
- n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
992
+ s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2966
993
  ),
2967
- to: t.id,
2968
- children: /* @__PURE__ */ a.jsx(_l, { children: t.label })
994
+ to: r.id,
995
+ children: /* @__PURE__ */ a.jsx(gr, { children: r.label })
2969
996
  }
2970
- ) }, t.label)) })
997
+ ) }, r.label)) })
2971
998
  ]
2972
999
  }
2973
1000
  )
2974
1001
  ] });
2975
- }, Al = () => {
2976
- const { topNavigation: e } = qe();
2977
- return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2978
- Ze,
2979
- {
2980
- className: ({ isActive: n }) => Un(
2981
- "block py-3.5 font-medium -mb-px border-b-2",
2982
- n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2983
- ),
2984
- to: t.id,
2985
- children: t.label
2986
- }
2987
- ) }, t.label)) }) });
2988
- }, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(el, { children: [
2989
- /* @__PURE__ */ a.jsx(Zr, { children: e.label }),
2990
- /* @__PURE__ */ a.jsx(Zi, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
1002
+ }, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(lr, { children: [
1003
+ /* @__PURE__ */ a.jsx(cr, { children: t.label }),
1004
+ /* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx(dr, { children: t.children.map((e, r) => (
2991
1005
  // eslint-disable-next-line react/no-array-index-key
2992
- /* @__PURE__ */ a.jsx(ba, { item: t }, n)
1006
+ /* @__PURE__ */ a.jsx(at, { item: e }, r)
2993
1007
  )) }) })
2994
- ] }, e.label) : /* @__PURE__ */ a.jsx(At, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(na, { children: e.label }, e.label) }), Sa = Vn(function() {
2995
- const t = pn(), [n, r] = po(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = pn(), l = qe(), { page: u, plugins: m } = l, f = m.filter((d) => Os(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(ba, { item: d }, d.label)), c = n ? Qo : Vo;
1008
+ ] }, t.label) : /* @__PURE__ */ a.jsx(te, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(hr, { children: t.label }, t.label) }), st = He(function() {
1009
+ const e = ee(), [r, s] = $t(), { isAuthenticated: n, profile: i, isAuthEnabled: o } = ee(), u = F(), { page: c, plugins: m } = u, j = m.filter((p) => zr(p)).flatMap((p) => p.getProfileMenuItems(u)).map((p) => /* @__PURE__ */ a.jsx(at, { item: p }, p.label)), N = r ? Jt : Gt;
2996
1010
  return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2997
- /* @__PURE__ */ a.jsx(rl, {}),
1011
+ /* @__PURE__ */ a.jsx(Zr, {}),
2998
1012
  /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
2999
1013
  /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
3000
- /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(At, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
3001
- (u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1014
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(te, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1015
+ (c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3002
1016
  /* @__PURE__ */ a.jsx(
3003
1017
  "img",
3004
1018
  {
3005
- src: u.logo.src.light,
3006
- alt: u.logo.alt ?? u.pageTitle,
3007
- style: { width: u.logo.width },
3008
- className: O("h-10", n && "hidden"),
1019
+ src: /https?:\/\//.test(c.logo.src.light) ? c.logo.src.light : L(
1020
+ "/",
1021
+ c.logo.src.light
1022
+ ),
1023
+ alt: c.logo.alt ?? c.pageTitle,
1024
+ style: { width: c.logo.width },
1025
+ className: A("h-10", r && "hidden"),
3009
1026
  loading: "lazy"
3010
1027
  }
3011
1028
  ),
3012
1029
  /* @__PURE__ */ a.jsx(
3013
1030
  "img",
3014
1031
  {
3015
- src: u.logo.src.dark,
3016
- alt: u.logo.alt ?? u.pageTitle,
3017
- style: { width: u.logo.width },
3018
- className: O("h-10", !n && "hidden"),
1032
+ src: /https?:\/\//.test(c.logo.src.dark) ? c.logo.src.dark : L(
1033
+ "/",
1034
+ c.logo.src.dark
1035
+ ),
1036
+ alt: c.logo.alt ?? c.pageTitle,
1037
+ style: { width: c.logo.width },
1038
+ className: A("h-10", !r && "hidden"),
3019
1039
  loading: "lazy"
3020
1040
  }
3021
1041
  )
3022
1042
  ] }),
3023
- /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
1043
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.pageTitle })
3024
1044
  ] }) }) }),
3025
1045
  /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
3026
- /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ya, {}) }),
3027
- /* @__PURE__ */ a.jsx(Il, {}),
1046
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
1047
+ /* @__PURE__ */ a.jsx(ea, {}),
3028
1048
  /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
3029
- /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-start" }),
3030
- i && !o ? /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(Xi, { modal: !1, children: [
3031
- /* @__PURE__ */ a.jsx(Ji, { asChild: !0, children: /* @__PURE__ */ a.jsx(Pt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
3032
- /* @__PURE__ */ a.jsxs(ta, { className: "w-56", children: [
3033
- /* @__PURE__ */ a.jsx(ra, { children: "My Account" }),
3034
- /* @__PURE__ */ a.jsx(aa, {}),
3035
- f
1049
+ /* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
1050
+ o && !n ? /* @__PURE__ */ a.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : j.length > 0 && /* @__PURE__ */ a.jsxs(ar, { modal: !1, children: [
1051
+ /* @__PURE__ */ a.jsx(sr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ie, { variant: "ghost", children: i != null && i.email ? `${i.email}` : "My Account" }) }),
1052
+ /* @__PURE__ */ a.jsxs(nr, { className: "w-56", children: [
1053
+ /* @__PURE__ */ a.jsx(ir, { children: "My Account" }),
1054
+ /* @__PURE__ */ a.jsx(or, {}),
1055
+ j
3036
1056
  ] })
3037
1057
  ] }),
3038
1058
  /* @__PURE__ */ a.jsx(
3039
1059
  "button",
3040
1060
  {
3041
1061
  type: "button",
3042
- "aria-label": n ? "Switch to light mode" : "Switch to dark mode",
1062
+ "aria-label": r ? "Switch to light mode" : "Switch to dark mode",
3043
1063
  className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
3044
- onClick: r,
3045
- children: /* @__PURE__ */ a.jsx(c, { size: 18 })
1064
+ onClick: s,
1065
+ children: /* @__PURE__ */ a.jsx(N, { size: 18 })
3046
1066
  }
3047
1067
  ),
3048
- /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-end" })
1068
+ /* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
3049
1069
  ] })
3050
1070
  ] })
3051
1071
  ] }),
3052
- /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-before" }),
3053
- /* @__PURE__ */ a.jsx(Al, {}),
3054
- /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-after" })
1072
+ /* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
1073
+ /* @__PURE__ */ a.jsx(Jr, {}),
1074
+ /* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
3055
1075
  ] })
3056
1076
  ] });
3057
- }), Ca = {
3058
- Header: Sa
3059
- }, kl = Kn(Ca), $l = kl.Provider, Fl = (e) => {
3060
- const [t, n] = Ie(!1);
3061
- Ce(() => {
3062
- const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
3063
- n(l);
3064
- }, [t]);
3065
- const r = qn(() => {
3066
- const s = !t;
3067
- document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
3068
- }, [t]), o = [t, r];
3069
- return /* @__PURE__ */ a.jsx(mo.Provider, { value: o, ...e });
3070
- }, Ll = ({
3071
- children: e,
3072
- context: t
3073
- }) => ($o({
3074
- queryFn: async () => (await t.initialize(), !0),
1077
+ }), nt = {
1078
+ Header: st
1079
+ }, ta = Le(nt), ra = ta.Provider, aa = (t) => {
1080
+ const [e, r] = Q(!1);
1081
+ _(() => {
1082
+ const i = localStorage.getItem("theme"), o = window.matchMedia("(prefers-color-scheme: dark)"), u = i === "dark" || !i && o.matches;
1083
+ r(u);
1084
+ }, [e]);
1085
+ const s = Be(() => {
1086
+ const i = !e;
1087
+ document.documentElement.classList.toggle("dark", i), localStorage.setItem("theme", i ? "dark" : "light"), r(i);
1088
+ }, [e]), n = [e, s];
1089
+ return /* @__PURE__ */ a.jsx(Ut.Provider, { value: n, ...t });
1090
+ }, sa = ({
1091
+ children: t,
1092
+ context: e
1093
+ }) => (Bt({
1094
+ queryFn: async () => (await e.initialize(), !0),
3075
1095
  queryKey: ["zudoku-initialize"]
3076
- }), /* @__PURE__ */ a.jsx(Fo.Provider, { value: t, children: e })), Bl = ({
3077
- children: e,
3078
- ...t
1096
+ }), /* @__PURE__ */ a.jsx(Ht.Provider, { value: e, children: t })), na = ({
1097
+ children: t,
1098
+ ...e
3079
1099
  }) => {
3080
- var c, d;
3081
- const n = mt(
3082
- () => ({ ...Ca, ...t.overrides }),
3083
- [t.overrides]
3084
- ), r = mt(() => {
3085
- var M;
1100
+ var N, p;
1101
+ const r = re(
1102
+ () => ({ ...nt, ...e.overrides }),
1103
+ [e.overrides]
1104
+ ), s = re(() => {
1105
+ var h;
3086
1106
  return {
3087
- ...(t.plugins ?? []).filter(Fs).flatMap(
3088
- (C) => C.getMdxComponents ? [C.getMdxComponents()] : []
3089
- ).reduce((C, _) => ({ ...C, ..._ }), {}),
3090
- ...go,
3091
- ...(M = t.mdx) == null ? void 0 : M.components
1107
+ ...(e.plugins ?? []).filter(Vr).flatMap(
1108
+ (f) => f.getMdxComponents ? [f.getMdxComponents()] : []
1109
+ ).reduce((f, B) => ({ ...f, ...B }), {}),
1110
+ ...Vt,
1111
+ ...(h = e.mdx) == null ? void 0 : h.components
3092
1112
  };
3093
- }, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Co(jt), [s, i] = Ie(!1), l = mt(
3094
- () => s ? { stagger: !0 } : { stagger: o },
3095
- [o, s]
3096
- ), u = Wa();
3097
- Ce(() => {
3098
- s || i(!0);
3099
- }, [s, u.location]);
3100
- const [m] = Ie(() => new Bs(t)), f = (d = t.plugins) == null ? void 0 : d.filter($s).map((v, M) => {
3101
- var C;
3102
- return /* @__PURE__ */ a.jsx(Mo, { children: (C = v.getHead) == null ? void 0 : C.call(v) }, M);
1113
+ }, [(N = e.mdx) == null ? void 0 : N.components, e.plugins]), { stagger: n } = Et(oe), [i, o] = Q(!1), u = re(
1114
+ () => i ? { stagger: !0 } : { stagger: n },
1115
+ [n, i]
1116
+ ), c = xt();
1117
+ _(() => {
1118
+ i || o(!0);
1119
+ }, [i, c.location]);
1120
+ const [m] = Q(() => new Yr(e)), j = (p = e.plugins) == null ? void 0 : p.filter(Ur).map((P, h) => {
1121
+ var f;
1122
+ return /* @__PURE__ */ a.jsx(kt, { children: (f = P.getHead) == null ? void 0 : f.call(P) }, h);
3103
1123
  });
3104
- return /* @__PURE__ */ a.jsxs(Lo, { client: nr, children: [
3105
- /* @__PURE__ */ a.jsx(It, { children: f }),
3106
- /* @__PURE__ */ a.jsx(jt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Ll, { context: m, children: /* @__PURE__ */ a.jsx(Ua, { components: r, children: /* @__PURE__ */ a.jsx(Fl, { children: /* @__PURE__ */ a.jsx($l, { value: n, children: /* @__PURE__ */ a.jsx(Xa, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(vo, { children: e ?? /* @__PURE__ */ a.jsx(In, {}) }) }) }) }) }) }) })
1124
+ return /* @__PURE__ */ a.jsxs(zt, { client: et, children: [
1125
+ /* @__PURE__ */ a.jsx(ce, { children: j }),
1126
+ /* @__PURE__ */ a.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ a.jsx(sa, { context: m, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(aa, { children: /* @__PURE__ */ a.jsx(ra, { value: r, children: /* @__PURE__ */ a.jsx(wt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Wt, { children: t ?? /* @__PURE__ */ a.jsx(_e, {}) }) }) }) }) }) }) })
3107
1127
  ] });
3108
- }, Hl = Vn(Bl), Ma = (e) => /* @__PURE__ */ a.jsx(Ts, { FallbackComponent: Hs, children: /* @__PURE__ */ a.jsx(Hl, { ...e }) });
3109
- Ma.displayName = "DevPortal";
3110
- const Ul = ({
3111
- category: e,
3112
- level: t
1128
+ }, ia = He(na), pe = (t) => /* @__PURE__ */ a.jsx(Br, { FallbackComponent: Xr, children: /* @__PURE__ */ a.jsx(ia, { ...t }) });
1129
+ pe.displayName = "DevPortal";
1130
+ const oa = ({
1131
+ category: t,
1132
+ level: e
3113
1133
  }) => {
3114
- var d;
3115
- const n = Yn(), r = za(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u);
3116
- Ce(() => {
3117
- r && f(!0);
1134
+ var p, P;
1135
+ const r = qt(t), [s, n] = Q(!1), i = t.collapsible ?? !0, o = t.collapsed ?? !0, u = !!(!i || !o || r), [c, m] = Q(u), j = bt(((p = t.link) == null ? void 0 : p.id) ?? "");
1136
+ _(() => {
1137
+ r && m(!0);
3118
1138
  }, [r]);
3119
- const c = i && /* @__PURE__ */ a.jsx(
1139
+ const N = i && /* @__PURE__ */ a.jsx(
3120
1140
  "button",
3121
1141
  {
3122
1142
  type: "button",
3123
- onClick: (v) => {
3124
- v.preventDefault(), f((M) => !M), s(!0);
1143
+ onClick: (h) => {
1144
+ h.preventDefault(), m((f) => !f), n(!0);
3125
1145
  },
3126
1146
  children: /* @__PURE__ */ a.jsx(
3127
- Xn,
1147
+ er,
3128
1148
  {
3129
1149
  size: 16,
3130
- className: O(
3131
- o && "transition",
1150
+ className: A(
1151
+ s && "transition",
3132
1152
  "shrink-0 group-data-[state=open]:rotate-90"
3133
1153
  )
3134
1154
  }
@@ -3136,83 +1156,92 @@ const Ul = ({
3136
1156
  }
3137
1157
  );
3138
1158
  return /* @__PURE__ */ a.jsxs(
3139
- Do,
1159
+ se.Root,
3140
1160
  {
3141
- className: O("flex flex-col", t === 0 && "-mx-[--padding-nav-item]"),
1161
+ className: "flex flex-col",
3142
1162
  defaultOpen: u,
3143
- open: m,
3144
- onOpenChange: () => f(!0),
1163
+ open: c,
1164
+ onOpenChange: () => m(!0),
3145
1165
  children: [
3146
- /* @__PURE__ */ a.jsx(Po, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
1166
+ /* @__PURE__ */ a.jsx(se.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
3147
1167
  "div",
3148
1168
  {
3149
- className: O(
3150
- "text-start",
3151
- Je({ isActive: !1, isTopLevel: t === 0 }),
3152
- i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
3153
- ),
1169
+ onClick: () => n(!0),
1170
+ className: U({
1171
+ isActive: !1,
1172
+ isTopLevel: e === 0,
1173
+ className: [
1174
+ "text-start",
1175
+ i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
1176
+ ]
1177
+ }),
3154
1178
  children: [
3155
- e.icon && /* @__PURE__ */ a.jsx(
3156
- e.icon,
1179
+ t.icon && /* @__PURE__ */ a.jsx(
1180
+ t.icon,
3157
1181
  {
3158
1182
  size: 16,
3159
- className: "align-[-0.125em] -translate-x-1"
1183
+ className: A(
1184
+ "align-[-0.125em] -translate-x-1",
1185
+ j && "text-primary"
1186
+ )
3160
1187
  }
3161
1188
  ),
3162
- ((d = e.link) == null ? void 0 : d.type) === "doc" ? /* @__PURE__ */ a.jsx(
3163
- Ze,
1189
+ ((P = t.link) == null ? void 0 : P.type) === "doc" ? /* @__PURE__ */ a.jsx(
1190
+ G,
3164
1191
  {
3165
- to: Ht(n == null ? void 0 : n.id, e.link.id),
1192
+ to: L(t.link.id),
3166
1193
  className: "flex-1",
3167
- onClick: () => s(!0),
3168
- children: ({ isActive: v }) => /* @__PURE__ */ a.jsxs(
1194
+ onClick: () => {
1195
+ j && !c && m(!0);
1196
+ },
1197
+ children: /* @__PURE__ */ a.jsxs(
3169
1198
  "div",
3170
1199
  {
3171
- className: O(
1200
+ className: A(
3172
1201
  "flex items-center gap-2 justify-between w-full",
3173
- v ? "text-primary font-medium" : "text-foreground/80"
1202
+ j ? "text-primary" : "text-foreground/80"
3174
1203
  ),
3175
1204
  children: [
3176
- /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
3177
- c
1205
+ /* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
1206
+ N
3178
1207
  ]
3179
1208
  }
3180
1209
  )
3181
1210
  }
3182
1211
  ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
3183
- /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
3184
- c
1212
+ /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
1213
+ N
3185
1214
  ] })
3186
1215
  ]
3187
1216
  }
3188
1217
  ) }),
3189
1218
  /* @__PURE__ */ a.jsx(
3190
- jo,
1219
+ se.Content,
3191
1220
  {
3192
- className: O(
1221
+ className: A(
3193
1222
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
3194
- o && "CollapsibleContent",
3195
- "ms-[calc(var(--padding-nav-item)*1.125)]"
1223
+ s && "CollapsibleContent"
3196
1224
  ),
3197
- children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
3198
- Ot,
1225
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((h) => /* @__PURE__ */ a.jsx(
1226
+ le,
3199
1227
  {
3200
- level: t + 1,
3201
- item: v
1228
+ level: e + 1,
1229
+ item: h
3202
1230
  },
3203
- ("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
1231
+ ("id" in h ? h.id : "") + ("href" in h ? h.href : "") + h.label
3204
1232
  )) })
3205
1233
  }
3206
1234
  )
3207
1235
  ]
3208
1236
  }
3209
1237
  );
3210
- }, Je = wo(
1238
+ }, U = fr(
3211
1239
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
3212
1240
  {
3213
1241
  variants: {
3214
1242
  isTopLevel: {
3215
- true: "font-semibold"
1243
+ true: "font-medium -mx-[--padding-nav-item]",
1244
+ false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
3216
1245
  },
3217
1246
  isActive: {
3218
1247
  true: "text-primary font-medium",
@@ -3222,178 +1251,176 @@ const Ul = ({
3222
1251
  true: "text-foreground/30",
3223
1252
  false: ""
3224
1253
  }
1254
+ },
1255
+ defaultVariants: {
1256
+ isActive: !1
3225
1257
  }
3226
1258
  }
3227
- ), Ra = "data-anchor", Ot = ({
3228
- item: e,
3229
- level: t = 0
1259
+ ), it = "data-anchor", le = ({
1260
+ item: t,
1261
+ level: e = 0
3230
1262
  }) => {
3231
- const n = Yn(), { activeAnchor: r } = Ft(), [o] = Ya();
3232
- switch (e.type) {
1263
+ var n, i;
1264
+ const { activeAnchor: r } = ge(), [s] = yt();
1265
+ switch (t.type) {
3233
1266
  case "category":
3234
- return /* @__PURE__ */ a.jsx(Ul, { category: e, level: t });
1267
+ return /* @__PURE__ */ a.jsx(oa, { category: t, level: e });
3235
1268
  case "doc":
3236
1269
  return /* @__PURE__ */ a.jsxs(
3237
- Ze,
1270
+ G,
3238
1271
  {
3239
- className: ({ isActive: s }) => Je({ isActive: s, isTopLevel: t === 0 }),
3240
- to: Ht(n == null ? void 0 : n.id, e.id),
1272
+ className: ({ isActive: o }) => U({ isActive: o, isTopLevel: e === 0 }),
1273
+ to: L(t.id),
3241
1274
  children: [
3242
- e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3243
- e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3244
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3245
- /* @__PURE__ */ a.jsx(St, { ...e.badge })
3246
- ] }) : e.label
1275
+ t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
1276
+ t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1277
+ /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
1278
+ /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1279
+ ] }) : t.label
3247
1280
  ]
3248
1281
  }
3249
1282
  );
3250
1283
  case "link":
3251
- return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
3252
- Ka,
1284
+ return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1285
+ ft,
3253
1286
  {
3254
- to: { hash: e.href, search: o.toString() },
3255
- [Ra]: e.href.slice(1),
3256
- className: O(
3257
- "flex gap-2.5 justify-between",
3258
- t === 0 && "-mx-[--padding-nav-item]",
3259
- Je({
3260
- isActive: e.href.slice(1) === r
3261
- })
3262
- ),
3263
- children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3264
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3265
- /* @__PURE__ */ a.jsx(St, { ...e.badge })
3266
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1287
+ to: { hash: t.href, search: s.toString() },
1288
+ [it]: t.href.slice(1),
1289
+ className: U({
1290
+ isActive: t.href.slice(1) === r,
1291
+ isTopLevel: e === 0,
1292
+ className: ((n = t.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
1293
+ }),
1294
+ children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1295
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1296
+ /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1297
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
3267
1298
  }
3268
- ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1299
+ ) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
3269
1300
  "a",
3270
1301
  {
3271
- className: O(
3272
- Je({ isTopLevel: t === 0 }),
3273
- "block"
3274
- ),
3275
- href: e.href,
1302
+ className: U({ isTopLevel: e === 0 }),
1303
+ href: t.href,
3276
1304
  target: "_blank",
3277
1305
  rel: "noopener noreferrer",
3278
1306
  children: [
3279
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
3280
- /* @__PURE__ */ a.jsxs("span", { className: "whitespace-nowrap", children: [
3281
- " ",
3282
- /* @__PURE__ */ a.jsx(Go, { className: "inline ml-1", size: 12 })
3283
- ] })
1307
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
1308
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(tr, { className: "inline -translate-y-0.5", size: 12 }) })
3284
1309
  ]
3285
1310
  }
3286
1311
  ) : /* @__PURE__ */ a.jsx(
3287
- Ze,
1312
+ G,
3288
1313
  {
3289
- className: O("flex gap-2.5 justify-between", Je()),
3290
- to: e.href,
3291
- children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3292
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3293
- /* @__PURE__ */ a.jsx(St, { ...e.badge })
3294
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1314
+ className: U({
1315
+ className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
1316
+ }),
1317
+ to: t.href,
1318
+ children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1319
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1320
+ /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1321
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
3295
1322
  }
3296
1323
  );
3297
1324
  }
3298
- }, zl = (e, t = { block: "center" }) => {
3299
- if (!e) return;
3300
- const n = e.getBoundingClientRect();
3301
- n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
3302
- }, Kl = () => {
3303
- const e = kt(), { setActiveAnchor: t } = Ft();
3304
- Ce(() => {
3305
- if (!e.hash) return;
3306
- const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
3307
- const o = document.getElementById(n), s = document.querySelector(`[${Ra}="${n}"]`);
3308
- return o ? (o.scrollIntoView(), zl(s), requestIdleCallback(() => t(n)), !0) : !1;
1325
+ }, la = (t, e = { block: "center" }) => {
1326
+ if (!t) return;
1327
+ const r = t.getBoundingClientRect();
1328
+ r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
1329
+ }, ca = () => {
1330
+ const t = ue(), { setActiveAnchor: e } = ge();
1331
+ _(() => {
1332
+ if (!t.hash) return;
1333
+ const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
1334
+ const n = document.getElementById(r), i = document.querySelector(`[${it}="${r}"]`);
1335
+ return n ? (n.scrollIntoView(), la(i), requestIdleCallback(() => e(r)), !0) : !1;
3309
1336
  };
3310
- if (!r()) {
3311
- const o = new MutationObserver((s, i) => {
3312
- r() && i.disconnect();
1337
+ if (!s()) {
1338
+ const n = new MutationObserver((i, o) => {
1339
+ s() && o.disconnect();
3313
1340
  });
3314
- return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
1341
+ return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
3315
1342
  }
3316
- }, [e.hash, t]);
3317
- }, ql = () => {
3318
- const e = kt(), t = Lt(e.pathname);
3319
- Ce(() => {
3320
- t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
3321
- }, [e.pathname]);
3322
- }, Ea = Ro(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
1343
+ }, [t.hash, e]);
1344
+ }, ua = () => {
1345
+ const t = ue(), e = he(t.pathname);
1346
+ _(() => {
1347
+ e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
1348
+ }, [t.pathname]);
1349
+ }, ot = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
3323
1350
  "nav",
3324
1351
  {
3325
- "data-navigation": String(n),
3326
- className: O(
1352
+ "data-navigation": String(r),
1353
+ className: A(
3327
1354
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
3328
1355
  "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
3329
1356
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
3330
- t
1357
+ e
3331
1358
  ),
3332
- ref: r,
3333
- children: e
1359
+ ref: s,
1360
+ children: t
3334
1361
  }
3335
1362
  ));
3336
- Ea.displayName = "SidebarWrapper";
3337
- const Ql = () => {
3338
- const e = Lt(null), t = Bo();
1363
+ ot.displayName = "SidebarWrapper";
1364
+ const da = () => {
1365
+ const t = he(null), e = Ke();
3339
1366
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3340
1367
  /* @__PURE__ */ a.jsxs(
3341
- Ea,
1368
+ ot,
3342
1369
  {
3343
- ref: e,
3344
- pushMainContent: t.data.items.length > 0,
1370
+ ref: t,
1371
+ pushMainContent: e.data.sidebar.length > 0,
3345
1372
  children: [
3346
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-navigation" }),
3347
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label)),
3348
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-navigation" })
1373
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
1374
+ e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label)),
1375
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
3349
1376
  ]
3350
1377
  }
3351
1378
  ),
3352
1379
  /* @__PURE__ */ a.jsxs(
3353
- en,
1380
+ Ye,
3354
1381
  {
3355
- className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
1382
+ className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
3356
1383
  "aria-describedby": void 0,
3357
1384
  children: [
3358
- /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Sidebar" }) }),
3359
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(Ot, { item: n }, n.label))
1385
+ /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
1386
+ e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label))
3360
1387
  ]
3361
1388
  }
3362
1389
  )
3363
1390
  ] });
3364
- }, Vl = ({ children: e }) => {
3365
- const t = kt(), { setActiveAnchor: n } = Ft(), { meta: r, authentication: o } = qe();
3366
- Kl(), ql();
3367
- const s = Lt(t.pathname);
3368
- return Ce(() => {
3369
- var i;
3370
- (i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
3371
- }, [o]), Ce(() => {
3372
- t.pathname !== s.current && n(""), s.current = t.pathname;
3373
- }, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1391
+ }, ha = ({ children: t }) => {
1392
+ const e = ue(), { setActiveAnchor: r } = ge(), { meta: s, authentication: n } = F();
1393
+ ca(), ua();
1394
+ const i = he(e.pathname);
1395
+ return _(() => {
1396
+ var o;
1397
+ (o = n == null ? void 0 : n.pageLoad) == null || o.call(n);
1398
+ }, [n]), _(() => {
1399
+ e.pathname !== i.current && r(""), i.current = e.pathname;
1400
+ }, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3374
1401
  !1,
3375
- /* @__PURE__ */ a.jsxs(It, { titleTemplate: r == null ? void 0 : r.title, children: [
3376
- (r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
3377
- (r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
1402
+ /* @__PURE__ */ a.jsxs(ce, { titleTemplate: s == null ? void 0 : s.title, children: [
1403
+ (s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
1404
+ (s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
3378
1405
  ] }),
3379
- /* @__PURE__ */ a.jsx(xe, { name: "layout-before-head" }),
3380
- /* @__PURE__ */ a.jsx(Sa, {}),
3381
- /* @__PURE__ */ a.jsx(xe, { name: "layout-after-head" }),
1406
+ /* @__PURE__ */ a.jsx(k, { name: "layout-before-head" }),
1407
+ /* @__PURE__ */ a.jsx(st, {}),
1408
+ /* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
3382
1409
  /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
3383
- Qn,
1410
+ de,
3384
1411
  {
3385
- fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(ss, {}) }),
3386
- children: /* @__PURE__ */ a.jsxs(Zt, { direction: "left", children: [
3387
- /* @__PURE__ */ a.jsx(Ql, {}),
1412
+ fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(mr, {}) }),
1413
+ children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
1414
+ /* @__PURE__ */ a.jsx(da, {}),
3388
1415
  /* @__PURE__ */ a.jsx(
3389
1416
  "div",
3390
1417
  {
3391
- className: O(
1418
+ className: A(
3392
1419
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
3393
1420
  "peer-data-[navigation=false]:hidden"
3394
1421
  ),
3395
- children: /* @__PURE__ */ a.jsxs(wa, { className: "flex items-center gap-2", children: [
3396
- /* @__PURE__ */ a.jsx(Wo, { size: 16, strokeWidth: 1.5 }),
1422
+ children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
1423
+ /* @__PURE__ */ a.jsx(rr, { size: 16, strokeWidth: 1.5 }),
3397
1424
  /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
3398
1425
  ] })
3399
1426
  }
@@ -3401,7 +1428,7 @@ const Ql = () => {
3401
1428
  /* @__PURE__ */ a.jsxs(
3402
1429
  "main",
3403
1430
  {
3404
- className: O(
1431
+ className: A(
3405
1432
  "h-full dark:border-white/10 translate-x-0",
3406
1433
  "lg:overflow-visible",
3407
1434
  // This works in tandem with the `SidebarWrapper` component
@@ -3409,9 +1436,9 @@ const Ql = () => {
3409
1436
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
3410
1437
  ),
3411
1438
  children: [
3412
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-content" }),
3413
- e ?? /* @__PURE__ */ a.jsx(In, {}),
3414
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-content" })
1439
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
1440
+ t ?? /* @__PURE__ */ a.jsx(_e, {}),
1441
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
3415
1442
  ]
3416
1443
  }
3417
1444
  )
@@ -3419,18 +1446,22 @@ const Ql = () => {
3419
1446
  }
3420
1447
  ) })
3421
1448
  ] });
3422
- }, dc = qa, fc = xo, hc = Ma, pc = Vl, mc = At, gc = Ja, vc = is, wc = Ms, xc = Rs, yc = Pt, bc = It;
1449
+ }, _a = gt, Fa = pe, Qa = ha, La = Nt, Ba = pr, Ha = Rr, za = Ir, qa = ce, Ka = F, $a = jt, Ua = pe, Va = Pt, Wa = Dt, Ya = ie, Xa = te;
3423
1450
  export {
3424
- wc as Bootstrap,
3425
- xc as BootstrapStatic,
3426
- yc as Button,
3427
- fc as Callout,
3428
- hc as DevPortal,
3429
- bc as Head,
3430
- pc as Layout,
3431
- mc as Link,
3432
- gc as RouterError,
3433
- vc as ServerError,
3434
- dc as useMDXComponents
1451
+ Ha as Bootstrap,
1452
+ za as BootstrapStatic,
1453
+ Ya as Button,
1454
+ Va as Callout,
1455
+ Wa as ClientOnly,
1456
+ Fa as DevPortal,
1457
+ qa as Head,
1458
+ Qa as Layout,
1459
+ Xa as Link,
1460
+ La as RouterError,
1461
+ Ba as ServerError,
1462
+ Ua as Zudoku,
1463
+ $a as useAuth,
1464
+ _a as useMDXComponents,
1465
+ Ka as useZudoku
3435
1466
  };
3436
1467
  //# sourceMappingURL=zudoku.components.js.map