zudoku 0.44.1 → 0.45.1

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 (576) hide show
  1. package/cli.js +8 -2
  2. package/dist/app/entry.client.js +34 -21
  3. package/dist/app/entry.client.js.map +1 -1
  4. package/dist/app/main.js +7 -0
  5. package/dist/app/main.js.map +1 -1
  6. package/dist/config/validators/common.d.ts +420 -288
  7. package/dist/config/validators/common.js +10 -0
  8. package/dist/config/validators/common.js.map +1 -1
  9. package/dist/config/validators/validate.d.ts +161 -108
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/lib/components/Footer.js +2 -2
  14. package/dist/lib/components/Footer.js.map +1 -1
  15. package/dist/lib/components/Header.js +1 -1
  16. package/dist/lib/components/Header.js.map +1 -1
  17. package/dist/lib/components/Markdown.d.ts +3 -1
  18. package/dist/lib/components/Markdown.js +8 -14
  19. package/dist/lib/components/Markdown.js.map +1 -1
  20. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  21. package/dist/lib/components/context/ZudokuContext.js +2 -3
  22. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  23. package/dist/lib/components/index.d.ts +2 -1
  24. package/dist/lib/core/ZudokuContext.d.ts +8 -0
  25. package/dist/lib/core/ZudokuContext.js.map +1 -1
  26. package/dist/lib/errors/ErrorAlert.js +1 -1
  27. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  28. package/dist/lib/oas/graphql/circular.js +23 -18
  29. package/dist/lib/oas/graphql/circular.js.map +1 -1
  30. package/dist/lib/oas/parser/index.d.ts +3 -0
  31. package/dist/lib/oas/parser/index.js +6 -1
  32. package/dist/lib/oas/parser/index.js.map +1 -1
  33. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  34. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  35. package/dist/lib/plugins/openapi/ParamInfos.js +3 -1
  36. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  37. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  38. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  39. package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
  40. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  41. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -3
  42. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  43. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +4 -1
  44. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  45. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +11 -12
  46. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  47. package/dist/lib/plugins/openapi/schema/utils.d.ts +5 -1
  48. package/dist/lib/plugins/openapi/schema/utils.js +9 -5
  49. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  50. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
  51. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +4 -0
  52. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  53. package/dist/lib/shiki.d.ts +35 -0
  54. package/dist/lib/shiki.js +103 -0
  55. package/dist/lib/shiki.js.map +1 -0
  56. package/dist/lib/ui/Callout.js +1 -1
  57. package/dist/lib/ui/Callout.js.map +1 -1
  58. package/dist/lib/ui/CodeBlock.d.ts +16 -0
  59. package/dist/lib/ui/CodeBlock.js +18 -0
  60. package/dist/lib/ui/CodeBlock.js.map +1 -0
  61. package/dist/lib/ui/SyntaxHighlight.d.ts +10 -15
  62. package/dist/lib/ui/SyntaxHighlight.js +12 -60
  63. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  64. package/dist/lib/util/MdxComponents.d.ts +9 -3
  65. package/dist/lib/util/MdxComponents.js +9 -10
  66. package/dist/lib/util/MdxComponents.js.map +1 -1
  67. package/dist/vite/api/SchemaManager.js +2 -0
  68. package/dist/vite/api/SchemaManager.js.map +1 -1
  69. package/dist/vite/config.js +34 -0
  70. package/dist/vite/config.js.map +1 -1
  71. package/dist/vite/plugin-mdx.js +4 -11
  72. package/dist/vite/plugin-mdx.js.map +1 -1
  73. package/dist/vite/plugin-shiki-register.d.ts +3 -0
  74. package/dist/vite/plugin-shiki-register.js +38 -0
  75. package/dist/vite/plugin-shiki-register.js.map +1 -0
  76. package/dist/vite/plugin.js +2 -0
  77. package/dist/vite/plugin.js.map +1 -1
  78. package/lib/AuthenticationPlugin-BTJ37DKg.js +90 -0
  79. package/lib/{AuthenticationPlugin-BlJsiGuX.js.map → AuthenticationPlugin-BTJ37DKg.js.map} +1 -1
  80. package/lib/{Button-BBNrKpQd.js → Button-Bdk_Ij3U.js} +3 -3
  81. package/lib/{Button-BBNrKpQd.js.map → Button-Bdk_Ij3U.js.map} +1 -1
  82. package/lib/{Callout-D3Ja4OPX.js → Callout-XadUe37J.js} +12 -12
  83. package/lib/{Callout-D3Ja4OPX.js.map → Callout-XadUe37J.js.map} +1 -1
  84. package/lib/{Card-BtheiD7j.js → Card-BlCYNw5W.js} +2 -2
  85. package/lib/{Card-BtheiD7j.js.map → Card-BlCYNw5W.js.map} +1 -1
  86. package/lib/{CategoryHeading-D06WK_Wo.js → CategoryHeading-DZi-Szor.js} +2 -2
  87. package/lib/{CategoryHeading-D06WK_Wo.js.map → CategoryHeading-DZi-Szor.js.map} +1 -1
  88. package/lib/{Dialog-ByYz4ABw.js → Dialog-CNf2oWXG.js} +2 -2
  89. package/lib/{Dialog-ByYz4ABw.js.map → Dialog-CNf2oWXG.js.map} +1 -1
  90. package/lib/{Drawer-CEwbkLDb.js → Drawer-BPBxzel2.js} +25 -25
  91. package/lib/{Drawer-CEwbkLDb.js.map → Drawer-BPBxzel2.js.map} +1 -1
  92. package/lib/Markdown-D96AphCL.js +7691 -0
  93. package/lib/Markdown-D96AphCL.js.map +1 -0
  94. package/lib/MdxPage-tTTaDsLc.js +84 -0
  95. package/lib/{MdxPage-DlJaCSPf.js.map → MdxPage-tTTaDsLc.js.map} +1 -1
  96. package/lib/{OasProvider-CsUksaAo.js → OasProvider-DalHQixM.js} +4 -4
  97. package/lib/{OasProvider-CsUksaAo.js.map → OasProvider-DalHQixM.js.map} +1 -1
  98. package/lib/{OperationList-BlUBNsw2.js → OperationList-BB09ENaq.js} +1896 -1932
  99. package/lib/{OperationList-BlUBNsw2.js.map → OperationList-BB09ENaq.js.map} +1 -1
  100. package/lib/{Pagination-C5Fi7z_v.js → Pagination-CtmnJOJi.js} +4 -4
  101. package/lib/{Pagination-C5Fi7z_v.js.map → Pagination-CtmnJOJi.js.map} +1 -1
  102. package/lib/RouteGuard-lkdEJoDV.js +732 -0
  103. package/lib/{RouteGuard-D2gX29iI.js.map → RouteGuard-lkdEJoDV.js.map} +1 -1
  104. package/lib/{SchemaList-BQiBukIP.js → SchemaList-BH9bgMRw.js} +40 -41
  105. package/lib/{SchemaList-BQiBukIP.js.map → SchemaList-BH9bgMRw.js.map} +1 -1
  106. package/lib/{SchemaView-Bt95NiyQ.js → SchemaView-BsB7EFRl.js} +120 -115
  107. package/lib/SchemaView-BsB7EFRl.js.map +1 -0
  108. package/lib/Select-HTio1oSE.js +211 -0
  109. package/lib/{Select-CYaEBIYK.js.map → Select-HTio1oSE.js.map} +1 -1
  110. package/lib/SlotletProvider-CTgIBRWg.js +257 -0
  111. package/lib/SlotletProvider-CTgIBRWg.js.map +1 -0
  112. package/lib/SyntaxHighlight-UxOF1xNb.js +9107 -0
  113. package/lib/SyntaxHighlight-UxOF1xNb.js.map +1 -0
  114. package/lib/{Toc-BnN4zBb3.js → Toc-Ax54Pw8S.js} +3 -3
  115. package/lib/{Toc-BnN4zBb3.js.map → Toc-Ax54Pw8S.js.map} +1 -1
  116. package/lib/{chunk-BAXFHI7N-BLTsN6tl.js → chunk-BAXFHI7N-C9WnHsLV.js} +510 -517
  117. package/lib/{chunk-BAXFHI7N-BLTsN6tl.js.map → chunk-BAXFHI7N-C9WnHsLV.js.map} +1 -1
  118. package/lib/{circular-tOWjsgLZ.js → circular-CZaZtOBs.js} +1636 -1633
  119. package/lib/{circular-tOWjsgLZ.js.map → circular-CZaZtOBs.js.map} +1 -1
  120. package/lib/{cn-qaFjX9_3.js → cn-CwJPJKOE.js} +28 -29
  121. package/lib/{cn-qaFjX9_3.js.map → cn-CwJPJKOE.js.map} +1 -1
  122. package/lib/{createServer-XtO-PVox.js → createServer-DmqFeMgf.js} +3980 -3832
  123. package/lib/createServer-DmqFeMgf.js.map +1 -0
  124. package/lib/hook-BwOB_iZo.js +1442 -0
  125. package/lib/hook-BwOB_iZo.js.map +1 -0
  126. package/lib/{index-DwT-v3zK.js → index--oeBayMa.js} +2 -2
  127. package/lib/{index-DwT-v3zK.js.map → index--oeBayMa.js.map} +1 -1
  128. package/lib/index-BnT4-Efz.js +4975 -0
  129. package/lib/index-BnT4-Efz.js.map +1 -0
  130. package/lib/{index-LNp6rxyU.js → index-BvvmIczU.js} +2 -2
  131. package/lib/{index-LNp6rxyU.js.map → index-BvvmIczU.js.map} +1 -1
  132. package/lib/{index-CuBIgTKC.js → index-CrcNWbel.js} +9 -9
  133. package/lib/{index-CuBIgTKC.js.map → index-CrcNWbel.js.map} +1 -1
  134. package/lib/{index-CPNSgwSb.js → index-Z13x6tPX.js} +5 -5
  135. package/lib/{index-CPNSgwSb.js.map → index-Z13x6tPX.js.map} +1 -1
  136. package/lib/{index-CZnufgn5.js → index-sS7O9W-R.js} +899 -949
  137. package/lib/index-sS7O9W-R.js.map +1 -0
  138. package/lib/{index-DcHeSvkE.js → index-zddirpDj.js} +581 -609
  139. package/lib/{index-DcHeSvkE.js.map → index-zddirpDj.js.map} +1 -1
  140. package/lib/invariant-DAFpPywt.js +48 -0
  141. package/lib/{invariant-Caa8-XvF.js.map → invariant-DAFpPywt.js.map} +1 -1
  142. package/lib/mutation-CL2MCRQL.js +196 -0
  143. package/lib/{mutation-Bq5bn7Hf.js.map → mutation-CL2MCRQL.js.map} +1 -1
  144. package/lib/processors/removeParameters.js +27 -28
  145. package/lib/processors/removeParameters.js.map +1 -1
  146. package/lib/processors/removePaths.js +17 -17
  147. package/lib/processors/removePaths.js.map +1 -1
  148. package/lib/ui/Accordion.js +1 -1
  149. package/lib/ui/ActionButton.js +2 -2
  150. package/lib/ui/Alert.js +2 -2
  151. package/lib/ui/AlertDialog.js +1 -1
  152. package/lib/ui/Badge.js +2 -2
  153. package/lib/ui/Breadcrumb.js +1 -1
  154. package/lib/ui/Button.js +2 -2
  155. package/lib/ui/Callout.js +7 -7
  156. package/lib/ui/Callout.js.map +1 -1
  157. package/lib/ui/Card.js +1 -1
  158. package/lib/ui/Carousel.js +175 -175
  159. package/lib/ui/Carousel.js.map +1 -1
  160. package/lib/ui/Checkbox.js +1 -1
  161. package/lib/ui/CodeBlock.js +83 -0
  162. package/lib/ui/CodeBlock.js.map +1 -0
  163. package/lib/ui/Command.js +58 -58
  164. package/lib/ui/Command.js.map +1 -1
  165. package/lib/ui/Dialog.js +1 -1
  166. package/lib/ui/Drawer.js +2 -2
  167. package/lib/ui/DropdownMenu.js +1 -1
  168. package/lib/ui/Form.js +1 -1
  169. package/lib/ui/HoverCard.js +1 -1
  170. package/lib/ui/Input.js +1 -1
  171. package/lib/ui/Label.js +2 -2
  172. package/lib/ui/Pagination.js +1 -1
  173. package/lib/ui/Popover.js +1 -1
  174. package/lib/ui/Progress.js +1 -1
  175. package/lib/ui/RadioGroup.js +1 -1
  176. package/lib/ui/ScrollArea.js +1 -1
  177. package/lib/ui/Select.js +1 -1
  178. package/lib/ui/Skeleton.js +1 -1
  179. package/lib/ui/Slider.js +1 -1
  180. package/lib/ui/Switch.js +1 -1
  181. package/lib/ui/SyntaxHighlight.js +5 -6
  182. package/lib/ui/SyntaxHighlight.js.map +1 -1
  183. package/lib/ui/Tabs.js +1 -1
  184. package/lib/ui/Textarea.js +1 -1
  185. package/lib/ui/Toggle.js +2 -2
  186. package/lib/ui/ToggleGroup.js +1 -1
  187. package/lib/ui/Tooltip.js +1 -1
  188. package/lib/ui/util.js +1 -1
  189. package/lib/{useExposedProps-DmTJxEXG.js → useExposedProps-DG8J6ewJ.js} +2 -2
  190. package/lib/{useExposedProps-DmTJxEXG.js.map → useExposedProps-DG8J6ewJ.js.map} +1 -1
  191. package/lib/zudoku.auth-auth0.js +28 -31
  192. package/lib/zudoku.auth-auth0.js.map +1 -1
  193. package/lib/zudoku.auth-clerk.js +64 -70
  194. package/lib/zudoku.auth-clerk.js.map +1 -1
  195. package/lib/zudoku.auth-openid.js +373 -382
  196. package/lib/zudoku.auth-openid.js.map +1 -1
  197. package/lib/zudoku.components.js +7 -7
  198. package/lib/zudoku.hooks.js +2 -2
  199. package/lib/zudoku.plugin-api-catalog.js +45 -45
  200. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  201. package/lib/zudoku.plugin-api-keys.js +6 -6
  202. package/lib/zudoku.plugin-custom-pages.js +3 -3
  203. package/lib/zudoku.plugin-markdown.js +25 -28
  204. package/lib/zudoku.plugin-markdown.js.map +1 -1
  205. package/lib/zudoku.plugin-openapi.js +3 -3
  206. package/lib/zudoku.plugin-redirect.js +1 -1
  207. package/lib/zudoku.plugin-search-inkeep.js +26 -27
  208. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  209. package/lib/zudoku.plugin-search-pagefind.js +107 -110
  210. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  211. package/package.json +39 -29
  212. package/src/app/entry.client.tsx +40 -25
  213. package/src/app/main.css +54 -3
  214. package/src/app/main.tsx +8 -0
  215. package/src/lib/components/Footer.tsx +3 -6
  216. package/src/lib/components/Header.tsx +1 -1
  217. package/src/lib/components/Markdown.tsx +29 -24
  218. package/src/lib/components/context/ZudokuContext.ts +2 -3
  219. package/src/lib/core/ZudokuContext.ts +5 -0
  220. package/src/lib/errors/ErrorAlert.tsx +1 -1
  221. package/src/lib/oas/graphql/circular.ts +27 -19
  222. package/src/lib/oas/parser/index.ts +6 -1
  223. package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -2
  224. package/src/lib/plugins/openapi/ParamInfos.tsx +3 -1
  225. package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
  226. package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -2
  227. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +22 -35
  228. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +5 -2
  229. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +23 -17
  230. package/src/lib/plugins/openapi/schema/utils.ts +18 -6
  231. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +6 -1
  232. package/src/lib/shiki.ts +133 -0
  233. package/src/lib/ui/Callout.tsx +1 -1
  234. package/src/lib/ui/CodeBlock.tsx +102 -0
  235. package/src/lib/ui/SyntaxHighlight.tsx +23 -182
  236. package/src/lib/util/MdxComponents.tsx +27 -14
  237. package/src/shiki/langs/abap.js +1 -0
  238. package/src/shiki/langs/actionscript-3.js +1 -0
  239. package/src/shiki/langs/ada.js +1 -0
  240. package/src/shiki/langs/angular-expression.js +1 -0
  241. package/src/shiki/langs/angular-html.js +1 -0
  242. package/src/shiki/langs/angular-inline-style.js +1 -0
  243. package/src/shiki/langs/angular-inline-template.js +1 -0
  244. package/src/shiki/langs/angular-let-declaration.js +1 -0
  245. package/src/shiki/langs/angular-template-blocks.js +1 -0
  246. package/src/shiki/langs/angular-template.js +1 -0
  247. package/src/shiki/langs/angular-ts.js +1 -0
  248. package/src/shiki/langs/apache.js +1 -0
  249. package/src/shiki/langs/apex.js +1 -0
  250. package/src/shiki/langs/apl.js +1 -0
  251. package/src/shiki/langs/applescript.js +1 -0
  252. package/src/shiki/langs/ara.js +1 -0
  253. package/src/shiki/langs/asciidoc.js +1 -0
  254. package/src/shiki/langs/asm.js +1 -0
  255. package/src/shiki/langs/astro.js +1 -0
  256. package/src/shiki/langs/awk.js +1 -0
  257. package/src/shiki/langs/ballerina.js +1 -0
  258. package/src/shiki/langs/bat.js +1 -0
  259. package/src/shiki/langs/beancount.js +1 -0
  260. package/src/shiki/langs/berry.js +1 -0
  261. package/src/shiki/langs/bibtex.js +1 -0
  262. package/src/shiki/langs/bicep.js +1 -0
  263. package/src/shiki/langs/blade.js +1 -0
  264. package/src/shiki/langs/bsl.js +1 -0
  265. package/src/shiki/langs/c.js +1 -0
  266. package/src/shiki/langs/cadence.js +1 -0
  267. package/src/shiki/langs/cairo.js +1 -0
  268. package/src/shiki/langs/clarity.js +1 -0
  269. package/src/shiki/langs/clojure.js +1 -0
  270. package/src/shiki/langs/cmake.js +1 -0
  271. package/src/shiki/langs/cobol.js +1 -0
  272. package/src/shiki/langs/codeowners.js +1 -0
  273. package/src/shiki/langs/codeql.js +1 -0
  274. package/src/shiki/langs/coffee.js +1 -0
  275. package/src/shiki/langs/common-lisp.js +1 -0
  276. package/src/shiki/langs/coq.js +1 -0
  277. package/src/shiki/langs/cpp-macro.js +1 -0
  278. package/src/shiki/langs/cpp.js +1 -0
  279. package/src/shiki/langs/crystal.js +1 -0
  280. package/src/shiki/langs/csharp.js +1 -0
  281. package/src/shiki/langs/css.js +1 -0
  282. package/src/shiki/langs/csv.js +1 -0
  283. package/src/shiki/langs/cue.js +1 -0
  284. package/src/shiki/langs/cypher.js +1 -0
  285. package/src/shiki/langs/d.js +1 -0
  286. package/src/shiki/langs/dart.js +1 -0
  287. package/src/shiki/langs/dax.js +1 -0
  288. package/src/shiki/langs/desktop.js +1 -0
  289. package/src/shiki/langs/diff.js +1 -0
  290. package/src/shiki/langs/docker.js +1 -0
  291. package/src/shiki/langs/dotenv.js +1 -0
  292. package/src/shiki/langs/dream-maker.js +1 -0
  293. package/src/shiki/langs/edge.js +1 -0
  294. package/src/shiki/langs/elixir.js +1 -0
  295. package/src/shiki/langs/elm.js +1 -0
  296. package/src/shiki/langs/emacs-lisp.js +1 -0
  297. package/src/shiki/langs/erb.js +1 -0
  298. package/src/shiki/langs/erlang.js +1 -0
  299. package/src/shiki/langs/es-tag-css.js +1 -0
  300. package/src/shiki/langs/es-tag-glsl.js +1 -0
  301. package/src/shiki/langs/es-tag-html.js +1 -0
  302. package/src/shiki/langs/es-tag-sql.js +1 -0
  303. package/src/shiki/langs/es-tag-xml.js +1 -0
  304. package/src/shiki/langs/fennel.js +1 -0
  305. package/src/shiki/langs/fish.js +1 -0
  306. package/src/shiki/langs/fluent.js +1 -0
  307. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  308. package/src/shiki/langs/fortran-free-form.js +1 -0
  309. package/src/shiki/langs/fsharp.js +1 -0
  310. package/src/shiki/langs/gdresource.js +1 -0
  311. package/src/shiki/langs/gdscript.js +1 -0
  312. package/src/shiki/langs/gdshader.js +1 -0
  313. package/src/shiki/langs/genie.js +1 -0
  314. package/src/shiki/langs/gherkin.js +1 -0
  315. package/src/shiki/langs/git-commit.js +1 -0
  316. package/src/shiki/langs/git-rebase.js +1 -0
  317. package/src/shiki/langs/gleam.js +1 -0
  318. package/src/shiki/langs/glimmer-js.js +1 -0
  319. package/src/shiki/langs/glimmer-ts.js +1 -0
  320. package/src/shiki/langs/glsl.js +1 -0
  321. package/src/shiki/langs/gnuplot.js +1 -0
  322. package/src/shiki/langs/go.js +1 -0
  323. package/src/shiki/langs/graphql.js +1 -0
  324. package/src/shiki/langs/groovy.js +1 -0
  325. package/src/shiki/langs/hack.js +1 -0
  326. package/src/shiki/langs/haml.js +1 -0
  327. package/src/shiki/langs/handlebars.js +1 -0
  328. package/src/shiki/langs/haskell.js +1 -0
  329. package/src/shiki/langs/haxe.js +1 -0
  330. package/src/shiki/langs/hcl.js +1 -0
  331. package/src/shiki/langs/hjson.js +1 -0
  332. package/src/shiki/langs/hlsl.js +1 -0
  333. package/src/shiki/langs/html-derivative.js +1 -0
  334. package/src/shiki/langs/html.js +1 -0
  335. package/src/shiki/langs/http.js +1 -0
  336. package/src/shiki/langs/hxml.js +1 -0
  337. package/src/shiki/langs/hy.js +1 -0
  338. package/src/shiki/langs/imba.js +1 -0
  339. package/src/shiki/langs/ini.js +1 -0
  340. package/src/shiki/langs/java.js +1 -0
  341. package/src/shiki/langs/javascript.js +1 -0
  342. package/src/shiki/langs/jinja-html.js +1 -0
  343. package/src/shiki/langs/jinja.js +1 -0
  344. package/src/shiki/langs/jison.js +1 -0
  345. package/src/shiki/langs/json.js +1 -0
  346. package/src/shiki/langs/json5.js +1 -0
  347. package/src/shiki/langs/jsonc.js +1 -0
  348. package/src/shiki/langs/jsonl.js +1 -0
  349. package/src/shiki/langs/jsonnet.js +1 -0
  350. package/src/shiki/langs/jssm.js +1 -0
  351. package/src/shiki/langs/jsx.js +1 -0
  352. package/src/shiki/langs/julia.js +1 -0
  353. package/src/shiki/langs/kotlin.js +1 -0
  354. package/src/shiki/langs/kusto.js +1 -0
  355. package/src/shiki/langs/latex.js +1 -0
  356. package/src/shiki/langs/lean.js +1 -0
  357. package/src/shiki/langs/less.js +1 -0
  358. package/src/shiki/langs/liquid.js +1 -0
  359. package/src/shiki/langs/llvm.js +1 -0
  360. package/src/shiki/langs/log.js +1 -0
  361. package/src/shiki/langs/logo.js +1 -0
  362. package/src/shiki/langs/lua.js +1 -0
  363. package/src/shiki/langs/luau.js +1 -0
  364. package/src/shiki/langs/make.js +1 -0
  365. package/src/shiki/langs/markdown-vue.js +1 -0
  366. package/src/shiki/langs/markdown.js +1 -0
  367. package/src/shiki/langs/marko.js +1 -0
  368. package/src/shiki/langs/matlab.js +1 -0
  369. package/src/shiki/langs/mdc.js +1 -0
  370. package/src/shiki/langs/mdx.js +1 -0
  371. package/src/shiki/langs/mermaid.js +1 -0
  372. package/src/shiki/langs/mipsasm.js +1 -0
  373. package/src/shiki/langs/mojo.js +1 -0
  374. package/src/shiki/langs/move.js +1 -0
  375. package/src/shiki/langs/narrat.js +1 -0
  376. package/src/shiki/langs/nextflow.js +1 -0
  377. package/src/shiki/langs/nginx.js +1 -0
  378. package/src/shiki/langs/nim.js +1 -0
  379. package/src/shiki/langs/nix.js +1 -0
  380. package/src/shiki/langs/nushell.js +1 -0
  381. package/src/shiki/langs/objective-c.js +1 -0
  382. package/src/shiki/langs/objective-cpp.js +1 -0
  383. package/src/shiki/langs/ocaml.js +1 -0
  384. package/src/shiki/langs/pascal.js +1 -0
  385. package/src/shiki/langs/perl.js +1 -0
  386. package/src/shiki/langs/php.js +1 -0
  387. package/src/shiki/langs/plsql.js +1 -0
  388. package/src/shiki/langs/po.js +1 -0
  389. package/src/shiki/langs/polar.js +1 -0
  390. package/src/shiki/langs/postcss.js +1 -0
  391. package/src/shiki/langs/powerquery.js +1 -0
  392. package/src/shiki/langs/powershell.js +1 -0
  393. package/src/shiki/langs/prisma.js +1 -0
  394. package/src/shiki/langs/prolog.js +1 -0
  395. package/src/shiki/langs/proto.js +1 -0
  396. package/src/shiki/langs/pug.js +1 -0
  397. package/src/shiki/langs/puppet.js +1 -0
  398. package/src/shiki/langs/purescript.js +1 -0
  399. package/src/shiki/langs/python.js +1 -0
  400. package/src/shiki/langs/qml.js +1 -0
  401. package/src/shiki/langs/qmldir.js +1 -0
  402. package/src/shiki/langs/qss.js +1 -0
  403. package/src/shiki/langs/r.js +1 -0
  404. package/src/shiki/langs/racket.js +1 -0
  405. package/src/shiki/langs/raku.js +1 -0
  406. package/src/shiki/langs/razor.js +1 -0
  407. package/src/shiki/langs/reg.js +1 -0
  408. package/src/shiki/langs/regexp.js +1 -0
  409. package/src/shiki/langs/rel.js +1 -0
  410. package/src/shiki/langs/riscv.js +1 -0
  411. package/src/shiki/langs/rst.js +1 -0
  412. package/src/shiki/langs/ruby.js +1 -0
  413. package/src/shiki/langs/rust.js +1 -0
  414. package/src/shiki/langs/sas.js +1 -0
  415. package/src/shiki/langs/sass.js +1 -0
  416. package/src/shiki/langs/scala.js +1 -0
  417. package/src/shiki/langs/scheme.js +1 -0
  418. package/src/shiki/langs/scss.js +1 -0
  419. package/src/shiki/langs/sdbl.js +1 -0
  420. package/src/shiki/langs/shaderlab.js +1 -0
  421. package/src/shiki/langs/shellscript.js +1 -0
  422. package/src/shiki/langs/shellsession.js +1 -0
  423. package/src/shiki/langs/smalltalk.js +1 -0
  424. package/src/shiki/langs/solidity.js +1 -0
  425. package/src/shiki/langs/soy.js +1 -0
  426. package/src/shiki/langs/sparql.js +1 -0
  427. package/src/shiki/langs/splunk.js +1 -0
  428. package/src/shiki/langs/sql.js +1 -0
  429. package/src/shiki/langs/ssh-config.js +1 -0
  430. package/src/shiki/langs/stata.js +1 -0
  431. package/src/shiki/langs/stylus.js +1 -0
  432. package/src/shiki/langs/svelte.js +1 -0
  433. package/src/shiki/langs/swift.js +1 -0
  434. package/src/shiki/langs/system-verilog.js +1 -0
  435. package/src/shiki/langs/systemd.js +1 -0
  436. package/src/shiki/langs/talonscript.js +1 -0
  437. package/src/shiki/langs/tasl.js +1 -0
  438. package/src/shiki/langs/tcl.js +1 -0
  439. package/src/shiki/langs/templ.js +1 -0
  440. package/src/shiki/langs/terraform.js +1 -0
  441. package/src/shiki/langs/tex.js +1 -0
  442. package/src/shiki/langs/toml.js +1 -0
  443. package/src/shiki/langs/ts-tags.js +1 -0
  444. package/src/shiki/langs/tsv.js +1 -0
  445. package/src/shiki/langs/tsx.js +1 -0
  446. package/src/shiki/langs/turtle.js +1 -0
  447. package/src/shiki/langs/twig.js +1 -0
  448. package/src/shiki/langs/typescript.js +1 -0
  449. package/src/shiki/langs/typespec.js +1 -0
  450. package/src/shiki/langs/typst.js +1 -0
  451. package/src/shiki/langs/v.js +1 -0
  452. package/src/shiki/langs/vala.js +1 -0
  453. package/src/shiki/langs/vb.js +1 -0
  454. package/src/shiki/langs/verilog.js +1 -0
  455. package/src/shiki/langs/vhdl.js +1 -0
  456. package/src/shiki/langs/viml.js +1 -0
  457. package/src/shiki/langs/vue-directives.js +1 -0
  458. package/src/shiki/langs/vue-html.js +1 -0
  459. package/src/shiki/langs/vue-interpolations.js +1 -0
  460. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  461. package/src/shiki/langs/vue.js +1 -0
  462. package/src/shiki/langs/vyper.js +1 -0
  463. package/src/shiki/langs/wasm.js +1 -0
  464. package/src/shiki/langs/wenyan.js +1 -0
  465. package/src/shiki/langs/wgsl.js +1 -0
  466. package/src/shiki/langs/wikitext.js +1 -0
  467. package/src/shiki/langs/wit.js +1 -0
  468. package/src/shiki/langs/wolfram.js +1 -0
  469. package/src/shiki/langs/xml.js +1 -0
  470. package/src/shiki/langs/xsl.js +1 -0
  471. package/src/shiki/langs/yaml.js +1 -0
  472. package/src/shiki/langs/zenscript.js +1 -0
  473. package/src/shiki/langs/zig.js +1 -0
  474. package/src/shiki/themes/andromeeda.js +1 -0
  475. package/src/shiki/themes/aurora-x.js +1 -0
  476. package/src/shiki/themes/ayu-dark.js +1 -0
  477. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  478. package/src/shiki/themes/catppuccin-latte.js +1 -0
  479. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  480. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  481. package/src/shiki/themes/dark-plus.js +1 -0
  482. package/src/shiki/themes/dracula-soft.js +1 -0
  483. package/src/shiki/themes/dracula.js +1 -0
  484. package/src/shiki/themes/everforest-dark.js +1 -0
  485. package/src/shiki/themes/everforest-light.js +1 -0
  486. package/src/shiki/themes/github-dark-default.js +1 -0
  487. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  488. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  489. package/src/shiki/themes/github-dark.js +1 -0
  490. package/src/shiki/themes/github-light-default.js +1 -0
  491. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  492. package/src/shiki/themes/github-light.js +1 -0
  493. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  494. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  495. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  496. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  497. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  498. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  499. package/src/shiki/themes/houston.js +1 -0
  500. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  501. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  502. package/src/shiki/themes/kanagawa-wave.js +1 -0
  503. package/src/shiki/themes/laserwave.js +1 -0
  504. package/src/shiki/themes/light-plus.js +1 -0
  505. package/src/shiki/themes/material-theme-darker.js +1 -0
  506. package/src/shiki/themes/material-theme-lighter.js +1 -0
  507. package/src/shiki/themes/material-theme-ocean.js +1 -0
  508. package/src/shiki/themes/material-theme-palenight.js +1 -0
  509. package/src/shiki/themes/material-theme.js +1 -0
  510. package/src/shiki/themes/min-dark.js +1 -0
  511. package/src/shiki/themes/min-light.js +1 -0
  512. package/src/shiki/themes/monokai.js +1 -0
  513. package/src/shiki/themes/night-owl.js +1 -0
  514. package/src/shiki/themes/nord.js +1 -0
  515. package/src/shiki/themes/one-dark-pro.js +1 -0
  516. package/src/shiki/themes/one-light.js +1 -0
  517. package/src/shiki/themes/plastic.js +1 -0
  518. package/src/shiki/themes/poimandres.js +1 -0
  519. package/src/shiki/themes/red.js +1 -0
  520. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  521. package/src/shiki/themes/rose-pine-moon.js +1 -0
  522. package/src/shiki/themes/rose-pine.js +1 -0
  523. package/src/shiki/themes/slack-dark.js +1 -0
  524. package/src/shiki/themes/slack-ochin.js +1 -0
  525. package/src/shiki/themes/snazzy-light.js +1 -0
  526. package/src/shiki/themes/solarized-dark.js +1 -0
  527. package/src/shiki/themes/solarized-light.js +1 -0
  528. package/src/shiki/themes/synthwave-84.js +1 -0
  529. package/src/shiki/themes/tokyo-night.js +1 -0
  530. package/src/shiki/themes/vesper.js +1 -0
  531. package/src/shiki/themes/vitesse-black.js +1 -0
  532. package/src/shiki/themes/vitesse-dark.js +1 -0
  533. package/src/shiki/themes/vitesse-light.js +1 -0
  534. package/lib/AuthenticationPlugin-BlJsiGuX.js +0 -99
  535. package/lib/Markdown-DvdVn1O7.js +0 -17128
  536. package/lib/Markdown-DvdVn1O7.js.map +0 -1
  537. package/lib/MdxPage-DlJaCSPf.js +0 -85
  538. package/lib/RouteGuard-D2gX29iI.js +0 -744
  539. package/lib/SchemaView-Bt95NiyQ.js.map +0 -1
  540. package/lib/Select-CYaEBIYK.js +0 -223
  541. package/lib/SlotletProvider-wWbHYqWf.js +0 -340
  542. package/lib/SlotletProvider-wWbHYqWf.js.map +0 -1
  543. package/lib/SyntaxHighlight-o7q0acut.js +0 -2890
  544. package/lib/SyntaxHighlight-o7q0acut.js.map +0 -1
  545. package/lib/_commonjsHelpers-B4e78b8K.js +0 -29
  546. package/lib/_commonjsHelpers-B4e78b8K.js.map +0 -1
  547. package/lib/createServer-XtO-PVox.js.map +0 -1
  548. package/lib/hook-8GM2HXNM.js +0 -1478
  549. package/lib/hook-8GM2HXNM.js.map +0 -1
  550. package/lib/index-CZnufgn5.js.map +0 -1
  551. package/lib/index-CzUOM_vE.js +0 -5039
  552. package/lib/index-CzUOM_vE.js.map +0 -1
  553. package/lib/invariant-Caa8-XvF.js +0 -26
  554. package/lib/mutation-Bq5bn7Hf.js +0 -211
  555. package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
  556. package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
  557. package/lib/prism-csharp.min-C43x1RY2.js +0 -63
  558. package/lib/prism-csharp.min-C43x1RY2.js.map +0 -1
  559. package/lib/prism-java.min-CQzr40NQ.js +0 -35
  560. package/lib/prism-java.min-CQzr40NQ.js.map +0 -1
  561. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  562. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  563. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  564. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  565. package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
  566. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
  567. package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
  568. package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
  569. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  570. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  571. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  572. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  573. package/lib/prism-ruby.min-L9OdQ6tU.js +0 -38
  574. package/lib/prism-ruby.min-L9OdQ6tU.js.map +0 -1
  575. package/lib/prism-typescript.min-qTySPvCh.js +0 -34
  576. package/lib/prism-typescript.min-qTySPvCh.js.map +0 -1
