zudoku 0.0.0-e8a949d → 0.0.0-e960826

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 (586) hide show
  1. package/dist/app/demo.js +0 -1
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.server.d.ts +1 -1
  4. package/dist/app/main.d.ts +1 -1
  5. package/dist/app/main.js +18 -8
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/standalone.js +0 -1
  8. package/dist/app/standalone.js.map +1 -1
  9. package/dist/cli/common/output.js.map +1 -1
  10. package/dist/cli/dev/handler.js +7 -2
  11. package/dist/cli/dev/handler.js.map +1 -1
  12. package/dist/config/config.d.ts +1 -0
  13. package/dist/config/validators/InputSidebarSchema.d.ts +17 -2
  14. package/dist/config/validators/InputSidebarSchema.js +1 -0
  15. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  16. package/dist/config/validators/common.d.ts +262 -62
  17. package/dist/config/validators/common.js +17 -7
  18. package/dist/config/validators/common.js.map +1 -1
  19. package/dist/config/validators/icon-types.d.ts +1 -1
  20. package/dist/config/validators/validate.d.ts +111 -30
  21. package/dist/lib/authentication/components/SignOut.js +1 -1
  22. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  23. package/dist/lib/authentication/providers/auth0.js +1 -1
  24. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  25. package/dist/lib/authentication/providers/clerk.js +29 -6
  26. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  27. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  28. package/dist/lib/authentication/providers/openid.js +13 -8
  29. package/dist/lib/authentication/providers/openid.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +9 -0
  31. package/dist/lib/authentication/state.js +11 -0
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/components/AnchorLink.js +5 -2
  34. package/dist/lib/components/AnchorLink.js.map +1 -1
  35. package/dist/lib/components/Autocomplete.d.ts +13 -0
  36. package/dist/lib/components/Autocomplete.js +47 -0
  37. package/dist/lib/components/Autocomplete.js.map +1 -0
  38. package/dist/lib/components/Header.js +14 -14
  39. package/dist/lib/components/Header.js.map +1 -1
  40. package/dist/lib/components/Heading.d.ts +1 -1
  41. package/dist/lib/components/Layout.js +1 -1
  42. package/dist/lib/components/Layout.js.map +1 -1
  43. package/dist/lib/components/Markdown.d.ts +2 -2
  44. package/dist/lib/components/Markdown.js +3 -1
  45. package/dist/lib/components/Markdown.js.map +1 -1
  46. package/dist/lib/components/PathRenderer.d.ts +11 -0
  47. package/dist/lib/components/PathRenderer.js +28 -0
  48. package/dist/lib/components/PathRenderer.js.map +1 -0
  49. package/dist/lib/components/StatusPage.d.ts +7 -0
  50. package/dist/lib/components/StatusPage.js +71 -0
  51. package/dist/lib/components/StatusPage.js.map +1 -0
  52. package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
  53. package/dist/lib/components/SyntaxHighlight.js +2 -2
  54. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  55. package/dist/lib/components/ThemeSwitch.js +2 -2
  56. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  57. package/dist/lib/components/TopNavigation.js +2 -2
  58. package/dist/lib/components/TopNavigation.js.map +1 -1
  59. package/dist/lib/components/cache.d.ts +6 -0
  60. package/dist/lib/components/cache.js +13 -0
  61. package/dist/lib/components/cache.js.map +1 -0
  62. package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
  63. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  64. package/dist/lib/components/context/ZudokuContext.js +2 -1
  65. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  66. package/dist/lib/components/index.d.ts +14 -2
  67. package/dist/lib/components/index.js +10 -3
  68. package/dist/lib/components/index.js.map +1 -1
  69. package/dist/lib/components/navigation/Sidebar.js +6 -1
  70. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  71. package/dist/lib/components/navigation/SidebarBadge.d.ts +11 -1
  72. package/dist/lib/components/navigation/SidebarBadge.js +11 -2
  73. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
  74. package/dist/lib/components/navigation/SidebarCategory.js +17 -15
  75. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  76. package/dist/lib/components/navigation/SidebarItem.js +2 -1
  77. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  78. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  79. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  80. package/dist/lib/core/RouteGuard.d.ts +1 -0
  81. package/dist/lib/core/RouteGuard.js +28 -0
  82. package/dist/lib/core/RouteGuard.js.map +1 -0
  83. package/dist/lib/core/ZudokuContext.d.ts +4 -2
  84. package/dist/lib/core/ZudokuContext.js +9 -7
  85. package/dist/lib/core/ZudokuContext.js.map +1 -1
  86. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  87. package/dist/lib/oas/graphql/circular.js +38 -0
  88. package/dist/lib/oas/graphql/circular.js.map +1 -0
  89. package/dist/lib/oas/graphql/index.d.ts +11 -0
  90. package/dist/lib/oas/graphql/index.js +89 -58
  91. package/dist/lib/oas/graphql/index.js.map +1 -1
  92. package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
  93. package/dist/lib/oas/parser/dereference/index.js +1 -1
  94. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  95. package/dist/lib/oas/parser/upgrade/index.js +17 -3
  96. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  97. package/dist/lib/plugins/markdown/MdxPage.js +8 -2
  98. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  99. package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
  100. package/dist/lib/plugins/markdown/resolver.js +0 -29
  101. package/dist/lib/plugins/markdown/resolver.js.map +1 -1
  102. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  103. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  104. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  105. package/dist/lib/plugins/openapi/ColorizedParam.js +18 -7
  106. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  107. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  108. package/dist/lib/plugins/openapi/Endpoint.js +8 -7
  109. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  110. package/dist/lib/plugins/openapi/{Route.d.ts → OpenApiRoute.d.ts} +2 -1
  111. package/dist/lib/plugins/openapi/{Route.js → OpenApiRoute.js} +3 -4
  112. package/dist/lib/plugins/openapi/OpenApiRoute.js.map +1 -0
  113. package/dist/lib/plugins/openapi/OperationList.d.ts +4 -1
  114. package/dist/lib/plugins/openapi/OperationList.js +32 -19
  115. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  116. package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
  117. package/dist/lib/plugins/openapi/OperationListItem.js +3 -3
  118. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  119. package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
  120. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  121. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
  122. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +10 -3
  123. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  124. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
  125. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -13
  126. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  127. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +7 -13
  128. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  129. package/dist/lib/plugins/openapi/Sidecar.js +18 -20
  130. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  131. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  132. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  133. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  134. package/dist/lib/plugins/openapi/SidecarExamples.js +68 -0
  135. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  136. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  137. package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -93
  138. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  139. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  140. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  141. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  142. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  143. package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -13
  144. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  145. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
  146. package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
  147. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  148. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
  149. package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
  150. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  151. package/dist/lib/plugins/openapi/index.d.ts +2 -1
  152. package/dist/lib/plugins/openapi/index.js +127 -61
  153. package/dist/lib/plugins/openapi/index.js.map +1 -1
  154. package/dist/lib/plugins/openapi/interfaces.d.ts +12 -4
  155. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  156. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
  157. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  158. package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
  159. package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
  160. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  161. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  162. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  163. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  164. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -6
  165. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  166. package/dist/lib/plugins/openapi/playground/Playground.d.ts +25 -1
  167. package/dist/lib/plugins/openapi/playground/Playground.js +62 -54
  168. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  169. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  170. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  171. package/dist/lib/plugins/openapi/playground/QueryParams.js +24 -18
  172. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  173. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
  174. package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
  175. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
  176. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
  177. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
  178. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
  179. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
  180. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
  181. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  182. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
  183. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
  184. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  185. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  186. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  187. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  188. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  189. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  190. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  191. package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
  192. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
  193. package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
  194. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
  195. package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
  196. package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
  197. package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
  198. package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
  199. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
  200. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
  201. package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
  202. package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +11 -8
  203. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  204. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  205. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  206. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  207. package/dist/lib/plugins/openapi/schema/utils.js +2 -0
  208. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  209. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
  210. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  211. package/dist/lib/ui/Badge.d.ts +1 -1
  212. package/dist/lib/ui/Badge.js +2 -1
  213. package/dist/lib/ui/Badge.js.map +1 -1
  214. package/dist/lib/ui/Button.d.ts +1 -1
  215. package/dist/lib/ui/Card.js +1 -1
  216. package/dist/lib/ui/Card.js.map +1 -1
  217. package/dist/lib/ui/Checkbox.d.ts +8 -2
  218. package/dist/lib/ui/Checkbox.js +13 -1
  219. package/dist/lib/ui/Checkbox.js.map +1 -1
  220. package/dist/lib/ui/Command.d.ts +9 -1
  221. package/dist/lib/ui/Command.js +5 -1
  222. package/dist/lib/ui/Command.js.map +1 -1
  223. package/dist/lib/ui/Input.d.ts +1 -2
  224. package/dist/lib/ui/Input.js.map +1 -1
  225. package/dist/lib/ui/Select.js +2 -2
  226. package/dist/lib/ui/Select.js.map +1 -1
  227. package/dist/lib/util/MdxComponents.js +2 -2
  228. package/dist/lib/util/MdxComponents.js.map +1 -1
  229. package/dist/lib/util/joinUrl.d.ts +1 -0
  230. package/dist/lib/util/joinUrl.js +40 -0
  231. package/dist/lib/util/joinUrl.js.map +1 -0
  232. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  233. package/dist/lib/util/joinUrl.test.js +43 -0
  234. package/dist/lib/util/joinUrl.test.js.map +1 -0
  235. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  236. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  237. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  238. package/dist/lib/util/traverse.d.ts +8 -1
  239. package/dist/lib/util/traverse.js +7 -3
  240. package/dist/lib/util/traverse.js.map +1 -1
  241. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  242. package/dist/lib/util/useScrollToAnchor.js +27 -28
  243. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  244. package/dist/lib/util/useScrollToTop.js +6 -4
  245. package/dist/lib/util/useScrollToTop.js.map +1 -1
  246. package/dist/vite/api/schema-codegen.d.ts +12 -0
  247. package/dist/vite/api/schema-codegen.js +62 -0
  248. package/dist/vite/api/schema-codegen.js.map +1 -0
  249. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  250. package/dist/vite/api/schema-codegen.test.js +247 -0
  251. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  252. package/dist/vite/build.js +20 -15
  253. package/dist/vite/build.js.map +1 -1
  254. package/dist/vite/config.js +14 -8
  255. package/dist/vite/config.js.map +1 -1
  256. package/dist/vite/config.test.js +5 -1
  257. package/dist/vite/config.test.js.map +1 -1
  258. package/dist/vite/dev-server.js +4 -1
  259. package/dist/vite/dev-server.js.map +1 -1
  260. package/dist/vite/plugin-api.d.ts +1 -1
  261. package/dist/vite/plugin-api.js +148 -81
  262. package/dist/vite/plugin-api.js.map +1 -1
  263. package/dist/vite/plugin-auth.js +4 -1
  264. package/dist/vite/plugin-auth.js.map +1 -1
  265. package/dist/vite/plugin-component.js +0 -1
  266. package/dist/vite/plugin-component.js.map +1 -1
  267. package/dist/vite/plugin-config.js +2 -1
  268. package/dist/vite/plugin-config.js.map +1 -1
  269. package/dist/vite/plugin-mdx.js +20 -9
  270. package/dist/vite/plugin-mdx.js.map +1 -1
  271. package/dist/vite/plugin-theme-css.js +7 -4
  272. package/dist/vite/plugin-theme-css.js.map +1 -1
  273. package/dist/vite/plugin.js.map +1 -1
  274. package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +0 -6
  275. package/dist/vite/prerender/FileWritingResponse.js +42 -0
  276. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  277. package/dist/vite/prerender/prerender.d.ts +6 -0
  278. package/dist/vite/prerender/prerender.js +101 -0
  279. package/dist/vite/prerender/prerender.js.map +1 -0
  280. package/dist/vite/prerender/worker.d.ts +11 -0
  281. package/dist/vite/prerender/worker.js +21 -0
  282. package/dist/vite/prerender/worker.js.map +1 -0
  283. package/dist/vite/reporter.d.ts +3 -0
  284. package/dist/vite/reporter.js +33 -0
  285. package/dist/vite/reporter.js.map +1 -0
  286. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  287. package/dist/zuplo/enrich-with-zuplo.js +184 -0
  288. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  289. package/dist/zuplo/env.d.ts +1 -0
  290. package/dist/zuplo/env.js +3 -0
  291. package/dist/zuplo/env.js.map +1 -1
  292. package/dist/zuplo/policy-types.d.ts +33 -0
  293. package/dist/zuplo/policy-types.js +8 -0
  294. package/dist/zuplo/policy-types.js.map +1 -0
  295. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  296. package/dist/zuplo/with-zuplo-processors.js +26 -0
  297. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  298. package/dist/zuplo/with-zuplo.d.ts +1 -1
  299. package/dist/zuplo/with-zuplo.js +7 -26
  300. package/dist/zuplo/with-zuplo.js.map +1 -1
  301. package/lib/AuthenticationPlugin-DeEA69mE.js +58 -0
  302. package/lib/AuthenticationPlugin-DeEA69mE.js.map +1 -0
  303. package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
  304. package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  305. package/lib/{Markdown-CZDLNOFc.js → Markdown-8mv9nhGd.js} +3391 -3403
  306. package/lib/Markdown-8mv9nhGd.js.map +1 -0
  307. package/lib/{MdxPage-DKMbBROv.js → MdxPage-BalfwlsD.js} +61 -56
  308. package/lib/MdxPage-BalfwlsD.js.map +1 -0
  309. package/lib/OpenApiRoute-ULLXjfro.js +36 -0
  310. package/lib/OpenApiRoute-ULLXjfro.js.map +1 -0
  311. package/lib/OperationList-CnYOgwBj.js +5181 -0
  312. package/lib/OperationList-CnYOgwBj.js.map +1 -0
  313. package/lib/Select-BcAbBUmk.js +223 -0
  314. package/lib/Select-BcAbBUmk.js.map +1 -0
  315. package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-D0mFmGJu.js} +53 -53
  316. package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-D0mFmGJu.js.map} +1 -1
  317. package/lib/{Button-DeAoTouo.js → Spinner-BlzrEEk1.js} +16 -13
  318. package/lib/Spinner-BlzrEEk1.js.map +1 -0
  319. package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-B0L4SC_N.js} +390 -383
  320. package/lib/SyntaxHighlight-B0L4SC_N.js.map +1 -0
  321. package/lib/{ZudokuContext-hmLMUdf2.js → ZudokuContext-dUyBGMap.js} +480 -468
  322. package/lib/ZudokuContext-dUyBGMap.js.map +1 -0
  323. package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-QijJrSf0.js} +409 -411
  324. package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +1 -0
  325. package/lib/circular-DxaIIlWD.js +15409 -0
  326. package/lib/circular-DxaIIlWD.js.map +1 -0
  327. package/lib/context-rwLGh-6_.js +22 -0
  328. package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
  329. package/lib/{createServer-C4C0OO0m.js → createServer-E3cXjB0P.js} +9419 -12459
  330. package/lib/createServer-E3cXjB0P.js.map +1 -0
  331. package/lib/{hook-CHq7pFyz.js → hook-NIpDSpau.js} +17 -17
  332. package/lib/{hook-CHq7pFyz.js.map → hook-NIpDSpau.js.map} +1 -1
  333. package/lib/index-B7mqiOei.js +509 -0
  334. package/lib/index-B7mqiOei.js.map +1 -0
  335. package/lib/{index-LNp6rxyU.js → index-CjJS0l4l.js} +2 -2
  336. package/lib/{index-LNp6rxyU.js.map → index-CjJS0l4l.js.map} +1 -1
  337. package/lib/index-CnKeVT2S.js +2065 -0
  338. package/lib/index-CnKeVT2S.js.map +1 -0
  339. package/lib/index-Djenk2Hj.js +36 -0
  340. package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
  341. package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
  342. package/lib/index-Dl3Yl0yb.js.map +1 -0
  343. package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
  344. package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
  345. package/lib/index.esm-CrSoEshU.js +1207 -0
  346. package/lib/index.esm-CrSoEshU.js.map +1 -0
  347. package/lib/joinUrl-nLx9pD-Z.js +20 -0
  348. package/lib/joinUrl-nLx9pD-Z.js.map +1 -0
  349. package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
  350. package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
  351. package/lib/post-processors/removeExtensions.js +7 -7
  352. package/lib/post-processors/removeExtensions.js.map +1 -1
  353. package/lib/post-processors/removeParameters.js +48 -0
  354. package/lib/post-processors/removeParameters.js.map +1 -0
  355. package/lib/post-processors/traverse.js +11 -8
  356. package/lib/post-processors/traverse.js.map +1 -1
  357. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  358. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  359. package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
  360. package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  361. package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
  362. package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  363. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  364. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  365. package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
  366. package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  367. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  368. package/lib/state-bfQxaDxU.js +211 -0
  369. package/lib/state-bfQxaDxU.js.map +1 -0
  370. package/lib/ui/Accordion.js +1 -1
  371. package/lib/ui/ActionButton.js +10 -11
  372. package/lib/ui/ActionButton.js.map +1 -1
  373. package/lib/ui/Alert.js +2 -2
  374. package/lib/ui/AlertDialog.js +1 -1
  375. package/lib/ui/Badge.js +4 -3
  376. package/lib/ui/Badge.js.map +1 -1
  377. package/lib/ui/Breadcrumb.js +1 -1
  378. package/lib/ui/Button.js +2 -2
  379. package/lib/ui/Callout.js +1 -1
  380. package/lib/ui/Card.js +8 -8
  381. package/lib/ui/Card.js.map +1 -1
  382. package/lib/ui/Carousel.js +3 -3
  383. package/lib/ui/Carousel.js.map +1 -1
  384. package/lib/ui/Checkbox.js +26 -15
  385. package/lib/ui/Checkbox.js.map +1 -1
  386. package/lib/ui/Command.js +80 -504
  387. package/lib/ui/Command.js.map +1 -1
  388. package/lib/ui/Dialog.js +1 -1
  389. package/lib/ui/Drawer.js +520 -519
  390. package/lib/ui/Drawer.js.map +1 -1
  391. package/lib/ui/DropdownMenu.js +1 -1
  392. package/lib/ui/Form.js +2 -2
  393. package/lib/ui/HoverCard.js +1 -1
  394. package/lib/ui/Input.js +1 -1
  395. package/lib/ui/Input.js.map +1 -1
  396. package/lib/ui/Label.js +2 -2
  397. package/lib/ui/Pagination.js +7 -7
  398. package/lib/ui/Popover.js +1 -1
  399. package/lib/ui/Progress.js +1 -1
  400. package/lib/ui/RadioGroup.js +1 -1
  401. package/lib/ui/ScrollArea.js +1 -1
  402. package/lib/ui/Select.js +3 -3
  403. package/lib/ui/Select.js.map +1 -1
  404. package/lib/ui/Skeleton.js +1 -1
  405. package/lib/ui/Slider.js +1 -1
  406. package/lib/ui/Switch.js +1 -1
  407. package/lib/ui/Tabs.js +1 -1
  408. package/lib/ui/Textarea.js +1 -1
  409. package/lib/ui/Toggle.js +2 -2
  410. package/lib/ui/ToggleGroup.js +1 -1
  411. package/lib/ui/Tooltip.js +1 -1
  412. package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-Bbf99zic.js} +2 -2
  413. package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
  414. package/lib/useScrollToAnchor-BVCQSeKB.js +286 -0
  415. package/lib/useScrollToAnchor-BVCQSeKB.js.map +1 -0
  416. package/lib/zudoku.auth-auth0.js +8 -10
  417. package/lib/zudoku.auth-auth0.js.map +1 -1
  418. package/lib/zudoku.auth-clerk.js +79 -51
  419. package/lib/zudoku.auth-clerk.js.map +1 -1
  420. package/lib/zudoku.auth-openid.js +279 -274
  421. package/lib/zudoku.auth-openid.js.map +1 -1
  422. package/lib/zudoku.components.js +804 -919
  423. package/lib/zudoku.components.js.map +1 -1
  424. package/lib/zudoku.plugin-api-catalog.js +6 -6
  425. package/lib/zudoku.plugin-api-keys.js +7 -7
  426. package/lib/zudoku.plugin-custom-pages.js +3 -3
  427. package/lib/zudoku.plugin-markdown.js +23 -44
  428. package/lib/zudoku.plugin-markdown.js.map +1 -1
  429. package/lib/zudoku.plugin-openapi.js +7 -6
  430. package/lib/zudoku.plugin-openapi.js.map +1 -1
  431. package/lib/zudoku.plugin-redirect.js +1 -1
  432. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  433. package/package.json +54 -57
  434. package/src/app/demo-cdn.html +31 -31
  435. package/src/app/demo.tsx +0 -1
  436. package/src/app/entry.server.tsx +1 -1
  437. package/src/app/main.css +57 -44
  438. package/src/app/main.tsx +31 -8
  439. package/src/app/standalone.tsx +0 -1
  440. package/src/lib/authentication/components/SignOut.tsx +2 -1
  441. package/src/lib/authentication/providers/auth0.tsx +1 -4
  442. package/src/lib/authentication/providers/clerk.tsx +38 -7
  443. package/src/lib/authentication/providers/openid.tsx +19 -7
  444. package/src/lib/authentication/state.ts +18 -0
  445. package/src/lib/components/AnchorLink.tsx +5 -2
  446. package/src/lib/components/Autocomplete.tsx +113 -0
  447. package/src/lib/components/Header.tsx +13 -9
  448. package/src/lib/components/Layout.tsx +1 -1
  449. package/src/lib/components/Markdown.tsx +14 -15
  450. package/src/lib/components/PathRenderer.tsx +61 -0
  451. package/src/lib/components/StatusPage.tsx +91 -0
  452. package/src/lib/components/SyntaxHighlight.tsx +14 -0
  453. package/src/lib/components/ThemeSwitch.tsx +2 -2
  454. package/src/lib/components/TopNavigation.tsx +2 -2
  455. package/src/lib/components/cache.ts +15 -0
  456. package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
  457. package/src/lib/components/context/ZudokuContext.ts +3 -1
  458. package/src/lib/components/index.ts +14 -3
  459. package/src/lib/components/navigation/Sidebar.tsx +7 -1
  460. package/src/lib/components/navigation/SidebarBadge.tsx +13 -1
  461. package/src/lib/components/navigation/SidebarCategory.tsx +45 -46
  462. package/src/lib/components/navigation/SidebarItem.tsx +2 -1
  463. package/src/lib/components/navigation/SidebarWrapper.tsx +3 -2
  464. package/src/lib/core/RouteGuard.tsx +35 -0
  465. package/src/lib/core/ZudokuContext.ts +9 -8
  466. package/src/lib/oas/graphql/circular.ts +50 -0
  467. package/src/lib/oas/graphql/index.ts +129 -90
  468. package/src/lib/oas/parser/dereference/index.ts +1 -2
  469. package/src/lib/oas/parser/upgrade/index.ts +19 -4
  470. package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
  471. package/src/lib/plugins/markdown/resolver.ts +0 -33
  472. package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
  473. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  474. package/src/lib/plugins/openapi/Endpoint.tsx +14 -12
  475. package/src/lib/plugins/openapi/{Route.tsx → OpenApiRoute.tsx} +3 -3
  476. package/src/lib/plugins/openapi/OperationList.tsx +50 -18
  477. package/src/lib/plugins/openapi/OperationListItem.tsx +12 -7
  478. package/src/lib/plugins/openapi/ParameterListItem.tsx +7 -8
  479. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +13 -1
  480. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -38
  481. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +46 -63
  482. package/src/lib/plugins/openapi/Sidecar.tsx +39 -41
  483. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  484. package/src/lib/plugins/openapi/SidecarExamples.tsx +163 -0
  485. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -120
  486. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  487. package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -17
  488. package/src/lib/plugins/openapi/graphql/gql.ts +12 -4
  489. package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
  490. package/src/lib/plugins/openapi/index.tsx +166 -79
  491. package/src/lib/plugins/openapi/interfaces.ts +16 -12
  492. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
  493. package/src/lib/plugins/openapi/playground/Headers.tsx +166 -36
  494. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  495. package/src/lib/plugins/openapi/playground/PathParams.tsx +32 -64
  496. package/src/lib/plugins/openapi/playground/Playground.tsx +264 -213
  497. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
  498. package/src/lib/plugins/openapi/playground/QueryParams.tsx +87 -88
  499. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
  500. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
  501. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
  502. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
  503. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  504. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  505. package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
  506. package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
  507. package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
  508. package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
  509. package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +14 -13
  510. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  511. package/src/lib/plugins/openapi/schema/utils.ts +4 -0
  512. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
  513. package/src/lib/ui/Badge.tsx +2 -1
  514. package/src/lib/ui/Card.tsx +1 -1
  515. package/src/lib/ui/Checkbox.tsx +24 -7
  516. package/src/lib/ui/Command.tsx +20 -0
  517. package/src/lib/ui/Input.tsx +1 -2
  518. package/src/lib/ui/Select.tsx +1 -1
  519. package/src/lib/util/MdxComponents.tsx +2 -1
  520. package/src/lib/util/joinUrl.test.ts +62 -0
  521. package/src/lib/util/joinUrl.ts +57 -0
  522. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  523. package/src/lib/util/traverse.ts +15 -5
  524. package/src/lib/util/useScrollToAnchor.ts +33 -34
  525. package/src/lib/util/useScrollToTop.ts +8 -3
  526. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  527. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  528. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  529. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  530. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  531. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  532. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  533. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  534. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  535. package/dist/lib/plugins/openapi-worker.js +0 -8
  536. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  537. package/dist/vite/prerender.js +0 -89
  538. package/dist/vite/prerender.js.map +0 -1
  539. package/lib/AnchorLink-DFZZbmvr.js +0 -34
  540. package/lib/AnchorLink-DFZZbmvr.js.map +0 -1
  541. package/lib/AuthenticationPlugin-DVLEc6cm.js +0 -58
  542. package/lib/AuthenticationPlugin-DVLEc6cm.js.map +0 -1
  543. package/lib/Button-DeAoTouo.js.map +0 -1
  544. package/lib/Dialog-Bxv1yEIg.js +0 -67
  545. package/lib/Dialog-Bxv1yEIg.js.map +0 -1
  546. package/lib/Markdown-CZDLNOFc.js.map +0 -1
  547. package/lib/MdxPage-DKMbBROv.js.map +0 -1
  548. package/lib/OperationList-CqLL5P5l.js +0 -5068
  549. package/lib/OperationList-CqLL5P5l.js.map +0 -1
  550. package/lib/Route-DYwKZ_c_.js +0 -35
  551. package/lib/Route-DYwKZ_c_.js.map +0 -1
  552. package/lib/Select-B_IxRUUC.js +0 -223
  553. package/lib/Select-B_IxRUUC.js.map +0 -1
  554. package/lib/Spinner-DuxJLLNE.js +0 -7
  555. package/lib/Spinner-DuxJLLNE.js.map +0 -1
  556. package/lib/StaggeredRender-DgsamH_G.js +0 -17
  557. package/lib/StaggeredRender-DgsamH_G.js.map +0 -1
  558. package/lib/SyntaxHighlight-Bz-lOJtH.js.map +0 -1
  559. package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
  560. package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
  561. package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
  562. package/lib/assets/index-C7jnHK4b.js +0 -4841
  563. package/lib/assets/index-C7jnHK4b.js.map +0 -1
  564. package/lib/assets/worker-DV9Ecqy9.js +0 -18580
  565. package/lib/assets/worker-DV9Ecqy9.js.map +0 -1
  566. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
  567. package/lib/context-h_UkBLvr.js +0 -22
  568. package/lib/createServer-C4C0OO0m.js.map +0 -1
  569. package/lib/index-Bn6Lc9tq.js +0 -9
  570. package/lib/index-Bn6Lc9tq.js.map +0 -1
  571. package/lib/index-CBXSgjaE.js.map +0 -1
  572. package/lib/index-CPNSgwSb.js +0 -36
  573. package/lib/index-DyBL--Kz.js +0 -826
  574. package/lib/index-DyBL--Kz.js.map +0 -1
  575. package/lib/index-DzRORsY1.js +0 -1282
  576. package/lib/index-DzRORsY1.js.map +0 -1
  577. package/lib/index.esm-BnnBRKJX.js +0 -1214
  578. package/lib/index.esm-BnnBRKJX.js.map +0 -1
  579. package/lib/state-CFQsUZUP.js +0 -202
  580. package/lib/state-CFQsUZUP.js.map +0 -1
  581. package/lib/zudoku.openapi-worker.js +0 -15
  582. package/lib/zudoku.openapi-worker.js.map +0 -1
  583. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  584. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  585. package/src/lib/plugins/openapi-worker.ts +0 -11
  586. /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
