zudoku 0.52.1 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/demo.js +2 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +4 -4
- package/dist/app/standalone.js +3 -3
- package/dist/app/standalone.js.map +1 -1
- package/dist/config/validators/validate.d.ts +2 -2
- package/dist/config/validators/validate.js +3 -3
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +325 -0
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +10 -10
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Main.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -4
- package/dist/lib/core/ZudokuContext.js +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +8 -13
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +3 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +5 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +3 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/lib/{Command-CPtGTZAL.js → Command-xsbs2uhf.js} +2 -2
- package/lib/{Command-CPtGTZAL.js.map → Command-xsbs2uhf.js.map} +1 -1
- package/lib/{Dialog-DGlrUTCS.js → Dialog-CiIdyz6a.js} +3 -3
- package/lib/Dialog-CiIdyz6a.js.map +1 -0
- package/lib/{MdxPage-D-QSUlMf.js → MdxPage-swXPJ0gf.js} +3 -3
- package/lib/{MdxPage-D-QSUlMf.js.map → MdxPage-swXPJ0gf.js.map} +1 -1
- package/lib/{OasProvider-DKB2uJU-.js → OasProvider-CDAM3TB1.js} +2 -2
- package/lib/{OasProvider-DKB2uJU-.js.map → OasProvider-CDAM3TB1.js.map} +1 -1
- package/lib/{OperationList-CccIt45w.js → OperationList-C9Hb9ql8.js} +6 -6
- package/lib/{OperationList-CccIt45w.js.map → OperationList-C9Hb9ql8.js.map} +1 -1
- package/lib/{Pagination-ClHXydm9.js → Pagination-VGlgeCmS.js} +2 -2
- package/lib/{Pagination-ClHXydm9.js.map → Pagination-VGlgeCmS.js.map} +1 -1
- package/lib/{RouteGuard-Bd-ppFbi.js → RouteGuard-CbKd7_9h.js} +2 -2
- package/lib/{RouteGuard-Bd-ppFbi.js.map → RouteGuard-CbKd7_9h.js.map} +1 -1
- package/lib/{SchemaList-DY3FBF2U.js → SchemaList-BAbh1BXO.js} +4 -4
- package/lib/{SchemaList-DY3FBF2U.js.map → SchemaList-BAbh1BXO.js.map} +1 -1
- package/lib/{SchemaView-matL2maR.js → SchemaView-C2Io712T.js} +3 -3
- package/lib/{SchemaView-matL2maR.js.map → SchemaView-C2Io712T.js.map} +1 -1
- package/lib/{SignUp-CfojO4Pb.js → SignUp-5RUdVhnq.js} +2 -2
- package/lib/{SignUp-CfojO4Pb.js.map → SignUp-5RUdVhnq.js.map} +1 -1
- package/lib/{circular-CqHpo7-e.js → circular-B42RaanD.js} +2 -2
- package/lib/{circular-CqHpo7-e.js.map → circular-B42RaanD.js.map} +1 -1
- package/lib/{createServer-ByKo3XCG.js → createServer-BKFsRuuk.js} +3 -3
- package/lib/{createServer-ByKo3XCG.js.map → createServer-BKFsRuuk.js.map} +1 -1
- package/lib/{errors-BsabiSKg.js → errors-CF2X_x5o.js} +3 -3
- package/lib/{errors-BsabiSKg.js.map → errors-CF2X_x5o.js.map} +1 -1
- package/lib/{index-CEfpz8vY.js → index-B6Re5_cx.js} +843 -832
- package/lib/index-B6Re5_cx.js.map +1 -0
- package/lib/{index-BIbCx5Fh.js → index-CLy1XyH0.js} +14 -14
- package/lib/{index-BIbCx5Fh.js.map → index-CLy1XyH0.js.map} +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +23 -23
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +1 -1
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/package.json +1 -1
- package/src/app/demo.tsx +2 -2
- package/src/app/main.tsx +4 -4
- package/src/app/standalone.tsx +3 -3
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Header.tsx +15 -17
- package/src/lib/components/Main.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +2 -2
- package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
- package/src/lib/core/ZudokuContext.ts +5 -5
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +6 -5
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +73 -84
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +3 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +13 -2
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +22 -17
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +6 -0
- package/src/lib/ui/Dialog.tsx +2 -2
- package/lib/Dialog-DGlrUTCS.js.map +0 -1
- package/lib/index-CEfpz8vY.js.map +0 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { ChevronDown as
|
|
3
|
-
import { r as
|
|
4
|
-
import { o as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Z as
|
|
7
|
-
import * as
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { VisuallyHidden as
|
|
10
|
-
import { D as
|
|
11
|
-
import { S as
|
|
12
|
-
import { A as
|
|
13
|
-
import { u as
|
|
14
|
-
import { B as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import { c as
|
|
18
|
-
import { b as
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import { PopoverAnchor as
|
|
25
|
-
import { P as
|
|
26
|
-
import { f as
|
|
27
|
-
import { Input as
|
|
28
|
-
import { Slot as
|
|
29
|
-
import { C as
|
|
30
|
-
import * as
|
|
31
|
-
import { c as
|
|
32
|
-
import * as
|
|
33
|
-
import { z as
|
|
34
|
-
import { h as
|
|
35
|
-
let
|
|
36
|
-
const
|
|
2
|
+
import { ChevronDown as xt, ChevronUp as jn, Check as gt, ChevronUpIcon as Nn, ChevronRightIcon as wn, CheckIcon as yt, DotIcon as Cn, PlusCircleIcon as fe, FileInput as Sn, TableOfContentsIcon as Tn, LockIcon as An, CircleAlertIcon as On, XIcon as vt, Circle as Rn, Unlink2Icon as Pn, CornerDownRightIcon as Ln, CornerDownLeftIcon as $n, DownloadIcon as In, UnplugIcon as En, SendIcon as kn, CopyIcon as Dn, IdCardLanyardIcon as zn, ShapesIcon as Fn, LogInIcon as qn, CirclePlayIcon as Vn } from "lucide-react";
|
|
3
|
+
import { r as Bn, c as _n, u as Un, N as Mn, g as Gn, m as rt } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
4
|
+
import { o as $e, p as Ie, q as bt, d as Hn, l as Qn, r as Jn, j as E, c as Wn, e as Xn } from "./hook-Bd0yS8M0.js";
|
|
5
|
+
import { Button as se } from "./ui/Button.js";
|
|
6
|
+
import { Z as Zn, i as Yn } from "./invariant-DAFpPywt.js";
|
|
7
|
+
import * as w from "react";
|
|
8
|
+
import { createContext as jt, use as Kn, useRef as L, useEffect as z, useMemo as Nt, useState as k, useCallback as wt, Fragment as K, useLayoutEffect as es, useTransition as ts, useContext as ns } from "react";
|
|
9
|
+
import { VisuallyHidden as ss } from "@radix-ui/react-visually-hidden";
|
|
10
|
+
import { D as Ee, a as ke, b as De, d as Ct, f as St, e as rs } from "./Dialog-CiIdyz6a.js";
|
|
11
|
+
import { S as as, a as os } from "./index-CLy1XyH0.js";
|
|
12
|
+
import { A as is, a as cs, b as ls, u as ds } from "./Alert-CT_ViLrJ.js";
|
|
13
|
+
import { u as oe, a as ze, C as F, b as us, F as ms } from "./index.esm-Cp4wkyud.js";
|
|
14
|
+
import { B as I } from "./Button-BE9IVkWV.js";
|
|
15
|
+
import * as Fe from "@radix-ui/react-collapsible";
|
|
16
|
+
import * as S from "@radix-ui/react-select";
|
|
17
|
+
import { c as v } from "./cn-wvCW-ho6.js";
|
|
18
|
+
import { b as at, c as ot, d as it, f as ps } from "./Slot-DwZlQ-vX.js";
|
|
19
|
+
import { u as hs } from "./CodeBlock-DAKxs_Tu.js";
|
|
20
|
+
import { u as fs } from "./RouteGuard-CbKd7_9h.js";
|
|
21
|
+
import * as C from "@radix-ui/react-dropdown-menu";
|
|
22
|
+
import * as Re from "@radix-ui/react-checkbox";
|
|
23
|
+
import * as ue from "@radix-ui/react-popover";
|
|
24
|
+
import { PopoverAnchor as xs } from "@radix-ui/react-popover";
|
|
25
|
+
import { P as gs } from "./index-CrcNWbel.js";
|
|
26
|
+
import { f as ys, g as vs, C as bs, b as js } from "./Command-xsbs2uhf.js";
|
|
27
|
+
import { Input as me } from "./ui/Input.js";
|
|
28
|
+
import { Slot as Ns } from "@radix-ui/react-slot";
|
|
29
|
+
import { C as ws } from "./Card-DPhGbYUM.js";
|
|
30
|
+
import * as Tt from "@radix-ui/react-label";
|
|
31
|
+
import { c as Cs } from "./index-DI5SPFK9.js";
|
|
32
|
+
import * as re from "@radix-ui/react-radio-group";
|
|
33
|
+
import { z as Ss } from "./index-ClhS5TxS.js";
|
|
34
|
+
import { h as Ts } from "./SyntaxHighlight-CrjhGEwT.js";
|
|
35
|
+
let Ne;
|
|
36
|
+
const As = (e) => {
|
|
37
37
|
if (e.errors?.[0])
|
|
38
|
-
throw new
|
|
38
|
+
throw new Zn(e.errors[0].message, {
|
|
39
39
|
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
class
|
|
42
|
+
class Os {
|
|
43
43
|
constructor(t) {
|
|
44
44
|
this.config = t;
|
|
45
45
|
}
|
|
46
|
-
#e = async () => (
|
|
46
|
+
#e = async () => (Ne || (Ne = import("./createServer-BKFsRuuk.js").then(
|
|
47
47
|
(t) => t.createServer(this.config)
|
|
48
|
-
)),
|
|
48
|
+
)), Ne);
|
|
49
49
|
#t = async (t) => this.config.server ? fetch(this.config.server, t) : (await this.#e()).fetch("http://localhost/graphql", t);
|
|
50
50
|
fetch = async (t, s) => {
|
|
51
51
|
const a = t.match(/query (\w+)/)?.[1], r = await this.#t({
|
|
@@ -56,27 +56,27 @@ class Ts {
|
|
|
56
56
|
if (!r.ok)
|
|
57
57
|
throw new Error("Network response was not ok");
|
|
58
58
|
const o = await r.json();
|
|
59
|
-
return
|
|
59
|
+
return As(o), o.data;
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function we(e, t) {
|
|
63
63
|
if (!!!e)
|
|
64
64
|
throw new Error(t);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Rs(e) {
|
|
67
67
|
return typeof e == "object" && e !== null;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Ps(e, t) {
|
|
70
70
|
if (!!!e)
|
|
71
71
|
throw new Error(
|
|
72
72
|
t ?? "Unexpected invariant triggered."
|
|
73
73
|
);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
function
|
|
75
|
+
const Ls = /\r\n|[\n\r]/g;
|
|
76
|
+
function Pe(e, t) {
|
|
77
77
|
let s = 0, a = 1;
|
|
78
|
-
for (const r of e.body.matchAll(
|
|
79
|
-
if (typeof r.index == "number" ||
|
|
78
|
+
for (const r of e.body.matchAll(Ls)) {
|
|
79
|
+
if (typeof r.index == "number" || Ps(!1), r.index >= t)
|
|
80
80
|
break;
|
|
81
81
|
s = r.index + r[0].length, a += 1;
|
|
82
82
|
}
|
|
@@ -85,27 +85,27 @@ function Ae(e, t) {
|
|
|
85
85
|
column: t + 1 - s
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function $s(e) {
|
|
89
|
+
return At(
|
|
90
90
|
e.source,
|
|
91
|
-
|
|
91
|
+
Pe(e.source, e.start)
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function At(e, t) {
|
|
95
95
|
const s = e.locationOffset.column - 1, a = "".padStart(s) + e.body, r = t.line - 1, o = e.locationOffset.line - 1, i = t.line + o, l = t.line === 1 ? s : 0, c = t.column + l, u = `${e.name}:${i}:${c}
|
|
96
96
|
`, d = a.split(/\r\n|[\n\r]/g), p = d[r];
|
|
97
97
|
if (p.length > 120) {
|
|
98
98
|
const f = Math.floor(c / 80), m = c % 80, x = [];
|
|
99
|
-
for (let
|
|
100
|
-
x.push(p.slice(
|
|
101
|
-
return u +
|
|
99
|
+
for (let y = 0; y < p.length; y += 80)
|
|
100
|
+
x.push(p.slice(y, y + 80));
|
|
101
|
+
return u + ct([
|
|
102
102
|
[`${i} |`, x[0]],
|
|
103
|
-
...x.slice(1, f + 1).map((
|
|
103
|
+
...x.slice(1, f + 1).map((y) => ["|", y]),
|
|
104
104
|
["|", "^".padStart(m)],
|
|
105
105
|
["|", x[f + 1]]
|
|
106
106
|
]);
|
|
107
107
|
}
|
|
108
|
-
return u +
|
|
108
|
+
return u + ct([
|
|
109
109
|
// Lines specified like this: ["prefix", "string"],
|
|
110
110
|
[`${i - 1} |`, d[r - 1]],
|
|
111
111
|
[`${i} |`, p],
|
|
@@ -113,12 +113,12 @@ function Tt(e, t) {
|
|
|
113
113
|
[`${i + 1} |`, d[r + 1]]
|
|
114
114
|
]);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ct(e) {
|
|
117
117
|
const t = e.filter(([a, r]) => r !== void 0), s = Math.max(...t.map(([a]) => a.length));
|
|
118
118
|
return t.map(([a, r]) => a.padStart(s) + (r ? " " + r : "")).join(`
|
|
119
119
|
`);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Is(e) {
|
|
122
122
|
const t = e[0];
|
|
123
123
|
return t == null || "kind" in t || "length" in t ? {
|
|
124
124
|
nodes: t,
|
|
@@ -129,7 +129,7 @@ function Ls(e) {
|
|
|
129
129
|
extensions: e[5]
|
|
130
130
|
} : t;
|
|
131
131
|
}
|
|
132
|
-
class
|
|
132
|
+
class qe extends Error {
|
|
133
133
|
/**
|
|
134
134
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
135
135
|
* which correspond to this error.
|
|
@@ -170,15 +170,15 @@ class De extends Error {
|
|
|
170
170
|
*/
|
|
171
171
|
constructor(t, ...s) {
|
|
172
172
|
var a, r, o;
|
|
173
|
-
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: p } =
|
|
174
|
-
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes =
|
|
173
|
+
const { nodes: i, source: l, positions: c, path: u, originalError: d, extensions: p } = Is(s);
|
|
174
|
+
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = d ?? void 0, this.nodes = lt(
|
|
175
175
|
Array.isArray(i) ? i : i ? [i] : void 0
|
|
176
176
|
);
|
|
177
|
-
const f =
|
|
177
|
+
const f = lt(
|
|
178
178
|
(a = this.nodes) === null || a === void 0 ? void 0 : a.map((x) => x.loc).filter((x) => x != null)
|
|
179
179
|
);
|
|
180
|
-
this.source = l ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? f?.map((x) => x.start), this.locations = c && l ? c.map((x) =>
|
|
181
|
-
const m =
|
|
180
|
+
this.source = l ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? f?.map((x) => x.start), this.locations = c && l ? c.map((x) => Pe(l, x)) : f?.map((x) => Pe(x.source, x.start));
|
|
181
|
+
const m = Rs(
|
|
182
182
|
d?.extensions
|
|
183
183
|
) ? d?.extensions : void 0;
|
|
184
184
|
this.extensions = (o = p ?? m) !== null && o !== void 0 ? o : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
@@ -205,7 +205,7 @@ class De extends Error {
|
|
|
205
205
|
value: d.stack,
|
|
206
206
|
writable: !0,
|
|
207
207
|
configurable: !0
|
|
208
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
208
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, qe) : Object.defineProperty(this, "stack", {
|
|
209
209
|
value: Error().stack,
|
|
210
210
|
writable: !0,
|
|
211
211
|
configurable: !0
|
|
@@ -220,12 +220,12 @@ class De extends Error {
|
|
|
220
220
|
for (const s of this.nodes)
|
|
221
221
|
s.loc && (t += `
|
|
222
222
|
|
|
223
|
-
` +
|
|
223
|
+
` + $s(s.loc));
|
|
224
224
|
else if (this.source && this.locations)
|
|
225
225
|
for (const s of this.locations)
|
|
226
226
|
t += `
|
|
227
227
|
|
|
228
|
-
` +
|
|
228
|
+
` + At(this.source, s);
|
|
229
229
|
return t;
|
|
230
230
|
}
|
|
231
231
|
toJSON() {
|
|
@@ -235,16 +235,16 @@ class De extends Error {
|
|
|
235
235
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function lt(e) {
|
|
239
239
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
240
240
|
}
|
|
241
241
|
function $(e, t, s) {
|
|
242
|
-
return new
|
|
242
|
+
return new qe(`Syntax Error: ${s}`, {
|
|
243
243
|
source: e,
|
|
244
244
|
positions: [t]
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
|
-
class
|
|
247
|
+
class Ma {
|
|
248
248
|
/**
|
|
249
249
|
* The character offset at which this Node begins.
|
|
250
250
|
*/
|
|
@@ -273,7 +273,7 @@ class _a {
|
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
class
|
|
276
|
+
class Ot {
|
|
277
277
|
/**
|
|
278
278
|
* The kind of Token.
|
|
279
279
|
*/
|
|
@@ -315,7 +315,7 @@ class At {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const Es = {
|
|
319
319
|
Name: [],
|
|
320
320
|
Document: ["definitions"],
|
|
321
321
|
OperationDefinition: [
|
|
@@ -389,37 +389,37 @@ const $s = {
|
|
|
389
389
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
390
390
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
391
391
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
392
|
-
},
|
|
393
|
-
function
|
|
392
|
+
}, ks = new Set(Object.keys(Es));
|
|
393
|
+
function Ga(e) {
|
|
394
394
|
const t = e?.kind;
|
|
395
|
-
return typeof t == "string" &&
|
|
395
|
+
return typeof t == "string" && ks.has(t);
|
|
396
396
|
}
|
|
397
|
-
var
|
|
397
|
+
var dt;
|
|
398
398
|
(function(e) {
|
|
399
399
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
400
|
-
})(
|
|
401
|
-
function
|
|
400
|
+
})(dt || (dt = {}));
|
|
401
|
+
function Le(e) {
|
|
402
402
|
return e === 9 || e === 32;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function ae(e) {
|
|
405
405
|
return e >= 48 && e <= 57;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Rt(e) {
|
|
408
408
|
return e >= 97 && e <= 122 || // A-Z
|
|
409
409
|
e >= 65 && e <= 90;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
return
|
|
411
|
+
function Pt(e) {
|
|
412
|
+
return Rt(e) || e === 95;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
return
|
|
414
|
+
function Ds(e) {
|
|
415
|
+
return Rt(e) || ae(e) || e === 95;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function zs(e) {
|
|
418
418
|
var t;
|
|
419
419
|
let s = Number.MAX_SAFE_INTEGER, a = null, r = -1;
|
|
420
420
|
for (let i = 0; i < e.length; ++i) {
|
|
421
421
|
var o;
|
|
422
|
-
const l = e[i], c =
|
|
422
|
+
const l = e[i], c = Fs(l);
|
|
423
423
|
c !== l.length && (a = (o = a) !== null && o !== void 0 ? o : i, r = i, i !== 0 && c < s && (s = c));
|
|
424
424
|
}
|
|
425
425
|
return e.map((i, l) => l === 0 ? i : i.slice(s)).slice(
|
|
@@ -427,17 +427,17 @@ function ks(e) {
|
|
|
427
427
|
r + 1
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Fs(e) {
|
|
431
431
|
let t = 0;
|
|
432
|
-
for (; t < e.length &&
|
|
432
|
+
for (; t < e.length && Le(e.charCodeAt(t)); )
|
|
433
433
|
++t;
|
|
434
434
|
return t;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
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((m) => m.length === 0 ||
|
|
436
|
+
function qs(e, t) {
|
|
437
|
+
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((m) => m.length === 0 || Le(m.charCodeAt(0))), i = s.endsWith('\\"""'), l = e.endsWith('"') && !i, c = e.endsWith("\\"), u = l || c, d = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
438
438
|
(!r || e.length > 70 || u || o || i);
|
|
439
439
|
let p = "";
|
|
440
|
-
const f = r &&
|
|
440
|
+
const f = r && Le(e.charCodeAt(0));
|
|
441
441
|
return (d && !f || o) && (p += `
|
|
442
442
|
`), p += s, (d || u) && (p += `
|
|
443
443
|
`), '"""' + p + '"""';
|
|
@@ -446,7 +446,7 @@ var g;
|
|
|
446
446
|
(function(e) {
|
|
447
447
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
448
448
|
})(g || (g = {}));
|
|
449
|
-
class
|
|
449
|
+
class Vs {
|
|
450
450
|
/**
|
|
451
451
|
* The previously focused non-ignored token.
|
|
452
452
|
*/
|
|
@@ -460,7 +460,7 @@ class Fs {
|
|
|
460
460
|
* The character offset at which the current line begins.
|
|
461
461
|
*/
|
|
462
462
|
constructor(t) {
|
|
463
|
-
const s = new
|
|
463
|
+
const s = new Ot(g.SOF, 0, 0, 0, 0);
|
|
464
464
|
this.source = t, this.lastToken = s, this.token = s, this.line = 1, this.lineStart = 0;
|
|
465
465
|
}
|
|
466
466
|
get [Symbol.toStringTag]() {
|
|
@@ -483,26 +483,26 @@ class Fs {
|
|
|
483
483
|
if (t.next)
|
|
484
484
|
t = t.next;
|
|
485
485
|
else {
|
|
486
|
-
const s =
|
|
486
|
+
const s = _s(this, t.end);
|
|
487
487
|
t.next = s, s.prev = t, t = s;
|
|
488
488
|
}
|
|
489
489
|
while (t.kind === g.COMMENT);
|
|
490
490
|
return t;
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function Bs(e) {
|
|
494
494
|
return e === g.BANG || e === g.DOLLAR || e === g.AMP || e === g.PAREN_L || e === g.PAREN_R || e === g.SPREAD || e === g.COLON || e === g.EQUALS || e === g.AT || e === g.BRACKET_L || e === g.BRACKET_R || e === g.BRACE_L || e === g.PIPE || e === g.BRACE_R;
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Z(e) {
|
|
497
497
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
499
|
+
function xe(e, t) {
|
|
500
|
+
return Lt(e.charCodeAt(t)) && $t(e.charCodeAt(t + 1));
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Lt(e) {
|
|
503
503
|
return e >= 55296 && e <= 56319;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function $t(e) {
|
|
506
506
|
return e >= 56320 && e <= 57343;
|
|
507
507
|
}
|
|
508
508
|
function U(e, t) {
|
|
@@ -515,11 +515,11 @@ function U(e, t) {
|
|
|
515
515
|
}
|
|
516
516
|
return "U+" + s.toString(16).toUpperCase().padStart(4, "0");
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function T(e, t, s, a, r) {
|
|
519
519
|
const o = e.line, i = 1 + s - e.lineStart;
|
|
520
|
-
return new
|
|
520
|
+
return new Ot(t, s, a, o, i, r);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function _s(e, t) {
|
|
523
523
|
const s = e.source.body, a = s.length;
|
|
524
524
|
let r = t;
|
|
525
525
|
for (; r < a; ) {
|
|
@@ -560,7 +560,7 @@ function Bs(e, t) {
|
|
|
560
560
|
continue;
|
|
561
561
|
// Comment
|
|
562
562
|
case 35:
|
|
563
|
-
return
|
|
563
|
+
return Us(e, r);
|
|
564
564
|
// Token ::
|
|
565
565
|
// - Punctuator
|
|
566
566
|
// - Name
|
|
@@ -570,66 +570,66 @@ function Bs(e, t) {
|
|
|
570
570
|
//
|
|
571
571
|
// Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
|
|
572
572
|
case 33:
|
|
573
|
-
return
|
|
573
|
+
return T(e, g.BANG, r, r + 1);
|
|
574
574
|
case 36:
|
|
575
|
-
return
|
|
575
|
+
return T(e, g.DOLLAR, r, r + 1);
|
|
576
576
|
case 38:
|
|
577
|
-
return
|
|
577
|
+
return T(e, g.AMP, r, r + 1);
|
|
578
578
|
case 40:
|
|
579
|
-
return
|
|
579
|
+
return T(e, g.PAREN_L, r, r + 1);
|
|
580
580
|
case 41:
|
|
581
|
-
return
|
|
581
|
+
return T(e, g.PAREN_R, r, r + 1);
|
|
582
582
|
case 46:
|
|
583
583
|
if (s.charCodeAt(r + 1) === 46 && s.charCodeAt(r + 2) === 46)
|
|
584
|
-
return
|
|
584
|
+
return T(e, g.SPREAD, r, r + 3);
|
|
585
585
|
break;
|
|
586
586
|
case 58:
|
|
587
|
-
return
|
|
587
|
+
return T(e, g.COLON, r, r + 1);
|
|
588
588
|
case 61:
|
|
589
|
-
return
|
|
589
|
+
return T(e, g.EQUALS, r, r + 1);
|
|
590
590
|
case 64:
|
|
591
|
-
return
|
|
591
|
+
return T(e, g.AT, r, r + 1);
|
|
592
592
|
case 91:
|
|
593
|
-
return
|
|
593
|
+
return T(e, g.BRACKET_L, r, r + 1);
|
|
594
594
|
case 93:
|
|
595
|
-
return
|
|
595
|
+
return T(e, g.BRACKET_R, r, r + 1);
|
|
596
596
|
case 123:
|
|
597
|
-
return
|
|
597
|
+
return T(e, g.BRACE_L, r, r + 1);
|
|
598
598
|
case 124:
|
|
599
|
-
return
|
|
599
|
+
return T(e, g.PIPE, r, r + 1);
|
|
600
600
|
case 125:
|
|
601
|
-
return
|
|
601
|
+
return T(e, g.BRACE_R, r, r + 1);
|
|
602
602
|
// StringValue
|
|
603
603
|
case 34:
|
|
604
|
-
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ?
|
|
604
|
+
return s.charCodeAt(r + 1) === 34 && s.charCodeAt(r + 2) === 34 ? Ws(e, r) : Gs(e, r);
|
|
605
605
|
}
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
608
|
-
if (
|
|
609
|
-
return
|
|
606
|
+
if (ae(o) || o === 45)
|
|
607
|
+
return Ms(e, r, o);
|
|
608
|
+
if (Pt(o))
|
|
609
|
+
return Xs(e, r);
|
|
610
610
|
throw $(
|
|
611
611
|
e.source,
|
|
612
612
|
r,
|
|
613
|
-
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
613
|
+
o === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Z(o) || xe(s, r) ? `Unexpected character: ${U(e, r)}.` : `Invalid character: ${U(e, r)}.`
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
|
-
return
|
|
616
|
+
return T(e, g.EOF, a, a);
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function Us(e, t) {
|
|
619
619
|
const s = e.source.body, a = s.length;
|
|
620
620
|
let r = t + 1;
|
|
621
621
|
for (; r < a; ) {
|
|
622
622
|
const o = s.charCodeAt(r);
|
|
623
623
|
if (o === 10 || o === 13)
|
|
624
624
|
break;
|
|
625
|
-
if (
|
|
625
|
+
if (Z(o))
|
|
626
626
|
++r;
|
|
627
|
-
else if (
|
|
627
|
+
else if (xe(s, r))
|
|
628
628
|
r += 2;
|
|
629
629
|
else
|
|
630
630
|
break;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return T(
|
|
633
633
|
e,
|
|
634
634
|
g.COMMENT,
|
|
635
635
|
t,
|
|
@@ -637,11 +637,11 @@ function Vs(e, t) {
|
|
|
637
637
|
s.slice(t + 1, r)
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Ms(e, t, s) {
|
|
641
641
|
const a = e.source.body;
|
|
642
642
|
let r = t, o = s, i = !1;
|
|
643
643
|
if (o === 45 && (o = a.charCodeAt(++r)), o === 48) {
|
|
644
|
-
if (o = a.charCodeAt(++r),
|
|
644
|
+
if (o = a.charCodeAt(++r), ae(o))
|
|
645
645
|
throw $(
|
|
646
646
|
e.source,
|
|
647
647
|
r,
|
|
@@ -651,8 +651,8 @@ function _s(e, t, s) {
|
|
|
651
651
|
)}.`
|
|
652
652
|
);
|
|
653
653
|
} else
|
|
654
|
-
r =
|
|
655
|
-
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r =
|
|
654
|
+
r = Ce(e, r, o), o = a.charCodeAt(r);
|
|
655
|
+
if (o === 46 && (i = !0, o = a.charCodeAt(++r), r = Ce(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 = Ce(e, r, o), o = a.charCodeAt(r)), o === 46 || Pt(o))
|
|
656
656
|
throw $(
|
|
657
657
|
e.source,
|
|
658
658
|
r,
|
|
@@ -661,7 +661,7 @@ function _s(e, t, s) {
|
|
|
661
661
|
r
|
|
662
662
|
)}.`
|
|
663
663
|
);
|
|
664
|
-
return
|
|
664
|
+
return T(
|
|
665
665
|
e,
|
|
666
666
|
i ? g.FLOAT : g.INT,
|
|
667
667
|
t,
|
|
@@ -669,8 +669,8 @@ function _s(e, t, s) {
|
|
|
669
669
|
a.slice(t, r)
|
|
670
670
|
);
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
if (!
|
|
672
|
+
function Ce(e, t, s) {
|
|
673
|
+
if (!ae(s))
|
|
674
674
|
throw $(
|
|
675
675
|
e.source,
|
|
676
676
|
t,
|
|
@@ -681,28 +681,28 @@ function Ne(e, t, s) {
|
|
|
681
681
|
);
|
|
682
682
|
const a = e.source.body;
|
|
683
683
|
let r = t + 1;
|
|
684
|
-
for (;
|
|
684
|
+
for (; ae(a.charCodeAt(r)); )
|
|
685
685
|
++r;
|
|
686
686
|
return r;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Gs(e, t) {
|
|
689
689
|
const s = e.source.body, a = s.length;
|
|
690
690
|
let r = t + 1, o = r, i = "";
|
|
691
691
|
for (; r < a; ) {
|
|
692
692
|
const l = s.charCodeAt(r);
|
|
693
693
|
if (l === 34)
|
|
694
|
-
return i += s.slice(o, r),
|
|
694
|
+
return i += s.slice(o, r), T(e, g.STRING, t, r + 1, i);
|
|
695
695
|
if (l === 92) {
|
|
696
696
|
i += s.slice(o, r);
|
|
697
|
-
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ?
|
|
697
|
+
const c = s.charCodeAt(r + 1) === 117 ? s.charCodeAt(r + 2) === 123 ? Hs(e, r) : Qs(e, r) : Js(e, r);
|
|
698
698
|
i += c.value, r += c.size, o = r;
|
|
699
699
|
continue;
|
|
700
700
|
}
|
|
701
701
|
if (l === 10 || l === 13)
|
|
702
702
|
break;
|
|
703
|
-
if (
|
|
703
|
+
if (Z(l))
|
|
704
704
|
++r;
|
|
705
|
-
else if (
|
|
705
|
+
else if (xe(s, r))
|
|
706
706
|
r += 2;
|
|
707
707
|
else
|
|
708
708
|
throw $(
|
|
@@ -716,20 +716,20 @@ function Us(e, t) {
|
|
|
716
716
|
}
|
|
717
717
|
throw $(e.source, r, "Unterminated string.");
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Hs(e, t) {
|
|
720
720
|
const s = e.source.body;
|
|
721
721
|
let a = 0, r = 3;
|
|
722
722
|
for (; r < 12; ) {
|
|
723
723
|
const o = s.charCodeAt(t + r++);
|
|
724
724
|
if (o === 125) {
|
|
725
|
-
if (r < 5 || !
|
|
725
|
+
if (r < 5 || !Z(a))
|
|
726
726
|
break;
|
|
727
727
|
return {
|
|
728
728
|
value: String.fromCodePoint(a),
|
|
729
729
|
size: r
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
|
-
if (a = a << 4 |
|
|
732
|
+
if (a = a << 4 | ee(o), a < 0)
|
|
733
733
|
break;
|
|
734
734
|
}
|
|
735
735
|
throw $(
|
|
@@ -741,16 +741,16 @@ function Ms(e, t) {
|
|
|
741
741
|
)}".`
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
const s = e.source.body, a =
|
|
746
|
-
if (
|
|
744
|
+
function Qs(e, t) {
|
|
745
|
+
const s = e.source.body, a = ut(s, t + 2);
|
|
746
|
+
if (Z(a))
|
|
747
747
|
return {
|
|
748
748
|
value: String.fromCodePoint(a),
|
|
749
749
|
size: 6
|
|
750
750
|
};
|
|
751
|
-
if (
|
|
752
|
-
const r =
|
|
753
|
-
if (
|
|
751
|
+
if (Lt(a) && s.charCodeAt(t + 6) === 92 && s.charCodeAt(t + 7) === 117) {
|
|
752
|
+
const r = ut(s, t + 8);
|
|
753
|
+
if ($t(r))
|
|
754
754
|
return {
|
|
755
755
|
value: String.fromCodePoint(a, r),
|
|
756
756
|
size: 12
|
|
@@ -762,13 +762,13 @@ function Gs(e, t) {
|
|
|
762
762
|
`Invalid Unicode escape sequence: "${s.slice(t, t + 6)}".`
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
return
|
|
765
|
+
function ut(e, t) {
|
|
766
|
+
return ee(e.charCodeAt(t)) << 12 | ee(e.charCodeAt(t + 1)) << 8 | ee(e.charCodeAt(t + 2)) << 4 | ee(e.charCodeAt(t + 3));
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function ee(e) {
|
|
769
769
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function Js(e, t) {
|
|
772
772
|
const s = e.source.body;
|
|
773
773
|
switch (s.charCodeAt(t + 1)) {
|
|
774
774
|
case 34:
|
|
@@ -822,7 +822,7 @@ function Hs(e, t) {
|
|
|
822
822
|
)}".`
|
|
823
823
|
);
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function Ws(e, t) {
|
|
826
826
|
const s = e.source.body, a = s.length;
|
|
827
827
|
let r = e.lineStart, o = t + 3, i = o, l = "";
|
|
828
828
|
const c = [];
|
|
@@ -830,13 +830,13 @@ function Qs(e, t) {
|
|
|
830
830
|
const u = s.charCodeAt(o);
|
|
831
831
|
if (u === 34 && s.charCodeAt(o + 1) === 34 && s.charCodeAt(o + 2) === 34) {
|
|
832
832
|
l += s.slice(i, o), c.push(l);
|
|
833
|
-
const d =
|
|
833
|
+
const d = T(
|
|
834
834
|
e,
|
|
835
835
|
g.BLOCK_STRING,
|
|
836
836
|
t,
|
|
837
837
|
o + 3,
|
|
838
838
|
// Return a string of the lines joined with U+000A.
|
|
839
|
-
|
|
839
|
+
zs(c).join(`
|
|
840
840
|
`)
|
|
841
841
|
);
|
|
842
842
|
return e.line += c.length - 1, e.lineStart = r, d;
|
|
@@ -849,9 +849,9 @@ function Qs(e, t) {
|
|
|
849
849
|
l += s.slice(i, o), c.push(l), u === 13 && s.charCodeAt(o + 1) === 10 ? o += 2 : ++o, l = "", i = o, r = o;
|
|
850
850
|
continue;
|
|
851
851
|
}
|
|
852
|
-
if (
|
|
852
|
+
if (Z(u))
|
|
853
853
|
++o;
|
|
854
|
-
else if (
|
|
854
|
+
else if (xe(s, o))
|
|
855
855
|
o += 2;
|
|
856
856
|
else
|
|
857
857
|
throw $(
|
|
@@ -865,17 +865,17 @@ function Qs(e, t) {
|
|
|
865
865
|
}
|
|
866
866
|
throw $(e.source, o, "Unterminated string.");
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Xs(e, t) {
|
|
869
869
|
const s = e.source.body, a = s.length;
|
|
870
870
|
let r = t + 1;
|
|
871
871
|
for (; r < a; ) {
|
|
872
872
|
const o = s.charCodeAt(r);
|
|
873
|
-
if (
|
|
873
|
+
if (Ds(o))
|
|
874
874
|
++r;
|
|
875
875
|
else
|
|
876
876
|
break;
|
|
877
877
|
}
|
|
878
|
-
return
|
|
878
|
+
return T(
|
|
879
879
|
e,
|
|
880
880
|
g.NAME,
|
|
881
881
|
t,
|
|
@@ -883,56 +883,56 @@ function Js(e, t) {
|
|
|
883
883
|
s.slice(t, r)
|
|
884
884
|
);
|
|
885
885
|
}
|
|
886
|
-
const
|
|
886
|
+
const Zs = 10, It = 2;
|
|
887
887
|
function Et(e) {
|
|
888
|
-
return
|
|
888
|
+
return ge(e, []);
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function ge(e, t) {
|
|
891
891
|
switch (typeof e) {
|
|
892
892
|
case "string":
|
|
893
893
|
return JSON.stringify(e);
|
|
894
894
|
case "function":
|
|
895
895
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
896
896
|
case "object":
|
|
897
|
-
return
|
|
897
|
+
return Ys(e, t);
|
|
898
898
|
default:
|
|
899
899
|
return String(e);
|
|
900
900
|
}
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function Ys(e, t) {
|
|
903
903
|
if (e === null)
|
|
904
904
|
return "null";
|
|
905
905
|
if (t.includes(e))
|
|
906
906
|
return "[Circular]";
|
|
907
907
|
const s = [...t, e];
|
|
908
|
-
if (
|
|
908
|
+
if (Ks(e)) {
|
|
909
909
|
const a = e.toJSON();
|
|
910
910
|
if (a !== e)
|
|
911
|
-
return typeof a == "string" ? a :
|
|
911
|
+
return typeof a == "string" ? a : ge(a, s);
|
|
912
912
|
} else if (Array.isArray(e))
|
|
913
|
-
return
|
|
914
|
-
return
|
|
913
|
+
return tr(e, s);
|
|
914
|
+
return er(e, s);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Ks(e) {
|
|
917
917
|
return typeof e.toJSON == "function";
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function er(e, t) {
|
|
920
920
|
const s = Object.entries(e);
|
|
921
|
-
return s.length === 0 ? "{}" : t.length >
|
|
922
|
-
([r, o]) => r + ": " +
|
|
921
|
+
return s.length === 0 ? "{}" : t.length > It ? "[" + nr(e) + "]" : "{ " + s.map(
|
|
922
|
+
([r, o]) => r + ": " + ge(o, t)
|
|
923
923
|
).join(", ") + " }";
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function tr(e, t) {
|
|
926
926
|
if (e.length === 0)
|
|
927
927
|
return "[]";
|
|
928
|
-
if (t.length >
|
|
928
|
+
if (t.length > It)
|
|
929
929
|
return "[Array]";
|
|
930
|
-
const s = Math.min(
|
|
930
|
+
const s = Math.min(Zs, e.length), a = e.length - s, r = [];
|
|
931
931
|
for (let o = 0; o < s; ++o)
|
|
932
|
-
r.push(
|
|
932
|
+
r.push(ge(e[o], t));
|
|
933
933
|
return a === 1 ? r.push("... 1 more item") : a > 1 && r.push(`... ${a} more items`), "[" + r.join(", ") + "]";
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function nr(e) {
|
|
936
936
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
937
937
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
938
938
|
const s = e.constructor.name;
|
|
@@ -941,11 +941,11 @@ function er(e) {
|
|
|
941
941
|
}
|
|
942
942
|
return t;
|
|
943
943
|
}
|
|
944
|
-
const
|
|
945
|
-
process.env.NODE_ENV === "production",
|
|
944
|
+
const sr = globalThis.process && // eslint-disable-next-line no-undef
|
|
945
|
+
process.env.NODE_ENV === "production", rr = (
|
|
946
946
|
/* c8 ignore next 6 */
|
|
947
947
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
948
|
-
|
|
948
|
+
sr ? function(t, s) {
|
|
949
949
|
return t instanceof s;
|
|
950
950
|
} : function(t, s) {
|
|
951
951
|
if (t instanceof s)
|
|
@@ -975,15 +975,15 @@ spurious results.`);
|
|
|
975
975
|
return !1;
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
|
-
class
|
|
978
|
+
class kt {
|
|
979
979
|
constructor(t, s = "GraphQL request", a = {
|
|
980
980
|
line: 1,
|
|
981
981
|
column: 1
|
|
982
982
|
}) {
|
|
983
|
-
typeof t == "string" ||
|
|
983
|
+
typeof t == "string" || we(!1, `Body must be a string. Received: ${Et(t)}.`), this.body = t, this.name = s, this.locationOffset = a, this.locationOffset.line > 0 || we(
|
|
984
984
|
!1,
|
|
985
985
|
"line in locationOffset is 1-indexed and must be positive."
|
|
986
|
-
), this.locationOffset.column > 0 ||
|
|
986
|
+
), this.locationOffset.column > 0 || we(
|
|
987
987
|
!1,
|
|
988
988
|
"column in locationOffset is 1-indexed and must be positive."
|
|
989
989
|
);
|
|
@@ -992,35 +992,35 @@ class It {
|
|
|
992
992
|
return "Source";
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
return
|
|
995
|
+
function ar(e) {
|
|
996
|
+
return rr(e, kt);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
const t =
|
|
998
|
+
function or(e) {
|
|
999
|
+
const t = ar(e) ? e : new kt(e), s = t.body, a = new Vs(t);
|
|
1000
1000
|
let r = "", o = !1;
|
|
1001
1001
|
for (; a.advance().kind !== g.EOF; ) {
|
|
1002
|
-
const i = a.token, l = i.kind, c = !
|
|
1002
|
+
const i = a.token, l = i.kind, c = !Bs(i.kind);
|
|
1003
1003
|
o && (c || i.kind === g.SPREAD) && (r += " ");
|
|
1004
1004
|
const u = s.slice(i.start, i.end);
|
|
1005
|
-
l === g.BLOCK_STRING ? r +=
|
|
1005
|
+
l === g.BLOCK_STRING ? r += qs(i.value, {
|
|
1006
1006
|
minimize: !0
|
|
1007
1007
|
}) : r += u, o = c;
|
|
1008
1008
|
}
|
|
1009
1009
|
return r;
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1011
|
+
const Dt = jt(
|
|
1012
1012
|
void 0
|
|
1013
|
-
),
|
|
1013
|
+
), Ha = ({
|
|
1014
1014
|
children: e,
|
|
1015
1015
|
client: t
|
|
1016
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
1016
|
+
}) => /* @__PURE__ */ n.jsx(Dt.Provider, { value: t, children: e }), zt = (e, t, ...[s]) => ({
|
|
1017
1017
|
queryFn: () => e.fetch(t, s),
|
|
1018
|
-
queryKey: [
|
|
1019
|
-
}),
|
|
1020
|
-
const s =
|
|
1018
|
+
queryKey: [or(t.toString()), s]
|
|
1019
|
+
}), ir = (e, ...[t]) => {
|
|
1020
|
+
const s = Kn(Dt);
|
|
1021
1021
|
if (s === void 0)
|
|
1022
1022
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
1023
|
-
return
|
|
1023
|
+
return zt(s, e, ...t === void 0 ? [] : [t]);
|
|
1024
1024
|
};
|
|
1025
1025
|
class H extends String {
|
|
1026
1026
|
__apiType;
|
|
@@ -1033,7 +1033,7 @@ class H extends String {
|
|
|
1033
1033
|
return this.value;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const cr = new H(
|
|
1037
1037
|
`
|
|
1038
1038
|
fragment OperationsFragment on OperationItem {
|
|
1039
1039
|
slug
|
|
@@ -1101,7 +1101,7 @@ const or = new H(
|
|
|
1101
1101
|
}
|
|
1102
1102
|
`,
|
|
1103
1103
|
{ fragmentName: "OperationsFragment" }
|
|
1104
|
-
),
|
|
1104
|
+
), lr = new H(`
|
|
1105
1105
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
1106
1106
|
schema(input: $input, type: $type) {
|
|
1107
1107
|
url
|
|
@@ -1110,13 +1110,13 @@ const or = new H(
|
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
`),
|
|
1113
|
+
`), dr = new H(`
|
|
1114
1114
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
1115
1115
|
schema(input: $input, type: $type) {
|
|
1116
1116
|
openapi
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
`),
|
|
1119
|
+
`), ur = new H(`
|
|
1120
1120
|
query OperationsForTag($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
1121
1121
|
schema(input: $input, type: $type) {
|
|
1122
1122
|
servers {
|
|
@@ -1208,7 +1208,7 @@ const or = new H(
|
|
|
1208
1208
|
schema
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
|
-
}`),
|
|
1211
|
+
}`), mr = new H(`
|
|
1212
1212
|
query GetSchemas($input: JSON!, $type: SchemaType!) {
|
|
1213
1213
|
schema(input: $input, type: $type) {
|
|
1214
1214
|
title
|
|
@@ -1223,7 +1223,7 @@ const or = new H(
|
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
`),
|
|
1226
|
+
`), pr = new H(`
|
|
1227
1227
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
1228
1228
|
schema(input: $input, type: $type) {
|
|
1229
1229
|
url
|
|
@@ -1232,7 +1232,7 @@ const or = new H(
|
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
`),
|
|
1235
|
+
`), hr = new H(`
|
|
1236
1236
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
1237
1237
|
schema(input: $input, type: $type) {
|
|
1238
1238
|
tags {
|
|
@@ -1254,65 +1254,65 @@ const or = new H(
|
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
`),
|
|
1258
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1259
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n":
|
|
1260
|
-
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n":
|
|
1261
|
-
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n":
|
|
1262
|
-
"\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":
|
|
1263
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
1264
|
-
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
|
|
1257
|
+
`), fr = {
|
|
1258
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": lr,
|
|
1259
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n deprecated\n extensions\n parameters {\n name\n in\n description\n required\n schema\n style\n explode\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": cr,
|
|
1260
|
+
"\n query SchemaWarmup($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n openapi\n }\n }\n": dr,
|
|
1261
|
+
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": ur,
|
|
1262
|
+
"\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": mr,
|
|
1263
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": pr,
|
|
1264
|
+
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": hr
|
|
1265
1265
|
};
|
|
1266
|
-
function
|
|
1267
|
-
return
|
|
1266
|
+
function xr(e) {
|
|
1267
|
+
return fr[e] ?? {};
|
|
1268
1268
|
}
|
|
1269
|
-
const q =
|
|
1270
|
-
|
|
1269
|
+
const q = Fe.Root, Ft = Fe.CollapsibleTrigger, V = Fe.CollapsibleContent, qt = S.Root, Vt = S.Value, Ve = w.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1270
|
+
S.Trigger,
|
|
1271
1271
|
{
|
|
1272
1272
|
ref: a,
|
|
1273
|
-
className:
|
|
1273
|
+
className: v(
|
|
1274
1274
|
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1275
1275
|
e
|
|
1276
1276
|
),
|
|
1277
1277
|
...s,
|
|
1278
1278
|
children: [
|
|
1279
1279
|
/* @__PURE__ */ n.jsx("span", { className: "truncate", children: t }),
|
|
1280
|
-
/* @__PURE__ */ n.jsx(
|
|
1280
|
+
/* @__PURE__ */ n.jsx(S.Icon, { asChild: !0, children: /* @__PURE__ */ n.jsx(xt, { className: "shrink-0 h-4 w-4 opacity-50" }) })
|
|
1281
1281
|
]
|
|
1282
1282
|
}
|
|
1283
1283
|
));
|
|
1284
|
-
|
|
1285
|
-
const Bt =
|
|
1286
|
-
|
|
1284
|
+
Ve.displayName = S.Trigger.displayName;
|
|
1285
|
+
const Bt = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1286
|
+
S.ScrollUpButton,
|
|
1287
1287
|
{
|
|
1288
1288
|
ref: s,
|
|
1289
|
-
className:
|
|
1289
|
+
className: v(
|
|
1290
1290
|
"flex cursor-default items-center justify-center py-1",
|
|
1291
1291
|
e
|
|
1292
1292
|
),
|
|
1293
1293
|
...t,
|
|
1294
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1294
|
+
children: /* @__PURE__ */ n.jsx(jn, { className: "h-4 w-4" })
|
|
1295
1295
|
}
|
|
1296
1296
|
));
|
|
1297
|
-
Bt.displayName =
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1297
|
+
Bt.displayName = S.ScrollUpButton.displayName;
|
|
1298
|
+
const _t = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1299
|
+
S.ScrollDownButton,
|
|
1300
1300
|
{
|
|
1301
1301
|
ref: s,
|
|
1302
|
-
className:
|
|
1302
|
+
className: v(
|
|
1303
1303
|
"flex cursor-default items-center justify-center py-1",
|
|
1304
1304
|
e
|
|
1305
1305
|
),
|
|
1306
1306
|
...t,
|
|
1307
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1307
|
+
children: /* @__PURE__ */ n.jsx(xt, { className: "h-4 w-4" })
|
|
1308
1308
|
}
|
|
1309
1309
|
));
|
|
1310
|
-
|
|
1311
|
-
const
|
|
1312
|
-
|
|
1310
|
+
_t.displayName = S.ScrollDownButton.displayName;
|
|
1311
|
+
const Be = w.forwardRef(({ className: e, children: t, position: s = "popper", ...a }, r) => /* @__PURE__ */ n.jsx(S.Portal, { children: /* @__PURE__ */ n.jsxs(
|
|
1312
|
+
S.Content,
|
|
1313
1313
|
{
|
|
1314
1314
|
ref: r,
|
|
1315
|
-
className:
|
|
1315
|
+
className: v(
|
|
1316
1316
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
1317
1317
|
s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1318
1318
|
e
|
|
@@ -1322,55 +1322,55 @@ const Fe = C.forwardRef(({ className: e, children: t, position: s = "popper", ..
|
|
|
1322
1322
|
children: [
|
|
1323
1323
|
/* @__PURE__ */ n.jsx(Bt, {}),
|
|
1324
1324
|
/* @__PURE__ */ n.jsx(
|
|
1325
|
-
|
|
1325
|
+
S.Viewport,
|
|
1326
1326
|
{
|
|
1327
|
-
className:
|
|
1327
|
+
className: v(
|
|
1328
1328
|
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
1329
1329
|
"divide-y"
|
|
1330
1330
|
),
|
|
1331
1331
|
children: t
|
|
1332
1332
|
}
|
|
1333
1333
|
),
|
|
1334
|
-
/* @__PURE__ */ n.jsx(
|
|
1334
|
+
/* @__PURE__ */ n.jsx(_t, {})
|
|
1335
1335
|
]
|
|
1336
1336
|
}
|
|
1337
1337
|
) }));
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1338
|
+
Be.displayName = S.Content.displayName;
|
|
1339
|
+
const gr = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1340
|
+
S.Label,
|
|
1341
1341
|
{
|
|
1342
1342
|
ref: s,
|
|
1343
|
-
className:
|
|
1343
|
+
className: v("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
|
|
1344
1344
|
...t
|
|
1345
1345
|
}
|
|
1346
1346
|
));
|
|
1347
|
-
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1347
|
+
gr.displayName = S.Label.displayName;
|
|
1348
|
+
const te = w.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1349
|
+
S.Item,
|
|
1350
1350
|
{
|
|
1351
1351
|
ref: a,
|
|
1352
|
-
className:
|
|
1352
|
+
className: v(
|
|
1353
1353
|
"relative flex w-full cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1354
1354
|
e
|
|
1355
1355
|
),
|
|
1356
1356
|
...s,
|
|
1357
1357
|
children: [
|
|
1358
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(
|
|
1359
|
-
/* @__PURE__ */ n.jsx(
|
|
1358
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(S.ItemIndicator, { children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" }) }) }),
|
|
1359
|
+
/* @__PURE__ */ n.jsx(S.ItemText, { children: t })
|
|
1360
1360
|
]
|
|
1361
1361
|
}
|
|
1362
1362
|
));
|
|
1363
|
-
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1363
|
+
te.displayName = S.Item.displayName;
|
|
1364
|
+
const yr = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1365
|
+
S.Separator,
|
|
1366
1366
|
{
|
|
1367
1367
|
ref: s,
|
|
1368
|
-
className:
|
|
1368
|
+
className: v("-mx-1 my-1 h-px bg-muted", e),
|
|
1369
1369
|
...t
|
|
1370
1370
|
}
|
|
1371
1371
|
));
|
|
1372
|
-
|
|
1373
|
-
function
|
|
1372
|
+
yr.displayName = S.Separator.displayName;
|
|
1373
|
+
function vr() {
|
|
1374
1374
|
const t = navigator.userAgent.toLowerCase();
|
|
1375
1375
|
if (t.indexOf("win") !== -1)
|
|
1376
1376
|
return "windows";
|
|
@@ -1381,10 +1381,10 @@ function gr() {
|
|
|
1381
1381
|
if (t.indexOf("x11") !== -1)
|
|
1382
1382
|
return "unix";
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
return
|
|
1384
|
+
function br() {
|
|
1385
|
+
return vr() === "apple";
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const jr = {
|
|
1388
1388
|
other: {
|
|
1389
1389
|
alt: "Alt",
|
|
1390
1390
|
meta: "Ctrl",
|
|
@@ -1399,7 +1399,7 @@ const vr = {
|
|
|
1399
1399
|
shift: "⇧",
|
|
1400
1400
|
option: "⌥"
|
|
1401
1401
|
}
|
|
1402
|
-
},
|
|
1402
|
+
}, Nr = (e, t) => {
|
|
1403
1403
|
const s = e.toLowerCase().split("+"), a = s.includes("meta"), r = s.includes("shift"), o = s.includes("option") || s.includes("alt"), i = s.includes("ctrl"), l = e.split("+").pop(), c = L(t);
|
|
1404
1404
|
return z(() => {
|
|
1405
1405
|
c.current = t;
|
|
@@ -1413,28 +1413,28 @@ const vr = {
|
|
|
1413
1413
|
}, [l, a, r, o, i]), {
|
|
1414
1414
|
trigger: () => c.current(),
|
|
1415
1415
|
label: s.map(
|
|
1416
|
-
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ?
|
|
1416
|
+
(u) => u === "meta" || u === "ctrl" || u === "alt" || u === "shift" || u === "option" ? jr[br() ? "apple" : "other"][u] : u
|
|
1417
1417
|
)
|
|
1418
1418
|
};
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1419
|
+
}, wr = $e()(
|
|
1420
|
+
Ie(
|
|
1421
1421
|
(e) => ({
|
|
1422
1422
|
selectedServer: void 0,
|
|
1423
1423
|
setSelectedServer: (t) => e({ selectedServer: t })
|
|
1424
1424
|
}),
|
|
1425
1425
|
{ name: "zudoku-selected-server" }
|
|
1426
1426
|
)
|
|
1427
|
-
),
|
|
1428
|
-
const { selectedServer: t, setSelectedServer: s } =
|
|
1429
|
-
return { selectedServer:
|
|
1427
|
+
), Cr = (e) => {
|
|
1428
|
+
const { selectedServer: t, setSelectedServer: s } = wr();
|
|
1429
|
+
return { selectedServer: Nt(
|
|
1430
1430
|
() => t && e.some((r) => r.url === t) ? t : e.at(0)?.url ?? "",
|
|
1431
1431
|
[t, e]
|
|
1432
1432
|
), setSelectedServer: s };
|
|
1433
|
-
},
|
|
1433
|
+
}, Ut = w.forwardRef(
|
|
1434
1434
|
({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1435
1435
|
"textarea",
|
|
1436
1436
|
{
|
|
1437
|
-
className:
|
|
1437
|
+
className: v(
|
|
1438
1438
|
"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",
|
|
1439
1439
|
e
|
|
1440
1440
|
),
|
|
@@ -1443,28 +1443,28 @@ const vr = {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
)
|
|
1445
1445
|
);
|
|
1446
|
-
|
|
1446
|
+
Ut.displayName = "Textarea";
|
|
1447
1447
|
const M = ({
|
|
1448
1448
|
children: e,
|
|
1449
1449
|
className: t
|
|
1450
1450
|
}) => /* @__PURE__ */ n.jsxs(
|
|
1451
1451
|
"div",
|
|
1452
1452
|
{
|
|
1453
|
-
className:
|
|
1453
|
+
className: v(
|
|
1454
1454
|
"grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-4 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
1455
1455
|
t
|
|
1456
1456
|
),
|
|
1457
1457
|
children: [
|
|
1458
1458
|
e,
|
|
1459
1459
|
/* @__PURE__ */ n.jsx(
|
|
1460
|
-
|
|
1460
|
+
Ft,
|
|
1461
1461
|
{
|
|
1462
|
-
className:
|
|
1462
|
+
className: v(
|
|
1463
1463
|
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
|
|
1464
1464
|
t
|
|
1465
1465
|
),
|
|
1466
1466
|
children: /* @__PURE__ */ n.jsx(
|
|
1467
|
-
|
|
1467
|
+
Nn,
|
|
1468
1468
|
{
|
|
1469
1469
|
className: "group-data-[state=open]:rotate-180 transition-transform flex-shrink-0",
|
|
1470
1470
|
size: 16
|
|
@@ -1477,11 +1477,11 @@ const M = ({
|
|
|
1477
1477
|
), G = ({
|
|
1478
1478
|
children: e,
|
|
1479
1479
|
className: t
|
|
1480
|
-
}) => /* @__PURE__ */ n.jsx("span", { className:
|
|
1481
|
-
|
|
1480
|
+
}) => /* @__PURE__ */ n.jsx("span", { className: v("font-semibold w-full text-start", t), children: e }), Sr = C.Root, Tr = C.Trigger, Ar = C.Group, Or = w.forwardRef(({ className: e, inset: t, children: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1481
|
+
C.SubTrigger,
|
|
1482
1482
|
{
|
|
1483
1483
|
ref: r,
|
|
1484
|
-
className:
|
|
1484
|
+
className: v(
|
|
1485
1485
|
"flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
|
|
1486
1486
|
t && "pl-8",
|
|
1487
1487
|
e
|
|
@@ -1489,29 +1489,29 @@ const M = ({
|
|
|
1489
1489
|
...a,
|
|
1490
1490
|
children: [
|
|
1491
1491
|
s,
|
|
1492
|
-
/* @__PURE__ */ n.jsx(
|
|
1492
|
+
/* @__PURE__ */ n.jsx(wn, { className: "ml-auto h-4 w-4" })
|
|
1493
1493
|
]
|
|
1494
1494
|
}
|
|
1495
1495
|
));
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1496
|
+
Or.displayName = C.SubTrigger.displayName;
|
|
1497
|
+
const Rr = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1498
|
+
C.SubContent,
|
|
1499
1499
|
{
|
|
1500
1500
|
ref: s,
|
|
1501
|
-
className:
|
|
1501
|
+
className: v(
|
|
1502
1502
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1503
1503
|
e
|
|
1504
1504
|
),
|
|
1505
1505
|
...t
|
|
1506
1506
|
}
|
|
1507
1507
|
));
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1508
|
+
Rr.displayName = C.SubContent.displayName;
|
|
1509
|
+
const Mt = w.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__PURE__ */ n.jsx(C.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1510
|
+
C.Content,
|
|
1511
1511
|
{
|
|
1512
1512
|
ref: a,
|
|
1513
1513
|
sideOffset: t,
|
|
1514
|
-
className:
|
|
1514
|
+
className: v(
|
|
1515
1515
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1516
1516
|
"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",
|
|
1517
1517
|
e
|
|
@@ -1519,12 +1519,12 @@ const Ut = C.forwardRef(({ className: e, sideOffset: t = 4, ...s }, a) => /* @__
|
|
|
1519
1519
|
...s
|
|
1520
1520
|
}
|
|
1521
1521
|
) }));
|
|
1522
|
-
|
|
1523
|
-
const
|
|
1524
|
-
|
|
1522
|
+
Mt.displayName = C.Content.displayName;
|
|
1523
|
+
const Gt = w.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1524
|
+
C.Item,
|
|
1525
1525
|
{
|
|
1526
1526
|
ref: a,
|
|
1527
|
-
className:
|
|
1527
|
+
className: v(
|
|
1528
1528
|
"relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1529
1529
|
t && "pl-8",
|
|
1530
1530
|
e
|
|
@@ -1532,45 +1532,45 @@ const Mt = C.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
|
|
|
1532
1532
|
...s
|
|
1533
1533
|
}
|
|
1534
1534
|
));
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1535
|
+
Gt.displayName = C.Item.displayName;
|
|
1536
|
+
const Pr = w.forwardRef(({ className: e, children: t, checked: s, ...a }, r) => /* @__PURE__ */ n.jsxs(
|
|
1537
|
+
C.CheckboxItem,
|
|
1538
1538
|
{
|
|
1539
1539
|
ref: r,
|
|
1540
|
-
className:
|
|
1540
|
+
className: v(
|
|
1541
1541
|
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1542
1542
|
e
|
|
1543
1543
|
),
|
|
1544
1544
|
checked: s,
|
|
1545
1545
|
...a,
|
|
1546
1546
|
children: [
|
|
1547
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(
|
|
1547
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(C.ItemIndicator, { children: /* @__PURE__ */ n.jsx(yt, { className: "h-4 w-4" }) }) }),
|
|
1548
1548
|
t
|
|
1549
1549
|
]
|
|
1550
1550
|
}
|
|
1551
1551
|
));
|
|
1552
|
-
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1552
|
+
Pr.displayName = C.CheckboxItem.displayName;
|
|
1553
|
+
const Lr = w.forwardRef(({ className: e, children: t, ...s }, a) => /* @__PURE__ */ n.jsxs(
|
|
1554
|
+
C.RadioItem,
|
|
1555
1555
|
{
|
|
1556
1556
|
ref: a,
|
|
1557
|
-
className:
|
|
1557
|
+
className: v(
|
|
1558
1558
|
"relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1559
1559
|
e
|
|
1560
1560
|
),
|
|
1561
1561
|
...s,
|
|
1562
1562
|
children: [
|
|
1563
|
-
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(
|
|
1563
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(C.ItemIndicator, { children: /* @__PURE__ */ n.jsx(Cn, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1564
1564
|
t
|
|
1565
1565
|
]
|
|
1566
1566
|
}
|
|
1567
1567
|
));
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1568
|
+
Lr.displayName = C.RadioItem.displayName;
|
|
1569
|
+
const Ht = w.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */ n.jsx(
|
|
1570
|
+
C.Label,
|
|
1571
1571
|
{
|
|
1572
1572
|
ref: a,
|
|
1573
|
-
className:
|
|
1573
|
+
className: v(
|
|
1574
1574
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1575
1575
|
t && "pl-8",
|
|
1576
1576
|
e
|
|
@@ -1578,37 +1578,37 @@ const Gt = C.forwardRef(({ className: e, inset: t, ...s }, a) => /* @__PURE__ */
|
|
|
1578
1578
|
...s
|
|
1579
1579
|
}
|
|
1580
1580
|
));
|
|
1581
|
-
|
|
1582
|
-
const
|
|
1583
|
-
|
|
1581
|
+
Ht.displayName = C.Label.displayName;
|
|
1582
|
+
const Qt = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1583
|
+
C.Separator,
|
|
1584
1584
|
{
|
|
1585
1585
|
ref: s,
|
|
1586
|
-
className:
|
|
1586
|
+
className: v("-mx-1 my-1 h-px bg-muted", e),
|
|
1587
1587
|
...t
|
|
1588
1588
|
}
|
|
1589
1589
|
));
|
|
1590
|
-
|
|
1591
|
-
const
|
|
1590
|
+
Qt.displayName = C.Separator.displayName;
|
|
1591
|
+
const $r = ({
|
|
1592
1592
|
examples: e,
|
|
1593
1593
|
onSelect: t
|
|
1594
|
-
}) => /* @__PURE__ */ n.jsxs(
|
|
1595
|
-
/* @__PURE__ */ n.jsx(
|
|
1596
|
-
|
|
1594
|
+
}) => /* @__PURE__ */ n.jsxs(Sr, { children: [
|
|
1595
|
+
/* @__PURE__ */ n.jsx(Tr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1596
|
+
I,
|
|
1597
1597
|
{
|
|
1598
1598
|
variant: "ghost",
|
|
1599
1599
|
size: "sm",
|
|
1600
1600
|
className: "hover:bg-accent hover:brightness-95",
|
|
1601
1601
|
children: [
|
|
1602
1602
|
"Use Example ",
|
|
1603
|
-
/* @__PURE__ */ n.jsx(
|
|
1603
|
+
/* @__PURE__ */ n.jsx(fe, { size: 16, className: "ml-2" })
|
|
1604
1604
|
]
|
|
1605
1605
|
}
|
|
1606
1606
|
) }),
|
|
1607
|
-
/* @__PURE__ */ n.jsx(
|
|
1608
|
-
/* @__PURE__ */ n.jsx(
|
|
1609
|
-
/* @__PURE__ */ n.jsx(
|
|
1610
|
-
/* @__PURE__ */ n.jsx(
|
|
1611
|
-
|
|
1607
|
+
/* @__PURE__ */ n.jsx(Mt, { className: "max-w-72", children: e.map((s) => /* @__PURE__ */ n.jsxs("div", { children: [
|
|
1608
|
+
/* @__PURE__ */ n.jsx(Ht, { children: s.mediaType }),
|
|
1609
|
+
/* @__PURE__ */ n.jsx(Qt, {}),
|
|
1610
|
+
/* @__PURE__ */ n.jsx(Ar, { children: s.examples?.map((a) => /* @__PURE__ */ n.jsx(
|
|
1611
|
+
Gt,
|
|
1612
1612
|
{
|
|
1613
1613
|
onSelect: () => t(a, s.mediaType),
|
|
1614
1614
|
children: /* @__PURE__ */ n.jsx(
|
|
@@ -1623,41 +1623,41 @@ const Pr = ({
|
|
|
1623
1623
|
a.name
|
|
1624
1624
|
)) })
|
|
1625
1625
|
] }, s.mediaType)) })
|
|
1626
|
-
] }),
|
|
1627
|
-
const { register: t, setValue: s, watch: a } =
|
|
1626
|
+
] }), Ir = ({ content: e }) => {
|
|
1627
|
+
const { register: t, setValue: s, watch: a } = oe(), r = (e ?? []).flatMap((i) => i.examples), o = a("headers");
|
|
1628
1628
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
1629
1629
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
1630
|
-
/* @__PURE__ */ n.jsx(
|
|
1630
|
+
/* @__PURE__ */ n.jsx(Sn, { size: 16 }),
|
|
1631
1631
|
/* @__PURE__ */ n.jsx(G, { children: "Body" }),
|
|
1632
|
-
e &&
|
|
1633
|
-
|
|
1632
|
+
e && r.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1633
|
+
$r,
|
|
1634
1634
|
{
|
|
1635
1635
|
examples: e,
|
|
1636
|
-
onSelect: (
|
|
1637
|
-
s("body", JSON.stringify(
|
|
1638
|
-
...
|
|
1636
|
+
onSelect: (i, l) => {
|
|
1637
|
+
s("body", JSON.stringify(i.value, null, 2)), s("headers", [
|
|
1638
|
+
...o.filter((c) => c.name !== "Content-Type"),
|
|
1639
1639
|
{
|
|
1640
1640
|
name: "Content-Type",
|
|
1641
|
-
value:
|
|
1641
|
+
value: l,
|
|
1642
1642
|
active: !0
|
|
1643
1643
|
}
|
|
1644
1644
|
]);
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
)
|
|
1647
|
+
) : /* @__PURE__ */ n.jsx("div", {})
|
|
1648
1648
|
] }),
|
|
1649
|
-
/* @__PURE__ */ n.jsx(
|
|
1650
|
-
|
|
1649
|
+
/* @__PURE__ */ n.jsx(V, { className: "flex flex-col gap-2 ", children: /* @__PURE__ */ n.jsx(
|
|
1650
|
+
Ut,
|
|
1651
1651
|
{
|
|
1652
1652
|
...t("body"),
|
|
1653
|
-
className:
|
|
1653
|
+
className: v(
|
|
1654
1654
|
"w-full p-2 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0"
|
|
1655
1655
|
),
|
|
1656
1656
|
placeholder: "Your body here..."
|
|
1657
1657
|
}
|
|
1658
1658
|
) })
|
|
1659
1659
|
] });
|
|
1660
|
-
},
|
|
1660
|
+
}, mt = (e, t, s) => {
|
|
1661
1661
|
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1662
1662
|
const i = o.replace(/[:{}]/g, "");
|
|
1663
1663
|
return s.pathParams.find((c) => c.name === i)?.value ?? o;
|
|
@@ -1669,12 +1669,12 @@ const Pr = ({
|
|
|
1669
1669
|
r.searchParams.set(o.name, o.value);
|
|
1670
1670
|
}), r;
|
|
1671
1671
|
};
|
|
1672
|
-
function
|
|
1672
|
+
function Er(e) {
|
|
1673
1673
|
return /^(application\/octet-stream|image\/|audio\/|video\/|font\/|application\/pdf|application\/zip|application\/x-protobuf|application\/x-binary)/i.test(
|
|
1674
1674
|
e
|
|
1675
1675
|
);
|
|
1676
1676
|
}
|
|
1677
|
-
const
|
|
1677
|
+
const kr = (e, t) => {
|
|
1678
1678
|
const s = e.find(
|
|
1679
1679
|
([a]) => a.toLowerCase() === "content-disposition"
|
|
1680
1680
|
)?.[1];
|
|
@@ -1691,53 +1691,53 @@ const Er = (e, t) => {
|
|
|
1691
1691
|
} catch {
|
|
1692
1692
|
return "download";
|
|
1693
1693
|
}
|
|
1694
|
-
},
|
|
1695
|
-
|
|
1694
|
+
}, ye = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
1695
|
+
Re.Root,
|
|
1696
1696
|
{
|
|
1697
1697
|
ref: s,
|
|
1698
|
-
className:
|
|
1698
|
+
className: v(
|
|
1699
1699
|
"peer h-4 w-4 shrink-0 rounded-[min(6px,var(--radius)-4px)] ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
1700
1700
|
"border border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary",
|
|
1701
1701
|
e
|
|
1702
1702
|
),
|
|
1703
1703
|
...t,
|
|
1704
1704
|
children: /* @__PURE__ */ n.jsx(
|
|
1705
|
-
|
|
1705
|
+
Re.Indicator,
|
|
1706
1706
|
{
|
|
1707
|
-
className:
|
|
1708
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1707
|
+
className: v("flex items-center justify-center text-current"),
|
|
1708
|
+
children: /* @__PURE__ */ n.jsx(gt, { className: "h-4 w-4" })
|
|
1709
1709
|
}
|
|
1710
1710
|
)
|
|
1711
1711
|
}
|
|
1712
1712
|
));
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1715
|
-
|
|
1713
|
+
ye.displayName = Re.Root.displayName;
|
|
1714
|
+
const Dr = ue.Root, Jt = w.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...a }, r) => /* @__PURE__ */ n.jsx(ue.Portal, { children: /* @__PURE__ */ n.jsx(
|
|
1715
|
+
ue.Content,
|
|
1716
1716
|
{
|
|
1717
1717
|
ref: r,
|
|
1718
1718
|
align: t,
|
|
1719
1719
|
sideOffset: s,
|
|
1720
|
-
className:
|
|
1720
|
+
className: v(
|
|
1721
1721
|
"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",
|
|
1722
1722
|
e
|
|
1723
1723
|
),
|
|
1724
1724
|
...a
|
|
1725
1725
|
}
|
|
1726
1726
|
) }));
|
|
1727
|
-
|
|
1728
|
-
const
|
|
1727
|
+
Jt.displayName = ue.Content.displayName;
|
|
1728
|
+
const zr = ({
|
|
1729
1729
|
value: e,
|
|
1730
1730
|
options: t,
|
|
1731
1731
|
onChange: s,
|
|
1732
1732
|
className: a,
|
|
1733
|
-
placeholder: r = "
|
|
1733
|
+
placeholder: r = "Value",
|
|
1734
1734
|
onEnterPress: o,
|
|
1735
1735
|
ref: i
|
|
1736
1736
|
}) => {
|
|
1737
|
-
const [l, c] = k(!1), [u, d] = k(!1), p =
|
|
1738
|
-
return /* @__PURE__ */ n.jsxs(
|
|
1739
|
-
/* @__PURE__ */ n.jsx(
|
|
1740
|
-
|
|
1737
|
+
const [l, c] = k(!1), [u, d] = k(!1), p = gs((m) => m.filtered.count), f = L(null);
|
|
1738
|
+
return /* @__PURE__ */ n.jsxs(Dr, { open: l, children: [
|
|
1739
|
+
/* @__PURE__ */ n.jsx(xs, { children: /* @__PURE__ */ n.jsx(
|
|
1740
|
+
vs,
|
|
1741
1741
|
{
|
|
1742
1742
|
autoComplete: "off",
|
|
1743
1743
|
ref: (m) => {
|
|
@@ -1745,7 +1745,7 @@ const kr = ({
|
|
|
1745
1745
|
},
|
|
1746
1746
|
value: e,
|
|
1747
1747
|
placeholder: r,
|
|
1748
|
-
className:
|
|
1748
|
+
className: v("h-9 bg-transparent", a),
|
|
1749
1749
|
onFocus: () => c(!0),
|
|
1750
1750
|
onBlur: () => {
|
|
1751
1751
|
u || c(!1);
|
|
@@ -1757,12 +1757,12 @@ const kr = ({
|
|
|
1757
1757
|
}
|
|
1758
1758
|
) }),
|
|
1759
1759
|
/* @__PURE__ */ n.jsx(
|
|
1760
|
-
|
|
1760
|
+
Jt,
|
|
1761
1761
|
{
|
|
1762
1762
|
onMouseEnter: () => d(!0),
|
|
1763
1763
|
onMouseLeave: () => d(!1),
|
|
1764
1764
|
onOpenAutoFocus: (m) => m.preventDefault(),
|
|
1765
|
-
className:
|
|
1765
|
+
className: v("p-0 w-(--radix-popover-trigger-width)", {
|
|
1766
1766
|
"border-0": p === 0
|
|
1767
1767
|
}),
|
|
1768
1768
|
align: "start",
|
|
@@ -1773,8 +1773,8 @@ const kr = ({
|
|
|
1773
1773
|
onTouchMove: (m) => {
|
|
1774
1774
|
m.stopPropagation();
|
|
1775
1775
|
},
|
|
1776
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1777
|
-
|
|
1776
|
+
children: /* @__PURE__ */ n.jsx(bs, { className: "max-h-[140px]", children: t.map((m) => /* @__PURE__ */ n.jsx(
|
|
1777
|
+
js,
|
|
1778
1778
|
{
|
|
1779
1779
|
value: m,
|
|
1780
1780
|
onSelect: (x) => {
|
|
@@ -1788,23 +1788,23 @@ const kr = ({
|
|
|
1788
1788
|
}
|
|
1789
1789
|
)
|
|
1790
1790
|
] });
|
|
1791
|
-
},
|
|
1792
|
-
const s =
|
|
1793
|
-
const l = r ?
|
|
1794
|
-
return
|
|
1791
|
+
}, pe = ({ shouldFilter: e, ...t }) => /* @__PURE__ */ n.jsx(ys, { className: "bg-transparent", shouldFilter: e, children: /* @__PURE__ */ n.jsx(zr, { ...t }) }), ie = (e, t) => {
|
|
1792
|
+
const s = w.forwardRef(({ className: a, asChild: r, ...o }, i) => {
|
|
1793
|
+
const l = r ? Ns : e;
|
|
1794
|
+
return w.createElement(l, {
|
|
1795
1795
|
...o,
|
|
1796
1796
|
ref: i,
|
|
1797
|
-
className: typeof t == "function" ? t({ className: a }) :
|
|
1797
|
+
className: typeof t == "function" ? t({ className: a }) : v(t, a)
|
|
1798
1798
|
});
|
|
1799
1799
|
});
|
|
1800
1800
|
return s.displayName = `VariantComponent(${e})`, s;
|
|
1801
|
-
},
|
|
1801
|
+
}, _e = ie(
|
|
1802
1802
|
"div",
|
|
1803
1803
|
"grid grid-cols-[min-content_2fr_3fr] items-center gap-x-5"
|
|
1804
|
-
),
|
|
1804
|
+
), he = ie(
|
|
1805
1805
|
"div",
|
|
1806
1806
|
"group h-9 hover:bg-accent/75 ps-4 pe-2 grid col-span-full grid-cols-subgrid items-center border-b"
|
|
1807
|
-
),
|
|
1807
|
+
), Fr = Object.freeze([
|
|
1808
1808
|
"Accept",
|
|
1809
1809
|
"Accept-Encoding",
|
|
1810
1810
|
"Accept-Language",
|
|
@@ -1831,40 +1831,40 @@ const kr = ({
|
|
|
1831
1831
|
"Set-Cookie",
|
|
1832
1832
|
"User-Agent",
|
|
1833
1833
|
"X-Requested-With"
|
|
1834
|
-
]),
|
|
1834
|
+
]), qr = ({
|
|
1835
1835
|
control: e,
|
|
1836
1836
|
schemaHeaders: t,
|
|
1837
1837
|
lockedHeaders: s
|
|
1838
1838
|
}) => {
|
|
1839
|
-
const { fields: a, append: r, remove: o } =
|
|
1839
|
+
const { fields: a, append: r, remove: o } = ze({
|
|
1840
1840
|
control: e,
|
|
1841
1841
|
name: "headers"
|
|
1842
|
-
}), { setValue: i, watch: l, formState: c } =
|
|
1843
|
-
(
|
|
1844
|
-
|
|
1842
|
+
}), { setValue: i, watch: l, formState: c } = oe(), u = L([]), d = L([]), p = l("headers"), f = wt(
|
|
1843
|
+
(j) => {
|
|
1844
|
+
j?.stopPropagation(), r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
1845
1845
|
},
|
|
1846
1846
|
[r]
|
|
1847
1847
|
);
|
|
1848
1848
|
z(() => {
|
|
1849
1849
|
p.length === 0 && f();
|
|
1850
1850
|
}, [p, f]);
|
|
1851
|
-
const m = (
|
|
1852
|
-
u.current[
|
|
1853
|
-
}, x = (
|
|
1854
|
-
f(), requestAnimationFrame(() => d.current[
|
|
1855
|
-
},
|
|
1856
|
-
name:
|
|
1857
|
-
id: `locked-${
|
|
1851
|
+
const m = (j) => {
|
|
1852
|
+
u.current[j]?.focus();
|
|
1853
|
+
}, x = (j) => {
|
|
1854
|
+
f(), requestAnimationFrame(() => d.current[j + 1]?.focus());
|
|
1855
|
+
}, y = t.filter((j) => !p.some((N) => N.name === j.name)).map(({ name: j }) => j), b = a.flatMap((j, N) => !s?.map((O) => O.toLowerCase()).includes(j.name.toLowerCase()) ? [] : [N]), R = s?.map((j) => ({
|
|
1856
|
+
name: j,
|
|
1857
|
+
id: `locked-${j}`,
|
|
1858
1858
|
value: "••••••••••",
|
|
1859
1859
|
active: !0,
|
|
1860
1860
|
locked: !0
|
|
1861
1861
|
})) ?? [];
|
|
1862
1862
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
1863
1863
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
1864
|
-
/* @__PURE__ */ n.jsx(
|
|
1864
|
+
/* @__PURE__ */ n.jsx(Tn, { size: 16 }),
|
|
1865
1865
|
/* @__PURE__ */ n.jsx(G, { children: "Headers" }),
|
|
1866
1866
|
/* @__PURE__ */ n.jsxs(
|
|
1867
|
-
|
|
1867
|
+
se,
|
|
1868
1868
|
{
|
|
1869
1869
|
onClick: f,
|
|
1870
1870
|
type: "button",
|
|
@@ -1873,34 +1873,34 @@ const kr = ({
|
|
|
1873
1873
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
1874
1874
|
children: [
|
|
1875
1875
|
"Add header ",
|
|
1876
|
-
/* @__PURE__ */ n.jsx(
|
|
1876
|
+
/* @__PURE__ */ n.jsx(fe, { size: 16 })
|
|
1877
1877
|
]
|
|
1878
1878
|
}
|
|
1879
1879
|
)
|
|
1880
1880
|
] }),
|
|
1881
|
-
/* @__PURE__ */ n.jsx(
|
|
1882
|
-
|
|
1883
|
-
/* @__PURE__ */ n.jsx(
|
|
1884
|
-
|
|
1881
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsxs(_e, { children: [
|
|
1882
|
+
R.map((j) => /* @__PURE__ */ n.jsxs(at, { children: [
|
|
1883
|
+
/* @__PURE__ */ n.jsx(ot, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
1884
|
+
he,
|
|
1885
1885
|
{
|
|
1886
|
-
className: "opacity-50 cursor-not-allowed font-mono text-xs",
|
|
1886
|
+
className: "opacity-50 cursor-not-allowed font-mono text-xs min-h-10",
|
|
1887
1887
|
children: [
|
|
1888
|
-
/* @__PURE__ */ n.jsx(
|
|
1888
|
+
/* @__PURE__ */ n.jsx(An, { size: 16 }),
|
|
1889
1889
|
/* @__PURE__ */ n.jsx(
|
|
1890
|
-
|
|
1890
|
+
me,
|
|
1891
1891
|
{
|
|
1892
|
-
value:
|
|
1892
|
+
value: j.name,
|
|
1893
1893
|
disabled: !0,
|
|
1894
1894
|
className: "w-full border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono"
|
|
1895
1895
|
}
|
|
1896
1896
|
),
|
|
1897
|
-
/* @__PURE__ */ n.jsx("div", { children:
|
|
1897
|
+
/* @__PURE__ */ n.jsx("div", { children: j.value })
|
|
1898
1898
|
]
|
|
1899
1899
|
},
|
|
1900
|
-
|
|
1900
|
+
j.id
|
|
1901
1901
|
) }),
|
|
1902
1902
|
/* @__PURE__ */ n.jsx(
|
|
1903
|
-
|
|
1903
|
+
it,
|
|
1904
1904
|
{
|
|
1905
1905
|
alignOffset: 10,
|
|
1906
1906
|
side: "bottom",
|
|
@@ -1908,51 +1908,51 @@ const kr = ({
|
|
|
1908
1908
|
children: /* @__PURE__ */ n.jsx("p", { children: "This header is set by the selected authentication." })
|
|
1909
1909
|
}
|
|
1910
1910
|
)
|
|
1911
|
-
] },
|
|
1912
|
-
a.map((
|
|
1911
|
+
] }, j.id)),
|
|
1912
|
+
a.map((j, N) => {
|
|
1913
1913
|
const Q = t.find(
|
|
1914
|
-
(
|
|
1914
|
+
(O) => O.name === p.at(N)?.name
|
|
1915
1915
|
);
|
|
1916
1916
|
return /* @__PURE__ */ n.jsxs(
|
|
1917
|
-
|
|
1917
|
+
he,
|
|
1918
1918
|
{
|
|
1919
|
-
className:
|
|
1920
|
-
|
|
1921
|
-
|
|
1919
|
+
className: v(
|
|
1920
|
+
b.includes(N) && "text-amber-600",
|
|
1921
|
+
b.includes(N) && !c.dirtyFields.headers?.[N]?.value && "hidden"
|
|
1922
1922
|
),
|
|
1923
1923
|
children: [
|
|
1924
1924
|
/* @__PURE__ */ n.jsx(
|
|
1925
1925
|
F,
|
|
1926
1926
|
{
|
|
1927
1927
|
control: e,
|
|
1928
|
-
name: `headers.${
|
|
1929
|
-
render: ({ field:
|
|
1928
|
+
name: `headers.${N}.active`,
|
|
1929
|
+
render: ({ field: O }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1930
1930
|
/* @__PURE__ */ n.jsx(
|
|
1931
|
-
|
|
1931
|
+
ye,
|
|
1932
1932
|
{
|
|
1933
|
-
id: `headers.${
|
|
1934
|
-
className:
|
|
1935
|
-
|
|
1933
|
+
id: `headers.${N}.active`,
|
|
1934
|
+
className: v(
|
|
1935
|
+
b.includes(N) && "hidden"
|
|
1936
1936
|
),
|
|
1937
|
-
checked:
|
|
1937
|
+
checked: O.value,
|
|
1938
1938
|
onCheckedChange: (D) => {
|
|
1939
|
-
|
|
1939
|
+
O.onChange(D);
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
1942
|
),
|
|
1943
|
-
/* @__PURE__ */ n.jsxs(
|
|
1944
|
-
/* @__PURE__ */ n.jsx(
|
|
1945
|
-
|
|
1943
|
+
/* @__PURE__ */ n.jsxs(at, { children: [
|
|
1944
|
+
/* @__PURE__ */ n.jsx(ot, { asChild: !0, children: /* @__PURE__ */ n.jsx(
|
|
1945
|
+
On,
|
|
1946
1946
|
{
|
|
1947
|
-
className:
|
|
1947
|
+
className: v(
|
|
1948
1948
|
"text-amber-600",
|
|
1949
|
-
!
|
|
1949
|
+
!b.includes(N) && "hidden"
|
|
1950
1950
|
),
|
|
1951
1951
|
size: 16
|
|
1952
1952
|
}
|
|
1953
1953
|
) }),
|
|
1954
1954
|
/* @__PURE__ */ n.jsx(
|
|
1955
|
-
|
|
1955
|
+
it,
|
|
1956
1956
|
{
|
|
1957
1957
|
alignOffset: 10,
|
|
1958
1958
|
side: "bottom",
|
|
@@ -1968,20 +1968,20 @@ const kr = ({
|
|
|
1968
1968
|
F,
|
|
1969
1969
|
{
|
|
1970
1970
|
control: e,
|
|
1971
|
-
name: `headers.${
|
|
1972
|
-
render: ({ field:
|
|
1973
|
-
|
|
1971
|
+
name: `headers.${N}.name`,
|
|
1972
|
+
render: ({ field: O }) => /* @__PURE__ */ n.jsx(
|
|
1973
|
+
pe,
|
|
1974
1974
|
{
|
|
1975
|
-
...
|
|
1975
|
+
...O,
|
|
1976
1976
|
placeholder: "Name",
|
|
1977
1977
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono",
|
|
1978
|
-
options: [...
|
|
1979
|
-
onEnterPress: () => m(
|
|
1978
|
+
options: [...y, ...Fr],
|
|
1979
|
+
onEnterPress: () => m(N),
|
|
1980
1980
|
onChange: (D) => {
|
|
1981
|
-
|
|
1981
|
+
O.onChange(D), i(`headers.${N}.active`, !0);
|
|
1982
1982
|
},
|
|
1983
1983
|
ref: (D) => {
|
|
1984
|
-
d.current[
|
|
1984
|
+
d.current[N] = D;
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
)
|
|
@@ -1992,106 +1992,106 @@ const kr = ({
|
|
|
1992
1992
|
F,
|
|
1993
1993
|
{
|
|
1994
1994
|
control: e,
|
|
1995
|
-
name: `headers.${
|
|
1996
|
-
render: ({ field:
|
|
1997
|
-
|
|
1995
|
+
name: `headers.${N}.value`,
|
|
1996
|
+
render: ({ field: O }) => Q?.enum && Q.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
1997
|
+
pe,
|
|
1998
1998
|
{
|
|
1999
1999
|
shouldFilter: !1,
|
|
2000
|
-
value:
|
|
2000
|
+
value: O.value,
|
|
2001
2001
|
options: Q.enum ?? [],
|
|
2002
2002
|
onChange: (P) => {
|
|
2003
|
-
|
|
2003
|
+
O.onChange(P), i(`headers.${N}.active`, !0);
|
|
2004
2004
|
},
|
|
2005
2005
|
className: "border-0 p-0 m-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2006
2006
|
}
|
|
2007
2007
|
) : /* @__PURE__ */ n.jsx(
|
|
2008
|
-
|
|
2008
|
+
me,
|
|
2009
2009
|
{
|
|
2010
2010
|
placeholder: "Value",
|
|
2011
2011
|
className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs focus-visible:ring-0 font-mono",
|
|
2012
2012
|
autoComplete: "off",
|
|
2013
|
-
...
|
|
2013
|
+
...O,
|
|
2014
2014
|
ref: (P) => {
|
|
2015
|
-
u.current[
|
|
2015
|
+
u.current[N] = P;
|
|
2016
2016
|
},
|
|
2017
2017
|
onKeyDown: (P) => {
|
|
2018
|
-
P.key === "Enter" && P.currentTarget.value.trim() && x(
|
|
2018
|
+
P.key === "Enter" && P.currentTarget.value.trim() && x(N);
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
2021
|
)
|
|
2022
2022
|
}
|
|
2023
2023
|
),
|
|
2024
2024
|
/* @__PURE__ */ n.jsx(
|
|
2025
|
-
|
|
2025
|
+
se,
|
|
2026
2026
|
{
|
|
2027
2027
|
size: "icon-xs",
|
|
2028
2028
|
variant: "ghost",
|
|
2029
2029
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
2030
|
-
onClick: () => o(
|
|
2030
|
+
onClick: () => o(N),
|
|
2031
2031
|
type: "button",
|
|
2032
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2032
|
+
children: /* @__PURE__ */ n.jsx(vt, { size: 16 })
|
|
2033
2033
|
}
|
|
2034
2034
|
)
|
|
2035
2035
|
] })
|
|
2036
2036
|
]
|
|
2037
2037
|
},
|
|
2038
|
-
|
|
2038
|
+
j.id
|
|
2039
2039
|
);
|
|
2040
2040
|
})
|
|
2041
2041
|
] }) }) }) })
|
|
2042
2042
|
] });
|
|
2043
|
-
},
|
|
2043
|
+
}, Vr = Cs(
|
|
2044
2044
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2045
|
-
),
|
|
2046
|
-
|
|
2045
|
+
), Ue = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
2046
|
+
Tt.Root,
|
|
2047
2047
|
{
|
|
2048
2048
|
ref: s,
|
|
2049
|
-
className:
|
|
2049
|
+
className: v(Vr(), e),
|
|
2050
2050
|
...t
|
|
2051
2051
|
}
|
|
2052
2052
|
));
|
|
2053
|
-
|
|
2054
|
-
const
|
|
2055
|
-
|
|
2053
|
+
Ue.displayName = Tt.Root.displayName;
|
|
2054
|
+
const Wt = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
2055
|
+
re.Root,
|
|
2056
2056
|
{
|
|
2057
|
-
className:
|
|
2057
|
+
className: v("grid gap-2", e),
|
|
2058
2058
|
...t,
|
|
2059
2059
|
ref: s
|
|
2060
2060
|
}
|
|
2061
2061
|
));
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2062
|
+
Wt.displayName = re.Root.displayName;
|
|
2063
|
+
const Xt = w.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ n.jsx(
|
|
2064
|
+
re.Item,
|
|
2065
2065
|
{
|
|
2066
2066
|
ref: s,
|
|
2067
|
-
className:
|
|
2067
|
+
className: v(
|
|
2068
2068
|
"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",
|
|
2069
2069
|
e
|
|
2070
2070
|
),
|
|
2071
2071
|
...t,
|
|
2072
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2072
|
+
children: /* @__PURE__ */ n.jsx(re.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ n.jsx(Rn, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
2073
2073
|
}
|
|
2074
2074
|
));
|
|
2075
|
-
|
|
2076
|
-
const
|
|
2075
|
+
Xt.displayName = re.Item.displayName;
|
|
2076
|
+
const Zt = ({
|
|
2077
2077
|
identities: e,
|
|
2078
2078
|
setValue: t,
|
|
2079
2079
|
value: s
|
|
2080
2080
|
}) => /* @__PURE__ */ n.jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
2081
|
-
|
|
2081
|
+
Wt,
|
|
2082
2082
|
{
|
|
2083
2083
|
onValueChange: (a) => t(a),
|
|
2084
2084
|
value: s,
|
|
2085
|
-
defaultValue:
|
|
2085
|
+
defaultValue: ne,
|
|
2086
2086
|
className: "gap-0",
|
|
2087
2087
|
disabled: e?.length === 0,
|
|
2088
|
-
children: [{ id:
|
|
2088
|
+
children: [{ id: ne, label: "None" }, ...e ?? []].map(
|
|
2089
2089
|
(a) => /* @__PURE__ */ n.jsxs(
|
|
2090
|
-
|
|
2090
|
+
Ue,
|
|
2091
2091
|
{
|
|
2092
2092
|
className: "h-10 items-center border-b font-normal flex gap-4 p-4 cursor-pointer hover:bg-accent/75",
|
|
2093
2093
|
children: [
|
|
2094
|
-
/* @__PURE__ */ n.jsx(
|
|
2094
|
+
/* @__PURE__ */ n.jsx(Xt, { value: a.id, id: a.id }),
|
|
2095
2095
|
/* @__PURE__ */ n.jsx("span", { children: a.label })
|
|
2096
2096
|
]
|
|
2097
2097
|
},
|
|
@@ -2099,28 +2099,28 @@ const Xt = ({
|
|
|
2099
2099
|
)
|
|
2100
2100
|
)
|
|
2101
2101
|
}
|
|
2102
|
-
) }),
|
|
2102
|
+
) }), Br = ({
|
|
2103
2103
|
onSubmit: e,
|
|
2104
2104
|
identities: t,
|
|
2105
2105
|
open: s,
|
|
2106
2106
|
onOpenChange: a
|
|
2107
2107
|
}) => {
|
|
2108
2108
|
const [r, o] = k(void 0), [i, l] = k(!1);
|
|
2109
|
-
return /* @__PURE__ */ n.jsx(
|
|
2110
|
-
/* @__PURE__ */ n.jsx(
|
|
2111
|
-
/* @__PURE__ */ n.jsx(
|
|
2112
|
-
/* @__PURE__ */ n.jsx(
|
|
2113
|
-
|
|
2109
|
+
return /* @__PURE__ */ n.jsx(Ee, { open: s, onOpenChange: a, children: /* @__PURE__ */ n.jsxs(ke, { children: [
|
|
2110
|
+
/* @__PURE__ */ n.jsx(De, { children: "Select an auth identity" }),
|
|
2111
|
+
/* @__PURE__ */ n.jsx(Ct, { children: "Please select an identity for this request." }),
|
|
2112
|
+
/* @__PURE__ */ n.jsx(ws, { className: "max-h-80 overflow-auto", children: /* @__PURE__ */ n.jsx(
|
|
2113
|
+
Zt,
|
|
2114
2114
|
{
|
|
2115
2115
|
identities: t,
|
|
2116
2116
|
setValue: o,
|
|
2117
2117
|
value: r
|
|
2118
2118
|
}
|
|
2119
2119
|
) }),
|
|
2120
|
-
/* @__PURE__ */ n.jsxs(
|
|
2120
|
+
/* @__PURE__ */ n.jsxs(St, { className: "flex flex-col gap-2", children: [
|
|
2121
2121
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2122
2122
|
/* @__PURE__ */ n.jsx(
|
|
2123
|
-
|
|
2123
|
+
ye,
|
|
2124
2124
|
{
|
|
2125
2125
|
id: "remember",
|
|
2126
2126
|
checked: i,
|
|
@@ -2129,10 +2129,10 @@ const Xt = ({
|
|
|
2129
2129
|
)
|
|
2130
2130
|
}
|
|
2131
2131
|
),
|
|
2132
|
-
/* @__PURE__ */ n.jsx(
|
|
2132
|
+
/* @__PURE__ */ n.jsx(Ue, { htmlFor: "remember", children: "Remember my choice" })
|
|
2133
2133
|
] }),
|
|
2134
2134
|
/* @__PURE__ */ n.jsx(
|
|
2135
|
-
|
|
2135
|
+
I,
|
|
2136
2136
|
{
|
|
2137
2137
|
onClick: () => e({ identity: r, rememberedIdentity: i }),
|
|
2138
2138
|
children: "Send"
|
|
@@ -2140,24 +2140,24 @@ const Xt = ({
|
|
|
2140
2140
|
)
|
|
2141
2141
|
] })
|
|
2142
2142
|
] }) });
|
|
2143
|
-
},
|
|
2143
|
+
}, Se = (e) => Math.abs(
|
|
2144
2144
|
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
2145
|
-
),
|
|
2146
|
-
const s = (3 *
|
|
2145
|
+
), Te = (e) => e.length > 1 ? parseInt(e.split("").reduce((t, s) => `${Se(t) + Se(s)}`)) : Se(e), pt = (e, t = {}) => {
|
|
2146
|
+
const s = (3 * Te(e) + 2 * Te(e) + Te(e)) % 360, { saturation: a = 75, lightness: r = 60 } = t;
|
|
2147
2147
|
return `${s}deg ${a}% ${r}%`;
|
|
2148
|
-
},
|
|
2149
|
-
const { resolvedTheme: t } =
|
|
2148
|
+
}, Ae = "data-linked-param", _r = (e) => {
|
|
2149
|
+
const { resolvedTheme: t } = Ss();
|
|
2150
2150
|
return {
|
|
2151
|
-
text:
|
|
2151
|
+
text: pt(
|
|
2152
2152
|
e,
|
|
2153
2153
|
t === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
2154
2154
|
),
|
|
2155
|
-
background:
|
|
2155
|
+
background: pt(
|
|
2156
2156
|
e,
|
|
2157
2157
|
t === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
2158
2158
|
)
|
|
2159
2159
|
};
|
|
2160
|
-
},
|
|
2160
|
+
}, Yt = ({
|
|
2161
2161
|
name: e,
|
|
2162
2162
|
className: t,
|
|
2163
2163
|
slug: s,
|
|
@@ -2165,26 +2165,26 @@ const Xt = ({
|
|
|
2165
2165
|
children: r,
|
|
2166
2166
|
onClick: o
|
|
2167
2167
|
}) => {
|
|
2168
|
-
const i = L(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } =
|
|
2168
|
+
const i = L(null), l = s?.replace(/[{}]/g, ""), c = e.replace(/[{}]/g, ""), { text: u, background: d } = _r(c), p = `hsl(${u} / 100%)`, f = `hsl(${d} / 10%)`, m = `hsl(${d} / 50%)`;
|
|
2169
2169
|
return z(() => {
|
|
2170
2170
|
if (!l || !i.current) return;
|
|
2171
2171
|
const x = () => {
|
|
2172
|
-
document.querySelectorAll(`[${
|
|
2173
|
-
|
|
2172
|
+
document.querySelectorAll(`[${Ae}="${l}"]`).forEach((R) => {
|
|
2173
|
+
R instanceof HTMLElement && (R.dataset.active = "true");
|
|
2174
2174
|
});
|
|
2175
|
-
},
|
|
2176
|
-
document.querySelectorAll(`[${
|
|
2177
|
-
|
|
2175
|
+
}, y = () => {
|
|
2176
|
+
document.querySelectorAll(`[${Ae}="${l}"]`).forEach((R) => {
|
|
2177
|
+
R instanceof HTMLElement && (R.dataset.active = "false");
|
|
2178
2178
|
});
|
|
2179
|
-
},
|
|
2180
|
-
return
|
|
2181
|
-
|
|
2179
|
+
}, b = i.current;
|
|
2180
|
+
return b.addEventListener("mouseenter", x), b.addEventListener("mouseleave", y), () => {
|
|
2181
|
+
b.removeEventListener("mouseenter", x), b.removeEventListener("mouseleave", y);
|
|
2182
2182
|
};
|
|
2183
2183
|
}, [l]), /* @__PURE__ */ n.jsx(
|
|
2184
2184
|
"span",
|
|
2185
2185
|
{
|
|
2186
|
-
[
|
|
2187
|
-
className:
|
|
2186
|
+
[Ae]: l,
|
|
2187
|
+
className: v(
|
|
2188
2188
|
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
2189
2189
|
"relative transition-all duration-100 rounded-lg",
|
|
2190
2190
|
"border border-(--border-color) p-0.5 text-(--param-color) bg-(--background-color)",
|
|
@@ -2203,24 +2203,24 @@ const Xt = ({
|
|
|
2203
2203
|
children: r ?? e
|
|
2204
2204
|
}
|
|
2205
2205
|
);
|
|
2206
|
-
},
|
|
2206
|
+
}, Ur = ({
|
|
2207
2207
|
control: e,
|
|
2208
2208
|
url: t
|
|
2209
2209
|
}) => {
|
|
2210
|
-
const { fields: s } =
|
|
2210
|
+
const { fields: s } = ze({
|
|
2211
2211
|
control: e,
|
|
2212
2212
|
name: "pathParams"
|
|
2213
2213
|
}), a = [...s].sort(
|
|
2214
2214
|
(r, o) => t.indexOf(`{${r.name}}`) - t.indexOf(`{${o.name}}`)
|
|
2215
2215
|
);
|
|
2216
|
-
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(
|
|
2216
|
+
return /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ n.jsx(_e, { children: a.map((r, o) => /* @__PURE__ */ n.jsxs(he, { children: [
|
|
2217
2217
|
/* @__PURE__ */ n.jsx(
|
|
2218
2218
|
F,
|
|
2219
2219
|
{
|
|
2220
2220
|
control: e,
|
|
2221
2221
|
name: `pathParams.${o}.name`,
|
|
2222
2222
|
render: () => /* @__PURE__ */ n.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ n.jsx(
|
|
2223
|
-
|
|
2223
|
+
Yt,
|
|
2224
2224
|
{
|
|
2225
2225
|
slug: r.name,
|
|
2226
2226
|
name: r.name,
|
|
@@ -2235,28 +2235,28 @@ const Xt = ({
|
|
|
2235
2235
|
control: e,
|
|
2236
2236
|
name: `pathParams.${o}.value`,
|
|
2237
2237
|
render: ({ field: i }) => /* @__PURE__ */ n.jsx(
|
|
2238
|
-
|
|
2238
|
+
me,
|
|
2239
2239
|
{
|
|
2240
2240
|
...i,
|
|
2241
2241
|
required: !0,
|
|
2242
|
-
placeholder: "
|
|
2242
|
+
placeholder: "Value",
|
|
2243
2243
|
className: "w-full truncate border-0 p-0 m-0 shadow-none text-xs font-mono focus-visible:ring-0"
|
|
2244
2244
|
}
|
|
2245
2245
|
)
|
|
2246
2246
|
}
|
|
2247
2247
|
) })
|
|
2248
2248
|
] }, r.id)) }) });
|
|
2249
|
-
},
|
|
2249
|
+
}, Mr = ie(
|
|
2250
2250
|
"input",
|
|
2251
2251
|
"bg-transparent h-9 font-mono text-xs"
|
|
2252
|
-
),
|
|
2252
|
+
), Gr = ({
|
|
2253
2253
|
control: e,
|
|
2254
2254
|
schemaQueryParams: t
|
|
2255
2255
|
}) => {
|
|
2256
|
-
const { fields: s, remove: a, append: r } =
|
|
2256
|
+
const { fields: s, remove: a, append: r } = ze({
|
|
2257
2257
|
control: e,
|
|
2258
2258
|
name: "queryParams"
|
|
2259
|
-
}), { setValue: o, getValues: i, watch: l } =
|
|
2259
|
+
}), { setValue: o, getValues: i, watch: l } = oe(), c = l("queryParams");
|
|
2260
2260
|
z(() => {
|
|
2261
2261
|
c.length === 0 && r({ name: "", value: "", active: !1 }, { shouldFocus: !0 });
|
|
2262
2262
|
}, [c, r]);
|
|
@@ -2265,10 +2265,10 @@ const Xt = ({
|
|
|
2265
2265
|
);
|
|
2266
2266
|
return /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2267
2267
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2268
|
-
/* @__PURE__ */ n.jsx(
|
|
2268
|
+
/* @__PURE__ */ n.jsx(Pn, { size: 16 }),
|
|
2269
2269
|
/* @__PURE__ */ n.jsx(G, { children: "Query Parameters" }),
|
|
2270
2270
|
/* @__PURE__ */ n.jsxs(
|
|
2271
|
-
|
|
2271
|
+
I,
|
|
2272
2272
|
{
|
|
2273
2273
|
onClick: () => {
|
|
2274
2274
|
o("queryParams", [
|
|
@@ -2282,23 +2282,23 @@ const Xt = ({
|
|
|
2282
2282
|
className: "hover:bg-accent hover:brightness-95 flex gap-2",
|
|
2283
2283
|
children: [
|
|
2284
2284
|
"Add parameter ",
|
|
2285
|
-
/* @__PURE__ */ n.jsx(
|
|
2285
|
+
/* @__PURE__ */ n.jsx(fe, { size: 16 })
|
|
2286
2286
|
]
|
|
2287
2287
|
}
|
|
2288
2288
|
)
|
|
2289
2289
|
] }),
|
|
2290
|
-
/* @__PURE__ */ n.jsx(
|
|
2290
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx("div", { className: "overflow-hidden w-full", children: /* @__PURE__ */ n.jsx(_e, { children: s.map((d, p) => {
|
|
2291
2291
|
const f = t.find(
|
|
2292
2292
|
(m) => m.name === c.at(p)?.name
|
|
2293
2293
|
);
|
|
2294
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2294
|
+
return /* @__PURE__ */ n.jsxs(he, { children: [
|
|
2295
2295
|
/* @__PURE__ */ n.jsx(
|
|
2296
2296
|
F,
|
|
2297
2297
|
{
|
|
2298
2298
|
control: e,
|
|
2299
2299
|
name: `queryParams.${p}.active`,
|
|
2300
2300
|
render: ({ field: m }) => /* @__PURE__ */ n.jsx(
|
|
2301
|
-
|
|
2301
|
+
ye,
|
|
2302
2302
|
{
|
|
2303
2303
|
id: `queryParams.${p}.active`,
|
|
2304
2304
|
checked: m.value,
|
|
@@ -2311,7 +2311,7 @@ const Xt = ({
|
|
|
2311
2311
|
F,
|
|
2312
2312
|
{
|
|
2313
2313
|
control: e,
|
|
2314
|
-
render: ({ field: m }) => u[p] ? /* @__PURE__ */ n.jsx(
|
|
2314
|
+
render: ({ field: m }) => u[p] ? /* @__PURE__ */ n.jsx(Mr, { asChild: !0, children: /* @__PURE__ */ n.jsxs(
|
|
2315
2315
|
"label",
|
|
2316
2316
|
{
|
|
2317
2317
|
className: "flex items-center cursor-pointer gap-1",
|
|
@@ -2323,8 +2323,9 @@ const Xt = ({
|
|
|
2323
2323
|
]
|
|
2324
2324
|
}
|
|
2325
2325
|
) }) : /* @__PURE__ */ n.jsx(
|
|
2326
|
-
|
|
2326
|
+
pe,
|
|
2327
2327
|
{
|
|
2328
|
+
placeholder: "Name",
|
|
2328
2329
|
value: m.value,
|
|
2329
2330
|
options: t.map((x) => x.name),
|
|
2330
2331
|
onChange: (x) => {
|
|
@@ -2342,23 +2343,24 @@ const Xt = ({
|
|
|
2342
2343
|
{
|
|
2343
2344
|
control: e,
|
|
2344
2345
|
render: ({ field: m }) => f?.enum && f.enum.length > 0 ? /* @__PURE__ */ n.jsx(
|
|
2345
|
-
|
|
2346
|
+
pe,
|
|
2346
2347
|
{
|
|
2347
2348
|
value: m.value,
|
|
2348
2349
|
options: f.enum ?? [],
|
|
2349
|
-
onChange: (
|
|
2350
|
-
m.onChange(
|
|
2350
|
+
onChange: (y) => {
|
|
2351
|
+
m.onChange(y), o(`queryParams.${p}.active`, !0);
|
|
2351
2352
|
},
|
|
2352
2353
|
className: "border-0 shadow-none focus-visible:ring-0 bg-transparent hover:bg-transparent text-xs font-mono"
|
|
2353
2354
|
}
|
|
2354
2355
|
) : /* @__PURE__ */ n.jsx(
|
|
2355
|
-
|
|
2356
|
+
me,
|
|
2356
2357
|
{
|
|
2357
2358
|
...m,
|
|
2358
|
-
onChange: (
|
|
2359
|
-
m.onChange(
|
|
2359
|
+
onChange: (y) => {
|
|
2360
|
+
m.onChange(y.target.value), y.target.value.length > 0 && o(`queryParams.${p}.active`, !0);
|
|
2360
2361
|
},
|
|
2361
|
-
placeholder: "
|
|
2362
|
+
placeholder: "Value",
|
|
2363
|
+
"aria-label": "Query parameter value",
|
|
2362
2364
|
className: "w-full border-0 p-0 m-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
2363
2365
|
}
|
|
2364
2366
|
),
|
|
@@ -2366,22 +2368,22 @@ const Xt = ({
|
|
|
2366
2368
|
}
|
|
2367
2369
|
),
|
|
2368
2370
|
/* @__PURE__ */ n.jsx(
|
|
2369
|
-
|
|
2371
|
+
I,
|
|
2370
2372
|
{
|
|
2371
2373
|
size: "icon-xs",
|
|
2372
2374
|
variant: "ghost",
|
|
2373
2375
|
className: "text-muted-foreground opacity-0 group-hover:brightness-95 group-hover:opacity-100",
|
|
2374
2376
|
onClick: () => a(p),
|
|
2375
2377
|
type: "button",
|
|
2376
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2378
|
+
children: /* @__PURE__ */ n.jsx(vt, { size: 16 })
|
|
2377
2379
|
}
|
|
2378
2380
|
)
|
|
2379
2381
|
] })
|
|
2380
2382
|
] }, d.id);
|
|
2381
2383
|
}) }) }) })
|
|
2382
2384
|
] });
|
|
2383
|
-
},
|
|
2384
|
-
|
|
2385
|
+
}, Hr = $e()(
|
|
2386
|
+
Ie(
|
|
2385
2387
|
(e, t) => ({
|
|
2386
2388
|
rememberedIdentity: null,
|
|
2387
2389
|
setRememberedIdentity: (s) => e({ rememberedIdentity: s }),
|
|
@@ -2391,10 +2393,10 @@ const Xt = ({
|
|
|
2391
2393
|
}),
|
|
2392
2394
|
{
|
|
2393
2395
|
name: "identity-storage",
|
|
2394
|
-
storage:
|
|
2396
|
+
storage: bt(() => sessionStorage)
|
|
2395
2397
|
}
|
|
2396
2398
|
)
|
|
2397
|
-
),
|
|
2399
|
+
), Qr = ({
|
|
2398
2400
|
path: e,
|
|
2399
2401
|
renderParam: t
|
|
2400
2402
|
}) => {
|
|
@@ -2407,23 +2409,23 @@ const Xt = ({
|
|
|
2407
2409
|
if (!p) return;
|
|
2408
2410
|
const f = u.index;
|
|
2409
2411
|
f > c && l.push(
|
|
2410
|
-
/* @__PURE__ */ n.jsx(
|
|
2412
|
+
/* @__PURE__ */ n.jsx(K, { children: a.slice(c, f) }, `text-${c}-${f}`)
|
|
2411
2413
|
), l.push(
|
|
2412
|
-
/* @__PURE__ */ n.jsx(
|
|
2414
|
+
/* @__PURE__ */ n.jsx(K, { children: t({ name: p, originalValue: d, index: s++ }) }, `param-${p}`)
|
|
2413
2415
|
), c = f + d.length;
|
|
2414
2416
|
}), c < a.length && l.push(
|
|
2415
|
-
/* @__PURE__ */ n.jsx(
|
|
2417
|
+
/* @__PURE__ */ n.jsx(K, { children: a.slice(c) }, `text-${c}-${a.length}`)
|
|
2416
2418
|
), // eslint-disable-next-line react/no-array-index-key
|
|
2417
|
-
/* @__PURE__ */ n.jsxs(
|
|
2419
|
+
/* @__PURE__ */ n.jsxs(K, { children: [
|
|
2418
2420
|
l,
|
|
2419
2421
|
r < o.length - 1 && "/",
|
|
2420
2422
|
/* @__PURE__ */ n.jsx("wbr", {})
|
|
2421
2423
|
] }, `${a}-${r}`);
|
|
2422
2424
|
});
|
|
2423
|
-
},
|
|
2424
|
-
const { watch: t, setFocus: s } =
|
|
2425
|
+
}, Jr = ({ url: e }) => {
|
|
2426
|
+
const { watch: t, setFocus: s } = oe(), [a] = t(["pathParams"]);
|
|
2425
2427
|
return /* @__PURE__ */ n.jsx(
|
|
2426
|
-
|
|
2428
|
+
Qr,
|
|
2427
2429
|
{
|
|
2428
2430
|
path: e,
|
|
2429
2431
|
renderParam: ({ name: r, originalValue: o, index: i }) => {
|
|
@@ -2431,7 +2433,7 @@ const Xt = ({
|
|
|
2431
2433
|
(c) => c.name === r
|
|
2432
2434
|
)?.value;
|
|
2433
2435
|
return /* @__PURE__ */ n.jsx(
|
|
2434
|
-
|
|
2436
|
+
Yt,
|
|
2435
2437
|
{
|
|
2436
2438
|
name: r,
|
|
2437
2439
|
backgroundOpacity: "0",
|
|
@@ -2443,8 +2445,8 @@ const Xt = ({
|
|
|
2443
2445
|
}
|
|
2444
2446
|
}
|
|
2445
2447
|
);
|
|
2446
|
-
},
|
|
2447
|
-
const { watch: e } =
|
|
2448
|
+
}, Wr = () => {
|
|
2449
|
+
const { watch: e } = oe(), s = e("queryParams").filter((a) => a.active && a.name).map((a, r, o) => /* @__PURE__ */ n.jsxs(K, { children: [
|
|
2448
2450
|
a.name,
|
|
2449
2451
|
"=",
|
|
2450
2452
|
encodeURIComponent(a.value).replaceAll("%20", "+"),
|
|
@@ -2455,29 +2457,29 @@ const Xt = ({
|
|
|
2455
2457
|
s.length > 0 ? "?" : "",
|
|
2456
2458
|
s
|
|
2457
2459
|
] });
|
|
2458
|
-
},
|
|
2460
|
+
}, Xr = ({
|
|
2459
2461
|
open: e,
|
|
2460
2462
|
setOpen: t,
|
|
2461
2463
|
onSignUp: s,
|
|
2462
2464
|
onLogin: a
|
|
2463
|
-
}) => /* @__PURE__ */ n.jsx(
|
|
2464
|
-
/* @__PURE__ */ n.jsx(
|
|
2465
|
-
/* @__PURE__ */ n.jsx(
|
|
2466
|
-
/* @__PURE__ */ n.jsxs(
|
|
2467
|
-
/* @__PURE__ */ n.jsx(
|
|
2465
|
+
}) => /* @__PURE__ */ n.jsx(Ee, { open: e, onOpenChange: t, children: /* @__PURE__ */ n.jsxs(ke, { children: [
|
|
2466
|
+
/* @__PURE__ */ n.jsx(De, { children: "Welcome to the Playground!" }),
|
|
2467
|
+
/* @__PURE__ */ n.jsx(Ct, { children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
2468
|
+
/* @__PURE__ */ n.jsxs(St, { className: "flex gap-2 sm:justify-between", children: [
|
|
2469
|
+
/* @__PURE__ */ n.jsx(I, { type: "button", variant: "ghost", onClick: () => t(!1), children: "Skip" }),
|
|
2468
2470
|
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2469
|
-
s && /* @__PURE__ */ n.jsx(
|
|
2470
|
-
a && /* @__PURE__ */ n.jsx(
|
|
2471
|
+
s && /* @__PURE__ */ n.jsx(I, { type: "button", variant: "outline", onClick: s, children: "Sign Up" }),
|
|
2472
|
+
a && /* @__PURE__ */ n.jsx(I, { type: "button", variant: "default", onClick: a, children: "Login" })
|
|
2471
2473
|
] })
|
|
2472
2474
|
] })
|
|
2473
|
-
] }) }),
|
|
2475
|
+
] }) }), Kt = (e = 0) => {
|
|
2474
2476
|
if (e === 0)
|
|
2475
2477
|
return "0 B";
|
|
2476
2478
|
const t = Math.floor(Math.log(e) / Math.log(1e3));
|
|
2477
2479
|
return `${(e / Math.pow(1e3, t)).toFixed(
|
|
2478
2480
|
t ? 2 : 0
|
|
2479
2481
|
)} ${t ? `${"kMGTPEZY"[t - 1]}B` : "B"}`;
|
|
2480
|
-
},
|
|
2482
|
+
}, Zr = ({ status: e }) => {
|
|
2481
2483
|
if (!e) return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2482
2484
|
switch (Number(e.toString().slice(0, 1))) {
|
|
2483
2485
|
case 2:
|
|
@@ -2489,26 +2491,28 @@ const Xt = ({
|
|
|
2489
2491
|
default:
|
|
2490
2492
|
return /* @__PURE__ */ n.jsx("div", { className: "w-2 h-2 rounded-full bg-gray-500" });
|
|
2491
2493
|
}
|
|
2492
|
-
},
|
|
2493
|
-
const e = L(null), t = L(null), s = L(Date.now()), a = L(null), r =
|
|
2494
|
+
}, Yr = () => {
|
|
2495
|
+
const e = L(null), t = L(null), s = L(Date.now()), a = L(null), r = wt(() => {
|
|
2494
2496
|
if (t.current) {
|
|
2495
2497
|
const o = Date.now() - s.current;
|
|
2496
2498
|
t.current.nodeValue = o.toFixed();
|
|
2497
2499
|
}
|
|
2498
2500
|
a.current = requestAnimationFrame(r);
|
|
2499
2501
|
}, []);
|
|
2500
|
-
return
|
|
2502
|
+
return es(() => {
|
|
2501
2503
|
const o = document.createTextNode("0"), i = e.current;
|
|
2502
2504
|
return i.appendChild(o), t.current = o, s.current = Date.now(), a.current = requestAnimationFrame(r), () => {
|
|
2503
2505
|
a.current && cancelAnimationFrame(a.current), t.current && i.contains(o) && i.removeChild(o);
|
|
2504
2506
|
};
|
|
2505
2507
|
}, [r]), /* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[3ch]", ref: e });
|
|
2506
|
-
},
|
|
2508
|
+
}, Kr = ({
|
|
2507
2509
|
status: e,
|
|
2508
2510
|
time: t,
|
|
2509
|
-
size: s
|
|
2511
|
+
size: s,
|
|
2512
|
+
isFinished: a,
|
|
2513
|
+
progress: r
|
|
2510
2514
|
}) => {
|
|
2511
|
-
const
|
|
2515
|
+
const o = {
|
|
2512
2516
|
200: "OK",
|
|
2513
2517
|
201: "Created",
|
|
2514
2518
|
202: "Accepted",
|
|
@@ -2520,64 +2524,74 @@ const Xt = ({
|
|
|
2520
2524
|
405: "Method Not Allowed",
|
|
2521
2525
|
500: "Internal Server Error"
|
|
2522
2526
|
};
|
|
2523
|
-
return /* @__PURE__ */ n.jsxs("div", { className: "flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2527
|
+
return /* @__PURE__ */ n.jsxs("div", { className: "relative flex h-10 text-xs gap-4 px-4 items-center justify-between font-mono border-b", children: [
|
|
2524
2528
|
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2525
|
-
/* @__PURE__ */ n.jsx(
|
|
2529
|
+
/* @__PURE__ */ n.jsx(Zr, { status: e }),
|
|
2526
2530
|
" ",
|
|
2527
2531
|
e ?? "Sending Request...",
|
|
2528
|
-
e ? ` ${
|
|
2532
|
+
e ? ` ${o[e]}` : ""
|
|
2529
2533
|
] }),
|
|
2530
2534
|
/* @__PURE__ */ n.jsxs("div", { className: "flex gap-2", children: [
|
|
2531
2535
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2532
2536
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
2533
2537
|
" ",
|
|
2534
|
-
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end w-[5ch]", children: s ?
|
|
2538
|
+
/* @__PURE__ */ n.jsx("span", { className: "inline-block text-end min-w-[5ch]", children: s ? Kt(s) : "- B" })
|
|
2535
2539
|
] }),
|
|
2536
2540
|
/* @__PURE__ */ n.jsxs("div", { children: [
|
|
2537
2541
|
/* @__PURE__ */ n.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
2538
2542
|
" ",
|
|
2539
|
-
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(
|
|
2543
|
+
t !== void 0 ? `${t.toFixed(0)}` : /* @__PURE__ */ n.jsx(Yr, {}),
|
|
2540
2544
|
"ms"
|
|
2541
2545
|
] })
|
|
2542
|
-
] })
|
|
2546
|
+
] }),
|
|
2547
|
+
/* @__PURE__ */ n.jsx(
|
|
2548
|
+
"div",
|
|
2549
|
+
{
|
|
2550
|
+
className: "h-full bg-neutral-500/10 absolute left-0 -bottom-0 z-10 transition-all duration-200 ease-in-out",
|
|
2551
|
+
style: {
|
|
2552
|
+
opacity: a ? 0 : 1,
|
|
2553
|
+
width: a ? 0 : `${r * 100}%`
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
)
|
|
2543
2557
|
] });
|
|
2544
2558
|
};
|
|
2545
|
-
function
|
|
2559
|
+
function Me(e) {
|
|
2546
2560
|
if (e === null) return "null";
|
|
2547
2561
|
if (Array.isArray(e)) {
|
|
2548
2562
|
if (e.length === 0) return "any[]";
|
|
2549
2563
|
const t = e[0];
|
|
2550
|
-
return t === void 0 ? "any[]" : `${
|
|
2564
|
+
return t === void 0 ? "any[]" : `${Me(t)}[]`;
|
|
2551
2565
|
}
|
|
2552
|
-
return typeof e == "object" ?
|
|
2566
|
+
return typeof e == "object" ? ea(e) : typeof e;
|
|
2553
2567
|
}
|
|
2554
|
-
function
|
|
2568
|
+
function ea(e, t = "") {
|
|
2555
2569
|
const s = ["{"];
|
|
2556
2570
|
for (const [a, r] of Object.entries(e)) {
|
|
2557
|
-
const o =
|
|
2571
|
+
const o = Me(r);
|
|
2558
2572
|
s.push(` ${a}: ${o};`);
|
|
2559
2573
|
}
|
|
2560
2574
|
return s.push("}"), s.join(`
|
|
2561
2575
|
`);
|
|
2562
2576
|
}
|
|
2563
|
-
function
|
|
2564
|
-
return { lines: [`type GeneratedType = ${
|
|
2577
|
+
function ta(e) {
|
|
2578
|
+
return { lines: [`type GeneratedType = ${Me(e)};`] };
|
|
2565
2579
|
}
|
|
2566
|
-
const
|
|
2580
|
+
const en = ({
|
|
2567
2581
|
code: e,
|
|
2568
2582
|
language: t,
|
|
2569
2583
|
children: s
|
|
2570
2584
|
}) => {
|
|
2571
|
-
const { syntaxHighlighting: a } =
|
|
2572
|
-
return
|
|
2585
|
+
const { syntaxHighlighting: a } = Hn().options;
|
|
2586
|
+
return Yn(a?.highlighter, "Highlighter not found"), Ts(
|
|
2573
2587
|
a.highlighter,
|
|
2574
2588
|
e ?? s ?? "",
|
|
2575
2589
|
t,
|
|
2576
2590
|
a.themes
|
|
2577
2591
|
);
|
|
2578
2592
|
};
|
|
2579
|
-
|
|
2580
|
-
const
|
|
2593
|
+
en.displayName = "Highlight";
|
|
2594
|
+
const na = (e) => Object.entries({
|
|
2581
2595
|
"application/json": "json",
|
|
2582
2596
|
"text/json": "json",
|
|
2583
2597
|
"text/html": "html",
|
|
@@ -2587,16 +2601,16 @@ const ea = (e) => Object.entries({
|
|
|
2587
2601
|
"application/xhtml+xml": "xhtml"
|
|
2588
2602
|
}).find(
|
|
2589
2603
|
([s]) => e.includes(s)
|
|
2590
|
-
)?.[1],
|
|
2604
|
+
)?.[1], sa = (e) => {
|
|
2591
2605
|
const t = e.find(([s]) => s.toLowerCase() === "content-type")?.[1] || "";
|
|
2592
|
-
return
|
|
2593
|
-
},
|
|
2606
|
+
return na(t);
|
|
2607
|
+
}, ra = (e) => {
|
|
2594
2608
|
try {
|
|
2595
2609
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
2596
2610
|
} catch {
|
|
2597
2611
|
return null;
|
|
2598
2612
|
}
|
|
2599
|
-
},
|
|
2613
|
+
}, aa = (e) => {
|
|
2600
2614
|
const t = [
|
|
2601
2615
|
"Content-Type",
|
|
2602
2616
|
"Content-Length",
|
|
@@ -2610,7 +2624,10 @@ const ea = (e) => Object.entries({
|
|
|
2610
2624
|
const r = t.indexOf(s.toLowerCase()), o = t.indexOf(a.toLowerCase());
|
|
2611
2625
|
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
2612
2626
|
});
|
|
2613
|
-
},
|
|
2627
|
+
}, Y = 3, Oe = ie(
|
|
2628
|
+
"div",
|
|
2629
|
+
"grid-cols-subgrid grid border-b col-span-full px-4 py-1.5 font-mono text-xs"
|
|
2630
|
+
), X = ie("div", "py-1 break-all"), oa = ({
|
|
2614
2631
|
body: e = "",
|
|
2615
2632
|
headers: t,
|
|
2616
2633
|
request: s,
|
|
@@ -2619,66 +2636,66 @@ const ea = (e) => Object.entries({
|
|
|
2619
2636
|
fileName: o,
|
|
2620
2637
|
blob: i
|
|
2621
2638
|
}) => {
|
|
2622
|
-
const l =
|
|
2639
|
+
const l = sa(t), c = ra(e), u = c || e, [d, p] = k(
|
|
2623
2640
|
c ? "formatted" : "raw"
|
|
2624
|
-
), f =
|
|
2641
|
+
), f = Qn({
|
|
2625
2642
|
queryKey: ["types", u],
|
|
2626
|
-
queryFn: async () =>
|
|
2643
|
+
queryFn: async () => ta(JSON.parse(u)),
|
|
2627
2644
|
enabled: d === "types" && !r
|
|
2628
2645
|
}), m = () => {
|
|
2629
2646
|
if (i && o) {
|
|
2630
|
-
const
|
|
2631
|
-
|
|
2647
|
+
const y = URL.createObjectURL(i), b = document.createElement("a");
|
|
2648
|
+
b.href = y, b.download = o, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(y);
|
|
2632
2649
|
}
|
|
2633
|
-
}, x =
|
|
2650
|
+
}, x = aa([...t]);
|
|
2634
2651
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2635
2652
|
/* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2636
2653
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2637
|
-
/* @__PURE__ */ n.jsx(
|
|
2654
|
+
/* @__PURE__ */ n.jsx(Ln, { size: 16 }),
|
|
2638
2655
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Request" })
|
|
2639
2656
|
] }),
|
|
2640
|
-
/* @__PURE__ */ n.jsx(
|
|
2641
|
-
/* @__PURE__ */ n.jsx(
|
|
2642
|
-
/* @__PURE__ */ n.jsx(
|
|
2643
|
-
] },
|
|
2657
|
+
/* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsx("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: s.headers.slice(0, Y).map(([y, b]) => /* @__PURE__ */ n.jsxs(Oe, { children: [
|
|
2658
|
+
/* @__PURE__ */ n.jsx(X, { children: y }),
|
|
2659
|
+
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2660
|
+
] }, y)) }) })
|
|
2644
2661
|
] }),
|
|
2645
2662
|
/* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
2646
2663
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
2647
|
-
/* @__PURE__ */ n.jsx(
|
|
2664
|
+
/* @__PURE__ */ n.jsx($n, { size: 16 }),
|
|
2648
2665
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Header Response" })
|
|
2649
2666
|
] }),
|
|
2650
|
-
/* @__PURE__ */ n.jsx(
|
|
2651
|
-
x.slice(0,
|
|
2652
|
-
/* @__PURE__ */ n.jsx(
|
|
2653
|
-
/* @__PURE__ */ n.jsx(
|
|
2654
|
-
] },
|
|
2655
|
-
x.length >
|
|
2656
|
-
/* @__PURE__ */ n.jsxs(
|
|
2667
|
+
/* @__PURE__ */ n.jsx(V, { children: /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-x-6 text-sm", children: [
|
|
2668
|
+
x.slice(0, Y).map(([y, b]) => /* @__PURE__ */ n.jsxs(Oe, { children: [
|
|
2669
|
+
/* @__PURE__ */ n.jsx(X, { children: y }),
|
|
2670
|
+
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2671
|
+
] }, y)),
|
|
2672
|
+
x.length > Y && /* @__PURE__ */ n.jsxs(q, { className: "col-span-full grid-cols-subgrid grid group", children: [
|
|
2673
|
+
/* @__PURE__ */ n.jsxs(Ft, { 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: [
|
|
2657
2674
|
/* @__PURE__ */ n.jsxs("span", { children: [
|
|
2658
2675
|
"Show ",
|
|
2659
|
-
x.length -
|
|
2676
|
+
x.length - Y,
|
|
2660
2677
|
" more headers"
|
|
2661
2678
|
] }),
|
|
2662
|
-
/* @__PURE__ */ n.jsx(
|
|
2679
|
+
/* @__PURE__ */ n.jsx(fe, { size: 12, className: "text-muted-foreground" })
|
|
2663
2680
|
] }),
|
|
2664
|
-
/* @__PURE__ */ n.jsx(
|
|
2665
|
-
/* @__PURE__ */ n.jsx(
|
|
2666
|
-
/* @__PURE__ */ n.jsx(
|
|
2667
|
-
] },
|
|
2681
|
+
/* @__PURE__ */ n.jsx(V, { className: "col-span-full grid grid-cols-subgrid", children: x.slice(Y).map(([y, b]) => /* @__PURE__ */ n.jsxs(Oe, { children: [
|
|
2682
|
+
/* @__PURE__ */ n.jsx(X, { children: y }),
|
|
2683
|
+
/* @__PURE__ */ n.jsx(X, { children: b })
|
|
2684
|
+
] }, y)) })
|
|
2668
2685
|
] })
|
|
2669
2686
|
] }) })
|
|
2670
2687
|
] }),
|
|
2671
2688
|
/* @__PURE__ */ n.jsx("div", { className: "flex gap-2 justify-between items-center border-b h-10", children: c && !r && /* @__PURE__ */ n.jsx("div", { className: "px-2", children: /* @__PURE__ */ n.jsxs(
|
|
2672
|
-
|
|
2689
|
+
qt,
|
|
2673
2690
|
{
|
|
2674
2691
|
value: d,
|
|
2675
|
-
onValueChange: (
|
|
2692
|
+
onValueChange: (y) => p(y),
|
|
2676
2693
|
children: [
|
|
2677
|
-
/* @__PURE__ */ n.jsx(
|
|
2678
|
-
/* @__PURE__ */ n.jsxs(
|
|
2679
|
-
/* @__PURE__ */ n.jsx(
|
|
2680
|
-
/* @__PURE__ */ n.jsx(
|
|
2681
|
-
/* @__PURE__ */ n.jsx(
|
|
2694
|
+
/* @__PURE__ */ n.jsx(Ve, { className: "min-w-32 border-none h-8", children: /* @__PURE__ */ n.jsx(Vt, { placeholder: "View" }) }),
|
|
2695
|
+
/* @__PURE__ */ n.jsxs(Be, { children: [
|
|
2696
|
+
/* @__PURE__ */ n.jsx(te, { value: "formatted", children: "Formatted" }),
|
|
2697
|
+
/* @__PURE__ */ n.jsx(te, { value: "raw", children: "Raw" }),
|
|
2698
|
+
/* @__PURE__ */ n.jsx(te, { value: "types", children: "Types" })
|
|
2682
2699
|
] })
|
|
2683
2700
|
]
|
|
2684
2701
|
}
|
|
@@ -2687,23 +2704,23 @@ const ea = (e) => Object.entries({
|
|
|
2687
2704
|
/* @__PURE__ */ n.jsx("div", { className: "text-lg font-semibold", children: "Binary Content" }),
|
|
2688
2705
|
/* @__PURE__ */ n.jsx("div", { className: "text-sm text-muted-foreground", children: "This response contains binary data that cannot be displayed as text." }),
|
|
2689
2706
|
/* @__PURE__ */ n.jsxs(
|
|
2690
|
-
|
|
2707
|
+
I,
|
|
2691
2708
|
{
|
|
2692
2709
|
onClick: m,
|
|
2693
2710
|
className: "flex items-center gap-2",
|
|
2694
2711
|
disabled: !i,
|
|
2695
2712
|
children: [
|
|
2696
|
-
/* @__PURE__ */ n.jsx(
|
|
2713
|
+
/* @__PURE__ */ n.jsx(In, { className: "h-4 w-4" }),
|
|
2697
2714
|
"Download ",
|
|
2698
2715
|
o || "file",
|
|
2699
2716
|
" (",
|
|
2700
|
-
|
|
2717
|
+
Kt(a),
|
|
2701
2718
|
")"
|
|
2702
2719
|
]
|
|
2703
2720
|
}
|
|
2704
2721
|
)
|
|
2705
2722
|
] }) }) : /* @__PURE__ */ n.jsx("div", { className: "overflow-auto max-w-full p-4 text-xs max-h-[calc(83.333vh-180px)]", children: /* @__PURE__ */ n.jsx(
|
|
2706
|
-
|
|
2723
|
+
en,
|
|
2707
2724
|
{
|
|
2708
2725
|
language: d === "types" ? "typescript" : d === "raw" ? c ? "plain" : l : "json",
|
|
2709
2726
|
code: (d === "raw" ? e : d === "types" ? f.data?.lines.join(`
|
|
@@ -2711,26 +2728,30 @@ const ea = (e) => Object.entries({
|
|
|
2711
2728
|
}
|
|
2712
2729
|
) }) })
|
|
2713
2730
|
] });
|
|
2714
|
-
},
|
|
2731
|
+
}, ia = ({
|
|
2715
2732
|
queryMutation: e,
|
|
2716
2733
|
showLongRunningWarning: t,
|
|
2717
2734
|
onCancel: s,
|
|
2718
|
-
tip: a
|
|
2735
|
+
tip: a,
|
|
2736
|
+
isFinished: r,
|
|
2737
|
+
progress: o
|
|
2719
2738
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "overflow-y-auto h-[80vh] bg-muted/50", children: [
|
|
2720
2739
|
(e.isPending || e.data) && /* @__PURE__ */ n.jsx(
|
|
2721
|
-
|
|
2740
|
+
Kr,
|
|
2722
2741
|
{
|
|
2723
2742
|
status: e.data?.status,
|
|
2724
2743
|
time: e.data?.time,
|
|
2725
|
-
size: e.data?.size
|
|
2744
|
+
size: e.data?.size,
|
|
2745
|
+
isFinished: r,
|
|
2746
|
+
progress: o
|
|
2726
2747
|
}
|
|
2727
2748
|
),
|
|
2728
|
-
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(
|
|
2729
|
-
/* @__PURE__ */ n.jsx(
|
|
2730
|
-
/* @__PURE__ */ n.jsx(
|
|
2731
|
-
/* @__PURE__ */ n.jsx(
|
|
2749
|
+
e.error ? /* @__PURE__ */ n.jsx("div", { className: "max-w-2/3 mx-auto mt-20", children: /* @__PURE__ */ n.jsxs(is, { children: [
|
|
2750
|
+
/* @__PURE__ */ n.jsx(En, { size: 24, strokeWidth: 1.5, className: "me-5" }),
|
|
2751
|
+
/* @__PURE__ */ n.jsx(cs, { children: "Request failed" }),
|
|
2752
|
+
/* @__PURE__ */ n.jsx(ls, { children: e.error.message || String(e.error) || "Unexpected error" })
|
|
2732
2753
|
] }) }) : e.data ? /* @__PURE__ */ n.jsx(
|
|
2733
|
-
|
|
2754
|
+
oa,
|
|
2734
2755
|
{
|
|
2735
2756
|
request: e.data.request,
|
|
2736
2757
|
size: e.data.size,
|
|
@@ -2741,18 +2762,18 @@ const ea = (e) => Object.entries({
|
|
|
2741
2762
|
blob: e.data.blob
|
|
2742
2763
|
}
|
|
2743
2764
|
) : e.isPending ? /* @__PURE__ */ n.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2 items-center mt-20", children: [
|
|
2744
|
-
/* @__PURE__ */ n.jsx(
|
|
2765
|
+
/* @__PURE__ */ n.jsx(as, {}),
|
|
2745
2766
|
/* @__PURE__ */ n.jsxs(
|
|
2746
2767
|
"div",
|
|
2747
2768
|
{
|
|
2748
|
-
className:
|
|
2769
|
+
className: v(
|
|
2749
2770
|
"opacity-0 pointer-events-none transition-opacity h-20 text-sm text-muted-foreground duration-300 flex flex-col gap-2 items-center",
|
|
2750
2771
|
t && "opacity-100 pointer-events-auto"
|
|
2751
2772
|
),
|
|
2752
2773
|
children: [
|
|
2753
2774
|
"Looks like the request is taking longer than expected.",
|
|
2754
2775
|
/* @__PURE__ */ n.jsx(
|
|
2755
|
-
|
|
2776
|
+
se,
|
|
2756
2777
|
{
|
|
2757
2778
|
type: "button",
|
|
2758
2779
|
onClick: s,
|
|
@@ -2767,7 +2788,7 @@ const ea = (e) => Object.entries({
|
|
|
2767
2788
|
)
|
|
2768
2789
|
] }) }) : /* @__PURE__ */ n.jsx("div", { className: "h-full grid place-items-center", children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4 items-center", children: [
|
|
2769
2790
|
/* @__PURE__ */ n.jsx(
|
|
2770
|
-
|
|
2791
|
+
kn,
|
|
2771
2792
|
{
|
|
2772
2793
|
size: 64,
|
|
2773
2794
|
className: "text-muted-foreground",
|
|
@@ -2777,18 +2798,18 @@ const ea = (e) => Object.entries({
|
|
|
2777
2798
|
/* @__PURE__ */ n.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: "Send your first request" }),
|
|
2778
2799
|
a
|
|
2779
2800
|
] }) })
|
|
2780
|
-
] }),
|
|
2781
|
-
|
|
2801
|
+
] }), ca = $e()(
|
|
2802
|
+
Ie(
|
|
2782
2803
|
(e) => ({
|
|
2783
2804
|
skipLogin: !1,
|
|
2784
2805
|
setSkipLogin: (t) => e({ skipLogin: t })
|
|
2785
2806
|
}),
|
|
2786
2807
|
{
|
|
2787
2808
|
name: "remember-skip-login",
|
|
2788
|
-
storage:
|
|
2809
|
+
storage: bt(() => sessionStorage)
|
|
2789
2810
|
}
|
|
2790
2811
|
)
|
|
2791
|
-
),
|
|
2812
|
+
), ne = "__none", la = ({
|
|
2792
2813
|
server: e,
|
|
2793
2814
|
servers: t = [],
|
|
2794
2815
|
url: s,
|
|
@@ -2802,11 +2823,11 @@ const ea = (e) => Object.entries({
|
|
|
2802
2823
|
onLogin: d,
|
|
2803
2824
|
onSignUp: p
|
|
2804
2825
|
}) => {
|
|
2805
|
-
const { selectedServer: f, setSelectedServer: m } =
|
|
2826
|
+
const { selectedServer: f, setSelectedServer: m } = Cr(
|
|
2806
2827
|
t.map((h) => ({ url: h }))
|
|
2807
|
-
), [x,
|
|
2808
|
-
|
|
2809
|
-
}), { register:
|
|
2828
|
+
), [x, y] = k(!1), b = Jn(), { setRememberedIdentity: R, getRememberedIdentity: j } = Hr(), [, N] = ts(), { skipLogin: Q, setSkipLogin: O } = ca(), [D, P] = k(!1), J = L(void 0), He = fs(R), Qe = L(null), { label: on } = Nr("meta+enter", () => {
|
|
2829
|
+
Qe.current?.requestSubmit();
|
|
2830
|
+
}), { register: cn, control: ce, handleSubmit: Je, watch: We, setValue: ve, ...be } = us({
|
|
2810
2831
|
defaultValues: {
|
|
2811
2832
|
body: l,
|
|
2812
2833
|
queryParams: o.length > 0 ? o.map((h) => ({
|
|
@@ -2837,240 +2858,230 @@ const ea = (e) => Object.entries({
|
|
|
2837
2858
|
active: !1
|
|
2838
2859
|
}
|
|
2839
2860
|
],
|
|
2840
|
-
identity:
|
|
2841
|
-
|
|
2842
|
-
...
|
|
2861
|
+
identity: j([
|
|
2862
|
+
ne,
|
|
2863
|
+
...b.data?.map((h) => h.id) ?? []
|
|
2843
2864
|
])
|
|
2844
2865
|
}
|
|
2845
|
-
}), W =
|
|
2846
|
-
() =>
|
|
2847
|
-
[
|
|
2866
|
+
}), W = We("identity"), ln = Nt(
|
|
2867
|
+
() => b.data?.find((h) => h.id === W)?.authorizationFields,
|
|
2868
|
+
[b.data, W]
|
|
2848
2869
|
);
|
|
2849
2870
|
z(() => {
|
|
2850
|
-
W &&
|
|
2851
|
-
}, [
|
|
2852
|
-
const
|
|
2871
|
+
W && He.current(W);
|
|
2872
|
+
}, [He, W]);
|
|
2873
|
+
const B = ds({
|
|
2853
2874
|
gcTime: 0,
|
|
2854
2875
|
mutationFn: async (h) => {
|
|
2855
|
-
const
|
|
2856
|
-
...h.headers.filter((
|
|
2876
|
+
const le = performance.now(), yn = Object.fromEntries([
|
|
2877
|
+
...h.headers.filter((A) => A.name && A.active).map((A) => [A.name, A.value])
|
|
2857
2878
|
]), _ = new Request(
|
|
2858
|
-
|
|
2879
|
+
mt(e ?? f, s, h),
|
|
2859
2880
|
{
|
|
2860
2881
|
method: a.toUpperCase(),
|
|
2861
|
-
headers:
|
|
2882
|
+
headers: yn,
|
|
2862
2883
|
body: h.body ? h.body : void 0
|
|
2863
2884
|
}
|
|
2864
2885
|
);
|
|
2865
|
-
h.identity !==
|
|
2866
|
-
const
|
|
2886
|
+
h.identity !== ne && await b.data?.find((A) => A.id === h.identity)?.authorizeRequest(_);
|
|
2887
|
+
const je = setTimeout(
|
|
2867
2888
|
() => P(!0),
|
|
2868
2889
|
3210
|
|
2869
2890
|
);
|
|
2870
2891
|
J.current = new AbortController(), J.current.signal.addEventListener("abort", () => {
|
|
2871
|
-
clearTimeout(
|
|
2892
|
+
clearTimeout(je);
|
|
2872
2893
|
});
|
|
2873
2894
|
try {
|
|
2874
|
-
const
|
|
2895
|
+
const A = await fetch(_, {
|
|
2875
2896
|
cache: "no-store",
|
|
2876
2897
|
signal: J.current.signal
|
|
2877
2898
|
});
|
|
2878
|
-
clearTimeout(
|
|
2879
|
-
const
|
|
2880
|
-
let
|
|
2881
|
-
|
|
2882
|
-
const
|
|
2899
|
+
clearTimeout(je), P(!1);
|
|
2900
|
+
const vn = performance.now() - le, bn = new URL(_.url), Ye = Array.from(A.headers.entries()), Ke = A.headers.get("content-type") || "", et = Er(Ke);
|
|
2901
|
+
let de = "", tt, nt;
|
|
2902
|
+
et ? (tt = await A.blob(), nt = kr(Ye, _.url), de = `Binary content (${Ke})`) : de = await A.text();
|
|
2903
|
+
const st = A.headers.get("content-length");
|
|
2883
2904
|
return {
|
|
2884
|
-
status:
|
|
2885
|
-
headers:
|
|
2886
|
-
size:
|
|
2887
|
-
body:
|
|
2888
|
-
time:
|
|
2889
|
-
isBinary:
|
|
2890
|
-
fileName:
|
|
2891
|
-
blob:
|
|
2905
|
+
status: A.status,
|
|
2906
|
+
headers: Ye,
|
|
2907
|
+
size: st ? parseInt(st) : de.length,
|
|
2908
|
+
body: de,
|
|
2909
|
+
time: vn,
|
|
2910
|
+
isBinary: et,
|
|
2911
|
+
fileName: nt,
|
|
2912
|
+
blob: tt,
|
|
2892
2913
|
request: {
|
|
2893
2914
|
method: _.method.toUpperCase(),
|
|
2894
2915
|
url: _.url,
|
|
2895
2916
|
headers: [
|
|
2896
|
-
["Host",
|
|
2917
|
+
["Host", bn.host],
|
|
2897
2918
|
["User-Agent", "Zudoku Playground"],
|
|
2898
2919
|
...Array.from(_.headers.entries())
|
|
2899
2920
|
],
|
|
2900
2921
|
body: h.body ? h.body : void 0
|
|
2901
2922
|
}
|
|
2902
2923
|
};
|
|
2903
|
-
} catch (
|
|
2904
|
-
throw clearTimeout(
|
|
2924
|
+
} catch (A) {
|
|
2925
|
+
throw clearTimeout(je), P(!1), A instanceof TypeError ? new Error(
|
|
2905
2926
|
"The request failed, possibly due to network issues or CORS policy."
|
|
2906
|
-
) :
|
|
2927
|
+
) : A;
|
|
2907
2928
|
}
|
|
2908
2929
|
}
|
|
2909
|
-
}),
|
|
2930
|
+
}), Xe = B.isPending, [dn, un] = k(!1);
|
|
2910
2931
|
z(() => {
|
|
2911
|
-
const h = setTimeout(() =>
|
|
2932
|
+
const h = setTimeout(() => un(Xe), 100);
|
|
2912
2933
|
return () => clearTimeout(h);
|
|
2913
|
-
}, [
|
|
2914
|
-
const { isFinished:
|
|
2934
|
+
}, [Xe]);
|
|
2935
|
+
const { isFinished: mn, progress: pn } = os({ isAnimating: dn });
|
|
2915
2936
|
z(() => () => {
|
|
2916
2937
|
J.current?.abort();
|
|
2917
2938
|
}, []);
|
|
2918
|
-
const
|
|
2919
|
-
|
|
2939
|
+
const hn = /* @__PURE__ */ n.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: e ? /* @__PURE__ */ n.jsx("span", { children: e.replace(/^https?:\/\//, "").replace(/\/$/, "") }) : t.length > 1 && /* @__PURE__ */ n.jsxs(
|
|
2940
|
+
qt,
|
|
2920
2941
|
{
|
|
2921
2942
|
onValueChange: (h) => {
|
|
2922
|
-
|
|
2943
|
+
N(() => m(h));
|
|
2923
2944
|
},
|
|
2924
2945
|
value: f,
|
|
2925
2946
|
defaultValue: f,
|
|
2926
2947
|
children: [
|
|
2927
|
-
/* @__PURE__ */ n.jsx(
|
|
2928
|
-
/* @__PURE__ */ n.jsx(
|
|
2948
|
+
/* @__PURE__ */ n.jsx(Ve, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto translate-y-[4px]", children: /* @__PURE__ */ n.jsx(Vt, {}) }),
|
|
2949
|
+
/* @__PURE__ */ n.jsx(Be, { children: t.map((h) => /* @__PURE__ */ n.jsx(te, { value: h, children: h.replace(/^https?:\/\//, "").replace(/\/$/, "") }, h)) })
|
|
2929
2950
|
]
|
|
2930
2951
|
}
|
|
2931
|
-
) }),
|
|
2952
|
+
) }), fn = u && !Q, xn = ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
2932
2953
|
a.toUpperCase()
|
|
2933
|
-
), [
|
|
2954
|
+
), [Ze, gn] = hs();
|
|
2934
2955
|
return /* @__PURE__ */ n.jsx(
|
|
2935
|
-
|
|
2956
|
+
ms,
|
|
2936
2957
|
{
|
|
2937
|
-
register:
|
|
2938
|
-
control:
|
|
2939
|
-
handleSubmit:
|
|
2940
|
-
watch:
|
|
2941
|
-
setValue:
|
|
2942
|
-
...
|
|
2943
|
-
children: /* @__PURE__ */ n.jsx(
|
|
2958
|
+
register: cn,
|
|
2959
|
+
control: ce,
|
|
2960
|
+
handleSubmit: Je,
|
|
2961
|
+
watch: We,
|
|
2962
|
+
setValue: ve,
|
|
2963
|
+
...be,
|
|
2964
|
+
children: /* @__PURE__ */ n.jsx(ps, { delayDuration: 150, children: /* @__PURE__ */ n.jsxs(
|
|
2944
2965
|
"form",
|
|
2945
2966
|
{
|
|
2946
|
-
ref:
|
|
2947
|
-
onSubmit:
|
|
2948
|
-
|
|
2967
|
+
ref: Qe,
|
|
2968
|
+
onSubmit: Je((h) => {
|
|
2969
|
+
b.data?.length === 0 || h.identity ? B.mutate(h) : y(!0);
|
|
2949
2970
|
}),
|
|
2950
2971
|
className: "relative",
|
|
2951
2972
|
children: [
|
|
2952
2973
|
/* @__PURE__ */ n.jsx(
|
|
2953
|
-
|
|
2974
|
+
Br,
|
|
2954
2975
|
{
|
|
2955
|
-
identities:
|
|
2976
|
+
identities: b.data ?? [],
|
|
2956
2977
|
open: x,
|
|
2957
|
-
onOpenChange:
|
|
2958
|
-
onSubmit: ({ rememberedIdentity: h, identity:
|
|
2959
|
-
h &&
|
|
2978
|
+
onOpenChange: y,
|
|
2979
|
+
onSubmit: ({ rememberedIdentity: h, identity: le }) => {
|
|
2980
|
+
h && ve("identity", le ?? ne), y(!1), B.mutate({ ...be.getValues(), identity: le });
|
|
2960
2981
|
}
|
|
2961
2982
|
}
|
|
2962
2983
|
),
|
|
2963
2984
|
/* @__PURE__ */ n.jsx(
|
|
2964
|
-
|
|
2985
|
+
Xr,
|
|
2965
2986
|
{
|
|
2966
|
-
open:
|
|
2967
|
-
setOpen: (h) =>
|
|
2987
|
+
open: fn,
|
|
2988
|
+
setOpen: (h) => O(!h),
|
|
2968
2989
|
onSignUp: p,
|
|
2969
2990
|
onLogin: d
|
|
2970
2991
|
}
|
|
2971
2992
|
),
|
|
2972
2993
|
/* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-[1fr_1px_1fr] text-sm", children: [
|
|
2973
|
-
/* @__PURE__ */ n.
|
|
2994
|
+
/* @__PURE__ */ n.jsxs("div", { className: "col-span-3 p-4 border-b flex gap-2 items-stretch", children: [
|
|
2974
2995
|
/* @__PURE__ */ n.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md relative overflow-hidden", children: [
|
|
2975
2996
|
/* @__PURE__ */ n.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: a.toUpperCase() }),
|
|
2976
|
-
/* @__PURE__ */ n.
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
] }),
|
|
2982
|
-
/* @__PURE__ */ n.jsx(
|
|
2983
|
-
"div",
|
|
2984
|
-
{
|
|
2985
|
-
className: "h-full bg-primary/25 absolute left-0 -bottom-0 z-10 transition-all duration-300 ease-in-out",
|
|
2986
|
-
style: {
|
|
2987
|
-
opacity: We ? 0 : 1,
|
|
2988
|
-
width: We ? 0 : `${un * 100}%`
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
)
|
|
2992
|
-
] }),
|
|
2997
|
+
/* @__PURE__ */ n.jsx("div", { className: "items-center px-2 font-mono text-xs break-all leading-6 relative h-full w-full", children: /* @__PURE__ */ n.jsxs("div", { className: "h-full py-1.5", children: [
|
|
2998
|
+
hn,
|
|
2999
|
+
/* @__PURE__ */ n.jsx(Jr, { url: s }),
|
|
3000
|
+
/* @__PURE__ */ n.jsx(Wr, {})
|
|
3001
|
+
] }) }),
|
|
2993
3002
|
/* @__PURE__ */ n.jsx("div", { className: "px-1", children: /* @__PURE__ */ n.jsx(
|
|
2994
|
-
|
|
3003
|
+
I,
|
|
2995
3004
|
{
|
|
2996
3005
|
type: "button",
|
|
2997
3006
|
onClick: () => {
|
|
2998
|
-
|
|
2999
|
-
|
|
3007
|
+
gn(
|
|
3008
|
+
mt(
|
|
3000
3009
|
e ?? f,
|
|
3001
3010
|
s,
|
|
3002
|
-
|
|
3011
|
+
be.getValues()
|
|
3003
3012
|
).toString()
|
|
3004
3013
|
);
|
|
3005
3014
|
},
|
|
3006
3015
|
variant: "ghost",
|
|
3007
3016
|
size: "icon-xs",
|
|
3008
|
-
className:
|
|
3017
|
+
className: v(
|
|
3009
3018
|
"hover:opacity-100 transition",
|
|
3010
|
-
|
|
3019
|
+
Ze ? "text-emerald-600 opacity-100" : "opacity-50"
|
|
3011
3020
|
),
|
|
3012
|
-
children:
|
|
3021
|
+
children: Ze ? /* @__PURE__ */ n.jsx(yt, { className: "text-green-500", size: 14 }) : /* @__PURE__ */ n.jsx(Dn, { size: 14 })
|
|
3013
3022
|
}
|
|
3014
3023
|
) })
|
|
3015
3024
|
] }),
|
|
3016
3025
|
/* @__PURE__ */ n.jsx(
|
|
3017
|
-
|
|
3026
|
+
I,
|
|
3018
3027
|
{
|
|
3019
3028
|
type: "submit",
|
|
3020
|
-
variant:
|
|
3029
|
+
variant: B.isPending ? "destructive" : "default",
|
|
3021
3030
|
onClick: (h) => {
|
|
3022
|
-
|
|
3031
|
+
B.isPending && (J.current?.abort(
|
|
3023
3032
|
"Request cancelled by user"
|
|
3024
3033
|
), h.preventDefault());
|
|
3025
3034
|
},
|
|
3026
3035
|
className: "w-18",
|
|
3027
|
-
children:
|
|
3036
|
+
children: B.isPending ? "Cancel" : "Send"
|
|
3028
3037
|
}
|
|
3029
3038
|
)
|
|
3030
|
-
] })
|
|
3039
|
+
] }),
|
|
3031
3040
|
/* @__PURE__ */ n.jsxs("div", { className: "relative overflow-y-auto h-[80vh]", children: [
|
|
3032
|
-
|
|
3041
|
+
b.data?.length !== 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
3033
3042
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
3034
|
-
/* @__PURE__ */ n.jsx(
|
|
3043
|
+
/* @__PURE__ */ n.jsx(zn, { size: 16 }),
|
|
3035
3044
|
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Authentication" })
|
|
3036
3045
|
] }),
|
|
3037
|
-
/* @__PURE__ */ n.jsx(
|
|
3038
|
-
|
|
3046
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(
|
|
3047
|
+
Zt,
|
|
3039
3048
|
{
|
|
3040
3049
|
value: W,
|
|
3041
|
-
identities:
|
|
3042
|
-
setValue: (h) =>
|
|
3050
|
+
identities: b.data ?? [],
|
|
3051
|
+
setValue: (h) => ve("identity", h)
|
|
3043
3052
|
}
|
|
3044
3053
|
) })
|
|
3045
|
-
] })
|
|
3054
|
+
] }),
|
|
3046
3055
|
i.length > 0 && /* @__PURE__ */ n.jsxs(q, { defaultOpen: !0, children: [
|
|
3047
|
-
/* @__PURE__ */ n.jsxs(M, {
|
|
3048
|
-
/* @__PURE__ */ n.jsx(
|
|
3049
|
-
/* @__PURE__ */ n.jsx(G, { children: "Path Parameters" })
|
|
3056
|
+
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
3057
|
+
/* @__PURE__ */ n.jsx(Fn, { size: 16 }),
|
|
3058
|
+
/* @__PURE__ */ n.jsx(G, { className: "col-span-2", children: "Path Parameters" })
|
|
3050
3059
|
] }),
|
|
3051
|
-
/* @__PURE__ */ n.jsx(
|
|
3060
|
+
/* @__PURE__ */ n.jsx(V, { className: "CollapsibleContent", children: /* @__PURE__ */ n.jsx(Ur, { url: s, control: ce }) })
|
|
3052
3061
|
] }),
|
|
3053
|
-
/* @__PURE__ */ n.jsx(
|
|
3062
|
+
/* @__PURE__ */ n.jsx(Gr, { control: ce, schemaQueryParams: o }),
|
|
3054
3063
|
/* @__PURE__ */ n.jsx(
|
|
3055
|
-
|
|
3064
|
+
qr,
|
|
3056
3065
|
{
|
|
3057
|
-
control:
|
|
3066
|
+
control: ce,
|
|
3058
3067
|
schemaHeaders: r,
|
|
3059
|
-
lockedHeaders:
|
|
3068
|
+
lockedHeaders: ln?.headers
|
|
3060
3069
|
}
|
|
3061
3070
|
),
|
|
3062
|
-
|
|
3071
|
+
xn && /* @__PURE__ */ n.jsx(Ir, { content: c })
|
|
3063
3072
|
] }),
|
|
3064
3073
|
/* @__PURE__ */ n.jsx("div", { className: "w-full bg-muted-foreground/20" }),
|
|
3065
3074
|
/* @__PURE__ */ n.jsx(
|
|
3066
|
-
|
|
3075
|
+
ia,
|
|
3067
3076
|
{
|
|
3068
|
-
queryMutation:
|
|
3077
|
+
queryMutation: B,
|
|
3069
3078
|
showLongRunningWarning: D,
|
|
3079
|
+
isFinished: mn,
|
|
3080
|
+
progress: pn,
|
|
3070
3081
|
tip: /* @__PURE__ */ n.jsx("div", { className: "text-xs w-full", children: /* @__PURE__ */ n.jsxs("span", { className: "text-muted-foreground", children: [
|
|
3071
3082
|
"Press",
|
|
3072
3083
|
" ",
|
|
3073
|
-
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children:
|
|
3084
|
+
/* @__PURE__ */ n.jsx("kbd", { className: "text-foreground border rounded m-0.5 px-1 py-0.5 capitalize", children: on.join(" + ") }),
|
|
3074
3085
|
" ",
|
|
3075
3086
|
"to send a request"
|
|
3076
3087
|
] }) }),
|
|
@@ -3087,7 +3098,7 @@ const ea = (e) => Object.entries({
|
|
|
3087
3098
|
) })
|
|
3088
3099
|
}
|
|
3089
3100
|
);
|
|
3090
|
-
},
|
|
3101
|
+
}, da = ({
|
|
3091
3102
|
className: e,
|
|
3092
3103
|
size: t = 16
|
|
3093
3104
|
}) => /* @__PURE__ */ n.jsx(
|
|
@@ -3108,34 +3119,34 @@ const ea = (e) => Object.entries({
|
|
|
3108
3119
|
}
|
|
3109
3120
|
)
|
|
3110
3121
|
}
|
|
3111
|
-
),
|
|
3122
|
+
), ua = (e) => {
|
|
3112
3123
|
const [t, s] = k(!1);
|
|
3113
|
-
return /* @__PURE__ */ n.jsxs(
|
|
3114
|
-
/* @__PURE__ */ n.jsx(
|
|
3124
|
+
return /* @__PURE__ */ n.jsxs(Ee, { onOpenChange: (a) => s(a), children: [
|
|
3125
|
+
/* @__PURE__ */ n.jsx(rs, { asChild: !0, children: e.children ?? /* @__PURE__ */ n.jsxs(
|
|
3115
3126
|
"button",
|
|
3116
3127
|
{
|
|
3117
3128
|
type: "button",
|
|
3118
3129
|
className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-xs hover:bg-primary/80",
|
|
3119
3130
|
children: [
|
|
3120
3131
|
"Test",
|
|
3121
|
-
/* @__PURE__ */ n.jsx(
|
|
3132
|
+
/* @__PURE__ */ n.jsx(da, { size: 14 })
|
|
3122
3133
|
]
|
|
3123
3134
|
}
|
|
3124
3135
|
) }),
|
|
3125
3136
|
/* @__PURE__ */ n.jsxs(
|
|
3126
|
-
|
|
3137
|
+
ke,
|
|
3127
3138
|
{
|
|
3128
3139
|
className: "max-w-screen-xl w-full overflow-hidden p-0",
|
|
3129
3140
|
"aria-describedby": void 0,
|
|
3130
3141
|
showCloseButton: !0,
|
|
3131
3142
|
children: [
|
|
3132
|
-
/* @__PURE__ */ n.jsx(
|
|
3133
|
-
t && /* @__PURE__ */ n.jsx(
|
|
3143
|
+
/* @__PURE__ */ n.jsx(ss, { children: /* @__PURE__ */ n.jsx(De, { children: "Playground" }) }),
|
|
3144
|
+
t && /* @__PURE__ */ n.jsx(la, { ...e })
|
|
3134
3145
|
]
|
|
3135
3146
|
}
|
|
3136
3147
|
)
|
|
3137
3148
|
] });
|
|
3138
|
-
},
|
|
3149
|
+
}, ma = {
|
|
3139
3150
|
get: "green",
|
|
3140
3151
|
post: "blue",
|
|
3141
3152
|
put: "yellow",
|
|
@@ -3143,7 +3154,7 @@ const ea = (e) => Object.entries({
|
|
|
3143
3154
|
patch: "purple",
|
|
3144
3155
|
options: "gray",
|
|
3145
3156
|
head: "gray"
|
|
3146
|
-
},
|
|
3157
|
+
}, ht = ({
|
|
3147
3158
|
label: e,
|
|
3148
3159
|
path: t,
|
|
3149
3160
|
operations: s,
|
|
@@ -3166,21 +3177,21 @@ const ea = (e) => Object.entries({
|
|
|
3166
3177
|
to: `${t}#${o.slug}`,
|
|
3167
3178
|
badge: {
|
|
3168
3179
|
label: o.method,
|
|
3169
|
-
color:
|
|
3180
|
+
color: ma[o.method.toLowerCase()],
|
|
3170
3181
|
invert: !0
|
|
3171
3182
|
}
|
|
3172
3183
|
}))
|
|
3173
|
-
}),
|
|
3184
|
+
}), tn = jt(
|
|
3174
3185
|
void 0
|
|
3175
|
-
),
|
|
3176
|
-
const e =
|
|
3186
|
+
), Qa = tn.Provider, pa = () => {
|
|
3187
|
+
const e = ns(tn);
|
|
3177
3188
|
if (!e)
|
|
3178
3189
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
3179
3190
|
return e.config;
|
|
3180
|
-
},
|
|
3191
|
+
}, ft = (e) => ({
|
|
3181
3192
|
path: e.routePath,
|
|
3182
3193
|
async lazy() {
|
|
3183
|
-
const { OasProvider: t } = await import("./OasProvider-
|
|
3194
|
+
const { OasProvider: t } = await import("./OasProvider-CDAM3TB1.js");
|
|
3184
3195
|
return {
|
|
3185
3196
|
element: /* @__PURE__ */ n.jsx(
|
|
3186
3197
|
t,
|
|
@@ -3194,39 +3205,39 @@ const ea = (e) => Object.entries({
|
|
|
3194
3205
|
};
|
|
3195
3206
|
},
|
|
3196
3207
|
children: e.routes
|
|
3197
|
-
}),
|
|
3208
|
+
}), nn = ({
|
|
3198
3209
|
path: e,
|
|
3199
3210
|
tag: t,
|
|
3200
3211
|
untagged: s
|
|
3201
3212
|
}) => ({
|
|
3202
3213
|
path: e,
|
|
3203
3214
|
async lazy() {
|
|
3204
|
-
const { OperationList: a } = await import("./OperationList-
|
|
3215
|
+
const { OperationList: a } = await import("./OperationList-C9Hb9ql8.js");
|
|
3205
3216
|
return { element: /* @__PURE__ */ n.jsx(a, { tag: t, untagged: s }) };
|
|
3206
3217
|
}
|
|
3207
|
-
}),
|
|
3218
|
+
}), ha = ({
|
|
3208
3219
|
render: e,
|
|
3209
3220
|
path: t
|
|
3210
3221
|
}) => {
|
|
3211
|
-
const { type: s, input: a } =
|
|
3222
|
+
const { type: s, input: a } = pa(), { tag: r } = _n(), o = Un(), i = ir(an, { type: s, input: a }), {
|
|
3212
3223
|
data: { schema: l }
|
|
3213
|
-
} =
|
|
3224
|
+
} = Wn(i), c = l.tags.at(0);
|
|
3214
3225
|
return !r && c?.slug ? /* @__PURE__ */ n.jsx(
|
|
3215
|
-
|
|
3226
|
+
Mn,
|
|
3216
3227
|
{
|
|
3217
3228
|
to: {
|
|
3218
|
-
pathname:
|
|
3229
|
+
pathname: Gn(t, { tag: c.slug }),
|
|
3219
3230
|
search: o.search
|
|
3220
3231
|
}
|
|
3221
3232
|
}
|
|
3222
3233
|
) : r && l.tags.some((u) => u.slug === r) ? e(r) : null;
|
|
3223
|
-
},
|
|
3234
|
+
}, fa = ({ path: e }) => ({
|
|
3224
3235
|
path: e,
|
|
3225
3236
|
async lazy() {
|
|
3226
|
-
const { OperationList: t } = await import("./OperationList-
|
|
3237
|
+
const { OperationList: t } = await import("./OperationList-C9Hb9ql8.js");
|
|
3227
3238
|
return {
|
|
3228
3239
|
element: /* @__PURE__ */ n.jsx(
|
|
3229
|
-
|
|
3240
|
+
ha,
|
|
3230
3241
|
{
|
|
3231
3242
|
path: e,
|
|
3232
3243
|
render: (s) => /* @__PURE__ */ n.jsx(t, { tag: s })
|
|
@@ -3234,35 +3245,35 @@ const ea = (e) => Object.entries({
|
|
|
3234
3245
|
)
|
|
3235
3246
|
};
|
|
3236
3247
|
}
|
|
3237
|
-
}),
|
|
3248
|
+
}), sn = (e) => [
|
|
3238
3249
|
// Category without tagged operations
|
|
3239
|
-
|
|
3240
|
-
path:
|
|
3250
|
+
nn({
|
|
3251
|
+
path: E(e, Ge),
|
|
3241
3252
|
untagged: !0
|
|
3242
3253
|
}),
|
|
3243
3254
|
// Schema list route
|
|
3244
3255
|
{
|
|
3245
|
-
path:
|
|
3256
|
+
path: E(e, "~schemas"),
|
|
3246
3257
|
lazy: async () => {
|
|
3247
|
-
const { SchemaList: t } = await import("./SchemaList-
|
|
3258
|
+
const { SchemaList: t } = await import("./SchemaList-BAbh1BXO.js");
|
|
3248
3259
|
return { element: /* @__PURE__ */ n.jsx(t, {}) };
|
|
3249
3260
|
}
|
|
3250
3261
|
}
|
|
3251
|
-
],
|
|
3252
|
-
const s =
|
|
3262
|
+
], xa = (e, t) => {
|
|
3263
|
+
const s = E(e, t.at(0) ?? Ge);
|
|
3253
3264
|
return [
|
|
3254
3265
|
// Redirect to first tag on the index route
|
|
3255
|
-
{ index: !0, loader: () =>
|
|
3266
|
+
{ index: !0, loader: () => Bn(s) },
|
|
3256
3267
|
// Create routes for each tag
|
|
3257
3268
|
...t.map(
|
|
3258
|
-
(a) =>
|
|
3259
|
-
path:
|
|
3269
|
+
(a) => nn({
|
|
3270
|
+
path: E(e, a),
|
|
3260
3271
|
tag: a
|
|
3261
3272
|
})
|
|
3262
3273
|
),
|
|
3263
|
-
...
|
|
3274
|
+
...sn(e)
|
|
3264
3275
|
];
|
|
3265
|
-
},
|
|
3276
|
+
}, rn = (e) => e.type === "file" ? Object.keys(e.input) : [], ga = ({
|
|
3266
3277
|
basePath: e,
|
|
3267
3278
|
config: t,
|
|
3268
3279
|
client: s
|
|
@@ -3270,30 +3281,30 @@ const ea = (e) => Object.entries({
|
|
|
3270
3281
|
const a = t.tagPages;
|
|
3271
3282
|
if (!a)
|
|
3272
3283
|
return [
|
|
3273
|
-
|
|
3284
|
+
ft({
|
|
3274
3285
|
basePath: e,
|
|
3275
3286
|
routePath: e,
|
|
3276
3287
|
routes: [
|
|
3277
|
-
|
|
3278
|
-
...
|
|
3288
|
+
fa({ path: e + "/:tag?" }),
|
|
3289
|
+
...sn(e)
|
|
3279
3290
|
],
|
|
3280
3291
|
client: s,
|
|
3281
3292
|
config: t
|
|
3282
3293
|
})
|
|
3283
3294
|
];
|
|
3284
|
-
const r =
|
|
3295
|
+
const r = rn(t);
|
|
3285
3296
|
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((i) => {
|
|
3286
|
-
const l =
|
|
3287
|
-
return
|
|
3297
|
+
const l = E(e, i);
|
|
3298
|
+
return ft({
|
|
3288
3299
|
basePath: e,
|
|
3289
3300
|
version: i,
|
|
3290
3301
|
routePath: l,
|
|
3291
|
-
routes:
|
|
3302
|
+
routes: xa(l, a),
|
|
3292
3303
|
client: s,
|
|
3293
3304
|
config: t
|
|
3294
3305
|
});
|
|
3295
3306
|
});
|
|
3296
|
-
},
|
|
3307
|
+
}, an = xr(`
|
|
3297
3308
|
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
3298
3309
|
schema(input: $input, type: $type) {
|
|
3299
3310
|
tags {
|
|
@@ -3315,8 +3326,8 @@ const ea = (e) => Object.entries({
|
|
|
3315
3326
|
}
|
|
3316
3327
|
}
|
|
3317
3328
|
}
|
|
3318
|
-
`),
|
|
3319
|
-
const t =
|
|
3329
|
+
`), Ge = "~endpoints", Ja = (e) => {
|
|
3330
|
+
const t = E(e.path), s = new Os(e);
|
|
3320
3331
|
return {
|
|
3321
3332
|
getHead: () => {
|
|
3322
3333
|
if (e.type === "url" && !e.skipPreload)
|
|
@@ -3341,118 +3352,118 @@ const ea = (e) => Object.entries({
|
|
|
3341
3352
|
children: l,
|
|
3342
3353
|
...c
|
|
3343
3354
|
}) => {
|
|
3344
|
-
const u =
|
|
3355
|
+
const u = Xn();
|
|
3345
3356
|
if (!r)
|
|
3346
3357
|
throw new Error("Server is required");
|
|
3347
3358
|
return a && !u.isAuthenticated ? /* @__PURE__ */ n.jsxs(
|
|
3348
|
-
|
|
3359
|
+
se,
|
|
3349
3360
|
{
|
|
3350
3361
|
className: "gap-2 items-center",
|
|
3351
3362
|
variant: "outline",
|
|
3352
3363
|
onClick: u.login,
|
|
3353
3364
|
children: [
|
|
3354
3365
|
"Login to open in Playground ",
|
|
3355
|
-
/* @__PURE__ */ n.jsx(
|
|
3366
|
+
/* @__PURE__ */ n.jsx(qn, { size: 16 })
|
|
3356
3367
|
]
|
|
3357
3368
|
}
|
|
3358
3369
|
) : /* @__PURE__ */ n.jsx(
|
|
3359
|
-
|
|
3370
|
+
ua,
|
|
3360
3371
|
{
|
|
3361
3372
|
url: i ?? "/",
|
|
3362
3373
|
method: o ?? "get",
|
|
3363
3374
|
server: r,
|
|
3364
3375
|
...c,
|
|
3365
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3376
|
+
children: /* @__PURE__ */ n.jsx(se, { className: "gap-2 items-center", variant: "outline", children: l ?? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3366
3377
|
"Open in Playground ",
|
|
3367
|
-
/* @__PURE__ */ n.jsx(
|
|
3378
|
+
/* @__PURE__ */ n.jsx(Vn, { size: 16 })
|
|
3368
3379
|
] }) })
|
|
3369
3380
|
}
|
|
3370
3381
|
);
|
|
3371
3382
|
}
|
|
3372
3383
|
}),
|
|
3373
3384
|
getNavigation: async (a, r) => {
|
|
3374
|
-
if (!
|
|
3385
|
+
if (!rt({ path: t, end: !1 }, a))
|
|
3375
3386
|
return [];
|
|
3376
|
-
const o =
|
|
3387
|
+
const o = rt(
|
|
3377
3388
|
{ path: `${t}/:version?/:tag`, end: !0 },
|
|
3378
3389
|
a
|
|
3379
3390
|
);
|
|
3380
3391
|
try {
|
|
3381
|
-
const i = o?.params.version, l = i ??
|
|
3392
|
+
const i = o?.params.version, l = i ?? rn(e).at(0), { type: c } = e, u = c === "file" ? e.input[l] : e.input, d = zt(s, an, {
|
|
3382
3393
|
type: c,
|
|
3383
3394
|
input: u
|
|
3384
3395
|
}), p = await r.queryClient.ensureQueryData(d), f = p.schema.tags.flatMap((x) => {
|
|
3385
3396
|
if (!x.name || x.operations.length === 0) return [];
|
|
3386
|
-
const
|
|
3387
|
-
return
|
|
3397
|
+
const y = E(t, i, x.slug), b = x.extensions?.["x-zudoku-collapsed"] ?? !e.options?.expandAllTags, R = x.extensions?.["x-zudoku-collapsible"] ?? !0;
|
|
3398
|
+
return ht({
|
|
3388
3399
|
label: x.name,
|
|
3389
|
-
path:
|
|
3400
|
+
path: y,
|
|
3390
3401
|
operations: x.operations,
|
|
3391
|
-
collapsed:
|
|
3392
|
-
collapsible:
|
|
3402
|
+
collapsed: b,
|
|
3403
|
+
collapsible: R
|
|
3393
3404
|
});
|
|
3394
3405
|
}), m = p.schema.tags.find(
|
|
3395
3406
|
(x) => !x.name
|
|
3396
3407
|
)?.operations;
|
|
3397
3408
|
return m && f.push(
|
|
3398
|
-
|
|
3409
|
+
ht({
|
|
3399
3410
|
label: "Other endpoints",
|
|
3400
|
-
path:
|
|
3411
|
+
path: E(t, i, Ge),
|
|
3401
3412
|
operations: m,
|
|
3402
3413
|
collapsed: !e.options?.expandAllTags
|
|
3403
3414
|
})
|
|
3404
3415
|
), p.schema.components?.schemas?.length && f.push({
|
|
3405
3416
|
type: "link",
|
|
3406
3417
|
label: "Schemas",
|
|
3407
|
-
to:
|
|
3418
|
+
to: E(t, i, "~schemas")
|
|
3408
3419
|
}), f;
|
|
3409
3420
|
} catch {
|
|
3410
3421
|
return [];
|
|
3411
3422
|
}
|
|
3412
3423
|
},
|
|
3413
|
-
getRoutes: () =>
|
|
3424
|
+
getRoutes: () => ga({ basePath: t, config: e, client: s })
|
|
3414
3425
|
};
|
|
3415
3426
|
};
|
|
3416
3427
|
export {
|
|
3417
|
-
|
|
3418
|
-
|
|
3428
|
+
qs as A,
|
|
3429
|
+
Ds as B,
|
|
3419
3430
|
q as C,
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3431
|
+
Pt as D,
|
|
3432
|
+
an as E,
|
|
3433
|
+
Ja as F,
|
|
3434
|
+
Ha as G,
|
|
3435
|
+
Vs as L,
|
|
3436
|
+
Qa as O,
|
|
3437
|
+
ua as P,
|
|
3438
|
+
Es as Q,
|
|
3439
|
+
qt as S,
|
|
3429
3440
|
g as T,
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3441
|
+
Ge as U,
|
|
3442
|
+
ir as a,
|
|
3443
|
+
Ft as b,
|
|
3444
|
+
V as c,
|
|
3445
|
+
rn as d,
|
|
3446
|
+
Cr as e,
|
|
3447
|
+
Yt as f,
|
|
3448
|
+
xr as g,
|
|
3449
|
+
Qr as h,
|
|
3450
|
+
Ve as i,
|
|
3451
|
+
Vt as j,
|
|
3452
|
+
Be as k,
|
|
3453
|
+
te as l,
|
|
3454
|
+
ar as m,
|
|
3455
|
+
kt as n,
|
|
3456
|
+
dt as o,
|
|
3457
|
+
Ma as p,
|
|
3458
|
+
Bs as q,
|
|
3459
|
+
qe as r,
|
|
3449
3460
|
$ as s,
|
|
3450
3461
|
Et as t,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3462
|
+
pa as u,
|
|
3463
|
+
Rs as v,
|
|
3464
|
+
rr as w,
|
|
3465
|
+
we as x,
|
|
3466
|
+
Ps as y,
|
|
3467
|
+
Ga as z
|
|
3457
3468
|
};
|
|
3458
|
-
//# sourceMappingURL=index-
|
|
3469
|
+
//# sourceMappingURL=index-B6Re5_cx.js.map
|