zudoku 0.3.0-dev.4 → 0.3.0-dev.40

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 (474) hide show
  1. package/dist/app/App.d.ts +1 -2
  2. package/dist/app/App.js +1 -28
  3. package/dist/app/App.js.map +1 -1
  4. package/dist/app/demo.d.ts +2 -0
  5. package/dist/app/demo.js +27 -0
  6. package/dist/app/demo.js.map +1 -0
  7. package/dist/app/entry.client.d.ts +2 -0
  8. package/dist/app/entry.client.js +35 -0
  9. package/dist/app/entry.client.js.map +1 -0
  10. package/dist/app/entry.server.d.ts +12 -0
  11. package/dist/app/entry.server.js +104 -0
  12. package/dist/app/entry.server.js.map +1 -0
  13. package/dist/app/main.d.ts +6 -1
  14. package/dist/app/main.js +54 -12
  15. package/dist/app/main.js.map +1 -1
  16. package/dist/app/standalone.d.ts +2 -0
  17. package/dist/app/standalone.js +32 -0
  18. package/dist/app/standalone.js.map +1 -0
  19. package/dist/app/tailwind.d.ts +1 -1
  20. package/dist/app/tailwind.js +0 -4
  21. package/dist/app/tailwind.js.map +1 -1
  22. package/dist/app/zudoku-manifest.d.ts +1 -0
  23. package/dist/app/zudoku-manifest.js +20 -0
  24. package/dist/app/zudoku-manifest.js.map +1 -0
  25. package/dist/cli/cmds/dev.js +5 -0
  26. package/dist/cli/cmds/dev.js.map +1 -1
  27. package/dist/cli/dev/handler.d.ts +1 -0
  28. package/dist/cli/dev/handler.js +3 -1
  29. package/dist/cli/dev/handler.js.map +1 -1
  30. package/dist/config/config.d.ts +15 -16
  31. package/dist/internal.d.ts +1 -0
  32. package/dist/internal.js +2 -0
  33. package/dist/internal.js.map +1 -0
  34. package/dist/lib/authentication/Callback.js +1 -1
  35. package/dist/lib/authentication/Callback.js.map +1 -1
  36. package/dist/lib/authentication/authentication.d.ts +2 -2
  37. package/dist/lib/authentication/hook.d.ts +1 -0
  38. package/dist/lib/authentication/hook.js +1 -0
  39. package/dist/lib/authentication/hook.js.map +1 -1
  40. package/dist/lib/authentication/providers/auth0.js +1 -0
  41. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  42. package/dist/lib/authentication/providers/clerk.js +4 -0
  43. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  44. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  45. package/dist/lib/authentication/providers/openid.js +2 -0
  46. package/dist/lib/authentication/providers/openid.js.map +1 -1
  47. package/dist/lib/authentication/state.d.ts +1 -0
  48. package/dist/lib/authentication/state.js +1 -0
  49. package/dist/lib/authentication/state.js.map +1 -1
  50. package/dist/lib/components/Bootstrap.d.ts +12 -0
  51. package/dist/lib/components/Bootstrap.js +9 -0
  52. package/dist/lib/components/Bootstrap.js.map +1 -0
  53. package/dist/lib/components/DevPortal.d.ts +4 -19
  54. package/dist/lib/components/DevPortal.js +17 -12
  55. package/dist/lib/components/DevPortal.js.map +1 -1
  56. package/dist/lib/components/ErrorPage.d.ts +6 -0
  57. package/dist/lib/components/ErrorPage.js +9 -0
  58. package/dist/lib/components/ErrorPage.js.map +1 -0
  59. package/dist/lib/components/Header.js +3 -3
  60. package/dist/lib/components/Header.js.map +1 -1
  61. package/dist/lib/components/Heading.d.ts +9 -4
  62. package/dist/lib/components/Heading.js +17 -2
  63. package/dist/lib/components/Heading.js.map +1 -1
  64. package/dist/lib/components/InlineCode.d.ts +5 -0
  65. package/dist/lib/components/InlineCode.js +4 -0
  66. package/dist/lib/components/InlineCode.js.map +1 -0
  67. package/dist/lib/components/Layout.js +3 -2
  68. package/dist/lib/components/Layout.js.map +1 -1
  69. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  70. package/dist/lib/components/NotFoundPage.js +12 -0
  71. package/dist/lib/components/NotFoundPage.js.map +1 -0
  72. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  73. package/dist/lib/components/SyntaxHighlight.js +21 -19
  74. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  75. package/dist/lib/components/TopNavigation.d.ts +1 -1
  76. package/dist/lib/components/TopNavigation.js +4 -0
  77. package/dist/lib/components/TopNavigation.js.map +1 -1
  78. package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
  79. package/dist/lib/components/context/DevPortalProvider.js +2 -2
  80. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  81. package/dist/lib/components/index.d.ts +28 -3
  82. package/dist/lib/components/index.js +17 -3
  83. package/dist/lib/components/index.js.map +1 -1
  84. package/dist/lib/core/DevPortalContext.d.ts +33 -3
  85. package/dist/lib/core/DevPortalContext.js +8 -5
  86. package/dist/lib/core/DevPortalContext.js.map +1 -1
  87. package/dist/lib/core/plugins.d.ts +7 -4
  88. package/dist/lib/core/plugins.js +1 -0
  89. package/dist/lib/core/plugins.js.map +1 -1
  90. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  91. package/dist/lib/errors/ErrorAlert.js +8 -0
  92. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  93. package/dist/lib/errors/RouterError.d.ts +1 -0
  94. package/dist/lib/errors/RouterError.js +12 -0
  95. package/dist/lib/errors/RouterError.js.map +1 -0
  96. package/dist/lib/errors/ServerError.d.ts +3 -0
  97. package/dist/lib/errors/ServerError.js +6 -0
  98. package/dist/lib/errors/ServerError.js.map +1 -0
  99. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  100. package/dist/lib/errors/TopLevelError.js +7 -0
  101. package/dist/lib/errors/TopLevelError.js.map +1 -0
  102. package/dist/lib/oas/graphql/index.js +1 -1
  103. package/dist/lib/oas/graphql/index.js.map +1 -1
  104. package/dist/lib/oas/parser/index.d.ts +1 -1
  105. package/dist/lib/oas/parser/index.js +38 -12
  106. package/dist/lib/oas/parser/index.js.map +1 -1
  107. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
  108. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +1 -1
  109. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  110. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
  111. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +38 -0
  112. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  113. package/dist/lib/plugins/{api-key → api-keys}/index.js +32 -9
  114. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  115. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  116. package/dist/lib/plugins/markdown/MdxPage.js +7 -6
  117. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  118. package/dist/lib/plugins/markdown/Toc.js +1 -1
  119. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  120. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  121. package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
  122. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  123. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  124. package/dist/lib/plugins/markdown/index.js +3 -7
  125. package/dist/lib/plugins/markdown/index.js.map +1 -1
  126. package/dist/lib/plugins/openapi/OperationList.js +16 -5
  127. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  128. package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
  129. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  130. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  131. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  132. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  133. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  134. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
  135. package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +5 -5
  136. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  137. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
  138. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  139. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  140. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  141. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  142. package/dist/lib/plugins/openapi/Route.js +8 -0
  143. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  144. package/dist/lib/plugins/openapi/SchemaListView.js +6 -27
  145. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  146. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  147. package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
  148. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  149. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  150. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  151. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  152. package/dist/lib/plugins/openapi/Sidecar.js +10 -8
  153. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  154. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  155. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  156. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  157. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  158. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  159. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  160. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  161. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  162. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  163. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  164. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  165. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  166. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  167. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  168. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  169. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  170. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  171. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  172. package/dist/lib/plugins/openapi/context.js +11 -0
  173. package/dist/lib/plugins/openapi/context.js.map +1 -0
  174. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  175. package/dist/lib/plugins/openapi/index.js +35 -20
  176. package/dist/lib/plugins/openapi/index.js.map +1 -1
  177. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  178. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  179. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  180. package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
  181. package/dist/lib/plugins/openapi/playground/Headers.js +16 -6
  182. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  183. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +1 -1
  184. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -3
  185. package/dist/lib/plugins/openapi/playground/Playground.js +8 -12
  186. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  187. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
  188. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +10 -0
  189. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  190. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  191. package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -1
  192. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  193. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  194. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  195. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  196. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  197. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  198. package/dist/lib/plugins/openapi-worker.js +1 -1
  199. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  200. package/dist/lib/plugins/redirect/index.js +2 -3
  201. package/dist/lib/plugins/redirect/index.js.map +1 -1
  202. package/dist/lib/ui/Callout.js +2 -2
  203. package/dist/lib/ui/Callout.js.map +1 -1
  204. package/dist/lib/ui/button-variants.d.ts +2 -2
  205. package/dist/lib/util/MdxComponents.js +2 -2
  206. package/dist/lib/util/MdxComponents.js.map +1 -1
  207. package/dist/lib/util/groupBy.d.ts +1 -6
  208. package/dist/lib/util/groupBy.js +10 -8
  209. package/dist/lib/util/groupBy.js.map +1 -1
  210. package/dist/lib/util/logInit.d.ts +1 -0
  211. package/dist/lib/util/logInit.js +9 -0
  212. package/dist/lib/util/logInit.js.map +1 -0
  213. package/dist/lib/util/objectEntries.d.ts +4 -0
  214. package/dist/lib/util/objectEntries.js +2 -0
  215. package/dist/lib/util/objectEntries.js.map +1 -0
  216. package/dist/lib/util/renderIf.d.ts +1 -0
  217. package/dist/lib/util/renderIf.js +2 -0
  218. package/dist/lib/util/renderIf.js.map +1 -0
  219. package/dist/vite/build.js +27 -8
  220. package/dist/vite/build.js.map +1 -1
  221. package/dist/vite/config.d.ts +13 -9
  222. package/dist/vite/config.js +98 -57
  223. package/dist/vite/config.js.map +1 -1
  224. package/dist/vite/config.test.js +7 -4
  225. package/dist/vite/config.test.js.map +1 -1
  226. package/dist/vite/dev-server.d.ts +2 -1
  227. package/dist/vite/dev-server.js +34 -13
  228. package/dist/vite/dev-server.js.map +1 -1
  229. package/dist/vite/html.js +5 -5
  230. package/dist/vite/html.js.map +1 -1
  231. package/dist/vite/plugin-api-keys.js +7 -8
  232. package/dist/vite/plugin-api-keys.js.map +1 -1
  233. package/dist/vite/plugin-api.js +8 -19
  234. package/dist/vite/plugin-api.js.map +1 -1
  235. package/dist/vite/plugin-auth.js +5 -6
  236. package/dist/vite/plugin-auth.js.map +1 -1
  237. package/dist/vite/plugin-component.js +3 -2
  238. package/dist/vite/plugin-component.js.map +1 -1
  239. package/dist/vite/plugin-config.d.ts +0 -1
  240. package/dist/vite/plugin-config.js +13 -7
  241. package/dist/vite/plugin-config.js.map +1 -1
  242. package/dist/vite/plugin-custom-css.d.ts +6 -0
  243. package/dist/vite/plugin-custom-css.js +55 -0
  244. package/dist/vite/plugin-custom-css.js.map +1 -0
  245. package/dist/vite/plugin-docs.js +14 -4
  246. package/dist/vite/plugin-docs.js.map +1 -1
  247. package/dist/vite/plugin-docs.test.js +1 -1
  248. package/dist/vite/plugin-docs.test.js.map +1 -1
  249. package/dist/vite/plugin-html.js +1 -9
  250. package/dist/vite/plugin-html.js.map +1 -1
  251. package/dist/vite/plugin-mdx.d.ts +3 -1
  252. package/dist/vite/plugin-mdx.js +4 -4
  253. package/dist/vite/plugin-mdx.js.map +1 -1
  254. package/dist/vite/plugin-redirect.js +9 -9
  255. package/dist/vite/plugin-redirect.js.map +1 -1
  256. package/dist/vite/plugin.js +3 -3
  257. package/dist/vite/plugin.js.map +1 -1
  258. package/dist/vite/prerender.d.ts +1 -0
  259. package/dist/vite/prerender.js +59 -0
  260. package/dist/vite/prerender.js.map +1 -0
  261. package/lib/AnchorLink-DCdBbdqo.js +705 -0
  262. package/lib/AnchorLink-DCdBbdqo.js.map +1 -0
  263. package/lib/DevPortalProvider-C-O1s7mm.js +1081 -0
  264. package/lib/DevPortalProvider-C-O1s7mm.js.map +1 -0
  265. package/lib/Markdown-CGZJUYcj.js +15028 -0
  266. package/lib/Markdown-CGZJUYcj.js.map +1 -0
  267. package/lib/MdxPage-BZLuBOqR.js +190 -0
  268. package/lib/MdxPage-BZLuBOqR.js.map +1 -0
  269. package/lib/OperationList-BEpN70_E.js +5562 -0
  270. package/lib/OperationList-BEpN70_E.js.map +1 -0
  271. package/lib/Route-WiMUalLG.js +13 -0
  272. package/lib/Route-WiMUalLG.js.map +1 -0
  273. package/lib/Select-BQ9-3iTJ.js +4571 -0
  274. package/lib/Select-BQ9-3iTJ.js.map +1 -0
  275. package/lib/Spinner-C1L_TK5f.js +182 -0
  276. package/lib/Spinner-C1L_TK5f.js.map +1 -0
  277. package/lib/_commonjsHelpers-BkfeUUK-.js +1 -0
  278. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  279. package/lib/assets/index-BPdJm2ty.js +1 -0
  280. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  281. package/lib/assets/{worker-BCcpCNJ7.js → worker-BjPv-hjP.js} +10742 -10318
  282. package/lib/assets/worker-BjPv-hjP.js.map +1 -0
  283. package/lib/context-_fYfJFgk.js +14 -0
  284. package/lib/context-_fYfJFgk.js.map +1 -0
  285. package/lib/createWorkerClient-TWecYOlx.js +16698 -0
  286. package/lib/createWorkerClient-TWecYOlx.js.map +1 -0
  287. package/lib/hook-SM2dMVmI.js +77 -0
  288. package/lib/hook-SM2dMVmI.js.map +1 -0
  289. package/lib/index-CtLNbq0d.js +412 -0
  290. package/lib/index-CtLNbq0d.js.map +1 -0
  291. package/lib/index-PvQa9XLl.js +724 -0
  292. package/lib/index-PvQa9XLl.js.map +1 -0
  293. package/lib/index-pI9JkN46.js +4765 -0
  294. package/lib/index-pI9JkN46.js.map +1 -0
  295. package/lib/jsx-runtime-DLtUZ5Ve.js +1526 -0
  296. package/lib/jsx-runtime-DLtUZ5Ve.js.map +1 -0
  297. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  298. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  299. package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
  300. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  301. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  302. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  303. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  304. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  305. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  306. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  307. package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
  308. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  309. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  310. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  311. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  312. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  313. package/lib/router-BkOLuJlq.js +2973 -0
  314. package/lib/router-BkOLuJlq.js.map +1 -0
  315. package/lib/slugify-DbLhpSPt.js +28 -0
  316. package/lib/slugify-DbLhpSPt.js.map +1 -0
  317. package/lib/{state-oycsxkHz.js → state-Ds_OxRHP.js} +20 -18
  318. package/lib/state-Ds_OxRHP.js.map +1 -0
  319. package/lib/util-Cgie7wjb.js +41 -0
  320. package/lib/util-Cgie7wjb.js.map +1 -0
  321. package/lib/zudoku.auth-auth0.js +3 -1
  322. package/lib/zudoku.auth-auth0.js.map +1 -0
  323. package/lib/zudoku.auth-clerk.js +11 -8
  324. package/lib/zudoku.auth-clerk.js.map +1 -0
  325. package/lib/zudoku.auth-openid.js +5 -2
  326. package/lib/zudoku.auth-openid.js.map +1 -0
  327. package/lib/zudoku.components.js +800 -464
  328. package/lib/zudoku.components.js.map +1 -0
  329. package/lib/zudoku.openapi-worker.js +3 -223
  330. package/lib/zudoku.openapi-worker.js.map +1 -0
  331. package/lib/zudoku.plugin-api-keys.js +287 -0
  332. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  333. package/lib/zudoku.plugin-markdown.js +49 -0
  334. package/lib/zudoku.plugin-markdown.js.map +1 -0
  335. package/lib/zudoku.plugin-openapi.js +9 -0
  336. package/lib/zudoku.plugin-openapi.js.map +1 -0
  337. package/lib/zudoku.plugin-redirect.js +11 -0
  338. package/lib/zudoku.plugin-redirect.js.map +1 -0
  339. package/package.json +33 -15
  340. package/src/app/App.tsx +0 -40
  341. package/src/app/demo-cdn.html +26 -0
  342. package/src/app/demo.html +18 -0
  343. package/src/app/demo.tsx +40 -0
  344. package/src/app/entry.client.tsx +47 -0
  345. package/src/app/entry.server.tsx +158 -0
  346. package/src/app/main.css +74 -0
  347. package/src/app/main.tsx +71 -15
  348. package/src/app/standalone.html +20 -0
  349. package/src/app/standalone.tsx +46 -0
  350. package/src/app/tailwind.ts +2 -6
  351. package/src/app/zudoku-manifest.ts +22 -0
  352. package/src/lib/authentication/Callback.tsx +1 -1
  353. package/src/lib/authentication/authentication.ts +2 -5
  354. package/src/lib/authentication/hook.ts +1 -0
  355. package/src/lib/authentication/providers/auth0.tsx +1 -0
  356. package/src/lib/authentication/providers/clerk.tsx +3 -0
  357. package/src/lib/authentication/providers/openid.tsx +3 -1
  358. package/src/lib/authentication/state.ts +2 -0
  359. package/src/lib/components/Bootstrap.tsx +37 -0
  360. package/src/lib/components/DevPortal.tsx +41 -56
  361. package/src/lib/components/ErrorPage.tsx +28 -0
  362. package/src/lib/components/Header.tsx +7 -7
  363. package/src/lib/components/Heading.tsx +26 -7
  364. package/src/lib/components/InlineCode.tsx +19 -0
  365. package/src/lib/components/Layout.tsx +9 -7
  366. package/src/lib/components/NotFoundPage.tsx +39 -0
  367. package/src/lib/components/SyntaxHighlight.tsx +27 -19
  368. package/src/lib/components/TopNavigation.tsx +5 -0
  369. package/src/lib/components/context/DevPortalProvider.ts +2 -2
  370. package/src/lib/components/index.ts +21 -3
  371. package/src/lib/core/DevPortalContext.ts +42 -13
  372. package/src/lib/core/plugins.ts +10 -5
  373. package/src/lib/errors/ErrorAlert.tsx +21 -0
  374. package/src/lib/errors/RouterError.tsx +13 -0
  375. package/src/lib/errors/ServerError.tsx +5 -0
  376. package/src/lib/errors/TopLevelError.tsx +8 -0
  377. package/src/lib/oas/graphql/index.ts +2 -2
  378. package/src/lib/oas/parser/index.ts +41 -20
  379. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -8
  380. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +21 -14
  381. package/src/lib/plugins/{api-key → api-keys}/index.tsx +43 -9
  382. package/src/lib/plugins/markdown/MdxPage.tsx +52 -35
  383. package/src/lib/plugins/markdown/Toc.tsx +1 -1
  384. package/src/lib/plugins/markdown/generateRoutes.tsx +16 -6
  385. package/src/lib/plugins/markdown/index.tsx +10 -7
  386. package/src/lib/plugins/openapi/OperationList.tsx +40 -4
  387. package/src/lib/plugins/openapi/OperationListItem.tsx +69 -42
  388. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  389. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  390. package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +4 -4
  391. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
  392. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
  393. package/src/lib/plugins/openapi/Route.tsx +21 -0
  394. package/src/lib/plugins/openapi/SchemaListView.tsx +23 -192
  395. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
  396. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  397. package/src/lib/plugins/openapi/Sidecar.tsx +15 -10
  398. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  399. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  400. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  401. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -1
  402. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  403. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  404. package/src/lib/plugins/openapi/context.tsx +16 -0
  405. package/src/lib/plugins/openapi/index.tsx +59 -52
  406. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  407. package/src/lib/plugins/openapi/playground/Headers.tsx +60 -33
  408. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  409. package/src/lib/plugins/openapi/playground/Playground.tsx +158 -193
  410. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +34 -0
  411. package/src/lib/plugins/openapi/playground/QueryParams.tsx +7 -2
  412. package/src/lib/plugins/openapi/playground/createUrl.ts +1 -1
  413. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  414. package/src/lib/plugins/openapi-worker.ts +1 -1
  415. package/src/lib/plugins/redirect/index.tsx +2 -2
  416. package/src/lib/ui/Callout.tsx +4 -4
  417. package/src/lib/util/MdxComponents.tsx +2 -12
  418. package/src/lib/util/groupBy.ts +7 -12
  419. package/src/lib/util/logInit.ts +9 -0
  420. package/src/lib/util/objectEntries.ts +5 -0
  421. package/src/lib/util/renderIf.ts +4 -0
  422. package/dist/lib/components/Link.d.ts +0 -1
  423. package/dist/lib/components/Link.js +0 -2
  424. package/dist/lib/components/Link.js.map +0 -1
  425. package/dist/lib/components/Router.d.ts +0 -4
  426. package/dist/lib/components/Router.js +0 -20
  427. package/dist/lib/components/Router.js.map +0 -1
  428. package/dist/lib/core/helmet.d.ts +0 -4
  429. package/dist/lib/core/helmet.js +0 -5
  430. package/dist/lib/core/helmet.js.map +0 -1
  431. package/dist/lib/core/icons.d.ts +0 -1
  432. package/dist/lib/core/icons.js +0 -2
  433. package/dist/lib/core/icons.js.map +0 -1
  434. package/dist/lib/core/router.d.ts +0 -1
  435. package/dist/lib/core/router.js +0 -2
  436. package/dist/lib/core/router.js.map +0 -1
  437. package/dist/lib/plugins/api-key/CreateApiKey.d.ts +0 -5
  438. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  439. package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +0 -5
  440. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  441. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  442. package/dist/lib/plugins/api-key/index.js.map +0 -1
  443. package/dist/lib/plugins/index.d.ts +0 -4
  444. package/dist/lib/plugins/index.js +0 -5
  445. package/dist/lib/plugins/index.js.map +0 -1
  446. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  447. package/dist/lib/plugins/openapi/Select.js +0 -5
  448. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  449. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  450. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  451. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  452. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  453. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  454. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  455. package/dist/vite/common.d.ts +0 -1
  456. package/dist/vite/common.js +0 -5
  457. package/dist/vite/common.js.map +0 -1
  458. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  459. package/dist/vite/plugin-openapi-worker.js +0 -28
  460. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  461. package/lib/Spinner-7LezPqGn.js +0 -8393
  462. package/lib/clerk-Wslx_mPo.js +0 -19685
  463. package/lib/index-DNx3xWa2.js +0 -3461
  464. package/lib/urql-DMlBWUKL.js +0 -1591
  465. package/lib/zudoku.plugins.js +0 -19863
  466. package/src/lib/components/Link.tsx +0 -1
  467. package/src/lib/components/Router.tsx +0 -28
  468. package/src/lib/core/helmet.ts +0 -5
  469. package/src/lib/core/icons.tsx +0 -1
  470. package/src/lib/core/router.tsx +0 -1
  471. package/src/lib/plugins/index.ts +0 -4
  472. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  473. /package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +0 -0
  474. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
