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