zudoku 0.0.0-ec30b50 → 0.0.0-ee328ec

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