zudoku 0.37.0 → 0.38.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/main.js +2 -0
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/common.d.ts +287 -18
- package/dist/config/validators/common.js +2 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +107 -7
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/providers/clerk.js +19 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -0
- package/dist/lib/authentication/providers/openid.js +5 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +5 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +0 -26
- package/dist/lib/authentication/state.js +1 -16
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Layout.js +5 -3
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Zudoku.js +3 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +7 -0
- package/dist/lib/core/ZudokuContext.js +8 -3
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +8 -6
- package/dist/lib/plugins/markdown/MdxPage.js +2 -8
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +29 -5
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +26 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -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/plugins/openapi/state.d.ts +25 -0
- package/dist/lib/plugins/openapi/state.js +18 -0
- package/dist/lib/plugins/openapi/state.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +13 -4
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +19 -12
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +8 -1
- package/dist/lib/plugins/search-pagefind/get-results.js +9 -4
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +2 -8
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/types.d.ts +7 -0
- package/dist/lib/util/types.js +2 -0
- package/dist/lib/util/types.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +18 -12
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +1 -1
- package/dist/vite/api/schema-codegen.js +8 -4
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/plugin-api.js +5 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{AuthenticationPlugin-Cij2tPWa.js → AuthenticationPlugin-Duy_R1TU.js} +3 -3
- package/lib/{AuthenticationPlugin-Cij2tPWa.js.map → AuthenticationPlugin-Duy_R1TU.js.map} +1 -1
- package/lib/{Markdown-DT5Rrq8_.js → Markdown-DIZ8nBVC.js} +742 -738
- package/lib/{Markdown-DT5Rrq8_.js.map → Markdown-DIZ8nBVC.js.map} +1 -1
- package/lib/{MdxPage-D2rD1vC4.js → MdxPage-JEdbfW-f.js} +42 -47
- package/lib/MdxPage-JEdbfW-f.js.map +1 -0
- package/lib/{OasProvider-DdEBf2qS.js → OasProvider-D1A10JeA.js} +4 -4
- package/lib/{OasProvider-DdEBf2qS.js.map → OasProvider-D1A10JeA.js.map} +1 -1
- package/lib/{OperationList-DT4-gm_S.js → OperationList-yOmYzMIp.js} +1128 -1112
- package/lib/OperationList-yOmYzMIp.js.map +1 -0
- package/lib/{Select-z1Lwl0-J.js → Select-fAYcJ0OU.js} +8 -8
- package/lib/{Select-z1Lwl0-J.js.map → Select-fAYcJ0OU.js.map} +1 -1
- package/lib/{SlotletProvider-D8OBnr77.js → SlotletProvider-BEwNY8q0.js} +4 -4
- package/lib/{SlotletProvider-D8OBnr77.js.map → SlotletProvider-BEwNY8q0.js.map} +1 -1
- package/lib/{chunk-HA7DTUK3-ZGg2W6yV.js → chunk-HA7DTUK3-C4gP41vD.js} +5 -5
- package/lib/{chunk-HA7DTUK3-ZGg2W6yV.js.map → chunk-HA7DTUK3-C4gP41vD.js.map} +1 -1
- package/lib/hook-Cge6LiTK.js +1483 -0
- package/lib/hook-Cge6LiTK.js.map +1 -0
- package/lib/{index-DdQSV2RF.js → index-B0y3fTg-.js} +261 -243
- package/lib/index-B0y3fTg-.js.map +1 -0
- package/lib/{mutation-_Z5C2wFZ.js → mutation-EChriCeF.js} +2 -2
- package/lib/{mutation-_Z5C2wFZ.js.map → mutation-EChriCeF.js.map} +1 -1
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/{useExposedProps-BslIn-FE.js → useExposedProps-B9qXJedG.js} +2 -2
- package/lib/{useExposedProps-BslIn-FE.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +59 -41
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +76 -73
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +370 -354
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +23 -24
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +133 -98
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +2 -2
- package/src/app/main.tsx +2 -0
- package/src/lib/authentication/authentication.ts +2 -0
- package/src/lib/authentication/providers/clerk.tsx +20 -0
- package/src/lib/authentication/providers/openid.tsx +6 -0
- package/src/lib/authentication/providers/supabase.tsx +6 -0
- package/src/lib/authentication/state.ts +1 -35
- package/src/lib/components/Layout.tsx +14 -2
- package/src/lib/components/Zudoku.tsx +5 -2
- package/src/lib/core/ZudokuContext.ts +13 -6
- package/src/lib/core/plugins.ts +9 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -8
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +36 -7
- package/src/lib/plugins/openapi/interfaces.ts +29 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +2 -1
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +26 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +59 -47
- package/src/lib/plugins/search-pagefind/get-results.tsx +31 -10
- package/src/lib/util/traverse.ts +2 -6
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/useScrollToAnchor.ts +20 -12
- package/lib/MdxPage-D2rD1vC4.js.map +0 -1
- package/lib/OperationList-DT4-gm_S.js.map +0 -1
- package/lib/hook-DzQC8PzJ.js +0 -355
- package/lib/hook-DzQC8PzJ.js.map +0 -1
- package/lib/index-DdQSV2RF.js.map +0 -1
- package/lib/joinUrl-BjDooT-T.js +0 -1154
- package/lib/joinUrl-BjDooT-T.js.map +0 -1
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
import { j as u } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { b as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { I as fo, c as it, M as Le, H as He, P as ze } from "./Markdown-DT5Rrq8_.js";
|
|
2
|
+
import { b as Tr, u as Bo, m as Ho, M as Mo } from "./hook-Cge6LiTK.js";
|
|
3
|
+
import { H as zo } from "./index.esm-CltAN0Tf.js";
|
|
4
|
+
import { ChevronsUpDownIcon as ao, CheckIcon as Go, CopyIcon as Wo, ChevronsLeftRightIcon as Jo, ChevronUpIcon as Vo, ChevronDownIcon as io, UnfoldVerticalIcon as Do, FoldVerticalIcon as Ko, CircleIcon as Qo, CircleDotIcon as Yo, CircleFadingPlusIcon as Xo, SquareMinusIcon as Zo, SquarePlusIcon as ea, MinusIcon as ta, PlusIcon as ra, RefreshCcwDotIcon as na, ChevronsDownUpIcon as oa } from "lucide-react";
|
|
5
|
+
import { b as aa, a as ia } from "./chunk-HA7DTUK3-C4gP41vD.js";
|
|
6
|
+
import { a as Ve, u as Pr, C as so, b as lo, c as co, d as xr, P as sa, m as uo, e as la } from "./index-B0y3fTg-.js";
|
|
7
|
+
import { S as ca, a as ua, b as fa, c as pa, e as da } from "./Select-fAYcJ0OU.js";
|
|
8
|
+
import { C as ha } from "./CategoryHeading-DpB47wvk.js";
|
|
9
|
+
import { I as fo, c as it, M as Le, H as He, P as ze } from "./Markdown-DIZ8nBVC.js";
|
|
11
10
|
import { c as se } from "./cn-qaFjX9_3.js";
|
|
12
|
-
import { useContext as
|
|
11
|
+
import { useContext as ya, useTransition as po, useState as he, isValidElement as ma, useRef as ho, useEffect as Cr, useLayoutEffect as ga, useMemo as yo, useCallback as va } from "react";
|
|
13
12
|
import { Button as mo } from "./ui/Button.js";
|
|
14
|
-
import { a as
|
|
15
|
-
import { i as
|
|
13
|
+
import { a as ba, u as Nr } from "./context-DLCwaMXN.js";
|
|
14
|
+
import { i as xa, S as ja, L as $a, T as bt, a as wa, p as Sa, C as Oa } from "./circular-ByJI6Mci.js";
|
|
16
15
|
import { VisuallyHidden as jr } from "@radix-ui/react-visually-hidden";
|
|
17
|
-
import { c as
|
|
18
|
-
import { Tabs as
|
|
19
|
-
import { Card as ve, CardHeader as
|
|
16
|
+
import { c as Ta } from "./index-CPNSgwSb.js";
|
|
17
|
+
import { Tabs as Pa, TabsList as Ca, TabsTrigger as Na, TabsContent as ka } from "./ui/Tabs.js";
|
|
18
|
+
import { Card as ve, CardHeader as qa, CardTitle as Ra, CardContent as Ea } from "./ui/Card.js";
|
|
20
19
|
import { B as $r } from "./Button-Fp19CMUr.js";
|
|
21
|
-
import { g as
|
|
20
|
+
import { g as Aa, c as rt, a as Ia } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
21
|
+
import { useAuth as La, useZudoku as Ua } from "./zudoku.components.js";
|
|
22
22
|
import { S as go } from "./SyntaxHighlight-BEoSoPEo.js";
|
|
23
|
-
import { useAuth as Ia } from "./zudoku.components.js";
|
|
24
23
|
import * as et from "@radix-ui/react-tabs";
|
|
25
24
|
import * as xe from "@radix-ui/react-collapsible";
|
|
26
|
-
import { o as
|
|
27
|
-
function
|
|
25
|
+
import { o as Fa } from "./objectEntries-BS7aAgOm.js";
|
|
26
|
+
function _a(e, r) {
|
|
28
27
|
return r;
|
|
29
28
|
}
|
|
30
|
-
function
|
|
31
|
-
const r =
|
|
29
|
+
function Ba(e) {
|
|
30
|
+
const r = xa(e) ? e : new ja(e), t = r.body, o = new $a(r);
|
|
32
31
|
let i = "", s = !1;
|
|
33
32
|
for (; o.advance().kind !== bt.EOF; ) {
|
|
34
|
-
const n = o.token, a = n.kind, l =
|
|
33
|
+
const n = o.token, a = n.kind, l = !wa(n.kind);
|
|
35
34
|
s && (l || n.kind === bt.SPREAD) && (i += " ");
|
|
36
35
|
const c = t.slice(n.start, n.end);
|
|
37
|
-
a === bt.BLOCK_STRING ? i +=
|
|
36
|
+
a === bt.BLOCK_STRING ? i += Sa(n.value, {
|
|
38
37
|
minimize: !0
|
|
39
38
|
}) : i += c, s = l;
|
|
40
39
|
}
|
|
41
40
|
return i;
|
|
42
41
|
}
|
|
43
42
|
const nt = (e, ...r) => {
|
|
44
|
-
const t =
|
|
43
|
+
const t = ya(ba);
|
|
45
44
|
if (t === void 0)
|
|
46
45
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
47
46
|
return {
|
|
48
47
|
queryFn: () => t.fetch(e, ...r),
|
|
49
|
-
queryKey: [
|
|
48
|
+
queryKey: [Ba(e.toString()), r[0]]
|
|
50
49
|
};
|
|
51
50
|
}, ot = ({
|
|
52
51
|
value: e,
|
|
@@ -78,7 +77,7 @@ const nt = (e, ...r) => {
|
|
|
78
77
|
children: /* @__PURE__ */ u.jsx(ao, { size: 14 })
|
|
79
78
|
}
|
|
80
79
|
)
|
|
81
|
-
] }),
|
|
80
|
+
] }), Ha = Ve(
|
|
82
81
|
/* GraphQL */
|
|
83
82
|
`
|
|
84
83
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -102,11 +101,11 @@ const nt = (e, ...r) => {
|
|
|
102
101
|
},
|
|
103
102
|
variant: "ghost",
|
|
104
103
|
size: "icon",
|
|
105
|
-
children: r ? /* @__PURE__ */ u.jsx(
|
|
104
|
+
children: r ? /* @__PURE__ */ u.jsx(Go, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ u.jsx(Wo, { size: 14, strokeWidth: 1.3 })
|
|
106
105
|
}
|
|
107
106
|
);
|
|
108
|
-
},
|
|
109
|
-
const { input: e, type: r } = Nr(), t = nt(
|
|
107
|
+
}, Ma = () => {
|
|
108
|
+
const { input: e, type: r } = Nr(), t = nt(Ha, { input: e, type: r }), o = Tr(t), [, i] = po(), { selectedServer: s, setSelectedServer: n } = Pr(
|
|
110
109
|
o.data.schema.servers
|
|
111
110
|
), { servers: a } = o.data.schema;
|
|
112
111
|
if (a.length === 0) return null;
|
|
@@ -132,7 +131,7 @@ const nt = (e, ...r) => {
|
|
|
132
131
|
),
|
|
133
132
|
/* @__PURE__ */ u.jsx(Wr, { url: s })
|
|
134
133
|
] });
|
|
135
|
-
},
|
|
134
|
+
}, za = Ta(
|
|
136
135
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
137
136
|
{
|
|
138
137
|
variants: {
|
|
@@ -149,8 +148,8 @@ const nt = (e, ...r) => {
|
|
|
149
148
|
}
|
|
150
149
|
}
|
|
151
150
|
);
|
|
152
|
-
function
|
|
153
|
-
return /* @__PURE__ */ u.jsx("div", { className: se(
|
|
151
|
+
function Ga({ className: e, variant: r, ...t }) {
|
|
152
|
+
return /* @__PURE__ */ u.jsx("div", { className: se(za({ variant: r }), e), ...t });
|
|
154
153
|
}
|
|
155
154
|
const vo = (e, r) => e.reduce(
|
|
156
155
|
(t, o) => {
|
|
@@ -158,7 +157,7 @@ const vo = (e, r) => e.reduce(
|
|
|
158
157
|
return t[i] || (t[i] = []), t[i].push(o), t;
|
|
159
158
|
},
|
|
160
159
|
{}
|
|
161
|
-
),
|
|
160
|
+
), Wa = (e, r) => e ? r(e) : void 0, Ja = ({ pattern: e }) => {
|
|
162
161
|
const [r, t] = he(!1), o = e.length > 20, i = o ? `${e.slice(0, 20)}…` : e;
|
|
163
162
|
return /* @__PURE__ */ u.jsxs(
|
|
164
163
|
fo,
|
|
@@ -168,11 +167,11 @@ const vo = (e, r) => e.reduce(
|
|
|
168
167
|
selectOnClick: !1,
|
|
169
168
|
children: [
|
|
170
169
|
r ? e : i,
|
|
171
|
-
o && /* @__PURE__ */ u.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ u.jsx(
|
|
170
|
+
o && /* @__PURE__ */ u.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ u.jsx(Jo, { size: 12 }) })
|
|
172
171
|
]
|
|
173
172
|
}
|
|
174
173
|
);
|
|
175
|
-
},
|
|
174
|
+
}, Va = (e) => e ? [
|
|
176
175
|
e.type === "array" && e.items.type ? `${e.items.type}[]` : Array.isArray(e.type) ? e.type.join(" | ") : e.type,
|
|
177
176
|
e.enum && "enum",
|
|
178
177
|
e.format,
|
|
@@ -190,15 +189,15 @@ const vo = (e, r) => e.reduce(
|
|
|
190
189
|
e.deprecated && "deprecated",
|
|
191
190
|
e.pattern && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
192
191
|
"pattern: ",
|
|
193
|
-
/* @__PURE__ */ u.jsx(
|
|
192
|
+
/* @__PURE__ */ u.jsx(Ja, { pattern: e.pattern })
|
|
194
193
|
] })
|
|
195
194
|
] : [], we = ({
|
|
196
195
|
schema: e,
|
|
197
196
|
extraItems: r = [],
|
|
198
197
|
className: t
|
|
199
198
|
}) => {
|
|
200
|
-
const o = [...
|
|
201
|
-
(i) => typeof i == "string" ||
|
|
199
|
+
const o = [...Va(e), ...r].flatMap(
|
|
200
|
+
(i) => typeof i == "string" || ma(i) ? i : []
|
|
202
201
|
);
|
|
203
202
|
return /* @__PURE__ */ u.jsx("span", { className: t, children: o.map((i, s) => /* @__PURE__ */ u.jsxs("span", { className: "text-muted-foreground", children: [
|
|
204
203
|
i,
|
|
@@ -223,7 +222,7 @@ const vo = (e, r) => e.reduce(
|
|
|
223
222
|
className: "h-fit px-0",
|
|
224
223
|
onClick: () => i(!o),
|
|
225
224
|
children: o ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
226
|
-
/* @__PURE__ */ u.jsx(
|
|
225
|
+
/* @__PURE__ */ u.jsx(Vo, { size: 12 }),
|
|
227
226
|
/* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: "show less" })
|
|
228
227
|
] }) : /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
229
228
|
/* @__PURE__ */ u.jsx(io, { size: 12 }),
|
|
@@ -236,14 +235,14 @@ const vo = (e, r) => e.reduce(
|
|
|
236
235
|
}
|
|
237
236
|
)
|
|
238
237
|
] });
|
|
239
|
-
},
|
|
238
|
+
}, Da = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
240
239
|
type: "string"
|
|
241
|
-
},
|
|
240
|
+
}, Ka = ({
|
|
242
241
|
parameter: e,
|
|
243
242
|
group: r,
|
|
244
243
|
id: t
|
|
245
244
|
}) => {
|
|
246
|
-
const o =
|
|
245
|
+
const o = Da(e);
|
|
247
246
|
return /* @__PURE__ */ u.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
|
|
248
247
|
/* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
249
248
|
/* @__PURE__ */ u.jsx(it, { asChild: !0, children: /* @__PURE__ */ u.jsx("code", { children: r === "path" ? /* @__PURE__ */ u.jsx(
|
|
@@ -276,7 +275,7 @@ const vo = (e, r) => e.reduce(
|
|
|
276
275
|
),
|
|
277
276
|
o.type === "array" && o.items.enum ? /* @__PURE__ */ u.jsx(Ne, { values: o.items.enum }) : o.enum && /* @__PURE__ */ u.jsx(Ne, { values: o.enum })
|
|
278
277
|
] });
|
|
279
|
-
},
|
|
278
|
+
}, Qa = ({
|
|
280
279
|
summary: e,
|
|
281
280
|
group: r,
|
|
282
281
|
parameters: t,
|
|
@@ -290,7 +289,7 @@ const vo = (e, r) => e.reduce(
|
|
|
290
289
|
r === "header" ? "Headers" : `${r} Parameters`
|
|
291
290
|
] }),
|
|
292
291
|
/* @__PURE__ */ u.jsx(ve, { children: /* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((i, s) => i.required === s.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ u.jsx(
|
|
293
|
-
|
|
292
|
+
Ka,
|
|
294
293
|
{
|
|
295
294
|
parameter: i,
|
|
296
295
|
id: o,
|
|
@@ -325,51 +324,51 @@ var Jr = (e, r) => {
|
|
|
325
324
|
}, this.indentationCharacter = e || Vr, this.lineJoin = r ?? Dr;
|
|
326
325
|
}
|
|
327
326
|
}, xt, Kr;
|
|
328
|
-
function
|
|
327
|
+
function Ya() {
|
|
329
328
|
return Kr || (Kr = 1, xt = function(e) {
|
|
330
329
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
331
330
|
}), xt;
|
|
332
331
|
}
|
|
333
332
|
var jt, Qr;
|
|
334
|
-
function
|
|
333
|
+
function Xa() {
|
|
335
334
|
return Qr || (Qr = 1, jt = function(e) {
|
|
336
335
|
var r = typeof e;
|
|
337
336
|
return e !== null && (r === "object" || r === "function");
|
|
338
337
|
}), jt;
|
|
339
338
|
}
|
|
340
339
|
var Ze = {}, Yr;
|
|
341
|
-
function
|
|
340
|
+
function Za() {
|
|
342
341
|
return Yr || (Yr = 1, Object.defineProperty(Ze, "__esModule", { value: !0 }), Ze.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ze;
|
|
343
342
|
}
|
|
344
343
|
var $t, Xr;
|
|
345
|
-
function
|
|
344
|
+
function ei() {
|
|
346
345
|
if (Xr) return $t;
|
|
347
346
|
Xr = 1;
|
|
348
|
-
const e =
|
|
347
|
+
const e = Ya(), r = Xa(), t = Za().default;
|
|
349
348
|
return $t = (o, i, s) => {
|
|
350
349
|
const n = [];
|
|
351
|
-
return function a(l, c,
|
|
352
|
-
c = c || {}, c.indent = c.indent || " ",
|
|
350
|
+
return function a(l, c, p) {
|
|
351
|
+
c = c || {}, c.indent = c.indent || " ", p = p || "";
|
|
353
352
|
let g;
|
|
354
353
|
c.inlineCharacterLimit === void 0 ? g = {
|
|
355
354
|
newLine: `
|
|
356
355
|
`,
|
|
357
356
|
newLineOrSpace: `
|
|
358
357
|
`,
|
|
359
|
-
pad:
|
|
360
|
-
indent:
|
|
358
|
+
pad: p,
|
|
359
|
+
indent: p + c.indent
|
|
361
360
|
} : g = {
|
|
362
361
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
363
362
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
364
363
|
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
365
364
|
indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
|
|
366
365
|
};
|
|
367
|
-
const
|
|
366
|
+
const v = (m) => {
|
|
368
367
|
if (c.inlineCharacterLimit === void 0)
|
|
369
368
|
return m;
|
|
370
369
|
const j = m.replace(new RegExp(g.newLine, "g"), "").replace(new RegExp(g.newLineOrSpace, "g"), " ").replace(new RegExp(g.pad + "|" + g.indent, "g"), "");
|
|
371
370
|
return j.length <= c.inlineCharacterLimit ? j : m.replace(new RegExp(g.newLine + "|" + g.newLineOrSpace, "g"), `
|
|
372
|
-
`).replace(new RegExp(g.pad, "g"),
|
|
371
|
+
`).replace(new RegExp(g.pad, "g"), p).replace(new RegExp(g.indent, "g"), p + c.indent);
|
|
373
372
|
};
|
|
374
373
|
if (n.indexOf(l) !== -1)
|
|
375
374
|
return '"[Circular]"';
|
|
@@ -381,38 +380,38 @@ function Xa() {
|
|
|
381
380
|
if (l.length === 0)
|
|
382
381
|
return "[]";
|
|
383
382
|
n.push(l);
|
|
384
|
-
const m = "[" + g.newLine + l.map((j,
|
|
385
|
-
const
|
|
386
|
-
let h = a(j, c,
|
|
387
|
-
return c.transform && (h = c.transform(l,
|
|
383
|
+
const m = "[" + g.newLine + l.map((j, b) => {
|
|
384
|
+
const f = l.length - 1 === b ? g.newLine : "," + g.newLineOrSpace;
|
|
385
|
+
let h = a(j, c, p + c.indent);
|
|
386
|
+
return c.transform && (h = c.transform(l, b, h)), g.indent + h + f;
|
|
388
387
|
}).join("") + g.pad + "]";
|
|
389
|
-
return n.pop(),
|
|
388
|
+
return n.pop(), v(m);
|
|
390
389
|
}
|
|
391
390
|
if (r(l)) {
|
|
392
391
|
let m = Object.keys(l).concat(t(l));
|
|
393
|
-
if (c.filter && (m = m.filter((
|
|
392
|
+
if (c.filter && (m = m.filter((b) => c.filter(l, b))), m.length === 0)
|
|
394
393
|
return "{}";
|
|
395
394
|
n.push(l);
|
|
396
|
-
const j = "{" + g.newLine + m.map((
|
|
397
|
-
const h = m.length - 1 ===
|
|
398
|
-
let d = a(l[
|
|
399
|
-
return c.transform && (d = c.transform(l,
|
|
395
|
+
const j = "{" + g.newLine + m.map((b, f) => {
|
|
396
|
+
const h = m.length - 1 === f ? g.newLine : "," + g.newLineOrSpace, y = typeof b == "symbol", S = !y && /^[a-z$_][a-z$_0-9]*$/i.test(b), T = y || S ? b : a(b, c);
|
|
397
|
+
let d = a(l[b], c, p + c.indent);
|
|
398
|
+
return c.transform && (d = c.transform(l, b, d)), g.indent + String(T) + ": " + d + h;
|
|
400
399
|
}).join("") + g.pad + "}";
|
|
401
|
-
return n.pop(),
|
|
400
|
+
return n.pop(), v(j);
|
|
402
401
|
}
|
|
403
402
|
return l = String(l).replace(/[\r\n]/g, (m) => m === `
|
|
404
403
|
` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (l = l.replace(/"/g, '\\"'), `"${l}"`) : (l = l.replace(/\\?'/g, "\\'"), `'${l}'`);
|
|
405
404
|
}(o, i, s);
|
|
406
405
|
}, $t;
|
|
407
406
|
}
|
|
408
|
-
var
|
|
409
|
-
const fe = /* @__PURE__ */
|
|
407
|
+
var ti = ei();
|
|
408
|
+
const fe = /* @__PURE__ */ Aa(ti);
|
|
410
409
|
function Ge(e, r = {}) {
|
|
411
410
|
const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: i = !0 } = r;
|
|
412
411
|
return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
|
|
413
412
|
` ? i ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? i ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
|
|
414
413
|
}
|
|
415
|
-
var We = (e) => Ge(e, { delimiter: "'" }), ce = (e) => Ge(e, { delimiter: '"' }),
|
|
414
|
+
var We = (e) => Ge(e, { delimiter: "'" }), ce = (e) => Ge(e, { delimiter: '"' }), ri = {
|
|
416
415
|
info: {
|
|
417
416
|
key: "libcurl",
|
|
418
417
|
title: "Libcurl",
|
|
@@ -428,7 +427,7 @@ var We = (e) => Ge(e, { delimiter: "'" }), ce = (e) => Ge(e, { delimiter: '"' })
|
|
|
428
427
|
s(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
|
|
429
428
|
}), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), i.text && (n(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(i.text)});`)), n(), s("CURLcode ret = curl_easy_perform(hnd);"), a();
|
|
430
429
|
}
|
|
431
|
-
},
|
|
430
|
+
}, ni = {
|
|
432
431
|
info: {
|
|
433
432
|
key: "c",
|
|
434
433
|
title: "C",
|
|
@@ -436,19 +435,19 @@ var We = (e) => Ge(e, { delimiter: "'" }), ce = (e) => Ge(e, { delimiter: '"' })
|
|
|
436
435
|
cli: "c"
|
|
437
436
|
},
|
|
438
437
|
clientsById: {
|
|
439
|
-
libcurl:
|
|
438
|
+
libcurl: ri
|
|
440
439
|
}
|
|
441
440
|
}, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), be = (e, r) => {
|
|
442
441
|
const t = pe(e, r);
|
|
443
442
|
if (t)
|
|
444
443
|
return e[t];
|
|
445
|
-
}, st = (e, r) => !!pe(e, r),
|
|
444
|
+
}, st = (e, r) => !!pe(e, r), oi = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
446
445
|
(r) => e.indexOf(r) > -1
|
|
447
446
|
), Zr = class {
|
|
448
447
|
constructor(e) {
|
|
449
448
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
450
449
|
}
|
|
451
|
-
},
|
|
450
|
+
}, ai = class {
|
|
452
451
|
constructor(e) {
|
|
453
452
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
454
453
|
}
|
|
@@ -485,7 +484,7 @@ ${t}`);
|
|
|
485
484
|
default:
|
|
486
485
|
return e.toString();
|
|
487
486
|
}
|
|
488
|
-
},
|
|
487
|
+
}, ii = {
|
|
489
488
|
info: {
|
|
490
489
|
key: "clj_http",
|
|
491
490
|
title: "clj-http",
|
|
@@ -505,35 +504,35 @@ ${t}`);
|
|
|
505
504
|
case "application/json":
|
|
506
505
|
{
|
|
507
506
|
c["content-type"] = new Zr("json"), c["form-params"] = t.jsonObj;
|
|
508
|
-
const
|
|
509
|
-
|
|
507
|
+
const p = pe(c.headers, "content-type");
|
|
508
|
+
p && delete c.headers[p];
|
|
510
509
|
}
|
|
511
510
|
break;
|
|
512
511
|
case "application/x-www-form-urlencoded":
|
|
513
512
|
{
|
|
514
513
|
c["form-params"] = t.paramsObj;
|
|
515
|
-
const
|
|
516
|
-
|
|
514
|
+
const p = pe(c.headers, "content-type");
|
|
515
|
+
p && delete c.headers[p];
|
|
517
516
|
}
|
|
518
517
|
break;
|
|
519
518
|
case "text/plain":
|
|
520
519
|
{
|
|
521
520
|
c.body = t.text;
|
|
522
|
-
const
|
|
523
|
-
|
|
521
|
+
const p = pe(c.headers, "content-type");
|
|
522
|
+
p && delete c.headers[p];
|
|
524
523
|
}
|
|
525
524
|
break;
|
|
526
525
|
case "multipart/form-data": {
|
|
527
526
|
if (t.params) {
|
|
528
527
|
c.multipart = t.params.map((g) => g.fileName && !g.value ? {
|
|
529
528
|
name: g.name,
|
|
530
|
-
content: new
|
|
529
|
+
content: new ai(g.fileName)
|
|
531
530
|
} : {
|
|
532
531
|
name: g.name,
|
|
533
532
|
content: g.value
|
|
534
533
|
});
|
|
535
|
-
const
|
|
536
|
-
|
|
534
|
+
const p = pe(c.headers, "content-type");
|
|
535
|
+
p && delete c.headers[p];
|
|
537
536
|
}
|
|
538
537
|
break;
|
|
539
538
|
}
|
|
@@ -542,8 +541,8 @@ ${t}`);
|
|
|
542
541
|
case "application/json":
|
|
543
542
|
{
|
|
544
543
|
c.accept = new Zr("json");
|
|
545
|
-
const
|
|
546
|
-
|
|
544
|
+
const p = pe(c.headers, "accept");
|
|
545
|
+
p && delete c.headers[p];
|
|
547
546
|
}
|
|
548
547
|
break;
|
|
549
548
|
}
|
|
@@ -551,21 +550,21 @@ ${t}`);
|
|
|
551
550
|
`), xo(en(c)))
|
|
552
551
|
n(`(client/${r} "${o}")`);
|
|
553
552
|
else {
|
|
554
|
-
const
|
|
553
|
+
const p = 11 + r.length + o.length, g = tt(p, wr(en(c)));
|
|
555
554
|
n(`(client/${r} "${o}" ${g})`);
|
|
556
555
|
}
|
|
557
556
|
return a();
|
|
558
557
|
}
|
|
559
|
-
},
|
|
558
|
+
}, si = {
|
|
560
559
|
info: {
|
|
561
560
|
key: "clojure",
|
|
562
561
|
title: "Clojure",
|
|
563
562
|
default: "clj_http"
|
|
564
563
|
},
|
|
565
564
|
clientsById: {
|
|
566
|
-
clj_http:
|
|
565
|
+
clj_http: ii
|
|
567
566
|
}
|
|
568
|
-
},
|
|
567
|
+
}, li = (e) => {
|
|
569
568
|
let r = be(e, "accept-encoding");
|
|
570
569
|
if (!r)
|
|
571
570
|
return [];
|
|
@@ -582,7 +581,7 @@ ${t}`);
|
|
|
582
581
|
}
|
|
583
582
|
});
|
|
584
583
|
}), o;
|
|
585
|
-
},
|
|
584
|
+
}, ci = {
|
|
586
585
|
info: {
|
|
587
586
|
key: "httpclient",
|
|
588
587
|
title: "HttpClient",
|
|
@@ -598,12 +597,12 @@ ${t}`);
|
|
|
598
597
|
}, { push: n, join: a } = new V({ indent: s.indent });
|
|
599
598
|
n("using System.Net.Http.Headers;");
|
|
600
599
|
let l = "";
|
|
601
|
-
const c = !!e.cookie,
|
|
602
|
-
(c ||
|
|
600
|
+
const c = !!e.cookie, p = li(e);
|
|
601
|
+
(c || p.length) && (l = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), p.length && n(`AutomaticDecompression = ${p.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${l});`), n("var request = new HttpRequestMessage"), n("{");
|
|
603
602
|
const g = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
604
603
|
t = t.toUpperCase(), t && g.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
|
|
605
|
-
const
|
|
606
|
-
switch (
|
|
604
|
+
const v = Object.keys(e).filter((b) => {
|
|
605
|
+
switch (b.toLowerCase()) {
|
|
607
606
|
case "content-type":
|
|
608
607
|
case "content-length":
|
|
609
608
|
case "accept-encoding":
|
|
@@ -612,33 +611,33 @@ ${t}`);
|
|
|
612
611
|
return !0;
|
|
613
612
|
}
|
|
614
613
|
});
|
|
615
|
-
if (
|
|
616
|
-
n(`{ "${
|
|
614
|
+
if (v.length && (n("Headers =", 1), n("{", 1), v.forEach((b) => {
|
|
615
|
+
n(`{ "${b}", "${ce(e[b])}" },`, 2);
|
|
617
616
|
}), n("},", 1)), r.text) {
|
|
618
|
-
const
|
|
619
|
-
switch (
|
|
617
|
+
const b = r.mimeType;
|
|
618
|
+
switch (b) {
|
|
620
619
|
case "application/x-www-form-urlencoded":
|
|
621
|
-
n("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), n("{", 1), (m = r.params) == null || m.forEach((
|
|
622
|
-
n(`{ "${
|
|
620
|
+
n("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), n("{", 1), (m = r.params) == null || m.forEach((f) => {
|
|
621
|
+
n(`{ "${f.name}", "${f.value}" },`, 2);
|
|
623
622
|
}), n("}),", 1);
|
|
624
623
|
break;
|
|
625
624
|
case "multipart/form-data":
|
|
626
|
-
n("Content = new MultipartFormDataContent", 1), n("{", 1), (j = r.params) == null || j.forEach((
|
|
627
|
-
n(`new StringContent(${JSON.stringify(
|
|
625
|
+
n("Content = new MultipartFormDataContent", 1), n("{", 1), (j = r.params) == null || j.forEach((f) => {
|
|
626
|
+
n(`new StringContent(${JSON.stringify(f.value || "")})`, 2), n("{", 2), n("Headers =", 3), n("{", 3), f.contentType && n(`ContentType = new MediaTypeHeaderValue("${f.contentType}"),`, 4), n('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), n("{", 4), n(`Name = "${f.name}",`, 5), f.fileName && n(`FileName = "${f.fileName}",`, 5), n("}", 4), n("}", 3), n("},", 2);
|
|
628
627
|
}), n("},", 1);
|
|
629
628
|
break;
|
|
630
629
|
default:
|
|
631
|
-
n(`Content = new StringContent(${JSON.stringify(r.text || "")})`, 1), n("{", 1), n("Headers =", 2), n("{", 2), n(`ContentType = new MediaTypeHeaderValue("${
|
|
630
|
+
n(`Content = new StringContent(${JSON.stringify(r.text || "")})`, 1), n("{", 1), n("Headers =", 2), n("{", 2), n(`ContentType = new MediaTypeHeaderValue("${b}")`, 3), n("}", 2), n("}", 1);
|
|
632
631
|
break;
|
|
633
632
|
}
|
|
634
633
|
}
|
|
635
634
|
return n("};"), n("using (var response = await client.SendAsync(request))"), n("{"), n("response.EnsureSuccessStatusCode();", 1), n("var body = await response.Content.ReadAsStringAsync();", 1), n("Console.WriteLine(body);", 1), n("}"), a();
|
|
636
635
|
}
|
|
637
636
|
};
|
|
638
|
-
function
|
|
637
|
+
function ui(e) {
|
|
639
638
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
640
639
|
}
|
|
641
|
-
var
|
|
640
|
+
var fi = {
|
|
642
641
|
info: {
|
|
643
642
|
key: "restsharp",
|
|
644
643
|
title: "RestSharp",
|
|
@@ -657,42 +656,42 @@ var ci = {
|
|
|
657
656
|
|
|
658
657
|
`), n(`var options = new RestClientOptions("${r}");`), n("var client = new RestClient(options);"), n('var request = new RestRequest("");');
|
|
659
658
|
const c = i.mimeType && i.mimeType === "multipart/form-data";
|
|
660
|
-
switch (c && n("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((
|
|
661
|
-
if (i.mimeType &&
|
|
659
|
+
switch (c && n("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((p) => {
|
|
660
|
+
if (i.mimeType && p.toLowerCase() === "content-type" && i.text) {
|
|
662
661
|
c && i.boundary && n(`request.FormBoundary = "${i.boundary}";`);
|
|
663
662
|
return;
|
|
664
663
|
}
|
|
665
|
-
n(`request.AddHeader("${
|
|
666
|
-
}), o.forEach(({ name:
|
|
667
|
-
n(`request.AddCookie("${
|
|
664
|
+
n(`request.AddHeader("${p}", "${ce(t[p])}");`);
|
|
665
|
+
}), o.forEach(({ name: p, value: g }) => {
|
|
666
|
+
n(`request.AddCookie("${p}", "${ce(g)}", "${s.pathname}", "${s.host}");`);
|
|
668
667
|
}), i.mimeType) {
|
|
669
668
|
case "multipart/form-data":
|
|
670
669
|
if (!i.params) break;
|
|
671
|
-
i.params.forEach((
|
|
672
|
-
|
|
670
|
+
i.params.forEach((p) => {
|
|
671
|
+
p.fileName ? n(`request.AddFile("${p.name}", "${p.fileName}");`) : n(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
673
672
|
});
|
|
674
673
|
break;
|
|
675
674
|
case "application/x-www-form-urlencoded":
|
|
676
675
|
if (!i.params) break;
|
|
677
|
-
i.params.forEach((
|
|
678
|
-
n(`request.AddParameter("${
|
|
676
|
+
i.params.forEach((p) => {
|
|
677
|
+
n(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
679
678
|
});
|
|
680
679
|
break;
|
|
681
680
|
case "application/json": {
|
|
682
681
|
if (!i.text) break;
|
|
683
|
-
const
|
|
684
|
-
n(`request.AddJsonBody(${
|
|
682
|
+
const p = JSON.stringify(i.text);
|
|
683
|
+
n(`request.AddJsonBody(${p}, false);`);
|
|
685
684
|
break;
|
|
686
685
|
}
|
|
687
686
|
default:
|
|
688
687
|
if (!i.text) break;
|
|
689
688
|
n(`request.AddStringBody("${i.text}", "${i.mimeType}");`);
|
|
690
689
|
}
|
|
691
|
-
return n(`var response = await client.${
|
|
690
|
+
return n(`var response = await client.${ui(e)}Async(request);
|
|
692
691
|
`), n(`Console.WriteLine("{0}", response.Content);
|
|
693
692
|
`), a();
|
|
694
693
|
}
|
|
695
|
-
},
|
|
694
|
+
}, pi = {
|
|
696
695
|
info: {
|
|
697
696
|
key: "csharp",
|
|
698
697
|
title: "C#",
|
|
@@ -700,10 +699,10 @@ var ci = {
|
|
|
700
699
|
cli: "dotnet"
|
|
701
700
|
},
|
|
702
701
|
clientsById: {
|
|
703
|
-
httpclient:
|
|
704
|
-
restsharp:
|
|
702
|
+
httpclient: ci,
|
|
703
|
+
restsharp: fi
|
|
705
704
|
}
|
|
706
|
-
},
|
|
705
|
+
}, di = {
|
|
707
706
|
info: {
|
|
708
707
|
key: "native",
|
|
709
708
|
title: "NewRequest",
|
|
@@ -712,16 +711,16 @@ var ci = {
|
|
|
712
711
|
extname: ".go"
|
|
713
712
|
},
|
|
714
713
|
convert: ({ postData: e, method: r, allHeaders: t, fullUrl: o }, i = {}) => {
|
|
715
|
-
const { blank: s, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: l = !0, checkErrors: c = !1, printBody:
|
|
714
|
+
const { blank: s, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: l = !0, checkErrors: c = !1, printBody: p = !0, timeout: g = -1 } = i, v = c ? "err" : "_", m = l ? 1 : 0, j = () => {
|
|
716
715
|
c && (n("if err != nil {", m), n("panic(err)", m + 1), n("}", m));
|
|
717
716
|
};
|
|
718
|
-
l && (n("package main"), s(), n("import ("), n('"fmt"', m), g > 0 && n('"time"', m), e.text && n('"strings"', m), n('"net/http"', m),
|
|
719
|
-
const
|
|
720
|
-
return
|
|
717
|
+
l && (n("package main"), s(), n("import ("), n('"fmt"', m), g > 0 && n('"time"', m), e.text && n('"strings"', m), n('"net/http"', m), p && n('"io"', m), n(")"), s(), n("func main() {"), s());
|
|
718
|
+
const b = g > 0, f = b, h = f ? "client" : "http.DefaultClient";
|
|
719
|
+
return f && (n("client := http.Client{", m), b && n(`Timeout: time.Duration(${g} * time.Second),`, m + 1), n("}", m), s()), n(`url := "${o}"`, m), s(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), s(), n(`req, ${v} := http.NewRequest("${r}", url, payload)`, m), s()) : (n(`req, ${v} := http.NewRequest("${r}", url, nil)`, m), s()), j(), Object.keys(t).length && (Object.keys(t).forEach((y) => {
|
|
721
720
|
n(`req.Header.Add("${y}", "${ce(t[y])}")`, m);
|
|
722
|
-
}), s()), n(`res, ${
|
|
721
|
+
}), s()), n(`res, ${v} := ${h}.Do(req)`, m), j(), p && (s(), n("defer res.Body.Close()", m), n(`body, ${v} := io.ReadAll(res.Body)`, m), j()), s(), p && n("fmt.Println(string(body))", m), l && (s(), n("}")), a();
|
|
723
722
|
}
|
|
724
|
-
},
|
|
723
|
+
}, hi = {
|
|
725
724
|
info: {
|
|
726
725
|
key: "go",
|
|
727
726
|
title: "Go",
|
|
@@ -729,10 +728,10 @@ var ci = {
|
|
|
729
728
|
cli: "go"
|
|
730
729
|
},
|
|
731
730
|
clientsById: {
|
|
732
|
-
native:
|
|
731
|
+
native: di
|
|
733
732
|
}
|
|
734
733
|
}, tn = `\r
|
|
735
|
-
`,
|
|
734
|
+
`, yi = {
|
|
736
735
|
info: {
|
|
737
736
|
key: "http1.1",
|
|
738
737
|
title: "HTTP/1.1",
|
|
@@ -746,30 +745,30 @@ var ci = {
|
|
|
746
745
|
autoContentLength: !0,
|
|
747
746
|
autoHost: !0,
|
|
748
747
|
...n
|
|
749
|
-
}, { blank: l, push: c, join:
|
|
748
|
+
}, { blank: l, push: c, join: p } = new V({ indent: "", join: tn }), g = a.absoluteURI ? r : t.path;
|
|
750
749
|
c(`${e} ${g} ${o}`);
|
|
751
|
-
const
|
|
752
|
-
if (
|
|
753
|
-
const
|
|
754
|
-
c(`${
|
|
755
|
-
}), a.autoHost && !
|
|
756
|
-
const
|
|
757
|
-
c(`Content-Length: ${
|
|
750
|
+
const v = Object.keys(i);
|
|
751
|
+
if (v.forEach((b) => {
|
|
752
|
+
const f = b.toLowerCase().replace(/(^|-)(\w)/g, (h) => h.toUpperCase());
|
|
753
|
+
c(`${f}: ${i[b]}`);
|
|
754
|
+
}), a.autoHost && !v.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && s.text && !v.includes("content-length")) {
|
|
755
|
+
const f = new TextEncoder().encode(s.text).length.toString();
|
|
756
|
+
c(`Content-Length: ${f}`);
|
|
758
757
|
}
|
|
759
758
|
l();
|
|
760
|
-
const m =
|
|
759
|
+
const m = p(), j = s.text || "";
|
|
761
760
|
return `${m}${tn}${j}`;
|
|
762
761
|
}
|
|
763
|
-
},
|
|
762
|
+
}, mi = {
|
|
764
763
|
info: {
|
|
765
764
|
key: "http",
|
|
766
765
|
title: "HTTP",
|
|
767
766
|
default: "http1.1"
|
|
768
767
|
},
|
|
769
768
|
clientsById: {
|
|
770
|
-
"http1.1":
|
|
769
|
+
"http1.1": yi
|
|
771
770
|
}
|
|
772
|
-
},
|
|
771
|
+
}, gi = {
|
|
773
772
|
info: {
|
|
774
773
|
key: "asynchttp",
|
|
775
774
|
title: "AsyncHttp",
|
|
@@ -786,7 +785,7 @@ var ci = {
|
|
|
786
785
|
a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
|
|
787
786
|
}), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), l();
|
|
788
787
|
}
|
|
789
|
-
},
|
|
788
|
+
}, vi = {
|
|
790
789
|
info: {
|
|
791
790
|
key: "nethttp",
|
|
792
791
|
title: "java.net.http",
|
|
@@ -808,7 +807,7 @@ var ci = {
|
|
|
808
807
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
809
808
|
), n("System.out.println(response.body());"), a();
|
|
810
809
|
}
|
|
811
|
-
},
|
|
810
|
+
}, bi = {
|
|
812
811
|
info: {
|
|
813
812
|
key: "okhttp",
|
|
814
813
|
title: "OkHttp",
|
|
@@ -820,12 +819,12 @@ var ci = {
|
|
|
820
819
|
const s = {
|
|
821
820
|
indent: " ",
|
|
822
821
|
...i
|
|
823
|
-
}, { push: n, blank: a, join: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
824
|
-
return n("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? n(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : n(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), n(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), n("Request request = new Request.Builder()"), n(`.url("${t}")`, 1), c.includes(r.toUpperCase()) ?
|
|
822
|
+
}, { push: n, blank: a, join: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
823
|
+
return n("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? n(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : n(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), n(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), n("Request request = new Request.Builder()"), n(`.url("${t}")`, 1), c.includes(r.toUpperCase()) ? p.includes(r.toUpperCase()) ? e.text ? n(`.${r.toLowerCase()}(body)`, 1) : n(`.${r.toLowerCase()}(null)`, 1) : n(`.${r.toLowerCase()}()`, 1) : e.text ? n(`.method("${r.toUpperCase()}", body)`, 1) : n(`.method("${r.toUpperCase()}", null)`, 1), Object.keys(o).forEach((g) => {
|
|
825
824
|
n(`.addHeader("${g}", "${ce(o[g])}")`, 1);
|
|
826
825
|
}), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), l();
|
|
827
826
|
}
|
|
828
|
-
},
|
|
827
|
+
}, xi = {
|
|
829
828
|
info: {
|
|
830
829
|
key: "unirest",
|
|
831
830
|
title: "Unirest",
|
|
@@ -842,19 +841,19 @@ var ci = {
|
|
|
842
841
|
a(`.header("${c}", "${ce(r[c])}")`, 1);
|
|
843
842
|
}), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
|
|
844
843
|
}
|
|
845
|
-
},
|
|
844
|
+
}, ji = {
|
|
846
845
|
info: {
|
|
847
846
|
key: "java",
|
|
848
847
|
title: "Java",
|
|
849
848
|
default: "unirest"
|
|
850
849
|
},
|
|
851
850
|
clientsById: {
|
|
852
|
-
asynchttp:
|
|
853
|
-
nethttp:
|
|
854
|
-
okhttp:
|
|
855
|
-
unirest:
|
|
851
|
+
asynchttp: gi,
|
|
852
|
+
nethttp: vi,
|
|
853
|
+
okhttp: bi,
|
|
854
|
+
unirest: xi
|
|
856
855
|
}
|
|
857
|
-
},
|
|
856
|
+
}, $i = {
|
|
858
857
|
info: {
|
|
859
858
|
key: "axios",
|
|
860
859
|
title: "Axios",
|
|
@@ -867,7 +866,7 @@ var ci = {
|
|
|
867
866
|
const n = {
|
|
868
867
|
indent: " ",
|
|
869
868
|
...s
|
|
870
|
-
}, { blank: a, push: l, join: c, addPostProcessor:
|
|
869
|
+
}, { blank: a, push: l, join: c, addPostProcessor: p } = new V({ indent: n.indent });
|
|
871
870
|
l("import axios from 'axios';"), a();
|
|
872
871
|
const g = {
|
|
873
872
|
method: r,
|
|
@@ -877,7 +876,7 @@ var ci = {
|
|
|
877
876
|
case "application/x-www-form-urlencoded":
|
|
878
877
|
i.params && (l("const encodedParams = new URLSearchParams();"), i.params.forEach((m) => {
|
|
879
878
|
l(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
880
|
-
}), a(), g.data = "encodedParams,",
|
|
879
|
+
}), a(), g.data = "encodedParams,", p((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
|
|
881
880
|
break;
|
|
882
881
|
case "application/json":
|
|
883
882
|
i.jsonObj && (g.data = i.jsonObj);
|
|
@@ -892,13 +891,13 @@ var ci = {
|
|
|
892
891
|
default:
|
|
893
892
|
i.text && (g.data = i.text);
|
|
894
893
|
}
|
|
895
|
-
const
|
|
894
|
+
const v = fe(g, {
|
|
896
895
|
indent: " ",
|
|
897
896
|
inlineCharacterLimit: 80
|
|
898
897
|
}).replace('"[form]"', "form");
|
|
899
|
-
return l(`const options = ${
|
|
898
|
+
return l(`const options = ${v};`), a(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
|
|
900
899
|
}
|
|
901
|
-
},
|
|
900
|
+
}, wi = {
|
|
902
901
|
info: {
|
|
903
902
|
key: "fetch",
|
|
904
903
|
title: "fetch",
|
|
@@ -924,8 +923,8 @@ var ci = {
|
|
|
924
923
|
case "multipart/form-data":
|
|
925
924
|
if (!t.params)
|
|
926
925
|
break;
|
|
927
|
-
const
|
|
928
|
-
|
|
926
|
+
const p = pe(r, "content-type");
|
|
927
|
+
p && delete r[p], l("const form = new FormData();"), t.params.forEach((g) => {
|
|
929
928
|
l(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
|
|
930
929
|
}), n();
|
|
931
930
|
break;
|
|
@@ -939,19 +938,19 @@ var ci = {
|
|
|
939
938
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
940
939
|
// to read, so we keep the object as a literal and use this transform function to wrap the
|
|
941
940
|
// literal in a `JSON.stringify` call.
|
|
942
|
-
transform: (
|
|
941
|
+
transform: (p, g, v) => {
|
|
943
942
|
if (g === "body") {
|
|
944
943
|
if (t.mimeType === "application/x-www-form-urlencoded")
|
|
945
|
-
return `new URLSearchParams(${
|
|
944
|
+
return `new URLSearchParams(${v})`;
|
|
946
945
|
if (t.mimeType === "application/json")
|
|
947
|
-
return `JSON.stringify(${
|
|
946
|
+
return `JSON.stringify(${v})`;
|
|
948
947
|
}
|
|
949
|
-
return
|
|
948
|
+
return v;
|
|
950
949
|
}
|
|
951
950
|
})};`
|
|
952
951
|
), n(), t.params && t.mimeType === "multipart/form-data" && (l("options.body = form;"), n()), l(`fetch('${o}', options)`), l(".then(response => response.json())", 1), l(".then(response => console.log(response))", 1), l(".catch(err => console.error(err));", 1), a();
|
|
953
952
|
}
|
|
954
|
-
},
|
|
953
|
+
}, Si = {
|
|
955
954
|
info: {
|
|
956
955
|
key: "jquery",
|
|
957
956
|
title: "jQuery",
|
|
@@ -981,21 +980,21 @@ var ci = {
|
|
|
981
980
|
case "multipart/form-data":
|
|
982
981
|
if (!o.params)
|
|
983
982
|
break;
|
|
984
|
-
if (a("const form = new FormData();"), o.params.forEach((
|
|
985
|
-
a(`form.append('${
|
|
983
|
+
if (a("const form = new FormData();"), o.params.forEach((v) => {
|
|
984
|
+
a(`form.append('${v.name}', '${v.value || v.fileName || ""}');`);
|
|
986
985
|
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", st(t, "content-type") && (g = be(t, "content-type")) != null && g.includes("boundary")) {
|
|
987
|
-
const
|
|
988
|
-
|
|
986
|
+
const v = pe(t, "content-type");
|
|
987
|
+
v && delete c.headers[v];
|
|
989
988
|
}
|
|
990
989
|
n();
|
|
991
990
|
break;
|
|
992
991
|
default:
|
|
993
992
|
o.text && (c.data = o.text);
|
|
994
993
|
}
|
|
995
|
-
const
|
|
996
|
-
return a(`const settings = ${
|
|
994
|
+
const p = fe(c, { indent: s.indent }).replace("'[form]'", "form");
|
|
995
|
+
return a(`const settings = ${p};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), l();
|
|
997
996
|
}
|
|
998
|
-
},
|
|
997
|
+
}, Oi = {
|
|
999
998
|
info: {
|
|
1000
999
|
key: "xhr",
|
|
1001
1000
|
title: "XMLHttpRequest",
|
|
@@ -1021,34 +1020,34 @@ var ci = {
|
|
|
1021
1020
|
case "multipart/form-data":
|
|
1022
1021
|
if (!e.params)
|
|
1023
1022
|
break;
|
|
1024
|
-
if (a("const data = new FormData();"), e.params.forEach((
|
|
1025
|
-
a(`data.append('${
|
|
1023
|
+
if (a("const data = new FormData();"), e.params.forEach((p) => {
|
|
1024
|
+
a(`data.append('${p.name}', '${p.value || p.fileName || ""}');`);
|
|
1026
1025
|
}), st(r, "content-type") && (c = be(r, "content-type")) != null && c.includes("boundary")) {
|
|
1027
|
-
const
|
|
1028
|
-
|
|
1026
|
+
const p = pe(r, "content-type");
|
|
1027
|
+
p && delete r[p];
|
|
1029
1028
|
}
|
|
1030
1029
|
n();
|
|
1031
1030
|
break;
|
|
1032
1031
|
default:
|
|
1033
1032
|
a(`const data = ${e.text ? `'${e.text}'` : "null"};`), n();
|
|
1034
1033
|
}
|
|
1035
|
-
return a("const xhr = new XMLHttpRequest();"), s.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((
|
|
1036
|
-
a(`xhr.setRequestHeader('${
|
|
1034
|
+
return a("const xhr = new XMLHttpRequest();"), s.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((p) => {
|
|
1035
|
+
a(`xhr.setRequestHeader('${p}', '${We(r[p])}');`);
|
|
1037
1036
|
}), n(), a("xhr.send(data);"), l();
|
|
1038
1037
|
}
|
|
1039
|
-
},
|
|
1038
|
+
}, Ti = {
|
|
1040
1039
|
info: {
|
|
1041
1040
|
key: "javascript",
|
|
1042
1041
|
title: "JavaScript",
|
|
1043
1042
|
default: "xhr"
|
|
1044
1043
|
},
|
|
1045
1044
|
clientsById: {
|
|
1046
|
-
xhr:
|
|
1047
|
-
axios:
|
|
1048
|
-
fetch:
|
|
1049
|
-
jquery:
|
|
1045
|
+
xhr: Oi,
|
|
1046
|
+
axios: $i,
|
|
1047
|
+
fetch: wi,
|
|
1048
|
+
jquery: Si
|
|
1050
1049
|
}
|
|
1051
|
-
},
|
|
1050
|
+
}, Pi = {
|
|
1052
1051
|
info: {
|
|
1053
1052
|
key: "native",
|
|
1054
1053
|
title: "Native JSON",
|
|
@@ -1082,16 +1081,16 @@ var ci = {
|
|
|
1082
1081
|
}
|
|
1083
1082
|
return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
|
|
1084
1083
|
}
|
|
1085
|
-
},
|
|
1084
|
+
}, Ci = {
|
|
1086
1085
|
info: {
|
|
1087
1086
|
key: "json",
|
|
1088
1087
|
title: "JSON",
|
|
1089
1088
|
default: "native"
|
|
1090
1089
|
},
|
|
1091
1090
|
clientsById: {
|
|
1092
|
-
native:
|
|
1091
|
+
native: Pi
|
|
1093
1092
|
}
|
|
1094
|
-
},
|
|
1093
|
+
}, Ni = {
|
|
1095
1094
|
info: {
|
|
1096
1095
|
key: "okhttp",
|
|
1097
1096
|
title: "OkHttp",
|
|
@@ -1103,21 +1102,21 @@ var ci = {
|
|
|
1103
1102
|
const s = {
|
|
1104
1103
|
indent: " ",
|
|
1105
1104
|
...i
|
|
1106
|
-
}, { blank: n, join: a, push: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
1107
|
-
return l("val client = OkHttpClient()"), n(), e.text && (e.boundary ? l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : l(`val mediaType = MediaType.parse("${e.mimeType}")`), l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), l("val request = Request.Builder()"), l(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ?
|
|
1105
|
+
}, { blank: n, join: a, push: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1106
|
+
return l("val client = OkHttpClient()"), n(), e.text && (e.boundary ? l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : l(`val mediaType = MediaType.parse("${e.mimeType}")`), l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), l("val request = Request.Builder()"), l(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ? p.includes(t.toUpperCase()) ? e.text ? l(`.${t.toLowerCase()}(body)`, 1) : l(`.${t.toLowerCase()}(null)`, 1) : l(`.${t.toLowerCase()}()`, 1) : e.text ? l(`.method("${t.toUpperCase()}", body)`, 1) : l(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((g) => {
|
|
1108
1107
|
l(`.addHeader("${g}", "${ce(o[g])}")`, 1);
|
|
1109
1108
|
}), l(".build()", 1), n(), l("val response = client.newCall(request).execute()"), a();
|
|
1110
1109
|
}
|
|
1111
|
-
},
|
|
1110
|
+
}, ki = {
|
|
1112
1111
|
info: {
|
|
1113
1112
|
key: "kotlin",
|
|
1114
1113
|
title: "Kotlin",
|
|
1115
1114
|
default: "okhttp"
|
|
1116
1115
|
},
|
|
1117
1116
|
clientsById: {
|
|
1118
|
-
okhttp:
|
|
1117
|
+
okhttp: Ni
|
|
1119
1118
|
}
|
|
1120
|
-
},
|
|
1119
|
+
}, qi = {
|
|
1121
1120
|
info: {
|
|
1122
1121
|
key: "axios",
|
|
1123
1122
|
title: "Axios",
|
|
@@ -1132,26 +1131,26 @@ var ci = {
|
|
|
1132
1131
|
...i
|
|
1133
1132
|
}, { blank: n, join: a, push: l, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1134
1133
|
l("const axios = require('axios');");
|
|
1135
|
-
const
|
|
1134
|
+
const p = {
|
|
1136
1135
|
method: e,
|
|
1137
1136
|
url: r
|
|
1138
1137
|
};
|
|
1139
|
-
switch (Object.keys(t).length && (
|
|
1138
|
+
switch (Object.keys(t).length && (p.headers = t), o.mimeType) {
|
|
1140
1139
|
case "application/x-www-form-urlencoded":
|
|
1141
|
-
o.params && (l("const { URLSearchParams } = require('url');"), n(), l("const encodedParams = new URLSearchParams();"), o.params.forEach((
|
|
1142
|
-
l(`encodedParams.set('${
|
|
1143
|
-
}), n(),
|
|
1140
|
+
o.params && (l("const { URLSearchParams } = require('url');"), n(), l("const encodedParams = new URLSearchParams();"), o.params.forEach((v) => {
|
|
1141
|
+
l(`encodedParams.set('${v.name}', '${v.value}');`);
|
|
1142
|
+
}), n(), p.data = "encodedParams,", c((v) => v.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1144
1143
|
break;
|
|
1145
1144
|
case "application/json":
|
|
1146
|
-
n(), o.jsonObj && (
|
|
1145
|
+
n(), o.jsonObj && (p.data = o.jsonObj);
|
|
1147
1146
|
break;
|
|
1148
1147
|
default:
|
|
1149
|
-
n(), o.text && (
|
|
1148
|
+
n(), o.text && (p.data = o.text);
|
|
1150
1149
|
}
|
|
1151
|
-
const g = fe(
|
|
1150
|
+
const g = fe(p, { indent: " ", inlineCharacterLimit: 80 });
|
|
1152
1151
|
return l(`const options = ${g};`), n(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), a();
|
|
1153
1152
|
}
|
|
1154
|
-
},
|
|
1153
|
+
}, Ri = {
|
|
1155
1154
|
info: {
|
|
1156
1155
|
key: "fetch",
|
|
1157
1156
|
title: "Fetch",
|
|
@@ -1161,20 +1160,20 @@ var ci = {
|
|
|
1161
1160
|
installation: "npm install node-fetch@2 --save"
|
|
1162
1161
|
},
|
|
1163
1162
|
convert: ({ method: e, fullUrl: r, postData: t, headersObj: o, cookies: i }, s) => {
|
|
1164
|
-
var
|
|
1163
|
+
var b;
|
|
1165
1164
|
const n = {
|
|
1166
1165
|
indent: " ",
|
|
1167
1166
|
...s
|
|
1168
1167
|
};
|
|
1169
1168
|
let a = !1;
|
|
1170
|
-
const { blank: l, push: c, join:
|
|
1169
|
+
const { blank: l, push: c, join: p, unshift: g } = new V({ indent: n.indent });
|
|
1171
1170
|
c("const fetch = require('node-fetch');");
|
|
1172
|
-
const
|
|
1171
|
+
const v = r, m = {
|
|
1173
1172
|
method: e
|
|
1174
1173
|
};
|
|
1175
1174
|
switch (Object.keys(o).length && (m.headers = o), t.mimeType) {
|
|
1176
1175
|
case "application/x-www-form-urlencoded":
|
|
1177
|
-
g("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), l(), (
|
|
1176
|
+
g("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), l(), (b = t.params) == null || b.forEach((h) => {
|
|
1178
1177
|
c(`encodedParams.set('${h.name}', '${h.value}');`);
|
|
1179
1178
|
}), m.body = "encodedParams";
|
|
1180
1179
|
break;
|
|
@@ -1184,8 +1183,8 @@ var ci = {
|
|
|
1184
1183
|
case "multipart/form-data":
|
|
1185
1184
|
if (!t.params)
|
|
1186
1185
|
break;
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1186
|
+
const f = pe(o, "content-type");
|
|
1187
|
+
f && delete o[f], g("const FormData = require('form-data');"), c("const formData = new FormData();"), l(), t.params.forEach((h) => {
|
|
1189
1188
|
if (!h.fileName && !h.fileName && !h.contentType) {
|
|
1190
1189
|
c(`formData.append('${h.name}', '${h.value}');`);
|
|
1191
1190
|
return;
|
|
@@ -1197,21 +1196,21 @@ var ci = {
|
|
|
1197
1196
|
t.text && (m.body = t.text);
|
|
1198
1197
|
}
|
|
1199
1198
|
if (i.length) {
|
|
1200
|
-
const
|
|
1201
|
-
m.headers || (m.headers = {}), m.headers.cookie =
|
|
1199
|
+
const f = i.map(({ name: h, value: y }) => `${encodeURIComponent(h)}=${encodeURIComponent(y)}`).join("; ");
|
|
1200
|
+
m.headers || (m.headers = {}), m.headers.cookie = f;
|
|
1202
1201
|
}
|
|
1203
|
-
l(), c(`const url = '${
|
|
1202
|
+
l(), c(`const url = '${v}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
|
|
1204
1203
|
const j = fe(m, {
|
|
1205
1204
|
indent: " ",
|
|
1206
1205
|
inlineCharacterLimit: 80,
|
|
1207
1206
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
1208
1207
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
1209
1208
|
// in a `JSON.stringify` call.
|
|
1210
|
-
transform: (
|
|
1209
|
+
transform: (f, h, y) => h === "body" && t.mimeType === "application/json" ? `JSON.stringify(${y})` : y
|
|
1211
1210
|
});
|
|
1212
|
-
return c(`const options = ${j};`), l(), a && g("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1),
|
|
1211
|
+
return c(`const options = ${j};`), l(), a && g("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), p().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1213
1212
|
}
|
|
1214
|
-
},
|
|
1213
|
+
}, Ei = {
|
|
1215
1214
|
info: {
|
|
1216
1215
|
key: "native",
|
|
1217
1216
|
title: "HTTP",
|
|
@@ -1221,14 +1220,14 @@ var ci = {
|
|
|
1221
1220
|
},
|
|
1222
1221
|
convert: ({ uriObj: e, method: r, allHeaders: t, postData: o }, i = {}) => {
|
|
1223
1222
|
var g;
|
|
1224
|
-
const { indent: s = " " } = i, { blank: n, join: a, push: l, unshift: c } = new V({ indent: s }),
|
|
1223
|
+
const { indent: s = " " } = i, { blank: n, join: a, push: l, unshift: c } = new V({ indent: s }), p = {
|
|
1225
1224
|
method: r,
|
|
1226
1225
|
hostname: e.hostname,
|
|
1227
1226
|
port: e.port,
|
|
1228
1227
|
path: e.path,
|
|
1229
1228
|
headers: t
|
|
1230
1229
|
};
|
|
1231
|
-
switch (l(`const http = require('${(g = e.protocol) == null ? void 0 : g.replace(":", "")}');`), n(), l(`const options = ${fe(
|
|
1230
|
+
switch (l(`const http = require('${(g = e.protocol) == null ? void 0 : g.replace(":", "")}');`), n(), l(`const options = ${fe(p, { indent: s })};`), n(), l("const req = http.request(options, function (res) {"), l("const chunks = [];", 1), n(), l("res.on('data', function (chunk) {", 1), l("chunks.push(chunk);", 2), l("});", 1), n(), l("res.on('end', function () {", 1), l("const body = Buffer.concat(chunks);", 2), l("console.log(body.toString());", 2), l("});", 1), l("});"), n(), o.mimeType) {
|
|
1232
1231
|
case "application/x-www-form-urlencoded":
|
|
1233
1232
|
o.paramsObj && (c("const qs = require('querystring');"), l(
|
|
1234
1233
|
`req.write(qs.stringify(${fe(o.paramsObj, {
|
|
@@ -1250,7 +1249,7 @@ var ci = {
|
|
|
1250
1249
|
}
|
|
1251
1250
|
return l("req.end();"), a();
|
|
1252
1251
|
}
|
|
1253
|
-
},
|
|
1252
|
+
}, Ai = {
|
|
1254
1253
|
info: {
|
|
1255
1254
|
key: "request",
|
|
1256
1255
|
title: "Request",
|
|
@@ -1265,8 +1264,8 @@ var ci = {
|
|
|
1265
1264
|
...n
|
|
1266
1265
|
};
|
|
1267
1266
|
let l = !1;
|
|
1268
|
-
const { push: c, blank:
|
|
1269
|
-
c("const request = require('request');"),
|
|
1267
|
+
const { push: c, blank: p, join: g, unshift: v, addPostProcessor: m } = new V({ indent: a.indent });
|
|
1268
|
+
c("const request = require('request');"), p();
|
|
1270
1269
|
const j = {
|
|
1271
1270
|
method: e,
|
|
1272
1271
|
url: t
|
|
@@ -1281,29 +1280,29 @@ var ci = {
|
|
|
1281
1280
|
case "multipart/form-data":
|
|
1282
1281
|
if (!o.params)
|
|
1283
1282
|
break;
|
|
1284
|
-
j.formData = {}, o.params.forEach((
|
|
1285
|
-
if (!
|
|
1286
|
-
j.formData[
|
|
1283
|
+
j.formData = {}, o.params.forEach((b) => {
|
|
1284
|
+
if (!b.fileName && !b.fileName && !b.contentType) {
|
|
1285
|
+
j.formData[b.name] = b.value;
|
|
1287
1286
|
return;
|
|
1288
1287
|
}
|
|
1289
|
-
let
|
|
1290
|
-
|
|
1291
|
-
value: `fs.createReadStream(${
|
|
1288
|
+
let f = {};
|
|
1289
|
+
b.fileName ? (l = !0, f = {
|
|
1290
|
+
value: `fs.createReadStream(${b.fileName})`,
|
|
1292
1291
|
options: {
|
|
1293
|
-
filename:
|
|
1294
|
-
contentType:
|
|
1292
|
+
filename: b.fileName,
|
|
1293
|
+
contentType: b.contentType ? b.contentType : null
|
|
1295
1294
|
}
|
|
1296
|
-
}) :
|
|
1297
|
-
}), m((
|
|
1295
|
+
}) : b.value && (f.value = b.value), j.formData[b.name] = f;
|
|
1296
|
+
}), m((b) => b.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
|
|
1298
1297
|
break;
|
|
1299
1298
|
default:
|
|
1300
1299
|
o.text && (j.body = o.text);
|
|
1301
1300
|
}
|
|
1302
|
-
return s.length && (j.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name:
|
|
1303
|
-
c(`jar.setCookie(request.cookie('${encodeURIComponent(
|
|
1304
|
-
}),
|
|
1301
|
+
return s.length && (j.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: b, value: f }) => {
|
|
1302
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent(b)}=${encodeURIComponent(f)}'), '${r}');`);
|
|
1303
|
+
}), p(), m((b) => b.replace(/'JAR'/, "jar"))), l && v("const fs = require('fs');"), c(`const options = ${fe(j, { indent: " ", inlineCharacterLimit: 80 })};`), p(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), p(), c("console.log(body);", 1), c("});"), g();
|
|
1305
1304
|
}
|
|
1306
|
-
},
|
|
1305
|
+
}, Ii = {
|
|
1307
1306
|
info: {
|
|
1308
1307
|
key: "unirest",
|
|
1309
1308
|
title: "Unirest",
|
|
@@ -1317,34 +1316,34 @@ var ci = {
|
|
|
1317
1316
|
...n
|
|
1318
1317
|
};
|
|
1319
1318
|
let l = !1;
|
|
1320
|
-
const { addPostProcessor: c, blank:
|
|
1319
|
+
const { addPostProcessor: c, blank: p, join: g, push: v, unshift: m } = new V({
|
|
1321
1320
|
indent: a.indent
|
|
1322
1321
|
});
|
|
1323
|
-
switch (
|
|
1324
|
-
|
|
1325
|
-
}),
|
|
1322
|
+
switch (v("const unirest = require('unirest');"), p(), v(`const req = unirest('${e}', '${r}');`), p(), t.length && (v("const CookieJar = unirest.jar();"), t.forEach((j) => {
|
|
1323
|
+
v(`CookieJar.add('${encodeURIComponent(j.name)}=${encodeURIComponent(j.value)}', '${r}');`);
|
|
1324
|
+
}), v("req.jar(CookieJar);"), p()), Object.keys(o).length && (v(`req.query(${fe(o, { indent: a.indent })});`), p()), Object.keys(s).length && (v(`req.headers(${fe(s, { indent: a.indent })});`), p()), i.mimeType) {
|
|
1326
1325
|
case "application/x-www-form-urlencoded":
|
|
1327
|
-
i.paramsObj && (
|
|
1326
|
+
i.paramsObj && (v(`req.form(${fe(i.paramsObj, { indent: a.indent })});`), p());
|
|
1328
1327
|
break;
|
|
1329
1328
|
case "application/json":
|
|
1330
|
-
i.jsonObj && (
|
|
1329
|
+
i.jsonObj && (v("req.type('json');"), v(`req.send(${fe(i.jsonObj, { indent: a.indent })});`), p());
|
|
1331
1330
|
break;
|
|
1332
1331
|
case "multipart/form-data": {
|
|
1333
1332
|
if (!i.params)
|
|
1334
1333
|
break;
|
|
1335
1334
|
const j = [];
|
|
1336
|
-
i.params.forEach((
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
}),
|
|
1335
|
+
i.params.forEach((b) => {
|
|
1336
|
+
const f = {};
|
|
1337
|
+
b.fileName && !b.value ? (l = !0, f.body = `fs.createReadStream('${b.fileName}')`, c((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : b.value && (f.body = b.value), f.body && (b.contentType && (f["content-type"] = b.contentType), j.push(f));
|
|
1338
|
+
}), v(`req.multipart(${fe(j, { indent: a.indent })});`), p();
|
|
1340
1339
|
break;
|
|
1341
1340
|
}
|
|
1342
1341
|
default:
|
|
1343
|
-
i.text && (
|
|
1342
|
+
i.text && (v(`req.send(${fe(i.text, { indent: a.indent })});`), p());
|
|
1344
1343
|
}
|
|
1345
|
-
return l && m("const fs = require('fs');"),
|
|
1344
|
+
return l && m("const fs = require('fs');"), v("req.end(function (res) {"), v("if (res.error) throw new Error(res.error);", 1), p(), v("console.log(res.body);", 1), v("});"), g();
|
|
1346
1345
|
}
|
|
1347
|
-
},
|
|
1346
|
+
}, Li = {
|
|
1348
1347
|
info: {
|
|
1349
1348
|
key: "node",
|
|
1350
1349
|
title: "Node.js",
|
|
@@ -1352,11 +1351,11 @@ var ci = {
|
|
|
1352
1351
|
cli: "node %s"
|
|
1353
1352
|
},
|
|
1354
1353
|
clientsById: {
|
|
1355
|
-
native:
|
|
1356
|
-
request:
|
|
1357
|
-
unirest:
|
|
1358
|
-
axios:
|
|
1359
|
-
fetch:
|
|
1354
|
+
native: Ei,
|
|
1355
|
+
request: Ai,
|
|
1356
|
+
unirest: Ii,
|
|
1357
|
+
axios: qi,
|
|
1358
|
+
fetch: Ri
|
|
1360
1359
|
}
|
|
1361
1360
|
}, wt = (e, r, t, o) => {
|
|
1362
1361
|
const i = `${e} *${r} = `, s = Sr(t, o ? i.length : void 0);
|
|
@@ -1380,7 +1379,7 @@ var ci = {
|
|
|
1380
1379
|
default:
|
|
1381
1380
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1382
1381
|
}
|
|
1383
|
-
},
|
|
1382
|
+
}, Ui = {
|
|
1384
1383
|
info: {
|
|
1385
1384
|
key: "nsurlsession",
|
|
1386
1385
|
title: "NSURLSession",
|
|
@@ -1389,7 +1388,7 @@ var ci = {
|
|
|
1389
1388
|
extname: ".m"
|
|
1390
1389
|
},
|
|
1391
1390
|
convert: ({ allHeaders: e, postData: r, method: t, fullUrl: o }, i) => {
|
|
1392
|
-
var
|
|
1391
|
+
var p;
|
|
1393
1392
|
const s = {
|
|
1394
1393
|
indent: " ",
|
|
1395
1394
|
pretty: !0,
|
|
@@ -1402,12 +1401,12 @@ var ci = {
|
|
|
1402
1401
|
if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), n(wt("NSDictionary", "headers", e, s.pretty))), r.text || r.jsonObj || r.params)
|
|
1403
1402
|
switch (c.hasBody = !0, r.mimeType) {
|
|
1404
1403
|
case "application/x-www-form-urlencoded":
|
|
1405
|
-
if ((
|
|
1404
|
+
if ((p = r.params) != null && p.length) {
|
|
1406
1405
|
l();
|
|
1407
|
-
const [g, ...
|
|
1406
|
+
const [g, ...v] = r.params;
|
|
1408
1407
|
n(
|
|
1409
1408
|
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${g.name}=${g.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
1410
|
-
),
|
|
1409
|
+
), v.forEach(({ name: m, value: j }) => {
|
|
1411
1410
|
n(`[postData appendData:[@"&${m}=${j}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
1412
1411
|
});
|
|
1413
1412
|
} else
|
|
@@ -1437,16 +1436,16 @@ var ci = {
|
|
|
1437
1436
|
2
|
|
1438
1437
|
), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
|
|
1439
1438
|
}
|
|
1440
|
-
},
|
|
1439
|
+
}, Fi = {
|
|
1441
1440
|
info: {
|
|
1442
1441
|
key: "objc",
|
|
1443
1442
|
title: "Objective-C",
|
|
1444
1443
|
default: "nsurlsession"
|
|
1445
1444
|
},
|
|
1446
1445
|
clientsById: {
|
|
1447
|
-
nsurlsession:
|
|
1446
|
+
nsurlsession: Ui
|
|
1448
1447
|
}
|
|
1449
|
-
},
|
|
1448
|
+
}, _i = {
|
|
1450
1449
|
info: {
|
|
1451
1450
|
key: "cohttp",
|
|
1452
1451
|
title: "CoHTTP",
|
|
@@ -1461,25 +1460,25 @@ var ci = {
|
|
|
1461
1460
|
...i
|
|
1462
1461
|
}, n = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: l, join: c } = new V({ indent: s.indent });
|
|
1463
1462
|
a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), l(), a(`let uri = Uri.of_string "${e}" in`);
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
`let headers = Header.add (Header.init ()) "${
|
|
1467
|
-
r[
|
|
1463
|
+
const p = Object.keys(r);
|
|
1464
|
+
p.length === 1 ? a(
|
|
1465
|
+
`let headers = Header.add (Header.init ()) "${p[0]}" "${ce(
|
|
1466
|
+
r[p[0]]
|
|
1468
1467
|
)}" in`
|
|
1469
|
-
) :
|
|
1468
|
+
) : p.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), p.forEach((j) => {
|
|
1470
1469
|
a(`("${j}", "${ce(r[j])}");`, 1);
|
|
1471
1470
|
}), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), l();
|
|
1472
|
-
const g =
|
|
1473
|
-
return a(`Client.call ${g}${
|
|
1471
|
+
const g = p.length ? "~headers " : "", v = t.text ? "~body " : "", m = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
|
|
1472
|
+
return a(`Client.call ${g}${v}${m} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
|
|
1474
1473
|
}
|
|
1475
|
-
},
|
|
1474
|
+
}, Bi = {
|
|
1476
1475
|
info: {
|
|
1477
1476
|
key: "ocaml",
|
|
1478
1477
|
title: "OCaml",
|
|
1479
1478
|
default: "cohttp"
|
|
1480
1479
|
},
|
|
1481
1480
|
clientsById: {
|
|
1482
|
-
cohttp:
|
|
1481
|
+
cohttp: _i
|
|
1483
1482
|
}
|
|
1484
1483
|
}, te = (e, r, t) => {
|
|
1485
1484
|
switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
|
|
@@ -1540,7 +1539,7 @@ ${t}]`;
|
|
|
1540
1539
|
"UNLOCK",
|
|
1541
1540
|
"UPDATE",
|
|
1542
1541
|
"VERSION_CONTROL"
|
|
1543
|
-
],
|
|
1542
|
+
], Hi = {
|
|
1544
1543
|
info: {
|
|
1545
1544
|
key: "curl",
|
|
1546
1545
|
title: "cURL",
|
|
@@ -1552,13 +1551,13 @@ ${t}]`;
|
|
|
1552
1551
|
const {
|
|
1553
1552
|
closingTag: l = !1,
|
|
1554
1553
|
indent: c = " ",
|
|
1555
|
-
maxRedirects:
|
|
1554
|
+
maxRedirects: p = 10,
|
|
1556
1555
|
namedErrors: g = !1,
|
|
1557
|
-
noTags:
|
|
1556
|
+
noTags: v = !1,
|
|
1558
1557
|
shortTags: m = !1,
|
|
1559
1558
|
timeout: j = 30
|
|
1560
|
-
} = a, { push:
|
|
1561
|
-
|
|
1559
|
+
} = a, { push: b, blank: f, join: h } = new V({ indent: c });
|
|
1560
|
+
v || (b(m ? "<?" : "<?php"), f()), b("$curl = curl_init();"), f();
|
|
1562
1561
|
const y = [
|
|
1563
1562
|
{
|
|
1564
1563
|
escape: !0,
|
|
@@ -1583,7 +1582,7 @@ ${t}]`;
|
|
|
1583
1582
|
{
|
|
1584
1583
|
escape: !1,
|
|
1585
1584
|
name: "CURLOPT_MAXREDIRS",
|
|
1586
|
-
value:
|
|
1585
|
+
value: p
|
|
1587
1586
|
},
|
|
1588
1587
|
{
|
|
1589
1588
|
escape: !1,
|
|
@@ -1606,19 +1605,19 @@ ${t}]`;
|
|
|
1606
1605
|
value: r ? r.jsonObj ? `json_encode(${te(r.jsonObj, c.repeat(2), c)})` : r.text : void 0
|
|
1607
1606
|
}
|
|
1608
1607
|
];
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1608
|
+
b("curl_setopt_array($curl, [");
|
|
1609
|
+
const S = new V({ indent: c, join: `
|
|
1611
1610
|
${c}` });
|
|
1612
|
-
y.forEach(({ value:
|
|
1613
|
-
|
|
1611
|
+
y.forEach(({ value: O, name: x, escape: q }) => {
|
|
1612
|
+
O != null && S.push(`${x} => ${q ? JSON.stringify(O) : O},`);
|
|
1614
1613
|
});
|
|
1615
|
-
const T = s.map((
|
|
1616
|
-
T.length &&
|
|
1617
|
-
const d = Object.keys(n).sort().map((
|
|
1618
|
-
return d.length && (
|
|
1619
|
-
${c}${c}`), 1),
|
|
1614
|
+
const T = s.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
|
|
1615
|
+
T.length && S.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
|
|
1616
|
+
const d = Object.keys(n).sort().map((O) => `"${O}: ${ce(n[O])}"`);
|
|
1617
|
+
return d.length && (S.push("CURLOPT_HTTPHEADER => ["), S.push(d.join(`,
|
|
1618
|
+
${c}${c}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = curl_exec($curl);"), b("$err = curl_error($curl);"), f(), b("curl_close($curl);"), f(), b("if ($err) {"), b(g ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), b("} else {"), b("echo $response;", 1), b("}"), !v && l && (f(), b("?>")), h();
|
|
1620
1619
|
}
|
|
1621
|
-
},
|
|
1620
|
+
}, Mi = {
|
|
1622
1621
|
info: {
|
|
1623
1622
|
key: "guzzle",
|
|
1624
1623
|
title: "Guzzle",
|
|
@@ -1628,20 +1627,20 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1628
1627
|
installation: "composer require guzzlehttp/guzzle"
|
|
1629
1628
|
},
|
|
1630
1629
|
convert: ({ postData: e, fullUrl: r, method: t, cookies: o, headersObj: i }, s) => {
|
|
1631
|
-
var
|
|
1630
|
+
var b;
|
|
1632
1631
|
const n = {
|
|
1633
1632
|
closingTag: !1,
|
|
1634
1633
|
indent: " ",
|
|
1635
1634
|
noTags: !1,
|
|
1636
1635
|
shortTags: !1,
|
|
1637
1636
|
...s
|
|
1638
|
-
}, { push: a, blank: l, join: c } = new V({ indent: n.indent }), { code:
|
|
1637
|
+
}, { push: a, blank: l, join: c } = new V({ indent: n.indent }), { code: p, push: g, join: v } = new V({ indent: n.indent });
|
|
1639
1638
|
switch (n.noTags || a(n.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), l(), e.mimeType) {
|
|
1640
1639
|
case "application/x-www-form-urlencoded":
|
|
1641
1640
|
g(`'form_params' => ${te(e.paramsObj, n.indent + n.indent, n.indent)},`, 1);
|
|
1642
1641
|
break;
|
|
1643
1642
|
case "multipart/form-data": {
|
|
1644
|
-
const
|
|
1643
|
+
const f = [];
|
|
1645
1644
|
if (e.params && e.params.forEach((h) => {
|
|
1646
1645
|
if (h.fileName) {
|
|
1647
1646
|
const y = {
|
|
@@ -1649,12 +1648,12 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1649
1648
|
filename: h.fileName,
|
|
1650
1649
|
contents: h.value
|
|
1651
1650
|
};
|
|
1652
|
-
h.contentType && (y.headers = { "Content-Type": h.contentType }),
|
|
1653
|
-
} else h.value &&
|
|
1651
|
+
h.contentType && (y.headers = { "Content-Type": h.contentType }), f.push(y);
|
|
1652
|
+
} else h.value && f.push({
|
|
1654
1653
|
name: h.name,
|
|
1655
1654
|
contents: h.value
|
|
1656
1655
|
});
|
|
1657
|
-
}),
|
|
1656
|
+
}), f.length && (g(`'multipart' => ${te(f, n.indent + n.indent, n.indent)}`, 1), st(i, "content-type") && (b = be(i, "content-type")) != null && b.indexOf("boundary"))) {
|
|
1658
1657
|
const h = pe(i, "content-type");
|
|
1659
1658
|
h && delete i[h];
|
|
1660
1659
|
}
|
|
@@ -1663,13 +1662,13 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1663
1662
|
default:
|
|
1664
1663
|
e.text && g(`'body' => ${te(e.text)},`, 1);
|
|
1665
1664
|
}
|
|
1666
|
-
const m = Object.keys(i).sort().map(function(
|
|
1667
|
-
return `${n.indent}${n.indent}'${
|
|
1668
|
-
}), j = o.map((
|
|
1665
|
+
const m = Object.keys(i).sort().map(function(f) {
|
|
1666
|
+
return `${n.indent}${n.indent}'${f}' => '${We(i[f])}',`;
|
|
1667
|
+
}), j = o.map((f) => `${encodeURIComponent(f.name)}=${encodeURIComponent(f.value)}`).join("; ");
|
|
1669
1668
|
return j.length && m.push(`${n.indent}${n.indent}'cookie' => '${We(j)}',`), m.length && (g("'headers' => [", 1), g(m.join(`
|
|
1670
|
-
`)), g("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), l(),
|
|
1669
|
+
`)), g("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), l(), p.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(v()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), l(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (l(), a("?>")), c();
|
|
1671
1670
|
}
|
|
1672
|
-
},
|
|
1671
|
+
}, zi = {
|
|
1673
1672
|
info: {
|
|
1674
1673
|
key: "http1",
|
|
1675
1674
|
title: "HTTP v1",
|
|
@@ -1678,20 +1677,20 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1678
1677
|
extname: ".php"
|
|
1679
1678
|
},
|
|
1680
1679
|
convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: i, cookiesObj: s }, n = {}) => {
|
|
1681
|
-
const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags:
|
|
1682
|
-
switch (c || (g(
|
|
1680
|
+
const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags: p = !1 } = n, { push: g, blank: v, join: m } = new V({ indent: l });
|
|
1681
|
+
switch (c || (g(p ? "<?" : "<?php"), v()), rn.includes(e.toUpperCase()) || g(`HttpRequest::methodRegister('${e}');`), g("$request = new HttpRequest();"), g(`$request->setUrl(${te(r)});`), rn.includes(e.toUpperCase()) ? g(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : g(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), v(), Object.keys(o).length && (g(`$request->setQueryData(${te(o, l)});`), v()), Object.keys(i).length && (g(`$request->setHeaders(${te(i, l)});`), v()), Object.keys(s).length && (g(`$request->setCookies(${te(s, l)});`), v()), t.mimeType) {
|
|
1683
1682
|
case "application/x-www-form-urlencoded":
|
|
1684
|
-
g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setPostFields(${te(t.paramsObj, l)});`),
|
|
1683
|
+
g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setPostFields(${te(t.paramsObj, l)});`), v();
|
|
1685
1684
|
break;
|
|
1686
1685
|
case "application/json":
|
|
1687
|
-
g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setBody(json_encode(${te(t.jsonObj, l)}));`),
|
|
1686
|
+
g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setBody(json_encode(${te(t.jsonObj, l)}));`), v();
|
|
1688
1687
|
break;
|
|
1689
1688
|
default:
|
|
1690
|
-
t.text && (g(`$request->setBody(${te(t.text)});`),
|
|
1689
|
+
t.text && (g(`$request->setBody(${te(t.text)});`), v());
|
|
1691
1690
|
}
|
|
1692
|
-
return g("try {"), g("$response = $request->send();", 1),
|
|
1691
|
+
return g("try {"), g("$response = $request->send();", 1), v(), g("echo $response->getBody();", 1), g("} catch (HttpException $ex) {"), g("echo $ex;", 1), g("}"), !c && a && (v(), g("?>")), m();
|
|
1693
1692
|
}
|
|
1694
|
-
},
|
|
1693
|
+
}, Gi = {
|
|
1695
1694
|
info: {
|
|
1696
1695
|
key: "http2",
|
|
1697
1696
|
title: "HTTP v2",
|
|
@@ -1700,46 +1699,46 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1700
1699
|
extname: ".php"
|
|
1701
1700
|
},
|
|
1702
1701
|
convert: ({ postData: e, headersObj: r, method: t, queryObj: o, cookiesObj: i, url: s }, n = {}) => {
|
|
1703
|
-
var
|
|
1704
|
-
const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags:
|
|
1702
|
+
var b;
|
|
1703
|
+
const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags: p = !1 } = n, { push: g, blank: v, join: m } = new V({ indent: l });
|
|
1705
1704
|
let j = !1;
|
|
1706
|
-
switch (c || (g(
|
|
1705
|
+
switch (c || (g(p ? "<?" : "<?php"), v()), g("$client = new http\\Client;"), g("$request = new http\\Client\\Request;"), v(), e.mimeType) {
|
|
1707
1706
|
case "application/x-www-form-urlencoded":
|
|
1708
|
-
g("$body = new http\\Message\\Body;"), g(`$body->append(new http\\QueryString(${te(e.paramsObj, l)}));`),
|
|
1707
|
+
g("$body = new http\\Message\\Body;"), g(`$body->append(new http\\QueryString(${te(e.paramsObj, l)}));`), v(), j = !0;
|
|
1709
1708
|
break;
|
|
1710
1709
|
case "multipart/form-data": {
|
|
1711
1710
|
if (!e.params)
|
|
1712
1711
|
break;
|
|
1713
|
-
const
|
|
1714
|
-
e.params.forEach(({ name: T, fileName: d, value:
|
|
1712
|
+
const f = [], h = {};
|
|
1713
|
+
e.params.forEach(({ name: T, fileName: d, value: O, contentType: x }) => {
|
|
1715
1714
|
if (d) {
|
|
1716
|
-
|
|
1715
|
+
f.push({
|
|
1717
1716
|
name: T,
|
|
1718
1717
|
type: x,
|
|
1719
1718
|
file: d,
|
|
1720
|
-
data:
|
|
1719
|
+
data: O
|
|
1721
1720
|
});
|
|
1722
1721
|
return;
|
|
1723
1722
|
}
|
|
1724
|
-
|
|
1723
|
+
O && (h[T] = O);
|
|
1725
1724
|
});
|
|
1726
|
-
const y = Object.keys(h).length ? te(h, l) : "null",
|
|
1727
|
-
if (g("$body = new http\\Message\\Body;"), g(`$body->addForm(${y}, ${
|
|
1725
|
+
const y = Object.keys(h).length ? te(h, l) : "null", S = f.length ? te(f, l) : "null";
|
|
1726
|
+
if (g("$body = new http\\Message\\Body;"), g(`$body->addForm(${y}, ${S});`), st(r, "content-type") && (b = be(r, "content-type")) != null && b.indexOf("boundary")) {
|
|
1728
1727
|
const T = pe(r, "content-type");
|
|
1729
1728
|
T && delete r[T];
|
|
1730
1729
|
}
|
|
1731
|
-
|
|
1730
|
+
v(), j = !0;
|
|
1732
1731
|
break;
|
|
1733
1732
|
}
|
|
1734
1733
|
case "application/json":
|
|
1735
1734
|
g("$body = new http\\Message\\Body;"), g(`$body->append(json_encode(${te(e.jsonObj, l)}));`), j = !0;
|
|
1736
1735
|
break;
|
|
1737
1736
|
default:
|
|
1738
|
-
e.text && (g("$body = new http\\Message\\Body;"), g(`$body->append(${te(e.text)});`),
|
|
1737
|
+
e.text && (g("$body = new http\\Message\\Body;"), g(`$body->append(${te(e.text)});`), v(), j = !0);
|
|
1739
1738
|
}
|
|
1740
|
-
return g(`$request->setRequestUrl(${te(s)});`), g(`$request->setRequestMethod(${te(t)});`), j && (g("$request->setBody($body);"),
|
|
1739
|
+
return g(`$request->setRequestUrl(${te(s)});`), g(`$request->setRequestMethod(${te(t)});`), j && (g("$request->setBody($body);"), v()), Object.keys(o).length && (g(`$request->setQuery(new http\\QueryString(${te(o, l)}));`), v()), Object.keys(r).length && (g(`$request->setHeaders(${te(r, l)});`), v()), Object.keys(i).length && (v(), g(`$client->setCookies(${te(i, l)});`), v()), g("$client->enqueue($request)->send();"), g("$response = $client->getResponse();"), v(), g("echo $response->getBody();"), !c && a && (v(), g("?>")), m();
|
|
1741
1740
|
}
|
|
1742
|
-
},
|
|
1741
|
+
}, Wi = {
|
|
1743
1742
|
info: {
|
|
1744
1743
|
key: "php",
|
|
1745
1744
|
title: "PHP",
|
|
@@ -1747,24 +1746,24 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1747
1746
|
cli: "php %s"
|
|
1748
1747
|
},
|
|
1749
1748
|
clientsById: {
|
|
1750
|
-
curl:
|
|
1751
|
-
guzzle:
|
|
1752
|
-
http1:
|
|
1753
|
-
http2:
|
|
1749
|
+
curl: Hi,
|
|
1750
|
+
guzzle: Mi,
|
|
1751
|
+
http1: zi,
|
|
1752
|
+
http2: Gi
|
|
1754
1753
|
}
|
|
1755
1754
|
}, jo = (e) => ({ method: t, headersObj: o, cookies: i, uriObj: s, fullUrl: n, postData: a, allHeaders: l }) => {
|
|
1756
|
-
const { push: c, join:
|
|
1755
|
+
const { push: c, join: p } = new V();
|
|
1757
1756
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
|
|
1758
1757
|
return "Method not supported";
|
|
1759
|
-
const
|
|
1758
|
+
const v = [], m = Object.keys(o);
|
|
1760
1759
|
return m.length && (c("$headers=@{}"), m.forEach((j) => {
|
|
1761
1760
|
j !== "connection" && c(`$headers.Add("${j}", "${Ge(o[j], { escapeChar: "`" })}")`);
|
|
1762
|
-
}),
|
|
1761
|
+
}), v.push("-Headers $headers")), i.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), i.forEach((j) => {
|
|
1763
1762
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${j.name}'`), c(`$cookie.Value = '${j.value}'`), c(`$cookie.Domain = '${s.host}'`), c("$session.Cookies.Add($cookie)");
|
|
1764
|
-
}),
|
|
1763
|
+
}), v.push("-WebSession $session")), a.text && (v.push(
|
|
1765
1764
|
`-ContentType '${Ge(be(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
1766
|
-
),
|
|
1767
|
-
},
|
|
1765
|
+
), v.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${v.join(" ")}`.trim()), p();
|
|
1766
|
+
}, Ji = {
|
|
1768
1767
|
info: {
|
|
1769
1768
|
key: "restmethod",
|
|
1770
1769
|
title: "Invoke-RestMethod",
|
|
@@ -1773,7 +1772,7 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1773
1772
|
extname: ".ps1"
|
|
1774
1773
|
},
|
|
1775
1774
|
convert: jo("Invoke-RestMethod")
|
|
1776
|
-
},
|
|
1775
|
+
}, Vi = {
|
|
1777
1776
|
info: {
|
|
1778
1777
|
key: "webrequest",
|
|
1779
1778
|
title: "Invoke-WebRequest",
|
|
@@ -1782,15 +1781,15 @@ ${c}${c}`), 1), O.push("],")), v(O.join(), 1), v("]);"), p(), v("$response = cur
|
|
|
1782
1781
|
extname: ".ps1"
|
|
1783
1782
|
},
|
|
1784
1783
|
convert: jo("Invoke-WebRequest")
|
|
1785
|
-
},
|
|
1784
|
+
}, Di = {
|
|
1786
1785
|
info: {
|
|
1787
1786
|
key: "powershell",
|
|
1788
1787
|
title: "Powershell",
|
|
1789
1788
|
default: "webrequest"
|
|
1790
1789
|
},
|
|
1791
1790
|
clientsById: {
|
|
1792
|
-
webrequest:
|
|
1793
|
-
restmethod:
|
|
1791
|
+
webrequest: Vi,
|
|
1792
|
+
restmethod: Ji
|
|
1794
1793
|
}
|
|
1795
1794
|
};
|
|
1796
1795
|
function nn(e, r, t, o, i) {
|
|
@@ -1822,7 +1821,7 @@ var Ie = (e, r, t) => {
|
|
|
1822
1821
|
default:
|
|
1823
1822
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
1824
1823
|
}
|
|
1825
|
-
},
|
|
1824
|
+
}, Ki = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Qi = {
|
|
1826
1825
|
info: {
|
|
1827
1826
|
key: "requests",
|
|
1828
1827
|
title: "Requests",
|
|
@@ -1838,23 +1837,23 @@ var Ie = (e, r, t) => {
|
|
|
1838
1837
|
...i
|
|
1839
1838
|
}, { push: n, blank: a, join: l, addPostProcessor: c } = new V({ indent: s.indent });
|
|
1840
1839
|
n("import requests"), a(), n(`url = "${e}"`), a();
|
|
1841
|
-
const
|
|
1840
|
+
const p = t;
|
|
1842
1841
|
let g = {};
|
|
1843
|
-
const
|
|
1844
|
-
let m = !1, j = !1,
|
|
1842
|
+
const v = {};
|
|
1843
|
+
let m = !1, j = !1, b = !1;
|
|
1845
1844
|
switch (r.mimeType) {
|
|
1846
1845
|
case "application/json":
|
|
1847
|
-
r.jsonObj && (n(`payload = ${Ie(r.jsonObj, s)}`),
|
|
1846
|
+
r.jsonObj && (n(`payload = ${Ie(r.jsonObj, s)}`), b = !0, j = !0);
|
|
1848
1847
|
break;
|
|
1849
1848
|
case "multipart/form-data":
|
|
1850
1849
|
if (!r.params)
|
|
1851
1850
|
break;
|
|
1852
1851
|
if (g = {}, r.params.forEach((y) => {
|
|
1853
|
-
y.fileName ? (y.contentType ?
|
|
1852
|
+
y.fileName ? (y.contentType ? v[y.name] = `('${y.fileName}', open('${y.fileName}', 'rb'), '${y.contentType}')` : v[y.name] = `('${y.fileName}', open('${y.fileName}', 'rb'))`, m = !0) : (g[y.name] = y.value, j = !0);
|
|
1854
1853
|
}), m) {
|
|
1855
|
-
n(`files = ${Ie(
|
|
1856
|
-
const y = pe(
|
|
1857
|
-
y && delete
|
|
1854
|
+
n(`files = ${Ie(v, s)}`), j && n(`payload = ${Ie(g, s)}`);
|
|
1855
|
+
const y = pe(p, "content-type");
|
|
1856
|
+
y && delete p[y];
|
|
1858
1857
|
} else {
|
|
1859
1858
|
const y = JSON.stringify(r.text);
|
|
1860
1859
|
y && (n(`payload = ${y}`), j = !0);
|
|
@@ -1872,23 +1871,23 @@ var Ie = (e, r, t) => {
|
|
|
1872
1871
|
y && (n(`payload = ${y}`), j = !0);
|
|
1873
1872
|
}
|
|
1874
1873
|
}
|
|
1875
|
-
const
|
|
1876
|
-
if (
|
|
1874
|
+
const f = Object.keys(p).length;
|
|
1875
|
+
if (f === 0 && (j || m))
|
|
1877
1876
|
a();
|
|
1878
|
-
else if (
|
|
1879
|
-
Object.keys(
|
|
1880
|
-
n(`headers = {"${y}": "${ce(
|
|
1877
|
+
else if (f === 1)
|
|
1878
|
+
Object.keys(p).forEach((y) => {
|
|
1879
|
+
n(`headers = {"${y}": "${ce(p[y])}"}`), a();
|
|
1881
1880
|
});
|
|
1882
|
-
else if (
|
|
1881
|
+
else if (f > 1) {
|
|
1883
1882
|
let y = 1;
|
|
1884
|
-
n("headers = {"), Object.keys(
|
|
1885
|
-
n(y !==
|
|
1883
|
+
n("headers = {"), Object.keys(p).forEach((S) => {
|
|
1884
|
+
n(y !== f ? `"${S}": "${ce(p[S])}",` : `"${S}": "${ce(p[S])}"`, 1), y += 1;
|
|
1886
1885
|
}), n("}"), a();
|
|
1887
1886
|
}
|
|
1888
|
-
let h =
|
|
1889
|
-
return j && (
|
|
1887
|
+
let h = Ki.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
|
|
1888
|
+
return j && (b ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), f > 0 && (h += ", headers=headers"), h += ")", n(h), a(), n("print(response.text)"), l();
|
|
1890
1889
|
}
|
|
1891
|
-
},
|
|
1890
|
+
}, Yi = {
|
|
1892
1891
|
info: {
|
|
1893
1892
|
key: "python",
|
|
1894
1893
|
title: "Python",
|
|
@@ -1896,9 +1895,9 @@ var Ie = (e, r, t) => {
|
|
|
1896
1895
|
cli: "python3 %s"
|
|
1897
1896
|
},
|
|
1898
1897
|
clientsById: {
|
|
1899
|
-
requests:
|
|
1898
|
+
requests: Qi
|
|
1900
1899
|
}
|
|
1901
|
-
},
|
|
1900
|
+
}, Xi = {
|
|
1902
1901
|
info: {
|
|
1903
1902
|
key: "httr",
|
|
1904
1903
|
title: "httr",
|
|
@@ -1911,9 +1910,9 @@ var Ie = (e, r, t) => {
|
|
|
1911
1910
|
n("library(httr)"), a(), n(`url <- "${e}"`), a();
|
|
1912
1911
|
const c = r;
|
|
1913
1912
|
delete r.key;
|
|
1914
|
-
const
|
|
1915
|
-
t.length === 1 ? (n(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (n("queryString <- list("), Object.keys(c).forEach((d,
|
|
1916
|
-
|
|
1913
|
+
const p = Object.keys(c).length;
|
|
1914
|
+
t.length === 1 ? (n(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), a()) : t.length > 1 && (n("queryString <- list("), Object.keys(c).forEach((d, O) => {
|
|
1915
|
+
O !== p - 1 ? n(` ${d} = "${c[d].toString()}",`) : n(` ${d} = "${c[d].toString()}"`);
|
|
1917
1916
|
}), n(")"), a());
|
|
1918
1917
|
const g = JSON.stringify(o.text);
|
|
1919
1918
|
if (g && (n(`payload <- ${g}`), a()), o.text || o.jsonObj || o.params)
|
|
@@ -1931,22 +1930,22 @@ var Ie = (e, r, t) => {
|
|
|
1931
1930
|
n('encode <- "raw"'), a();
|
|
1932
1931
|
break;
|
|
1933
1932
|
}
|
|
1934
|
-
const
|
|
1935
|
-
let
|
|
1936
|
-
g && (
|
|
1937
|
-
const T = [y,
|
|
1938
|
-
return T && (
|
|
1933
|
+
const v = be(i, "cookie"), m = be(i, "accept"), j = v ? `set_cookies(\`${String(v).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, b = m ? `accept("${ce(m)}")` : void 0, f = `content_type("${ce(o.mimeType)}")`, h = Object.entries(i).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, O]) => `'${d}' = '${We(O)}'`).join(", "), y = h ? `add_headers(${h})` : void 0;
|
|
1934
|
+
let S = `response <- VERB("${s}", url`;
|
|
1935
|
+
g && (S += ", body = payload"), t.length && (S += ", query = queryString");
|
|
1936
|
+
const T = [y, f, b, j].filter((d) => !!d).join(", ");
|
|
1937
|
+
return T && (S += `, ${T}`), (o.text || o.jsonObj || o.params) && (S += ", encode = encode"), S += ")", n(S), a(), n('content(response, "text")'), l();
|
|
1939
1938
|
}
|
|
1940
|
-
},
|
|
1939
|
+
}, Zi = {
|
|
1941
1940
|
info: {
|
|
1942
1941
|
key: "r",
|
|
1943
1942
|
title: "R",
|
|
1944
1943
|
default: "httr"
|
|
1945
1944
|
},
|
|
1946
1945
|
clientsById: {
|
|
1947
|
-
httr:
|
|
1946
|
+
httr: Xi
|
|
1948
1947
|
}
|
|
1949
|
-
},
|
|
1948
|
+
}, es = {
|
|
1950
1949
|
info: {
|
|
1951
1950
|
key: "native",
|
|
1952
1951
|
title: "net::http",
|
|
@@ -1970,23 +1969,23 @@ var Ie = (e, r, t) => {
|
|
|
1970
1969
|
"UNLOCK",
|
|
1971
1970
|
"MOVE",
|
|
1972
1971
|
"TRACE"
|
|
1973
|
-
],
|
|
1974
|
-
c.includes(l) || (s(`class Net::HTTP::${
|
|
1972
|
+
], p = l.charAt(0) + l.substring(1).toLowerCase();
|
|
1973
|
+
c.includes(l) || (s(`class Net::HTTP::${p} < Net::HTTPRequest`), s(` METHOD = '${l.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), n()), s(`url = URI("${t}")`), n(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), n(), s(`request = Net::HTTP::${p}.new(url)`);
|
|
1975
1974
|
const g = Object.keys(i);
|
|
1976
|
-
return g.length && g.forEach((
|
|
1977
|
-
s(`request["${
|
|
1975
|
+
return g.length && g.forEach((v) => {
|
|
1976
|
+
s(`request["${v}"] = '${We(i[v])}'`);
|
|
1978
1977
|
}), o.text && s(`request.body = ${JSON.stringify(o.text)}`), n(), s("response = http.request(request)"), s("puts response.read_body"), a();
|
|
1979
1978
|
}
|
|
1980
|
-
},
|
|
1979
|
+
}, ts = {
|
|
1981
1980
|
info: {
|
|
1982
1981
|
key: "ruby",
|
|
1983
1982
|
title: "Ruby",
|
|
1984
1983
|
default: "native"
|
|
1985
1984
|
},
|
|
1986
1985
|
clientsById: {
|
|
1987
|
-
native:
|
|
1986
|
+
native: es
|
|
1988
1987
|
}
|
|
1989
|
-
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
1988
|
+
}, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, rs = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), ns = {
|
|
1990
1989
|
"http1.0": "0",
|
|
1991
1990
|
"url ": "",
|
|
1992
1991
|
cookie: "b",
|
|
@@ -1996,13 +1995,13 @@ var Ie = (e, r, t) => {
|
|
|
1996
1995
|
header: "H",
|
|
1997
1996
|
insecure: "k",
|
|
1998
1997
|
request: "X"
|
|
1999
|
-
},
|
|
1998
|
+
}, os = (e) => (r) => {
|
|
2000
1999
|
if (e) {
|
|
2001
|
-
const t =
|
|
2000
|
+
const t = ns[r];
|
|
2002
2001
|
return t ? `-${t}` : "";
|
|
2003
2002
|
}
|
|
2004
2003
|
return `--${r}`;
|
|
2005
|
-
},
|
|
2004
|
+
}, as = {
|
|
2006
2005
|
info: {
|
|
2007
2006
|
key: "curl",
|
|
2008
2007
|
title: "cURL",
|
|
@@ -2011,47 +2010,47 @@ var Ie = (e, r, t) => {
|
|
|
2011
2010
|
extname: ".sh"
|
|
2012
2011
|
},
|
|
2013
2012
|
convert: ({ fullUrl: e, method: r, httpVersion: t, headersObj: o, allHeaders: i, postData: s }, n = {}) => {
|
|
2014
|
-
var
|
|
2015
|
-
const { indent: a = " ", short: l = !1, binary: c = !1, globOff:
|
|
2013
|
+
var f;
|
|
2014
|
+
const { indent: a = " ", short: l = !1, binary: c = !1, globOff: p = !1 } = n, g = " ", { push: v, join: m } = new V({
|
|
2016
2015
|
...typeof a == "string" ? { indent: a } : {},
|
|
2017
2016
|
join: a !== !1 ? ` \\
|
|
2018
2017
|
${a}` : " "
|
|
2019
|
-
}), j =
|
|
2020
|
-
let
|
|
2021
|
-
if (
|
|
2018
|
+
}), j = os(l);
|
|
2019
|
+
let b = ue(e);
|
|
2020
|
+
if (v(`curl ${j("request")} ${r}`), p && (b = unescape(b), v(j("globoff"))), v(`${j("url ")}${b}`), t === "HTTP/1.0" && v(j("http1.0")), be(i, "accept-encoding") && v("--compressed"), s.mimeType === "multipart/form-data") {
|
|
2022
2021
|
const h = pe(o, "content-type");
|
|
2023
2022
|
if (h) {
|
|
2024
2023
|
const y = o[h];
|
|
2025
2024
|
if (h && y) {
|
|
2026
|
-
const
|
|
2027
|
-
o[h] =
|
|
2025
|
+
const S = String(y).replace(/; boundary.+?(?=(;|$))/, "");
|
|
2026
|
+
o[h] = S, i[h] = S;
|
|
2028
2027
|
}
|
|
2029
2028
|
}
|
|
2030
2029
|
}
|
|
2031
2030
|
switch (Object.keys(o).sort().forEach((h) => {
|
|
2032
2031
|
const y = `${h}: ${o[h]}`;
|
|
2033
|
-
|
|
2034
|
-
}), i.cookie &&
|
|
2032
|
+
v(`${j("header")} ${ue(y)}`);
|
|
2033
|
+
}), i.cookie && v(`${j("cookie")} ${ue(i.cookie)}`), s.mimeType) {
|
|
2035
2034
|
case "multipart/form-data":
|
|
2036
|
-
(
|
|
2037
|
-
let
|
|
2038
|
-
y.fileName ?
|
|
2035
|
+
(f = s.params) == null || f.forEach((y) => {
|
|
2036
|
+
let S = "";
|
|
2037
|
+
y.fileName ? S = `${y.name}='@${y.fileName}'` : S = ue(`${y.name}=${y.value}`), v(`${j("form")} ${S}`);
|
|
2039
2038
|
});
|
|
2040
2039
|
break;
|
|
2041
2040
|
case "application/x-www-form-urlencoded":
|
|
2042
2041
|
s.params ? s.params.forEach((y) => {
|
|
2043
|
-
const
|
|
2044
|
-
|
|
2045
|
-
}) :
|
|
2042
|
+
const S = y.name, T = encodeURIComponent(y.name), d = T !== S, O = d ? T : S, x = c ? "--data-binary" : d ? "--data-urlencode" : j("data");
|
|
2043
|
+
v(`${x} ${ue(`${O}=${y.value}`)}`);
|
|
2044
|
+
}) : v(`${c ? "--data-binary" : j("data")} ${ue(s.text)}`);
|
|
2046
2045
|
break;
|
|
2047
2046
|
default:
|
|
2048
2047
|
if (!s.text)
|
|
2049
2048
|
break;
|
|
2050
2049
|
let h = !1;
|
|
2051
|
-
if (
|
|
2050
|
+
if (oi(s.mimeType) && s.text.length > 20)
|
|
2052
2051
|
try {
|
|
2053
2052
|
const y = JSON.parse(s.text);
|
|
2054
|
-
h = !0, s.text.indexOf("'") > 0 ?
|
|
2053
|
+
h = !0, s.text.indexOf("'") > 0 ? v(
|
|
2055
2054
|
`${c ? "--data-binary" : j("data")} @- <<EOF
|
|
2056
2055
|
${JSON.stringify(
|
|
2057
2056
|
y,
|
|
@@ -2059,18 +2058,18 @@ ${JSON.stringify(
|
|
|
2059
2058
|
g
|
|
2060
2059
|
)}
|
|
2061
2060
|
EOF`
|
|
2062
|
-
) :
|
|
2061
|
+
) : v(
|
|
2063
2062
|
`${c ? "--data-binary" : j("data")} '
|
|
2064
2063
|
${JSON.stringify(y, null, g)}
|
|
2065
2064
|
'`
|
|
2066
2065
|
);
|
|
2067
2066
|
} catch {
|
|
2068
2067
|
}
|
|
2069
|
-
h ||
|
|
2068
|
+
h || v(`${c ? "--data-binary" : j("data")} ${ue(s.text)}`);
|
|
2070
2069
|
}
|
|
2071
2070
|
return m();
|
|
2072
2071
|
}
|
|
2073
|
-
},
|
|
2072
|
+
}, is = {
|
|
2074
2073
|
info: {
|
|
2075
2074
|
key: "httpie",
|
|
2076
2075
|
title: "HTTPie",
|
|
@@ -2094,32 +2093,32 @@ ${JSON.stringify(y, null, g)}
|
|
|
2094
2093
|
verbose: !1,
|
|
2095
2094
|
verify: !1,
|
|
2096
2095
|
...n
|
|
2097
|
-
}, { push: l, join: c, unshift:
|
|
2096
|
+
}, { push: l, join: c, unshift: p } = new V({
|
|
2098
2097
|
indent: a.indent,
|
|
2099
2098
|
// @ts-expect-error SEEMS LEGIT
|
|
2100
2099
|
join: a.indent !== !1 ? ` \\
|
|
2101
2100
|
${a.indent}` : " "
|
|
2102
2101
|
});
|
|
2103
2102
|
let g = !1;
|
|
2104
|
-
const
|
|
2105
|
-
a.headers &&
|
|
2106
|
-
const
|
|
2107
|
-
Array.isArray(
|
|
2108
|
-
l(`${j}==${ue(
|
|
2109
|
-
}) : l(`${j}==${ue(
|
|
2103
|
+
const v = [];
|
|
2104
|
+
a.headers && v.push(a.short ? "-h" : "--headers"), a.body && v.push(a.short ? "-b" : "--body"), a.verbose && v.push(a.short ? "-v" : "--verbose"), a.print && v.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && v.push(`--verify=${a.verify}`), a.cert && v.push(`--cert=${a.cert}`), a.pretty && v.push(`--pretty=${a.pretty}`), a.style && v.push(`--style=${a.style}`), a.timeout && v.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((j) => {
|
|
2105
|
+
const b = t[j];
|
|
2106
|
+
Array.isArray(b) ? b.forEach((f) => {
|
|
2107
|
+
l(`${j}==${ue(f)}`);
|
|
2108
|
+
}) : l(`${j}==${ue(b)}`);
|
|
2110
2109
|
}), Object.keys(e).sort().forEach((j) => {
|
|
2111
2110
|
l(`${j}:${ue(e[j])}`);
|
|
2112
|
-
}), r.mimeType === "application/x-www-form-urlencoded" ? r.params && r.params.length && (
|
|
2111
|
+
}), r.mimeType === "application/x-www-form-urlencoded" ? r.params && r.params.length && (v.push(a.short ? "-f" : "--form"), r.params.forEach((j) => {
|
|
2113
2112
|
l(`${j.name}=${ue(j.value)}`);
|
|
2114
2113
|
})) : g = !0;
|
|
2115
|
-
const m =
|
|
2116
|
-
if (s = ue(a.queryParams ? s : o),
|
|
2114
|
+
const m = v.length ? `${v.join(" ")} ` : "";
|
|
2115
|
+
if (s = ue(a.queryParams ? s : o), p(`http ${m}${i} ${s}`), g && r.text) {
|
|
2117
2116
|
const j = ue(r.text);
|
|
2118
|
-
|
|
2117
|
+
p(`echo ${j} | `);
|
|
2119
2118
|
}
|
|
2120
2119
|
return c();
|
|
2121
2120
|
}
|
|
2122
|
-
},
|
|
2121
|
+
}, ss = {
|
|
2123
2122
|
info: {
|
|
2124
2123
|
key: "wget",
|
|
2125
2124
|
title: "Wget",
|
|
@@ -2141,9 +2140,9 @@ ${s.indent}` : " "
|
|
|
2141
2140
|
return s.verbose ? n(`wget ${s.short ? "-v" : "--verbose"}`) : n(`wget ${s.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((l) => {
|
|
2142
2141
|
const c = `${l}: ${t[l]}`;
|
|
2143
2142
|
n(`--header ${ue(c)}`);
|
|
2144
|
-
}), r.text && n(`--body-data ${
|
|
2143
|
+
}), r.text && n(`--body-data ${rs(ue(r.text))}`), n(s.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
|
|
2145
2144
|
}
|
|
2146
|
-
},
|
|
2145
|
+
}, ls = {
|
|
2147
2146
|
info: {
|
|
2148
2147
|
key: "shell",
|
|
2149
2148
|
title: "Shell",
|
|
@@ -2151,9 +2150,9 @@ ${s.indent}` : " "
|
|
|
2151
2150
|
cli: "%s"
|
|
2152
2151
|
},
|
|
2153
2152
|
clientsById: {
|
|
2154
|
-
curl:
|
|
2155
|
-
httpie:
|
|
2156
|
-
wget:
|
|
2153
|
+
curl: as,
|
|
2154
|
+
httpie: is,
|
|
2155
|
+
wget: ss
|
|
2157
2156
|
}
|
|
2158
2157
|
}, on = (e, r) => r.repeat(e), an = (e, r, t, o) => {
|
|
2159
2158
|
const i = on(o, t), s = on(o - 1, t), n = r ? `,
|
|
@@ -2188,7 +2187,7 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2188
2187
|
default:
|
|
2189
2188
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2190
2189
|
}
|
|
2191
|
-
},
|
|
2190
|
+
}, cs = {
|
|
2192
2191
|
info: {
|
|
2193
2192
|
key: "urlsession",
|
|
2194
2193
|
title: "URLSession",
|
|
@@ -2197,7 +2196,7 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2197
2196
|
extname: ".swift"
|
|
2198
2197
|
},
|
|
2199
2198
|
convert: ({ allHeaders: e, postData: r, uriObj: t, queryObj: o, method: i }, s) => {
|
|
2200
|
-
var
|
|
2199
|
+
var v;
|
|
2201
2200
|
const n = {
|
|
2202
2201
|
indent: " ",
|
|
2203
2202
|
pretty: !0,
|
|
@@ -2205,11 +2204,11 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2205
2204
|
...s
|
|
2206
2205
|
}, { push: a, blank: l, join: c } = new V({ indent: n.indent });
|
|
2207
2206
|
a("import Foundation"), l();
|
|
2208
|
-
const
|
|
2209
|
-
if (
|
|
2207
|
+
const p = r.text || r.jsonObj || r.params;
|
|
2208
|
+
if (p)
|
|
2210
2209
|
switch (r.mimeType) {
|
|
2211
2210
|
case "application/x-www-form-urlencoded":
|
|
2212
|
-
if ((
|
|
2211
|
+
if ((v = r.params) != null && v.length) {
|
|
2213
2212
|
const m = r.params.map((j) => `"${j.name}": "${j.value}"`);
|
|
2214
2213
|
n.pretty ? (a("let parameters = ["), m.forEach((j) => a(`${j},`, 1)), a("]")) : a(`let parameters = [${m.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), l();
|
|
2215
2214
|
}
|
|
@@ -2226,136 +2225,136 @@ ${s}]` : `[${e.join(n)}]`;
|
|
|
2226
2225
|
a(`let url = URL(string: "${t.href}")!`);
|
|
2227
2226
|
const g = o ? Object.entries(o) : [];
|
|
2228
2227
|
return g.length < 1 ? a("var request = URLRequest(url: url)") : (a("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), a("let queryItems: [URLQueryItem] = ["), g.forEach((m) => {
|
|
2229
|
-
const j = m[0],
|
|
2230
|
-
switch (Object.prototype.toString.call(
|
|
2228
|
+
const j = m[0], b = m[1];
|
|
2229
|
+
switch (Object.prototype.toString.call(b)) {
|
|
2231
2230
|
case "[object String]":
|
|
2232
|
-
a(`URLQueryItem(name: "${j}", value: "${
|
|
2231
|
+
a(`URLQueryItem(name: "${j}", value: "${b}"),`, 1);
|
|
2233
2232
|
break;
|
|
2234
2233
|
case "[object Array]":
|
|
2235
|
-
|
|
2236
|
-
a(`URLQueryItem(name: "${j}", value: "${
|
|
2234
|
+
b.forEach((f) => {
|
|
2235
|
+
a(`URLQueryItem(name: "${j}", value: "${f}"),`, 1);
|
|
2237
2236
|
});
|
|
2238
2237
|
break;
|
|
2239
2238
|
}
|
|
2240
|
-
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${at(e, n)}`),
|
|
2239
|
+
}), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${at(e, n)}`), p && a("request.httpBody = postData"), l(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
|
|
2241
2240
|
}
|
|
2242
|
-
},
|
|
2241
|
+
}, us = {
|
|
2243
2242
|
info: {
|
|
2244
2243
|
key: "swift",
|
|
2245
2244
|
title: "Swift",
|
|
2246
2245
|
default: "urlsession"
|
|
2247
2246
|
},
|
|
2248
2247
|
clientsById: {
|
|
2249
|
-
urlsession:
|
|
2248
|
+
urlsession: cs
|
|
2250
2249
|
}
|
|
2251
|
-
},
|
|
2252
|
-
c:
|
|
2253
|
-
clojure:
|
|
2254
|
-
csharp:
|
|
2255
|
-
go:
|
|
2256
|
-
http:
|
|
2257
|
-
java:
|
|
2258
|
-
javascript:
|
|
2259
|
-
json:
|
|
2260
|
-
kotlin:
|
|
2261
|
-
node:
|
|
2262
|
-
objc:
|
|
2263
|
-
ocaml:
|
|
2264
|
-
php:
|
|
2265
|
-
powershell:
|
|
2266
|
-
python:
|
|
2267
|
-
r:
|
|
2268
|
-
ruby:
|
|
2269
|
-
shell:
|
|
2270
|
-
swift:
|
|
2250
|
+
}, fs = {
|
|
2251
|
+
c: ni,
|
|
2252
|
+
clojure: si,
|
|
2253
|
+
csharp: pi,
|
|
2254
|
+
go: hi,
|
|
2255
|
+
http: mi,
|
|
2256
|
+
java: ji,
|
|
2257
|
+
javascript: Ti,
|
|
2258
|
+
json: Ci,
|
|
2259
|
+
kotlin: ki,
|
|
2260
|
+
node: Li,
|
|
2261
|
+
objc: Fi,
|
|
2262
|
+
ocaml: Bi,
|
|
2263
|
+
php: Wi,
|
|
2264
|
+
powershell: Di,
|
|
2265
|
+
python: Yi,
|
|
2266
|
+
r: Zi,
|
|
2267
|
+
ruby: ts,
|
|
2268
|
+
shell: ls,
|
|
2269
|
+
swift: us
|
|
2271
2270
|
}, Ce = {}, Be = { exports: {} };
|
|
2272
2271
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2273
|
-
var
|
|
2274
|
-
function
|
|
2272
|
+
var ps = Be.exports, ln;
|
|
2273
|
+
function ds() {
|
|
2275
2274
|
return ln || (ln = 1, function(e, r) {
|
|
2276
2275
|
(function(t) {
|
|
2277
2276
|
var o = r && !r.nodeType && r, i = e && !e.nodeType && e, s = typeof rt == "object" && rt;
|
|
2278
2277
|
(s.global === s || s.window === s || s.self === s) && (t = s);
|
|
2279
|
-
var n, a = 2147483647, l = 36, c = 1,
|
|
2278
|
+
var n, a = 2147483647, l = 36, c = 1, p = 26, g = 38, v = 700, m = 72, j = 128, b = "-", f = /^xn--/, h = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
|
|
2280
2279
|
overflow: "Overflow: input needs wider integers to process",
|
|
2281
2280
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2282
2281
|
"invalid-input": "Invalid input"
|
|
2283
|
-
}, T = l - c, d = Math.floor,
|
|
2284
|
-
function
|
|
2285
|
-
throw new RangeError(
|
|
2282
|
+
}, T = l - c, d = Math.floor, O = String.fromCharCode, x;
|
|
2283
|
+
function q(k) {
|
|
2284
|
+
throw new RangeError(S[k]);
|
|
2286
2285
|
}
|
|
2287
|
-
function A(k,
|
|
2288
|
-
for (var
|
|
2289
|
-
C[
|
|
2286
|
+
function A(k, R) {
|
|
2287
|
+
for (var F = k.length, C = []; F--; )
|
|
2288
|
+
C[F] = R(k[F]);
|
|
2290
2289
|
return C;
|
|
2291
2290
|
}
|
|
2292
|
-
function
|
|
2293
|
-
var
|
|
2294
|
-
|
|
2295
|
-
var L = k.split("."), W = A(L,
|
|
2291
|
+
function N(k, R) {
|
|
2292
|
+
var F = k.split("@"), C = "";
|
|
2293
|
+
F.length > 1 && (C = F[0] + "@", k = F[1]), k = k.replace(y, ".");
|
|
2294
|
+
var L = k.split("."), W = A(L, R).join(".");
|
|
2296
2295
|
return C + W;
|
|
2297
2296
|
}
|
|
2298
|
-
function
|
|
2299
|
-
for (var
|
|
2300
|
-
L = k.charCodeAt(
|
|
2301
|
-
return
|
|
2297
|
+
function U(k) {
|
|
2298
|
+
for (var R = [], F = 0, C = k.length, L, W; F < C; )
|
|
2299
|
+
L = k.charCodeAt(F++), L >= 55296 && L <= 56319 && F < C ? (W = k.charCodeAt(F++), (W & 64512) == 56320 ? R.push(((L & 1023) << 10) + (W & 1023) + 65536) : (R.push(L), F--)) : R.push(L);
|
|
2300
|
+
return R;
|
|
2302
2301
|
}
|
|
2303
2302
|
function P(k) {
|
|
2304
|
-
return A(k, function(
|
|
2305
|
-
var
|
|
2306
|
-
return
|
|
2303
|
+
return A(k, function(R) {
|
|
2304
|
+
var F = "";
|
|
2305
|
+
return R > 65535 && (R -= 65536, F += O(R >>> 10 & 1023 | 55296), R = 56320 | R & 1023), F += O(R), F;
|
|
2307
2306
|
}).join("");
|
|
2308
2307
|
}
|
|
2309
2308
|
function ae(k) {
|
|
2310
2309
|
return k - 48 < 10 ? k - 22 : k - 65 < 26 ? k - 65 : k - 97 < 26 ? k - 97 : l;
|
|
2311
2310
|
}
|
|
2312
|
-
function H(k,
|
|
2313
|
-
return k + 22 + 75 * (k < 26) - ((
|
|
2311
|
+
function H(k, R) {
|
|
2312
|
+
return k + 22 + 75 * (k < 26) - ((R != 0) << 5);
|
|
2314
2313
|
}
|
|
2315
|
-
function D(k,
|
|
2314
|
+
function D(k, R, F) {
|
|
2316
2315
|
var C = 0;
|
|
2317
|
-
for (k =
|
|
2316
|
+
for (k = F ? d(k / v) : k >> 1, k += d(k / R); k > T * p >> 1; C += l)
|
|
2318
2317
|
k = d(k / T);
|
|
2319
2318
|
return d(C + (T + 1) * k / (k + g));
|
|
2320
2319
|
}
|
|
2321
2320
|
function le(k) {
|
|
2322
|
-
var
|
|
2323
|
-
for (Q = k.lastIndexOf(
|
|
2324
|
-
k.charCodeAt(ne) >= 128 &&
|
|
2325
|
-
for (J = Q > 0 ? Q + 1 : 0; J <
|
|
2326
|
-
for (I = L,
|
|
2327
|
-
Y = l - G,
|
|
2328
|
-
C =
|
|
2321
|
+
var R = [], F = k.length, C, L = 0, W = j, z = m, Q, ne, J, I, _, B, K, G, Y;
|
|
2322
|
+
for (Q = k.lastIndexOf(b), Q < 0 && (Q = 0), ne = 0; ne < Q; ++ne)
|
|
2323
|
+
k.charCodeAt(ne) >= 128 && q("not-basic"), R.push(k.charCodeAt(ne));
|
|
2324
|
+
for (J = Q > 0 ? Q + 1 : 0; J < F; ) {
|
|
2325
|
+
for (I = L, _ = 1, B = l; J >= F && q("invalid-input"), K = ae(k.charCodeAt(J++)), (K >= l || K > d((a - L) / _)) && q("overflow"), L += K * _, G = B <= z ? c : B >= z + p ? p : B - z, !(K < G); B += l)
|
|
2326
|
+
Y = l - G, _ > d(a / Y) && q("overflow"), _ *= Y;
|
|
2327
|
+
C = R.length + 1, z = D(L - I, C, I == 0), d(L / C) > a - W && q("overflow"), W += d(L / C), L %= C, R.splice(L++, 0, W);
|
|
2329
2328
|
}
|
|
2330
|
-
return P(
|
|
2329
|
+
return P(R);
|
|
2331
2330
|
}
|
|
2332
2331
|
function Z(k) {
|
|
2333
|
-
var
|
|
2334
|
-
for (k =
|
|
2335
|
-
|
|
2336
|
-
for (C = L =
|
|
2332
|
+
var R, F, C, L, W, z, Q, ne, J, I, _, B = [], K, G, Y, oe;
|
|
2333
|
+
for (k = U(k), K = k.length, R = j, F = 0, W = m, z = 0; z < K; ++z)
|
|
2334
|
+
_ = k[z], _ < 128 && B.push(O(_));
|
|
2335
|
+
for (C = L = B.length, L && B.push(b); C < K; ) {
|
|
2337
2336
|
for (Q = a, z = 0; z < K; ++z)
|
|
2338
|
-
|
|
2339
|
-
for (G = C + 1, Q -
|
|
2340
|
-
if (
|
|
2341
|
-
for (ne =
|
|
2342
|
-
oe = ne - I, Y = l - I,
|
|
2343
|
-
|
|
2337
|
+
_ = k[z], _ >= R && _ < Q && (Q = _);
|
|
2338
|
+
for (G = C + 1, Q - R > d((a - F) / G) && q("overflow"), F += (Q - R) * G, R = Q, z = 0; z < K; ++z)
|
|
2339
|
+
if (_ = k[z], _ < R && ++F > a && q("overflow"), _ == R) {
|
|
2340
|
+
for (ne = F, J = l; I = J <= W ? c : J >= W + p ? p : J - W, !(ne < I); J += l)
|
|
2341
|
+
oe = ne - I, Y = l - I, B.push(
|
|
2342
|
+
O(H(I + oe % Y, 0))
|
|
2344
2343
|
), ne = d(oe / Y);
|
|
2345
|
-
|
|
2344
|
+
B.push(O(H(ne, 0))), W = D(F, G, C == L), F = 0, ++C;
|
|
2346
2345
|
}
|
|
2347
|
-
++
|
|
2346
|
+
++F, ++R;
|
|
2348
2347
|
}
|
|
2349
|
-
return
|
|
2348
|
+
return B.join("");
|
|
2350
2349
|
}
|
|
2351
|
-
function
|
|
2352
|
-
return
|
|
2353
|
-
return
|
|
2350
|
+
function E(k) {
|
|
2351
|
+
return N(k, function(R) {
|
|
2352
|
+
return f.test(R) ? le(R.slice(4).toLowerCase()) : R;
|
|
2354
2353
|
});
|
|
2355
2354
|
}
|
|
2356
2355
|
function re(k) {
|
|
2357
|
-
return
|
|
2358
|
-
return h.test(
|
|
2356
|
+
return N(k, function(R) {
|
|
2357
|
+
return h.test(R) ? "xn--" + Z(R) : R;
|
|
2359
2358
|
});
|
|
2360
2359
|
}
|
|
2361
2360
|
if (n = {
|
|
@@ -2373,13 +2372,13 @@ function fs() {
|
|
|
2373
2372
|
* @type Object
|
|
2374
2373
|
*/
|
|
2375
2374
|
ucs2: {
|
|
2376
|
-
decode:
|
|
2375
|
+
decode: U,
|
|
2377
2376
|
encode: P
|
|
2378
2377
|
},
|
|
2379
2378
|
decode: le,
|
|
2380
2379
|
encode: Z,
|
|
2381
2380
|
toASCII: re,
|
|
2382
|
-
toUnicode:
|
|
2381
|
+
toUnicode: E
|
|
2383
2382
|
}, o && i)
|
|
2384
2383
|
if (e.exports == o)
|
|
2385
2384
|
i.exports = n;
|
|
@@ -2388,7 +2387,7 @@ function fs() {
|
|
|
2388
2387
|
n.hasOwnProperty(x) && (o[x] = n[x]);
|
|
2389
2388
|
else
|
|
2390
2389
|
t.punycode = n;
|
|
2391
|
-
})(
|
|
2390
|
+
})(ps);
|
|
2392
2391
|
}(Be, Be.exports)), Be.exports;
|
|
2393
2392
|
}
|
|
2394
2393
|
var St, cn;
|
|
@@ -2396,19 +2395,19 @@ function $o() {
|
|
|
2396
2395
|
return cn || (cn = 1, St = Object), St;
|
|
2397
2396
|
}
|
|
2398
2397
|
var Ot, un;
|
|
2399
|
-
function
|
|
2398
|
+
function hs() {
|
|
2400
2399
|
return un || (un = 1, Ot = Error), Ot;
|
|
2401
2400
|
}
|
|
2402
2401
|
var Tt, fn;
|
|
2403
|
-
function
|
|
2402
|
+
function ys() {
|
|
2404
2403
|
return fn || (fn = 1, Tt = EvalError), Tt;
|
|
2405
2404
|
}
|
|
2406
2405
|
var Pt, pn;
|
|
2407
|
-
function
|
|
2406
|
+
function ms() {
|
|
2408
2407
|
return pn || (pn = 1, Pt = RangeError), Pt;
|
|
2409
2408
|
}
|
|
2410
2409
|
var Ct, dn;
|
|
2411
|
-
function
|
|
2410
|
+
function gs() {
|
|
2412
2411
|
return dn || (dn = 1, Ct = ReferenceError), Ct;
|
|
2413
2412
|
}
|
|
2414
2413
|
var Nt, hn;
|
|
@@ -2420,57 +2419,57 @@ function De() {
|
|
|
2420
2419
|
return yn || (yn = 1, kt = TypeError), kt;
|
|
2421
2420
|
}
|
|
2422
2421
|
var qt, mn;
|
|
2423
|
-
function
|
|
2422
|
+
function vs() {
|
|
2424
2423
|
return mn || (mn = 1, qt = URIError), qt;
|
|
2425
2424
|
}
|
|
2426
2425
|
var Rt, gn;
|
|
2427
|
-
function
|
|
2426
|
+
function bs() {
|
|
2428
2427
|
return gn || (gn = 1, Rt = Math.abs), Rt;
|
|
2429
2428
|
}
|
|
2430
2429
|
var Et, vn;
|
|
2431
|
-
function
|
|
2430
|
+
function xs() {
|
|
2432
2431
|
return vn || (vn = 1, Et = Math.floor), Et;
|
|
2433
2432
|
}
|
|
2434
2433
|
var At, bn;
|
|
2435
|
-
function
|
|
2434
|
+
function js() {
|
|
2436
2435
|
return bn || (bn = 1, At = Math.max), At;
|
|
2437
2436
|
}
|
|
2438
2437
|
var It, xn;
|
|
2439
|
-
function
|
|
2438
|
+
function $s() {
|
|
2440
2439
|
return xn || (xn = 1, It = Math.min), It;
|
|
2441
2440
|
}
|
|
2442
2441
|
var Lt, jn;
|
|
2443
|
-
function
|
|
2442
|
+
function ws() {
|
|
2444
2443
|
return jn || (jn = 1, Lt = Math.pow), Lt;
|
|
2445
2444
|
}
|
|
2446
2445
|
var Ut, $n;
|
|
2447
|
-
function
|
|
2446
|
+
function Ss() {
|
|
2448
2447
|
return $n || ($n = 1, Ut = Math.round), Ut;
|
|
2449
2448
|
}
|
|
2450
2449
|
var Ft, wn;
|
|
2451
|
-
function
|
|
2450
|
+
function Os() {
|
|
2452
2451
|
return wn || (wn = 1, Ft = Number.isNaN || function(r) {
|
|
2453
2452
|
return r !== r;
|
|
2454
2453
|
}), Ft;
|
|
2455
2454
|
}
|
|
2456
2455
|
var _t, Sn;
|
|
2457
|
-
function
|
|
2456
|
+
function Ts() {
|
|
2458
2457
|
if (Sn) return _t;
|
|
2459
2458
|
Sn = 1;
|
|
2460
|
-
var e = /* @__PURE__ */
|
|
2459
|
+
var e = /* @__PURE__ */ Os();
|
|
2461
2460
|
return _t = function(t) {
|
|
2462
2461
|
return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
|
|
2463
2462
|
}, _t;
|
|
2464
2463
|
}
|
|
2465
2464
|
var Bt, On;
|
|
2466
|
-
function
|
|
2465
|
+
function Ps() {
|
|
2467
2466
|
return On || (On = 1, Bt = Object.getOwnPropertyDescriptor), Bt;
|
|
2468
2467
|
}
|
|
2469
2468
|
var Ht, Tn;
|
|
2470
2469
|
function lt() {
|
|
2471
2470
|
if (Tn) return Ht;
|
|
2472
2471
|
Tn = 1;
|
|
2473
|
-
var e = /* @__PURE__ */
|
|
2472
|
+
var e = /* @__PURE__ */ Ps();
|
|
2474
2473
|
if (e)
|
|
2475
2474
|
try {
|
|
2476
2475
|
e([], "length");
|
|
@@ -2493,7 +2492,7 @@ function ct() {
|
|
|
2493
2492
|
return Mt = e, Mt;
|
|
2494
2493
|
}
|
|
2495
2494
|
var zt, Cn;
|
|
2496
|
-
function
|
|
2495
|
+
function Cs() {
|
|
2497
2496
|
return Cn || (Cn = 1, zt = function() {
|
|
2498
2497
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2499
2498
|
return !1;
|
|
@@ -2523,10 +2522,10 @@ function Ts() {
|
|
|
2523
2522
|
}), zt;
|
|
2524
2523
|
}
|
|
2525
2524
|
var Gt, Nn;
|
|
2526
|
-
function
|
|
2525
|
+
function Ns() {
|
|
2527
2526
|
if (Nn) return Gt;
|
|
2528
2527
|
Nn = 1;
|
|
2529
|
-
var e = typeof Symbol < "u" && Symbol, r =
|
|
2528
|
+
var e = typeof Symbol < "u" && Symbol, r = Cs();
|
|
2530
2529
|
return Gt = function() {
|
|
2531
2530
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
2532
2531
|
}, Gt;
|
|
@@ -2543,46 +2542,46 @@ function Oo() {
|
|
|
2543
2542
|
return Jt = e.getPrototypeOf || null, Jt;
|
|
2544
2543
|
}
|
|
2545
2544
|
var Vt, Rn;
|
|
2546
|
-
function
|
|
2545
|
+
function ks() {
|
|
2547
2546
|
if (Rn) return Vt;
|
|
2548
2547
|
Rn = 1;
|
|
2549
2548
|
var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", i = function(l, c) {
|
|
2550
|
-
for (var
|
|
2551
|
-
|
|
2552
|
-
for (var
|
|
2553
|
-
|
|
2554
|
-
return
|
|
2549
|
+
for (var p = [], g = 0; g < l.length; g += 1)
|
|
2550
|
+
p[g] = l[g];
|
|
2551
|
+
for (var v = 0; v < c.length; v += 1)
|
|
2552
|
+
p[v + l.length] = c[v];
|
|
2553
|
+
return p;
|
|
2555
2554
|
}, s = function(l, c) {
|
|
2556
|
-
for (var
|
|
2557
|
-
|
|
2558
|
-
return
|
|
2555
|
+
for (var p = [], g = c, v = 0; g < l.length; g += 1, v += 1)
|
|
2556
|
+
p[v] = l[g];
|
|
2557
|
+
return p;
|
|
2559
2558
|
}, n = function(a, l) {
|
|
2560
|
-
for (var c = "",
|
|
2561
|
-
c += a[
|
|
2559
|
+
for (var c = "", p = 0; p < a.length; p += 1)
|
|
2560
|
+
c += a[p], p + 1 < a.length && (c += l);
|
|
2562
2561
|
return c;
|
|
2563
2562
|
};
|
|
2564
2563
|
return Vt = function(l) {
|
|
2565
2564
|
var c = this;
|
|
2566
2565
|
if (typeof c != "function" || r.apply(c) !== o)
|
|
2567
2566
|
throw new TypeError(e + c);
|
|
2568
|
-
for (var
|
|
2567
|
+
for (var p = s(arguments, 1), g, v = function() {
|
|
2569
2568
|
if (this instanceof g) {
|
|
2570
2569
|
var h = c.apply(
|
|
2571
2570
|
this,
|
|
2572
|
-
i(
|
|
2571
|
+
i(p, arguments)
|
|
2573
2572
|
);
|
|
2574
2573
|
return Object(h) === h ? h : this;
|
|
2575
2574
|
}
|
|
2576
2575
|
return c.apply(
|
|
2577
2576
|
l,
|
|
2578
|
-
i(
|
|
2577
|
+
i(p, arguments)
|
|
2579
2578
|
);
|
|
2580
|
-
}, m = t(0, c.length -
|
|
2581
|
-
j[
|
|
2582
|
-
if (g = Function("binder", "return function (" + n(j, ",") + "){ return binder.apply(this,arguments); }")(
|
|
2583
|
-
var
|
|
2579
|
+
}, m = t(0, c.length - p.length), j = [], b = 0; b < m; b++)
|
|
2580
|
+
j[b] = "$" + b;
|
|
2581
|
+
if (g = Function("binder", "return function (" + n(j, ",") + "){ return binder.apply(this,arguments); }")(v), c.prototype) {
|
|
2582
|
+
var f = function() {
|
|
2584
2583
|
};
|
|
2585
|
-
|
|
2584
|
+
f.prototype = c.prototype, g.prototype = new f(), f.prototype = null;
|
|
2586
2585
|
}
|
|
2587
2586
|
return g;
|
|
2588
2587
|
}, Vt;
|
|
@@ -2591,7 +2590,7 @@ var Dt, En;
|
|
|
2591
2590
|
function Ke() {
|
|
2592
2591
|
if (En) return Dt;
|
|
2593
2592
|
En = 1;
|
|
2594
|
-
var e =
|
|
2593
|
+
var e = ks();
|
|
2595
2594
|
return Dt = Function.prototype.bind || e, Dt;
|
|
2596
2595
|
}
|
|
2597
2596
|
var Kt, An;
|
|
@@ -2603,14 +2602,14 @@ function qr() {
|
|
|
2603
2602
|
return In || (In = 1, Qt = Function.prototype.apply), Qt;
|
|
2604
2603
|
}
|
|
2605
2604
|
var Yt, Ln;
|
|
2606
|
-
function
|
|
2605
|
+
function qs() {
|
|
2607
2606
|
return Ln || (Ln = 1, Yt = typeof Reflect < "u" && Reflect && Reflect.apply), Yt;
|
|
2608
2607
|
}
|
|
2609
2608
|
var Xt, Un;
|
|
2610
2609
|
function To() {
|
|
2611
2610
|
if (Un) return Xt;
|
|
2612
2611
|
Un = 1;
|
|
2613
|
-
var e = Ke(), r = qr(), t = kr(), o =
|
|
2612
|
+
var e = Ke(), r = qr(), t = kr(), o = qs();
|
|
2614
2613
|
return Xt = o || e.call(t, r), Xt;
|
|
2615
2614
|
}
|
|
2616
2615
|
var Zt, Fn;
|
|
@@ -2625,7 +2624,7 @@ function Po() {
|
|
|
2625
2624
|
}, Zt;
|
|
2626
2625
|
}
|
|
2627
2626
|
var er, _n;
|
|
2628
|
-
function
|
|
2627
|
+
function Rs() {
|
|
2629
2628
|
if (_n) return er;
|
|
2630
2629
|
_n = 1;
|
|
2631
2630
|
var e = Po(), r = /* @__PURE__ */ lt(), t;
|
|
@@ -2649,10 +2648,10 @@ function ks() {
|
|
|
2649
2648
|
) : !1, er;
|
|
2650
2649
|
}
|
|
2651
2650
|
var tr, Bn;
|
|
2652
|
-
function
|
|
2651
|
+
function Es() {
|
|
2653
2652
|
if (Bn) return tr;
|
|
2654
2653
|
Bn = 1;
|
|
2655
|
-
var e = So(), r = Oo(), t = /* @__PURE__ */
|
|
2654
|
+
var e = So(), r = Oo(), t = /* @__PURE__ */ Rs();
|
|
2656
2655
|
return tr = e ? function(i) {
|
|
2657
2656
|
return e(i);
|
|
2658
2657
|
} : r ? function(i) {
|
|
@@ -2664,7 +2663,7 @@ function qs() {
|
|
|
2664
2663
|
} : null, tr;
|
|
2665
2664
|
}
|
|
2666
2665
|
var rr, Hn;
|
|
2667
|
-
function
|
|
2666
|
+
function As() {
|
|
2668
2667
|
if (Hn) return rr;
|
|
2669
2668
|
Hn = 1;
|
|
2670
2669
|
var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Ke();
|
|
@@ -2674,12 +2673,12 @@ var nr, Mn;
|
|
|
2674
2673
|
function Rr() {
|
|
2675
2674
|
if (Mn) return nr;
|
|
2676
2675
|
Mn = 1;
|
|
2677
|
-
var e, r = /* @__PURE__ */ $o(), t = /* @__PURE__ */
|
|
2676
|
+
var e, r = /* @__PURE__ */ $o(), t = /* @__PURE__ */ hs(), o = /* @__PURE__ */ ys(), i = /* @__PURE__ */ ms(), s = /* @__PURE__ */ gs(), n = /* @__PURE__ */ wo(), a = /* @__PURE__ */ De(), l = /* @__PURE__ */ vs(), c = /* @__PURE__ */ bs(), p = /* @__PURE__ */ xs(), g = /* @__PURE__ */ js(), v = /* @__PURE__ */ $s(), m = /* @__PURE__ */ ws(), j = /* @__PURE__ */ Ss(), b = /* @__PURE__ */ Ts(), f = Function, h = function(J) {
|
|
2678
2677
|
try {
|
|
2679
|
-
return
|
|
2678
|
+
return f('"use strict"; return (' + J + ").constructor;")();
|
|
2680
2679
|
} catch {
|
|
2681
2680
|
}
|
|
2682
|
-
}, y = /* @__PURE__ */ lt(),
|
|
2681
|
+
}, y = /* @__PURE__ */ lt(), S = /* @__PURE__ */ ct(), T = function() {
|
|
2683
2682
|
throw new a();
|
|
2684
2683
|
}, d = y ? function() {
|
|
2685
2684
|
try {
|
|
@@ -2691,12 +2690,12 @@ function Rr() {
|
|
|
2691
2690
|
return T;
|
|
2692
2691
|
}
|
|
2693
2692
|
}
|
|
2694
|
-
}() : T,
|
|
2693
|
+
}() : T, O = Ns()(), x = Es(), q = Oo(), A = So(), N = qr(), U = kr(), P = {}, ae = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), H = {
|
|
2695
2694
|
__proto__: null,
|
|
2696
2695
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
2697
2696
|
"%Array%": Array,
|
|
2698
2697
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
|
|
2699
|
-
"%ArrayIteratorPrototype%":
|
|
2698
|
+
"%ArrayIteratorPrototype%": O && x ? x([][Symbol.iterator]()) : e,
|
|
2700
2699
|
"%AsyncFromSyncIteratorPrototype%": e,
|
|
2701
2700
|
"%AsyncFunction%": P,
|
|
2702
2701
|
"%AsyncGenerator%": P,
|
|
@@ -2720,17 +2719,17 @@ function Rr() {
|
|
|
2720
2719
|
"%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
|
|
2721
2720
|
"%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
|
|
2722
2721
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
|
|
2723
|
-
"%Function%":
|
|
2722
|
+
"%Function%": f,
|
|
2724
2723
|
"%GeneratorFunction%": P,
|
|
2725
2724
|
"%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
|
|
2726
2725
|
"%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
|
|
2727
2726
|
"%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
|
|
2728
2727
|
"%isFinite%": isFinite,
|
|
2729
2728
|
"%isNaN%": isNaN,
|
|
2730
|
-
"%IteratorPrototype%":
|
|
2729
|
+
"%IteratorPrototype%": O && x ? x(x([][Symbol.iterator]())) : e,
|
|
2731
2730
|
"%JSON%": typeof JSON == "object" ? JSON : e,
|
|
2732
2731
|
"%Map%": typeof Map > "u" ? e : Map,
|
|
2733
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
2732
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !O || !x ? e : x((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2734
2733
|
"%Math%": Math,
|
|
2735
2734
|
"%Number%": Number,
|
|
2736
2735
|
"%Object%": r,
|
|
@@ -2744,11 +2743,11 @@ function Rr() {
|
|
|
2744
2743
|
"%Reflect%": typeof Reflect > "u" ? e : Reflect,
|
|
2745
2744
|
"%RegExp%": RegExp,
|
|
2746
2745
|
"%Set%": typeof Set > "u" ? e : Set,
|
|
2747
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
2746
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !O || !x ? e : x((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2748
2747
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
|
|
2749
2748
|
"%String%": String,
|
|
2750
|
-
"%StringIteratorPrototype%":
|
|
2751
|
-
"%Symbol%":
|
|
2749
|
+
"%StringIteratorPrototype%": O && x ? x(""[Symbol.iterator]()) : e,
|
|
2750
|
+
"%Symbol%": O ? Symbol : e,
|
|
2752
2751
|
"%SyntaxError%": n,
|
|
2753
2752
|
"%ThrowTypeError%": d,
|
|
2754
2753
|
"%TypedArray%": ae,
|
|
@@ -2761,17 +2760,17 @@ function Rr() {
|
|
|
2761
2760
|
"%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
|
|
2762
2761
|
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
|
|
2763
2762
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
|
|
2764
|
-
"%Function.prototype.call%":
|
|
2765
|
-
"%Function.prototype.apply%":
|
|
2766
|
-
"%Object.defineProperty%":
|
|
2767
|
-
"%Object.getPrototypeOf%":
|
|
2763
|
+
"%Function.prototype.call%": U,
|
|
2764
|
+
"%Function.prototype.apply%": N,
|
|
2765
|
+
"%Object.defineProperty%": S,
|
|
2766
|
+
"%Object.getPrototypeOf%": q,
|
|
2768
2767
|
"%Math.abs%": c,
|
|
2769
|
-
"%Math.floor%":
|
|
2768
|
+
"%Math.floor%": p,
|
|
2770
2769
|
"%Math.max%": g,
|
|
2771
|
-
"%Math.min%":
|
|
2770
|
+
"%Math.min%": v,
|
|
2772
2771
|
"%Math.pow%": m,
|
|
2773
2772
|
"%Math.round%": j,
|
|
2774
|
-
"%Math.sign%":
|
|
2773
|
+
"%Math.sign%": b,
|
|
2775
2774
|
"%Reflect.getPrototypeOf%": A
|
|
2776
2775
|
};
|
|
2777
2776
|
if (x)
|
|
@@ -2782,21 +2781,21 @@ function Rr() {
|
|
|
2782
2781
|
H["%Error.prototype%"] = D;
|
|
2783
2782
|
}
|
|
2784
2783
|
var le = function J(I) {
|
|
2785
|
-
var
|
|
2784
|
+
var _;
|
|
2786
2785
|
if (I === "%AsyncFunction%")
|
|
2787
|
-
|
|
2786
|
+
_ = h("async function () {}");
|
|
2788
2787
|
else if (I === "%GeneratorFunction%")
|
|
2789
|
-
|
|
2788
|
+
_ = h("function* () {}");
|
|
2790
2789
|
else if (I === "%AsyncGeneratorFunction%")
|
|
2791
|
-
|
|
2790
|
+
_ = h("async function* () {}");
|
|
2792
2791
|
else if (I === "%AsyncGenerator%") {
|
|
2793
|
-
var
|
|
2794
|
-
|
|
2792
|
+
var B = J("%AsyncGeneratorFunction%");
|
|
2793
|
+
B && (_ = B.prototype);
|
|
2795
2794
|
} else if (I === "%AsyncIteratorPrototype%") {
|
|
2796
2795
|
var K = J("%AsyncGenerator%");
|
|
2797
|
-
K && x && (
|
|
2796
|
+
K && x && (_ = x(K.prototype));
|
|
2798
2797
|
}
|
|
2799
|
-
return H[I] =
|
|
2798
|
+
return H[I] = _, _;
|
|
2800
2799
|
}, Z = {
|
|
2801
2800
|
__proto__: null,
|
|
2802
2801
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
@@ -2850,52 +2849,52 @@ function Rr() {
|
|
|
2850
2849
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2851
2850
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2852
2851
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2853
|
-
},
|
|
2854
|
-
var
|
|
2855
|
-
if (
|
|
2852
|
+
}, E = Ke(), re = /* @__PURE__ */ As(), k = E.call(U, Array.prototype.concat), R = E.call(N, Array.prototype.splice), F = E.call(U, String.prototype.replace), C = E.call(U, String.prototype.slice), L = E.call(U, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, Q = function(I) {
|
|
2853
|
+
var _ = C(I, 0, 1), B = C(I, -1);
|
|
2854
|
+
if (_ === "%" && B !== "%")
|
|
2856
2855
|
throw new n("invalid intrinsic syntax, expected closing `%`");
|
|
2857
|
-
if (
|
|
2856
|
+
if (B === "%" && _ !== "%")
|
|
2858
2857
|
throw new n("invalid intrinsic syntax, expected opening `%`");
|
|
2859
2858
|
var K = [];
|
|
2860
|
-
return
|
|
2861
|
-
K[K.length] = oe ?
|
|
2859
|
+
return F(I, W, function(G, Y, oe, ye) {
|
|
2860
|
+
K[K.length] = oe ? F(ye, z, "$1") : Y || G;
|
|
2862
2861
|
}), K;
|
|
2863
|
-
}, ne = function(I,
|
|
2864
|
-
var
|
|
2865
|
-
if (re(Z,
|
|
2866
|
-
var G = H[
|
|
2867
|
-
if (G === P && (G = le(
|
|
2862
|
+
}, ne = function(I, _) {
|
|
2863
|
+
var B = I, K;
|
|
2864
|
+
if (re(Z, B) && (K = Z[B], B = "%" + K[0] + "%"), re(H, B)) {
|
|
2865
|
+
var G = H[B];
|
|
2866
|
+
if (G === P && (G = le(B)), typeof G > "u" && !_)
|
|
2868
2867
|
throw new a("intrinsic " + I + " exists, but is not available. Please file an issue!");
|
|
2869
2868
|
return {
|
|
2870
2869
|
alias: K,
|
|
2871
|
-
name:
|
|
2870
|
+
name: B,
|
|
2872
2871
|
value: G
|
|
2873
2872
|
};
|
|
2874
2873
|
}
|
|
2875
2874
|
throw new n("intrinsic " + I + " does not exist!");
|
|
2876
2875
|
};
|
|
2877
|
-
return nr = function(I,
|
|
2876
|
+
return nr = function(I, _) {
|
|
2878
2877
|
if (typeof I != "string" || I.length === 0)
|
|
2879
2878
|
throw new a("intrinsic name must be a non-empty string");
|
|
2880
|
-
if (arguments.length > 1 && typeof
|
|
2879
|
+
if (arguments.length > 1 && typeof _ != "boolean")
|
|
2881
2880
|
throw new a('"allowMissing" argument must be a boolean');
|
|
2882
2881
|
if (L(/^%?[^%]*%?$/, I) === null)
|
|
2883
2882
|
throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2884
|
-
var
|
|
2885
|
-
Se && (K = Se[0],
|
|
2886
|
-
for (var ke = 1, Oe = !0; ke <
|
|
2887
|
-
var me =
|
|
2883
|
+
var B = Q(I), K = B.length > 0 ? B[0] : "", G = ne("%" + K + "%", _), Y = G.name, oe = G.value, ye = !1, Se = G.alias;
|
|
2884
|
+
Se && (K = Se[0], R(B, k([0, 1], Se)));
|
|
2885
|
+
for (var ke = 1, Oe = !0; ke < B.length; ke += 1) {
|
|
2886
|
+
var me = B[ke], qe = C(me, 0, 1), Re = C(me, -1);
|
|
2888
2887
|
if ((qe === '"' || qe === "'" || qe === "`" || Re === '"' || Re === "'" || Re === "`") && qe !== Re)
|
|
2889
2888
|
throw new n("property names with quotes must have matching quotes");
|
|
2890
2889
|
if ((me === "constructor" || !Oe) && (ye = !0), K += "." + me, Y = "%" + K + "%", re(H, Y))
|
|
2891
2890
|
oe = H[Y];
|
|
2892
2891
|
else if (oe != null) {
|
|
2893
2892
|
if (!(me in oe)) {
|
|
2894
|
-
if (!
|
|
2893
|
+
if (!_)
|
|
2895
2894
|
throw new a("base intrinsic for " + I + " exists, but the property is not available.");
|
|
2896
2895
|
return;
|
|
2897
2896
|
}
|
|
2898
|
-
if (y && ke + 1 >=
|
|
2897
|
+
if (y && ke + 1 >= B.length) {
|
|
2899
2898
|
var Te = y(oe, me);
|
|
2900
2899
|
Oe = !!Te, Oe && "get" in Te && !("originalValue" in Te.get) ? oe = Te.get : oe = oe[me];
|
|
2901
2900
|
} else
|
|
@@ -2907,7 +2906,7 @@ function Rr() {
|
|
|
2907
2906
|
}, nr;
|
|
2908
2907
|
}
|
|
2909
2908
|
var or = { exports: {} }, ar, zn;
|
|
2910
|
-
function
|
|
2909
|
+
function Is() {
|
|
2911
2910
|
if (zn) return ar;
|
|
2912
2911
|
zn = 1;
|
|
2913
2912
|
var e = /* @__PURE__ */ ct(), r = /* @__PURE__ */ wo(), t = /* @__PURE__ */ De(), o = /* @__PURE__ */ lt();
|
|
@@ -2924,22 +2923,22 @@ function Es() {
|
|
|
2924
2923
|
throw new t("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2925
2924
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2926
2925
|
throw new t("`loose`, if provided, must be a boolean");
|
|
2927
|
-
var l = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null,
|
|
2926
|
+
var l = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, p = arguments.length > 5 ? arguments[5] : null, g = arguments.length > 6 ? arguments[6] : !1, v = !!o && o(s, n);
|
|
2928
2927
|
if (e)
|
|
2929
2928
|
e(s, n, {
|
|
2930
|
-
configurable:
|
|
2931
|
-
enumerable: l === null &&
|
|
2929
|
+
configurable: p === null && v ? v.configurable : !p,
|
|
2930
|
+
enumerable: l === null && v ? v.enumerable : !l,
|
|
2932
2931
|
value: a,
|
|
2933
|
-
writable: c === null &&
|
|
2932
|
+
writable: c === null && v ? v.writable : !c
|
|
2934
2933
|
});
|
|
2935
|
-
else if (g || !l && !c && !
|
|
2934
|
+
else if (g || !l && !c && !p)
|
|
2936
2935
|
s[n] = a;
|
|
2937
2936
|
else
|
|
2938
2937
|
throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2939
2938
|
}, ar;
|
|
2940
2939
|
}
|
|
2941
2940
|
var ir, Gn;
|
|
2942
|
-
function
|
|
2941
|
+
function Ls() {
|
|
2943
2942
|
if (Gn) return ir;
|
|
2944
2943
|
Gn = 1;
|
|
2945
2944
|
var e = /* @__PURE__ */ ct(), r = function() {
|
|
@@ -2956,21 +2955,21 @@ function As() {
|
|
|
2956
2955
|
}, ir = r, ir;
|
|
2957
2956
|
}
|
|
2958
2957
|
var sr, Wn;
|
|
2959
|
-
function
|
|
2958
|
+
function Us() {
|
|
2960
2959
|
if (Wn) return sr;
|
|
2961
2960
|
Wn = 1;
|
|
2962
|
-
var e = /* @__PURE__ */ Rr(), r = /* @__PURE__ */
|
|
2961
|
+
var e = /* @__PURE__ */ Rr(), r = /* @__PURE__ */ Is(), t = /* @__PURE__ */ Ls()(), o = /* @__PURE__ */ lt(), i = /* @__PURE__ */ De(), s = e("%Math.floor%");
|
|
2963
2962
|
return sr = function(a, l) {
|
|
2964
2963
|
if (typeof a != "function")
|
|
2965
2964
|
throw new i("`fn` is not a function");
|
|
2966
2965
|
if (typeof l != "number" || l < 0 || l > 4294967295 || s(l) !== l)
|
|
2967
2966
|
throw new i("`length` must be a positive 32-bit integer");
|
|
2968
|
-
var c = arguments.length > 2 && !!arguments[2],
|
|
2967
|
+
var c = arguments.length > 2 && !!arguments[2], p = !0, g = !0;
|
|
2969
2968
|
if ("length" in a && o) {
|
|
2970
|
-
var
|
|
2971
|
-
|
|
2969
|
+
var v = o(a, "length");
|
|
2970
|
+
v && !v.configurable && (p = !1), v && !v.writable && (g = !1);
|
|
2972
2971
|
}
|
|
2973
|
-
return (
|
|
2972
|
+
return (p || g || !c) && (t ? r(
|
|
2974
2973
|
/** @type {Parameters<define>[0]} */
|
|
2975
2974
|
a,
|
|
2976
2975
|
"length",
|
|
@@ -2986,7 +2985,7 @@ function Is() {
|
|
|
2986
2985
|
}, sr;
|
|
2987
2986
|
}
|
|
2988
2987
|
var lr, Jn;
|
|
2989
|
-
function
|
|
2988
|
+
function Fs() {
|
|
2990
2989
|
if (Jn) return lr;
|
|
2991
2990
|
Jn = 1;
|
|
2992
2991
|
var e = Ke(), r = qr(), t = To();
|
|
@@ -2995,9 +2994,9 @@ function Ls() {
|
|
|
2995
2994
|
}, lr;
|
|
2996
2995
|
}
|
|
2997
2996
|
var Vn;
|
|
2998
|
-
function
|
|
2997
|
+
function _s() {
|
|
2999
2998
|
return Vn || (Vn = 1, function(e) {
|
|
3000
|
-
var r = /* @__PURE__ */
|
|
2999
|
+
var r = /* @__PURE__ */ Us(), t = /* @__PURE__ */ ct(), o = Po(), i = Fs();
|
|
3001
3000
|
e.exports = function(n) {
|
|
3002
3001
|
var a = o(arguments), l = n.length - (arguments.length - 1);
|
|
3003
3002
|
return r(
|
|
@@ -3009,40 +3008,40 @@ function Us() {
|
|
|
3009
3008
|
}(or)), or.exports;
|
|
3010
3009
|
}
|
|
3011
3010
|
var cr, Dn;
|
|
3012
|
-
function
|
|
3011
|
+
function Bs() {
|
|
3013
3012
|
if (Dn) return cr;
|
|
3014
3013
|
Dn = 1;
|
|
3015
|
-
var e = /* @__PURE__ */ Rr(), r =
|
|
3014
|
+
var e = /* @__PURE__ */ Rr(), r = _s(), t = r(e("String.prototype.indexOf"));
|
|
3016
3015
|
return cr = function(i, s) {
|
|
3017
3016
|
var n = e(i, !!s);
|
|
3018
3017
|
return typeof n == "function" && t(i, ".prototype.") > -1 ? r(n) : n;
|
|
3019
3018
|
}, cr;
|
|
3020
3019
|
}
|
|
3021
|
-
const
|
|
3020
|
+
const Hs = {}, Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3022
3021
|
__proto__: null,
|
|
3023
|
-
default:
|
|
3024
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3022
|
+
default: Hs
|
|
3023
|
+
}, Symbol.toStringTag, { value: "Module" })), zs = /* @__PURE__ */ Ia(Ms);
|
|
3025
3024
|
var ur, Kn;
|
|
3026
|
-
function
|
|
3025
|
+
function Gs() {
|
|
3027
3026
|
if (Kn) return ur;
|
|
3028
3027
|
Kn = 1;
|
|
3029
|
-
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && s && typeof s.get == "function" ? s.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null,
|
|
3028
|
+
var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && s && typeof s.get == "function" ? s.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, p = typeof WeakSet == "function" && WeakSet.prototype, g = p ? WeakSet.prototype.has : null, v = typeof WeakRef == "function" && WeakRef.prototype, m = v ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, b = Object.prototype.toString, f = Function.prototype.toString, h = String.prototype.match, y = String.prototype.slice, S = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, O = RegExp.prototype.test, x = Array.prototype.concat, q = Array.prototype.join, A = Array.prototype.slice, N = Math.floor, U = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, le = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function($) {
|
|
3030
3029
|
return $.__proto__;
|
|
3031
3030
|
} : null);
|
|
3032
|
-
function
|
|
3033
|
-
if ($ === 1 / 0 || $ === -1 / 0 || $ !== $ || $ && $ > -1e3 && $ < 1e3 ||
|
|
3031
|
+
function E($, w) {
|
|
3032
|
+
if ($ === 1 / 0 || $ === -1 / 0 || $ !== $ || $ && $ > -1e3 && $ < 1e3 || O.call(/e/, w))
|
|
3034
3033
|
return w;
|
|
3035
3034
|
var X = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
3036
3035
|
if (typeof $ == "number") {
|
|
3037
|
-
var ee = $ < 0 ? -
|
|
3036
|
+
var ee = $ < 0 ? -N(-$) : N($);
|
|
3038
3037
|
if (ee !== $) {
|
|
3039
3038
|
var ie = String(ee), M = y.call(w, ie.length + 1);
|
|
3040
|
-
return
|
|
3039
|
+
return S.call(ie, X, "$&_") + "." + S.call(S.call(M, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
3041
3040
|
}
|
|
3042
3041
|
}
|
|
3043
|
-
return
|
|
3042
|
+
return S.call(w, X, "$&_");
|
|
3044
3043
|
}
|
|
3045
|
-
var re =
|
|
3044
|
+
var re = zs, k = re.custom, R = _(k) ? k : null;
|
|
3046
3045
|
ur = function $(w, X, ee, ie) {
|
|
3047
3046
|
var M = X || {};
|
|
3048
3047
|
if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
|
|
@@ -3069,11 +3068,11 @@ function Ms() {
|
|
|
3069
3068
|
if (w === 0)
|
|
3070
3069
|
return 1 / 0 / w > 0 ? "0" : "-0";
|
|
3071
3070
|
var de = String(w);
|
|
3072
|
-
return Pe ?
|
|
3071
|
+
return Pe ? E(w, de) : de;
|
|
3073
3072
|
}
|
|
3074
3073
|
if (typeof w == "bigint") {
|
|
3075
3074
|
var $e = String(w) + "n";
|
|
3076
|
-
return Pe ?
|
|
3075
|
+
return Pe ? E(w, $e) : $e;
|
|
3077
3076
|
}
|
|
3078
3077
|
var pt = typeof M.depth > "u" ? 5 : M.depth;
|
|
3079
3078
|
if (typeof ee > "u" && (ee = 0), ee >= pt && pt > 0 && typeof w == "object")
|
|
@@ -3094,29 +3093,29 @@ function Ms() {
|
|
|
3094
3093
|
}
|
|
3095
3094
|
if (typeof w == "function" && !z(w)) {
|
|
3096
3095
|
var Ur = oe(w), Fr = Qe(w, ge);
|
|
3097
|
-
return "[Function" + (Ur ? ": " + Ur : " (anonymous)") + "]" + (Fr.length > 0 ? " { " +
|
|
3096
|
+
return "[Function" + (Ur ? ": " + Ur : " (anonymous)") + "]" + (Fr.length > 0 ? " { " + q.call(Fr, ", ") + " }" : "");
|
|
3098
3097
|
}
|
|
3099
|
-
if (
|
|
3100
|
-
var _r = H ?
|
|
3098
|
+
if (_(w)) {
|
|
3099
|
+
var _r = H ? S.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
|
|
3101
3100
|
return typeof w == "object" && !H ? Ue(_r) : _r;
|
|
3102
3101
|
}
|
|
3103
3102
|
if (Re(w)) {
|
|
3104
3103
|
for (var Fe = "<" + d.call(String(w.nodeName)), dt = w.attributes || [], Ye = 0; Ye < dt.length; Ye++)
|
|
3105
|
-
Fe += " " + dt[Ye].name + "=" +
|
|
3104
|
+
Fe += " " + dt[Ye].name + "=" + F(C(dt[Ye].value), "double", M);
|
|
3106
3105
|
return Fe += ">", w.childNodes && w.childNodes.length && (Fe += "..."), Fe += "</" + d.call(String(w.nodeName)) + ">", Fe;
|
|
3107
3106
|
}
|
|
3108
3107
|
if (L(w)) {
|
|
3109
3108
|
if (w.length === 0)
|
|
3110
3109
|
return "[]";
|
|
3111
3110
|
var ht = Qe(w, ge);
|
|
3112
|
-
return Ee && !Lo(ht) ? "[" + ft(ht, Ee) + "]" : "[ " +
|
|
3111
|
+
return Ee && !Lo(ht) ? "[" + ft(ht, Ee) + "]" : "[ " + q.call(ht, ", ") + " ]";
|
|
3113
3112
|
}
|
|
3114
3113
|
if (Q(w)) {
|
|
3115
3114
|
var yt = Qe(w, ge);
|
|
3116
|
-
return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " +
|
|
3115
|
+
return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " + q.call(x.call("[cause]: " + ge(w.cause), yt), ", ") + " }" : yt.length === 0 ? "[" + String(w) + "]" : "{ [" + String(w) + "] " + q.call(yt, ", ") + " }";
|
|
3117
3116
|
}
|
|
3118
3117
|
if (typeof w == "object" && je) {
|
|
3119
|
-
if (
|
|
3118
|
+
if (R && typeof w[R] == "function" && re)
|
|
3120
3119
|
return re(w, { depth: pt - ee });
|
|
3121
3120
|
if (je !== "symbol" && typeof w.inspect == "function")
|
|
3122
3121
|
return w.inspect();
|
|
@@ -3141,8 +3140,8 @@ function Ms() {
|
|
|
3141
3140
|
return ut("WeakRef");
|
|
3142
3141
|
if (J(w))
|
|
3143
3142
|
return Ue(ge(Number(w)));
|
|
3144
|
-
if (
|
|
3145
|
-
return Ue(ge(
|
|
3143
|
+
if (B(w))
|
|
3144
|
+
return Ue(ge(U.call(w)));
|
|
3146
3145
|
if (I(w))
|
|
3147
3146
|
return Ue(j.call(w));
|
|
3148
3147
|
if (ne(w))
|
|
@@ -3152,17 +3151,17 @@ function Ms() {
|
|
|
3152
3151
|
if (typeof globalThis < "u" && w === globalThis || typeof rt < "u" && w === rt)
|
|
3153
3152
|
return "{ [object globalThis] }";
|
|
3154
3153
|
if (!W(w) && !z(w)) {
|
|
3155
|
-
var mt = Qe(w, ge), Mr = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, gt = w instanceof Object ? "" : "null prototype", zr = !Mr && D && Object(w) === w && D in w ? y.call(Y(w), 8, -1) : gt ? "Object" : "", Fo = Mr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", vt = Fo + (zr || gt ? "[" +
|
|
3156
|
-
return mt.length === 0 ? vt + "{}" : Ee ? vt + "{" + ft(mt, Ee) + "}" : vt + "{ " +
|
|
3154
|
+
var mt = Qe(w, ge), Mr = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, gt = w instanceof Object ? "" : "null prototype", zr = !Mr && D && Object(w) === w && D in w ? y.call(Y(w), 8, -1) : gt ? "Object" : "", Fo = Mr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", vt = Fo + (zr || gt ? "[" + q.call(x.call([], zr || [], gt || []), ": ") + "] " : "");
|
|
3155
|
+
return mt.length === 0 ? vt + "{}" : Ee ? vt + "{" + ft(mt, Ee) + "}" : vt + "{ " + q.call(mt, ", ") + " }";
|
|
3157
3156
|
}
|
|
3158
3157
|
return String(w);
|
|
3159
3158
|
};
|
|
3160
|
-
function
|
|
3159
|
+
function F($, w, X) {
|
|
3161
3160
|
var ee = (X.quoteStyle || w) === "double" ? '"' : "'";
|
|
3162
3161
|
return ee + $ + ee;
|
|
3163
3162
|
}
|
|
3164
3163
|
function C($) {
|
|
3165
|
-
return
|
|
3164
|
+
return S.call(String($), /"/g, """);
|
|
3166
3165
|
}
|
|
3167
3166
|
function L($) {
|
|
3168
3167
|
return Y($) === "[object Array]" && (!D || !(typeof $ == "object" && D in $));
|
|
@@ -3185,7 +3184,7 @@ function Ms() {
|
|
|
3185
3184
|
function I($) {
|
|
3186
3185
|
return Y($) === "[object Boolean]" && (!D || !(typeof $ == "object" && D in $));
|
|
3187
3186
|
}
|
|
3188
|
-
function
|
|
3187
|
+
function _($) {
|
|
3189
3188
|
if (H)
|
|
3190
3189
|
return $ && typeof $ == "object" && $ instanceof Symbol;
|
|
3191
3190
|
if (typeof $ == "symbol")
|
|
@@ -3198,11 +3197,11 @@ function Ms() {
|
|
|
3198
3197
|
}
|
|
3199
3198
|
return !1;
|
|
3200
3199
|
}
|
|
3201
|
-
function
|
|
3202
|
-
if (!$ || typeof $ != "object" || !
|
|
3200
|
+
function B($) {
|
|
3201
|
+
if (!$ || typeof $ != "object" || !U)
|
|
3203
3202
|
return !1;
|
|
3204
3203
|
try {
|
|
3205
|
-
return
|
|
3204
|
+
return U.call($), !0;
|
|
3206
3205
|
} catch {
|
|
3207
3206
|
}
|
|
3208
3207
|
return !1;
|
|
@@ -3214,12 +3213,12 @@ function Ms() {
|
|
|
3214
3213
|
return K.call($, w);
|
|
3215
3214
|
}
|
|
3216
3215
|
function Y($) {
|
|
3217
|
-
return
|
|
3216
|
+
return b.call($);
|
|
3218
3217
|
}
|
|
3219
3218
|
function oe($) {
|
|
3220
3219
|
if ($.name)
|
|
3221
3220
|
return $.name;
|
|
3222
|
-
var w = h.call(
|
|
3221
|
+
var w = h.call(f.call($), /^function\s*([\w$]+)/);
|
|
3223
3222
|
return w ? w[1] : null;
|
|
3224
3223
|
}
|
|
3225
3224
|
function ye($, w) {
|
|
@@ -3307,8 +3306,8 @@ function Ms() {
|
|
|
3307
3306
|
var X = $.length - w.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
|
|
3308
3307
|
return Te(y.call($, 0, w.maxStringLength), w) + ee;
|
|
3309
3308
|
}
|
|
3310
|
-
var ie =
|
|
3311
|
-
return
|
|
3309
|
+
var ie = S.call(S.call($, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Io);
|
|
3310
|
+
return F(ie, "single", w);
|
|
3312
3311
|
}
|
|
3313
3312
|
function Io($) {
|
|
3314
3313
|
var w = $.charCodeAt(0), X = {
|
|
@@ -3327,7 +3326,7 @@ function Ms() {
|
|
|
3327
3326
|
return $ + " { ? }";
|
|
3328
3327
|
}
|
|
3329
3328
|
function Lr($, w, X, ee) {
|
|
3330
|
-
var ie = ee ? ft(X, ee) :
|
|
3329
|
+
var ie = ee ? ft(X, ee) : q.call(X, ", ");
|
|
3331
3330
|
return $ + " (" + w + ") {" + ie + "}";
|
|
3332
3331
|
}
|
|
3333
3332
|
function Lo($) {
|
|
@@ -3342,12 +3341,12 @@ function Ms() {
|
|
|
3342
3341
|
if ($.indent === " ")
|
|
3343
3342
|
X = " ";
|
|
3344
3343
|
else if (typeof $.indent == "number" && $.indent > 0)
|
|
3345
|
-
X =
|
|
3344
|
+
X = q.call(Array($.indent + 1), " ");
|
|
3346
3345
|
else
|
|
3347
3346
|
return null;
|
|
3348
3347
|
return {
|
|
3349
3348
|
base: X,
|
|
3350
|
-
prev:
|
|
3349
|
+
prev: q.call(Array(w + 1), X)
|
|
3351
3350
|
};
|
|
3352
3351
|
}
|
|
3353
3352
|
function ft($, w) {
|
|
@@ -3355,7 +3354,7 @@ function Ms() {
|
|
|
3355
3354
|
return "";
|
|
3356
3355
|
var X = `
|
|
3357
3356
|
` + w.prev + w.base;
|
|
3358
|
-
return X +
|
|
3357
|
+
return X + q.call($, "," + X) + `
|
|
3359
3358
|
` + w.prev;
|
|
3360
3359
|
}
|
|
3361
3360
|
function Qe($, w) {
|
|
@@ -3372,7 +3371,7 @@ function Ms() {
|
|
|
3372
3371
|
je["$" + M[Pe]] = M[Pe];
|
|
3373
3372
|
}
|
|
3374
3373
|
for (var de in $)
|
|
3375
|
-
G($, de) && (X && String(Number(de)) === de && de < $.length || H && je["$" + de] instanceof Symbol || (
|
|
3374
|
+
G($, de) && (X && String(Number(de)) === de && de < $.length || H && je["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(w(de, $) + ": " + w($[de], $)) : ee.push(de + ": " + w($[de], $))));
|
|
3376
3375
|
if (typeof P == "function")
|
|
3377
3376
|
for (var $e = 0; $e < M.length; $e++)
|
|
3378
3377
|
le.call($, M[$e]) && ee.push("[" + w(M[$e]) + "]: " + w($[M[$e]], $));
|
|
@@ -3381,31 +3380,31 @@ function Ms() {
|
|
|
3381
3380
|
return ur;
|
|
3382
3381
|
}
|
|
3383
3382
|
var fr, Qn;
|
|
3384
|
-
function
|
|
3383
|
+
function Ws() {
|
|
3385
3384
|
if (Qn) return fr;
|
|
3386
3385
|
Qn = 1;
|
|
3387
|
-
var e = /* @__PURE__ */ Rr(), r =
|
|
3388
|
-
for (var y =
|
|
3389
|
-
if (
|
|
3390
|
-
return y.next =
|
|
3391
|
-
|
|
3392
|
-
}, m = function(
|
|
3393
|
-
var y =
|
|
3386
|
+
var e = /* @__PURE__ */ Rr(), r = Bs(), t = /* @__PURE__ */ Gs(), o = /* @__PURE__ */ De(), i = e("%WeakMap%", !0), s = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), l = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), p = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), v = function(f, h) {
|
|
3387
|
+
for (var y = f, S; (S = y.next) !== null; y = S)
|
|
3388
|
+
if (S.key === h)
|
|
3389
|
+
return y.next = S.next, S.next = /** @type {NonNullable<typeof list.next>} */
|
|
3390
|
+
f.next, f.next = S, S;
|
|
3391
|
+
}, m = function(f, h) {
|
|
3392
|
+
var y = v(f, h);
|
|
3394
3393
|
return y && y.value;
|
|
3395
|
-
}, j = function(
|
|
3396
|
-
var
|
|
3397
|
-
|
|
3394
|
+
}, j = function(f, h, y) {
|
|
3395
|
+
var S = v(f, h);
|
|
3396
|
+
S ? S.value = y : f.next = /** @type {import('.').ListNode<typeof value>} */
|
|
3398
3397
|
{
|
|
3399
3398
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
3400
3399
|
key: h,
|
|
3401
|
-
next:
|
|
3400
|
+
next: f.next,
|
|
3402
3401
|
value: y
|
|
3403
3402
|
};
|
|
3404
|
-
},
|
|
3405
|
-
return !!
|
|
3403
|
+
}, b = function(f, h) {
|
|
3404
|
+
return !!v(f, h);
|
|
3406
3405
|
};
|
|
3407
3406
|
return fr = function() {
|
|
3408
|
-
var h, y,
|
|
3407
|
+
var h, y, S, T = {
|
|
3409
3408
|
assert: function(d) {
|
|
3410
3409
|
if (!T.has(d))
|
|
3411
3410
|
throw new o("Side channel does not contain " + t(d));
|
|
@@ -3417,8 +3416,8 @@ function zs() {
|
|
|
3417
3416
|
} else if (s) {
|
|
3418
3417
|
if (y)
|
|
3419
3418
|
return c(y, d);
|
|
3420
|
-
} else if (
|
|
3421
|
-
return m(
|
|
3419
|
+
} else if (S)
|
|
3420
|
+
return m(S, d);
|
|
3422
3421
|
},
|
|
3423
3422
|
has: function(d) {
|
|
3424
3423
|
if (i && d && (typeof d == "object" || typeof d == "function")) {
|
|
@@ -3427,12 +3426,12 @@ function zs() {
|
|
|
3427
3426
|
} else if (s) {
|
|
3428
3427
|
if (y)
|
|
3429
3428
|
return g(y, d);
|
|
3430
|
-
} else if (
|
|
3431
|
-
return
|
|
3429
|
+
} else if (S)
|
|
3430
|
+
return b(S, d);
|
|
3432
3431
|
return !1;
|
|
3433
3432
|
},
|
|
3434
|
-
set: function(d,
|
|
3435
|
-
i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d,
|
|
3433
|
+
set: function(d, O) {
|
|
3434
|
+
i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d, O)) : s ? (y || (y = new s()), p(y, d, O)) : (S || (S = { key: {}, next: null }), j(S, d, O));
|
|
3436
3435
|
}
|
|
3437
3436
|
};
|
|
3438
3437
|
return T;
|
|
@@ -3465,30 +3464,30 @@ function Co() {
|
|
|
3465
3464
|
if (Xn) return dr;
|
|
3466
3465
|
Xn = 1;
|
|
3467
3466
|
var e = /* @__PURE__ */ Er(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
|
|
3468
|
-
for (var
|
|
3469
|
-
|
|
3470
|
-
return
|
|
3467
|
+
for (var f = [], h = 0; h < 256; ++h)
|
|
3468
|
+
f.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
|
|
3469
|
+
return f;
|
|
3471
3470
|
}(), i = function(h) {
|
|
3472
3471
|
for (; h.length > 1; ) {
|
|
3473
|
-
var y = h.pop(),
|
|
3474
|
-
if (t(
|
|
3475
|
-
for (var T = [], d = 0; d <
|
|
3476
|
-
typeof
|
|
3472
|
+
var y = h.pop(), S = y.obj[y.prop];
|
|
3473
|
+
if (t(S)) {
|
|
3474
|
+
for (var T = [], d = 0; d < S.length; ++d)
|
|
3475
|
+
typeof S[d] < "u" && T.push(S[d]);
|
|
3477
3476
|
y.obj[y.prop] = T;
|
|
3478
3477
|
}
|
|
3479
3478
|
}
|
|
3480
3479
|
}, s = function(h, y) {
|
|
3481
|
-
for (var
|
|
3482
|
-
typeof h[T] < "u" && (
|
|
3483
|
-
return
|
|
3484
|
-
}, n = function
|
|
3480
|
+
for (var S = y && y.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < h.length; ++T)
|
|
3481
|
+
typeof h[T] < "u" && (S[T] = h[T]);
|
|
3482
|
+
return S;
|
|
3483
|
+
}, n = function f(h, y, S) {
|
|
3485
3484
|
if (!y)
|
|
3486
3485
|
return h;
|
|
3487
3486
|
if (typeof y != "object") {
|
|
3488
3487
|
if (t(h))
|
|
3489
3488
|
h.push(y);
|
|
3490
3489
|
else if (h && typeof h == "object")
|
|
3491
|
-
(
|
|
3490
|
+
(S && (S.plainObjects || S.allowPrototypes) || !r.call(Object.prototype, y)) && (h[y] = !0);
|
|
3492
3491
|
else
|
|
3493
3492
|
return [h, y];
|
|
3494
3493
|
return h;
|
|
@@ -3496,79 +3495,79 @@ function Co() {
|
|
|
3496
3495
|
if (!h || typeof h != "object")
|
|
3497
3496
|
return [h].concat(y);
|
|
3498
3497
|
var T = h;
|
|
3499
|
-
return t(h) && !t(y) && (T = s(h,
|
|
3500
|
-
if (r.call(h,
|
|
3501
|
-
var x = h[
|
|
3502
|
-
x && typeof x == "object" && d && typeof d == "object" ? h[
|
|
3498
|
+
return t(h) && !t(y) && (T = s(h, S)), t(h) && t(y) ? (y.forEach(function(d, O) {
|
|
3499
|
+
if (r.call(h, O)) {
|
|
3500
|
+
var x = h[O];
|
|
3501
|
+
x && typeof x == "object" && d && typeof d == "object" ? h[O] = f(x, d, S) : h.push(d);
|
|
3503
3502
|
} else
|
|
3504
|
-
h[
|
|
3505
|
-
}), h) : Object.keys(y).reduce(function(d,
|
|
3506
|
-
var x = y[
|
|
3507
|
-
return r.call(d,
|
|
3503
|
+
h[O] = d;
|
|
3504
|
+
}), h) : Object.keys(y).reduce(function(d, O) {
|
|
3505
|
+
var x = y[O];
|
|
3506
|
+
return r.call(d, O) ? d[O] = f(d[O], x, S) : d[O] = x, d;
|
|
3508
3507
|
}, T);
|
|
3509
3508
|
}, a = function(h, y) {
|
|
3510
|
-
return Object.keys(y).reduce(function(
|
|
3511
|
-
return
|
|
3509
|
+
return Object.keys(y).reduce(function(S, T) {
|
|
3510
|
+
return S[T] = y[T], S;
|
|
3512
3511
|
}, h);
|
|
3513
|
-
}, l = function(
|
|
3514
|
-
var
|
|
3512
|
+
}, l = function(f, h, y) {
|
|
3513
|
+
var S = f.replace(/\+/g, " ");
|
|
3515
3514
|
if (y === "iso-8859-1")
|
|
3516
|
-
return
|
|
3515
|
+
return S.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
3517
3516
|
try {
|
|
3518
|
-
return decodeURIComponent(
|
|
3517
|
+
return decodeURIComponent(S);
|
|
3519
3518
|
} catch {
|
|
3520
|
-
return
|
|
3519
|
+
return S;
|
|
3521
3520
|
}
|
|
3522
|
-
}, c = 1024,
|
|
3521
|
+
}, c = 1024, p = function(h, y, S, T, d) {
|
|
3523
3522
|
if (h.length === 0)
|
|
3524
3523
|
return h;
|
|
3525
|
-
var
|
|
3526
|
-
if (typeof h == "symbol" ?
|
|
3527
|
-
return escape(
|
|
3524
|
+
var O = h;
|
|
3525
|
+
if (typeof h == "symbol" ? O = Symbol.prototype.toString.call(h) : typeof h != "string" && (O = String(h)), S === "iso-8859-1")
|
|
3526
|
+
return escape(O).replace(/%u[0-9a-f]{4}/gi, function(ae) {
|
|
3528
3527
|
return "%26%23" + parseInt(ae.slice(2), 16) + "%3B";
|
|
3529
3528
|
});
|
|
3530
|
-
for (var x = "",
|
|
3531
|
-
for (var A =
|
|
3532
|
-
var P = A.charCodeAt(
|
|
3529
|
+
for (var x = "", q = 0; q < O.length; q += c) {
|
|
3530
|
+
for (var A = O.length >= c ? O.slice(q, q + c) : O, N = [], U = 0; U < A.length; ++U) {
|
|
3531
|
+
var P = A.charCodeAt(U);
|
|
3533
3532
|
if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || d === e.RFC1738 && (P === 40 || P === 41)) {
|
|
3534
|
-
|
|
3533
|
+
N[N.length] = A.charAt(U);
|
|
3535
3534
|
continue;
|
|
3536
3535
|
}
|
|
3537
3536
|
if (P < 128) {
|
|
3538
|
-
|
|
3537
|
+
N[N.length] = o[P];
|
|
3539
3538
|
continue;
|
|
3540
3539
|
}
|
|
3541
3540
|
if (P < 2048) {
|
|
3542
|
-
|
|
3541
|
+
N[N.length] = o[192 | P >> 6] + o[128 | P & 63];
|
|
3543
3542
|
continue;
|
|
3544
3543
|
}
|
|
3545
3544
|
if (P < 55296 || P >= 57344) {
|
|
3546
|
-
|
|
3545
|
+
N[N.length] = o[224 | P >> 12] + o[128 | P >> 6 & 63] + o[128 | P & 63];
|
|
3547
3546
|
continue;
|
|
3548
3547
|
}
|
|
3549
|
-
|
|
3548
|
+
U += 1, P = 65536 + ((P & 1023) << 10 | A.charCodeAt(U) & 1023), N[N.length] = o[240 | P >> 18] + o[128 | P >> 12 & 63] + o[128 | P >> 6 & 63] + o[128 | P & 63];
|
|
3550
3549
|
}
|
|
3551
|
-
x +=
|
|
3550
|
+
x += N.join("");
|
|
3552
3551
|
}
|
|
3553
3552
|
return x;
|
|
3554
3553
|
}, g = function(h) {
|
|
3555
|
-
for (var y = [{ obj: { o: h }, prop: "o" }],
|
|
3556
|
-
for (var d = y[T],
|
|
3557
|
-
var A = x[
|
|
3558
|
-
typeof
|
|
3554
|
+
for (var y = [{ obj: { o: h }, prop: "o" }], S = [], T = 0; T < y.length; ++T)
|
|
3555
|
+
for (var d = y[T], O = d.obj[d.prop], x = Object.keys(O), q = 0; q < x.length; ++q) {
|
|
3556
|
+
var A = x[q], N = O[A];
|
|
3557
|
+
typeof N == "object" && N !== null && S.indexOf(N) === -1 && (y.push({ obj: O, prop: A }), S.push(N));
|
|
3559
3558
|
}
|
|
3560
3559
|
return i(y), h;
|
|
3561
|
-
},
|
|
3560
|
+
}, v = function(h) {
|
|
3562
3561
|
return Object.prototype.toString.call(h) === "[object RegExp]";
|
|
3563
3562
|
}, m = function(h) {
|
|
3564
3563
|
return !h || typeof h != "object" ? !1 : !!(h.constructor && h.constructor.isBuffer && h.constructor.isBuffer(h));
|
|
3565
3564
|
}, j = function(h, y) {
|
|
3566
3565
|
return [].concat(h, y);
|
|
3567
|
-
},
|
|
3566
|
+
}, b = function(h, y) {
|
|
3568
3567
|
if (t(h)) {
|
|
3569
|
-
for (var
|
|
3570
|
-
|
|
3571
|
-
return
|
|
3568
|
+
for (var S = [], T = 0; T < h.length; T += 1)
|
|
3569
|
+
S.push(y(h[T]));
|
|
3570
|
+
return S;
|
|
3572
3571
|
}
|
|
3573
3572
|
return y(h);
|
|
3574
3573
|
};
|
|
@@ -3578,31 +3577,31 @@ function Co() {
|
|
|
3578
3577
|
combine: j,
|
|
3579
3578
|
compact: g,
|
|
3580
3579
|
decode: l,
|
|
3581
|
-
encode:
|
|
3580
|
+
encode: p,
|
|
3582
3581
|
isBuffer: m,
|
|
3583
|
-
isRegExp:
|
|
3584
|
-
maybeMap:
|
|
3582
|
+
isRegExp: v,
|
|
3583
|
+
maybeMap: b,
|
|
3585
3584
|
merge: n
|
|
3586
3585
|
}, dr;
|
|
3587
3586
|
}
|
|
3588
3587
|
var hr, Zn;
|
|
3589
|
-
function
|
|
3588
|
+
function Js() {
|
|
3590
3589
|
if (Zn) return hr;
|
|
3591
3590
|
Zn = 1;
|
|
3592
|
-
var e =
|
|
3593
|
-
brackets: function(
|
|
3594
|
-
return
|
|
3591
|
+
var e = Ws(), r = /* @__PURE__ */ Co(), t = /* @__PURE__ */ Er(), o = Object.prototype.hasOwnProperty, i = {
|
|
3592
|
+
brackets: function(f) {
|
|
3593
|
+
return f + "[]";
|
|
3595
3594
|
},
|
|
3596
3595
|
comma: "comma",
|
|
3597
|
-
indices: function(
|
|
3598
|
-
return
|
|
3596
|
+
indices: function(f, h) {
|
|
3597
|
+
return f + "[" + h + "]";
|
|
3599
3598
|
},
|
|
3600
|
-
repeat: function(
|
|
3601
|
-
return
|
|
3599
|
+
repeat: function(f) {
|
|
3600
|
+
return f;
|
|
3602
3601
|
}
|
|
3603
|
-
}, s = Array.isArray, n = Array.prototype.push, a = function(
|
|
3604
|
-
n.apply(
|
|
3605
|
-
}, l = Date.prototype.toISOString, c = t.default,
|
|
3602
|
+
}, s = Array.isArray, n = Array.prototype.push, a = function(b, f) {
|
|
3603
|
+
n.apply(b, s(f) ? f : [f]);
|
|
3604
|
+
}, l = Date.prototype.toISOString, c = t.default, p = {
|
|
3606
3605
|
addQueryPrefix: !1,
|
|
3607
3606
|
allowDots: !1,
|
|
3608
3607
|
allowEmptyArrays: !1,
|
|
@@ -3618,71 +3617,71 @@ function Gs() {
|
|
|
3618
3617
|
formatter: t.formatters[c],
|
|
3619
3618
|
// deprecated
|
|
3620
3619
|
indices: !1,
|
|
3621
|
-
serializeDate: function(
|
|
3622
|
-
return l.call(
|
|
3620
|
+
serializeDate: function(f) {
|
|
3621
|
+
return l.call(f);
|
|
3623
3622
|
},
|
|
3624
3623
|
skipNulls: !1,
|
|
3625
3624
|
strictNullHandling: !1
|
|
3626
|
-
}, g = function(
|
|
3627
|
-
return typeof
|
|
3628
|
-
},
|
|
3629
|
-
for (var
|
|
3630
|
-
var
|
|
3631
|
-
if (k += 1, typeof
|
|
3632
|
-
if (
|
|
3625
|
+
}, g = function(f) {
|
|
3626
|
+
return typeof f == "string" || typeof f == "number" || typeof f == "boolean" || typeof f == "symbol" || typeof f == "bigint";
|
|
3627
|
+
}, v = {}, m = function b(f, h, y, S, T, d, O, x, q, A, N, U, P, ae, H, D, le, Z) {
|
|
3628
|
+
for (var E = f, re = Z, k = 0, R = !1; (re = re.get(v)) !== void 0 && !R; ) {
|
|
3629
|
+
var F = re.get(f);
|
|
3630
|
+
if (k += 1, typeof F < "u") {
|
|
3631
|
+
if (F === k)
|
|
3633
3632
|
throw new RangeError("Cyclic object value");
|
|
3634
|
-
|
|
3633
|
+
R = !0;
|
|
3635
3634
|
}
|
|
3636
|
-
typeof re.get(
|
|
3635
|
+
typeof re.get(v) > "u" && (k = 0);
|
|
3637
3636
|
}
|
|
3638
|
-
if (typeof A == "function" ?
|
|
3637
|
+
if (typeof A == "function" ? E = A(h, E) : E instanceof Date ? E = P(E) : y === "comma" && s(E) && (E = r.maybeMap(E, function(Y) {
|
|
3639
3638
|
return Y instanceof Date ? P(Y) : Y;
|
|
3640
|
-
})),
|
|
3639
|
+
})), E === null) {
|
|
3641
3640
|
if (d)
|
|
3642
|
-
return
|
|
3643
|
-
|
|
3641
|
+
return q && !D ? q(h, p.encoder, le, "key", ae) : h;
|
|
3642
|
+
E = "";
|
|
3644
3643
|
}
|
|
3645
|
-
if (g(
|
|
3646
|
-
if (
|
|
3647
|
-
var C = D ? h :
|
|
3648
|
-
return [H(C) + "=" + H(
|
|
3644
|
+
if (g(E) || r.isBuffer(E)) {
|
|
3645
|
+
if (q) {
|
|
3646
|
+
var C = D ? h : q(h, p.encoder, le, "key", ae);
|
|
3647
|
+
return [H(C) + "=" + H(q(E, p.encoder, le, "value", ae))];
|
|
3649
3648
|
}
|
|
3650
|
-
return [H(h) + "=" + H(String(
|
|
3649
|
+
return [H(h) + "=" + H(String(E))];
|
|
3651
3650
|
}
|
|
3652
3651
|
var L = [];
|
|
3653
|
-
if (typeof
|
|
3652
|
+
if (typeof E > "u")
|
|
3654
3653
|
return L;
|
|
3655
3654
|
var W;
|
|
3656
|
-
if (y === "comma" && s(
|
|
3657
|
-
D &&
|
|
3655
|
+
if (y === "comma" && s(E))
|
|
3656
|
+
D && q && (E = r.maybeMap(E, q)), W = [{ value: E.length > 0 ? E.join(",") || null : void 0 }];
|
|
3658
3657
|
else if (s(A))
|
|
3659
3658
|
W = A;
|
|
3660
3659
|
else {
|
|
3661
|
-
var z = Object.keys(
|
|
3662
|
-
W =
|
|
3660
|
+
var z = Object.keys(E);
|
|
3661
|
+
W = N ? z.sort(N) : z;
|
|
3663
3662
|
}
|
|
3664
|
-
var Q = x ? h.replace(/\./g, "%2E") : h, ne =
|
|
3665
|
-
if (T && s(
|
|
3663
|
+
var Q = x ? h.replace(/\./g, "%2E") : h, ne = S && s(E) && E.length === 1 ? Q + "[]" : Q;
|
|
3664
|
+
if (T && s(E) && E.length === 0)
|
|
3666
3665
|
return ne + "[]";
|
|
3667
3666
|
for (var J = 0; J < W.length; ++J) {
|
|
3668
|
-
var I = W[J],
|
|
3669
|
-
if (!(
|
|
3670
|
-
var
|
|
3671
|
-
Z.set(
|
|
3667
|
+
var I = W[J], _ = typeof I == "object" && typeof I.value < "u" ? I.value : E[I];
|
|
3668
|
+
if (!(O && _ === null)) {
|
|
3669
|
+
var B = U && x ? I.replace(/\./g, "%2E") : I, K = s(E) ? typeof y == "function" ? y(ne, B) : ne : ne + (U ? "." + B : "[" + B + "]");
|
|
3670
|
+
Z.set(f, k);
|
|
3672
3671
|
var G = e();
|
|
3673
|
-
G.set(
|
|
3674
|
-
|
|
3672
|
+
G.set(v, Z), a(L, b(
|
|
3673
|
+
_,
|
|
3675
3674
|
K,
|
|
3676
3675
|
y,
|
|
3677
|
-
|
|
3676
|
+
S,
|
|
3678
3677
|
T,
|
|
3679
3678
|
d,
|
|
3680
|
-
|
|
3679
|
+
O,
|
|
3681
3680
|
x,
|
|
3682
|
-
y === "comma" && D && s(
|
|
3681
|
+
y === "comma" && D && s(E) ? null : q,
|
|
3683
3682
|
A,
|
|
3684
|
-
|
|
3685
|
-
|
|
3683
|
+
N,
|
|
3684
|
+
U,
|
|
3686
3685
|
P,
|
|
3687
3686
|
ae,
|
|
3688
3687
|
H,
|
|
@@ -3693,66 +3692,66 @@ function Gs() {
|
|
|
3693
3692
|
}
|
|
3694
3693
|
}
|
|
3695
3694
|
return L;
|
|
3696
|
-
}, j = function(
|
|
3697
|
-
if (!
|
|
3698
|
-
return
|
|
3699
|
-
if (typeof
|
|
3695
|
+
}, j = function(f) {
|
|
3696
|
+
if (!f)
|
|
3697
|
+
return p;
|
|
3698
|
+
if (typeof f.allowEmptyArrays < "u" && typeof f.allowEmptyArrays != "boolean")
|
|
3700
3699
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3701
|
-
if (typeof
|
|
3700
|
+
if (typeof f.encodeDotInKeys < "u" && typeof f.encodeDotInKeys != "boolean")
|
|
3702
3701
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3703
|
-
if (
|
|
3702
|
+
if (f.encoder !== null && typeof f.encoder < "u" && typeof f.encoder != "function")
|
|
3704
3703
|
throw new TypeError("Encoder has to be a function.");
|
|
3705
|
-
var h =
|
|
3706
|
-
if (typeof
|
|
3704
|
+
var h = f.charset || p.charset;
|
|
3705
|
+
if (typeof f.charset < "u" && f.charset !== "utf-8" && f.charset !== "iso-8859-1")
|
|
3707
3706
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3708
3707
|
var y = t.default;
|
|
3709
|
-
if (typeof
|
|
3710
|
-
if (!o.call(t.formatters,
|
|
3708
|
+
if (typeof f.format < "u") {
|
|
3709
|
+
if (!o.call(t.formatters, f.format))
|
|
3711
3710
|
throw new TypeError("Unknown format option provided.");
|
|
3712
|
-
y =
|
|
3711
|
+
y = f.format;
|
|
3713
3712
|
}
|
|
3714
|
-
var
|
|
3715
|
-
(typeof
|
|
3713
|
+
var S = t.formatters[y], T = p.filter;
|
|
3714
|
+
(typeof f.filter == "function" || s(f.filter)) && (T = f.filter);
|
|
3716
3715
|
var d;
|
|
3717
|
-
if (
|
|
3716
|
+
if (f.arrayFormat in i ? d = f.arrayFormat : "indices" in f ? d = f.indices ? "indices" : "repeat" : d = p.arrayFormat, "commaRoundTrip" in f && typeof f.commaRoundTrip != "boolean")
|
|
3718
3717
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3719
|
-
var
|
|
3718
|
+
var O = typeof f.allowDots > "u" ? f.encodeDotInKeys === !0 ? !0 : p.allowDots : !!f.allowDots;
|
|
3720
3719
|
return {
|
|
3721
|
-
addQueryPrefix: typeof
|
|
3722
|
-
allowDots:
|
|
3723
|
-
allowEmptyArrays: typeof
|
|
3720
|
+
addQueryPrefix: typeof f.addQueryPrefix == "boolean" ? f.addQueryPrefix : p.addQueryPrefix,
|
|
3721
|
+
allowDots: O,
|
|
3722
|
+
allowEmptyArrays: typeof f.allowEmptyArrays == "boolean" ? !!f.allowEmptyArrays : p.allowEmptyArrays,
|
|
3724
3723
|
arrayFormat: d,
|
|
3725
3724
|
charset: h,
|
|
3726
|
-
charsetSentinel: typeof
|
|
3727
|
-
commaRoundTrip:
|
|
3728
|
-
delimiter: typeof
|
|
3729
|
-
encode: typeof
|
|
3730
|
-
encodeDotInKeys: typeof
|
|
3731
|
-
encoder: typeof
|
|
3732
|
-
encodeValuesOnly: typeof
|
|
3725
|
+
charsetSentinel: typeof f.charsetSentinel == "boolean" ? f.charsetSentinel : p.charsetSentinel,
|
|
3726
|
+
commaRoundTrip: f.commaRoundTrip,
|
|
3727
|
+
delimiter: typeof f.delimiter > "u" ? p.delimiter : f.delimiter,
|
|
3728
|
+
encode: typeof f.encode == "boolean" ? f.encode : p.encode,
|
|
3729
|
+
encodeDotInKeys: typeof f.encodeDotInKeys == "boolean" ? f.encodeDotInKeys : p.encodeDotInKeys,
|
|
3730
|
+
encoder: typeof f.encoder == "function" ? f.encoder : p.encoder,
|
|
3731
|
+
encodeValuesOnly: typeof f.encodeValuesOnly == "boolean" ? f.encodeValuesOnly : p.encodeValuesOnly,
|
|
3733
3732
|
filter: T,
|
|
3734
3733
|
format: y,
|
|
3735
|
-
formatter:
|
|
3736
|
-
serializeDate: typeof
|
|
3737
|
-
skipNulls: typeof
|
|
3738
|
-
sort: typeof
|
|
3739
|
-
strictNullHandling: typeof
|
|
3734
|
+
formatter: S,
|
|
3735
|
+
serializeDate: typeof f.serializeDate == "function" ? f.serializeDate : p.serializeDate,
|
|
3736
|
+
skipNulls: typeof f.skipNulls == "boolean" ? f.skipNulls : p.skipNulls,
|
|
3737
|
+
sort: typeof f.sort == "function" ? f.sort : null,
|
|
3738
|
+
strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling : p.strictNullHandling
|
|
3740
3739
|
};
|
|
3741
3740
|
};
|
|
3742
|
-
return hr = function(
|
|
3743
|
-
var h =
|
|
3744
|
-
typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : s(y.filter) && (T = y.filter,
|
|
3741
|
+
return hr = function(b, f) {
|
|
3742
|
+
var h = b, y = j(f), S, T;
|
|
3743
|
+
typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : s(y.filter) && (T = y.filter, S = T);
|
|
3745
3744
|
var d = [];
|
|
3746
3745
|
if (typeof h != "object" || h === null)
|
|
3747
3746
|
return "";
|
|
3748
|
-
var
|
|
3749
|
-
|
|
3750
|
-
for (var
|
|
3751
|
-
var
|
|
3752
|
-
y.skipNulls && h[
|
|
3753
|
-
h[
|
|
3754
|
-
|
|
3755
|
-
|
|
3747
|
+
var O = i[y.arrayFormat], x = O === "comma" && y.commaRoundTrip;
|
|
3748
|
+
S || (S = Object.keys(h)), y.sort && S.sort(y.sort);
|
|
3749
|
+
for (var q = e(), A = 0; A < S.length; ++A) {
|
|
3750
|
+
var N = S[A];
|
|
3751
|
+
y.skipNulls && h[N] === null || a(d, m(
|
|
3752
|
+
h[N],
|
|
3753
|
+
N,
|
|
3754
|
+
O,
|
|
3756
3755
|
x,
|
|
3757
3756
|
y.allowEmptyArrays,
|
|
3758
3757
|
y.strictNullHandling,
|
|
@@ -3767,15 +3766,15 @@ function Gs() {
|
|
|
3767
3766
|
y.formatter,
|
|
3768
3767
|
y.encodeValuesOnly,
|
|
3769
3768
|
y.charset,
|
|
3770
|
-
|
|
3769
|
+
q
|
|
3771
3770
|
));
|
|
3772
3771
|
}
|
|
3773
|
-
var
|
|
3774
|
-
return y.charsetSentinel && (y.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"),
|
|
3772
|
+
var U = d.join(y.delimiter), P = y.addQueryPrefix === !0 ? "?" : "";
|
|
3773
|
+
return y.charsetSentinel && (y.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), U.length > 0 ? P + U : "";
|
|
3775
3774
|
}, hr;
|
|
3776
3775
|
}
|
|
3777
3776
|
var yr, eo;
|
|
3778
|
-
function
|
|
3777
|
+
function Vs() {
|
|
3779
3778
|
if (eo) return yr;
|
|
3780
3779
|
eo = 1;
|
|
3781
3780
|
var e = /* @__PURE__ */ Co(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
|
|
@@ -3799,64 +3798,64 @@ function Ws() {
|
|
|
3799
3798
|
plainObjects: !1,
|
|
3800
3799
|
strictDepth: !1,
|
|
3801
3800
|
strictNullHandling: !1
|
|
3802
|
-
}, i = function(
|
|
3803
|
-
return
|
|
3801
|
+
}, i = function(v) {
|
|
3802
|
+
return v.replace(/&#(\d+);/g, function(m, j) {
|
|
3804
3803
|
return String.fromCharCode(parseInt(j, 10));
|
|
3805
3804
|
});
|
|
3806
|
-
}, s = function(
|
|
3807
|
-
return
|
|
3805
|
+
}, s = function(v, m) {
|
|
3806
|
+
return v && typeof v == "string" && m.comma && v.indexOf(",") > -1 ? v.split(",") : v;
|
|
3808
3807
|
}, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", l = function(m, j) {
|
|
3809
|
-
var
|
|
3810
|
-
|
|
3811
|
-
var h = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, y =
|
|
3808
|
+
var b = { __proto__: null }, f = j.ignoreQueryPrefix ? m.replace(/^\?/, "") : m;
|
|
3809
|
+
f = f.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
3810
|
+
var h = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, y = f.split(j.delimiter, h), S = -1, T, d = j.charset;
|
|
3812
3811
|
if (j.charsetSentinel)
|
|
3813
3812
|
for (T = 0; T < y.length; ++T)
|
|
3814
|
-
y[T].indexOf("utf8=") === 0 && (y[T] === a ? d = "utf-8" : y[T] === n && (d = "iso-8859-1"),
|
|
3813
|
+
y[T].indexOf("utf8=") === 0 && (y[T] === a ? d = "utf-8" : y[T] === n && (d = "iso-8859-1"), S = T, T = y.length);
|
|
3815
3814
|
for (T = 0; T < y.length; ++T)
|
|
3816
|
-
if (T !==
|
|
3817
|
-
var
|
|
3818
|
-
|
|
3819
|
-
s(
|
|
3815
|
+
if (T !== S) {
|
|
3816
|
+
var O = y[T], x = O.indexOf("]="), q = x === -1 ? O.indexOf("=") : x + 1, A, N;
|
|
3817
|
+
q === -1 ? (A = j.decoder(O, o.decoder, d, "key"), N = j.strictNullHandling ? null : "") : (A = j.decoder(O.slice(0, q), o.decoder, d, "key"), N = e.maybeMap(
|
|
3818
|
+
s(O.slice(q + 1), j),
|
|
3820
3819
|
function(P) {
|
|
3821
3820
|
return j.decoder(P, o.decoder, d, "value");
|
|
3822
3821
|
}
|
|
3823
|
-
)),
|
|
3824
|
-
var
|
|
3825
|
-
|
|
3822
|
+
)), N && j.interpretNumericEntities && d === "iso-8859-1" && (N = i(N)), O.indexOf("[]=") > -1 && (N = t(N) ? [N] : N);
|
|
3823
|
+
var U = r.call(b, A);
|
|
3824
|
+
U && j.duplicates === "combine" ? b[A] = e.combine(b[A], N) : (!U || j.duplicates === "last") && (b[A] = N);
|
|
3826
3825
|
}
|
|
3827
|
-
return
|
|
3828
|
-
}, c = function(
|
|
3829
|
-
for (var
|
|
3830
|
-
var y,
|
|
3831
|
-
if (
|
|
3832
|
-
y = j.allowEmptyArrays && (
|
|
3826
|
+
return b;
|
|
3827
|
+
}, c = function(v, m, j, b) {
|
|
3828
|
+
for (var f = b ? m : s(m, j), h = v.length - 1; h >= 0; --h) {
|
|
3829
|
+
var y, S = v[h];
|
|
3830
|
+
if (S === "[]" && j.parseArrays)
|
|
3831
|
+
y = j.allowEmptyArrays && (f === "" || j.strictNullHandling && f === null) ? [] : [].concat(f);
|
|
3833
3832
|
else {
|
|
3834
3833
|
y = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3835
|
-
var T =
|
|
3836
|
-
!j.parseArrays && d === "" ? y = { 0:
|
|
3834
|
+
var T = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, d = j.decodeDotInKeys ? T.replace(/%2E/g, ".") : T, O = parseInt(d, 10);
|
|
3835
|
+
!j.parseArrays && d === "" ? y = { 0: f } : !isNaN(O) && S !== d && String(O) === d && O >= 0 && j.parseArrays && O <= j.arrayLimit ? (y = [], y[O] = f) : d !== "__proto__" && (y[d] = f);
|
|
3837
3836
|
}
|
|
3838
|
-
|
|
3837
|
+
f = y;
|
|
3839
3838
|
}
|
|
3840
|
-
return
|
|
3841
|
-
},
|
|
3839
|
+
return f;
|
|
3840
|
+
}, p = function(m, j, b, f) {
|
|
3842
3841
|
if (m) {
|
|
3843
|
-
var h =
|
|
3842
|
+
var h = b.allowDots ? m.replace(/\.([^.[]+)/g, "[$1]") : m, y = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, T = b.depth > 0 && y.exec(h), d = T ? h.slice(0, T.index) : h, O = [];
|
|
3844
3843
|
if (d) {
|
|
3845
|
-
if (!
|
|
3844
|
+
if (!b.plainObjects && r.call(Object.prototype, d) && !b.allowPrototypes)
|
|
3846
3845
|
return;
|
|
3847
|
-
|
|
3846
|
+
O.push(d);
|
|
3848
3847
|
}
|
|
3849
|
-
for (var x = 0;
|
|
3850
|
-
if (x += 1, !
|
|
3848
|
+
for (var x = 0; b.depth > 0 && (T = S.exec(h)) !== null && x < b.depth; ) {
|
|
3849
|
+
if (x += 1, !b.plainObjects && r.call(Object.prototype, T[1].slice(1, -1)) && !b.allowPrototypes)
|
|
3851
3850
|
return;
|
|
3852
|
-
|
|
3851
|
+
O.push(T[1]);
|
|
3853
3852
|
}
|
|
3854
3853
|
if (T) {
|
|
3855
|
-
if (
|
|
3856
|
-
throw new RangeError("Input depth exceeded depth option of " +
|
|
3857
|
-
|
|
3854
|
+
if (b.strictDepth === !0)
|
|
3855
|
+
throw new RangeError("Input depth exceeded depth option of " + b.depth + " and strictDepth is true");
|
|
3856
|
+
O.push("[" + h.slice(T.index) + "]");
|
|
3858
3857
|
}
|
|
3859
|
-
return c(
|
|
3858
|
+
return c(O, j, b, f);
|
|
3860
3859
|
}
|
|
3861
3860
|
}, g = function(m) {
|
|
3862
3861
|
if (!m)
|
|
@@ -3869,12 +3868,12 @@ function Ws() {
|
|
|
3869
3868
|
throw new TypeError("Decoder has to be a function.");
|
|
3870
3869
|
if (typeof m.charset < "u" && m.charset !== "utf-8" && m.charset !== "iso-8859-1")
|
|
3871
3870
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3872
|
-
var j = typeof m.charset > "u" ? o.charset : m.charset,
|
|
3873
|
-
if (
|
|
3871
|
+
var j = typeof m.charset > "u" ? o.charset : m.charset, b = typeof m.duplicates > "u" ? o.duplicates : m.duplicates;
|
|
3872
|
+
if (b !== "combine" && b !== "first" && b !== "last")
|
|
3874
3873
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3875
|
-
var
|
|
3874
|
+
var f = typeof m.allowDots > "u" ? m.decodeDotInKeys === !0 ? !0 : o.allowDots : !!m.allowDots;
|
|
3876
3875
|
return {
|
|
3877
|
-
allowDots:
|
|
3876
|
+
allowDots: f,
|
|
3878
3877
|
allowEmptyArrays: typeof m.allowEmptyArrays == "boolean" ? !!m.allowEmptyArrays : o.allowEmptyArrays,
|
|
3879
3878
|
allowPrototypes: typeof m.allowPrototypes == "boolean" ? m.allowPrototypes : o.allowPrototypes,
|
|
3880
3879
|
allowSparse: typeof m.allowSparse == "boolean" ? m.allowSparse : o.allowSparse,
|
|
@@ -3887,7 +3886,7 @@ function Ws() {
|
|
|
3887
3886
|
delimiter: typeof m.delimiter == "string" || e.isRegExp(m.delimiter) ? m.delimiter : o.delimiter,
|
|
3888
3887
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3889
3888
|
depth: typeof m.depth == "number" || m.depth === !1 ? +m.depth : o.depth,
|
|
3890
|
-
duplicates:
|
|
3889
|
+
duplicates: b,
|
|
3891
3890
|
ignoreQueryPrefix: m.ignoreQueryPrefix === !0,
|
|
3892
3891
|
interpretNumericEntities: typeof m.interpretNumericEntities == "boolean" ? m.interpretNumericEntities : o.interpretNumericEntities,
|
|
3893
3892
|
parameterLimit: typeof m.parameterLimit == "number" ? m.parameterLimit : o.parameterLimit,
|
|
@@ -3897,22 +3896,22 @@ function Ws() {
|
|
|
3897
3896
|
strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : o.strictNullHandling
|
|
3898
3897
|
};
|
|
3899
3898
|
};
|
|
3900
|
-
return yr = function(
|
|
3899
|
+
return yr = function(v, m) {
|
|
3901
3900
|
var j = g(m);
|
|
3902
|
-
if (
|
|
3901
|
+
if (v === "" || v === null || typeof v > "u")
|
|
3903
3902
|
return j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
3904
|
-
for (var
|
|
3905
|
-
var
|
|
3906
|
-
|
|
3903
|
+
for (var b = typeof v == "string" ? l(v, j) : v, f = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, h = Object.keys(b), y = 0; y < h.length; ++y) {
|
|
3904
|
+
var S = h[y], T = p(S, b[S], j, typeof v == "string");
|
|
3905
|
+
f = e.merge(f, T, j);
|
|
3907
3906
|
}
|
|
3908
|
-
return j.allowSparse === !0 ?
|
|
3907
|
+
return j.allowSparse === !0 ? f : e.compact(f);
|
|
3909
3908
|
}, yr;
|
|
3910
3909
|
}
|
|
3911
3910
|
var mr, to;
|
|
3912
3911
|
function No() {
|
|
3913
3912
|
if (to) return mr;
|
|
3914
3913
|
to = 1;
|
|
3915
|
-
var e = /* @__PURE__ */
|
|
3914
|
+
var e = /* @__PURE__ */ Js(), r = /* @__PURE__ */ Vs(), t = /* @__PURE__ */ Er();
|
|
3916
3915
|
return mr = {
|
|
3917
3916
|
formats: t,
|
|
3918
3917
|
parse: r,
|
|
@@ -3920,10 +3919,10 @@ function No() {
|
|
|
3920
3919
|
}, mr;
|
|
3921
3920
|
}
|
|
3922
3921
|
var ro;
|
|
3923
|
-
function
|
|
3922
|
+
function Ds() {
|
|
3924
3923
|
if (ro) return Ce;
|
|
3925
3924
|
ro = 1;
|
|
3926
|
-
var e =
|
|
3925
|
+
var e = ds();
|
|
3927
3926
|
function r() {
|
|
3928
3927
|
this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
|
|
3929
3928
|
}
|
|
@@ -3954,13 +3953,13 @@ function Js() {
|
|
|
3954
3953
|
"/",
|
|
3955
3954
|
"?",
|
|
3956
3955
|
"#"
|
|
3957
|
-
],
|
|
3956
|
+
], p = 255, g = /^[+a-z0-9A-Z_-]{0,63}$/, v = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, m = {
|
|
3958
3957
|
javascript: !0,
|
|
3959
3958
|
"javascript:": !0
|
|
3960
3959
|
}, j = {
|
|
3961
3960
|
javascript: !0,
|
|
3962
3961
|
"javascript:": !0
|
|
3963
|
-
},
|
|
3962
|
+
}, b = {
|
|
3964
3963
|
http: !0,
|
|
3965
3964
|
https: !0,
|
|
3966
3965
|
ftp: !0,
|
|
@@ -3971,23 +3970,23 @@ function Js() {
|
|
|
3971
3970
|
"ftp:": !0,
|
|
3972
3971
|
"gopher:": !0,
|
|
3973
3972
|
"file:": !0
|
|
3974
|
-
},
|
|
3975
|
-
function h(d,
|
|
3973
|
+
}, f = /* @__PURE__ */ No();
|
|
3974
|
+
function h(d, O, x) {
|
|
3976
3975
|
if (d && typeof d == "object" && d instanceof r)
|
|
3977
3976
|
return d;
|
|
3978
|
-
var
|
|
3979
|
-
return
|
|
3977
|
+
var q = new r();
|
|
3978
|
+
return q.parse(d, O, x), q;
|
|
3980
3979
|
}
|
|
3981
|
-
r.prototype.parse = function(d,
|
|
3980
|
+
r.prototype.parse = function(d, O, x) {
|
|
3982
3981
|
if (typeof d != "string")
|
|
3983
3982
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof d);
|
|
3984
|
-
var
|
|
3985
|
-
|
|
3983
|
+
var q = d.indexOf("?"), A = q !== -1 && q < d.indexOf("#") ? "?" : "#", N = d.split(A), U = /\\/g;
|
|
3984
|
+
N[0] = N[0].replace(U, "/"), d = N.join(A);
|
|
3986
3985
|
var P = d;
|
|
3987
3986
|
if (P = P.trim(), !x && d.split("#").length === 1) {
|
|
3988
3987
|
var ae = i.exec(P);
|
|
3989
3988
|
if (ae)
|
|
3990
|
-
return this.path = P, this.href = P, this.pathname = ae[1], ae[2] ? (this.search = ae[2],
|
|
3989
|
+
return this.path = P, this.href = P, this.pathname = ae[1], ae[2] ? (this.search = ae[2], O ? this.query = f.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
|
|
3991
3990
|
}
|
|
3992
3991
|
var H = t.exec(P);
|
|
3993
3992
|
if (H) {
|
|
@@ -3999,39 +3998,39 @@ function Js() {
|
|
|
3999
3998
|
var le = P.substr(0, 2) === "//";
|
|
4000
3999
|
le && !(H && j[H]) && (P = P.substr(2), this.slashes = !0);
|
|
4001
4000
|
}
|
|
4002
|
-
if (!j[H] && (le || H && !
|
|
4003
|
-
for (var Z = -1,
|
|
4004
|
-
var re = P.indexOf(c[
|
|
4001
|
+
if (!j[H] && (le || H && !b[H])) {
|
|
4002
|
+
for (var Z = -1, E = 0; E < c.length; E++) {
|
|
4003
|
+
var re = P.indexOf(c[E]);
|
|
4005
4004
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
4006
4005
|
}
|
|
4007
|
-
var k,
|
|
4008
|
-
Z === -1 ?
|
|
4009
|
-
for (var
|
|
4010
|
-
var re = P.indexOf(l[
|
|
4006
|
+
var k, R;
|
|
4007
|
+
Z === -1 ? R = P.lastIndexOf("@") : R = P.lastIndexOf("@", Z), R !== -1 && (k = P.slice(0, R), P = P.slice(R + 1), this.auth = decodeURIComponent(k)), Z = -1;
|
|
4008
|
+
for (var E = 0; E < l.length; E++) {
|
|
4009
|
+
var re = P.indexOf(l[E]);
|
|
4011
4010
|
re !== -1 && (Z === -1 || re < Z) && (Z = re);
|
|
4012
4011
|
}
|
|
4013
4012
|
Z === -1 && (Z = P.length), this.host = P.slice(0, Z), P = P.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
|
|
4014
|
-
var
|
|
4015
|
-
if (!
|
|
4016
|
-
for (var C = this.hostname.split(/\./),
|
|
4017
|
-
var W = C[
|
|
4013
|
+
var F = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
4014
|
+
if (!F)
|
|
4015
|
+
for (var C = this.hostname.split(/\./), E = 0, L = C.length; E < L; E++) {
|
|
4016
|
+
var W = C[E];
|
|
4018
4017
|
if (W && !W.match(g)) {
|
|
4019
4018
|
for (var z = "", Q = 0, ne = W.length; Q < ne; Q++)
|
|
4020
4019
|
W.charCodeAt(Q) > 127 ? z += "x" : z += W[Q];
|
|
4021
4020
|
if (!z.match(g)) {
|
|
4022
|
-
var J = C.slice(0,
|
|
4023
|
-
|
|
4021
|
+
var J = C.slice(0, E), I = C.slice(E + 1), _ = W.match(v);
|
|
4022
|
+
_ && (J.push(_[1]), I.unshift(_[2])), I.length && (P = "/" + I.join(".") + P), this.hostname = J.join(".");
|
|
4024
4023
|
break;
|
|
4025
4024
|
}
|
|
4026
4025
|
}
|
|
4027
4026
|
}
|
|
4028
|
-
this.hostname.length >
|
|
4029
|
-
var
|
|
4030
|
-
this.host = K +
|
|
4027
|
+
this.hostname.length > p ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), F || (this.hostname = e.toASCII(this.hostname));
|
|
4028
|
+
var B = this.port ? ":" + this.port : "", K = this.hostname || "";
|
|
4029
|
+
this.host = K + B, this.href += this.host, F && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), P[0] !== "/" && (P = "/" + P));
|
|
4031
4030
|
}
|
|
4032
4031
|
if (!m[D])
|
|
4033
|
-
for (var
|
|
4034
|
-
var G = a[
|
|
4032
|
+
for (var E = 0, L = a.length; E < L; E++) {
|
|
4033
|
+
var G = a[E];
|
|
4035
4034
|
if (P.indexOf(G) !== -1) {
|
|
4036
4035
|
var Y = encodeURIComponent(G);
|
|
4037
4036
|
Y === G && (Y = escape(G)), P = P.split(G).join(Y);
|
|
@@ -4040,9 +4039,9 @@ function Js() {
|
|
|
4040
4039
|
var oe = P.indexOf("#");
|
|
4041
4040
|
oe !== -1 && (this.hash = P.substr(oe), P = P.slice(0, oe));
|
|
4042
4041
|
var ye = P.indexOf("?");
|
|
4043
|
-
if (ye !== -1 ? (this.search = P.substr(ye), this.query = P.substr(ye + 1),
|
|
4044
|
-
var
|
|
4045
|
-
this.path =
|
|
4042
|
+
if (ye !== -1 ? (this.search = P.substr(ye), this.query = P.substr(ye + 1), O && (this.query = f.parse(this.query)), P = P.slice(0, ye)) : O && (this.search = "", this.query = {}), P && (this.pathname = P), b[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
4043
|
+
var B = this.pathname || "", Se = this.search || "";
|
|
4044
|
+
this.path = B + Se;
|
|
4046
4045
|
}
|
|
4047
4046
|
return this.href = this.format(), this;
|
|
4048
4047
|
};
|
|
@@ -4052,45 +4051,45 @@ function Js() {
|
|
|
4052
4051
|
r.prototype.format = function() {
|
|
4053
4052
|
var d = this.auth || "";
|
|
4054
4053
|
d && (d = encodeURIComponent(d), d = d.replace(/%3A/i, ":"), d += "@");
|
|
4055
|
-
var
|
|
4056
|
-
this.host ? A = d + this.host : this.hostname && (A = d + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (
|
|
4054
|
+
var O = this.protocol || "", x = this.pathname || "", q = this.hash || "", A = !1, N = "";
|
|
4055
|
+
this.host ? A = d + this.host : this.hostname && (A = d + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (N = f.stringify(this.query, {
|
|
4057
4056
|
arrayFormat: "repeat",
|
|
4058
4057
|
addQueryPrefix: !1
|
|
4059
4058
|
}));
|
|
4060
|
-
var
|
|
4061
|
-
return
|
|
4059
|
+
var U = this.search || N && "?" + N || "";
|
|
4060
|
+
return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || b[O]) && A !== !1 ? (A = "//" + (A || ""), x && x.charAt(0) !== "/" && (x = "/" + x)) : A || (A = ""), q && q.charAt(0) !== "#" && (q = "#" + q), U && U.charAt(0) !== "?" && (U = "?" + U), x = x.replace(/[?#]/g, function(P) {
|
|
4062
4061
|
return encodeURIComponent(P);
|
|
4063
|
-
}),
|
|
4062
|
+
}), U = U.replace("#", "%23"), O + A + x + U + q;
|
|
4064
4063
|
};
|
|
4065
|
-
function
|
|
4066
|
-
return h(d, !1, !0).resolve(
|
|
4064
|
+
function S(d, O) {
|
|
4065
|
+
return h(d, !1, !0).resolve(O);
|
|
4067
4066
|
}
|
|
4068
4067
|
r.prototype.resolve = function(d) {
|
|
4069
4068
|
return this.resolveObject(h(d, !1, !0)).format();
|
|
4070
4069
|
};
|
|
4071
|
-
function T(d,
|
|
4072
|
-
return d ? h(d, !1, !0).resolveObject(
|
|
4070
|
+
function T(d, O) {
|
|
4071
|
+
return d ? h(d, !1, !0).resolveObject(O) : O;
|
|
4073
4072
|
}
|
|
4074
4073
|
return r.prototype.resolveObject = function(d) {
|
|
4075
4074
|
if (typeof d == "string") {
|
|
4076
|
-
var
|
|
4077
|
-
|
|
4075
|
+
var O = new r();
|
|
4076
|
+
O.parse(d, !1, !0), d = O;
|
|
4078
4077
|
}
|
|
4079
|
-
for (var x = new r(),
|
|
4080
|
-
var
|
|
4081
|
-
x[
|
|
4078
|
+
for (var x = new r(), q = Object.keys(this), A = 0; A < q.length; A++) {
|
|
4079
|
+
var N = q[A];
|
|
4080
|
+
x[N] = this[N];
|
|
4082
4081
|
}
|
|
4083
4082
|
if (x.hash = d.hash, d.href === "")
|
|
4084
4083
|
return x.href = x.format(), x;
|
|
4085
4084
|
if (d.slashes && !d.protocol) {
|
|
4086
|
-
for (var
|
|
4087
|
-
var ae =
|
|
4085
|
+
for (var U = Object.keys(d), P = 0; P < U.length; P++) {
|
|
4086
|
+
var ae = U[P];
|
|
4088
4087
|
ae !== "protocol" && (x[ae] = d[ae]);
|
|
4089
4088
|
}
|
|
4090
|
-
return
|
|
4089
|
+
return b[x.protocol] && x.hostname && !x.pathname && (x.pathname = "/", x.path = x.pathname), x.href = x.format(), x;
|
|
4091
4090
|
}
|
|
4092
4091
|
if (d.protocol && d.protocol !== x.protocol) {
|
|
4093
|
-
if (!
|
|
4092
|
+
if (!b[d.protocol]) {
|
|
4094
4093
|
for (var H = Object.keys(d), D = 0; D < H.length; D++) {
|
|
4095
4094
|
var le = H[D];
|
|
4096
4095
|
x[le] = d[le];
|
|
@@ -4104,13 +4103,13 @@ function Js() {
|
|
|
4104
4103
|
} else
|
|
4105
4104
|
x.pathname = d.pathname;
|
|
4106
4105
|
if (x.search = d.search, x.query = d.query, x.host = d.host || "", x.auth = d.auth, x.hostname = d.hostname || d.host, x.port = d.port, x.pathname || x.search) {
|
|
4107
|
-
var Z = x.pathname || "",
|
|
4108
|
-
x.path = Z +
|
|
4106
|
+
var Z = x.pathname || "", E = x.search || "";
|
|
4107
|
+
x.path = Z + E;
|
|
4109
4108
|
}
|
|
4110
4109
|
return x.slashes = x.slashes || d.slashes, x.href = x.format(), x;
|
|
4111
4110
|
}
|
|
4112
|
-
var re = x.pathname && x.pathname.charAt(0) === "/", k = d.host || d.pathname && d.pathname.charAt(0) === "/",
|
|
4113
|
-
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (L[0] === "" ? L[0] = d.host : L.unshift(d.host)), d.host = null),
|
|
4111
|
+
var re = x.pathname && x.pathname.charAt(0) === "/", k = d.host || d.pathname && d.pathname.charAt(0) === "/", R = k || re || x.host && d.pathname, F = R, C = x.pathname && x.pathname.split("/") || [], L = d.pathname && d.pathname.split("/") || [], W = x.protocol && !b[x.protocol];
|
|
4112
|
+
if (W && (x.hostname = "", x.port = null, x.host && (C[0] === "" ? C[0] = x.host : C.unshift(x.host)), x.host = "", d.protocol && (d.hostname = null, d.port = null, d.host && (L[0] === "" ? L[0] = d.host : L.unshift(d.host)), d.host = null), R = R && (L[0] === "" || C[0] === "")), k)
|
|
4114
4113
|
x.host = d.host || d.host === "" ? d.host : x.host, x.hostname = d.hostname || d.hostname === "" ? d.hostname : x.hostname, x.search = d.search, x.query = d.query, C = L;
|
|
4115
4114
|
else if (L.length)
|
|
4116
4115
|
C || (C = []), C.pop(), C = C.concat(L), x.search = d.search, x.query = d.query;
|
|
@@ -4126,28 +4125,28 @@ function Js() {
|
|
|
4126
4125
|
return x.pathname = null, x.search ? x.path = "/" + x.search : x.path = null, x.href = x.format(), x;
|
|
4127
4126
|
for (var Q = C.slice(-1)[0], ne = (x.host || d.host || C.length > 1) && (Q === "." || Q === "..") || Q === "", J = 0, I = C.length; I >= 0; I--)
|
|
4128
4127
|
Q = C[I], Q === "." ? C.splice(I, 1) : Q === ".." ? (C.splice(I, 1), J++) : J && (C.splice(I, 1), J--);
|
|
4129
|
-
if (!
|
|
4128
|
+
if (!R && !F)
|
|
4130
4129
|
for (; J--; J)
|
|
4131
4130
|
C.unshift("..");
|
|
4132
|
-
|
|
4133
|
-
var
|
|
4131
|
+
R && C[0] !== "" && (!C[0] || C[0].charAt(0) !== "/") && C.unshift(""), ne && C.join("/").substr(-1) !== "/" && C.push("");
|
|
4132
|
+
var _ = C[0] === "" || C[0] && C[0].charAt(0) === "/";
|
|
4134
4133
|
if (W) {
|
|
4135
|
-
x.hostname =
|
|
4134
|
+
x.hostname = _ ? "" : C.length ? C.shift() : "", x.host = x.hostname;
|
|
4136
4135
|
var z = x.host && x.host.indexOf("@") > 0 ? x.host.split("@") : !1;
|
|
4137
4136
|
z && (x.auth = z.shift(), x.hostname = z.shift(), x.host = x.hostname);
|
|
4138
4137
|
}
|
|
4139
|
-
return
|
|
4138
|
+
return R = R || x.host && C.length, R && !_ && C.unshift(""), C.length > 0 ? x.pathname = C.join("/") : (x.pathname = null, x.path = null), (x.pathname !== null || x.search !== null) && (x.path = (x.pathname ? x.pathname : "") + (x.search ? x.search : "")), x.auth = d.auth || x.auth, x.slashes = x.slashes || d.slashes, x.href = x.format(), x;
|
|
4140
4139
|
}, r.prototype.parseHost = function() {
|
|
4141
|
-
var d = this.host,
|
|
4142
|
-
|
|
4143
|
-
}, Ce.parse = h, Ce.resolve =
|
|
4140
|
+
var d = this.host, O = o.exec(d);
|
|
4141
|
+
O && (O = O[0], O !== ":" && (this.port = O.substr(1)), d = d.substr(0, d.length - O.length)), d && (this.hostname = d);
|
|
4142
|
+
}, Ce.parse = h, Ce.resolve = S, Ce.resolveObject = T, Ce.format = y, Ce.Url = r, Ce;
|
|
4144
4143
|
}
|
|
4145
|
-
var gr =
|
|
4144
|
+
var gr = Ds(), vr = /* @__PURE__ */ No(), Ks = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Qs = class {
|
|
4146
4145
|
constructor(e, r = {}) {
|
|
4147
4146
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4148
4147
|
harIsAlreadyEncoded: !1,
|
|
4149
4148
|
...r
|
|
4150
|
-
}, this.requests = [],
|
|
4149
|
+
}, this.requests = [], Ks(e) ? this.entries = e.log.entries : this.entries = [
|
|
4151
4150
|
{
|
|
4152
4151
|
request: e
|
|
4153
4152
|
}
|
|
@@ -4172,7 +4171,7 @@ var gr = Js(), vr = /* @__PURE__ */ No(), Vs = (e) => typeof e == "object" && "l
|
|
|
4172
4171
|
}), this;
|
|
4173
4172
|
}
|
|
4174
4173
|
prepare(e, r) {
|
|
4175
|
-
var
|
|
4174
|
+
var p, g, v;
|
|
4176
4175
|
const t = {
|
|
4177
4176
|
...e,
|
|
4178
4177
|
fullUrl: "",
|
|
@@ -4184,39 +4183,39 @@ var gr = Js(), vr = /* @__PURE__ */ No(), Vs = (e) => typeof e == "object" && "l
|
|
|
4184
4183
|
};
|
|
4185
4184
|
if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Jr, {})), t.headers && t.headers.length) {
|
|
4186
4185
|
const m = /^HTTP\/2/;
|
|
4187
|
-
t.headersObj = t.headers.reduce((j, { name:
|
|
4188
|
-
const h = m.exec(t.httpVersion) ?
|
|
4186
|
+
t.headersObj = t.headers.reduce((j, { name: b, value: f }) => {
|
|
4187
|
+
const h = m.exec(t.httpVersion) ? b.toLocaleLowerCase() : b;
|
|
4189
4188
|
return {
|
|
4190
4189
|
...j,
|
|
4191
|
-
[h]:
|
|
4190
|
+
[h]: f
|
|
4192
4191
|
};
|
|
4193
4192
|
}, {});
|
|
4194
4193
|
}
|
|
4195
4194
|
t.cookies && t.cookies.length && (t.cookiesObj = t.cookies.reduceRight(
|
|
4196
|
-
(m, { name: j, value:
|
|
4195
|
+
(m, { name: j, value: b }) => ({
|
|
4197
4196
|
...m,
|
|
4198
|
-
[j]:
|
|
4197
|
+
[j]: b
|
|
4199
4198
|
}),
|
|
4200
4199
|
{}
|
|
4201
4200
|
));
|
|
4202
|
-
const o = (
|
|
4201
|
+
const o = (p = t.cookies) == null ? void 0 : p.map(({ name: m, value: j }) => r.harIsAlreadyEncoded ? `${m}=${j}` : `${encodeURIComponent(m)}=${encodeURIComponent(j)}`);
|
|
4203
4202
|
switch (o != null && o.length && (t.allHeaders.cookie = o.join("; ")), t.postData.mimeType) {
|
|
4204
4203
|
case "multipart/mixed":
|
|
4205
4204
|
case "multipart/related":
|
|
4206
4205
|
case "multipart/form-data":
|
|
4207
4206
|
case "multipart/alternative":
|
|
4208
4207
|
if (t.postData.text = "", t.postData.mimeType = "multipart/form-data", (g = t.postData) != null && g.params) {
|
|
4209
|
-
const m = "---011000010111000001101001", j = `${m}--`,
|
|
4210
|
-
`,
|
|
4208
|
+
const m = "---011000010111000001101001", j = `${m}--`, b = `\r
|
|
4209
|
+
`, f = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), h = (T) => T.replace(/\r?\n|\r/g, `\r
|
|
4211
4210
|
`), y = [`--${m}`];
|
|
4212
|
-
(
|
|
4213
|
-
const
|
|
4214
|
-
|
|
4215
|
-
`Content-Disposition: form-data; name="${
|
|
4216
|
-
), y.push(`Content-Type: ${A}`)) : y.push(`Content-Disposition: form-data; name="${
|
|
4217
|
-
}), y.push(`--${j}`), t.postData.boundary = m, t.postData.text = y.join(
|
|
4218
|
-
const
|
|
4219
|
-
t.headersObj[
|
|
4211
|
+
(v = t.postData) == null || v.params.forEach((T, d) => {
|
|
4212
|
+
const O = T.name, x = T.value || "", q = T.fileName || null, A = T.contentType || "application/octet-stream";
|
|
4213
|
+
q ? (y.push(
|
|
4214
|
+
`Content-Disposition: form-data; name="${f(h(O))}"; filename="${q}"`
|
|
4215
|
+
), y.push(`Content-Type: ${A}`)) : y.push(`Content-Disposition: form-data; name="${f(h(O))}"`), y.push(""), y.push(h(x)), d !== t.postData.params.length - 1 && y.push(`--${m}`);
|
|
4216
|
+
}), y.push(`--${j}`), t.postData.boundary = m, t.postData.text = y.join(b);
|
|
4217
|
+
const S = pe(t.headersObj, "content-type") || "content-type";
|
|
4218
|
+
t.headersObj[S] = `multipart/form-data; boundary=${m}`;
|
|
4220
4219
|
}
|
|
4221
4220
|
break;
|
|
4222
4221
|
case "application/x-www-form-urlencoded":
|
|
@@ -4272,14 +4271,14 @@ var gr = Js(), vr = /* @__PURE__ */ No(), Vs = (e) => typeof e == "object" && "l
|
|
|
4272
4271
|
}
|
|
4273
4272
|
convert(e, r, t) {
|
|
4274
4273
|
this.initCalled || this.init(), !t && r && (t = r);
|
|
4275
|
-
const o =
|
|
4274
|
+
const o = fs[e];
|
|
4276
4275
|
if (!o)
|
|
4277
4276
|
return !1;
|
|
4278
4277
|
const { convert: i } = o.clientsById[r || o.info.default];
|
|
4279
4278
|
return this.requests.map((n) => i(n, t));
|
|
4280
4279
|
}
|
|
4281
4280
|
};
|
|
4282
|
-
const
|
|
4281
|
+
const Ys = ({
|
|
4283
4282
|
rootMargin: e = "0px",
|
|
4284
4283
|
threshold: r
|
|
4285
4284
|
} = {}) => {
|
|
@@ -4294,12 +4293,12 @@ const Ks = ({
|
|
|
4294
4293
|
if (n)
|
|
4295
4294
|
return s.observe(n), () => s.unobserve(n);
|
|
4296
4295
|
}, [e, r]), [i, t];
|
|
4297
|
-
},
|
|
4296
|
+
}, Xs = typeof window < "u" ? ga : Cr, ko = ({
|
|
4298
4297
|
children: e,
|
|
4299
4298
|
maxHeight: r = 250
|
|
4300
4299
|
}) => {
|
|
4301
4300
|
const t = ho(null), [o, i] = he(!1), [s, n] = he(!1);
|
|
4302
|
-
return
|
|
4301
|
+
return Xs(() => {
|
|
4303
4302
|
const a = t.current;
|
|
4304
4303
|
if (!a) return;
|
|
4305
4304
|
i(a.scrollHeight > r);
|
|
@@ -4332,7 +4331,7 @@ const Ks = ({
|
|
|
4332
4331
|
className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
|
|
4333
4332
|
asChild: !0,
|
|
4334
4333
|
children: /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsxs($r, { variant: "outline", className: "hidden group-hover:flex", children: [
|
|
4335
|
-
/* @__PURE__ */ u.jsx(
|
|
4334
|
+
/* @__PURE__ */ u.jsx(Do, { size: 14, className: "mr-1.5" }),
|
|
4336
4335
|
"Click to expand"
|
|
4337
4336
|
] }) })
|
|
4338
4337
|
}
|
|
@@ -4346,49 +4345,49 @@ const Ks = ({
|
|
|
4346
4345
|
className: se("flex justify-center w-full mb-2", !s && "hidden"),
|
|
4347
4346
|
children: /* @__PURE__ */ u.jsx(xr, { asChild: !0, children: /* @__PURE__ */ u.jsxs($r, { variant: "outline", size: "sm", children: [
|
|
4348
4347
|
"Collapse",
|
|
4349
|
-
/* @__PURE__ */ u.jsx(
|
|
4348
|
+
/* @__PURE__ */ u.jsx(Ko, { size: 14, className: "ml-1.5" })
|
|
4350
4349
|
] }) })
|
|
4351
4350
|
}
|
|
4352
4351
|
)
|
|
4353
4352
|
]
|
|
4354
4353
|
}
|
|
4355
4354
|
);
|
|
4356
|
-
},
|
|
4355
|
+
}, Zs = ({
|
|
4357
4356
|
server: e,
|
|
4358
4357
|
servers: r,
|
|
4359
4358
|
operation: t,
|
|
4360
4359
|
examples: o
|
|
4361
4360
|
}) => {
|
|
4362
|
-
var
|
|
4363
|
-
const { isAuthEnabled: i, login: s, signup: n, isPending: a, isAuthenticated: l } =
|
|
4364
|
-
var
|
|
4361
|
+
var v, m, j;
|
|
4362
|
+
const { isAuthEnabled: i, login: s, signup: n, isPending: a, isAuthenticated: l } = La(), c = (v = t.parameters) == null ? void 0 : v.filter((b) => b.in === "header").sort((b, f) => b.required && !f.required ? -1 : 1).map((b) => {
|
|
4363
|
+
var f, h, y, S, T, d, O, x;
|
|
4365
4364
|
return {
|
|
4366
|
-
name:
|
|
4367
|
-
defaultValue: ((
|
|
4368
|
-
defaultActive:
|
|
4369
|
-
isRequired:
|
|
4370
|
-
enum: ((
|
|
4371
|
-
type: ((x =
|
|
4365
|
+
name: b.name,
|
|
4366
|
+
defaultValue: ((f = b.schema) == null ? void 0 : f.default) ?? ((y = (h = b.examples) == null ? void 0 : h.find((q) => q.value)) == null ? void 0 : y.value) ?? "",
|
|
4367
|
+
defaultActive: b.required ?? !1,
|
|
4368
|
+
isRequired: b.required ?? !1,
|
|
4369
|
+
enum: ((S = b.schema) == null ? void 0 : S.type) == "array" ? (d = (T = b.schema) == null ? void 0 : T.items) == null ? void 0 : d.enum : (O = b.schema) == null ? void 0 : O.enum,
|
|
4370
|
+
type: ((x = b.schema) == null ? void 0 : x.type) ?? "string"
|
|
4372
4371
|
};
|
|
4373
|
-
}),
|
|
4374
|
-
var
|
|
4372
|
+
}), p = (m = t.parameters) == null ? void 0 : m.filter((b) => b.in === "query").sort((b, f) => b.required && !f.required ? -1 : 1).map((b) => {
|
|
4373
|
+
var f, h, y, S, T;
|
|
4375
4374
|
return {
|
|
4376
|
-
name:
|
|
4377
|
-
defaultActive:
|
|
4378
|
-
isRequired:
|
|
4379
|
-
enum: ((
|
|
4380
|
-
type: ((T =
|
|
4375
|
+
name: b.name,
|
|
4376
|
+
defaultActive: b.required ?? !1,
|
|
4377
|
+
isRequired: b.required ?? !1,
|
|
4378
|
+
enum: ((f = b.schema) == null ? void 0 : f.type) == "array" ? (y = (h = b.schema) == null ? void 0 : h.items) == null ? void 0 : y.enum : (S = b.schema) == null ? void 0 : S.enum,
|
|
4379
|
+
type: ((T = b.schema) == null ? void 0 : T.type) ?? "string"
|
|
4381
4380
|
};
|
|
4382
|
-
}), g = (j = t.parameters) == null ? void 0 : j.filter((
|
|
4381
|
+
}), g = (j = t.parameters) == null ? void 0 : j.filter((b) => b.in === "path").map((b) => ({ name: b.name }));
|
|
4383
4382
|
return /* @__PURE__ */ u.jsx(
|
|
4384
|
-
|
|
4383
|
+
sa,
|
|
4385
4384
|
{
|
|
4386
4385
|
server: e,
|
|
4387
4386
|
servers: r,
|
|
4388
4387
|
method: t.method,
|
|
4389
4388
|
url: t.path,
|
|
4390
4389
|
headers: c,
|
|
4391
|
-
queryParams:
|
|
4390
|
+
queryParams: p,
|
|
4392
4391
|
pathParams: g,
|
|
4393
4392
|
examples: o,
|
|
4394
4393
|
requiresLogin: i && !l && !a,
|
|
@@ -4447,7 +4446,7 @@ const Ks = ({
|
|
|
4447
4446
|
default:
|
|
4448
4447
|
return {};
|
|
4449
4448
|
}
|
|
4450
|
-
},
|
|
4449
|
+
}, el = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), tl = (e) => e ? {
|
|
4451
4450
|
"application/json": "json",
|
|
4452
4451
|
"application/xml": "xml",
|
|
4453
4452
|
"application/x-yaml": "yaml",
|
|
@@ -4460,16 +4459,16 @@ const Ks = ({
|
|
|
4460
4459
|
onExampleChange: t
|
|
4461
4460
|
}) => {
|
|
4462
4461
|
var m;
|
|
4463
|
-
const [o, i] = he(0), [s, n] = he(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], l = (a == null ? void 0 : a.examples) ?? [], c = l[s],
|
|
4462
|
+
const [o, i] = he(0), [s, n] = he(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], l = (a == null ? void 0 : a.examples) ?? [], c = l[s], p = yo(() => {
|
|
4464
4463
|
if (c)
|
|
4465
4464
|
return "value" in c ? c.value : c;
|
|
4466
4465
|
if (a != null && a.schema)
|
|
4467
4466
|
return Me(a.schema);
|
|
4468
4467
|
}, [c, a == null ? void 0 : a.schema]);
|
|
4469
4468
|
Cr(() => {
|
|
4470
|
-
|
|
4471
|
-
}, [
|
|
4472
|
-
const g =
|
|
4469
|
+
p && (t == null || t(p));
|
|
4470
|
+
}, [p, t]);
|
|
4471
|
+
const g = el(p), v = tl(a == null ? void 0 : a.mediaType);
|
|
4473
4472
|
return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4474
4473
|
/* @__PURE__ */ u.jsxs(qo, { className: "p-0", children: [
|
|
4475
4474
|
c != null && c.externalValue ? /* @__PURE__ */ u.jsx("div", { className: "p-2", children: /* @__PURE__ */ u.jsx(
|
|
@@ -4484,7 +4483,7 @@ const Ks = ({
|
|
|
4484
4483
|
) }) : /* @__PURE__ */ u.jsx(ko, { children: /* @__PURE__ */ u.jsx(
|
|
4485
4484
|
go,
|
|
4486
4485
|
{
|
|
4487
|
-
language:
|
|
4486
|
+
language: v,
|
|
4488
4487
|
noBackground: !0,
|
|
4489
4488
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4490
4489
|
code: g
|
|
@@ -4501,8 +4500,8 @@ const Ks = ({
|
|
|
4501
4500
|
className: "max-w-[200px]",
|
|
4502
4501
|
value: o.toString(),
|
|
4503
4502
|
onChange: (j) => i(Number(j.target.value)),
|
|
4504
|
-
options: e.map((j,
|
|
4505
|
-
value:
|
|
4503
|
+
options: e.map((j, b) => ({
|
|
4504
|
+
value: b.toString(),
|
|
4506
4505
|
label: j.mediaType
|
|
4507
4506
|
}))
|
|
4508
4507
|
}
|
|
@@ -4513,28 +4512,28 @@ const Ks = ({
|
|
|
4513
4512
|
className: "max-w-[180px]",
|
|
4514
4513
|
value: s.toString(),
|
|
4515
4514
|
onChange: (j) => n(Number(j.target.value)),
|
|
4516
|
-
options: l.map((j,
|
|
4517
|
-
value:
|
|
4518
|
-
label: j.summary || j.name || j.description || `Example ${
|
|
4515
|
+
options: l.map((j, b) => ({
|
|
4516
|
+
value: b.toString(),
|
|
4517
|
+
label: j.summary || j.name || j.description || `Example ${b + 1}`
|
|
4519
4518
|
}))
|
|
4520
4519
|
}
|
|
4521
4520
|
) })
|
|
4522
4521
|
] })
|
|
4523
4522
|
] })
|
|
4524
4523
|
] });
|
|
4525
|
-
},
|
|
4524
|
+
}, rl = ({
|
|
4526
4525
|
content: e,
|
|
4527
4526
|
onExampleChange: r
|
|
4528
4527
|
}) => e.length === 0 ? null : /* @__PURE__ */ u.jsxs(Ar, { children: [
|
|
4529
4528
|
/* @__PURE__ */ u.jsx(Ir, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
4530
4529
|
/* @__PURE__ */ u.jsx(Eo, { content: e, onExampleChange: r })
|
|
4531
|
-
] }),
|
|
4530
|
+
] }), nl = ({ response: e }) => /* @__PURE__ */ u.jsx(et.Content, { value: e.statusCode, children: /* @__PURE__ */ u.jsx(
|
|
4532
4531
|
Eo,
|
|
4533
4532
|
{
|
|
4534
4533
|
content: e.content ?? [],
|
|
4535
4534
|
description: e.description ?? void 0
|
|
4536
4535
|
}
|
|
4537
|
-
) }),
|
|
4536
|
+
) }), ol = ({
|
|
4538
4537
|
responses: e,
|
|
4539
4538
|
selectedResponse: r,
|
|
4540
4539
|
onSelectResponse: t
|
|
@@ -4563,11 +4562,11 @@ const Ks = ({
|
|
|
4563
4562
|
i.statusCode
|
|
4564
4563
|
)) })
|
|
4565
4564
|
] }),
|
|
4566
|
-
e.map((i) => /* @__PURE__ */ u.jsx(
|
|
4565
|
+
e.map((i) => /* @__PURE__ */ u.jsx(nl, { response: i }, i.statusCode))
|
|
4567
4566
|
]
|
|
4568
4567
|
}
|
|
4569
4568
|
) });
|
|
4570
|
-
},
|
|
4569
|
+
}, al = (e, r) => {
|
|
4571
4570
|
let t;
|
|
4572
4571
|
switch (r) {
|
|
4573
4572
|
case "shell":
|
|
@@ -4608,7 +4607,7 @@ const Ks = ({
|
|
|
4608
4607
|
break;
|
|
4609
4608
|
}
|
|
4610
4609
|
return t ? t[0] : "";
|
|
4611
|
-
},
|
|
4610
|
+
}, il = Ve(
|
|
4612
4611
|
/* GraphQL */
|
|
4613
4612
|
`
|
|
4614
4613
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -4620,7 +4619,7 @@ const Ks = ({
|
|
|
4620
4619
|
}
|
|
4621
4620
|
}
|
|
4622
4621
|
`
|
|
4623
|
-
),
|
|
4622
|
+
), sl = [
|
|
4624
4623
|
{ value: "shell", label: "cURL" },
|
|
4625
4624
|
{ value: "js", label: "JavaScript" },
|
|
4626
4625
|
{ value: "python", label: "Python" },
|
|
@@ -4632,33 +4631,41 @@ const Ks = ({
|
|
|
4632
4631
|
{ value: "php", label: "PHP" },
|
|
4633
4632
|
{ value: "ruby", label: "Ruby" },
|
|
4634
4633
|
{ value: "swift", label: "Swift" }
|
|
4635
|
-
],
|
|
4634
|
+
], ll = ({
|
|
4636
4635
|
operation: e,
|
|
4637
4636
|
selectedResponse: r,
|
|
4638
4637
|
onSelectResponse: t
|
|
4639
4638
|
}) => {
|
|
4640
|
-
var
|
|
4641
|
-
const { input: o, type: i, options: s } = Nr(), n = nt(
|
|
4642
|
-
|
|
4639
|
+
var A;
|
|
4640
|
+
const { input: o, type: i, options: s } = Nr(), n = Bo(), a = nt(il, { input: o, type: i }), l = Tr(a), c = Ua(), p = uo(e.method), [g, v] = aa(), [, m] = po(), [j, b] = he(), f = g.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", h = (A = e.requestBody) == null ? void 0 : A.content, y = h && (s != null && s.transformExamples) ? s.transformExamples({
|
|
4641
|
+
auth: n,
|
|
4642
|
+
type: "request",
|
|
4643
|
+
operation: e,
|
|
4644
|
+
content: h,
|
|
4645
|
+
context: c
|
|
4646
|
+
}) : h, S = /* @__PURE__ */ u.jsx(
|
|
4647
|
+
la,
|
|
4643
4648
|
{
|
|
4644
4649
|
path: e.path,
|
|
4645
|
-
renderParam: ({ name:
|
|
4650
|
+
renderParam: ({ name: N }) => /* @__PURE__ */ u.jsx(
|
|
4646
4651
|
so,
|
|
4647
4652
|
{
|
|
4648
|
-
name:
|
|
4653
|
+
name: N,
|
|
4649
4654
|
backgroundOpacity: "0",
|
|
4650
|
-
slug: `${e.slug}-${
|
|
4651
|
-
children: `{${
|
|
4655
|
+
slug: `${e.slug}-${N}`,
|
|
4656
|
+
children: `{${N}}`
|
|
4652
4657
|
}
|
|
4653
4658
|
)
|
|
4654
4659
|
}
|
|
4655
|
-
), { selectedServer:
|
|
4656
|
-
var
|
|
4657
|
-
const
|
|
4660
|
+
), { selectedServer: T } = Pr(l.data.schema.servers), d = yo(() => {
|
|
4661
|
+
var P;
|
|
4662
|
+
const N = j ?? ((P = y == null ? void 0 : y[0]) != null && P.schema ? Me(
|
|
4663
|
+
y[0].schema
|
|
4664
|
+
) : void 0), U = new Qs({
|
|
4658
4665
|
method: e.method.toLocaleUpperCase(),
|
|
4659
|
-
url:
|
|
4660
|
-
postData:
|
|
4661
|
-
text: JSON.stringify(
|
|
4666
|
+
url: T + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
4667
|
+
postData: N ? {
|
|
4668
|
+
text: JSON.stringify(N, null, 2),
|
|
4662
4669
|
mimeType: "application/json"
|
|
4663
4670
|
} : {},
|
|
4664
4671
|
headers: [{ name: "Content-Type", value: "application/json" }],
|
|
@@ -4668,15 +4675,15 @@ const Ks = ({
|
|
|
4668
4675
|
headersSize: 0,
|
|
4669
4676
|
bodySize: 0
|
|
4670
4677
|
});
|
|
4671
|
-
return
|
|
4678
|
+
return al(U, f);
|
|
4672
4679
|
}, [
|
|
4673
|
-
|
|
4674
|
-
|
|
4680
|
+
j,
|
|
4681
|
+
y,
|
|
4675
4682
|
e.method,
|
|
4676
4683
|
e.path,
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
]), [O,
|
|
4684
|
+
T,
|
|
4685
|
+
f
|
|
4686
|
+
]), [O, x] = Ys({ rootMargin: "200px 0px 200px 0px" }), q = x && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
|
|
4680
4687
|
return /* @__PURE__ */ u.jsxs(
|
|
4681
4688
|
"aside",
|
|
4682
4689
|
{
|
|
@@ -4687,27 +4694,27 @@ const Ks = ({
|
|
|
4687
4694
|
/* @__PURE__ */ u.jsxs(Ar, { children: [
|
|
4688
4695
|
/* @__PURE__ */ u.jsxs(Ir, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
|
|
4689
4696
|
/* @__PURE__ */ u.jsxs("span", { className: "font-mono break-words leading-6", children: [
|
|
4690
|
-
/* @__PURE__ */ u.jsx("span", { className: se("font-semibold",
|
|
4697
|
+
/* @__PURE__ */ u.jsx("span", { className: se("font-semibold", p), children: e.method.toLocaleUpperCase() }),
|
|
4691
4698
|
" ",
|
|
4692
|
-
|
|
4699
|
+
S
|
|
4693
4700
|
] }),
|
|
4694
|
-
|
|
4695
|
-
|
|
4701
|
+
q && /* @__PURE__ */ u.jsx(
|
|
4702
|
+
Zs,
|
|
4696
4703
|
{
|
|
4697
|
-
servers:
|
|
4704
|
+
servers: l.data.schema.servers.map((N) => N.url),
|
|
4698
4705
|
operation: e,
|
|
4699
|
-
examples:
|
|
4706
|
+
examples: h ?? void 0
|
|
4700
4707
|
}
|
|
4701
4708
|
)
|
|
4702
4709
|
] }),
|
|
4703
|
-
|
|
4710
|
+
x && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
4704
4711
|
/* @__PURE__ */ u.jsx(qo, { className: "p-0", children: /* @__PURE__ */ u.jsx(ko, { children: /* @__PURE__ */ u.jsx(
|
|
4705
4712
|
go,
|
|
4706
4713
|
{
|
|
4707
|
-
language:
|
|
4714
|
+
language: f,
|
|
4708
4715
|
noBackground: !0,
|
|
4709
4716
|
className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2",
|
|
4710
|
-
code:
|
|
4717
|
+
code: d
|
|
4711
4718
|
}
|
|
4712
4719
|
) }) }),
|
|
4713
4720
|
/* @__PURE__ */ u.jsxs(Ro, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
|
|
@@ -4716,45 +4723,54 @@ const Ks = ({
|
|
|
4716
4723
|
ot,
|
|
4717
4724
|
{
|
|
4718
4725
|
className: "self-start max-w-[150px]",
|
|
4719
|
-
value:
|
|
4720
|
-
onChange: (
|
|
4721
|
-
|
|
4722
|
-
|
|
4726
|
+
value: f,
|
|
4727
|
+
onChange: (N) => {
|
|
4728
|
+
m(() => {
|
|
4729
|
+
v((U) => (U.set("lang", N.target.value), U));
|
|
4723
4730
|
});
|
|
4724
4731
|
},
|
|
4725
|
-
options:
|
|
4732
|
+
options: sl
|
|
4726
4733
|
}
|
|
4727
4734
|
)
|
|
4728
4735
|
] })
|
|
4729
4736
|
] })
|
|
4730
4737
|
] }),
|
|
4731
|
-
|
|
4732
|
-
|
|
4738
|
+
x && y && /* @__PURE__ */ u.jsx(
|
|
4739
|
+
rl,
|
|
4733
4740
|
{
|
|
4734
|
-
content:
|
|
4735
|
-
onExampleChange:
|
|
4741
|
+
content: y,
|
|
4742
|
+
onExampleChange: b
|
|
4736
4743
|
}
|
|
4737
4744
|
),
|
|
4738
|
-
|
|
4739
|
-
|
|
4745
|
+
x && e.responses.length > 0 && /* @__PURE__ */ u.jsx(
|
|
4746
|
+
ol,
|
|
4740
4747
|
{
|
|
4741
4748
|
selectedResponse: r,
|
|
4742
4749
|
onSelectResponse: t,
|
|
4743
|
-
responses: e.responses
|
|
4750
|
+
responses: e.responses.map((N) => ({
|
|
4751
|
+
...N,
|
|
4752
|
+
content: N.content && (s != null && s.transformExamples) ? s.transformExamples({
|
|
4753
|
+
auth: n,
|
|
4754
|
+
type: "response",
|
|
4755
|
+
context: c,
|
|
4756
|
+
operation: e,
|
|
4757
|
+
content: N.content
|
|
4758
|
+
}) : N.content
|
|
4759
|
+
}))
|
|
4744
4760
|
}
|
|
4745
4761
|
)
|
|
4746
4762
|
]
|
|
4747
4763
|
}
|
|
4748
4764
|
);
|
|
4749
|
-
},
|
|
4750
|
-
AND: /* @__PURE__ */ u.jsx(
|
|
4751
|
-
OR: /* @__PURE__ */ u.jsx(
|
|
4752
|
-
ONE: /* @__PURE__ */ u.jsx(
|
|
4753
|
-
},
|
|
4765
|
+
}, cl = {
|
|
4766
|
+
AND: /* @__PURE__ */ u.jsx(Xo, { size: 16, className: "fill-card" }),
|
|
4767
|
+
OR: /* @__PURE__ */ u.jsx(Yo, { size: 16, className: "fill-card" }),
|
|
4768
|
+
ONE: /* @__PURE__ */ u.jsx(Qo, { size: 14, className: "fill-card" })
|
|
4769
|
+
}, ul = {
|
|
4754
4770
|
AND: "text-green-500 dark:text-green-300/60",
|
|
4755
4771
|
OR: "text-blue-400 dark:text-blue-500",
|
|
4756
4772
|
ONE: "text-purple-500 dark:text-purple-300/60"
|
|
4757
|
-
},
|
|
4773
|
+
}, fl = ({
|
|
4758
4774
|
type: e,
|
|
4759
4775
|
isOpen: r,
|
|
4760
4776
|
className: t
|
|
@@ -4762,13 +4778,13 @@ const Ks = ({
|
|
|
4762
4778
|
"div",
|
|
4763
4779
|
{
|
|
4764
4780
|
className: se(
|
|
4765
|
-
|
|
4781
|
+
ul[e],
|
|
4766
4782
|
"relative text-sm flex py-2",
|
|
4767
4783
|
"before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
|
|
4768
4784
|
t
|
|
4769
4785
|
),
|
|
4770
4786
|
children: /* @__PURE__ */ u.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
|
|
4771
|
-
|
|
4787
|
+
cl[e],
|
|
4772
4788
|
/* @__PURE__ */ u.jsx(
|
|
4773
4789
|
"div",
|
|
4774
4790
|
{
|
|
@@ -4781,7 +4797,7 @@ const Ks = ({
|
|
|
4781
4797
|
)
|
|
4782
4798
|
] })
|
|
4783
4799
|
}
|
|
4784
|
-
),
|
|
4800
|
+
), pl = (e) => {
|
|
4785
4801
|
const [r, t] = he(!0);
|
|
4786
4802
|
return /* @__PURE__ */ u.jsxs(
|
|
4787
4803
|
xe.Root,
|
|
@@ -4790,17 +4806,17 @@ const Ks = ({
|
|
|
4790
4806
|
onOpenChange: () => t((o) => !o),
|
|
4791
4807
|
className: "group",
|
|
4792
4808
|
children: [
|
|
4793
|
-
/* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(
|
|
4809
|
+
/* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(fl, { type: e.type, isOpen: r }) }),
|
|
4794
4810
|
!r && /* @__PURE__ */ u.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
|
|
4795
4811
|
/* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx(Je, { schema: e.schema, level: e.level + 1 }) })
|
|
4796
4812
|
]
|
|
4797
4813
|
}
|
|
4798
4814
|
);
|
|
4799
|
-
},
|
|
4815
|
+
}, dl = {
|
|
4800
4816
|
AND: "All of",
|
|
4801
4817
|
OR: "Any of",
|
|
4802
4818
|
ONE: "One of"
|
|
4803
|
-
},
|
|
4819
|
+
}, hl = ({
|
|
4804
4820
|
schemas: e,
|
|
4805
4821
|
type: r,
|
|
4806
4822
|
isOpen: t,
|
|
@@ -4808,13 +4824,13 @@ const Ks = ({
|
|
|
4808
4824
|
toggleOpen: i
|
|
4809
4825
|
}) => /* @__PURE__ */ u.jsx(xe.Root, { open: t, onOpenChange: i, asChild: !0, children: /* @__PURE__ */ u.jsxs(ve, { className: "px-6", children: [
|
|
4810
4826
|
/* @__PURE__ */ u.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
|
|
4811
|
-
t ? /* @__PURE__ */ u.jsx(
|
|
4812
|
-
/* @__PURE__ */ u.jsx("span", { children:
|
|
4827
|
+
t ? /* @__PURE__ */ u.jsx(Zo, { size: 14 }) : /* @__PURE__ */ u.jsx(ea, { size: 14 }),
|
|
4828
|
+
/* @__PURE__ */ u.jsx("span", { children: dl[r] })
|
|
4813
4829
|
] }),
|
|
4814
4830
|
/* @__PURE__ */ u.jsx(xe.Content, { className: "pb-4", children: e.map((s, n) => (
|
|
4815
4831
|
// eslint-disable-next-line react/no-array-index-key
|
|
4816
4832
|
/* @__PURE__ */ u.jsx(
|
|
4817
|
-
|
|
4833
|
+
pl,
|
|
4818
4834
|
{
|
|
4819
4835
|
type: r,
|
|
4820
4836
|
schema: s,
|
|
@@ -4823,19 +4839,19 @@ const Ks = ({
|
|
|
4823
4839
|
n
|
|
4824
4840
|
)
|
|
4825
4841
|
)) })
|
|
4826
|
-
] }) }),
|
|
4842
|
+
] }) }), yl = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), Or = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), ml = {
|
|
4827
4843
|
allOf: "AND",
|
|
4828
4844
|
anyOf: "OR",
|
|
4829
4845
|
oneOf: "ONE"
|
|
4830
|
-
}, br = (e) => e ===
|
|
4846
|
+
}, br = (e) => e === Oa, Ao = ({
|
|
4831
4847
|
schema: e,
|
|
4832
4848
|
level: r
|
|
4833
4849
|
}) => {
|
|
4834
|
-
const [t, o] = he(!0), i =
|
|
4835
|
-
for (const [s, n] of
|
|
4850
|
+
const [t, o] = he(!0), i = va(() => o((s) => !s), []);
|
|
4851
|
+
for (const [s, n] of Fa(ml))
|
|
4836
4852
|
if (e[s])
|
|
4837
4853
|
return /* @__PURE__ */ u.jsx(
|
|
4838
|
-
|
|
4854
|
+
hl,
|
|
4839
4855
|
{
|
|
4840
4856
|
schemas: e[s],
|
|
4841
4857
|
type: n,
|
|
@@ -4845,9 +4861,9 @@ const Ks = ({
|
|
|
4845
4861
|
}
|
|
4846
4862
|
);
|
|
4847
4863
|
}, no = () => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1.5 italic text-xs text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
|
|
4848
|
-
/* @__PURE__ */ u.jsx(
|
|
4864
|
+
/* @__PURE__ */ u.jsx(na, { size: 13 }),
|
|
4849
4865
|
/* @__PURE__ */ u.jsx("span", { children: "circular" })
|
|
4850
|
-
] }),
|
|
4866
|
+
] }), gl = ({
|
|
4851
4867
|
name: e,
|
|
4852
4868
|
schema: r,
|
|
4853
4869
|
group: t,
|
|
@@ -4883,7 +4899,7 @@ const Ks = ({
|
|
|
4883
4899
|
),
|
|
4884
4900
|
r.type === "array" && "items" in r && r.items.enum && /* @__PURE__ */ u.jsx(Ne, { values: r.items.enum }),
|
|
4885
4901
|
r.enum && /* @__PURE__ */ u.jsx(Ne, { values: r.enum }),
|
|
4886
|
-
(Or(r) ||
|
|
4902
|
+
(Or(r) || yl(r)) && /* @__PURE__ */ u.jsxs(
|
|
4887
4903
|
xe.Root,
|
|
4888
4904
|
{
|
|
4889
4905
|
defaultOpen: i,
|
|
@@ -4891,7 +4907,7 @@ const Ks = ({
|
|
|
4891
4907
|
onOpenChange: () => a(!n),
|
|
4892
4908
|
children: [
|
|
4893
4909
|
s && /* @__PURE__ */ u.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ u.jsxs(mo, { variant: "expand", size: "sm", className: "h-7", children: [
|
|
4894
|
-
n ? /* @__PURE__ */ u.jsx(
|
|
4910
|
+
n ? /* @__PURE__ */ u.jsx(ta, { size: 12 }) : /* @__PURE__ */ u.jsx(ra, { size: 12 }),
|
|
4895
4911
|
n ? "Hide properties" : "Show properties"
|
|
4896
4912
|
] }) }),
|
|
4897
4913
|
/* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx("div", { className: "mt-2", children: Or(r) ? /* @__PURE__ */ u.jsx(Ao, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ u.jsx(Je, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !br(r.items) && /* @__PURE__ */ u.jsx(Je, { schema: r.items, level: o + 1 }) }) })
|
|
@@ -4945,16 +4961,16 @@ const Ks = ({
|
|
|
4945
4961
|
const n = vo(
|
|
4946
4962
|
Object.entries(i.properties),
|
|
4947
4963
|
([l, c]) => {
|
|
4948
|
-
var
|
|
4949
|
-
return c.deprecated ? "deprecated" : (
|
|
4964
|
+
var p;
|
|
4965
|
+
return c.deprecated ? "deprecated" : (p = i.required) != null && p.includes(l) ? "required" : "optional";
|
|
4950
4966
|
}
|
|
4951
4967
|
), a = ["required", "optional", "deprecated"];
|
|
4952
4968
|
return /* @__PURE__ */ u.jsx(ve, { className: "divide-y overflow-hidden", children: a.map(
|
|
4953
|
-
(l) => n[l] && /* @__PURE__ */ u.jsx("ul", { className: "divide-y", children: n[l].map(([c,
|
|
4954
|
-
|
|
4969
|
+
(l) => n[l] && /* @__PURE__ */ u.jsx("ul", { className: "divide-y", children: n[l].map(([c, p]) => /* @__PURE__ */ u.jsx(
|
|
4970
|
+
gl,
|
|
4955
4971
|
{
|
|
4956
4972
|
name: c,
|
|
4957
|
-
schema:
|
|
4973
|
+
schema: p,
|
|
4958
4974
|
group: l,
|
|
4959
4975
|
level: s,
|
|
4960
4976
|
defaultOpen: t
|
|
@@ -4968,25 +4984,25 @@ const Ks = ({
|
|
|
4968
4984
|
i.enum && /* @__PURE__ */ u.jsx(Ne, { values: i.enum }),
|
|
4969
4985
|
_e(i.description)
|
|
4970
4986
|
] }) : i.additionalProperties ? /* @__PURE__ */ u.jsxs(ve, { className: "my-2", children: [
|
|
4971
|
-
/* @__PURE__ */ u.jsx(
|
|
4972
|
-
/* @__PURE__ */ u.jsx(
|
|
4987
|
+
/* @__PURE__ */ u.jsx(qa, { children: /* @__PURE__ */ u.jsx(Ra, { children: "Additional Properties:" }) }),
|
|
4988
|
+
/* @__PURE__ */ u.jsx(Ea, { children: o(
|
|
4973
4989
|
i.additionalProperties,
|
|
4974
4990
|
s + 1
|
|
4975
4991
|
) })
|
|
4976
4992
|
] }) : null;
|
|
4977
4993
|
};
|
|
4978
4994
|
return o(e, r);
|
|
4979
|
-
},
|
|
4995
|
+
}, vl = ["path", "query", "header", "cookie"], bl = ({
|
|
4980
4996
|
operationFragment: e,
|
|
4981
4997
|
serverUrl: r
|
|
4982
4998
|
}) => {
|
|
4983
4999
|
var a, l, c;
|
|
4984
|
-
const t =
|
|
5000
|
+
const t = _a(xl, e), o = vo(
|
|
4985
5001
|
t.parameters ?? [],
|
|
4986
|
-
(
|
|
5002
|
+
(p) => p.in
|
|
4987
5003
|
), i = t.responses.at(0), [s, n] = he(i == null ? void 0 : i.statusCode);
|
|
4988
5004
|
return /* @__PURE__ */ u.jsxs("div", { className: "border-b-2 mb-16 pb-16", children: [
|
|
4989
|
-
t.deprecated && /* @__PURE__ */ u.jsx(
|
|
5005
|
+
t.deprecated && /* @__PURE__ */ u.jsx(Ga, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
4990
5006
|
/* @__PURE__ */ u.jsxs(
|
|
4991
5007
|
"div",
|
|
4992
5008
|
{
|
|
@@ -5020,22 +5036,22 @@ const Ks = ({
|
|
|
5020
5036
|
content: t.description
|
|
5021
5037
|
}
|
|
5022
5038
|
),
|
|
5023
|
-
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children:
|
|
5024
|
-
(
|
|
5039
|
+
t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children: vl.flatMap(
|
|
5040
|
+
(p) => {
|
|
5025
5041
|
var g;
|
|
5026
|
-
return (g = o[
|
|
5027
|
-
|
|
5042
|
+
return (g = o[p]) != null && g.length ? /* @__PURE__ */ u.jsx(
|
|
5043
|
+
Qa,
|
|
5028
5044
|
{
|
|
5029
5045
|
summary: t.summary ?? void 0,
|
|
5030
5046
|
id: t.slug,
|
|
5031
|
-
parameters: o[
|
|
5032
|
-
group:
|
|
5047
|
+
parameters: o[p],
|
|
5048
|
+
group: p
|
|
5033
5049
|
},
|
|
5034
|
-
|
|
5050
|
+
p
|
|
5035
5051
|
) : [];
|
|
5036
5052
|
}
|
|
5037
5053
|
) }),
|
|
5038
|
-
|
|
5054
|
+
Wa((c = (l = (a = t.requestBody) == null ? void 0 : a.content) == null ? void 0 : l.at(0)) == null ? void 0 : c.schema, (p) => /* @__PURE__ */ u.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
|
|
5039
5055
|
/* @__PURE__ */ u.jsxs(
|
|
5040
5056
|
He,
|
|
5041
5057
|
{
|
|
@@ -5051,7 +5067,7 @@ const Ks = ({
|
|
|
5051
5067
|
]
|
|
5052
5068
|
}
|
|
5053
5069
|
),
|
|
5054
|
-
/* @__PURE__ */ u.jsx(Je, { schema:
|
|
5070
|
+
/* @__PURE__ */ u.jsx(Je, { schema: p })
|
|
5055
5071
|
] })),
|
|
5056
5072
|
t.responses.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
|
5057
5073
|
/* @__PURE__ */ u.jsxs(
|
|
@@ -5070,34 +5086,34 @@ const Ks = ({
|
|
|
5070
5086
|
}
|
|
5071
5087
|
),
|
|
5072
5088
|
/* @__PURE__ */ u.jsxs(
|
|
5073
|
-
|
|
5089
|
+
Pa,
|
|
5074
5090
|
{
|
|
5075
|
-
onValueChange: (
|
|
5091
|
+
onValueChange: (p) => n(p),
|
|
5076
5092
|
value: s,
|
|
5077
5093
|
children: [
|
|
5078
|
-
t.responses.length > 1 && /* @__PURE__ */ u.jsx(
|
|
5079
|
-
|
|
5094
|
+
t.responses.length > 1 && /* @__PURE__ */ u.jsx(Ca, { children: t.responses.map((p) => /* @__PURE__ */ u.jsx(
|
|
5095
|
+
Na,
|
|
5080
5096
|
{
|
|
5081
|
-
value:
|
|
5082
|
-
title:
|
|
5083
|
-
children:
|
|
5097
|
+
value: p.statusCode,
|
|
5098
|
+
title: p.description ?? void 0,
|
|
5099
|
+
children: p.statusCode
|
|
5084
5100
|
},
|
|
5085
|
-
|
|
5101
|
+
p.statusCode
|
|
5086
5102
|
)) }),
|
|
5087
|
-
/* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((
|
|
5088
|
-
var g,
|
|
5103
|
+
/* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((p) => {
|
|
5104
|
+
var g, v;
|
|
5089
5105
|
return /* @__PURE__ */ u.jsx(
|
|
5090
|
-
|
|
5106
|
+
ka,
|
|
5091
5107
|
{
|
|
5092
|
-
value:
|
|
5108
|
+
value: p.statusCode,
|
|
5093
5109
|
children: /* @__PURE__ */ u.jsx(
|
|
5094
5110
|
Je,
|
|
5095
5111
|
{
|
|
5096
|
-
schema: (
|
|
5112
|
+
schema: (v = (g = p.content) == null ? void 0 : g.find((m) => m.schema)) == null ? void 0 : v.schema
|
|
5097
5113
|
}
|
|
5098
5114
|
)
|
|
5099
5115
|
},
|
|
5100
|
-
|
|
5116
|
+
p.statusCode
|
|
5101
5117
|
);
|
|
5102
5118
|
}) })
|
|
5103
5119
|
]
|
|
@@ -5106,7 +5122,7 @@ const Ks = ({
|
|
|
5106
5122
|
] })
|
|
5107
5123
|
] }),
|
|
5108
5124
|
/* @__PURE__ */ u.jsx(
|
|
5109
|
-
|
|
5125
|
+
ll,
|
|
5110
5126
|
{
|
|
5111
5127
|
selectedResponse: s,
|
|
5112
5128
|
onSelectResponse: n,
|
|
@@ -5122,7 +5138,7 @@ const Ks = ({
|
|
|
5122
5138
|
function oo(e, r = 160) {
|
|
5123
5139
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
5124
5140
|
}
|
|
5125
|
-
const
|
|
5141
|
+
const xl = Ve(
|
|
5126
5142
|
/* GraphQL */
|
|
5127
5143
|
`
|
|
5128
5144
|
fragment OperationsFragment on OperationItem {
|
|
@@ -5190,7 +5206,7 @@ const vl = Ve(
|
|
|
5190
5206
|
}
|
|
5191
5207
|
}
|
|
5192
5208
|
`
|
|
5193
|
-
),
|
|
5209
|
+
), jl = Ve(
|
|
5194
5210
|
/* GraphQL */
|
|
5195
5211
|
`
|
|
5196
5212
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
@@ -5199,7 +5215,7 @@ const vl = Ve(
|
|
|
5199
5215
|
}
|
|
5200
5216
|
}
|
|
5201
5217
|
`
|
|
5202
|
-
),
|
|
5218
|
+
), $l = Ve(
|
|
5203
5219
|
/* GraphQL */
|
|
5204
5220
|
`
|
|
5205
5221
|
query OperationsForTag(
|
|
@@ -5228,25 +5244,25 @@ const vl = Ve(
|
|
|
5228
5244
|
}
|
|
5229
5245
|
}
|
|
5230
5246
|
`
|
|
5231
|
-
),
|
|
5247
|
+
), Jl = ({
|
|
5232
5248
|
tag: e,
|
|
5233
5249
|
untagged: r
|
|
5234
5250
|
}) => {
|
|
5235
5251
|
var d;
|
|
5236
|
-
const { input: t, type: o, versions: i, version: s, options: n } = Nr(), a = nt(
|
|
5252
|
+
const { input: t, type: o, versions: i, version: s, options: n } = Nr(), a = nt($l, {
|
|
5237
5253
|
input: t,
|
|
5238
5254
|
type: o,
|
|
5239
5255
|
tag: e,
|
|
5240
5256
|
untagged: r
|
|
5241
5257
|
}), l = Tr(a), {
|
|
5242
5258
|
data: { schema: c }
|
|
5243
|
-
} = l, { selectedServer:
|
|
5244
|
-
|
|
5259
|
+
} = l, { selectedServer: p } = Pr(c.servers), g = c.title, v = c.summary, m = c.description, j = ia(), b = c.operations, f = (d = c.tags.find((O) => O.name === e)) == null ? void 0 : d.description, h = nt(jl, { input: t, type: o });
|
|
5260
|
+
Ho({
|
|
5245
5261
|
...h,
|
|
5246
5262
|
enabled: typeof window < "u",
|
|
5247
5263
|
notifyOnChangeProps: []
|
|
5248
|
-
}),
|
|
5249
|
-
const y =
|
|
5264
|
+
}), Mo();
|
|
5265
|
+
const y = f ? oo(f) : v || (m ? oo(m) : void 0), S = Object.entries(i).length > 1, T = (n == null ? void 0 : n.showVersionSelect) === "always" || S && (n == null ? void 0 : n.showVersionSelect) !== "hide";
|
|
5250
5266
|
return /* @__PURE__ */ u.jsxs(
|
|
5251
5267
|
"div",
|
|
5252
5268
|
{
|
|
@@ -5254,7 +5270,7 @@ const vl = Ve(
|
|
|
5254
5270
|
"data-pagefind-filter": "section:openapi",
|
|
5255
5271
|
"data-pagefind-meta": "section:openapi",
|
|
5256
5272
|
children: [
|
|
5257
|
-
/* @__PURE__ */ u.jsxs(
|
|
5273
|
+
/* @__PURE__ */ u.jsxs(zo, { children: [
|
|
5258
5274
|
/* @__PURE__ */ u.jsx("title", { children: [e, g].filter(Boolean).join(" - ") }),
|
|
5259
5275
|
y && /* @__PURE__ */ u.jsx("meta", { name: "description", content: y })
|
|
5260
5276
|
] }),
|
|
@@ -5262,7 +5278,7 @@ const vl = Ve(
|
|
|
5262
5278
|
/* @__PURE__ */ u.jsxs(lo, { className: "w-full", children: [
|
|
5263
5279
|
/* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
5264
5280
|
/* @__PURE__ */ u.jsxs("div", { className: "flex-1", children: [
|
|
5265
|
-
/* @__PURE__ */ u.jsx(
|
|
5281
|
+
/* @__PURE__ */ u.jsx(ha, { children: g }),
|
|
5266
5282
|
/* @__PURE__ */ u.jsxs(
|
|
5267
5283
|
He,
|
|
5268
5284
|
{
|
|
@@ -5284,14 +5300,14 @@ const vl = Ve(
|
|
|
5284
5300
|
] }),
|
|
5285
5301
|
/* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
5286
5302
|
T && /* @__PURE__ */ u.jsxs(
|
|
5287
|
-
|
|
5303
|
+
ca,
|
|
5288
5304
|
{
|
|
5289
|
-
onValueChange: (
|
|
5305
|
+
onValueChange: (O) => j(i[O]),
|
|
5290
5306
|
defaultValue: s,
|
|
5291
|
-
disabled: !
|
|
5307
|
+
disabled: !S,
|
|
5292
5308
|
children: [
|
|
5293
|
-
/* @__PURE__ */ u.jsx(
|
|
5294
|
-
/* @__PURE__ */ u.jsx(
|
|
5309
|
+
/* @__PURE__ */ u.jsx(ua, { className: "w-[180px]", children: /* @__PURE__ */ u.jsx(fa, { placeholder: "Select version" }) }),
|
|
5310
|
+
/* @__PURE__ */ u.jsx(pa, { children: Object.entries(i).map(([O]) => /* @__PURE__ */ u.jsx(da, { value: O, children: O }, O)) })
|
|
5295
5311
|
]
|
|
5296
5312
|
}
|
|
5297
5313
|
),
|
|
@@ -5305,7 +5321,7 @@ const vl = Ve(
|
|
|
5305
5321
|
}
|
|
5306
5322
|
),
|
|
5307
5323
|
/* @__PURE__ */ u.jsx(
|
|
5308
|
-
|
|
5324
|
+
oa,
|
|
5309
5325
|
{
|
|
5310
5326
|
className: "group-data-[state=closed]:hidden translate-y-px",
|
|
5311
5327
|
size: 13
|
|
@@ -5331,33 +5347,33 @@ const vl = Ve(
|
|
|
5331
5347
|
}
|
|
5332
5348
|
) })
|
|
5333
5349
|
] }),
|
|
5334
|
-
|
|
5350
|
+
f && /* @__PURE__ */ u.jsx(
|
|
5335
5351
|
"div",
|
|
5336
5352
|
{
|
|
5337
5353
|
className: se(
|
|
5338
5354
|
ze,
|
|
5339
5355
|
"my-4 max-w-full prose-img:max-w-prose"
|
|
5340
5356
|
),
|
|
5341
|
-
children: /* @__PURE__ */ u.jsx(Le, { content:
|
|
5357
|
+
children: /* @__PURE__ */ u.jsx(Le, { content: f })
|
|
5342
5358
|
}
|
|
5343
5359
|
)
|
|
5344
5360
|
] }),
|
|
5345
5361
|
/* @__PURE__ */ u.jsx("hr", {}),
|
|
5346
|
-
/* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(
|
|
5347
|
-
/* @__PURE__ */ u.jsx("div", { className: "px-6 -mx-6 [content-visibility:auto]", children:
|
|
5348
|
-
|
|
5362
|
+
/* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(Ma, {}) }),
|
|
5363
|
+
/* @__PURE__ */ u.jsx("div", { className: "px-6 -mx-6 [content-visibility:auto]", children: b.map((O) => /* @__PURE__ */ u.jsx(
|
|
5364
|
+
bl,
|
|
5349
5365
|
{
|
|
5350
|
-
serverUrl:
|
|
5351
|
-
operationFragment:
|
|
5366
|
+
serverUrl: p,
|
|
5367
|
+
operationFragment: O
|
|
5352
5368
|
},
|
|
5353
|
-
|
|
5369
|
+
O.slug
|
|
5354
5370
|
)) })
|
|
5355
5371
|
]
|
|
5356
5372
|
}
|
|
5357
5373
|
);
|
|
5358
5374
|
};
|
|
5359
5375
|
export {
|
|
5360
|
-
|
|
5361
|
-
|
|
5376
|
+
Jl as OperationList,
|
|
5377
|
+
xl as OperationsFragment
|
|
5362
5378
|
};
|
|
5363
|
-
//# sourceMappingURL=OperationList-
|
|
5379
|
+
//# sourceMappingURL=OperationList-yOmYzMIp.js.map
|