@@ -0,0 +1,1442 @@
1
+ import * as S from "react";
2
+ import Y, { createContext as Oe, useContext as Ee } from "react";
3
+ import { j as Ce } from "./jsx-runtime-C5mzlN2N.js";
4
+ import { u as x, m as X } from "./chunk-BAXFHI7N-C9WnHsLV.js";
5
+ var $ = class {
6
+ constructor() {
7
+ this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
8
+ }
9
+ subscribe(e) {
10
+ return this.listeners.add(e), this.onSubscribe(), () => {
11
+ this.listeners.delete(e), this.onUnsubscribe();
12
+ };
13
+ }
14
+ hasListeners() {
15
+ return this.listeners.size > 0;
16
+ }
17
+ onSubscribe() {
18
+ }
19
+ onUnsubscribe() {
20
+ }
21
+ }, C = typeof window > "u" || "Deno" in globalThis;
22
+ function q() {
23
+ }
24
+ function bt(e, t) {
25
+ return typeof e == "function" ? e(t) : e;
26
+ }
27
+ function U(e) {
28
+ return typeof e == "number" && e >= 0 && e !== 1 / 0;
29
+ }
30
+ function ue(e, t) {
31
+ return Math.max(e + (t || 0) - Date.now(), 0);
32
+ }
33
+ function D(e, t) {
34
+ return typeof e == "function" ? e(t) : e;
35
+ }
36
+ function w(e, t) {
37
+ return typeof e == "function" ? e(t) : e;
38
+ }
39
+ function mt(e, t) {
40
+ const {
41
+ type: s = "all",
42
+ exact: r,
43
+ fetchStatus: n,
44
+ predicate: o,
45
+ queryKey: a,
46
+ stale: i
47
+ } = e;
48
+ if (a) {
49
+ if (r) {
50
+ if (t.queryHash !== Fe(a, t.options))
51
+ return !1;
52
+ } else if (!G(t.queryKey, a))
53
+ return !1;
54
+ }
55
+ if (s !== "all") {
56
+ const u = t.isActive();
57
+ if (s === "active" && !u || s === "inactive" && u)
58
+ return !1;
59
+ }
60
+ return !(typeof i == "boolean" && t.isStale() !== i || n && n !== t.state.fetchStatus || o && !o(t));
61
+ }
62
+ function gt(e, t) {
63
+ const { exact: s, status: r, predicate: n, mutationKey: o } = e;
64
+ if (o) {
65
+ if (!t.options.mutationKey)
66
+ return !1;
67
+ if (s) {
68
+ if (Q(t.options.mutationKey) !== Q(o))
69
+ return !1;
70
+ } else if (!G(t.options.mutationKey, o))
71
+ return !1;
72
+ }
73
+ return !(r && t.state.status !== r || n && !n(t));
74
+ }
75
+ function Fe(e, t) {
76
+ return (t?.queryKeyHashFn || Q)(e);
77
+ }
78
+ function Q(e) {
79
+ return JSON.stringify(
80
+ e,
81
+ (t, s) => N(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
82
+ );
83
+ }
84
+ function G(e, t) {
85
+ return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => G(e[s], t[s])) : !1;
86
+ }
87
+ function L(e, t) {
88
+ if (e === t)
89
+ return e;
90
+ const s = ee(e) && ee(t);
91
+ if (s || N(e) && N(t)) {
92
+ const r = s ? e : Object.keys(e), n = r.length, o = s ? t : Object.keys(t), a = o.length, i = s ? [] : {};
93
+ let u = 0;
94
+ for (let l = 0; l < a; l++) {
95
+ const h = s ? l : o[l];
96
+ (!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (i[h] = void 0, u++) : (i[h] = L(e[h], t[h]), i[h] === e[h] && e[h] !== void 0 && u++);
97
+ }
98
+ return n === a && u === n ? e : i;
99
+ }
100
+ return t;
101
+ }
102
+ function M(e, t) {
103
+ if (!t || Object.keys(e).length !== Object.keys(t).length)
104
+ return !1;
105
+ for (const s in e)
106
+ if (e[s] !== t[s])
107
+ return !1;
108
+ return !0;
109
+ }
110
+ function ee(e) {
111
+ return Array.isArray(e) && e.length === Object.keys(e).length;
112
+ }
113
+ function N(e) {
114
+ if (!te(e))
115
+ return !1;
116
+ const t = e.constructor;
117
+ if (t === void 0)
118
+ return !0;
119
+ const s = t.prototype;
120
+ return !(!te(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
121
+ }
122
+ function te(e) {
123
+ return Object.prototype.toString.call(e) === "[object Object]";
124
+ }
125
+ function Ie(e) {
126
+ return new Promise((t) => {
127
+ setTimeout(t, e);
128
+ });
129
+ }
130
+ function _(e, t, s) {
131
+ if (typeof s.structuralSharing == "function")
132
+ return s.structuralSharing(e, t);
133
+ if (s.structuralSharing !== !1) {
134
+ if (process.env.NODE_ENV !== "production")
135
+ try {
136
+ return L(e, t);
137
+ } catch (r) {
138
+ throw console.error(
139
+ `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
140
+ ), r;
141
+ }
142
+ return L(e, t);
143
+ }
144
+ return t;
145
+ }
146
+ function St(e) {
147
+ return e;
148
+ }
149
+ function wt(e, t, s = 0) {
150
+ const r = [...e, t];
151
+ return s && r.length > s ? r.slice(1) : r;
152
+ }
153
+ function Rt(e, t, s = 0) {
154
+ const r = [t, ...e];
155
+ return s && r.length > s ? r.slice(0, -1) : r;
156
+ }
157
+ var j = Symbol();
158
+ function Pe(e, t) {
159
+ return process.env.NODE_ENV !== "production" && e.queryFn === j && console.error(
160
+ `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
161
+ ), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === j ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
162
+ }
163
+ var Te = class extends $ {
164
+ #t;
165
+ #e;
166
+ #s;
167
+ constructor() {
168
+ super(), this.#s = (e) => {
169
+ if (!C && window.addEventListener) {
170
+ const t = () => e();
171
+ return window.addEventListener("visibilitychange", t, !1), () => {
172
+ window.removeEventListener("visibilitychange", t);
173
+ };
174
+ }
175
+ };
176
+ }
177
+ onSubscribe() {
178
+ this.#e || this.setEventListener(this.#s);
179
+ }
180
+ onUnsubscribe() {
181
+ this.hasListeners() || (this.#e?.(), this.#e = void 0);
182
+ }
183
+ setEventListener(e) {
184
+ this.#s = e, this.#e?.(), this.#e = e((t) => {
185
+ typeof t == "boolean" ? this.setFocused(t) : this.onFocus();
186
+ });
187
+ }
188
+ setFocused(e) {
189
+ this.#t !== e && (this.#t = e, this.onFocus());
190
+ }
191
+ onFocus() {
192
+ const e = this.isFocused();
193
+ this.listeners.forEach((t) => {
194
+ t(e);
195
+ });
196
+ }
197
+ isFocused() {
198
+ return typeof this.#t == "boolean" ? this.#t : globalThis.document?.visibilityState !== "hidden";
199
+ }
200
+ }, ce = new Te(), ke = class extends $ {
201
+ #t = !0;
202
+ #e;
203
+ #s;
204
+ constructor() {
205
+ super(), this.#s = (e) => {
206
+ if (!C && window.addEventListener) {
207
+ const t = () => e(!0), s = () => e(!1);
208
+ return window.addEventListener("online", t, !1), window.addEventListener("offline", s, !1), () => {
209
+ window.removeEventListener("online", t), window.removeEventListener("offline", s);
210
+ };
211
+ }
212
+ };
213
+ }
214
+ onSubscribe() {
215
+ this.#e || this.setEventListener(this.#s);
216
+ }
217
+ onUnsubscribe() {
218
+ this.hasListeners() || (this.#e?.(), this.#e = void 0);
219
+ }
220
+ setEventListener(e) {
221
+ this.#s = e, this.#e?.(), this.#e = e(this.setOnline.bind(this));
222
+ }
223
+ setOnline(e) {
224
+ this.#t !== e && (this.#t = e, this.listeners.forEach((s) => {
225
+ s(e);
226
+ }));
227
+ }
228
+ isOnline() {
229
+ return this.#t;
230
+ }
231
+ }, he = new ke();
232
+ function H() {
233
+ let e, t;
234
+ const s = new Promise((n, o) => {
235
+ e = n, t = o;
236
+ });
237
+ s.status = "pending", s.catch(() => {
238
+ });
239
+ function r(n) {
240
+ Object.assign(s, n), delete s.resolve, delete s.reject;
241
+ }
242
+ return s.resolve = (n) => {
243
+ r({
244
+ status: "fulfilled",
245
+ value: n
246
+ }), e(n);
247
+ }, s.reject = (n) => {
248
+ r({
249
+ status: "rejected",
250
+ reason: n
251
+ }), t(n);
252
+ }, s;
253
+ }
254
+ function De(e) {
255
+ return Math.min(1e3 * 2 ** e, 3e4);
256
+ }
257
+ function le(e) {
258
+ return (e ?? "online") === "online" ? he.isOnline() : !0;
259
+ }
260
+ var de = class extends Error {
261
+ constructor(e) {
262
+ super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
263
+ }
264
+ };
265
+ function A(e) {
266
+ return e instanceof de;
267
+ }
268
+ function je(e) {
269
+ let t = !1, s = 0, r = !1, n;
270
+ const o = H(), a = (c) => {
271
+ r || (d(new de(c)), e.abort?.());
272
+ }, i = () => {
273
+ t = !0;
274
+ }, u = () => {
275
+ t = !1;
276
+ }, l = () => ce.isFocused() && (e.networkMode === "always" || he.isOnline()) && e.canRun(), h = () => le(e.networkMode) && e.canRun(), p = (c) => {
277
+ r || (r = !0, e.onSuccess?.(c), n?.(), o.resolve(c));
278
+ }, d = (c) => {
279
+ r || (r = !0, e.onError?.(c), n?.(), o.reject(c));
280
+ }, b = () => new Promise((c) => {
281
+ n = (m) => {
282
+ (r || l()) && c(m);
283
+ }, e.onPause?.();
284
+ }).then(() => {
285
+ n = void 0, r || e.onContinue?.();
286
+ }), O = () => {
287
+ if (r)
288
+ return;
289
+ let c;
290
+ const m = s === 0 ? e.initialPromise : void 0;
291
+ try {
292
+ c = m ?? e.fn();
293
+ } catch (v) {
294
+ c = Promise.reject(v);
295
+ }
296
+ Promise.resolve(c).then(p).catch((v) => {
297
+ if (r)
298
+ return;
299
+ const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ?? De, E = typeof y == "function" ? y(s, v) : y, F = f === !0 || typeof f == "number" && s < f || typeof f == "function" && f(s, v);
300
+ if (t || !F) {
301
+ d(v);
302
+ return;
303
+ }
304
+ s++, e.onFail?.(s, v), Ie(E).then(() => l() ? void 0 : b()).then(() => {
305
+ t ? d(v) : O();
306
+ });
307
+ });
308
+ };
309
+ return {
310
+ promise: o,
311
+ cancel: a,
312
+ continue: () => (n?.(), o),
313
+ cancelRetry: i,
314
+ continueRetry: u,
315
+ canStart: h,
316
+ start: () => (h() ? O() : b().then(O), o)
317
+ };
318
+ }
319
+ var xe = (e) => setTimeout(e, 0);
320
+ function Ae() {
321
+ let e = [], t = 0, s = (i) => {
322
+ i();
323
+ }, r = (i) => {
324
+ i();
325
+ }, n = xe;
326
+ const o = (i) => {
327
+ t ? e.push(i) : n(() => {
328
+ s(i);
329
+ });
330
+ }, a = () => {
331
+ const i = e;
332
+ e = [], i.length && n(() => {
333
+ r(() => {
334
+ i.forEach((u) => {
335
+ s(u);
336
+ });
337
+ });
338
+ });
339
+ };
340
+ return {
341
+ batch: (i) => {
342
+ let u;
343
+ t++;
344
+ try {
345
+ u = i();
346
+ } finally {
347
+ t--, t || a();
348
+ }
349
+ return u;
350
+ },
351
+ /**
352
+ * All calls to the wrapped function will be batched.
353
+ */
354
+ batchCalls: (i) => (...u) => {
355
+ o(() => {
356
+ i(...u);
357
+ });
358
+ },
359
+ schedule: o,
360
+ /**
361
+ * Use this method to set a custom notify function.
362
+ * This can be used to for example wrap notifications with `React.act` while running tests.
363
+ */
364
+ setNotifyFunction: (i) => {
365
+ s = i;
366
+ },
367
+ /**
368
+ * Use this method to set a custom function to batch notifications together into a single tick.
369
+ * By default React Query will use the batch function provided by ReactDOM or React Native.
370
+ */
371
+ setBatchNotifyFunction: (i) => {
372
+ r = i;
373
+ },
374
+ setScheduler: (i) => {
375
+ n = i;
376
+ }
377
+ };
378
+ }
379
+ var z = Ae(), qe = class {
380
+ #t;
381
+ destroy() {
382
+ this.clearGcTimeout();
383
+ }
384
+ scheduleGc() {
385
+ this.clearGcTimeout(), U(this.gcTime) && (this.#t = setTimeout(() => {
386
+ this.optionalRemove();
387
+ }, this.gcTime));
388
+ }
389
+ updateGcTime(e) {
390
+ this.gcTime = Math.max(
391
+ this.gcTime || 0,
392
+ e ?? (C ? 1 / 0 : 5 * 60 * 1e3)
393
+ );
394
+ }
395
+ clearGcTimeout() {
396
+ this.#t && (clearTimeout(this.#t), this.#t = void 0);
397
+ }
398
+ }, Ot = class extends qe {
399
+ #t;
400
+ #e;
401
+ #s;
402
+ #n;
403
+ #r;
404
+ #a;
405
+ #o;
406
+ constructor(e) {
407
+ super(), this.#o = !1, this.#a = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = Ue(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
408
+ }
409
+ get meta() {
410
+ return this.options.meta;
411
+ }
412
+ get promise() {
413
+ return this.#r?.promise;
414
+ }
415
+ setOptions(e) {
416
+ this.options = { ...this.#a, ...e }, this.updateGcTime(this.options.gcTime);
417
+ }
418
+ optionalRemove() {
419
+ !this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
420
+ }
421
+ setData(e, t) {
422
+ const s = _(this.state.data, e, this.options);
423
+ return this.#i({
424
+ data: s,
425
+ type: "success",
426
+ dataUpdatedAt: t?.updatedAt,
427
+ manual: t?.manual
428
+ }), s;
429
+ }
430
+ setState(e, t) {
431
+ this.#i({ type: "setState", state: e, setStateOptions: t });
432
+ }
433
+ cancel(e) {
434
+ const t = this.#r?.promise;
435
+ return this.#r?.cancel(e), t ? t.then(q).catch(q) : Promise.resolve();
436
+ }
437
+ destroy() {
438
+ super.destroy(), this.cancel({ silent: !0 });
439
+ }
440
+ reset() {
441
+ this.destroy(), this.setState(this.#t);
442
+ }
443
+ isActive() {
444
+ return this.observers.some(
445
+ (e) => w(e.options.enabled, this) !== !1
446
+ );
447
+ }
448
+ isDisabled() {
449
+ return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === j || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
450
+ }
451
+ isStale() {
452
+ return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
453
+ (e) => e.getCurrentResult().isStale
454
+ ) : this.state.data === void 0;
455
+ }
456
+ isStaleByTime(e = 0) {
457
+ return this.state.isInvalidated || this.state.data === void 0 || !ue(this.state.dataUpdatedAt, e);
458
+ }
459
+ onFocus() {
460
+ this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
461
+ }
462
+ onOnline() {
463
+ this.observers.find((t) => t.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
464
+ }
465
+ addObserver(e) {
466
+ this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: e }));
467
+ }
468
+ removeObserver(e) {
469
+ this.observers.includes(e) && (this.observers = this.observers.filter((t) => t !== e), this.observers.length || (this.#r && (this.#o ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: e }));
470
+ }
471
+ getObserversCount() {
472
+ return this.observers.length;
473
+ }
474
+ invalidate() {
475
+ this.state.isInvalidated || this.#i({ type: "invalidate" });
476
+ }
477
+ fetch(e, t) {
478
+ if (this.state.fetchStatus !== "idle") {
479
+ if (this.state.data !== void 0 && t?.cancelRefetch)
480
+ this.cancel({ silent: !0 });
481
+ else if (this.#r)
482
+ return this.#r.continueRetry(), this.#r.promise;
483
+ }
484
+ if (e && this.setOptions(e), !this.options.queryFn) {
485
+ const i = this.observers.find((u) => u.options.queryFn);
486
+ i && this.setOptions(i.options);
487
+ }
488
+ process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
489
+ "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']"
490
+ ));
491
+ const s = new AbortController(), r = (i) => {
492
+ Object.defineProperty(i, "signal", {
493
+ enumerable: !0,
494
+ get: () => (this.#o = !0, s.signal)
495
+ });
496
+ }, n = () => {
497
+ const i = Pe(this.options, t), u = {
498
+ client: this.#n,
499
+ queryKey: this.queryKey,
500
+ meta: this.meta
501
+ };
502
+ return r(u), this.#o = !1, this.options.persister ? this.options.persister(
503
+ i,
504
+ u,
505
+ this
506
+ ) : i(u);
507
+ }, o = {
508
+ fetchOptions: t,
509
+ options: this.options,
510
+ queryKey: this.queryKey,
511
+ client: this.#n,
512
+ state: this.state,
513
+ fetchFn: n
514
+ };
515
+ r(o), this.options.behavior?.onFetch(
516
+ o,
517
+ this
518
+ ), this.#e = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#i({ type: "fetch", meta: o.fetchOptions?.meta });
519
+ const a = (i) => {
520
+ A(i) && i.silent || this.#i({
521
+ type: "error",
522
+ error: i
523
+ }), A(i) || (this.#s.config.onError?.(
524
+ i,
525
+ this
526
+ ), this.#s.config.onSettled?.(
527
+ this.state.data,
528
+ i,
529
+ this
530
+ )), this.scheduleGc();
531
+ };
532
+ return this.#r = je({
533
+ initialPromise: t?.initialPromise,
534
+ fn: o.fetchFn,
535
+ abort: s.abort.bind(s),
536
+ onSuccess: (i) => {
537
+ if (i === void 0) {
538
+ process.env.NODE_ENV !== "production" && console.error(
539
+ `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
540
+ ), a(new Error(`${this.queryHash} data is undefined`));
541
+ return;
542
+ }
543
+ try {
544
+ this.setData(i);
545
+ } catch (u) {
546
+ a(u);
547
+ return;
548
+ }
549
+ this.#s.config.onSuccess?.(i, this), this.#s.config.onSettled?.(
550
+ i,
551
+ this.state.error,
552
+ this
553
+ ), this.scheduleGc();
554
+ },
555
+ onError: a,
556
+ onFail: (i, u) => {
557
+ this.#i({ type: "failed", failureCount: i, error: u });
558
+ },
559
+ onPause: () => {
560
+ this.#i({ type: "pause" });
561
+ },
562
+ onContinue: () => {
563
+ this.#i({ type: "continue" });
564
+ },
565
+ retry: o.options.retry,
566
+ retryDelay: o.options.retryDelay,
567
+ networkMode: o.options.networkMode,
568
+ canRun: () => !0
569
+ }), this.#r.start();
570
+ }
571
+ #i(e) {
572
+ const t = (s) => {
573
+ switch (e.type) {
574
+ case "failed":
575
+ return {
576
+ ...s,
577
+ fetchFailureCount: e.failureCount,
578
+ fetchFailureReason: e.error
579
+ };
580
+ case "pause":
581
+ return {
582
+ ...s,
583
+ fetchStatus: "paused"
584
+ };
585
+ case "continue":
586
+ return {
587
+ ...s,
588
+ fetchStatus: "fetching"
589
+ };
590
+ case "fetch":
591
+ return {
592
+ ...s,
593
+ ...fe(s.data, this.options),
594
+ fetchMeta: e.meta ?? null
595
+ };
596
+ case "success":
597
+ return {
598
+ ...s,
599
+ data: e.data,
600
+ dataUpdateCount: s.dataUpdateCount + 1,
601
+ dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
602
+ error: null,
603
+ isInvalidated: !1,
604
+ status: "success",
605
+ ...!e.manual && {
606
+ fetchStatus: "idle",
607
+ fetchFailureCount: 0,
608
+ fetchFailureReason: null
609
+ }
610
+ };
611
+ case "error":
612
+ const r = e.error;
613
+ return A(r) && r.revert && this.#e ? { ...this.#e, fetchStatus: "idle" } : {
614
+ ...s,
615
+ error: r,
616
+ errorUpdateCount: s.errorUpdateCount + 1,
617
+ errorUpdatedAt: Date.now(),
618
+ fetchFailureCount: s.fetchFailureCount + 1,
619
+ fetchFailureReason: r,
620
+ fetchStatus: "idle",
621
+ status: "error"
622
+ };
623
+ case "invalidate":
624
+ return {
625
+ ...s,
626
+ isInvalidated: !0
627
+ };
628
+ case "setState":
629
+ return {
630
+ ...s,
631
+ ...e.state
632
+ };
633
+ }
634
+ };
635
+ this.state = t(this.state), z.batch(() => {
636
+ this.observers.forEach((s) => {
637
+ s.onQueryUpdate();
638
+ }), this.#s.notify({ query: this, type: "updated", action: e });
639
+ });
640
+ }
641
+ };
642
+ function fe(e, t) {
643
+ return {
644
+ fetchFailureCount: 0,
645
+ fetchFailureReason: null,
646
+ fetchStatus: le(t.networkMode) ? "fetching" : "paused",
647
+ ...e === void 0 && {
648
+ error: null,
649
+ status: "pending"
650
+ }
651
+ };
652
+ }
653
+ function Ue(e) {
654
+ 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;
655
+ return {
656
+ data: t,
657
+ dataUpdateCount: 0,
658
+ dataUpdatedAt: s ? r ?? Date.now() : 0,
659
+ error: null,
660
+ errorUpdateCount: 0,
661
+ errorUpdatedAt: 0,
662
+ fetchFailureCount: 0,
663
+ fetchFailureReason: null,
664
+ fetchMeta: null,
665
+ isInvalidated: !1,
666
+ status: s ? "success" : "pending",
667
+ fetchStatus: "idle"
668
+ };
669
+ }
670
+ var pe = class extends $ {
671
+ constructor(e, t) {
672
+ super(), this.options = t, this.#t = e, this.#i = null, this.#o = H(), this.options.experimental_prefetchInRender || this.#o.reject(
673
+ new Error("experimental_prefetchInRender feature flag is not enabled")
674
+ ), this.bindMethods(), this.setOptions(t);
675
+ }
676
+ #t;
677
+ #e = void 0;
678
+ #s = void 0;
679
+ #n = void 0;
680
+ #r;
681
+ #a;
682
+ #o;
683
+ #i;
684
+ #y;
685
+ #d;
686
+ // This property keeps track of the last query with defined data.
687
+ // It will be used to pass the previous data and query to the placeholder function between renders.
688
+ #f;
689
+ #c;
690
+ #h;
691
+ #u;
692
+ #p = /* @__PURE__ */ new Set();
693
+ bindMethods() {
694
+ this.refetch = this.refetch.bind(this);
695
+ }
696
+ onSubscribe() {
697
+ this.listeners.size === 1 && (this.#e.addObserver(this), se(this.#e, this.options) ? this.#l() : this.updateResult(), this.#g());
698
+ }
699
+ onUnsubscribe() {
700
+ this.hasListeners() || this.destroy();
701
+ }
702
+ shouldFetchOnReconnect() {
703
+ return K(
704
+ this.#e,
705
+ this.options,
706
+ this.options.refetchOnReconnect
707
+ );
708
+ }
709
+ shouldFetchOnWindowFocus() {
710
+ return K(
711
+ this.#e,
712
+ this.options,
713
+ this.options.refetchOnWindowFocus
714
+ );
715
+ }
716
+ destroy() {
717
+ this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#w(), this.#e.removeObserver(this);
718
+ }
719
+ setOptions(e) {
720
+ const t = this.options, s = this.#e;
721
+ if (this.options = this.#t.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof w(this.options.enabled, this.#e) != "boolean")
722
+ throw new Error(
723
+ "Expected enabled to be a boolean or a callback that returns a boolean"
724
+ );
725
+ this.#R(), this.#e.setOptions(this.options), t._defaulted && !M(this.options, t) && this.#t.getQueryCache().notify({
726
+ type: "observerOptionsUpdated",
727
+ query: this.#e,
728
+ observer: this
729
+ });
730
+ const r = this.hasListeners();
731
+ r && re(
732
+ this.#e,
733
+ s,
734
+ this.options,
735
+ t
736
+ ) && this.#l(), this.updateResult(), r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || D(this.options.staleTime, this.#e) !== D(t.staleTime, this.#e)) && this.#v();
737
+ const n = this.#b();
738
+ r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || n !== this.#u) && this.#m(n);
739
+ }
740
+ getOptimisticResult(e) {
741
+ const t = this.#t.getQueryCache().build(this.#t, e), s = this.createResult(t, e);
742
+ return Le(this, s) && (this.#n = s, this.#a = this.options, this.#r = this.#e.state), s;
743
+ }
744
+ getCurrentResult() {
745
+ return this.#n;
746
+ }
747
+ trackResult(e, t) {
748
+ const s = {};
749
+ return Object.keys(e).forEach((r) => {
750
+ Object.defineProperty(s, r, {
751
+ configurable: !1,
752
+ enumerable: !0,
753
+ get: () => (this.trackProp(r), t?.(r), e[r])
754
+ });
755
+ }), s;
756
+ }
757
+ trackProp(e) {
758
+ this.#p.add(e);
759
+ }
760
+ getCurrentQuery() {
761
+ return this.#e;
762
+ }
763
+ refetch({ ...e } = {}) {
764
+ return this.fetch({
765
+ ...e
766
+ });
767
+ }
768
+ fetchOptimistic(e) {
769
+ const t = this.#t.defaultQueryOptions(e), s = this.#t.getQueryCache().build(this.#t, t);
770
+ return s.fetch().then(() => this.createResult(s, t));
771
+ }
772
+ fetch(e) {
773
+ return this.#l({
774
+ ...e,
775
+ cancelRefetch: e.cancelRefetch ?? !0
776
+ }).then(() => (this.updateResult(), this.#n));
777
+ }
778
+ #l(e) {
779
+ this.#R();
780
+ let t = this.#e.fetch(
781
+ this.options,
782
+ e
783
+ );
784
+ return e?.throwOnError || (t = t.catch(q)), t;
785
+ }
786
+ #v() {
787
+ this.#S();
788
+ const e = D(
789
+ this.options.staleTime,
790
+ this.#e
791
+ );
792
+ if (C || this.#n.isStale || !U(e))
793
+ return;
794
+ const s = ue(this.#n.dataUpdatedAt, e) + 1;
795
+ this.#c = setTimeout(() => {
796
+ this.#n.isStale || this.updateResult();
797
+ }, s);
798
+ }
799
+ #b() {
800
+ return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
801
+ }
802
+ #m(e) {
803
+ this.#w(), this.#u = e, !(C || w(this.options.enabled, this.#e) === !1 || !U(this.#u) || this.#u === 0) && (this.#h = setInterval(() => {
804
+ (this.options.refetchIntervalInBackground || ce.isFocused()) && this.#l();
805
+ }, this.#u));
806
+ }
807
+ #g() {
808
+ this.#v(), this.#m(this.#b());
809
+ }
810
+ #S() {
811
+ this.#c && (clearTimeout(this.#c), this.#c = void 0);
812
+ }
813
+ #w() {
814
+ this.#h && (clearInterval(this.#h), this.#h = void 0);
815
+ }
816
+ createResult(e, t) {
817
+ const s = this.#e, r = this.options, n = this.#n, o = this.#r, a = this.#a, u = e !== s ? e.state : this.#s, { state: l } = e;
818
+ let h = { ...l }, p = !1, d;
819
+ if (t._optimisticResults) {
820
+ const g = this.hasListeners(), T = !g && se(e, t), I = g && re(e, s, t, r);
821
+ (T || I) && (h = {
822
+ ...h,
823
+ ...fe(l.data, e.options)
824
+ }), t._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
825
+ }
826
+ let { error: b, errorUpdatedAt: O, status: c } = h;
827
+ d = h.data;
828
+ let m = !1;
829
+ if (t.placeholderData !== void 0 && d === void 0 && c === "pending") {
830
+ let g;
831
+ n?.isPlaceholderData && t.placeholderData === a?.placeholderData ? (g = n.data, m = !0) : g = typeof t.placeholderData == "function" ? t.placeholderData(
832
+ this.#f?.state.data,
833
+ this.#f
834
+ ) : t.placeholderData, g !== void 0 && (c = "success", d = _(
835
+ n?.data,
836
+ g,
837
+ t
838
+ ), p = !0);
839
+ }
840
+ if (t.select && d !== void 0 && !m)
841
+ if (n && d === o?.data && t.select === this.#y)
842
+ d = this.#d;
843
+ else
844
+ try {
845
+ this.#y = t.select, d = t.select(d), d = _(n?.data, d, t), this.#d = d, this.#i = null;
846
+ } catch (g) {
847
+ this.#i = g;
848
+ }
849
+ this.#i && (b = this.#i, d = this.#d, O = Date.now(), c = "error");
850
+ const v = h.fetchStatus === "fetching", f = c === "pending", y = c === "error", E = f && v, F = d !== void 0, R = {
851
+ status: c,
852
+ fetchStatus: h.fetchStatus,
853
+ isPending: f,
854
+ isSuccess: c === "success",
855
+ isError: y,
856
+ isInitialLoading: E,
857
+ isLoading: E,
858
+ data: d,
859
+ dataUpdatedAt: h.dataUpdatedAt,
860
+ error: b,
861
+ errorUpdatedAt: O,
862
+ failureCount: h.fetchFailureCount,
863
+ failureReason: h.fetchFailureReason,
864
+ errorUpdateCount: h.errorUpdateCount,
865
+ isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
866
+ isFetchedAfterMount: h.dataUpdateCount > u.dataUpdateCount || h.errorUpdateCount > u.errorUpdateCount,
867
+ isFetching: v,
868
+ isRefetching: v && !f,
869
+ isLoadingError: y && !F,
870
+ isPaused: h.fetchStatus === "paused",
871
+ isPlaceholderData: p,
872
+ isRefetchError: y && F,
873
+ isStale: V(e, t),
874
+ refetch: this.refetch,
875
+ promise: this.#o
876
+ };
877
+ if (this.options.experimental_prefetchInRender) {
878
+ const g = (k) => {
879
+ R.status === "error" ? k.reject(R.error) : R.data !== void 0 && k.resolve(R.data);
880
+ }, T = () => {
881
+ const k = this.#o = R.promise = H();
882
+ g(k);
883
+ }, I = this.#o;
884
+ switch (I.status) {
885
+ case "pending":
886
+ e.queryHash === s.queryHash && g(I);
887
+ break;
888
+ case "fulfilled":
889
+ (R.status === "error" || R.data !== I.value) && T();
890
+ break;
891
+ case "rejected":
892
+ (R.status !== "error" || R.error !== I.reason) && T();
893
+ break;
894
+ }
895
+ }
896
+ return R;
897
+ }
898
+ updateResult() {
899
+ const e = this.#n, t = this.createResult(this.#e, this.options);
900
+ if (this.#r = this.#e.state, this.#a = this.options, this.#r.data !== void 0 && (this.#f = this.#e), M(t, e))
901
+ return;
902
+ this.#n = t;
903
+ const s = () => {
904
+ if (!e)
905
+ return !0;
906
+ const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
907
+ if (n === "all" || !n && !this.#p.size)
908
+ return !0;
909
+ const o = new Set(
910
+ n ?? this.#p
911
+ );
912
+ return this.options.throwOnError && o.add("error"), Object.keys(this.#n).some((a) => {
913
+ const i = a;
914
+ return this.#n[i] !== e[i] && o.has(i);
915
+ });
916
+ };
917
+ this.#O({ listeners: s() });
918
+ }
919
+ #R() {
920
+ const e = this.#t.getQueryCache().build(this.#t, this.options);
921
+ if (e === this.#e)
922
+ return;
923
+ const t = this.#e;
924
+ this.#e = e, this.#s = e.state, this.hasListeners() && (t?.removeObserver(this), e.addObserver(this));
925
+ }
926
+ onQueryUpdate() {
927
+ this.updateResult(), this.hasListeners() && this.#g();
928
+ }
929
+ #O(e) {
930
+ z.batch(() => {
931
+ e.listeners && this.listeners.forEach((t) => {
932
+ t(this.#n);
933
+ }), this.#t.getQueryCache().notify({
934
+ query: this.#e,
935
+ type: "observerResultsUpdated"
936
+ });
937
+ });
938
+ }
939
+ };
940
+ function Qe(e, t) {
941
+ return w(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
942
+ }
943
+ function se(e, t) {
944
+ return Qe(e, t) || e.state.data !== void 0 && K(e, t, t.refetchOnMount);
945
+ }
946
+ function K(e, t, s) {
947
+ if (w(t.enabled, e) !== !1) {
948
+ const r = typeof s == "function" ? s(e) : s;
949
+ return r === "always" || r !== !1 && V(e, t);
950
+ }
951
+ return !1;
952
+ }
953
+ function re(e, t, s, r) {
954
+ return (e !== t || w(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && V(e, s);
955
+ }
956
+ function V(e, t) {
957
+ return w(t.enabled, e) !== !1 && e.isStaleByTime(D(t.staleTime, e));
958
+ }
959
+ function Le(e, t) {
960
+ return !M(e.getCurrentResult(), t);
961
+ }
962
+ var ye = S.createContext(
963
+ void 0
964
+ ), ve = (e) => {
965
+ const t = S.useContext(ye);
966
+ if (e)
967
+ return e;
968
+ if (!t)
969
+ throw new Error("No QueryClient set, use QueryClientProvider to set one");
970
+ return t;
971
+ }, Et = ({
972
+ client: e,
973
+ children: t
974
+ }) => (S.useEffect(() => (e.mount(), () => {
975
+ e.unmount();
976
+ }), [e]), /* @__PURE__ */ Ce.jsx(ye.Provider, { value: e, children: t })), be = S.createContext(!1), Me = () => S.useContext(be);
977
+ be.Provider;
978
+ function Ne() {
979
+ let e = !1;
980
+ return {
981
+ clearReset: () => {
982
+ e = !1;
983
+ },
984
+ reset: () => {
985
+ e = !0;
986
+ },
987
+ isReset: () => e
988
+ };
989
+ }
990
+ var _e = S.createContext(Ne()), He = () => S.useContext(_e);
991
+ function Ke(e, t) {
992
+ return typeof e == "function" ? e(...t) : !!e;
993
+ }
994
+ function ne() {
995
+ }
996
+ var Be = (e, t) => {
997
+ (e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
998
+ }, $e = (e) => {
999
+ S.useEffect(() => {
1000
+ e.clearReset();
1001
+ }, [e]);
1002
+ }, Ge = ({
1003
+ result: e,
1004
+ errorResetBoundary: t,
1005
+ throwOnError: s,
1006
+ query: r,
1007
+ suspense: n
1008
+ }) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || Ke(s, [e.error, r])), ze = (e, t) => t.state.data === void 0, Ve = (e) => {
1009
+ const t = e.staleTime;
1010
+ e.suspense && (e.staleTime = typeof t == "function" ? (...s) => Math.max(t(...s), 1e3) : Math.max(t ?? 1e3, 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
1011
+ }, Je = (e, t) => e.isLoading && e.isFetching && !t, Ze = (e, t) => e?.suspense && t.isPending, ie = (e, t, s) => t.fetchOptimistic(e).catch(() => {
1012
+ s.clearReset();
1013
+ });
1014
+ function me(e, t, s) {
1015
+ if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
1016
+ throw new Error(
1017
+ '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'
1018
+ );
1019
+ const r = ve(s), n = Me(), o = He(), a = r.defaultQueryOptions(e);
1020
+ r.getDefaultOptions().queries?._experimental_beforeQuery?.(
1021
+ a
1022
+ ), process.env.NODE_ENV !== "production" && (a.queryFn || console.error(
1023
+ `[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
1024
+ )), a._optimisticResults = n ? "isRestoring" : "optimistic", Ve(a), Be(a, o), $e(o);
1025
+ const i = !r.getQueryCache().get(a.queryHash), [u] = S.useState(
1026
+ () => new t(
1027
+ r,
1028
+ a
1029
+ )
1030
+ ), l = u.getOptimisticResult(a), h = !n && e.subscribed !== !1;
1031
+ if (S.useSyncExternalStore(
1032
+ S.useCallback(
1033
+ (p) => {
1034
+ const d = h ? u.subscribe(z.batchCalls(p)) : ne;
1035
+ return u.updateResult(), d;
1036
+ },
1037
+ [u, h]
1038
+ ),
1039
+ () => u.getCurrentResult(),
1040
+ () => u.getCurrentResult()
1041
+ ), S.useEffect(() => {
1042
+ u.setOptions(a);
1043
+ }, [a, u]), Ze(a, l))
1044
+ throw ie(a, u, o);
1045
+ if (Ge({
1046
+ result: l,
1047
+ errorResetBoundary: o,
1048
+ throwOnError: a.throwOnError,
1049
+ query: r.getQueryCache().get(a.queryHash),
1050
+ suspense: a.suspense
1051
+ }))
1052
+ throw l.error;
1053
+ return r.getDefaultOptions().queries?._experimental_afterQuery?.(
1054
+ a,
1055
+ l
1056
+ ), a.experimental_prefetchInRender && !C && Je(l, n) && (i ? (
1057
+ // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
1058
+ ie(a, u, o)
1059
+ ) : (
1060
+ // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
1061
+ r.getQueryCache().get(a.queryHash)?.promise
1062
+ ))?.catch(ne).finally(() => {
1063
+ u.updateResult();
1064
+ }), a.notifyOnChangeProps ? l : u.trackResult(l);
1065
+ }
1066
+ function We(e, t) {
1067
+ return me(e, pe, t);
1068
+ }
1069
+ function Ye(e, t) {
1070
+ return process.env.NODE_ENV !== "production" && e.queryFn === j && console.error("skipToken is not allowed for useSuspenseQuery"), me(
1071
+ {
1072
+ ...e,
1073
+ enabled: !0,
1074
+ suspense: !0,
1075
+ throwOnError: ze,
1076
+ placeholderData: void 0
1077
+ },
1078
+ pe,
1079
+ t
1080
+ );
1081
+ }
1082
+ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
1083
+ (t) => t != null && t !== !1 && (typeof t == "string" || typeof t == "number")
1084
+ ).map((t) => `${t}`).filter((t) => t), tt = (e) => {
1085
+ const t = e.join("/"), [, s = "", r = ""] = t.match(Xe) ?? [];
1086
+ return {
1087
+ prefix: s,
1088
+ pathname: r.split("/").filter((n) => n !== "")
1089
+ };
1090
+ }, st = (e) => {
1091
+ const { prefix: t, pathname: s } = e;
1092
+ let r = t;
1093
+ return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
1094
+ }, oe = (...e) => {
1095
+ const t = et(e), s = tt(t);
1096
+ return st(s);
1097
+ }, ge = Object.freeze({
1098
+ API_IDENTITIES: ["api-identities"]
1099
+ }), Ct = () => {
1100
+ const e = ve();
1101
+ return {
1102
+ invalidateCache: async (t) => {
1103
+ await e.invalidateQueries({ queryKey: ge[t] });
1104
+ }
1105
+ };
1106
+ }, P = (...e) => {
1107
+ const t = e.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
1108
+ return t ? `/${t}` : "/";
1109
+ }, J = (e, t) => {
1110
+ for (const s of e) {
1111
+ const r = Z(s, t);
1112
+ if (r !== void 0) return r;
1113
+ }
1114
+ }, Z = (e, t, s = []) => {
1115
+ const r = t(e, s);
1116
+ if (r !== void 0) return r;
1117
+ if (e.type === "category")
1118
+ for (const n of e.items) {
1119
+ const o = Z(n, t, [
1120
+ ...s,
1121
+ e
1122
+ ]);
1123
+ if (o !== void 0) return o;
1124
+ }
1125
+ }, Ft = () => {
1126
+ const e = x(), s = Se().sidebar;
1127
+ return J(s, (r) => {
1128
+ if (r.type === "doc" && P(r.id) === e.pathname)
1129
+ return r;
1130
+ });
1131
+ }, It = (e) => {
1132
+ const t = x();
1133
+ return Z(e, (s) => {
1134
+ if (s.type === "category" && s.link && P(s.link.id) === t.pathname || s.type === "doc" && P(s.id) === t.pathname)
1135
+ return !0;
1136
+ });
1137
+ }, Pt = () => {
1138
+ const e = x().pathname, s = Se().sidebar;
1139
+ let r, n, o = !1;
1140
+ return J(s, (a) => {
1141
+ const i = a.type === "doc" ? P(a.id) : a.type === "category" && a.link ? P(a.link.id) : void 0;
1142
+ if (i) {
1143
+ if (o)
1144
+ return n = { label: a.label, id: i }, !0;
1145
+ e === i ? o = !0 : r = { label: a.label, id: i };
1146
+ }
1147
+ }), { prev: r, next: n };
1148
+ }, rt = Oe(
1149
+ void 0
1150
+ ), W = () => {
1151
+ const e = Ee(rt);
1152
+ if (!e)
1153
+ throw new Error("useZudoku must be used within a ZudokuProvider.");
1154
+ return e;
1155
+ }, Tt = () => {
1156
+ const { getApiIdentities: e } = W();
1157
+ return We({
1158
+ queryFn: e,
1159
+ queryKey: ge.API_IDENTITIES
1160
+ });
1161
+ }, Se = () => {
1162
+ const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n = x(), o = dt(), a = r.protectedRoutes?.some(
1163
+ (p) => X(p, n.pathname)
1164
+ );
1165
+ let i = Object.entries(t).find(([, p]) => J(p, (d) => {
1166
+ if ((d.type === "doc" ? oe(d.id) : d.type === "category" && d.link ? oe(d.link.id) : void 0) === n.pathname)
1167
+ return d;
1168
+ }));
1169
+ const u = s.find((p) => p.id === i?.[0]) ?? s.find((p) => X(p.id, n.pathname));
1170
+ u && !i && u.id in t && (i = ["", t[u.id]]);
1171
+ const { data: l } = Ye({
1172
+ queryFn: () => e(n.pathname),
1173
+ queryKey: ["plugin-sidebar", n.pathname]
1174
+ });
1175
+ return {
1176
+ sidebar: o.isAuthEnabled && !o.isAuthenticated && a ? [] : [...i ? i[1] : [], ...l],
1177
+ topNavItem: u
1178
+ };
1179
+ }, ae = (e) => {
1180
+ let t;
1181
+ const s = /* @__PURE__ */ new Set(), r = (l, h) => {
1182
+ const p = typeof l == "function" ? l(t) : l;
1183
+ if (!Object.is(p, t)) {
1184
+ const d = t;
1185
+ t = h ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), s.forEach((b) => b(t, d));
1186
+ }
1187
+ }, n = () => t, i = { setState: r, getState: n, getInitialState: () => u, subscribe: (l) => (s.add(l), () => s.delete(l)) }, u = t = e(r, n, i);
1188
+ return i;
1189
+ }, nt = (e) => e ? ae(e) : ae, it = (e) => e;
1190
+ function ot(e, t = it) {
1191
+ const s = Y.useSyncExternalStore(
1192
+ e.subscribe,
1193
+ () => t(e.getState()),
1194
+ () => t(e.getInitialState())
1195
+ );
1196
+ return Y.useDebugValue(s), s;
1197
+ }
1198
+ const at = (e) => {
1199
+ const t = nt(e), s = (r) => ot(t, r);
1200
+ return Object.assign(s, t), s;
1201
+ }, ut = (e) => at;
1202
+ function we(e, t) {
1203
+ let s;
1204
+ try {
1205
+ s = e();
1206
+ } catch {
1207
+ return;
1208
+ }
1209
+ return {
1210
+ getItem: (n) => {
1211
+ var o;
1212
+ const a = (u) => u === null ? null : JSON.parse(u, void 0), i = (o = s.getItem(n)) != null ? o : null;
1213
+ return i instanceof Promise ? i.then(a) : a(i);
1214
+ },
1215
+ setItem: (n, o) => s.setItem(
1216
+ n,
1217
+ JSON.stringify(o, void 0)
1218
+ ),
1219
+ removeItem: (n) => s.removeItem(n)
1220
+ };
1221
+ }
1222
+ const B = (e) => (t) => {
1223
+ try {
1224
+ const s = e(t);
1225
+ return s instanceof Promise ? s : {
1226
+ then(r) {
1227
+ return B(r)(s);
1228
+ },
1229
+ catch(r) {
1230
+ return this;
1231
+ }
1232
+ };
1233
+ } catch (s) {
1234
+ return {
1235
+ then(r) {
1236
+ return this;
1237
+ },
1238
+ catch(r) {
1239
+ return B(r)(s);
1240
+ }
1241
+ };
1242
+ }
1243
+ }, ct = (e, t) => (s, r, n) => {
1244
+ let o = {
1245
+ storage: we(() => localStorage),
1246
+ partialize: (c) => c,
1247
+ version: 0,
1248
+ merge: (c, m) => ({
1249
+ ...m,
1250
+ ...c
1251
+ }),
1252
+ ...t
1253
+ }, a = !1;
1254
+ const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
1255
+ let l = o.storage;
1256
+ if (!l)
1257
+ return e(
1258
+ (...c) => {
1259
+ console.warn(
1260
+ `[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`
1261
+ ), s(...c);
1262
+ },
1263
+ r,
1264
+ n
1265
+ );
1266
+ const h = () => {
1267
+ const c = o.partialize({ ...r() });
1268
+ return l.setItem(o.name, {
1269
+ state: c,
1270
+ version: o.version
1271
+ });
1272
+ }, p = n.setState;
1273
+ n.setState = (c, m) => {
1274
+ p(c, m), h();
1275
+ };
1276
+ const d = e(
1277
+ (...c) => {
1278
+ s(...c), h();
1279
+ },
1280
+ r,
1281
+ n
1282
+ );
1283
+ n.getInitialState = () => d;
1284
+ let b;
1285
+ const O = () => {
1286
+ var c, m;
1287
+ if (!l) return;
1288
+ a = !1, i.forEach((f) => {
1289
+ var y;
1290
+ return f((y = r()) != null ? y : d);
1291
+ });
1292
+ const v = ((m = o.onRehydrateStorage) == null ? void 0 : m.call(o, (c = r()) != null ? c : d)) || void 0;
1293
+ return B(l.getItem.bind(l))(o.name).then((f) => {
1294
+ if (f)
1295
+ if (typeof f.version == "number" && f.version !== o.version) {
1296
+ if (o.migrate) {
1297
+ const y = o.migrate(
1298
+ f.state,
1299
+ f.version
1300
+ );
1301
+ return y instanceof Promise ? y.then((E) => [!0, E]) : [!0, y];
1302
+ }
1303
+ console.error(
1304
+ "State loaded from storage couldn't be migrated since no migrate function was provided"
1305
+ );
1306
+ } else
1307
+ return [!1, f.state];
1308
+ return [!1, void 0];
1309
+ }).then((f) => {
1310
+ var y;
1311
+ const [E, F] = f;
1312
+ if (b = o.merge(
1313
+ F,
1314
+ (y = r()) != null ? y : d
1315
+ ), s(b, !0), E)
1316
+ return h();
1317
+ }).then(() => {
1318
+ v?.(b, void 0), b = r(), a = !0, u.forEach((f) => f(b));
1319
+ }).catch((f) => {
1320
+ v?.(void 0, f);
1321
+ });
1322
+ };
1323
+ return n.persist = {
1324
+ setOptions: (c) => {
1325
+ o = {
1326
+ ...o,
1327
+ ...c
1328
+ }, c.storage && (l = c.storage);
1329
+ },
1330
+ clearStorage: () => {
1331
+ l?.removeItem(o.name);
1332
+ },
1333
+ getOptions: () => o,
1334
+ rehydrate: () => O(),
1335
+ hasHydrated: () => a,
1336
+ onHydrate: (c) => (i.add(c), () => {
1337
+ i.delete(c);
1338
+ }),
1339
+ onFinishHydration: (c) => (u.add(c), () => {
1340
+ u.delete(c);
1341
+ })
1342
+ }, o.skipHydration || O(), b || d;
1343
+ }, ht = ct, lt = (e) => {
1344
+ const t = (s) => {
1345
+ s.key === e.persist.getOptions().name && s.newValue && e.persist.rehydrate();
1346
+ };
1347
+ return window.addEventListener("storage", t), () => {
1348
+ window.removeEventListener("storage", t);
1349
+ };
1350
+ }, Re = ut()(
1351
+ ht(
1352
+ (e) => ({
1353
+ isAuthenticated: !1,
1354
+ isPending: !0,
1355
+ profile: null,
1356
+ providerData: null
1357
+ }),
1358
+ {
1359
+ merge: (e, t) => ({
1360
+ ...t,
1361
+ isPending: !1,
1362
+ ...typeof e == "object" ? e : {}
1363
+ }),
1364
+ name: "auth-state",
1365
+ storage: we(() => localStorage)
1366
+ }
1367
+ )
1368
+ );
1369
+ typeof window < "u" && lt(Re);
1370
+ const dt = () => {
1371
+ const { authentication: e } = W(), t = Re(), s = typeof e < "u";
1372
+ return {
1373
+ isAuthEnabled: s,
1374
+ ...t,
1375
+ login: async () => {
1376
+ if (!s)
1377
+ throw new Error("Authentication is not enabled.");
1378
+ await e.signIn({
1379
+ redirectTo: window.location.href
1380
+ });
1381
+ },
1382
+ logout: async () => {
1383
+ if (!s)
1384
+ throw new Error("Authentication is not enabled.");
1385
+ await e.signOut(), window.location.href = "/";
1386
+ },
1387
+ signup: async () => {
1388
+ if (!s)
1389
+ throw new Error("Authentication is not enabled.");
1390
+ await e.signUp({
1391
+ redirectTo: window.location.href
1392
+ });
1393
+ }
1394
+ };
1395
+ };
1396
+ export {
1397
+ D as A,
1398
+ bt as B,
1399
+ G as C,
1400
+ j as D,
1401
+ Et as E,
1402
+ Se as F,
1403
+ J as G,
1404
+ Ct as H,
1405
+ ge as I,
1406
+ ut as J,
1407
+ ht as K,
1408
+ we as L,
1409
+ Tt as M,
1410
+ It as N,
1411
+ Ot as Q,
1412
+ qe as R,
1413
+ $ as S,
1414
+ rt as Z,
1415
+ Ft as a,
1416
+ Pt as b,
1417
+ je as c,
1418
+ Ye as d,
1419
+ W as e,
1420
+ oe as f,
1421
+ ve as g,
1422
+ Q as h,
1423
+ ne as i,
1424
+ P as j,
1425
+ Ke as k,
1426
+ dt as l,
1427
+ We as m,
1428
+ z as n,
1429
+ St as o,
1430
+ Fe as p,
1431
+ mt as q,
1432
+ gt as r,
1433
+ M as s,
1434
+ q as t,
1435
+ Re as u,
1436
+ Pe as v,
1437
+ Rt as w,
1438
+ wt as x,
1439
+ ce as y,
1440
+ he as z
1441
+ };
1442
+ //# sourceMappingURL=hook-BwOB_iZo.js.map