zudoku 0.51.0 → 0.52.0

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 (312) hide show
  1. package/dist/config/validators/InputNavigationSchema.d.ts +152 -0
  2. package/dist/config/validators/icon-types.d.ts +1 -1
  3. package/dist/config/validators/icon-types.js +38 -0
  4. package/dist/config/validators/icon-types.js.map +1 -1
  5. package/dist/config/validators/validate.d.ts +10 -0
  6. package/dist/config/validators/validate.js +7 -0
  7. package/dist/config/validators/validate.js.map +1 -1
  8. package/dist/flat-config.d.ts +6 -1
  9. package/dist/lib/components/Autocomplete.js +1 -1
  10. package/dist/lib/components/Autocomplete.js.map +1 -1
  11. package/dist/lib/components/ErrorPage.js +2 -2
  12. package/dist/lib/components/ErrorPage.js.map +1 -1
  13. package/dist/lib/components/Markdown.d.ts +0 -1
  14. package/dist/lib/components/Markdown.js +2 -3
  15. package/dist/lib/components/Markdown.js.map +1 -1
  16. package/dist/lib/components/NotFoundPage.js +2 -2
  17. package/dist/lib/components/NotFoundPage.js.map +1 -1
  18. package/dist/lib/components/Pagination.js +1 -1
  19. package/dist/lib/components/Pagination.js.map +1 -1
  20. package/dist/lib/components/Typography.d.ts +5 -0
  21. package/dist/lib/components/Typography.js +8 -0
  22. package/dist/lib/components/Typography.js.map +1 -0
  23. package/dist/lib/components/index.d.ts +4 -0
  24. package/dist/lib/components/index.js +2 -0
  25. package/dist/lib/components/index.js.map +1 -1
  26. package/dist/lib/errors/ErrorAlert.js +2 -3
  27. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  28. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  29. package/dist/lib/hooks/useHotkey.js +58 -0
  30. package/dist/lib/hooks/useHotkey.js.map +1 -0
  31. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
  32. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  33. package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
  34. package/dist/lib/plugins/custom-pages/index.js +1 -3
  35. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  36. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
  37. package/dist/lib/plugins/markdown/MdxPage.js +22 -6
  38. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  39. package/dist/lib/plugins/markdown/index.d.ts +8 -1
  40. package/dist/lib/plugins/markdown/index.js +1 -1
  41. package/dist/lib/plugins/markdown/index.js.map +1 -1
  42. package/dist/lib/plugins/openapi/OperationList.js +2 -3
  43. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  44. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  45. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  46. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  47. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  48. package/dist/lib/plugins/openapi/SchemaList.js +2 -3
  49. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  50. package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
  51. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  52. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  53. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  54. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  55. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
  56. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  57. package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
  58. package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
  59. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  60. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  61. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  62. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
  63. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  64. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  65. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  66. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  67. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  68. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  69. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  70. package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
  71. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  72. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  73. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  74. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
  75. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  76. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  78. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  79. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  80. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  81. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  82. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  87. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  88. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  89. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
  90. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
  91. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
  93. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
  94. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  98. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
  99. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  100. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
  101. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  102. package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
  103. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  104. package/dist/lib/plugins/openapi/schema/utils.js +3 -2
  105. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  106. package/dist/lib/ui/CodeBlock.js +5 -6
  107. package/dist/lib/ui/CodeBlock.js.map +1 -1
  108. package/dist/lib/ui/Dialog.js +1 -1
  109. package/dist/lib/ui/Dialog.js.map +1 -1
  110. package/dist/lib/ui/Select.js +1 -1
  111. package/dist/lib/util/os.d.ts +2 -0
  112. package/dist/lib/util/os.js +21 -0
  113. package/dist/lib/util/os.js.map +1 -0
  114. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  115. package/dist/lib/util/useCopyToClipboard.js +11 -0
  116. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  117. package/dist/vite/api/SchemaManager.js +6 -2
  118. package/dist/vite/api/SchemaManager.js.map +1 -1
  119. package/dist/vite/api/schema-codegen.js +42 -11
  120. package/dist/vite/api/schema-codegen.js.map +1 -1
  121. package/dist/vite/api/schema-codegen.test.js +82 -0
  122. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  123. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  124. package/dist/vite/mdx/remark-last-modified.js +56 -0
  125. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  126. package/dist/vite/mdx/utils.d.ts +2 -0
  127. package/dist/vite/mdx/utils.js +31 -0
  128. package/dist/vite/mdx/utils.js.map +1 -0
  129. package/dist/vite/plugin-frontmatter.js +4 -2
  130. package/dist/vite/plugin-frontmatter.js.map +1 -1
  131. package/dist/vite/plugin-mdx.js +11 -33
  132. package/dist/vite/plugin-mdx.js.map +1 -1
  133. package/dist/vite/plugin-theme.js +21 -9
  134. package/dist/vite/plugin-theme.js.map +1 -1
  135. package/dist/vite/plugin-theme.test.js +22 -1
  136. package/dist/vite/plugin-theme.test.js.map +1 -1
  137. package/lib/Alert-CT_ViLrJ.js +161 -0
  138. package/lib/Alert-CT_ViLrJ.js.map +1 -0
  139. package/lib/CodeBlock-DAKxs_Tu.js +85 -0
  140. package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
  141. package/lib/Command-CPtGTZAL.js +140 -0
  142. package/lib/Command-CPtGTZAL.js.map +1 -0
  143. package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
  144. package/lib/Dialog-DGlrUTCS.js.map +1 -0
  145. package/lib/MdxPage-D-QSUlMf.js +110 -0
  146. package/lib/MdxPage-D-QSUlMf.js.map +1 -0
  147. package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DS23Ds76.js} +3 -3
  148. package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DS23Ds76.js.map} +1 -1
  149. package/lib/{OperationList-Dpip6ozi.js → OperationList-CLidyzBx.js} +578 -567
  150. package/lib/OperationList-CLidyzBx.js.map +1 -0
  151. package/lib/Pagination-ClHXydm9.js +36 -0
  152. package/lib/Pagination-ClHXydm9.js.map +1 -0
  153. package/lib/RouteGuard-Bd-ppFbi.js +737 -0
  154. package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
  155. package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-AJ8eFhvU.js} +26 -37
  156. package/lib/SchemaList-AJ8eFhvU.js.map +1 -0
  157. package/lib/{SchemaView-CLxthVcA.js → SchemaView-B9MTum2V.js} +94 -103
  158. package/lib/SchemaView-B9MTum2V.js.map +1 -0
  159. package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
  160. package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
  161. package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
  162. package/lib/Slot-DwZlQ-vX.js.map +1 -0
  163. package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
  164. package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
  165. package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
  166. package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
  167. package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
  168. package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
  169. package/lib/{circular-DfOaDE_x.js → circular-0wOQ8KUO.js} +2 -2
  170. package/lib/{circular-DfOaDE_x.js.map → circular-0wOQ8KUO.js.map} +1 -1
  171. package/lib/clerk-BDZ31hjU.js +25190 -0
  172. package/lib/clerk-BDZ31hjU.js.map +1 -0
  173. package/lib/{createServer-DjOMygls.js → createServer-Brtv5_hp.js} +4 -4
  174. package/lib/{createServer-DjOMygls.js.map → createServer-Brtv5_hp.js.map} +1 -1
  175. package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
  176. package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
  177. package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
  178. package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
  179. package/lib/index-BIbCx5Fh.js +3919 -0
  180. package/lib/index-BIbCx5Fh.js.map +1 -0
  181. package/lib/index-BoBGmARR.js +3458 -0
  182. package/lib/index-BoBGmARR.js.map +1 -0
  183. package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
  184. package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
  185. package/lib/index-ClhS5TxS.js +107 -0
  186. package/lib/index-ClhS5TxS.js.map +1 -0
  187. package/lib/ui/CodeBlock.js +6 -73
  188. package/lib/ui/CodeBlock.js.map +1 -1
  189. package/lib/ui/Command.js +1 -1
  190. package/lib/ui/Dialog.js +1 -1
  191. package/lib/ui/Dialog.js.map +1 -1
  192. package/lib/ui/Select.js +1 -1
  193. package/lib/ui/Select.js.map +1 -1
  194. package/lib/ui/SyntaxHighlight.js +3 -3
  195. package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
  196. package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
  197. package/lib/zudoku.auth-auth0.js +1 -1
  198. package/lib/zudoku.auth-azureb2c.js +2 -2
  199. package/lib/zudoku.auth-clerk.js +3 -3
  200. package/lib/zudoku.auth-openid.js +2 -2
  201. package/lib/zudoku.components.js +33 -3534
  202. package/lib/zudoku.components.js.map +1 -1
  203. package/lib/zudoku.hooks.js +10 -11
  204. package/lib/zudoku.hooks.js.map +1 -1
  205. package/lib/zudoku.plugin-api-catalog.js +6 -6
  206. package/lib/zudoku.plugin-api-keys.js +268 -321
  207. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  208. package/lib/zudoku.plugin-custom-pages.js +8 -20
  209. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  210. package/lib/zudoku.plugin-markdown.js +4 -5
  211. package/lib/zudoku.plugin-markdown.js.map +1 -1
  212. package/lib/zudoku.plugin-openapi.js +3 -3
  213. package/lib/zudoku.plugin-redirect.js +1 -1
  214. package/lib/zudoku.plugin-search-pagefind.js +201 -111
  215. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  216. package/package.json +5 -4
  217. package/src/lib/components/Autocomplete.tsx +1 -0
  218. package/src/lib/components/ErrorPage.tsx +3 -3
  219. package/src/lib/components/Markdown.tsx +3 -5
  220. package/src/lib/components/NotFoundPage.tsx +3 -3
  221. package/src/lib/components/Pagination.tsx +4 -4
  222. package/src/lib/components/Typography.tsx +14 -0
  223. package/src/lib/components/index.ts +2 -0
  224. package/src/lib/errors/ErrorAlert.tsx +3 -9
  225. package/src/lib/hooks/useHotkey.ts +70 -0
  226. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
  227. package/src/lib/plugins/custom-pages/index.tsx +2 -6
  228. package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
  229. package/src/lib/plugins/markdown/index.tsx +10 -2
  230. package/src/lib/plugins/openapi/OperationList.tsx +7 -17
  231. package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
  232. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
  233. package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
  234. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
  235. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  236. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
  237. package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
  238. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
  239. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
  240. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  241. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  242. package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
  243. package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
  244. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  245. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
  246. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  247. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  248. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  249. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  250. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
  251. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
  252. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
  253. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
  254. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
  255. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
  256. package/src/lib/plugins/openapi/schema/utils.ts +3 -2
  257. package/src/lib/ui/CodeBlock.tsx +5 -6
  258. package/src/lib/ui/Dialog.tsx +1 -1
  259. package/src/lib/ui/Select.tsx +1 -1
  260. package/src/lib/util/os.ts +18 -0
  261. package/src/lib/util/useCopyToClipboard.ts +17 -0
  262. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  263. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  264. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  265. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  266. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  267. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  268. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  269. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  270. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  271. package/lib/Callout-CoVxYafP.js +0 -231
  272. package/lib/Callout-CoVxYafP.js.map +0 -1
  273. package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
  274. package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
  275. package/lib/Dialog-BxpuVLh9.js.map +0 -1
  276. package/lib/Markdown-BQ8YqLsz.js.map +0 -1
  277. package/lib/MdxPage-DJvKmI-r.js +0 -84
  278. package/lib/MdxPage-DJvKmI-r.js.map +0 -1
  279. package/lib/OperationList-Dpip6ozi.js.map +0 -1
  280. package/lib/Pagination-CCxhL836.js +0 -36
  281. package/lib/Pagination-CCxhL836.js.map +0 -1
  282. package/lib/RouteGuard-gV7nvzi7.js +0 -55
  283. package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
  284. package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
  285. package/lib/SchemaView-CLxthVcA.js.map +0 -1
  286. package/lib/Slot-CSEIvwwO.js +0 -161
  287. package/lib/Slot-CSEIvwwO.js.map +0 -1
  288. package/lib/clerk-yAKDC3Qz.js +0 -24812
  289. package/lib/clerk-yAKDC3Qz.js.map +0 -1
  290. package/lib/index--oeBayMa.js +0 -86
  291. package/lib/index--oeBayMa.js.map +0 -1
  292. package/lib/index-Bn6Lc9tq.js +0 -9
  293. package/lib/index-Bn6Lc9tq.js.map +0 -1
  294. package/lib/index-DW2qmCJa.js +0 -3227
  295. package/lib/index-DW2qmCJa.js.map +0 -1
  296. package/lib/index-QzXzw_ra.js +0 -24
  297. package/lib/index-QzXzw_ra.js.map +0 -1
  298. package/lib/index.esm-BFcSKCe-.js +0 -683
  299. package/lib/index.esm-BFcSKCe-.js.map +0 -1
  300. package/lib/mutation-BpcyTgWI.js +0 -196
  301. package/lib/mutation-BpcyTgWI.js.map +0 -1
  302. package/lib/objectEntries-yMIkr2mI.js +0 -5
  303. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  304. package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
  305. package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
  306. package/lib/useLatest-hmRS46UF.js +0 -11
  307. package/lib/useLatest-hmRS46UF.js.map +0 -1
  308. package/lib/useMutation-N4ockVKi.js +0 -97
  309. package/lib/useMutation-N4ockVKi.js.map +0 -1
  310. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  311. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  312. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
