zudoku 0.0.0-f865d81 → 0.0.0-fa903e7

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 (446) hide show
  1. package/dist/app/demo.js +0 -2
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.client.js +14 -0
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +6 -6
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -1
  8. package/dist/app/main.js +2 -2
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/standalone.js +0 -2
  11. package/dist/app/standalone.js.map +1 -1
  12. package/dist/cli/cli.js +1 -2
  13. package/dist/cli/cli.js.map +1 -1
  14. package/dist/cli/common/logger.js +9 -0
  15. package/dist/cli/common/logger.js.map +1 -1
  16. package/dist/codegen.d.ts +3 -0
  17. package/dist/codegen.js +45 -0
  18. package/dist/codegen.js.map +1 -0
  19. package/dist/config/validators/InputSidebarSchema.d.ts +10 -10
  20. package/dist/config/validators/validate.d.ts +148 -117
  21. package/dist/config/validators/validate.js +13 -6
  22. package/dist/config/validators/validate.js.map +1 -1
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +1 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  27. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  28. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  29. package/dist/lib/authentication/authentication.d.ts +3 -3
  30. package/dist/lib/authentication/hook.d.ts +5 -4
  31. package/dist/lib/authentication/hook.js +1 -3
  32. package/dist/lib/authentication/hook.js.map +1 -1
  33. package/dist/lib/authentication/providers/auth0.js +12 -11
  34. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  35. package/dist/lib/authentication/providers/openid.d.ts +0 -1
  36. package/dist/lib/authentication/providers/openid.js +11 -26
  37. package/dist/lib/authentication/providers/openid.js.map +1 -1
  38. package/dist/lib/authentication/state.d.ts +25 -4
  39. package/dist/lib/authentication/state.js +28 -3
  40. package/dist/lib/authentication/state.js.map +1 -1
  41. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  42. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  43. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  44. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  45. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  46. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  47. package/dist/lib/components/Bootstrap.d.ts +3 -1
  48. package/dist/lib/components/Bootstrap.js +10 -4
  49. package/dist/lib/components/Bootstrap.js.map +1 -1
  50. package/dist/lib/components/ClientOnly.d.ts +4 -2
  51. package/dist/lib/components/ClientOnly.js +1 -1
  52. package/dist/lib/components/ClientOnly.js.map +1 -1
  53. package/dist/lib/components/DeveloperHint.js +2 -1
  54. package/dist/lib/components/DeveloperHint.js.map +1 -1
  55. package/dist/lib/components/Header.js +16 -10
  56. package/dist/lib/components/Header.js.map +1 -1
  57. package/dist/lib/components/Heading.d.ts +1 -1
  58. package/dist/lib/components/Layout.js +12 -4
  59. package/dist/lib/components/Layout.js.map +1 -1
  60. package/dist/lib/components/MobileTopNavigation.js +6 -7
  61. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  62. package/dist/lib/components/SyntaxHighlight.js +16 -12
  63. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  64. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  65. package/dist/lib/components/ThemeSwitch.js +13 -0
  66. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  67. package/dist/lib/components/TopNavigation.d.ts +2 -0
  68. package/dist/lib/components/TopNavigation.js +13 -7
  69. package/dist/lib/components/TopNavigation.js.map +1 -1
  70. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  71. package/dist/lib/components/{DevPortal.js → Zudoku.js} +13 -14
  72. package/dist/lib/components/Zudoku.js.map +1 -0
  73. package/dist/lib/components/context/ZudokuContext.d.ts +7 -7
  74. package/dist/lib/components/context/ZudokuContext.js +8 -13
  75. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  76. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  77. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  78. package/dist/lib/components/index.d.ts +18 -10
  79. package/dist/lib/components/index.js +2 -3
  80. package/dist/lib/components/index.js.map +1 -1
  81. package/dist/lib/components/navigation/Sidebar.js +1 -1
  82. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  83. package/dist/lib/components/navigation/utils.js +2 -2
  84. package/dist/lib/components/navigation/utils.js.map +1 -1
  85. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +3 -7
  86. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  87. package/dist/lib/core/ZudokuContext.js.map +1 -0
  88. package/dist/lib/core/plugins.d.ts +18 -12
  89. package/dist/lib/core/plugins.js.map +1 -1
  90. package/dist/lib/errors/ErrorAlert.js +1 -1
  91. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  92. package/dist/lib/oas/graphql/index.js +4 -4
  93. package/dist/lib/oas/graphql/index.js.map +1 -1
  94. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  95. package/dist/lib/oas/parser/upgrade/index.js +2 -17
  96. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  97. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  98. package/dist/lib/plugins/api-keys/index.js +3 -0
  99. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  100. package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
  101. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  102. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  103. package/dist/lib/plugins/markdown/MdxPage.js +14 -1
  104. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  105. package/dist/lib/plugins/markdown/index.d.ts +2 -2
  106. package/dist/lib/plugins/markdown/index.js +1 -1
  107. package/dist/lib/plugins/markdown/index.js.map +1 -1
  108. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  109. package/dist/lib/plugins/openapi/CollapsibleCode.js +24 -0
  110. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  111. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  112. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  113. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  114. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  115. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  116. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  117. package/dist/lib/plugins/openapi/OperationList.js +21 -22
  118. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  119. package/dist/lib/plugins/openapi/ParameterListItem.js +6 -1
  120. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  121. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +7 -3
  122. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  123. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +9 -2
  124. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  125. package/dist/lib/plugins/openapi/Route.d.ts +4 -4
  126. package/dist/lib/plugins/openapi/Route.js +2 -4
  127. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  128. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  129. package/dist/lib/plugins/openapi/Sidecar.js +35 -33
  130. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  131. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  132. package/dist/lib/plugins/openapi/client/GraphQLClient.js +114 -0
  133. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  134. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  135. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  136. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  137. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  138. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  139. package/dist/lib/plugins/openapi/client/useCreateQuery.js +15 -0
  140. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  141. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  142. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  143. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  144. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  145. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  146. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  147. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -51
  148. package/dist/lib/plugins/openapi/graphql/gql.js +4 -2
  149. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  150. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +32 -8
  151. package/dist/lib/plugins/openapi/graphql/graphql.js +194 -662
  152. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  153. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  154. package/dist/lib/plugins/openapi/index.js +40 -53
  155. package/dist/lib/plugins/openapi/index.js.map +1 -1
  156. package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
  157. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
  158. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
  159. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  160. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  161. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
  162. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  163. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  164. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  165. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  166. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  167. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  168. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  169. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  170. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  171. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  172. package/dist/lib/plugins/openapi/schema/SchemaView.js +2 -1
  173. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  174. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +0 -1
  175. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +25 -36
  176. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  177. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  178. package/dist/lib/plugins/openapi-worker.js +7 -1
  179. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  180. package/dist/lib/plugins/redirect/index.d.ts +4 -7
  181. package/dist/lib/plugins/redirect/index.js +1 -1
  182. package/dist/lib/plugins/redirect/index.js.map +1 -1
  183. package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
  184. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  185. package/dist/lib/ui/ActionButton.d.ts +4 -0
  186. package/dist/lib/ui/ActionButton.js +10 -0
  187. package/dist/lib/ui/ActionButton.js.map +1 -0
  188. package/dist/lib/util/MdxComponents.d.ts +1 -1
  189. package/dist/lib/util/traverse.d.ts +2 -0
  190. package/dist/lib/util/traverse.js +18 -0
  191. package/dist/lib/util/traverse.js.map +1 -0
  192. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  193. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  194. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  195. package/dist/lib/util/useOnScreen.d.ts +4 -0
  196. package/dist/lib/util/useOnScreen.js +19 -0
  197. package/dist/lib/util/useOnScreen.js.map +1 -0
  198. package/dist/vite/build.js +5 -1
  199. package/dist/vite/build.js.map +1 -1
  200. package/dist/vite/config.d.ts +2 -8
  201. package/dist/vite/config.js +25 -54
  202. package/dist/vite/config.js.map +1 -1
  203. package/dist/vite/config.test.js +3 -4
  204. package/dist/vite/config.test.js.map +1 -1
  205. package/dist/vite/html.js +0 -2
  206. package/dist/vite/html.js.map +1 -1
  207. package/dist/vite/output.d.ts +101 -0
  208. package/dist/vite/output.js +53 -0
  209. package/dist/vite/output.js.map +1 -0
  210. package/dist/vite/plugin-api.js +23 -19
  211. package/dist/vite/plugin-api.js.map +1 -1
  212. package/dist/vite/plugin-component.js +14 -19
  213. package/dist/vite/plugin-component.js.map +1 -1
  214. package/dist/vite/plugin-config.d.ts +2 -3
  215. package/dist/vite/plugin-config.js +2 -3
  216. package/dist/vite/plugin-config.js.map +1 -1
  217. package/dist/vite/plugin-docs.test.js +15 -23
  218. package/dist/vite/plugin-docs.test.js.map +1 -1
  219. package/dist/vite/plugin-mdx.d.ts +0 -6
  220. package/dist/vite/plugin-mdx.js +13 -5
  221. package/dist/vite/plugin-mdx.js.map +1 -1
  222. package/dist/vite/plugin.js +1 -3
  223. package/dist/vite/plugin.js.map +1 -1
  224. package/dist/vite/prerender.js +3 -2
  225. package/dist/vite/prerender.js.map +1 -1
  226. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  227. package/dist/vite/remarkStaticGeneration.js +125 -0
  228. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  229. package/dist/zuplo/with-zuplo.d.ts +3 -0
  230. package/dist/zuplo/with-zuplo.js +28 -0
  231. package/dist/zuplo/with-zuplo.js.map +1 -0
  232. package/lib/{AnchorLink-BbB2q-jx.js → AnchorLink-CDlhr8gL.js} +11 -10
  233. package/lib/{AnchorLink-BbB2q-jx.js.map → AnchorLink-CDlhr8gL.js.map} +1 -1
  234. package/lib/AuthenticationPlugin-D0Em0SwR.js +59 -0
  235. package/lib/{AuthenticationPlugin-C9BHGXlE.js.map → AuthenticationPlugin-D0Em0SwR.js.map} +1 -1
  236. package/lib/Button-jK0EsymC.js +48 -0
  237. package/lib/Button-jK0EsymC.js.map +1 -0
  238. package/lib/{ClientOnly-CVN6leDu.js → ClientOnly-E7hGysn1.js} +4 -4
  239. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  240. package/lib/Markdown-ievDDhFT.js +15192 -0
  241. package/lib/Markdown-ievDDhFT.js.map +1 -0
  242. package/lib/MdxPage-B2FpJ9KC.js +183 -0
  243. package/lib/MdxPage-B2FpJ9KC.js.map +1 -0
  244. package/lib/OperationList-BkNQEsNs.js +4693 -0
  245. package/lib/OperationList-BkNQEsNs.js.map +1 -0
  246. package/lib/Route-DlG_HTMu.js +11 -0
  247. package/lib/Route-DlG_HTMu.js.map +1 -0
  248. package/lib/{Select-Bagt3Bme.js → Select-O9ZM3ZgX.js} +7 -7
  249. package/lib/Select-O9ZM3ZgX.js.map +1 -0
  250. package/lib/{Spinner-C6zroowC.js → SidebarBadge-DxFJcJ6V.js} +28 -17
  251. package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
  252. package/lib/SlotletProvider-DyomlzGx.js +252 -0
  253. package/lib/SlotletProvider-DyomlzGx.js.map +1 -0
  254. package/lib/Spinner-3cQDBVGr.js +7 -0
  255. package/lib/Spinner-3cQDBVGr.js.map +1 -0
  256. package/lib/SyntaxHighlight-DkLOsjHS.js +2983 -0
  257. package/lib/SyntaxHighlight-DkLOsjHS.js.map +1 -0
  258. package/lib/assets/{worker-Bf8vjASY.js → worker-BHClFO3A.js} +156 -156
  259. package/lib/assets/worker-BHClFO3A.js.map +1 -0
  260. package/lib/context-D1nXWxm7.js +22 -0
  261. package/lib/context-D1nXWxm7.js.map +1 -0
  262. package/lib/createServer-CpJlUPtn.js +15299 -0
  263. package/lib/createServer-CpJlUPtn.js.map +1 -0
  264. package/lib/{hook-sn0zMTkE.js → hook-hEqe7fPB.js} +12 -14
  265. package/lib/hook-hEqe7fPB.js.map +1 -0
  266. package/lib/index-C7SaIME0.js +1277 -0
  267. package/lib/index-C7SaIME0.js.map +1 -0
  268. package/lib/index-Czzd9rjU.js +899 -0
  269. package/lib/index-Czzd9rjU.js.map +1 -0
  270. package/lib/index-Yn8c3UWE.js +921 -0
  271. package/lib/index-Yn8c3UWE.js.map +1 -0
  272. package/lib/object_hash-CvlLgU-M.js +785 -0
  273. package/lib/object_hash-CvlLgU-M.js.map +1 -0
  274. package/lib/post-processors/removeExtensions.js +11 -0
  275. package/lib/post-processors/removeExtensions.js.map +1 -0
  276. package/lib/post-processors/removePaths.js +28 -0
  277. package/lib/post-processors/removePaths.js.map +1 -0
  278. package/lib/post-processors/traverse.js +12 -0
  279. package/lib/post-processors/traverse.js.map +1 -0
  280. package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
  281. package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
  282. package/lib/state-tsXBLONe.js +203 -0
  283. package/lib/{state-CsuHT8ZO.js.map → state-tsXBLONe.js.map} +1 -1
  284. package/lib/ui/ActionButton.js +25 -0
  285. package/lib/ui/ActionButton.js.map +1 -0
  286. package/lib/useExposedProps-CTPtylCV.js +10 -0
  287. package/lib/{useExposedProps-ChOIUaS4.js.map → useExposedProps-CTPtylCV.js.map} +1 -1
  288. package/lib/{ZudokuContext-BKXGJTmu.js → utils-DcpDOncX.js} +242 -246
  289. package/lib/utils-DcpDOncX.js.map +1 -0
  290. package/lib/zudoku.auth-auth0.js +24 -18
  291. package/lib/zudoku.auth-auth0.js.map +1 -1
  292. package/lib/zudoku.auth-clerk.js +2 -2
  293. package/lib/zudoku.auth-openid.js +124 -138
  294. package/lib/zudoku.auth-openid.js.map +1 -1
  295. package/lib/zudoku.components.js +1291 -1119
  296. package/lib/zudoku.components.js.map +1 -1
  297. package/lib/zudoku.openapi-worker.js +10 -16336
  298. package/lib/zudoku.openapi-worker.js.map +1 -1
  299. package/lib/zudoku.plugin-api-keys.js +41 -39
  300. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  301. package/lib/zudoku.plugin-custom-pages.js +2 -2
  302. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  303. package/lib/zudoku.plugin-markdown.js +15 -14
  304. package/lib/zudoku.plugin-markdown.js.map +1 -1
  305. package/lib/zudoku.plugin-openapi.js +5 -9
  306. package/lib/zudoku.plugin-openapi.js.map +1 -1
  307. package/lib/zudoku.plugin-redirect.js +2 -2
  308. package/lib/zudoku.plugin-redirect.js.map +1 -1
  309. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  310. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  311. package/package.json +27 -7
  312. package/src/app/demo.tsx +0 -3
  313. package/src/app/entry.client.tsx +14 -0
  314. package/src/app/entry.server.tsx +59 -53
  315. package/src/app/main.css +1 -1
  316. package/src/app/main.tsx +4 -4
  317. package/src/app/standalone.tsx +0 -3
  318. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  319. package/src/lib/authentication/authentication.ts +3 -3
  320. package/src/lib/authentication/hook.ts +1 -3
  321. package/src/lib/authentication/providers/auth0.tsx +17 -11
  322. package/src/lib/authentication/providers/openid.tsx +12 -30
  323. package/src/lib/authentication/state.ts +50 -9
  324. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  325. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  326. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  327. package/src/lib/components/Bootstrap.tsx +36 -14
  328. package/src/lib/components/ClientOnly.tsx +6 -3
  329. package/src/lib/components/DeveloperHint.tsx +6 -1
  330. package/src/lib/components/Header.tsx +68 -40
  331. package/src/lib/components/Layout.tsx +49 -37
  332. package/src/lib/components/MobileTopNavigation.tsx +15 -18
  333. package/src/lib/components/SyntaxHighlight.tsx +81 -46
  334. package/src/lib/components/ThemeSwitch.tsx +26 -0
  335. package/src/lib/components/TopNavigation.tsx +27 -19
  336. package/src/lib/components/Zudoku.tsx +108 -0
  337. package/src/lib/components/context/ZudokuContext.ts +11 -16
  338. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  339. package/src/lib/components/index.ts +2 -3
  340. package/src/lib/components/navigation/Sidebar.tsx +3 -3
  341. package/src/lib/components/navigation/utils.ts +2 -2
  342. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +3 -11
  343. package/src/lib/core/plugins.ts +20 -16
  344. package/src/lib/errors/ErrorAlert.tsx +2 -1
  345. package/src/lib/oas/graphql/index.ts +4 -4
  346. package/src/lib/oas/parser/upgrade/index.ts +3 -24
  347. package/src/lib/plugins/api-keys/index.tsx +12 -9
  348. package/src/lib/plugins/custom-pages/index.tsx +2 -2
  349. package/src/lib/plugins/markdown/MdxPage.tsx +25 -1
  350. package/src/lib/plugins/markdown/index.tsx +3 -2
  351. package/src/lib/plugins/openapi/CollapsibleCode.tsx +80 -0
  352. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  353. package/src/lib/plugins/openapi/Endpoint.tsx +5 -10
  354. package/src/lib/plugins/openapi/OperationList.tsx +20 -40
  355. package/src/lib/plugins/openapi/ParameterListItem.tsx +37 -31
  356. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +18 -13
  357. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +17 -12
  358. package/src/lib/plugins/openapi/Route.tsx +11 -12
  359. package/src/lib/plugins/openapi/Sidecar.tsx +73 -59
  360. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +157 -0
  361. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  362. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  363. package/src/lib/plugins/openapi/client/useCreateQuery.ts +21 -0
  364. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  365. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  366. package/src/lib/plugins/openapi/graphql/gql.ts +10 -27
  367. package/src/lib/plugins/openapi/graphql/graphql.ts +233 -665
  368. package/src/lib/plugins/openapi/index.tsx +42 -67
  369. package/src/lib/plugins/openapi/interfaces.ts +1 -1
  370. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
  371. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
  372. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  373. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  374. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  375. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -2
  376. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +28 -42
  377. package/src/lib/plugins/openapi-worker.ts +11 -1
  378. package/src/lib/plugins/redirect/index.tsx +5 -9
  379. package/src/lib/plugins/search-inkeep/index.tsx +2 -2
  380. package/src/lib/ui/ActionButton.tsx +28 -0
  381. package/src/lib/util/traverse.ts +25 -0
  382. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  383. package/src/lib/util/useOnScreen.ts +32 -0
  384. package/dist/lib/components/DevPortal.js.map +0 -1
  385. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  386. package/dist/lib/components/context/ThemeContext.js +0 -7
  387. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  388. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  389. package/dist/lib/components/context/ThemeProvider.js +0 -23
  390. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  391. package/dist/lib/core/DevPortalContext.js.map +0 -1
  392. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  393. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  394. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  395. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  396. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  397. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  398. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  399. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  400. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  401. package/dist/lib/themeToggle.d.ts +0 -1
  402. package/dist/lib/themeToggle.js +0 -7
  403. package/dist/lib/themeToggle.js.map +0 -1
  404. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  405. package/dist/lib/util/createWaitForNotify.js +0 -15
  406. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  407. package/dist/vite/plugin-html-transform.d.ts +0 -2
  408. package/dist/vite/plugin-html-transform.js +0 -15
  409. package/dist/vite/plugin-html-transform.js.map +0 -1
  410. package/lib/AuthenticationPlugin-C9BHGXlE.js +0 -55
  411. package/lib/ClientOnly-CVN6leDu.js.map +0 -1
  412. package/lib/DeveloperHint-DHdLXGHA.js +0 -16
  413. package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
  414. package/lib/Markdown-BDcCAWwm.js +0 -18059
  415. package/lib/Markdown-BDcCAWwm.js.map +0 -1
  416. package/lib/MdxPage-DKMH_t0f.js +0 -174
  417. package/lib/MdxPage-DKMH_t0f.js.map +0 -1
  418. package/lib/OperationList-Tj7ubW_t.js +0 -604
  419. package/lib/OperationList-Tj7ubW_t.js.map +0 -1
  420. package/lib/Route-C3DGB6OS.js +0 -13
  421. package/lib/Route-C3DGB6OS.js.map +0 -1
  422. package/lib/Select-Bagt3Bme.js.map +0 -1
  423. package/lib/SlotletProvider-Da7eFgd2.js +0 -241
  424. package/lib/SlotletProvider-Da7eFgd2.js.map +0 -1
  425. package/lib/Spinner-C6zroowC.js.map +0 -1
  426. package/lib/StaggeredRender-DDHSzQKE.js +0 -17
  427. package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
  428. package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
  429. package/lib/assets/worker-Bf8vjASY.js.map +0 -1
  430. package/lib/hook-sn0zMTkE.js.map +0 -1
  431. package/lib/index-AjWCJNGC.js +0 -5690
  432. package/lib/index-AjWCJNGC.js.map +0 -1
  433. package/lib/index-CRo94sKK.js +0 -1783
  434. package/lib/index-CRo94sKK.js.map +0 -1
  435. package/lib/state-CsuHT8ZO.js +0 -183
  436. package/lib/urql-core-KJnLL26g.js +0 -1455
  437. package/lib/urql-core-KJnLL26g.js.map +0 -1
  438. package/lib/useExposedProps-ChOIUaS4.js +0 -9
  439. package/src/lib/components/DevPortal.tsx +0 -111
  440. package/src/lib/components/context/ThemeContext.tsx +0 -8
  441. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  442. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -51
  443. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -75
  444. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  445. package/src/lib/themeToggle.ts +0 -7
  446. package/src/lib/util/createWaitForNotify.ts +0 -18