@@ -0,0 +1,1081 @@
1
+ var At = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var ct = (e, t, s) => t.has(e) || At("Cannot " + s);
5
+ var r = (e, t, s) => (ct(e, t, "read from private field"), s ? s.call(e) : t.get(e)), f = (e, t, s) => t.has(e) ? At("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), h = (e, t, s, i) => (ct(e, t, "write to private field"), i ? i.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 re, useContext as ie } from "react";
8
+ import { j as ne, u as ae } from "./jsx-runtime-DLtUZ5Ve.js";
9
+ import { m as oe } from "./router-BkOLuJlq.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 Ne(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 A(e, t) {
42
+ return typeof e == "function" ? e(t) : e;
43
+ }
44
+ function Ke(e, t) {
45
+ const {
46
+ type: s = "all",
47
+ exact: i,
48
+ fetchStatus: n,
49
+ predicate: c,
50
+ queryKey: o,
51
+ stale: l
52
+ } = e;
53
+ if (o) {
54
+ if (i) {
55
+ if (t.queryHash !== ue(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 _e(e, t) {
68
+ const { exact: s, status: i, 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 !(i && t.state.status !== i || n && !n(t));
79
+ }
80
+ function ue(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((i, n) => (i[n] = s[n], i), {}) : 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 i = s ? e : Object.keys(e), n = i.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 && i.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 he(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 Be(e, t, s = 0) {
139
+ const i = [...e, t];
140
+ return s && i.length > s ? i.slice(1) : i;
141
+ }
142
+ function Ge(e, t, s = 0) {
143
+ const i = [t, ...e];
144
+ return s && i.length > s ? i.slice(0, -1) : i;
145
+ }
146
+ var bt = Symbol(), ce = (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, M, z, kt, le = (kt = class extends Dt {
149
+ constructor() {
150
+ super();
151
+ f(this, N);
152
+ f(this, M);
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
+ r(this, M) || this.setEventListener(r(this, z));
165
+ }
166
+ onUnsubscribe() {
167
+ var t;
168
+ this.hasListeners() || ((t = r(this, M)) == null || t.call(this), h(this, M, void 0));
169
+ }
170
+ setEventListener(t) {
171
+ var s;
172
+ h(this, z, t), (s = r(this, M)) == null || s.call(this), h(this, M, t((i) => {
173
+ typeof i == "boolean" ? this.setFocused(i) : this.onFocus();
174
+ }));
175
+ }
176
+ setFocused(t) {
177
+ r(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 r(this, N) == "boolean" ? r(this, N) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
188
+ }
189
+ }, N = new WeakMap(), M = new WeakMap(), z = new WeakMap(), kt), Ht = new le(), $, k, W, Lt, de = (Lt = class extends Dt {
190
+ constructor() {
191
+ super();
192
+ f(this, $, !0);
193
+ f(this, k);
194
+ f(this, W);
195
+ h(this, W, (t) => {
196
+ if (!st && window.addEventListener) {
197
+ const s = () => t(!0), i = () => t(!1);
198
+ return window.addEventListener("online", s, !1), window.addEventListener("offline", i, !1), () => {
199
+ window.removeEventListener("online", s), window.removeEventListener("offline", i);
200
+ };
201
+ }
202
+ });
203
+ }
204
+ onSubscribe() {
205
+ r(this, k) || this.setEventListener(r(this, W));
206
+ }
207
+ onUnsubscribe() {
208
+ var t;
209
+ this.hasListeners() || ((t = r(this, k)) == null || t.call(this), h(this, k, void 0));
210
+ }
211
+ setEventListener(t) {
212
+ var s;
213
+ h(this, W, t), (s = r(this, k)) == null || s.call(this), h(this, k, t(this.setOnline.bind(this)));
214
+ }
215
+ setOnline(t) {
216
+ r(this, $) !== t && (h(this, $, t), this.listeners.forEach((i) => {
217
+ i(t);
218
+ }));
219
+ }
220
+ isOnline() {
221
+ return r(this, $);
222
+ }
223
+ }, $ = new WeakMap(), k = new WeakMap(), W = new WeakMap(), Lt), Vt = new de();
224
+ function fe(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 ye(e) {
239
+ let t = !1, s = 0, i = !1, n, c, o;
240
+ const l = new Promise((g, S) => {
241
+ c = g, o = S;
242
+ }), b = (g) => {
243
+ var S;
244
+ i || (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
+ i || (i = !0, (S = e.onSuccess) == null || S.call(e, g), n == null || n(), c(g));
252
+ }, O = (g) => {
253
+ var S;
254
+ i || (i = !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
+ (i || a()) && g(D);
259
+ }, (S = e.onPause) == null || S.call(e);
260
+ }).then(() => {
261
+ var g;
262
+ n = void 0, i || (g = e.onContinue) == null || g.call(e);
263
+ }), Q = () => {
264
+ if (i)
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 (i)
276
+ return;
277
+ const j = e.retry ?? (st ? 0 : 3), V = e.retryDelay ?? fe, 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), he(qt).then(() => a() ? void 0 : U()).then(() => {
283
+ t ? O(D) : Q();
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() ? Q() : U().then(Q), l)
295
+ };
296
+ }
297
+ function pe() {
298
+ let e = [], t = 0, s = (u) => {
299
+ u();
300
+ }, i = (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
+ i(() => {
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
+ i = u;
341
+ },
342
+ setScheduler: c
343
+ };
344
+ }
345
+ var Tt = pe(), K, Nt, ve = (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
+ r(this, K) && (clearTimeout(r(this, K)), h(this, K, void 0));
365
+ }
366
+ }, K = new WeakMap(), Nt), J, X, P, C, it, _, q, x, Kt, He = (Kt = class extends ve {
367
+ constructor(t) {
368
+ super();
369
+ f(this, q);
370
+ f(this, J);
371
+ f(this, X);
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, J, t.state || me(this.options)), this.state = r(this, J), this.scheduleGc();
377
+ }
378
+ get meta() {
379
+ return this.options.meta;
380
+ }
381
+ get promise() {
382
+ var t;
383
+ return (t = r(this, C)) == null ? void 0 : t.promise;
384
+ }
385
+ setOptions(t) {
386
+ this.options = { ...r(this, it), ...t }, this.updateGcTime(this.options.gcTime);
387
+ }
388
+ optionalRemove() {
389
+ !this.observers.length && this.state.fetchStatus === "idle" && r(this, P).remove(this);
390
+ }
391
+ setData(t, s) {
392
+ const i = mt(this.state.data, t, this.options);
393
+ return v(this, q, x).call(this, {
394
+ data: i,
395
+ type: "success",
396
+ dataUpdatedAt: s == null ? void 0 : s.updatedAt,
397
+ manual: s == null ? void 0 : s.manual
398
+ }), i;
399
+ }
400
+ setState(t, s) {
401
+ v(this, q, x).call(this, { type: "setState", state: t, setStateOptions: s });
402
+ }
403
+ cancel(t) {
404
+ var i, n;
405
+ const s = (i = r(this, C)) == null ? void 0 : i.promise;
406
+ return (n = r(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(r(this, J));
413
+ }
414
+ isActive() {
415
+ return this.observers.some(
416
+ (t) => A(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((i) => i.shouldFetchOnWindowFocus());
433
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, C)) == null || s.continue();
434
+ }
435
+ onOnline() {
436
+ var s;
437
+ const t = this.observers.find((i) => i.shouldFetchOnReconnect());
438
+ t == null || t.refetch({ cancelRefetch: !1 }), (s = r(this, C)) == null || s.continue();
439
+ }
440
+ addObserver(t) {
441
+ this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), r(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 || (r(this, C) && (r(this, _) ? r(this, C).cancel({ revert: !0 }) : r(this, C).cancelRetry()), this.scheduleGc()), r(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 (r(this, C))
458
+ return r(this, C).continueRetry(), r(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 i = new AbortController(), n = (a) => {
468
+ Object.defineProperty(a, "signal", {
469
+ enumerable: !0,
470
+ get: () => (h(this, _, !0), i.signal)
471
+ });
472
+ }, c = () => {
473
+ const a = ce(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, X, 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 = r(this, P).config).onError) == null || p.call(
499
+ u,
500
+ a,
501
+ this
502
+ ), (U = (O = r(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, ye({
510
+ initialPromise: s == null ? void 0 : s.initialPromise,
511
+ fn: o.fetchFn,
512
+ abort: i.abort.bind(i),
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 = r(this, P).config).onSuccess) == null || p.call(u, a, this), (U = (O = r(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
+ })), r(this, C).start();
543
+ }
544
+ }, J = new WeakMap(), X = new WeakMap(), P = new WeakMap(), C = new WeakMap(), it = new WeakMap(), _ = new WeakMap(), q = new WeakSet(), x = function(t) {
545
+ const s = (i) => {
546
+ switch (t.type) {
547
+ case "failed":
548
+ return {
549
+ ...i,
550
+ fetchFailureCount: t.failureCount,
551
+ fetchFailureReason: t.error
552
+ };
553
+ case "pause":
554
+ return {
555
+ ...i,
556
+ fetchStatus: "paused"
557
+ };
558
+ case "continue":
559
+ return {
560
+ ...i,
561
+ fetchStatus: "fetching"
562
+ };
563
+ case "fetch":
564
+ return {
565
+ ...i,
566
+ ...Wt(i.data, this.options),
567
+ fetchMeta: t.meta ?? null
568
+ };
569
+ case "success":
570
+ return {
571
+ ...i,
572
+ data: t.data,
573
+ dataUpdateCount: i.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 && r(this, X) ? { ...r(this, X), fetchStatus: "idle" } : {
587
+ ...i,
588
+ error: n,
589
+ errorUpdateCount: i.errorUpdateCount + 1,
590
+ errorUpdatedAt: Date.now(),
591
+ fetchFailureCount: i.fetchFailureCount + 1,
592
+ fetchFailureReason: n,
593
+ fetchStatus: "idle",
594
+ status: "error"
595
+ };
596
+ case "invalidate":
597
+ return {
598
+ ...i,
599
+ isInvalidated: !0
600
+ };
601
+ case "setState":
602
+ return {
603
+ ...i,
604
+ ...t.state
605
+ };
606
+ }
607
+ };
608
+ this.state = s(this.state), Tt.batch(() => {
609
+ this.observers.forEach((i) => {
610
+ i.onQueryUpdate();
611
+ }), r(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 me(e) {
626
+ const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, s = t !== void 0, i = s ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
627
+ return {
628
+ data: t,
629
+ dataUpdateCount: 0,
630
+ dataUpdatedAt: s ? i ?? 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, Y, I, at, Z, tt, G, H, L, et, y, rt, gt, Rt, St, Ct, wt, Ft, Ot, Xt, _t, Jt = (_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, Y);
652
+ f(this, I);
653
+ f(this, at);
654
+ f(this, Z);
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 && (r(this, d).addObserver(this), jt(r(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
+ r(this, d),
676
+ this.options,
677
+ this.options.refetchOnReconnect
678
+ );
679
+ }
680
+ shouldFetchOnWindowFocus() {
681
+ return Et(
682
+ r(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), r(this, d).removeObserver(this);
689
+ }
690
+ setOptions(t, s) {
691
+ const i = this.options, n = r(this, d);
692
+ if (this.options = r(this, E).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof A(this.options.enabled, r(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), r(this, d).setOptions(this.options), i._defaulted && !pt(this.options, i) && r(this, E).getQueryCache().notify({
697
+ type: "observerOptionsUpdated",
698
+ query: r(this, d),
699
+ observer: this
700
+ });
701
+ const c = this.hasListeners();
702
+ c && Mt(
703
+ r(this, d),
704
+ n,
705
+ this.options,
706
+ i
707
+ ) && v(this, y, rt).call(this), this.updateResult(s), c && (r(this, d) !== n || A(this.options.enabled, r(this, d)) !== A(i.enabled, r(this, d)) || ut(this.options.staleTime, r(this, d)) !== ut(i.staleTime, r(this, d))) && v(this, y, gt).call(this);
708
+ const o = v(this, y, Rt).call(this);
709
+ c && (r(this, d) !== n || A(this.options.enabled, r(this, d)) !== A(i.enabled, r(this, d)) || o !== r(this, L)) && v(this, y, St).call(this, o);
710
+ }
711
+ getOptimisticResult(t) {
712
+ const s = r(this, E).getQueryCache().build(r(this, E), t), i = this.createResult(s, t);
713
+ return ge(this, i) && (h(this, F, i), h(this, Y, this.options), h(this, B, r(this, d).state)), i;
714
+ }
715
+ getCurrentResult() {
716
+ return r(this, F);
717
+ }
718
+ trackResult(t, s) {
719
+ const i = {};
720
+ return Object.keys(t).forEach((n) => {
721
+ Object.defineProperty(i, n, {
722
+ configurable: !1,
723
+ enumerable: !0,
724
+ get: () => (this.trackProp(n), s == null || s(n), t[n])
725
+ });
726
+ }), i;
727
+ }
728
+ trackProp(t) {
729
+ r(this, et).add(t);
730
+ }
731
+ getCurrentQuery() {
732
+ return r(this, d);
733
+ }
734
+ refetch({ ...t } = {}) {
735
+ return this.fetch({
736
+ ...t
737
+ });
738
+ }
739
+ fetchOptimistic(t) {
740
+ const s = r(this, E).defaultQueryOptions(t), i = r(this, E).getQueryCache().build(r(this, E), s);
741
+ return i.isFetchingOptimistic = !0, i.fetch().then(() => this.createResult(i, s));
742
+ }
743
+ fetch(t) {
744
+ return v(this, y, rt).call(this, {
745
+ ...t,
746
+ cancelRefetch: t.cancelRefetch ?? !0
747
+ }).then(() => (this.updateResult(), r(this, F)));
748
+ }
749
+ createResult(t, s) {
750
+ var ot;
751
+ const i = r(this, d), n = this.options, c = r(this, F), o = r(this, B), l = r(this, Y), R = t !== i ? t.state : r(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), se = w && Mt(t, i, s, n);
755
+ (ht || se) && (a = {
756
+ ...a,
757
+ ...Wt(m.data, t.options)
758
+ }), s._optimisticResults === "isRestoring" && (a.fetchStatus = "idle");
759
+ }
760
+ let { error: O, errorUpdatedAt: U, status: Q } = a;
761
+ if (s.select && a.data !== void 0)
762
+ if (c && a.data === (o == null ? void 0 : o.data) && s.select === r(this, at))
763
+ p = r(this, Z);
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, Z, 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 && Q === "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 = r(this, tt)) == null ? void 0 : ot.state.data,
778
+ r(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 && (Q = "success", p = mt(
786
+ c == null ? void 0 : c.data,
787
+ w,
788
+ s
789
+ ), u = !0);
790
+ }
791
+ r(this, I) && (O = r(this, I), p = r(this, Z), U = Date.now(), Q = "error");
792
+ const g = a.fetchStatus === "fetching", S = Q === "pending", D = Q === "error", j = S && g, V = p !== void 0;
793
+ return {
794
+ status: Q,
795
+ fetchStatus: a.fetchStatus,
796
+ isPending: S,
797
+ isSuccess: Q === "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 = r(this, F), i = this.createResult(r(this, d), this.options);
822
+ if (h(this, B, r(this, d).state), h(this, Y, this.options), r(this, B).data !== void 0 && h(this, tt, r(this, d)), pt(i, s))
823
+ return;
824
+ h(this, F, i);
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 && !r(this, et).size)
830
+ return !0;
831
+ const b = new Set(
832
+ l ?? r(this, et)
833
+ );
834
+ return this.options.throwOnError && b.add("error"), Object.keys(r(this, F)).some((R) => {
835
+ const m = R;
836
+ return r(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, Xt).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(), Y = new WeakMap(), I = new WeakMap(), at = new WeakMap(), Z = 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 = r(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
+ r(this, d)
856
+ );
857
+ if (st || r(this, F).isStale || !ft(t))
858
+ return;
859
+ const i = Bt(r(this, F).dataUpdatedAt, t) + 1;
860
+ h(this, G, setTimeout(() => {
861
+ r(this, F).isStale || this.updateResult();
862
+ }, i));
863
+ }, Rt = function() {
864
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(r(this, d)) : this.options.refetchInterval) ?? !1;
865
+ }, St = function(t) {
866
+ v(this, y, Ft).call(this), h(this, L, t), !(st || A(this.options.enabled, r(this, d)) === !1 || !ft(r(this, L)) || r(this, L) === 0) && h(this, H, setInterval(() => {
867
+ (this.options.refetchIntervalInBackground || Ht.isFocused()) && v(this, y, rt).call(this);
868
+ }, r(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
+ r(this, G) && (clearTimeout(r(this, G)), h(this, G, void 0));
873
+ }, Ft = function() {
874
+ r(this, H) && (clearInterval(r(this, H)), h(this, H, void 0));
875
+ }, Ot = function() {
876
+ const t = r(this, E).getQueryCache().build(r(this, E), this.options);
877
+ if (t === r(this, d))
878
+ return;
879
+ const s = r(this, d);
880
+ h(this, d, t), h(this, nt, t.state), this.hasListeners() && (s == null || s.removeObserver(this), t.addObserver(this));
881
+ }, Xt = function(t) {
882
+ Tt.batch(() => {
883
+ t.listeners && this.listeners.forEach((s) => {
884
+ s(r(this, F));
885
+ }), r(this, E).getQueryCache().notify({
886
+ query: r(this, d),
887
+ type: "observerResultsUpdated"
888
+ });
889
+ });
890
+ }, _t);
891
+ function be(e, t) {
892
+ return A(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
893
+ }
894
+ function jt(e, t) {
895
+ return be(e, t) || e.state.data !== void 0 && Et(e, t, t.refetchOnMount);
896
+ }
897
+ function Et(e, t, s) {
898
+ if (A(t.enabled, e) !== !1) {
899
+ const i = typeof s == "function" ? s(e) : s;
900
+ return i === "always" || i !== !1 && Ut(e, t);
901
+ }
902
+ return !1;
903
+ }
904
+ function Mt(e, t, s, i) {
905
+ return (e !== t || A(i.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && Ut(e, s);
906
+ }
907
+ function Ut(e, t) {
908
+ return A(t.enabled, e) !== !1 && e.isStaleByTime(ut(t.staleTime, e));
909
+ }
910
+ function ge(e, t) {
911
+ return !pt(e.getCurrentResult(), t);
912
+ }
913
+ var Yt = T.createContext(
914
+ void 0
915
+ ), Re = (e) => {
916
+ const t = T.useContext(Yt);
917
+ if (!t)
918
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
919
+ return t;
920
+ }, Ve = ({
921
+ client: e,
922
+ children: t
923
+ }) => (T.useEffect(() => (e.mount(), () => {
924
+ e.unmount();
925
+ }), [e]), /* @__PURE__ */ ne.jsx(Yt.Provider, { value: e, children: t })), Zt = T.createContext(!1), Se = () => T.useContext(Zt);
926
+ Zt.Provider;
927
+ function Ce() {
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 we = T.createContext(Ce()), Fe = () => T.useContext(we);
940
+ function Oe(e, t) {
941
+ return typeof e == "function" ? e(...t) : !!e;
942
+ }
943
+ function ze() {
944
+ }
945
+ var Ee = (e, t) => {
946
+ (e.suspense || e.throwOnError) && (t.isReset() || (e.retryOnMount = !1));
947
+ }, De = (e) => {
948
+ T.useEffect(() => {
949
+ e.clearReset();
950
+ }, [e]);
951
+ }, Pe = ({
952
+ result: e,
953
+ errorResetBoundary: t,
954
+ throwOnError: s,
955
+ query: i
956
+ }) => e.isError && !t.isReset() && !e.isFetching && i && Oe(s, [e.error, i]), Te = (e, t) => t.state.data === void 0, Ue = (e) => {
957
+ e.suspense && typeof e.staleTime != "number" && (e.staleTime = 1e3);
958
+ }, Qe = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, qe = (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 i = Re(), n = Se(), c = Fe(), o = i.defaultQueryOptions(e);
968
+ (m = (R = i.getDefaultOptions().queries) == null ? void 0 : R._experimental_beforeQuery) == null || m.call(
969
+ R,
970
+ o
971
+ ), o._optimisticResults = n ? "isRestoring" : "optimistic", Ue(o), Ee(o, c), De(c);
972
+ const [l] = T.useState(
973
+ () => new t(
974
+ i,
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]), Qe(o, b))
992
+ throw qe(o, l, c);
993
+ if (Pe({
994
+ result: b,
995
+ errorResetBoundary: c,
996
+ throwOnError: o.throwOnError,
997
+ query: i.getQueryCache().get(o.queryHash)
998
+ }))
999
+ throw b.error;
1000
+ return (u = (a = i.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, Jt);
1008
+ }
1009
+ function Ie(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: Te,
1016
+ placeholderData: void 0
1017
+ },
1018
+ Jt
1019
+ );
1020
+ }
1021
+ const ee = re(
1022
+ void 0
1023
+ ), $e = ee.Provider, Qt = () => {
1024
+ const e = ie(ee);
1025
+ if (!e)
1026
+ throw new Error("useDevPortal must be used within a DevPortalProvider.");
1027
+ return e;
1028
+ }, We = () => {
1029
+ const { getApiIdentities: e } = Qt();
1030
+ return Ae({
1031
+ queryFn: e,
1032
+ queryKey: ["api-identities"]
1033
+ });
1034
+ }, xe = () => {
1035
+ const { navigation: e } = Qt(), t = ae();
1036
+ return e.find(
1037
+ (s) => oe({ path: s.path, end: !1 }, t.pathname)
1038
+ );
1039
+ }, Je = () => {
1040
+ const { getNavigation: e } = Qt(), t = xe(), s = (t == null ? void 0 : t.path) ?? "";
1041
+ return Ie({
1042
+ queryFn: async () => ({
1043
+ items: [...(t == null ? void 0 : t.categories) ?? [], ...await e(s)],
1044
+ currentTopNavItem: t
1045
+ }),
1046
+ queryKey: ["navigation", s]
1047
+ });
1048
+ };
1049
+ export {
1050
+ $e as D,
1051
+ He as Q,
1052
+ ve as R,
1053
+ Dt as S,
1054
+ Qt as a,
1055
+ Re as b,
1056
+ Ie as c,
1057
+ ye as d,
1058
+ _e as e,
1059
+ dt as f,
1060
+ ce as g,
1061
+ ue as h,
1062
+ Ge as i,
1063
+ Be as j,
1064
+ Ht as k,
1065
+ Ne as l,
1066
+ Ke as m,
1067
+ Tt as n,
1068
+ Vt as o,
1069
+ yt as p,
1070
+ Pt as q,
1071
+ ut as r,
1072
+ bt as s,
1073
+ Ve as t,
1074
+ xe as u,
1075
+ Je as v,
1076
+ pt as w,
1077
+ ze as x,
1078
+ Oe as y,
1079
+ We as z
1080
+ };
1081
+ //# sourceMappingURL=DevPortalProvider-C-O1s7mm.js.map