@@ -0,0 +1,3458 @@
1
+ import { j as n } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { ChevronDown as ft, ChevronUp as vn, Check as xt, ChevronUpIcon as bn, ChevronRightIcon as jn, CheckIcon as gt, DotIcon as Nn, PlusCircleIcon as pe, FileInput as wn, TableOfContentsIcon as Cn, LockIcon as Sn, CircleAlertIcon as Tn, XIcon as yt, Circle as An, Unlink2Icon as On, CornerDownLeftIcon as Rn, CornerDownRightIcon as Pn, DownloadIcon as Ln, UnplugIcon as $n, SendIcon as En, CopyIcon as In, IdCardLanyardIcon as kn, ShapesIcon as Dn, LogInIcon as zn, CirclePlayIcon as Fn } from "lucide-react";
3
+ import { r as qn, c as Bn, u as Vn, N as _n, g as Un, m as st } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
+ import { o as Re, p as Pe, q as vt, d as Mn, l as Gn, r as Hn, j as I, c as Qn, e as Jn } from "./hook-Bd0yS8M0.js";
5
+ import { Button as ne } from "./ui/Button.js";
6
+ import { Z as Wn, i as Xn } from "./invariant-DAFpPywt.js";
7
+ import * as C from "react";
8
+ import { createContext as bt, use as Zn, useRef as L, useEffect as z, useMemo as jt, useState as k, useCallback as Nt, Fragment as Y, useLayoutEffect as Yn, useTransition as Kn, useContext as es } from "react";
9
+ import { VisuallyHidden as ts } from "@radix-ui/react-visually-hidden";
10
+ import { D as Le, a as $e, b as Ee, d as wt, f as Ct, e as ns } from "./Dialog-DGlrUTCS.js";
11
+ import { S as ss, a as rs } from "./index-BIbCx5Fh.js";
12
+ import { A as as, a as os, b as is, u as cs } from "./Alert-CT_ViLrJ.js";
13
+ import { u as ae, a as Ie, C as F, b as ls, F as ds } from "./index.esm-Cp4wkyud.js";
14
+ import { B as E } from "./Button-BE9IVkWV.js";
15
+ import * as ke from "@radix-ui/react-collapsible";
16
+ import * as T from "@radix-ui/react-select";
17
+ import { c as y } from "./cn-wvCW-ho6.js";
18
+ import { b as rt, c as at, d as ot, f as us } from "./Slot-DwZlQ-vX.js";
19
+ import { u as ms } from "./CodeBlock-DAKxs_Tu.js";
20
+ import { u as ps } from "./RouteGuard-Bd-ppFbi.js";
21
+ import * as S from "@radix-ui/react-dropdown-menu";
22
+ import * as Te from "@radix-ui/react-checkbox";
23
+ import * as le from "@radix-ui/react-popover";
24
+ import { PopoverAnchor as hs } from "@radix-ui/react-popover";
25
+ import { P as fs } from "./index-CrcNWbel.js";
26
+ import { f as xs, g as gs, C as ys, b as vs } from "./Command-CPtGTZAL.js";
27
+ import { Input as de } from "./ui/Input.js";
28
+ import { Slot as bs } from "@radix-ui/react-slot";
29
+ import { C as js } from "./Card-DPhGbYUM.js";
30
+ import * as St from "@radix-ui/react-label";
31
+ import { c as Ns } from "./index-DI5SPFK9.js";
32
+ import * as se from "@radix-ui/react-radio-group";
33
+ import { z as ws } from "./index-ClhS5TxS.js";
34
+ import { h as Cs } from "./SyntaxHighlight-CrjhGEwT.js";
35
+ let be;
36
+ const Ss = (e) => {
37
+ if (e.errors?.[0])
38
+ throw new Wn(e.errors[0].message, {
39
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
40
+ });
41
+ };
42
+ class Ts {
43
+ constructor(t) {
44
+ this.config = t;
45
+ }
46
+ #e = async () => (be || (be = import("./createServer-Brtv5_hp.js").then(
47
+ (t) => t.createServer(this.config)
48
+ )), be);
49
+ #t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
50
+ fetch = async (t, s) => {
51
+ const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
52
+ method: "POST",
53
+ body: JSON.stringify({ query: t, variables: s, operationName: a }),
54
+ headers: { "Content-Type": "application/json" }
55
+ });
56
+ if (!r.ok)
57
+ throw new Error("Network response was not ok");
58
+ const o = await r.json();
59
+ return Ss(o), o.data;
60
+ };
61
+ }
62
+ function je(e, t) {
63
+ if (!!!e)
64
+ throw new Error(t);
65
+ }
66
+ function As(e) {
67
+ return typeof e == "object" && e !== null;
68
+ }
69
+ function Os(e, t) {
70
+ if (!!!e)
71
+ throw new Error(
72
+ t ?? "Unexpected invariant triggered."
73
+ );
74
+ }
75
+ const Rs = /\r\n|[\n\r]/g;
76
+ function Ae(e, t) {
77
+ let s = 0, a = 1;
78
+ for (const r of e.body.matchAll(Rs)) {
79
+ if (typeof r.index == "number" || Os(!1), r.index >= t)
80
+ break;
81
+ s = r.index + r[0].length, a += 1;
82
+ }
83
+ return {
84
+ line: a,
85
+ column: t + 1 - s
86
+ };
87
+ }
88
+ function Ps(e) {
89
+ return Tt(
90
+ e.source,
91
+ Ae(e.source, e.start)
92
+ );
93
+ }
94
+ function Tt(e, t) {
95
+ const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, l = t.line === 1 ? s : 0, c = t.column + l, u = `${e.name}:${i}:${c}
96
+ `, d = a.split(/\r\n|[\n\r]/g), p = d[r];
97
+ if (p.length > 120) {
98
+ const f = Math.floor(c / 80), m = c % 80, x = [];
99
+ for (let b = 0; b < p.length; b += 80)
100
+ x.push(p.slice(b, b + 80));
101
+ return u + it([
102
+ [`${i} |`, x[0]],
103
+ ...x.slice(1, f + 1).map((b) => ["|", b]),
104
+ ["|", "^".padStart(m)],
105
+ ["|", x[f + 1]]
106
+ ]);
107
+ }
108
+ return u + it([
109
+ // Lines specified like this: ["prefix", "string"],
110
+ [`${i - 1} |`, d[r - 1]],
111
+ [`${i} |`, p],
112
+ ["|", "^".padStart(c)],
113
+ [`${i + 1} |`, d[r + 1]]
114
+ ]);
115
+ }
116
+ function it(e) {
117
+ const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
118
+ return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
119
+ `);
120
+ }
121
+ function Ls(e) {
122
+ const t = e[0];
123
+ return t == null || "kind" in t || "length" in t ? {
124
+ nodes: t,
125
+ source: e[1],
126
+ positions: e[2],
127
+ path: e[3],
128
+ originalError: e[4],
129
+ extensions: e[5]
130
+ } : t;
131
+ }
132
+ class De extends Error {
133
+ /**
134
+ * An array of `{ line, column }` locations within the source GraphQL document
135
+ * which correspond to this error.
136
+ *
137
+ * Errors during validation often contain multiple locations, for example to
138
+ * point out two things with the same name. Errors during execution include a
139
+ * single location, the field which produced the error.
140
+ *
141
+ * Enumerable, and appears in the result of JSON.stringify().
142
+ */
143
+ /**
144
+ * An array describing the JSON-path into the execution response which
145
+ * corresponds to this error. Only included for errors during execution.
146
+ *
147
+ * Enumerable, and appears in the result of JSON.stringify().
148
+ */
149
+ /**
150
+ * An array of GraphQL AST Nodes corresponding to this error.
151
+ */
152
+ /**
153
+ * The source GraphQL document for the first location of this error.
154
+ *
155
+ * Note that if this Error represents more than one node, the source may not
156
+ * represent nodes after the first node.
157
+ */
158
+ /**
159
+ * An array of character offsets within the source GraphQL document
160
+ * which correspond to this error.
161
+ */
162
+ /**
163
+ * The original error thrown from a field resolver during execution.
164
+ */
165
+ /**
166
+ * Extension fields to add to the formatted error.
167
+ */
168
+ /**
169
+ * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
170
+ */
171
+ constructor(t, ...s) {
172
+ var a, r, o;
173
+ const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: p } = Ls(s);
174
+ super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes = ct(
175
+ Array.isArray(i) ? i : i ? [i] : void 0
176
+ );
177
+ const f = ct(
178
+ (a = this.nodes) === null || a === void 0 ? void 0 : a.map((x) => x.loc).filter((x) => x != null)
179
+ );
180
+ this.source = l ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? f?.map((x) => x.start), this.locations = c && l ? c.map((x) => Ae(l, x)) : f?.map((x) => Ae(x.source, x.start));
181
+ const m = As(
182
+ d?.extensions
183
+ ) ? d?.extensions : void 0;
184
+ this.extensions = (o = p ?? m) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
185
+ message: {
186
+ writable: !0,
187
+ enumerable: !0
188
+ },
189
+ name: {
190
+ enumerable: !1
191
+ },
192
+ nodes: {
193
+ enumerable: !1
194
+ },
195
+ source: {
196
+ enumerable: !1
197
+ },
198
+ positions: {
199
+ enumerable: !1
200
+ },
201
+ originalError: {
202
+ enumerable: !1
203
+ }
204
+ }), d != null && d.stack ? Object.defineProperty(this, "stack", {
205
+ value: d.stack,
206
+ writable: !0,
207
+ configurable: !0
208
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, De) : Object.defineProperty(this, "stack", {
209
+ value: Error().stack,
210
+ writable: !0,
211
+ configurable: !0
212
+ });
213
+ }
214
+ get [Symbol.toStringTag]() {
215
+ return "GraphQLError";
216
+ }
217
+ toString() {
218
+ let t = this.message;
219
+ if (this.nodes)
220
+ for (const s of this.nodes)
221
+ s.loc && (t += `
222
+
223
+ ` + Ps(s.loc));
224
+ else if (this.source && this.locations)
225
+ for (const s of this.locations)
226
+ t += `
227
+
228
+ ` + Tt(this.source, s);
229
+ return t;
230
+ }
231
+ toJSON() {
232
+ const t = {
233
+ message: this.message
234
+ };
235
+ return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
236
+ }
237
+ }
238
+ function ct(e) {
239
+ return e === void 0 || e.length === 0 ? void 0 : e;
240
+ }
241
+ function $(e, t, s) {
242
+ return new De(`Syntax Error: ${s}`, {
243
+ source: e,
244
+ positions: [t]
245
+ });
246
+ }
247
+ class _a {
248
+ /**
249
+ * The character offset at which this Node begins.
250
+ */
251
+ /**
252
+ * The character offset at which this Node ends.
253
+ */
254
+ /**
255
+ * The Token at which this Node begins.
256
+ */
257
+ /**
258
+ * The Token at which this Node ends.
259
+ */
260
+ /**
261
+ * The Source document the AST represents.
262
+ */
263
+ constructor(t, s, a) {
264
+ this.start = t.start, this.end = s.end, this.startToken = t, this.endToken = s, this.source = a;
265
+ }
266
+ get [Symbol.toStringTag]() {
267
+ return "Location";
268
+ }
269
+ toJSON() {
270
+ return {
271
+ start: this.start,
272
+ end: this.end
273
+ };
274
+ }
275
+ }
276
+ class At {
277
+ /**
278
+ * The kind of Token.
279
+ */
280
+ /**
281
+ * The character offset at which this Node begins.
282
+ */
283
+ /**
284
+ * The character offset at which this Node ends.
285
+ */
286
+ /**
287
+ * The 1-indexed line number on which this Token appears.
288
+ */
289
+ /**
290
+ * The 1-indexed column number at which this Token begins.
291
+ */
292
+ /**
293
+ * For non-punctuation tokens, represents the interpreted value of the token.
294
+ *
295
+ * Note: is undefined for punctuation tokens, but typed as string for
296
+ * convenience in the parser.
297
+ */
298
+ /**
299
+ * Tokens exist as nodes in a double-linked-list amongst all tokens
300
+ * including ignored tokens. <SOF> is always the first node and <EOF>
301
+ * the last.
302
+ */
303
+ constructor(t, s, a, r, o, i) {
304
+ this.kind = t, this.start = s, this.end = a, this.line = r, this.column = o, this.value = i, this.prev = null, this.next = null;
305
+ }
306
+ get [Symbol.toStringTag]() {
307
+ return "Token";
308
+ }
309
+ toJSON() {
310
+ return {
311
+ kind: this.kind,
312
+ value: this.value,
313
+ line: this.line,
314
+ column: this.column
315
+ };
316
+ }
317
+ }
318
+ const $s = {
319
+ Name: [],
320
+ Document: ["definitions"],
321
+ OperationDefinition: [
322
+ "name",
323
+ "variableDefinitions",
324
+ "directives",
325
+ "selectionSet"
326
+ ],
327
+ VariableDefinition: ["variable", "type", "defaultValue", "directives"],
328
+ Variable: ["name"],
329
+ SelectionSet: ["selections"],
330
+ Field: ["alias", "name", "arguments", "directives", "selectionSet"],
331
+ Argument: ["name", "value"],
332
+ FragmentSpread: ["name", "directives"],
333
+ InlineFragment: ["typeCondition", "directives", "selectionSet"],
334
+ FragmentDefinition: [
335
+ "name",
336
+ // Note: fragment variable definitions are deprecated and will removed in v17.0.0
337
+ "variableDefinitions",
338
+ "typeCondition",
339
+ "directives",
340
+ "selectionSet"
341
+ ],
342
+ IntValue: [],
343
+ FloatValue: [],
344
+ StringValue: [],
345
+ BooleanValue: [],
346
+ NullValue: [],
347
+ EnumValue: [],
348
+ ListValue: ["values"],
349
+ ObjectValue: ["fields"],
350
+ ObjectField: ["name", "value"],
351
+ Directive: ["name", "arguments"],
352
+ NamedType: ["name"],
353
+ ListType: ["type"],
354
+ NonNullType: ["type"],
355
+ SchemaDefinition: ["description", "directives", "operationTypes"],
356
+ OperationTypeDefinition: ["type"],
357
+ ScalarTypeDefinition: ["description", "name", "directives"],
358
+ ObjectTypeDefinition: [
359
+ "description",
360
+ "name",
361
+ "interfaces",
362
+ "directives",
363
+ "fields"
364
+ ],
365
+ FieldDefinition: ["description", "name", "arguments", "type", "directives"],
366
+ InputValueDefinition: [
367
+ "description",
368
+ "name",
369
+ "type",
370
+ "defaultValue",
371
+ "directives"
372
+ ],
373
+ InterfaceTypeDefinition: [
374
+ "description",
375
+ "name",
376
+ "interfaces",
377
+ "directives",
378
+ "fields"
379
+ ],
380
+ UnionTypeDefinition: ["description", "name", "directives", "types"],
381
+ EnumTypeDefinition: ["description", "name", "directives", "values"],
382
+ EnumValueDefinition: ["description", "name", "directives"],
383
+ InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
384
+ DirectiveDefinition: ["description", "name", "arguments", "locations"],
385
+ SchemaExtension: ["directives", "operationTypes"],
386
+ ScalarTypeExtension: ["name", "directives"],
387
+ ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
388
+ InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
389
+ UnionTypeExtension: ["name", "directives", "types"],
390
+ EnumTypeExtension: ["name", "directives", "values"],
391
+ InputObjectTypeExtension: ["name", "directives", "fields"]
392
+ }, Es = new Set(Object.keys($s));
393
+ function Ua(e) {
394
+ const t = e?.kind;
395
+ return typeof t == "string" && Es.has(t);
396
+ }
397
+ var lt;
398
+ (function(e) {
399
+ e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
400
+ })(lt || (lt = {}));
401
+ function Oe(e) {
402
+ return e === 9 || e === 32;
403
+ }
404
+ function re(e) {
405
+ return e >= 48 && e <= 57;
406
+ }
407
+ function Ot(e) {
408
+ return e >= 97 && e <= 122 || // A-Z
409
+ e >= 65 && e <= 90;
410
+ }
411
+ function Rt(e) {
412
+ return Ot(e) || e === 95;
413
+ }
414
+ function Is(e) {
415
+ return Ot(e) || re(e) || e === 95;
416
+ }
417
+ function ks(e) {
418
+ var t;
419
+ let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
420
+ for (let i = 0; i < e.length; ++i) {
421
+ var o;
422
+ const l = e[i], c = Ds(l);
423
+ c !== l.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && c < s && (s = c));
424
+ }
425
+ return e.map((i, l) => l === 0 ? i : i.slice(s)).slice(
426
+ (t = a) !== null && t !== void 0 ? t : 0,
427
+ r + 1
428
+ );
429
+ }
430
+ function Ds(e) {
431
+ let t = 0;
432
+ for (; t < e.length && Oe(e.charCodeAt(t)); )
433
+ ++t;
434
+ return t;
435
+ }
436
+ function zs(e, t) {
437
+ const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((m) => m.length === 0 || Oe(m.charCodeAt(0))), i = s.endsWith('\\"""'), l = e.endsWith('"') && !i, c = e.endsWith("\\"), u = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
438
+ (!r || e.length > 70 || u || o || i);
439
+ let p = "";
440
+ const f = r && Oe(e.charCodeAt(0));
441
+ return (d && !f || o) && (p += `
442
+ `), p += s, (d || u) && (p += `
443
+ `), '"""' + p + '"""';
444
+ }
445
+ var g;
446
+ (function(e) {
447
+ e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
448
+ })(g || (g = {}));
449
+ class Fs {
450
+ /**
451
+ * The previously focused non-ignored token.
452
+ */
453
+ /**
454
+ * The currently focused non-ignored token.
455
+ */
456
+ /**
457
+ * The (1-indexed) line containing the current token.
458
+ */
459
+ /**
460
+ * The character offset at which the current line begins.
461
+ */
462
+ constructor(t) {
463
+ const s = new At(g.SOF, 0, 0, 0, 0);
464
+ this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
465
+ }
466
+ get [Symbol.toStringTag]() {
467
+ return "Lexer";
468
+ }
469
+ /**
470
+ * Advances the token stream to the next non-ignored token.
471
+ */
472
+ advance() {
473
+ return this.lastToken = this.token, this.token = this.lookahead();
474
+ }
475
+ /**
476
+ * Looks ahead and returns the next non-ignored token, but does not change
477
+ * the state of Lexer.
478
+ */
479
+ lookahead() {
480
+ let t = this.token;
481
+ if (t.kind !== g.EOF)
482
+ do
483
+ if (t.next)
484
+ t = t.next;
485
+ else {
486
+ const s = Bs(this, t.end);
487
+ t.next = s, s.prev = t, t = s;
488
+ }
489
+ while (t.kind === g.COMMENT);
490
+ return t;
491
+ }
492
+ }
493
+ function qs(e) {
494
+ return e === g.BANG || e === g.DOLLAR || e === g.AMP || e === g.PAREN_L || e === g.PAREN_R || e === g.SPREAD || e === g.COLON || e === g.EQUALS || e === g.AT || e === g.BRACKET_L || e === g.BRACKET_R || e === g.BRACE_L || e === g.PIPE || e === g.BRACE_R;
495
+ }
496
+ function X(e) {
497
+ return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
498
+ }
499
+ function he(e, t) {
500
+ return Pt(e.charCodeAt(t)) && Lt(e.charCodeAt(t + 1));
501
+ }
502
+ function Pt(e) {
503
+ return e >= 55296 && e <= 56319;
504
+ }
505
+ function Lt(e) {
506
+ return e >= 56320 && e <= 57343;
507
+ }
508
+ function U(e, t) {
509
+ const s = e.source.body.codePointAt(t);
510
+ if (s === void 0)
511
+ return g.EOF;
512
+ if (s >= 32 && s <= 126) {
513
+ const a = String.fromCodePoint(s);
514
+ return a === '"' ? `'"'` : `"${a}"`;
515
+ }
516
+ return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
517
+ }
518
+ function A(e, t, s, a, r) {
519
+ const o = e.line, i = 1 + s - e.lineStart;
520
+ return new At(t, s, a, o, i, r);
521
+ }
522
+ function Bs(e, t) {
523
+ const s = e.source.body, a = s.length;
524
+ let r = t;
525
+ for (; r < a; ) {
526
+ const o = s.charCodeAt(r);
527
+ switch (o) {
528
+ // Ignored ::
529
+ // - UnicodeBOM
530
+ // - WhiteSpace
531
+ // - LineTerminator
532
+ // - Comment
533
+ // - Comma
534
+ //
535
+ // UnicodeBOM :: "Byte Order Mark (U+FEFF)"
536
+ //
537
+ // WhiteSpace ::
538
+ // - "Horizontal Tab (U+0009)"
539
+ // - "Space (U+0020)"
540
+ //
541
+ // Comma :: ,
542
+ case 65279:
543
+ // <BOM>
544
+ case 9:
545
+ // \t
546
+ case 32:
547
+ // <space>
548
+ case 44:
549
+ ++r;
550
+ continue;
551
+ // LineTerminator ::
552
+ // - "New Line (U+000A)"
553
+ // - "Carriage Return (U+000D)" [lookahead != "New Line (U+000A)"]
554
+ // - "Carriage Return (U+000D)" "New Line (U+000A)"
555
+ case 10:
556
+ ++r, ++e.line, e.lineStart = r;
557
+ continue;
558
+ case 13:
559
+ s.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
560
+ continue;
561
+ // Comment
562
+ case 35:
563
+ return Vs(e, r);
564
+ // Token ::
565
+ // - Punctuator
566
+ // - Name
567
+ // - IntValue
568
+ // - FloatValue
569
+ // - StringValue
570
+ //
571
+ // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
572
+ case 33:
573
+ return A(e, g.BANG, r, r + 1);
574
+ case 36:
575
+ return A(e, g.DOLLAR, r, r + 1);
576
+ case 38:
577
+ return A(e, g.AMP, r, r + 1);
578
+ case 40:
579
+ return A(e, g.PAREN_L, r, r + 1);
580
+ case 41:
581
+ return A(e, g.PAREN_R, r, r + 1);
582
+ case 46:
583
+ if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
584
+ return A(e, g.SPREAD, r, r + 3);
585
+ break;
586
+ case 58:
587
+ return A(e, g.COLON, r, r + 1);
588
+ case 61:
589
+ return A(e, g.EQUALS, r, r + 1);
590
+ case 64:
591
+ return A(e, g.AT, r, r + 1);
592
+ case 91:
593
+ return A(e, g.BRACKET_L, r, r + 1);
594
+ case 93:
595
+ return A(e, g.BRACKET_R, r, r + 1);
596
+ case 123:
597
+ return A(e, g.BRACE_L, r, r + 1);
598
+ case 124:
599
+ return A(e, g.PIPE, r, r + 1);
600
+ case 125:
601
+ return A(e, g.BRACE_R, r, r + 1);
602
+ // StringValue
603
+ case 34:
604
+ return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? Qs(e, r) : Us(e, r);
605
+ }
606
+ if (re(o) || o === 45)
607
+ return _s(e, r, o);
608
+ if (Rt(o))
609
+ return Js(e, r);
610
+ throw $(
611
+ e.source,
612
+ r,
613
+ o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : X(o) || he(s, r) ? `Unexpected character: ${U(e, r)}.` : `Invalid character: ${U(e, r)}.`
614
+ );
615
+ }
616
+ return A(e, g.EOF, a, a);
617
+ }
618
+ function Vs(e, t) {
619
+ const s = e.source.body, a = s.length;
620
+ let r = t + 1;
621
+ for (; r < a; ) {
622
+ const o = s.charCodeAt(r);
623
+ if (o === 10 || o === 13)
624
+ break;
625
+ if (X(o))
626
+ ++r;
627
+ else if (he(s, r))
628
+ r += 2;
629
+ else
630
+ break;
631
+ }
632
+ return A(
633
+ e,
634
+ g.COMMENT,
635
+ t,
636
+ r,
637
+ s.slice(t + 1, r)
638
+ );
639
+ }
640
+ function _s(e, t, s) {
641
+ const a = e.source.body;
642
+ let r = t, o = s, i = !1;
643
+ if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
644
+ if (o = a.charCodeAt(++r), re(o))
645
+ throw $(
646
+ e.source,
647
+ r,
648
+ `Invalid number, unexpected digit after 0: ${U(
649
+ e,
650
+ r
651
+ )}.`
652
+ );
653
+ } else
654
+ r = Ne(e, r, o), o = a.charCodeAt(r);
655
+ if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Ne(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = Ne(e, r, o), o = a.charCodeAt(r)), o === 46 || Rt(o))
656
+ throw $(
657
+ e.source,
658
+ r,
659
+ `Invalid number, expected digit but got: ${U(
660
+ e,
661
+ r
662
+ )}.`
663
+ );
664
+ return A(
665
+ e,
666
+ i ? g.FLOAT : g.INT,
667
+ t,
668
+ r,
669
+ a.slice(t, r)
670
+ );
671
+ }
672
+ function Ne(e, t, s) {
673
+ if (!re(s))
674
+ throw $(
675
+ e.source,
676
+ t,
677
+ `Invalid number, expected digit but got: ${U(
678
+ e,
679
+ t
680
+ )}.`
681
+ );
682
+ const a = e.source.body;
683
+ let r = t + 1;
684
+ for (; re(a.charCodeAt(r)); )
685
+ ++r;
686
+ return r;
687
+ }
688
+ function Us(e, t) {
689
+ const s = e.source.body, a = s.length;
690
+ let r = t + 1, o = r, i = "";
691
+ for (; r < a; ) {
692
+ const l = s.charCodeAt(r);
693
+ if (l === 34)
694
+ return i += s.slice(o, r), A(e, g.STRING, t, r + 1, i);
695
+ if (l === 92) {
696
+ i += s.slice(o, r);
697
+ const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Ms(e, r) : Gs(e, r) : Hs(e, r);
698
+ i += c.value, r += c.size, o = r;
699
+ continue;
700
+ }
701
+ if (l === 10 || l === 13)
702
+ break;
703
+ if (X(l))
704
+ ++r;
705
+ else if (he(s, r))
706
+ r += 2;
707
+ else
708
+ throw $(
709
+ e.source,
710
+ r,
711
+ `Invalid character within String: ${U(
712
+ e,
713
+ r
714
+ )}.`
715
+ );
716
+ }
717
+ throw $(e.source, r, "Unterminated string.");
718
+ }
719
+ function Ms(e, t) {
720
+ const s = e.source.body;
721
+ let a = 0, r = 3;
722
+ for (; r < 12; ) {
723
+ const o = s.charCodeAt(t + r++);
724
+ if (o === 125) {
725
+ if (r < 5 || !X(a))
726
+ break;
727
+ return {
728
+ value: String.fromCodePoint(a),
729
+ size: r
730
+ };
731
+ }
732
+ if (a = a << 4 | K(o), a < 0)
733
+ break;
734
+ }
735
+ throw $(
736
+ e.source,
737
+ t,
738
+ `Invalid Unicode escape sequence: "${s.slice(
739
+ t,
740
+ t + r
741
+ )}".`
742
+ );
743
+ }
744
+ function Gs(e, t) {
745
+ const s = e.source.body, a = dt(s, t + 2);
746
+ if (X(a))
747
+ return {
748
+ value: String.fromCodePoint(a),
749
+ size: 6
750
+ };
751
+ if (Pt(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
752
+ const r = dt(s, t + 8);
753
+ if (Lt(r))
754
+ return {
755
+ value: String.fromCodePoint(a, r),
756
+ size: 12
757
+ };
758
+ }
759
+ throw $(
760
+ e.source,
761
+ t,
762
+ `Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
763
+ );
764
+ }
765
+ function dt(e, t) {
766
+ return K(e.charCodeAt(t)) << 12 | K(e.charCodeAt(t + 1)) << 8 | K(e.charCodeAt(t + 2)) << 4 | K(e.charCodeAt(t + 3));
767
+ }
768
+ function K(e) {
769
+ return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
770
+ }
771
+ function Hs(e, t) {
772
+ const s = e.source.body;
773
+ switch (s.charCodeAt(t + 1)) {
774
+ case 34:
775
+ return {
776
+ value: '"',
777
+ size: 2
778
+ };
779
+ case 92:
780
+ return {
781
+ value: "\\",
782
+ size: 2
783
+ };
784
+ case 47:
785
+ return {
786
+ value: "/",
787
+ size: 2
788
+ };
789
+ case 98:
790
+ return {
791
+ value: "\b",
792
+ size: 2
793
+ };
794
+ case 102:
795
+ return {
796
+ value: "\f",
797
+ size: 2
798
+ };
799
+ case 110:
800
+ return {
801
+ value: `
802
+ `,
803
+ size: 2
804
+ };
805
+ case 114:
806
+ return {
807
+ value: "\r",
808
+ size: 2
809
+ };
810
+ case 116:
811
+ return {
812
+ value: " ",
813
+ size: 2
814
+ };
815
+ }
816
+ throw $(
817
+ e.source,
818
+ t,
819
+ `Invalid character escape sequence: "${s.slice(
820
+ t,
821
+ t + 2
822
+ )}".`
823
+ );
824
+ }
825
+ function Qs(e, t) {
826
+ const s = e.source.body, a = s.length;
827
+ let r = e.lineStart, o = t + 3, i = o, l = "";
828
+ const c = [];
829
+ for (; o < a; ) {
830
+ const u = s.charCodeAt(o);
831
+ if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
832
+ l += s.slice(i, o), c.push(l);
833
+ const d = A(
834
+ e,
835
+ g.BLOCK_STRING,
836
+ t,
837
+ o + 3,
838
+ // Return a string of the lines joined with U+000A.
839
+ ks(c).join(`
840
+ `)
841
+ );
842
+ return e.line += c.length - 1, e.lineStart = r, d;
843
+ }
844
+ if (u === 92 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34 && s.charCodeAt(o + 3) === 34) {
845
+ l += s.slice(i, o), i = o + 1, o += 4;
846
+ continue;
847
+ }
848
+ if (u === 10 || u === 13) {
849
+ l += s.slice(i, o), c.push(l), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, l = "", i = o, r = o;
850
+ continue;
851
+ }
852
+ if (X(u))
853
+ ++o;
854
+ else if (he(s, o))
855
+ o += 2;
856
+ else
857
+ throw $(
858
+ e.source,
859
+ o,
860
+ `Invalid character within String: ${U(
861
+ e,
862
+ o
863
+ )}.`
864
+ );
865
+ }
866
+ throw $(e.source, o, "Unterminated string.");
867
+ }
868
+ function Js(e, t) {
869
+ const s = e.source.body, a = s.length;
870
+ let r = t + 1;
871
+ for (; r < a; ) {
872
+ const o = s.charCodeAt(r);
873
+ if (Is(o))
874
+ ++r;
875
+ else
876
+ break;
877
+ }
878
+ return A(
879
+ e,
880
+ g.NAME,
881
+ t,
882
+ r,
883
+ s.slice(t, r)
884
+ );
885
+ }
886
+ const Ws = 10, $t = 2;
887
+ function Et(e) {
888
+ return fe(e, []);
889
+ }
890
+ function fe(e, t) {
891
+ switch (typeof e) {
892
+ case "string":
893
+ return JSON.stringify(e);
894
+ case "function":
895
+ return e.name ? `[function ${e.name}]` : "[function]";
896
+ case "object":
897
+ return Xs(e, t);
898
+ default:
899
+ return String(e);
900
+ }
901
+ }
902
+ function Xs(e, t) {
903
+ if (e === null)
904
+ return "null";
905
+ if (t.includes(e))
906
+ return "[Circular]";
907
+ const s = [...t, e];
908
+ if (Zs(e)) {
909
+ const a = e.toJSON();
910
+ if (a !== e)
911
+ return typeof a == "string" ? a : fe(a, s);
912
+ } else if (Array.isArray(e))
913
+ return Ks(e, s);
914
+ return Ys(e, s);
915
+ }
916
+ function Zs(e) {
917
+ return typeof e.toJSON == "function";
918
+ }
919
+ function Ys(e, t) {
920
+ const s = Object.entries(e);
921
+ return s.length === 0 ? "{}" : t.length > $t ? "[" + er(e) + "]" : "{ " + s.map(
922
+ ([r, o]) => r + ": " + fe(o, t)
923
+ ).join(", ") + " }";
924
+ }
925
+ function Ks(e, t) {
926
+ if (e.length === 0)
927
+ return "[]";
928
+ if (t.length > $t)
929
+ return "[Array]";
930
+ const s = Math.min(Ws, e.length), a = e.length - s, r = [];
931
+ for (let o = 0; o < s; ++o)
932
+ r.push(fe(e[o], t));
933
+ return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
934
+ }
935
+ function er(e) {
936
+ const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
937
+ if (t === "Object" && typeof e.constructor == "function") {
938
+ const s = e.constructor.name;
939
+ if (typeof s == "string" && s !== "")
940
+ return s;
941
+ }
942
+ return t;
943
+ }
944
+ const tr = globalThis.process && // eslint-disable-next-line no-undef
945
+ process.env.NODE_ENV === "production", nr = (
946
+ /* c8 ignore next 6 */
947
+ // FIXME: https://github.com/graphql/graphql-js/issues/2317
948
+ tr ? function(t, s) {
949
+ return t instanceof s;
950
+ } : function(t, s) {
951
+ if (t instanceof s)
952
+ return !0;
953
+ if (typeof t == "object" && t !== null) {
954
+ var a;
955
+ const r = s.prototype[Symbol.toStringTag], o = (
956
+ // We still need to support constructor's name to detect conflicts with older versions of this library.
957
+ Symbol.toStringTag in t ? t[Symbol.toStringTag] : (a = t.constructor) === null || a === void 0 ? void 0 : a.name
958
+ );
959
+ if (r === o) {
960
+ const i = Et(t);
961
+ throw new Error(`Cannot use ${r} "${i}" from another module or realm.
962
+
963
+ Ensure that there is only one instance of "graphql" in the node_modules
964
+ directory. If different versions of "graphql" are the dependencies of other
965
+ relied on modules, use "resolutions" to ensure only one version is installed.
966
+
967
+ https://yarnpkg.com/en/docs/selective-version-resolutions
968
+
969
+ Duplicate "graphql" modules cannot be used at the same time since different
970
+ versions may have different capabilities and behavior. The data from one
971
+ version used in the function from another could produce confusing and
972
+ spurious results.`);
973
+ }
974
+ }
975
+ return !1;
976
+ }
977
+ );
978
+ class It {
979
+ constructor(t, s = "GraphQL request", a = {
980
+ line: 1,
981
+ column: 1
982
+ }) {
983
+ typeof t == "string" || je(!1, `Body must be a string. Received: ${Et(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || je(
984
+ !1,
985
+ "line in locationOffset is 1-indexed and must be positive."
986
+ ), this.locationOffset.column > 0 || je(
987
+ !1,
988
+ "column in locationOffset is 1-indexed and must be positive."
989
+ );
990
+ }
991
+ get [Symbol.toStringTag]() {
992
+ return "Source";
993
+ }
994
+ }
995
+ function sr(e) {
996
+ return nr(e, It);
997
+ }
998
+ function rr(e) {
999
+ const t = sr(e) ? e : new It(e), s = t.body, a = new Fs(t);
1000
+ let r = "", o = !1;
1001
+ for (; a.advance().kind !== g.EOF; ) {
1002
+ const i = a.token, l = i.kind, c = !qs(i.kind);
1003
+ o && (c || i.kind === g.SPREAD) && (r += " ");
1004
+ const u = s.slice(i.start, i.end);
1005
+ l === g.BLOCK_STRING ? r += zs(i.value, {
1006
+ minimize: !0
1007
+ }) : r += u, o = c;
1008
+ }
1009
+ return r;
1010
+ }
1011
+ const kt = bt(
1012
+ void 0
1013
+ ), Ma = ({
1014
+ children: e,
1015
+ client: t
1016
+ }) => /* @__PURE__ */ n.jsx(kt.Provider, { value: t, children: e }), Dt = (e, t, ...[s]) => ({
1017
+ queryFn: () => e.fetch(t, s),
1018
+ queryKey: [rr(t.toString()), s]
1019
+ }), ar = (e, ...[t]) => {
1020
+ const s = Zn(kt);
1021
+ if (s === void 0)
1022
+ throw new Error("useGraphQL must be used within a GraphQLProvider");
1023
+ return Dt(s, e, ...t === void 0 ? [] : [t]);
1024
+ };
1025
+ class H extends String {
1026
+ __apiType;
1027
+ value;
1028
+ __meta__;
1029
+ constructor(t, s) {
1030
+ super(t), this.value = t, this.__meta__ = s;
1031
+ }
1032
+ toString() {
1033
+ return this.value;
1034
+ }
1035
+ }
1036
+ const or = new H(
1037
+ `
1038
+ fragment OperationsFragment on OperationItem {
1039
+ slug
1040
+ summary
1041
+ method
1042
+ description
1043
+ operationId
1044
+ contentTypes
1045
+ path
1046
+ deprecated
1047
+ extensions
1048
+ parameters {
1049
+ name
1050
+ in
1051
+ description
1052
+ required
1053
+ schema
1054
+ style
1055
+ explode
1056
+ examples {
1057
+ name
1058
+ description
1059
+ externalValue
1060
+ value
1061
+ summary
1062
+ }
1063
+ }
1064
+ requestBody {
1065
+ content {
1066
+ mediaType
1067
+ encoding {
1068
+ name
1069
+ }
1070
+ examples {
1071
+ name
1072
+ description
1073
+ externalValue
1074
+ value
1075
+ summary
1076
+ }
1077
+ schema
1078
+ }
1079
+ description
1080
+ required
1081
+ }
1082
+ responses {
1083
+ statusCode
1084
+ links
1085
+ description
1086
+ content {
1087
+ examples {
1088
+ name
1089
+ description
1090
+ externalValue
1091
+ value
1092
+ summary
1093
+ }
1094
+ mediaType
1095
+ encoding {
1096
+ name
1097
+ }
1098
+ schema
1099
+ }
1100
+ }
1101
+ }
1102
+ `,
1103
+ { fragmentName: "OperationsFragment" }
1104
+ ), ir = new H(`
1105
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
1106
+ schema(input: $input, type: $type) {
1107
+ url
1108
+ servers {
1109
+ url
1110
+ }
1111
+ }
1112
+ }
1113
+ `), cr = new H(`
1114
+ query SchemaWarmup($input: JSON!, $type: SchemaType!) {
1115
+ schema(input: $input, type: $type) {
1116
+ openapi
1117
+ }
1118
+ }
1119
+ `), lr = new H(`
1120
+ query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
1121
+ schema(input: $input, type: $type) {
1122
+ servers {
1123
+ url
1124
+ }
1125
+ description
1126
+ summary
1127
+ title
1128
+ url
1129
+ version
1130
+ tag(slug: $tag, untagged: $untagged) {
1131
+ name
1132
+ description
1133
+ operations {
1134
+ slug
1135
+ ...OperationsFragment
1136
+ }
1137
+ next {
1138
+ name
1139
+ slug
1140
+ }
1141
+ prev {
1142
+ name
1143
+ slug
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ fragment OperationsFragment on OperationItem {
1149
+ slug
1150
+ summary
1151
+ method
1152
+ description
1153
+ operationId
1154
+ contentTypes
1155
+ path
1156
+ deprecated
1157
+ extensions
1158
+ parameters {
1159
+ name
1160
+ in
1161
+ description
1162
+ required
1163
+ schema
1164
+ style
1165
+ explode
1166
+ examples {
1167
+ name
1168
+ description
1169
+ externalValue
1170
+ value
1171
+ summary
1172
+ }
1173
+ }
1174
+ requestBody {
1175
+ content {
1176
+ mediaType
1177
+ encoding {
1178
+ name
1179
+ }
1180
+ examples {
1181
+ name
1182
+ description
1183
+ externalValue
1184
+ value
1185
+ summary
1186
+ }
1187
+ schema
1188
+ }
1189
+ description
1190
+ required
1191
+ }
1192
+ responses {
1193
+ statusCode
1194
+ links
1195
+ description
1196
+ content {
1197
+ examples {
1198
+ name
1199
+ description
1200
+ externalValue
1201
+ value
1202
+ summary
1203
+ }
1204
+ mediaType
1205
+ encoding {
1206
+ name
1207
+ }
1208
+ schema
1209
+ }
1210
+ }
1211
+ }`), dr = new H(`
1212
+ query GetSchemas($input: JSON!, $type: SchemaType!) {
1213
+ schema(input: $input, type: $type) {
1214
+ title
1215
+ description
1216
+ summary
1217
+ components {
1218
+ schemas {
1219
+ name
1220
+ schema
1221
+ extensions
1222
+ }
1223
+ }
1224
+ }
1225
+ }
1226
+ `), ur = new H(`
1227
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
1228
+ schema(input: $input, type: $type) {
1229
+ url
1230
+ servers {
1231
+ url
1232
+ }
1233
+ }
1234
+ }
1235
+ `), mr = new H(`
1236
+ query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
1237
+ schema(input: $input, type: $type) {
1238
+ tags {
1239
+ slug
1240
+ name
1241
+ extensions
1242
+ operations {
1243
+ summary
1244
+ slug
1245
+ method
1246
+ operationId
1247
+ path
1248
+ }
1249
+ }
1250
+ components {
1251
+ schemas {
1252
+ __typename
1253
+ }
1254
+ }
1255
+ }
1256
+ }
1257
+ `), pr = {
1258
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ir,
1259
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": or,
1260
+ "\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": cr,
1261
+ "\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": lr,
1262
+ "\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": dr,
1263
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ur,
1264
+ "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": mr
1265
+ };
1266
+ function hr(e) {
1267
+ return pr[e] ?? {};
1268
+ }
1269
+ const q = ke.Root, zt = ke.CollapsibleTrigger, B = ke.CollapsibleContent, Ft = T.Root, qt = T.Value, ze = C.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1270
+ T.Trigger,
1271
+ {
1272
+ ref: a,
1273
+ className: y(
1274
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
1275
+ e
1276
+ ),
1277
+ ...s,
1278
+ children: [
1279
+ /* @__PURE__ */ n.jsx("span", { className: "truncate", children: t }),
1280
+ /* @__PURE__ */ n.jsx(T.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(ft, { className: "shrink-0 h-4 w-4 opacity-50" }) })
1281
+ ]
1282
+ }
1283
+ ));
1284
+ ze.displayName = T.Trigger.displayName;
1285
+ const Bt = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1286
+ T.ScrollUpButton,
1287
+ {
1288
+ ref: s,
1289
+ className: y(
1290
+ "flex cursor-default items-center justify-center py-1",
1291
+ e
1292
+ ),
1293
+ ...t,
1294
+ children: /* @__PURE__ */ n.jsx(vn, { className: "h-4 w-4" })
1295
+ }
1296
+ ));
1297
+ Bt.displayName = T.ScrollUpButton.displayName;
1298
+ const Vt = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1299
+ T.ScrollDownButton,
1300
+ {
1301
+ ref: s,
1302
+ className: y(
1303
+ "flex cursor-default items-center justify-center py-1",
1304
+ e
1305
+ ),
1306
+ ...t,
1307
+ children: /* @__PURE__ */ n.jsx(ft, { className: "h-4 w-4" })
1308
+ }
1309
+ ));
1310
+ Vt.displayName = T.ScrollDownButton.displayName;
1311
+ const Fe = C.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(T.Portal, { children: /* @__PURE__ */ n.jsxs(
1312
+ T.Content,
1313
+ {
1314
+ ref: r,
1315
+ className: y(
1316
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1317
+ s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
1318
+ e
1319
+ ),
1320
+ position: s,
1321
+ ...a,
1322
+ children: [
1323
+ /* @__PURE__ */ n.jsx(Bt, {}),
1324
+ /* @__PURE__ */ n.jsx(
1325
+ T.Viewport,
1326
+ {
1327
+ className: y(
1328
+ s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
1329
+ "divide-y"
1330
+ ),
1331
+ children: t
1332
+ }
1333
+ ),
1334
+ /* @__PURE__ */ n.jsx(Vt, {})
1335
+ ]
1336
+ }
1337
+ ) }));
1338
+ Fe.displayName = T.Content.displayName;
1339
+ const fr = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1340
+ T.Label,
1341
+ {
1342
+ ref: s,
1343
+ className: y("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
1344
+ ...t
1345
+ }
1346
+ ));
1347
+ fr.displayName = T.Label.displayName;
1348
+ const ee = C.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1349
+ T.Item,
1350
+ {
1351
+ ref: a,
1352
+ className: y(
1353
+ "relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1354
+ e
1355
+ ),
1356
+ ...s,
1357
+ children: [
1358
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(T.ItemIndicator, { children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" }) }) }),
1359
+ /* @__PURE__ */ n.jsx(T.ItemText, { children: t })
1360
+ ]
1361
+ }
1362
+ ));
1363
+ ee.displayName = T.Item.displayName;
1364
+ const xr = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1365
+ T.Separator,
1366
+ {
1367
+ ref: s,
1368
+ className: y("-mx-1 my-1 h-px bg-muted", e),
1369
+ ...t
1370
+ }
1371
+ ));
1372
+ xr.displayName = T.Separator.displayName;
1373
+ function gr() {
1374
+ const t = navigator.userAgent.toLowerCase();
1375
+ if (t.indexOf("win") !== -1)
1376
+ return "windows";
1377
+ if (t.indexOf("mac") !== -1)
1378
+ return "apple";
1379
+ if (t.indexOf("linux") !== -1)
1380
+ return "linux";
1381
+ if (t.indexOf("x11") !== -1)
1382
+ return "unix";
1383
+ }
1384
+ function yr() {
1385
+ return gr() === "apple";
1386
+ }
1387
+ const vr = {
1388
+ other: {
1389
+ alt: "Alt",
1390
+ meta: "Ctrl",
1391
+ ctrl: "Ctrl",
1392
+ shift: "⇧",
1393
+ option: "Alt"
1394
+ },
1395
+ apple: {
1396
+ alt: "⌥",
1397
+ meta: "⌘",
1398
+ ctrl: "Ctrl",
1399
+ shift: "⇧",
1400
+ option: "⌥"
1401
+ }
1402
+ }, br = (e, t) => {
1403
+ const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c = L(t);
1404
+ return z(() => {
1405
+ c.current = t;
1406
+ }, [t]), z(() => {
1407
+ const u = (d) => {
1408
+ (d.code === `Key${l?.toUpperCase()}` || d.code.toLowerCase() === l?.toLowerCase()) && d.metaKey === a && d.shiftKey === r && d.altKey === o && d.ctrlKey === i && (d.preventDefault(), c.current());
1409
+ };
1410
+ return window.addEventListener("keydown", u), () => {
1411
+ window.removeEventListener("keydown", u);
1412
+ };
1413
+ }, [l, a, r, o, i]), {
1414
+ trigger: () => c.current(),
1415
+ label: s.map(
1416
+ (u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? vr[yr() ? "apple" : "other"][u] : u
1417
+ )
1418
+ };
1419
+ }, jr = Re()(
1420
+ Pe(
1421
+ (e) => ({
1422
+ selectedServer: void 0,
1423
+ setSelectedServer: (t) => e({ selectedServer: t })
1424
+ }),
1425
+ { name: "zudoku-selected-server" }
1426
+ )
1427
+ ), Nr = (e) => {
1428
+ const { selectedServer: t, setSelectedServer: s } = jr();
1429
+ return { selectedServer: jt(
1430
+ () => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
1431
+ [t, e]
1432
+ ), setSelectedServer: s };
1433
+ }, _t = C.forwardRef(
1434
+ ({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1435
+ "textarea",
1436
+ {
1437
+ className: y(
1438
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1439
+ e
1440
+ ),
1441
+ ref: s,
1442
+ ...t
1443
+ }
1444
+ )
1445
+ );
1446
+ _t.displayName = "Textarea";
1447
+ const M = ({
1448
+ children: e,
1449
+ className: t
1450
+ }) => /* @__PURE__ */ n.jsxs(
1451
+ "div",
1452
+ {
1453
+ className: y(
1454
+ "grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-4 group bg-muted w-full h-10 ps-4 pe-2 border-b",
1455
+ t
1456
+ ),
1457
+ children: [
1458
+ e,
1459
+ /* @__PURE__ */ n.jsx(
1460
+ zt,
1461
+ {
1462
+ className: y(
1463
+ "flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
1464
+ t
1465
+ ),
1466
+ children: /* @__PURE__ */ n.jsx(
1467
+ bn,
1468
+ {
1469
+ className: "group-data-[state=open]:rotate-180 transition-transform flex-shrink-0",
1470
+ size: 16
1471
+ }
1472
+ )
1473
+ }
1474
+ )
1475
+ ]
1476
+ }
1477
+ ), G = ({
1478
+ children: e,
1479
+ className: t
1480
+ }) => /* @__PURE__ */ n.jsx("span", { className: y("font-semibold w-full text-start", t), children: e }), wr = S.Root, Cr = S.Trigger, Sr = S.Group, Tr = C.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1481
+ S.SubTrigger,
1482
+ {
1483
+ ref: r,
1484
+ className: y(
1485
+ "flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
1486
+ t && "pl-8",
1487
+ e
1488
+ ),
1489
+ ...a,
1490
+ children: [
1491
+ s,
1492
+ /* @__PURE__ */ n.jsx(jn, { className: "ml-auto h-4 w-4" })
1493
+ ]
1494
+ }
1495
+ ));
1496
+ Tr.displayName = S.SubTrigger.displayName;
1497
+ const Ar = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1498
+ S.SubContent,
1499
+ {
1500
+ ref: s,
1501
+ className: y(
1502
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1503
+ e
1504
+ ),
1505
+ ...t
1506
+ }
1507
+ ));
1508
+ Ar.displayName = S.SubContent.displayName;
1509
+ const Ut = C.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(S.Portal, { children: /* @__PURE__ */ n.jsx(
1510
+ S.Content,
1511
+ {
1512
+ ref: a,
1513
+ sideOffset: t,
1514
+ className: y(
1515
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1516
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1517
+ e
1518
+ ),
1519
+ ...s
1520
+ }
1521
+ ) }));
1522
+ Ut.displayName = S.Content.displayName;
1523
+ const Mt = C.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1524
+ S.Item,
1525
+ {
1526
+ ref: a,
1527
+ className: y(
1528
+ "relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1529
+ t && "pl-8",
1530
+ e
1531
+ ),
1532
+ ...s
1533
+ }
1534
+ ));
1535
+ Mt.displayName = S.Item.displayName;
1536
+ const Or = C.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
1537
+ S.CheckboxItem,
1538
+ {
1539
+ ref: r,
1540
+ className: y(
1541
+ "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1542
+ e
1543
+ ),
1544
+ checked: s,
1545
+ ...a,
1546
+ children: [
1547
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(S.ItemIndicator, { children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" }) }) }),
1548
+ t
1549
+ ]
1550
+ }
1551
+ ));
1552
+ Or.displayName = S.CheckboxItem.displayName;
1553
+ const Rr = C.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
1554
+ S.RadioItem,
1555
+ {
1556
+ ref: a,
1557
+ className: y(
1558
+ "relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1559
+ e
1560
+ ),
1561
+ ...s,
1562
+ children: [
1563
+ /* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(S.ItemIndicator, { children: /* @__PURE__ */ n.jsx(Nn, { className: "h-4 w-4 fill-current" }) }) }),
1564
+ t
1565
+ ]
1566
+ }
1567
+ ));
1568
+ Rr.displayName = S.RadioItem.displayName;
1569
+ const Gt = C.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
1570
+ S.Label,
1571
+ {
1572
+ ref: a,
1573
+ className: y(
1574
+ "px-2 py-1.5 text-sm font-semibold",
1575
+ t && "pl-8",
1576
+ e
1577
+ ),
1578
+ ...s
1579
+ }
1580
+ ));
1581
+ Gt.displayName = S.Label.displayName;
1582
+ const Ht = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1583
+ S.Separator,
1584
+ {
1585
+ ref: s,
1586
+ className: y("-mx-1 my-1 h-px bg-muted", e),
1587
+ ...t
1588
+ }
1589
+ ));
1590
+ Ht.displayName = S.Separator.displayName;
1591
+ const Pr = ({
1592
+ examples: e,
1593
+ onSelect: t
1594
+ }) => /* @__PURE__ */ n.jsxs(wr, { children: [
1595
+ /* @__PURE__ */ n.jsx(Cr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
1596
+ E,
1597
+ {
1598
+ variant: "ghost",
1599
+ size: "sm",
1600
+ className: "hover:bg-accent hover:brightness-95",
1601
+ children: [
1602
+ "Use Example ",
1603
+ /* @__PURE__ */ n.jsx(pe, { size: 16, className: "ml-2" })
1604
+ ]
1605
+ }
1606
+ ) }),
1607
+ /* @__PURE__ */ n.jsx(Ut, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
1608
+ /* @__PURE__ */ n.jsx(Gt, { children: s.mediaType }),
1609
+ /* @__PURE__ */ n.jsx(Ht, {}),
1610
+ /* @__PURE__ */ n.jsx(Sr, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
1611
+ Mt,
1612
+ {
1613
+ onSelect: () => t(a, s.mediaType),
1614
+ children: /* @__PURE__ */ n.jsx(
1615
+ "span",
1616
+ {
1617
+ className: "line-clamp-1",
1618
+ title: a.summary ?? a.name,
1619
+ children: a.summary ?? a.name
1620
+ }
1621
+ )
1622
+ },
1623
+ a.name
1624
+ )) })
1625
+ ] }, s.mediaType)) })
1626
+ ] }), Lr = ({ examples: e }) => {
1627
+ const { register: t, setValue: s, watch: a } = ae(), r = a("headers");
1628
+ return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
1629
+ /* @__PURE__ */ n.jsxs(M, { children: [
1630
+ /* @__PURE__ */ n.jsx(wn, { size: 16 }),
1631
+ /* @__PURE__ */ n.jsx(G, { children: "Body" }),
1632
+ e && e.length > 0 && /* @__PURE__ */ n.jsx(
1633
+ Pr,
1634
+ {
1635
+ examples: e,
1636
+ onSelect: (o, i) => {
1637
+ s("body", JSON.stringify(o.value, null, 2)), s("headers", [
1638
+ ...r.filter((l) => l.name !== "Content-Type"),
1639
+ {
1640
+ name: "Content-Type",
1641
+ value: i,
1642
+ active: !0
1643
+ }
1644
+ ]);
1645
+ }
1646
+ }
1647
+ )
1648
+ ] }),
1649
+ /* @__PURE__ */ n.jsx(B, { className: "flex flex-col gap-2 ", children: /* @__PURE__ */ n.jsx(
1650
+ _t,
1651
+ {
1652
+ ...t("body"),
1653
+ className: y(
1654
+ "w-full p-2 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0"
1655
+ ),
1656
+ placeholder: "Your body here..."
1657
+ }
1658
+ ) })
1659
+ ] });
1660
+ }, ut = (e, t, s) => {
1661
+ const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
1662
+ const i = o.replace(/[:{}]/g, "");
1663
+ return s.pathParams.find((c) => c.name === i)?.value ?? o;
1664
+ }), r = new URL(
1665
+ a.replace(/^\//, ""),
1666
+ e.endsWith("/") ? e : `${e}/`
1667
+ );
1668
+ return s.queryParams.filter((o) => o.active).forEach((o) => {
1669
+ r.searchParams.set(o.name, o.value);
1670
+ }), r;
1671
+ };
1672
+ function $r(e) {
1673
+ return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
1674
+ e
1675
+ );
1676
+ }
1677
+ const Er = (e, t) => {
1678
+ const s = e.find(
1679
+ ([a]) => a.toLowerCase() === "content-disposition"
1680
+ )?.[1];
1681
+ if (s) {
1682
+ const a = s.match(
1683
+ /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
1684
+ );
1685
+ if (a?.[1])
1686
+ return a[1].replace(/['"]/g, "");
1687
+ }
1688
+ try {
1689
+ const r = new URL(t).pathname.split("/").pop() || "download";
1690
+ return r.includes(".") ? r : "download";
1691
+ } catch {
1692
+ return "download";
1693
+ }
1694
+ }, xe = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
1695
+ Te.Root,
1696
+ {
1697
+ ref: s,
1698
+ className: y(
1699
+ "peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
1700
+ "border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
1701
+ e
1702
+ ),
1703
+ ...t,
1704
+ children: /* @__PURE__ */ n.jsx(
1705
+ Te.Indicator,
1706
+ {
1707
+ className: y("flex items-center justify-center text-current"),
1708
+ children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" })
1709
+ }
1710
+ )
1711
+ }
1712
+ ));
1713
+ xe.displayName = Te.Root.displayName;
1714
+ const Ir = le.Root, Qt = C.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(le.Portal, { children: /* @__PURE__ */ n.jsx(
1715
+ le.Content,
1716
+ {
1717
+ ref: r,
1718
+ align: t,
1719
+ sideOffset: s,
1720
+ className: y(
1721
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1722
+ e
1723
+ ),
1724
+ ...a
1725
+ }
1726
+ ) }));
1727
+ Qt.displayName = le.Content.displayName;
1728
+ const kr = ({
1729
+ value: e,
1730
+ options: t,
1731
+ onChange: s,
1732
+ className: a,
1733
+ placeholder: r = "Enter value",
1734
+ onEnterPress: o,
1735
+ ref: i
1736
+ }) => {
1737
+ const [l, c] = k(!1), [u, d] = k(!1), p = fs((m) => m.filtered.count), f = L(null);
1738
+ return /* @__PURE__ */ n.jsxs(Ir, { open: l, children: [
1739
+ /* @__PURE__ */ n.jsx(hs, { children: /* @__PURE__ */ n.jsx(
1740
+ gs,
1741
+ {
1742
+ autoComplete: "off",
1743
+ ref: (m) => {
1744
+ f.current = m, typeof i == "function" ? i(m) : i && (i.current = m);
1745
+ },
1746
+ value: e,
1747
+ placeholder: r,
1748
+ className: y("h-9 bg-transparent", a),
1749
+ onFocus: () => c(!0),
1750
+ onBlur: () => {
1751
+ u || c(!1);
1752
+ },
1753
+ onKeyDown: (m) => {
1754
+ m.key === "Enter" && (c(!1), f.current?.blur(), o?.(m));
1755
+ },
1756
+ onValueChange: (m) => s(m)
1757
+ }
1758
+ ) }),
1759
+ /* @__PURE__ */ n.jsx(
1760
+ Qt,
1761
+ {
1762
+ onMouseEnter: () => d(!0),
1763
+ onMouseLeave: () => d(!1),
1764
+ onOpenAutoFocus: (m) => m.preventDefault(),
1765
+ className: y("p-0 w-(--radix-popover-trigger-width)", {
1766
+ "border-0": p === 0
1767
+ }),
1768
+ align: "start",
1769
+ side: "bottom",
1770
+ onWheel: (m) => {
1771
+ m.stopPropagation();
1772
+ },
1773
+ onTouchMove: (m) => {
1774
+ m.stopPropagation();
1775
+ },
1776
+ children: /* @__PURE__ */ n.jsx(ys, { className: "max-h-[140px]", children: t.map((m) => /* @__PURE__ */ n.jsx(
1777
+ vs,
1778
+ {
1779
+ value: m,
1780
+ onSelect: (x) => {
1781
+ s(x), c(!1);
1782
+ },
1783
+ className: "cursor-pointer",
1784
+ children: m
1785
+ },
1786
+ m
1787
+ )) })
1788
+ }
1789
+ )
1790
+ ] });
1791
+ }, ue = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(xs, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(kr, { ...t }) }), qe = (e, t) => {
1792
+ const s = C.forwardRef(({ className: a, asChild: r, ...o }, i) => {
1793
+ const l = r ? bs : e;
1794
+ return C.createElement(l, {
1795
+ ...o,
1796
+ ref: i,
1797
+ className: typeof t == "function" ? t({ className: a }) : y(t, a)
1798
+ });
1799
+ });
1800
+ return s.displayName = `VariantComponent(${e})`, s;
1801
+ }, Be = qe(
1802
+ "div",
1803
+ "grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5"
1804
+ ), me = qe(
1805
+ "div",
1806
+ "group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
1807
+ ), Dr = Object.freeze([
1808
+ "Accept",
1809
+ "Accept-Encoding",
1810
+ "Accept-Language",
1811
+ "Authorization",
1812
+ "Cache-Control",
1813
+ "Connection",
1814
+ "Content-Disposition",
1815
+ "Content-Encoding",
1816
+ "Content-Language",
1817
+ "Content-Length",
1818
+ "Content-Range",
1819
+ "Content-Security-Policy",
1820
+ "Content-Type",
1821
+ "Cookie",
1822
+ "Date",
1823
+ "ETag",
1824
+ "Expires",
1825
+ "Host",
1826
+ "If-Modified-Since",
1827
+ "Location",
1828
+ "Origin",
1829
+ "Pragma",
1830
+ "Referer",
1831
+ "Set-Cookie",
1832
+ "User-Agent",
1833
+ "X-Requested-With"
1834
+ ]), zr = ({
1835
+ control: e,
1836
+ schemaHeaders: t,
1837
+ lockedHeaders: s
1838
+ }) => {
1839
+ const { fields: a, append: r, remove: o } = Ie({
1840
+ control: e,
1841
+ name: "headers"
1842
+ }), { setValue: i, watch: l, formState: c } = ae(), u = L([]), d = L([]), p = l("headers"), f = Nt(
1843
+ (N) => {
1844
+ N?.stopPropagation(), r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
1845
+ },
1846
+ [r]
1847
+ );
1848
+ z(() => {
1849
+ p.length === 0 && f();
1850
+ }, [p, f]);
1851
+ const m = (N) => {
1852
+ u.current[N]?.focus();
1853
+ }, x = (N) => {
1854
+ f(), requestAnimationFrame(() => d.current[N + 1]?.focus());
1855
+ }, b = t.filter((N) => !p.some((w) => w.name === N.name)).map(({ name: N }) => N), v = a.flatMap((N, w) => !s?.map((R) => R.toLowerCase()).includes(N.name.toLowerCase()) ? [] : [w]), j = s?.map((N) => ({
1856
+ name: N,
1857
+ id: `locked-${N}`,
1858
+ value: "••••••••••",
1859
+ active: !0,
1860
+ locked: !0
1861
+ })) ?? [];
1862
+ return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
1863
+ /* @__PURE__ */ n.jsxs(M, { children: [
1864
+ /* @__PURE__ */ n.jsx(Cn, { size: 16 }),
1865
+ /* @__PURE__ */ n.jsx(G, { children: "Headers" }),
1866
+ /* @__PURE__ */ n.jsxs(
1867
+ ne,
1868
+ {
1869
+ onClick: f,
1870
+ type: "button",
1871
+ size: "sm",
1872
+ variant: "ghost",
1873
+ className: "hover:bg-accent hover:brightness-95 flex gap-2",
1874
+ children: [
1875
+ "Add header ",
1876
+ /* @__PURE__ */ n.jsx(pe, { size: 16 })
1877
+ ]
1878
+ }
1879
+ )
1880
+ ] }),
1881
+ /* @__PURE__ */ n.jsx(B, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(Be, { children: [
1882
+ j.map((N) => /* @__PURE__ */ n.jsxs(rt, { children: [
1883
+ /* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
1884
+ me,
1885
+ {
1886
+ className: "opacity-50 cursor-not-allowed font-mono text-xs",
1887
+ children: [
1888
+ /* @__PURE__ */ n.jsx(Sn, { size: 16 }),
1889
+ /* @__PURE__ */ n.jsx(
1890
+ de,
1891
+ {
1892
+ value: N.name,
1893
+ disabled: !0,
1894
+ className: "w-full border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
1895
+ }
1896
+ ),
1897
+ /* @__PURE__ */ n.jsx("div", { children: N.value })
1898
+ ]
1899
+ },
1900
+ N.id
1901
+ ) }),
1902
+ /* @__PURE__ */ n.jsx(
1903
+ ot,
1904
+ {
1905
+ alignOffset: 10,
1906
+ side: "bottom",
1907
+ align: "start",
1908
+ children: /* @__PURE__ */ n.jsx("p", { children: "This header is set by the selected authentication." })
1909
+ }
1910
+ )
1911
+ ] }, N.id)),
1912
+ a.map((N, w) => {
1913
+ const Q = t.find(
1914
+ (R) => R.name === p.at(w)?.name
1915
+ );
1916
+ return /* @__PURE__ */ n.jsxs(
1917
+ me,
1918
+ {
1919
+ className: y(
1920
+ v.includes(w) && "text-amber-600",
1921
+ v.includes(w) && !c.dirtyFields.headers?.[w]?.value && "hidden"
1922
+ ),
1923
+ children: [
1924
+ /* @__PURE__ */ n.jsx(
1925
+ F,
1926
+ {
1927
+ control: e,
1928
+ name: `headers.${w}.active`,
1929
+ render: ({ field: R }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1930
+ /* @__PURE__ */ n.jsx(
1931
+ xe,
1932
+ {
1933
+ id: `headers.${w}.active`,
1934
+ className: y(
1935
+ v.includes(w) && "hidden"
1936
+ ),
1937
+ checked: R.value,
1938
+ onCheckedChange: (D) => {
1939
+ R.onChange(D);
1940
+ }
1941
+ }
1942
+ ),
1943
+ /* @__PURE__ */ n.jsxs(rt, { children: [
1944
+ /* @__PURE__ */ n.jsx(at, { asChild: !0, children: /* @__PURE__ */ n.jsx(
1945
+ Tn,
1946
+ {
1947
+ className: y(
1948
+ "text-amber-600",
1949
+ !v.includes(w) && "hidden"
1950
+ ),
1951
+ size: 16
1952
+ }
1953
+ ) }),
1954
+ /* @__PURE__ */ n.jsx(
1955
+ ot,
1956
+ {
1957
+ alignOffset: 10,
1958
+ side: "bottom",
1959
+ align: "start",
1960
+ children: /* @__PURE__ */ n.jsx("p", { children: "This header will be overwritten by the selected authentication." })
1961
+ }
1962
+ )
1963
+ ] })
1964
+ ] })
1965
+ }
1966
+ ),
1967
+ /* @__PURE__ */ n.jsx(
1968
+ F,
1969
+ {
1970
+ control: e,
1971
+ name: `headers.${w}.name`,
1972
+ render: ({ field: R }) => /* @__PURE__ */ n.jsx(
1973
+ ue,
1974
+ {
1975
+ ...R,
1976
+ placeholder: "Name",
1977
+ className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
1978
+ options: [...b, ...Dr],
1979
+ onEnterPress: () => m(w),
1980
+ onChange: (D) => {
1981
+ R.onChange(D), i(`headers.${w}.active`, !0);
1982
+ },
1983
+ ref: (D) => {
1984
+ d.current[w] = D;
1985
+ }
1986
+ }
1987
+ )
1988
+ }
1989
+ ),
1990
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
1991
+ /* @__PURE__ */ n.jsx(
1992
+ F,
1993
+ {
1994
+ control: e,
1995
+ name: `headers.${w}.value`,
1996
+ render: ({ field: R }) => Q?.enum && Q.enum.length > 0 ? /* @__PURE__ */ n.jsx(
1997
+ ue,
1998
+ {
1999
+ shouldFilter: !1,
2000
+ value: R.value,
2001
+ options: Q.enum ?? [],
2002
+ onChange: (P) => {
2003
+ R.onChange(P), i(`headers.${w}.active`, !0);
2004
+ },
2005
+ className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2006
+ }
2007
+ ) : /* @__PURE__ */ n.jsx(
2008
+ de,
2009
+ {
2010
+ placeholder: "Value",
2011
+ className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono",
2012
+ autoComplete: "off",
2013
+ ...R,
2014
+ ref: (P) => {
2015
+ u.current[w] = P;
2016
+ },
2017
+ onKeyDown: (P) => {
2018
+ P.key === "Enter" && P.currentTarget.value.trim() && x(w);
2019
+ }
2020
+ }
2021
+ )
2022
+ }
2023
+ ),
2024
+ /* @__PURE__ */ n.jsx(
2025
+ ne,
2026
+ {
2027
+ size: "icon-xs",
2028
+ variant: "ghost",
2029
+ className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
2030
+ onClick: () => o(w),
2031
+ type: "button",
2032
+ children: /* @__PURE__ */ n.jsx(yt, { size: 16 })
2033
+ }
2034
+ )
2035
+ ] })
2036
+ ]
2037
+ },
2038
+ N.id
2039
+ );
2040
+ })
2041
+ ] }) }) }) })
2042
+ ] });
2043
+ }, Fr = Ns(
2044
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2045
+ ), Ve = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
2046
+ St.Root,
2047
+ {
2048
+ ref: s,
2049
+ className: y(Fr(), e),
2050
+ ...t
2051
+ }
2052
+ ));
2053
+ Ve.displayName = St.Root.displayName;
2054
+ const Jt = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
2055
+ se.Root,
2056
+ {
2057
+ className: y("grid gap-2", e),
2058
+ ...t,
2059
+ ref: s
2060
+ }
2061
+ ));
2062
+ Jt.displayName = se.Root.displayName;
2063
+ const Wt = C.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
2064
+ se.Item,
2065
+ {
2066
+ ref: s,
2067
+ className: y(
2068
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2069
+ e
2070
+ ),
2071
+ ...t,
2072
+ children: /* @__PURE__ */ n.jsx(se.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(An, { className: "h-2.5 w-2.5 fill-current text-current" }) })
2073
+ }
2074
+ ));
2075
+ Wt.displayName = se.Item.displayName;
2076
+ const Xt = ({
2077
+ identities: e,
2078
+ setValue: t,
2079
+ value: s
2080
+ }) => /* @__PURE__ */ n.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsx(
2081
+ Jt,
2082
+ {
2083
+ onValueChange: (a) => t(a),
2084
+ value: s,
2085
+ defaultValue: te,
2086
+ className: "gap-0",
2087
+ disabled: e?.length === 0,
2088
+ children: [{ id: te, label: "None" }, ...e ?? []].map(
2089
+ (a) => /* @__PURE__ */ n.jsxs(
2090
+ Ve,
2091
+ {
2092
+ className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
2093
+ children: [
2094
+ /* @__PURE__ */ n.jsx(Wt, { value: a.id, id: a.id }),
2095
+ /* @__PURE__ */ n.jsx("span", { children: a.label })
2096
+ ]
2097
+ },
2098
+ a.id
2099
+ )
2100
+ )
2101
+ }
2102
+ ) }), qr = ({
2103
+ onSubmit: e,
2104
+ identities: t,
2105
+ open: s,
2106
+ onOpenChange: a
2107
+ }) => {
2108
+ const [r, o] = k(void 0), [i, l] = k(!1);
2109
+ return /* @__PURE__ */ n.jsx(Le, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs($e, { children: [
2110
+ /* @__PURE__ */ n.jsx(Ee, { children: "Select an auth identity" }),
2111
+ /* @__PURE__ */ n.jsx(wt, { children: "Please select an identity for this request." }),
2112
+ /* @__PURE__ */ n.jsx(js, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
2113
+ Xt,
2114
+ {
2115
+ identities: t,
2116
+ setValue: o,
2117
+ value: r
2118
+ }
2119
+ ) }),
2120
+ /* @__PURE__ */ n.jsxs(Ct, { className: "flex flex-col gap-2", children: [
2121
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2122
+ /* @__PURE__ */ n.jsx(
2123
+ xe,
2124
+ {
2125
+ id: "remember",
2126
+ checked: i,
2127
+ onCheckedChange: (c) => l(
2128
+ c === "indeterminate" ? !1 : !!c
2129
+ )
2130
+ }
2131
+ ),
2132
+ /* @__PURE__ */ n.jsx(Ve, { htmlFor: "remember", children: "Remember my choice" })
2133
+ ] }),
2134
+ /* @__PURE__ */ n.jsx(
2135
+ E,
2136
+ {
2137
+ onClick: () => e({ identity: r, rememberedIdentity: i }),
2138
+ children: "Send"
2139
+ }
2140
+ )
2141
+ ] })
2142
+ ] }) });
2143
+ }, we = (e) => Math.abs(
2144
+ isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
2145
+ ), Ce = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${we(t) + we(s)}`)) : we(e), mt = (e, t = {}) => {
2146
+ const s = (3 * Ce(e) + 2 * Ce(e) + Ce(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
2147
+ return `${s}deg ${a}% ${r}%`;
2148
+ }, Se = "data-linked-param", Br = (e) => {
2149
+ const { resolvedTheme: t } = ws();
2150
+ return {
2151
+ text: mt(
2152
+ e,
2153
+ t === "light" ? { saturation: 95, lightness: 38 } : {}
2154
+ ),
2155
+ background: mt(
2156
+ e,
2157
+ t === "light" ? { saturation: 85, lightness: 40 } : {}
2158
+ )
2159
+ };
2160
+ }, Zt = ({
2161
+ name: e,
2162
+ className: t,
2163
+ slug: s,
2164
+ title: a,
2165
+ children: r,
2166
+ onClick: o
2167
+ }) => {
2168
+ const i = L(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } = Br(c), p = `hsl(${u} / 100%)`, f = `hsl(${d} / 10%)`, m = `hsl(${d} / 50%)`;
2169
+ return z(() => {
2170
+ if (!l || !i.current) return;
2171
+ const x = () => {
2172
+ document.querySelectorAll(`[${Se}="${l}"]`).forEach((j) => {
2173
+ j instanceof HTMLElement && (j.dataset.active = "true");
2174
+ });
2175
+ }, b = () => {
2176
+ document.querySelectorAll(`[${Se}="${l}"]`).forEach((j) => {
2177
+ j instanceof HTMLElement && (j.dataset.active = "false");
2178
+ });
2179
+ }, v = i.current;
2180
+ return v.addEventListener("mouseenter", x), v.addEventListener("mouseleave", b), () => {
2181
+ v.removeEventListener("mouseenter", x), v.removeEventListener("mouseleave", b);
2182
+ };
2183
+ }, [l]), /* @__PURE__ */ n.jsx(
2184
+ "span",
2185
+ {
2186
+ [Se]: l,
2187
+ className: y(
2188
+ // This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
2189
+ "relative transition-all duration-100 rounded-lg",
2190
+ "border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
2191
+ "data-[active=true]:border-(--param-color) data-[active=true]:shadow-sm data-[active=true]:bottom-px",
2192
+ t
2193
+ ),
2194
+ title: a,
2195
+ suppressHydrationWarning: !0,
2196
+ ref: i,
2197
+ onClick: o,
2198
+ style: {
2199
+ "--param-color": p,
2200
+ "--border-color": m,
2201
+ "--background-color": f
2202
+ },
2203
+ children: r ?? e
2204
+ }
2205
+ );
2206
+ }, Vr = ({
2207
+ control: e,
2208
+ url: t
2209
+ }) => {
2210
+ const { fields: s } = Ie({
2211
+ control: e,
2212
+ name: "pathParams"
2213
+ }), a = [...s].sort(
2214
+ (r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
2215
+ );
2216
+ return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(Be, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(me, { children: [
2217
+ /* @__PURE__ */ n.jsx(
2218
+ F,
2219
+ {
2220
+ control: e,
2221
+ name: `pathParams.${o}.name`,
2222
+ render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
2223
+ Zt,
2224
+ {
2225
+ slug: r.name,
2226
+ name: r.name,
2227
+ className: "font-mono text-xs px-2"
2228
+ }
2229
+ ) })
2230
+ }
2231
+ ),
2232
+ /* @__PURE__ */ n.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ n.jsx(
2233
+ F,
2234
+ {
2235
+ control: e,
2236
+ name: `pathParams.${o}.value`,
2237
+ render: ({ field: i }) => /* @__PURE__ */ n.jsx(
2238
+ de,
2239
+ {
2240
+ ...i,
2241
+ required: !0,
2242
+ placeholder: "Enter value",
2243
+ className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs font-mono focus-visible:ring-0"
2244
+ }
2245
+ )
2246
+ }
2247
+ ) })
2248
+ ] }, r.id)) }) });
2249
+ }, _r = qe(
2250
+ "input",
2251
+ "bg-transparent h-9 font-mono text-xs"
2252
+ ), Ur = ({
2253
+ control: e,
2254
+ schemaQueryParams: t
2255
+ }) => {
2256
+ const { fields: s, remove: a, append: r } = Ie({
2257
+ control: e,
2258
+ name: "queryParams"
2259
+ }), { setValue: o, getValues: i, watch: l } = ae(), c = l("queryParams");
2260
+ z(() => {
2261
+ c.length === 0 && r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
2262
+ }, [c, r]);
2263
+ const u = t.map(
2264
+ (d) => !!d.isRequired
2265
+ );
2266
+ return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2267
+ /* @__PURE__ */ n.jsxs(M, { children: [
2268
+ /* @__PURE__ */ n.jsx(On, { size: 16 }),
2269
+ /* @__PURE__ */ n.jsx(G, { children: "Query Parameters" }),
2270
+ /* @__PURE__ */ n.jsxs(
2271
+ E,
2272
+ {
2273
+ onClick: () => {
2274
+ o("queryParams", [
2275
+ ...i("queryParams"),
2276
+ { name: "", value: "", active: !1 }
2277
+ ]);
2278
+ },
2279
+ type: "button",
2280
+ size: "sm",
2281
+ variant: "ghost",
2282
+ className: "hover:bg-accent hover:brightness-95 flex gap-2",
2283
+ children: [
2284
+ "Add parameter ",
2285
+ /* @__PURE__ */ n.jsx(pe, { size: 16 })
2286
+ ]
2287
+ }
2288
+ )
2289
+ ] }),
2290
+ /* @__PURE__ */ n.jsx(B, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(Be, { children: s.map((d, p) => {
2291
+ const f = t.find(
2292
+ (m) => m.name === c.at(p)?.name
2293
+ );
2294
+ return /* @__PURE__ */ n.jsxs(me, { children: [
2295
+ /* @__PURE__ */ n.jsx(
2296
+ F,
2297
+ {
2298
+ control: e,
2299
+ name: `queryParams.${p}.active`,
2300
+ render: ({ field: m }) => /* @__PURE__ */ n.jsx(
2301
+ xe,
2302
+ {
2303
+ id: `queryParams.${p}.active`,
2304
+ checked: m.value,
2305
+ onCheckedChange: m.onChange
2306
+ }
2307
+ )
2308
+ }
2309
+ ),
2310
+ /* @__PURE__ */ n.jsx(
2311
+ F,
2312
+ {
2313
+ control: e,
2314
+ render: ({ field: m }) => u[p] ? /* @__PURE__ */ n.jsx(_r, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
2315
+ "label",
2316
+ {
2317
+ className: "flex items-center cursor-pointer gap-1",
2318
+ htmlFor: `queryParams.${p}.active`,
2319
+ title: u[p] ? "Required field" : void 0,
2320
+ children: [
2321
+ m.value,
2322
+ u[p] && /* @__PURE__ */ n.jsx("sup", { children: " *" })
2323
+ ]
2324
+ }
2325
+ ) }) : /* @__PURE__ */ n.jsx(
2326
+ ue,
2327
+ {
2328
+ value: m.value,
2329
+ options: t.map((x) => x.name),
2330
+ onChange: (x) => {
2331
+ m.onChange(x);
2332
+ },
2333
+ className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2334
+ }
2335
+ ),
2336
+ name: `queryParams.${p}.name`
2337
+ }
2338
+ ),
2339
+ /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between items-center", children: [
2340
+ /* @__PURE__ */ n.jsx(
2341
+ F,
2342
+ {
2343
+ control: e,
2344
+ render: ({ field: m }) => f?.enum && f.enum.length > 0 ? /* @__PURE__ */ n.jsx(
2345
+ ue,
2346
+ {
2347
+ value: m.value,
2348
+ options: f.enum ?? [],
2349
+ onChange: (b) => {
2350
+ m.onChange(b), o(`queryParams.${p}.active`, !0);
2351
+ },
2352
+ className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
2353
+ }
2354
+ ) : /* @__PURE__ */ n.jsx(
2355
+ de,
2356
+ {
2357
+ ...m,
2358
+ onChange: (b) => {
2359
+ m.onChange(b.target.value), b.target.value.length > 0 && o(`queryParams.${p}.active`, !0);
2360
+ },
2361
+ placeholder: "Enter value",
2362
+ className: "w-full border-0 p-0 m-0 shadow-none focus-visible:ring-0 text-xs font-mono"
2363
+ }
2364
+ ),
2365
+ name: `queryParams.${p}.value`
2366
+ }
2367
+ ),
2368
+ /* @__PURE__ */ n.jsx(
2369
+ E,
2370
+ {
2371
+ size: "icon-xs",
2372
+ variant: "ghost",
2373
+ className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
2374
+ onClick: () => a(p),
2375
+ type: "button",
2376
+ children: /* @__PURE__ */ n.jsx(yt, { size: 16 })
2377
+ }
2378
+ )
2379
+ ] })
2380
+ ] }, d.id);
2381
+ }) }) }) })
2382
+ ] });
2383
+ }, Mr = Re()(
2384
+ Pe(
2385
+ (e, t) => ({
2386
+ rememberedIdentity: null,
2387
+ setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
2388
+ getRememberedIdentity: (s) => s.find(
2389
+ (a) => a === t().rememberedIdentity
2390
+ )
2391
+ }),
2392
+ {
2393
+ name: "identity-storage",
2394
+ storage: vt(() => sessionStorage)
2395
+ }
2396
+ )
2397
+ ), Gr = ({
2398
+ path: e,
2399
+ renderParam: t
2400
+ }) => {
2401
+ let s = 0;
2402
+ return e.split("/").map((a, r, o) => {
2403
+ const i = Array.from(a.matchAll(/{([^}]+)}/g)), l = [];
2404
+ let c = 0;
2405
+ return i.forEach((u) => {
2406
+ const [d, p] = u;
2407
+ if (!p) return;
2408
+ const f = u.index;
2409
+ f > c && l.push(
2410
+ /* @__PURE__ */ n.jsx(Y, { children: a.slice(c, f) }, `text-${c}-${f}`)
2411
+ ), l.push(
2412
+ /* @__PURE__ */ n.jsx(Y, { children: t({ name: p, originalValue: d, index: s++ }) }, `param-${p}`)
2413
+ ), c = f + d.length;
2414
+ }), c < a.length && l.push(
2415
+ /* @__PURE__ */ n.jsx(Y, { children: a.slice(c) }, `text-${c}-${a.length}`)
2416
+ ), // eslint-disable-next-line react/no-array-index-key
2417
+ /* @__PURE__ */ n.jsxs(Y, { children: [
2418
+ l,
2419
+ r < o.length - 1 && "/",
2420
+ /* @__PURE__ */ n.jsx("wbr", {})
2421
+ ] }, `${a}-${r}`);
2422
+ });
2423
+ }, Hr = ({ url: e }) => {
2424
+ const { watch: t, setFocus: s } = ae(), [a] = t(["pathParams"]);
2425
+ return /* @__PURE__ */ n.jsx(
2426
+ Gr,
2427
+ {
2428
+ path: e,
2429
+ renderParam: ({ name: r, originalValue: o, index: i }) => {
2430
+ const l = a.find(
2431
+ (c) => c.name === r
2432
+ )?.value;
2433
+ return /* @__PURE__ */ n.jsx(
2434
+ Zt,
2435
+ {
2436
+ name: r,
2437
+ backgroundOpacity: "0",
2438
+ slug: r,
2439
+ onClick: () => s(`pathParams.${i}.value`),
2440
+ children: l || o
2441
+ }
2442
+ );
2443
+ }
2444
+ }
2445
+ );
2446
+ }, Qr = () => {
2447
+ const { watch: e } = ae(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ n.jsxs(Y, { children: [
2448
+ a.name,
2449
+ "=",
2450
+ encodeURIComponent(a.value).replaceAll("%20", "+"),
2451
+ r < o.length - 1 && "&",
2452
+ /* @__PURE__ */ n.jsx("wbr", {})
2453
+ ] }, a.name));
2454
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2455
+ s.length > 0 ? "?" : "",
2456
+ s
2457
+ ] });
2458
+ }, Jr = ({
2459
+ open: e,
2460
+ setOpen: t,
2461
+ onSignUp: s,
2462
+ onLogin: a
2463
+ }) => /* @__PURE__ */ n.jsx(Le, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs($e, { children: [
2464
+ /* @__PURE__ */ n.jsx(Ee, { children: "Welcome to the Playground!" }),
2465
+ /* @__PURE__ */ n.jsx(wt, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
2466
+ /* @__PURE__ */ n.jsxs(Ct, { className: "flex gap-2 sm:justify-between", children: [
2467
+ /* @__PURE__ */ n.jsx(E, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
2468
+ /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
2469
+ s && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
2470
+ a && /* @__PURE__ */ n.jsx(E, { type: "button", variant: "default", onClick: a, children: "Login" })
2471
+ ] })
2472
+ ] })
2473
+ ] }) }), Yt = (e = 0) => {
2474
+ if (e === 0)
2475
+ return "0 B";
2476
+ const t = Math.floor(Math.log(e) / Math.log(1e3));
2477
+ return `${(e / Math.pow(1e3, t)).toFixed(
2478
+ t ? 2 : 0
2479
+ )} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
2480
+ }, Wr = ({ status: e }) => {
2481
+ if (!e) return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
2482
+ switch (Number(e.toString().slice(0, 1))) {
2483
+ case 2:
2484
+ return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-green-500" });
2485
+ case 4:
2486
+ return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-yellow-400" });
2487
+ case 5:
2488
+ return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-red-500" });
2489
+ default:
2490
+ return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
2491
+ }
2492
+ }, Xr = () => {
2493
+ const e = L(null), t = L(null), s = L(Date.now()), a = L(null), r = Nt(() => {
2494
+ if (t.current) {
2495
+ const o = Date.now() - s.current;
2496
+ t.current.nodeValue = o.toFixed();
2497
+ }
2498
+ a.current = requestAnimationFrame(r);
2499
+ }, []);
2500
+ return Yn(() => {
2501
+ const o = document.createTextNode("0"), i = e.current;
2502
+ return i.appendChild(o), t.current = o, s.current = Date.now(), a.current = requestAnimationFrame(r), () => {
2503
+ a.current && cancelAnimationFrame(a.current), t.current && i.contains(o) && i.removeChild(o);
2504
+ };
2505
+ }, [r]), /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
2506
+ }, Zr = ({
2507
+ status: e,
2508
+ time: t,
2509
+ size: s
2510
+ }) => {
2511
+ const a = {
2512
+ 200: "OK",
2513
+ 201: "Created",
2514
+ 202: "Accepted",
2515
+ 204: "No Content",
2516
+ 400: "Bad Request",
2517
+ 401: "Unauthorized",
2518
+ 403: "Forbidden",
2519
+ 404: "Not Found",
2520
+ 405: "Method Not Allowed",
2521
+ 500: "Internal Server Error"
2522
+ };
2523
+ return /* @__PURE__ */ n.jsxs("div", { className: "flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
2524
+ /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
2525
+ /* @__PURE__ */ n.jsx(Wr, { status: e }),
2526
+ " ",
2527
+ e ?? "Sending Request...",
2528
+ e ? ` ${a[e]}` : ""
2529
+ ] }),
2530
+ /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
2531
+ /* @__PURE__ */ n.jsxs("div", { children: [
2532
+ /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
2533
+ " ",
2534
+ /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[5ch]", children: s ? Yt(s) : "- B" })
2535
+ ] }),
2536
+ /* @__PURE__ */ n.jsxs("div", { children: [
2537
+ /* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
2538
+ " ",
2539
+ t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(Xr, {}),
2540
+ "ms"
2541
+ ] })
2542
+ ] })
2543
+ ] });
2544
+ };
2545
+ function _e(e) {
2546
+ if (e === null) return "null";
2547
+ if (Array.isArray(e)) {
2548
+ if (e.length === 0) return "any[]";
2549
+ const t = e[0];
2550
+ return t === void 0 ? "any[]" : `${_e(t)}[]`;
2551
+ }
2552
+ return typeof e == "object" ? Yr(e) : typeof e;
2553
+ }
2554
+ function Yr(e, t = "") {
2555
+ const s = ["{"];
2556
+ for (const [a, r] of Object.entries(e)) {
2557
+ const o = _e(r);
2558
+ s.push(` ${a}: ${o};`);
2559
+ }
2560
+ return s.push("}"), s.join(`
2561
+ `);
2562
+ }
2563
+ function Kr(e) {
2564
+ return { lines: [`type GeneratedType = ${_e(e)};`] };
2565
+ }
2566
+ const Kt = ({
2567
+ code: e,
2568
+ language: t,
2569
+ children: s
2570
+ }) => {
2571
+ const { syntaxHighlighting: a } = Mn().options;
2572
+ return Xn(a?.highlighter, "Highlighter not found"), Cs(
2573
+ a.highlighter,
2574
+ e ?? s ?? "",
2575
+ t,
2576
+ a.themes
2577
+ );
2578
+ };
2579
+ Kt.displayName = "Highlight";
2580
+ const ea = (e) => Object.entries({
2581
+ "application/json": "json",
2582
+ "text/json": "json",
2583
+ "text/html": "html",
2584
+ "text/css": "css",
2585
+ "text/javascript": "javascript",
2586
+ "application/xml": "xml",
2587
+ "application/xhtml+xml": "xhtml"
2588
+ }).find(
2589
+ ([s]) => e.includes(s)
2590
+ )?.[1], ta = (e) => {
2591
+ const t = e.find(([s]) => s.toLowerCase() === "content-type")?.[1] || "";
2592
+ return ea(t);
2593
+ }, na = (e) => {
2594
+ try {
2595
+ return JSON.stringify(JSON.parse(e), null, 2);
2596
+ } catch {
2597
+ return null;
2598
+ }
2599
+ }, sa = (e) => {
2600
+ const t = [
2601
+ "Content-Type",
2602
+ "Content-Length",
2603
+ "Authorization",
2604
+ "X-RateLimit-Remaining",
2605
+ "X-RateLimit-Limit",
2606
+ "Cache-Control",
2607
+ "ETag"
2608
+ ].map((s) => s.toLowerCase());
2609
+ return [...e].sort(([s], [a]) => {
2610
+ const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
2611
+ return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
2612
+ });
2613
+ }, Z = 3, ra = ({
2614
+ body: e = "",
2615
+ headers: t,
2616
+ request: s,
2617
+ size: a,
2618
+ isBinary: r = !1,
2619
+ fileName: o,
2620
+ blob: i
2621
+ }) => {
2622
+ const l = ta(t), c = na(e), u = c || e, [d, p] = k(
2623
+ c ? "formatted" : "raw"
2624
+ ), f = Gn({
2625
+ queryKey: ["types", u],
2626
+ queryFn: async () => Kr(JSON.parse(u)),
2627
+ enabled: d === "types" && !r
2628
+ }), m = () => {
2629
+ if (i && o) {
2630
+ const v = URL.createObjectURL(i), j = document.createElement("a");
2631
+ j.href = v, j.download = o, document.body.appendChild(j), j.click(), document.body.removeChild(j), URL.revokeObjectURL(v);
2632
+ }
2633
+ }, x = sa([...t]), b = "grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs";
2634
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2635
+ /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2636
+ /* @__PURE__ */ n.jsxs(M, { children: [
2637
+ /* @__PURE__ */ n.jsx(Rn, { size: 16 }),
2638
+ /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Request" })
2639
+ ] }),
2640
+ /* @__PURE__ */ n.jsx(B, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: s.headers.slice(0, Z).map(([v, j]) => /* @__PURE__ */ n.jsxs("div", { className: b, children: [
2641
+ /* @__PURE__ */ n.jsx("div", { className: "", children: v }),
2642
+ /* @__PURE__ */ n.jsx("div", { className: "break-all", children: j })
2643
+ ] }, v)) }) })
2644
+ ] }),
2645
+ /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
2646
+ /* @__PURE__ */ n.jsxs(M, { children: [
2647
+ /* @__PURE__ */ n.jsx(Pn, { size: 16 }),
2648
+ /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Response" })
2649
+ ] }),
2650
+ /* @__PURE__ */ n.jsx(B, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: [
2651
+ x.slice(0, Z).map(([v, j]) => /* @__PURE__ */ n.jsxs("div", { className: b, children: [
2652
+ /* @__PURE__ */ n.jsx("div", { className: "", children: v }),
2653
+ /* @__PURE__ */ n.jsx("div", { className: "break-all line-clamp-1", children: j })
2654
+ ] }, v)),
2655
+ x.length > Z && /* @__PURE__ */ n.jsxs(q, { className: "col-span-full grid-cols-subgrid grid group", children: [
2656
+ /* @__PURE__ */ n.jsxs(zt, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
2657
+ /* @__PURE__ */ n.jsxs("span", { children: [
2658
+ "Show ",
2659
+ x.length - Z,
2660
+ " more headers"
2661
+ ] }),
2662
+ /* @__PURE__ */ n.jsx(pe, { size: 12, className: "text-muted-foreground" })
2663
+ ] }),
2664
+ /* @__PURE__ */ n.jsx(B, { className: "col-span-full grid grid-cols-subgrid", children: x.slice(Z).map(([v, j]) => /* @__PURE__ */ n.jsxs("div", { className: b, children: [
2665
+ /* @__PURE__ */ n.jsx("div", { className: "", children: v }),
2666
+ /* @__PURE__ */ n.jsx("div", { className: "break-all ", children: j })
2667
+ ] }, v)) })
2668
+ ] })
2669
+ ] }) })
2670
+ ] }),
2671
+ /* @__PURE__ */ n.jsx("div", { className: "flex gap-2 justify-between items-center border-b h-10", children: c && !r && /* @__PURE__ */ n.jsx("div", { className: "px-2", children: /* @__PURE__ */ n.jsxs(
2672
+ Ft,
2673
+ {
2674
+ value: d,
2675
+ onValueChange: (v) => p(v),
2676
+ children: [
2677
+ /* @__PURE__ */ n.jsx(ze, { className: "min-w-32 border-none h-8", children: /* @__PURE__ */ n.jsx(qt, { placeholder: "View" }) }),
2678
+ /* @__PURE__ */ n.jsxs(Fe, { children: [
2679
+ /* @__PURE__ */ n.jsx(ee, { value: "formatted", children: "Formatted" }),
2680
+ /* @__PURE__ */ n.jsx(ee, { value: "raw", children: "Raw" }),
2681
+ /* @__PURE__ */ n.jsx(ee, { value: "types", children: "Types" })
2682
+ ] })
2683
+ ]
2684
+ }
2685
+ ) }) }),
2686
+ /* @__PURE__ */ n.jsx("div", { children: r ? /* @__PURE__ */ n.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
2687
+ /* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
2688
+ /* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
2689
+ /* @__PURE__ */ n.jsxs(
2690
+ E,
2691
+ {
2692
+ onClick: m,
2693
+ className: "flex items-center gap-2",
2694
+ disabled: !i,
2695
+ children: [
2696
+ /* @__PURE__ */ n.jsx(Ln, { className: "h-4 w-4" }),
2697
+ "Download ",
2698
+ o || "file",
2699
+ " (",
2700
+ Yt(a),
2701
+ ")"
2702
+ ]
2703
+ }
2704
+ )
2705
+ ] }) }) : /* @__PURE__ */ n.jsx("div", { className: "overflow-auto max-w-full p-4 text-xs max-h-[calc(83.333vh-180px)]", children: /* @__PURE__ */ n.jsx(
2706
+ Kt,
2707
+ {
2708
+ language: d === "types" ? "typescript" : d === "raw" ? c ? "plain" : l : "json",
2709
+ code: (d === "raw" ? e : d === "types" ? f.data?.lines.join(`
2710
+ `) : u) ?? ""
2711
+ }
2712
+ ) }) })
2713
+ ] });
2714
+ }, aa = ({
2715
+ queryMutation: e,
2716
+ showLongRunningWarning: t,
2717
+ onCancel: s,
2718
+ tip: a
2719
+ }) => /* @__PURE__ */ n.jsxs("div", { className: "overflow-y-auto h-[80vh] bg-muted/50", children: [
2720
+ (e.isPending || e.data) && /* @__PURE__ */ n.jsx(
2721
+ Zr,
2722
+ {
2723
+ status: e.data?.status,
2724
+ time: e.data?.time,
2725
+ size: e.data?.size
2726
+ }
2727
+ ),
2728
+ e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(as, { children: [
2729
+ /* @__PURE__ */ n.jsx($n, { size: 24, strokeWidth: 1.5, className: "me-5" }),
2730
+ /* @__PURE__ */ n.jsx(os, { children: "Request failed" }),
2731
+ /* @__PURE__ */ n.jsx(is, { children: e.error.message || String(e.error) || "Unexpected error" })
2732
+ ] }) }) : e.data ? /* @__PURE__ */ n.jsx(
2733
+ ra,
2734
+ {
2735
+ request: e.data.request,
2736
+ size: e.data.size,
2737
+ headers: e.data.headers,
2738
+ body: e.data.body,
2739
+ isBinary: e.data.isBinary,
2740
+ fileName: e.data.fileName,
2741
+ blob: e.data.blob
2742
+ }
2743
+ ) : e.isPending ? /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
2744
+ /* @__PURE__ */ n.jsx(ss, {}),
2745
+ /* @__PURE__ */ n.jsxs(
2746
+ "div",
2747
+ {
2748
+ className: y(
2749
+ "opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
2750
+ t && "opacity-100 pointer-events-auto"
2751
+ ),
2752
+ children: [
2753
+ "Looks like the request is taking longer than expected.",
2754
+ /* @__PURE__ */ n.jsx(
2755
+ ne,
2756
+ {
2757
+ type: "button",
2758
+ onClick: s,
2759
+ size: "sm",
2760
+ className: "w-fit",
2761
+ variant: "outline",
2762
+ children: "Cancel"
2763
+ }
2764
+ )
2765
+ ]
2766
+ }
2767
+ )
2768
+ ] }) }) : /* @__PURE__ */ n.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
2769
+ /* @__PURE__ */ n.jsx(
2770
+ En,
2771
+ {
2772
+ size: 64,
2773
+ className: "text-muted-foreground",
2774
+ strokeWidth: 1.2
2775
+ }
2776
+ ),
2777
+ /* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
2778
+ a
2779
+ ] }) })
2780
+ ] }), oa = Re()(
2781
+ Pe(
2782
+ (e) => ({
2783
+ skipLogin: !1,
2784
+ setSkipLogin: (t) => e({ skipLogin: t })
2785
+ }),
2786
+ {
2787
+ name: "remember-skip-login",
2788
+ storage: vt(() => sessionStorage)
2789
+ }
2790
+ )
2791
+ ), te = "__none", ia = ({
2792
+ server: e,
2793
+ servers: t = [],
2794
+ url: s,
2795
+ method: a,
2796
+ headers: r = [],
2797
+ queryParams: o = [],
2798
+ pathParams: i = [],
2799
+ defaultBody: l = "",
2800
+ examples: c,
2801
+ requiresLogin: u = !1,
2802
+ onLogin: d,
2803
+ onSignUp: p
2804
+ }) => {
2805
+ const { selectedServer: f, setSelectedServer: m } = Nr(
2806
+ t.map((h) => ({ url: h }))
2807
+ ), [x, b] = k(!1), v = Hn(), { setRememberedIdentity: j, getRememberedIdentity: N } = Mr(), [, w] = Kn(), { skipLogin: Q, setSkipLogin: R } = oa(), [D, P] = k(!1), J = L(void 0), Me = ps(j), Ge = L(null), { label: an } = br("meta+enter", () => {
2808
+ Ge.current?.requestSubmit();
2809
+ }), { register: on, control: oe, handleSubmit: He, watch: Qe, setValue: ge, ...ye } = ls({
2810
+ defaultValues: {
2811
+ body: l,
2812
+ queryParams: o.length > 0 ? o.map((h) => ({
2813
+ name: h.name,
2814
+ value: h.defaultValue ?? "",
2815
+ active: h.defaultActive ?? !1,
2816
+ enum: h.enum ?? []
2817
+ })) : [
2818
+ {
2819
+ name: "",
2820
+ value: "",
2821
+ active: !1,
2822
+ enum: []
2823
+ }
2824
+ ],
2825
+ pathParams: i.map((h) => ({
2826
+ name: h.name,
2827
+ value: h.defaultValue ?? ""
2828
+ })),
2829
+ headers: r.length > 0 ? r.map((h) => ({
2830
+ name: h.name,
2831
+ value: h.defaultValue ?? "",
2832
+ active: h.defaultActive ?? !1
2833
+ })) : [
2834
+ {
2835
+ name: "",
2836
+ value: "",
2837
+ active: !1
2838
+ }
2839
+ ],
2840
+ identity: N([
2841
+ te,
2842
+ ...v.data?.map((h) => h.id) ?? []
2843
+ ])
2844
+ }
2845
+ }), W = Qe("identity"), cn = jt(
2846
+ () => v.data?.find((h) => h.id === W)?.authorizationFields,
2847
+ [v.data, W]
2848
+ );
2849
+ z(() => {
2850
+ W && Me.current(W);
2851
+ }, [Me, W]);
2852
+ const V = cs({
2853
+ gcTime: 0,
2854
+ mutationFn: async (h) => {
2855
+ const ie = performance.now(), xn = Object.fromEntries([
2856
+ ...h.headers.filter((O) => O.name && O.active).map((O) => [O.name, O.value])
2857
+ ]), _ = new Request(
2858
+ ut(e ?? f, s, h),
2859
+ {
2860
+ method: a.toUpperCase(),
2861
+ headers: xn,
2862
+ body: h.body ? h.body : void 0
2863
+ }
2864
+ );
2865
+ h.identity !== te && await v.data?.find((O) => O.id === h.identity)?.authorizeRequest(_);
2866
+ const ve = setTimeout(
2867
+ () => P(!0),
2868
+ 3210
2869
+ );
2870
+ J.current = new AbortController(), J.current.signal.addEventListener("abort", () => {
2871
+ clearTimeout(ve);
2872
+ });
2873
+ try {
2874
+ const O = await fetch(_, {
2875
+ cache: "no-store",
2876
+ signal: J.current.signal
2877
+ });
2878
+ clearTimeout(ve), P(!1);
2879
+ const gn = performance.now() - ie, yn = new URL(_.url), Ze = Array.from(O.headers.entries()), Ye = O.headers.get("content-type") || "", Ke = $r(Ye);
2880
+ let ce = "", et, tt;
2881
+ Ke ? (et = await O.blob(), tt = Er(Ze, _.url), ce = `Binary content (${Ye})`) : ce = await O.text();
2882
+ const nt = O.headers.get("content-length");
2883
+ return {
2884
+ status: O.status,
2885
+ headers: Ze,
2886
+ size: nt ? parseInt(nt) : ce.length,
2887
+ body: ce,
2888
+ time: gn,
2889
+ isBinary: Ke,
2890
+ fileName: tt,
2891
+ blob: et,
2892
+ request: {
2893
+ method: _.method.toUpperCase(),
2894
+ url: _.url,
2895
+ headers: [
2896
+ ["Host", yn.host],
2897
+ ["User-Agent", "Zudoku Playground"],
2898
+ ...Array.from(_.headers.entries())
2899
+ ],
2900
+ body: h.body ? h.body : void 0
2901
+ }
2902
+ };
2903
+ } catch (O) {
2904
+ throw clearTimeout(ve), P(!1), O instanceof TypeError ? new Error(
2905
+ "The request failed, possibly due to network issues or CORS policy."
2906
+ ) : O;
2907
+ }
2908
+ }
2909
+ }), Je = V.isPending, [ln, dn] = k(!1);
2910
+ z(() => {
2911
+ const h = setTimeout(() => dn(Je), 100);
2912
+ return () => clearTimeout(h);
2913
+ }, [Je]);
2914
+ const { isFinished: We, progress: un } = rs({ isAnimating: ln });
2915
+ z(() => () => {
2916
+ J.current?.abort();
2917
+ }, []);
2918
+ const mn = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
2919
+ Ft,
2920
+ {
2921
+ onValueChange: (h) => {
2922
+ w(() => m(h));
2923
+ },
2924
+ value: f,
2925
+ defaultValue: f,
2926
+ children: [
2927
+ /* @__PURE__ */ n.jsx(ze, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(qt, {}) }),
2928
+ /* @__PURE__ */ n.jsx(Fe, { children: t.map((h) => /* @__PURE__ */ n.jsx(ee, { value: h, children: h.replace(/^https?:\/\//, "").replace(/\/$/, "") }, h)) })
2929
+ ]
2930
+ }
2931
+ ) }), pn = u && !Q, hn = ["POST", "PUT", "PATCH", "DELETE"].includes(
2932
+ a.toUpperCase()
2933
+ ), [Xe, fn] = ms();
2934
+ return /* @__PURE__ */ n.jsx(
2935
+ ds,
2936
+ {
2937
+ register: on,
2938
+ control: oe,
2939
+ handleSubmit: He,
2940
+ watch: Qe,
2941
+ setValue: ge,
2942
+ ...ye,
2943
+ children: /* @__PURE__ */ n.jsx(us, { delayDuration: 150, children: /* @__PURE__ */ n.jsxs(
2944
+ "form",
2945
+ {
2946
+ ref: Ge,
2947
+ onSubmit: He((h) => {
2948
+ v.data?.length === 0 || h.identity ? V.mutate(h) : b(!0);
2949
+ }),
2950
+ className: "relative",
2951
+ children: [
2952
+ /* @__PURE__ */ n.jsx(
2953
+ qr,
2954
+ {
2955
+ identities: v.data ?? [],
2956
+ open: x,
2957
+ onOpenChange: b,
2958
+ onSubmit: ({ rememberedIdentity: h, identity: ie }) => {
2959
+ h && ge("identity", ie ?? te), b(!1), V.mutate({ ...ye.getValues(), identity: ie });
2960
+ }
2961
+ }
2962
+ ),
2963
+ /* @__PURE__ */ n.jsx(
2964
+ Jr,
2965
+ {
2966
+ open: pn,
2967
+ setOpen: (h) => R(!h),
2968
+ onSignUp: p,
2969
+ onLogin: d
2970
+ }
2971
+ ),
2972
+ /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[1fr_1px_1fr] text-sm", children: [
2973
+ /* @__PURE__ */ n.jsx("div", { className: "col-span-3 p-4 border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "flex gap-2 items-stretch", children: [
2974
+ /* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
2975
+ /* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
2976
+ /* @__PURE__ */ n.jsxs("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: [
2977
+ /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
2978
+ mn,
2979
+ /* @__PURE__ */ n.jsx(Hr, { url: s }),
2980
+ /* @__PURE__ */ n.jsx(Qr, {})
2981
+ ] }),
2982
+ /* @__PURE__ */ n.jsx(
2983
+ "div",
2984
+ {
2985
+ className: "h-full bg-primary/25 absolute left-0 -bottom-0 z-10 transition-all duration-300 ease-in-out",
2986
+ style: {
2987
+ opacity: We ? 0 : 1,
2988
+ width: We ? 0 : `${un * 100}%`
2989
+ }
2990
+ }
2991
+ )
2992
+ ] }),
2993
+ /* @__PURE__ */ n.jsx("div", { className: "px-1", children: /* @__PURE__ */ n.jsx(
2994
+ E,
2995
+ {
2996
+ type: "button",
2997
+ onClick: () => {
2998
+ fn(
2999
+ ut(
3000
+ e ?? f,
3001
+ s,
3002
+ ye.getValues()
3003
+ ).toString()
3004
+ );
3005
+ },
3006
+ variant: "ghost",
3007
+ size: "icon-xs",
3008
+ className: y(
3009
+ "hover:opacity-100 transition",
3010
+ Xe ? "text-emerald-600 opacity-100" : "opacity-50"
3011
+ ),
3012
+ children: Xe ? /* @__PURE__ */ n.jsx(gt, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ n.jsx(In, { size: 14 })
3013
+ }
3014
+ ) })
3015
+ ] }),
3016
+ /* @__PURE__ */ n.jsx(
3017
+ E,
3018
+ {
3019
+ type: "submit",
3020
+ variant: V.isPending ? "destructive" : "default",
3021
+ onClick: (h) => {
3022
+ V.isPending && (J.current?.abort(
3023
+ "Request cancelled by user"
3024
+ ), h.preventDefault());
3025
+ },
3026
+ className: "w-18",
3027
+ children: V.isPending ? "Cancel" : "Send"
3028
+ }
3029
+ )
3030
+ ] }) }),
3031
+ /* @__PURE__ */ n.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
3032
+ v.data?.length !== 0 && /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
3033
+ /* @__PURE__ */ n.jsxs(M, { children: [
3034
+ /* @__PURE__ */ n.jsx(kn, { size: 16 }),
3035
+ /* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Authentication" })
3036
+ ] }),
3037
+ /* @__PURE__ */ n.jsx(B, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
3038
+ Xt,
3039
+ {
3040
+ value: W,
3041
+ identities: v.data ?? [],
3042
+ setValue: (h) => ge("identity", h)
3043
+ }
3044
+ ) })
3045
+ ] }) }) }),
3046
+ i.length > 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
3047
+ /* @__PURE__ */ n.jsxs(M, { className: "border-t", children: [
3048
+ /* @__PURE__ */ n.jsx(Dn, { size: 16 }),
3049
+ /* @__PURE__ */ n.jsx(G, { children: "Path Parameters" })
3050
+ ] }),
3051
+ /* @__PURE__ */ n.jsx(B, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(Vr, { url: s, control: oe }) })
3052
+ ] }),
3053
+ /* @__PURE__ */ n.jsx(Ur, { control: oe, schemaQueryParams: o }),
3054
+ /* @__PURE__ */ n.jsx(
3055
+ zr,
3056
+ {
3057
+ control: oe,
3058
+ schemaHeaders: r,
3059
+ lockedHeaders: cn?.headers
3060
+ }
3061
+ ),
3062
+ hn && /* @__PURE__ */ n.jsx(Lr, { examples: c })
3063
+ ] }),
3064
+ /* @__PURE__ */ n.jsx("div", { className: "w-full bg-muted-foreground/20" }),
3065
+ /* @__PURE__ */ n.jsx(
3066
+ aa,
3067
+ {
3068
+ queryMutation: V,
3069
+ showLongRunningWarning: D,
3070
+ tip: /* @__PURE__ */ n.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ n.jsxs("span", { className: "text-muted-foreground", children: [
3071
+ "Press",
3072
+ " ",
3073
+ /* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children: an.join(" + ") }),
3074
+ " ",
3075
+ "to send a request"
3076
+ ] }) }),
3077
+ onCancel: () => {
3078
+ J.current?.abort(
3079
+ "Request cancelled by the user"
3080
+ ), P(!1);
3081
+ }
3082
+ }
3083
+ )
3084
+ ] })
3085
+ ]
3086
+ }
3087
+ ) })
3088
+ }
3089
+ );
3090
+ }, ca = ({
3091
+ className: e,
3092
+ size: t = 16
3093
+ }) => /* @__PURE__ */ n.jsx(
3094
+ "svg",
3095
+ {
3096
+ xmlns: "http://www.w3.org/2000/svg",
3097
+ viewBox: "0 0 24 24",
3098
+ fill: "currentColor",
3099
+ className: e,
3100
+ width: t,
3101
+ height: t,
3102
+ children: /* @__PURE__ */ n.jsx(
3103
+ "path",
3104
+ {
3105
+ fillRule: "evenodd",
3106
+ d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
3107
+ clipRule: "evenodd"
3108
+ }
3109
+ )
3110
+ }
3111
+ ), la = (e) => {
3112
+ const [t, s] = k(!1);
3113
+ return /* @__PURE__ */ n.jsxs(Le, { onOpenChange: (a) => s(a), children: [
3114
+ /* @__PURE__ */ n.jsx(ns, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
3115
+ "button",
3116
+ {
3117
+ type: "button",
3118
+ className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-xs hover:bg-primary/80",
3119
+ children: [
3120
+ "Test",
3121
+ /* @__PURE__ */ n.jsx(ca, { size: 14 })
3122
+ ]
3123
+ }
3124
+ ) }),
3125
+ /* @__PURE__ */ n.jsxs(
3126
+ $e,
3127
+ {
3128
+ className: "max-w-screen-xl w-full overflow-hidden p-0",
3129
+ "aria-describedby": void 0,
3130
+ showCloseButton: !0,
3131
+ children: [
3132
+ /* @__PURE__ */ n.jsx(ts, { children: /* @__PURE__ */ n.jsx(Ee, { children: "Playground" }) }),
3133
+ t && /* @__PURE__ */ n.jsx(ia, { ...e })
3134
+ ]
3135
+ }
3136
+ )
3137
+ ] });
3138
+ }, da = {
3139
+ get: "green",
3140
+ post: "blue",
3141
+ put: "yellow",
3142
+ delete: "red",
3143
+ patch: "purple",
3144
+ options: "gray",
3145
+ head: "gray"
3146
+ }, pt = ({
3147
+ label: e,
3148
+ path: t,
3149
+ operations: s,
3150
+ collapsible: a,
3151
+ collapsed: r
3152
+ }) => ({
3153
+ type: "category",
3154
+ label: e,
3155
+ link: {
3156
+ type: "doc",
3157
+ path: t,
3158
+ file: t,
3159
+ label: e
3160
+ },
3161
+ collapsible: a,
3162
+ collapsed: r,
3163
+ items: s.map((o) => ({
3164
+ type: "link",
3165
+ label: o.summary ?? o.path,
3166
+ to: `${t}#${o.slug}`,
3167
+ badge: {
3168
+ label: o.method,
3169
+ color: da[o.method.toLowerCase()],
3170
+ invert: !0
3171
+ }
3172
+ }))
3173
+ }), en = bt(
3174
+ void 0
3175
+ ), Ga = en.Provider, ua = () => {
3176
+ const e = es(en);
3177
+ if (!e)
3178
+ throw new Error("useOasConfig must be used within a OasConfigProvider");
3179
+ return e.config;
3180
+ }, ht = (e) => ({
3181
+ path: e.routePath,
3182
+ async lazy() {
3183
+ const { OasProvider: t } = await import("./OasProvider-DS23Ds76.js");
3184
+ return {
3185
+ element: /* @__PURE__ */ n.jsx(
3186
+ t,
3187
+ {
3188
+ basePath: e.basePath,
3189
+ version: e.version,
3190
+ client: e.client,
3191
+ config: e.config
3192
+ }
3193
+ )
3194
+ };
3195
+ },
3196
+ children: e.routes
3197
+ }), tn = ({
3198
+ path: e,
3199
+ tag: t,
3200
+ untagged: s
3201
+ }) => ({
3202
+ path: e,
3203
+ async lazy() {
3204
+ const { OperationList: a } = await import("./OperationList-CLidyzBx.js");
3205
+ return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
3206
+ }
3207
+ }), ma = ({
3208
+ render: e,
3209
+ path: t
3210
+ }) => {
3211
+ const { type: s, input: a } = ua(), { tag: r } = Bn(), o = Vn(), i = ar(rn, { type: s, input: a }), {
3212
+ data: { schema: l }
3213
+ } = Qn(i), c = l.tags.at(0);
3214
+ return !r && c?.slug ? /* @__PURE__ */ n.jsx(
3215
+ _n,
3216
+ {
3217
+ to: {
3218
+ pathname: Un(t, { tag: c.slug }),
3219
+ search: o.search
3220
+ }
3221
+ }
3222
+ ) : r && l.tags.some((u) => u.slug === r) ? e(r) : null;
3223
+ }, pa = ({ path: e }) => ({
3224
+ path: e,
3225
+ async lazy() {
3226
+ const { OperationList: t } = await import("./OperationList-CLidyzBx.js");
3227
+ return {
3228
+ element: /* @__PURE__ */ n.jsx(
3229
+ ma,
3230
+ {
3231
+ path: e,
3232
+ render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
3233
+ }
3234
+ )
3235
+ };
3236
+ }
3237
+ }), nn = (e) => [
3238
+ // Category without tagged operations
3239
+ tn({
3240
+ path: I(e, Ue),
3241
+ untagged: !0
3242
+ }),
3243
+ // Schema list route
3244
+ {
3245
+ path: I(e, "~schemas"),
3246
+ lazy: async () => {
3247
+ const { SchemaList: t } = await import("./SchemaList-AJ8eFhvU.js");
3248
+ return { element: /* @__PURE__ */ n.jsx(t, {}) };
3249
+ }
3250
+ }
3251
+ ], ha = (e, t) => {
3252
+ const s = I(e, t.at(0) ?? Ue);
3253
+ return [
3254
+ // Redirect to first tag on the index route
3255
+ { index: !0, loader: () => qn(s) },
3256
+ // Create routes for each tag
3257
+ ...t.map(
3258
+ (a) => tn({
3259
+ path: I(e, a),
3260
+ tag: a
3261
+ })
3262
+ ),
3263
+ ...nn(e)
3264
+ ];
3265
+ }, sn = (e) => e.type === "file" ? Object.keys(e.input) : [], fa = ({
3266
+ basePath: e,
3267
+ config: t,
3268
+ client: s
3269
+ }) => {
3270
+ const a = t.tagPages;
3271
+ if (!a)
3272
+ return [
3273
+ ht({
3274
+ basePath: e,
3275
+ routePath: e,
3276
+ routes: [
3277
+ pa({ path: e + "/:tag?" }),
3278
+ ...nn(e)
3279
+ ],
3280
+ client: s,
3281
+ config: t
3282
+ })
3283
+ ];
3284
+ const r = sn(t);
3285
+ return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
3286
+ const l = I(e, i);
3287
+ return ht({
3288
+ basePath: e,
3289
+ version: i,
3290
+ routePath: l,
3291
+ routes: ha(l, a),
3292
+ client: s,
3293
+ config: t
3294
+ });
3295
+ });
3296
+ }, rn = hr(`
3297
+ query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
3298
+ schema(input: $input, type: $type) {
3299
+ tags {
3300
+ slug
3301
+ name
3302
+ extensions
3303
+ operations {
3304
+ summary
3305
+ slug
3306
+ method
3307
+ operationId
3308
+ path
3309
+ }
3310
+ }
3311
+ components {
3312
+ schemas {
3313
+ __typename
3314
+ }
3315
+ }
3316
+ }
3317
+ }
3318
+ `), Ue = "~endpoints", Ha = (e) => {
3319
+ const t = I(e.path), s = new Ts(e);
3320
+ return {
3321
+ getHead: () => {
3322
+ if (e.type === "url" && !e.skipPreload)
3323
+ return /* @__PURE__ */ n.jsx(
3324
+ "link",
3325
+ {
3326
+ rel: "preload",
3327
+ href: e.input,
3328
+ as: "fetch",
3329
+ crossOrigin: "anonymous"
3330
+ }
3331
+ );
3332
+ if (e.server)
3333
+ return /* @__PURE__ */ n.jsx("link", { rel: "preconnect", href: e.server });
3334
+ },
3335
+ getMdxComponents: () => ({
3336
+ OpenPlaygroundButton: ({
3337
+ requireAuth: a,
3338
+ server: r,
3339
+ method: o,
3340
+ url: i,
3341
+ children: l,
3342
+ ...c
3343
+ }) => {
3344
+ const u = Jn();
3345
+ if (!r)
3346
+ throw new Error("Server is required");
3347
+ return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
3348
+ ne,
3349
+ {
3350
+ className: "gap-2 items-center",
3351
+ variant: "outline",
3352
+ onClick: u.login,
3353
+ children: [
3354
+ "Login to open in Playground ",
3355
+ /* @__PURE__ */ n.jsx(zn, { size: 16 })
3356
+ ]
3357
+ }
3358
+ ) : /* @__PURE__ */ n.jsx(
3359
+ la,
3360
+ {
3361
+ url: i ?? "/",
3362
+ method: o ?? "get",
3363
+ server: r,
3364
+ ...c,
3365
+ children: /* @__PURE__ */ n.jsx(ne, { className: "gap-2 items-center", variant: "outline", children: l ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3366
+ "Open in Playground ",
3367
+ /* @__PURE__ */ n.jsx(Fn, { size: 16 })
3368
+ ] }) })
3369
+ }
3370
+ );
3371
+ }
3372
+ }),
3373
+ getNavigation: async (a, r) => {
3374
+ if (!st({ path: t, end: !1 }, a))
3375
+ return [];
3376
+ const o = st(
3377
+ { path: `${t}/:version?/:tag`, end: !0 },
3378
+ a
3379
+ );
3380
+ try {
3381
+ const i = o?.params.version, l = i ?? sn(e).at(0), { type: c } = e, u = c === "file" ? e.input[l] : e.input, d = Dt(s, rn, {
3382
+ type: c,
3383
+ input: u
3384
+ }), p = await r.queryClient.ensureQueryData(d), f = p.schema.tags.flatMap((x) => {
3385
+ if (!x.name || x.operations.length === 0) return [];
3386
+ const b = I(t, i, x.slug), v = x.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, j = x.extensions?.["x-zudoku-collapsible"] ?? !0;
3387
+ return pt({
3388
+ label: x.name,
3389
+ path: b,
3390
+ operations: x.operations,
3391
+ collapsed: v,
3392
+ collapsible: j
3393
+ });
3394
+ }), m = p.schema.tags.find(
3395
+ (x) => !x.name
3396
+ )?.operations;
3397
+ return m && f.push(
3398
+ pt({
3399
+ label: "Other endpoints",
3400
+ path: I(t, i, Ue),
3401
+ operations: m,
3402
+ collapsed: !e.options?.expandAllTags
3403
+ })
3404
+ ), p.schema.components?.schemas?.length && f.push({
3405
+ type: "link",
3406
+ label: "Schemas",
3407
+ to: I(t, i, "~schemas")
3408
+ }), f;
3409
+ } catch {
3410
+ return [];
3411
+ }
3412
+ },
3413
+ getRoutes: () => fa({ basePath: t, config: e, client: s })
3414
+ };
3415
+ };
3416
+ export {
3417
+ zs as A,
3418
+ Is as B,
3419
+ q as C,
3420
+ Rt as D,
3421
+ rn as E,
3422
+ Ha as F,
3423
+ Ma as G,
3424
+ Fs as L,
3425
+ Ga as O,
3426
+ la as P,
3427
+ $s as Q,
3428
+ Ft as S,
3429
+ g as T,
3430
+ Ue as U,
3431
+ ar as a,
3432
+ zt as b,
3433
+ B as c,
3434
+ sn as d,
3435
+ Nr as e,
3436
+ Zt as f,
3437
+ hr as g,
3438
+ Gr as h,
3439
+ ze as i,
3440
+ qt as j,
3441
+ Fe as k,
3442
+ ee as l,
3443
+ sr as m,
3444
+ It as n,
3445
+ lt as o,
3446
+ _a as p,
3447
+ qs as q,
3448
+ De as r,
3449
+ $ as s,
3450
+ Et as t,
3451
+ ua as u,
3452
+ As as v,
3453
+ nr as w,
3454
+ je as x,
3455
+ Os as y,
3456
+ Ua as z
3457
+ };
3458
+ //# sourceMappingURL=index-BoBGmARR.js.map