@@ -1,1153 +1,918 @@
1
- var ut = Object.defineProperty;
2
- var ye = (t) => {
3
- throw TypeError(t);
1
+ var yt = Object.defineProperty;
2
+ var Pe = (e) => {
3
+ throw TypeError(e);
4
4
  };
5
- var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var v = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), je = (t, e, r) => e.has(t) || ye("Cannot " + r);
7
- var l = (t, e, r) => (je(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), g = (t, e, r, s) => (je(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
- var X = (t, e, r, s) => ({
5
+ var bt = (e, t, r) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var S = (e, t, r) => bt(e, typeof t != "symbol" ? t + "" : t, r), Ce = (e, t, r) => t.has(e) || Pe("Cannot " + r);
7
+ var c = (e, t, r) => (Ce(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? Pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), y = (e, t, r, s) => (Ce(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
8
+ var J = (e, t, r, s) => ({
9
9
  set _(n) {
10
- g(t, e, n, r);
10
+ y(e, t, n, r);
11
11
  },
12
12
  get _() {
13
- return l(t, e, s);
13
+ return c(e, t, s);
14
14
  }
15
15
  });
16
- import { a as Te, H as ce, M as ht, A as ft, u as gt } from "./AnchorLink-BbB2q-jx.js";
17
- import { e as mt, f as pt, R as vt, L as te, g as G, h as xt, O as _e, i as bt, b as yt, u as ue } from "./index-CRo94sKK.js";
18
- import { u as jt } from "./state-CsuHT8ZO.js";
19
- import { E as Fe, S as k, a as wt, R as Nt } from "./SlotletProvider-Da7eFgd2.js";
16
+ import { a as He, A as jt, H as me, M as wt, u as St } from "./AnchorLink-CDlhr8gL.js";
17
+ import { d as Nt, R as Et, N as ae, u as Pt, L as ge } from "./index-Yn8c3UWE.js";
18
+ import { u as Ct } from "./state-tsXBLONe.js";
19
+ import { E as Ue, S as D, a as kt, R as At } from "./SlotletProvider-DyomlzGx.js";
20
20
  import { j as a } from "./jsx-runtime-B6kdoens.js";
21
- import { Button as ie } from "./ui/Button.js";
22
- import { Callout as Pt } from "./ui/Callout.js";
23
- import St, { StrictMode as Qe, createContext as Le, Component as Ct, createElement as we, useState as Q, useCallback as Be, useEffect as _, Suspense as de, memo as He, useMemo as re, useContext as Et, Fragment as kt, useRef as he, forwardRef as At } from "react";
24
- import { a as fe } from "./_commonjsHelpers-BkfeUUK-.js";
25
- import { B as Mt } from "./router-BsfSoK2j.js";
26
- import { a as oe } from "./StaggeredRender-DDHSzQKE.js";
27
- import { C as Dt } from "./ClientOnly-CVN6leDu.js";
28
- import { S as ze, i as qe, Q as Ot, n as b, m as Ne, j as Pe, k as M, l as Rt, o as It, p as Tt, q as _t, r as Se, t as Ce, v as Ft, h as Ee, w as ke, x as Qt, y as L, u as F, z as Ke, A as Lt, g as Bt, Z as Ht, B as zt, C as qt } from "./ZudokuContext-BKXGJTmu.js";
29
- import { M as Kt, u as ee } from "./hook-sn0zMTkE.js";
30
- import { a as $t, T as Ut, b as Vt, V as Wt, u as ge } from "./Markdown-BDcCAWwm.js";
31
- import { CircleXIcon as Yt, SearchIcon as Xt, MenuIcon as Zt, MoonStarIcon as Jt, SunIcon as Gt, ChevronRightIcon as er, ExternalLinkIcon as tr, PanelLeftIcon as rr } from "lucide-react";
32
- import { DropdownMenu as ar, DropdownMenuTrigger as sr, DropdownMenuContent as nr, DropdownMenuLabel as ir, DropdownMenuSeparator as or, DropdownMenuSub as lr, DropdownMenuSubTrigger as cr, DropdownMenuPortal as ur, DropdownMenuSubContent as dr, DropdownMenuItem as hr } from "./ui/DropdownMenu.js";
33
- import { c as A } from "./cn-BmFQLtkS.js";
34
- import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
35
- import { a as Ue, c as fr } from "./index-BuAyrJe3.js";
36
- import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as gr } from "./ui/Drawer.js";
37
- import { S as ae, a as mr } from "./Spinner-C6zroowC.js";
38
- import * as se from "@radix-ui/react-collapsible";
39
- function pr({ error: t }) {
40
- return /* @__PURE__ */ a.jsx(Fe, { error: t });
21
+ import { Button as Dt } from "./ui/Button.js";
22
+ import { Callout as Ot } from "./ui/Callout.js";
23
+ import { S as $e, l as Ke, Q as Mt, n as w, m as ke, o as Ae, p as O, q as Rt, r as It, t as Tt, v as _t, w as De, x as Oe, y as Ft, h as Me, z as Re, A as Qt, d as qt, B as Ve, C as Lt, j as Q, u as F, D as Ze, E as zt, g as Bt, Z as Ht } from "./utils-DcpDOncX.js";
24
+ import { M as Ut, u as se } from "./hook-hEqe7fPB.js";
25
+ import * as G from "react";
26
+ import Ye, { StrictMode as We, useState as q, useEffect as L, useRef as pe, useCallback as $t, Suspense as ve, memo as Xe, forwardRef as Kt, createContext as Je, Component as Vt, createElement as Ie, useMemo as ne, useContext as Zt, Fragment as Yt } from "react";
27
+ import { a as xe, c as Wt } from "./_commonjsHelpers-BkfeUUK-.js";
28
+ import { B as Xt } from "./router-lfyopgBI.js";
29
+ import { I as Jt, y as Gt, u as ye, j as be, O as Ge } from "./index-Czzd9rjU.js";
30
+ import { S as ue, a as ie } from "./SidebarBadge-DxFJcJ6V.js";
31
+ import { C as je } from "./ClientOnly-E7hGysn1.js";
32
+ import { ChevronRightIcon as er, ExternalLinkIcon as tr, CircleXIcon as rr, SearchIcon as ar, MoonStarIcon as sr, SunIcon as nr, MenuIcon as ir, PanelLeftIcon as or } from "lucide-react";
33
+ import { Drawer as et, DrawerTrigger as tt, DrawerContent as rt, DrawerTitle as at } from "./ui/Drawer.js";
34
+ import { c as R } from "./cn-BmFQLtkS.js";
35
+ import { u as we, a as lr, V as cr } from "./Markdown-ievDDhFT.js";
36
+ import { c as ur, a as dr } from "./index-BuAyrJe3.js";
37
+ import * as oe from "@radix-ui/react-collapsible";
38
+ import { B as de } from "./Button-jK0EsymC.js";
39
+ import { DropdownMenu as hr, DropdownMenuTrigger as fr, DropdownMenuContent as mr, DropdownMenuLabel as gr, DropdownMenuSeparator as le, DropdownMenuSub as pr, DropdownMenuSubTrigger as vr, DropdownMenuPortal as xr, DropdownMenuSubContent as yr, DropdownMenuItem as br } from "./ui/DropdownMenu.js";
40
+ import { VisuallyHidden as st } from "@radix-ui/react-visually-hidden";
41
+ import { z as jr, J as wr } from "./SyntaxHighlight-DkLOsjHS.js";
42
+ import { Z as Sr } from "./invariant-Caa8-XvF.js";
43
+ import { S as Nr } from "./Spinner-3cQDBVGr.js";
44
+ function Er({ error: e }) {
45
+ return /* @__PURE__ */ a.jsx(Ue, { error: e });
41
46
  }
42
- var W = {};
43
- const vr = /* @__PURE__ */ fe(Mt), xr = /* @__PURE__ */ fe(mt), br = /* @__PURE__ */ fe(pt);
44
- Object.defineProperty(W, "__esModule", { value: !0 });
45
- var yr = St, E = vr, me = xr, D = br;
46
- function jr(t) {
47
- if (t && t.__esModule) return t;
48
- var e = /* @__PURE__ */ Object.create(null);
49
- return t && Object.keys(t).forEach(function(r) {
50
- if (r !== "default") {
51
- var s = Object.getOwnPropertyDescriptor(t, r);
52
- Object.defineProperty(e, r, s.get ? s : {
53
- enumerable: !0,
54
- get: function() {
55
- return t[r];
56
- }
57
- });
58
- }
59
- }), e.default = t, Object.freeze(e);
60
- }
61
- var S = /* @__PURE__ */ jr(yr);
62
- function wr({
63
- basename: t,
64
- children: e,
65
- location: r = "/",
66
- future: s
67
- }) {
68
- typeof r == "string" && (r = D.parsePath(r));
69
- let n = E.Action.Pop, i = {
70
- pathname: r.pathname || "/",
71
- search: r.search || "",
72
- hash: r.hash || "",
73
- state: r.state != null ? r.state : null,
74
- key: r.key || "default"
75
- }, o = Ze();
76
- return /* @__PURE__ */ S.createElement(D.Router, {
77
- basename: t,
78
- children: e,
79
- location: i,
80
- navigationType: n,
81
- navigator: o,
82
- future: s,
83
- static: !0
84
- });
85
- }
86
- function Nr({
87
- context: t,
88
- router: e,
89
- hydrate: r = !0,
90
- nonce: s
91
- }) {
92
- e && t || (process.env.NODE_ENV !== "production" ? E.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : E.UNSAFE_invariant(!1));
93
- let n = {
94
- router: e,
95
- navigator: Ze(),
96
- static: !0,
97
- staticContext: t,
98
- basename: t.basename || "/"
99
- }, i = /* @__PURE__ */ new Map(), o = "";
100
- if (r !== !1) {
101
- let c = {
102
- loaderData: t.loaderData,
103
- actionData: t.actionData,
104
- errors: Sr(t.errors)
105
- };
106
- o = `window.__staticRouterHydrationData = JSON.parse(${Dr(JSON.stringify(JSON.stringify(c)))});`;
107
- }
108
- let {
109
- state: u
110
- } = n.router;
111
- return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterContext.Provider, {
112
- value: n
113
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
114
- value: u
115
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_FetchersContext.Provider, {
116
- value: i
117
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
118
- value: {
119
- isTransitioning: !1
120
- }
121
- }, /* @__PURE__ */ S.createElement(D.Router, {
122
- basename: n.basename,
123
- location: u.location,
124
- navigationType: u.historyAction,
125
- navigator: n.navigator,
126
- static: n.static,
127
- future: {
128
- v7_relativeSplatPath: e.future.v7_relativeSplatPath
129
- }
130
- }, /* @__PURE__ */ S.createElement(Pr, {
131
- routes: e.routes,
132
- future: e.future,
133
- state: u
134
- })))))), o ? /* @__PURE__ */ S.createElement("script", {
135
- suppressHydrationWarning: !0,
136
- nonce: s,
137
- dangerouslySetInnerHTML: {
138
- __html: o
139
- }
140
- }) : null);
141
- }
142
- function Pr({
143
- routes: t,
144
- future: e,
145
- state: r
146
- }) {
147
- return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
148
- }
149
- function Sr(t) {
150
- if (!t) return null;
151
- let e = Object.entries(t), r = {};
152
- for (let [s, n] of e)
153
- E.isRouteErrorResponse(n) ? r[s] = {
154
- ...n,
155
- __type: "RouteErrorResponse"
156
- } : n instanceof Error ? r[s] = {
157
- message: n.message,
158
- __type: "Error",
159
- // If this is a subclass (i.e., ReferenceError), send up the type so we
160
- // can re-create the same type during hydration.
161
- ...n.name !== "Error" ? {
162
- __subType: n.name
163
- } : {}
164
- } : r[s] = n;
165
- return r;
166
- }
167
- function Ze() {
168
- return {
169
- createHref: Je,
170
- encodeLocation: Ge,
171
- push(t) {
172
- throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
173
- },
174
- replace(t) {
175
- throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`);
176
- },
177
- go(t) {
178
- throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`);
179
- },
180
- back() {
181
- throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
182
- },
183
- forward() {
184
- throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
185
- }
186
- };
187
- }
188
- function Cr(t, e) {
189
- return E.createStaticHandler(t, {
190
- ...e,
191
- mapRouteProperties: me.UNSAFE_mapRouteProperties
192
- });
193
- }
194
- function Er(t, e, r = {}) {
195
- let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), i = e.matches.map((u) => {
196
- let c = s[u.route.id] || u.route;
197
- return {
198
- ...u,
199
- route: c
200
- };
201
- }), o = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
202
- return {
203
- get basename() {
204
- return e.basename;
205
- },
206
- get future() {
207
- var u, c;
208
- return {
209
- v7_fetcherPersist: !1,
210
- v7_normalizeFormMethod: !1,
211
- v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
212
- v7_prependBasename: !1,
213
- v7_relativeSplatPath: ((c = r.future) == null ? void 0 : c.v7_relativeSplatPath) === !0,
214
- v7_skipActionErrorRevalidation: !1
215
- };
216
- },
217
- get state() {
218
- return {
219
- historyAction: E.Action.Pop,
220
- location: e.location,
221
- matches: i,
222
- loaderData: e.loaderData,
223
- actionData: e.actionData,
224
- errors: e.errors,
225
- initialized: !0,
226
- navigation: E.IDLE_NAVIGATION,
227
- restoreScrollPosition: null,
228
- preventScrollReset: !1,
229
- revalidation: "idle",
230
- fetchers: /* @__PURE__ */ new Map(),
231
- blockers: /* @__PURE__ */ new Map()
232
- };
233
- },
234
- get routes() {
235
- return n;
236
- },
237
- get window() {
238
- },
239
- initialize() {
240
- throw o("initialize");
241
- },
242
- subscribe() {
243
- throw o("subscribe");
244
- },
245
- enableScrollRestoration() {
246
- throw o("enableScrollRestoration");
247
- },
248
- navigate() {
249
- throw o("navigate");
250
- },
251
- fetch() {
252
- throw o("fetch");
253
- },
254
- revalidate() {
255
- throw o("revalidate");
256
- },
257
- createHref: Je,
258
- encodeLocation: Ge,
259
- getFetcher() {
260
- return E.IDLE_FETCHER;
261
- },
262
- deleteFetcher() {
263
- throw o("deleteFetcher");
264
- },
265
- dispose() {
266
- throw o("dispose");
267
- },
268
- getBlocker() {
269
- return E.IDLE_BLOCKER;
270
- },
271
- deleteBlocker() {
272
- throw o("deleteBlocker");
273
- },
274
- patchRoutes() {
275
- throw o("patchRoutes");
276
- },
277
- _internalFetchControllers: /* @__PURE__ */ new Map(),
278
- _internalActiveDeferreds: /* @__PURE__ */ new Map(),
279
- _internalSetRoutes() {
280
- throw o("_internalSetRoutes");
281
- }
282
- };
283
- }
284
- function Je(t) {
285
- return typeof t == "string" ? t : D.createPath(t);
286
- }
287
- function Ge(t) {
288
- let e = typeof t == "string" ? t : D.createPath(t);
289
- e = e.replace(/ $/, "%20");
290
- let r = kr.test(e) ? new URL(e) : new URL(e, "http://localhost");
291
- return {
292
- pathname: r.pathname,
293
- search: r.search,
294
- hash: r.hash
295
- };
296
- }
297
- const kr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ar = {
298
- "&": "\\u0026",
299
- ">": "\\u003e",
300
- "<": "\\u003c",
301
- "\u2028": "\\u2028",
302
- "\u2029": "\\u2029"
303
- }, Mr = /[&><\u2028\u2029]/g;
304
- function Dr(t) {
305
- return t.replace(Mr, (e) => Ar[e]);
306
- }
307
- W.StaticRouter = wr;
308
- var Or = W.StaticRouterProvider = Nr;
309
- W.createStaticHandler = Cr;
310
- W.createStaticRouter = Er;
311
- const Rr = ({
312
- router: t,
313
- hydrate: e = !1
314
- }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(vt, { router: t }) }) }) }), Ir = ({
315
- router: t,
316
- context: e,
317
- helmetContext: r
318
- }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Or, { router: t, context: e }) }) });
319
- var C, Oe, Tr = (Oe = class extends ze {
320
- constructor(e = {}) {
47
+ var k, Le, Pr = (Le = class extends $e {
48
+ constructor(t = {}) {
321
49
  super();
322
- y(this, C);
323
- this.config = e, g(this, C, /* @__PURE__ */ new Map());
50
+ N(this, k);
51
+ this.config = t, y(this, k, /* @__PURE__ */ new Map());
324
52
  }
325
- build(e, r, s) {
326
- const n = r.queryKey, i = r.queryHash ?? qe(n, r);
327
- let o = this.get(i);
328
- return o || (o = new Ot({
53
+ build(t, r, s) {
54
+ const n = r.queryKey, o = r.queryHash ?? Ke(n, r);
55
+ let i = this.get(o);
56
+ return i || (i = new Mt({
329
57
  cache: this,
330
58
  queryKey: n,
331
- queryHash: i,
332
- options: e.defaultQueryOptions(r),
59
+ queryHash: o,
60
+ options: t.defaultQueryOptions(r),
333
61
  state: s,
334
- defaultOptions: e.getQueryDefaults(n)
335
- }), this.add(o)), o;
62
+ defaultOptions: t.getQueryDefaults(n)
63
+ }), this.add(i)), i;
336
64
  }
337
- add(e) {
338
- l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
65
+ add(t) {
66
+ c(this, k).has(t.queryHash) || (c(this, k).set(t.queryHash, t), this.notify({
339
67
  type: "added",
340
- query: e
68
+ query: t
341
69
  }));
342
70
  }
343
- remove(e) {
344
- const r = l(this, C).get(e.queryHash);
345
- r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
71
+ remove(t) {
72
+ const r = c(this, k).get(t.queryHash);
73
+ r && (t.destroy(), r === t && c(this, k).delete(t.queryHash), this.notify({ type: "removed", query: t }));
346
74
  }
347
75
  clear() {
348
- b.batch(() => {
349
- this.getAll().forEach((e) => {
350
- this.remove(e);
76
+ w.batch(() => {
77
+ this.getAll().forEach((t) => {
78
+ this.remove(t);
351
79
  });
352
80
  });
353
81
  }
354
- get(e) {
355
- return l(this, C).get(e);
82
+ get(t) {
83
+ return c(this, k).get(t);
356
84
  }
357
85
  getAll() {
358
- return [...l(this, C).values()];
86
+ return [...c(this, k).values()];
359
87
  }
360
- find(e) {
361
- const r = { exact: !0, ...e };
88
+ find(t) {
89
+ const r = { exact: !0, ...t };
362
90
  return this.getAll().find(
363
- (s) => Ne(r, s)
91
+ (s) => ke(r, s)
364
92
  );
365
93
  }
366
- findAll(e = {}) {
94
+ findAll(t = {}) {
367
95
  const r = this.getAll();
368
- return Object.keys(e).length > 0 ? r.filter((s) => Ne(e, s)) : r;
96
+ return Object.keys(t).length > 0 ? r.filter((s) => ke(t, s)) : r;
369
97
  }
370
- notify(e) {
371
- b.batch(() => {
98
+ notify(t) {
99
+ w.batch(() => {
372
100
  this.listeners.forEach((r) => {
373
- r(e);
101
+ r(t);
374
102
  });
375
103
  });
376
104
  }
377
105
  onFocus() {
378
- b.batch(() => {
379
- this.getAll().forEach((e) => {
380
- e.onFocus();
106
+ w.batch(() => {
107
+ this.getAll().forEach((t) => {
108
+ t.onFocus();
381
109
  });
382
110
  });
383
111
  }
384
112
  onOnline() {
385
- b.batch(() => {
386
- this.getAll().forEach((e) => {
387
- e.onOnline();
113
+ w.batch(() => {
114
+ this.getAll().forEach((t) => {
115
+ t.onOnline();
388
116
  });
389
117
  });
390
118
  }
391
- }, C = new WeakMap(), Oe), x, V, Re, _r = (Re = class extends ze {
392
- constructor(e = {}) {
119
+ }, k = new WeakMap(), Le), j, Z, ze, Cr = (ze = class extends $e {
120
+ constructor(t = {}) {
393
121
  super();
394
- y(this, x);
395
- y(this, V);
396
- this.config = e, g(this, x, /* @__PURE__ */ new Map()), g(this, V, Date.now());
122
+ N(this, j);
123
+ N(this, Z);
124
+ this.config = t, y(this, j, /* @__PURE__ */ new Map()), y(this, Z, Date.now());
397
125
  }
398
- build(e, r, s) {
399
- const n = new Kt({
126
+ build(t, r, s) {
127
+ const n = new Ut({
400
128
  mutationCache: this,
401
- mutationId: ++X(this, V)._,
402
- options: e.defaultMutationOptions(r),
129
+ mutationId: ++J(this, Z)._,
130
+ options: t.defaultMutationOptions(r),
403
131
  state: s
404
132
  });
405
133
  return this.add(n), n;
406
134
  }
407
- add(e) {
408
- const r = Z(e), s = l(this, x).get(r) ?? [];
409
- s.push(e), l(this, x).set(r, s), this.notify({ type: "added", mutation: e });
135
+ add(t) {
136
+ const r = ee(t), s = c(this, j).get(r) ?? [];
137
+ s.push(t), c(this, j).set(r, s), this.notify({ type: "added", mutation: t });
410
138
  }
411
- remove(e) {
139
+ remove(t) {
412
140
  var s;
413
- const r = Z(e);
414
- if (l(this, x).has(r)) {
415
- const n = (s = l(this, x).get(r)) == null ? void 0 : s.filter((i) => i !== e);
416
- n && (n.length === 0 ? l(this, x).delete(r) : l(this, x).set(r, n));
141
+ const r = ee(t);
142
+ if (c(this, j).has(r)) {
143
+ const n = (s = c(this, j).get(r)) == null ? void 0 : s.filter((o) => o !== t);
144
+ n && (n.length === 0 ? c(this, j).delete(r) : c(this, j).set(r, n));
417
145
  }
418
- this.notify({ type: "removed", mutation: e });
146
+ this.notify({ type: "removed", mutation: t });
419
147
  }
420
- canRun(e) {
148
+ canRun(t) {
421
149
  var s;
422
- const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
423
- return !r || r === e;
150
+ const r = (s = c(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n.state.status === "pending");
151
+ return !r || r === t;
424
152
  }
425
- runNext(e) {
153
+ runNext(t) {
426
154
  var s;
427
- const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
155
+ const r = (s = c(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n !== t && n.state.isPaused);
428
156
  return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
429
157
  }
430
158
  clear() {
431
- b.batch(() => {
432
- this.getAll().forEach((e) => {
433
- this.remove(e);
159
+ w.batch(() => {
160
+ this.getAll().forEach((t) => {
161
+ this.remove(t);
434
162
  });
435
163
  });
436
164
  }
437
165
  getAll() {
438
- return [...l(this, x).values()].flat();
166
+ return [...c(this, j).values()].flat();
439
167
  }
440
- find(e) {
441
- const r = { exact: !0, ...e };
168
+ find(t) {
169
+ const r = { exact: !0, ...t };
442
170
  return this.getAll().find(
443
- (s) => Pe(r, s)
171
+ (s) => Ae(r, s)
444
172
  );
445
173
  }
446
- findAll(e = {}) {
447
- return this.getAll().filter((r) => Pe(e, r));
174
+ findAll(t = {}) {
175
+ return this.getAll().filter((r) => Ae(t, r));
448
176
  }
449
- notify(e) {
450
- b.batch(() => {
177
+ notify(t) {
178
+ w.batch(() => {
451
179
  this.listeners.forEach((r) => {
452
- r(e);
180
+ r(t);
453
181
  });
454
182
  });
455
183
  }
456
184
  resumePausedMutations() {
457
- const e = this.getAll().filter((r) => r.state.isPaused);
458
- return b.batch(
185
+ const t = this.getAll().filter((r) => r.state.isPaused);
186
+ return w.batch(
459
187
  () => Promise.all(
460
- e.map((r) => r.continue().catch(M))
188
+ t.map((r) => r.continue().catch(O))
461
189
  )
462
190
  );
463
191
  }
464
- }, x = new WeakMap(), V = new WeakMap(), Re);
465
- function Z(t) {
466
- var e;
467
- return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
192
+ }, j = new WeakMap(), Z = new WeakMap(), ze);
193
+ function ee(e) {
194
+ var t;
195
+ return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
468
196
  }
469
- function Ae(t) {
197
+ function Te(e) {
470
198
  return {
471
- onFetch: (e, r) => {
472
- var j, N, p, P, h;
473
- const s = e.options, n = (p = (N = (j = e.fetchOptions) == null ? void 0 : j.meta) == null ? void 0 : N.fetchMore) == null ? void 0 : p.direction, i = ((P = e.state.data) == null ? void 0 : P.pages) || [], o = ((h = e.state.data) == null ? void 0 : h.pageParams) || [];
474
- let u = { pages: [], pageParams: [] }, c = 0;
475
- const m = async () => {
476
- let f = !1;
477
- const B = (w) => {
478
- Object.defineProperty(w, "signal", {
199
+ onFetch: (t, r) => {
200
+ var p, f, h, g, v;
201
+ const s = t.options, n = (h = (f = (p = t.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((g = t.state.data) == null ? void 0 : g.pages) || [], i = ((v = t.state.data) == null ? void 0 : v.pageParams) || [];
202
+ let u = { pages: [], pageParams: [] }, d = 0;
203
+ const l = async () => {
204
+ let m = !1;
205
+ const E = (b) => {
206
+ Object.defineProperty(b, "signal", {
479
207
  enumerable: !0,
480
- get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
481
- f = !0;
482
- }), e.signal)
208
+ get: () => (t.signal.aborted ? m = !0 : t.signal.addEventListener("abort", () => {
209
+ m = !0;
210
+ }), t.signal)
483
211
  });
484
- }, lt = Rt(e.options, e.fetchOptions), ve = async (w, O, $) => {
485
- if (f)
212
+ }, W = Rt(t.options, t.fetchOptions), $ = async (b, P, K) => {
213
+ if (m)
486
214
  return Promise.reject();
487
- if (O == null && w.pages.length)
488
- return Promise.resolve(w);
489
- const Y = {
490
- queryKey: e.queryKey,
491
- pageParam: O,
492
- direction: $ ? "backward" : "forward",
493
- meta: e.options.meta
215
+ if (P == null && b.pages.length)
216
+ return Promise.resolve(b);
217
+ const X = {
218
+ queryKey: t.queryKey,
219
+ pageParam: P,
220
+ direction: K ? "backward" : "forward",
221
+ meta: t.options.meta
494
222
  };
495
- B(Y);
496
- const ct = await lt(
497
- Y
498
- ), { maxPages: xe } = e.options, be = $ ? It : Tt;
223
+ E(X);
224
+ const xt = await W(
225
+ X
226
+ ), { maxPages: Ne } = t.options, Ee = K ? It : Tt;
499
227
  return {
500
- pages: be(w.pages, ct, xe),
501
- pageParams: be(w.pageParams, O, xe)
228
+ pages: Ee(b.pages, xt, Ne),
229
+ pageParams: Ee(b.pageParams, P, Ne)
502
230
  };
503
231
  };
504
- if (n && i.length) {
505
- const w = n === "backward", O = w ? Fr : Me, $ = {
506
- pages: i,
507
- pageParams: o
508
- }, Y = O(s, $);
509
- u = await ve($, Y, w);
232
+ if (n && o.length) {
233
+ const b = n === "backward", P = b ? kr : _e, K = {
234
+ pages: o,
235
+ pageParams: i
236
+ }, X = P(s, K);
237
+ u = await $(K, X, b);
510
238
  } else {
511
- const w = t ?? i.length;
239
+ const b = e ?? o.length;
512
240
  do {
513
- const O = c === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
514
- if (c > 0 && O == null)
241
+ const P = d === 0 ? i[0] ?? s.initialPageParam : _e(s, u);
242
+ if (d > 0 && P == null)
515
243
  break;
516
- u = await ve(u, O), c++;
517
- } while (c < w);
244
+ u = await $(u, P), d++;
245
+ } while (d < b);
518
246
  }
519
247
  return u;
520
248
  };
521
- e.options.persister ? e.fetchFn = () => {
522
- var f, B;
523
- return (B = (f = e.options).persister) == null ? void 0 : B.call(
524
- f,
249
+ t.options.persister ? t.fetchFn = () => {
250
+ var m, E;
251
+ return (E = (m = t.options).persister) == null ? void 0 : E.call(
525
252
  m,
253
+ l,
526
254
  {
527
- queryKey: e.queryKey,
528
- meta: e.options.meta,
529
- signal: e.signal
255
+ queryKey: t.queryKey,
256
+ meta: t.options.meta,
257
+ signal: t.signal
530
258
  },
531
259
  r
532
260
  );
533
- } : e.fetchFn = m;
261
+ } : t.fetchFn = l;
534
262
  }
535
263
  };
536
264
  }
537
- function Me(t, { pages: e, pageParams: r }) {
538
- const s = e.length - 1;
539
- return e.length > 0 ? t.getNextPageParam(
540
- e[s],
541
- e,
265
+ function _e(e, { pages: t, pageParams: r }) {
266
+ const s = t.length - 1;
267
+ return t.length > 0 ? e.getNextPageParam(
268
+ t[s],
269
+ t,
542
270
  r[s],
543
271
  r
544
272
  ) : void 0;
545
273
  }
546
- function Fr(t, { pages: e, pageParams: r }) {
274
+ function kr(e, { pages: t, pageParams: r }) {
547
275
  var s;
548
- return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
276
+ return t.length > 0 ? (s = e.getPreviousPageParam) == null ? void 0 : s.call(e, t[0], t, r[0], r) : void 0;
549
277
  }
550
- var d, R, I, H, z, T, q, K, Ie, Qr = (Ie = class {
551
- constructor(t = {}) {
552
- y(this, d);
553
- y(this, R);
554
- y(this, I);
555
- y(this, H);
556
- y(this, z);
557
- y(this, T);
558
- y(this, q);
559
- y(this, K);
560
- g(this, d, t.queryCache || new Tr()), g(this, R, t.mutationCache || new _r()), g(this, I, t.defaultOptions || {}), g(this, H, /* @__PURE__ */ new Map()), g(this, z, /* @__PURE__ */ new Map()), g(this, T, 0);
278
+ var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
279
+ constructor(e = {}) {
280
+ N(this, x);
281
+ N(this, I);
282
+ N(this, T);
283
+ N(this, z);
284
+ N(this, B);
285
+ N(this, _);
286
+ N(this, H);
287
+ N(this, U);
288
+ y(this, x, e.queryCache || new Pr()), y(this, I, e.mutationCache || new Cr()), y(this, T, e.defaultOptions || {}), y(this, z, /* @__PURE__ */ new Map()), y(this, B, /* @__PURE__ */ new Map()), y(this, _, 0);
561
289
  }
562
290
  mount() {
563
- X(this, T)._++, l(this, T) === 1 && (g(this, q, _t.subscribe(async (t) => {
564
- t && (await this.resumePausedMutations(), l(this, d).onFocus());
565
- })), g(this, K, Se.subscribe(async (t) => {
566
- t && (await this.resumePausedMutations(), l(this, d).onOnline());
291
+ J(this, _)._++, c(this, _) === 1 && (y(this, H, _t.subscribe(async (e) => {
292
+ e && (await this.resumePausedMutations(), c(this, x).onFocus());
293
+ })), y(this, U, De.subscribe(async (e) => {
294
+ e && (await this.resumePausedMutations(), c(this, x).onOnline());
567
295
  })));
568
296
  }
569
297
  unmount() {
570
- var t, e;
571
- X(this, T)._--, l(this, T) === 0 && ((t = l(this, q)) == null || t.call(this), g(this, q, void 0), (e = l(this, K)) == null || e.call(this), g(this, K, void 0));
298
+ var e, t;
299
+ J(this, _)._--, c(this, _) === 0 && ((e = c(this, H)) == null || e.call(this), y(this, H, void 0), (t = c(this, U)) == null || t.call(this), y(this, U, void 0));
572
300
  }
573
- isFetching(t) {
574
- return l(this, d).findAll({ ...t, fetchStatus: "fetching" }).length;
301
+ isFetching(e) {
302
+ return c(this, x).findAll({ ...e, fetchStatus: "fetching" }).length;
575
303
  }
576
- isMutating(t) {
577
- return l(this, R).findAll({ ...t, status: "pending" }).length;
304
+ isMutating(e) {
305
+ return c(this, I).findAll({ ...e, status: "pending" }).length;
578
306
  }
579
- getQueryData(t) {
307
+ getQueryData(e) {
580
308
  var r;
581
- const e = this.defaultQueryOptions({ queryKey: t });
582
- return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state.data;
309
+ const t = this.defaultQueryOptions({ queryKey: e });
310
+ return (r = c(this, x).get(t.queryHash)) == null ? void 0 : r.state.data;
583
311
  }
584
- ensureQueryData(t) {
585
- const e = this.getQueryData(t.queryKey);
586
- if (e === void 0)
587
- return this.fetchQuery(t);
312
+ ensureQueryData(e) {
313
+ const t = this.getQueryData(e.queryKey);
314
+ if (t === void 0)
315
+ return this.fetchQuery(e);
588
316
  {
589
- const r = this.defaultQueryOptions(t), s = l(this, d).build(this, r);
590
- return t.revalidateIfStale && s.isStaleByTime(Ce(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
317
+ const r = this.defaultQueryOptions(e), s = c(this, x).build(this, r);
318
+ return e.revalidateIfStale && s.isStaleByTime(Oe(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(t);
591
319
  }
592
320
  }
593
- getQueriesData(t) {
594
- return l(this, d).findAll(t).map(({ queryKey: e, state: r }) => {
321
+ getQueriesData(e) {
322
+ return c(this, x).findAll(e).map(({ queryKey: t, state: r }) => {
595
323
  const s = r.data;
596
- return [e, s];
324
+ return [t, s];
597
325
  });
598
326
  }
599
- setQueryData(t, e, r) {
600
- const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, d).get(
327
+ setQueryData(e, t, r) {
328
+ const s = this.defaultQueryOptions({ queryKey: e }), n = c(this, x).get(
601
329
  s.queryHash
602
- ), i = n == null ? void 0 : n.state.data, o = Ft(e, i);
603
- if (o !== void 0)
604
- return l(this, d).build(this, s).setData(o, { ...r, manual: !0 });
330
+ ), o = n == null ? void 0 : n.state.data, i = Ft(t, o);
331
+ if (i !== void 0)
332
+ return c(this, x).build(this, s).setData(i, { ...r, manual: !0 });
605
333
  }
606
- setQueriesData(t, e, r) {
607
- return b.batch(
608
- () => l(this, d).findAll(t).map(({ queryKey: s }) => [
334
+ setQueriesData(e, t, r) {
335
+ return w.batch(
336
+ () => c(this, x).findAll(e).map(({ queryKey: s }) => [
609
337
  s,
610
- this.setQueryData(s, e, r)
338
+ this.setQueryData(s, t, r)
611
339
  ])
612
340
  );
613
341
  }
614
- getQueryState(t) {
342
+ getQueryState(e) {
615
343
  var r;
616
- const e = this.defaultQueryOptions({ queryKey: t });
617
- return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state;
618
- }
619
- removeQueries(t) {
620
- const e = l(this, d);
621
- b.batch(() => {
622
- e.findAll(t).forEach((r) => {
623
- e.remove(r);
344
+ const t = this.defaultQueryOptions({ queryKey: e });
345
+ return (r = c(this, x).get(t.queryHash)) == null ? void 0 : r.state;
346
+ }
347
+ removeQueries(e) {
348
+ const t = c(this, x);
349
+ w.batch(() => {
350
+ t.findAll(e).forEach((r) => {
351
+ t.remove(r);
624
352
  });
625
353
  });
626
354
  }
627
- resetQueries(t, e) {
628
- const r = l(this, d), s = {
355
+ resetQueries(e, t) {
356
+ const r = c(this, x), s = {
629
357
  type: "active",
630
- ...t
358
+ ...e
631
359
  };
632
- return b.batch(() => (r.findAll(t).forEach((n) => {
360
+ return w.batch(() => (r.findAll(e).forEach((n) => {
633
361
  n.reset();
634
- }), this.refetchQueries(s, e)));
362
+ }), this.refetchQueries(s, t)));
635
363
  }
636
- cancelQueries(t = {}, e = {}) {
637
- const r = { revert: !0, ...e }, s = b.batch(
638
- () => l(this, d).findAll(t).map((n) => n.cancel(r))
364
+ cancelQueries(e = {}, t = {}) {
365
+ const r = { revert: !0, ...t }, s = w.batch(
366
+ () => c(this, x).findAll(e).map((n) => n.cancel(r))
639
367
  );
640
- return Promise.all(s).then(M).catch(M);
368
+ return Promise.all(s).then(O).catch(O);
641
369
  }
642
- invalidateQueries(t = {}, e = {}) {
643
- return b.batch(() => {
644
- if (l(this, d).findAll(t).forEach((s) => {
370
+ invalidateQueries(e = {}, t = {}) {
371
+ return w.batch(() => {
372
+ if (c(this, x).findAll(e).forEach((s) => {
645
373
  s.invalidate();
646
- }), t.refetchType === "none")
374
+ }), e.refetchType === "none")
647
375
  return Promise.resolve();
648
376
  const r = {
649
- ...t,
650
- type: t.refetchType ?? t.type ?? "active"
377
+ ...e,
378
+ type: e.refetchType ?? e.type ?? "active"
651
379
  };
652
- return this.refetchQueries(r, e);
380
+ return this.refetchQueries(r, t);
653
381
  });
654
382
  }
655
- refetchQueries(t = {}, e) {
383
+ refetchQueries(e = {}, t) {
656
384
  const r = {
657
- ...e,
658
- cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
659
- }, s = b.batch(
660
- () => l(this, d).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
661
- let i = n.fetch(void 0, r);
662
- return r.throwOnError || (i = i.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
385
+ ...t,
386
+ cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
387
+ }, s = w.batch(
388
+ () => c(this, x).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
389
+ let o = n.fetch(void 0, r);
390
+ return r.throwOnError || (o = o.catch(O)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
663
391
  })
664
392
  );
665
- return Promise.all(s).then(M);
393
+ return Promise.all(s).then(O);
666
394
  }
667
- fetchQuery(t) {
668
- const e = this.defaultQueryOptions(t);
669
- e.retry === void 0 && (e.retry = !1);
670
- const r = l(this, d).build(this, e);
395
+ fetchQuery(e) {
396
+ const t = this.defaultQueryOptions(e);
397
+ t.retry === void 0 && (t.retry = !1);
398
+ const r = c(this, x).build(this, t);
671
399
  return r.isStaleByTime(
672
- Ce(e.staleTime, r)
673
- ) ? r.fetch(e) : Promise.resolve(r.state.data);
400
+ Oe(t.staleTime, r)
401
+ ) ? r.fetch(t) : Promise.resolve(r.state.data);
674
402
  }
675
- prefetchQuery(t) {
676
- return this.fetchQuery(t).then(M).catch(M);
403
+ prefetchQuery(e) {
404
+ return this.fetchQuery(e).then(O).catch(O);
677
405
  }
678
- fetchInfiniteQuery(t) {
679
- return t.behavior = Ae(t.pages), this.fetchQuery(t);
406
+ fetchInfiniteQuery(e) {
407
+ return e.behavior = Te(e.pages), this.fetchQuery(e);
680
408
  }
681
- prefetchInfiniteQuery(t) {
682
- return this.fetchInfiniteQuery(t).then(M).catch(M);
409
+ prefetchInfiniteQuery(e) {
410
+ return this.fetchInfiniteQuery(e).then(O).catch(O);
683
411
  }
684
- ensureInfiniteQueryData(t) {
685
- return t.behavior = Ae(t.pages), this.ensureQueryData(t);
412
+ ensureInfiniteQueryData(e) {
413
+ return e.behavior = Te(e.pages), this.ensureQueryData(e);
686
414
  }
687
415
  resumePausedMutations() {
688
- return Se.isOnline() ? l(this, R).resumePausedMutations() : Promise.resolve();
416
+ return De.isOnline() ? c(this, I).resumePausedMutations() : Promise.resolve();
689
417
  }
690
418
  getQueryCache() {
691
- return l(this, d);
419
+ return c(this, x);
692
420
  }
693
421
  getMutationCache() {
694
- return l(this, R);
422
+ return c(this, I);
695
423
  }
696
424
  getDefaultOptions() {
697
- return l(this, I);
425
+ return c(this, T);
698
426
  }
699
- setDefaultOptions(t) {
700
- g(this, I, t);
427
+ setDefaultOptions(e) {
428
+ y(this, T, e);
701
429
  }
702
- setQueryDefaults(t, e) {
703
- l(this, H).set(Ee(t), {
704
- queryKey: t,
705
- defaultOptions: e
430
+ setQueryDefaults(e, t) {
431
+ c(this, z).set(Me(e), {
432
+ queryKey: e,
433
+ defaultOptions: t
706
434
  });
707
435
  }
708
- getQueryDefaults(t) {
709
- const e = [...l(this, H).values()];
436
+ getQueryDefaults(e) {
437
+ const t = [...c(this, z).values()];
710
438
  let r = {};
711
- return e.forEach((s) => {
712
- ke(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
439
+ return t.forEach((s) => {
440
+ Re(e, s.queryKey) && (r = { ...r, ...s.defaultOptions });
713
441
  }), r;
714
442
  }
715
- setMutationDefaults(t, e) {
716
- l(this, z).set(Ee(t), {
717
- mutationKey: t,
718
- defaultOptions: e
443
+ setMutationDefaults(e, t) {
444
+ c(this, B).set(Me(e), {
445
+ mutationKey: e,
446
+ defaultOptions: t
719
447
  });
720
448
  }
721
- getMutationDefaults(t) {
722
- const e = [...l(this, z).values()];
449
+ getMutationDefaults(e) {
450
+ const t = [...c(this, B).values()];
723
451
  let r = {};
724
- return e.forEach((s) => {
725
- ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
452
+ return t.forEach((s) => {
453
+ Re(e, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
726
454
  }), r;
727
455
  }
728
- defaultQueryOptions(t) {
729
- if (t._defaulted)
730
- return t;
731
- const e = {
732
- ...l(this, I).queries,
733
- ...this.getQueryDefaults(t.queryKey),
734
- ...t,
456
+ defaultQueryOptions(e) {
457
+ if (e._defaulted)
458
+ return e;
459
+ const t = {
460
+ ...c(this, T).queries,
461
+ ...this.getQueryDefaults(e.queryKey),
462
+ ...e,
735
463
  _defaulted: !0
736
464
  };
737
- return e.queryHash || (e.queryHash = qe(
738
- e.queryKey,
739
- e
740
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Qt && (e.enabled = !1), e;
741
- }
742
- defaultMutationOptions(t) {
743
- return t != null && t._defaulted ? t : {
744
- ...l(this, I).mutations,
745
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
746
- ...t,
465
+ return t.queryHash || (t.queryHash = Ke(
466
+ t.queryKey,
467
+ t
468
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Qt && (t.enabled = !1), t;
469
+ }
470
+ defaultMutationOptions(e) {
471
+ return e != null && e._defaulted ? e : {
472
+ ...c(this, T).mutations,
473
+ ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
474
+ ...e,
747
475
  _defaulted: !0
748
476
  };
749
477
  }
750
478
  clear() {
751
- l(this, d).clear(), l(this, R).clear();
752
- }
753
- }, d = new WeakMap(), R = new WeakMap(), I = new WeakMap(), H = new WeakMap(), z = new WeakMap(), T = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Ie);
754
- const Lr = Le(null), ne = {
755
- didCatch: !1,
756
- error: null
757
- };
758
- class Br extends Ct {
759
- constructor(e) {
760
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
761
- }
762
- static getDerivedStateFromError(e) {
763
- return {
764
- didCatch: !0,
765
- error: e
766
- };
767
- }
768
- resetErrorBoundary() {
769
- const {
770
- error: e
771
- } = this.state;
772
- if (e !== null) {
773
- for (var r, s, n = arguments.length, i = new Array(n), o = 0; o < n; o++)
774
- i[o] = arguments[o];
775
- (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
776
- args: i,
777
- reason: "imperative-api"
778
- }), this.setState(ne);
779
- }
780
- }
781
- componentDidCatch(e, r) {
782
- var s, n;
783
- (s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, r);
784
- }
785
- componentDidUpdate(e, r) {
786
- const {
787
- didCatch: s
788
- } = this.state, {
789
- resetKeys: n
790
- } = this.props;
791
- if (s && r.error !== null && Hr(e.resetKeys, n)) {
792
- var i, o;
793
- (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
794
- next: n,
795
- prev: e.resetKeys,
796
- reason: "keys"
797
- }), this.setState(ne);
798
- }
799
- }
800
- render() {
801
- const {
802
- children: e,
803
- fallbackRender: r,
804
- FallbackComponent: s,
805
- fallback: n
806
- } = this.props, {
807
- didCatch: i,
808
- error: o
809
- } = this.state;
810
- let u = e;
811
- if (i) {
812
- const c = {
813
- error: o,
814
- resetErrorBoundary: this.resetErrorBoundary
815
- };
816
- if (typeof r == "function")
817
- u = r(c);
818
- else if (s)
819
- u = we(s, c);
820
- else if (n !== void 0)
821
- u = n;
822
- else
823
- throw o;
824
- }
825
- return we(Lr.Provider, {
826
- value: {
827
- didCatch: i,
828
- error: o,
829
- resetErrorBoundary: this.resetErrorBoundary
830
- }
831
- }, u);
479
+ c(this, x).clear(), c(this, I).clear();
832
480
  }
481
+ }, x = new WeakMap(), I = new WeakMap(), T = new WeakMap(), z = new WeakMap(), B = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), U = new WeakMap(), Be);
482
+ function Dr(e) {
483
+ return e;
833
484
  }
834
- function Hr() {
835
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
836
- return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
485
+ function Fe(e, t, r) {
486
+ var d, l;
487
+ if (typeof t != "object" || t === null)
488
+ return;
489
+ const s = e.getMutationCache(), n = e.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((l = e.getDefaultOptions().hydrate) == null ? void 0 : l.deserializeData) ?? Dr, i = t.mutations || [], u = t.queries || [];
490
+ i.forEach(({ state: p, ...f }) => {
491
+ var h, g;
492
+ s.build(
493
+ e,
494
+ {
495
+ ...(h = e.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
496
+ ...(g = r == null ? void 0 : r.defaultOptions) == null ? void 0 : g.mutations,
497
+ ...f
498
+ },
499
+ p
500
+ );
501
+ }), u.forEach(({ queryKey: p, state: f, queryHash: h, meta: g, promise: v }) => {
502
+ var W, $;
503
+ let m = n.get(h);
504
+ const E = f.data === void 0 ? f.data : o(f.data);
505
+ if (m) {
506
+ if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
507
+ const { fetchStatus: b, ...P } = f;
508
+ m.setState({
509
+ ...P,
510
+ data: E
511
+ });
512
+ }
513
+ } else
514
+ m = n.build(
515
+ e,
516
+ {
517
+ ...(W = e.getDefaultOptions().hydrate) == null ? void 0 : W.queries,
518
+ ...($ = r == null ? void 0 : r.defaultOptions) == null ? void 0 : $.queries,
519
+ queryKey: p,
520
+ queryHash: h,
521
+ meta: g
522
+ },
523
+ // Reset fetch status to idle to avoid
524
+ // query being stuck in fetching state upon hydration
525
+ {
526
+ ...f,
527
+ data: E,
528
+ fetchStatus: "idle"
529
+ }
530
+ );
531
+ if (v) {
532
+ const b = Promise.resolve(v).then(o);
533
+ m.fetch(void 0, { initialPromise: b });
534
+ }
535
+ });
837
536
  }
838
- const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", qr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Kr = (t) => "renderSearch" in t && typeof t.renderSearch == "function", $r = (t) => "initialize" in t && typeof t.initialize == "function", Ur = (t) => "getHead" in t && typeof t.getHead == "function", Vr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Wr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Qr();
839
- class Yr {
840
- constructor(e) {
841
- v(this, "plugins");
842
- v(this, "sidebars");
843
- v(this, "topNavigation");
844
- v(this, "meta");
845
- v(this, "page");
846
- v(this, "authentication");
847
- v(this, "navigationPlugins");
848
- v(this, "initialize", async () => {
849
- await Promise.all(
850
- this.plugins.filter($r).map((e) => {
851
- var r;
852
- return (r = e.initialize) == null ? void 0 : r.call(e, this);
853
- })
537
+ var Or = ({
538
+ children: e,
539
+ options: t = {},
540
+ state: r,
541
+ queryClient: s
542
+ }) => {
543
+ const n = qt(s), [o, i] = G.useState(), u = G.useRef(t);
544
+ return u.current = t, G.useMemo(() => {
545
+ if (r) {
546
+ if (typeof r != "object")
547
+ return;
548
+ const d = n.getQueryCache(), l = r.queries || [], p = [], f = [];
549
+ for (const h of l) {
550
+ const g = d.get(h.queryHash);
551
+ if (!g)
552
+ p.push(h);
553
+ else {
554
+ const v = h.state.dataUpdatedAt > g.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
555
+ (E) => E.queryHash === h.queryHash
556
+ );
557
+ v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
558
+ }
559
+ }
560
+ p.length > 0 && Fe(n, { queries: p }, u.current), f.length > 0 && i(
561
+ (h) => h ? [...h, ...f] : f
854
562
  );
855
- });
856
- v(this, "invalidateCache", async (e) => {
857
- await et.invalidateQueries({ queryKey: e });
858
- });
859
- v(this, "getApiIdentities", async () => (await Promise.all(
860
- this.plugins.filter(Wr).map((r) => r.getIdentities(this))
861
- )).flat());
862
- v(this, "getPluginSidebar", async (e) => (await Promise.all(
863
- this.navigationPlugins.map(
864
- (s) => {
865
- var n;
866
- return (n = s.getSidebar) == null ? void 0 : n.call(s, L(e));
563
+ }
564
+ }, [n, o, r]), G.useEffect(() => {
565
+ o && (Fe(n, { queries: o }, u.current), i(void 0));
566
+ }, [n, o]), e;
567
+ }, Y = {};
568
+ const Mr = /* @__PURE__ */ xe(Xt), Rr = /* @__PURE__ */ xe(Jt), Ir = /* @__PURE__ */ xe(Nt);
569
+ Object.defineProperty(Y, "__esModule", { value: !0 });
570
+ var Tr = Ye, A = Mr, Se = Rr, M = Ir;
571
+ function _r(e) {
572
+ if (e && e.__esModule) return e;
573
+ var t = /* @__PURE__ */ Object.create(null);
574
+ return e && Object.keys(e).forEach(function(r) {
575
+ if (r !== "default") {
576
+ var s = Object.getOwnPropertyDescriptor(e, r);
577
+ Object.defineProperty(t, r, s.get ? s : {
578
+ enumerable: !0,
579
+ get: function() {
580
+ return e[r];
867
581
  }
868
- )
869
- )).flatMap((s) => s ?? []));
870
- v(this, "signRequest", async (e) => {
871
- if (!this.authentication)
872
- throw new Error("No authentication provider configured");
873
- const r = await this.authentication.getAccessToken();
874
- return e.headers.set("Authorization", `Bearer ${r}`), e;
875
- });
876
- this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(qr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
877
- }
878
- }
879
- function Xr({ error: t, resetErrorBoundary: e }) {
880
- return /* @__PURE__ */ a.jsx(Fe, { error: t });
582
+ });
583
+ }
584
+ }), t.default = e, Object.freeze(t);
881
585
  }
882
- const J = globalThis;
883
- (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
884
- const De = {
885
- info: "bg-blue-500",
886
- note: "bg-gray-500",
887
- tip: "bg-green-600",
888
- caution: "bg-orange-500",
889
- danger: "bg-rose-500"
890
- }, Zr = () => {
891
- const { page: t } = F(), [e, r] = Q(!0);
892
- if (!(t != null && t.banner) || !e)
893
- return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
894
- const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
895
- return /* @__PURE__ */ a.jsxs(
896
- "div",
897
- {
898
- className: A(
899
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
900
- s
901
- ),
902
- style: n,
903
- children: [
904
- /* @__PURE__ */ a.jsx("div", { className: "w-full", children: t.banner.message }),
905
- t.banner.dismissible && /* @__PURE__ */ a.jsx(
906
- "button",
907
- {
908
- type: "button",
909
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
910
- onClick: () => r(!1),
911
- children: /* @__PURE__ */ a.jsx(Yt, { size: 16 })
912
- }
913
- )
914
- ]
586
+ var C = /* @__PURE__ */ _r(Tr);
587
+ function Fr({
588
+ basename: e,
589
+ children: t,
590
+ location: r = "/",
591
+ future: s
592
+ }) {
593
+ typeof r == "string" && (r = M.parsePath(r));
594
+ let n = A.Action.Pop, o = {
595
+ pathname: r.pathname || "/",
596
+ search: r.search || "",
597
+ hash: r.hash || "",
598
+ state: r.state != null ? r.state : null,
599
+ key: r.key || "default"
600
+ }, i = nt();
601
+ return /* @__PURE__ */ C.createElement(M.Router, {
602
+ basename: e,
603
+ children: t,
604
+ location: o,
605
+ navigationType: n,
606
+ navigator: i,
607
+ future: s,
608
+ static: !0
609
+ });
610
+ }
611
+ function Qr({
612
+ context: e,
613
+ router: t,
614
+ hydrate: r = !0,
615
+ nonce: s
616
+ }) {
617
+ t && e || (process.env.NODE_ENV !== "production" ? A.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : A.UNSAFE_invariant(!1));
618
+ let n = {
619
+ router: t,
620
+ navigator: nt(),
621
+ static: !0,
622
+ staticContext: e,
623
+ basename: e.basename || "/"
624
+ }, o = /* @__PURE__ */ new Map(), i = "";
625
+ if (r !== !1) {
626
+ let d = {
627
+ loaderData: e.loaderData,
628
+ actionData: e.actionData,
629
+ errors: Lr(e.errors)
630
+ };
631
+ i = `window.__staticRouterHydrationData = JSON.parse(${Kr(JSON.stringify(JSON.stringify(d)))});`;
632
+ }
633
+ let {
634
+ state: u
635
+ } = n.router;
636
+ return /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterContext.Provider, {
637
+ value: n
638
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterStateContext.Provider, {
639
+ value: u
640
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_FetchersContext.Provider, {
641
+ value: o
642
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_ViewTransitionContext.Provider, {
643
+ value: {
644
+ isTransitioning: !1
915
645
  }
916
- );
917
- }, tt = () => {
918
- const t = F(), [e, r] = Q(!1), s = Be(() => r(!1), []);
919
- _(() => {
920
- if (e)
921
- return;
922
- function i(o) {
923
- o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!0));
646
+ }, /* @__PURE__ */ C.createElement(M.Router, {
647
+ basename: n.basename,
648
+ location: u.location,
649
+ navigationType: u.historyAction,
650
+ navigator: n.navigator,
651
+ static: n.static,
652
+ future: {
653
+ v7_relativeSplatPath: t.future.v7_relativeSplatPath
924
654
  }
925
- return window.addEventListener("keydown", i), () => {
926
- window.removeEventListener("keydown", i);
927
- };
928
- }, [e, r]);
929
- const n = t.plugins.find(Kr);
930
- return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
931
- /* @__PURE__ */ a.jsxs(
932
- "button",
933
- {
934
- type: "button",
935
- onClick: () => r(!0),
936
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
937
- children: [
938
- /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
939
- /* @__PURE__ */ a.jsx(Xt, { size: 14 }),
940
- "Search"
941
- ] }),
942
- /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
943
- ]
944
- }
945
- ),
946
- /* @__PURE__ */ a.jsx(de, { fallback: null, children: n.renderSearch({
947
- isOpen: e,
948
- onClose: s
949
- }) })
950
- ] }) : null;
951
- }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Jr = () => {
952
- const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
953
- return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(de, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(Gr, { ...r }) }, r.id)) }) }) });
954
- }, Gr = ({ id: t, label: e, default: r }) => {
955
- var c;
956
- const { sidebars: s } = F(), n = Ke(), i = s[t], o = r ?? (i ? Lt(i, (m) => {
957
- if (m.type === "doc") return L(m.id);
958
- }) : L(t));
959
- if (!o)
960
- throw new Error(
961
- `No links found in top navigation for top navigation '${t}'. Check that the sidebar isn't empty or that a default link set.`
962
- );
963
- const u = ((c = n.data.topNavItem) == null ? void 0 : c.id) === t;
964
- return /* @__PURE__ */ a.jsx(
965
- te,
966
- {
967
- className: Ue(
968
- "block py-3.5 font-medium -mb-px border-b-2",
969
- u ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
970
- ),
971
- to: o,
972
- children: e
655
+ }, /* @__PURE__ */ C.createElement(qr, {
656
+ routes: t.routes,
657
+ future: t.future,
658
+ state: u
659
+ })))))), i ? /* @__PURE__ */ C.createElement("script", {
660
+ suppressHydrationWarning: !0,
661
+ nonce: s,
662
+ dangerouslySetInnerHTML: {
663
+ __html: i
973
664
  }
974
- );
975
- }, ea = () => {
976
- const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
977
- return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
978
- /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Zt, { size: 22 }) }) }),
979
- /* @__PURE__ */ a.jsxs(
980
- Ye,
981
- {
982
- className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
983
- "aria-describedby": void 0,
984
- children: [
985
- /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
986
- /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
987
- /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
988
- G,
989
- {
990
- className: ({ isActive: s }) => Ue(
991
- "block font-medium border-b-2",
992
- s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
993
- ),
994
- to: r.id,
995
- children: /* @__PURE__ */ a.jsx(gr, { children: r.label })
996
- }
997
- ) }, r.label)) })
998
- ]
999
- }
1000
- )
1001
- ] });
1002
- }, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(lr, { children: [
1003
- /* @__PURE__ */ a.jsx(cr, { children: t.label }),
1004
- /* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx(dr, { children: t.children.map((e, r) => (
1005
- // eslint-disable-next-line react/no-array-index-key
1006
- /* @__PURE__ */ a.jsx(at, { item: e }, r)
1007
- )) }) })
1008
- ] }, t.label) : /* @__PURE__ */ a.jsx(te, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(hr, { children: t.label }, t.label) }), st = He(function() {
1009
- const e = ee(), [r, s] = $t(), { isAuthenticated: n, profile: i, isAuthEnabled: o } = ee(), u = F(), { page: c, plugins: m } = u, j = m.filter((p) => zr(p)).flatMap((p) => p.getProfileMenuItems(u)).map((p) => /* @__PURE__ */ a.jsx(at, { item: p }, p.label)), N = r ? Jt : Gt;
1010
- return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1011
- /* @__PURE__ */ a.jsx(Zr, {}),
1012
- /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1013
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
1014
- /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(te, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1015
- (c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1016
- /* @__PURE__ */ a.jsx(
1017
- "img",
1018
- {
1019
- src: /https?:\/\//.test(c.logo.src.light) ? c.logo.src.light : L(
1020
- "/",
1021
- c.logo.src.light
1022
- ),
1023
- alt: c.logo.alt ?? c.pageTitle,
1024
- style: { width: c.logo.width },
1025
- className: A("h-10", r && "hidden"),
1026
- loading: "lazy"
1027
- }
1028
- ),
1029
- /* @__PURE__ */ a.jsx(
1030
- "img",
1031
- {
1032
- src: /https?:\/\//.test(c.logo.src.dark) ? c.logo.src.dark : L(
1033
- "/",
1034
- c.logo.src.dark
1035
- ),
1036
- alt: c.logo.alt ?? c.pageTitle,
1037
- style: { width: c.logo.width },
1038
- className: A("h-10", !r && "hidden"),
1039
- loading: "lazy"
1040
- }
1041
- )
1042
- ] }),
1043
- /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.pageTitle })
1044
- ] }) }) }),
1045
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1046
- /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
1047
- /* @__PURE__ */ a.jsx(ea, {}),
1048
- /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1049
- /* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
1050
- o && !n ? /* @__PURE__ */ a.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : j.length > 0 && /* @__PURE__ */ a.jsxs(ar, { modal: !1, children: [
1051
- /* @__PURE__ */ a.jsx(sr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ie, { variant: "ghost", children: i != null && i.email ? `${i.email}` : "My Account" }) }),
1052
- /* @__PURE__ */ a.jsxs(nr, { className: "w-56", children: [
1053
- /* @__PURE__ */ a.jsx(ir, { children: "My Account" }),
1054
- /* @__PURE__ */ a.jsx(or, {}),
1055
- j
1056
- ] })
1057
- ] }),
1058
- /* @__PURE__ */ a.jsx(
1059
- "button",
1060
- {
1061
- type: "button",
1062
- "aria-label": r ? "Switch to light mode" : "Switch to dark mode",
1063
- className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
1064
- onClick: s,
1065
- children: /* @__PURE__ */ a.jsx(N, { size: 18 })
1066
- }
1067
- ),
1068
- /* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
1069
- ] })
1070
- ] })
1071
- ] }),
1072
- /* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
1073
- /* @__PURE__ */ a.jsx(Jr, {}),
1074
- /* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
1075
- ] })
1076
- ] });
1077
- }), nt = {
1078
- Header: st
1079
- }, ta = Le(nt), ra = ta.Provider, aa = (t) => {
1080
- const [e, r] = Q(!1);
1081
- _(() => {
1082
- const i = localStorage.getItem("theme"), o = window.matchMedia("(prefers-color-scheme: dark)"), u = i === "dark" || !i && o.matches;
1083
- r(u);
1084
- }, [e]);
1085
- const s = Be(() => {
1086
- const i = !e;
1087
- document.documentElement.classList.toggle("dark", i), localStorage.setItem("theme", i ? "dark" : "light"), r(i);
1088
- }, [e]), n = [e, s];
1089
- return /* @__PURE__ */ a.jsx(Ut.Provider, { value: n, ...t });
1090
- }, sa = ({
1091
- children: t,
1092
- context: e
1093
- }) => (Bt({
1094
- queryFn: async () => (await e.initialize(), !0),
1095
- queryKey: ["zudoku-initialize"]
1096
- }), /* @__PURE__ */ a.jsx(Ht.Provider, { value: e, children: t })), na = ({
1097
- children: t,
1098
- ...e
1099
- }) => {
1100
- var N, p;
1101
- const r = re(
1102
- () => ({ ...nt, ...e.overrides }),
1103
- [e.overrides]
1104
- ), s = re(() => {
1105
- var h;
665
+ }) : null);
666
+ }
667
+ function qr({
668
+ routes: e,
669
+ future: t,
670
+ state: r
671
+ }) {
672
+ return Se.UNSAFE_useRoutesImpl(e, void 0, r, t);
673
+ }
674
+ function Lr(e) {
675
+ if (!e) return null;
676
+ let t = Object.entries(e), r = {};
677
+ for (let [s, n] of t)
678
+ A.isRouteErrorResponse(n) ? r[s] = {
679
+ ...n,
680
+ __type: "RouteErrorResponse"
681
+ } : n instanceof Error ? r[s] = {
682
+ message: n.message,
683
+ __type: "Error",
684
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
685
+ // can re-create the same type during hydration.
686
+ ...n.name !== "Error" ? {
687
+ __subType: n.name
688
+ } : {}
689
+ } : r[s] = n;
690
+ return r;
691
+ }
692
+ function nt() {
693
+ return {
694
+ createHref: it,
695
+ encodeLocation: ot,
696
+ push(e) {
697
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
698
+ },
699
+ replace(e) {
700
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
701
+ },
702
+ go(e) {
703
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
704
+ },
705
+ back() {
706
+ throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
707
+ },
708
+ forward() {
709
+ throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
710
+ }
711
+ };
712
+ }
713
+ function zr(e, t) {
714
+ return A.createStaticHandler(e, {
715
+ ...t,
716
+ mapRouteProperties: Se.UNSAFE_mapRouteProperties
717
+ });
718
+ }
719
+ function Br(e, t, r = {}) {
720
+ let s = {}, n = A.UNSAFE_convertRoutesToDataRoutes(e, Se.UNSAFE_mapRouteProperties, void 0, s), o = t.matches.map((u) => {
721
+ let d = s[u.route.id] || u.route;
1106
722
  return {
1107
- ...(e.plugins ?? []).filter(Vr).flatMap(
1108
- (f) => f.getMdxComponents ? [f.getMdxComponents()] : []
1109
- ).reduce((f, B) => ({ ...f, ...B }), {}),
1110
- ...Vt,
1111
- ...(h = e.mdx) == null ? void 0 : h.components
723
+ ...u,
724
+ route: d
725
+ };
726
+ }), i = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
727
+ return {
728
+ get basename() {
729
+ return t.basename;
730
+ },
731
+ get future() {
732
+ var u, d;
733
+ return {
734
+ v7_fetcherPersist: !1,
735
+ v7_normalizeFormMethod: !1,
736
+ v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
737
+ v7_prependBasename: !1,
738
+ v7_relativeSplatPath: ((d = r.future) == null ? void 0 : d.v7_relativeSplatPath) === !0,
739
+ v7_skipActionErrorRevalidation: !1
740
+ };
741
+ },
742
+ get state() {
743
+ return {
744
+ historyAction: A.Action.Pop,
745
+ location: t.location,
746
+ matches: o,
747
+ loaderData: t.loaderData,
748
+ actionData: t.actionData,
749
+ errors: t.errors,
750
+ initialized: !0,
751
+ navigation: A.IDLE_NAVIGATION,
752
+ restoreScrollPosition: null,
753
+ preventScrollReset: !1,
754
+ revalidation: "idle",
755
+ fetchers: /* @__PURE__ */ new Map(),
756
+ blockers: /* @__PURE__ */ new Map()
757
+ };
758
+ },
759
+ get routes() {
760
+ return n;
761
+ },
762
+ get window() {
763
+ },
764
+ initialize() {
765
+ throw i("initialize");
766
+ },
767
+ subscribe() {
768
+ throw i("subscribe");
769
+ },
770
+ enableScrollRestoration() {
771
+ throw i("enableScrollRestoration");
772
+ },
773
+ navigate() {
774
+ throw i("navigate");
775
+ },
776
+ fetch() {
777
+ throw i("fetch");
778
+ },
779
+ revalidate() {
780
+ throw i("revalidate");
781
+ },
782
+ createHref: it,
783
+ encodeLocation: ot,
784
+ getFetcher() {
785
+ return A.IDLE_FETCHER;
786
+ },
787
+ deleteFetcher() {
788
+ throw i("deleteFetcher");
789
+ },
790
+ dispose() {
791
+ throw i("dispose");
792
+ },
793
+ getBlocker() {
794
+ return A.IDLE_BLOCKER;
795
+ },
796
+ deleteBlocker() {
797
+ throw i("deleteBlocker");
798
+ },
799
+ patchRoutes() {
800
+ throw i("patchRoutes");
801
+ },
802
+ _internalFetchControllers: /* @__PURE__ */ new Map(),
803
+ _internalActiveDeferreds: /* @__PURE__ */ new Map(),
804
+ _internalSetRoutes() {
805
+ throw i("_internalSetRoutes");
806
+ }
807
+ };
808
+ }
809
+ function it(e) {
810
+ return typeof e == "string" ? e : M.createPath(e);
811
+ }
812
+ function ot(e) {
813
+ let t = typeof e == "string" ? e : M.createPath(e);
814
+ t = t.replace(/ $/, "%20");
815
+ let r = Hr.test(t) ? new URL(t) : new URL(t, "http://localhost");
816
+ return {
817
+ pathname: r.pathname,
818
+ search: r.search,
819
+ hash: r.hash
820
+ };
821
+ }
822
+ const Hr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ur = {
823
+ "&": "\\u0026",
824
+ ">": "\\u003e",
825
+ "<": "\\u003c",
826
+ "\u2028": "\\u2028",
827
+ "\u2029": "\\u2029"
828
+ }, $r = /[&><\u2028\u2029]/g;
829
+ function Kr(e) {
830
+ return e.replace($r, (t) => Ur[t]);
831
+ }
832
+ Y.StaticRouter = Fr;
833
+ var Vr = Y.StaticRouterProvider = Qr;
834
+ Y.createStaticHandler = zr;
835
+ Y.createStaticRouter = Br;
836
+ const Zr = new Ar({
837
+ defaultOptions: {
838
+ queries: {
839
+ staleTime: 1e3 * 60 * 5
840
+ }
841
+ }
842
+ }), Yr = ({
843
+ router: e,
844
+ hydrate: t = !1
845
+ }) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: Zr, children: /* @__PURE__ */ a.jsx(Or, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(He, { children: /* @__PURE__ */ a.jsx(ue.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
846
+ Et,
847
+ {
848
+ router: e,
849
+ future: { v7_startTransition: !0 }
850
+ }
851
+ ) }) }) }) }) }), Wr = ({
852
+ router: e,
853
+ context: t,
854
+ queryClient: r,
855
+ helmetContext: s
856
+ }) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: r, children: /* @__PURE__ */ a.jsx(He, { context: s, children: /* @__PURE__ */ a.jsx(Vr, { router: e, context: t }) }) }) });
857
+ var he = { exports: {} };
858
+ (function(e, t) {
859
+ (function(r, s) {
860
+ s(t, Ye);
861
+ })(Wt, function(r, s) {
862
+ const n = {
863
+ delay: 500,
864
+ minDuration: 200,
865
+ ssr: !0
1112
866
  };
1113
- }, [(N = e.mdx) == null ? void 0 : N.components, e.plugins]), { stagger: n } = Et(oe), [i, o] = Q(!1), u = re(
1114
- () => i ? { stagger: !0 } : { stagger: n },
1115
- [n, i]
1116
- ), c = xt();
1117
- _(() => {
1118
- i || o(!0);
1119
- }, [i, c.location]);
1120
- const [m] = Q(() => new Yr(e)), j = (p = e.plugins) == null ? void 0 : p.filter(Ur).map((P, h) => {
1121
- var f;
1122
- return /* @__PURE__ */ a.jsx(kt, { children: (f = P.getHead) == null ? void 0 : f.call(P) }, h);
867
+ function o() {
868
+ const [u, d] = s.useState(!0);
869
+ return s.useEffect(() => {
870
+ d(!1);
871
+ }, []), u;
872
+ }
873
+ function i(u, d) {
874
+ d = Object.assign({}, n, d);
875
+ const l = o() && d.ssr, p = l && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(p), g = s.useRef(null);
876
+ return s.useEffect(() => {
877
+ if (u && (f === "IDLE" || l)) {
878
+ clearTimeout(g.current);
879
+ const v = l ? 0 : d.delay;
880
+ g.current = setTimeout(() => {
881
+ if (!u)
882
+ return h("IDLE");
883
+ g.current = setTimeout(() => {
884
+ h("EXPIRE");
885
+ }, d.minDuration), h("DISPLAY");
886
+ }, v), l || h("DELAY");
887
+ }
888
+ !u && f !== "DISPLAY" && (clearTimeout(g.current), h("IDLE"));
889
+ }, [u, f, d.delay, d.minDuration, l]), s.useEffect(() => () => clearTimeout(g.current), []), f === "DISPLAY" || f === "EXPIRE";
890
+ }
891
+ r.defaultOptions = n, r.useSpinDelay = i;
1123
892
  });
1124
- return /* @__PURE__ */ a.jsxs(zt, { client: et, children: [
1125
- /* @__PURE__ */ a.jsx(ce, { children: j }),
1126
- /* @__PURE__ */ a.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ a.jsx(sa, { context: m, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(aa, { children: /* @__PURE__ */ a.jsx(ra, { value: r, children: /* @__PURE__ */ a.jsx(wt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Wt, { children: t ?? /* @__PURE__ */ a.jsx(_e, {}) }) }) }) }) }) }) })
1127
- ] });
1128
- }, ia = He(na), pe = (t) => /* @__PURE__ */ a.jsx(Br, { FallbackComponent: Xr, children: /* @__PURE__ */ a.jsx(ia, { ...t }) });
1129
- pe.displayName = "DevPortal";
1130
- const oa = ({
1131
- category: t,
1132
- level: e
893
+ })(he, he.exports);
894
+ var Xr = he.exports;
895
+ const Jr = ({
896
+ category: e,
897
+ level: t
1133
898
  }) => {
1134
- var p, P;
1135
- const r = qt(t), [s, n] = Q(!1), i = t.collapsible ?? !0, o = t.collapsed ?? !0, u = !!(!i || !o || r), [c, m] = Q(u), j = bt(((p = t.link) == null ? void 0 : p.id) ?? "");
1136
- _(() => {
1137
- r && m(!0);
899
+ var h, g;
900
+ const r = Lt(e), [s, n] = q(!1), o = e.collapsible ?? !0, i = e.collapsed ?? !0, u = !!(!o || !i || r), [d, l] = q(u), p = Gt(((h = e.link) == null ? void 0 : h.id) ?? "");
901
+ L(() => {
902
+ r && l(!0);
1138
903
  }, [r]);
1139
- const N = i && /* @__PURE__ */ a.jsx(
904
+ const f = o && /* @__PURE__ */ a.jsx(
1140
905
  "button",
1141
906
  {
1142
907
  type: "button",
1143
- onClick: (h) => {
1144
- h.preventDefault(), m((f) => !f), n(!0);
908
+ onClick: (v) => {
909
+ v.preventDefault(), l((m) => !m), n(!0);
1145
910
  },
1146
911
  children: /* @__PURE__ */ a.jsx(
1147
912
  er,
1148
913
  {
1149
914
  size: 16,
1150
- className: A(
915
+ className: R(
1151
916
  s && "transition",
1152
917
  "shrink-0 group-data-[state=open]:rotate-90"
1153
918
  )
@@ -1156,86 +921,86 @@ const oa = ({
1156
921
  }
1157
922
  );
1158
923
  return /* @__PURE__ */ a.jsxs(
1159
- se.Root,
924
+ oe.Root,
1160
925
  {
1161
926
  className: "flex flex-col",
1162
927
  defaultOpen: u,
1163
- open: c,
1164
- onOpenChange: () => m(!0),
928
+ open: d,
929
+ onOpenChange: () => l(!0),
1165
930
  children: [
1166
- /* @__PURE__ */ a.jsx(se.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
931
+ /* @__PURE__ */ a.jsx(oe.Trigger, { className: "group", asChild: !0, disabled: !o, children: /* @__PURE__ */ a.jsxs(
1167
932
  "div",
1168
933
  {
1169
934
  onClick: () => n(!0),
1170
- className: U({
935
+ className: V({
1171
936
  isActive: !1,
1172
- isTopLevel: e === 0,
937
+ isTopLevel: t === 0,
1173
938
  className: [
1174
939
  "text-start",
1175
- i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
940
+ o ? "cursor-pointer" : "cursor-default hover:bg-transparent"
1176
941
  ]
1177
942
  }),
1178
943
  children: [
1179
- t.icon && /* @__PURE__ */ a.jsx(
1180
- t.icon,
944
+ e.icon && /* @__PURE__ */ a.jsx(
945
+ e.icon,
1181
946
  {
1182
947
  size: 16,
1183
- className: A(
948
+ className: R(
1184
949
  "align-[-0.125em] -translate-x-1",
1185
- j && "text-primary"
950
+ p && "text-primary"
1186
951
  )
1187
952
  }
1188
953
  ),
1189
- ((P = t.link) == null ? void 0 : P.type) === "doc" ? /* @__PURE__ */ a.jsx(
1190
- G,
954
+ ((g = e.link) == null ? void 0 : g.type) === "doc" ? /* @__PURE__ */ a.jsx(
955
+ ae,
1191
956
  {
1192
- to: L(t.link.id),
957
+ to: Q(e.link.id),
1193
958
  className: "flex-1",
1194
959
  onClick: () => {
1195
- j && !c && m(!0);
960
+ p && !d && l(!0);
1196
961
  },
1197
962
  children: /* @__PURE__ */ a.jsxs(
1198
963
  "div",
1199
964
  {
1200
- className: A(
965
+ className: R(
1201
966
  "flex items-center gap-2 justify-between w-full",
1202
- j ? "text-primary" : "text-foreground/80"
967
+ p ? "text-primary" : "text-foreground/80"
1203
968
  ),
1204
969
  children: [
1205
- /* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
1206
- N
970
+ /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
971
+ f
1207
972
  ]
1208
973
  }
1209
974
  )
1210
975
  }
1211
976
  ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
1212
- /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
1213
- N
977
+ /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
978
+ f
1214
979
  ] })
1215
980
  ]
1216
981
  }
1217
982
  ) }),
1218
983
  /* @__PURE__ */ a.jsx(
1219
- se.Content,
984
+ oe.Content,
1220
985
  {
1221
- className: A(
986
+ className: R(
1222
987
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
1223
988
  s && "CollapsibleContent"
1224
989
  ),
1225
- children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((h) => /* @__PURE__ */ a.jsx(
1226
- le,
990
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
991
+ fe,
1227
992
  {
1228
- level: e + 1,
1229
- item: h
993
+ level: t + 1,
994
+ item: v
1230
995
  },
1231
- ("id" in h ? h.id : "") + ("href" in h ? h.href : "") + h.label
996
+ ("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
1232
997
  )) })
1233
998
  }
1234
999
  )
1235
1000
  ]
1236
1001
  }
1237
1002
  );
1238
- }, U = fr(
1003
+ }, V = ur(
1239
1004
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
1240
1005
  {
1241
1006
  variants: {
@@ -1256,212 +1021,619 @@ const oa = ({
1256
1021
  isActive: !1
1257
1022
  }
1258
1023
  }
1259
- ), it = "data-anchor", le = ({
1260
- item: t,
1261
- level: e = 0
1024
+ ), lt = "data-anchor", fe = ({
1025
+ item: e,
1026
+ level: t = 0
1262
1027
  }) => {
1263
- var n, i;
1264
- const { activeAnchor: r } = ge(), [s] = yt();
1265
- switch (t.type) {
1028
+ var n, o;
1029
+ const { activeAnchor: r } = we(), [s] = Pt();
1030
+ switch (e.type) {
1266
1031
  case "category":
1267
- return /* @__PURE__ */ a.jsx(oa, { category: t, level: e });
1032
+ return /* @__PURE__ */ a.jsx(Jr, { category: e, level: t });
1268
1033
  case "doc":
1269
1034
  return /* @__PURE__ */ a.jsxs(
1270
- G,
1035
+ ae,
1271
1036
  {
1272
- className: ({ isActive: o }) => U({ isActive: o, isTopLevel: e === 0 }),
1273
- to: L(t.id),
1037
+ className: ({ isActive: i }) => V({ isActive: i, isTopLevel: t === 0 }),
1038
+ to: Q(e.id),
1274
1039
  children: [
1275
- t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
1276
- t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1277
- /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
1278
- /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1279
- ] }) : t.label
1040
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
1041
+ e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1042
+ /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
1043
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
1044
+ ] }) : e.label
1280
1045
  ]
1281
1046
  }
1282
1047
  );
1283
1048
  case "link":
1284
- return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1285
- ft,
1049
+ return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1050
+ jt,
1286
1051
  {
1287
- to: { hash: t.href, search: s.toString() },
1288
- [it]: t.href.slice(1),
1289
- className: U({
1290
- isActive: t.href.slice(1) === r,
1291
- isTopLevel: e === 0,
1292
- className: ((n = t.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
1052
+ to: { hash: e.href, search: s.toString() },
1053
+ [lt]: e.href.slice(1),
1054
+ className: V({
1055
+ isActive: e.href.slice(1) === r,
1056
+ isTopLevel: t === 0,
1057
+ className: ((n = e.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
1293
1058
  }),
1294
- children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1295
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1296
- /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1297
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
1059
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1060
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
1061
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
1062
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1298
1063
  }
1299
- ) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1064
+ ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1300
1065
  "a",
1301
1066
  {
1302
- className: U({ isTopLevel: e === 0 }),
1303
- href: t.href,
1067
+ className: V({ isTopLevel: t === 0 }),
1068
+ href: e.href,
1304
1069
  target: "_blank",
1305
1070
  rel: "noopener noreferrer",
1306
1071
  children: [
1307
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
1072
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
1308
1073
  /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(tr, { className: "inline -translate-y-0.5", size: 12 }) })
1309
1074
  ]
1310
1075
  }
1311
1076
  ) : /* @__PURE__ */ a.jsx(
1312
- G,
1077
+ ae,
1313
1078
  {
1314
- className: U({
1315
- className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
1079
+ className: V({
1080
+ className: ((o = e.badge) == null ? void 0 : o.placement) !== "start" && "justify-between"
1316
1081
  }),
1317
- to: t.href,
1318
- children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1319
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1320
- /* @__PURE__ */ a.jsx(ae, { ...t.badge })
1321
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
1082
+ to: e.href,
1083
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1084
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
1085
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
1086
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1322
1087
  }
1323
1088
  );
1324
1089
  }
1325
- }, la = (t, e = { block: "center" }) => {
1326
- if (!t) return;
1327
- const r = t.getBoundingClientRect();
1328
- r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
1329
- }, ca = () => {
1330
- const t = ue(), { setActiveAnchor: e } = ge();
1331
- _(() => {
1332
- if (!t.hash) return;
1333
- const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
1334
- const n = document.getElementById(r), i = document.querySelector(`[${it}="${r}"]`);
1335
- return n ? (n.scrollIntoView(), la(i), requestIdleCallback(() => e(r)), !0) : !1;
1090
+ }, Gr = (e, t = { block: "center" }) => {
1091
+ if (!e) return;
1092
+ const r = e.getBoundingClientRect();
1093
+ r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
1094
+ }, ea = () => {
1095
+ const e = ye(), { setActiveAnchor: t } = we();
1096
+ L(() => {
1097
+ if (!e.hash) return;
1098
+ const r = decodeURIComponent(e.hash.split("/")[0].slice(1)), s = () => {
1099
+ const n = document.getElementById(r), o = document.querySelector(`[${lt}="${r}"]`);
1100
+ return n ? (n.scrollIntoView(), Gr(o), requestIdleCallback(() => t(r)), !0) : !1;
1336
1101
  };
1337
1102
  if (!s()) {
1338
- const n = new MutationObserver((i, o) => {
1339
- s() && o.disconnect();
1103
+ const n = new MutationObserver((o, i) => {
1104
+ s() && i.disconnect();
1340
1105
  });
1341
1106
  return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
1342
1107
  }
1343
- }, [t.hash, e]);
1108
+ }, [e.hash, t]);
1109
+ }, ta = () => {
1110
+ const e = ye(), t = pe(e.pathname);
1111
+ L(() => {
1112
+ t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
1113
+ }, [e.pathname]);
1114
+ };
1115
+ function ra({
1116
+ className: e,
1117
+ ...t
1118
+ }) {
1119
+ return /* @__PURE__ */ a.jsx(
1120
+ "div",
1121
+ {
1122
+ className: R("animate-pulse rounded-md bg-muted", e),
1123
+ ...t
1124
+ }
1125
+ );
1126
+ }
1127
+ const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", sa = (e) => "getRoutes" in e && typeof e.getRoutes == "function", na = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ia = (e) => "initialize" in e && typeof e.initialize == "function", oa = (e) => "getHead" in e && typeof e.getHead == "function", la = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", ca = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Qe = {
1128
+ info: "bg-blue-500",
1129
+ note: "bg-gray-500",
1130
+ tip: "bg-green-600",
1131
+ caution: "bg-orange-500",
1132
+ danger: "bg-rose-500"
1344
1133
  }, ua = () => {
1345
- const t = ue(), e = he(t.pathname);
1346
- _(() => {
1347
- e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
1348
- }, [t.pathname]);
1349
- }, ot = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
1134
+ const { page: e } = F(), [t, r] = q(!0);
1135
+ if (!(e != null && e.banner) || !t)
1136
+ return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1137
+ const s = e.banner.color && e.banner.color in Qe ? Qe[e.banner.color] : e.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: e.banner.color };
1138
+ return /* @__PURE__ */ a.jsxs(
1139
+ "div",
1140
+ {
1141
+ className: R(
1142
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1143
+ s
1144
+ ),
1145
+ style: n,
1146
+ children: [
1147
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1148
+ e.banner.dismissible && /* @__PURE__ */ a.jsx(
1149
+ "button",
1150
+ {
1151
+ type: "button",
1152
+ className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1153
+ onClick: () => r(!1),
1154
+ children: /* @__PURE__ */ a.jsx(rr, { size: 16 })
1155
+ }
1156
+ )
1157
+ ]
1158
+ }
1159
+ );
1160
+ }, ct = () => {
1161
+ const e = F(), [t, r] = q(!1), s = $t(() => r(!1), []);
1162
+ L(() => {
1163
+ if (t)
1164
+ return;
1165
+ function o(i) {
1166
+ i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), r(!0));
1167
+ }
1168
+ return window.addEventListener("keydown", o), () => {
1169
+ window.removeEventListener("keydown", o);
1170
+ };
1171
+ }, [t, r]);
1172
+ const n = e.plugins.find(na);
1173
+ return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1174
+ /* @__PURE__ */ a.jsxs(
1175
+ "button",
1176
+ {
1177
+ type: "button",
1178
+ onClick: () => r(!0),
1179
+ className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
1180
+ children: [
1181
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
1182
+ /* @__PURE__ */ a.jsx(ar, { size: 14 }),
1183
+ "Search"
1184
+ ] }),
1185
+ /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
1186
+ ]
1187
+ }
1188
+ ),
1189
+ /* @__PURE__ */ a.jsx(ve, { fallback: null, children: n.renderSearch({
1190
+ isOpen: t,
1191
+ onClose: s
1192
+ }) })
1193
+ ] }) : null;
1194
+ }, ut = () => {
1195
+ const { resolvedTheme: e, setTheme: t } = jr(), r = e === "dark" ? sr : nr;
1196
+ return /* @__PURE__ */ a.jsx(je, { children: /* @__PURE__ */ a.jsx(
1197
+ de,
1198
+ {
1199
+ variant: "ghost",
1200
+ "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
1201
+ className: "p-2.5 -m-2.5 rounded-full",
1202
+ onClick: () => t(e === "dark" ? "light" : "dark"),
1203
+ children: /* @__PURE__ */ a.jsx(r, { size: 18 })
1204
+ }
1205
+ ) });
1206
+ }, dt = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", da = () => {
1207
+ const { topNavigation: e } = F(), { isAuthenticated: t } = se();
1208
+ return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(dt(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ht, { ...r }) }, r.id)) }) }) });
1209
+ }, ht = ({
1210
+ id: e,
1211
+ label: t,
1212
+ default: r
1213
+ }) => {
1214
+ var l;
1215
+ const { sidebars: s } = F(), n = s[e], o = Ze(), i = !!be().location, u = ((l = o.topNavItem) == null ? void 0 : l.id) === e && !i, d = r ?? (n ? zt(n, (p) => {
1216
+ if (p.type === "doc") return Q(p.id);
1217
+ }) : Q(e));
1218
+ if (!d)
1219
+ throw new Sr("Page not found.", {
1220
+ developerHint: `No links found in top navigation for '${e}'. Check that the sidebar isn't empty or that a default link is set.`
1221
+ });
1222
+ return (
1223
+ // We don't use isActive here because it has to be inside the sidebar,
1224
+ // the top nav id doesn't necessarily start with the sidebar id
1225
+ /* @__PURE__ */ a.jsx(
1226
+ ae,
1227
+ {
1228
+ className: ({ isPending: p }) => dr(
1229
+ "block lg:py-3.5 font-medium -mb-px border-b-2",
1230
+ u || p ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1231
+ ),
1232
+ to: d,
1233
+ children: t
1234
+ }
1235
+ )
1236
+ );
1237
+ }, ha = () => {
1238
+ const { topNavigation: e } = F(), { isAuthenticated: t } = se(), [r, s] = q(!1);
1239
+ return /* @__PURE__ */ a.jsxs(
1240
+ et,
1241
+ {
1242
+ direction: "right",
1243
+ open: r,
1244
+ onOpenChange: (n) => s(n),
1245
+ children: [
1246
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(tt, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(ir, { size: 22 }) }) }),
1247
+ /* @__PURE__ */ a.jsxs(
1248
+ rt,
1249
+ {
1250
+ className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
1251
+ "aria-describedby": void 0,
1252
+ children: [
1253
+ /* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Navigation" }) }),
1254
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ct, {}) }),
1255
+ /* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
1256
+ /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ut, {}) }),
1257
+ e.filter(dt(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ a.jsx(ht, { ...n }) }) }, n.label))
1258
+ ] })
1259
+ ]
1260
+ }
1261
+ )
1262
+ ]
1263
+ }
1264
+ );
1265
+ }, re = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(pr, { children: [
1266
+ /* @__PURE__ */ a.jsx(vr, { children: e.label }),
1267
+ /* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(yr, { children: e.children.map((t, r) => (
1268
+ // eslint-disable-next-line react/no-array-index-key
1269
+ /* @__PURE__ */ a.jsx(re, { item: t }, r)
1270
+ )) }) })
1271
+ ] }, e.label) : /* @__PURE__ */ a.jsx(ge, { to: e.path ?? "", children: /* @__PURE__ */ a.jsxs(br, { className: "flex gap-2", children: [
1272
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
1273
+ e.label
1274
+ ] }, e.label) }), ft = Xe(function() {
1275
+ const t = se(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = se(), o = F(), { page: i, plugins: u } = o, d = u.filter((l) => aa(l)).flatMap((l) => l.getProfileMenuItems(o)).sort((l) => l.weight ?? 0);
1276
+ return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1277
+ /* @__PURE__ */ a.jsx(ua, {}),
1278
+ /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1279
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
1280
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(ge, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1281
+ (i == null ? void 0 : i.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1282
+ /* @__PURE__ */ a.jsx(
1283
+ "img",
1284
+ {
1285
+ src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Q(
1286
+ "/",
1287
+ i.logo.src.light
1288
+ ),
1289
+ alt: i.logo.alt ?? i.pageTitle,
1290
+ style: { width: i.logo.width },
1291
+ className: "h-10 dark:hidden",
1292
+ loading: "lazy"
1293
+ }
1294
+ ),
1295
+ /* @__PURE__ */ a.jsx(
1296
+ "img",
1297
+ {
1298
+ src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Q(
1299
+ "/",
1300
+ i.logo.src.dark
1301
+ ),
1302
+ alt: i.logo.alt ?? i.pageTitle,
1303
+ style: { width: i.logo.width },
1304
+ className: "h-10 hidden dark:block",
1305
+ loading: "lazy"
1306
+ }
1307
+ )
1308
+ ] }),
1309
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
1310
+ ] }) }) }),
1311
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1312
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ct, {}) }),
1313
+ /* @__PURE__ */ a.jsx(ha, {}),
1314
+ /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1315
+ /* @__PURE__ */ a.jsx(D, { name: "head-navigation-start" }),
1316
+ n && /* @__PURE__ */ a.jsx(
1317
+ je,
1318
+ {
1319
+ fallback: /* @__PURE__ */ a.jsx(ra, { className: "rounded h-5 w-24 mr-4" }),
1320
+ children: r ? Object.values(d).length > 0 && /* @__PURE__ */ a.jsxs(hr, { modal: !1, children: [
1321
+ /* @__PURE__ */ a.jsx(fr, { asChild: !0, children: /* @__PURE__ */ a.jsx(de, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
1322
+ /* @__PURE__ */ a.jsxs(mr, { className: "w-56", children: [
1323
+ /* @__PURE__ */ a.jsxs(gr, { children: [
1324
+ s != null && s.name ? `${s.name}` : "My Account",
1325
+ (s == null ? void 0 : s.email) && /* @__PURE__ */ a.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
1326
+ ] }),
1327
+ d.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ a.jsx(le, {}),
1328
+ d.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label)),
1329
+ d.filter(
1330
+ (l) => !l.category || l.category === "middle"
1331
+ ).length > 0 && /* @__PURE__ */ a.jsx(le, {}),
1332
+ d.filter(
1333
+ (l) => !l.category || l.category === "middle"
1334
+ ).map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label)),
1335
+ d.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ a.jsx(le, {}),
1336
+ d.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label))
1337
+ ] })
1338
+ ] }) : /* @__PURE__ */ a.jsx(de, { variant: "ghost", onClick: () => t.login(), children: "Login" })
1339
+ }
1340
+ ),
1341
+ /* @__PURE__ */ a.jsx(ut, {}),
1342
+ /* @__PURE__ */ a.jsx(D, { name: "head-navigation-end" })
1343
+ ] })
1344
+ ] })
1345
+ ] }),
1346
+ /* @__PURE__ */ a.jsx(D, { name: "top-navigation-before" }),
1347
+ /* @__PURE__ */ a.jsx(da, {}),
1348
+ /* @__PURE__ */ a.jsx(D, { name: "top-navigation-after" })
1349
+ ] })
1350
+ ] });
1351
+ }), mt = Kt(({ children: e, className: t, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
1350
1352
  "nav",
1351
1353
  {
1352
1354
  "data-navigation": String(r),
1353
- className: A(
1355
+ className: R(
1354
1356
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
1355
1357
  "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
1356
1358
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
1357
- e
1359
+ t
1358
1360
  ),
1359
1361
  ref: s,
1360
- children: t
1362
+ children: e
1361
1363
  }
1362
1364
  ));
1363
- ot.displayName = "SidebarWrapper";
1364
- const da = () => {
1365
- const t = he(null), e = Ke();
1365
+ mt.displayName = "SidebarWrapper";
1366
+ const fa = () => {
1367
+ const e = pe(null), t = Ze();
1366
1368
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1367
1369
  /* @__PURE__ */ a.jsxs(
1368
- ot,
1370
+ mt,
1369
1371
  {
1370
- ref: t,
1371
- pushMainContent: e.data.sidebar.length > 0,
1372
+ ref: e,
1373
+ pushMainContent: t.sidebar.length > 0,
1372
1374
  children: [
1373
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
1374
- e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label)),
1375
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
1375
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-before-navigation" }),
1376
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(fe, { item: r }, r.label)),
1377
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-after-navigation" })
1376
1378
  ]
1377
1379
  }
1378
1380
  ),
1379
1381
  /* @__PURE__ */ a.jsxs(
1380
- Ye,
1382
+ rt,
1381
1383
  {
1382
1384
  className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
1383
1385
  "aria-describedby": void 0,
1384
1386
  children: [
1385
- /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
1386
- e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label))
1387
+ /* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Sidebar" }) }),
1388
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(fe, { item: r }, r.label))
1387
1389
  ]
1388
1390
  }
1389
1391
  )
1390
1392
  ] });
1391
- }, ha = ({ children: t }) => {
1392
- const e = ue(), { setActiveAnchor: r } = ge(), { meta: s, authentication: n } = F();
1393
- ca(), ua();
1394
- const i = he(e.pathname);
1395
- return _(() => {
1396
- var o;
1397
- (o = n == null ? void 0 : n.pageLoad) == null || o.call(n);
1398
- }, [n]), _(() => {
1399
- e.pathname !== i.current && r(""), i.current = e.pathname;
1400
- }, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1393
+ }, qe = () => /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(Nr, {}) }), ma = ({ children: e }) => {
1394
+ const t = ye(), { setActiveAnchor: r } = we(), { meta: s, authentication: n } = F();
1395
+ ea(), ta();
1396
+ const o = pe(t.pathname);
1397
+ L(() => {
1398
+ var d;
1399
+ (d = n == null ? void 0 : n.onPageLoad) == null || d.call(n);
1400
+ }, [n]), L(() => {
1401
+ t.pathname !== o.current && r(""), o.current = t.pathname;
1402
+ }, [t.pathname, r]);
1403
+ const i = !!be().location, u = Xr.useSpinDelay(i, {
1404
+ delay: 300,
1405
+ minDuration: 500
1406
+ });
1407
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1401
1408
  !1,
1402
- /* @__PURE__ */ a.jsxs(ce, { titleTemplate: s == null ? void 0 : s.title, children: [
1409
+ /* @__PURE__ */ a.jsxs(me, { titleTemplate: s == null ? void 0 : s.title, children: [
1403
1410
  (s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
1404
1411
  (s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
1405
1412
  ] }),
1406
- /* @__PURE__ */ a.jsx(k, { name: "layout-before-head" }),
1407
- /* @__PURE__ */ a.jsx(st, {}),
1408
- /* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
1409
- /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
1410
- de,
1411
- {
1412
- fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(mr, {}) }),
1413
- children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
1414
- /* @__PURE__ */ a.jsx(da, {}),
1415
- /* @__PURE__ */ a.jsx(
1416
- "div",
1417
- {
1418
- className: A(
1419
- "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1420
- "peer-data-[navigation=false]:hidden"
1421
- ),
1422
- children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
1423
- /* @__PURE__ */ a.jsx(rr, { size: 16, strokeWidth: 1.5 }),
1424
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
1425
- ] })
1426
- }
1413
+ /* @__PURE__ */ a.jsx(D, { name: "layout-before-head" }),
1414
+ /* @__PURE__ */ a.jsx(ft, {}),
1415
+ /* @__PURE__ */ a.jsx(D, { name: "layout-after-head" }),
1416
+ /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: u ? /* @__PURE__ */ a.jsx(qe, {}) : /* @__PURE__ */ a.jsx(ve, { fallback: /* @__PURE__ */ a.jsx(qe, {}), children: /* @__PURE__ */ a.jsxs(et, { direction: "left", children: [
1417
+ /* @__PURE__ */ a.jsx(fa, {}),
1418
+ /* @__PURE__ */ a.jsx(
1419
+ "div",
1420
+ {
1421
+ className: R(
1422
+ "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1423
+ "peer-data-[navigation=false]:hidden"
1427
1424
  ),
1428
- /* @__PURE__ */ a.jsxs(
1429
- "main",
1430
- {
1431
- className: A(
1432
- "h-full dark:border-white/10 translate-x-0",
1433
- "lg:overflow-visible",
1434
- // This works in tandem with the `SidebarWrapper` component
1435
- "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1436
- "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1437
- ),
1438
- children: [
1439
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
1440
- t ?? /* @__PURE__ */ a.jsx(_e, {}),
1441
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
1442
- ]
1443
- }
1444
- )
1445
- ] })
1446
- }
1447
- ) })
1425
+ children: /* @__PURE__ */ a.jsxs(tt, { className: "flex items-center gap-2", children: [
1426
+ /* @__PURE__ */ a.jsx(or, { size: 16, strokeWidth: 1.5 }),
1427
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
1428
+ ] })
1429
+ }
1430
+ ),
1431
+ /* @__PURE__ */ a.jsxs(
1432
+ "main",
1433
+ {
1434
+ className: R(
1435
+ "h-full dark:border-white/10 translate-x-0",
1436
+ "lg:overflow-visible",
1437
+ // This works in tandem with the `SidebarWrapper` component
1438
+ "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1439
+ "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1440
+ ),
1441
+ children: [
1442
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-before-content" }),
1443
+ e ?? /* @__PURE__ */ a.jsx(Ge, {}),
1444
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-after-content" })
1445
+ ]
1446
+ }
1447
+ )
1448
+ ] }) }) })
1448
1449
  ] });
1449
- }, _a = gt, Fa = pe, Qa = ha, La = Nt, Ba = pr, Ha = Rr, za = Ir, qa = ce, Ka = F, $a = jt, Ua = pe, Va = Pt, Wa = Dt, Ya = ie, Xa = te;
1450
+ }, ga = Je(null), ce = {
1451
+ didCatch: !1,
1452
+ error: null
1453
+ };
1454
+ class pa extends Vt {
1455
+ constructor(t) {
1456
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ce;
1457
+ }
1458
+ static getDerivedStateFromError(t) {
1459
+ return {
1460
+ didCatch: !0,
1461
+ error: t
1462
+ };
1463
+ }
1464
+ resetErrorBoundary() {
1465
+ const {
1466
+ error: t
1467
+ } = this.state;
1468
+ if (t !== null) {
1469
+ for (var r, s, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
1470
+ o[i] = arguments[i];
1471
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
1472
+ args: o,
1473
+ reason: "imperative-api"
1474
+ }), this.setState(ce);
1475
+ }
1476
+ }
1477
+ componentDidCatch(t, r) {
1478
+ var s, n;
1479
+ (s = (n = this.props).onError) === null || s === void 0 || s.call(n, t, r);
1480
+ }
1481
+ componentDidUpdate(t, r) {
1482
+ const {
1483
+ didCatch: s
1484
+ } = this.state, {
1485
+ resetKeys: n
1486
+ } = this.props;
1487
+ if (s && r.error !== null && va(t.resetKeys, n)) {
1488
+ var o, i;
1489
+ (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1490
+ next: n,
1491
+ prev: t.resetKeys,
1492
+ reason: "keys"
1493
+ }), this.setState(ce);
1494
+ }
1495
+ }
1496
+ render() {
1497
+ const {
1498
+ children: t,
1499
+ fallbackRender: r,
1500
+ FallbackComponent: s,
1501
+ fallback: n
1502
+ } = this.props, {
1503
+ didCatch: o,
1504
+ error: i
1505
+ } = this.state;
1506
+ let u = t;
1507
+ if (o) {
1508
+ const d = {
1509
+ error: i,
1510
+ resetErrorBoundary: this.resetErrorBoundary
1511
+ };
1512
+ if (typeof r == "function")
1513
+ u = r(d);
1514
+ else if (s)
1515
+ u = Ie(s, d);
1516
+ else if (n !== void 0)
1517
+ u = n;
1518
+ else
1519
+ throw i;
1520
+ }
1521
+ return Ie(ga.Provider, {
1522
+ value: {
1523
+ didCatch: o,
1524
+ error: i,
1525
+ resetErrorBoundary: this.resetErrorBoundary
1526
+ }
1527
+ }, u);
1528
+ }
1529
+ }
1530
+ function va() {
1531
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1532
+ return e.length !== t.length || e.some((r, s) => !Object.is(r, t[s]));
1533
+ }
1534
+ class xa {
1535
+ constructor(t) {
1536
+ S(this, "plugins");
1537
+ S(this, "sidebars");
1538
+ S(this, "topNavigation");
1539
+ S(this, "meta");
1540
+ S(this, "page");
1541
+ S(this, "authentication");
1542
+ S(this, "navigationPlugins");
1543
+ S(this, "initialize", async () => {
1544
+ await Promise.all(
1545
+ this.plugins.filter(ia).map((t) => {
1546
+ var r;
1547
+ return (r = t.initialize) == null ? void 0 : r.call(t, this);
1548
+ })
1549
+ );
1550
+ });
1551
+ S(this, "getApiIdentities", async () => (await Promise.all(
1552
+ this.plugins.filter(ca).map((r) => r.getIdentities(this))
1553
+ )).flat());
1554
+ S(this, "getPluginSidebar", async (t) => (await Promise.all(
1555
+ this.navigationPlugins.map(
1556
+ (s) => {
1557
+ var n;
1558
+ return (n = s.getSidebar) == null ? void 0 : n.call(s, Q(t));
1559
+ }
1560
+ )
1561
+ )).flatMap((s) => s ?? []));
1562
+ S(this, "signRequest", async (t) => {
1563
+ if (!this.authentication)
1564
+ throw new Error("No authentication provider configured");
1565
+ const r = await this.authentication.getAccessToken();
1566
+ return t.headers.set("Authorization", `Bearer ${r}`), t;
1567
+ });
1568
+ this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(sa), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
1569
+ }
1570
+ }
1571
+ function ya({ error: e, resetErrorBoundary: t }) {
1572
+ return /* @__PURE__ */ a.jsx(Ue, { error: e });
1573
+ }
1574
+ const te = globalThis;
1575
+ (!te.requestIdleCallback || !te.cancelIdleCallback) && (te.requestIdleCallback = (e) => setTimeout(e, 1), te.cancelIdleCallback = clearTimeout);
1576
+ const gt = {
1577
+ Header: ft
1578
+ }, ba = Je(gt), ja = ba.Provider, wa = ({
1579
+ children: e,
1580
+ context: t
1581
+ }) => (Bt({
1582
+ queryFn: async () => (await t.initialize(), !0),
1583
+ queryKey: ["zudoku-initialize"]
1584
+ }), /* @__PURE__ */ a.jsx(Ht.Provider, { value: t, children: e })), pt = Xe(
1585
+ ({ children: e, ...t }) => {
1586
+ var f, h;
1587
+ const r = ne(
1588
+ () => ({ ...gt, ...t.overrides }),
1589
+ [t.overrides]
1590
+ ), s = ne(() => {
1591
+ var v;
1592
+ return {
1593
+ ...(t.plugins ?? []).filter(la).flatMap(
1594
+ (m) => m.getMdxComponents ? [m.getMdxComponents()] : []
1595
+ ).reduce(
1596
+ (m, E) => ({ ...m, ...E }),
1597
+ {}
1598
+ ),
1599
+ ...lr,
1600
+ ...(v = t.mdx) == null ? void 0 : v.components
1601
+ };
1602
+ }, [(f = t.mdx) == null ? void 0 : f.components, t.plugins]), { stagger: n } = Zt(ue), [o, i] = q(!1), u = ne(
1603
+ () => o ? { stagger: !0 } : { stagger: n },
1604
+ [n, o]
1605
+ ), d = be();
1606
+ L(() => {
1607
+ o || i(!0);
1608
+ }, [o, d.location]);
1609
+ const [l] = q(() => new xa(t)), p = (h = t.plugins) == null ? void 0 : h.filter(oa).map((g, v) => {
1610
+ var m;
1611
+ return /* @__PURE__ */ a.jsx(Yt, { children: (m = g.getHead) == null ? void 0 : m.call(g) }, v);
1612
+ });
1613
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1614
+ /* @__PURE__ */ a.jsx(me, { children: p }),
1615
+ /* @__PURE__ */ a.jsx(ue.Provider, { value: u, children: /* @__PURE__ */ a.jsx(wa, { context: l, children: /* @__PURE__ */ a.jsx(wt, { components: s, children: /* @__PURE__ */ a.jsx(wr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(ja, { value: r, children: /* @__PURE__ */ a.jsx(kt, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(cr, { children: e ?? /* @__PURE__ */ a.jsx(Ge, {}) }) }) }) }) }) }) })
1616
+ ] });
1617
+ }
1618
+ );
1619
+ pt.displayName = "ZudokoInner";
1620
+ const vt = (e) => /* @__PURE__ */ a.jsx(pa, { FallbackComponent: ya, children: /* @__PURE__ */ a.jsx(pt, { ...e }) });
1621
+ vt.displayName = "Zudoku";
1622
+ const Wa = St, Xa = ma, Ja = At, Ga = Er, es = Yr, ts = Wr, rs = me, as = F, ss = Ct, ns = vt, is = Ot, os = je, ls = Dt, cs = ge;
1450
1623
  export {
1451
- Ha as Bootstrap,
1452
- za as BootstrapStatic,
1453
- Ya as Button,
1454
- Va as Callout,
1455
- Wa as ClientOnly,
1456
- Fa as DevPortal,
1457
- qa as Head,
1458
- Qa as Layout,
1459
- Xa as Link,
1460
- La as RouterError,
1461
- Ba as ServerError,
1462
- Ua as Zudoku,
1463
- $a as useAuth,
1464
- _a as useMDXComponents,
1465
- Ka as useZudoku
1624
+ es as Bootstrap,
1625
+ ts as BootstrapStatic,
1626
+ ls as Button,
1627
+ is as Callout,
1628
+ os as ClientOnly,
1629
+ rs as Head,
1630
+ Xa as Layout,
1631
+ cs as Link,
1632
+ Ja as RouterError,
1633
+ Ga as ServerError,
1634
+ ns as Zudoku,
1635
+ ss as useAuth,
1636
+ Wa as useMDXComponents,
1637
+ as as useZudoku
1466
1638
  };
1467
1639
  //# sourceMappingURL=zudoku.components.js.map