zudoku 0.0.0-eb4182d → 0.0.0-eeace45

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 (936) hide show
  1. package/README.md +121 -0
  2. package/cli.js +2 -2
  3. package/client.d.ts +7 -0
  4. package/dist/app/demo.js +1 -3
  5. package/dist/app/demo.js.map +1 -1
  6. package/dist/app/entry.client.d.ts +1 -0
  7. package/dist/app/entry.client.js +16 -3
  8. package/dist/app/entry.client.js.map +1 -1
  9. package/dist/app/entry.server.d.ts +1 -0
  10. package/dist/app/entry.server.js +11 -8
  11. package/dist/app/entry.server.js.map +1 -1
  12. package/dist/app/main.d.ts +3 -2
  13. package/dist/app/main.js +16 -32
  14. package/dist/app/main.js.map +1 -1
  15. package/dist/app/sentry.d.ts +3 -0
  16. package/dist/app/sentry.js +19 -0
  17. package/dist/app/sentry.js.map +1 -0
  18. package/dist/app/standalone.js +1 -3
  19. package/dist/app/standalone.js.map +1 -1
  20. package/dist/app/tailwind.d.ts +2 -1
  21. package/dist/app/tailwind.js +64 -52
  22. package/dist/app/tailwind.js.map +1 -1
  23. package/dist/cli/cli.js +1 -4
  24. package/dist/cli/cli.js.map +1 -1
  25. package/dist/cli/cmds/build.js +1 -0
  26. package/dist/cli/cmds/build.js.map +1 -1
  27. package/dist/cli/cmds/dev.js +5 -0
  28. package/dist/cli/cmds/dev.js.map +1 -1
  29. package/dist/cli/common/logger.js +9 -0
  30. package/dist/cli/common/logger.js.map +1 -1
  31. package/dist/cli/common/machine-id/lib.js.map +1 -1
  32. package/dist/cli/common/outdated.js +2 -1
  33. package/dist/cli/common/outdated.js.map +1 -1
  34. package/dist/cli/common/utils/box.js.map +1 -1
  35. package/dist/cli/dev/handler.d.ts +1 -0
  36. package/dist/cli/dev/handler.js +3 -3
  37. package/dist/cli/dev/handler.js.map +1 -1
  38. package/dist/codegen.d.ts +3 -0
  39. package/dist/codegen.js +45 -0
  40. package/dist/codegen.js.map +1 -0
  41. package/dist/config/common.d.ts +8 -0
  42. package/dist/config/common.js +2 -0
  43. package/dist/config/common.js.map +1 -0
  44. package/dist/config/config.d.ts +3 -2
  45. package/dist/config/loader.d.ts +20 -0
  46. package/dist/config/loader.js +154 -0
  47. package/dist/config/loader.js.map +1 -0
  48. package/dist/config/validators/InputSidebarSchema.d.ts +35 -19
  49. package/dist/config/validators/InputSidebarSchema.js +7 -28
  50. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  51. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  52. package/dist/config/validators/SidebarSchema.js +80 -44
  53. package/dist/config/validators/SidebarSchema.js.map +1 -1
  54. package/dist/config/validators/common.d.ts +4945 -0
  55. package/dist/config/validators/common.js +280 -0
  56. package/dist/config/validators/common.js.map +1 -0
  57. package/dist/config/validators/icon-types.d.ts +1 -0
  58. package/dist/config/validators/icon-types.js +2 -0
  59. package/dist/config/validators/icon-types.js.map +1 -0
  60. package/dist/config/validators/validate.d.ts +888 -453
  61. package/dist/config/validators/validate.js +14 -213
  62. package/dist/config/validators/validate.js.map +1 -1
  63. package/dist/index.d.ts +5 -1
  64. package/dist/index.js +1 -1
  65. package/dist/index.js.map +1 -1
  66. package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
  67. package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
  68. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  69. package/dist/lib/authentication/authentication.d.ts +3 -3
  70. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  71. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  72. package/dist/lib/authentication/components/SignIn.js +1 -1
  73. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  74. package/dist/lib/authentication/components/SignOut.js +1 -1
  75. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  76. package/dist/lib/authentication/hook.d.ts +5 -4
  77. package/dist/lib/authentication/hook.js +1 -3
  78. package/dist/lib/authentication/hook.js.map +1 -1
  79. package/dist/lib/authentication/providers/auth0.js +12 -11
  80. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  81. package/dist/lib/authentication/providers/openid.d.ts +7 -1
  82. package/dist/lib/authentication/providers/openid.js +18 -27
  83. package/dist/lib/authentication/providers/openid.js.map +1 -1
  84. package/dist/lib/authentication/state.d.ts +25 -4
  85. package/dist/lib/authentication/state.js +28 -3
  86. package/dist/lib/authentication/state.js.map +1 -1
  87. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  88. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  89. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  90. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  91. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  92. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  93. package/dist/lib/components/AnchorLink.d.ts +1 -1
  94. package/dist/lib/components/AnchorLink.js +1 -1
  95. package/dist/lib/components/AnchorLink.js.map +1 -1
  96. package/dist/lib/components/Banner.js +7 -1
  97. package/dist/lib/components/Banner.js.map +1 -1
  98. package/dist/lib/components/Bootstrap.d.ts +4 -3
  99. package/dist/lib/components/Bootstrap.js +12 -6
  100. package/dist/lib/components/Bootstrap.js.map +1 -1
  101. package/dist/lib/components/ClientOnly.d.ts +4 -2
  102. package/dist/lib/components/ClientOnly.js +1 -1
  103. package/dist/lib/components/ClientOnly.js.map +1 -1
  104. package/dist/lib/components/DeveloperHint.js +2 -1
  105. package/dist/lib/components/DeveloperHint.js.map +1 -1
  106. package/dist/lib/components/ErrorPage.js +1 -2
  107. package/dist/lib/components/ErrorPage.js.map +1 -1
  108. package/dist/lib/components/Header.js +21 -10
  109. package/dist/lib/components/Header.js.map +1 -1
  110. package/dist/lib/components/Heading.d.ts +4 -4
  111. package/dist/lib/components/Heading.js +1 -1
  112. package/dist/lib/components/Heading.js.map +1 -1
  113. package/dist/lib/components/Layout.js +14 -5
  114. package/dist/lib/components/Layout.js.map +1 -1
  115. package/dist/lib/components/Markdown.js +1 -1
  116. package/dist/lib/components/Markdown.js.map +1 -1
  117. package/dist/lib/components/MobileTopNavigation.js +9 -6
  118. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  119. package/dist/lib/components/NotFoundPage.js +1 -1
  120. package/dist/lib/components/NotFoundPage.js.map +1 -1
  121. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  122. package/dist/lib/components/ReactMarkdown.js +182 -0
  123. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  124. package/dist/lib/components/Search.d.ts +3 -1
  125. package/dist/lib/components/Search.js +3 -3
  126. package/dist/lib/components/Search.js.map +1 -1
  127. package/dist/lib/components/SlotletProvider.d.ts +11 -3
  128. package/dist/lib/components/SlotletProvider.js +4 -2
  129. package/dist/lib/components/SlotletProvider.js.map +1 -1
  130. package/dist/lib/components/SyntaxHighlight.js +19 -16
  131. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  132. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  133. package/dist/lib/components/ThemeSwitch.js +13 -0
  134. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  135. package/dist/lib/components/TopNavigation.d.ts +5 -0
  136. package/dist/lib/components/TopNavigation.js +44 -5
  137. package/dist/lib/components/TopNavigation.js.map +1 -1
  138. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  139. package/dist/lib/components/{DevPortal.js → Zudoku.js} +14 -15
  140. package/dist/lib/components/Zudoku.js.map +1 -0
  141. package/dist/lib/components/context/ZudokuContext.d.ts +10 -14
  142. package/dist/lib/components/context/ZudokuContext.js +27 -26
  143. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  144. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  145. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  146. package/dist/lib/components/index.d.ts +38 -16
  147. package/dist/lib/components/index.js +16 -6
  148. package/dist/lib/components/index.js.map +1 -1
  149. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  150. package/dist/lib/components/navigation/Sidebar.js +4 -4
  151. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  152. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
  153. package/dist/lib/components/navigation/SidebarBadge.js +0 -9
  154. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  155. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
  156. package/dist/lib/components/navigation/SidebarCategory.js +18 -10
  157. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  158. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
  159. package/dist/lib/components/navigation/SidebarItem.js +12 -12
  160. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  161. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  162. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  163. package/dist/lib/components/navigation/utils.js +11 -15
  164. package/dist/lib/components/navigation/utils.js.map +1 -1
  165. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +7 -14
  166. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  167. package/dist/lib/core/ZudokuContext.js.map +1 -0
  168. package/dist/lib/core/plugins.d.ts +18 -13
  169. package/dist/lib/core/plugins.js.map +1 -1
  170. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  171. package/dist/lib/errors/ErrorAlert.js +8 -3
  172. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  173. package/dist/lib/errors/RouterError.js +1 -1
  174. package/dist/lib/errors/RouterError.js.map +1 -1
  175. package/dist/lib/oas/graphql/index.js +10 -11
  176. package/dist/lib/oas/graphql/index.js.map +1 -1
  177. package/dist/lib/oas/parser/upgrade/index.d.ts +2 -2
  178. package/dist/lib/oas/parser/upgrade/index.js +2 -17
  179. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  180. package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
  181. package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
  182. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  183. package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
  184. package/dist/lib/plugins/api-catalog/index.js +15 -0
  185. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  186. package/dist/lib/plugins/api-keys/CreateApiKey.js +2 -2
  187. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  188. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  189. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  190. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
  191. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  192. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  193. package/dist/lib/plugins/api-keys/index.js +3 -0
  194. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  195. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
  196. package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
  197. package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
  198. package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
  199. package/dist/lib/plugins/custom-pages/index.js +11 -0
  200. package/dist/lib/plugins/custom-pages/index.js.map +1 -0
  201. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -1
  202. package/dist/lib/plugins/markdown/MdxPage.js +16 -3
  203. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  204. package/dist/lib/plugins/markdown/index.d.ts +8 -7
  205. package/dist/lib/plugins/markdown/index.js +31 -3
  206. package/dist/lib/plugins/markdown/index.js.map +1 -1
  207. package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
  208. package/dist/lib/plugins/markdown/resolver.js +75 -0
  209. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  210. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  211. package/dist/lib/plugins/openapi/CollapsibleCode.js +24 -0
  212. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  213. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  214. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  215. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  216. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  217. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  218. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  219. package/dist/lib/plugins/openapi/OperationList.js +43 -23
  220. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  221. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  222. package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
  223. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  224. package/dist/lib/plugins/openapi/ParameterListItem.js +6 -1
  225. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  226. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +7 -3
  227. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  228. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +9 -2
  229. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  230. package/dist/lib/plugins/openapi/Route.d.ts +7 -5
  231. package/dist/lib/plugins/openapi/Route.js +23 -5
  232. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  233. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  234. package/dist/lib/plugins/openapi/Sidecar.js +38 -46
  235. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  236. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  237. package/dist/lib/plugins/openapi/client/GraphQLClient.js +114 -0
  238. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  239. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  240. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  241. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  242. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  243. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  244. package/dist/lib/plugins/openapi/client/useCreateQuery.js +24 -0
  245. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  246. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  247. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  248. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  249. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  250. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  251. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  252. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  253. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -51
  254. package/dist/lib/plugins/openapi/graphql/gql.js +5 -3
  255. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  256. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +34 -8
  257. package/dist/lib/plugins/openapi/graphql/graphql.js +195 -662
  258. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  259. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  260. package/dist/lib/plugins/openapi/index.js +56 -68
  261. package/dist/lib/plugins/openapi/index.js.map +1 -1
  262. package/dist/lib/plugins/openapi/interfaces.d.ts +20 -1
  263. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  264. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  265. package/dist/lib/plugins/openapi/playground/Playground.js +3 -2
  266. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  267. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  268. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  269. package/dist/lib/plugins/openapi/playground/ResponseTab.js +1 -1
  270. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
  271. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +6 -0
  272. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +14 -0
  273. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -0
  274. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.d.ts +1 -0
  275. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +125 -0
  276. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -0
  277. package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +11 -0
  278. package/dist/lib/plugins/openapi/post-processors/removePaths.js +33 -0
  279. package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +1 -0
  280. package/dist/lib/plugins/openapi/post-processors/removePaths.test.d.ts +1 -0
  281. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +104 -0
  282. package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +1 -0
  283. package/dist/lib/plugins/openapi/post-processors/traverse.d.ts +1 -0
  284. package/dist/lib/plugins/openapi/post-processors/traverse.js +2 -0
  285. package/dist/lib/plugins/openapi/post-processors/traverse.js.map +1 -0
  286. package/dist/lib/plugins/openapi/schema/SchemaView.js +2 -1
  287. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  288. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +0 -1
  289. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +25 -36
  290. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  291. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  292. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  293. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  294. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  295. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  296. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  297. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  298. package/dist/lib/plugins/openapi-worker.js +7 -1
  299. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  300. package/dist/lib/plugins/redirect/index.d.ts +4 -7
  301. package/dist/lib/plugins/redirect/index.js +2 -2
  302. package/dist/lib/plugins/redirect/index.js.map +1 -1
  303. package/dist/lib/plugins/search-inkeep/index.d.ts +24 -5
  304. package/dist/lib/plugins/search-inkeep/index.js +41 -5
  305. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  306. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
  307. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  308. package/dist/lib/ui/Accordion.d.ts +7 -0
  309. package/dist/lib/ui/Accordion.js +14 -0
  310. package/dist/lib/ui/Accordion.js.map +1 -0
  311. package/dist/lib/ui/ActionButton.d.ts +4 -0
  312. package/dist/lib/ui/ActionButton.js +10 -0
  313. package/dist/lib/ui/ActionButton.js.map +1 -0
  314. package/dist/lib/ui/Alert.d.ts +8 -0
  315. package/dist/lib/ui/Alert.js +23 -0
  316. package/dist/lib/ui/Alert.js.map +1 -0
  317. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  318. package/dist/lib/ui/AlertDialog.js +27 -0
  319. package/dist/lib/ui/AlertDialog.js.map +1 -0
  320. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  321. package/dist/lib/ui/AspectRatio.js +4 -0
  322. package/dist/lib/ui/AspectRatio.js.map +1 -0
  323. package/dist/lib/ui/Badge.d.ts +9 -0
  324. package/dist/lib/ui/Badge.js +21 -0
  325. package/dist/lib/ui/Badge.js.map +1 -0
  326. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  327. package/dist/lib/ui/Breadcrumb.js +24 -0
  328. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  329. package/dist/lib/ui/Button.d.ts +2 -3
  330. package/dist/lib/ui/Button.js +1 -1
  331. package/dist/lib/ui/Button.js.map +1 -1
  332. package/dist/lib/ui/Callout.d.ts +36 -35
  333. package/dist/lib/ui/Callout.js.map +1 -1
  334. package/dist/lib/ui/Carousel.d.ts +18 -0
  335. package/dist/lib/ui/Carousel.js +99 -0
  336. package/dist/lib/ui/Carousel.js.map +1 -0
  337. package/dist/lib/ui/Checkbox.d.ts +4 -0
  338. package/dist/lib/ui/Checkbox.js +9 -0
  339. package/dist/lib/ui/Checkbox.js.map +1 -0
  340. package/dist/lib/ui/Collapsible.d.ts +5 -0
  341. package/dist/lib/ui/Collapsible.js +6 -0
  342. package/dist/lib/ui/Collapsible.js.map +1 -0
  343. package/dist/lib/ui/Command.d.ts +80 -0
  344. package/dist/lib/ui/Command.js +31 -0
  345. package/dist/lib/ui/Command.js.map +1 -0
  346. package/dist/lib/{components → ui}/Dialog.js +2 -2
  347. package/dist/lib/ui/Dialog.js.map +1 -0
  348. package/dist/lib/ui/Drawer.d.ts +8 -10
  349. package/dist/lib/ui/Drawer.js.map +1 -1
  350. package/dist/lib/ui/Form.d.ts +23 -0
  351. package/dist/lib/ui/Form.js +63 -0
  352. package/dist/lib/ui/Form.js.map +1 -0
  353. package/dist/lib/ui/HoverCard.d.ts +6 -0
  354. package/dist/lib/ui/HoverCard.js +10 -0
  355. package/dist/lib/ui/HoverCard.js.map +1 -0
  356. package/dist/lib/ui/Label.d.ts +5 -0
  357. package/dist/lib/ui/Label.js +10 -0
  358. package/dist/lib/ui/Label.js.map +1 -0
  359. package/dist/lib/ui/Pagination.d.ts +28 -0
  360. package/dist/lib/ui/Pagination.js +24 -0
  361. package/dist/lib/ui/Pagination.js.map +1 -0
  362. package/dist/lib/ui/Popover.d.ts +6 -0
  363. package/dist/lib/ui/Popover.js +10 -0
  364. package/dist/lib/ui/Popover.js.map +1 -0
  365. package/dist/lib/ui/Progress.d.ts +4 -0
  366. package/dist/lib/ui/Progress.js +8 -0
  367. package/dist/lib/ui/Progress.js.map +1 -0
  368. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  369. package/dist/lib/ui/RadioGroup.js +15 -0
  370. package/dist/lib/ui/RadioGroup.js.map +1 -0
  371. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  372. package/dist/lib/ui/ScrollArea.js +12 -0
  373. package/dist/lib/ui/ScrollArea.js.map +1 -0
  374. package/dist/lib/ui/Select.js.map +1 -0
  375. package/dist/lib/ui/Skeleton.d.ts +2 -0
  376. package/dist/lib/ui/Skeleton.js +7 -0
  377. package/dist/lib/ui/Skeleton.js.map +1 -0
  378. package/dist/lib/ui/Slider.d.ts +4 -0
  379. package/dist/lib/ui/Slider.js +8 -0
  380. package/dist/lib/ui/Slider.js.map +1 -0
  381. package/dist/lib/ui/Switch.d.ts +4 -0
  382. package/dist/lib/ui/Switch.js +8 -0
  383. package/dist/lib/ui/Switch.js.map +1 -0
  384. package/dist/lib/ui/Textarea.d.ts +4 -0
  385. package/dist/lib/ui/Textarea.js +9 -0
  386. package/dist/lib/ui/Textarea.js.map +1 -0
  387. package/dist/lib/ui/Toggle.d.ts +12 -0
  388. package/dist/lib/ui/Toggle.js +26 -0
  389. package/dist/lib/ui/Toggle.js.map +1 -0
  390. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  391. package/dist/lib/ui/ToggleGroup.js +21 -0
  392. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  393. package/dist/lib/ui/Tooltip.d.ts +7 -0
  394. package/dist/lib/ui/Tooltip.js +11 -0
  395. package/dist/lib/ui/Tooltip.js.map +1 -0
  396. package/dist/lib/util/MdxComponents.d.ts +19 -20
  397. package/dist/lib/util/MdxComponents.js +1 -3
  398. package/dist/lib/util/MdxComponents.js.map +1 -1
  399. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  400. package/dist/lib/util/invariant.d.ts +9 -0
  401. package/dist/lib/util/invariant.js +7 -3
  402. package/dist/lib/util/invariant.js.map +1 -1
  403. package/dist/lib/util/traverse.d.ts +2 -0
  404. package/dist/lib/util/traverse.js +18 -0
  405. package/dist/lib/util/traverse.js.map +1 -0
  406. package/dist/lib/util/useExposedProps.d.ts +2 -0
  407. package/dist/lib/util/useExposedProps.js +9 -0
  408. package/dist/lib/util/useExposedProps.js.map +1 -0
  409. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  410. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  411. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  412. package/dist/lib/util/useOnScreen.d.ts +4 -0
  413. package/dist/lib/util/useOnScreen.js +19 -0
  414. package/dist/lib/util/useOnScreen.js.map +1 -0
  415. package/dist/lib/util/useScrollToAnchor.js +1 -1
  416. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  417. package/dist/lib/util/useScrollToTop.js +1 -1
  418. package/dist/lib/util/useScrollToTop.js.map +1 -1
  419. package/dist/vite/build.js +26 -5
  420. package/dist/vite/build.js.map +1 -1
  421. package/dist/vite/config.d.ts +6 -10
  422. package/dist/vite/config.js +91 -78
  423. package/dist/vite/config.js.map +1 -1
  424. package/dist/vite/config.test.js +7 -5
  425. package/dist/vite/config.test.js.map +1 -1
  426. package/dist/vite/css/collect.d.ts +2 -0
  427. package/dist/vite/css/collect.js +27 -0
  428. package/dist/vite/css/collect.js.map +1 -0
  429. package/dist/vite/css/plugin.d.ts +5 -0
  430. package/dist/vite/css/plugin.js +79 -0
  431. package/dist/vite/css/plugin.js.map +1 -0
  432. package/dist/vite/debug.d.ts +1 -0
  433. package/dist/vite/debug.js +10 -0
  434. package/dist/vite/debug.js.map +1 -0
  435. package/dist/vite/dev-server.d.ts +7 -1
  436. package/dist/vite/dev-server.js +35 -8
  437. package/dist/vite/dev-server.js.map +1 -1
  438. package/dist/vite/html.js +0 -2
  439. package/dist/vite/html.js.map +1 -1
  440. package/dist/vite/output.d.ts +101 -0
  441. package/dist/vite/output.js +62 -0
  442. package/dist/vite/output.js.map +1 -0
  443. package/dist/vite/plugin-api.js +100 -20
  444. package/dist/vite/plugin-api.js.map +1 -1
  445. package/dist/vite/plugin-component.js +17 -12
  446. package/dist/vite/plugin-component.js.map +1 -1
  447. package/dist/vite/plugin-config-reload.d.ts +1 -2
  448. package/dist/vite/plugin-config-reload.js +0 -2
  449. package/dist/vite/plugin-config-reload.js.map +1 -1
  450. package/dist/vite/plugin-config.d.ts +2 -3
  451. package/dist/vite/plugin-config.js +22 -3
  452. package/dist/vite/plugin-config.js.map +1 -1
  453. package/dist/vite/plugin-custom-pages.d.ts +4 -0
  454. package/dist/vite/plugin-custom-pages.js +30 -0
  455. package/dist/vite/plugin-custom-pages.js.map +1 -0
  456. package/dist/vite/plugin-docs.js +37 -26
  457. package/dist/vite/plugin-docs.js.map +1 -1
  458. package/dist/vite/plugin-docs.test.js +15 -23
  459. package/dist/vite/plugin-docs.test.js.map +1 -1
  460. package/dist/vite/plugin-frontmatter.d.ts +2 -1
  461. package/dist/vite/plugin-frontmatter.js +27 -24
  462. package/dist/vite/plugin-frontmatter.js.map +1 -1
  463. package/dist/vite/plugin-mdx.d.ts +0 -6
  464. package/dist/vite/plugin-mdx.js +80 -6
  465. package/dist/vite/plugin-mdx.js.map +1 -1
  466. package/dist/vite/plugin-search.d.ts +3 -0
  467. package/dist/vite/plugin-search.js +26 -0
  468. package/dist/vite/plugin-search.js.map +1 -0
  469. package/dist/vite/plugin-sidebar.js +7 -6
  470. package/dist/vite/plugin-sidebar.js.map +1 -1
  471. package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
  472. package/dist/vite/plugin-theme-css.js +114 -0
  473. package/dist/vite/plugin-theme-css.js.map +1 -0
  474. package/dist/vite/plugin.d.ts +1 -2
  475. package/dist/vite/plugin.js +12 -6
  476. package/dist/vite/plugin.js.map +1 -1
  477. package/dist/vite/prerender.d.ts +6 -1
  478. package/dist/vite/prerender.js +7 -5
  479. package/dist/vite/prerender.js.map +1 -1
  480. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  481. package/dist/vite/remarkStaticGeneration.js +125 -0
  482. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  483. package/dist/vite/sitemap.d.ts +1 -1
  484. package/dist/zuplo/env.d.ts +6 -0
  485. package/dist/zuplo/env.js +9 -0
  486. package/dist/zuplo/env.js.map +1 -0
  487. package/dist/zuplo/with-zuplo.d.ts +3 -0
  488. package/dist/zuplo/with-zuplo.js +28 -0
  489. package/dist/zuplo/with-zuplo.js.map +1 -0
  490. package/lib/AnchorLink-DFZZbmvr.js +34 -0
  491. package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
  492. package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-DVLEc6cm.js} +23 -20
  493. package/lib/AuthenticationPlugin-DVLEc6cm.js.map +1 -0
  494. package/lib/Button-DeAoTouo.js +48 -0
  495. package/lib/Button-DeAoTouo.js.map +1 -0
  496. package/lib/CategoryHeading-CBconmtI.js +10 -0
  497. package/lib/{CategoryHeading-ovR-zHRq.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
  498. package/lib/ClientOnly-E7hGysn1.js +11 -0
  499. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  500. package/lib/Dialog-Bxv1yEIg.js +67 -0
  501. package/lib/Dialog-Bxv1yEIg.js.map +1 -0
  502. package/lib/Markdown-CZDLNOFc.js +15202 -0
  503. package/lib/Markdown-CZDLNOFc.js.map +1 -0
  504. package/lib/MdxPage-DKMbBROv.js +188 -0
  505. package/lib/MdxPage-DKMbBROv.js.map +1 -0
  506. package/lib/OperationList-BKHUKlAL.js +5062 -0
  507. package/lib/OperationList-BKHUKlAL.js.map +1 -0
  508. package/lib/Route-DYwKZ_c_.js +35 -0
  509. package/lib/Route-DYwKZ_c_.js.map +1 -0
  510. package/lib/Select-B_IxRUUC.js +223 -0
  511. package/lib/Select-B_IxRUUC.js.map +1 -0
  512. package/lib/SlotletProvider-pfc9oejW.js +221 -0
  513. package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
  514. package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
  515. package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
  516. package/lib/StaggeredRender-DgsamH_G.js +17 -0
  517. package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
  518. package/lib/SyntaxHighlight-Bz-lOJtH.js +2979 -0
  519. package/lib/SyntaxHighlight-Bz-lOJtH.js.map +1 -0
  520. package/lib/ZudokuContext-hmLMUdf2.js +1217 -0
  521. package/lib/ZudokuContext-hmLMUdf2.js.map +1 -0
  522. package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
  523. package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
  524. package/lib/{index-CLd8ycZz.js → assets/index-C7jnHK4b.js} +1008 -957
  525. package/lib/assets/index-C7jnHK4b.js.map +1 -0
  526. package/lib/assets/{worker-Bcj4NA2p.js → worker-D2kRl-cG.js} +6035 -5375
  527. package/lib/assets/worker-D2kRl-cG.js.map +1 -0
  528. package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
  529. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
  530. package/lib/cn-qaFjX9_3.js +2279 -0
  531. package/lib/cn-qaFjX9_3.js.map +1 -0
  532. package/lib/context-h_UkBLvr.js +22 -0
  533. package/lib/context-h_UkBLvr.js.map +1 -0
  534. package/lib/createServer-69sLlmQA.js +15679 -0
  535. package/lib/createServer-69sLlmQA.js.map +1 -0
  536. package/lib/hook-CHq7pFyz.js +227 -0
  537. package/lib/hook-CHq7pFyz.js.map +1 -0
  538. package/lib/{assets/index-B9EWVYfo.js → index-CBXSgjaE.js} +1034 -983
  539. package/lib/index-CBXSgjaE.js.map +1 -0
  540. package/lib/index-CPNSgwSb.js +36 -0
  541. package/lib/index-CPNSgwSb.js.map +1 -0
  542. package/lib/index-CbrnMIak.js +1282 -0
  543. package/lib/index-CbrnMIak.js.map +1 -0
  544. package/lib/index-LNp6rxyU.js.map +1 -1
  545. package/lib/index.esm-BSV1C092.js +692 -0
  546. package/lib/index.esm-BSV1C092.js.map +1 -0
  547. package/lib/index.esm-BnnBRKJX.js +1214 -0
  548. package/lib/index.esm-BnnBRKJX.js.map +1 -0
  549. package/lib/invariant-Caa8-XvF.js +26 -0
  550. package/lib/invariant-Caa8-XvF.js.map +1 -0
  551. package/lib/jsx-runtime-Dx-03ztt.js +446 -0
  552. package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
  553. package/lib/object_hash-BNWPnMN9.js +787 -0
  554. package/lib/object_hash-BNWPnMN9.js.map +1 -0
  555. package/lib/post-processors/removeExtensions.js +11 -0
  556. package/lib/post-processors/removeExtensions.js.map +1 -0
  557. package/lib/post-processors/removePaths.js +28 -0
  558. package/lib/post-processors/removePaths.js.map +1 -0
  559. package/lib/post-processors/traverse.js +12 -0
  560. package/lib/post-processors/traverse.js.map +1 -0
  561. package/lib/prism-csharp.min-DUwvItt4.js +63 -0
  562. package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
  563. package/lib/prism-java.min-BtgBR4yd.js +35 -0
  564. package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
  565. package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
  566. package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
  567. package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
  568. package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
  569. package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
  570. package/lib/state-CFQsUZUP.js +202 -0
  571. package/lib/state-CFQsUZUP.js.map +1 -0
  572. package/lib/ui/Accordion.js +47 -0
  573. package/lib/ui/Accordion.js.map +1 -0
  574. package/lib/ui/ActionButton.js +25 -0
  575. package/lib/ui/ActionButton.js.map +1 -0
  576. package/lib/ui/Alert.js +51 -0
  577. package/lib/ui/Alert.js.map +1 -0
  578. package/lib/ui/AlertDialog.js +114 -0
  579. package/lib/ui/AlertDialog.js.map +1 -0
  580. package/lib/ui/AspectRatio.js +6 -0
  581. package/lib/ui/AspectRatio.js.map +1 -0
  582. package/lib/ui/Badge.js +27 -0
  583. package/lib/ui/Badge.js.map +1 -0
  584. package/lib/ui/Breadcrumb.js +94 -0
  585. package/lib/ui/Breadcrumb.js.map +1 -0
  586. package/lib/ui/Button.js +49 -0
  587. package/lib/ui/Button.js.map +1 -0
  588. package/lib/ui/Callout.js +77 -0
  589. package/lib/ui/Callout.js.map +1 -0
  590. package/lib/ui/Card.js +62 -0
  591. package/lib/ui/Card.js.map +1 -0
  592. package/lib/ui/Carousel.js +1416 -0
  593. package/lib/ui/Carousel.js.map +1 -0
  594. package/lib/ui/Checkbox.js +28 -0
  595. package/lib/ui/Checkbox.js.map +1 -0
  596. package/lib/ui/Collapsible.js +8 -0
  597. package/lib/ui/Collapsible.js.map +1 -0
  598. package/lib/ui/Command.js +553 -0
  599. package/lib/ui/Command.js.map +1 -0
  600. package/lib/ui/Dialog.js +101 -0
  601. package/lib/ui/Dialog.js.map +1 -0
  602. package/lib/ui/Drawer.js +1153 -0
  603. package/lib/ui/Drawer.js.map +1 -0
  604. package/lib/ui/DropdownMenu.js +145 -0
  605. package/lib/ui/DropdownMenu.js.map +1 -0
  606. package/lib/ui/Form.js +95 -0
  607. package/lib/ui/Form.js.map +1 -0
  608. package/lib/ui/HoverCard.js +24 -0
  609. package/lib/ui/HoverCard.js.map +1 -0
  610. package/lib/ui/Input.js +22 -0
  611. package/lib/ui/Input.js.map +1 -0
  612. package/lib/ui/Label.js +20 -0
  613. package/lib/ui/Label.js.map +1 -0
  614. package/lib/ui/Pagination.js +106 -0
  615. package/lib/ui/Pagination.js.map +1 -0
  616. package/lib/ui/Popover.js +24 -0
  617. package/lib/ui/Popover.js.map +1 -0
  618. package/lib/ui/Progress.js +27 -0
  619. package/lib/ui/Progress.js.map +1 -0
  620. package/lib/ui/RadioGroup.js +32 -0
  621. package/lib/ui/RadioGroup.js.map +1 -0
  622. package/lib/ui/ScrollArea.js +39 -0
  623. package/lib/ui/ScrollArea.js.map +1 -0
  624. package/lib/ui/Select.js +122 -0
  625. package/lib/ui/Select.js.map +1 -0
  626. package/lib/ui/Skeleton.js +18 -0
  627. package/lib/ui/Skeleton.js.map +1 -0
  628. package/lib/ui/Slider.js +24 -0
  629. package/lib/ui/Slider.js.map +1 -0
  630. package/lib/ui/Switch.js +28 -0
  631. package/lib/ui/Switch.js.map +1 -0
  632. package/lib/ui/Tabs.js +47 -0
  633. package/lib/ui/Tabs.js.map +1 -0
  634. package/lib/ui/Textarea.js +21 -0
  635. package/lib/ui/Textarea.js.map +1 -0
  636. package/lib/ui/Toggle.js +38 -0
  637. package/lib/ui/Toggle.js.map +1 -0
  638. package/lib/ui/ToggleGroup.js +42 -0
  639. package/lib/ui/ToggleGroup.js.map +1 -0
  640. package/lib/ui/Tooltip.js +24 -0
  641. package/lib/ui/Tooltip.js.map +1 -0
  642. package/lib/useExposedProps-DE9lR6MF.js +9 -0
  643. package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
  644. package/lib/zudoku.auth-auth0.js +24 -18
  645. package/lib/zudoku.auth-auth0.js.map +1 -1
  646. package/lib/zudoku.auth-clerk.js +2 -2
  647. package/lib/zudoku.auth-clerk.js.map +1 -1
  648. package/lib/zudoku.auth-openid.js +620 -619
  649. package/lib/zudoku.auth-openid.js.map +1 -1
  650. package/lib/zudoku.components.js +1064 -3006
  651. package/lib/zudoku.components.js.map +1 -1
  652. package/lib/zudoku.openapi-worker.js +10 -16056
  653. package/lib/zudoku.openapi-worker.js.map +1 -1
  654. package/lib/zudoku.plugin-api-catalog.js +123 -0
  655. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  656. package/lib/zudoku.plugin-api-keys.js +72 -78
  657. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  658. package/lib/zudoku.plugin-custom-pages.js +22 -0
  659. package/lib/zudoku.plugin-custom-pages.js.map +1 -0
  660. package/lib/zudoku.plugin-markdown.js +94 -27
  661. package/lib/zudoku.plugin-markdown.js.map +1 -1
  662. package/lib/zudoku.plugin-openapi.js +7 -12
  663. package/lib/zudoku.plugin-openapi.js.map +1 -1
  664. package/lib/zudoku.plugin-redirect.js +2 -2
  665. package/lib/zudoku.plugin-redirect.js.map +1 -1
  666. package/lib/zudoku.plugin-search-inkeep.js +53 -28
  667. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  668. package/package.json +135 -87
  669. package/src/app/demo.tsx +1 -4
  670. package/src/app/entry.client.tsx +20 -3
  671. package/src/app/entry.server.tsx +63 -52
  672. package/src/app/main.css +5 -2
  673. package/src/app/main.tsx +24 -38
  674. package/src/app/sentry.ts +24 -0
  675. package/src/app/standalone.tsx +2 -5
  676. package/src/app/tailwind.ts +67 -52
  677. package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
  678. package/src/lib/authentication/authentication.ts +3 -3
  679. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  680. package/src/lib/authentication/components/SignIn.tsx +1 -1
  681. package/src/lib/authentication/components/SignOut.tsx +1 -1
  682. package/src/lib/authentication/hook.ts +1 -3
  683. package/src/lib/authentication/providers/auth0.tsx +17 -11
  684. package/src/lib/authentication/providers/openid.tsx +22 -33
  685. package/src/lib/authentication/state.ts +50 -9
  686. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  687. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  688. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  689. package/src/lib/components/AnchorLink.tsx +1 -1
  690. package/src/lib/components/Banner.tsx +12 -2
  691. package/src/lib/components/Bootstrap.tsx +36 -16
  692. package/src/lib/components/ClientOnly.tsx +6 -3
  693. package/src/lib/components/DeveloperHint.tsx +6 -1
  694. package/src/lib/components/ErrorPage.tsx +0 -2
  695. package/src/lib/components/Header.tsx +91 -46
  696. package/src/lib/components/Heading.tsx +13 -13
  697. package/src/lib/components/Layout.tsx +56 -38
  698. package/src/lib/components/Markdown.tsx +1 -1
  699. package/src/lib/components/MobileTopNavigation.tsx +31 -26
  700. package/src/lib/components/NotFoundPage.tsx +1 -1
  701. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  702. package/src/lib/components/ReactMarkdown.tsx +264 -0
  703. package/src/lib/components/Search.tsx +4 -4
  704. package/src/lib/components/SlotletProvider.tsx +29 -4
  705. package/src/lib/components/SyntaxHighlight.tsx +85 -50
  706. package/src/lib/components/ThemeSwitch.tsx +26 -0
  707. package/src/lib/components/TopNavigation.tsx +78 -23
  708. package/src/lib/components/Zudoku.tsx +108 -0
  709. package/src/lib/components/context/ZudokuContext.ts +33 -30
  710. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  711. package/src/lib/components/index.ts +19 -7
  712. package/src/lib/components/navigation/Sidebar.tsx +22 -12
  713. package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
  714. package/src/lib/components/navigation/SidebarCategory.tsx +39 -32
  715. package/src/lib/components/navigation/SidebarItem.tsx +24 -30
  716. package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
  717. package/src/lib/components/navigation/utils.ts +12 -17
  718. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +7 -14
  719. package/src/lib/core/plugins.ts +19 -17
  720. package/src/lib/errors/ErrorAlert.tsx +20 -6
  721. package/src/lib/errors/RouterError.tsx +1 -1
  722. package/src/lib/oas/graphql/index.ts +11 -16
  723. package/src/lib/oas/parser/upgrade/index.ts +3 -24
  724. package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
  725. package/src/lib/plugins/api-catalog/index.tsx +64 -0
  726. package/src/lib/plugins/api-keys/CreateApiKey.tsx +3 -3
  727. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  728. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
  729. package/src/lib/plugins/api-keys/index.tsx +13 -10
  730. package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
  731. package/src/lib/plugins/custom-pages/index.tsx +24 -0
  732. package/src/lib/plugins/markdown/MdxPage.tsx +38 -10
  733. package/src/lib/plugins/markdown/index.tsx +53 -13
  734. package/src/lib/plugins/markdown/resolver.ts +90 -0
  735. package/src/lib/plugins/openapi/CollapsibleCode.tsx +80 -0
  736. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  737. package/src/lib/plugins/openapi/Endpoint.tsx +7 -12
  738. package/src/lib/plugins/openapi/OperationList.tsx +81 -45
  739. package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
  740. package/src/lib/plugins/openapi/ParameterListItem.tsx +37 -31
  741. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +18 -13
  742. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +17 -12
  743. package/src/lib/plugins/openapi/Route.tsx +42 -12
  744. package/src/lib/plugins/openapi/Sidecar.tsx +75 -75
  745. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +157 -0
  746. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  747. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  748. package/src/lib/plugins/openapi/client/useCreateQuery.ts +33 -0
  749. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  750. package/src/lib/plugins/openapi/context.tsx +2 -2
  751. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  752. package/src/lib/plugins/openapi/graphql/gql.ts +12 -29
  753. package/src/lib/plugins/openapi/graphql/graphql.ts +236 -665
  754. package/src/lib/plugins/openapi/index.tsx +77 -97
  755. package/src/lib/plugins/openapi/interfaces.ts +22 -1
  756. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
  757. package/src/lib/plugins/openapi/playground/Playground.tsx +5 -4
  758. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  759. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
  760. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +144 -0
  761. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +24 -0
  762. package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +126 -0
  763. package/src/lib/plugins/openapi/post-processors/removePaths.ts +55 -0
  764. package/src/lib/plugins/openapi/post-processors/traverse.ts +1 -0
  765. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -2
  766. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +28 -42
  767. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  768. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  769. package/src/lib/plugins/openapi-worker.ts +11 -1
  770. package/src/lib/plugins/redirect/index.tsx +6 -10
  771. package/src/lib/plugins/search-inkeep/index.tsx +80 -25
  772. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
  773. package/src/lib/ui/Accordion.tsx +56 -0
  774. package/src/lib/ui/ActionButton.tsx +28 -0
  775. package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
  776. package/src/lib/ui/AlertDialog.tsx +139 -0
  777. package/src/lib/ui/AspectRatio.tsx +5 -0
  778. package/src/lib/ui/Badge.tsx +36 -0
  779. package/src/lib/ui/Breadcrumb.tsx +115 -0
  780. package/src/lib/ui/Button.tsx +1 -1
  781. package/src/lib/ui/Callout.tsx +7 -6
  782. package/src/lib/ui/Carousel.tsx +260 -0
  783. package/src/lib/ui/Checkbox.tsx +28 -0
  784. package/src/lib/ui/Collapsible.tsx +9 -0
  785. package/src/lib/ui/Command.tsx +151 -0
  786. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  787. package/src/lib/ui/Drawer.tsx +38 -36
  788. package/src/lib/ui/Form.tsx +177 -0
  789. package/src/lib/ui/HoverCard.tsx +27 -0
  790. package/src/lib/ui/Label.tsx +24 -0
  791. package/src/lib/ui/Pagination.tsx +117 -0
  792. package/src/lib/ui/Popover.tsx +29 -0
  793. package/src/lib/ui/Progress.tsx +26 -0
  794. package/src/lib/ui/RadioGroup.tsx +42 -0
  795. package/src/lib/ui/ScrollArea.tsx +46 -0
  796. package/src/lib/ui/Skeleton.tsx +15 -0
  797. package/src/lib/ui/Slider.tsx +26 -0
  798. package/src/lib/ui/Switch.tsx +27 -0
  799. package/src/lib/ui/Textarea.tsx +23 -0
  800. package/src/lib/ui/Toggle.tsx +43 -0
  801. package/src/lib/ui/ToggleGroup.tsx +59 -0
  802. package/src/lib/ui/Tooltip.tsx +28 -0
  803. package/src/lib/util/MdxComponents.tsx +3 -9
  804. package/src/lib/util/createVariantComponent.tsx +2 -2
  805. package/src/lib/util/invariant.ts +15 -3
  806. package/src/lib/util/traverse.ts +25 -0
  807. package/src/lib/util/useExposedProps.tsx +16 -0
  808. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  809. package/src/lib/util/useOnScreen.ts +32 -0
  810. package/src/lib/util/useScrollToAnchor.ts +2 -2
  811. package/src/lib/util/useScrollToTop.ts +1 -1
  812. package/dist/internal.d.ts +0 -1
  813. package/dist/internal.js +0 -2
  814. package/dist/internal.js.map +0 -1
  815. package/dist/lib/components/DevPortal.js.map +0 -1
  816. package/dist/lib/components/Dialog.js.map +0 -1
  817. package/dist/lib/components/Select.js.map +0 -1
  818. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  819. package/dist/lib/components/context/ThemeContext.js +0 -7
  820. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  821. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  822. package/dist/lib/components/context/ThemeProvider.js +0 -23
  823. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  824. package/dist/lib/core/DevPortalContext.js.map +0 -1
  825. package/dist/lib/plugins/custom-page/index.d.ts +0 -8
  826. package/dist/lib/plugins/custom-page/index.js +0 -12
  827. package/dist/lib/plugins/custom-page/index.js.map +0 -1
  828. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  829. package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
  830. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  831. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  832. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  833. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  834. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  835. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  836. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  837. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  838. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  839. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  840. package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
  841. package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
  842. package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
  843. package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
  844. package/dist/lib/plugins/openapi/util/urql.js +0 -8
  845. package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
  846. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  847. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  848. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  849. package/dist/lib/themeToggle.d.ts +0 -1
  850. package/dist/lib/themeToggle.js +0 -7
  851. package/dist/lib/themeToggle.js.map +0 -1
  852. package/dist/lib/ui/Note.d.ts +0 -8
  853. package/dist/lib/ui/Note.js +0 -23
  854. package/dist/lib/ui/Note.js.map +0 -1
  855. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  856. package/dist/lib/util/createWaitForNotify.js +0 -15
  857. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  858. package/dist/vite/plugin-custom-css.js +0 -55
  859. package/dist/vite/plugin-custom-css.js.map +0 -1
  860. package/dist/vite/plugin-html-transform.d.ts +0 -2
  861. package/dist/vite/plugin-html-transform.js +0 -15
  862. package/dist/vite/plugin-html-transform.js.map +0 -1
  863. package/lib/AuthenticationPlugin-Bx9FK124.js.map +0 -1
  864. package/lib/CategoryHeading-ovR-zHRq.js +0 -10
  865. package/lib/DeveloperHint-YeWHKvyr.js +0 -16
  866. package/lib/DeveloperHint-YeWHKvyr.js.map +0 -1
  867. package/lib/ErrorPage-Dri5_2lr.js +0 -18
  868. package/lib/ErrorPage-Dri5_2lr.js.map +0 -1
  869. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  870. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  871. package/lib/Input-CtVUl3eT.js +0 -2198
  872. package/lib/Input-CtVUl3eT.js.map +0 -1
  873. package/lib/Markdown-DapSf3wG.js +0 -20281
  874. package/lib/Markdown-DapSf3wG.js.map +0 -1
  875. package/lib/MdxPage-BqBWsXZ1.js +0 -172
  876. package/lib/MdxPage-BqBWsXZ1.js.map +0 -1
  877. package/lib/OperationList-JAQF5-tn.js +0 -602
  878. package/lib/OperationList-JAQF5-tn.js.map +0 -1
  879. package/lib/Route-DSANUy5e.js +0 -14
  880. package/lib/Route-DSANUy5e.js.map +0 -1
  881. package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
  882. package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
  883. package/lib/SlotletProvider-D3UD5Go3.js +0 -238
  884. package/lib/SlotletProvider-D3UD5Go3.js.map +0 -1
  885. package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
  886. package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
  887. package/lib/assets/index-B9EWVYfo.js.map +0 -1
  888. package/lib/assets/worker-Bcj4NA2p.js.map +0 -1
  889. package/lib/index-BG0g4WW0.js +0 -1771
  890. package/lib/index-BG0g4WW0.js.map +0 -1
  891. package/lib/index-BngPzhKn.js +0 -124
  892. package/lib/index-BngPzhKn.js.map +0 -1
  893. package/lib/index-CLd8ycZz.js.map +0 -1
  894. package/lib/index-Dolisrci.js +0 -2814
  895. package/lib/index-Dolisrci.js.map +0 -1
  896. package/lib/index-DyJyULzS.js +0 -5816
  897. package/lib/index-DyJyULzS.js.map +0 -1
  898. package/lib/joinPath-B7kNnUX4.js +0 -8
  899. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  900. package/lib/jsx-runtime-B6kdoens.js +0 -635
  901. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  902. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  903. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  904. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  905. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  906. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  907. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  908. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  909. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  910. package/lib/router-D2p7Olpn.js +0 -2971
  911. package/lib/router-D2p7Olpn.js.map +0 -1
  912. package/lib/state-hNe1dw4B.js +0 -548
  913. package/lib/state-hNe1dw4B.js.map +0 -1
  914. package/lib/urql-YhcsXYy8.js +0 -1591
  915. package/lib/urql-YhcsXYy8.js.map +0 -1
  916. package/lib/utils-ByIc_KIM.js +0 -749
  917. package/lib/utils-ByIc_KIM.js.map +0 -1
  918. package/lib/zudoku.plugin-custom-page.js +0 -13
  919. package/lib/zudoku.plugin-custom-page.js.map +0 -1
  920. package/src/lib/components/DevPortal.tsx +0 -111
  921. package/src/lib/components/context/ThemeContext.tsx +0 -8
  922. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  923. package/src/lib/plugins/custom-page/index.tsx +0 -22
  924. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
  925. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -56
  926. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -80
  927. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  928. package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
  929. package/src/lib/plugins/openapi/util/urql.ts +0 -8
  930. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
  931. package/src/lib/themeToggle.ts +0 -7
  932. package/src/lib/util/createWaitForNotify.ts +0 -18
  933. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  934. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  935. /package/dist/lib/{components → ui}/Select.js +0 -0
  936. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -0,0 +1,1823 @@
1
+ import * as o from "react";
2
+ var _ = {}, se;
3
+ function Ae() {
4
+ if (se) return _;
5
+ se = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.parse = s, _.serialize = u;
6
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, i = /* @__PURE__ */ (() => {
7
+ const f = function() {
8
+ };
9
+ return f.prototype = /* @__PURE__ */ Object.create(null), f;
10
+ })();
11
+ function s(f, p) {
12
+ const d = new i(), g = f.length;
13
+ if (g < 2)
14
+ return d;
15
+ const w = (p == null ? void 0 : p.decode) || m;
16
+ let h = 0;
17
+ do {
18
+ const E = f.indexOf("=", h);
19
+ if (E === -1)
20
+ break;
21
+ const y = f.indexOf(";", h), R = y === -1 ? g : y;
22
+ if (E > R) {
23
+ h = f.lastIndexOf(";", E - 1) + 1;
24
+ continue;
25
+ }
26
+ const x = c(f, h, E), C = l(f, E, x), $ = f.slice(x, C);
27
+ if (d[$] === void 0) {
28
+ let S = c(f, E + 1, R), P = l(f, R, S);
29
+ const D = w(f.slice(S, P));
30
+ d[$] = D;
31
+ }
32
+ h = R + 1;
33
+ } while (h < g);
34
+ return d;
35
+ }
36
+ function c(f, p, d) {
37
+ do {
38
+ const g = f.charCodeAt(p);
39
+ if (g !== 32 && g !== 9)
40
+ return p;
41
+ } while (++p < d);
42
+ return d;
43
+ }
44
+ function l(f, p, d) {
45
+ for (; p > d; ) {
46
+ const g = f.charCodeAt(--p);
47
+ if (g !== 32 && g !== 9)
48
+ return p + 1;
49
+ }
50
+ return d;
51
+ }
52
+ function u(f, p, d) {
53
+ const g = (d == null ? void 0 : d.encode) || encodeURIComponent;
54
+ if (!e.test(f))
55
+ throw new TypeError(`argument name is invalid: ${f}`);
56
+ const w = g(p);
57
+ if (!t.test(w))
58
+ throw new TypeError(`argument val is invalid: ${p}`);
59
+ let h = f + "=" + w;
60
+ if (!d)
61
+ return h;
62
+ if (d.maxAge !== void 0) {
63
+ if (!Number.isInteger(d.maxAge))
64
+ throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);
65
+ h += "; Max-Age=" + d.maxAge;
66
+ }
67
+ if (d.domain) {
68
+ if (!r.test(d.domain))
69
+ throw new TypeError(`option domain is invalid: ${d.domain}`);
70
+ h += "; Domain=" + d.domain;
71
+ }
72
+ if (d.path) {
73
+ if (!a.test(d.path))
74
+ throw new TypeError(`option path is invalid: ${d.path}`);
75
+ h += "; Path=" + d.path;
76
+ }
77
+ if (d.expires) {
78
+ if (!v(d.expires) || !Number.isFinite(d.expires.valueOf()))
79
+ throw new TypeError(`option expires is invalid: ${d.expires}`);
80
+ h += "; Expires=" + d.expires.toUTCString();
81
+ }
82
+ if (d.httpOnly && (h += "; HttpOnly"), d.secure && (h += "; Secure"), d.partitioned && (h += "; Partitioned"), d.priority)
83
+ switch (typeof d.priority == "string" ? d.priority.toLowerCase() : void 0) {
84
+ case "low":
85
+ h += "; Priority=Low";
86
+ break;
87
+ case "medium":
88
+ h += "; Priority=Medium";
89
+ break;
90
+ case "high":
91
+ h += "; Priority=High";
92
+ break;
93
+ default:
94
+ throw new TypeError(`option priority is invalid: ${d.priority}`);
95
+ }
96
+ if (d.sameSite)
97
+ switch (typeof d.sameSite == "string" ? d.sameSite.toLowerCase() : d.sameSite) {
98
+ case !0:
99
+ case "strict":
100
+ h += "; SameSite=Strict";
101
+ break;
102
+ case "lax":
103
+ h += "; SameSite=Lax";
104
+ break;
105
+ case "none":
106
+ h += "; SameSite=None";
107
+ break;
108
+ default:
109
+ throw new TypeError(`option sameSite is invalid: ${d.sameSite}`);
110
+ }
111
+ return h;
112
+ }
113
+ function m(f) {
114
+ if (f.indexOf("%") === -1)
115
+ return f;
116
+ try {
117
+ return decodeURIComponent(f);
118
+ } catch {
119
+ return f;
120
+ }
121
+ }
122
+ function v(f) {
123
+ return n.call(f) === "[object Date]";
124
+ }
125
+ return _;
126
+ }
127
+ Ae();
128
+ /**
129
+ * react-router v7.0.2
130
+ *
131
+ * Copyright (c) Remix Software Inc.
132
+ *
133
+ * This source code is licensed under the MIT license found in the
134
+ * LICENSE.md file in the root directory of this source tree.
135
+ *
136
+ * @license MIT
137
+ */
138
+ function b(e, t) {
139
+ if (e === !1 || e === null || typeof e > "u")
140
+ throw new Error(t);
141
+ }
142
+ function L(e, t) {
143
+ if (!e) {
144
+ typeof console < "u" && console.warn(t);
145
+ try {
146
+ throw new Error(t);
147
+ } catch {
148
+ }
149
+ }
150
+ }
151
+ function B({
152
+ pathname: e = "/",
153
+ search: t = "",
154
+ hash: r = ""
155
+ }) {
156
+ return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
157
+ }
158
+ function Y(e) {
159
+ let t = {};
160
+ if (e) {
161
+ let r = e.indexOf("#");
162
+ r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
163
+ let a = e.indexOf("?");
164
+ a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
165
+ }
166
+ return t;
167
+ }
168
+ function pe(e, t, r = "/") {
169
+ return De(e, t, r, !1);
170
+ }
171
+ function De(e, t, r, a) {
172
+ let n = typeof t == "string" ? Y(t) : t, i = I(n.pathname || "/", r);
173
+ if (i == null)
174
+ return null;
175
+ let s = ve(e);
176
+ Ie(s);
177
+ let c = null;
178
+ for (let l = 0; c == null && l < s.length; ++l) {
179
+ let u = ye(i);
180
+ c = ze(
181
+ s[l],
182
+ u,
183
+ a
184
+ );
185
+ }
186
+ return c;
187
+ }
188
+ function ve(e, t = [], r = [], a = "") {
189
+ let n = (i, s, c) => {
190
+ let l = {
191
+ relativePath: c === void 0 ? i.path || "" : c,
192
+ caseSensitive: i.caseSensitive === !0,
193
+ childrenIndex: s,
194
+ route: i
195
+ };
196
+ l.relativePath.startsWith("/") && (b(
197
+ l.relativePath.startsWith(a),
198
+ `Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
199
+ ), l.relativePath = l.relativePath.slice(a.length));
200
+ let u = A([a, l.relativePath]), m = r.concat(l);
201
+ i.children && i.children.length > 0 && (b(
202
+ // Our types know better, but runtime JS may not!
203
+ // @ts-expect-error
204
+ i.index !== !0,
205
+ `Index routes must not have child routes. Please remove all child routes from route path "${u}".`
206
+ ), ve(i.children, t, m, u)), !(i.path == null && !i.index) && t.push({
207
+ path: u,
208
+ score: He(u, i.index),
209
+ routesMeta: m
210
+ });
211
+ };
212
+ return e.forEach((i, s) => {
213
+ var c;
214
+ if (i.path === "" || !((c = i.path) != null && c.includes("?")))
215
+ n(i, s);
216
+ else
217
+ for (let l of ge(i.path))
218
+ n(i, s, l);
219
+ }), t;
220
+ }
221
+ function ge(e) {
222
+ let t = e.split("/");
223
+ if (t.length === 0) return [];
224
+ let [r, ...a] = t, n = r.endsWith("?"), i = r.replace(/\?$/, "");
225
+ if (a.length === 0)
226
+ return n ? [i, ""] : [i];
227
+ let s = ge(a.join("/")), c = [];
228
+ return c.push(
229
+ ...s.map(
230
+ (l) => l === "" ? i : [i, l].join("/")
231
+ )
232
+ ), n && c.push(...s), c.map(
233
+ (l) => e.startsWith("/") && l === "" ? "/" : l
234
+ );
235
+ }
236
+ function Ie(e) {
237
+ e.sort(
238
+ (t, r) => t.score !== r.score ? r.score - t.score : We(
239
+ t.routesMeta.map((a) => a.childrenIndex),
240
+ r.routesMeta.map((a) => a.childrenIndex)
241
+ )
242
+ );
243
+ }
244
+ var Oe = /^:[\w-]+$/, Me = 3, Fe = 2, _e = 1, Ue = 10, Be = -2, ce = (e) => e === "*";
245
+ function He(e, t) {
246
+ let r = e.split("/"), a = r.length;
247
+ return r.some(ce) && (a += Be), t && (a += Fe), r.filter((n) => !ce(n)).reduce(
248
+ (n, i) => n + (Oe.test(i) ? Me : i === "" ? _e : Ue),
249
+ a
250
+ );
251
+ }
252
+ function We(e, t) {
253
+ return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
254
+ // If two routes are siblings, we should try to match the earlier sibling
255
+ // first. This allows people to have fine-grained control over the matching
256
+ // behavior by simply putting routes with identical paths in the order they
257
+ // want them tried.
258
+ e[e.length - 1] - t[t.length - 1]
259
+ ) : (
260
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
261
+ // so they sort equally.
262
+ 0
263
+ );
264
+ }
265
+ function ze(e, t, r = !1) {
266
+ let { routesMeta: a } = e, n = {}, i = "/", s = [];
267
+ for (let c = 0; c < a.length; ++c) {
268
+ let l = a[c], u = c === a.length - 1, m = i === "/" ? t : t.slice(i.length) || "/", v = H(
269
+ { path: l.relativePath, caseSensitive: l.caseSensitive, end: u },
270
+ m
271
+ ), f = l.route;
272
+ if (!v && u && r && !a[a.length - 1].route.index && (v = H(
273
+ {
274
+ path: l.relativePath,
275
+ caseSensitive: l.caseSensitive,
276
+ end: !1
277
+ },
278
+ m
279
+ )), !v)
280
+ return null;
281
+ Object.assign(n, v.params), s.push({
282
+ // TODO: Can this as be avoided?
283
+ params: n,
284
+ pathname: A([i, v.pathname]),
285
+ pathnameBase: Ke(
286
+ A([i, v.pathnameBase])
287
+ ),
288
+ route: f
289
+ }), v.pathnameBase !== "/" && (i = A([i, v.pathnameBase]));
290
+ }
291
+ return s;
292
+ }
293
+ function H(e, t) {
294
+ typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
295
+ let [r, a] = Ve(
296
+ e.path,
297
+ e.caseSensitive,
298
+ e.end
299
+ ), n = t.match(r);
300
+ if (!n) return null;
301
+ let i = n[0], s = i.replace(/(.)\/+$/, "$1"), c = n.slice(1);
302
+ return {
303
+ params: a.reduce(
304
+ (u, { paramName: m, isOptional: v }, f) => {
305
+ if (m === "*") {
306
+ let d = c[f] || "";
307
+ s = i.slice(0, i.length - d.length).replace(/(.)\/+$/, "$1");
308
+ }
309
+ const p = c[f];
310
+ return v && !p ? u[m] = void 0 : u[m] = (p || "").replace(/%2F/g, "/"), u;
311
+ },
312
+ {}
313
+ ),
314
+ pathname: i,
315
+ pathnameBase: s,
316
+ pattern: e
317
+ };
318
+ }
319
+ function Ve(e, t = !1, r = !0) {
320
+ L(
321
+ e === "*" || !e.endsWith("*") || e.endsWith("/*"),
322
+ `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
323
+ );
324
+ let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
325
+ /\/:([\w-]+)(\?)?/g,
326
+ (s, c, l) => (a.push({ paramName: c, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
327
+ );
328
+ return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
329
+ }
330
+ function ye(e) {
331
+ try {
332
+ return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
333
+ } catch (t) {
334
+ return L(
335
+ !1,
336
+ `The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
337
+ ), e;
338
+ }
339
+ }
340
+ function I(e, t) {
341
+ if (t === "/") return e;
342
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
343
+ return null;
344
+ let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
345
+ return a && a !== "/" ? null : e.slice(r) || "/";
346
+ }
347
+ function je(e, t = "/") {
348
+ let {
349
+ pathname: r,
350
+ search: a = "",
351
+ hash: n = ""
352
+ } = typeof e == "string" ? Y(e) : e;
353
+ return {
354
+ pathname: r ? r.startsWith("/") ? r : Ye(r, t) : t,
355
+ search: qe(a),
356
+ hash: Ge(n)
357
+ };
358
+ }
359
+ function Ye(e, t) {
360
+ let r = t.replace(/\/+$/, "").split("/");
361
+ return e.split("/").forEach((n) => {
362
+ n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
363
+ }), r.length > 1 ? r.join("/") : "/";
364
+ }
365
+ function G(e, t, r, a) {
366
+ return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
367
+ a
368
+ )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
369
+ }
370
+ function Je(e) {
371
+ return e.filter(
372
+ (t, r) => r === 0 || t.route.path && t.route.path.length > 0
373
+ );
374
+ }
375
+ function Z(e) {
376
+ let t = Je(e);
377
+ return t.map(
378
+ (r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
379
+ );
380
+ }
381
+ function ee(e, t, r, a = !1) {
382
+ let n;
383
+ typeof e == "string" ? n = Y(e) : (n = { ...e }, b(
384
+ !n.pathname || !n.pathname.includes("?"),
385
+ G("?", "pathname", "search", n)
386
+ ), b(
387
+ !n.pathname || !n.pathname.includes("#"),
388
+ G("#", "pathname", "hash", n)
389
+ ), b(
390
+ !n.search || !n.search.includes("#"),
391
+ G("#", "search", "hash", n)
392
+ ));
393
+ let i = e === "" || n.pathname === "", s = i ? "/" : n.pathname, c;
394
+ if (s == null)
395
+ c = r;
396
+ else {
397
+ let v = t.length - 1;
398
+ if (!a && s.startsWith("..")) {
399
+ let f = s.split("/");
400
+ for (; f[0] === ".."; )
401
+ f.shift(), v -= 1;
402
+ n.pathname = f.join("/");
403
+ }
404
+ c = v >= 0 ? t[v] : "/";
405
+ }
406
+ let l = je(n, c), u = s && s !== "/" && s.endsWith("/"), m = (i || s === ".") && r.endsWith("/");
407
+ return !l.pathname.endsWith("/") && (u || m) && (l.pathname += "/"), l;
408
+ }
409
+ var A = (e) => e.join("/").replace(/\/\/+/g, "/"), Ke = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), qe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ge = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, ar = (e, t = 302) => {
410
+ let r = t;
411
+ typeof r == "number" ? r = { status: r } : typeof r.status > "u" && (r.status = 302);
412
+ let a = new Headers(r.headers);
413
+ return a.set("Location", e), new Response(null, {
414
+ ...r,
415
+ headers: a
416
+ });
417
+ };
418
+ function we(e) {
419
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
420
+ }
421
+ var Ee = [
422
+ "POST",
423
+ "PUT",
424
+ "PATCH",
425
+ "DELETE"
426
+ ];
427
+ new Set(
428
+ Ee
429
+ );
430
+ var Xe = [
431
+ "GET",
432
+ ...Ee
433
+ ];
434
+ new Set(Xe);
435
+ var O = o.createContext(null);
436
+ O.displayName = "DataRouter";
437
+ var F = o.createContext(null);
438
+ F.displayName = "DataRouterState";
439
+ var J = o.createContext({
440
+ isTransitioning: !1
441
+ });
442
+ J.displayName = "ViewTransition";
443
+ var te = o.createContext(
444
+ /* @__PURE__ */ new Map()
445
+ );
446
+ te.displayName = "Fetchers";
447
+ var Qe = o.createContext(null);
448
+ Qe.displayName = "Await";
449
+ var T = o.createContext(
450
+ null
451
+ );
452
+ T.displayName = "Navigation";
453
+ var K = o.createContext(
454
+ null
455
+ );
456
+ K.displayName = "Location";
457
+ var k = o.createContext({
458
+ outlet: null,
459
+ matches: [],
460
+ isDataRoute: !1
461
+ });
462
+ k.displayName = "Route";
463
+ var re = o.createContext(null);
464
+ re.displayName = "RouteError";
465
+ function Ze(e, { relative: t } = {}) {
466
+ b(
467
+ M(),
468
+ // TODO: This error is probably because they somehow have 2 versions of the
469
+ // router loaded. We can help them understand how to avoid that.
470
+ "useHref() may be used only in the context of a <Router> component."
471
+ );
472
+ let { basename: r, navigator: a } = o.useContext(T), { hash: n, pathname: i, search: s } = W(e, { relative: t }), c = i;
473
+ return r !== "/" && (c = i === "/" ? r : A([r, i])), a.createHref({ pathname: c, search: s, hash: n });
474
+ }
475
+ function M() {
476
+ return o.useContext(K) != null;
477
+ }
478
+ function N() {
479
+ return b(
480
+ M(),
481
+ // TODO: This error is probably because they somehow have 2 versions of the
482
+ // router loaded. We can help them understand how to avoid that.
483
+ "useLocation() may be used only in the context of a <Router> component."
484
+ ), o.useContext(K).location;
485
+ }
486
+ function ir(e) {
487
+ b(
488
+ M(),
489
+ // TODO: This error is probably because they somehow have 2 versions of the
490
+ // router loaded. We can help them understand how to avoid that.
491
+ "useMatch() may be used only in the context of a <Router> component."
492
+ );
493
+ let { pathname: t } = N();
494
+ return o.useMemo(
495
+ () => H(e, ye(t)),
496
+ [t, e]
497
+ );
498
+ }
499
+ var xe = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
500
+ function Re(e) {
501
+ o.useContext(T).static || o.useLayoutEffect(e);
502
+ }
503
+ function ne() {
504
+ let { isDataRoute: e } = o.useContext(k);
505
+ return e ? dt() : et();
506
+ }
507
+ function et() {
508
+ b(
509
+ M(),
510
+ // TODO: This error is probably because they somehow have 2 versions of the
511
+ // router loaded. We can help them understand how to avoid that.
512
+ "useNavigate() may be used only in the context of a <Router> component."
513
+ );
514
+ let e = o.useContext(O), { basename: t, navigator: r } = o.useContext(T), { matches: a } = o.useContext(k), { pathname: n } = N(), i = JSON.stringify(Z(a)), s = o.useRef(!1);
515
+ return Re(() => {
516
+ s.current = !0;
517
+ }), o.useCallback(
518
+ (l, u = {}) => {
519
+ if (L(s.current, xe), !s.current) return;
520
+ if (typeof l == "number") {
521
+ r.go(l);
522
+ return;
523
+ }
524
+ let m = ee(
525
+ l,
526
+ JSON.parse(i),
527
+ n,
528
+ u.relative === "path"
529
+ );
530
+ e == null && t !== "/" && (m.pathname = m.pathname === "/" ? t : A([t, m.pathname])), (u.replace ? r.replace : r.push)(
531
+ m,
532
+ u.state,
533
+ u
534
+ );
535
+ },
536
+ [
537
+ t,
538
+ r,
539
+ i,
540
+ n,
541
+ e
542
+ ]
543
+ );
544
+ }
545
+ var tt = o.createContext(null);
546
+ function rt(e) {
547
+ let t = o.useContext(k).outlet;
548
+ return t && /* @__PURE__ */ o.createElement(tt.Provider, { value: e }, t);
549
+ }
550
+ function or() {
551
+ let { matches: e } = o.useContext(k), t = e[e.length - 1];
552
+ return t ? t.params : {};
553
+ }
554
+ function W(e, { relative: t } = {}) {
555
+ let { matches: r } = o.useContext(k), { pathname: a } = N(), n = JSON.stringify(Z(r));
556
+ return o.useMemo(
557
+ () => ee(
558
+ e,
559
+ JSON.parse(n),
560
+ a,
561
+ t === "path"
562
+ ),
563
+ [e, n, a, t]
564
+ );
565
+ }
566
+ function be(e, t, r, a) {
567
+ b(
568
+ M(),
569
+ // TODO: This error is probably because they somehow have 2 versions of the
570
+ // router loaded. We can help them understand how to avoid that.
571
+ "useRoutes() may be used only in the context of a <Router> component."
572
+ );
573
+ let { navigator: n } = o.useContext(T), { matches: i } = o.useContext(k), s = i[i.length - 1], c = s ? s.params : {}, l = s ? s.pathname : "/", u = s ? s.pathnameBase : "/", m = s && s.route;
574
+ {
575
+ let h = m && m.path || "";
576
+ Se(
577
+ l,
578
+ !m || h.endsWith("*") || h.endsWith("*?"),
579
+ `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
580
+
581
+ Please change the parent <Route path="${h}"> to <Route path="${h === "/" ? "*" : `${h}/*`}">.`
582
+ );
583
+ }
584
+ let v = N(), f;
585
+ f = v;
586
+ let p = f.pathname || "/", d = p;
587
+ if (u !== "/") {
588
+ let h = u.replace(/^\//, "").split("/");
589
+ d = "/" + p.replace(/^\//, "").split("/").slice(h.length).join("/");
590
+ }
591
+ let g = pe(e, { pathname: d });
592
+ return L(
593
+ m || g != null,
594
+ `No routes matched location "${f.pathname}${f.search}${f.hash}" `
595
+ ), L(
596
+ g == null || g[g.length - 1].route.element !== void 0 || g[g.length - 1].route.Component !== void 0 || g[g.length - 1].route.lazy !== void 0,
597
+ `Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
598
+ ), lt(
599
+ g && g.map(
600
+ (h) => Object.assign({}, h, {
601
+ params: Object.assign({}, c, h.params),
602
+ pathname: A([
603
+ u,
604
+ // Re-encode pathnames that were decoded inside matchRoutes
605
+ n.encodeLocation ? n.encodeLocation(h.pathname).pathname : h.pathname
606
+ ]),
607
+ pathnameBase: h.pathnameBase === "/" ? u : A([
608
+ u,
609
+ // Re-encode pathnames that were decoded inside matchRoutes
610
+ n.encodeLocation ? n.encodeLocation(h.pathnameBase).pathname : h.pathnameBase
611
+ ])
612
+ })
613
+ ),
614
+ i,
615
+ r,
616
+ a
617
+ );
618
+ }
619
+ function nt() {
620
+ let e = ft(), t = we(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: a }, i = { padding: "2px 4px", backgroundColor: a }, s = null;
621
+ return console.error(
622
+ "Error handled by React Router default ErrorBoundary:",
623
+ e
624
+ ), s = /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ o.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ o.createElement("code", { style: i }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ o.createElement("code", { style: i }, "errorElement"), " prop on your route.")), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ o.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ o.createElement("pre", { style: n }, r) : null, s);
625
+ }
626
+ var at = /* @__PURE__ */ o.createElement(nt, null), it = class extends o.Component {
627
+ constructor(e) {
628
+ super(e), this.state = {
629
+ location: e.location,
630
+ revalidation: e.revalidation,
631
+ error: e.error
632
+ };
633
+ }
634
+ static getDerivedStateFromError(e) {
635
+ return { error: e };
636
+ }
637
+ static getDerivedStateFromProps(e, t) {
638
+ return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
639
+ error: e.error,
640
+ location: e.location,
641
+ revalidation: e.revalidation
642
+ } : {
643
+ error: e.error !== void 0 ? e.error : t.error,
644
+ location: t.location,
645
+ revalidation: e.revalidation || t.revalidation
646
+ };
647
+ }
648
+ componentDidCatch(e, t) {
649
+ console.error(
650
+ "React Router caught the following error during render",
651
+ e,
652
+ t
653
+ );
654
+ }
655
+ render() {
656
+ return this.state.error !== void 0 ? /* @__PURE__ */ o.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ o.createElement(
657
+ re.Provider,
658
+ {
659
+ value: this.state.error,
660
+ children: this.props.component
661
+ }
662
+ )) : this.props.children;
663
+ }
664
+ };
665
+ function ot({ routeContext: e, match: t, children: r }) {
666
+ let a = o.useContext(O);
667
+ return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ o.createElement(k.Provider, { value: e }, r);
668
+ }
669
+ function lt(e, t = [], r = null, a = null) {
670
+ if (e == null) {
671
+ if (!r)
672
+ return null;
673
+ if (r.errors)
674
+ e = r.matches;
675
+ else if (t.length === 0 && !r.initialized && r.matches.length > 0)
676
+ e = r.matches;
677
+ else
678
+ return null;
679
+ }
680
+ let n = e, i = r == null ? void 0 : r.errors;
681
+ if (i != null) {
682
+ let l = n.findIndex(
683
+ (u) => u.route.id && (i == null ? void 0 : i[u.route.id]) !== void 0
684
+ );
685
+ b(
686
+ l >= 0,
687
+ `Could not find a matching route for errors on route IDs: ${Object.keys(
688
+ i
689
+ ).join(",")}`
690
+ ), n = n.slice(
691
+ 0,
692
+ Math.min(n.length, l + 1)
693
+ );
694
+ }
695
+ let s = !1, c = -1;
696
+ if (r)
697
+ for (let l = 0; l < n.length; l++) {
698
+ let u = n[l];
699
+ if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (c = l), u.route.id) {
700
+ let { loaderData: m, errors: v } = r, f = u.route.loader && !m.hasOwnProperty(u.route.id) && (!v || v[u.route.id] === void 0);
701
+ if (u.route.lazy || f) {
702
+ s = !0, c >= 0 ? n = n.slice(0, c + 1) : n = [n[0]];
703
+ break;
704
+ }
705
+ }
706
+ }
707
+ return n.reduceRight((l, u, m) => {
708
+ let v, f = !1, p = null, d = null;
709
+ r && (v = i && u.route.id ? i[u.route.id] : void 0, p = u.route.errorElement || at, s && (c < 0 && m === 0 ? (Se(
710
+ "route-fallback",
711
+ !1,
712
+ "No `HydrateFallback` element provided to render during initial hydration"
713
+ ), f = !0, d = null) : c === m && (f = !0, d = u.route.hydrateFallbackElement || null)));
714
+ let g = t.concat(n.slice(0, m + 1)), w = () => {
715
+ let h;
716
+ return v ? h = p : f ? h = d : u.route.Component ? h = /* @__PURE__ */ o.createElement(u.route.Component, null) : u.route.element ? h = u.route.element : h = l, /* @__PURE__ */ o.createElement(
717
+ ot,
718
+ {
719
+ match: u,
720
+ routeContext: {
721
+ outlet: l,
722
+ matches: g,
723
+ isDataRoute: r != null
724
+ },
725
+ children: h
726
+ }
727
+ );
728
+ };
729
+ return r && (u.route.ErrorBoundary || u.route.errorElement || m === 0) ? /* @__PURE__ */ o.createElement(
730
+ it,
731
+ {
732
+ location: r.location,
733
+ revalidation: r.revalidation,
734
+ component: p,
735
+ error: v,
736
+ children: w(),
737
+ routeContext: { outlet: null, matches: g, isDataRoute: !0 }
738
+ }
739
+ ) : w();
740
+ }, null);
741
+ }
742
+ function ae(e) {
743
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
744
+ }
745
+ function ut(e) {
746
+ let t = o.useContext(O);
747
+ return b(t, ae(e)), t;
748
+ }
749
+ function Ce(e) {
750
+ let t = o.useContext(F);
751
+ return b(t, ae(e)), t;
752
+ }
753
+ function st(e) {
754
+ let t = o.useContext(k);
755
+ return b(t, ae(e)), t;
756
+ }
757
+ function ie(e) {
758
+ let t = st(e), r = t.matches[t.matches.length - 1];
759
+ return b(
760
+ r.route.id,
761
+ `${e} can only be used on routes that contain a unique "id"`
762
+ ), r.route.id;
763
+ }
764
+ function ct() {
765
+ return ie(
766
+ "useRouteId"
767
+ /* UseRouteId */
768
+ );
769
+ }
770
+ function lr() {
771
+ return Ce(
772
+ "useNavigation"
773
+ /* UseNavigation */
774
+ ).navigation;
775
+ }
776
+ function ft() {
777
+ var a;
778
+ let e = o.useContext(re), t = Ce(
779
+ "useRouteError"
780
+ /* UseRouteError */
781
+ ), r = ie(
782
+ "useRouteError"
783
+ /* UseRouteError */
784
+ );
785
+ return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[r];
786
+ }
787
+ function dt() {
788
+ let { router: e } = ut(
789
+ "useNavigate"
790
+ /* UseNavigateStable */
791
+ ), t = ie(
792
+ "useNavigate"
793
+ /* UseNavigateStable */
794
+ ), r = o.useRef(!1);
795
+ return Re(() => {
796
+ r.current = !0;
797
+ }), o.useCallback(
798
+ async (n, i = {}) => {
799
+ L(r.current, xe), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...i }));
800
+ },
801
+ [e, t]
802
+ );
803
+ }
804
+ var fe = {};
805
+ function Se(e, t, r) {
806
+ !t && !fe[e] && (fe[e] = !0, L(!1, r));
807
+ }
808
+ var de = {};
809
+ function he(e, t) {
810
+ !e && !de[t] && (de[t] = !0, console.warn(t));
811
+ }
812
+ var ht = class {
813
+ constructor() {
814
+ this.status = "pending", this.promise = new Promise((e, t) => {
815
+ this.resolve = (r) => {
816
+ this.status === "pending" && (this.status = "resolved", e(r));
817
+ }, this.reject = (r) => {
818
+ this.status === "pending" && (this.status = "rejected", t(r));
819
+ };
820
+ });
821
+ }
822
+ };
823
+ function ur({
824
+ router: e,
825
+ flushSync: t
826
+ }) {
827
+ let [r, a] = o.useState(e.state), [n, i] = o.useState(), [s, c] = o.useState({
828
+ isTransitioning: !1
829
+ }), [l, u] = o.useState(), [m, v] = o.useState(), [f, p] = o.useState(), d = o.useRef(/* @__PURE__ */ new Map()), g = o.useCallback(
830
+ (y, { deletedFetchers: R, flushSync: x, viewTransitionOpts: C }) => {
831
+ R.forEach((S) => d.current.delete(S)), y.fetchers.forEach((S, P) => {
832
+ S.data !== void 0 && d.current.set(P, S.data);
833
+ }), he(
834
+ x === !1 || t != null,
835
+ 'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
836
+ );
837
+ let $ = e.window != null && e.window.document != null && typeof e.window.document.startViewTransition == "function";
838
+ if (he(
839
+ C == null || $,
840
+ "You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
841
+ ), !C || !$) {
842
+ t && x ? t(() => a(y)) : o.startTransition(() => a(y));
843
+ return;
844
+ }
845
+ if (t && x) {
846
+ t(() => {
847
+ m && (l && l.resolve(), m.skipTransition()), c({
848
+ isTransitioning: !0,
849
+ flushSync: !0,
850
+ currentLocation: C.currentLocation,
851
+ nextLocation: C.nextLocation
852
+ });
853
+ });
854
+ let S = e.window.document.startViewTransition(() => {
855
+ t(() => a(y));
856
+ });
857
+ S.finished.finally(() => {
858
+ t(() => {
859
+ u(void 0), v(void 0), i(void 0), c({ isTransitioning: !1 });
860
+ });
861
+ }), t(() => v(S));
862
+ return;
863
+ }
864
+ m ? (l && l.resolve(), m.skipTransition(), p({
865
+ state: y,
866
+ currentLocation: C.currentLocation,
867
+ nextLocation: C.nextLocation
868
+ })) : (i(y), c({
869
+ isTransitioning: !0,
870
+ flushSync: !1,
871
+ currentLocation: C.currentLocation,
872
+ nextLocation: C.nextLocation
873
+ }));
874
+ },
875
+ [e.window, t, m, l]
876
+ );
877
+ o.useLayoutEffect(() => e.subscribe(g), [e, g]), o.useEffect(() => {
878
+ s.isTransitioning && !s.flushSync && u(new ht());
879
+ }, [s]), o.useEffect(() => {
880
+ if (l && n && e.window) {
881
+ let y = n, R = l.promise, x = e.window.document.startViewTransition(async () => {
882
+ o.startTransition(() => a(y)), await R;
883
+ });
884
+ x.finished.finally(() => {
885
+ u(void 0), v(void 0), i(void 0), c({ isTransitioning: !1 });
886
+ }), v(x);
887
+ }
888
+ }, [n, l, e.window]), o.useEffect(() => {
889
+ l && n && r.location.key === n.location.key && l.resolve();
890
+ }, [l, m, r.location, n]), o.useEffect(() => {
891
+ !s.isTransitioning && f && (i(f.state), c({
892
+ isTransitioning: !0,
893
+ flushSync: !1,
894
+ currentLocation: f.currentLocation,
895
+ nextLocation: f.nextLocation
896
+ }), p(void 0));
897
+ }, [s.isTransitioning, f]);
898
+ let w = o.useMemo(() => ({
899
+ createHref: e.createHref,
900
+ encodeLocation: e.encodeLocation,
901
+ go: (y) => e.navigate(y),
902
+ push: (y, R, x) => e.navigate(y, {
903
+ state: R,
904
+ preventScrollReset: x == null ? void 0 : x.preventScrollReset
905
+ }),
906
+ replace: (y, R, x) => e.navigate(y, {
907
+ replace: !0,
908
+ state: R,
909
+ preventScrollReset: x == null ? void 0 : x.preventScrollReset
910
+ })
911
+ }), [e]), h = e.basename || "/", E = o.useMemo(
912
+ () => ({
913
+ router: e,
914
+ navigator: w,
915
+ static: !1,
916
+ basename: h
917
+ }),
918
+ [e, w, h]
919
+ );
920
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: E }, /* @__PURE__ */ o.createElement(F.Provider, { value: r }, /* @__PURE__ */ o.createElement(te.Provider, { value: d.current }, /* @__PURE__ */ o.createElement(J.Provider, { value: s }, /* @__PURE__ */ o.createElement(
921
+ Pe,
922
+ {
923
+ basename: h,
924
+ location: r.location,
925
+ navigationType: r.historyAction,
926
+ navigator: w
927
+ },
928
+ /* @__PURE__ */ o.createElement(
929
+ mt,
930
+ {
931
+ routes: e.routes,
932
+ future: e.future,
933
+ state: r
934
+ }
935
+ )
936
+ ))))), null);
937
+ }
938
+ var mt = o.memo(pt);
939
+ function pt({
940
+ routes: e,
941
+ future: t,
942
+ state: r
943
+ }) {
944
+ return be(e, void 0, r, t);
945
+ }
946
+ function sr({
947
+ to: e,
948
+ replace: t,
949
+ state: r,
950
+ relative: a
951
+ }) {
952
+ b(
953
+ M(),
954
+ // TODO: This error is probably because they somehow have 2 versions of
955
+ // the router loaded. We can help them understand how to avoid that.
956
+ "<Navigate> may be used only in the context of a <Router> component."
957
+ );
958
+ let { static: n } = o.useContext(T);
959
+ L(
960
+ !n,
961
+ "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
962
+ );
963
+ let { matches: i } = o.useContext(k), { pathname: s } = N(), c = ne(), l = ee(
964
+ e,
965
+ Z(i),
966
+ s,
967
+ a === "path"
968
+ ), u = JSON.stringify(l);
969
+ return o.useEffect(() => {
970
+ c(JSON.parse(u), { replace: t, state: r, relative: a });
971
+ }, [c, u, a, t, r]), null;
972
+ }
973
+ function cr(e) {
974
+ return rt(e.context);
975
+ }
976
+ function Pe({
977
+ basename: e = "/",
978
+ children: t = null,
979
+ location: r,
980
+ navigationType: a = "POP",
981
+ navigator: n,
982
+ static: i = !1
983
+ }) {
984
+ b(
985
+ !M(),
986
+ "You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
987
+ );
988
+ let s = e.replace(/^\/*/, "/"), c = o.useMemo(
989
+ () => ({
990
+ basename: s,
991
+ navigator: n,
992
+ static: i,
993
+ future: {}
994
+ }),
995
+ [s, n, i]
996
+ );
997
+ typeof r == "string" && (r = Y(r));
998
+ let {
999
+ pathname: l = "/",
1000
+ search: u = "",
1001
+ hash: m = "",
1002
+ state: v = null,
1003
+ key: f = "default"
1004
+ } = r, p = o.useMemo(() => {
1005
+ let d = I(l, s);
1006
+ return d == null ? null : {
1007
+ location: {
1008
+ pathname: d,
1009
+ search: u,
1010
+ hash: m,
1011
+ state: v,
1012
+ key: f
1013
+ },
1014
+ navigationType: a
1015
+ };
1016
+ }, [s, l, u, m, v, f, a]);
1017
+ return L(
1018
+ p != null,
1019
+ `<Router basename="${s}"> is not able to match the URL "${l}${u}${m}" because it does not start with the basename, so the <Router> won't render anything.`
1020
+ ), p == null ? null : /* @__PURE__ */ o.createElement(T.Provider, { value: c }, /* @__PURE__ */ o.createElement(K.Provider, { children: t, value: p }));
1021
+ }
1022
+ var V = "get", j = "application/x-www-form-urlencoded";
1023
+ function q(e) {
1024
+ return e != null && typeof e.tagName == "string";
1025
+ }
1026
+ function vt(e) {
1027
+ return q(e) && e.tagName.toLowerCase() === "button";
1028
+ }
1029
+ function gt(e) {
1030
+ return q(e) && e.tagName.toLowerCase() === "form";
1031
+ }
1032
+ function yt(e) {
1033
+ return q(e) && e.tagName.toLowerCase() === "input";
1034
+ }
1035
+ function wt(e) {
1036
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1037
+ }
1038
+ function Et(e, t) {
1039
+ return e.button === 0 && // Ignore everything but left clicks
1040
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1041
+ !wt(e);
1042
+ }
1043
+ function Q(e = "") {
1044
+ return new URLSearchParams(
1045
+ typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, r) => {
1046
+ let a = e[r];
1047
+ return t.concat(
1048
+ Array.isArray(a) ? a.map((n) => [r, n]) : [[r, a]]
1049
+ );
1050
+ }, [])
1051
+ );
1052
+ }
1053
+ function xt(e, t) {
1054
+ let r = Q(e);
1055
+ return t && t.forEach((a, n) => {
1056
+ r.has(n) || t.getAll(n).forEach((i) => {
1057
+ r.append(n, i);
1058
+ });
1059
+ }), r;
1060
+ }
1061
+ var z = null;
1062
+ function Rt() {
1063
+ if (z === null)
1064
+ try {
1065
+ new FormData(
1066
+ document.createElement("form"),
1067
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
1068
+ 0
1069
+ ), z = !1;
1070
+ } catch {
1071
+ z = !0;
1072
+ }
1073
+ return z;
1074
+ }
1075
+ var bt = /* @__PURE__ */ new Set([
1076
+ "application/x-www-form-urlencoded",
1077
+ "multipart/form-data",
1078
+ "text/plain"
1079
+ ]);
1080
+ function X(e) {
1081
+ return e != null && !bt.has(e) ? (L(
1082
+ !1,
1083
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${j}"`
1084
+ ), null) : e;
1085
+ }
1086
+ function Ct(e, t) {
1087
+ let r, a, n, i, s;
1088
+ if (gt(e)) {
1089
+ let c = e.getAttribute("action");
1090
+ a = c ? I(c, t) : null, r = e.getAttribute("method") || V, n = X(e.getAttribute("enctype")) || j, i = new FormData(e);
1091
+ } else if (vt(e) || yt(e) && (e.type === "submit" || e.type === "image")) {
1092
+ let c = e.form;
1093
+ if (c == null)
1094
+ throw new Error(
1095
+ 'Cannot submit a <button> or <input type="submit"> without a <form>'
1096
+ );
1097
+ let l = e.getAttribute("formaction") || c.getAttribute("action");
1098
+ if (a = l ? I(l, t) : null, r = e.getAttribute("formmethod") || c.getAttribute("method") || V, n = X(e.getAttribute("formenctype")) || X(c.getAttribute("enctype")) || j, i = new FormData(c, e), !Rt()) {
1099
+ let { name: u, type: m, value: v } = e;
1100
+ if (m === "image") {
1101
+ let f = u ? `${u}.` : "";
1102
+ i.append(`${f}x`, "0"), i.append(`${f}y`, "0");
1103
+ } else u && i.append(u, v);
1104
+ }
1105
+ } else {
1106
+ if (q(e))
1107
+ throw new Error(
1108
+ 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1109
+ );
1110
+ r = V, a = null, n = j, s = e;
1111
+ }
1112
+ return i && n === "text/plain" && (s = i, i = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: i, body: s };
1113
+ }
1114
+ function oe(e, t) {
1115
+ if (e === !1 || e === null || typeof e > "u")
1116
+ throw new Error(t);
1117
+ }
1118
+ async function St(e, t) {
1119
+ if (e.id in t)
1120
+ return t[e.id];
1121
+ try {
1122
+ let r = await import(
1123
+ /* @vite-ignore */
1124
+ /* webpackIgnore: true */
1125
+ e.module
1126
+ );
1127
+ return t[e.id] = r, r;
1128
+ } catch (r) {
1129
+ return console.error(
1130
+ `Error loading route module \`${e.module}\`, reloading page...`
1131
+ ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1132
+ });
1133
+ }
1134
+ }
1135
+ function Pt(e) {
1136
+ return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
1137
+ }
1138
+ async function Lt(e, t, r) {
1139
+ let a = await Promise.all(
1140
+ e.map(async (n) => {
1141
+ let i = t.routes[n.route.id];
1142
+ if (i) {
1143
+ let s = await St(i, r);
1144
+ return s.links ? s.links() : [];
1145
+ }
1146
+ return [];
1147
+ })
1148
+ );
1149
+ return Nt(
1150
+ a.flat(1).filter(Pt).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
1151
+ (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
1152
+ )
1153
+ );
1154
+ }
1155
+ function me(e, t, r, a, n, i) {
1156
+ let s = (l, u) => r[u] ? l.route.id !== r[u].route.id : !0, c = (l, u) => {
1157
+ var m;
1158
+ return (
1159
+ // param change, /users/123 -> /users/456
1160
+ r[u].pathname !== l.pathname || // splat param changed, which is not present in match.path
1161
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
1162
+ ((m = r[u].route.path) == null ? void 0 : m.endsWith("*")) && r[u].params["*"] !== l.params["*"]
1163
+ );
1164
+ };
1165
+ return i === "assets" ? t.filter(
1166
+ (l, u) => s(l, u) || c(l, u)
1167
+ ) : i === "data" ? t.filter((l, u) => {
1168
+ var v;
1169
+ let m = a.routes[l.route.id];
1170
+ if (!m || !m.hasLoader)
1171
+ return !1;
1172
+ if (s(l, u) || c(l, u))
1173
+ return !0;
1174
+ if (l.route.shouldRevalidate) {
1175
+ let f = l.route.shouldRevalidate({
1176
+ currentUrl: new URL(
1177
+ n.pathname + n.search + n.hash,
1178
+ window.origin
1179
+ ),
1180
+ currentParams: ((v = r[0]) == null ? void 0 : v.params) || {},
1181
+ nextUrl: new URL(e, window.origin),
1182
+ nextParams: l.params,
1183
+ defaultShouldRevalidate: !0
1184
+ });
1185
+ if (typeof f == "boolean")
1186
+ return f;
1187
+ }
1188
+ return !0;
1189
+ }) : [];
1190
+ }
1191
+ function kt(e, t) {
1192
+ return $t(
1193
+ e.map((r) => {
1194
+ let a = t.routes[r.route.id];
1195
+ if (!a) return [];
1196
+ let n = [a.module];
1197
+ return a.imports && (n = n.concat(a.imports)), n;
1198
+ }).flat(1)
1199
+ );
1200
+ }
1201
+ function $t(e) {
1202
+ return [...new Set(e)];
1203
+ }
1204
+ function Tt(e) {
1205
+ let t = {}, r = Object.keys(e).sort();
1206
+ for (let a of r)
1207
+ t[a] = e[a];
1208
+ return t;
1209
+ }
1210
+ function Nt(e, t) {
1211
+ let r = /* @__PURE__ */ new Set();
1212
+ return new Set(t), e.reduce((a, n) => {
1213
+ let i = JSON.stringify(Tt(n));
1214
+ return r.has(i) || (r.add(i), a.push({ key: i, link: n })), a;
1215
+ }, []);
1216
+ }
1217
+ function At(e) {
1218
+ let t = typeof e == "string" ? new URL(
1219
+ e,
1220
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
1221
+ // don't assume window is available
1222
+ typeof window > "u" ? "server://singlefetch/" : window.location.origin
1223
+ ) : e;
1224
+ return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
1225
+ }
1226
+ function Dt() {
1227
+ let e = o.useContext(O);
1228
+ return oe(
1229
+ e,
1230
+ "You must render this element inside a <DataRouterContext.Provider> element"
1231
+ ), e;
1232
+ }
1233
+ function It() {
1234
+ let e = o.useContext(F);
1235
+ return oe(
1236
+ e,
1237
+ "You must render this element inside a <DataRouterStateContext.Provider> element"
1238
+ ), e;
1239
+ }
1240
+ var le = o.createContext(void 0);
1241
+ le.displayName = "FrameworkContext";
1242
+ function Le() {
1243
+ let e = o.useContext(le);
1244
+ return oe(
1245
+ e,
1246
+ "You must render this element inside a <HydratedRouter> element"
1247
+ ), e;
1248
+ }
1249
+ function Ot(e, t) {
1250
+ let r = o.useContext(le), [a, n] = o.useState(!1), [i, s] = o.useState(!1), { onFocus: c, onBlur: l, onMouseEnter: u, onMouseLeave: m, onTouchStart: v } = t, f = o.useRef(null);
1251
+ o.useEffect(() => {
1252
+ if (e === "render" && s(!0), e === "viewport") {
1253
+ let g = (h) => {
1254
+ h.forEach((E) => {
1255
+ s(E.isIntersecting);
1256
+ });
1257
+ }, w = new IntersectionObserver(g, { threshold: 0.5 });
1258
+ return f.current && w.observe(f.current), () => {
1259
+ w.disconnect();
1260
+ };
1261
+ }
1262
+ }, [e]), o.useEffect(() => {
1263
+ if (a) {
1264
+ let g = setTimeout(() => {
1265
+ s(!0);
1266
+ }, 100);
1267
+ return () => {
1268
+ clearTimeout(g);
1269
+ };
1270
+ }
1271
+ }, [a]);
1272
+ let p = () => {
1273
+ n(!0);
1274
+ }, d = () => {
1275
+ n(!1), s(!1);
1276
+ };
1277
+ return r ? e !== "intent" ? [i, f, {}] : [
1278
+ i,
1279
+ f,
1280
+ {
1281
+ onFocus: U(c, p),
1282
+ onBlur: U(l, d),
1283
+ onMouseEnter: U(u, p),
1284
+ onMouseLeave: U(m, d),
1285
+ onTouchStart: U(v, p)
1286
+ }
1287
+ ] : [!1, f, {}];
1288
+ }
1289
+ function U(e, t) {
1290
+ return (r) => {
1291
+ e && e(r), r.defaultPrevented || t(r);
1292
+ };
1293
+ }
1294
+ function Mt({
1295
+ page: e,
1296
+ ...t
1297
+ }) {
1298
+ let { router: r } = Dt(), a = o.useMemo(
1299
+ () => pe(r.routes, e, r.basename),
1300
+ [r.routes, e, r.basename]
1301
+ );
1302
+ return a ? /* @__PURE__ */ o.createElement(_t, { page: e, matches: a, ...t }) : (console.warn(`Tried to prefetch ${e} but no routes matched.`), null);
1303
+ }
1304
+ function Ft(e) {
1305
+ let { manifest: t, routeModules: r } = Le(), [a, n] = o.useState([]);
1306
+ return o.useEffect(() => {
1307
+ let i = !1;
1308
+ return Lt(e, t, r).then(
1309
+ (s) => {
1310
+ i || n(s);
1311
+ }
1312
+ ), () => {
1313
+ i = !0;
1314
+ };
1315
+ }, [e, t, r]), a;
1316
+ }
1317
+ function _t({
1318
+ page: e,
1319
+ matches: t,
1320
+ ...r
1321
+ }) {
1322
+ let a = N(), { manifest: n, routeModules: i } = Le(), { loaderData: s, matches: c } = It(), l = o.useMemo(
1323
+ () => me(
1324
+ e,
1325
+ t,
1326
+ c,
1327
+ n,
1328
+ a,
1329
+ "data"
1330
+ ),
1331
+ [e, t, c, n, a]
1332
+ ), u = o.useMemo(
1333
+ () => me(
1334
+ e,
1335
+ t,
1336
+ c,
1337
+ n,
1338
+ a,
1339
+ "assets"
1340
+ ),
1341
+ [e, t, c, n, a]
1342
+ ), m = o.useMemo(() => {
1343
+ if (e === a.pathname + a.search + a.hash)
1344
+ return [];
1345
+ let p = /* @__PURE__ */ new Set(), d = !1;
1346
+ if (t.forEach((w) => {
1347
+ var E;
1348
+ let h = n.routes[w.route.id];
1349
+ !h || !h.hasLoader || (!l.some((y) => y.route.id === w.route.id) && w.route.id in s && ((E = i[w.route.id]) != null && E.shouldRevalidate) || h.hasClientLoader ? d = !0 : p.add(w.route.id));
1350
+ }), p.size === 0)
1351
+ return [];
1352
+ let g = At(e);
1353
+ return d && p.size > 0 && g.searchParams.set(
1354
+ "_routes",
1355
+ t.filter((w) => p.has(w.route.id)).map((w) => w.route.id).join(",")
1356
+ ), [g.pathname + g.search];
1357
+ }, [
1358
+ s,
1359
+ a,
1360
+ n,
1361
+ l,
1362
+ t,
1363
+ e,
1364
+ i
1365
+ ]), v = o.useMemo(
1366
+ () => kt(u, n),
1367
+ [u, n]
1368
+ ), f = Ft(u);
1369
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, m.map((p) => /* @__PURE__ */ o.createElement("link", { key: p, rel: "prefetch", as: "fetch", href: p, ...r })), v.map((p) => /* @__PURE__ */ o.createElement("link", { key: p, rel: "modulepreload", href: p, ...r })), f.map(({ key: p, link: d }) => (
1370
+ // these don't spread `linkProps` because they are full link descriptors
1371
+ // already with their own props
1372
+ /* @__PURE__ */ o.createElement("link", { key: p, ...d })
1373
+ )));
1374
+ }
1375
+ function Ut(...e) {
1376
+ return (t) => {
1377
+ e.forEach((r) => {
1378
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
1379
+ });
1380
+ };
1381
+ }
1382
+ var ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1383
+ try {
1384
+ ke && (window.__reactRouterVersion = "7.0.2");
1385
+ } catch {
1386
+ }
1387
+ var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Te = o.forwardRef(
1388
+ function({
1389
+ onClick: t,
1390
+ discover: r = "render",
1391
+ prefetch: a = "none",
1392
+ relative: n,
1393
+ reloadDocument: i,
1394
+ replace: s,
1395
+ state: c,
1396
+ target: l,
1397
+ to: u,
1398
+ preventScrollReset: m,
1399
+ viewTransition: v,
1400
+ ...f
1401
+ }, p) {
1402
+ let { basename: d } = o.useContext(T), g = typeof u == "string" && $e.test(u), w, h = !1;
1403
+ if (typeof u == "string" && g && (w = u, ke))
1404
+ try {
1405
+ let P = new URL(window.location.href), D = u.startsWith("//") ? new URL(P.protocol + u) : new URL(u), ue = I(D.pathname, d);
1406
+ D.origin === P.origin && ue != null ? u = ue + D.search + D.hash : h = !0;
1407
+ } catch {
1408
+ L(
1409
+ !1,
1410
+ `<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1411
+ );
1412
+ }
1413
+ let E = Ze(u, { relative: n }), [y, R, x] = Ot(
1414
+ a,
1415
+ f
1416
+ ), C = zt(u, {
1417
+ replace: s,
1418
+ state: c,
1419
+ target: l,
1420
+ preventScrollReset: m,
1421
+ relative: n,
1422
+ viewTransition: v
1423
+ });
1424
+ function $(P) {
1425
+ t && t(P), P.defaultPrevented || C(P);
1426
+ }
1427
+ let S = (
1428
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1429
+ /* @__PURE__ */ o.createElement(
1430
+ "a",
1431
+ {
1432
+ ...f,
1433
+ ...x,
1434
+ href: w || E,
1435
+ onClick: h || i ? t : $,
1436
+ ref: Ut(p, R),
1437
+ target: l,
1438
+ "data-discover": !g && r === "render" ? "true" : void 0
1439
+ }
1440
+ )
1441
+ );
1442
+ return y && !g ? /* @__PURE__ */ o.createElement(o.Fragment, null, S, /* @__PURE__ */ o.createElement(Mt, { page: E })) : S;
1443
+ }
1444
+ );
1445
+ Te.displayName = "Link";
1446
+ var Bt = o.forwardRef(
1447
+ function({
1448
+ "aria-current": t = "page",
1449
+ caseSensitive: r = !1,
1450
+ className: a = "",
1451
+ end: n = !1,
1452
+ style: i,
1453
+ to: s,
1454
+ viewTransition: c,
1455
+ children: l,
1456
+ ...u
1457
+ }, m) {
1458
+ let v = W(s, { relative: u.relative }), f = N(), p = o.useContext(F), { navigator: d, basename: g } = o.useContext(T), w = p != null && // Conditional usage is OK here because the usage of a data router is static
1459
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1460
+ Kt(v) && c === !0, h = d.encodeLocation ? d.encodeLocation(v).pathname : v.pathname, E = f.pathname, y = p && p.navigation && p.navigation.location ? p.navigation.location.pathname : null;
1461
+ r || (E = E.toLowerCase(), y = y ? y.toLowerCase() : null, h = h.toLowerCase()), y && g && (y = I(y, g) || y);
1462
+ const R = h !== "/" && h.endsWith("/") ? h.length - 1 : h.length;
1463
+ let x = E === h || !n && E.startsWith(h) && E.charAt(R) === "/", C = y != null && (y === h || !n && y.startsWith(h) && y.charAt(h.length) === "/"), $ = {
1464
+ isActive: x,
1465
+ isPending: C,
1466
+ isTransitioning: w
1467
+ }, S = x ? t : void 0, P;
1468
+ typeof a == "function" ? P = a($) : P = [
1469
+ a,
1470
+ x ? "active" : null,
1471
+ C ? "pending" : null,
1472
+ w ? "transitioning" : null
1473
+ ].filter(Boolean).join(" ");
1474
+ let D = typeof i == "function" ? i($) : i;
1475
+ return /* @__PURE__ */ o.createElement(
1476
+ Te,
1477
+ {
1478
+ ...u,
1479
+ "aria-current": S,
1480
+ className: P,
1481
+ ref: m,
1482
+ style: D,
1483
+ to: s,
1484
+ viewTransition: c
1485
+ },
1486
+ typeof l == "function" ? l($) : l
1487
+ );
1488
+ }
1489
+ );
1490
+ Bt.displayName = "NavLink";
1491
+ var Ht = o.forwardRef(
1492
+ ({
1493
+ discover: e = "render",
1494
+ fetcherKey: t,
1495
+ navigate: r,
1496
+ reloadDocument: a,
1497
+ replace: n,
1498
+ state: i,
1499
+ method: s = V,
1500
+ action: c,
1501
+ onSubmit: l,
1502
+ relative: u,
1503
+ preventScrollReset: m,
1504
+ viewTransition: v,
1505
+ ...f
1506
+ }, p) => {
1507
+ let d = Yt(), g = Jt(c, { relative: u }), w = s.toLowerCase() === "get" ? "get" : "post", h = typeof c == "string" && $e.test(c), E = (y) => {
1508
+ if (l && l(y), y.defaultPrevented) return;
1509
+ y.preventDefault();
1510
+ let R = y.nativeEvent.submitter, x = (R == null ? void 0 : R.getAttribute("formmethod")) || s;
1511
+ d(R || y.currentTarget, {
1512
+ fetcherKey: t,
1513
+ method: x,
1514
+ navigate: r,
1515
+ replace: n,
1516
+ state: i,
1517
+ relative: u,
1518
+ preventScrollReset: m,
1519
+ viewTransition: v
1520
+ });
1521
+ };
1522
+ return /* @__PURE__ */ o.createElement(
1523
+ "form",
1524
+ {
1525
+ ref: p,
1526
+ method: w,
1527
+ action: g,
1528
+ onSubmit: a ? l : E,
1529
+ ...f,
1530
+ "data-discover": !h && e === "render" ? "true" : void 0
1531
+ }
1532
+ );
1533
+ }
1534
+ );
1535
+ Ht.displayName = "Form";
1536
+ function Wt(e) {
1537
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1538
+ }
1539
+ function Ne(e) {
1540
+ let t = o.useContext(O);
1541
+ return b(t, Wt(e)), t;
1542
+ }
1543
+ function zt(e, {
1544
+ target: t,
1545
+ replace: r,
1546
+ state: a,
1547
+ preventScrollReset: n,
1548
+ relative: i,
1549
+ viewTransition: s
1550
+ } = {}) {
1551
+ let c = ne(), l = N(), u = W(e, { relative: i });
1552
+ return o.useCallback(
1553
+ (m) => {
1554
+ if (Et(m, t)) {
1555
+ m.preventDefault();
1556
+ let v = r !== void 0 ? r : B(l) === B(u);
1557
+ c(e, {
1558
+ replace: v,
1559
+ state: a,
1560
+ preventScrollReset: n,
1561
+ relative: i,
1562
+ viewTransition: s
1563
+ });
1564
+ }
1565
+ },
1566
+ [
1567
+ l,
1568
+ c,
1569
+ u,
1570
+ r,
1571
+ a,
1572
+ t,
1573
+ e,
1574
+ n,
1575
+ i,
1576
+ s
1577
+ ]
1578
+ );
1579
+ }
1580
+ function fr(e) {
1581
+ L(
1582
+ typeof URLSearchParams < "u",
1583
+ "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params."
1584
+ );
1585
+ let t = o.useRef(Q(e)), r = o.useRef(!1), a = N(), n = o.useMemo(
1586
+ () => (
1587
+ // Only merge in the defaults if we haven't yet called setSearchParams.
1588
+ // Once we call that we want those to take precedence, otherwise you can't
1589
+ // remove a param with setSearchParams({}) if it has an initial value
1590
+ xt(
1591
+ a.search,
1592
+ r.current ? null : t.current
1593
+ )
1594
+ ),
1595
+ [a.search]
1596
+ ), i = ne(), s = o.useCallback(
1597
+ (c, l) => {
1598
+ const u = Q(
1599
+ typeof c == "function" ? c(n) : c
1600
+ );
1601
+ r.current = !0, i("?" + u, l);
1602
+ },
1603
+ [i, n]
1604
+ );
1605
+ return [n, s];
1606
+ }
1607
+ var Vt = 0, jt = () => `__${String(++Vt)}__`;
1608
+ function Yt() {
1609
+ let { router: e } = Ne(
1610
+ "useSubmit"
1611
+ /* UseSubmit */
1612
+ ), { basename: t } = o.useContext(T), r = ct();
1613
+ return o.useCallback(
1614
+ async (a, n = {}) => {
1615
+ let { action: i, method: s, encType: c, formData: l, body: u } = Ct(
1616
+ a,
1617
+ t
1618
+ );
1619
+ if (n.navigate === !1) {
1620
+ let m = n.fetcherKey || jt();
1621
+ await e.fetch(m, r, n.action || i, {
1622
+ preventScrollReset: n.preventScrollReset,
1623
+ formData: l,
1624
+ body: u,
1625
+ formMethod: n.method || s,
1626
+ formEncType: n.encType || c,
1627
+ flushSync: n.flushSync
1628
+ });
1629
+ } else
1630
+ await e.navigate(n.action || i, {
1631
+ preventScrollReset: n.preventScrollReset,
1632
+ formData: l,
1633
+ body: u,
1634
+ formMethod: n.method || s,
1635
+ formEncType: n.encType || c,
1636
+ replace: n.replace,
1637
+ state: n.state,
1638
+ fromRouteId: r,
1639
+ flushSync: n.flushSync,
1640
+ viewTransition: n.viewTransition
1641
+ });
1642
+ },
1643
+ [e, t, r]
1644
+ );
1645
+ }
1646
+ function Jt(e, { relative: t } = {}) {
1647
+ let { basename: r } = o.useContext(T), a = o.useContext(k);
1648
+ b(a, "useFormAction must be used inside a RouteContext");
1649
+ let [n] = a.matches.slice(-1), i = { ...W(e || ".", { relative: t }) }, s = N();
1650
+ if (e == null) {
1651
+ i.search = s.search;
1652
+ let c = new URLSearchParams(i.search), l = c.getAll("index");
1653
+ if (l.some((m) => m === "")) {
1654
+ c.delete("index"), l.filter((v) => v).forEach((v) => c.append("index", v));
1655
+ let m = c.toString();
1656
+ i.search = m ? `?${m}` : "";
1657
+ }
1658
+ }
1659
+ return (!e || e === ".") && n.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (i.pathname = i.pathname === "/" ? r : A([r, i.pathname])), B(i);
1660
+ }
1661
+ function Kt(e, t = {}) {
1662
+ let r = o.useContext(J);
1663
+ b(
1664
+ r != null,
1665
+ "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1666
+ );
1667
+ let { basename: a } = Ne(
1668
+ "useViewTransitionState"
1669
+ /* useViewTransitionState */
1670
+ ), n = W(e, { relative: t.relative });
1671
+ if (!r.isTransitioning)
1672
+ return !1;
1673
+ let i = I(r.currentLocation.pathname, a) || r.currentLocation.pathname, s = I(r.nextLocation.pathname, a) || r.nextLocation.pathname;
1674
+ return H(n.pathname, s) != null || H(n.pathname, i) != null;
1675
+ }
1676
+ function dr({
1677
+ context: e,
1678
+ router: t,
1679
+ hydrate: r = !0,
1680
+ nonce: a
1681
+ }) {
1682
+ b(
1683
+ t && e,
1684
+ "You must provide `router` and `context` to <StaticRouterProvider>"
1685
+ );
1686
+ let n = {
1687
+ router: t,
1688
+ navigator: Xt(),
1689
+ static: !0,
1690
+ staticContext: e,
1691
+ basename: e.basename || "/"
1692
+ }, i = /* @__PURE__ */ new Map(), s = "";
1693
+ if (r !== !1) {
1694
+ let l = {
1695
+ loaderData: e.loaderData,
1696
+ actionData: e.actionData,
1697
+ errors: Gt(e.errors)
1698
+ };
1699
+ s = `window.__staticRouterHydrationData = JSON.parse(${nr(JSON.stringify(JSON.stringify(l)))});`;
1700
+ }
1701
+ let { state: c } = n.router;
1702
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(O.Provider, { value: n }, /* @__PURE__ */ o.createElement(F.Provider, { value: c }, /* @__PURE__ */ o.createElement(te.Provider, { value: i }, /* @__PURE__ */ o.createElement(J.Provider, { value: { isTransitioning: !1 } }, /* @__PURE__ */ o.createElement(
1703
+ Pe,
1704
+ {
1705
+ basename: n.basename,
1706
+ location: c.location,
1707
+ navigationType: c.historyAction,
1708
+ navigator: n.navigator,
1709
+ static: n.static
1710
+ },
1711
+ /* @__PURE__ */ o.createElement(
1712
+ qt,
1713
+ {
1714
+ routes: t.routes,
1715
+ future: t.future,
1716
+ state: c
1717
+ }
1718
+ )
1719
+ ))))), s ? /* @__PURE__ */ o.createElement(
1720
+ "script",
1721
+ {
1722
+ suppressHydrationWarning: !0,
1723
+ nonce: a,
1724
+ dangerouslySetInnerHTML: { __html: s }
1725
+ }
1726
+ ) : null);
1727
+ }
1728
+ function qt({
1729
+ routes: e,
1730
+ future: t,
1731
+ state: r
1732
+ }) {
1733
+ return be(e, void 0, r, t);
1734
+ }
1735
+ function Gt(e) {
1736
+ if (!e) return null;
1737
+ let t = Object.entries(e), r = {};
1738
+ for (let [a, n] of t)
1739
+ we(n) ? r[a] = { ...n, __type: "RouteErrorResponse" } : n instanceof Error ? r[a] = {
1740
+ message: n.message,
1741
+ __type: "Error",
1742
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
1743
+ // can re-create the same type during hydration.
1744
+ ...n.name !== "Error" ? {
1745
+ __subType: n.name
1746
+ } : {}
1747
+ } : r[a] = n;
1748
+ return r;
1749
+ }
1750
+ function Xt() {
1751
+ return {
1752
+ createHref: Qt,
1753
+ encodeLocation: Zt,
1754
+ push(e) {
1755
+ throw new Error(
1756
+ `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.`
1757
+ );
1758
+ },
1759
+ replace(e) {
1760
+ throw new Error(
1761
+ `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.`
1762
+ );
1763
+ },
1764
+ go(e) {
1765
+ throw new Error(
1766
+ `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.`
1767
+ );
1768
+ },
1769
+ back() {
1770
+ throw new Error(
1771
+ "You cannot use navigator.back() on the server because it is a stateless environment."
1772
+ );
1773
+ },
1774
+ forward() {
1775
+ throw new Error(
1776
+ "You cannot use navigator.forward() on the server because it is a stateless environment."
1777
+ );
1778
+ }
1779
+ };
1780
+ }
1781
+ function Qt(e) {
1782
+ return typeof e == "string" ? e : B(e);
1783
+ }
1784
+ function Zt(e) {
1785
+ let t = typeof e == "string" ? e : B(e);
1786
+ t = t.replace(/ $/, "%20");
1787
+ let r = er.test(t) ? new URL(t) : new URL(t, "http://localhost");
1788
+ return {
1789
+ pathname: r.pathname,
1790
+ search: r.search,
1791
+ hash: r.hash
1792
+ };
1793
+ }
1794
+ var er = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, tr = {
1795
+ "&": "\\u0026",
1796
+ ">": "\\u003e",
1797
+ "<": "\\u003c",
1798
+ "\u2028": "\\u2028",
1799
+ "\u2029": "\\u2029"
1800
+ }, rr = /[&><\u2028\u2029]/g;
1801
+ function nr(e) {
1802
+ return e.replace(rr, (t) => tr[t]);
1803
+ }
1804
+ new TextEncoder();
1805
+ export {
1806
+ Te as L,
1807
+ sr as N,
1808
+ cr as O,
1809
+ ur as R,
1810
+ dr as S,
1811
+ ne as a,
1812
+ fr as b,
1813
+ or as c,
1814
+ ft as d,
1815
+ ir as e,
1816
+ Bt as f,
1817
+ lr as g,
1818
+ we as i,
1819
+ H as m,
1820
+ ar as r,
1821
+ N as u
1822
+ };
1823
+ //# sourceMappingURL=chunk-D52XG6IA-Dl7HLe6j.js.map