zudoku 0.27.0 → 0.28.0

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