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