@@ -0,0 +1,2065 @@
1
+ var pt = Object.defineProperty;
2
+ var qe = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var ht = (t, a, s) => a in t ? pt(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
6
+ var Y = (t, a, s) => ht(t, typeof a != "symbol" ? a + "" : a, s), xt = (t, a, s) => a.has(t) || qe("Cannot " + s);
7
+ var ee = (t, a, s) => (xt(t, a, "read from private field"), s ? s.call(t) : a.get(t)), te = (t, a, s) => a.has(t) ? qe("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
8
+ import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { s as ae } from "./index-CjJS0l4l.js";
10
+ import { Circle as ft, ChevronRightIcon as z, CheckIcon as gt, DotIcon as yt, Check as vt, Search as jt, XIcon as bt, ChevronDownIcon as Nt, InfoIcon as De, LogInIcon as wt, CirclePlayIcon as Ct } from "lucide-react";
11
+ import { m as Tt, r as $t } from "./chunk-SYFQ2XB5-QijJrSf0.js";
12
+ import { u as St } from "./hook-NIpDSpau.js";
13
+ import { Button as _ } from "./ui/Button.js";
14
+ import { j as R } from "./joinUrl-nLx9pD-Z.js";
15
+ import { Z as Pt } from "./invariant-Caa8-XvF.js";
16
+ import { VisuallyHidden as kt } from "@radix-ui/react-visually-hidden";
17
+ import * as f from "react";
18
+ import { Fragment as I, useRef as q, useEffect as ue, useState as H, useCallback as Rt, useTransition as It } from "react";
19
+ import { V as $, T as Ot, D as Et, b as At, a as qt, c as Dt } from "./index-B7mqiOei.js";
20
+ import { S as Me, a as Ue, b as _e, c as Je, e as M, u as Lt } from "./Select-BcAbBUmk.js";
21
+ import { b as pe, u as he, C as O, a as Vt, F as Ft } from "./index.esm-CrSoEshU.js";
22
+ import { c as xe } from "./index-Djenk2Hj.js";
23
+ import { c as u } from "./cn-qaFjX9_3.js";
24
+ import * as Qe from "@radix-ui/react-label";
25
+ import * as G from "@radix-ui/react-radio-group";
26
+ import { a as zt } from "./state-bfQxaDxU.js";
27
+ import { k as Ht, l as Gt } from "./ZudokuContext-dUyBGMap.js";
28
+ import { Card as fe, CardHeader as Bt, CardTitle as Mt, CardContent as Ut } from "./ui/Card.js";
29
+ import { Tabs as We, TabsList as Ze, TabsTrigger as E, TabsContent as A } from "./ui/Tabs.js";
30
+ import { z as _t, S as Jt } from "./SyntaxHighlight-B0L4SC_N.js";
31
+ import { B as U, S as Qt } from "./Spinner-BlzrEEk1.js";
32
+ import * as b from "@radix-ui/react-dropdown-menu";
33
+ import * as ie from "@radix-ui/react-checkbox";
34
+ import * as J from "@radix-ui/react-popover";
35
+ import { PopoverAnchor as Wt } from "@radix-ui/react-popover";
36
+ import { Input as ge } from "./ui/Input.js";
37
+ import { Slot as Zt } from "@radix-ui/react-slot";
38
+ import { Callout as Kt } from "./ui/Callout.js";
39
+ import { Collapsible as Le, CollapsibleTrigger as Ve, CollapsibleContent as Fe } from "./ui/Collapsible.js";
40
+ import * as ye from "@radix-ui/react-collapsible";
41
+ let se;
42
+ const Xt = (t) => {
43
+ var a;
44
+ if ((a = t.errors) != null && a[0])
45
+ throw new Pt(t.errors[0].message, {
46
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
47
+ });
48
+ };
49
+ var Z, K;
50
+ class Yt {
51
+ constructor(a) {
52
+ te(this, Z, async () => (se || (se = import("./createServer-E3cXjB0P.js").then(
53
+ (a) => a.createServer(this.config)
54
+ )), se));
55
+ te(this, K, async (a) => this.config.server ? fetch(this.config.server, a) : (await ee(this, Z).call(this)).fetch("http://localhost/graphql", a));
56
+ Y(this, "fetch", async (a, ...[s]) => {
57
+ var l;
58
+ const n = (l = a.match(/query (\w+)/)) == null ? void 0 : l[1], o = await ee(this, K).call(this, {
59
+ method: "POST",
60
+ body: JSON.stringify({ query: a, variables: s, operationName: n }),
61
+ headers: { "Content-Type": "application/json" }
62
+ });
63
+ if (!o.ok)
64
+ throw new Error("Network response was not ok");
65
+ const d = await o.json();
66
+ return Xt(d), d.data;
67
+ });
68
+ this.config = a;
69
+ }
70
+ }
71
+ Z = new WeakMap(), K = new WeakMap();
72
+ class D extends String {
73
+ constructor(s, n) {
74
+ super(s);
75
+ Y(this, "__apiType");
76
+ this.value = s, this.__meta__ = n;
77
+ }
78
+ toString() {
79
+ return this.value;
80
+ }
81
+ }
82
+ const ea = new D(
83
+ `
84
+ fragment OperationsFragment on OperationItem {
85
+ slug
86
+ summary
87
+ method
88
+ description
89
+ operationId
90
+ contentTypes
91
+ path
92
+ parameters {
93
+ name
94
+ in
95
+ description
96
+ required
97
+ schema
98
+ style
99
+ examples {
100
+ name
101
+ description
102
+ externalValue
103
+ value
104
+ summary
105
+ }
106
+ }
107
+ requestBody {
108
+ content {
109
+ mediaType
110
+ encoding {
111
+ name
112
+ }
113
+ examples {
114
+ name
115
+ description
116
+ externalValue
117
+ value
118
+ summary
119
+ }
120
+ schema
121
+ }
122
+ description
123
+ required
124
+ }
125
+ responses {
126
+ statusCode
127
+ links
128
+ description
129
+ content {
130
+ examples {
131
+ name
132
+ description
133
+ externalValue
134
+ value
135
+ summary
136
+ }
137
+ mediaType
138
+ encoding {
139
+ name
140
+ }
141
+ schema
142
+ }
143
+ }
144
+ }
145
+ `,
146
+ { fragmentName: "OperationsFragment" }
147
+ ), ta = new D(`
148
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
149
+ schema(input: $input, type: $type) {
150
+ url
151
+ servers {
152
+ url
153
+ }
154
+ }
155
+ }
156
+ `), aa = new D(`
157
+ query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
158
+ schema(input: $input, type: $type) {
159
+ servers {
160
+ url
161
+ }
162
+ description
163
+ summary
164
+ title
165
+ url
166
+ version
167
+ tags(name: $tag) {
168
+ name
169
+ description
170
+ }
171
+ operations(tag: $tag, untagged: $untagged) {
172
+ slug
173
+ ...OperationsFragment
174
+ }
175
+ }
176
+ }
177
+ fragment OperationsFragment on OperationItem {
178
+ slug
179
+ summary
180
+ method
181
+ description
182
+ operationId
183
+ contentTypes
184
+ path
185
+ parameters {
186
+ name
187
+ in
188
+ description
189
+ required
190
+ schema
191
+ style
192
+ examples {
193
+ name
194
+ description
195
+ externalValue
196
+ value
197
+ summary
198
+ }
199
+ }
200
+ requestBody {
201
+ content {
202
+ mediaType
203
+ encoding {
204
+ name
205
+ }
206
+ examples {
207
+ name
208
+ description
209
+ externalValue
210
+ value
211
+ summary
212
+ }
213
+ schema
214
+ }
215
+ description
216
+ required
217
+ }
218
+ responses {
219
+ statusCode
220
+ links
221
+ description
222
+ content {
223
+ examples {
224
+ name
225
+ description
226
+ externalValue
227
+ value
228
+ summary
229
+ }
230
+ mediaType
231
+ encoding {
232
+ name
233
+ }
234
+ schema
235
+ }
236
+ }
237
+ }`), sa = new D(`
238
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
239
+ schema(input: $input, type: $type) {
240
+ url
241
+ servers {
242
+ url
243
+ }
244
+ }
245
+ }
246
+ `), na = new D(`
247
+ query GetCategories($input: JSON!, $type: SchemaType!) {
248
+ schema(input: $input, type: $type) {
249
+ url
250
+ tags {
251
+ name
252
+ }
253
+ }
254
+ }
255
+ `), ra = new D(`
256
+ query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
257
+ schema(input: $input, type: $type) {
258
+ operations(tag: $tag) {
259
+ slug
260
+ deprecated
261
+ method
262
+ summary
263
+ operationId
264
+ path
265
+ tags {
266
+ name
267
+ }
268
+ }
269
+ untagged: operations(untagged: true) {
270
+ slug
271
+ deprecated
272
+ method
273
+ summary
274
+ operationId
275
+ path
276
+ }
277
+ }
278
+ }
279
+ `), oa = {
280
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ta,
281
+ "\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\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": ea,
282
+ "\n query AllOperations(\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 tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": aa,
283
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": sa,
284
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": na,
285
+ "\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": ra
286
+ };
287
+ function Ke(t) {
288
+ return oa[t] ?? {};
289
+ }
290
+ const la = xe(
291
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
292
+ {
293
+ variants: {
294
+ variant: {
295
+ default: "bg-background text-foreground",
296
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
297
+ }
298
+ },
299
+ defaultVariants: {
300
+ variant: "default"
301
+ }
302
+ }
303
+ ), de = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
304
+ "div",
305
+ {
306
+ ref: n,
307
+ role: "alert",
308
+ className: u(la({ variant: a }), t),
309
+ ...s
310
+ }
311
+ ));
312
+ de.displayName = "Alert";
313
+ const ce = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
314
+ "h5",
315
+ {
316
+ ref: s,
317
+ className: u("mb-1 font-medium leading-none tracking-tight", t),
318
+ ...a
319
+ }
320
+ ));
321
+ ce.displayName = "AlertTitle";
322
+ const me = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
323
+ "div",
324
+ {
325
+ ref: s,
326
+ className: u("text-sm [&_p]:leading-relaxed", t),
327
+ ...a
328
+ }
329
+ ));
330
+ me.displayName = "AlertDescription";
331
+ const ia = ({
332
+ path: t,
333
+ renderParam: a
334
+ }) => {
335
+ let s = 0;
336
+ return t.split("/").map((n, o, d) => {
337
+ const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
338
+ let i = 0;
339
+ return l.forEach((p) => {
340
+ const [g, w] = p;
341
+ if (!w) return;
342
+ const j = p.index;
343
+ j > i && c.push(
344
+ /* @__PURE__ */ e.jsx(I, { children: n.slice(i, j) }, `text-${i}-${j}`)
345
+ ), c.push(
346
+ /* @__PURE__ */ e.jsx(I, { children: a({ name: w, originalValue: g, index: s++ }) }, `param-${w}`)
347
+ ), i = j + g.length;
348
+ }), i < n.length && c.push(
349
+ /* @__PURE__ */ e.jsx(I, { children: n.slice(i) }, `text-${i}-${n.length}`)
350
+ ), // eslint-disable-next-line react/no-array-index-key
351
+ /* @__PURE__ */ e.jsxs(I, { children: [
352
+ c,
353
+ o < d.length - 1 && "/",
354
+ /* @__PURE__ */ e.jsx("wbr", {})
355
+ ] }, `${n}-${o}`);
356
+ });
357
+ }, da = xe(
358
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
359
+ ), V = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
360
+ Qe.Root,
361
+ {
362
+ ref: s,
363
+ className: u(da(), t),
364
+ ...a
365
+ }
366
+ ));
367
+ V.displayName = Qe.Root.displayName;
368
+ const ve = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
369
+ G.Root,
370
+ {
371
+ className: u("grid gap-2", t),
372
+ ...a,
373
+ ref: s
374
+ }
375
+ ));
376
+ ve.displayName = G.Root.displayName;
377
+ const Q = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
378
+ G.Item,
379
+ {
380
+ ref: s,
381
+ className: u(
382
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
383
+ t
384
+ ),
385
+ ...a,
386
+ children: /* @__PURE__ */ e.jsx(G.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(ft, { className: "h-2.5 w-2.5 fill-current text-current" }) })
387
+ }
388
+ ));
389
+ Q.displayName = G.Item.displayName;
390
+ const Xe = f.forwardRef(
391
+ ({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
392
+ "textarea",
393
+ {
394
+ className: u(
395
+ "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-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
396
+ t
397
+ ),
398
+ ref: s,
399
+ ...a
400
+ }
401
+ )
402
+ );
403
+ Xe.displayName = "Textarea";
404
+ const ne = (t) => Math.abs(
405
+ isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
406
+ ), re = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${ne(a) + ne(s)}`)) : ne(t), ze = (t, a = {}) => {
407
+ const s = (3 * re(t) + 2 * re(t) + re(t)) % 360, { saturation: n = 75, lightness: o = 60 } = a;
408
+ return `${s}deg ${n}% ${o}%`;
409
+ }, oe = "data-linked-param", ca = (t) => {
410
+ const { resolvedTheme: a } = _t();
411
+ return {
412
+ text: ze(
413
+ t,
414
+ a === "light" ? { saturation: 95, lightness: 38 } : {}
415
+ ),
416
+ background: ze(
417
+ t,
418
+ a === "light" ? { saturation: 85, lightness: 40 } : {}
419
+ )
420
+ };
421
+ }, Ye = ({
422
+ name: t,
423
+ className: a,
424
+ slug: s,
425
+ title: n,
426
+ children: o,
427
+ onClick: d
428
+ }) => {
429
+ const l = q(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), i = t.replace(/[{}]/g, ""), { text: p, background: g } = ca(i), w = `hsl(${p} / 100%)`, j = `hsl(${g} / 10%)`, m = `hsl(${g} / 50%)`;
430
+ return ue(() => {
431
+ if (!c || !l.current) return;
432
+ const h = () => {
433
+ document.querySelectorAll(`[${oe}="${c}"]`).forEach((v) => {
434
+ v instanceof HTMLElement && (v.dataset.active = "true");
435
+ });
436
+ }, x = () => {
437
+ document.querySelectorAll(`[${oe}="${c}"]`).forEach((v) => {
438
+ v instanceof HTMLElement && (v.dataset.active = "false");
439
+ });
440
+ }, y = l.current;
441
+ return y.addEventListener("mouseenter", h), y.addEventListener("mouseleave", x), () => {
442
+ y.removeEventListener("mouseenter", h), y.removeEventListener("mouseleave", x);
443
+ };
444
+ }, [c]), /* @__PURE__ */ e.jsx(
445
+ "span",
446
+ {
447
+ [oe]: c,
448
+ className: u(
449
+ // This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
450
+ "relative rounded transition-all duration-100 rounded-lg",
451
+ "border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
452
+ "data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
453
+ a
454
+ ),
455
+ title: n,
456
+ suppressHydrationWarning: !0,
457
+ ref: l,
458
+ onClick: d,
459
+ style: {
460
+ "--param-color": w,
461
+ "--border-color": m,
462
+ "--background-color": j
463
+ },
464
+ children: o ?? t
465
+ }
466
+ );
467
+ }, ma = (t, a, s) => {
468
+ const n = a.replace(/(:\w+|\{\w+})/g, (d) => {
469
+ var i;
470
+ const l = d.replace(/[:{}]/g, "");
471
+ return ((i = s.pathParams.find((p) => p.name === l)) == null ? void 0 : i.value) ?? d;
472
+ }), o = new URL(
473
+ n.replace(/^\//, ""),
474
+ t.endsWith("/") ? t : `${t}/`
475
+ );
476
+ return s.queryParams.filter((d) => d.active).forEach((d) => {
477
+ o.searchParams.set(d.name, d.value);
478
+ }), o;
479
+ }, et = b.Root, tt = b.Trigger, ua = b.Group, pa = f.forwardRef(({ className: t, inset: a, children: s, ...n }, o) => /* @__PURE__ */ e.jsxs(
480
+ b.SubTrigger,
481
+ {
482
+ ref: o,
483
+ className: u(
484
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
485
+ a && "pl-8",
486
+ t
487
+ ),
488
+ ...n,
489
+ children: [
490
+ s,
491
+ /* @__PURE__ */ e.jsx(z, { className: "ml-auto h-4 w-4" })
492
+ ]
493
+ }
494
+ ));
495
+ pa.displayName = b.SubTrigger.displayName;
496
+ const ha = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
497
+ b.SubContent,
498
+ {
499
+ ref: s,
500
+ className: u(
501
+ "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",
502
+ t
503
+ ),
504
+ ...a
505
+ }
506
+ ));
507
+ ha.displayName = b.SubContent.displayName;
508
+ const je = f.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(b.Portal, { children: /* @__PURE__ */ e.jsx(
509
+ b.Content,
510
+ {
511
+ ref: n,
512
+ sideOffset: a,
513
+ className: u(
514
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
515
+ "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",
516
+ t
517
+ ),
518
+ ...s
519
+ }
520
+ ) }));
521
+ je.displayName = b.Content.displayName;
522
+ const be = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
523
+ b.Item,
524
+ {
525
+ ref: n,
526
+ className: u(
527
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
528
+ a && "pl-8",
529
+ t
530
+ ),
531
+ ...s
532
+ }
533
+ ));
534
+ be.displayName = b.Item.displayName;
535
+ const xa = f.forwardRef(({ className: t, children: a, checked: s, ...n }, o) => /* @__PURE__ */ e.jsxs(
536
+ b.CheckboxItem,
537
+ {
538
+ ref: o,
539
+ className: u(
540
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
541
+ t
542
+ ),
543
+ checked: s,
544
+ ...n,
545
+ children: [
546
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(gt, { className: "h-4 w-4" }) }) }),
547
+ a
548
+ ]
549
+ }
550
+ ));
551
+ xa.displayName = b.CheckboxItem.displayName;
552
+ const fa = f.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
553
+ b.RadioItem,
554
+ {
555
+ ref: n,
556
+ className: u(
557
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
558
+ t
559
+ ),
560
+ ...s,
561
+ children: [
562
+ /* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(b.ItemIndicator, { children: /* @__PURE__ */ e.jsx(yt, { className: "h-4 w-4 fill-current" }) }) }),
563
+ a
564
+ ]
565
+ }
566
+ ));
567
+ fa.displayName = b.RadioItem.displayName;
568
+ const at = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
569
+ b.Label,
570
+ {
571
+ ref: n,
572
+ className: u(
573
+ "px-2 py-1.5 text-sm font-semibold",
574
+ a && "pl-8",
575
+ t
576
+ ),
577
+ ...s
578
+ }
579
+ ));
580
+ at.displayName = b.Label.displayName;
581
+ const st = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
582
+ b.Separator,
583
+ {
584
+ ref: s,
585
+ className: u("-mx-1 my-1 h-px bg-muted", t),
586
+ ...a
587
+ }
588
+ ));
589
+ st.displayName = b.Separator.displayName;
590
+ const ga = ({
591
+ examples: t,
592
+ onSelect: a
593
+ }) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(et, { children: [
594
+ /* @__PURE__ */ e.jsx(tt, { asChild: !0, children: /* @__PURE__ */ e.jsx(U, { variant: "outline", children: "Use Example" }) }),
595
+ /* @__PURE__ */ e.jsx(je, { className: "w-56", children: t.map((s) => {
596
+ var n;
597
+ return /* @__PURE__ */ e.jsxs("div", { children: [
598
+ /* @__PURE__ */ e.jsx(at, { children: s.mediaType }),
599
+ /* @__PURE__ */ e.jsx(st, {}),
600
+ /* @__PURE__ */ e.jsx(ua, { children: (n = s.examples) == null ? void 0 : n.map((o) => /* @__PURE__ */ e.jsx(
601
+ be,
602
+ {
603
+ onSelect: () => a(o),
604
+ className: "line-clamp-1",
605
+ children: o.summary ?? o.name
606
+ },
607
+ o.name
608
+ )) })
609
+ ] }, s.mediaType);
610
+ }) })
611
+ ] }) }), X = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
612
+ "div",
613
+ {
614
+ ref: s,
615
+ className: u(
616
+ "rounded-xl border bg-card text-card-foreground shadow-sm",
617
+ t
618
+ ),
619
+ ...a
620
+ }
621
+ ));
622
+ X.displayName = "Card";
623
+ const ya = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
624
+ "div",
625
+ {
626
+ ref: s,
627
+ className: u("flex flex-col space-y-1.5 p-6", t),
628
+ ...a
629
+ }
630
+ ));
631
+ ya.displayName = "CardHeader";
632
+ const va = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
633
+ "h3",
634
+ {
635
+ ref: s,
636
+ className: u("font-semibold leading-none tracking-tight", t),
637
+ ...a
638
+ }
639
+ ));
640
+ va.displayName = "CardTitle";
641
+ const ja = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
642
+ "p",
643
+ {
644
+ ref: s,
645
+ className: u("text-sm text-muted-foreground", t),
646
+ ...a
647
+ }
648
+ ));
649
+ ja.displayName = "CardDescription";
650
+ const ba = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: u("p-6 pt-0", t), ...a }));
651
+ ba.displayName = "CardContent";
652
+ const Na = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
653
+ "div",
654
+ {
655
+ ref: s,
656
+ className: u("flex items-center p-6 pt-0", t),
657
+ ...a
658
+ }
659
+ ));
660
+ Na.displayName = "CardFooter";
661
+ const wa = xe(
662
+ "peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none 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",
663
+ {
664
+ variants: {
665
+ variant: {
666
+ default: "border border-primary data-[state=checked]:bg-primary",
667
+ outline: "border border-input data-[state=checked]:bg-accent"
668
+ }
669
+ },
670
+ defaultVariants: {
671
+ variant: "default"
672
+ }
673
+ }
674
+ ), Ne = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
675
+ ie.Root,
676
+ {
677
+ ref: n,
678
+ className: u(wa({ variant: a, className: t })),
679
+ ...s,
680
+ children: /* @__PURE__ */ e.jsx(
681
+ ie.Indicator,
682
+ {
683
+ className: u("flex items-center justify-center text-current"),
684
+ children: /* @__PURE__ */ e.jsx(vt, { className: "h-4 w-4" })
685
+ }
686
+ )
687
+ }
688
+ ));
689
+ Ne.displayName = ie.Root.displayName;
690
+ const nt = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
691
+ $,
692
+ {
693
+ ref: s,
694
+ className: u(
695
+ "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
696
+ t
697
+ ),
698
+ ...a
699
+ }
700
+ ));
701
+ nt.displayName = $.displayName;
702
+ const Ca = f.forwardRef(({ className: t, ...a }, s) => (
703
+ // eslint-disable-next-line react/no-unknown-property
704
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
705
+ /* @__PURE__ */ e.jsx(jt, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
706
+ /* @__PURE__ */ e.jsx(
707
+ $.Input,
708
+ {
709
+ ref: s,
710
+ className: u(
711
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
712
+ t
713
+ ),
714
+ ...a
715
+ }
716
+ )
717
+ ] })
718
+ ));
719
+ Ca.displayName = $.Input.displayName;
720
+ const rt = f.forwardRef(({ className: t, ...a }, s) => (
721
+ // eslint-disable-next-line react/no-unknown-property
722
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ e.jsx(
723
+ $.Input,
724
+ {
725
+ ref: s,
726
+ className: u(
727
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
728
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
729
+ t
730
+ ),
731
+ ...a
732
+ }
733
+ ) })
734
+ ));
735
+ rt.displayName = $.Input.displayName;
736
+ const ot = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
737
+ $.List,
738
+ {
739
+ ref: s,
740
+ className: u("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
741
+ ...a
742
+ }
743
+ ));
744
+ ot.displayName = $.List.displayName;
745
+ const Ta = f.forwardRef((t, a) => /* @__PURE__ */ e.jsx(
746
+ $.Empty,
747
+ {
748
+ ref: a,
749
+ className: "py-6 text-center text-sm",
750
+ ...t
751
+ }
752
+ ));
753
+ Ta.displayName = $.Empty.displayName;
754
+ const $a = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
755
+ $.Group,
756
+ {
757
+ ref: s,
758
+ className: u(
759
+ "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
760
+ t
761
+ ),
762
+ ...a
763
+ }
764
+ ));
765
+ $a.displayName = $.Group.displayName;
766
+ const Sa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
767
+ $.Separator,
768
+ {
769
+ ref: s,
770
+ className: u("-mx-1 h-px bg-border", t),
771
+ ...a
772
+ }
773
+ ));
774
+ Sa.displayName = $.Separator.displayName;
775
+ const lt = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
776
+ $.Item,
777
+ {
778
+ ref: s,
779
+ className: u(
780
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
781
+ t
782
+ ),
783
+ ...a
784
+ }
785
+ ));
786
+ lt.displayName = $.Item.displayName;
787
+ const Pa = J.Root, it = f.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, o) => /* @__PURE__ */ e.jsx(J.Portal, { children: /* @__PURE__ */ e.jsx(
788
+ J.Content,
789
+ {
790
+ ref: o,
791
+ align: a,
792
+ sideOffset: s,
793
+ className: u(
794
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",
795
+ t
796
+ ),
797
+ ...n
798
+ }
799
+ ) }));
800
+ it.displayName = J.Content.displayName;
801
+ const ka = ({
802
+ value: t,
803
+ options: a,
804
+ onChange: s,
805
+ className: n,
806
+ placeholder: o = "Enter value",
807
+ onEnterPress: d,
808
+ ref: l
809
+ }) => {
810
+ const [c, i] = H(!1), [p, g] = H(!1), w = Ot((m) => m.filtered.count), j = q(null);
811
+ return /* @__PURE__ */ e.jsxs(Pa, { open: c, children: [
812
+ /* @__PURE__ */ e.jsx(Wt, { children: /* @__PURE__ */ e.jsx(
813
+ rt,
814
+ {
815
+ ref: (m) => {
816
+ j.current = m, typeof l == "function" ? l(m) : l && (l.current = m);
817
+ },
818
+ value: t,
819
+ placeholder: o,
820
+ className: u("h-9 bg-transparent", n),
821
+ onFocus: () => i(!0),
822
+ onBlur: () => {
823
+ p || i(!1);
824
+ },
825
+ onKeyDown: (m) => {
826
+ var h;
827
+ m.key === "Enter" && (i(!1), (h = j.current) == null || h.blur(), d == null || d(m));
828
+ },
829
+ onValueChange: (m) => s(m)
830
+ }
831
+ ) }),
832
+ /* @__PURE__ */ e.jsx(
833
+ it,
834
+ {
835
+ onMouseEnter: () => g(!0),
836
+ onMouseLeave: () => g(!1),
837
+ onOpenAutoFocus: (m) => m.preventDefault(),
838
+ className: u("p-0 w-[--radix-popover-trigger-width]", {
839
+ "border-0": w === 0
840
+ }),
841
+ align: "start",
842
+ side: "bottom",
843
+ onWheel: (m) => {
844
+ m.stopPropagation();
845
+ },
846
+ onTouchMove: (m) => {
847
+ m.stopPropagation();
848
+ },
849
+ children: /* @__PURE__ */ e.jsx(ot, { className: "max-h-[140px]", children: a.map((m) => /* @__PURE__ */ e.jsx(
850
+ lt,
851
+ {
852
+ value: m,
853
+ onSelect: (h) => {
854
+ s(h), i(!1);
855
+ },
856
+ className: "cursor-pointer",
857
+ children: m
858
+ },
859
+ m
860
+ )) })
861
+ }
862
+ )
863
+ ] });
864
+ }, W = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(nt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(ka, { ...a }) }), we = (t, a) => {
865
+ const s = f.forwardRef(({ className: n, asChild: o, ...d }, l) => {
866
+ const c = o ? Zt : t;
867
+ return f.createElement(c, {
868
+ ...d,
869
+ ref: l,
870
+ className: typeof a == "function" ? a({ className: n }) : u(a, n)
871
+ });
872
+ });
873
+ return s.displayName = `VariantComponent(${t})`, s;
874
+ }, Ce = we(
875
+ "div",
876
+ "grid grid-cols-[2fr_3fr] gap-2 items-center"
877
+ ), Te = we(
878
+ "div",
879
+ "group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
880
+ ), Ra = Object.freeze([
881
+ "Accept",
882
+ "Accept-Encoding",
883
+ "Accept-Language",
884
+ "Authorization",
885
+ "Cache-Control",
886
+ "Connection",
887
+ "Content-Disposition",
888
+ "Content-Encoding",
889
+ "Content-Language",
890
+ "Content-Length",
891
+ "Content-Range",
892
+ "Content-Security-Policy",
893
+ "Content-Type",
894
+ "Cookie",
895
+ "Date",
896
+ "ETag",
897
+ "Expires",
898
+ "Host",
899
+ "If-Modified-Since",
900
+ "Location",
901
+ "Origin",
902
+ "Pragma",
903
+ "Referer",
904
+ "Set-Cookie",
905
+ "User-Agent",
906
+ "X-Requested-With"
907
+ ]), Ia = ({
908
+ control: t,
909
+ headers: a
910
+ }) => {
911
+ const { fields: s, append: n, remove: o } = pe({
912
+ control: t,
913
+ name: "headers"
914
+ }), { setValue: d, watch: l } = he(), c = q([]), i = q([]), p = l("headers"), g = Rt(() => {
915
+ n({ name: "", value: "", active: !1 });
916
+ }, [n]);
917
+ ue(() => {
918
+ p.length === 0 && g();
919
+ }, [p, g]);
920
+ const w = (h) => {
921
+ var x;
922
+ (x = c.current[h]) == null || x.focus();
923
+ }, j = (h) => {
924
+ g(), requestAnimationFrame(() => {
925
+ var x;
926
+ return (x = i.current[h + 1]) == null ? void 0 : x.focus();
927
+ });
928
+ }, m = a.filter((h) => !p.some((x) => x.name === h.name)).map(({ name: h }) => h);
929
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
930
+ /* @__PURE__ */ e.jsx(X, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(Ce, { children: s.map((h, x) => {
931
+ const y = a.find(
932
+ (v) => v.name === l(`headers.${x}.name`)
933
+ );
934
+ return /* @__PURE__ */ e.jsxs(Te, { children: [
935
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
936
+ /* @__PURE__ */ e.jsx(
937
+ O,
938
+ {
939
+ control: t,
940
+ name: `headers.${x}.active`,
941
+ render: ({ field: v }) => /* @__PURE__ */ e.jsx(
942
+ Ne,
943
+ {
944
+ variant: "outline",
945
+ id: `headers.${x}.active`,
946
+ checked: v.value,
947
+ onCheckedChange: (N) => {
948
+ v.onChange(N);
949
+ }
950
+ }
951
+ )
952
+ }
953
+ ),
954
+ /* @__PURE__ */ e.jsx(
955
+ O,
956
+ {
957
+ control: t,
958
+ name: `headers.${x}.name`,
959
+ render: ({ field: v }) => /* @__PURE__ */ e.jsx(
960
+ W,
961
+ {
962
+ ...v,
963
+ placeholder: "Name",
964
+ className: "border-0 shadow-none bg-transparent text-xs font-mono",
965
+ options: [...m, ...Ra],
966
+ onEnterPress: () => w(x),
967
+ onChange: (N) => {
968
+ v.onChange(N), d(`headers.${x}.active`, !0);
969
+ },
970
+ ref: (N) => {
971
+ i.current[x] = N;
972
+ }
973
+ }
974
+ )
975
+ }
976
+ )
977
+ ] }),
978
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
979
+ /* @__PURE__ */ e.jsx(
980
+ O,
981
+ {
982
+ control: t,
983
+ name: `headers.${x}.value`,
984
+ render: ({ field: v }) => (y == null ? void 0 : y.enum) && y.enum.length > 0 ? /* @__PURE__ */ e.jsx(
985
+ W,
986
+ {
987
+ shouldFilter: !1,
988
+ value: v.value,
989
+ options: y.enum ?? [],
990
+ onChange: (C) => {
991
+ v.onChange(C), d(`headers.${x}.active`, !0);
992
+ },
993
+ className: "font-mono text-xs border-0"
994
+ }
995
+ ) : /* @__PURE__ */ e.jsx(
996
+ ge,
997
+ {
998
+ placeholder: "Value",
999
+ className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
1000
+ ...v,
1001
+ ref: (C) => {
1002
+ c.current[x] = C;
1003
+ },
1004
+ onKeyDown: (C) => {
1005
+ C.key === "Enter" && C.currentTarget.value.trim() && j(x);
1006
+ },
1007
+ autoComplete: "off"
1008
+ }
1009
+ )
1010
+ }
1011
+ ),
1012
+ /* @__PURE__ */ e.jsx(
1013
+ _,
1014
+ {
1015
+ size: "icon",
1016
+ variant: "ghost",
1017
+ className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
1018
+ onClick: () => o(x),
1019
+ type: "button",
1020
+ children: /* @__PURE__ */ e.jsx(bt, { size: 16 })
1021
+ }
1022
+ )
1023
+ ] })
1024
+ ] }, h.id);
1025
+ }) }) }),
1026
+ /* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
1027
+ _,
1028
+ {
1029
+ className: "",
1030
+ onClick: g,
1031
+ type: "button",
1032
+ variant: "secondary",
1033
+ children: "Add header"
1034
+ }
1035
+ ) })
1036
+ ] });
1037
+ }, Oa = ({
1038
+ control: t
1039
+ }) => {
1040
+ const { fields: a } = pe({
1041
+ control: t,
1042
+ name: "pathParams"
1043
+ });
1044
+ return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(Ce, { children: a.map((s, n) => /* @__PURE__ */ e.jsxs(Te, { children: [
1045
+ /* @__PURE__ */ e.jsx(
1046
+ O,
1047
+ {
1048
+ control: t,
1049
+ name: `pathParams.${n}.name`,
1050
+ render: () => /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsx(
1051
+ Ye,
1052
+ {
1053
+ slug: s.name,
1054
+ name: s.name,
1055
+ className: "font-mono text-xs px-2"
1056
+ }
1057
+ ) })
1058
+ }
1059
+ ),
1060
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
1061
+ O,
1062
+ {
1063
+ control: t,
1064
+ name: `pathParams.${n}.value`,
1065
+ render: ({ field: o }) => /* @__PURE__ */ e.jsx(
1066
+ ge,
1067
+ {
1068
+ ...o,
1069
+ required: !0,
1070
+ placeholder: "Enter value",
1071
+ className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
1072
+ }
1073
+ )
1074
+ }
1075
+ ) })
1076
+ ] }, s.id)) }) });
1077
+ }, Ea = we(
1078
+ "input",
1079
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
1080
+ ), Aa = ({
1081
+ control: t,
1082
+ queryParams: a
1083
+ }) => {
1084
+ const { fields: s } = pe({
1085
+ control: t,
1086
+ name: "queryParams"
1087
+ }), n = he(), o = a.map((d) => !!d.isRequired);
1088
+ return /* @__PURE__ */ e.jsx(X, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: /* @__PURE__ */ e.jsx(Ce, { children: s.map((d, l) => {
1089
+ const c = a.find(
1090
+ (i) => i.name === n.watch(`queryParams.${l}.name`)
1091
+ );
1092
+ return /* @__PURE__ */ e.jsxs(Te, { children: [
1093
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1094
+ /* @__PURE__ */ e.jsx(
1095
+ O,
1096
+ {
1097
+ control: t,
1098
+ name: `queryParams.${l}.active`,
1099
+ render: ({ field: i }) => /* @__PURE__ */ e.jsx(
1100
+ Ne,
1101
+ {
1102
+ variant: "outline",
1103
+ id: `queryParams.${l}.active`,
1104
+ className: "mr-2",
1105
+ checked: i.value,
1106
+ onCheckedChange: i.onChange
1107
+ }
1108
+ )
1109
+ }
1110
+ ),
1111
+ /* @__PURE__ */ e.jsx(
1112
+ O,
1113
+ {
1114
+ control: t,
1115
+ render: ({ field: i }) => o[l] ? /* @__PURE__ */ e.jsx(Ea, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
1116
+ "label",
1117
+ {
1118
+ className: "flex items-center cursor-pointer gap-1",
1119
+ htmlFor: `queryParams.${l}.active`,
1120
+ title: o[l] ? "Required field" : void 0,
1121
+ children: [
1122
+ i.value,
1123
+ o[l] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
1124
+ ]
1125
+ }
1126
+ ) }) : /* @__PURE__ */ e.jsx(
1127
+ W,
1128
+ {
1129
+ value: i.value,
1130
+ options: a.map((p) => p.name),
1131
+ onChange: (p) => {
1132
+ i.onChange(p);
1133
+ },
1134
+ className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
1135
+ }
1136
+ ),
1137
+ name: `queryParams.${l}.name`
1138
+ }
1139
+ )
1140
+ ] }, d.id),
1141
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
1142
+ O,
1143
+ {
1144
+ control: t,
1145
+ render: ({ field: i }) => (c == null ? void 0 : c.enum) && c.enum.length > 0 ? /* @__PURE__ */ e.jsx(
1146
+ W,
1147
+ {
1148
+ value: i.value,
1149
+ options: c.enum ?? [],
1150
+ onChange: (g) => {
1151
+ i.onChange(g), n.setValue(`queryParams.${l}.active`, !0);
1152
+ },
1153
+ className: "font-mono text-xs border-0 ring-1 ring-ring"
1154
+ }
1155
+ ) : /* @__PURE__ */ e.jsx(
1156
+ ge,
1157
+ {
1158
+ ...i,
1159
+ onChange: (g) => {
1160
+ i.onChange(g.target.value), g.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
1161
+ },
1162
+ placeholder: "Enter value",
1163
+ className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
1164
+ }
1165
+ ),
1166
+ name: `queryParams.${l}.value`
1167
+ }
1168
+ ) })
1169
+ ] }, d.id);
1170
+ }) }) }) });
1171
+ }, P = {
1172
+ green: "text-green-600",
1173
+ blue: "text-sky-600",
1174
+ yellow: "text-yellow-600",
1175
+ red: "text-red-600",
1176
+ purple: "text-purple-600",
1177
+ indigo: "text-indigo-600",
1178
+ gray: "text-gray-600"
1179
+ }, qa = {
1180
+ get: P.green,
1181
+ post: P.blue,
1182
+ put: P.yellow,
1183
+ delete: P.red,
1184
+ patch: P.purple,
1185
+ options: P.indigo,
1186
+ head: P.gray,
1187
+ trace: P.gray
1188
+ }, Da = (t) => qa[t.toLocaleLowerCase()] ?? P.gray, La = ({
1189
+ method: t,
1190
+ url: a,
1191
+ headers: s,
1192
+ body: n
1193
+ }) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
1194
+ /* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
1195
+ /* @__PURE__ */ e.jsx("span", { className: u(Da(t), "font-semibold"), children: t }),
1196
+ " ",
1197
+ /* @__PURE__ */ e.jsx("span", { className: "break-all", children: a }),
1198
+ " ",
1199
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
1200
+ ] }),
1201
+ /* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
1202
+ /* @__PURE__ */ e.jsxs(Le, { defaultOpen: !0, children: [
1203
+ /* @__PURE__ */ e.jsxs(Ve, { className: "flex items-center gap-2 hover:text-primary group", children: [
1204
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1205
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1206
+ ] }),
1207
+ /* @__PURE__ */ e.jsx(Fe, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([o, d]) => /* @__PURE__ */ e.jsxs(I, { children: [
1208
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary", children: o }),
1209
+ /* @__PURE__ */ e.jsx("div", { className: "break-words", children: d })
1210
+ ] }, o)) }) })
1211
+ ] }),
1212
+ /* @__PURE__ */ e.jsxs(Le, { defaultOpen: !0, children: [
1213
+ /* @__PURE__ */ e.jsxs(Ve, { className: "flex items-center gap-2 hover:text-primary group", children: [
1214
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1215
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
1216
+ ] }),
1217
+ /* @__PURE__ */ e.jsx(Fe, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
1218
+ "div",
1219
+ {
1220
+ className: u(
1221
+ "whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
1222
+ !n && "text-muted-foreground"
1223
+ ),
1224
+ children: n ?? "Empty body"
1225
+ }
1226
+ ) }) })
1227
+ ] })
1228
+ ] })
1229
+ ] }), He = ye.Root, Ge = ye.CollapsibleTrigger, Be = ye.CollapsibleContent;
1230
+ function $e(t) {
1231
+ if (t === null) return "null";
1232
+ if (Array.isArray(t)) {
1233
+ if (t.length === 0) return "any[]";
1234
+ const a = t[0];
1235
+ return a === void 0 ? "any[]" : `${$e(a)}[]`;
1236
+ }
1237
+ return typeof t == "object" ? Va(t) : typeof t;
1238
+ }
1239
+ function Va(t, a = "") {
1240
+ const s = ["{"];
1241
+ for (const [n, o] of Object.entries(t)) {
1242
+ const d = $e(o);
1243
+ s.push(` ${n}: ${d};`);
1244
+ }
1245
+ return s.push("}"), s.join(`
1246
+ `);
1247
+ }
1248
+ function Fa(t) {
1249
+ return { lines: [`type GeneratedType = ${$e(t)};`] };
1250
+ }
1251
+ const za = {
1252
+ 200: "OK",
1253
+ 201: "Created",
1254
+ 202: "Accepted",
1255
+ 204: "No Content",
1256
+ 400: "Bad Request",
1257
+ 401: "Unauthorized",
1258
+ 403: "Forbidden",
1259
+ 404: "Not Found",
1260
+ 405: "Method Not Allowed",
1261
+ 500: "Internal Server Error"
1262
+ }, Ha = (t) => {
1263
+ var s;
1264
+ return (s = Object.entries({
1265
+ "application/json": "json",
1266
+ "text/json": "json",
1267
+ "text/html": "html",
1268
+ "text/css": "css",
1269
+ "text/javascript": "javascript",
1270
+ "application/xml": "xml",
1271
+ "application/xhtml+xml": "xhtml"
1272
+ }).find(
1273
+ ([n]) => t.includes(n)
1274
+ )) == null ? void 0 : s[1];
1275
+ }, Ga = (t) => {
1276
+ var s;
1277
+ const a = ((s = t.find(([n, o]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
1278
+ return Ha(a);
1279
+ }, Ba = (t) => {
1280
+ try {
1281
+ return JSON.stringify(JSON.parse(t), null, 2);
1282
+ } catch {
1283
+ return null;
1284
+ }
1285
+ }, Ma = (t) => {
1286
+ const a = [
1287
+ "Content-Type",
1288
+ "Content-Length",
1289
+ "Authorization",
1290
+ "X-RateLimit-Remaining",
1291
+ "X-RateLimit-Limit",
1292
+ "Cache-Control",
1293
+ "ETag"
1294
+ ].map((s) => s.toLowerCase());
1295
+ return [...t].sort(([s], [n]) => {
1296
+ const o = a.indexOf(s.toLowerCase()), d = a.indexOf(n.toLowerCase());
1297
+ return o === d ? 0 : o === -1 ? 1 : d === -1 ? -1 : o - d;
1298
+ });
1299
+ }, Ua = ({
1300
+ body: t = "",
1301
+ headers: a,
1302
+ status: s,
1303
+ time: n,
1304
+ size: o,
1305
+ url: d
1306
+ }) => {
1307
+ var m;
1308
+ const l = Ga(a), c = Ba(t), i = c || t, [p, g] = H(
1309
+ c ? "formatted" : "raw"
1310
+ ), w = Ht({
1311
+ queryKey: ["types", i],
1312
+ queryFn: async () => Fa(JSON.parse(i)),
1313
+ enabled: p === "types"
1314
+ }), j = Ma([...a]);
1315
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
1316
+ /* @__PURE__ */ e.jsxs(He, { defaultOpen: !0, children: [
1317
+ /* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
1318
+ /* @__PURE__ */ e.jsx(z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1319
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
1320
+ ] }),
1321
+ /* @__PURE__ */ e.jsx(Be, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
1322
+ j.slice(0, 5).map(([h, x]) => /* @__PURE__ */ e.jsxs(I, { children: [
1323
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: h }),
1324
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
1325
+ ] }, h)),
1326
+ j.length > 5 && /* @__PURE__ */ e.jsxs(He, { className: "col-span-full grid-cols-subgrid grid", children: [
1327
+ /* @__PURE__ */ e.jsxs(Ge, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
1328
+ /* @__PURE__ */ e.jsx(z, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
1329
+ "Show ",
1330
+ j.length - 5,
1331
+ " more headers"
1332
+ ] }),
1333
+ /* @__PURE__ */ e.jsx(Be, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: j.slice(5).map(([h, x]) => /* @__PURE__ */ e.jsxs(I, { children: [
1334
+ /* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: h }),
1335
+ /* @__PURE__ */ e.jsx("div", { className: "break-all", children: x })
1336
+ ] }, h)) })
1337
+ ] })
1338
+ ] }) })
1339
+ ] }),
1340
+ /* @__PURE__ */ e.jsx(fe, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
1341
+ Jt,
1342
+ {
1343
+ language: p === "types" ? "typescript" : p === "raw" ? c ? "plain" : l : "json",
1344
+ noBackground: !0,
1345
+ className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
1346
+ code: (p === "raw" ? t : p === "types" ? (m = w.data) == null ? void 0 : m.lines.join(`
1347
+ `) : i) ?? ""
1348
+ }
1349
+ ) }),
1350
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
1351
+ /* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
1352
+ /* @__PURE__ */ e.jsxs("div", { children: [
1353
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Status" }),
1354
+ " ",
1355
+ s,
1356
+ " ",
1357
+ za[s] ?? ""
1358
+ ] }),
1359
+ /* @__PURE__ */ e.jsxs("div", { children: [
1360
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
1361
+ " ",
1362
+ n.toFixed(0),
1363
+ "ms"
1364
+ ] }),
1365
+ /* @__PURE__ */ e.jsxs("div", { children: [
1366
+ /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
1367
+ " ",
1368
+ o,
1369
+ "B"
1370
+ ] })
1371
+ ] }),
1372
+ c && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
1373
+ Me,
1374
+ {
1375
+ value: p,
1376
+ onValueChange: (h) => g(h),
1377
+ children: [
1378
+ /* @__PURE__ */ e.jsx(Ue, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(_e, { placeholder: "View" }) }),
1379
+ /* @__PURE__ */ e.jsxs(Je, { children: [
1380
+ /* @__PURE__ */ e.jsx(M, { value: "formatted", children: "Formatted" }),
1381
+ /* @__PURE__ */ e.jsx(M, { value: "raw", children: "Raw" }),
1382
+ /* @__PURE__ */ e.jsx(M, { value: "types", children: "Types" })
1383
+ ] })
1384
+ ]
1385
+ }
1386
+ ) })
1387
+ ] })
1388
+ ] });
1389
+ }, _a = ({
1390
+ queryMutation: t,
1391
+ showPathParamsWarning: a
1392
+ }) => {
1393
+ var n;
1394
+ const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
1395
+ return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1396
+ a && /* @__PURE__ */ e.jsx(Kt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1397
+ /* @__PURE__ */ e.jsxs(fe, { children: [
1398
+ /* @__PURE__ */ e.jsx(Bt, { children: /* @__PURE__ */ e.jsx(Mt, { children: "Request failed" }) }),
1399
+ /* @__PURE__ */ e.jsxs(Ut, { children: [
1400
+ "Error:",
1401
+ " ",
1402
+ t.error.message || String(t.error) || "Unexpected error"
1403
+ ] })
1404
+ ] })
1405
+ ] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(We, { defaultValue: "response", children: [
1406
+ /* @__PURE__ */ e.jsxs(Ze, { children: [
1407
+ /* @__PURE__ */ e.jsx(E, { value: "request", children: "Request" }),
1408
+ /* @__PURE__ */ e.jsxs(E, { value: "response", children: [
1409
+ "Response",
1410
+ /* @__PURE__ */ e.jsxs(
1411
+ "span",
1412
+ {
1413
+ className: u(
1414
+ "text-xs font-mono ml-1",
1415
+ s === "2" && "text-green-500",
1416
+ s === "3" && "text-blue-500",
1417
+ s === "4" && "text-yellow-500",
1418
+ s === "5" && "text-red-500"
1419
+ ),
1420
+ children: [
1421
+ "(",
1422
+ t.data.status,
1423
+ ")"
1424
+ ]
1425
+ }
1426
+ )
1427
+ ] })
1428
+ ] }),
1429
+ /* @__PURE__ */ e.jsx(A, { value: "request", children: /* @__PURE__ */ e.jsx(La, { ...t.data.request }) }),
1430
+ /* @__PURE__ */ e.jsx(A, { value: "response", children: /* @__PURE__ */ e.jsx(
1431
+ Ua,
1432
+ {
1433
+ status: t.data.status,
1434
+ time: t.data.time,
1435
+ size: t.data.size,
1436
+ headers: t.data.headers,
1437
+ body: t.data.body,
1438
+ url: t.data.request.url
1439
+ }
1440
+ ) })
1441
+ ] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Qt, {}) : "Send a request first to see the response here" }) }) });
1442
+ }, Ja = ({
1443
+ identities: t,
1444
+ formRef: a,
1445
+ disabled: s
1446
+ }) => {
1447
+ const { setValue: n } = he(), [o, d] = H();
1448
+ return t.length === 0 ? /* @__PURE__ */ e.jsx(U, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
1449
+ /* @__PURE__ */ e.jsx(
1450
+ U,
1451
+ {
1452
+ className: "rounded-r-none inset-shadow-sm",
1453
+ disabled: s,
1454
+ onClick: () => {
1455
+ var l;
1456
+ return (l = a == null ? void 0 : a.current) == null ? void 0 : l.requestSubmit();
1457
+ },
1458
+ children: "Send"
1459
+ }
1460
+ ),
1461
+ /* @__PURE__ */ e.jsxs(et, { children: [
1462
+ /* @__PURE__ */ e.jsx(tt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1463
+ U,
1464
+ {
1465
+ disabled: s,
1466
+ className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
1467
+ size: "icon",
1468
+ children: /* @__PURE__ */ e.jsx(Nt, { className: "w-4 h-4" })
1469
+ }
1470
+ ) }),
1471
+ /* @__PURE__ */ e.jsx(ve, { value: o, children: /* @__PURE__ */ e.jsx(je, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: F, label: "None" }, ...t].map(
1472
+ (l) => /* @__PURE__ */ e.jsxs(
1473
+ be,
1474
+ {
1475
+ onClick: () => {
1476
+ var c;
1477
+ d(l.id), n("identity", l.id), (c = a == null ? void 0 : a.current) == null || c.requestSubmit();
1478
+ },
1479
+ onMouseEnter: () => d(l.id),
1480
+ onMouseLeave: () => d(void 0),
1481
+ children: [
1482
+ /* @__PURE__ */ e.jsx(Q, { value: l.id, className: "mr-2" }),
1483
+ l.label
1484
+ ]
1485
+ },
1486
+ l.id
1487
+ )
1488
+ ) }) })
1489
+ ] })
1490
+ ] });
1491
+ }, F = "__none", Qa = ({
1492
+ server: t,
1493
+ servers: a = [],
1494
+ url: s,
1495
+ method: n,
1496
+ headers: o = [],
1497
+ queryParams: d = [],
1498
+ pathParams: l = [],
1499
+ defaultBody: c = "",
1500
+ examples: i
1501
+ }) => {
1502
+ var Ie, Oe, Ee;
1503
+ const { selectedServer: p, setSelectedServer: g } = zt(
1504
+ a.map((r) => ({ url: r }))
1505
+ ), [, w] = It(), { register: j, control: m, handleSubmit: h, watch: x, setValue: y, ...v } = Vt({
1506
+ defaultValues: {
1507
+ body: c,
1508
+ queryParams: d.map((r) => ({
1509
+ name: r.name,
1510
+ value: r.defaultValue ?? "",
1511
+ active: r.defaultActive ?? !1,
1512
+ enum: r.enum ?? []
1513
+ })).concat([
1514
+ {
1515
+ name: "",
1516
+ value: "",
1517
+ active: !1,
1518
+ enum: []
1519
+ }
1520
+ ]),
1521
+ pathParams: l.map((r) => ({
1522
+ name: r.name,
1523
+ value: r.defaultValue ?? ""
1524
+ })),
1525
+ headers: o.map((r) => ({
1526
+ name: r.name,
1527
+ value: r.defaultValue ?? "",
1528
+ active: r.defaultActive ?? !1
1529
+ })).concat([
1530
+ {
1531
+ name: "",
1532
+ value: "",
1533
+ active: !1
1534
+ }
1535
+ ]),
1536
+ identity: F
1537
+ }
1538
+ }), N = x(), C = Gt(), Se = q(!1);
1539
+ ue(() => {
1540
+ var k;
1541
+ if (Se.current) return;
1542
+ const r = (k = C.data) == null ? void 0 : k.at(0);
1543
+ r && (y("identity", r.id), Se.current = !0);
1544
+ }, [y, C.data]);
1545
+ const Pe = q(null), ke = Lt({
1546
+ mutationFn: async (r) => {
1547
+ var B, L;
1548
+ const k = performance.now(), S = new Request(
1549
+ ma(p ?? t, s, r),
1550
+ {
1551
+ method: n.toUpperCase(),
1552
+ headers: Object.fromEntries(
1553
+ r.headers.filter((T) => T.name && T.active).map((T) => [T.name, T.value])
1554
+ ),
1555
+ body: r.body ? r.body : void 0
1556
+ }
1557
+ );
1558
+ r.identity !== F && ((L = (B = C.data) == null ? void 0 : B.find((T) => T.id === r.identity)) == null || L.authorizeRequest(S));
1559
+ try {
1560
+ const T = await fetch(S, {
1561
+ signal: AbortSignal.timeout(5e3)
1562
+ }), mt = performance.now() - k, Ae = await T.text(), ut = new URL(S.url);
1563
+ return {
1564
+ status: T.status,
1565
+ headers: Array.from(T.headers.entries()),
1566
+ size: Ae.length,
1567
+ body: Ae,
1568
+ time: mt,
1569
+ request: {
1570
+ method: S.method.toUpperCase(),
1571
+ url: S.url,
1572
+ headers: [
1573
+ ["Host", ut.host],
1574
+ ["User-Agent", "Zudoku Playground"],
1575
+ ...Array.from(S.headers.entries())
1576
+ ],
1577
+ body: r.body ? r.body : void 0
1578
+ }
1579
+ };
1580
+ } catch (T) {
1581
+ throw T instanceof TypeError ? new Error(
1582
+ "The request failed, possibly due to network issues or CORS policy."
1583
+ ) : T;
1584
+ }
1585
+ }
1586
+ }), dt = /* @__PURE__ */ e.jsx(
1587
+ ia,
1588
+ {
1589
+ path: s,
1590
+ renderParam: ({ name: r, originalValue: k, index: S }) => {
1591
+ var L;
1592
+ const B = (L = N.pathParams.find(
1593
+ (T) => T.name === r
1594
+ )) == null ? void 0 : L.value;
1595
+ return /* @__PURE__ */ e.jsx(
1596
+ Ye,
1597
+ {
1598
+ name: r,
1599
+ backgroundOpacity: "0",
1600
+ slug: r,
1601
+ onClick: () => v.setFocus(`pathParams.${S}.value`),
1602
+ children: B || k
1603
+ }
1604
+ );
1605
+ }
1606
+ }
1607
+ ), Re = N.queryParams.filter((r) => r.active).map((r, k, S) => /* @__PURE__ */ e.jsxs(I, { children: [
1608
+ r.name,
1609
+ "=",
1610
+ encodeURIComponent(r.value).replaceAll("%20", "+"),
1611
+ k < S.length - 1 && "&",
1612
+ /* @__PURE__ */ e.jsx("wbr", {})
1613
+ ] }, r.name)), ct = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: a && a.length > 1 ? /* @__PURE__ */ e.jsxs(
1614
+ Me,
1615
+ {
1616
+ onValueChange: (r) => {
1617
+ w(() => g(r));
1618
+ },
1619
+ value: p,
1620
+ defaultValue: p,
1621
+ children: [
1622
+ /* @__PURE__ */ e.jsx(Ue, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(_e, {}) }),
1623
+ /* @__PURE__ */ e.jsx(Je, { children: a.map((r) => /* @__PURE__ */ e.jsx(M, { value: r, children: r.replace(/^https?:\/\//, "") }, r)) })
1624
+ ]
1625
+ }
1626
+ ) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
1627
+ return /* @__PURE__ */ e.jsx(
1628
+ Ft,
1629
+ {
1630
+ register: j,
1631
+ control: m,
1632
+ handleSubmit: h,
1633
+ watch: x,
1634
+ setValue: y,
1635
+ ...v,
1636
+ children: /* @__PURE__ */ e.jsx(
1637
+ "form",
1638
+ {
1639
+ onSubmit: h((r) => ke.mutateAsync(r)),
1640
+ ref: Pe,
1641
+ children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
1642
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
1643
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
1644
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
1645
+ /* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
1646
+ /* @__PURE__ */ e.jsxs("div", { className: "items-center p-2 font-mono text-xs break-words", children: [
1647
+ ct,
1648
+ dt,
1649
+ Re.length > 0 ? "?" : "",
1650
+ Re
1651
+ ] })
1652
+ ] }),
1653
+ /* @__PURE__ */ e.jsx(
1654
+ Ja,
1655
+ {
1656
+ identities: C.data ?? [],
1657
+ formRef: Pe,
1658
+ disabled: v.formState.isSubmitting
1659
+ }
1660
+ )
1661
+ ] }),
1662
+ /* @__PURE__ */ e.jsxs(We, { defaultValue: "parameters", children: [
1663
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(Ze, { children: [
1664
+ /* @__PURE__ */ e.jsxs(E, { value: "parameters", children: [
1665
+ "Parameters",
1666
+ (N.pathParams.some((r) => r.value !== "") || N.queryParams.some((r) => r.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1667
+ ] }),
1668
+ /* @__PURE__ */ e.jsxs(E, { value: "headers", children: [
1669
+ "Headers",
1670
+ N.headers.filter((r) => r.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1671
+ ] }),
1672
+ /* @__PURE__ */ e.jsxs(E, { value: "auth", children: [
1673
+ "Auth",
1674
+ N.identity !== F && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
1675
+ ] }),
1676
+ /* @__PURE__ */ e.jsx(E, { value: "body", children: "Body" })
1677
+ ] }) }),
1678
+ /* @__PURE__ */ e.jsx(A, { value: "headers", children: /* @__PURE__ */ e.jsx(Ia, { control: m, headers: o }) }),
1679
+ /* @__PURE__ */ e.jsxs(A, { value: "parameters", children: [
1680
+ l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1681
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1682
+ /* @__PURE__ */ e.jsx(Oa, { control: m })
1683
+ ] }),
1684
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1685
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1686
+ /* @__PURE__ */ e.jsx(Aa, { control: m, queryParams: d })
1687
+ ] })
1688
+ ] }),
1689
+ /* @__PURE__ */ e.jsxs(A, { value: "body", children: [
1690
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1691
+ n.toUpperCase()
1692
+ ) && /* @__PURE__ */ e.jsxs(de, { className: "mb-2", children: [
1693
+ /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
1694
+ /* @__PURE__ */ e.jsx(ce, { children: "Body" }),
1695
+ /* @__PURE__ */ e.jsx(me, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
1696
+ ] }),
1697
+ /* @__PURE__ */ e.jsx(
1698
+ Xe,
1699
+ {
1700
+ ...j("body"),
1701
+ className: u(
1702
+ "border w-full rounded-lg p-2 bg-muted h-40 font-mono",
1703
+ !["POST", "PUT", "PATCH", "DELETE"].includes(
1704
+ n.toUpperCase()
1705
+ ) && "h-20"
1706
+ ),
1707
+ placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
1708
+ n.toUpperCase()
1709
+ ) ? void 0 : "This request does not support a body",
1710
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
1711
+ n.toUpperCase()
1712
+ )
1713
+ }
1714
+ ),
1715
+ i && /* @__PURE__ */ e.jsx(
1716
+ ga,
1717
+ {
1718
+ examples: i,
1719
+ onSelect: (r) => y("body", JSON.stringify(r.value, null, 2))
1720
+ }
1721
+ )
1722
+ ] }),
1723
+ /* @__PURE__ */ e.jsx(A, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1724
+ ((Ie = C.data) == null ? void 0 : Ie.length) === 0 && /* @__PURE__ */ e.jsxs(de, { children: [
1725
+ /* @__PURE__ */ e.jsx(De, { className: "w-4 h-4" }),
1726
+ /* @__PURE__ */ e.jsx(ce, { children: "Authentication" }),
1727
+ /* @__PURE__ */ e.jsx(me, { children: "No identities found. Please create an identity first." })
1728
+ ] }),
1729
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(fe, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
1730
+ ve,
1731
+ {
1732
+ onValueChange: (r) => y("identity", r),
1733
+ value: N.identity,
1734
+ defaultValue: N.identity,
1735
+ className: "gap-0",
1736
+ disabled: ((Oe = C.data) == null ? void 0 : Oe.length) === 0,
1737
+ children: [
1738
+ /* @__PURE__ */ e.jsxs(
1739
+ V,
1740
+ {
1741
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1742
+ htmlFor: "none",
1743
+ children: [
1744
+ /* @__PURE__ */ e.jsx(Q, { value: F, id: "none", children: "None" }),
1745
+ /* @__PURE__ */ e.jsx(V, { htmlFor: "none", className: "ml-2", children: "None" })
1746
+ ]
1747
+ }
1748
+ ),
1749
+ (Ee = C.data) == null ? void 0 : Ee.map((r) => /* @__PURE__ */ e.jsxs(
1750
+ V,
1751
+ {
1752
+ className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
1753
+ children: [
1754
+ /* @__PURE__ */ e.jsx(
1755
+ Q,
1756
+ {
1757
+ value: r.id,
1758
+ id: r.id,
1759
+ children: r.label
1760
+ }
1761
+ ),
1762
+ /* @__PURE__ */ e.jsx(V, { htmlFor: r.id, className: "ml-2", children: r.label })
1763
+ ]
1764
+ },
1765
+ r.id
1766
+ ))
1767
+ ]
1768
+ }
1769
+ ) }) })
1770
+ ] }) })
1771
+ ] })
1772
+ ] }),
1773
+ /* @__PURE__ */ e.jsx(
1774
+ _a,
1775
+ {
1776
+ queryMutation: ke,
1777
+ showPathParamsWarning: N.pathParams.some(
1778
+ (r) => r.value === ""
1779
+ )
1780
+ }
1781
+ )
1782
+ ] })
1783
+ }
1784
+ )
1785
+ }
1786
+ );
1787
+ }, Wa = ({
1788
+ className: t,
1789
+ size: a = 16
1790
+ }) => /* @__PURE__ */ e.jsx(
1791
+ "svg",
1792
+ {
1793
+ xmlns: "http://www.w3.org/2000/svg",
1794
+ viewBox: "0 0 24 24",
1795
+ fill: "currentColor",
1796
+ className: t,
1797
+ width: a,
1798
+ height: a,
1799
+ children: /* @__PURE__ */ e.jsx(
1800
+ "path",
1801
+ {
1802
+ fillRule: "evenodd",
1803
+ 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",
1804
+ clipRule: "evenodd"
1805
+ }
1806
+ )
1807
+ }
1808
+ ), Za = (t) => {
1809
+ const [a, s] = H(!1);
1810
+ return /* @__PURE__ */ e.jsxs(Et, { onOpenChange: (n) => s(n), children: [
1811
+ /* @__PURE__ */ e.jsx(At, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
1812
+ "button",
1813
+ {
1814
+ type: "button",
1815
+ className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
1816
+ children: [
1817
+ "Test",
1818
+ /* @__PURE__ */ e.jsx(Wa, { size: 14 })
1819
+ ]
1820
+ }
1821
+ ) }),
1822
+ /* @__PURE__ */ e.jsxs(
1823
+ qt,
1824
+ {
1825
+ className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
1826
+ "aria-describedby": void 0,
1827
+ children: [
1828
+ /* @__PURE__ */ e.jsx(kt, { children: /* @__PURE__ */ e.jsx(Dt, { children: "Playground" }) }),
1829
+ a && /* @__PURE__ */ e.jsx(Qa, { ...t })
1830
+ ]
1831
+ }
1832
+ )
1833
+ ] });
1834
+ }, Ka = Ke(`
1835
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1836
+ schema(input: $input, type: $type) {
1837
+ url
1838
+ tags {
1839
+ name
1840
+ }
1841
+ }
1842
+ }
1843
+ `), Xa = Ke(`
1844
+ query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
1845
+ schema(input: $input, type: $type) {
1846
+ operations(tag: $tag) {
1847
+ slug
1848
+ deprecated
1849
+ method
1850
+ summary
1851
+ operationId
1852
+ path
1853
+ tags {
1854
+ name
1855
+ }
1856
+ }
1857
+ untagged: operations(untagged: true) {
1858
+ slug
1859
+ deprecated
1860
+ method
1861
+ summary
1862
+ operationId
1863
+ path
1864
+ }
1865
+ }
1866
+ }
1867
+ `), Ya = {
1868
+ get: "green",
1869
+ post: "blue",
1870
+ put: "yellow",
1871
+ delete: "red",
1872
+ patch: "purple",
1873
+ options: "gray",
1874
+ head: "gray"
1875
+ }, le = "~endpoints", Ss = (t) => {
1876
+ const a = R(t.navigationId ?? "/reference"), s = t.type === "file" ? Object.keys(t.input) : [], n = new Yt(t);
1877
+ return {
1878
+ getHead: () => {
1879
+ if (t.type === "url" && !t.skipPreload)
1880
+ return /* @__PURE__ */ e.jsx(
1881
+ "link",
1882
+ {
1883
+ rel: "preload",
1884
+ href: t.input,
1885
+ as: "fetch",
1886
+ crossOrigin: "anonymous"
1887
+ }
1888
+ );
1889
+ if (t.server)
1890
+ return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: t.server });
1891
+ },
1892
+ getMdxComponents: () => ({
1893
+ OpenPlaygroundButton: ({
1894
+ requireAuth: o,
1895
+ server: d,
1896
+ method: l,
1897
+ url: c,
1898
+ ...i
1899
+ }) => {
1900
+ const p = St();
1901
+ if (!d)
1902
+ throw new Error("Server is required");
1903
+ return o && !p.isAuthenticated ? /* @__PURE__ */ e.jsxs(
1904
+ _,
1905
+ {
1906
+ className: "gap-2 items-center",
1907
+ variant: "outline",
1908
+ onClick: p.login,
1909
+ children: [
1910
+ "Login to open in Playground ",
1911
+ /* @__PURE__ */ e.jsx(wt, { size: 16 })
1912
+ ]
1913
+ }
1914
+ ) : /* @__PURE__ */ e.jsx(
1915
+ Za,
1916
+ {
1917
+ url: c ?? "/",
1918
+ method: l ?? "get",
1919
+ server: d,
1920
+ ...i,
1921
+ children: /* @__PURE__ */ e.jsxs(_, { className: "gap-2 items-center", variant: "outline", children: [
1922
+ "Open in Playground ",
1923
+ /* @__PURE__ */ e.jsx(Ct, { size: 16 })
1924
+ ] })
1925
+ }
1926
+ );
1927
+ }
1928
+ }),
1929
+ getSidebar: async (o) => {
1930
+ var d;
1931
+ if (!Tt({ path: a, end: !1 }, o))
1932
+ return [];
1933
+ try {
1934
+ const l = s.find(
1935
+ (m) => o.startsWith(R(a, m))
1936
+ ), c = l ?? Object.keys(t.input).at(0), i = await n.fetch(Ka, {
1937
+ type: t.type,
1938
+ input: t.type === "file" ? t.input[c] : t.input
1939
+ }), p = (d = t.tagPages) == null ? void 0 : d.find(
1940
+ (m) => o.split("/").at(-1) === ae(m)
1941
+ ), g = await n.fetch(Xa, {
1942
+ type: t.type,
1943
+ input: t.type === "file" ? t.input[c] : t.input,
1944
+ tag: t.loadTags ? void 0 : p
1945
+ }), w = i.schema.tags.flatMap((m) => {
1946
+ const h = R(a, l, ae(m.name)), x = g.schema.operations.filter(
1947
+ (y) => {
1948
+ var v, N;
1949
+ return ((v = y.tags) == null ? void 0 : v.length) !== 0 && ((N = y.tags) == null ? void 0 : N.map((C) => C.name).includes(m.name));
1950
+ }
1951
+ ).map((y) => ({
1952
+ type: "link",
1953
+ label: y.summary ?? y.path,
1954
+ href: `${h}#${y.slug}`,
1955
+ badge: {
1956
+ label: y.method,
1957
+ color: Ya[y.method.toLowerCase()],
1958
+ invert: !0
1959
+ }
1960
+ }));
1961
+ return t.loadTags && x.length === 0 ? [] : {
1962
+ type: "category",
1963
+ label: m.name,
1964
+ link: {
1965
+ type: "doc",
1966
+ id: h,
1967
+ label: m.name
1968
+ },
1969
+ collapsible: t.loadTags,
1970
+ collapsed: !t.loadTags,
1971
+ items: x
1972
+ };
1973
+ }), { untagged: j } = g.schema;
1974
+ if (j.length > 0) {
1975
+ const m = R(a, l, le);
1976
+ w.push({
1977
+ type: "category",
1978
+ label: "Other endpoints",
1979
+ link: {
1980
+ type: "doc",
1981
+ id: m,
1982
+ label: "Other endpoints"
1983
+ },
1984
+ collapsible: t.loadTags,
1985
+ collapsed: !t.loadTags,
1986
+ items: j.map((h) => ({
1987
+ type: "link",
1988
+ label: h.summary ?? h.path,
1989
+ href: `${m}#${h.slug}`
1990
+ }))
1991
+ });
1992
+ }
1993
+ return w;
1994
+ } catch {
1995
+ return [];
1996
+ }
1997
+ },
1998
+ getRoutes: () => {
1999
+ const o = s.length > 1 ? [null, ...s] : [null], d = (t.tagPages ?? []).map((l) => ({
2000
+ tag: l,
2001
+ path: ae(l)
2002
+ }));
2003
+ return o.map((l) => {
2004
+ const c = R(a, l);
2005
+ return {
2006
+ path: c,
2007
+ async lazy() {
2008
+ const { OpenApiRoute: i } = await import("./OpenApiRoute-ULLXjfro.js");
2009
+ return {
2010
+ element: /* @__PURE__ */ e.jsx(
2011
+ i,
2012
+ {
2013
+ version: l ?? void 0,
2014
+ basePath: a,
2015
+ versions: s,
2016
+ client: n,
2017
+ config: t
2018
+ }
2019
+ )
2020
+ };
2021
+ },
2022
+ children: [
2023
+ {
2024
+ index: !0,
2025
+ loader: () => {
2026
+ var i;
2027
+ return $t(
2028
+ R(c, ((i = d.at(0)) == null ? void 0 : i.path) ?? le)
2029
+ );
2030
+ }
2031
+ },
2032
+ {
2033
+ path: R(c, le),
2034
+ async lazy() {
2035
+ const { OperationList: i } = await import("./OperationList-CnYOgwBj.js");
2036
+ return { element: /* @__PURE__ */ e.jsx(i, { untagged: !0 }) };
2037
+ }
2038
+ },
2039
+ ...d.map((i) => ({
2040
+ path: R(c, i.path),
2041
+ async lazy() {
2042
+ const { OperationList: p } = await import("./OperationList-CnYOgwBj.js");
2043
+ return {
2044
+ element: /* @__PURE__ */ e.jsx(p, { tag: i.tag })
2045
+ };
2046
+ }
2047
+ }))
2048
+ ]
2049
+ };
2050
+ });
2051
+ }
2052
+ };
2053
+ };
2054
+ export {
2055
+ Ye as C,
2056
+ Za as P,
2057
+ He as a,
2058
+ Be as b,
2059
+ Ge as c,
2060
+ ia as d,
2061
+ Ke as g,
2062
+ Da as m,
2063
+ Ss as o
2064
+ };
2065
+ //# sourceMappingURL=index-CnKeVT2S.js.map