zudoku 0.33.1 → 0.33.2-local.4

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