zudoku 0.25.2 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/dist/app/demo.js +0 -1
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/standalone.js +0 -1
  4. package/dist/app/standalone.js.map +1 -1
  5. package/dist/cli/dev/handler.js +2 -2
  6. package/dist/cli/dev/handler.js.map +1 -1
  7. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  8. package/dist/config/validators/common.d.ts +28 -28
  9. package/dist/config/validators/icon-types.d.ts +1 -1
  10. package/dist/config/validators/validate.d.ts +16 -16
  11. package/dist/lib/components/navigation/SidebarCategory.js +1 -1
  12. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  13. package/dist/lib/oas/graphql/index.d.ts +3 -0
  14. package/dist/lib/oas/graphql/index.js +12 -13
  15. package/dist/lib/oas/graphql/index.js.map +1 -1
  16. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  17. package/dist/lib/plugins/openapi/ColorizedParam.js +16 -7
  18. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  19. package/dist/lib/plugins/openapi/OperationList.js +3 -0
  20. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  21. package/dist/lib/plugins/openapi/ParameterListItem.js +3 -2
  22. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  23. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -0
  24. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  25. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -2
  26. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -6
  27. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  28. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +2 -6
  29. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  30. package/dist/lib/plugins/openapi/Sidecar.js +9 -6
  31. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  32. package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
  33. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  34. package/dist/lib/plugins/openapi/{ExampleDisplay.d.ts → SidecarExamples.d.ts} +3 -6
  35. package/dist/lib/plugins/openapi/SidecarExamples.js +65 -0
  36. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  37. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  38. package/dist/lib/plugins/openapi/client/GraphQLClient.js +22 -93
  39. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  40. package/dist/lib/plugins/openapi/client/createServer.d.ts +2 -1
  41. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  42. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  43. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +1 -1
  44. package/dist/lib/plugins/openapi/client/useCreateQuery.js +2 -13
  45. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  46. package/dist/lib/plugins/openapi/index.d.ts +2 -1
  47. package/dist/lib/plugins/openapi/index.js.map +1 -1
  48. package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +8 -0
  49. package/dist/lib/plugins/openapi/playground/EnumSelector.js +21 -0
  50. package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +1 -0
  51. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -4
  52. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  53. package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -0
  54. package/dist/lib/plugins/openapi/playground/Playground.js +5 -2
  55. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  56. package/dist/lib/plugins/openapi/playground/QueryParams.js +23 -8
  57. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  58. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +2 -1
  59. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
  60. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +19 -11
  61. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  62. package/dist/lib/ui/Badge.d.ts +1 -1
  63. package/dist/lib/ui/Badge.js +2 -1
  64. package/dist/lib/ui/Badge.js.map +1 -1
  65. package/dist/lib/ui/Button.d.ts +1 -1
  66. package/dist/lib/ui/Checkbox.d.ts +8 -2
  67. package/dist/lib/ui/Checkbox.js +13 -1
  68. package/dist/lib/ui/Checkbox.js.map +1 -1
  69. package/dist/lib/util/traverse.d.ts +8 -1
  70. package/dist/lib/util/traverse.js +7 -3
  71. package/dist/lib/util/traverse.js.map +1 -1
  72. package/dist/vite/api/schema-codegen.d.ts +12 -0
  73. package/dist/vite/api/schema-codegen.js +62 -0
  74. package/dist/vite/api/schema-codegen.js.map +1 -0
  75. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  76. package/dist/vite/api/schema-codegen.test.js +247 -0
  77. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  78. package/dist/vite/config.js +0 -7
  79. package/dist/vite/config.js.map +1 -1
  80. package/dist/vite/config.test.js +5 -1
  81. package/dist/vite/config.test.js.map +1 -1
  82. package/dist/vite/plugin-api.js +110 -82
  83. package/dist/vite/plugin-api.js.map +1 -1
  84. package/dist/vite/plugin-component.js +0 -1
  85. package/dist/vite/plugin-component.js.map +1 -1
  86. package/lib/{AnchorLink-DFZZbmvr.js → AnchorLink-_Vu02ceN.js} +3 -3
  87. package/lib/{AnchorLink-DFZZbmvr.js.map → AnchorLink-_Vu02ceN.js.map} +1 -1
  88. package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DNXBcsVN.js} +4 -4
  89. package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DNXBcsVN.js.map} +1 -1
  90. package/lib/{Button-DeAoTouo.js → Button-oroWHXAy.js} +3 -3
  91. package/lib/{Button-DeAoTouo.js.map → Button-oroWHXAy.js.map} +1 -1
  92. package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
  93. package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
  94. package/lib/Command-D5DE0DD7.js +611 -0
  95. package/lib/Command-D5DE0DD7.js.map +1 -0
  96. package/lib/{Markdown-CZDLNOFc.js → Markdown-BrfrjEk_.js} +1041 -1041
  97. package/lib/{Markdown-CZDLNOFc.js.map → Markdown-BrfrjEk_.js.map} +1 -1
  98. package/lib/{MdxPage-DKMbBROv.js → MdxPage-LNZLj_A5.js} +24 -24
  99. package/lib/{MdxPage-DKMbBROv.js.map → MdxPage-LNZLj_A5.js.map} +1 -1
  100. package/lib/{OperationList-BLdHAQ39.js → OperationList-PCwzTp1r.js} +1899 -1877
  101. package/lib/OperationList-PCwzTp1r.js.map +1 -0
  102. package/lib/{Route-DYwKZ_c_.js → Route-Pzk6qwIk.js} +5 -5
  103. package/lib/{Route-DYwKZ_c_.js.map → Route-Pzk6qwIk.js.map} +1 -1
  104. package/lib/{Select-B_IxRUUC.js → Select-DkOpAG0c.js} +36 -36
  105. package/lib/{Select-B_IxRUUC.js.map → Select-DkOpAG0c.js.map} +1 -1
  106. package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-DPbx9KdU.js} +53 -53
  107. package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-DPbx9KdU.js.map} +1 -1
  108. package/lib/{Spinner-DuxJLLNE.js → Spinner-C5gHXrVz.js} +2 -2
  109. package/lib/{Spinner-DuxJLLNE.js.map → Spinner-C5gHXrVz.js.map} +1 -1
  110. package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-CJCSPG1F.js} +297 -301
  111. package/lib/{SyntaxHighlight-Bz-lOJtH.js.map → SyntaxHighlight-CJCSPG1F.js.map} +1 -1
  112. package/lib/{ZudokuContext-hmLMUdf2.js → ZudokuContext-D3ayHjP-.js} +357 -356
  113. package/lib/ZudokuContext-D3ayHjP-.js.map +1 -0
  114. package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-KWlHsT7t.js} +407 -410
  115. package/lib/chunk-SYFQ2XB5-KWlHsT7t.js.map +1 -0
  116. package/lib/context-rwLGh-6_.js +22 -0
  117. package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
  118. package/lib/{createServer-Bf5_6o6G.js → createServer-BcaswoFO.js} +4363 -5302
  119. package/lib/createServer-BcaswoFO.js.map +1 -0
  120. package/lib/{hook-CHq7pFyz.js → hook-DUyACbIK.js} +17 -17
  121. package/lib/{hook-CHq7pFyz.js.map → hook-DUyACbIK.js.map} +1 -1
  122. package/lib/index-CaILD1AV.js +1292 -0
  123. package/lib/index-CaILD1AV.js.map +1 -0
  124. package/lib/index-Djenk2Hj.js +36 -0
  125. package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
  126. package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
  127. package/lib/index-Dl3Yl0yb.js.map +1 -0
  128. package/lib/index-TaRXY2w1.js +43 -0
  129. package/lib/index-TaRXY2w1.js.map +1 -0
  130. package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
  131. package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
  132. package/lib/index.esm-CrSoEshU.js +1207 -0
  133. package/lib/index.esm-CrSoEshU.js.map +1 -0
  134. package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
  135. package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
  136. package/lib/post-processors/removeExtensions.js +3 -3
  137. package/lib/post-processors/traverse.js +11 -8
  138. package/lib/post-processors/traverse.js.map +1 -1
  139. package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
  140. package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
  141. package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
  142. package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
  143. package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
  144. package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
  145. package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
  146. package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
  147. package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
  148. package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
  149. package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
  150. package/lib/state-mM7uaXTW.js +202 -0
  151. package/lib/state-mM7uaXTW.js.map +1 -0
  152. package/lib/ui/Accordion.js +1 -1
  153. package/lib/ui/ActionButton.js +3 -3
  154. package/lib/ui/Alert.js +2 -2
  155. package/lib/ui/AlertDialog.js +1 -1
  156. package/lib/ui/Badge.js +4 -3
  157. package/lib/ui/Badge.js.map +1 -1
  158. package/lib/ui/Breadcrumb.js +1 -1
  159. package/lib/ui/Button.js +2 -2
  160. package/lib/ui/Callout.js +1 -1
  161. package/lib/ui/Card.js +1 -1
  162. package/lib/ui/Carousel.js +3 -3
  163. package/lib/ui/Carousel.js.map +1 -1
  164. package/lib/ui/Checkbox.js +26 -15
  165. package/lib/ui/Checkbox.js.map +1 -1
  166. package/lib/ui/Command.js +14 -550
  167. package/lib/ui/Command.js.map +1 -1
  168. package/lib/ui/Dialog.js +1 -1
  169. package/lib/ui/Drawer.js +520 -519
  170. package/lib/ui/Drawer.js.map +1 -1
  171. package/lib/ui/DropdownMenu.js +1 -1
  172. package/lib/ui/Form.js +2 -2
  173. package/lib/ui/HoverCard.js +1 -1
  174. package/lib/ui/Input.js +1 -1
  175. package/lib/ui/Label.js +2 -2
  176. package/lib/ui/Pagination.js +7 -7
  177. package/lib/ui/Popover.js +1 -1
  178. package/lib/ui/Progress.js +1 -1
  179. package/lib/ui/RadioGroup.js +1 -1
  180. package/lib/ui/ScrollArea.js +1 -1
  181. package/lib/ui/Select.js +1 -1
  182. package/lib/ui/Skeleton.js +1 -1
  183. package/lib/ui/Slider.js +1 -1
  184. package/lib/ui/Switch.js +1 -1
  185. package/lib/ui/Tabs.js +1 -1
  186. package/lib/ui/Textarea.js +1 -1
  187. package/lib/ui/Toggle.js +2 -2
  188. package/lib/ui/ToggleGroup.js +1 -1
  189. package/lib/ui/Tooltip.js +1 -1
  190. package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-BBHR7aLM.js} +2 -2
  191. package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-BBHR7aLM.js.map} +1 -1
  192. package/lib/zudoku.auth-auth0.js +1 -1
  193. package/lib/zudoku.auth-clerk.js +18 -18
  194. package/lib/zudoku.auth-openid.js +5 -5
  195. package/lib/zudoku.components.js +492 -477
  196. package/lib/zudoku.components.js.map +1 -1
  197. package/lib/zudoku.plugin-api-catalog.js +5 -5
  198. package/lib/zudoku.plugin-api-keys.js +7 -7
  199. package/lib/zudoku.plugin-custom-pages.js +3 -3
  200. package/lib/zudoku.plugin-markdown.js +2 -2
  201. package/lib/zudoku.plugin-openapi.js +5 -5
  202. package/lib/zudoku.plugin-redirect.js +1 -1
  203. package/lib/zudoku.plugin-search-inkeep.js +9 -9
  204. package/package.json +48 -53
  205. package/src/app/demo.tsx +0 -1
  206. package/src/app/standalone.tsx +0 -1
  207. package/src/lib/components/navigation/SidebarCategory.tsx +2 -2
  208. package/src/lib/oas/graphql/index.ts +19 -15
  209. package/src/lib/plugins/openapi/ColorizedParam.tsx +29 -12
  210. package/src/lib/plugins/openapi/OperationList.tsx +4 -0
  211. package/src/lib/plugins/openapi/ParameterListItem.tsx +5 -7
  212. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +2 -0
  213. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +9 -8
  214. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -8
  215. package/src/lib/plugins/openapi/Sidecar.tsx +14 -7
  216. package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
  217. package/src/lib/plugins/openapi/SidecarExamples.tsx +163 -0
  218. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +28 -120
  219. package/src/lib/plugins/openapi/client/createServer.ts +6 -2
  220. package/src/lib/plugins/openapi/client/useCreateQuery.ts +2 -17
  221. package/src/lib/plugins/openapi/index.tsx +2 -1
  222. package/src/lib/plugins/openapi/playground/EnumSelector.tsx +86 -0
  223. package/src/lib/plugins/openapi/playground/PathParams.tsx +72 -64
  224. package/src/lib/plugins/openapi/playground/Playground.tsx +26 -13
  225. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -73
  226. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +4 -7
  227. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +26 -11
  228. package/src/lib/ui/Badge.tsx +2 -1
  229. package/src/lib/ui/Checkbox.tsx +24 -7
  230. package/src/lib/util/traverse.ts +15 -5
  231. package/dist/lib/plugins/openapi/ExampleDisplay.js +0 -78
  232. package/dist/lib/plugins/openapi/ExampleDisplay.js.map +0 -1
  233. package/dist/lib/plugins/openapi/client/worker.d.ts +0 -4
  234. package/dist/lib/plugins/openapi/client/worker.js +0 -29
  235. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  236. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  237. package/dist/lib/plugins/openapi-worker.js +0 -8
  238. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  239. package/lib/Dialog-Bxv1yEIg.js +0 -67
  240. package/lib/Dialog-Bxv1yEIg.js.map +0 -1
  241. package/lib/OperationList-BLdHAQ39.js.map +0 -1
  242. package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
  243. package/lib/assets/index-C7jnHK4b.js +0 -4841
  244. package/lib/assets/index-C7jnHK4b.js.map +0 -1
  245. package/lib/assets/worker-Cbp2r2BQ.js +0 -18592
  246. package/lib/assets/worker-Cbp2r2BQ.js.map +0 -1
  247. package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
  248. package/lib/context-h_UkBLvr.js +0 -22
  249. package/lib/createServer-Bf5_6o6G.js.map +0 -1
  250. package/lib/index-BNx95gkf.js +0 -1284
  251. package/lib/index-BNx95gkf.js.map +0 -1
  252. package/lib/index-CBXSgjaE.js.map +0 -1
  253. package/lib/index-CPNSgwSb.js +0 -36
  254. package/lib/index-DyBL--Kz.js +0 -826
  255. package/lib/index-DyBL--Kz.js.map +0 -1
  256. package/lib/index.esm-BnnBRKJX.js +0 -1214
  257. package/lib/index.esm-BnnBRKJX.js.map +0 -1
  258. package/lib/state-CFQsUZUP.js +0 -202
  259. package/lib/state-CFQsUZUP.js.map +0 -1
  260. package/lib/zudoku.openapi-worker.js +0 -15
  261. package/lib/zudoku.openapi-worker.js.map +0 -1
  262. package/src/lib/plugins/openapi/ExampleDisplay.tsx +0 -163
  263. package/src/lib/plugins/openapi/client/worker.ts +0 -44
  264. package/src/lib/plugins/openapi-worker.ts +0 -11
