zudoku 0.0.0-z5b63904b → 0.0.0-z6b1ecd2d
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/config/validators/NavigationSchema.js +1 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
- package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/lib/{OasProvider--Ee8eUgN.js → OasProvider-DPPdikt_.js} +2 -2
- package/lib/{OasProvider--Ee8eUgN.js.map → OasProvider-DPPdikt_.js.map} +1 -1
- package/lib/{OperationList-DftaNVEs.js → OperationList-cEveQ_l5.js} +3 -3
- package/lib/{OperationList-DftaNVEs.js.map → OperationList-cEveQ_l5.js.map} +1 -1
- package/lib/{SchemaList-CSOKHa_l.js → SchemaList-CRC8n5co.js} +3 -3
- package/lib/{SchemaList-CSOKHa_l.js.map → SchemaList-CRC8n5co.js.map} +1 -1
- package/lib/{SchemaView-BrYjZLEd.js → SchemaView-BR6dtnPg.js} +2 -2
- package/lib/{SchemaView-BrYjZLEd.js.map → SchemaView-BR6dtnPg.js.map} +1 -1
- package/lib/{circular-D7do-Usk.js → circular-C4l1Kj1N.js} +2 -2
- package/lib/{circular-D7do-Usk.js.map → circular-C4l1Kj1N.js.map} +1 -1
- package/lib/{createServer-BQ1_wtQj.js → createServer-DoRZ6tMa.js} +3 -3
- package/lib/{createServer-BQ1_wtQj.js.map → createServer-DoRZ6tMa.js.map} +1 -1
- package/lib/{index-B0M6y_Fr.js → index-Ck4TmzTO.js} +653 -619
- package/lib/index-Ck4TmzTO.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
- package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
- package/lib/index-B0M6y_Fr.js.map +0 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { ChevronsDownUpIcon as
|
|
3
|
-
import { r as
|
|
2
|
+
import { ChevronsDownUpIcon as kn, ChevronsUpDownIcon as En, PlusCircleIcon as Je, XIcon as It, CheckIcon as Dt, PaperclipIcon as me, TrashIcon as Rn, FileInput as In, ScanTextIcon as yt, Grid2x2PlusIcon as vt, ChevronDownIcon as Dn, TableOfContentsIcon as Fn, LockIcon as zn, CircleAlertIcon as Vn, Circle as Bn, Unlink2Icon as _n, DownloadIcon as Ft, CornerDownRightIcon as qn, MinusCircleIcon as bt, CornerDownLeftIcon as Un, SquareCodeIcon as Mn, EyeOffIcon as Gn, EyeIcon as Hn, UnplugIcon as Qn, SendIcon as Jn, CopyIcon as Wn, IdCardLanyardIcon as Xn, ShapesIcon as Kn, PlayIcon as Zn, CirclePlayIcon as Yn } from "lucide-react";
|
|
3
|
+
import { r as es, d as ts, a as ns, N as ss, aL as rs, m as jt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
4
4
|
import { Button as K } from "./ui/Button.js";
|
|
5
|
-
import { f as Ze, p as Ye, g as
|
|
6
|
-
import { Z as
|
|
5
|
+
import { f as Ze, p as Ye, g as zt, s as as, h as os, j as V } from "./ZudokuContext-C6wlLMUH.js";
|
|
6
|
+
import { Z as is } from "./invariant-B_t_F2s_.js";
|
|
7
7
|
import * as xe from "react";
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { VisuallyHidden as
|
|
10
|
-
import { z as
|
|
11
|
-
import { u as
|
|
12
|
-
import { B
|
|
13
|
-
import { D as et, a as tt, c as nt, d as
|
|
14
|
-
import { l as Ct, m as Nt, n as
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as oe, b as
|
|
8
|
+
import { createContext as Vt, use as ls, useRef as E, useEffect as U, useMemo as Bt, useCallback as D, startTransition as cs, useState as k, Fragment as le, useLayoutEffect as ds, useTransition as us, useContext as ms } from "react";
|
|
9
|
+
import { VisuallyHidden as ps } from "@radix-ui/react-visually-hidden";
|
|
10
|
+
import { z as hs } from "./index-DAWHN3cH.js";
|
|
11
|
+
import { u as fs } from "./hook-C35h0YhF.js";
|
|
12
|
+
import { B } from "./Button-GUVe7pmt.js";
|
|
13
|
+
import { D as et, a as tt, c as nt, d as _t, e as qt, g as gs } from "./Dialog-hlvmmQ_c.js";
|
|
14
|
+
import { l as Ct, m as Nt, n as wt, d as xs, o as ys, i as vs } from "./Zudoku-DA1yA-te.js";
|
|
15
|
+
import { u as bs } from "./useMutation-CFMGlAMW.js";
|
|
16
|
+
import { u as oe, b as Ut, C as St, a as js, F as Cs } from "./index.esm-BYObtETB.js";
|
|
17
17
|
import * as st from "@radix-ui/react-collapsible";
|
|
18
|
-
import { S as Mt, a as
|
|
19
|
-
import { c as
|
|
20
|
-
import { u as
|
|
18
|
+
import { S as Mt, a as Gt, b as Ht, c as Qt, e as Ae, g as Ns } from "./Secret-BDBqq4p3.js";
|
|
19
|
+
import { c as S } from "./cn-5-Gd1Dss.js";
|
|
20
|
+
import { u as ws } from "./useCopyToClipboard-B_085nfO.js";
|
|
21
21
|
import { u as Ss } from "./useLatest-hmRS46UF.js";
|
|
22
|
-
import { D as
|
|
23
|
-
import { I as
|
|
22
|
+
import { D as Jt, a as Wt, b as Xt, d as Ts, e as As, f as Os, c as Oe } from "./DropdownMenu-DN0jNrjj.js";
|
|
23
|
+
import { I as Ps } from "./Input-Cx-GeKoF.js";
|
|
24
24
|
import { c as ye } from "./createVariantComponent-Dc0vtOvr.js";
|
|
25
25
|
import * as Tt from "@radix-ui/react-checkbox";
|
|
26
|
-
import * as
|
|
27
|
-
import { PopoverAnchor as
|
|
28
|
-
import { P as
|
|
29
|
-
import { f as
|
|
30
|
-
import { C as
|
|
31
|
-
import * as
|
|
32
|
-
import { c as
|
|
26
|
+
import * as Pe from "@radix-ui/react-popover";
|
|
27
|
+
import { PopoverAnchor as $s } from "@radix-ui/react-popover";
|
|
28
|
+
import { P as Ls } from "./index-CrcNWbel.js";
|
|
29
|
+
import { f as ks, g as Es, C as Rs, b as Is } from "./Command-N6VujV30.js";
|
|
30
|
+
import { C as Ds } from "./Card-DCdq37aA.js";
|
|
31
|
+
import * as Kt from "@radix-ui/react-label";
|
|
32
|
+
import { c as Fs } from "./index-DI5SPFK9.js";
|
|
33
33
|
import * as he from "@radix-ui/react-radio-group";
|
|
34
|
-
import { S as
|
|
35
|
-
import { A as
|
|
36
|
-
import { e as
|
|
34
|
+
import { S as zs } from "./Spinner-CI6bRyZw.js";
|
|
35
|
+
import { A as Vs, a as Bs, b as _s } from "./Mermaid-JEnWyK0s.js";
|
|
36
|
+
import { e as qs, u as Us } from "./useSuspenseQuery-CSB_rVek.js";
|
|
37
37
|
let _e;
|
|
38
38
|
const Ms = (e) => {
|
|
39
39
|
if (e.errors?.[0])
|
|
40
|
-
throw new
|
|
40
|
+
throw new is(e.errors[0].message, {
|
|
41
41
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
class
|
|
44
|
+
class Gs {
|
|
45
45
|
constructor(n) {
|
|
46
46
|
this.config = n;
|
|
47
47
|
}
|
|
48
|
-
#e = async () => (_e || (_e = import("./createServer-
|
|
48
|
+
#e = async () => (_e || (_e = import("./createServer-DoRZ6tMa.js").then(
|
|
49
49
|
(n) => n.createServer(this.config)
|
|
50
50
|
)), _e);
|
|
51
51
|
#t = async (n) => this.config.server ? fetch(this.config.server, n) : (await this.#e()).fetch("http://localhost/graphql", n);
|
|
@@ -65,20 +65,20 @@ function qe(e, n) {
|
|
|
65
65
|
if (!!!e)
|
|
66
66
|
throw new Error(n);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Hs(e) {
|
|
69
69
|
return typeof e == "object" && e !== null;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Qs(e, n) {
|
|
72
72
|
if (!!!e)
|
|
73
73
|
throw new Error(
|
|
74
74
|
n ?? "Unexpected invariant triggered."
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const Js = /\r\n|[\n\r]/g;
|
|
78
78
|
function We(e, n) {
|
|
79
79
|
let s = 0, a = 1;
|
|
80
|
-
for (const r of e.body.matchAll(
|
|
81
|
-
if (typeof r.index == "number" ||
|
|
80
|
+
for (const r of e.body.matchAll(Js)) {
|
|
81
|
+
if (typeof r.index == "number" || Qs(!1), r.index >= n)
|
|
82
82
|
break;
|
|
83
83
|
s = r.index + r[0].length, a += 1;
|
|
84
84
|
}
|
|
@@ -87,23 +87,23 @@ function We(e, n) {
|
|
|
87
87
|
column: n + 1 - s
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function Ws(e) {
|
|
91
|
+
return Zt(
|
|
92
92
|
e.source,
|
|
93
93
|
We(e.source, e.start)
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Zt(e, n) {
|
|
97
97
|
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = n.line - 1, o = e.locationOffset.line - 1, i = n.line + o, c = n.line === 1 ? s : 0, l = n.column + c, m = `${e.name}:${i}:${l}
|
|
98
98
|
`, d = a.split(/\r\n|[\n\r]/g), f = d[r];
|
|
99
99
|
if (f.length > 120) {
|
|
100
|
-
const x = Math.floor(l / 80),
|
|
100
|
+
const x = Math.floor(l / 80), p = l % 80, v = [];
|
|
101
101
|
for (let u = 0; u < f.length; u += 80)
|
|
102
102
|
v.push(f.slice(u, u + 80));
|
|
103
103
|
return m + At([
|
|
104
104
|
[`${i} |`, v[0]],
|
|
105
105
|
...v.slice(1, x + 1).map((u) => ["|", u]),
|
|
106
|
-
["|", "^".padStart(
|
|
106
|
+
["|", "^".padStart(p)],
|
|
107
107
|
["|", v[x + 1]]
|
|
108
108
|
]);
|
|
109
109
|
}
|
|
@@ -120,7 +120,7 @@ function At(e) {
|
|
|
120
120
|
return n.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
121
121
|
`);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Xs(e) {
|
|
124
124
|
const n = e[0];
|
|
125
125
|
return n == null || "kind" in n || "length" in n ? {
|
|
126
126
|
nodes: n,
|
|
@@ -172,18 +172,18 @@ class rt extends Error {
|
|
|
172
172
|
*/
|
|
173
173
|
constructor(n, ...s) {
|
|
174
174
|
var a, r, o;
|
|
175
|
-
const { nodes: i, source: c, positions: l, path: m, originalError: d, extensions: f } =
|
|
176
|
-
super(n), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = d ?? void 0, this.nodes =
|
|
175
|
+
const { nodes: i, source: c, positions: l, path: m, originalError: d, extensions: f } = Xs(s);
|
|
176
|
+
super(n), this.name = "GraphQLError", this.path = m ?? void 0, this.originalError = d ?? void 0, this.nodes = Ot(
|
|
177
177
|
Array.isArray(i) ? i : i ? [i] : void 0
|
|
178
178
|
);
|
|
179
|
-
const x =
|
|
179
|
+
const x = Ot(
|
|
180
180
|
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((v) => v.loc).filter((v) => v != null)
|
|
181
181
|
);
|
|
182
182
|
this.source = c ?? (x == null || (r = x[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? x?.map((v) => v.start), this.locations = l && c ? l.map((v) => We(c, v)) : x?.map((v) => We(v.source, v.start));
|
|
183
|
-
const
|
|
183
|
+
const p = Hs(
|
|
184
184
|
d?.extensions
|
|
185
185
|
) ? d?.extensions : void 0;
|
|
186
|
-
this.extensions = (o = f ??
|
|
186
|
+
this.extensions = (o = f ?? p) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
187
187
|
message: {
|
|
188
188
|
writable: !0,
|
|
189
189
|
enumerable: !0
|
|
@@ -222,12 +222,12 @@ class rt extends Error {
|
|
|
222
222
|
for (const s of this.nodes)
|
|
223
223
|
s.loc && (n += `
|
|
224
224
|
|
|
225
|
-
` +
|
|
225
|
+
` + Ws(s.loc));
|
|
226
226
|
else if (this.source && this.locations)
|
|
227
227
|
for (const s of this.locations)
|
|
228
228
|
n += `
|
|
229
229
|
|
|
230
|
-
` +
|
|
230
|
+
` + Zt(this.source, s);
|
|
231
231
|
return n;
|
|
232
232
|
}
|
|
233
233
|
toJSON() {
|
|
@@ -237,7 +237,7 @@ class rt extends Error {
|
|
|
237
237
|
return this.locations != null && (n.locations = this.locations), this.path != null && (n.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (n.extensions = this.extensions), n;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Ot(e) {
|
|
241
241
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
242
242
|
}
|
|
243
243
|
function F(e, n, s) {
|
|
@@ -246,7 +246,7 @@ function F(e, n, s) {
|
|
|
246
246
|
positions: [n]
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
class
|
|
249
|
+
class to {
|
|
250
250
|
/**
|
|
251
251
|
* The character offset at which this Node begins.
|
|
252
252
|
*/
|
|
@@ -275,7 +275,7 @@ class Za {
|
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
class
|
|
278
|
+
class Yt {
|
|
279
279
|
/**
|
|
280
280
|
* The kind of Token.
|
|
281
281
|
*/
|
|
@@ -317,7 +317,7 @@ class Zt {
|
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const Ks = {
|
|
321
321
|
Name: [],
|
|
322
322
|
Document: ["definitions"],
|
|
323
323
|
OperationDefinition: [
|
|
@@ -404,10 +404,10 @@ const Xs = {
|
|
|
404
404
|
ArgumentCoordinate: ["name", "fieldName", "argumentName"],
|
|
405
405
|
DirectiveCoordinate: ["name"],
|
|
406
406
|
DirectiveArgumentCoordinate: ["name", "argumentName"]
|
|
407
|
-
},
|
|
408
|
-
function
|
|
407
|
+
}, Zs = new Set(Object.keys(Ks));
|
|
408
|
+
function no(e) {
|
|
409
409
|
const n = e?.kind;
|
|
410
|
-
return typeof n == "string" &&
|
|
410
|
+
return typeof n == "string" && Zs.has(n);
|
|
411
411
|
}
|
|
412
412
|
var Pt;
|
|
413
413
|
(function(e) {
|
|
@@ -419,22 +419,22 @@ function Xe(e) {
|
|
|
419
419
|
function fe(e) {
|
|
420
420
|
return e >= 48 && e <= 57;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function en(e) {
|
|
423
423
|
return e >= 97 && e <= 122 || // A-Z
|
|
424
424
|
e >= 65 && e <= 90;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
427
|
-
return
|
|
428
|
-
}
|
|
429
|
-
function Zs(e) {
|
|
430
|
-
return Yt(e) || fe(e) || e === 95;
|
|
426
|
+
function tn(e) {
|
|
427
|
+
return en(e) || e === 95;
|
|
431
428
|
}
|
|
432
429
|
function Ys(e) {
|
|
430
|
+
return en(e) || fe(e) || e === 95;
|
|
431
|
+
}
|
|
432
|
+
function er(e) {
|
|
433
433
|
var n;
|
|
434
434
|
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
435
435
|
for (let i = 0; i < e.length; ++i) {
|
|
436
436
|
var o;
|
|
437
|
-
const c = e[i], l =
|
|
437
|
+
const c = e[i], l = tr(c);
|
|
438
438
|
l !== c.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && l < s && (s = l));
|
|
439
439
|
}
|
|
440
440
|
return e.map((i, c) => c === 0 ? i : i.slice(s)).slice(
|
|
@@ -442,14 +442,14 @@ function Ys(e) {
|
|
|
442
442
|
r + 1
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function tr(e) {
|
|
446
446
|
let n = 0;
|
|
447
447
|
for (; n < e.length && Xe(e.charCodeAt(n)); )
|
|
448
448
|
++n;
|
|
449
449
|
return n;
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((
|
|
451
|
+
function nr(e, n) {
|
|
452
|
+
const s = e.replace(/"""/g, '\\"""'), a = s.split(/\r\n|[\n\r]/g), r = a.length === 1, o = a.length > 1 && a.slice(1).every((p) => p.length === 0 || Xe(p.charCodeAt(0))), i = s.endsWith('\\"""'), c = e.endsWith('"') && !i, l = e.endsWith("\\"), m = c || l, d = !(n != null && n.minimize) && // add leading and trailing new lines only if it improves readability
|
|
453
453
|
(!r || e.length > 70 || m || o || i);
|
|
454
454
|
let f = "";
|
|
455
455
|
const x = r && Xe(e.charCodeAt(0));
|
|
@@ -461,7 +461,7 @@ var b;
|
|
|
461
461
|
(function(e) {
|
|
462
462
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.DOT = ".", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
463
463
|
})(b || (b = {}));
|
|
464
|
-
class
|
|
464
|
+
class sr {
|
|
465
465
|
/**
|
|
466
466
|
* The previously focused non-ignored token.
|
|
467
467
|
*/
|
|
@@ -475,7 +475,7 @@ class nr {
|
|
|
475
475
|
* The character offset at which the current line begins.
|
|
476
476
|
*/
|
|
477
477
|
constructor(n) {
|
|
478
|
-
const s = new
|
|
478
|
+
const s = new Yt(b.SOF, 0, 0, 0, 0);
|
|
479
479
|
this.source = n, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
480
480
|
}
|
|
481
481
|
get [Symbol.toStringTag]() {
|
|
@@ -498,26 +498,26 @@ class nr {
|
|
|
498
498
|
if (n.next)
|
|
499
499
|
n = n.next;
|
|
500
500
|
else {
|
|
501
|
-
const s =
|
|
501
|
+
const s = ar(this, n.end);
|
|
502
502
|
n.next = s, s.prev = n, n = s;
|
|
503
503
|
}
|
|
504
504
|
while (n.kind === b.COMMENT);
|
|
505
505
|
return n;
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function rr(e) {
|
|
509
509
|
return e === b.BANG || e === b.DOLLAR || e === b.AMP || e === b.PAREN_L || e === b.PAREN_R || e === b.DOT || e === b.SPREAD || e === b.COLON || e === b.EQUALS || e === b.AT || e === b.BRACKET_L || e === b.BRACKET_R || e === b.BRACE_L || e === b.PIPE || e === b.BRACE_R;
|
|
510
510
|
}
|
|
511
511
|
function ie(e) {
|
|
512
512
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
return
|
|
514
|
+
function Le(e, n) {
|
|
515
|
+
return nn(e.charCodeAt(n)) && sn(e.charCodeAt(n + 1));
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function nn(e) {
|
|
518
518
|
return e >= 55296 && e <= 56319;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function sn(e) {
|
|
521
521
|
return e >= 56320 && e <= 57343;
|
|
522
522
|
}
|
|
523
523
|
function Z(e, n) {
|
|
@@ -532,9 +532,9 @@ function Z(e, n) {
|
|
|
532
532
|
}
|
|
533
533
|
function P(e, n, s, a, r) {
|
|
534
534
|
const o = e.line, i = 1 + s - e.lineStart;
|
|
535
|
-
return new
|
|
535
|
+
return new Yt(n, s, a, o, i, r);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function ar(e, n) {
|
|
538
538
|
const s = e.source.body, a = s.length;
|
|
539
539
|
let r = n;
|
|
540
540
|
for (; r < a; ) {
|
|
@@ -575,7 +575,7 @@ function rr(e, n) {
|
|
|
575
575
|
continue;
|
|
576
576
|
// Comment
|
|
577
577
|
case 35:
|
|
578
|
-
return
|
|
578
|
+
return or(e, r);
|
|
579
579
|
// Token ::
|
|
580
580
|
// - Punctuator
|
|
581
581
|
// - Name
|
|
@@ -616,21 +616,21 @@ function rr(e, n) {
|
|
|
616
616
|
return P(e, b.BRACE_R, r, r + 1);
|
|
617
617
|
// StringValue
|
|
618
618
|
case 34:
|
|
619
|
-
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ?
|
|
619
|
+
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? mr(e, r) : lr(e, r);
|
|
620
620
|
}
|
|
621
621
|
if (fe(o) || o === 45)
|
|
622
|
-
return
|
|
623
|
-
if (
|
|
624
|
-
return
|
|
622
|
+
return ir(e, r, o);
|
|
623
|
+
if (tn(o))
|
|
624
|
+
return pr(e, r);
|
|
625
625
|
throw F(
|
|
626
626
|
e.source,
|
|
627
627
|
r,
|
|
628
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : ie(o) ||
|
|
628
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : ie(o) || Le(s, r) ? `Unexpected character: ${Z(e, r)}.` : `Invalid character: ${Z(e, r)}.`
|
|
629
629
|
);
|
|
630
630
|
}
|
|
631
631
|
return P(e, b.EOF, a, a);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function or(e, n) {
|
|
634
634
|
const s = e.source.body, a = s.length;
|
|
635
635
|
let r = n + 1;
|
|
636
636
|
for (; r < a; ) {
|
|
@@ -639,7 +639,7 @@ function ar(e, n) {
|
|
|
639
639
|
break;
|
|
640
640
|
if (ie(o))
|
|
641
641
|
++r;
|
|
642
|
-
else if (
|
|
642
|
+
else if (Le(s, r))
|
|
643
643
|
r += 2;
|
|
644
644
|
else
|
|
645
645
|
break;
|
|
@@ -652,7 +652,7 @@ function ar(e, n) {
|
|
|
652
652
|
s.slice(n + 1, r)
|
|
653
653
|
);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function ir(e, n, s) {
|
|
656
656
|
const a = e.source.body;
|
|
657
657
|
let r = n, o = s, i = !1;
|
|
658
658
|
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
@@ -666,8 +666,8 @@ function or(e, n, s) {
|
|
|
666
666
|
)}.`
|
|
667
667
|
);
|
|
668
668
|
} else
|
|
669
|
-
r =
|
|
670
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r =
|
|
669
|
+
r = Ue(e, r, o), o = a.charCodeAt(r);
|
|
670
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Ue(e, r, o), o = a.charCodeAt(r)), (o === 69 || o === 101) && (i = !0, o = a.charCodeAt(++r), (o === 43 || o === 45) && (o = a.charCodeAt(++r)), r = Ue(e, r, o), o = a.charCodeAt(r)), o === 46 || tn(o))
|
|
671
671
|
throw F(
|
|
672
672
|
e.source,
|
|
673
673
|
r,
|
|
@@ -684,7 +684,7 @@ function or(e, n, s) {
|
|
|
684
684
|
a.slice(n, r)
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function Ue(e, n, s) {
|
|
688
688
|
if (!fe(s))
|
|
689
689
|
throw F(
|
|
690
690
|
e.source,
|
|
@@ -700,7 +700,7 @@ function Me(e, n, s) {
|
|
|
700
700
|
++r;
|
|
701
701
|
return r;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function lr(e, n) {
|
|
704
704
|
const s = e.source.body, a = s.length;
|
|
705
705
|
let r = n + 1, o = r, i = "";
|
|
706
706
|
for (; r < a; ) {
|
|
@@ -709,7 +709,7 @@ function ir(e, n) {
|
|
|
709
709
|
return i += s.slice(o, r), P(e, b.STRING, n, r + 1, i);
|
|
710
710
|
if (c === 92) {
|
|
711
711
|
i += s.slice(o, r);
|
|
712
|
-
const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ?
|
|
712
|
+
const l = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? cr(e, r) : dr(e, r) : ur(e, r);
|
|
713
713
|
i += l.value, r += l.size, o = r;
|
|
714
714
|
continue;
|
|
715
715
|
}
|
|
@@ -717,7 +717,7 @@ function ir(e, n) {
|
|
|
717
717
|
break;
|
|
718
718
|
if (ie(c))
|
|
719
719
|
++r;
|
|
720
|
-
else if (
|
|
720
|
+
else if (Le(s, r))
|
|
721
721
|
r += 2;
|
|
722
722
|
else
|
|
723
723
|
throw F(
|
|
@@ -731,7 +731,7 @@ function ir(e, n) {
|
|
|
731
731
|
}
|
|
732
732
|
throw F(e.source, r, "Unterminated string.");
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function cr(e, n) {
|
|
735
735
|
const s = e.source.body;
|
|
736
736
|
let a = 0, r = 3;
|
|
737
737
|
for (; r < 12; ) {
|
|
@@ -756,16 +756,16 @@ function lr(e, n) {
|
|
|
756
756
|
)}".`
|
|
757
757
|
);
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
const s = e.source.body, a =
|
|
759
|
+
function dr(e, n) {
|
|
760
|
+
const s = e.source.body, a = $t(s, n + 2);
|
|
761
761
|
if (ie(a))
|
|
762
762
|
return {
|
|
763
763
|
value: String.fromCodePoint(a),
|
|
764
764
|
size: 6
|
|
765
765
|
};
|
|
766
|
-
if (
|
|
767
|
-
const r =
|
|
768
|
-
if (
|
|
766
|
+
if (nn(a) && s.charCodeAt(n + 6) === 92 && s.charCodeAt(n + 7) === 117) {
|
|
767
|
+
const r = $t(s, n + 8);
|
|
768
|
+
if (sn(r))
|
|
769
769
|
return {
|
|
770
770
|
value: String.fromCodePoint(a, r),
|
|
771
771
|
size: 12
|
|
@@ -777,13 +777,13 @@ function cr(e, n) {
|
|
|
777
777
|
`Invalid Unicode escape sequence: "${s.slice(n, n + 6)}".`
|
|
778
778
|
);
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function $t(e, n) {
|
|
781
781
|
return ce(e.charCodeAt(n)) << 12 | ce(e.charCodeAt(n + 1)) << 8 | ce(e.charCodeAt(n + 2)) << 4 | ce(e.charCodeAt(n + 3));
|
|
782
782
|
}
|
|
783
783
|
function ce(e) {
|
|
784
784
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function ur(e, n) {
|
|
787
787
|
const s = e.source.body;
|
|
788
788
|
switch (s.charCodeAt(n + 1)) {
|
|
789
789
|
case 34:
|
|
@@ -837,7 +837,7 @@ function dr(e, n) {
|
|
|
837
837
|
)}".`
|
|
838
838
|
);
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function mr(e, n) {
|
|
841
841
|
const s = e.source.body, a = s.length;
|
|
842
842
|
let r = e.lineStart, o = n + 3, i = o, c = "";
|
|
843
843
|
const l = [];
|
|
@@ -851,7 +851,7 @@ function ur(e, n) {
|
|
|
851
851
|
n,
|
|
852
852
|
o + 3,
|
|
853
853
|
// Return a string of the lines joined with U+000A.
|
|
854
|
-
|
|
854
|
+
er(l).join(`
|
|
855
855
|
`)
|
|
856
856
|
);
|
|
857
857
|
return e.line += l.length - 1, e.lineStart = r, d;
|
|
@@ -866,7 +866,7 @@ function ur(e, n) {
|
|
|
866
866
|
}
|
|
867
867
|
if (ie(m))
|
|
868
868
|
++o;
|
|
869
|
-
else if (
|
|
869
|
+
else if (Le(s, o))
|
|
870
870
|
o += 2;
|
|
871
871
|
else
|
|
872
872
|
throw F(
|
|
@@ -880,12 +880,12 @@ function ur(e, n) {
|
|
|
880
880
|
}
|
|
881
881
|
throw F(e.source, o, "Unterminated string.");
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function pr(e, n) {
|
|
884
884
|
const s = e.source.body, a = s.length;
|
|
885
885
|
let r = n + 1;
|
|
886
886
|
for (; r < a; ) {
|
|
887
887
|
const o = s.charCodeAt(r);
|
|
888
|
-
if (
|
|
888
|
+
if (Ys(o))
|
|
889
889
|
++r;
|
|
890
890
|
else
|
|
891
891
|
break;
|
|
@@ -898,56 +898,56 @@ function mr(e, n) {
|
|
|
898
898
|
s.slice(n, r)
|
|
899
899
|
);
|
|
900
900
|
}
|
|
901
|
-
const
|
|
902
|
-
function
|
|
903
|
-
return
|
|
901
|
+
const hr = 10, rn = 2;
|
|
902
|
+
function an(e) {
|
|
903
|
+
return ke(e, []);
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function ke(e, n) {
|
|
906
906
|
switch (typeof e) {
|
|
907
907
|
case "string":
|
|
908
908
|
return JSON.stringify(e);
|
|
909
909
|
case "function":
|
|
910
910
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
911
911
|
case "object":
|
|
912
|
-
return
|
|
912
|
+
return fr(e, n);
|
|
913
913
|
default:
|
|
914
914
|
return String(e);
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function fr(e, n) {
|
|
918
918
|
if (e === null)
|
|
919
919
|
return "null";
|
|
920
920
|
if (n.includes(e))
|
|
921
921
|
return "[Circular]";
|
|
922
922
|
const s = [...n, e];
|
|
923
|
-
if (
|
|
923
|
+
if (gr(e)) {
|
|
924
924
|
const a = e.toJSON();
|
|
925
925
|
if (a !== e)
|
|
926
|
-
return typeof a == "string" ? a :
|
|
926
|
+
return typeof a == "string" ? a : ke(a, s);
|
|
927
927
|
} else if (Array.isArray(e))
|
|
928
|
-
return
|
|
929
|
-
return
|
|
928
|
+
return yr(e, s);
|
|
929
|
+
return xr(e, s);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function gr(e) {
|
|
932
932
|
return typeof e.toJSON == "function";
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function xr(e, n) {
|
|
935
935
|
const s = Object.entries(e);
|
|
936
|
-
return s.length === 0 ? "{}" : n.length >
|
|
937
|
-
([r, o]) => r + ": " +
|
|
936
|
+
return s.length === 0 ? "{}" : n.length > rn ? "[" + vr(e) + "]" : "{ " + s.map(
|
|
937
|
+
([r, o]) => r + ": " + ke(o, n)
|
|
938
938
|
).join(", ") + " }";
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function yr(e, n) {
|
|
941
941
|
if (e.length === 0)
|
|
942
942
|
return "[]";
|
|
943
|
-
if (n.length >
|
|
943
|
+
if (n.length > rn)
|
|
944
944
|
return "[Array]";
|
|
945
|
-
const s = Math.min(
|
|
945
|
+
const s = Math.min(hr, e.length), a = e.length - s, r = [];
|
|
946
946
|
for (let o = 0; o < s; ++o)
|
|
947
|
-
r.push(
|
|
947
|
+
r.push(ke(e[o], n));
|
|
948
948
|
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function vr(e) {
|
|
951
951
|
const n = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
952
952
|
if (n === "Object" && typeof e.constructor == "function") {
|
|
953
953
|
const s = e.constructor.name;
|
|
@@ -956,11 +956,11 @@ function yr(e) {
|
|
|
956
956
|
}
|
|
957
957
|
return n;
|
|
958
958
|
}
|
|
959
|
-
const
|
|
960
|
-
process.env.NODE_ENV === "production",
|
|
959
|
+
const br = globalThis.process && // eslint-disable-next-line no-undef
|
|
960
|
+
process.env.NODE_ENV === "production", jr = (
|
|
961
961
|
/* c8 ignore next 6 */
|
|
962
962
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
963
|
-
|
|
963
|
+
br ? function(n, s) {
|
|
964
964
|
return n instanceof s;
|
|
965
965
|
} : function(n, s) {
|
|
966
966
|
if (n instanceof s)
|
|
@@ -972,7 +972,7 @@ process.env.NODE_ENV === "production", br = (
|
|
|
972
972
|
Symbol.toStringTag in n ? n[Symbol.toStringTag] : (a = n.constructor) === null || a === void 0 ? void 0 : a.name
|
|
973
973
|
);
|
|
974
974
|
if (r === o) {
|
|
975
|
-
const i =
|
|
975
|
+
const i = an(n);
|
|
976
976
|
throw new Error(`Cannot use ${r} "${i}" from another module or realm.
|
|
977
977
|
|
|
978
978
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
@@ -990,12 +990,12 @@ spurious results.`);
|
|
|
990
990
|
return !1;
|
|
991
991
|
}
|
|
992
992
|
);
|
|
993
|
-
class
|
|
993
|
+
class on {
|
|
994
994
|
constructor(n, s = "GraphQL request", a = {
|
|
995
995
|
line: 1,
|
|
996
996
|
column: 1
|
|
997
997
|
}) {
|
|
998
|
-
typeof n == "string" || qe(!1, `Body must be a string. Received: ${
|
|
998
|
+
typeof n == "string" || qe(!1, `Body must be a string. Received: ${an(n)}.`), this.body = n, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || qe(
|
|
999
999
|
!1,
|
|
1000
1000
|
"line in locationOffset is 1-indexed and must be positive."
|
|
1001
1001
|
), this.locationOffset.column > 0 || qe(
|
|
@@ -1007,35 +1007,35 @@ class an {
|
|
|
1007
1007
|
return "Source";
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
function jr(e) {
|
|
1011
|
-
return br(e, an);
|
|
1012
|
-
}
|
|
1013
1010
|
function Cr(e) {
|
|
1014
|
-
|
|
1011
|
+
return jr(e, on);
|
|
1012
|
+
}
|
|
1013
|
+
function Nr(e) {
|
|
1014
|
+
const n = Cr(e) ? e : new on(e), s = n.body, a = new sr(n);
|
|
1015
1015
|
let r = "", o = !1;
|
|
1016
1016
|
for (; a.advance().kind !== b.EOF; ) {
|
|
1017
|
-
const i = a.token, c = i.kind, l = !
|
|
1017
|
+
const i = a.token, c = i.kind, l = !rr(i.kind);
|
|
1018
1018
|
o && (l || i.kind === b.SPREAD) && (r += " ");
|
|
1019
1019
|
const m = s.slice(i.start, i.end);
|
|
1020
|
-
c === b.BLOCK_STRING ? r +=
|
|
1020
|
+
c === b.BLOCK_STRING ? r += nr(i.value, {
|
|
1021
1021
|
minimize: !0
|
|
1022
1022
|
}) : r += m, o = l;
|
|
1023
1023
|
}
|
|
1024
1024
|
return r;
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1026
|
+
const ln = Vt(
|
|
1027
1027
|
void 0
|
|
1028
|
-
),
|
|
1028
|
+
), so = ({
|
|
1029
1029
|
children: e,
|
|
1030
1030
|
client: n
|
|
1031
|
-
}) => /* @__PURE__ */ t.jsx(
|
|
1031
|
+
}) => /* @__PURE__ */ t.jsx(ln.Provider, { value: n, children: e }), cn = (e, n, ...[s]) => ({
|
|
1032
1032
|
queryFn: () => e.fetch(n, s),
|
|
1033
|
-
queryKey: [
|
|
1034
|
-
}),
|
|
1035
|
-
const s =
|
|
1033
|
+
queryKey: [Nr(n.toString()), s]
|
|
1034
|
+
}), wr = (e, ...[n]) => {
|
|
1035
|
+
const s = ls(ln);
|
|
1036
1036
|
if (s === void 0)
|
|
1037
1037
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1038
|
-
return
|
|
1038
|
+
return cn(s, e, ...n === void 0 ? [] : [n]);
|
|
1039
1039
|
};
|
|
1040
1040
|
class ee extends String {
|
|
1041
1041
|
__apiType;
|
|
@@ -1120,7 +1120,7 @@ const Sr = new ee(
|
|
|
1120
1120
|
}
|
|
1121
1121
|
`,
|
|
1122
1122
|
{ fragmentName: "OperationsFragment" }
|
|
1123
|
-
),
|
|
1123
|
+
), Tr = new ee(`
|
|
1124
1124
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1125
1125
|
schema(input: $input, type: $type) {
|
|
1126
1126
|
url
|
|
@@ -1129,13 +1129,13 @@ const Sr = new ee(
|
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
`),
|
|
1132
|
+
`), Ar = new ee(`
|
|
1133
1133
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1134
1134
|
schema(input: $input, type: $type) {
|
|
1135
1135
|
openapi
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
|
-
`),
|
|
1138
|
+
`), Or = new ee(`
|
|
1139
1139
|
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1140
1140
|
schema(input: $input, type: $type) {
|
|
1141
1141
|
servers {
|
|
@@ -1234,7 +1234,7 @@ const Sr = new ee(
|
|
|
1234
1234
|
schema
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
|
-
}`),
|
|
1237
|
+
}`), Pr = new ee(`
|
|
1238
1238
|
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1239
1239
|
schema(input: $input, type: $type) {
|
|
1240
1240
|
title
|
|
@@ -1249,7 +1249,7 @@ const Sr = new ee(
|
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
|
-
`),
|
|
1252
|
+
`), $r = new ee(`
|
|
1253
1253
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1254
1254
|
schema(input: $input, type: $type) {
|
|
1255
1255
|
url
|
|
@@ -1258,7 +1258,7 @@ const Sr = new ee(
|
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
1260
|
}
|
|
1261
|
-
`),
|
|
1261
|
+
`), Lr = new ee(`
|
|
1262
1262
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1263
1263
|
schema(input: $input, type: $type) {
|
|
1264
1264
|
extensions
|
|
@@ -1281,19 +1281,19 @@ const Sr = new ee(
|
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
|
-
`),
|
|
1285
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1284
|
+
`), kr = {
|
|
1285
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": Tr,
|
|
1286
1286
|
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n servers {\n url\n description\n }\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": Sr,
|
|
1287
|
-
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n":
|
|
1288
|
-
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n":
|
|
1289
|
-
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n":
|
|
1290
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1291
|
-
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
|
|
1287
|
+
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": Ar,
|
|
1288
|
+
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n extensions\n next {\n name\n slug\n extensions\n }\n prev {\n name\n slug\n extensions\n }\n }\n }\n }\n": Or,
|
|
1289
|
+
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": Pr,
|
|
1290
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": $r,
|
|
1291
|
+
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n extensions\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": Lr
|
|
1292
1292
|
};
|
|
1293
1293
|
function Er(e) {
|
|
1294
|
-
return
|
|
1294
|
+
return kr[e] ?? {};
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function _({
|
|
1297
1297
|
...e
|
|
1298
1298
|
}) {
|
|
1299
1299
|
return /* @__PURE__ */ t.jsx(st.Root, { "data-slot": "collapsible", ...e });
|
|
@@ -1309,7 +1309,7 @@ function de({
|
|
|
1309
1309
|
}
|
|
1310
1310
|
);
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function q({
|
|
1313
1313
|
...e
|
|
1314
1314
|
}) {
|
|
1315
1315
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1320,7 +1320,7 @@ function _({
|
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1323
|
+
function Rr() {
|
|
1324
1324
|
const n = navigator.userAgent.toLowerCase();
|
|
1325
1325
|
if (n.indexOf("win") !== -1)
|
|
1326
1326
|
return "windows";
|
|
@@ -1331,10 +1331,10 @@ function kr() {
|
|
|
1331
1331
|
if (n.indexOf("x11") !== -1)
|
|
1332
1332
|
return "unix";
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1334
|
+
function Ir() {
|
|
1335
|
+
return Rr() === "apple";
|
|
1336
1336
|
}
|
|
1337
|
-
const
|
|
1337
|
+
const Dr = {
|
|
1338
1338
|
other: {
|
|
1339
1339
|
alt: "Alt",
|
|
1340
1340
|
meta: "Ctrl",
|
|
@@ -1349,11 +1349,11 @@ const Ir = {
|
|
|
1349
1349
|
shift: "⇧",
|
|
1350
1350
|
option: "⌥"
|
|
1351
1351
|
}
|
|
1352
|
-
},
|
|
1352
|
+
}, Fr = (e, n) => {
|
|
1353
1353
|
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), c = e.split("+").pop(), l = E(n);
|
|
1354
|
-
return
|
|
1354
|
+
return U(() => {
|
|
1355
1355
|
l.current = n;
|
|
1356
|
-
}, [n]),
|
|
1356
|
+
}, [n]), U(() => {
|
|
1357
1357
|
const m = (d) => {
|
|
1358
1358
|
(d.code === `Key${c?.toUpperCase()}` || d.code.toLowerCase() === c?.toLowerCase()) && d.metaKey === a && d.shiftKey === r && d.altKey === o && d.ctrlKey === i && (d.preventDefault(), l.current());
|
|
1359
1359
|
};
|
|
@@ -1363,10 +1363,10 @@ const Ir = {
|
|
|
1363
1363
|
}, [c, a, r, o, i]), {
|
|
1364
1364
|
trigger: () => l.current(),
|
|
1365
1365
|
label: s.map(
|
|
1366
|
-
(m) => m === "meta" || m === "ctrl" || m === "alt" || m === "shift" || m === "option" ? Ir
|
|
1366
|
+
(m) => m === "meta" || m === "ctrl" || m === "alt" || m === "shift" || m === "option" ? Dr[Ir() ? "apple" : "other"][m] : m
|
|
1367
1367
|
)
|
|
1368
1368
|
};
|
|
1369
|
-
},
|
|
1369
|
+
}, zr = Ze()(
|
|
1370
1370
|
Ye(
|
|
1371
1371
|
(e) => ({
|
|
1372
1372
|
selectedServer: void 0,
|
|
@@ -1374,17 +1374,17 @@ const Ir = {
|
|
|
1374
1374
|
}),
|
|
1375
1375
|
{ name: "zudoku-selected-server" }
|
|
1376
1376
|
)
|
|
1377
|
-
),
|
|
1378
|
-
const { selectedServer: n, setSelectedServer: s } =
|
|
1379
|
-
return { selectedServer:
|
|
1377
|
+
), Vr = (e) => {
|
|
1378
|
+
const { selectedServer: n, setSelectedServer: s } = zr();
|
|
1379
|
+
return { selectedServer: Bt(
|
|
1380
1380
|
() => n && e.some((r) => r.url === n) ? n : e.at(0)?.url ?? "",
|
|
1381
1381
|
[n, e]
|
|
1382
1382
|
), setSelectedServer: s };
|
|
1383
|
-
},
|
|
1383
|
+
}, dn = xe.forwardRef(
|
|
1384
1384
|
({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
1385
1385
|
"textarea",
|
|
1386
1386
|
{
|
|
1387
|
-
className:
|
|
1387
|
+
className: S(
|
|
1388
1388
|
"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-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1389
1389
|
e
|
|
1390
1390
|
),
|
|
@@ -1393,8 +1393,8 @@ const Ir = {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
)
|
|
1395
1395
|
);
|
|
1396
|
-
|
|
1397
|
-
const
|
|
1396
|
+
dn.displayName = "Textarea";
|
|
1397
|
+
const ve = (e = 0) => {
|
|
1398
1398
|
if (e === 0)
|
|
1399
1399
|
return "0 B";
|
|
1400
1400
|
const n = Math.floor(Math.log(e) / Math.log(1e3));
|
|
@@ -1405,7 +1405,7 @@ const Ee = (e = 0) => {
|
|
|
1405
1405
|
}) => /* @__PURE__ */ t.jsxs(
|
|
1406
1406
|
"div",
|
|
1407
1407
|
{
|
|
1408
|
-
className:
|
|
1408
|
+
className: S(
|
|
1409
1409
|
"grid grid-cols-[max-content_1fr_max-content] items-center gap-2 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
1410
1410
|
n
|
|
1411
1411
|
),
|
|
@@ -1414,20 +1414,20 @@ const Ee = (e = 0) => {
|
|
|
1414
1414
|
/* @__PURE__ */ t.jsxs(
|
|
1415
1415
|
de,
|
|
1416
1416
|
{
|
|
1417
|
-
className:
|
|
1417
|
+
className: S(
|
|
1418
1418
|
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 opacity-75 rounded-md",
|
|
1419
1419
|
n
|
|
1420
1420
|
),
|
|
1421
1421
|
children: [
|
|
1422
1422
|
/* @__PURE__ */ t.jsx(
|
|
1423
|
-
|
|
1423
|
+
kn,
|
|
1424
1424
|
{
|
|
1425
1425
|
className: "group-data-[state=closed]:hidden shrink-0",
|
|
1426
1426
|
size: 14
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
1429
|
/* @__PURE__ */ t.jsx(
|
|
1430
|
-
|
|
1430
|
+
En,
|
|
1431
1431
|
{
|
|
1432
1432
|
className: "group-data-[state=open]:hidden shrink-0",
|
|
1433
1433
|
size: 14
|
|
@@ -1441,12 +1441,12 @@ const Ee = (e = 0) => {
|
|
|
1441
1441
|
), H = ({
|
|
1442
1442
|
children: e,
|
|
1443
1443
|
className: n
|
|
1444
|
-
}) => /* @__PURE__ */ t.jsx("span", { className:
|
|
1444
|
+
}) => /* @__PURE__ */ t.jsx("span", { className: S("font-semibold w-full text-start", n), children: e }), Br = ({
|
|
1445
1445
|
examples: e,
|
|
1446
1446
|
onSelect: n
|
|
1447
|
-
}) => /* @__PURE__ */ t.jsxs(
|
|
1448
|
-
/* @__PURE__ */ t.jsx(
|
|
1449
|
-
|
|
1447
|
+
}) => /* @__PURE__ */ t.jsxs(Jt, { children: [
|
|
1448
|
+
/* @__PURE__ */ t.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
1449
|
+
B,
|
|
1450
1450
|
{
|
|
1451
1451
|
variant: "ghost",
|
|
1452
1452
|
size: "sm",
|
|
@@ -1457,11 +1457,11 @@ const Ee = (e = 0) => {
|
|
|
1457
1457
|
]
|
|
1458
1458
|
}
|
|
1459
1459
|
) }),
|
|
1460
|
-
/* @__PURE__ */ t.jsx(
|
|
1461
|
-
/* @__PURE__ */ t.jsx(
|
|
1462
|
-
/* @__PURE__ */ t.jsx(
|
|
1463
|
-
/* @__PURE__ */ t.jsx(
|
|
1464
|
-
|
|
1460
|
+
/* @__PURE__ */ t.jsx(Xt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
1461
|
+
/* @__PURE__ */ t.jsx(Ts, { children: s.mediaType }),
|
|
1462
|
+
/* @__PURE__ */ t.jsx(As, {}),
|
|
1463
|
+
/* @__PURE__ */ t.jsx(Os, { children: s.examples?.map((a) => /* @__PURE__ */ t.jsx(
|
|
1464
|
+
Oe,
|
|
1465
1465
|
{
|
|
1466
1466
|
onSelect: () => n(a, s.mediaType),
|
|
1467
1467
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -1476,14 +1476,14 @@ const Ee = (e = 0) => {
|
|
|
1476
1476
|
a.name
|
|
1477
1477
|
)) })
|
|
1478
1478
|
] }, s.mediaType)) })
|
|
1479
|
-
] }),
|
|
1479
|
+
] }), Ee = ye(
|
|
1480
1480
|
"div",
|
|
1481
1481
|
"grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5 [&>*:last-child_[data-slot=remove-button]]:invisible"
|
|
1482
1482
|
), ge = ye(
|
|
1483
1483
|
"div",
|
|
1484
1484
|
"group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
|
|
1485
1485
|
), I = ye(
|
|
1486
|
-
|
|
1486
|
+
Ps,
|
|
1487
1487
|
"w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
|
|
1488
1488
|
), at = ({
|
|
1489
1489
|
onClick: e,
|
|
@@ -1493,7 +1493,7 @@ const Ee = (e = 0) => {
|
|
|
1493
1493
|
{
|
|
1494
1494
|
size: "icon-xs",
|
|
1495
1495
|
variant: "ghost",
|
|
1496
|
-
className:
|
|
1496
|
+
className: S(
|
|
1497
1497
|
"text-muted-foreground opacity-0 group-hover:brightness-95 focus-visible:opacity-100 group-hover:opacity-100",
|
|
1498
1498
|
n
|
|
1499
1499
|
),
|
|
@@ -1503,7 +1503,7 @@ const Ee = (e = 0) => {
|
|
|
1503
1503
|
children: /* @__PURE__ */ t.jsx(It, { size: 14 })
|
|
1504
1504
|
}
|
|
1505
1505
|
);
|
|
1506
|
-
function
|
|
1506
|
+
function be({
|
|
1507
1507
|
className: e,
|
|
1508
1508
|
...n
|
|
1509
1509
|
}) {
|
|
@@ -1511,7 +1511,7 @@ function ve({
|
|
|
1511
1511
|
Tt.Root,
|
|
1512
1512
|
{
|
|
1513
1513
|
"data-slot": "checkbox",
|
|
1514
|
-
className:
|
|
1514
|
+
className: S(
|
|
1515
1515
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
1516
1516
|
e
|
|
1517
1517
|
),
|
|
@@ -1527,11 +1527,11 @@ function ve({
|
|
|
1527
1527
|
}
|
|
1528
1528
|
);
|
|
1529
1529
|
}
|
|
1530
|
-
const
|
|
1530
|
+
const _r = ({ index: e, manager: n }) => {
|
|
1531
1531
|
const s = E(null), a = n.getValue(e, "value");
|
|
1532
1532
|
return /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
1533
1533
|
/* @__PURE__ */ t.jsx(
|
|
1534
|
-
|
|
1534
|
+
be,
|
|
1535
1535
|
{
|
|
1536
1536
|
...n.getCheckboxProps(e),
|
|
1537
1537
|
disabled: !n.getValue(e, "name")
|
|
@@ -1552,7 +1552,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1552
1552
|
"span",
|
|
1553
1553
|
{
|
|
1554
1554
|
className: "text-xs truncate",
|
|
1555
|
-
title: `${a.name} (${
|
|
1555
|
+
title: `${a.name} (${ve(a.size)})`,
|
|
1556
1556
|
children: a.name
|
|
1557
1557
|
}
|
|
1558
1558
|
)
|
|
@@ -1565,7 +1565,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1565
1565
|
size: "icon-xs",
|
|
1566
1566
|
className: "opacity-50 hover:opacity-100 hover:brightness-95 transition-opacity",
|
|
1567
1567
|
onClick: () => n.setValue(e, "value", ""),
|
|
1568
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1568
|
+
children: /* @__PURE__ */ t.jsx(Rn, { size: 13 })
|
|
1569
1569
|
}
|
|
1570
1570
|
)
|
|
1571
1571
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
@@ -1616,7 +1616,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1616
1616
|
watch: c,
|
|
1617
1617
|
setFocus: l,
|
|
1618
1618
|
register: m
|
|
1619
|
-
} = oe(), { fields: d, append: f, remove: x } =
|
|
1619
|
+
} = oe(), { fields: d, append: f, remove: x } = Ut({ control: n, name: s }), p = c(s), v = E(-1), u = E(-1), y = D(
|
|
1620
1620
|
(g, C, T, A) => {
|
|
1621
1621
|
(C === "value" || C === "name") && (v.current = g), i(`${s}.${g}.${C}`, T), A?.focus === "next" ? l(
|
|
1622
1622
|
C === "name" ? `${s}.${g}.value` : `${s}.${g + 1}.name`
|
|
@@ -1625,32 +1625,32 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1625
1625
|
);
|
|
1626
1626
|
},
|
|
1627
1627
|
[s, i, l]
|
|
1628
|
-
),
|
|
1628
|
+
), w = D(
|
|
1629
1629
|
(g) => r ? r(g) : !g.name && !g.value,
|
|
1630
1630
|
[r]
|
|
1631
1631
|
), R = D(
|
|
1632
1632
|
(g) => o ? o(g) : !!(g.name || g.value),
|
|
1633
1633
|
[o]
|
|
1634
1634
|
);
|
|
1635
|
-
|
|
1636
|
-
if (!
|
|
1635
|
+
U(() => {
|
|
1636
|
+
if (!p) return;
|
|
1637
1637
|
if (u.current === -1) {
|
|
1638
|
-
u.current =
|
|
1638
|
+
u.current = p.length, p.length === 0 && f(a, {
|
|
1639
1639
|
shouldFocus: !1
|
|
1640
1640
|
});
|
|
1641
1641
|
return;
|
|
1642
1642
|
}
|
|
1643
|
-
if (u.current =
|
|
1643
|
+
if (u.current = p.length, p.length === 0) {
|
|
1644
1644
|
f(a, {
|
|
1645
1645
|
shouldFocus: !1
|
|
1646
1646
|
});
|
|
1647
1647
|
return;
|
|
1648
1648
|
}
|
|
1649
|
-
if (
|
|
1649
|
+
if (p.length > 1) {
|
|
1650
1650
|
const C = [];
|
|
1651
|
-
for (let T = 0; T <
|
|
1652
|
-
const A =
|
|
1653
|
-
A &&
|
|
1651
|
+
for (let T = 0; T < p.length - 1; T++) {
|
|
1652
|
+
const A = p[T];
|
|
1653
|
+
A && w(A) && !R(A) && C.push(T);
|
|
1654
1654
|
}
|
|
1655
1655
|
if (C.length > 0) {
|
|
1656
1656
|
const T = C[0];
|
|
@@ -1660,53 +1660,53 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1660
1660
|
M !== void 0 && x(M);
|
|
1661
1661
|
}
|
|
1662
1662
|
if (v.current === T) {
|
|
1663
|
-
const A =
|
|
1663
|
+
const A = p.length - C.length;
|
|
1664
1664
|
T < A ? l(`${s}.${T}.name`) : T > 0 ? l(`${s}.${T - 1}.name`) : l(`${s}.0.name`);
|
|
1665
1665
|
}
|
|
1666
1666
|
v.current = -1;
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
const g =
|
|
1670
|
-
g && !
|
|
1669
|
+
const g = p[p.length - 1];
|
|
1670
|
+
g && !w(g) && f(a, {
|
|
1671
1671
|
shouldFocus: !1
|
|
1672
1672
|
});
|
|
1673
1673
|
}, [
|
|
1674
|
-
|
|
1674
|
+
p,
|
|
1675
1675
|
f,
|
|
1676
1676
|
x,
|
|
1677
1677
|
a,
|
|
1678
|
-
|
|
1678
|
+
w,
|
|
1679
1679
|
s,
|
|
1680
1680
|
l,
|
|
1681
1681
|
R
|
|
1682
|
-
]),
|
|
1683
|
-
if (!
|
|
1682
|
+
]), U(() => {
|
|
1683
|
+
if (!p) return;
|
|
1684
1684
|
const g = [];
|
|
1685
|
-
for (let C = 0; C <
|
|
1686
|
-
const T =
|
|
1685
|
+
for (let C = 0; C < p.length; C++) {
|
|
1686
|
+
const T = p[C];
|
|
1687
1687
|
if (!T) continue;
|
|
1688
1688
|
const A = R(T);
|
|
1689
1689
|
T.active !== A && g.push(() => y(C, "active", A));
|
|
1690
1690
|
}
|
|
1691
|
-
g.length !== 0 &&
|
|
1692
|
-
}, [
|
|
1691
|
+
g.length !== 0 && cs(() => g.forEach((C) => C()));
|
|
1692
|
+
}, [p, R, y]);
|
|
1693
1693
|
const N = D(
|
|
1694
1694
|
(g) => {
|
|
1695
|
-
const C =
|
|
1696
|
-
return C ?
|
|
1695
|
+
const C = p?.[g];
|
|
1696
|
+
return C ? w(C) : !0;
|
|
1697
1697
|
},
|
|
1698
|
-
[
|
|
1698
|
+
[p, w]
|
|
1699
1699
|
), j = D(
|
|
1700
1700
|
(g, C) => {
|
|
1701
1701
|
const T = C === "name" ? `${s}.${g}.value` : `${s}.${g + 1}.name`, A = C === "name" ? `${s}.${g - 1}.value` : `${s}.${g}.name`, M = C === "value" || g > 0;
|
|
1702
1702
|
return (L) => {
|
|
1703
1703
|
if (!(L.target instanceof HTMLInputElement)) return;
|
|
1704
|
-
const De = L.target.selectionStart === 0, ne = L.target.selectionStart === L.target.value.length,
|
|
1705
|
-
L.key === "Enter" ? l(T) : L.key === "Backspace" &&
|
|
1704
|
+
const De = L.target.selectionStart === 0, ne = L.target.selectionStart === L.target.value.length, Ce = !L.target.value;
|
|
1705
|
+
L.key === "Enter" ? l(T) : L.key === "Backspace" && Ce && M || L.key === "ArrowLeft" && De && M ? (L.preventDefault(), l(A)) : L.key === "ArrowRight" && ne && (L.preventDefault(), l(T));
|
|
1706
1706
|
};
|
|
1707
1707
|
},
|
|
1708
1708
|
[s, l]
|
|
1709
|
-
),
|
|
1709
|
+
), $ = D(
|
|
1710
1710
|
(g) => ({
|
|
1711
1711
|
...m(`${s}.${g}.name`),
|
|
1712
1712
|
onChange: (C) => y(g, "name", C.target.value),
|
|
@@ -1720,7 +1720,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1720
1720
|
onKeyDown: j(g, "value")
|
|
1721
1721
|
}),
|
|
1722
1722
|
[m, s, y, j]
|
|
1723
|
-
),
|
|
1723
|
+
), je = D(
|
|
1724
1724
|
(g) => ({
|
|
1725
1725
|
...m(`${s}.${g}.active`),
|
|
1726
1726
|
checked: c(`${s}.${g}.active`) ?? !1,
|
|
@@ -1731,8 +1731,8 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1731
1731
|
}),
|
|
1732
1732
|
[s, m, N, c, y]
|
|
1733
1733
|
), Ie = D(
|
|
1734
|
-
(g, C) =>
|
|
1735
|
-
[
|
|
1734
|
+
(g, C) => p?.[g]?.[C],
|
|
1735
|
+
[p]
|
|
1736
1736
|
), te = D(
|
|
1737
1737
|
(g) => ({
|
|
1738
1738
|
onClick: () => x(g),
|
|
@@ -1742,52 +1742,52 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1742
1742
|
);
|
|
1743
1743
|
return {
|
|
1744
1744
|
fields: d,
|
|
1745
|
-
getNameInputProps:
|
|
1745
|
+
getNameInputProps: $,
|
|
1746
1746
|
getValueInputProps: Q,
|
|
1747
|
-
getCheckboxProps:
|
|
1747
|
+
getCheckboxProps: je,
|
|
1748
1748
|
getRemoveButtonProps: te,
|
|
1749
1749
|
setValue: y,
|
|
1750
1750
|
getValue: Ie
|
|
1751
1751
|
};
|
|
1752
|
-
},
|
|
1752
|
+
}, qr = ({ content: e }) => {
|
|
1753
1753
|
const { register: n, setValue: s, watch: a, control: r } = oe(), o = (e ?? []).flatMap((j) => j.examples), [i, c, l, m, d] = a([
|
|
1754
1754
|
"headers",
|
|
1755
1755
|
"file",
|
|
1756
1756
|
"bodyMode",
|
|
1757
1757
|
"body",
|
|
1758
1758
|
"multipartFormFields"
|
|
1759
|
-
]), f = E(null), [x,
|
|
1759
|
+
]), f = E(null), [x, p] = k(!1), v = (j) => {
|
|
1760
1760
|
s("file", j), j && s(
|
|
1761
1761
|
"headers",
|
|
1762
1762
|
i.filter(
|
|
1763
|
-
(
|
|
1763
|
+
($) => $.name.toLowerCase() !== "content-type" || !$.active
|
|
1764
1764
|
)
|
|
1765
1765
|
);
|
|
1766
1766
|
}, u = (j) => {
|
|
1767
|
-
const
|
|
1768
|
-
v(
|
|
1767
|
+
const $ = j.target.files?.[0] ?? null;
|
|
1768
|
+
v($);
|
|
1769
1769
|
}, y = (j) => {
|
|
1770
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1771
|
-
},
|
|
1772
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1770
|
+
j.preventDefault(), j.stopPropagation(), p(!0);
|
|
1771
|
+
}, w = (j) => {
|
|
1772
|
+
j.preventDefault(), j.stopPropagation(), p(!1);
|
|
1773
1773
|
}, R = (j) => {
|
|
1774
|
-
j.preventDefault(), j.stopPropagation(),
|
|
1775
|
-
const
|
|
1776
|
-
v(
|
|
1774
|
+
j.preventDefault(), j.stopPropagation(), p(!1);
|
|
1775
|
+
const $ = j.dataTransfer.files?.[0] ?? null;
|
|
1776
|
+
v($);
|
|
1777
1777
|
}, N = ot({
|
|
1778
1778
|
control: r,
|
|
1779
1779
|
name: "multipartFormFields",
|
|
1780
1780
|
defaultValue: { name: "", value: "", active: !1 },
|
|
1781
1781
|
isEmpty: (j) => j.value instanceof File ? !1 : !j.name && !j.value
|
|
1782
1782
|
});
|
|
1783
|
-
return /* @__PURE__ */ t.jsxs(
|
|
1783
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
1784
1784
|
/* @__PURE__ */ t.jsxs(Y, { className: "items-center", children: [
|
|
1785
|
-
/* @__PURE__ */ t.jsx(
|
|
1785
|
+
/* @__PURE__ */ t.jsx(In, { size: 16 }),
|
|
1786
1786
|
/* @__PURE__ */ t.jsxs(H, { className: "flex items-center justify-between", children: [
|
|
1787
1787
|
"Body",
|
|
1788
1788
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1789
|
-
/* @__PURE__ */ t.jsxs(
|
|
1790
|
-
/* @__PURE__ */ t.jsx(
|
|
1789
|
+
/* @__PURE__ */ t.jsxs(Jt, { children: [
|
|
1790
|
+
/* @__PURE__ */ t.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
1791
1791
|
K,
|
|
1792
1792
|
{
|
|
1793
1793
|
variant: "ghost",
|
|
@@ -1804,13 +1804,13 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1804
1804
|
/* @__PURE__ */ t.jsx(vt, { size: 14 }),
|
|
1805
1805
|
"Multipart"
|
|
1806
1806
|
] }),
|
|
1807
|
-
/* @__PURE__ */ t.jsx(
|
|
1807
|
+
/* @__PURE__ */ t.jsx(Dn, { size: 14 })
|
|
1808
1808
|
]
|
|
1809
1809
|
}
|
|
1810
1810
|
) }),
|
|
1811
|
-
/* @__PURE__ */ t.jsxs(
|
|
1811
|
+
/* @__PURE__ */ t.jsxs(Xt, { className: "min-w-40", children: [
|
|
1812
1812
|
/* @__PURE__ */ t.jsxs(
|
|
1813
|
-
|
|
1813
|
+
Oe,
|
|
1814
1814
|
{
|
|
1815
1815
|
onSelect: () => s("bodyMode", "text"),
|
|
1816
1816
|
className: "gap-2",
|
|
@@ -1822,7 +1822,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
),
|
|
1824
1824
|
/* @__PURE__ */ t.jsxs(
|
|
1825
|
-
|
|
1825
|
+
Oe,
|
|
1826
1826
|
{
|
|
1827
1827
|
onSelect: () => s("bodyMode", "file"),
|
|
1828
1828
|
className: "gap-2",
|
|
@@ -1834,7 +1834,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
),
|
|
1836
1836
|
/* @__PURE__ */ t.jsxs(
|
|
1837
|
-
|
|
1837
|
+
Oe,
|
|
1838
1838
|
{
|
|
1839
1839
|
onSelect: () => s("bodyMode", "multipart"),
|
|
1840
1840
|
className: "gap-2",
|
|
@@ -1858,15 +1858,15 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1858
1858
|
),
|
|
1859
1859
|
/* @__PURE__ */ t.jsx("div", { className: "w-px mx-1 h-5 bg-border" }),
|
|
1860
1860
|
e && o.length > 0 ? /* @__PURE__ */ t.jsx(
|
|
1861
|
-
|
|
1861
|
+
Br,
|
|
1862
1862
|
{
|
|
1863
1863
|
examples: e,
|
|
1864
|
-
onSelect: (j,
|
|
1864
|
+
onSelect: (j, $) => {
|
|
1865
1865
|
s("body", JSON.stringify(j.value, null, 2)), s("headers", [
|
|
1866
1866
|
...i.filter((Q) => Q.name !== "Content-Type"),
|
|
1867
1867
|
{
|
|
1868
1868
|
name: "Content-Type",
|
|
1869
|
-
value:
|
|
1869
|
+
value: $,
|
|
1870
1870
|
active: !0
|
|
1871
1871
|
}
|
|
1872
1872
|
]);
|
|
@@ -1876,12 +1876,12 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1876
1876
|
] })
|
|
1877
1877
|
] })
|
|
1878
1878
|
] }),
|
|
1879
|
-
/* @__PURE__ */ t.jsxs(
|
|
1879
|
+
/* @__PURE__ */ t.jsxs(q, { className: "CollapsibleContent flex flex-col gap-2", children: [
|
|
1880
1880
|
l === "text" && /* @__PURE__ */ t.jsx(
|
|
1881
|
-
|
|
1881
|
+
dn,
|
|
1882
1882
|
{
|
|
1883
1883
|
...n("body"),
|
|
1884
|
-
className:
|
|
1884
|
+
className: S(
|
|
1885
1885
|
"w-full px-4 py-2.5 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0 transition-colors"
|
|
1886
1886
|
),
|
|
1887
1887
|
placeholder: "Body content"
|
|
@@ -1892,11 +1892,11 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1892
1892
|
{
|
|
1893
1893
|
role: "region",
|
|
1894
1894
|
"aria-label": "File upload drop zone",
|
|
1895
|
-
className:
|
|
1895
|
+
className: S(
|
|
1896
1896
|
"flex flex-col items-center justify-center gap-4 min-h-[300px]"
|
|
1897
1897
|
),
|
|
1898
1898
|
onDragOver: y,
|
|
1899
|
-
onDragLeave:
|
|
1899
|
+
onDragLeave: w,
|
|
1900
1900
|
onDrop: R,
|
|
1901
1901
|
children: [
|
|
1902
1902
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1904,7 +1904,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1904
1904
|
{
|
|
1905
1905
|
type: "button",
|
|
1906
1906
|
onClick: () => f.current?.click(),
|
|
1907
|
-
className:
|
|
1907
|
+
className: S(
|
|
1908
1908
|
"flex items-center justify-center gap-2 rounded-full size-20 p-0 border border-dashed border-muted-foreground/50 hover:bg-accent/75 transition-colors",
|
|
1909
1909
|
(c || x) && "border-solid",
|
|
1910
1910
|
x && "bg-accent border-primary"
|
|
@@ -1912,7 +1912,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1912
1912
|
children: /* @__PURE__ */ t.jsx(
|
|
1913
1913
|
me,
|
|
1914
1914
|
{
|
|
1915
|
-
className:
|
|
1915
|
+
className: S(
|
|
1916
1916
|
"text-muted-foreground",
|
|
1917
1917
|
x && "text-primary"
|
|
1918
1918
|
),
|
|
@@ -1927,7 +1927,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1927
1927
|
" ",
|
|
1928
1928
|
/* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
1929
1929
|
"(",
|
|
1930
|
-
|
|
1930
|
+
ve(c.size),
|
|
1931
1931
|
")"
|
|
1932
1932
|
] })
|
|
1933
1933
|
] }),
|
|
@@ -1945,7 +1945,7 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1945
1945
|
]
|
|
1946
1946
|
}
|
|
1947
1947
|
),
|
|
1948
|
-
l === "multipart" && /* @__PURE__ */ t.jsx(
|
|
1948
|
+
l === "multipart" && /* @__PURE__ */ t.jsx(Ee, { children: N.fields.map((j, $) => /* @__PURE__ */ t.jsx(_r, { index: $, manager: N }, j.id)) })
|
|
1949
1949
|
] })
|
|
1950
1950
|
] });
|
|
1951
1951
|
}, Lt = (e, n, s) => {
|
|
@@ -1960,12 +1960,15 @@ const Br = ({ index: e, manager: n }) => {
|
|
|
1960
1960
|
r.searchParams.set(o.name, o.value);
|
|
1961
1961
|
}), r;
|
|
1962
1962
|
};
|
|
1963
|
-
function
|
|
1963
|
+
function Ur(e) {
|
|
1964
1964
|
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1965
1965
|
e
|
|
1966
1966
|
);
|
|
1967
1967
|
}
|
|
1968
|
-
|
|
1968
|
+
function Mr(e) {
|
|
1969
|
+
return /^audio\//i.test(e);
|
|
1970
|
+
}
|
|
1971
|
+
const Gr = (e, n) => {
|
|
1969
1972
|
const s = e.find(
|
|
1970
1973
|
([a]) => a.toLowerCase() === "content-disposition"
|
|
1971
1974
|
)?.[1];
|
|
@@ -1982,21 +1985,21 @@ const Mr = (e, n) => {
|
|
|
1982
1985
|
} catch {
|
|
1983
1986
|
return "download";
|
|
1984
1987
|
}
|
|
1985
|
-
},
|
|
1986
|
-
|
|
1988
|
+
}, Hr = Pe.Root, un = xe.forwardRef(({ className: e, align: n = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ t.jsx(Pe.Portal, { children: /* @__PURE__ */ t.jsx(
|
|
1989
|
+
Pe.Content,
|
|
1987
1990
|
{
|
|
1988
1991
|
ref: r,
|
|
1989
1992
|
align: n,
|
|
1990
1993
|
sideOffset: s,
|
|
1991
|
-
className:
|
|
1994
|
+
className: S(
|
|
1992
1995
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
|
|
1993
1996
|
e
|
|
1994
1997
|
),
|
|
1995
1998
|
...a
|
|
1996
1999
|
}
|
|
1997
2000
|
) }));
|
|
1998
|
-
|
|
1999
|
-
const
|
|
2001
|
+
un.displayName = Pe.Content.displayName;
|
|
2002
|
+
const Qr = ({
|
|
2000
2003
|
value: e,
|
|
2001
2004
|
options: n,
|
|
2002
2005
|
onChange: s,
|
|
@@ -2007,9 +2010,9 @@ const Gr = ({
|
|
|
2007
2010
|
ref: c,
|
|
2008
2011
|
onSelect: l
|
|
2009
2012
|
}) => {
|
|
2010
|
-
const [m, d] = k(!1), [f, x] = k(!1),
|
|
2011
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2012
|
-
/* @__PURE__ */ t.jsx(
|
|
2013
|
+
const [m, d] = k(!1), [f, x] = k(!1), p = Ls((u) => u.filtered.count), v = E(null);
|
|
2014
|
+
return /* @__PURE__ */ t.jsxs(Hr, { open: m, children: [
|
|
2015
|
+
/* @__PURE__ */ t.jsx($s, { children: /* @__PURE__ */ t.jsx(
|
|
2013
2016
|
Es,
|
|
2014
2017
|
{
|
|
2015
2018
|
autoComplete: "off",
|
|
@@ -2018,7 +2021,7 @@ const Gr = ({
|
|
|
2018
2021
|
},
|
|
2019
2022
|
value: e ? String(e) : void 0,
|
|
2020
2023
|
placeholder: r,
|
|
2021
|
-
className:
|
|
2024
|
+
className: S("h-9 bg-transparent", a),
|
|
2022
2025
|
onFocus: () => d(!0),
|
|
2023
2026
|
onBlur: () => {
|
|
2024
2027
|
f || d(!1);
|
|
@@ -2030,13 +2033,13 @@ const Gr = ({
|
|
|
2030
2033
|
}
|
|
2031
2034
|
) }),
|
|
2032
2035
|
/* @__PURE__ */ t.jsx(
|
|
2033
|
-
|
|
2036
|
+
un,
|
|
2034
2037
|
{
|
|
2035
2038
|
onMouseEnter: () => x(!0),
|
|
2036
2039
|
onMouseLeave: () => x(!1),
|
|
2037
2040
|
onOpenAutoFocus: (u) => u.preventDefault(),
|
|
2038
|
-
className:
|
|
2039
|
-
"border-0":
|
|
2041
|
+
className: S("p-0 w-(--radix-popover-trigger-width)", {
|
|
2042
|
+
"border-0": p === 0
|
|
2040
2043
|
}),
|
|
2041
2044
|
align: "start",
|
|
2042
2045
|
side: "bottom",
|
|
@@ -2046,8 +2049,8 @@ const Gr = ({
|
|
|
2046
2049
|
onTouchMove: (u) => {
|
|
2047
2050
|
u.stopPropagation();
|
|
2048
2051
|
},
|
|
2049
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2050
|
-
|
|
2052
|
+
children: /* @__PURE__ */ t.jsx(Rs, { className: "max-h-[140px]", children: n.map((u) => /* @__PURE__ */ t.jsx(
|
|
2053
|
+
Is,
|
|
2051
2054
|
{
|
|
2052
2055
|
value: u,
|
|
2053
2056
|
onSelect: (y) => {
|
|
@@ -2061,7 +2064,7 @@ const Gr = ({
|
|
|
2061
2064
|
}
|
|
2062
2065
|
)
|
|
2063
2066
|
] });
|
|
2064
|
-
},
|
|
2067
|
+
}, $e = ({ shouldFilter: e, ...n }) => /* @__PURE__ */ t.jsx(ks, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ t.jsx(Qr, { ...n }) }), Jr = Object.freeze([
|
|
2065
2068
|
"Accept",
|
|
2066
2069
|
"Accept-Encoding",
|
|
2067
2070
|
"Accept-Language",
|
|
@@ -2088,7 +2091,7 @@ const Gr = ({
|
|
|
2088
2091
|
"Set-Cookie",
|
|
2089
2092
|
"User-Agent",
|
|
2090
2093
|
"X-Requested-With"
|
|
2091
|
-
]),
|
|
2094
|
+
]), Wr = ({
|
|
2092
2095
|
control: e,
|
|
2093
2096
|
schemaHeaders: n,
|
|
2094
2097
|
lockedHeaders: s
|
|
@@ -2097,58 +2100,58 @@ const Gr = ({
|
|
|
2097
2100
|
control: e,
|
|
2098
2101
|
name: "headers",
|
|
2099
2102
|
defaultValue: { name: "", value: "", active: !1 }
|
|
2100
|
-
}), c = n.filter((d) => !o.some((f) => f.name === d.name)).map(({ name: d }) => d), l = i.fields.flatMap((d, f) => !s?.map((
|
|
2103
|
+
}), c = n.filter((d) => !o.some((f) => f.name === d.name)).map(({ name: d }) => d), l = i.fields.flatMap((d, f) => !s?.map((p) => p.toLowerCase()).includes(d.name.toLowerCase()) ? [] : [f]), m = s?.map((d) => ({
|
|
2101
2104
|
name: d,
|
|
2102
2105
|
id: `locked-${d}`,
|
|
2103
2106
|
value: "••••••••••",
|
|
2104
2107
|
active: !0,
|
|
2105
2108
|
locked: !0
|
|
2106
2109
|
})) ?? [];
|
|
2107
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2110
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2108
2111
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2109
|
-
/* @__PURE__ */ t.jsx(
|
|
2112
|
+
/* @__PURE__ */ t.jsx(Fn, { size: 14 }),
|
|
2110
2113
|
/* @__PURE__ */ t.jsx(H, { children: "Headers" })
|
|
2111
2114
|
] }),
|
|
2112
|
-
/* @__PURE__ */ t.jsx(
|
|
2115
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ t.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ t.jsxs(Ee, { children: [
|
|
2113
2116
|
m.map((d) => /* @__PURE__ */ t.jsxs(Ct, { children: [
|
|
2114
2117
|
/* @__PURE__ */ t.jsx(Nt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
2115
2118
|
ge,
|
|
2116
2119
|
{
|
|
2117
2120
|
className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
|
|
2118
2121
|
children: [
|
|
2119
|
-
/* @__PURE__ */ t.jsx(
|
|
2122
|
+
/* @__PURE__ */ t.jsx(zn, { size: 16 }),
|
|
2120
2123
|
/* @__PURE__ */ t.jsx(I, { value: d.name, disabled: !0 }),
|
|
2121
2124
|
/* @__PURE__ */ t.jsx("div", { children: d.value })
|
|
2122
2125
|
]
|
|
2123
2126
|
},
|
|
2124
2127
|
d.id
|
|
2125
2128
|
) }),
|
|
2126
|
-
/* @__PURE__ */ t.jsx(
|
|
2129
|
+
/* @__PURE__ */ t.jsx(wt, { alignOffset: 10, side: "bottom", align: "start", children: /* @__PURE__ */ t.jsx("p", { children: "This header is set by the selected authentication." }) })
|
|
2127
2130
|
] }, d.id)),
|
|
2128
2131
|
i.fields.map((d, f) => {
|
|
2129
2132
|
const x = n.find(
|
|
2130
|
-
(
|
|
2131
|
-
),
|
|
2133
|
+
(w) => w.name === o.at(f)?.name
|
|
2134
|
+
), p = x?.enum && x.enum.length > 0, v = l.includes(f), u = i.getNameInputProps(f), y = i.getValueInputProps(f);
|
|
2132
2135
|
return /* @__PURE__ */ t.jsxs(
|
|
2133
2136
|
ge,
|
|
2134
2137
|
{
|
|
2135
|
-
className:
|
|
2138
|
+
className: S(
|
|
2136
2139
|
v && "text-amber-600",
|
|
2137
2140
|
v && !r.dirtyFields.headers?.[f]?.value && "hidden"
|
|
2138
2141
|
),
|
|
2139
2142
|
children: [
|
|
2140
2143
|
/* @__PURE__ */ t.jsx(
|
|
2141
|
-
|
|
2144
|
+
be,
|
|
2142
2145
|
{
|
|
2143
|
-
className:
|
|
2146
|
+
className: S(v && "hidden"),
|
|
2144
2147
|
...i.getCheckboxProps(f)
|
|
2145
2148
|
}
|
|
2146
2149
|
),
|
|
2147
2150
|
/* @__PURE__ */ t.jsxs(Ct, { children: [
|
|
2148
2151
|
/* @__PURE__ */ t.jsx(Nt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2149
|
-
|
|
2152
|
+
Vn,
|
|
2150
2153
|
{
|
|
2151
|
-
className:
|
|
2154
|
+
className: S(
|
|
2152
2155
|
"text-amber-600",
|
|
2153
2156
|
!v && "hidden"
|
|
2154
2157
|
),
|
|
@@ -2156,7 +2159,7 @@ const Gr = ({
|
|
|
2156
2159
|
}
|
|
2157
2160
|
) }),
|
|
2158
2161
|
/* @__PURE__ */ t.jsx(
|
|
2159
|
-
|
|
2162
|
+
wt,
|
|
2160
2163
|
{
|
|
2161
2164
|
alignOffset: 10,
|
|
2162
2165
|
side: "bottom",
|
|
@@ -2166,26 +2169,26 @@ const Gr = ({
|
|
|
2166
2169
|
)
|
|
2167
2170
|
] }),
|
|
2168
2171
|
/* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2169
|
-
|
|
2172
|
+
$e,
|
|
2170
2173
|
{
|
|
2171
2174
|
...u,
|
|
2172
2175
|
value: String(i.getValue(f, "name")),
|
|
2173
2176
|
placeholder: "Name",
|
|
2174
|
-
options: [...c, ...
|
|
2175
|
-
onChange: (
|
|
2176
|
-
onSelect: (
|
|
2177
|
+
options: [...c, ...Jr],
|
|
2178
|
+
onChange: (w) => i.setValue(f, "name", w),
|
|
2179
|
+
onSelect: (w) => i.setValue(f, "name", w, { focus: "next" })
|
|
2177
2180
|
}
|
|
2178
2181
|
) }),
|
|
2179
2182
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2180
|
-
|
|
2181
|
-
|
|
2183
|
+
p ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2184
|
+
$e,
|
|
2182
2185
|
{
|
|
2183
2186
|
...y,
|
|
2184
2187
|
value: String(i.getValue(f, "value")),
|
|
2185
2188
|
shouldFilter: !1,
|
|
2186
2189
|
options: x.enum ?? [],
|
|
2187
|
-
onChange: (
|
|
2188
|
-
onSelect: (
|
|
2190
|
+
onChange: (w) => i.setValue(f, "value", w),
|
|
2191
|
+
onSelect: (w) => i.setValue(f, "value", w, { focus: "next" })
|
|
2189
2192
|
}
|
|
2190
2193
|
) }) : /* @__PURE__ */ t.jsx(
|
|
2191
2194
|
I,
|
|
@@ -2209,45 +2212,45 @@ const Gr = ({
|
|
|
2209
2212
|
})
|
|
2210
2213
|
] }) }) }) })
|
|
2211
2214
|
] });
|
|
2212
|
-
},
|
|
2215
|
+
}, Xr = Fs(
|
|
2213
2216
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2214
2217
|
), Re = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
2215
|
-
|
|
2218
|
+
Kt.Root,
|
|
2216
2219
|
{
|
|
2217
2220
|
ref: s,
|
|
2218
|
-
className:
|
|
2221
|
+
className: S(Xr(), e),
|
|
2219
2222
|
...n
|
|
2220
2223
|
}
|
|
2221
2224
|
));
|
|
2222
|
-
Re.displayName =
|
|
2223
|
-
const
|
|
2225
|
+
Re.displayName = Kt.Root.displayName;
|
|
2226
|
+
const mn = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
2224
2227
|
he.Root,
|
|
2225
2228
|
{
|
|
2226
|
-
className:
|
|
2229
|
+
className: S("grid gap-2", e),
|
|
2227
2230
|
...n,
|
|
2228
2231
|
ref: s
|
|
2229
2232
|
}
|
|
2230
2233
|
));
|
|
2231
|
-
|
|
2232
|
-
const
|
|
2234
|
+
mn.displayName = he.Root.displayName;
|
|
2235
|
+
const pn = xe.forwardRef(({ className: e, ...n }, s) => /* @__PURE__ */ t.jsx(
|
|
2233
2236
|
he.Item,
|
|
2234
2237
|
{
|
|
2235
2238
|
ref: s,
|
|
2236
|
-
className:
|
|
2239
|
+
className: S(
|
|
2237
2240
|
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2238
2241
|
e
|
|
2239
2242
|
),
|
|
2240
2243
|
...n,
|
|
2241
|
-
children: /* @__PURE__ */ t.jsx(he.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(
|
|
2244
|
+
children: /* @__PURE__ */ t.jsx(he.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ t.jsx(Bn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
2242
2245
|
}
|
|
2243
2246
|
));
|
|
2244
|
-
|
|
2245
|
-
const
|
|
2247
|
+
pn.displayName = he.Item.displayName;
|
|
2248
|
+
const hn = ({
|
|
2246
2249
|
identities: e,
|
|
2247
2250
|
setValue: n,
|
|
2248
2251
|
value: s
|
|
2249
2252
|
}) => /* @__PURE__ */ t.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ t.jsx(
|
|
2250
|
-
|
|
2253
|
+
mn,
|
|
2251
2254
|
{
|
|
2252
2255
|
onValueChange: (a) => n(a),
|
|
2253
2256
|
value: s,
|
|
@@ -2260,7 +2263,7 @@ const pn = ({
|
|
|
2260
2263
|
{
|
|
2261
2264
|
className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
|
|
2262
2265
|
children: [
|
|
2263
|
-
/* @__PURE__ */ t.jsx(
|
|
2266
|
+
/* @__PURE__ */ t.jsx(pn, { value: a.id, id: a.id }),
|
|
2264
2267
|
/* @__PURE__ */ t.jsx("span", { children: a.label })
|
|
2265
2268
|
]
|
|
2266
2269
|
},
|
|
@@ -2268,7 +2271,7 @@ const pn = ({
|
|
|
2268
2271
|
)
|
|
2269
2272
|
)
|
|
2270
2273
|
}
|
|
2271
|
-
) }),
|
|
2274
|
+
) }), Kr = ({
|
|
2272
2275
|
onSubmit: e,
|
|
2273
2276
|
identities: n,
|
|
2274
2277
|
open: s,
|
|
@@ -2277,19 +2280,19 @@ const pn = ({
|
|
|
2277
2280
|
const [r, o] = k(void 0), [i, c] = k(!1);
|
|
2278
2281
|
return /* @__PURE__ */ t.jsx(et, { open: s, onOpenChange: a, children: /* @__PURE__ */ t.jsxs(tt, { children: [
|
|
2279
2282
|
/* @__PURE__ */ t.jsx(nt, { children: "Select an auth identity" }),
|
|
2280
|
-
/* @__PURE__ */ t.jsx(
|
|
2281
|
-
/* @__PURE__ */ t.jsx(
|
|
2282
|
-
|
|
2283
|
+
/* @__PURE__ */ t.jsx(_t, { children: "Please select an identity for this request." }),
|
|
2284
|
+
/* @__PURE__ */ t.jsx(Ds, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ t.jsx(
|
|
2285
|
+
hn,
|
|
2283
2286
|
{
|
|
2284
2287
|
identities: n,
|
|
2285
2288
|
setValue: o,
|
|
2286
2289
|
value: r
|
|
2287
2290
|
}
|
|
2288
2291
|
) }),
|
|
2289
|
-
/* @__PURE__ */ t.jsxs(
|
|
2292
|
+
/* @__PURE__ */ t.jsxs(qt, { className: "flex flex-col gap-2", children: [
|
|
2290
2293
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2291
2294
|
/* @__PURE__ */ t.jsx(
|
|
2292
|
-
|
|
2295
|
+
be,
|
|
2293
2296
|
{
|
|
2294
2297
|
id: "remember",
|
|
2295
2298
|
checked: i,
|
|
@@ -2301,7 +2304,7 @@ const pn = ({
|
|
|
2301
2304
|
/* @__PURE__ */ t.jsx(Re, { htmlFor: "remember", children: "Remember my choice" })
|
|
2302
2305
|
] }),
|
|
2303
2306
|
/* @__PURE__ */ t.jsx(
|
|
2304
|
-
|
|
2307
|
+
B,
|
|
2305
2308
|
{
|
|
2306
2309
|
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
2307
2310
|
children: "Send"
|
|
@@ -2309,24 +2312,24 @@ const pn = ({
|
|
|
2309
2312
|
)
|
|
2310
2313
|
] })
|
|
2311
2314
|
] }) });
|
|
2312
|
-
},
|
|
2315
|
+
}, Me = (e) => Math.abs(
|
|
2313
2316
|
Number.isNaN(Number(e)) ? e.toLowerCase().charCodeAt(0) - 96 : Number.isNaN(Number(e)) ? 0 : Number(e)
|
|
2314
|
-
), Ge = (e) => e.length > 1 ? Number(e.split("").reduce((n, s) => `${
|
|
2317
|
+
), Ge = (e) => e.length > 1 ? Number(e.split("").reduce((n, s) => `${Me(n) + Me(s)}`)) : Me(e), kt = (e, n = {}) => {
|
|
2315
2318
|
const s = (3 * Ge(e) + 2 * Ge(e) + Ge(e)) % 360, { saturation: a = 75, lightness: r = 60 } = n;
|
|
2316
2319
|
return `${s}deg ${a}% ${r}%`;
|
|
2317
|
-
}, He = "data-linked-param",
|
|
2318
|
-
const { resolvedTheme: n } =
|
|
2320
|
+
}, He = "data-linked-param", Zr = (e) => {
|
|
2321
|
+
const { resolvedTheme: n } = hs();
|
|
2319
2322
|
return {
|
|
2320
|
-
text:
|
|
2323
|
+
text: kt(
|
|
2321
2324
|
e,
|
|
2322
2325
|
n === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
2323
2326
|
),
|
|
2324
|
-
background:
|
|
2327
|
+
background: kt(
|
|
2325
2328
|
e,
|
|
2326
2329
|
n === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
2327
2330
|
)
|
|
2328
2331
|
};
|
|
2329
|
-
},
|
|
2332
|
+
}, fn = ({
|
|
2330
2333
|
name: e,
|
|
2331
2334
|
className: n,
|
|
2332
2335
|
slug: s,
|
|
@@ -2334,16 +2337,16 @@ const pn = ({
|
|
|
2334
2337
|
children: r,
|
|
2335
2338
|
onClick: o
|
|
2336
2339
|
}) => {
|
|
2337
|
-
const i = E(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: d } =
|
|
2338
|
-
return
|
|
2340
|
+
const i = E(null), c = s?.replace(/[{}]/g, ""), l = e.replace(/[{}]/g, ""), { text: m, background: d } = Zr(l), f = `hsl(${m} / 100%)`, x = `hsl(${d} / 10%)`, p = `hsl(${d} / 50%)`;
|
|
2341
|
+
return U(() => {
|
|
2339
2342
|
if (!c || !i.current) return;
|
|
2340
2343
|
const v = () => {
|
|
2341
|
-
document.querySelectorAll(`[${He}="${c}"]`).forEach((
|
|
2342
|
-
|
|
2344
|
+
document.querySelectorAll(`[${He}="${c}"]`).forEach((w) => {
|
|
2345
|
+
w instanceof HTMLElement && (w.dataset.active = "true");
|
|
2343
2346
|
});
|
|
2344
2347
|
}, u = () => {
|
|
2345
|
-
document.querySelectorAll(`[${He}="${c}"]`).forEach((
|
|
2346
|
-
|
|
2348
|
+
document.querySelectorAll(`[${He}="${c}"]`).forEach((w) => {
|
|
2349
|
+
w instanceof HTMLElement && (w.dataset.active = "false");
|
|
2347
2350
|
});
|
|
2348
2351
|
}, y = i.current;
|
|
2349
2352
|
return y.addEventListener("mouseenter", v), y.addEventListener("mouseleave", u), () => {
|
|
@@ -2355,7 +2358,7 @@ const pn = ({
|
|
|
2355
2358
|
"span",
|
|
2356
2359
|
{
|
|
2357
2360
|
[He]: c,
|
|
2358
|
-
className:
|
|
2361
|
+
className: S(
|
|
2359
2362
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
2360
2363
|
"relative transition-all duration-100 rounded-lg",
|
|
2361
2364
|
"border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
|
|
@@ -2368,30 +2371,30 @@ const pn = ({
|
|
|
2368
2371
|
onClick: o,
|
|
2369
2372
|
style: {
|
|
2370
2373
|
"--param-color": f,
|
|
2371
|
-
"--border-color":
|
|
2374
|
+
"--border-color": p,
|
|
2372
2375
|
"--background-color": x
|
|
2373
2376
|
},
|
|
2374
2377
|
children: r ?? e
|
|
2375
2378
|
}
|
|
2376
2379
|
);
|
|
2377
|
-
},
|
|
2380
|
+
}, Yr = ({
|
|
2378
2381
|
control: e,
|
|
2379
2382
|
url: n
|
|
2380
2383
|
}) => {
|
|
2381
|
-
const { fields: s } =
|
|
2384
|
+
const { fields: s } = Ut({
|
|
2382
2385
|
control: e,
|
|
2383
2386
|
name: "pathParams"
|
|
2384
2387
|
}), a = [...s].sort(
|
|
2385
2388
|
(r, o) => n.indexOf(`{${r.name}}`) - n.indexOf(`{${o.name}}`)
|
|
2386
2389
|
);
|
|
2387
|
-
return /* @__PURE__ */ t.jsx(
|
|
2390
|
+
return /* @__PURE__ */ t.jsx(Ee, { children: a.map((r, o) => /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
2388
2391
|
/* @__PURE__ */ t.jsx(
|
|
2389
|
-
|
|
2392
|
+
St,
|
|
2390
2393
|
{
|
|
2391
2394
|
control: e,
|
|
2392
2395
|
name: `pathParams.${o}.name`,
|
|
2393
2396
|
render: () => /* @__PURE__ */ t.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ t.jsx(
|
|
2394
|
-
|
|
2397
|
+
fn,
|
|
2395
2398
|
{
|
|
2396
2399
|
slug: r.name,
|
|
2397
2400
|
name: r.name,
|
|
@@ -2401,7 +2404,7 @@ const pn = ({
|
|
|
2401
2404
|
}
|
|
2402
2405
|
),
|
|
2403
2406
|
/* @__PURE__ */ t.jsx("div", { className: "flex justify-between items-center col-span-2", children: /* @__PURE__ */ t.jsx(
|
|
2404
|
-
|
|
2407
|
+
St,
|
|
2405
2408
|
{
|
|
2406
2409
|
control: e,
|
|
2407
2410
|
name: `pathParams.${o}.value`,
|
|
@@ -2409,7 +2412,7 @@ const pn = ({
|
|
|
2409
2412
|
}
|
|
2410
2413
|
) })
|
|
2411
2414
|
] }, r.id)) });
|
|
2412
|
-
},
|
|
2415
|
+
}, ea = ({
|
|
2413
2416
|
control: e,
|
|
2414
2417
|
schemaQueryParams: n
|
|
2415
2418
|
}) => {
|
|
@@ -2420,17 +2423,17 @@ const pn = ({
|
|
|
2420
2423
|
}), o = n.map(
|
|
2421
2424
|
(c) => !!c.isRequired
|
|
2422
2425
|
), i = n.length > 0;
|
|
2423
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2426
|
+
return /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2424
2427
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2425
|
-
/* @__PURE__ */ t.jsx(
|
|
2428
|
+
/* @__PURE__ */ t.jsx(_n, { size: 16 }),
|
|
2426
2429
|
/* @__PURE__ */ t.jsx(H, { children: "Query Parameters" })
|
|
2427
2430
|
] }),
|
|
2428
|
-
/* @__PURE__ */ t.jsx(
|
|
2431
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(Ee, { children: r.fields.map((c, l) => {
|
|
2429
2432
|
const m = n.find(
|
|
2430
|
-
(
|
|
2433
|
+
(p) => p.name === a.at(l)?.name
|
|
2431
2434
|
), d = m?.enum && m.enum.length > 0, f = r.getNameInputProps(l), x = r.getValueInputProps(l);
|
|
2432
2435
|
return /* @__PURE__ */ t.jsxs(ge, { children: [
|
|
2433
|
-
/* @__PURE__ */ t.jsx(
|
|
2436
|
+
/* @__PURE__ */ t.jsx(be, { ...r.getCheckboxProps(l) }),
|
|
2434
2437
|
o[l] ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
2435
2438
|
"label",
|
|
2436
2439
|
{
|
|
@@ -2443,26 +2446,26 @@ const pn = ({
|
|
|
2443
2446
|
]
|
|
2444
2447
|
}
|
|
2445
2448
|
) }) : i ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2446
|
-
|
|
2449
|
+
$e,
|
|
2447
2450
|
{
|
|
2448
2451
|
...f,
|
|
2449
2452
|
value: String(r.getValue(l, "name")),
|
|
2450
2453
|
placeholder: "Name",
|
|
2451
|
-
options: n.map((
|
|
2452
|
-
onChange: (
|
|
2453
|
-
onSelect: (
|
|
2454
|
+
options: n.map((p) => p.name),
|
|
2455
|
+
onChange: (p) => r.setValue(l, "name", p),
|
|
2456
|
+
onSelect: (p) => r.setValue(l, "name", p, { focus: "next" })
|
|
2454
2457
|
}
|
|
2455
2458
|
) }) : /* @__PURE__ */ t.jsx(I, { ...f, placeholder: "Name" }),
|
|
2456
2459
|
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
2457
2460
|
d ? /* @__PURE__ */ t.jsx(I, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2458
|
-
|
|
2461
|
+
$e,
|
|
2459
2462
|
{
|
|
2460
2463
|
...x,
|
|
2461
2464
|
value: String(r.getValue(l, "value")),
|
|
2462
2465
|
shouldFilter: !1,
|
|
2463
2466
|
options: m.enum ?? [],
|
|
2464
|
-
onChange: (
|
|
2465
|
-
onSelect: (
|
|
2467
|
+
onChange: (p) => r.setValue(l, "value", p),
|
|
2468
|
+
onSelect: (p) => r.setValue(l, "value", p, { focus: "next" })
|
|
2466
2469
|
}
|
|
2467
2470
|
) }) : /* @__PURE__ */ t.jsx(
|
|
2468
2471
|
I,
|
|
@@ -2482,7 +2485,7 @@ const pn = ({
|
|
|
2482
2485
|
] }, c.id);
|
|
2483
2486
|
}) }) })
|
|
2484
2487
|
] });
|
|
2485
|
-
},
|
|
2488
|
+
}, ta = ({
|
|
2486
2489
|
open: e,
|
|
2487
2490
|
setOpen: n,
|
|
2488
2491
|
onSignUp: s,
|
|
@@ -2494,10 +2497,10 @@ const pn = ({
|
|
|
2494
2497
|
};
|
|
2495
2498
|
return /* @__PURE__ */ t.jsx(et, { open: e, onOpenChange: n, children: /* @__PURE__ */ t.jsxs(tt, { children: [
|
|
2496
2499
|
/* @__PURE__ */ t.jsx(nt, { children: "Welcome to the Playground!" }),
|
|
2497
|
-
/* @__PURE__ */ t.jsx(
|
|
2500
|
+
/* @__PURE__ */ t.jsx(_t, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2498
2501
|
/* @__PURE__ */ t.jsxs(Re, { className: "flex items-center gap-2 font-normal", children: [
|
|
2499
2502
|
/* @__PURE__ */ t.jsx(
|
|
2500
|
-
|
|
2503
|
+
be,
|
|
2501
2504
|
{
|
|
2502
2505
|
checked: o,
|
|
2503
2506
|
onCheckedChange: (l) => i(l === !0)
|
|
@@ -2505,15 +2508,15 @@ const pn = ({
|
|
|
2505
2508
|
),
|
|
2506
2509
|
"Don't show this again"
|
|
2507
2510
|
] }),
|
|
2508
|
-
/* @__PURE__ */ t.jsxs(
|
|
2509
|
-
/* @__PURE__ */ t.jsx(
|
|
2511
|
+
/* @__PURE__ */ t.jsxs(qt, { className: "flex gap-2 sm:justify-between", children: [
|
|
2512
|
+
/* @__PURE__ */ t.jsx(B, { type: "button", variant: "outline", onClick: c, children: "Skip" }),
|
|
2510
2513
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2", children: [
|
|
2511
|
-
s && /* @__PURE__ */ t.jsx(
|
|
2512
|
-
a && /* @__PURE__ */ t.jsx(
|
|
2514
|
+
s && /* @__PURE__ */ t.jsx(B, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2515
|
+
a && /* @__PURE__ */ t.jsx(B, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2513
2516
|
] })
|
|
2514
2517
|
] })
|
|
2515
2518
|
] }) });
|
|
2516
|
-
},
|
|
2519
|
+
}, na = Ze()(
|
|
2517
2520
|
Ye(
|
|
2518
2521
|
(e, n) => ({
|
|
2519
2522
|
rememberedIdentity: null,
|
|
@@ -2524,10 +2527,10 @@ const pn = ({
|
|
|
2524
2527
|
}),
|
|
2525
2528
|
{
|
|
2526
2529
|
name: "identity-storage",
|
|
2527
|
-
storage:
|
|
2530
|
+
storage: zt(() => sessionStorage)
|
|
2528
2531
|
}
|
|
2529
2532
|
)
|
|
2530
|
-
),
|
|
2533
|
+
), sa = ({
|
|
2531
2534
|
path: e,
|
|
2532
2535
|
renderParam: n
|
|
2533
2536
|
}) => {
|
|
@@ -2553,10 +2556,10 @@ const pn = ({
|
|
|
2553
2556
|
/* @__PURE__ */ t.jsx("wbr", {})
|
|
2554
2557
|
] }, `${a}-${r}`);
|
|
2555
2558
|
});
|
|
2556
|
-
},
|
|
2559
|
+
}, ra = ({ url: e }) => {
|
|
2557
2560
|
const { watch: n, setFocus: s } = oe(), [a] = n(["pathParams"]);
|
|
2558
2561
|
return /* @__PURE__ */ t.jsx(
|
|
2559
|
-
|
|
2562
|
+
sa,
|
|
2560
2563
|
{
|
|
2561
2564
|
path: e,
|
|
2562
2565
|
renderParam: ({ name: r, originalValue: o, index: i }) => {
|
|
@@ -2564,7 +2567,7 @@ const pn = ({
|
|
|
2564
2567
|
(l) => l.name === r
|
|
2565
2568
|
)?.value;
|
|
2566
2569
|
return /* @__PURE__ */ t.jsx(
|
|
2567
|
-
|
|
2570
|
+
fn,
|
|
2568
2571
|
{
|
|
2569
2572
|
name: r,
|
|
2570
2573
|
backgroundOpacity: "0",
|
|
@@ -2576,7 +2579,7 @@ const pn = ({
|
|
|
2576
2579
|
}
|
|
2577
2580
|
}
|
|
2578
2581
|
);
|
|
2579
|
-
},
|
|
2582
|
+
}, aa = () => {
|
|
2580
2583
|
const { watch: e } = oe(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ t.jsxs(le, { children: [
|
|
2581
2584
|
a.name,
|
|
2582
2585
|
"=",
|
|
@@ -2588,7 +2591,7 @@ const pn = ({
|
|
|
2588
2591
|
s.length > 0 ? "?" : "",
|
|
2589
2592
|
s
|
|
2590
2593
|
] });
|
|
2591
|
-
},
|
|
2594
|
+
}, oa = ({ status: e }) => {
|
|
2592
2595
|
if (!e) return /* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2593
2596
|
switch (Number(e.toString().slice(0, 1))) {
|
|
2594
2597
|
case 2:
|
|
@@ -2600,7 +2603,7 @@ const pn = ({
|
|
|
2600
2603
|
default:
|
|
2601
2604
|
return /* @__PURE__ */ t.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2602
2605
|
}
|
|
2603
|
-
},
|
|
2606
|
+
}, ia = () => {
|
|
2604
2607
|
const e = E(null), n = E(null), s = E(Date.now()), a = E(null), r = D(() => {
|
|
2605
2608
|
if (n.current) {
|
|
2606
2609
|
const o = Date.now() - s.current;
|
|
@@ -2608,7 +2611,7 @@ const pn = ({
|
|
|
2608
2611
|
}
|
|
2609
2612
|
a.current = requestAnimationFrame(r);
|
|
2610
2613
|
}, []);
|
|
2611
|
-
return
|
|
2614
|
+
return ds(() => {
|
|
2612
2615
|
const o = e.current;
|
|
2613
2616
|
if (!o) return;
|
|
2614
2617
|
const i = document.createTextNode("0");
|
|
@@ -2616,7 +2619,7 @@ const pn = ({
|
|
|
2616
2619
|
a.current && cancelAnimationFrame(a.current), n.current && o.contains(i) && o.removeChild(i);
|
|
2617
2620
|
};
|
|
2618
2621
|
}, [r]), /* @__PURE__ */ t.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
|
|
2619
|
-
},
|
|
2622
|
+
}, la = ({
|
|
2620
2623
|
status: e,
|
|
2621
2624
|
time: n,
|
|
2622
2625
|
size: s,
|
|
@@ -2637,7 +2640,7 @@ const pn = ({
|
|
|
2637
2640
|
};
|
|
2638
2641
|
return /* @__PURE__ */ t.jsxs("div", { className: "relative shrink-0 flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2639
2642
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2640
|
-
/* @__PURE__ */ t.jsx(
|
|
2643
|
+
/* @__PURE__ */ t.jsx(oa, { status: e }),
|
|
2641
2644
|
" ",
|
|
2642
2645
|
e ?? "Sending Request...",
|
|
2643
2646
|
e ? ` ${o[e]}` : ""
|
|
@@ -2646,12 +2649,12 @@ const pn = ({
|
|
|
2646
2649
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
2647
2650
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2648
2651
|
" ",
|
|
2649
|
-
/* @__PURE__ */ t.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ?
|
|
2652
|
+
/* @__PURE__ */ t.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? ve(s) : "- B" })
|
|
2650
2653
|
] }),
|
|
2651
2654
|
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
2652
2655
|
/* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2653
2656
|
" ",
|
|
2654
|
-
n !== void 0 ? `${n.toFixed(0)}` : /* @__PURE__ */ t.jsx(
|
|
2657
|
+
n !== void 0 ? `${n.toFixed(0)}` : /* @__PURE__ */ t.jsx(ia, {}),
|
|
2655
2658
|
"ms"
|
|
2656
2659
|
] })
|
|
2657
2660
|
] }),
|
|
@@ -2666,6 +2669,29 @@ const pn = ({
|
|
|
2666
2669
|
}
|
|
2667
2670
|
)
|
|
2668
2671
|
] });
|
|
2672
|
+
}, ca = ({
|
|
2673
|
+
blob: e,
|
|
2674
|
+
fileName: n,
|
|
2675
|
+
size: s,
|
|
2676
|
+
onDownload: a
|
|
2677
|
+
}) => {
|
|
2678
|
+
const [r, o] = k(null);
|
|
2679
|
+
return U(() => {
|
|
2680
|
+
const i = URL.createObjectURL(e);
|
|
2681
|
+
return o(i), () => {
|
|
2682
|
+
URL.revokeObjectURL(i);
|
|
2683
|
+
};
|
|
2684
|
+
}, [e]), r ? /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2685
|
+
/* @__PURE__ */ t.jsx("audio", { controls: !0, src: r, className: "w-full max-w-md", children: "Your browser does not support the audio element." }),
|
|
2686
|
+
/* @__PURE__ */ t.jsxs(B, { onClick: a, className: "flex items-center gap-2", children: [
|
|
2687
|
+
/* @__PURE__ */ t.jsx(Ft, { className: "h-4 w-4" }),
|
|
2688
|
+
"Download ",
|
|
2689
|
+
n,
|
|
2690
|
+
" (",
|
|
2691
|
+
ve(s),
|
|
2692
|
+
")"
|
|
2693
|
+
] })
|
|
2694
|
+
] }) }) : /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground", children: "Loading audio..." }) });
|
|
2669
2695
|
};
|
|
2670
2696
|
function it(e) {
|
|
2671
2697
|
if (e === null) return "null";
|
|
@@ -2674,9 +2700,9 @@ function it(e) {
|
|
|
2674
2700
|
const n = e[0];
|
|
2675
2701
|
return n === void 0 ? "any[]" : `${it(n)}[]`;
|
|
2676
2702
|
}
|
|
2677
|
-
return typeof e == "object" ?
|
|
2703
|
+
return typeof e == "object" ? da(e) : typeof e;
|
|
2678
2704
|
}
|
|
2679
|
-
function
|
|
2705
|
+
function da(e, n = "") {
|
|
2680
2706
|
const s = ["{"];
|
|
2681
2707
|
for (const [a, r] of Object.entries(e)) {
|
|
2682
2708
|
const o = it(r);
|
|
@@ -2685,10 +2711,10 @@ function ia(e, n = "") {
|
|
|
2685
2711
|
return s.push("}"), s.join(`
|
|
2686
2712
|
`);
|
|
2687
2713
|
}
|
|
2688
|
-
function
|
|
2714
|
+
function ua(e) {
|
|
2689
2715
|
return { lines: [`type GeneratedType = ${it(e)};`] };
|
|
2690
2716
|
}
|
|
2691
|
-
const
|
|
2717
|
+
const ma = (e) => Object.entries({
|
|
2692
2718
|
"application/json": "json",
|
|
2693
2719
|
"text/json": "json",
|
|
2694
2720
|
"text/html": "html",
|
|
@@ -2698,16 +2724,16 @@ const ca = (e) => Object.entries({
|
|
|
2698
2724
|
"application/xhtml+xml": "xhtml"
|
|
2699
2725
|
}).find(
|
|
2700
2726
|
([s]) => e.includes(s)
|
|
2701
|
-
)?.[1],
|
|
2702
|
-
const n = e
|
|
2703
|
-
return
|
|
2704
|
-
},
|
|
2727
|
+
)?.[1], gn = (e) => e.find(([n]) => n.toLowerCase() === "content-type")?.[1] || "", pa = (e) => {
|
|
2728
|
+
const n = gn(e);
|
|
2729
|
+
return ma(n);
|
|
2730
|
+
}, ha = (e) => {
|
|
2705
2731
|
try {
|
|
2706
2732
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2707
2733
|
} catch {
|
|
2708
2734
|
return null;
|
|
2709
2735
|
}
|
|
2710
|
-
},
|
|
2736
|
+
}, fa = (e) => {
|
|
2711
2737
|
const n = [
|
|
2712
2738
|
"Content-Type",
|
|
2713
2739
|
"Content-Length",
|
|
@@ -2724,12 +2750,12 @@ const ca = (e) => Object.entries({
|
|
|
2724
2750
|
}, z = 3, Se = ye(
|
|
2725
2751
|
"div",
|
|
2726
2752
|
"grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
|
|
2727
|
-
), ue = ye("div", "py-1 break-words"),
|
|
2753
|
+
), ue = ye("div", "py-1 break-words"), Te = ({ value: e, header: n }) => {
|
|
2728
2754
|
const a = ["authorization", "key", "secret", "token"].includes(n.toLowerCase()), [r, o] = k(!a);
|
|
2729
2755
|
return /* @__PURE__ */ t.jsx(
|
|
2730
2756
|
ue,
|
|
2731
2757
|
{
|
|
2732
|
-
className:
|
|
2758
|
+
className: S(
|
|
2733
2759
|
"max-h-28 overflow-auto",
|
|
2734
2760
|
a && "cursor-pointer flex group"
|
|
2735
2761
|
),
|
|
@@ -2737,12 +2763,12 @@ const ca = (e) => Object.entries({
|
|
|
2737
2763
|
a && o((i) => !i);
|
|
2738
2764
|
},
|
|
2739
2765
|
children: a ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2740
|
-
/* @__PURE__ */ t.jsx(
|
|
2741
|
-
r ? /* @__PURE__ */ t.jsx(
|
|
2766
|
+
/* @__PURE__ */ t.jsx(Ns, { secret: e, previewChars: 0, revealed: r }),
|
|
2767
|
+
r ? /* @__PURE__ */ t.jsx(Gn, { size: 14, className: S("hidden group-hover:block") }) : /* @__PURE__ */ t.jsx(Hn, { size: 14, className: S("hidden group-hover:block") })
|
|
2742
2768
|
] }) : e
|
|
2743
2769
|
}
|
|
2744
2770
|
);
|
|
2745
|
-
},
|
|
2771
|
+
}, ga = ({
|
|
2746
2772
|
body: e = "",
|
|
2747
2773
|
headers: n,
|
|
2748
2774
|
request: s,
|
|
@@ -2751,40 +2777,40 @@ const ca = (e) => Object.entries({
|
|
|
2751
2777
|
fileName: o,
|
|
2752
2778
|
blob: i
|
|
2753
2779
|
}) => {
|
|
2754
|
-
const c =
|
|
2780
|
+
const c = pa(n), l = ha(e), m = l || e, [d, f] = k(
|
|
2755
2781
|
l ? "formatted" : "raw"
|
|
2756
|
-
), x =
|
|
2782
|
+
), x = qs({
|
|
2757
2783
|
queryKey: ["types", m],
|
|
2758
|
-
queryFn: async () =>
|
|
2784
|
+
queryFn: async () => ua(JSON.parse(m)),
|
|
2759
2785
|
enabled: d === "types" && !r
|
|
2760
|
-
}),
|
|
2786
|
+
}), p = () => {
|
|
2761
2787
|
if (i && o) {
|
|
2762
2788
|
const u = URL.createObjectURL(i), y = document.createElement("a");
|
|
2763
2789
|
y.href = u, y.download = o, document.body.appendChild(y), y.click(), document.body.removeChild(y), URL.revokeObjectURL(u);
|
|
2764
2790
|
}
|
|
2765
|
-
}, v =
|
|
2791
|
+
}, v = fa([...n]);
|
|
2766
2792
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2767
|
-
/* @__PURE__ */ t.jsxs(
|
|
2793
|
+
/* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2768
2794
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2769
|
-
/* @__PURE__ */ t.jsx(
|
|
2795
|
+
/* @__PURE__ */ t.jsx(qn, { size: 14 }),
|
|
2770
2796
|
/* @__PURE__ */ t.jsx(H, { children: "Request Headers" })
|
|
2771
2797
|
] }),
|
|
2772
|
-
/* @__PURE__ */ t.jsx(
|
|
2798
|
+
/* @__PURE__ */ t.jsx(q, { children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2773
2799
|
s.headers.slice(0, z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2774
2800
|
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2775
|
-
/* @__PURE__ */ t.jsx(
|
|
2801
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2776
2802
|
] }, u)),
|
|
2777
|
-
s.headers.length > z && /* @__PURE__ */ t.jsxs(
|
|
2803
|
+
s.headers.length > z && /* @__PURE__ */ t.jsxs(_, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2778
2804
|
/* @__PURE__ */ t.jsxs(de, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2779
2805
|
"Show ",
|
|
2780
2806
|
s.headers.length - z,
|
|
2781
2807
|
" more headers",
|
|
2782
2808
|
/* @__PURE__ */ t.jsx(Je, { size: 12, className: "text-muted-foreground" })
|
|
2783
2809
|
] }),
|
|
2784
|
-
/* @__PURE__ */ t.jsxs(
|
|
2810
|
+
/* @__PURE__ */ t.jsxs(q, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2785
2811
|
s.headers.slice(z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2786
2812
|
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2787
|
-
/* @__PURE__ */ t.jsx(
|
|
2813
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2788
2814
|
] }, u)),
|
|
2789
2815
|
/* @__PURE__ */ t.jsxs(de, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2790
2816
|
"Hide ",
|
|
@@ -2802,27 +2828,27 @@ const ca = (e) => Object.entries({
|
|
|
2802
2828
|
] })
|
|
2803
2829
|
] }) })
|
|
2804
2830
|
] }),
|
|
2805
|
-
/* @__PURE__ */ t.jsxs(
|
|
2831
|
+
/* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
2806
2832
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
2807
|
-
/* @__PURE__ */ t.jsx(
|
|
2833
|
+
/* @__PURE__ */ t.jsx(Un, { size: 14 }),
|
|
2808
2834
|
/* @__PURE__ */ t.jsx(H, { children: "Response Headers" })
|
|
2809
2835
|
] }),
|
|
2810
|
-
/* @__PURE__ */ t.jsx(
|
|
2836
|
+
/* @__PURE__ */ t.jsx(q, { children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[2fr_3fr] gap-x-6 text-sm", children: [
|
|
2811
2837
|
v.slice(0, z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2812
2838
|
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2813
|
-
/* @__PURE__ */ t.jsx(
|
|
2839
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2814
2840
|
] }, u)),
|
|
2815
|
-
v.length > z && /* @__PURE__ */ t.jsxs(
|
|
2841
|
+
v.length > z && /* @__PURE__ */ t.jsxs(_, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2816
2842
|
/* @__PURE__ */ t.jsxs(de, { className: "data-[state=open]:hidden justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2817
2843
|
"Show ",
|
|
2818
2844
|
v.length - z,
|
|
2819
2845
|
" more headers",
|
|
2820
2846
|
/* @__PURE__ */ t.jsx(Je, { size: 12, className: "text-muted-foreground" })
|
|
2821
2847
|
] }),
|
|
2822
|
-
/* @__PURE__ */ t.jsxs(
|
|
2848
|
+
/* @__PURE__ */ t.jsxs(q, { className: "col-span-full grid grid-cols-subgrid", children: [
|
|
2823
2849
|
v.slice(z).map(([u, y]) => /* @__PURE__ */ t.jsxs(Se, { children: [
|
|
2824
2850
|
/* @__PURE__ */ t.jsx(ue, { children: u }),
|
|
2825
|
-
/* @__PURE__ */ t.jsx(
|
|
2851
|
+
/* @__PURE__ */ t.jsx(Te, { value: y, header: u })
|
|
2826
2852
|
] }, u)),
|
|
2827
2853
|
/* @__PURE__ */ t.jsxs(de, { className: "justify-center col-span-2 text-xs text-muted-foreground hover:text-primary border-b h-8 flex items-center gap-2", children: [
|
|
2828
2854
|
"Hide ",
|
|
@@ -2842,7 +2868,7 @@ const ca = (e) => Object.entries({
|
|
|
2842
2868
|
] }),
|
|
2843
2869
|
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 justify-between items-center border-b px-2 flex-0", children: [
|
|
2844
2870
|
/* @__PURE__ */ t.jsxs(H, { className: "flex items-center gap-2", children: [
|
|
2845
|
-
/* @__PURE__ */ t.jsx(
|
|
2871
|
+
/* @__PURE__ */ t.jsx(Mn, { size: 14 }),
|
|
2846
2872
|
"Response body"
|
|
2847
2873
|
] }),
|
|
2848
2874
|
l && !r && /* @__PURE__ */ t.jsxs(
|
|
@@ -2851,37 +2877,45 @@ const ca = (e) => Object.entries({
|
|
|
2851
2877
|
value: d,
|
|
2852
2878
|
onValueChange: (u) => f(u),
|
|
2853
2879
|
children: [
|
|
2854
|
-
/* @__PURE__ */ t.jsx(
|
|
2855
|
-
/* @__PURE__ */ t.jsxs(
|
|
2856
|
-
/* @__PURE__ */ t.jsx(
|
|
2857
|
-
/* @__PURE__ */ t.jsx(
|
|
2858
|
-
/* @__PURE__ */ t.jsx(
|
|
2880
|
+
/* @__PURE__ */ t.jsx(Gt, { className: "max-w-32 border-0 bg-transparent", children: /* @__PURE__ */ t.jsx(Ht, { placeholder: "View" }) }),
|
|
2881
|
+
/* @__PURE__ */ t.jsxs(Qt, { children: [
|
|
2882
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "formatted", children: "Formatted" }),
|
|
2883
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "raw", children: "Raw" }),
|
|
2884
|
+
/* @__PURE__ */ t.jsx(Ae, { value: "types", children: "Types" })
|
|
2859
2885
|
] })
|
|
2860
2886
|
]
|
|
2861
2887
|
}
|
|
2862
2888
|
)
|
|
2863
2889
|
] }),
|
|
2864
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: r ?
|
|
2890
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: r ? i && Mr(gn(n)) ? /* @__PURE__ */ t.jsx(
|
|
2891
|
+
ca,
|
|
2892
|
+
{
|
|
2893
|
+
blob: i,
|
|
2894
|
+
fileName: o ?? "audio",
|
|
2895
|
+
size: a,
|
|
2896
|
+
onDownload: p
|
|
2897
|
+
}
|
|
2898
|
+
) : /* @__PURE__ */ t.jsx("div", { className: "p-4 text-center", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2865
2899
|
/* @__PURE__ */ t.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2866
2900
|
/* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2867
2901
|
/* @__PURE__ */ t.jsxs(
|
|
2868
|
-
|
|
2902
|
+
B,
|
|
2869
2903
|
{
|
|
2870
|
-
onClick:
|
|
2904
|
+
onClick: p,
|
|
2871
2905
|
className: "flex items-center gap-2",
|
|
2872
2906
|
disabled: !i,
|
|
2873
2907
|
children: [
|
|
2874
|
-
/* @__PURE__ */ t.jsx(
|
|
2908
|
+
/* @__PURE__ */ t.jsx(Ft, { className: "h-4 w-4" }),
|
|
2875
2909
|
"Download ",
|
|
2876
2910
|
o || "file",
|
|
2877
2911
|
" (",
|
|
2878
|
-
|
|
2912
|
+
ve(a),
|
|
2879
2913
|
")"
|
|
2880
2914
|
]
|
|
2881
2915
|
}
|
|
2882
2916
|
)
|
|
2883
2917
|
] }) }) : /* @__PURE__ */ t.jsx(
|
|
2884
|
-
|
|
2918
|
+
xs,
|
|
2885
2919
|
{
|
|
2886
2920
|
className: "text-xs flex-1",
|
|
2887
2921
|
embedded: !0,
|
|
@@ -2892,7 +2926,7 @@ const ca = (e) => Object.entries({
|
|
|
2892
2926
|
}
|
|
2893
2927
|
) })
|
|
2894
2928
|
] });
|
|
2895
|
-
},
|
|
2929
|
+
}, xa = ({
|
|
2896
2930
|
queryMutation: e,
|
|
2897
2931
|
showLongRunningWarning: n,
|
|
2898
2932
|
onCancel: s,
|
|
@@ -2901,7 +2935,7 @@ const ca = (e) => Object.entries({
|
|
|
2901
2935
|
progress: o
|
|
2902
2936
|
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2903
2937
|
(e.isPending || e.data) && /* @__PURE__ */ t.jsx(
|
|
2904
|
-
|
|
2938
|
+
la,
|
|
2905
2939
|
{
|
|
2906
2940
|
status: e.data?.status,
|
|
2907
2941
|
time: e.data?.time,
|
|
@@ -2910,12 +2944,12 @@ const ca = (e) => Object.entries({
|
|
|
2910
2944
|
progress: o
|
|
2911
2945
|
}
|
|
2912
2946
|
),
|
|
2913
|
-
e.error ? /* @__PURE__ */ t.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ t.jsxs(
|
|
2914
|
-
/* @__PURE__ */ t.jsx(
|
|
2915
|
-
/* @__PURE__ */ t.jsx(
|
|
2916
|
-
/* @__PURE__ */ t.jsx(
|
|
2947
|
+
e.error ? /* @__PURE__ */ t.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ t.jsxs(Vs, { children: [
|
|
2948
|
+
/* @__PURE__ */ t.jsx(Qn, { size: 24, strokeWidth: 1.5, className: "me-5" }),
|
|
2949
|
+
/* @__PURE__ */ t.jsx(Bs, { children: "Request failed" }),
|
|
2950
|
+
/* @__PURE__ */ t.jsx(_s, { children: e.error.message || String(e.error) || "Unexpected error" })
|
|
2917
2951
|
] }) }) : e.data ? /* @__PURE__ */ t.jsx(
|
|
2918
|
-
|
|
2952
|
+
ga,
|
|
2919
2953
|
{
|
|
2920
2954
|
request: e.data.request,
|
|
2921
2955
|
size: e.data.size,
|
|
@@ -2926,11 +2960,11 @@ const ca = (e) => Object.entries({
|
|
|
2926
2960
|
blob: e.data.blob
|
|
2927
2961
|
}
|
|
2928
2962
|
) : e.isPending ? /* @__PURE__ */ t.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2929
|
-
/* @__PURE__ */ t.jsx(
|
|
2963
|
+
/* @__PURE__ */ t.jsx(zs, {}),
|
|
2930
2964
|
/* @__PURE__ */ t.jsxs(
|
|
2931
2965
|
"div",
|
|
2932
2966
|
{
|
|
2933
|
-
className:
|
|
2967
|
+
className: S(
|
|
2934
2968
|
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2935
2969
|
n && "opacity-100 pointer-events-auto"
|
|
2936
2970
|
),
|
|
@@ -2952,7 +2986,7 @@ const ca = (e) => Object.entries({
|
|
|
2952
2986
|
)
|
|
2953
2987
|
] }) }) : /* @__PURE__ */ t.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
|
|
2954
2988
|
/* @__PURE__ */ t.jsx(
|
|
2955
|
-
|
|
2989
|
+
Jn,
|
|
2956
2990
|
{
|
|
2957
2991
|
size: 64,
|
|
2958
2992
|
className: "text-muted-foreground",
|
|
@@ -2962,7 +2996,7 @@ const ca = (e) => Object.entries({
|
|
|
2962
2996
|
/* @__PURE__ */ t.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
|
|
2963
2997
|
a
|
|
2964
2998
|
] }) })
|
|
2965
|
-
] }),
|
|
2999
|
+
] }), xn = Ze()(
|
|
2966
3000
|
Ye(
|
|
2967
3001
|
(e) => ({
|
|
2968
3002
|
skipLogin: !1,
|
|
@@ -2970,12 +3004,12 @@ const ca = (e) => Object.entries({
|
|
|
2970
3004
|
}),
|
|
2971
3005
|
{
|
|
2972
3006
|
name: "remember-skip-login",
|
|
2973
|
-
storage:
|
|
3007
|
+
storage: zt(() => sessionStorage)
|
|
2974
3008
|
}
|
|
2975
3009
|
)
|
|
2976
3010
|
);
|
|
2977
|
-
|
|
2978
|
-
const pe = "__none",
|
|
3011
|
+
as(xn);
|
|
3012
|
+
const pe = "__none", ya = ({
|
|
2979
3013
|
server: e,
|
|
2980
3014
|
servers: n = [],
|
|
2981
3015
|
url: s,
|
|
@@ -2989,74 +3023,74 @@ const pe = "__none", fa = ({
|
|
|
2989
3023
|
onLogin: d,
|
|
2990
3024
|
onSignUp: f
|
|
2991
3025
|
}) => {
|
|
2992
|
-
const { selectedServer: x, setSelectedServer:
|
|
2993
|
-
n.map((
|
|
2994
|
-
), [v, u] = k(!1), y =
|
|
3026
|
+
const { selectedServer: x, setSelectedServer: p } = Vr(
|
|
3027
|
+
n.map((h) => ({ url: h }))
|
|
3028
|
+
), [v, u] = k(!1), y = os(), { setRememberedIdentity: w, getRememberedIdentity: R } = na(), [, N] = us(), { skipLogin: j, setSkipLogin: $ } = xn(), [Q, je] = k(!1), [Ie, te] = k(!1), g = E(void 0), C = Ss(w), T = E(null), { label: A } = Fr("meta+enter", () => {
|
|
2995
3029
|
T.current?.requestSubmit();
|
|
2996
|
-
}), M = s.match(/\{([^}]+)\}/g)?.map((
|
|
2997
|
-
(
|
|
2998
|
-
), { register: De, control: ne, handleSubmit:
|
|
3030
|
+
}), M = s.match(/\{([^}]+)\}/g)?.map((h) => h.slice(1, -1)) ?? [], L = [...i].sort(
|
|
3031
|
+
(h, re) => M.indexOf(h.name) - M.indexOf(re.name)
|
|
3032
|
+
), { register: De, control: ne, handleSubmit: Ce, watch: ct, setValue: Fe, ...ze } = js({
|
|
2999
3033
|
defaultValues: {
|
|
3000
3034
|
body: c,
|
|
3001
3035
|
bodyMode: "text",
|
|
3002
3036
|
file: null,
|
|
3003
3037
|
multipartFormFields: [],
|
|
3004
|
-
queryParams: o.length > 0 ? o.map((
|
|
3005
|
-
name:
|
|
3006
|
-
value:
|
|
3007
|
-
active:
|
|
3008
|
-
enum:
|
|
3038
|
+
queryParams: o.length > 0 ? o.map((h) => ({
|
|
3039
|
+
name: h.name,
|
|
3040
|
+
value: h.defaultValue ?? "",
|
|
3041
|
+
active: h.defaultActive ?? !1,
|
|
3042
|
+
enum: h.enum ?? []
|
|
3009
3043
|
})) : [{ name: "", value: "", active: !1, enum: [] }],
|
|
3010
|
-
pathParams: L.map((
|
|
3011
|
-
name:
|
|
3012
|
-
value:
|
|
3044
|
+
pathParams: L.map((h) => ({
|
|
3045
|
+
name: h.name,
|
|
3046
|
+
value: h.defaultValue ?? ""
|
|
3013
3047
|
})),
|
|
3014
|
-
headers: r.length > 0 ? r.map((
|
|
3015
|
-
name:
|
|
3016
|
-
value:
|
|
3017
|
-
active:
|
|
3048
|
+
headers: r.length > 0 ? r.map((h) => ({
|
|
3049
|
+
name: h.name,
|
|
3050
|
+
value: h.defaultValue ?? "",
|
|
3051
|
+
active: h.defaultActive ?? !1
|
|
3018
3052
|
})) : [{ name: "", value: "", active: !1 }],
|
|
3019
3053
|
identity: R([
|
|
3020
3054
|
pe,
|
|
3021
|
-
...y.data?.map((
|
|
3055
|
+
...y.data?.map((h) => h.id) ?? []
|
|
3022
3056
|
])
|
|
3023
3057
|
}
|
|
3024
|
-
}), se = ct("identity"),
|
|
3025
|
-
() => y.data?.find((
|
|
3058
|
+
}), se = ct("identity"), Cn = Bt(
|
|
3059
|
+
() => y.data?.find((h) => h.id === se)?.authorizationFields,
|
|
3026
3060
|
[y.data, se]
|
|
3027
3061
|
);
|
|
3028
|
-
|
|
3062
|
+
U(() => {
|
|
3029
3063
|
se && C.current(se);
|
|
3030
3064
|
}, [C, se]);
|
|
3031
|
-
const J =
|
|
3065
|
+
const J = bs({
|
|
3032
3066
|
gcTime: 0,
|
|
3033
|
-
mutationFn: async (
|
|
3067
|
+
mutationFn: async (h) => {
|
|
3034
3068
|
const re = performance.now(), Ve = new window.Headers(
|
|
3035
|
-
|
|
3069
|
+
h.headers.filter((O) => O.name && O.active).map((O) => [O.name, O.value])
|
|
3036
3070
|
);
|
|
3037
|
-
let
|
|
3038
|
-
switch (
|
|
3071
|
+
let Ne;
|
|
3072
|
+
switch (h.bodyMode) {
|
|
3039
3073
|
case "file":
|
|
3040
|
-
|
|
3074
|
+
Ne = h.file || void 0, Ve.delete("Content-Type");
|
|
3041
3075
|
break;
|
|
3042
3076
|
case "multipart": {
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3077
|
+
const O = new FormData();
|
|
3078
|
+
h.multipartFormFields?.filter((X) => X.name && X.active).forEach((X) => O.append(X.name, X.value)), Ne = O, Ve.delete("Content-Type");
|
|
3045
3079
|
break;
|
|
3046
3080
|
}
|
|
3047
3081
|
default:
|
|
3048
|
-
|
|
3082
|
+
Ne = h.body || void 0;
|
|
3049
3083
|
break;
|
|
3050
3084
|
}
|
|
3051
3085
|
const W = new Request(
|
|
3052
|
-
Lt(e ?? x, s,
|
|
3086
|
+
Lt(e ?? x, s, h),
|
|
3053
3087
|
{
|
|
3054
3088
|
method: a,
|
|
3055
3089
|
headers: Ve,
|
|
3056
|
-
body: ["GET", "HEAD"].includes(a.toUpperCase()) ? null :
|
|
3090
|
+
body: ["GET", "HEAD"].includes(a.toUpperCase()) ? null : Ne
|
|
3057
3091
|
}
|
|
3058
3092
|
);
|
|
3059
|
-
|
|
3093
|
+
h.identity !== pe && await y.data?.find((O) => O.id === h.identity)?.authorizeRequest(W);
|
|
3060
3094
|
const Be = setTimeout(
|
|
3061
3095
|
() => te(!0),
|
|
3062
3096
|
3210
|
|
@@ -3065,39 +3099,39 @@ const pe = "__none", fa = ({
|
|
|
3065
3099
|
clearTimeout(Be);
|
|
3066
3100
|
});
|
|
3067
3101
|
try {
|
|
3068
|
-
const
|
|
3102
|
+
const O = await fetch(W, {
|
|
3069
3103
|
cache: "no-store",
|
|
3070
3104
|
signal: g.current.signal
|
|
3071
3105
|
});
|
|
3072
3106
|
clearTimeout(Be), te(!1);
|
|
3073
|
-
const X = performance.now() - re,
|
|
3074
|
-
let
|
|
3075
|
-
ht ? (ft = await
|
|
3076
|
-
const xt =
|
|
3107
|
+
const X = performance.now() - re, Ln = new URL(W.url), mt = Array.from(O.headers.entries()), pt = O.headers.get("content-type") || "", ht = Ur(pt);
|
|
3108
|
+
let we = "", ft, gt;
|
|
3109
|
+
ht ? (ft = await O.blob(), gt = Gr(mt, W.url), we = `Binary content (${pt})`) : we = await O.text();
|
|
3110
|
+
const xt = O.headers.get("content-length");
|
|
3077
3111
|
let ae = "";
|
|
3078
|
-
switch (
|
|
3112
|
+
switch (h.bodyMode) {
|
|
3079
3113
|
case "text":
|
|
3080
|
-
ae =
|
|
3114
|
+
ae = h.body;
|
|
3081
3115
|
break;
|
|
3082
3116
|
case "file":
|
|
3083
|
-
ae = `[File: ${
|
|
3117
|
+
ae = `[File: ${h.file?.name ?? "Unknown"}]`;
|
|
3084
3118
|
break;
|
|
3085
3119
|
case "multipart":
|
|
3086
3120
|
ae = `[Multipart Form Data]
|
|
3087
|
-
`, ae +=
|
|
3088
|
-
(
|
|
3121
|
+
`, ae += h.multipartFormFields?.filter((G) => G.name && G.active).map(
|
|
3122
|
+
(G) => G.value instanceof File ? `${G.name}: [File: ${G.value.name}]` : `${G.name}: ${G.value}`
|
|
3089
3123
|
).join(`
|
|
3090
3124
|
`);
|
|
3091
3125
|
break;
|
|
3092
3126
|
default:
|
|
3093
|
-
ae =
|
|
3127
|
+
ae = h.body;
|
|
3094
3128
|
break;
|
|
3095
3129
|
}
|
|
3096
3130
|
return {
|
|
3097
|
-
status:
|
|
3131
|
+
status: O.status,
|
|
3098
3132
|
headers: mt,
|
|
3099
|
-
size: xt ? Number(xt) :
|
|
3100
|
-
body:
|
|
3133
|
+
size: xt ? Number(xt) : we.length,
|
|
3134
|
+
body: we,
|
|
3101
3135
|
time: X,
|
|
3102
3136
|
isBinary: ht,
|
|
3103
3137
|
fileName: gt,
|
|
@@ -3106,85 +3140,85 @@ const pe = "__none", fa = ({
|
|
|
3106
3140
|
method: W.method.toUpperCase(),
|
|
3107
3141
|
url: W.url,
|
|
3108
3142
|
headers: [
|
|
3109
|
-
["Host",
|
|
3143
|
+
["Host", Ln.host],
|
|
3110
3144
|
["User-Agent", "Zudoku Playground"],
|
|
3111
3145
|
...Array.from(W.headers.entries())
|
|
3112
3146
|
],
|
|
3113
3147
|
body: ae
|
|
3114
3148
|
}
|
|
3115
3149
|
};
|
|
3116
|
-
} catch (
|
|
3117
|
-
throw clearTimeout(Be), te(!1),
|
|
3150
|
+
} catch (O) {
|
|
3151
|
+
throw clearTimeout(Be), te(!1), O instanceof TypeError ? new Error(
|
|
3118
3152
|
"The request failed, possibly due to network issues or CORS policy."
|
|
3119
|
-
) :
|
|
3153
|
+
) : O;
|
|
3120
3154
|
}
|
|
3121
3155
|
}
|
|
3122
|
-
}), dt = J.isPending, [
|
|
3123
|
-
|
|
3124
|
-
const
|
|
3125
|
-
return () => clearTimeout(
|
|
3156
|
+
}), dt = J.isPending, [Nn, wn] = k(!1);
|
|
3157
|
+
U(() => {
|
|
3158
|
+
const h = setTimeout(() => wn(dt), 100);
|
|
3159
|
+
return () => clearTimeout(h);
|
|
3126
3160
|
}, [dt]);
|
|
3127
|
-
const { isFinished:
|
|
3128
|
-
|
|
3161
|
+
const { isFinished: Sn, progress: Tn } = ys({ isAnimating: Nn });
|
|
3162
|
+
U(() => () => {
|
|
3129
3163
|
g.current?.abort();
|
|
3130
3164
|
}, []);
|
|
3131
|
-
const
|
|
3165
|
+
const An = /* @__PURE__ */ t.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ t.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : n.length > 1 && /* @__PURE__ */ t.jsxs(
|
|
3132
3166
|
Mt,
|
|
3133
3167
|
{
|
|
3134
|
-
onValueChange: (
|
|
3135
|
-
N(() => h
|
|
3168
|
+
onValueChange: (h) => {
|
|
3169
|
+
N(() => p(h));
|
|
3136
3170
|
},
|
|
3137
3171
|
value: x,
|
|
3138
3172
|
defaultValue: x,
|
|
3139
3173
|
children: [
|
|
3140
|
-
/* @__PURE__ */ t.jsx(
|
|
3141
|
-
/* @__PURE__ */ t.jsx(
|
|
3174
|
+
/* @__PURE__ */ t.jsx(Gt, { className: "p-0 h-fit shadow-none border-none flex-row-reverse bg-transparent text-xs gap-0.5 translate-y-[4px]", children: /* @__PURE__ */ t.jsx(Ht, {}) }),
|
|
3175
|
+
/* @__PURE__ */ t.jsx(Qt, { children: n.map((h) => /* @__PURE__ */ t.jsx(Ae, { value: h, children: h.replace(/^https?:\/\//, "").replace(/\/$/, "") }, h)) })
|
|
3142
3176
|
]
|
|
3143
3177
|
}
|
|
3144
|
-
) }),
|
|
3178
|
+
) }), On = m && !j && !Q, Pn = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
3145
3179
|
a.toUpperCase()
|
|
3146
|
-
), [ut, $n] =
|
|
3180
|
+
), [ut, $n] = ws();
|
|
3147
3181
|
return /* @__PURE__ */ t.jsx(
|
|
3148
|
-
|
|
3182
|
+
Cs,
|
|
3149
3183
|
{
|
|
3150
3184
|
register: De,
|
|
3151
3185
|
control: ne,
|
|
3152
|
-
handleSubmit:
|
|
3186
|
+
handleSubmit: Ce,
|
|
3153
3187
|
watch: ct,
|
|
3154
3188
|
setValue: Fe,
|
|
3155
3189
|
...ze,
|
|
3156
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3190
|
+
children: /* @__PURE__ */ t.jsx(vs, { delayDuration: 150, children: /* @__PURE__ */ t.jsxs(
|
|
3157
3191
|
"form",
|
|
3158
3192
|
{
|
|
3159
3193
|
ref: T,
|
|
3160
|
-
onKeyDown: (
|
|
3161
|
-
|
|
3194
|
+
onKeyDown: (h) => {
|
|
3195
|
+
h.key === "Enter" && h.target instanceof HTMLInputElement && h.preventDefault();
|
|
3162
3196
|
},
|
|
3163
|
-
onSubmit:
|
|
3164
|
-
y.data?.length === 0 ||
|
|
3197
|
+
onSubmit: Ce((h) => {
|
|
3198
|
+
y.data?.length === 0 || h.identity ? J.mutate(h) : u(!0);
|
|
3165
3199
|
}),
|
|
3166
3200
|
className: "relative",
|
|
3167
3201
|
children: [
|
|
3168
3202
|
/* @__PURE__ */ t.jsx(
|
|
3169
|
-
|
|
3203
|
+
Kr,
|
|
3170
3204
|
{
|
|
3171
3205
|
identities: y.data ?? [],
|
|
3172
3206
|
open: v,
|
|
3173
3207
|
onOpenChange: u,
|
|
3174
|
-
onSubmit: ({ rememberedIdentity:
|
|
3175
|
-
|
|
3208
|
+
onSubmit: ({ rememberedIdentity: h, identity: re }) => {
|
|
3209
|
+
h && Fe("identity", re ?? pe), u(!1), J.mutate({ ...ze.getValues(), identity: re });
|
|
3176
3210
|
}
|
|
3177
3211
|
}
|
|
3178
3212
|
),
|
|
3179
3213
|
/* @__PURE__ */ t.jsx(
|
|
3180
|
-
|
|
3214
|
+
ta,
|
|
3181
3215
|
{
|
|
3182
|
-
open:
|
|
3183
|
-
setOpen: (
|
|
3184
|
-
|
|
3216
|
+
open: On,
|
|
3217
|
+
setOpen: (h) => {
|
|
3218
|
+
h || je(!0);
|
|
3185
3219
|
},
|
|
3186
|
-
onSkip: (
|
|
3187
|
-
|
|
3220
|
+
onSkip: (h) => {
|
|
3221
|
+
je(!0), h && $(!0);
|
|
3188
3222
|
},
|
|
3189
3223
|
onSignUp: f,
|
|
3190
3224
|
onLogin: d
|
|
@@ -3195,12 +3229,12 @@ const pe = "__none", fa = ({
|
|
|
3195
3229
|
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
3196
3230
|
/* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
3197
3231
|
/* @__PURE__ */ t.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ t.jsxs("div", { className: "h-full py-1.5", children: [
|
|
3198
|
-
|
|
3199
|
-
/* @__PURE__ */ t.jsx(
|
|
3200
|
-
/* @__PURE__ */ t.jsx(
|
|
3232
|
+
An,
|
|
3233
|
+
/* @__PURE__ */ t.jsx(ra, { url: s }),
|
|
3234
|
+
/* @__PURE__ */ t.jsx(aa, {})
|
|
3201
3235
|
] }) }),
|
|
3202
3236
|
/* @__PURE__ */ t.jsx("div", { className: "px-1", children: /* @__PURE__ */ t.jsx(
|
|
3203
|
-
|
|
3237
|
+
B,
|
|
3204
3238
|
{
|
|
3205
3239
|
type: "button",
|
|
3206
3240
|
onClick: () => {
|
|
@@ -3214,23 +3248,23 @@ const pe = "__none", fa = ({
|
|
|
3214
3248
|
},
|
|
3215
3249
|
variant: "ghost",
|
|
3216
3250
|
size: "icon-xs",
|
|
3217
|
-
className:
|
|
3251
|
+
className: S(
|
|
3218
3252
|
"hover:opacity-100 transition",
|
|
3219
3253
|
ut ? "text-emerald-600 opacity-100" : "opacity-50"
|
|
3220
3254
|
),
|
|
3221
|
-
children: ut ? /* @__PURE__ */ t.jsx(Dt, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ t.jsx(
|
|
3255
|
+
children: ut ? /* @__PURE__ */ t.jsx(Dt, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ t.jsx(Wn, { size: 14 })
|
|
3222
3256
|
}
|
|
3223
3257
|
) })
|
|
3224
3258
|
] }),
|
|
3225
3259
|
/* @__PURE__ */ t.jsx(
|
|
3226
|
-
|
|
3260
|
+
B,
|
|
3227
3261
|
{
|
|
3228
3262
|
type: "submit",
|
|
3229
3263
|
variant: J.isPending ? "destructive" : "default",
|
|
3230
|
-
onClick: (
|
|
3264
|
+
onClick: (h) => {
|
|
3231
3265
|
J.isPending && (g.current?.abort(
|
|
3232
3266
|
"Request cancelled by user"
|
|
3233
|
-
),
|
|
3267
|
+
), h.preventDefault());
|
|
3234
3268
|
},
|
|
3235
3269
|
className: "w-18",
|
|
3236
3270
|
children: J.isPending ? "Cancel" : "Send"
|
|
@@ -3238,46 +3272,46 @@ const pe = "__none", fa = ({
|
|
|
3238
3272
|
)
|
|
3239
3273
|
] }),
|
|
3240
3274
|
/* @__PURE__ */ t.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
|
|
3241
|
-
y.data?.length !== 0 && /* @__PURE__ */ t.jsxs(
|
|
3275
|
+
y.data?.length !== 0 && /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
3242
3276
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
3243
|
-
/* @__PURE__ */ t.jsx(
|
|
3277
|
+
/* @__PURE__ */ t.jsx(Xn, { size: 16 }),
|
|
3244
3278
|
/* @__PURE__ */ t.jsx(H, { children: "Authentication" })
|
|
3245
3279
|
] }),
|
|
3246
|
-
/* @__PURE__ */ t.jsx(
|
|
3247
|
-
|
|
3280
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(
|
|
3281
|
+
hn,
|
|
3248
3282
|
{
|
|
3249
3283
|
value: se,
|
|
3250
3284
|
identities: y.data ?? [],
|
|
3251
|
-
setValue: (
|
|
3285
|
+
setValue: (h) => Fe("identity", h)
|
|
3252
3286
|
}
|
|
3253
3287
|
) })
|
|
3254
3288
|
] }),
|
|
3255
|
-
L.length > 0 && /* @__PURE__ */ t.jsxs(
|
|
3289
|
+
L.length > 0 && /* @__PURE__ */ t.jsxs(_, { defaultOpen: !0, children: [
|
|
3256
3290
|
/* @__PURE__ */ t.jsxs(Y, { children: [
|
|
3257
|
-
/* @__PURE__ */ t.jsx(
|
|
3291
|
+
/* @__PURE__ */ t.jsx(Kn, { size: 16 }),
|
|
3258
3292
|
/* @__PURE__ */ t.jsx(H, { children: "Path Parameters" })
|
|
3259
3293
|
] }),
|
|
3260
|
-
/* @__PURE__ */ t.jsx(
|
|
3294
|
+
/* @__PURE__ */ t.jsx(q, { className: "CollapsibleContent", children: /* @__PURE__ */ t.jsx(Yr, { url: s, control: ne }) })
|
|
3261
3295
|
] }),
|
|
3262
|
-
/* @__PURE__ */ t.jsx(
|
|
3296
|
+
/* @__PURE__ */ t.jsx(ea, { control: ne, schemaQueryParams: o }),
|
|
3263
3297
|
/* @__PURE__ */ t.jsx(
|
|
3264
|
-
|
|
3298
|
+
Wr,
|
|
3265
3299
|
{
|
|
3266
3300
|
control: ne,
|
|
3267
3301
|
schemaHeaders: r,
|
|
3268
|
-
lockedHeaders:
|
|
3302
|
+
lockedHeaders: Cn?.headers
|
|
3269
3303
|
}
|
|
3270
3304
|
),
|
|
3271
|
-
|
|
3305
|
+
Pn && /* @__PURE__ */ t.jsx(qr, { content: l })
|
|
3272
3306
|
] }),
|
|
3273
3307
|
/* @__PURE__ */ t.jsx("div", { className: "w-full bg-muted-foreground/20" }),
|
|
3274
3308
|
/* @__PURE__ */ t.jsx(
|
|
3275
|
-
|
|
3309
|
+
xa,
|
|
3276
3310
|
{
|
|
3277
3311
|
queryMutation: J,
|
|
3278
3312
|
showLongRunningWarning: Ie,
|
|
3279
|
-
isFinished:
|
|
3280
|
-
progress:
|
|
3313
|
+
isFinished: Sn,
|
|
3314
|
+
progress: Tn,
|
|
3281
3315
|
tip: /* @__PURE__ */ t.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
|
|
3282
3316
|
"Press",
|
|
3283
3317
|
" ",
|
|
@@ -3298,11 +3332,11 @@ const pe = "__none", fa = ({
|
|
|
3298
3332
|
) })
|
|
3299
3333
|
}
|
|
3300
3334
|
);
|
|
3301
|
-
},
|
|
3302
|
-
const [n, s] = k(!1), { isAuthEnabled: a, login: r, signup: o, isPending: i, isAuthenticated: c } =
|
|
3335
|
+
}, va = (e) => {
|
|
3336
|
+
const [n, s] = k(!1), { isAuthEnabled: a, login: r, signup: o, isPending: i, isAuthenticated: c } = fs();
|
|
3303
3337
|
return /* @__PURE__ */ t.jsxs(et, { onOpenChange: (l) => s(l), children: [
|
|
3304
|
-
/* @__PURE__ */ t.jsx(
|
|
3305
|
-
|
|
3338
|
+
/* @__PURE__ */ t.jsx(gs, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsx(B, { variant: "ghost", size: "icon-xs", className: "group", children: /* @__PURE__ */ t.jsx(
|
|
3339
|
+
Zn,
|
|
3306
3340
|
{
|
|
3307
3341
|
className: "fill-muted-foreground group-hover:fill-foreground transition",
|
|
3308
3342
|
size: 16,
|
|
@@ -3316,9 +3350,9 @@ const pe = "__none", fa = ({
|
|
|
3316
3350
|
"aria-describedby": void 0,
|
|
3317
3351
|
showCloseButton: !0,
|
|
3318
3352
|
children: [
|
|
3319
|
-
/* @__PURE__ */ t.jsx(
|
|
3353
|
+
/* @__PURE__ */ t.jsx(ps, { children: /* @__PURE__ */ t.jsx(nt, { children: "Playground" }) }),
|
|
3320
3354
|
n && /* @__PURE__ */ t.jsx(
|
|
3321
|
-
|
|
3355
|
+
ya,
|
|
3322
3356
|
{
|
|
3323
3357
|
requiresLogin: a && !c && !i,
|
|
3324
3358
|
onLogin: () => r(),
|
|
@@ -3330,7 +3364,7 @@ const pe = "__none", fa = ({
|
|
|
3330
3364
|
}
|
|
3331
3365
|
)
|
|
3332
3366
|
] });
|
|
3333
|
-
},
|
|
3367
|
+
}, ba = {
|
|
3334
3368
|
get: "green",
|
|
3335
3369
|
post: "blue",
|
|
3336
3370
|
put: "yellow",
|
|
@@ -3338,7 +3372,7 @@ const pe = "__none", fa = ({
|
|
|
3338
3372
|
patch: "purple",
|
|
3339
3373
|
options: "gray",
|
|
3340
3374
|
head: "gray"
|
|
3341
|
-
},
|
|
3375
|
+
}, Et = ({
|
|
3342
3376
|
label: e,
|
|
3343
3377
|
path: n,
|
|
3344
3378
|
operations: s,
|
|
@@ -3362,21 +3396,21 @@ const pe = "__none", fa = ({
|
|
|
3362
3396
|
badge: {
|
|
3363
3397
|
label: o.method,
|
|
3364
3398
|
// biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
|
|
3365
|
-
color:
|
|
3399
|
+
color: ba[o.method.toLowerCase()],
|
|
3366
3400
|
invert: !0
|
|
3367
3401
|
}
|
|
3368
3402
|
}))
|
|
3369
|
-
}),
|
|
3403
|
+
}), yn = Vt(
|
|
3370
3404
|
void 0
|
|
3371
|
-
),
|
|
3372
|
-
const e =
|
|
3405
|
+
), ro = yn.Provider, ja = () => {
|
|
3406
|
+
const e = ms(yn);
|
|
3373
3407
|
if (!e)
|
|
3374
3408
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
3375
3409
|
return e.config;
|
|
3376
3410
|
}, Qe = (e) => ({
|
|
3377
3411
|
path: e.routePath,
|
|
3378
3412
|
async lazy() {
|
|
3379
|
-
const { OasProvider: n } = await import("./OasProvider
|
|
3413
|
+
const { OasProvider: n } = await import("./OasProvider-DPPdikt_.js");
|
|
3380
3414
|
return {
|
|
3381
3415
|
element: /* @__PURE__ */ t.jsx(
|
|
3382
3416
|
n,
|
|
@@ -3390,28 +3424,28 @@ const pe = "__none", fa = ({
|
|
|
3390
3424
|
};
|
|
3391
3425
|
},
|
|
3392
3426
|
children: e.routes
|
|
3393
|
-
}),
|
|
3427
|
+
}), vn = ({
|
|
3394
3428
|
path: e,
|
|
3395
3429
|
tag: n,
|
|
3396
3430
|
untagged: s
|
|
3397
3431
|
}) => ({
|
|
3398
3432
|
path: e,
|
|
3399
3433
|
async lazy() {
|
|
3400
|
-
const { OperationList: a } = await import("./OperationList-
|
|
3434
|
+
const { OperationList: a } = await import("./OperationList-cEveQ_l5.js");
|
|
3401
3435
|
return { element: /* @__PURE__ */ t.jsx(a, { tag: n, untagged: s }) };
|
|
3402
3436
|
}
|
|
3403
|
-
}),
|
|
3437
|
+
}), Ca = ({
|
|
3404
3438
|
render: e,
|
|
3405
3439
|
path: n
|
|
3406
3440
|
}) => {
|
|
3407
|
-
const { type: s, input: a } =
|
|
3441
|
+
const { type: s, input: a } = ja(), { tag: r } = ts(), o = ns(), i = wr(jn, { type: s, input: a }), {
|
|
3408
3442
|
data: { schema: c }
|
|
3409
|
-
} =
|
|
3443
|
+
} = Us(i), l = c.tags.at(0);
|
|
3410
3444
|
return !r && l?.slug ? /* @__PURE__ */ t.jsx(
|
|
3411
|
-
|
|
3445
|
+
ss,
|
|
3412
3446
|
{
|
|
3413
3447
|
to: {
|
|
3414
|
-
pathname:
|
|
3448
|
+
pathname: rs(n, { tag: l.slug }),
|
|
3415
3449
|
search: o.search
|
|
3416
3450
|
}
|
|
3417
3451
|
}
|
|
@@ -3419,10 +3453,10 @@ const pe = "__none", fa = ({
|
|
|
3419
3453
|
}, Rt = ({ path: e }) => ({
|
|
3420
3454
|
path: e,
|
|
3421
3455
|
async lazy() {
|
|
3422
|
-
const { OperationList: n } = await import("./OperationList-
|
|
3456
|
+
const { OperationList: n } = await import("./OperationList-cEveQ_l5.js");
|
|
3423
3457
|
return {
|
|
3424
3458
|
element: /* @__PURE__ */ t.jsx(
|
|
3425
|
-
|
|
3459
|
+
Ca,
|
|
3426
3460
|
{
|
|
3427
3461
|
path: e,
|
|
3428
3462
|
render: (s) => /* @__PURE__ */ t.jsx(n, { tag: s })
|
|
@@ -3432,7 +3466,7 @@ const pe = "__none", fa = ({
|
|
|
3432
3466
|
}
|
|
3433
3467
|
}), Ke = (e) => [
|
|
3434
3468
|
// Category without tagged operations
|
|
3435
|
-
|
|
3469
|
+
vn({
|
|
3436
3470
|
path: V(e, lt),
|
|
3437
3471
|
untagged: !0
|
|
3438
3472
|
}),
|
|
@@ -3440,25 +3474,25 @@ const pe = "__none", fa = ({
|
|
|
3440
3474
|
{
|
|
3441
3475
|
path: V(e, "~schemas"),
|
|
3442
3476
|
lazy: async () => {
|
|
3443
|
-
const { SchemaList: n } = await import("./SchemaList-
|
|
3477
|
+
const { SchemaList: n } = await import("./SchemaList-CRC8n5co.js");
|
|
3444
3478
|
return { element: /* @__PURE__ */ t.jsx(n, {}) };
|
|
3445
3479
|
}
|
|
3446
3480
|
}
|
|
3447
|
-
],
|
|
3481
|
+
], Na = (e, n) => {
|
|
3448
3482
|
const s = V(e, n.at(0) ?? lt);
|
|
3449
3483
|
return [
|
|
3450
3484
|
// Redirect to first tag on the index route
|
|
3451
|
-
{ index: !0, loader: () =>
|
|
3485
|
+
{ index: !0, loader: () => es(s) },
|
|
3452
3486
|
// Create routes for each tag
|
|
3453
3487
|
...n.map(
|
|
3454
|
-
(a) =>
|
|
3488
|
+
(a) => vn({
|
|
3455
3489
|
path: V(e, a),
|
|
3456
3490
|
tag: a
|
|
3457
3491
|
})
|
|
3458
3492
|
),
|
|
3459
3493
|
...Ke(e)
|
|
3460
3494
|
];
|
|
3461
|
-
},
|
|
3495
|
+
}, bn = (e) => e.type === "raw" || !Array.isArray(e.input) ? { versions: [], labels: {}, downloadUrls: {} } : {
|
|
3462
3496
|
versions: e.input.map((n) => n.path),
|
|
3463
3497
|
labels: Object.fromEntries(
|
|
3464
3498
|
e.input.map((n) => [n.path, n.label ?? n.path])
|
|
@@ -3466,19 +3500,19 @@ const pe = "__none", fa = ({
|
|
|
3466
3500
|
downloadUrls: Object.fromEntries(
|
|
3467
3501
|
e.input.map((n) => [n.path, n.downloadUrl])
|
|
3468
3502
|
)
|
|
3469
|
-
},
|
|
3503
|
+
}, wa = ({
|
|
3470
3504
|
basePath: e,
|
|
3471
3505
|
config: n,
|
|
3472
3506
|
client: s
|
|
3473
3507
|
}) => {
|
|
3474
|
-
const a = n.tagPages, { versions: r } =
|
|
3508
|
+
const a = n.tagPages, { versions: r } = bn(n);
|
|
3475
3509
|
return a ? (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3476
3510
|
const c = V(e, i);
|
|
3477
3511
|
return Qe({
|
|
3478
3512
|
basePath: e,
|
|
3479
3513
|
version: i,
|
|
3480
3514
|
routePath: c,
|
|
3481
|
-
routes:
|
|
3515
|
+
routes: Na(c, a),
|
|
3482
3516
|
client: s,
|
|
3483
3517
|
config: n
|
|
3484
3518
|
});
|
|
@@ -3507,7 +3541,7 @@ const pe = "__none", fa = ({
|
|
|
3507
3541
|
config: n
|
|
3508
3542
|
})
|
|
3509
3543
|
];
|
|
3510
|
-
},
|
|
3544
|
+
}, jn = Er(`
|
|
3511
3545
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3512
3546
|
schema(input: $input, type: $type) {
|
|
3513
3547
|
extensions
|
|
@@ -3530,8 +3564,8 @@ const pe = "__none", fa = ({
|
|
|
3530
3564
|
}
|
|
3531
3565
|
}
|
|
3532
3566
|
}
|
|
3533
|
-
`), lt = "~endpoints",
|
|
3534
|
-
const n = V(e.path), s = new
|
|
3567
|
+
`), lt = "~endpoints", ao = (e) => {
|
|
3568
|
+
const n = V(e.path), s = new Gs(e);
|
|
3535
3569
|
return {
|
|
3536
3570
|
getHead: () => {
|
|
3537
3571
|
if (e.type === "url" && !e.skipPreload)
|
|
@@ -3559,7 +3593,7 @@ const pe = "__none", fa = ({
|
|
|
3559
3593
|
if (!a)
|
|
3560
3594
|
throw new Error("Server is required");
|
|
3561
3595
|
return /* @__PURE__ */ t.jsx(
|
|
3562
|
-
|
|
3596
|
+
va,
|
|
3563
3597
|
{
|
|
3564
3598
|
url: o,
|
|
3565
3599
|
method: r,
|
|
@@ -3567,7 +3601,7 @@ const pe = "__none", fa = ({
|
|
|
3567
3601
|
...c,
|
|
3568
3602
|
children: /* @__PURE__ */ t.jsx(K, { className: "gap-2 items-center", variant: "outline", children: i ?? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3569
3603
|
"Open in Playground",
|
|
3570
|
-
/* @__PURE__ */ t.jsx(
|
|
3604
|
+
/* @__PURE__ */ t.jsx(Yn, { size: 16 })
|
|
3571
3605
|
] }) })
|
|
3572
3606
|
}
|
|
3573
3607
|
);
|
|
@@ -3581,33 +3615,33 @@ const pe = "__none", fa = ({
|
|
|
3581
3615
|
a
|
|
3582
3616
|
);
|
|
3583
3617
|
try {
|
|
3584
|
-
const i = o?.params.version, { versions: c } =
|
|
3618
|
+
const i = o?.params.version, { versions: c } = bn(e), l = i ?? c.at(0), { type: m } = e, d = Array.isArray(e.input) ? e.input.find((N) => N.path === l)?.input ?? e.input[0]?.input : e.input, f = cn(s, jn, {
|
|
3585
3619
|
type: m,
|
|
3586
3620
|
input: d
|
|
3587
|
-
}), x = await r.queryClient.ensureQueryData(f),
|
|
3621
|
+
}), x = await r.queryClient.ensureQueryData(f), p = new Map(
|
|
3588
3622
|
x.schema.tags.filter((N) => N.name && N.operations.length > 0).map((N) => {
|
|
3589
3623
|
if (!N.name)
|
|
3590
3624
|
throw new Error(`Tag ${N.slug} has no name`);
|
|
3591
|
-
const j = V(n, i, N.slug),
|
|
3625
|
+
const j = V(n, i, N.slug), $ = N.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, Q = N.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3592
3626
|
return [
|
|
3593
3627
|
N.name,
|
|
3594
|
-
|
|
3628
|
+
Et({
|
|
3595
3629
|
label: N.extensions?.["x-displayName"] ?? N.name,
|
|
3596
3630
|
path: j,
|
|
3597
3631
|
operations: N.operations,
|
|
3598
|
-
collapsed:
|
|
3632
|
+
collapsed: $,
|
|
3599
3633
|
collapsible: Q
|
|
3600
3634
|
})
|
|
3601
3635
|
];
|
|
3602
3636
|
})
|
|
3603
3637
|
), v = x.schema.extensions?.["x-tagGroups"] ?? [], u = new Set(
|
|
3604
3638
|
v.flatMap(
|
|
3605
|
-
(N) => N.tags.filter((j) =>
|
|
3639
|
+
(N) => N.tags.filter((j) => p.has(j))
|
|
3606
3640
|
)
|
|
3607
|
-
),
|
|
3641
|
+
), w = [
|
|
3608
3642
|
...v.flatMap(
|
|
3609
3643
|
(N) => {
|
|
3610
|
-
const j = N.tags.map((
|
|
3644
|
+
const j = N.tags.map(($) => p.get($)).filter(Boolean);
|
|
3611
3645
|
return j.length === 0 ? [] : [
|
|
3612
3646
|
{
|
|
3613
3647
|
type: "category",
|
|
@@ -3619,64 +3653,64 @@ const pe = "__none", fa = ({
|
|
|
3619
3653
|
];
|
|
3620
3654
|
}
|
|
3621
3655
|
),
|
|
3622
|
-
...Array.from(
|
|
3656
|
+
...Array.from(p.entries()).filter(([N]) => !u.has(N)).map(([, N]) => N)
|
|
3623
3657
|
], R = x.schema.tags.find(
|
|
3624
3658
|
(N) => !N.name
|
|
3625
3659
|
)?.operations;
|
|
3626
|
-
return R && R.length > 0 &&
|
|
3627
|
-
|
|
3628
|
-
label:
|
|
3660
|
+
return R && R.length > 0 && w.push(
|
|
3661
|
+
Et({
|
|
3662
|
+
label: w.length === 0 ? "Endpoints" : "Other endpoints",
|
|
3629
3663
|
path: V(n, i, lt),
|
|
3630
3664
|
operations: R,
|
|
3631
3665
|
collapsed: !e.options?.expandAllTags
|
|
3632
3666
|
})
|
|
3633
|
-
), x.schema.components?.schemas?.length &&
|
|
3667
|
+
), x.schema.components?.schemas?.length && w.push({
|
|
3634
3668
|
type: "link",
|
|
3635
3669
|
label: "Schemas",
|
|
3636
3670
|
to: V(n, i, "~schemas")
|
|
3637
|
-
}),
|
|
3671
|
+
}), w;
|
|
3638
3672
|
} catch {
|
|
3639
3673
|
return [];
|
|
3640
3674
|
}
|
|
3641
3675
|
},
|
|
3642
|
-
getRoutes: () =>
|
|
3676
|
+
getRoutes: () => wa({ basePath: n, config: e, client: s })
|
|
3643
3677
|
};
|
|
3644
3678
|
};
|
|
3645
3679
|
export {
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3680
|
+
_ as C,
|
|
3681
|
+
so as G,
|
|
3682
|
+
sr as L,
|
|
3683
|
+
ro as O,
|
|
3684
|
+
va as P,
|
|
3685
|
+
Ks as Q,
|
|
3686
|
+
on as S,
|
|
3653
3687
|
b as T,
|
|
3654
3688
|
lt as U,
|
|
3655
|
-
|
|
3689
|
+
wr as a,
|
|
3656
3690
|
de as b,
|
|
3657
|
-
|
|
3691
|
+
q as c,
|
|
3658
3692
|
Er as d,
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3693
|
+
Vr as e,
|
|
3694
|
+
fn as f,
|
|
3695
|
+
bn as g,
|
|
3696
|
+
sa as h,
|
|
3697
|
+
Cr as i,
|
|
3664
3698
|
Pt as j,
|
|
3665
|
-
|
|
3666
|
-
|
|
3699
|
+
to as k,
|
|
3700
|
+
rr as l,
|
|
3667
3701
|
rt as m,
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3702
|
+
an as n,
|
|
3703
|
+
Hs as o,
|
|
3704
|
+
jr as p,
|
|
3671
3705
|
qe as q,
|
|
3672
|
-
|
|
3706
|
+
Qs as r,
|
|
3673
3707
|
F as s,
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3708
|
+
no as t,
|
|
3709
|
+
ja as u,
|
|
3710
|
+
nr as v,
|
|
3711
|
+
Ys as w,
|
|
3712
|
+
tn as x,
|
|
3713
|
+
jn as y,
|
|
3714
|
+
ao as z
|
|
3681
3715
|
};
|
|
3682
|
-
//# sourceMappingURL=index-
|
|
3716
|
+
//# sourceMappingURL=index-Ck4TmzTO.js.map
|