zudoku 0.3.0-dev.9 → 0.3.0-dev.90

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 (663) hide show
  1. package/cli.js +5 -1
  2. package/dist/app/App.d.ts +1 -2
  3. package/dist/app/App.js +1 -29
  4. package/dist/app/App.js.map +1 -1
  5. package/dist/app/demo.d.ts +2 -0
  6. package/dist/app/demo.js +33 -0
  7. package/dist/app/demo.js.map +1 -0
  8. package/dist/app/entry.client.d.ts +2 -0
  9. package/dist/app/entry.client.js +35 -0
  10. package/dist/app/entry.client.js.map +1 -0
  11. package/dist/app/entry.server.d.ts +14 -0
  12. package/dist/app/entry.server.js +105 -0
  13. package/dist/app/entry.server.js.map +1 -0
  14. package/dist/app/main.d.ts +6 -1
  15. package/dist/app/main.js +74 -12
  16. package/dist/app/main.js.map +1 -1
  17. package/dist/app/standalone.d.ts +2 -0
  18. package/dist/app/standalone.js +38 -0
  19. package/dist/app/standalone.js.map +1 -0
  20. package/dist/app/tailwind.d.ts +1 -1
  21. package/dist/app/tailwind.js +0 -4
  22. package/dist/app/tailwind.js.map +1 -1
  23. package/dist/cli/cmds/dev.js +5 -0
  24. package/dist/cli/cmds/dev.js.map +1 -1
  25. package/dist/cli/dev/handler.d.ts +1 -0
  26. package/dist/cli/dev/handler.js +3 -1
  27. package/dist/cli/dev/handler.js.map +1 -1
  28. package/dist/config/config.d.ts +21 -46
  29. package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
  30. package/dist/config/validators/InputSidebarSchema.js +71 -0
  31. package/dist/config/validators/InputSidebarSchema.js.map +1 -0
  32. package/dist/config/validators/SidebarSchema.d.ts +17 -0
  33. package/dist/config/validators/SidebarSchema.js +76 -0
  34. package/dist/config/validators/SidebarSchema.js.map +1 -0
  35. package/dist/config/validators/validate.d.ts +1263 -2
  36. package/dist/config/validators/validate.js +170 -1
  37. package/dist/config/validators/validate.js.map +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/internal.d.ts +1 -0
  40. package/dist/internal.js +2 -0
  41. package/dist/internal.js.map +1 -0
  42. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  43. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  44. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  45. package/dist/lib/authentication/authentication.d.ts +10 -9
  46. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  47. package/dist/lib/authentication/components/SignIn.js +14 -0
  48. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  49. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  50. package/dist/lib/authentication/components/SignOut.js +12 -0
  51. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  52. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  53. package/dist/lib/authentication/components/SignUp.js +10 -0
  54. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  55. package/dist/lib/authentication/hook.js +4 -4
  56. package/dist/lib/authentication/hook.js.map +1 -1
  57. package/dist/lib/authentication/providers/auth0.js +11 -6
  58. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  59. package/dist/lib/authentication/providers/clerk.js +59 -30
  60. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  61. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  62. package/dist/lib/authentication/providers/openid.js +79 -29
  63. package/dist/lib/authentication/providers/openid.js.map +1 -1
  64. package/dist/lib/authentication/state.js +1 -1
  65. package/dist/lib/authentication/state.js.map +1 -1
  66. package/dist/lib/components/Bootstrap.d.ts +13 -0
  67. package/dist/lib/components/Bootstrap.js +12 -0
  68. package/dist/lib/components/Bootstrap.js.map +1 -0
  69. package/dist/lib/components/DevPortal.d.ts +5 -23
  70. package/dist/lib/components/DevPortal.js +43 -20
  71. package/dist/lib/components/DevPortal.js.map +1 -1
  72. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  73. package/dist/lib/components/DeveloperHint.js +10 -0
  74. package/dist/lib/components/DeveloperHint.js.map +1 -0
  75. package/dist/lib/components/ErrorPage.d.ts +6 -0
  76. package/dist/lib/components/ErrorPage.js +9 -0
  77. package/dist/lib/components/ErrorPage.js.map +1 -0
  78. package/dist/lib/components/Header.js +23 -4
  79. package/dist/lib/components/Header.js.map +1 -1
  80. package/dist/lib/components/Heading.d.ts +9 -4
  81. package/dist/lib/components/Heading.js +17 -2
  82. package/dist/lib/components/Heading.js.map +1 -1
  83. package/dist/lib/components/InlineCode.d.ts +5 -0
  84. package/dist/lib/components/InlineCode.js +4 -0
  85. package/dist/lib/components/InlineCode.js.map +1 -0
  86. package/dist/lib/components/Layout.js +7 -5
  87. package/dist/lib/components/Layout.js.map +1 -1
  88. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  89. package/dist/lib/components/NotFoundPage.js +12 -0
  90. package/dist/lib/components/NotFoundPage.js.map +1 -0
  91. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  92. package/dist/lib/components/SlotletProvider.js +11 -0
  93. package/dist/lib/components/SlotletProvider.js.map +1 -0
  94. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  95. package/dist/lib/components/SyntaxHighlight.js +24 -22
  96. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  97. package/dist/lib/components/TopNavigation.d.ts +1 -1
  98. package/dist/lib/components/TopNavigation.js +8 -4
  99. package/dist/lib/components/TopNavigation.js.map +1 -1
  100. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  101. package/dist/lib/components/context/ThemeContext.js +3 -29
  102. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  103. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  104. package/dist/lib/components/context/ThemeProvider.js +23 -0
  105. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  106. package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
  107. package/dist/lib/components/context/ZudokuContext.js +43 -0
  108. package/dist/lib/components/context/ZudokuContext.js.map +1 -0
  109. package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
  110. package/dist/lib/components/context/ZudokuProvider.js +16 -0
  111. package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
  112. package/dist/lib/components/index.d.ts +32 -3
  113. package/dist/lib/components/index.js +21 -3
  114. package/dist/lib/components/index.js.map +1 -1
  115. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  116. package/dist/lib/components/navigation/Sidebar.js +12 -0
  117. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  118. package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
  119. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  120. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  121. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  122. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  123. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  124. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  125. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  126. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  127. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  128. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  129. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  130. package/dist/lib/components/navigation/utils.d.ts +16 -0
  131. package/dist/lib/components/navigation/utils.js +85 -0
  132. package/dist/lib/components/navigation/utils.js.map +1 -0
  133. package/dist/lib/core/DevPortalContext.d.ts +58 -42
  134. package/dist/lib/core/DevPortalContext.js +18 -19
  135. package/dist/lib/core/DevPortalContext.js.map +1 -1
  136. package/dist/lib/core/plugins.d.ts +25 -10
  137. package/dist/lib/core/plugins.js +3 -0
  138. package/dist/lib/core/plugins.js.map +1 -1
  139. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  140. package/dist/lib/errors/ErrorAlert.js +8 -0
  141. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  142. package/dist/lib/errors/RouterError.d.ts +1 -0
  143. package/dist/lib/errors/RouterError.js +12 -0
  144. package/dist/lib/errors/RouterError.js.map +1 -0
  145. package/dist/lib/errors/ServerError.d.ts +3 -0
  146. package/dist/lib/errors/ServerError.js +6 -0
  147. package/dist/lib/errors/ServerError.js.map +1 -0
  148. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  149. package/dist/lib/errors/TopLevelError.js +7 -0
  150. package/dist/lib/errors/TopLevelError.js.map +1 -0
  151. package/dist/lib/oas/graphql/index.js +8 -5
  152. package/dist/lib/oas/graphql/index.js.map +1 -1
  153. package/dist/lib/oas/parser/index.d.ts +1 -1
  154. package/dist/lib/oas/parser/index.js +38 -12
  155. package/dist/lib/oas/parser/index.js.map +1 -1
  156. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
  157. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  158. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  159. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  160. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  161. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
  162. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  163. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  164. package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
  165. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  166. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  167. package/dist/lib/plugins/custom-page/index.js +12 -0
  168. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  169. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  170. package/dist/lib/plugins/markdown/MdxPage.js +10 -40
  171. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  172. package/dist/lib/plugins/markdown/Toc.js +17 -9
  173. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  174. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  175. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  176. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  177. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  178. package/dist/lib/plugins/markdown/index.js +3 -7
  179. package/dist/lib/plugins/markdown/index.js.map +1 -1
  180. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  181. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  182. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  183. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  184. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  185. package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
  186. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ParameterList.js +2 -1
  188. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  189. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  190. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  191. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
  192. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
  193. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  194. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  195. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  197. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  198. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  199. package/dist/lib/plugins/openapi/Route.js +8 -0
  200. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  201. package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
  202. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  203. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  204. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  205. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  206. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  207. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  208. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  209. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  210. package/dist/lib/plugins/openapi/Sidecar.js +55 -21
  211. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  212. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  213. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  214. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  215. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  216. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  217. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  218. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  219. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  220. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  221. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  222. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  223. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  224. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  225. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  226. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  227. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  228. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  229. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  230. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  231. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  232. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  233. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  234. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  235. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  236. package/dist/lib/plugins/openapi/context.js +11 -0
  237. package/dist/lib/plugins/openapi/context.js.map +1 -0
  238. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  239. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  240. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  241. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  242. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  243. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  244. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  245. package/dist/lib/plugins/openapi/index.js +76 -32
  246. package/dist/lib/plugins/openapi/index.js.map +1 -1
  247. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  248. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  249. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  250. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  251. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  252. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  253. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  254. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  255. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
  256. package/dist/lib/plugins/openapi/playground/Playground.js +54 -26
  257. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
  259. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
  260. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  261. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  262. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  263. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  264. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  265. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  266. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  267. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  268. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  269. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  270. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  271. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  272. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  273. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  274. package/dist/lib/plugins/openapi-worker.js +1 -1
  275. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  276. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  277. package/dist/lib/plugins/redirect/index.js +3 -4
  278. package/dist/lib/plugins/redirect/index.js.map +1 -1
  279. package/dist/lib/ui/Button.d.ts +5 -1
  280. package/dist/lib/ui/Button.js +24 -1
  281. package/dist/lib/ui/Button.js.map +1 -1
  282. package/dist/lib/ui/Callout.js +2 -2
  283. package/dist/lib/ui/Callout.js.map +1 -1
  284. package/dist/lib/ui/Card.js +1 -1
  285. package/dist/lib/ui/Card.js.map +1 -1
  286. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  287. package/dist/lib/ui/DropdownMenu.js +36 -0
  288. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  289. package/dist/lib/ui/Input.js.map +1 -0
  290. package/dist/lib/util/MdxComponents.d.ts +2 -2
  291. package/dist/lib/util/MdxComponents.js +7 -5
  292. package/dist/lib/util/MdxComponents.js.map +1 -1
  293. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  294. package/dist/lib/util/fetchTimeout.js +14 -0
  295. package/dist/lib/util/fetchTimeout.js.map +1 -0
  296. package/dist/lib/util/groupBy.d.ts +1 -6
  297. package/dist/lib/util/groupBy.js +10 -8
  298. package/dist/lib/util/groupBy.js.map +1 -1
  299. package/dist/lib/util/invariant.d.ts +6 -0
  300. package/dist/lib/util/invariant.js +21 -0
  301. package/dist/lib/util/invariant.js.map +1 -0
  302. package/dist/lib/util/joinPath.js +2 -1
  303. package/dist/lib/util/joinPath.js.map +1 -1
  304. package/dist/lib/util/logInit.d.ts +1 -0
  305. package/dist/lib/util/logInit.js +9 -0
  306. package/dist/lib/util/logInit.js.map +1 -0
  307. package/dist/lib/util/objectEntries.d.ts +4 -0
  308. package/dist/lib/util/objectEntries.js +2 -0
  309. package/dist/lib/util/objectEntries.js.map +1 -0
  310. package/dist/lib/util/renderIf.d.ts +1 -0
  311. package/dist/lib/util/renderIf.js +2 -0
  312. package/dist/lib/util/renderIf.js.map +1 -0
  313. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  314. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  315. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  316. package/dist/lib/util/useScrollToAnchor.js +31 -17
  317. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  318. package/dist/vite/build.js +30 -7
  319. package/dist/vite/build.js.map +1 -1
  320. package/dist/vite/config.d.ts +20 -12
  321. package/dist/vite/config.js +107 -55
  322. package/dist/vite/config.js.map +1 -1
  323. package/dist/vite/config.test.js +6 -3
  324. package/dist/vite/config.test.js.map +1 -1
  325. package/dist/vite/dev-server.d.ts +2 -1
  326. package/dist/vite/dev-server.js +44 -15
  327. package/dist/vite/dev-server.js.map +1 -1
  328. package/dist/vite/html.js +18 -5
  329. package/dist/vite/html.js.map +1 -1
  330. package/dist/vite/plugin-api-keys.js +7 -8
  331. package/dist/vite/plugin-api-keys.js.map +1 -1
  332. package/dist/vite/plugin-api.js +9 -20
  333. package/dist/vite/plugin-api.js.map +1 -1
  334. package/dist/vite/plugin-auth.js +5 -6
  335. package/dist/vite/plugin-auth.js.map +1 -1
  336. package/dist/vite/plugin-component.js +5 -2
  337. package/dist/vite/plugin-component.js.map +1 -1
  338. package/dist/vite/plugin-config.d.ts +3 -6
  339. package/dist/vite/plugin-config.js +5 -8
  340. package/dist/vite/plugin-config.js.map +1 -1
  341. package/dist/vite/plugin-custom-css.d.ts +6 -0
  342. package/dist/vite/plugin-custom-css.js +54 -0
  343. package/dist/vite/plugin-custom-css.js.map +1 -0
  344. package/dist/vite/plugin-docs.js +15 -5
  345. package/dist/vite/plugin-docs.js.map +1 -1
  346. package/dist/vite/plugin-mdx.d.ts +3 -1
  347. package/dist/vite/plugin-mdx.js +5 -5
  348. package/dist/vite/plugin-mdx.js.map +1 -1
  349. package/dist/vite/plugin-metadata.js +1 -1
  350. package/dist/vite/plugin-metadata.js.map +1 -1
  351. package/dist/vite/plugin-redirect.js +10 -10
  352. package/dist/vite/plugin-redirect.js.map +1 -1
  353. package/dist/vite/plugin-sidebar.d.ts +3 -0
  354. package/dist/vite/plugin-sidebar.js +23 -0
  355. package/dist/vite/plugin-sidebar.js.map +1 -0
  356. package/dist/vite/plugin.js +5 -5
  357. package/dist/vite/plugin.js.map +1 -1
  358. package/dist/vite/prerender.d.ts +17 -0
  359. package/dist/vite/prerender.js +79 -0
  360. package/dist/vite/prerender.js.map +1 -0
  361. package/lib/AuthenticationPlugin-C3dzfGaA.js +55 -0
  362. package/lib/AuthenticationPlugin-C3dzfGaA.js.map +1 -0
  363. package/lib/CategoryHeading-BWq12Bfa.js +10 -0
  364. package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
  365. package/lib/Combination-Djh-LWhb.js +2789 -0
  366. package/lib/Combination-Djh-LWhb.js.map +1 -0
  367. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  368. package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
  369. package/lib/Input-SCGD-EvD.js +2239 -0
  370. package/lib/Input-SCGD-EvD.js.map +1 -0
  371. package/lib/Markdown-B_Gax7at.js +14108 -0
  372. package/lib/Markdown-B_Gax7at.js.map +1 -0
  373. package/lib/MdxPage-d02krMBw.js +187 -0
  374. package/lib/MdxPage-d02krMBw.js.map +1 -0
  375. package/lib/OperationList-BQweX28o.js +448 -0
  376. package/lib/OperationList-BQweX28o.js.map +1 -0
  377. package/lib/Route-BPGW1TS_.js +14 -0
  378. package/lib/Route-BPGW1TS_.js.map +1 -0
  379. package/lib/SlotletProvider-CzMAO73_.js +82 -0
  380. package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
  381. package/lib/Spinner-DEgs-1Gu.js +274 -0
  382. package/lib/Spinner-DEgs-1Gu.js.map +1 -0
  383. package/lib/ZudokuContext-C3JtXViU.js +1084 -0
  384. package/lib/ZudokuContext-C3JtXViU.js.map +1 -0
  385. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  386. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  387. package/lib/assets/index-BPdJm2ty.js +1 -0
  388. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  389. package/lib/assets/{worker-BCcpCNJ7.js → worker-CyHZIIfE.js} +10727 -10300
  390. package/lib/assets/worker-CyHZIIfE.js.map +1 -0
  391. package/lib/index-7kcHaXD6.js +1771 -0
  392. package/lib/index-7kcHaXD6.js.map +1 -0
  393. package/lib/index-B8BCBPkc.js +124 -0
  394. package/lib/index-B8BCBPkc.js.map +1 -0
  395. package/lib/index-DoIWqOG1.js +5934 -0
  396. package/lib/index-DoIWqOG1.js.map +1 -0
  397. package/lib/index-pI9JkN46.js +4765 -0
  398. package/lib/index-pI9JkN46.js.map +1 -0
  399. package/lib/joinPath-VeNuJa7y.js +8 -0
  400. package/lib/joinPath-VeNuJa7y.js.map +1 -0
  401. package/lib/jsx-runtime-B6kdoens.js +635 -0
  402. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  403. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  404. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  405. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  406. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  407. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  408. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  409. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  410. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  411. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  412. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  413. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  414. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  415. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  416. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  417. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  418. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  419. package/lib/router-BiRCp01d.js +2971 -0
  420. package/lib/router-BiRCp01d.js.map +1 -0
  421. package/lib/slugify-CiPVjteN.js +28 -0
  422. package/lib/slugify-CiPVjteN.js.map +1 -0
  423. package/lib/state-DsXXkBLH.js +288 -0
  424. package/lib/state-DsXXkBLH.js.map +1 -0
  425. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  426. package/lib/urql-DrBfkb92.js.map +1 -0
  427. package/lib/utils-D3fcGEot.js +749 -0
  428. package/lib/utils-D3fcGEot.js.map +1 -0
  429. package/lib/zudoku.auth-auth0.js +31 -20
  430. package/lib/zudoku.auth-auth0.js.map +1 -0
  431. package/lib/zudoku.auth-clerk.js +59 -29
  432. package/lib/zudoku.auth-clerk.js.map +1 -0
  433. package/lib/zudoku.auth-openid.js +742 -573
  434. package/lib/zudoku.auth-openid.js.map +1 -0
  435. package/lib/zudoku.components.js +2008 -684
  436. package/lib/zudoku.components.js.map +1 -0
  437. package/lib/zudoku.openapi-worker.js +15035 -146
  438. package/lib/zudoku.openapi-worker.js.map +1 -0
  439. package/lib/zudoku.plugin-api-keys.js +325 -0
  440. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  441. package/lib/zudoku.plugin-custom-page.js +13 -0
  442. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  443. package/lib/zudoku.plugin-markdown.js +31 -0
  444. package/lib/zudoku.plugin-markdown.js.map +1 -0
  445. package/lib/zudoku.plugin-openapi.js +14 -0
  446. package/lib/zudoku.plugin-openapi.js.map +1 -0
  447. package/lib/zudoku.plugin-redirect.js +11 -0
  448. package/lib/zudoku.plugin-redirect.js.map +1 -0
  449. package/package.json +64 -25
  450. package/src/app/App.tsx +0 -41
  451. package/src/app/demo-cdn.html +26 -0
  452. package/src/app/demo.html +18 -0
  453. package/src/app/demo.tsx +46 -0
  454. package/src/app/entry.client.tsx +47 -0
  455. package/src/app/entry.server.tsx +160 -0
  456. package/src/app/main.css +83 -3
  457. package/src/app/main.tsx +87 -15
  458. package/src/app/standalone.html +20 -0
  459. package/src/app/standalone.tsx +52 -0
  460. package/src/app/tailwind.ts +2 -6
  461. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  462. package/src/lib/authentication/authentication.ts +6 -12
  463. package/src/lib/authentication/components/SignIn.tsx +15 -0
  464. package/src/lib/authentication/components/SignOut.tsx +13 -0
  465. package/src/lib/authentication/components/SignUp.tsx +11 -0
  466. package/src/lib/authentication/hook.ts +4 -4
  467. package/src/lib/authentication/providers/auth0.tsx +16 -6
  468. package/src/lib/authentication/providers/clerk.tsx +63 -31
  469. package/src/lib/authentication/providers/openid.tsx +104 -34
  470. package/src/lib/authentication/state.ts +1 -1
  471. package/src/lib/components/Bootstrap.tsx +44 -0
  472. package/src/lib/components/DevPortal.tsx +75 -66
  473. package/src/lib/components/DeveloperHint.tsx +25 -0
  474. package/src/lib/components/ErrorPage.tsx +28 -0
  475. package/src/lib/components/Header.tsx +106 -31
  476. package/src/lib/components/Heading.tsx +26 -7
  477. package/src/lib/components/InlineCode.tsx +19 -0
  478. package/src/lib/components/Layout.tsx +16 -11
  479. package/src/lib/components/NotFoundPage.tsx +33 -0
  480. package/src/lib/components/SlotletProvider.tsx +25 -0
  481. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  482. package/src/lib/components/TopNavigation.tsx +10 -5
  483. package/src/lib/components/context/ThemeContext.tsx +3 -41
  484. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  485. package/src/lib/components/context/ZudokuContext.ts +55 -0
  486. package/src/lib/components/context/ZudokuProvider.tsx +26 -0
  487. package/src/lib/components/index.ts +25 -3
  488. package/src/lib/components/navigation/Sidebar.tsx +24 -0
  489. package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
  490. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  491. package/src/lib/components/navigation/SidebarItem.tsx +100 -0
  492. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  493. package/src/lib/components/navigation/utils.ts +117 -0
  494. package/src/lib/core/DevPortalContext.ts +72 -68
  495. package/src/lib/core/plugins.ts +40 -16
  496. package/src/lib/errors/ErrorAlert.tsx +21 -0
  497. package/src/lib/errors/RouterError.tsx +13 -0
  498. package/src/lib/errors/ServerError.tsx +5 -0
  499. package/src/lib/errors/TopLevelError.tsx +8 -0
  500. package/src/lib/oas/graphql/index.ts +11 -6
  501. package/src/lib/oas/parser/index.ts +41 -20
  502. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
  503. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  504. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
  505. package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
  506. package/src/lib/plugins/custom-page/index.tsx +22 -0
  507. package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
  508. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  509. package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
  510. package/src/lib/plugins/markdown/index.tsx +10 -7
  511. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  512. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  513. package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
  514. package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
  515. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  516. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
  517. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -15
  518. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  519. package/src/lib/plugins/openapi/Route.tsx +21 -0
  520. package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
  521. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
  522. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  523. package/src/lib/plugins/openapi/Sidecar.tsx +77 -30
  524. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  525. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  526. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  527. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  528. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  529. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  530. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  531. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  532. package/src/lib/plugins/openapi/context.tsx +16 -0
  533. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  534. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  535. package/src/lib/plugins/openapi/index.tsx +134 -76
  536. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  537. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
  538. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  539. package/src/lib/plugins/openapi/playground/Playground.tsx +240 -230
  540. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
  541. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  542. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  543. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  544. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  545. package/src/lib/plugins/openapi-worker.ts +1 -1
  546. package/src/lib/plugins/redirect/index.tsx +3 -4
  547. package/src/lib/ui/Button.tsx +32 -2
  548. package/src/lib/ui/Callout.tsx +4 -4
  549. package/src/lib/ui/Card.tsx +1 -1
  550. package/src/lib/ui/DropdownMenu.tsx +199 -0
  551. package/src/lib/util/MdxComponents.tsx +7 -15
  552. package/src/lib/util/fetchTimeout.tsx +21 -0
  553. package/src/lib/util/groupBy.ts +7 -12
  554. package/src/lib/util/invariant.ts +26 -0
  555. package/src/lib/util/joinPath.tsx +2 -1
  556. package/src/lib/util/logInit.ts +9 -0
  557. package/src/lib/util/objectEntries.ts +5 -0
  558. package/src/lib/util/renderIf.ts +4 -0
  559. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  560. package/src/lib/util/useScrollToAnchor.ts +39 -18
  561. package/dist/lib/authentication/Callback.d.ts +0 -3
  562. package/dist/lib/authentication/Callback.js +0 -34
  563. package/dist/lib/authentication/Callback.js.map +0 -1
  564. package/dist/lib/components/Input.js.map +0 -1
  565. package/dist/lib/components/Link.d.ts +0 -1
  566. package/dist/lib/components/Link.js +0 -2
  567. package/dist/lib/components/Link.js.map +0 -1
  568. package/dist/lib/components/Router.d.ts +0 -4
  569. package/dist/lib/components/Router.js +0 -20
  570. package/dist/lib/components/Router.js.map +0 -1
  571. package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
  572. package/dist/lib/components/context/DevPortalProvider.js +0 -39
  573. package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
  574. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  575. package/dist/lib/components/navigation/SideNavigation.js +0 -11
  576. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  577. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  578. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  579. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  580. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
  581. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  582. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  583. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  584. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
  585. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
  586. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  587. package/dist/lib/components/navigation/util.d.ts +0 -8
  588. package/dist/lib/components/navigation/util.js +0 -15
  589. package/dist/lib/components/navigation/util.js.map +0 -1
  590. package/dist/lib/core/helmet.d.ts +0 -4
  591. package/dist/lib/core/helmet.js +0 -5
  592. package/dist/lib/core/helmet.js.map +0 -1
  593. package/dist/lib/core/icons.d.ts +0 -1
  594. package/dist/lib/core/icons.js +0 -2
  595. package/dist/lib/core/icons.js.map +0 -1
  596. package/dist/lib/core/router.d.ts +0 -1
  597. package/dist/lib/core/router.js +0 -2
  598. package/dist/lib/core/router.js.map +0 -1
  599. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  600. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  601. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  602. package/dist/lib/plugins/api-key/index.js.map +0 -1
  603. package/dist/lib/plugins/index.d.ts +0 -4
  604. package/dist/lib/plugins/index.js +0 -5
  605. package/dist/lib/plugins/index.js.map +0 -1
  606. package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
  607. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  608. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  609. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  610. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  611. package/dist/lib/plugins/openapi/Select.js +0 -5
  612. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  613. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  614. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  615. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  616. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  617. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  618. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  619. package/dist/lib/ui/button-variants.d.ts +0 -4
  620. package/dist/lib/ui/button-variants.js +0 -24
  621. package/dist/lib/ui/button-variants.js.map +0 -1
  622. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  623. package/dist/lib/util/traverseNavigation.js +0 -30
  624. package/dist/lib/util/traverseNavigation.js.map +0 -1
  625. package/dist/vite/common.d.ts +0 -1
  626. package/dist/vite/common.js +0 -5
  627. package/dist/vite/common.js.map +0 -1
  628. package/dist/vite/plugin-html.d.ts +0 -3
  629. package/dist/vite/plugin-html.js +0 -47
  630. package/dist/vite/plugin-html.js.map +0 -1
  631. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  632. package/dist/vite/plugin-openapi-worker.js +0 -28
  633. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  634. package/lib/Spinner-BewqqUU-.js +0 -8413
  635. package/lib/clerk-Wslx_mPo.js +0 -19685
  636. package/lib/index-PyGcnQFX.js +0 -3462
  637. package/lib/loglevel-CoH7VSwE.js +0 -152
  638. package/lib/state-2Hu1renZ.js +0 -313
  639. package/lib/zudoku.plugins.js +0 -19904
  640. package/src/lib/authentication/Callback.tsx +0 -60
  641. package/src/lib/components/Link.tsx +0 -1
  642. package/src/lib/components/Router.tsx +0 -28
  643. package/src/lib/components/context/DevPortalProvider.ts +0 -54
  644. package/src/lib/components/navigation/SideNavigation.tsx +0 -21
  645. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
  646. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
  647. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
  648. package/src/lib/components/navigation/util.ts +0 -38
  649. package/src/lib/core/helmet.ts +0 -5
  650. package/src/lib/core/icons.tsx +0 -1
  651. package/src/lib/core/router.tsx +0 -1
  652. package/src/lib/plugins/index.ts +0 -4
  653. package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
  654. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  655. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  656. package/src/lib/ui/button-variants.ts +0 -31
  657. package/src/lib/util/traverseNavigation.ts +0 -55
  658. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  659. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  660. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  661. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  662. /package/dist/lib/{components → ui}/Input.js +0 -0
  663. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -0,0 +1,1084 @@