@@ -0,0 +1,1292 @@
1
+ var Se = Object.defineProperty;
2
+ var oe = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var $e = (t, n, a) => n in t ? Se(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
6
+ var H = (t, n, a) => $e(t, typeof n != "symbol" ? n + "" : n, a), Te = (t, n, a) => n.has(t) || oe("Cannot " + a);
7
+ var J = (t, n, a) => (Te(t, n, "read from private field"), a ? a.call(t) : n.get(t)), Q = (t, n, a) => n.has(t) ? oe("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(t) : n.set(t, a);
8
+ import { j as e } from "./jsx-runtime-Bdg6XQ1m.js";
9
+ import { m as Pe } from "./chunk-SYFQ2XB5-KWlHsT7t.js";
10
+ import { i as ke, j as le, k as Oe } from "./ZudokuContext-D3ayHjP-.js";
11
+ import { XIcon as qe, EraserIcon as ye, Check as Ie, ChevronsUpDownIcon as Ee, LogInIcon as Ve, CirclePlayIcon as Re } from "lucide-react";
12
+ import { u as ze } from "./hook-DUyACbIK.js";
13
+ import { Button as C } from "./ui/Button.js";
14
+ import { Z as Ae } from "./invariant-Caa8-XvF.js";
15
+ import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
16
+ import * as v from "react";
17
+ import { useRef as ge, useEffect as ve, useState as _, useTransition as Fe, Fragment as U } from "react";
18
+ import { C as Le, a as De, b as Me, c as He, d as Je, D as Qe, e as Ue, f as Be, g as Ge } from "./Command-D5DE0DD7.js";
19
+ import { u as We, S as ie, a as ce, b as de, c as me, e as B } from "./Select-DkOpAG0c.js";
20
+ import { b as ee, C as w, u as Ze, a as Ke, F as Xe } from "./index.esm-CrSoEshU.js";
21
+ import { a as Ye } from "./state-mM7uaXTW.js";
22
+ import { S as ue } from "./Spinner-C5gHXrVz.js";
23
+ import { Callout as et } from "./ui/Callout.js";
24
+ import { Card as X, CardHeader as tt, CardTitle as nt, CardContent as at } from "./ui/Card.js";
25
+ import { Tabs as pe, TabsList as he, TabsTrigger as q, TabsContent as I } from "./ui/Tabs.js";
26
+ import { z as st, S as rt } from "./SyntaxHighlight-CJCSPG1F.js";
27
+ import { c as h } from "./cn-qaFjX9_3.js";
28
+ import { Input as F } from "./ui/Input.js";
29
+ import * as Y from "@radix-ui/react-checkbox";
30
+ import { c as ot } from "./index-Djenk2Hj.js";
31
+ import { Popover as lt, PopoverTrigger as it, PopoverContent as ct } from "./ui/Popover.js";
32
+ import { Slot as dt } from "@radix-ui/react-slot";
33
+ class E extends String {
34
+ constructor(a, r) {
35
+ super(a);
36
+ H(this, "__apiType");
37
+ this.value = a, this.__meta__ = r;
38
+ }
39
+ toString() {
40
+ return this.value;
41
+ }
42
+ }
43
+ const mt = new E(
44
+ `
45
+ fragment OperationsFragment on OperationItem {
46
+ slug
47
+ summary
48
+ method
49
+ description
50
+ operationId
51
+ contentTypes
52
+ path
53
+ parameters {
54
+ name
55
+ in
56
+ description
57
+ required
58
+ schema
59
+ style
60
+ examples {
61
+ name
62
+ description
63
+ externalValue
64
+ value
65
+ summary
66
+ }
67
+ }
68
+ requestBody {
69
+ content {
70
+ mediaType
71
+ encoding {
72
+ name
73
+ }
74
+ examples {
75
+ name
76
+ description
77
+ externalValue
78
+ value
79
+ summary
80
+ }
81
+ schema
82
+ }
83
+ description
84
+ required
85
+ }
86
+ responses {
87
+ statusCode
88
+ links
89
+ description
90
+ content {
91
+ examples {
92
+ name
93
+ description
94
+ externalValue
95
+ value
96
+ summary
97
+ }
98
+ mediaType
99
+ encoding {
100
+ name
101
+ }
102
+ schema
103
+ }
104
+ }
105
+ }
106
+ `,
107
+ { fragmentName: "OperationsFragment" }
108
+ ), ut = new E(`
109
+ query ServersQuery($input: JSON!, $type: SchemaType!) {
110
+ schema(input: $input, type: $type) {
111
+ url
112
+ servers {
113
+ url
114
+ }
115
+ }
116
+ }
117
+ `), pt = new E(`
118
+ query AllOperations($input: JSON!, $type: SchemaType!) {
119
+ schema(input: $input, type: $type) {
120
+ description
121
+ summary
122
+ title
123
+ url
124
+ version
125
+ tags {
126
+ name
127
+ description
128
+ operations {
129
+ slug
130
+ ...OperationsFragment
131
+ }
132
+ }
133
+ }
134
+ }
135
+ fragment OperationsFragment on OperationItem {
136
+ slug
137
+ summary
138
+ method
139
+ description
140
+ operationId
141
+ contentTypes
142
+ path
143
+ parameters {
144
+ name
145
+ in
146
+ description
147
+ required
148
+ schema
149
+ style
150
+ examples {
151
+ name
152
+ description
153
+ externalValue
154
+ value
155
+ summary
156
+ }
157
+ }
158
+ requestBody {
159
+ content {
160
+ mediaType
161
+ encoding {
162
+ name
163
+ }
164
+ examples {
165
+ name
166
+ description
167
+ externalValue
168
+ value
169
+ summary
170
+ }
171
+ schema
172
+ }
173
+ description
174
+ required
175
+ }
176
+ responses {
177
+ statusCode
178
+ links
179
+ description
180
+ content {
181
+ examples {
182
+ name
183
+ description
184
+ externalValue
185
+ value
186
+ summary
187
+ }
188
+ mediaType
189
+ encoding {
190
+ name
191
+ }
192
+ schema
193
+ }
194
+ }
195
+ }`), ht = new E(`
196
+ query getServerQuery($input: JSON!, $type: SchemaType!) {
197
+ schema(input: $input, type: $type) {
198
+ url
199
+ servers {
200
+ url
201
+ }
202
+ }
203
+ }
204
+ `), xt = new E(`
205
+ query GetCategories($input: JSON!, $type: SchemaType!) {
206
+ schema(input: $input, type: $type) {
207
+ url
208
+ tags {
209
+ __typename
210
+ name
211
+ operations {
212
+ __typename
213
+ slug
214
+ deprecated
215
+ method
216
+ summary
217
+ operationId
218
+ path
219
+ }
220
+ }
221
+ }
222
+ }
223
+ `), ft = {
224
+ "\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ut,
225
+ "\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": mt,
226
+ "\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": pt,
227
+ "\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ht,
228
+ "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": xt
229
+ };
230
+ function yt(t) {
231
+ return ft[t] ?? {};
232
+ }
233
+ let G;
234
+ const gt = (t) => {
235
+ var n;
236
+ if ((n = t.errors) != null && n[0])
237
+ throw new Ae(t.errors[0].message, {
238
+ developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
239
+ });
240
+ };
241
+ var L, D;
242
+ class vt {
243
+ constructor(n) {
244
+ Q(this, L, async () => (G || (G = import("./createServer-BcaswoFO.js").then(
245
+ (n) => n.createServer(this.config)
246
+ )), G));
247
+ Q(this, D, async (n) => this.config.server ? fetch(this.config.server, n) : (await J(this, L).call(this)).fetch("http://localhost/graphql", n));
248
+ H(this, "fetch", async (n, ...[a]) => {
249
+ var c;
250
+ const r = (c = n.match(/query (\w+)/)) == null ? void 0 : c[1], l = await J(this, D).call(this, {
251
+ method: "POST",
252
+ body: JSON.stringify({ query: n, variables: a, operationName: r }),
253
+ headers: { "Content-Type": "application/json" }
254
+ });
255
+ if (!l.ok)
256
+ throw new Error("Network response was not ok");
257
+ const o = await l.json();
258
+ return gt(o), o.data;
259
+ });
260
+ this.config = n;
261
+ }
262
+ }
263
+ L = new WeakMap(), D = new WeakMap();
264
+ const W = (t) => Math.abs(
265
+ isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
266
+ ), Z = (t) => t.length > 1 ? parseInt(t.split("").reduce((n, a) => `${W(n) + W(a)}`)) : W(t), xe = (t, n = {}) => {
267
+ const a = (3 * Z(t) + 2 * Z(t) + Z(t)) % 360, { saturation: r = 75, lightness: l = 60 } = n;
268
+ return `${a}deg ${r}% ${l}%`;
269
+ }, K = "data-linked-param", je = (t) => {
270
+ const { resolvedTheme: n } = st();
271
+ return {
272
+ text: xe(
273
+ t,
274
+ n === "light" ? { saturation: 95, lightness: 38 } : {}
275
+ ),
276
+ background: xe(
277
+ t,
278
+ n === "light" ? { saturation: 85, lightness: 40 } : {}
279
+ )
280
+ };
281
+ }, jt = (t) => {
282
+ const n = t.replace(/[{}]/g, "");
283
+ return je(n);
284
+ }, be = ({
285
+ name: t,
286
+ className: n,
287
+ slug: a,
288
+ title: r,
289
+ children: l,
290
+ onClick: o
291
+ }) => {
292
+ const c = ge(null), d = a == null ? void 0 : a.replace(/[{}]/g, ""), i = t.replace(/[{}]/g, ""), { text: m, background: u } = je(i), g = `hsl(${m} / 100%)`, j = `hsl(${u} / 10%)`, b = `hsl(${u} / 50%)`;
293
+ return ve(() => {
294
+ if (!d || !c.current) return;
295
+ const T = () => {
296
+ document.querySelectorAll(`[${K}="${d}"]`).forEach((x) => {
297
+ x instanceof HTMLElement && (x.dataset.active = "true");
298
+ });
299
+ }, N = () => {
300
+ document.querySelectorAll(`[${K}="${d}"]`).forEach((x) => {
301
+ x instanceof HTMLElement && (x.dataset.active = "false");
302
+ });
303
+ }, S = c.current;
304
+ return S.addEventListener("mouseenter", T), S.addEventListener("mouseleave", N), () => {
305
+ S.removeEventListener("mouseenter", T), S.removeEventListener("mouseleave", N);
306
+ };
307
+ }, [d]), /* @__PURE__ */ e.jsx(
308
+ "span",
309
+ {
310
+ [K]: d,
311
+ className: h(
312
+ "relative inline-block rounded transition-all duration-100",
313
+ "rounded-lg",
314
+ "border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
315
+ "data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:-translate-y-px",
316
+ n
317
+ ),
318
+ title: r,
319
+ suppressHydrationWarning: !0,
320
+ ref: c,
321
+ onClick: o,
322
+ style: {
323
+ "--param-color": g,
324
+ "--border-color": b,
325
+ "--background-color": j
326
+ },
327
+ children: l ?? t
328
+ }
329
+ );
330
+ }, bt = (t, n, a) => {
331
+ const r = n.replace(/(:\w+|\{\w+})/g, (o) => {
332
+ var i;
333
+ const c = o.replace(/[:{}]/g, "");
334
+ return ((i = a.pathParams.find((m) => m.name === c)) == null ? void 0 : i.value) ?? o;
335
+ }), l = new URL(
336
+ r.replace(/^\//, ""),
337
+ t.endsWith("/") ? t : `${t}/`
338
+ );
339
+ return a.queryParams.filter((o) => o.active).forEach((o) => {
340
+ l.searchParams.set(o.name, o.value);
341
+ }), l;
342
+ }, Nt = ({
343
+ control: t,
344
+ register: n
345
+ }) => {
346
+ const { fields: a, append: r, remove: l } = ee({
347
+ control: t,
348
+ name: "headers"
349
+ });
350
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
351
+ /* @__PURE__ */ e.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ e.jsx("tbody", { children: a.map((o, c) => /* @__PURE__ */ e.jsxs(
352
+ "tr",
353
+ {
354
+ className: "group has-[:focus]:bg-muted/50 hover:bg-muted/50",
355
+ children: [
356
+ /* @__PURE__ */ e.jsx("td", { className: "flex gap-2 items-center", children: /* @__PURE__ */ e.jsx(
357
+ F,
358
+ {
359
+ ...n(`headers.${c}.name`),
360
+ placeholder: "Name",
361
+ className: "border-0 shadow-none text-xs font-mono",
362
+ autoComplete: "off"
363
+ }
364
+ ) }),
365
+ /* @__PURE__ */ e.jsx("td", { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
366
+ /* @__PURE__ */ e.jsx(
367
+ F,
368
+ {
369
+ placeholder: "Value",
370
+ className: "border-0 shadow-none text-xs font-mono",
371
+ ...n(`headers.${c}.value`),
372
+ autoComplete: "off"
373
+ }
374
+ ),
375
+ /* @__PURE__ */ e.jsx(
376
+ C,
377
+ {
378
+ size: "icon",
379
+ variant: "ghost",
380
+ className: "text-muted-foreground opacity-0 group-hover:opacity-100",
381
+ onClick: () => {
382
+ l(c);
383
+ },
384
+ type: "button",
385
+ children: /* @__PURE__ */ e.jsx(qe, { size: 16 })
386
+ }
387
+ )
388
+ ] }) })
389
+ ]
390
+ },
391
+ o.id
392
+ )) }) }),
393
+ /* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
394
+ C,
395
+ {
396
+ className: "",
397
+ onClick: () => r({ name: "", value: "" }),
398
+ type: "button",
399
+ variant: "secondary",
400
+ children: "Add header"
401
+ }
402
+ ) })
403
+ ] });
404
+ }, te = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx(
405
+ "div",
406
+ {
407
+ ref: a,
408
+ className: h(
409
+ "rounded-xl border bg-card text-card-foreground shadow-sm",
410
+ t
411
+ ),
412
+ ...n
413
+ }
414
+ ));
415
+ te.displayName = "Card";
416
+ const wt = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx(
417
+ "div",
418
+ {
419
+ ref: a,
420
+ className: h("flex flex-col space-y-1.5 p-6", t),
421
+ ...n
422
+ }
423
+ ));
424
+ wt.displayName = "CardHeader";
425
+ const Ct = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx(
426
+ "h3",
427
+ {
428
+ ref: a,
429
+ className: h("font-semibold leading-none tracking-tight", t),
430
+ ...n
431
+ }
432
+ ));
433
+ Ct.displayName = "CardTitle";
434
+ const St = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx(
435
+ "p",
436
+ {
437
+ ref: a,
438
+ className: h("text-sm text-muted-foreground", t),
439
+ ...n
440
+ }
441
+ ));
442
+ St.displayName = "CardDescription";
443
+ const $t = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx("div", { ref: a, className: h("p-6 pt-0", t), ...n }));
444
+ $t.displayName = "CardContent";
445
+ const Tt = v.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e.jsx(
446
+ "div",
447
+ {
448
+ ref: a,
449
+ className: h("flex items-center p-6 pt-0", t),
450
+ ...n
451
+ }
452
+ ));
453
+ Tt.displayName = "CardFooter";
454
+ const Pt = ({ name: t }) => {
455
+ const n = jt(t);
456
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
457
+ /* @__PURE__ */ e.jsx(
458
+ "div",
459
+ {
460
+ className: "w-2 h-2 rounded-full",
461
+ style: { backgroundColor: `hsl(${n})` }
462
+ }
463
+ ),
464
+ /* @__PURE__ */ e.jsx(
465
+ be,
466
+ {
467
+ slug: t,
468
+ name: t,
469
+ className: "font-mono text-xs m-2 px-1"
470
+ }
471
+ )
472
+ ] });
473
+ }, kt = ({
474
+ control: t
475
+ }) => {
476
+ const { fields: n } = ee({
477
+ control: t,
478
+ name: "pathParams"
479
+ });
480
+ return /* @__PURE__ */ e.jsx(te, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("table", { className: "w-full", children: /* @__PURE__ */ e.jsx("tbody", { children: n.map((a, r) => /* @__PURE__ */ e.jsxs("tr", { className: "hover:bg-accent/40", children: [
481
+ /* @__PURE__ */ e.jsx("td", { className: "w-5/12", children: /* @__PURE__ */ e.jsx(
482
+ w,
483
+ {
484
+ control: t,
485
+ name: `pathParams.${r}.value`,
486
+ render: () => /* @__PURE__ */ e.jsx(Pt, { name: a.name })
487
+ }
488
+ ) }),
489
+ /* @__PURE__ */ e.jsx("td", { className: "w-7/12", children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
490
+ /* @__PURE__ */ e.jsx(
491
+ w,
492
+ {
493
+ control: t,
494
+ name: `pathParams.${r}.value`,
495
+ render: ({ field: l }) => /* @__PURE__ */ e.jsx(
496
+ F,
497
+ {
498
+ ...l,
499
+ required: !0,
500
+ placeholder: "Enter value",
501
+ className: "w-full border-0 shadow-none text-xs font-mono hover:bg-accent"
502
+ }
503
+ )
504
+ }
505
+ ),
506
+ /* @__PURE__ */ e.jsx(
507
+ w,
508
+ {
509
+ control: t,
510
+ name: `pathParams.${r}.value`,
511
+ render: ({ field: l }) => /* @__PURE__ */ e.jsx(
512
+ C,
513
+ {
514
+ size: "icon",
515
+ type: "button",
516
+ variant: "ghost",
517
+ "aria-label": "Clear value",
518
+ className: h(
519
+ "ms-2 mr-1",
520
+ l.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
521
+ ),
522
+ title: "Clear value",
523
+ onClick: () => l.onChange(""),
524
+ children: /* @__PURE__ */ e.jsx(ye, { size: 16 })
525
+ }
526
+ )
527
+ }
528
+ )
529
+ ] }) })
530
+ ] }, a.id)) }) }) });
531
+ }, Ot = ot(
532
+ "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",
533
+ {
534
+ variants: {
535
+ variant: {
536
+ default: "border border-primary data-[state=checked]:bg-primary",
537
+ outline: "border border-input data-[state=checked]:bg-accent"
538
+ }
539
+ },
540
+ defaultVariants: {
541
+ variant: "default"
542
+ }
543
+ }
544
+ ), Ne = v.forwardRef(({ className: t, variant: n, ...a }, r) => /* @__PURE__ */ e.jsx(
545
+ Y.Root,
546
+ {
547
+ ref: r,
548
+ className: h(Ot({ variant: n, className: t })),
549
+ ...a,
550
+ children: /* @__PURE__ */ e.jsx(
551
+ Y.Indicator,
552
+ {
553
+ className: h("flex items-center justify-center text-current"),
554
+ children: /* @__PURE__ */ e.jsx(Ie, { className: "h-4 w-4" })
555
+ }
556
+ )
557
+ }
558
+ ));
559
+ Ne.displayName = Y.Root.displayName;
560
+ const qt = ({
561
+ value: t,
562
+ enumValues: n,
563
+ onChange: a,
564
+ onValueSelected: r
565
+ }) => {
566
+ const [l, o] = _(""), [c, d] = _(!1);
567
+ return /* @__PURE__ */ e.jsxs(lt, { open: c, onOpenChange: d, children: [
568
+ /* @__PURE__ */ e.jsx(it, { asChild: !0, children: /* @__PURE__ */ e.jsx(
569
+ "button",
570
+ {
571
+ type: "button",
572
+ role: "combobox",
573
+ className: h(
574
+ "px-3 py-2 w-full border-0 shadow-none text-xs font-mono text-start hover:bg-accent/40 rounded border-transparent hover:bg-accent",
575
+ !t && "text-muted-foreground"
576
+ ),
577
+ children: t || "Select value"
578
+ }
579
+ ) }),
580
+ /* @__PURE__ */ e.jsx(
581
+ ct,
582
+ {
583
+ className: "p-0 w-[--radix-popover-trigger-width] ",
584
+ align: "start",
585
+ sideOffset: 3,
586
+ alignOffset: -3,
587
+ side: "bottom",
588
+ children: /* @__PURE__ */ e.jsxs(Le, { className: "max-h-[180px]", children: [
589
+ /* @__PURE__ */ e.jsx(
590
+ De,
591
+ {
592
+ placeholder: "Enter value",
593
+ className: "h-9 bg-transparent ",
594
+ onValueChange: o,
595
+ onKeyDown: (i) => {
596
+ i.key === "Enter" && (a(l), r(), d(!1));
597
+ }
598
+ }
599
+ ),
600
+ /* @__PURE__ */ e.jsxs(Me, { children: [
601
+ /* @__PURE__ */ e.jsxs(He, { children: [
602
+ 'Use "',
603
+ l,
604
+ '"'
605
+ ] }),
606
+ n.map((i) => /* @__PURE__ */ e.jsx(
607
+ Je,
608
+ {
609
+ value: i,
610
+ onSelect: (m) => {
611
+ a(m), r(), d(!1);
612
+ },
613
+ children: i
614
+ },
615
+ i
616
+ ))
617
+ ] })
618
+ ] })
619
+ }
620
+ )
621
+ ] });
622
+ }, It = (t, n) => {
623
+ const a = v.forwardRef(({ className: r, asChild: l, ...o }, c) => {
624
+ const d = l ? dt : t;
625
+ return v.createElement(d, {
626
+ ...o,
627
+ ref: c,
628
+ className: h(n, r)
629
+ });
630
+ });
631
+ return a.displayName = `VariantComponent(${t})`, a;
632
+ }, Et = It(
633
+ "input",
634
+ "px-2 bg-transparent h-6 font-mono text-xs m-2"
635
+ ), Vt = ({
636
+ control: t,
637
+ queryParams: n
638
+ }) => {
639
+ const { fields: a } = ee({
640
+ control: t,
641
+ name: "queryParams"
642
+ }), r = Ze(), l = n.map((d) => !!d.isRequired), c = r.watch("identity") !== A;
643
+ return /* @__PURE__ */ e.jsx(te, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("table", { className: "w-full", children: /* @__PURE__ */ e.jsx("tbody", { children: a.filter(
644
+ // TODO remove this hack for Accu or make it more generic
645
+ (d) => !(c && d.name === "apikey")
646
+ ).map((d, i) => {
647
+ const m = n.find(
648
+ (u) => u.name === d.name
649
+ );
650
+ return /* @__PURE__ */ e.jsxs("tr", { className: "hover:bg-accent/40", children: [
651
+ /* @__PURE__ */ e.jsxs("td", { className: "w-5/12 flex items-center ps-3", children: [
652
+ /* @__PURE__ */ e.jsx(
653
+ w,
654
+ {
655
+ control: t,
656
+ name: `queryParams.${i}.active`,
657
+ render: ({ field: u }) => /* @__PURE__ */ e.jsx(
658
+ Ne,
659
+ {
660
+ variant: "outline",
661
+ id: `queryParams.${i}.active`,
662
+ checked: u.value,
663
+ onCheckedChange: u.onChange
664
+ }
665
+ )
666
+ }
667
+ ),
668
+ /* @__PURE__ */ e.jsx(
669
+ w,
670
+ {
671
+ control: t,
672
+ render: ({ field: u }) => /* @__PURE__ */ e.jsx(Et, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
673
+ "label",
674
+ {
675
+ className: "flex items-center cursor-pointer gap-1",
676
+ htmlFor: `queryParams.${i}.active`,
677
+ title: l[i] ? "Required field" : void 0,
678
+ children: [
679
+ u.value,
680
+ l[i] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
681
+ ]
682
+ }
683
+ ) }),
684
+ name: `queryParams.${i}.name`
685
+ }
686
+ )
687
+ ] }),
688
+ /* @__PURE__ */ e.jsx("td", { className: "w-7/12", children: /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center", children: [
689
+ /* @__PURE__ */ e.jsx(
690
+ w,
691
+ {
692
+ control: t,
693
+ render: ({ field: u }) => {
694
+ if (!((m == null ? void 0 : m.enum) && m.enum.length > 0))
695
+ return /* @__PURE__ */ e.jsx(
696
+ F,
697
+ {
698
+ ...u,
699
+ onChange: (b) => {
700
+ u.onChange(b.target.value), b.target.value.length > 0 && r.setValue(
701
+ `queryParams.${i}.active`,
702
+ !0
703
+ );
704
+ },
705
+ placeholder: "Enter value",
706
+ className: "w-full border-0 shadow-none text-xs font-mono hover:bg-accent"
707
+ }
708
+ );
709
+ const j = m.enum ?? [];
710
+ return /* @__PURE__ */ e.jsx(
711
+ qt,
712
+ {
713
+ value: u.value,
714
+ enumValues: j,
715
+ onChange: u.onChange,
716
+ onValueSelected: () => {
717
+ r.setValue(`queryParams.${i}.active`, !0);
718
+ }
719
+ }
720
+ );
721
+ },
722
+ name: `queryParams.${i}.value`
723
+ }
724
+ ),
725
+ /* @__PURE__ */ e.jsx(
726
+ w,
727
+ {
728
+ control: t,
729
+ render: ({ field: u }) => /* @__PURE__ */ e.jsx(
730
+ C,
731
+ {
732
+ size: "icon",
733
+ type: "button",
734
+ variant: "ghost",
735
+ "aria-label": "Clear value",
736
+ className: h(
737
+ "ms-2 mr-1",
738
+ u.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
739
+ ),
740
+ title: "Clear value",
741
+ onClick: () => u.onChange(""),
742
+ children: /* @__PURE__ */ e.jsx(ye, { size: 16 })
743
+ }
744
+ ),
745
+ name: `queryParams.${i}.value`
746
+ }
747
+ )
748
+ ] }) })
749
+ ] }, d.id);
750
+ }) }) }) });
751
+ }, Rt = ({
752
+ value: t,
753
+ onChange: n,
754
+ className: a,
755
+ options: r,
756
+ showChevrons: l = !0
757
+ }) => /* @__PURE__ */ e.jsxs("div", { className: "grid", children: [
758
+ /* @__PURE__ */ e.jsx(
759
+ "select",
760
+ {
761
+ className: h(
762
+ "row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
763
+ "rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
764
+ a
765
+ ),
766
+ value: t,
767
+ onChange: n,
768
+ children: r.map((o) => /* @__PURE__ */ e.jsx("option", { value: o.value, children: o.label }, o.value))
769
+ }
770
+ ),
771
+ /* @__PURE__ */ e.jsx(
772
+ "div",
773
+ {
774
+ className: h(
775
+ !l && "hidden",
776
+ "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
777
+ ),
778
+ children: /* @__PURE__ */ e.jsx(Ee, { size: 14 })
779
+ }
780
+ )
781
+ ] }), zt = (t) => {
782
+ var a;
783
+ return (a = Object.entries({
784
+ "application/json": "json",
785
+ "text/json": "json",
786
+ "text/html": "html",
787
+ "text/css": "css",
788
+ "text/javascript": "javascript",
789
+ "application/xml": "xml",
790
+ "application/xhtml+xml": "xhtml"
791
+ }).find(
792
+ ([r]) => t.includes(r)
793
+ )) == null ? void 0 : a[1];
794
+ }, At = (t) => {
795
+ const n = t.get("Content-Type") || "";
796
+ return zt(n);
797
+ }, _t = (t) => {
798
+ try {
799
+ return JSON.stringify(JSON.parse(t), null, 2);
800
+ } catch {
801
+ return null;
802
+ }
803
+ }, Ft = ({
804
+ body: t = "",
805
+ headers: n
806
+ }) => {
807
+ const a = At(n), r = _t(t), l = r || t, [o, c] = _(
808
+ r ? "formatted" : "raw"
809
+ );
810
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
811
+ /* @__PURE__ */ e.jsx(X, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
812
+ rt,
813
+ {
814
+ language: o === "raw" ? r ? "plain" : a : "json",
815
+ noBackground: !0,
816
+ className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
817
+ code: o === "raw" ? t : l
818
+ }
819
+ ) }),
820
+ r && /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(
821
+ Rt,
822
+ {
823
+ value: o,
824
+ onChange: (d) => c(d.target.value),
825
+ options: [
826
+ { value: "formatted", label: "Formatted" },
827
+ { value: "raw", label: "Raw" }
828
+ ]
829
+ }
830
+ ) })
831
+ ] });
832
+ }, A = "__none", Lt = {
833
+ 200: "OK",
834
+ 201: "Created",
835
+ 202: "Accepted",
836
+ 204: "No Content",
837
+ 400: "Bad Request",
838
+ 401: "Unauthorized",
839
+ 403: "Forbidden",
840
+ 404: "Not Found",
841
+ 405: "Method Not Allowed",
842
+ 500: "Internal Server Error"
843
+ }, Dt = ({
844
+ server: t,
845
+ servers: n,
846
+ url: a,
847
+ method: r,
848
+ headers: l = [],
849
+ queryParams: o = [],
850
+ pathParams: c = [],
851
+ defaultBody: d = ""
852
+ }) => {
853
+ var se, re;
854
+ const { selectedServer: i, setSelectedServer: m } = Ye(), [, u] = Fe(), { register: g, control: j, handleSubmit: b, watch: T, setValue: N, ...S } = Ke({
855
+ defaultValues: {
856
+ body: d,
857
+ queryParams: o.map((s) => ({
858
+ name: s.name,
859
+ value: s.defaultValue ?? "",
860
+ active: s.defaultActive ?? !1,
861
+ enum: s.enum ?? []
862
+ })),
863
+ pathParams: c.map((s) => ({
864
+ name: s.name,
865
+ value: s.defaultValue ?? ""
866
+ })),
867
+ headers: l.map((s) => ({
868
+ name: s.name,
869
+ value: s.defaultValue ?? ""
870
+ })),
871
+ identity: A
872
+ }
873
+ }), x = T(), P = ke(), ne = ge(!1);
874
+ ve(() => {
875
+ var y;
876
+ if (ne.current) return;
877
+ const s = (y = P.data) == null ? void 0 : y.at(0);
878
+ s && (N("identity", s.id), ne.current = !0);
879
+ }, [N, P.data]);
880
+ const f = We({
881
+ mutationFn: async (s) => {
882
+ var O, $;
883
+ const y = bt(i ?? t, a, s), k = performance.now(), V = new Request(y, {
884
+ method: r.toUpperCase(),
885
+ headers: Object.fromEntries(
886
+ s.headers.filter((p) => p.name).map((p) => [p.name, p.value])
887
+ ),
888
+ body: s.body ? s.body : void 0
889
+ });
890
+ s.identity !== A && (($ = (O = P.data) == null ? void 0 : O.find((p) => p.id === s.identity)) == null || $.authorizeRequest(V));
891
+ try {
892
+ const p = await fetch(V, {
893
+ signal: AbortSignal.timeout(5e3)
894
+ }), R = performance.now() - k, z = await p.text();
895
+ return {
896
+ status: p.status,
897
+ headers: p.headers,
898
+ size: z.length,
899
+ body: z,
900
+ time: R
901
+ };
902
+ } catch (p) {
903
+ throw p instanceof TypeError ? new Error(
904
+ "The request failed, possibly due to network issues or CORS policy."
905
+ ) : p;
906
+ }
907
+ }
908
+ }), we = a.split("/").map((s, y, k) => {
909
+ var R;
910
+ const V = s.startsWith("{") && s.endsWith("}") || s.startsWith(":"), O = s.replace(/[:{}]/g, ""), $ = (R = x.pathParams.find((z) => z.name === O)) == null ? void 0 : R.value, p = /* @__PURE__ */ e.jsx(
911
+ be,
912
+ {
913
+ backgroundOpacity: "25%",
914
+ name: s,
915
+ slug: s,
916
+ title: $ ? void 0 : `Missing value for path parameter \`${O}\``,
917
+ children: $ ? encodeURIComponent($) : s
918
+ }
919
+ );
920
+ return (
921
+ // eslint-disable-next-line react/no-array-index-key
922
+ /* @__PURE__ */ e.jsxs(U, { children: [
923
+ V ? p : s,
924
+ y < k.length - 1 && "/",
925
+ /* @__PURE__ */ e.jsx("wbr", {})
926
+ ] }, s + y)
927
+ );
928
+ }), M = Array.from(((se = f.data) == null ? void 0 : se.headers.entries()) ?? []), ae = x.queryParams.filter((s) => s.active).map((s, y, k) => /* @__PURE__ */ e.jsxs(U, { children: [
929
+ s.name,
930
+ "=",
931
+ encodeURIComponent(s.value).replaceAll("%20", "+"),
932
+ y < k.length - 1 && "&",
933
+ /* @__PURE__ */ e.jsx("wbr", {})
934
+ ] }, s.name)), Ce = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: n && n.length > 1 ? /* @__PURE__ */ e.jsxs(
935
+ ie,
936
+ {
937
+ onValueChange: (s) => {
938
+ u(() => {
939
+ m(s);
940
+ });
941
+ },
942
+ value: i,
943
+ children: [
944
+ /* @__PURE__ */ e.jsx(ce, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(de, {}) }),
945
+ /* @__PURE__ */ e.jsx(me, { children: n.map((s) => /* @__PURE__ */ e.jsx(B, { value: s, children: s.replace(/^https?:\/\//, "") }, s)) })
946
+ ]
947
+ }
948
+ ) : /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) });
949
+ return /* @__PURE__ */ e.jsx(
950
+ Xe,
951
+ {
952
+ register: g,
953
+ control: j,
954
+ handleSubmit: b,
955
+ watch: T,
956
+ setValue: N,
957
+ ...S,
958
+ children: /* @__PURE__ */ e.jsx("form", { onSubmit: b((s) => f.mutateAsync(s)), children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[8fr_7fr] text-sm h-full", children: [
959
+ /* @__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: [
960
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
961
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
962
+ /* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: r.toUpperCase() }),
963
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
964
+ Ce,
965
+ we,
966
+ ae.length > 0 ? "?" : "",
967
+ ae
968
+ ] })
969
+ ] }),
970
+ /* @__PURE__ */ e.jsx(C, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
971
+ ] }),
972
+ /* @__PURE__ */ e.jsxs(
973
+ pe,
974
+ {
975
+ defaultValue: o.length + c.length > 0 ? "parameters" : "headers",
976
+ children: [
977
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-wrap gap-1 justify-between", children: [
978
+ /* @__PURE__ */ e.jsxs(he, { children: [
979
+ o.length + c.length > 0 && /* @__PURE__ */ e.jsx(q, { value: "parameters", children: "Parameters" }),
980
+ /* @__PURE__ */ e.jsxs(q, { value: "headers", children: [
981
+ "Headers",
982
+ " ",
983
+ x.headers.length > 0 && `(${x.headers.length})`
984
+ ] }),
985
+ /* @__PURE__ */ e.jsx(
986
+ q,
987
+ {
988
+ value: "body",
989
+ disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
990
+ r.toUpperCase()
991
+ ),
992
+ children: "Body"
993
+ }
994
+ )
995
+ ] }),
996
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center", children: [
997
+ "Auth:",
998
+ /* @__PURE__ */ e.jsxs(
999
+ ie,
1000
+ {
1001
+ onValueChange: (s) => N("identity", s),
1002
+ value: x.identity,
1003
+ defaultValue: x.identity,
1004
+ children: [
1005
+ /* @__PURE__ */ e.jsx(ce, { className: "w-[180px] flex", children: P.isPending ? /* @__PURE__ */ e.jsx(ue, {}) : /* @__PURE__ */ e.jsx(de, {}) }),
1006
+ /* @__PURE__ */ e.jsxs(me, { align: "center", children: [
1007
+ /* @__PURE__ */ e.jsx(B, { value: A, children: "None" }),
1008
+ (re = P.data) == null ? void 0 : re.map((s) => /* @__PURE__ */ e.jsx(B, { value: s.id, children: s.label }, s.id))
1009
+ ] })
1010
+ ]
1011
+ }
1012
+ )
1013
+ ] })
1014
+ ] }),
1015
+ /* @__PURE__ */ e.jsx(I, { value: "headers", children: /* @__PURE__ */ e.jsx(Nt, { control: j, register: g }) }),
1016
+ /* @__PURE__ */ e.jsxs(I, { value: "parameters", children: [
1017
+ c.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1018
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
1019
+ /* @__PURE__ */ e.jsx(kt, { control: j })
1020
+ ] }),
1021
+ o.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
1022
+ /* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
1023
+ /* @__PURE__ */ e.jsx(Vt, { control: j, queryParams: o })
1024
+ ] })
1025
+ ] }),
1026
+ /* @__PURE__ */ e.jsx(I, { value: "body", children: /* @__PURE__ */ e.jsx(
1027
+ "textarea",
1028
+ {
1029
+ ...g("body"),
1030
+ className: "border w-full rounded p-2 bg-muted h-40"
1031
+ }
1032
+ ) })
1033
+ ]
1034
+ }
1035
+ )
1036
+ ] }),
1037
+ /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children: f.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1038
+ x.pathParams.some((s) => s.value === "") && /* @__PURE__ */ e.jsx(et, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
1039
+ /* @__PURE__ */ e.jsxs(X, { children: [
1040
+ /* @__PURE__ */ e.jsx(tt, { children: /* @__PURE__ */ e.jsx(nt, { children: "Request failed" }) }),
1041
+ /* @__PURE__ */ e.jsxs(at, { children: [
1042
+ "Error:",
1043
+ " ",
1044
+ f.error.message || String(f.error) || "Unexpected error"
1045
+ ] })
1046
+ ] })
1047
+ ] }) : f.data ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
1048
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-6", children: [
1049
+ /* @__PURE__ */ e.jsxs("div", { children: [
1050
+ "Status: ",
1051
+ f.data.status,
1052
+ " ",
1053
+ Lt[f.data.status] ?? ""
1054
+ ] }),
1055
+ /* @__PURE__ */ e.jsxs("div", { children: [
1056
+ "Time: ",
1057
+ f.data.time.toFixed(0),
1058
+ "ms"
1059
+ ] }),
1060
+ /* @__PURE__ */ e.jsxs("div", { children: [
1061
+ "Size: ",
1062
+ f.data.size,
1063
+ " B"
1064
+ ] })
1065
+ ] }) }),
1066
+ /* @__PURE__ */ e.jsxs(pe, { defaultValue: "response", children: [
1067
+ /* @__PURE__ */ e.jsxs(he, { children: [
1068
+ /* @__PURE__ */ e.jsx(q, { value: "response", children: "Response" }),
1069
+ /* @__PURE__ */ e.jsx(q, { value: "headers", children: M.length ? `Headers (${M.length})` : "No headers" })
1070
+ ] }),
1071
+ /* @__PURE__ */ e.jsx(I, { value: "response", children: /* @__PURE__ */ e.jsx(
1072
+ Ft,
1073
+ {
1074
+ headers: f.data.headers,
1075
+ body: f.data.body
1076
+ }
1077
+ ) }),
1078
+ /* @__PURE__ */ e.jsx(I, { value: "headers", children: /* @__PURE__ */ e.jsxs(
1079
+ X,
1080
+ {
1081
+ className: "max-h-[calc(83.333vh-140px)] overflow-y-auto grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4",
1082
+ children: [
1083
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold", children: "Key" }),
1084
+ /* @__PURE__ */ e.jsx("div", { className: "font-semibold", children: "Value" }),
1085
+ M.map(([s, y]) => /* @__PURE__ */ e.jsxs(U, { children: [
1086
+ /* @__PURE__ */ e.jsx("div", { children: s }),
1087
+ /* @__PURE__ */ e.jsx("div", { className: "break-words", children: y })
1088
+ ] }, s))
1089
+ ]
1090
+ }
1091
+ ) })
1092
+ ] })
1093
+ ] }) : /* @__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: f.isPending ? /* @__PURE__ */ e.jsx(ue, {}) : "Send a request first to see the response here" }) }) })
1094
+ ] }) })
1095
+ }
1096
+ );
1097
+ }, Mt = ({
1098
+ className: t,
1099
+ size: n = 16
1100
+ }) => /* @__PURE__ */ e.jsx(
1101
+ "svg",
1102
+ {
1103
+ xmlns: "http://www.w3.org/2000/svg",
1104
+ viewBox: "0 0 24 24",
1105
+ fill: "currentColor",
1106
+ className: t,
1107
+ width: n,
1108
+ height: n,
1109
+ children: /* @__PURE__ */ e.jsx(
1110
+ "path",
1111
+ {
1112
+ fillRule: "evenodd",
1113
+ 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",
1114
+ clipRule: "evenodd"
1115
+ }
1116
+ )
1117
+ }
1118
+ ), Ht = (t) => {
1119
+ const [n, a] = _(!1);
1120
+ return /* @__PURE__ */ e.jsxs(Qe, { onOpenChange: (r) => a(r), children: [
1121
+ /* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs("button", { 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", children: [
1122
+ "Test",
1123
+ /* @__PURE__ */ e.jsx(Mt, { className: "", size: 14 })
1124
+ ] }) }),
1125
+ /* @__PURE__ */ e.jsxs(
1126
+ Be,
1127
+ {
1128
+ className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
1129
+ "aria-describedby": void 0,
1130
+ children: [
1131
+ /* @__PURE__ */ e.jsx(_e, { children: /* @__PURE__ */ e.jsx(Ge, { children: "Playground" }) }),
1132
+ n && /* @__PURE__ */ e.jsx(Dt, { ...t })
1133
+ ]
1134
+ }
1135
+ )
1136
+ ] });
1137
+ }, fe = yt(`
1138
+ query GetCategories($input: JSON!, $type: SchemaType!) {
1139
+ schema(input: $input, type: $type) {
1140
+ url
1141
+ tags {
1142
+ __typename
1143
+ name
1144
+ operations {
1145
+ __typename
1146
+ slug
1147
+ deprecated
1148
+ method
1149
+ summary
1150
+ operationId
1151
+ path
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+ `), Jt = {
1157
+ get: "green",
1158
+ post: "blue",
1159
+ put: "yellow",
1160
+ delete: "red",
1161
+ patch: "purple",
1162
+ options: "gray",
1163
+ head: "gray"
1164
+ }, fn = (t) => {
1165
+ const n = le(t.navigationId ?? "/reference"), a = t.type === "file" ? Object.keys(t.input) : [], r = new vt(t);
1166
+ return {
1167
+ getHead: () => {
1168
+ if (t.type === "url" && !t.skipPreload)
1169
+ return /* @__PURE__ */ e.jsx(
1170
+ "link",
1171
+ {
1172
+ rel: "preload",
1173
+ href: t.input,
1174
+ as: "fetch",
1175
+ crossOrigin: "anonymous"
1176
+ }
1177
+ );
1178
+ if (t.server)
1179
+ return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: t.server });
1180
+ },
1181
+ getMdxComponents: () => ({
1182
+ OpenPlaygroundButton: ({
1183
+ requireAuth: l,
1184
+ server: o,
1185
+ method: c,
1186
+ url: d,
1187
+ ...i
1188
+ }) => {
1189
+ var g;
1190
+ const m = ze(), u = Oe({
1191
+ queryFn: () => r.fetch(fe, {
1192
+ type: t.type,
1193
+ input: t.input
1194
+ }),
1195
+ enabled: !o,
1196
+ queryKey: ["playground-server"]
1197
+ });
1198
+ return l && !m.isAuthenticated ? /* @__PURE__ */ e.jsxs(
1199
+ C,
1200
+ {
1201
+ className: "gap-2 items-center",
1202
+ variant: "outline",
1203
+ onClick: m.login,
1204
+ children: [
1205
+ "Login to open in Playground ",
1206
+ /* @__PURE__ */ e.jsx(Ve, { size: 16 })
1207
+ ]
1208
+ }
1209
+ ) : /* @__PURE__ */ e.jsx(
1210
+ Ht,
1211
+ {
1212
+ url: d ?? "/",
1213
+ method: c ?? "get",
1214
+ server: o ?? ((g = u.data) == null ? void 0 : g.schema.url) ?? "https://example.com",
1215
+ ...i,
1216
+ children: /* @__PURE__ */ e.jsxs(C, { className: "gap-2 items-center", variant: "outline", children: [
1217
+ "Open in Playground ",
1218
+ /* @__PURE__ */ e.jsx(Re, { size: 16 })
1219
+ ] })
1220
+ }
1221
+ );
1222
+ }
1223
+ }),
1224
+ getSidebar: async (l) => {
1225
+ if (!Pe({ path: n, end: !1 }, l))
1226
+ return [];
1227
+ try {
1228
+ const o = a.find((i) => l === le(n, i)) ?? Object.keys(t.input).at(0), d = (await r.fetch(fe, {
1229
+ type: t.type,
1230
+ input: t.type === "file" ? t.input[o] : t.input,
1231
+ version: o
1232
+ })).schema.tags.filter((i) => i.operations.length > 0).map((i) => ({
1233
+ type: "category",
1234
+ label: i.name || "Other endpoints",
1235
+ collapsible: !0,
1236
+ collapsed: !1,
1237
+ items: i.operations.map((m) => ({
1238
+ type: "link",
1239
+ label: m.summary ?? m.path,
1240
+ href: `#${m.slug}`,
1241
+ badge: {
1242
+ label: m.method,
1243
+ color: Jt[m.method.toLowerCase()],
1244
+ invert: !0
1245
+ }
1246
+ }))
1247
+ }));
1248
+ return d.unshift({
1249
+ type: "link",
1250
+ label: "Overview",
1251
+ href: "#description"
1252
+ }), d;
1253
+ } catch {
1254
+ return [];
1255
+ }
1256
+ },
1257
+ getRoutes: () => [null, ...a].map((o) => ({
1258
+ path: n + (o ? `/${o}` : ""),
1259
+ async lazy() {
1260
+ const { OpenApiRoute: c } = await import("./Route-Pzk6qwIk.js");
1261
+ return {
1262
+ element: /* @__PURE__ */ e.jsx(
1263
+ c,
1264
+ {
1265
+ basePath: n,
1266
+ versions: a,
1267
+ client: r,
1268
+ config: t
1269
+ }
1270
+ )
1271
+ };
1272
+ },
1273
+ children: [
1274
+ {
1275
+ index: !0,
1276
+ async lazy() {
1277
+ const { OperationList: c } = await import("./OperationList-PCwzTp1r.js");
1278
+ return { element: /* @__PURE__ */ e.jsx(c, {}) };
1279
+ }
1280
+ }
1281
+ ]
1282
+ }))
1283
+ };
1284
+ };
1285
+ export {
1286
+ be as C,
1287
+ Ht as P,
1288
+ Rt as S,
1289
+ yt as g,
1290
+ fn as o
1291
+ };
1292
+ //# sourceMappingURL=index-CaILD1AV.js.map