zudoku 0.0.0-eff6f9b → 0.0.0-f06d326

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