1
+ var qt = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var ct = (e, t, s) => t.has(e) || qt("Cannot " + s);
5
+ var i = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? qt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, r) => (ct(e, t, "write to private field"), r ? r.call(e, s) : t.set(e, s), s), v = (e, t, s) => (ct(e, t, "access private method"), s);
6
+ import * as T from "react";
7
+ import { createContext as se, useContext as re } from "react";
8
+ import { j as ie } from "./jsx-runtime-B6kdoens.js";
9
+ import { u as ne } from "./index-7kcHaXD6.js";
10
+ var Dt = class {
11
+ constructor() {
12
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
13
+ }
14
+ subscribe(e) {
15
+ return this.listeners.add(e), this.onSubscribe(), () => {
16
+ this.listeners.delete(e), this.onUnsubscribe();
17
+ };
18
+ }
19
+ hasListeners() {
20
+ return this.listeners.size > 0;
21
+ }
22
+ onSubscribe() {
23
+ }
24
+ onUnsubscribe() {
25
+ }
26
+ }, st = typeof window > "u" || "Deno" in globalThis;
27
+ function dt() {
28
+ }
29
+ function Le(e, t) {
30
+ return typeof e == "function" ? e(t) : e;
31
+ }
32
+ function ft(e) {
33
+ return typeof e == "number" && e >= 0 && e !== 1 / 0;
34
+ }
35
+ function Bt(e, t) {
36
+ return Math.max(e + (t || 0) - Date.now(), 0);
37
+ }
38
+ function ut(e, t) {
39
+ return typeof e == "function" ? e(t) : e;
40
+ }
41
+ function q(e, t) {
42
+ return typeof e == "function" ? e(t) : e;
43
+ }
44
+ function Ne(e, t) {
45
+ const {
46
+ type: s = "all",
47
+ exact: r,
48
+ fetchStatus: n,
49
+ predicate: c,
50
+ queryKey: o,
51
+ stale: l
52
+ } = e;
53
+ if (o) {
54
+ if (r) {
55
+ if (t.queryHash !== ae(o, t.options))
56
+ return !1;
57
+ } else if (!Pt(t.queryKey, o))
58
+ return !1;
59
+ }
60
+ if (s !== "all") {
61
+ const b = t.isActive();
62
+ if (s === "active" && !b || s === "inactive" && b)
63
+ return !1;
64
+ }
65
+ return !(typeof l == "boolean" && t.isStale() !== l || n && n !== t.state.fetchStatus || c && !c(t));
66
+ }
67
+ function Ke(e, t) {
68
+ const { exact: s, status: r, predicate: n, mutationKey: c } = e;
69
+ if (c) {
70
+ if (!t.options.mutationKey)
71
+ return !1;
72
+ if (s) {
73
+ if (yt(t.options.mutationKey) !== yt(c))
74
+ return !1;
75
+ } else if (!Pt(t.options.mutationKey, c))
76
+ return !1;
77
+ }
78
+ return !(r && t.state.status !== r || n && !n(t));
79
+ }
80
+ function ae(e, t) {
81
+ return ((t == null ? void 0 : t.queryKeyHashFn) || yt)(e);
82
+ }
83
+ function yt(e) {
84
+ return JSON.stringify(
85
+ e,
86
+ (t, s) => vt(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
87
+ );
88
+ }
89
+ function Pt(e, t) {
90
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? !Object.keys(t).some((s) => !Pt(e[s], t[s])) : !1;
91
+ }
92
+ function Gt(e, t) {
93
+ if (e === t)
94
+ return e;
95
+ const s = It(e) && It(t);
96
+ if (s || vt(e) && vt(t)) {
97
+ const r = s ? e : Object.keys(e), n = r.length, c = s ? t : Object.keys(t), o = c.length, l = s ? [] : {};
98
+ let b = 0;
99
+ for (let R = 0; R < o; R++) {
100
+ const m = s ? R : c[R];
101
+ (!s && r.includes(m) || s) && e[m] === void 0 && t[m] === void 0 ? (l[m] = void 0, b++) : (l[m] = Gt(e[m], t[m]), l[m] === e[m] && e[m] !== void 0 && b++);
102
+ }
103
+ return n === o && b === n ? e : l;
104
+ }
105
+ return t;
106
+ }
107
+ function pt(e, t) {
108
+ if (!t || Object.keys(e).length !== Object.keys(t).length)
109
+ return !1;
110
+ for (const s in e)
111
+ if (e[s] !== t[s])
112
+ return !1;
113
+ return !0;
114
+ }
115
+ function It(e) {
116
+ return Array.isArray(e) && e.length === Object.keys(e).length;
117
+ }
118
+ function vt(e) {
119
+ if (!xt(e))
120
+ return !1;
121
+ const t = e.constructor;
122
+ if (t === void 0)
123
+ return !0;
124
+ const s = t.prototype;
125
+ return !(!xt(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
126
+ }
127
+ function xt(e) {
128
+ return Object.prototype.toString.call(e) === "[object Object]";
129
+ }
130
+ function oe(e) {
131
+ return new Promise((t) => {
132
+ setTimeout(t, e);
133
+ });
134
+ }
135
+ function mt(e, t, s) {
136
+ return typeof s.structuralSharing == "function" ? s.structuralSharing(e, t) : s.structuralSharing !== !1 ? Gt(e, t) : t;
137
+ }
138
+ function _e(e, t, s = 0) {
139
+ const r = [...e, t];
140
+ return s && r.length > s ? r.slice(1) : r;
141
+ }
142
+ function Be(e, t, s = 0) {
143
+ const r = [t, ...e];
144
+ return s && r.length > s ? r.slice(0, -1) : r;
145
+ }
146
+ var bt = Symbol(), ue = (e, t) => (process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error(
147
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
148
+ ), !e.queryFn && (t != null && t.initialPromise) ? () => t.initialPromise : !e.queryFn || e.queryFn === bt ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn), N, k, z, Mt, he = (Mt = class extends Dt {
149
+ constructor() {
150
+ super();
151
+ f(this, N);
152
+ f(this, k);
153
+ f(this, z);
154
+ h(this, z, (t) => {
155
+ if (!st && window.addEventListener) {
156
+ const s = () => t();
157
+ return window.addEventListener("visibilitychange", s, !1), () => {
158
+ window.removeEventListener("visibilitychange", s);
159
+ };
160
+ }
161
+ });
162
+ }
163
+ onSubscribe() {
164
+ i(this, k) || this.setEventListener(i(this, z));
165
+ }
166
+ onUnsubscribe() {
167
+ var t;
168
+ this.hasListeners() || ((t = i(this, k)) == null || t.call(this), h(this, k, void 0));
169
+ }
170
+ setEventListener(t) {
171
+ var s;
172
+ h(this, z, t), (s = i(this, k)) == null || s.call(this), h(this, k, t((r) => {
173
+ typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
174
+ }));
175
+ }
176
+ setFocused(t) {
177
+ i(this, N) !== t && (h(this, N, t), this.onFocus());
178
+ }
179
+ onFocus() {
180
+ const t = this.isFocused();
181
+ this.listeners.forEach((s) => {
182
+ s(t);
183
+ });
184
+ }
185
+ isFocused() {
186
+ var t;
187
+ return typeof i(this, N) == "boolean" ? i(this, N) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
+ }
189
+ }, N = new WeakMap(), k = new WeakMap(), z = new WeakMap(), Mt), Ht = new he(), $, M, W, Lt, ce = (Lt = class extends Dt {
190
+ constructor() {
191
+ super();
192
+ f(this, $, !0);
193
+ f(this, M);
194
+ f(this, W);
195
+ h(this, W, (t) => {
196
+ if (!st && window.addEventListener) {
197
+ const s = () => t(!0), r = () => t(!1);
198
+ return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
199
+ window.removeEventListener("online", s), window.removeEventListener("offline", r);
200
+ };
201
+ }
202
+ });
203
+ }
204
+ onSubscribe() {
205
+ i(this, M) || this.setEventListener(i(this, W));
206
+ }
207
+ onUnsubscribe() {
208
+ var t;
209
+ this.hasListeners() || ((t = i(this, M)) == null || t.call(this), h(this, M, void 0));
210
+ }
211
+ setEventListener(t) {
212
+ var s;
213
+ h(this, W, t), (s = i(this, M)) == null || s.call(this), h(this, M, t(this.setOnline.bind(this)));
214
+ }
215
+ setOnline(t) {
216
+ i(this, $) !== t && (h(this, $, t), this.listeners.forEach((r) => {
217
+ r(t);
218
+ }));
219
+ }
220
+ isOnline() {
221
+ return i(this, $);
222
+ }
223
+ }, $ = new WeakMap(), M = new WeakMap(), W = new WeakMap(), Lt), Vt = new ce();
224
+ function le(e) {
225
+ return Math.min(1e3 * 2 ** e, 3e4);
226
+ }
227
+ function zt(e) {
228
+ return (e ?? "online") === "online" ? Vt.isOnline() : !0;
229
+ }
230
+ var $t = class {
231
+ constructor(e) {
232
+ this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
233
+ }
234
+ };
235
+ function lt(e) {
236
+ return e instanceof $t;
237
+ }
238
+ function de(e) {
239
+ let t = !1, s = 0, r = !1, n, c, o;
240
+ const l = new Promise((g, S) => {
241
+ c = g, o = S;
242
+ }), b = (g) => {
243
+ var S;
244
+ r || (O(new $t(g)), (S = e.abort) == null || S.call(e));
245
+ }, R = () => {
246
+ t = !0;
247
+ }, m = () => {
248
+ t = !1;
249
+ }, a = () => Ht.isFocused() && (e.networkMode === "always" || Vt.isOnline()) && e.canRun(), u = () => zt(e.networkMode) && e.canRun(), p = (g) => {
250
+ var S;
251
+ r || (r = !0, (S = e.onSuccess) == null || S.call(e, g), n == null || n(), c(g));
252
+ }, O = (g) => {
253
+ var S;
254
+ r || (r = !0, (S = e.onError) == null || S.call(e, g), n == null || n(), o(g));
255
+ }, U = () => new Promise((g) => {
256
+ var S;
257
+ n = (D) => {
258
+ (r || a()) && g(D);
259
+ }, (S = e.onPause) == null || S.call(e);
260
+ }).then(() => {
261
+ var g;
262
+ n = void 0, r || (g = e.onContinue) == null || g.call(e);
263
+ }), A = () => {
264
+ if (r)
265
+ return;
266
+ let g;
267
+ const S = s === 0 ? e.initialPromise : void 0;
268
+ try {
269
+ g = S ?? e.fn();
270
+ } catch (D) {
271
+ g = Promise.reject(D);
272
+ }
273
+ Promise.resolve(g).then(p).catch((D) => {
274
+ var w;
275
+ if (r)
276
+ return;
277
+ const j = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? le, Qt = typeof V == "function" ? V(s, D) : V, ot = j === !0 || typeof j == "number" && s < j || typeof j == "function" && j(s, D);
278
+ if (t || !ot) {
279
+ O(D);
280
+ return;
281
+ }
282
+ s++, (w = e.onFail) == null || w.call(e, s, D), oe(Qt).then(() => a() ? void 0 : U()).then(() => {
283
+ t ? O(D) : A();
284
+ });
285
+ });
286
+ };
287
+ return {
288
+ promise: l,
289
+ cancel: b,
290
+ continue: () => (n == null || n(), l),
291
+ cancelRetry: R,
292
+ continueRetry: m,
293
+ canStart: u,
294
+ start: () => (u() ? A() : U().then(A), l)
295
+ };
296
+ }
297
+ function fe() {
298
+ let e = [], t = 0, s = (u) => {
299
+ u();
300
+ }, r = (u) => {
301
+ u();
302
+ }, n = (u) => setTimeout(u, 0);
303
+ const c = (u) => {
304
+ n = u;
305
+ }, o = (u) => {
306
+ let p;
307
+ t++;
308
+ try {
309
+ p = u();
310
+ } finally {
311
+ t--, t || R();
312
+ }
313
+ return p;
314
+ }, l = (u) => {
315
+ t ? e.push(u) : n(() => {
316
+ s(u);
317
+ });
318
+ }, b = (u) => (...p) => {
319
+ l(() => {
320
+ u(...p);
321
+ });
322
+ }, R = () => {
323
+ const u = e;
324
+ e = [], u.length && n(() => {
325
+ r(() => {
326
+ u.forEach((p) => {
327
+ s(p);
328
+ });
329
+ });
330
+ });
331
+ };
332
+ return {
333
+ batch: o,
334
+ batchCalls: b,
335
+ schedule: l,
336
+ setNotifyFunction: (u) => {
337
+ s = u;
338
+ },
339
+ setBatchNotifyFunction: (u) => {
340
+ r = u;
341
+ },
342
+ setScheduler: c
343
+ };
344
+ }
345
+ var Tt = fe(), K, Nt, ye = (Nt = class {
346
+ constructor() {
347
+ f(this, K);
348
+ }
349
+ destroy() {
350
+ this.clearGcTimeout();
351
+ }
352
+ scheduleGc() {
353
+ this.clearGcTimeout(), ft(this.gcTime) && h(this, K, setTimeout(() => {
354
+ this.optionalRemove();
355
+ }, this.gcTime));
356
+ }
357
+ updateGcTime(e) {
358
+ this.gcTime = Math.max(
359
+ this.gcTime || 0,
360
+ e ?? (st ? 1 / 0 : 5 * 60 * 1e3)
361
+ );
362
+ }
363
+ clearGcTimeout() {
364
+ i(this, K) && (clearTimeout(i(this, K)), h(this, K, void 0));
365
+ }
366
+ }, K = new WeakMap(), Nt), Z, J, P, C, it, _, Q, x, Kt, Ge = (Kt = class extends ye {
367
+ constructor(t) {
368
+ super();
369
+ f(this, Q);
370
+ f(this, Z);
371
+ f(this, J);
372
+ f(this, P);
373
+ f(this, C);
374
+ f(this, it);
375
+ f(this, _);
376
+ h(this, _, !1), h(this, it, t.defaultOptions), this.setOptions(t.options), this.observers = [], h(this, P, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, h(this, Z, t.state || pe(this.options)), this.state = i(this, Z), this.scheduleGc();
377
+ }
378
+ get meta() {
379
+ return this.options.meta;
380
+ }
381
+ get promise() {
382
+ var t;
383
+ return (t = i(this, C)) == null ? void 0 : t.promise;
384
+ }
385
+ setOptions(t) {
386
+ this.options = { ...i(this, it), ...t }, this.updateGcTime(this.options.gcTime);
387
+ }
388
+ optionalRemove() {
389
+ !this.observers.length && this.state.fetchStatus === "idle" && i(this, P).remove(this);
390
+ }
391
+ setData(t, s) {
392
+ const r = mt(this.state.data, t, this.options);
393
+ return v(this, Q, x).call(this, {
394
+ data: r,
395
+ type: "success",
396
+ dataUpdatedAt: s == null ? void 0 : s.updatedAt,
397
+ manual: s == null ? void 0 : s.manual
398
+ }), r;
399
+ }
400
+ setState(t, s) {
401
+ v(this, Q, x).call(this, { type: "setState", state: t, setStateOptions: s });
402
+ }
403
+ cancel(t) {
404
+ var r, n;
405
+ const s = (r = i(this, C)) == null ? void 0 : r.promise;
406
+ return (n = i(this, C)) == null || n.cancel(t), s ? s.then(dt).catch(dt) : Promise.resolve();
407
+ }
408
+ destroy() {
409
+ super.destroy(), this.cancel({ silent: !0 });
410
+ }
411
+ reset() {
412
+ this.destroy(), this.setState(i(this, Z));
413
+ }
414
+ isActive() {
415
+ return this.observers.some(
416
+ (t) => q(t.options.enabled, this) !== !1
417
+ );
418
+ }
419
+ isDisabled() {
420
+ return this.getObserversCount() > 0 && !this.isActive();
421
+ }
422
+ isStale() {
423
+ return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
424
+ (t) => t.getCurrentResult().isStale
425
+ ) : this.state.data === void 0;
426
+ }
427
+ isStaleByTime(t = 0) {
428
+ return this.state.isInvalidated || this.state.data === void 0 || !Bt(this.state.dataUpdatedAt, t);
429
+ }
430
+ onFocus() {
431
+ var s;
432
+ const t = this.observers.find((r) => r.shouldFetchOnWindowFocus());
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
434
+ }
435
+ onOnline() {
436
+ var s;
437
+ const t = this.observers.find((r) => r.shouldFetchOnReconnect());
438
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
439
+ }
440
+ addObserver(t) {
441
+ this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), i(this, P).notify({ type: "observerAdded", query: this, observer: t }));
442
+ }
443
+ removeObserver(t) {
444
+ this.observers.includes(t) && (this.observers = this.observers.filter((s) => s !== t), this.observers.length || (i(this, C) && (i(this, _) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, P).notify({ type: "observerRemoved", query: this, observer: t }));
445
+ }
446
+ getObserversCount() {
447
+ return this.observers.length;
448
+ }
449
+ invalidate() {
450
+ this.state.isInvalidated || v(this, Q, x).call(this, { type: "invalidate" });
451
+ }
452
+ fetch(t, s) {
453
+ var b, R, m;
454
+ if (this.state.fetchStatus !== "idle") {
455
+ if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
456
+ this.cancel({ silent: !0 });
457
+ else if (i(this, C))
458
+ return i(this, C).continueRetry(), i(this, C).promise;
459
+ }
460
+ if (t && this.setOptions(t), !this.options.queryFn) {
461
+ const a = this.observers.find((u) => u.options.queryFn);
462
+ a && this.setOptions(a.options);
463
+ }
464
+ process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
465
+ "As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
466
+ ));
467
+ const r = new AbortController(), n = (a) => {
468
+ Object.defineProperty(a, "signal", {
469
+ enumerable: !0,
470
+ get: () => (h(this, _, !0), r.signal)
471
+ });
472
+ }, c = () => {
473
+ const a = ue(this.options, s), u = {
474
+ queryKey: this.queryKey,
475
+ meta: this.meta
476
+ };
477
+ return n(u), h(this, _, !1), this.options.persister ? this.options.persister(
478
+ a,
479
+ u,
480
+ this
481
+ ) : a(u);
482
+ }, o = {
483
+ fetchOptions: s,
484
+ options: this.options,
485
+ queryKey: this.queryKey,
486
+ state: this.state,
487
+ fetchFn: c
488
+ };
489
+ n(o), (b = this.options.behavior) == null || b.onFetch(
490
+ o,
491
+ this
492
+ ), h(this, J, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = o.fetchOptions) == null ? void 0 : R.meta)) && v(this, Q, x).call(this, { type: "fetch", meta: (m = o.fetchOptions) == null ? void 0 : m.meta });
493
+ const l = (a) => {
494
+ var u, p, O, U;
495
+ lt(a) && a.silent || v(this, Q, x).call(this, {
496
+ type: "error",
497
+ error: a
498
+ }), lt(a) || ((p = (u = i(this, P).config).onError) == null || p.call(
499
+ u,
500
+ a,
501
+ this
502
+ ), (U = (O = i(this, P).config).onSettled) == null || U.call(
503
+ O,
504
+ this.state.data,
505
+ a,
506
+ this
507
+ )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
508
+ };
509
+ return h(this, C, de({
510
+ initialPromise: s == null ? void 0 : s.initialPromise,
511
+ fn: o.fetchFn,
512
+ abort: r.abort.bind(r),
513
+ onSuccess: (a) => {
514
+ var u, p, O, U;
515
+ if (a === void 0) {
516
+ process.env.NODE_ENV !== "production" && console.error(
517
+ `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
518
+ ), l(new Error(`${this.queryHash} data is undefined`));
519
+ return;
520
+ }
521
+ this.setData(a), (p = (u = i(this, P).config).onSuccess) == null || p.call(u, a, this), (U = (O = i(this, P).config).onSettled) == null || U.call(
522
+ O,
523
+ a,
524
+ this.state.error,
525
+ this
526
+ ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
527
+ },
528
+ onError: l,
529
+ onFail: (a, u) => {
530
+ v(this, Q, x).call(this, { type: "failed", failureCount: a, error: u });
531
+ },
532
+ onPause: () => {
533
+ v(this, Q, x).call(this, { type: "pause" });
534
+ },
535
+ onContinue: () => {
536
+ v(this, Q, x).call(this, { type: "continue" });
537
+ },
538
+ retry: o.options.retry,
539
+ retryDelay: o.options.retryDelay,
540
+ networkMode: o.options.networkMode,
541
+ canRun: () => !0
542
+ })), i(this, C).start();
543
+ }
544
+ }, Z = new WeakMap(), J = new WeakMap(), P = new WeakMap(), C = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), Q = new WeakSet(), x = function(t) {
545
+ const s = (r) => {
546
+ switch (t.type) {
547
+ case "failed":
548
+ return {
549
+ ...r,
550
+ fetchFailureCount: t.failureCount,
551
+ fetchFailureReason: t.error
552
+ };
553
+ case "pause":
554
+ return {
555
+ ...r,
556
+ fetchStatus: "paused"
557
+ };
558
+ case "continue":
559
+ return {
560
+ ...r,
561
+ fetchStatus: "fetching"
562
+ };
563
+ case "fetch":
564
+ return {
565
+ ...r,
566
+ ...Wt(r.data, this.options),
567
+ fetchMeta: t.meta ?? null
568
+ };
569
+ case "success":
570
+ return {
571
+ ...r,
572
+ data: t.data,
573
+ dataUpdateCount: r.dataUpdateCount + 1,
574
+ dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
575
+ error: null,
576
+ isInvalidated: !1,
577
+ status: "success",
578
+ ...!t.manual && {
579
+ fetchStatus: "idle",
580
+ fetchFailureCount: 0,
581
+ fetchFailureReason: null
582
+ }
583
+ };
584
+ case "error":
585
+ const n = t.error;
586
+ return lt(n) && n.revert && i(this, J) ? { ...i(this, J), fetchStatus: "idle" } : {
587
+ ...r,
588
+ error: n,
589
+ errorUpdateCount: r.errorUpdateCount + 1,
590
+ errorUpdatedAt: Date.now(),
591
+ fetchFailureCount: r.fetchFailureCount + 1,
592
+ fetchFailureReason: n,
593
+ fetchStatus: "idle",
594
+ status: "error"
595
+ };
596
+ case "invalidate":
597
+ return {
598
+ ...r,
599
+ isInvalidated: !0
600
+ };
601
+ case "setState":
602
+ return {
603
+ ...r,
604
+ ...t.state
605
+ };
606
+ }
607
+ };
608
+ this.state = s(this.state), Tt.batch(() => {
609
+ this.observers.forEach((r) => {
610
+ r.onQueryUpdate();
611
+ }), i(this, P).notify({ query: this, type: "updated", action: t });
612
+ });
613
+ }, Kt);
614
+ function Wt(e, t) {
615
+ return {
616
+ fetchFailureCount: 0,
617
+ fetchFailureReason: null,
618
+ fetchStatus: zt(t.networkMode) ? "fetching" : "paused",
619
+ ...e === void 0 && {
620
+ error: null,
621
+ status: "pending"
622
+ }
623
+ };
624
+ }
625
+ function pe(e) {
626
+ const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, r = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
627
+ return {
628
+ data: t,
629
+ dataUpdateCount: 0,
630
+ dataUpdatedAt: s ? r ?? Date.now() : 0,
631
+ error: null,
632
+ errorUpdateCount: 0,
633
+ errorUpdatedAt: 0,
634
+ fetchFailureCount: 0,
635
+ fetchFailureReason: null,
636
+ fetchMeta: null,
637
+ isInvalidated: !1,
638
+ status: s ? "success" : "pending",
639
+ fetchStatus: "idle"
640
+ };
641
+ }
642
+ var E, d, nt, F, B, X, I, at, Y, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Jt, _t, Zt = (_t = class extends Dt {
643
+ constructor(t, s) {
644
+ super();
645
+ f(this, y);
646
+ f(this, E);
647
+ f(this, d);
648
+ f(this, nt);
649
+ f(this, F);
650
+ f(this, B);
651
+ f(this, X);
652
+ f(this, I);
653
+ f(this, at);
654
+ f(this, Y);
655
+ // This property keeps track of the last query with defined data.
656
+ // It will be used to pass the previous data and query to the placeholder function between renders.
657
+ f(this, tt);
658
+ f(this, G);
659
+ f(this, H);
660
+ f(this, L);
661
+ f(this, et, /* @__PURE__ */ new Set());
662
+ this.options = s, h(this, E, t), h(this, I, null), this.bindMethods(), this.setOptions(s);
663
+ }
664
+ bindMethods() {
665
+ this.refetch = this.refetch.bind(this);
666
+ }
667
+ onSubscribe() {
668
+ this.listeners.size === 1 && (i(this, d).addObserver(this), jt(i(this, d), this.options) ? v(this, y, rt).call(this) : this.updateResult(), v(this, y, Ct).call(this));
669
+ }
670
+ onUnsubscribe() {
671
+ this.hasListeners() || this.destroy();
672
+ }
673
+ shouldFetchOnReconnect() {
674
+ return Et(
675
+ i(this, d),
676
+ this.options,
677
+ this.options.refetchOnReconnect
678
+ );
679
+ }
680
+ shouldFetchOnWindowFocus() {
681
+ return Et(
682
+ i(this, d),
683
+ this.options,
684
+ this.options.refetchOnWindowFocus
685
+ );
686
+ }
687
+ destroy() {
688
+ this.listeners = /* @__PURE__ */ new Set(), v(this, y, wt).call(this), v(this, y, Ft).call(this), i(this, d).removeObserver(this);
689
+ }
690
+ setOptions(t, s) {
691
+ const r = this.options, n = i(this, d);
692
+ if (this.options = i(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof q(this.options.enabled, i(this, d)) != "boolean")
693
+ throw new Error(
694
+ "Expected enabled to be a boolean or a callback that returns a boolean"
695
+ );
696
+ v(this, y, Ot).call(this), i(this, d).setOptions(this.options), r._defaulted && !pt(this.options, r) && i(this, E).getQueryCache().notify({
697
+ type: "observerOptionsUpdated",
698
+ query: i(this, d),
699
+ observer: this
700
+ });
701
+ const c = this.hasListeners();
702
+ c && kt(
703
+ i(this, d),
704
+ n,
705
+ this.options,
706
+ r
707
+ ) && v(this, y, rt).call(this), this.updateResult(s), c && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || ut(this.options.staleTime, i(this, d)) !== ut(r.staleTime, i(this, d))) && v(this, y, gt).call(this);
708
+ const o = v(this, y, Rt).call(this);
709
+ c && (i(this, d) !== n || q(this.options.enabled, i(this, d)) !== q(r.enabled, i(this, d)) || o !== i(this, L)) && v(this, y, St).call(this, o);
710
+ }
711
+ getOptimisticResult(t) {
712
+ const s = i(this, E).getQueryCache().build(i(this, E), t), r = this.createResult(s, t);
713
+ return me(this, r) && (h(this, F, r), h(this, X, this.options), h(this, B, i(this, d).state)), r;
714
+ }
715
+ getCurrentResult() {
716
+ return i(this, F);
717
+ }
718
+ trackResult(t, s) {
719
+ const r = {};
720
+ return Object.keys(t).forEach((n) => {
721
+ Object.defineProperty(r, n, {
722
+ configurable: !1,
723
+ enumerable: !0,
724
+ get: () => (this.trackProp(n), s == null || s(n), t[n])
725
+ });
726
+ }), r;
727
+ }
728
+ trackProp(t) {
729
+ i(this, et).add(t);
730
+ }
731
+ getCurrentQuery() {
732
+ return i(this, d);
733
+ }
734
+ refetch({ ...t } = {}) {
735
+ return this.fetch({
736
+ ...t
737
+ });
738
+ }
739
+ fetchOptimistic(t) {
740
+ const s = i(this, E).defaultQueryOptions(t), r = i(this, E).getQueryCache().build(i(this, E), s);
741
+ return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, s));
742
+ }
743
+ fetch(t) {
744
+ return v(this, y, rt).call(this, {
745
+ ...t,
746
+ cancelRefetch: t.cancelRefetch ?? !0
747
+ }).then(() => (this.updateResult(), i(this, F)));
748
+ }
749
+ createResult(t, s) {
750
+ var ot;
751
+ const r = i(this, d), n = this.options, c = i(this, F), o = i(this, B), l = i(this, X), R = t !== r ? t.state : i(this, nt), { state: m } = t;
752
+ let a = { ...m }, u = !1, p;
753
+ if (s._optimisticResults) {
754
+ const w = this.hasListeners(), ht = !w && jt(t, s), ee = w && kt(t, r, s, n);
755
+ (ht || ee) && (a = {
756
+ ...a,
757
+ ...Wt(m.data, t.options)
758
+ }), s._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
759
+ }
760
+ let { error: O, errorUpdatedAt: U, status: A } = a;
761
+ if (s.select && a.data !== void 0)
762
+ if (c && a.data === (o == null ? void 0 : o.data) && s.select === i(this, at))
763
+ p = i(this, Y);
764
+ else
765
+ try {
766
+ h(this, at, s.select), p = s.select(a.data), p = mt(c == null ? void 0 : c.data, p, s), h(this, Y, p), h(this, I, null);
767
+ } catch (w) {
768
+ h(this, I, w);
769
+ }
770
+ else
771
+ p = a.data;
772
+ if (s.placeholderData !== void 0 && p === void 0 && A === "pending") {
773
+ let w;
774
+ if (c != null && c.isPlaceholderData && s.placeholderData === (l == null ? void 0 : l.placeholderData))
775
+ w = c.data;
776
+ else if (w = typeof s.placeholderData == "function" ? s.placeholderData(
777
+ (ot = i(this, tt)) == null ? void 0 : ot.state.data,
778
+ i(this, tt)
779
+ ) : s.placeholderData, s.select && w !== void 0)
780
+ try {
781
+ w = s.select(w), h(this, I, null);
782
+ } catch (ht) {
783
+ h(this, I, ht);
784
+ }
785
+ w !== void 0 && (A = "success", p = mt(
786
+ c == null ? void 0 : c.data,
787
+ w,
788
+ s
789
+ ), u = !0);
790
+ }
791
+ i(this, I) && (O = i(this, I), p = i(this, Y), U = Date.now(), A = "error");
792
+ const g = a.fetchStatus === "fetching", S = A === "pending", D = A === "error", j = S && g, V = p !== void 0;
793
+ return {
794
+ status: A,
795
+ fetchStatus: a.fetchStatus,
796
+ isPending: S,
797
+ isSuccess: A === "success",
798
+ isError: D,
799
+ isInitialLoading: j,
800
+ isLoading: j,
801
+ data: p,
802
+ dataUpdatedAt: a.dataUpdatedAt,
803
+ error: O,
804
+ errorUpdatedAt: U,
805
+ failureCount: a.fetchFailureCount,
806
+ failureReason: a.fetchFailureReason,
807
+ errorUpdateCount: a.errorUpdateCount,
808
+ isFetched: a.dataUpdateCount > 0 || a.errorUpdateCount > 0,
809
+ isFetchedAfterMount: a.dataUpdateCount > R.dataUpdateCount || a.errorUpdateCount > R.errorUpdateCount,
810
+ isFetching: g,
811
+ isRefetching: g && !S,
812
+ isLoadingError: D && !V,
813
+ isPaused: a.fetchStatus === "paused",
814
+ isPlaceholderData: u,
815
+ isRefetchError: D && V,
816
+ isStale: Ut(t, s),
817
+ refetch: this.refetch
818
+ };
819
+ }
820
+ updateResult(t) {
821
+ const s = i(this, F), r = this.createResult(i(this, d), this.options);
822
+ if (h(this, B, i(this, d).state), h(this, X, this.options), i(this, B).data !== void 0 && h(this, tt, i(this, d)), pt(r, s))
823
+ return;
824
+ h(this, F, r);
825
+ const n = {}, c = () => {
826
+ if (!s)
827
+ return !0;
828
+ const { notifyOnChangeProps: o } = this.options, l = typeof o == "function" ? o() : o;
829
+ if (l === "all" || !l && !i(this, et).size)
830
+ return !0;
831
+ const b = new Set(
832
+ l ?? i(this, et)
833
+ );
834
+ return this.options.throwOnError && b.add("error"), Object.keys(i(this, F)).some((R) => {
835
+ const m = R;
836
+ return i(this, F)[m] !== s[m] && b.has(m);
837
+ });
838
+ };
839
+ (t == null ? void 0 : t.listeners) !== !1 && c() && (n.listeners = !0), v(this, y, Jt).call(this, { ...n, ...t });
840
+ }
841
+ onQueryUpdate() {
842
+ this.updateResult(), this.hasListeners() && v(this, y, Ct).call(this);
843
+ }
844
+ }, E = new WeakMap(), d = new WeakMap(), nt = new WeakMap(), F = new WeakMap(), B = new WeakMap(), X = new WeakMap(), I = new WeakMap(), at = new WeakMap(), Y = new WeakMap(), tt = new WeakMap(), G = new WeakMap(), H = new WeakMap(), L = new WeakMap(), et = new WeakMap(), y = new WeakSet(), rt = function(t) {
845
+ v(this, y, Ot).call(this);
846
+ let s = i(this, d).fetch(
847
+ this.options,
848
+ t
849
+ );
850
+ return t != null && t.throwOnError || (s = s.catch(dt)), s;
851
+ }, gt = function() {
852
+ v(this, y, wt).call(this);
853
+ const t = ut(
854
+ this.options.staleTime,
855
+ i(this, d)
856
+ );
857
+ if (st || i(this, F).isStale || !ft(t))
858
+ return;
859
+ const r = Bt(i(this, F).dataUpdatedAt, t) + 1;
860
+ h(this, G, setTimeout(() => {
861
+ i(this, F).isStale || this.updateResult();
862
+ }, r));
863
+ }, Rt = function() {
864
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
865
+ }, St = function(t) {
866
+ v(this, y, Ft).call(this), h(this, L, t), !(st || q(this.options.enabled, i(this, d)) === !1 || !ft(i(this, L)) || i(this, L) === 0) && h(this, H, setInterval(() => {
867
+ (this.options.refetchIntervalInBackground || Ht.isFocused()) && v(this, y, rt).call(this);
868
+ }, i(this, L)));
869
+ }, Ct = function() {
870
+ v(this, y, gt).call(this), v(this, y, St).call(this, v(this, y, Rt).call(this));
871
+ }, wt = function() {
872
+ i(this, G) && (clearTimeout(i(this, G)), h(this, G, void 0));
873
+ }, Ft = function() {
874
+ i(this, H) && (clearInterval(i(this, H)), h(this, H, void 0));
875
+ }, Ot = function() {
876
+ const t = i(this, E).getQueryCache().build(i(this, E), this.options);
877
+ if (t === i(this, d))
878
+ return;
879
+ const s = i(this, d);
880
+ h(this, d, t), h(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
+ }, Jt = function(t) {
882
+ Tt.batch(() => {
883
+ t.listeners && this.listeners.forEach((s) => {
884
+ s(i(this, F));
885
+ }), i(this, E).getQueryCache().notify({
886
+ query: i(this, d),
887
+ type: "observerResultsUpdated"
888
+ });
889
+ });
890
+ }, _t);
891
+ function ve(e, t) {
892
+ return q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
893
+ }
894
+ function jt(e, t) {
895
+ return ve(e, t) || e.state.data !== void 0 && Et(e, t, t.refetchOnMount);
896
+ }
897
+ function Et(e, t, s) {
898
+ if (q(t.enabled, e) !== !1) {
899
+ const r = typeof s == "function" ? s(e) : s;
900
+ return r === "always" || r !== !1 && Ut(e, t);
901
+ }
902
+ return !1;
903
+ }
904
+ function kt(e, t, s, r) {
905
+ return (e !== t || q(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ut(e, s);
906
+ }
907
+ function Ut(e, t) {
908
+ return q(t.enabled, e) !== !1 && e.isStaleByTime(ut(t.staleTime, e));
909
+ }
910
+ function me(e, t) {
911
+ return !pt(e.getCurrentResult(), t);
912
+ }
913
+ var Xt = T.createContext(
914
+ void 0
915
+ ), be = (e) => {
916
+ const t = T.useContext(Xt);
917
+ if (!t)
918
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
919
+ return t;
920
+ }, He = ({
921
+ client: e,
922
+ children: t
923
+ }) => (T.useEffect(() => (e.mount(), () => {
924
+ e.unmount();
925
+ }), [e]), /* @__PURE__ */ ie.jsx(Xt.Provider, { value: e, children: t })), Yt = T.createContext(!1), ge = () => T.useContext(Yt);
926
+ Yt.Provider;
927
+ function Re() {
928
+ let e = !1;
929
+ return {
930
+ clearReset: () => {
931
+ e = !1;
932
+ },
933
+ reset: () => {
934
+ e = !0;
935
+ },
936
+ isReset: () => e
937
+ };
938
+ }
939
+ var Se = T.createContext(Re()), Ce = () => T.useContext(Se);
940
+ function we(e, t) {
941
+ return typeof e == "function" ? e(...t) : !!e;
942
+ }
943
+ function Ve() {
944
+ }
945
+ var Fe = (e, t) => {
946
+ (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
947
+ }, Oe = (e) => {
948
+ T.useEffect(() => {
949
+ e.clearReset();
950
+ }, [e]);
951
+ }, Ee = ({
952
+ result: e,
953
+ errorResetBoundary: t,
954
+ throwOnError: s,
955
+ query: r
956
+ }) => e.isError && !t.isReset() && !e.isFetching && r && we(s, [e.error, r]), De = (e, t) => t.state.data === void 0, Pe = (e) => {
957
+ e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
958
+ }, Te = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, Ue = (e, t, s) => t.fetchOptimistic(e).catch(() => {
959
+ s.clearReset();
960
+ });
961
+ function te(e, t, s) {
962
+ var R, m, a, u;
963
+ if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
964
+ throw new Error(
965
+ 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
966
+ );
967
+ const r = be(), n = ge(), c = Ce(), o = r.defaultQueryOptions(e);
968
+ (m = (R = r.getDefaultOptions().queries) == null ? void 0 : R._experimental_beforeQuery) == null || m.call(
969
+ R,
970
+ o
971
+ ), o._optimisticResults = n ? "isRestoring" : "optimistic", Pe(o), Fe(o, c), Oe(c);
972
+ const [l] = T.useState(
973
+ () => new t(
974
+ r,
975
+ o
976
+ )
977
+ ), b = l.getOptimisticResult(o);
978
+ if (T.useSyncExternalStore(
979
+ T.useCallback(
980
+ (p) => {
981
+ const O = n ? () => {
982
+ } : l.subscribe(Tt.batchCalls(p));
983
+ return l.updateResult(), O;
984
+ },
985
+ [l, n]
986
+ ),
987
+ () => l.getCurrentResult(),
988
+ () => l.getCurrentResult()
989
+ ), T.useEffect(() => {
990
+ l.setOptions(o, { listeners: !1 });
991
+ }, [o, l]), Te(o, b))
992
+ throw Ue(o, l, c);
993
+ if (Ee({
994
+ result: b,
995
+ errorResetBoundary: c,
996
+ throwOnError: o.throwOnError,
997
+ query: r.getQueryCache().get(o.queryHash)
998
+ }))
999
+ throw b.error;
1000
+ return (u = (a = r.getDefaultOptions().queries) == null ? void 0 : a._experimental_afterQuery) == null || u.call(
1001
+ a,
1002
+ o,
1003
+ b
1004
+ ), o.notifyOnChangeProps ? b : l.trackResult(b);
1005
+ }
1006
+ function Ae(e, t) {
1007
+ return te(e, Zt);
1008
+ }
1009
+ function Qe(e, t) {
1010
+ return process.env.NODE_ENV !== "production" && e.queryFn === bt && console.error("skipToken is not allowed for useSuspenseQuery"), te(
1011
+ {
1012
+ ...e,
1013
+ enabled: !0,
1014
+ suspense: !0,
1015
+ throwOnError: De,
1016
+ placeholderData: void 0
1017
+ },
1018
+ Zt
1019
+ );
1020
+ }
1021
+ const qe = se(
1022
+ void 0
1023
+ ), At = () => {
1024
+ const e = re(qe);
1025
+ if (!e)
1026
+ throw new Error("useDevPortal must be used within a DevPortalProvider.");
1027
+ return e;
1028
+ }, ze = () => {
1029
+ const { getApiIdentities: e } = At();
1030
+ return Ae({
1031
+ queryFn: e,
1032
+ queryKey: ["api-identities"]
1033
+ });
1034
+ }, Ie = () => {
1035
+ const { topNavigation: e } = At(), s = ne().pathname.split("/").at(1);
1036
+ if (s)
1037
+ return e.find((r) => r.id === s);
1038
+ }, $e = () => {
1039
+ const { getPluginSidebar: e, sidebars: t } = At(), s = Ie(), r = s == null ? void 0 : s.id, n = r ? t[r] ?? [] : [];
1040
+ return Qe({
1041
+ queryFn: async () => {
1042
+ const c = r ? await e(r) : [];
1043
+ return {
1044
+ items: [...n, ...c],
1045
+ currentTopNavItem: s
1046
+ };
1047
+ },
1048
+ queryKey: ["navigation", r]
1049
+ });
1050
+ };
1051
+ export {
1052
+ de as A,
1053
+ Ge as Q,
1054
+ ye as R,
1055
+ Dt as S,
1056
+ qe as Z,
1057
+ Ke as a,
1058
+ dt as b,
1059
+ Be as c,
1060
+ _e as d,
1061
+ ue as e,
1062
+ Ht as f,
1063
+ Le as g,
1064
+ ae as h,
1065
+ yt as i,
1066
+ Qe as j,
1067
+ He as k,
1068
+ Ie as l,
1069
+ Ne as m,
1070
+ Tt as n,
1071
+ Vt as o,
1072
+ Pt as p,
1073
+ $e as q,
1074
+ ut as r,
1075
+ bt as s,
1076
+ be as t,
1077
+ At as u,
1078
+ ze as v,
1079
+ Ae as w,
1080
+ pt as x,
1081
+ Ve as y,
1082
+ we as z
1083
+ };
1084
+ //# sourceMappingURL=ZudokuContext-C3JtXViU.js.map