zudoku 0.0.0-f417aae → 0.0.0-f49e3ea

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