zudoku 0.66.6 → 0.67.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/cli/common/version-check.js +12 -3
- package/dist/cli/common/version-check.js.map +1 -1
- package/dist/config/validators/validate.d.ts +21 -3
- package/dist/config/validators/validate.js +6 -3
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +25 -24
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/components/Pagination.js +2 -2
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/index.d.ts +3 -0
- package/dist/lib/components/index.js +4 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/core/react-query.d.ts +1 -0
- package/dist/lib/core/react-query.js +2 -0
- package/dist/lib/core/react-query.js.map +1 -0
- package/dist/lib/oas/graphql/circular.d.ts +1 -0
- package/dist/lib/oas/graphql/circular.js +15 -8
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/circular.test.d.ts +1 -0
- package/dist/lib/oas/graphql/circular.test.js +152 -0
- package/dist/lib/oas/graphql/circular.test.js.map +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js +6 -2
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +4 -8
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +3 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +2 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +11 -1
- package/dist/vite/api/SchemaManager.js +28 -17
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +44 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/config.js +2 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/error-handler.js +1 -5
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/plugin-api.js +5 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/lib/{ClaudeLogo-BpqHBMS8.js → ClaudeLogo-DHxJUhN_.js} +20 -20
- package/lib/ClaudeLogo-DHxJUhN_.js.map +1 -0
- package/lib/HydrationBoundary-CNF2ZV3E.js +601 -0
- package/lib/HydrationBoundary-CNF2ZV3E.js.map +1 -0
- package/lib/Input-Cx-GeKoF.js +22 -0
- package/lib/Input-Cx-GeKoF.js.map +1 -0
- package/lib/{MdxPage-CeFSxGb_.js → MdxPage-CD36PJ17.js} +7 -7
- package/lib/{MdxPage-CeFSxGb_.js.map → MdxPage-CD36PJ17.js.map} +1 -1
- package/lib/{Mermaid-COVtAqcZ.js → Mermaid-Koc3z8mU.js} +3 -3
- package/lib/{Mermaid-COVtAqcZ.js.map → Mermaid-Koc3z8mU.js.map} +1 -1
- package/lib/{OAuthErrorPage-XTPBOMN8.js → OAuthErrorPage-4mN5DA86.js} +23 -22
- package/lib/{OAuthErrorPage-XTPBOMN8.js.map → OAuthErrorPage-4mN5DA86.js.map} +1 -1
- package/lib/OasProvider-D-4BX8P3.js +48 -0
- package/lib/OasProvider-D-4BX8P3.js.map +1 -0
- package/lib/{OperationList-Dg0Nm1tg.js → OperationList-BOu9Qd_k.js} +833 -835
- package/lib/{OperationList-Dg0Nm1tg.js.map → OperationList-BOu9Qd_k.js.map} +1 -1
- package/lib/{RouteGuard-kCicqF3x.js → RouteGuard--A04ESy8.js} +3 -3
- package/lib/{RouteGuard-kCicqF3x.js.map → RouteGuard--A04ESy8.js.map} +1 -1
- package/lib/{SchemaList-DZKBH2WC.js → SchemaList-B167Xmbd.js} +7 -7
- package/lib/{SchemaList-DZKBH2WC.js.map → SchemaList-B167Xmbd.js.map} +1 -1
- package/lib/{SchemaView-DBaqV2yU.js → SchemaView-Dx9gtne2.js} +3 -3
- package/lib/{SchemaView-DBaqV2yU.js.map → SchemaView-Dx9gtne2.js.map} +1 -1
- package/lib/{SignUp-DNmOFbLD.js → SignUp-DRvN-8cq.js} +3 -3
- package/lib/{SignUp-DNmOFbLD.js.map → SignUp-DRvN-8cq.js.map} +1 -1
- package/lib/{SyntaxHighlight-C75W8uCn.js → SyntaxHighlight-klTH8c6-.js} +2 -2
- package/lib/{SyntaxHighlight-C75W8uCn.js.map → SyntaxHighlight-klTH8c6-.js.map} +1 -1
- package/lib/{Toc-ICilS65g.js → Toc-PbuF-u9x.js} +2 -2
- package/lib/{Toc-ICilS65g.js.map → Toc-PbuF-u9x.js.map} +1 -1
- package/lib/ZudokuContext-BZB1TWdT.js +387 -0
- package/lib/ZudokuContext-BZB1TWdT.js.map +1 -0
- package/lib/{circular-DleWPaPP.js → circular-B5aq06Lb.js} +21 -19
- package/lib/{circular-DleWPaPP.js.map → circular-B5aq06Lb.js.map} +1 -1
- package/lib/{createServer-nqMW9kro.js → createServer-CasZ-UG7.js} +4 -4
- package/lib/{createServer-nqMW9kro.js.map → createServer-CasZ-UG7.js.map} +1 -1
- package/lib/{errors-D2FbERKl.js → errors-rWHkzVTd.js} +2 -2
- package/lib/{errors-D2FbERKl.js.map → errors-rWHkzVTd.js.map} +1 -1
- package/lib/{firebase-Cn9CmB6h.js → firebase-BmGU1FuD.js} +17 -15
- package/lib/{firebase-Cn9CmB6h.js.map → firebase-BmGU1FuD.js.map} +1 -1
- package/lib/{hook-B2nmfmYN.js → hook-BGlHBdET.js} +2 -2
- package/lib/{hook-B2nmfmYN.js.map → hook-BGlHBdET.js.map} +1 -1
- package/lib/{index-D5NeW2z6.js → index-BDsEwofZ.js} +1709 -1707
- package/lib/index-BDsEwofZ.js.map +1 -0
- package/lib/{index-CSDW7CHl.js → index-BcAudYNw.js} +188 -183
- package/lib/{index-CSDW7CHl.js.map → index-BcAudYNw.js.map} +1 -1
- package/lib/{index-CC4L3gtM.js → index-DBjOT2H1.js} +3 -3
- package/lib/{index-CC4L3gtM.js.map → index-DBjOT2H1.js.map} +1 -1
- package/lib/{index-DSKBOdpT.js → index-DRBOFufT.js} +2 -2
- package/lib/{index-DSKBOdpT.js.map → index-DRBOFufT.js.map} +1 -1
- package/lib/{index.esm-B35e7P83.js → index.esm-Cx8B1YJQ.js} +2 -2
- package/lib/index.esm-Cx8B1YJQ.js.map +1 -0
- package/lib/{mutation-BOYnEDf6.js → mutation-BISOc7OM.js} +2 -2
- package/lib/{mutation-BOYnEDf6.js.map → mutation-BISOc7OM.js.map} +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/{Input-B6YcAPv-.js → useMutation-CFMGlAMW.js} +23 -40
- package/lib/useMutation-CFMGlAMW.js.map +1 -0
- package/lib/useSuspenseQuery-CSB_rVek.js +1226 -0
- package/lib/useSuspenseQuery-CSB_rVek.js.map +1 -0
- package/lib/zudoku.__internal.js +928 -1457
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +4 -4
- package/lib/zudoku.auth-openid.js +4 -4
- package/lib/zudoku.auth-supabase.js +4 -4
- package/lib/zudoku.components.js +21 -18
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +6 -5
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +23 -21
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +29 -28
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.react-query.js +440 -0
- package/lib/zudoku.react-query.js.map +1 -0
- package/package.json +6 -2
- package/src/lib/components/Pagination.tsx +4 -5
- package/src/lib/components/index.ts +4 -0
- package/src/lib/components/navigation/NavigationItem.tsx +9 -3
- package/src/lib/core/react-query.ts +1 -0
- package/src/lib/oas/graphql/circular.test.ts +186 -0
- package/src/lib/oas/graphql/circular.ts +22 -16
- package/src/lib/plugins/openapi/OasProvider.tsx +10 -2
- package/src/lib/plugins/openapi/OperationList.tsx +4 -9
- package/src/lib/plugins/openapi/interfaces.ts +6 -1
- package/src/lib/plugins/openapi/util/getRoutes.tsx +4 -1
- package/lib/ClaudeLogo-BpqHBMS8.js.map +0 -1
- package/lib/Input-B6YcAPv-.js.map +0 -1
- package/lib/OasProvider-BS4rdzZC.js +0 -40
- package/lib/OasProvider-BS4rdzZC.js.map +0 -1
- package/lib/ZudokuContext-Ea7gxmGq.js +0 -1581
- package/lib/ZudokuContext-Ea7gxmGq.js.map +0 -1
- package/lib/index-D5NeW2z6.js.map +0 -1
- package/lib/index.esm-B35e7P83.js.map +0 -1
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import {
|
|
3
|
-
import { H as
|
|
4
|
-
import { DownloadIcon as
|
|
5
|
-
import { b as
|
|
6
|
-
import { u as ct, a as Sr, d as Ve, e as ja, f as Or, P as
|
|
7
|
-
import { S as
|
|
8
|
-
import { C as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { u as ga, e as Ja } from "./useSuspenseQuery-CSB_rVek.js";
|
|
3
|
+
import { H as Da } from "./index.esm-B_0dvNjB.js";
|
|
4
|
+
import { DownloadIcon as Qa, ChevronDownIcon as va, ExternalLinkIcon as Ae, CopyIcon as kr, ChevronsUpDownIcon as lt, CheckIcon as xa, MinusIcon as Ka, PlusIcon as Ya, InfoIcon as ba, ChevronsDownUpIcon as qr } from "lucide-react";
|
|
5
|
+
import { b as Xa, d as Za, u as eo } from "./chunk-EPOLDU6W-C6C8jAwd.js";
|
|
6
|
+
import { u as ct, a as Sr, d as Ve, e as ja, f as Or, P as to, C as Rr, b as Er, c as Ar, h as ro, U as no } from "./index-BcAudYNw.js";
|
|
7
|
+
import { S as ao, a as oo, b as io, c as so, e as lo } from "./Secret-BDBqq4p3.js";
|
|
8
|
+
import { C as co } from "./CategoryHeading-DhmodDcq.js";
|
|
9
|
+
import { u as uo, h as po } from "./ZudokuContext-BZB1TWdT.js";
|
|
10
|
+
import { B as ot, I as Ce, o as fo, T as ho, M as He, H as Fe, h as $a, k as wa, l as Sa, m as Oa, c as Ta, b as mo } from "./index-BDsEwofZ.js";
|
|
11
|
+
import { S as Ir, i as yo, a as go, E as Xr, b as vo, c as xo, g as bo, P as Tr } from "./SchemaView-Dx9gtne2.js";
|
|
12
|
+
import { C as jo, a as $o, P as wo } from "./ClaudeLogo-DHxJUhN_.js";
|
|
13
|
+
import { Slot as So } from "@radix-ui/react-slot";
|
|
13
14
|
import { c as Ca } from "./index-DI5SPFK9.js";
|
|
14
15
|
import { c as fe } from "./cn-5-Gd1Dss.js";
|
|
15
16
|
import "@radix-ui/react-separator";
|
|
16
|
-
import { D as
|
|
17
|
-
import { u as
|
|
18
|
-
import { useTransition as Pa, useState as ge, Fragment as
|
|
17
|
+
import { D as Oo, a as To, b as Co, c as Xe } from "./DropdownMenu-DN0jNrjj.js";
|
|
18
|
+
import { u as Po } from "./useCopyToClipboard-B_085nfO.js";
|
|
19
|
+
import { useTransition as Pa, useState as ge, Fragment as No, useRef as ko, useEffect as Cr, useMemo as qo } from "react";
|
|
19
20
|
import { Button as Ur } from "./ui/Button.js";
|
|
20
21
|
import { S as Zr } from "./Separator-BXt1LYnm.js";
|
|
21
22
|
import * as Ze from "@radix-ui/react-tabs";
|
|
22
23
|
import { Callout as en } from "./ui/Callout.js";
|
|
23
24
|
import { Card as Ro } from "./ui/Card.js";
|
|
24
|
-
import { S as nt } from "./SyntaxHighlight-
|
|
25
|
-
import { Tabs as
|
|
26
|
-
import { VisuallyHidden as
|
|
27
|
-
import { Frame as
|
|
28
|
-
import { Item as
|
|
25
|
+
import { S as nt } from "./SyntaxHighlight-klTH8c6-.js";
|
|
26
|
+
import { Tabs as Eo, TabsList as Ao, TabsTrigger as et, TabsContent as tt } from "./ui/Tabs.js";
|
|
27
|
+
import { VisuallyHidden as Io } from "@radix-ui/react-visually-hidden";
|
|
28
|
+
import { Frame as Uo, FramePanel as Lo } from "./ui/Frame.js";
|
|
29
|
+
import { Item as _o, ItemContent as tn, ItemTitle as Fo, ItemActions as Ho, ItemGroup as Mo, ItemSeparator as Bo } from "./ui/Item.js";
|
|
29
30
|
import * as rn from "@radix-ui/react-collapsible";
|
|
30
|
-
import { c as
|
|
31
|
+
import { c as zo } from "./index-DBjOT2H1.js";
|
|
31
32
|
import "./Button-GUVe7pmt.js";
|
|
32
|
-
import { a as
|
|
33
|
-
import { r as
|
|
34
|
-
function
|
|
33
|
+
import { a as Go, c as it } from "./invariant-BJAl77rw.js";
|
|
34
|
+
import { r as Wo } from "./___vite-browser-external_commonjs-proxy-BttVsNON.js";
|
|
35
|
+
function Vo(e, n) {
|
|
35
36
|
return n;
|
|
36
37
|
}
|
|
37
|
-
const
|
|
38
|
+
const Jo = Ca(
|
|
38
39
|
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
39
40
|
{
|
|
40
41
|
variants: {
|
|
@@ -48,7 +49,7 @@ const Do = Ca(
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
);
|
|
51
|
-
function
|
|
52
|
+
function Do({
|
|
52
53
|
className: e,
|
|
53
54
|
orientation: n,
|
|
54
55
|
...r
|
|
@@ -59,15 +60,15 @@ function Qo({
|
|
|
59
60
|
role: "group",
|
|
60
61
|
"data-slot": "button-group",
|
|
61
62
|
"data-orientation": n,
|
|
62
|
-
className: fe(
|
|
63
|
+
className: fe(Jo({ orientation: n }), e),
|
|
63
64
|
...r
|
|
64
65
|
}
|
|
65
66
|
);
|
|
66
67
|
}
|
|
67
|
-
const
|
|
68
|
+
const Qo = ({
|
|
68
69
|
downloadUrl: e
|
|
69
70
|
}) => {
|
|
70
|
-
const [, n] =
|
|
71
|
+
const [, n] = Po(), r = async (a) => {
|
|
71
72
|
if (e.includes("://")) {
|
|
72
73
|
a.preventDefault();
|
|
73
74
|
try {
|
|
@@ -81,7 +82,7 @@ const Ko = ({
|
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
return /* @__PURE__ */ l.jsxs(
|
|
85
|
+
return /* @__PURE__ */ l.jsxs(Do, { children: [
|
|
85
86
|
/* @__PURE__ */ l.jsx(
|
|
86
87
|
ot,
|
|
87
88
|
{
|
|
@@ -90,14 +91,14 @@ const Ko = ({
|
|
|
90
91
|
className: "flex items-center gap-1.5",
|
|
91
92
|
asChild: !0,
|
|
92
93
|
children: /* @__PURE__ */ l.jsxs("a", { href: e, download: !0, onClick: r, children: [
|
|
93
|
-
/* @__PURE__ */ l.jsx(
|
|
94
|
+
/* @__PURE__ */ l.jsx(Qa, { size: 14 }),
|
|
94
95
|
"Download schema"
|
|
95
96
|
] })
|
|
96
97
|
}
|
|
97
98
|
),
|
|
98
|
-
/* @__PURE__ */ l.jsxs(
|
|
99
|
-
/* @__PURE__ */ l.jsx(
|
|
100
|
-
/* @__PURE__ */ l.jsxs(
|
|
99
|
+
/* @__PURE__ */ l.jsxs(Oo, { children: [
|
|
100
|
+
/* @__PURE__ */ l.jsx(To, { asChild: !0, children: /* @__PURE__ */ l.jsx(ot, { size: "sm", variant: "outline", className: "px-1.5", children: /* @__PURE__ */ l.jsx(va, { size: 14 }) }) }),
|
|
101
|
+
/* @__PURE__ */ l.jsxs(Co, { align: "end", children: [
|
|
101
102
|
/* @__PURE__ */ l.jsx(Xe, { asChild: !0, children: /* @__PURE__ */ l.jsxs("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [
|
|
102
103
|
/* @__PURE__ */ l.jsx(Ae, { size: 14 }),
|
|
103
104
|
"Open in new tab"
|
|
@@ -125,7 +126,7 @@ const Ko = ({
|
|
|
125
126
|
window.open(`https://claude.ai/new?q=${a}`, "_blank");
|
|
126
127
|
},
|
|
127
128
|
children: [
|
|
128
|
-
/* @__PURE__ */ l.jsx(
|
|
129
|
+
/* @__PURE__ */ l.jsx(jo, { className: "size-4" }),
|
|
129
130
|
"Use in Claude"
|
|
130
131
|
]
|
|
131
132
|
}
|
|
@@ -140,7 +141,7 @@ const Ko = ({
|
|
|
140
141
|
window.open(`https://chatgpt.com/?q=${a}`, "_blank");
|
|
141
142
|
},
|
|
142
143
|
children: [
|
|
143
|
-
/* @__PURE__ */ l.jsx(
|
|
144
|
+
/* @__PURE__ */ l.jsx($o, { className: "size-4" }),
|
|
144
145
|
"Use in ChatGPT"
|
|
145
146
|
]
|
|
146
147
|
}
|
|
@@ -148,7 +149,7 @@ const Ko = ({
|
|
|
148
149
|
] })
|
|
149
150
|
] })
|
|
150
151
|
] });
|
|
151
|
-
},
|
|
152
|
+
}, Ko = ({
|
|
152
153
|
value: e,
|
|
153
154
|
onChange: n,
|
|
154
155
|
className: r,
|
|
@@ -178,7 +179,7 @@ const Ko = ({
|
|
|
178
179
|
children: /* @__PURE__ */ l.jsx(lt, { size: 14 })
|
|
179
180
|
}
|
|
180
181
|
)
|
|
181
|
-
] }),
|
|
182
|
+
] }), Yo = Ve(
|
|
182
183
|
/* GraphQL */
|
|
183
184
|
`
|
|
184
185
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -190,7 +191,7 @@ const Ko = ({
|
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
`
|
|
193
|
-
),
|
|
194
|
+
), Xo = ({ url: e }) => {
|
|
194
195
|
const [n, r] = ge(!1);
|
|
195
196
|
return /* @__PURE__ */ l.jsx(
|
|
196
197
|
Ur,
|
|
@@ -205,14 +206,14 @@ const Ko = ({
|
|
|
205
206
|
children: n ? /* @__PURE__ */ l.jsx(xa, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ l.jsx(kr, { size: 14, strokeWidth: 1.3 })
|
|
206
207
|
}
|
|
207
208
|
);
|
|
208
|
-
},
|
|
209
|
-
const { input: e, type: n } = ct(), r = Sr(
|
|
209
|
+
}, Zo = () => {
|
|
210
|
+
const { input: e, type: n } = ct(), r = Sr(Yo, { input: e, type: n }), a = ga(r), [, c] = Pa(), { selectedServer: i, setSelectedServer: t } = ja(
|
|
210
211
|
a.data.schema.servers
|
|
211
212
|
), { servers: o } = a.data.schema, s = o.at(0);
|
|
212
213
|
return s ? /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1.5 flex-nowrap", children: [
|
|
213
214
|
/* @__PURE__ */ l.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
|
|
214
215
|
o.length > 1 ? /* @__PURE__ */ l.jsx(
|
|
215
|
-
|
|
216
|
+
Ko,
|
|
216
217
|
{
|
|
217
218
|
className: "font-mono text-xs border-input bg-transparent dark:bg-input/30 dark:hover:bg-input/50 py-1.5 max-w-[450px] truncate",
|
|
218
219
|
onChange: (u) => c(() => t(u.target.value)),
|
|
@@ -224,9 +225,9 @@ const Ko = ({
|
|
|
224
225
|
}))
|
|
225
226
|
}
|
|
226
227
|
) : /* @__PURE__ */ l.jsx(Ce, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: s.url }),
|
|
227
|
-
/* @__PURE__ */ l.jsx(
|
|
228
|
+
/* @__PURE__ */ l.jsx(Xo, { url: o.length > 1 ? i : s.url })
|
|
228
229
|
] }) : null;
|
|
229
|
-
},
|
|
230
|
+
}, ei = Ca(
|
|
230
231
|
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
231
232
|
{
|
|
232
233
|
variants: {
|
|
@@ -249,12 +250,12 @@ function Me({
|
|
|
249
250
|
asChild: r = !1,
|
|
250
251
|
...a
|
|
251
252
|
}) {
|
|
252
|
-
const c = r ?
|
|
253
|
+
const c = r ? So : "span";
|
|
253
254
|
return /* @__PURE__ */ l.jsx(
|
|
254
255
|
c,
|
|
255
256
|
{
|
|
256
257
|
"data-slot": "badge",
|
|
257
|
-
className: fe(
|
|
258
|
+
className: fe(ei({ variant: n }), e),
|
|
258
259
|
...a
|
|
259
260
|
}
|
|
260
261
|
);
|
|
@@ -295,7 +296,7 @@ function Be({ className: e, ...n }) {
|
|
|
295
296
|
function ze({ ...e }) {
|
|
296
297
|
return /* @__PURE__ */ l.jsx("option", { "data-slot": "native-select-option", ...e });
|
|
297
298
|
}
|
|
298
|
-
const nn = fe,
|
|
299
|
+
const nn = fe, ti = ({
|
|
299
300
|
responses: e,
|
|
300
301
|
selectedResponse: n,
|
|
301
302
|
onSelectResponse: r
|
|
@@ -339,7 +340,7 @@ const nn = fe, ri = ({
|
|
|
339
340
|
/* @__PURE__ */ l.jsxs("div", { className: "p-2 clear-both", children: [
|
|
340
341
|
t && /* @__PURE__ */ l.jsx(Me, { variant: "outline", className: "float-start me-2", children: i?.statusCode }),
|
|
341
342
|
i?.description && /* @__PURE__ */ l.jsx(
|
|
342
|
-
|
|
343
|
+
fo,
|
|
343
344
|
{
|
|
344
345
|
className: "text-sm text-muted-foreground max-w-none",
|
|
345
346
|
content: i.description
|
|
@@ -353,7 +354,7 @@ const nn = fe, ri = ({
|
|
|
353
354
|
value: n,
|
|
354
355
|
onValueChange: (s) => {
|
|
355
356
|
r?.(s);
|
|
356
|
-
const u = e.find((
|
|
357
|
+
const u = e.find((p) => p.statusCode === s);
|
|
357
358
|
c(u?.content?.[0]?.mediaType ?? "");
|
|
358
359
|
},
|
|
359
360
|
children: e.map((s) => /* @__PURE__ */ l.jsx(Ze.Content, { value: s.statusCode, children: /* @__PURE__ */ l.jsx(
|
|
@@ -367,7 +368,7 @@ const nn = fe, ri = ({
|
|
|
367
368
|
) }, s.statusCode))
|
|
368
369
|
}
|
|
369
370
|
) });
|
|
370
|
-
},
|
|
371
|
+
}, ri = ({
|
|
371
372
|
serverUrl: e,
|
|
372
373
|
summary: n,
|
|
373
374
|
data: r
|
|
@@ -388,7 +389,7 @@ const nn = fe, ri = ({
|
|
|
388
389
|
"url": "${i}"
|
|
389
390
|
}
|
|
390
391
|
}
|
|
391
|
-
}`, u = i,
|
|
392
|
+
}`, u = i, p = `{
|
|
392
393
|
"servers": {
|
|
393
394
|
"${t}": {
|
|
394
395
|
"command": "npx",
|
|
@@ -398,7 +399,7 @@ const nn = fe, ri = ({
|
|
|
398
399
|
]
|
|
399
400
|
}
|
|
400
401
|
}
|
|
401
|
-
}`,
|
|
402
|
+
}`, d = () => {
|
|
402
403
|
navigator.clipboard.writeText(i).then(() => {
|
|
403
404
|
c(!0), setTimeout(() => c(!1), 2e3);
|
|
404
405
|
});
|
|
@@ -432,7 +433,7 @@ const nn = fe, ri = ({
|
|
|
432
433
|
/* @__PURE__ */ l.jsx(
|
|
433
434
|
Ur,
|
|
434
435
|
{
|
|
435
|
-
onClick:
|
|
436
|
+
onClick: d,
|
|
436
437
|
variant: "ghost",
|
|
437
438
|
size: "icon",
|
|
438
439
|
className: "h-8 w-8",
|
|
@@ -447,14 +448,14 @@ const nn = fe, ri = ({
|
|
|
447
448
|
/* @__PURE__ */ l.jsx("h3", { className: "text-lg font-semibold mb-2", children: "AI Tool Configuration" }),
|
|
448
449
|
/* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground mb-3", children: "Choose your AI tool and copy the configuration to get started." }),
|
|
449
450
|
/* @__PURE__ */ l.jsx("hr", { className: "my-4" }),
|
|
450
|
-
/* @__PURE__ */ l.jsxs(
|
|
451
|
-
/* @__PURE__ */ l.jsxs(
|
|
451
|
+
/* @__PURE__ */ l.jsxs(Eo, { defaultValue: "claude", className: "w-full", children: [
|
|
452
|
+
/* @__PURE__ */ l.jsxs(Ao, { className: "grid w-full grid-cols-4", children: [
|
|
452
453
|
/* @__PURE__ */ l.jsx(et, { value: "claude", children: "Claude" }),
|
|
453
454
|
/* @__PURE__ */ l.jsx(et, { value: "chatgpt", children: "ChatGPT" }),
|
|
454
455
|
/* @__PURE__ */ l.jsx(et, { value: "cursor", children: "Cursor" }),
|
|
455
456
|
/* @__PURE__ */ l.jsx(et, { value: "vscode", children: "VS Code" })
|
|
456
457
|
] }),
|
|
457
|
-
/* @__PURE__ */ l.jsxs(
|
|
458
|
+
/* @__PURE__ */ l.jsxs(ho, { className: "text-sm max-w-full", children: [
|
|
458
459
|
/* @__PURE__ */ l.jsxs(tt, { value: "claude", className: "space-y-3", children: [
|
|
459
460
|
/* @__PURE__ */ l.jsxs("ol", { children: [
|
|
460
461
|
/* @__PURE__ */ l.jsxs("li", { children: [
|
|
@@ -589,7 +590,7 @@ const nn = fe, ri = ({
|
|
|
589
590
|
showLanguageIndicator: !0,
|
|
590
591
|
title: "mcp.json",
|
|
591
592
|
language: "json",
|
|
592
|
-
code:
|
|
593
|
+
code: p,
|
|
593
594
|
className: "mt-2"
|
|
594
595
|
}
|
|
595
596
|
)
|
|
@@ -615,18 +616,18 @@ const nn = fe, ri = ({
|
|
|
615
616
|
] })
|
|
616
617
|
] })
|
|
617
618
|
] }) });
|
|
618
|
-
},
|
|
619
|
+
}, ni = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
|
|
619
620
|
type: "string"
|
|
620
|
-
},
|
|
621
|
+
}, ai = ({
|
|
621
622
|
parameter: e,
|
|
622
623
|
group: n,
|
|
623
624
|
id: r
|
|
624
625
|
}) => {
|
|
625
|
-
const a =
|
|
626
|
-
return /* @__PURE__ */ l.jsxs(
|
|
626
|
+
const a = ni(e), [c, i] = ge(!1), t = a.type === "object" || yo(a) && "items" in a && a.items?.type === "object", o = !!(e.description || a.description || a.type === "array" && a.items?.enum || a.enum || a.example !== void 0 || a.default !== void 0);
|
|
627
|
+
return /* @__PURE__ */ l.jsxs(_o, { children: [
|
|
627
628
|
/* @__PURE__ */ l.jsxs(tn, { className: "gap-y-2", children: [
|
|
628
629
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
|
629
|
-
/* @__PURE__ */ l.jsx(
|
|
630
|
+
/* @__PURE__ */ l.jsx(Fo, { className: "inline me-2", children: t ? /* @__PURE__ */ l.jsx(
|
|
630
631
|
"button",
|
|
631
632
|
{
|
|
632
633
|
onClick: () => i(!c),
|
|
@@ -652,7 +653,7 @@ const nn = fe, ri = ({
|
|
|
652
653
|
}
|
|
653
654
|
) : e.name }) }),
|
|
654
655
|
/* @__PURE__ */ l.jsx(
|
|
655
|
-
|
|
656
|
+
go,
|
|
656
657
|
{
|
|
657
658
|
className: "inline",
|
|
658
659
|
schema: a,
|
|
@@ -674,10 +675,10 @@ const nn = fe, ri = ({
|
|
|
674
675
|
}
|
|
675
676
|
),
|
|
676
677
|
a.type === "array" && a.items?.enum ? /* @__PURE__ */ l.jsx(Xr, { values: a.items.enum }) : a.enum && /* @__PURE__ */ l.jsx(Xr, { values: a.enum }),
|
|
677
|
-
/* @__PURE__ */ l.jsx(
|
|
678
|
+
/* @__PURE__ */ l.jsx(vo, { schema: a })
|
|
678
679
|
] })
|
|
679
680
|
] }),
|
|
680
|
-
t && /* @__PURE__ */ l.jsx(
|
|
681
|
+
t && /* @__PURE__ */ l.jsx(Ho, { className: "self-start", children: /* @__PURE__ */ l.jsx(
|
|
681
682
|
Ur,
|
|
682
683
|
{
|
|
683
684
|
variant: "ghost",
|
|
@@ -685,7 +686,7 @@ const nn = fe, ri = ({
|
|
|
685
686
|
className: "rounded-full",
|
|
686
687
|
onClick: () => i(!c),
|
|
687
688
|
"aria-label": "Toggle parameter",
|
|
688
|
-
children: c ? /* @__PURE__ */ l.jsx(
|
|
689
|
+
children: c ? /* @__PURE__ */ l.jsx(Ka, { size: 16 }) : /* @__PURE__ */ l.jsx(Ya, { size: 16 })
|
|
689
690
|
}
|
|
690
691
|
) }),
|
|
691
692
|
t && /* @__PURE__ */ l.jsx(
|
|
@@ -704,7 +705,7 @@ const nn = fe, ri = ({
|
|
|
704
705
|
}
|
|
705
706
|
)
|
|
706
707
|
] });
|
|
707
|
-
},
|
|
708
|
+
}, oi = ({
|
|
708
709
|
summary: e,
|
|
709
710
|
group: n,
|
|
710
711
|
parameters: r,
|
|
@@ -721,7 +722,7 @@ const nn = fe, ri = ({
|
|
|
721
722
|
id: `${a}/${n}-parameters`,
|
|
722
723
|
className: "capitalize",
|
|
723
724
|
children: [
|
|
724
|
-
e && /* @__PURE__ */ l.jsxs(
|
|
725
|
+
e && /* @__PURE__ */ l.jsxs(Io, { children: [
|
|
725
726
|
e,
|
|
726
727
|
" › "
|
|
727
728
|
] }),
|
|
@@ -729,10 +730,10 @@ const nn = fe, ri = ({
|
|
|
729
730
|
]
|
|
730
731
|
}
|
|
731
732
|
),
|
|
732
|
-
/* @__PURE__ */ l.jsx(
|
|
733
|
-
t > 0 && /* @__PURE__ */ l.jsx(
|
|
733
|
+
/* @__PURE__ */ l.jsx(Uo, { children: /* @__PURE__ */ l.jsx(Lo, { className: "p-0!", children: /* @__PURE__ */ l.jsx(Mo, { className: "overflow-clip", children: c.map((i, t) => /* @__PURE__ */ l.jsxs(No, { children: [
|
|
734
|
+
t > 0 && /* @__PURE__ */ l.jsx(Bo, {}),
|
|
734
735
|
/* @__PURE__ */ l.jsx(
|
|
735
|
-
|
|
736
|
+
ai,
|
|
736
737
|
{
|
|
737
738
|
parameter: i,
|
|
738
739
|
id: a,
|
|
@@ -741,12 +742,12 @@ const nn = fe, ri = ({
|
|
|
741
742
|
)
|
|
742
743
|
] }, `${i.name}-${i.in}`)) }) }) })
|
|
743
744
|
] });
|
|
744
|
-
},
|
|
745
|
+
}, ii = ({
|
|
745
746
|
rootMargin: e = "0px",
|
|
746
747
|
threshold: n,
|
|
747
748
|
root: r
|
|
748
749
|
} = {}) => {
|
|
749
|
-
const [a, c] = ge(!1), i =
|
|
750
|
+
const [a, c] = ge(!1), i = ko(null);
|
|
750
751
|
return Cr(() => {
|
|
751
752
|
const t = new IntersectionObserver(
|
|
752
753
|
([s]) => {
|
|
@@ -757,7 +758,7 @@ const nn = fe, ri = ({
|
|
|
757
758
|
if (o)
|
|
758
759
|
return t.observe(o), () => t.unobserve(o);
|
|
759
760
|
}, [r, e, n]), [i, a];
|
|
760
|
-
},
|
|
761
|
+
}, si = () => /* @__PURE__ */ l.jsx("div", { className: "absolute inset-0 bg-linear-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 transition-all group-hover:to-transparent" }), Lr = ({
|
|
761
762
|
code: e,
|
|
762
763
|
className: n
|
|
763
764
|
}) => /* @__PURE__ */ l.jsx(
|
|
@@ -769,7 +770,7 @@ const nn = fe, ri = ({
|
|
|
769
770
|
),
|
|
770
771
|
children: /* @__PURE__ */ l.jsxs("code", { children: [
|
|
771
772
|
e.split(`
|
|
772
|
-
`).length > 13 && /* @__PURE__ */ l.jsx(
|
|
773
|
+
`).length > 13 && /* @__PURE__ */ l.jsx(si, {}),
|
|
773
774
|
e
|
|
774
775
|
] })
|
|
775
776
|
}
|
|
@@ -806,7 +807,7 @@ const nn = fe, ri = ({
|
|
|
806
807
|
),
|
|
807
808
|
children: e
|
|
808
809
|
}
|
|
809
|
-
),
|
|
810
|
+
), li = ({ children: e, className: n }) => /* @__PURE__ */ l.jsx(
|
|
810
811
|
"div",
|
|
811
812
|
{
|
|
812
813
|
"data-slot": "sidecar-box-footer",
|
|
@@ -816,7 +817,7 @@ const nn = fe, ri = ({
|
|
|
816
817
|
),
|
|
817
818
|
children: e
|
|
818
819
|
}
|
|
819
|
-
),
|
|
820
|
+
), ci = ({
|
|
820
821
|
code: e,
|
|
821
822
|
isOnScreen: n,
|
|
822
823
|
shouldLazyHighlight: r
|
|
@@ -837,7 +838,7 @@ const nn = fe, ri = ({
|
|
|
837
838
|
className: "[--scrollbar-color:gray] rounded-none text-xs max-h-[200px]"
|
|
838
839
|
}
|
|
839
840
|
) })
|
|
840
|
-
] }),
|
|
841
|
+
] }), ui = ({
|
|
841
842
|
server: e,
|
|
842
843
|
servers: n,
|
|
843
844
|
operation: r,
|
|
@@ -862,7 +863,7 @@ const nn = fe, ri = ({
|
|
|
862
863
|
defaultValue: o.schema?.default
|
|
863
864
|
}));
|
|
864
865
|
return /* @__PURE__ */ l.jsx(
|
|
865
|
-
|
|
866
|
+
to,
|
|
866
867
|
{
|
|
867
868
|
server: e,
|
|
868
869
|
servers: n,
|
|
@@ -874,10 +875,10 @@ const nn = fe, ri = ({
|
|
|
874
875
|
examples: a
|
|
875
876
|
}
|
|
876
877
|
);
|
|
877
|
-
},
|
|
878
|
+
}, pi = (e) => {
|
|
878
879
|
if (e != null)
|
|
879
880
|
return typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2);
|
|
880
|
-
},
|
|
881
|
+
}, fi = (e) => e ? e.endsWith("+json") ? "json" : e.endsWith("+xml") ? "xml" : e.endsWith("+yaml") ? "yaml" : {
|
|
881
882
|
"text/html": "html",
|
|
882
883
|
"application/x-ndjson": "json",
|
|
883
884
|
"application/json": "json",
|
|
@@ -895,7 +896,7 @@ const nn = fe, ri = ({
|
|
|
895
896
|
isOnScreen: i,
|
|
896
897
|
shouldLazyHighlight: t
|
|
897
898
|
}) => {
|
|
898
|
-
const o = e[a], s = o?.examples ?? [], u = s?.[c],
|
|
899
|
+
const o = e[a], s = o?.examples ?? [], u = s?.[c], p = pi(u?.value), d = fi(o?.mediaType);
|
|
899
900
|
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
900
901
|
/* @__PURE__ */ l.jsxs(_r, { className: "p-0", children: [
|
|
901
902
|
u?.externalValue ? /* @__PURE__ */ l.jsx("div", { className: "p-4", children: /* @__PURE__ */ l.jsxs(
|
|
@@ -910,18 +911,18 @@ const nn = fe, ri = ({
|
|
|
910
911
|
/* @__PURE__ */ l.jsx(Ae, { className: "size-3 inline-block ms-1 align-[-0.125em]" })
|
|
911
912
|
]
|
|
912
913
|
}
|
|
913
|
-
) }) : t && !i &&
|
|
914
|
+
) }) : t && !i && p ? /* @__PURE__ */ l.jsx(Lr, { code: p }) : p ? /* @__PURE__ */ l.jsx(
|
|
914
915
|
nt,
|
|
915
916
|
{
|
|
916
917
|
embedded: !0,
|
|
917
|
-
language:
|
|
918
|
+
language: d,
|
|
918
919
|
className: "[--scrollbar-color:gray] rounded-none max-h-[200px] text-xs overflow-auto",
|
|
919
|
-
code:
|
|
920
|
+
code: p
|
|
920
921
|
}
|
|
921
922
|
) : /* @__PURE__ */ l.jsx("div", { className: "grid place-items-center text-xs text-muted-foreground min-h-18", children: "No example specified for this content type" }),
|
|
922
923
|
u?.description && /* @__PURE__ */ l.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: u.description })
|
|
923
924
|
] }),
|
|
924
|
-
/* @__PURE__ */ l.jsxs(
|
|
925
|
+
/* @__PURE__ */ l.jsxs(li, { className: "text-xs", children: [
|
|
925
926
|
n && /* @__PURE__ */ l.jsx("div", { className: "text-muted-foreground text-xs px-1 py-2", children: n }),
|
|
926
927
|
(s.length !== 0 || e.length !== 0) && /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0", children: [
|
|
927
928
|
/* @__PURE__ */ l.jsx("div", { className: "flex items-center gap-2 flex-wrap", children: e.length > 1 ? /* @__PURE__ */ l.jsx(
|
|
@@ -972,16 +973,16 @@ const nn = fe, ri = ({
|
|
|
972
973
|
] })
|
|
973
974
|
] })
|
|
974
975
|
] });
|
|
975
|
-
},
|
|
976
|
+
}, di = ({
|
|
976
977
|
content: e,
|
|
977
978
|
onExampleChange: n,
|
|
978
979
|
isOnScreen: r,
|
|
979
980
|
shouldLazyHighlight: a,
|
|
980
981
|
selectedContentIndex: c,
|
|
981
982
|
selectedExampleIndex: i
|
|
982
|
-
}) => e.length === 0 ? null : /* @__PURE__ */ l.jsx(
|
|
983
|
+
}) => e.length === 0 ? null : /* @__PURE__ */ l.jsx(Rr, { className: "group/collapsible", defaultOpen: !0, children: /* @__PURE__ */ l.jsxs(ut, { children: [
|
|
983
984
|
/* @__PURE__ */ l.jsx(pt, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ l.jsxs("span", { className: "flex items-center gap-1 font-medium", children: [
|
|
984
|
-
/* @__PURE__ */ l.jsx(
|
|
985
|
+
/* @__PURE__ */ l.jsx(Er, { asChild: !0, children: /* @__PURE__ */ l.jsxs(
|
|
985
986
|
ot,
|
|
986
987
|
{
|
|
987
988
|
variant: "ghost",
|
|
@@ -1015,15 +1016,15 @@ const nn = fe, ri = ({
|
|
|
1015
1016
|
}) => {
|
|
1016
1017
|
const [i, t] = ge(
|
|
1017
1018
|
n ?? e[0]?.statusCode
|
|
1018
|
-
), [o, s] = ge(0), [u,
|
|
1019
|
+
), [o, s] = ge(0), [u, p] = ge(0);
|
|
1019
1020
|
return Cr(() => {
|
|
1020
1021
|
n && t(n);
|
|
1021
1022
|
}, [n]), Cr(() => {
|
|
1022
|
-
i && (s(0),
|
|
1023
|
-
}, [i]), /* @__PURE__ */ l.jsx(
|
|
1023
|
+
i && (s(0), p(0));
|
|
1024
|
+
}, [i]), /* @__PURE__ */ l.jsx(Rr, { className: "group/collapsible", defaultOpen: !0, children: /* @__PURE__ */ l.jsxs(ut, { children: [
|
|
1024
1025
|
/* @__PURE__ */ l.jsxs(pt, { className: "text-xs flex justify-between items-center", children: [
|
|
1025
1026
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1 font-medium shrink-0", children: [
|
|
1026
|
-
/* @__PURE__ */ l.jsx(
|
|
1027
|
+
/* @__PURE__ */ l.jsx(Er, { asChild: !0, children: /* @__PURE__ */ l.jsxs(
|
|
1027
1028
|
ot,
|
|
1028
1029
|
{
|
|
1029
1030
|
variant: "ghost",
|
|
@@ -1046,14 +1047,14 @@ const nn = fe, ri = ({
|
|
|
1046
1047
|
{
|
|
1047
1048
|
className: "text-xs h-fit py-1 -my-1 bg-background",
|
|
1048
1049
|
value: i,
|
|
1049
|
-
onChange: (
|
|
1050
|
-
children: e.map((
|
|
1050
|
+
onChange: (d) => t(d.target.value),
|
|
1051
|
+
children: e.map((d) => /* @__PURE__ */ l.jsx(
|
|
1051
1052
|
ze,
|
|
1052
1053
|
{
|
|
1053
|
-
value:
|
|
1054
|
-
children:
|
|
1054
|
+
value: d.statusCode,
|
|
1055
|
+
children: d.statusCode
|
|
1055
1056
|
},
|
|
1056
|
-
|
|
1057
|
+
d.statusCode
|
|
1057
1058
|
))
|
|
1058
1059
|
}
|
|
1059
1060
|
) })
|
|
@@ -1063,10 +1064,10 @@ const nn = fe, ri = ({
|
|
|
1063
1064
|
{
|
|
1064
1065
|
selectedContentIndex: o,
|
|
1065
1066
|
selectedExampleIndex: u,
|
|
1066
|
-
onExampleChange: (
|
|
1067
|
-
s(
|
|
1067
|
+
onExampleChange: (d) => {
|
|
1068
|
+
s(d.contentTypeIndex), p(d.exampleIndex);
|
|
1068
1069
|
},
|
|
1069
|
-
content: e.find((
|
|
1070
|
+
content: e.find((d) => d.statusCode === i)?.content ?? [],
|
|
1070
1071
|
isOnScreen: r,
|
|
1071
1072
|
shouldLazyHighlight: a
|
|
1072
1073
|
}
|
|
@@ -1099,40 +1100,40 @@ var on = (e, n) => {
|
|
|
1099
1100
|
}, this.indentationCharacter = e || sn, this.lineJoin = n ?? ln;
|
|
1100
1101
|
}
|
|
1101
1102
|
}, Ot, cn;
|
|
1102
|
-
function
|
|
1103
|
+
function hi() {
|
|
1103
1104
|
return cn || (cn = 1, Ot = function(e) {
|
|
1104
1105
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
1105
1106
|
}), Ot;
|
|
1106
1107
|
}
|
|
1107
1108
|
var Tt, un;
|
|
1108
|
-
function
|
|
1109
|
+
function mi() {
|
|
1109
1110
|
return un || (un = 1, Tt = function(e) {
|
|
1110
1111
|
var n = typeof e;
|
|
1111
1112
|
return e !== null && (n === "object" || n === "function");
|
|
1112
1113
|
}), Tt;
|
|
1113
1114
|
}
|
|
1114
1115
|
var rt = {}, pn;
|
|
1115
|
-
function
|
|
1116
|
+
function yi() {
|
|
1116
1117
|
return pn || (pn = 1, Object.defineProperty(rt, "__esModule", { value: !0 }), rt.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), rt;
|
|
1117
1118
|
}
|
|
1118
1119
|
var Ct, fn;
|
|
1119
|
-
function
|
|
1120
|
+
function gi() {
|
|
1120
1121
|
if (fn) return Ct;
|
|
1121
1122
|
fn = 1;
|
|
1122
|
-
const e =
|
|
1123
|
+
const e = hi(), n = mi(), r = yi().default;
|
|
1123
1124
|
return Ct = (a, c, i) => {
|
|
1124
1125
|
const t = [];
|
|
1125
|
-
return (function o(s, u,
|
|
1126
|
-
u = u || {}, u.indent = u.indent || " ",
|
|
1127
|
-
let
|
|
1128
|
-
u.inlineCharacterLimit === void 0 ?
|
|
1126
|
+
return (function o(s, u, p) {
|
|
1127
|
+
u = u || {}, u.indent = u.indent || " ", p = p || "";
|
|
1128
|
+
let d;
|
|
1129
|
+
u.inlineCharacterLimit === void 0 ? d = {
|
|
1129
1130
|
newLine: `
|
|
1130
1131
|
`,
|
|
1131
1132
|
newLineOrSpace: `
|
|
1132
1133
|
`,
|
|
1133
|
-
pad:
|
|
1134
|
-
indent:
|
|
1135
|
-
} :
|
|
1134
|
+
pad: p,
|
|
1135
|
+
indent: p + u.indent
|
|
1136
|
+
} : d = {
|
|
1136
1137
|
newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
|
|
1137
1138
|
newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
|
|
1138
1139
|
pad: "@@__STRINGIFY_OBJECT_PAD__@@",
|
|
@@ -1141,9 +1142,9 @@ function vi() {
|
|
|
1141
1142
|
const m = (y) => {
|
|
1142
1143
|
if (u.inlineCharacterLimit === void 0)
|
|
1143
1144
|
return y;
|
|
1144
|
-
const j = y.replace(new RegExp(
|
|
1145
|
-
return j.length <= u.inlineCharacterLimit ? j : y.replace(new RegExp(
|
|
1146
|
-
`).replace(new RegExp(
|
|
1145
|
+
const j = y.replace(new RegExp(d.newLine, "g"), "").replace(new RegExp(d.newLineOrSpace, "g"), " ").replace(new RegExp(d.pad + "|" + d.indent, "g"), "");
|
|
1146
|
+
return j.length <= u.inlineCharacterLimit ? j : y.replace(new RegExp(d.newLine + "|" + d.newLineOrSpace, "g"), `
|
|
1147
|
+
`).replace(new RegExp(d.pad, "g"), p).replace(new RegExp(d.indent, "g"), p + u.indent);
|
|
1147
1148
|
};
|
|
1148
1149
|
if (t.indexOf(s) !== -1)
|
|
1149
1150
|
return '"[Circular]"';
|
|
@@ -1155,11 +1156,11 @@ function vi() {
|
|
|
1155
1156
|
if (s.length === 0)
|
|
1156
1157
|
return "[]";
|
|
1157
1158
|
t.push(s);
|
|
1158
|
-
const y = "[" +
|
|
1159
|
-
const f = s.length - 1 === b ?
|
|
1160
|
-
let g = o(j, u,
|
|
1161
|
-
return u.transform && (g = u.transform(s, b, g)),
|
|
1162
|
-
}).join("") +
|
|
1159
|
+
const y = "[" + d.newLine + s.map((j, b) => {
|
|
1160
|
+
const f = s.length - 1 === b ? d.newLine : "," + d.newLineOrSpace;
|
|
1161
|
+
let g = o(j, u, p + u.indent);
|
|
1162
|
+
return u.transform && (g = u.transform(s, b, g)), d.indent + g + f;
|
|
1163
|
+
}).join("") + d.pad + "]";
|
|
1163
1164
|
return t.pop(), m(y);
|
|
1164
1165
|
}
|
|
1165
1166
|
if (n(s)) {
|
|
@@ -1167,11 +1168,11 @@ function vi() {
|
|
|
1167
1168
|
if (u.filter && (y = y.filter((b) => u.filter(s, b))), y.length === 0)
|
|
1168
1169
|
return "{}";
|
|
1169
1170
|
t.push(s);
|
|
1170
|
-
const j = "{" +
|
|
1171
|
-
const g = y.length - 1 === f ?
|
|
1172
|
-
let
|
|
1173
|
-
return u.transform && (
|
|
1174
|
-
}).join("") +
|
|
1171
|
+
const j = "{" + d.newLine + y.map((b, f) => {
|
|
1172
|
+
const g = y.length - 1 === f ? d.newLine : "," + d.newLineOrSpace, v = typeof b == "symbol", S = !v && /^[a-z$_][a-z$_0-9]*$/i.test(b), C = v || S ? b : o(b, u);
|
|
1173
|
+
let h = o(s[b], u, p + u.indent);
|
|
1174
|
+
return u.transform && (h = u.transform(s, b, h)), d.indent + String(C) + ": " + h + g;
|
|
1175
|
+
}).join("") + d.pad + "}";
|
|
1175
1176
|
return t.pop(), m(j);
|
|
1176
1177
|
}
|
|
1177
1178
|
return s = String(s).replace(/[\r\n]/g, (y) => y === `
|
|
@@ -1179,14 +1180,14 @@ function vi() {
|
|
|
1179
1180
|
})(a, c, i);
|
|
1180
1181
|
}, Ct;
|
|
1181
1182
|
}
|
|
1182
|
-
var
|
|
1183
|
-
const ue = /* @__PURE__ */
|
|
1183
|
+
var vi = gi();
|
|
1184
|
+
const ue = /* @__PURE__ */ Go(vi);
|
|
1184
1185
|
function Ge(e, n = {}) {
|
|
1185
1186
|
const { delimiter: r = '"', escapeChar: a = "\\", escapeNewlines: c = !0 } = n;
|
|
1186
1187
|
return [...e.toString()].map((t) => t === "\b" ? `${a}b` : t === " " ? `${a}t` : t === `
|
|
1187
1188
|
` ? c ? `${a}n` : t : t === "\f" ? `${a}f` : t === "\r" ? c ? `${a}r` : t : t === a ? a + a : t === r ? a + r : t < " " || t > "~" ? JSON.stringify(t).slice(1, -1) : t).join("");
|
|
1188
1189
|
}
|
|
1189
|
-
var We = (e) => Ge(e, { delimiter: "'" }), le = (e) => Ge(e, { delimiter: '"' }),
|
|
1190
|
+
var We = (e) => Ge(e, { delimiter: "'" }), le = (e) => Ge(e, { delimiter: '"' }), xi = {
|
|
1190
1191
|
info: {
|
|
1191
1192
|
key: "libcurl",
|
|
1192
1193
|
title: "Libcurl",
|
|
@@ -1202,7 +1203,7 @@ var We = (e) => Ge(e, { delimiter: "'" }), le = (e) => Ge(e, { delimiter: '"' })
|
|
|
1202
1203
|
i(`headers = curl_slist_append(headers, "${u}: ${le(r[u])}");`);
|
|
1203
1204
|
}), i("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (t(), i(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), c.text && (t(), i(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(c.text)});`)), t(), i("CURLcode ret = curl_easy_perform(hnd);"), o();
|
|
1204
1205
|
}
|
|
1205
|
-
},
|
|
1206
|
+
}, bi = {
|
|
1206
1207
|
info: {
|
|
1207
1208
|
key: "c",
|
|
1208
1209
|
title: "C",
|
|
@@ -1210,19 +1211,19 @@ var We = (e) => Ge(e, { delimiter: "'" }), le = (e) => Ge(e, { delimiter: '"' })
|
|
|
1210
1211
|
cli: "c"
|
|
1211
1212
|
},
|
|
1212
1213
|
clientsById: {
|
|
1213
|
-
libcurl:
|
|
1214
|
+
libcurl: xi
|
|
1214
1215
|
}
|
|
1215
1216
|
}, pe = (e, n) => Object.keys(e).find((r) => r.toLowerCase() === n.toLowerCase()), ve = (e, n) => {
|
|
1216
1217
|
const r = pe(e, n);
|
|
1217
1218
|
if (r)
|
|
1218
1219
|
return e[r];
|
|
1219
|
-
}, ft = (e, n) => !!pe(e, n),
|
|
1220
|
+
}, ft = (e, n) => !!pe(e, n), ji = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
1220
1221
|
(n) => e.indexOf(n) > -1
|
|
1221
1222
|
), dn = class {
|
|
1222
1223
|
constructor(e) {
|
|
1223
1224
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
1224
1225
|
}
|
|
1225
|
-
},
|
|
1226
|
+
}, $i = class {
|
|
1226
1227
|
constructor(e) {
|
|
1227
1228
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
1228
1229
|
}
|
|
@@ -1259,7 +1260,7 @@ ${r}`);
|
|
|
1259
1260
|
default:
|
|
1260
1261
|
return e.toString();
|
|
1261
1262
|
}
|
|
1262
|
-
},
|
|
1263
|
+
}, wi = {
|
|
1263
1264
|
info: {
|
|
1264
1265
|
key: "clj_http",
|
|
1265
1266
|
title: "clj-http",
|
|
@@ -1279,35 +1280,35 @@ ${r}`);
|
|
|
1279
1280
|
case "application/json":
|
|
1280
1281
|
{
|
|
1281
1282
|
u["content-type"] = new dn("json"), u["form-params"] = r.jsonObj;
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1283
|
+
const p = pe(u.headers, "content-type");
|
|
1284
|
+
p && delete u.headers[p];
|
|
1284
1285
|
}
|
|
1285
1286
|
break;
|
|
1286
1287
|
case "application/x-www-form-urlencoded":
|
|
1287
1288
|
{
|
|
1288
1289
|
u["form-params"] = r.paramsObj;
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1290
|
+
const p = pe(u.headers, "content-type");
|
|
1291
|
+
p && delete u.headers[p];
|
|
1291
1292
|
}
|
|
1292
1293
|
break;
|
|
1293
1294
|
case "text/plain":
|
|
1294
1295
|
{
|
|
1295
1296
|
u.body = r.text;
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1297
|
+
const p = pe(u.headers, "content-type");
|
|
1298
|
+
p && delete u.headers[p];
|
|
1298
1299
|
}
|
|
1299
1300
|
break;
|
|
1300
1301
|
case "multipart/form-data": {
|
|
1301
1302
|
if (r.params) {
|
|
1302
|
-
u.multipart = r.params.map((
|
|
1303
|
-
name:
|
|
1304
|
-
content: new
|
|
1303
|
+
u.multipart = r.params.map((d) => d.fileName && !d.value ? {
|
|
1304
|
+
name: d.name,
|
|
1305
|
+
content: new $i(d.fileName)
|
|
1305
1306
|
} : {
|
|
1306
|
-
name:
|
|
1307
|
-
content:
|
|
1307
|
+
name: d.name,
|
|
1308
|
+
content: d.value
|
|
1308
1309
|
});
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1310
|
+
const p = pe(u.headers, "content-type");
|
|
1311
|
+
p && delete u.headers[p];
|
|
1311
1312
|
}
|
|
1312
1313
|
break;
|
|
1313
1314
|
}
|
|
@@ -1316,8 +1317,8 @@ ${r}`);
|
|
|
1316
1317
|
case "application/json":
|
|
1317
1318
|
{
|
|
1318
1319
|
u.accept = new dn("json");
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1320
|
+
const p = pe(u.headers, "accept");
|
|
1321
|
+
p && delete u.headers[p];
|
|
1321
1322
|
}
|
|
1322
1323
|
break;
|
|
1323
1324
|
}
|
|
@@ -1325,21 +1326,21 @@ ${r}`);
|
|
|
1325
1326
|
`), qa(hn(u)))
|
|
1326
1327
|
t(`(client/${n} "${a}")`);
|
|
1327
1328
|
else {
|
|
1328
|
-
const
|
|
1329
|
-
t(`(client/${n} "${a}" ${
|
|
1329
|
+
const p = 11 + n.length + a.length, d = at(p, Pr(hn(u)));
|
|
1330
|
+
t(`(client/${n} "${a}" ${d})`);
|
|
1330
1331
|
}
|
|
1331
1332
|
return o();
|
|
1332
1333
|
}
|
|
1333
|
-
},
|
|
1334
|
+
}, Si = {
|
|
1334
1335
|
info: {
|
|
1335
1336
|
key: "clojure",
|
|
1336
1337
|
title: "Clojure",
|
|
1337
1338
|
default: "clj_http"
|
|
1338
1339
|
},
|
|
1339
1340
|
clientsById: {
|
|
1340
|
-
clj_http:
|
|
1341
|
+
clj_http: wi
|
|
1341
1342
|
}
|
|
1342
|
-
},
|
|
1343
|
+
}, Oi = (e) => {
|
|
1343
1344
|
let n = ve(e, "accept-encoding");
|
|
1344
1345
|
if (!n)
|
|
1345
1346
|
return [];
|
|
@@ -1356,7 +1357,7 @@ ${r}`);
|
|
|
1356
1357
|
}
|
|
1357
1358
|
});
|
|
1358
1359
|
}), a;
|
|
1359
|
-
},
|
|
1360
|
+
}, Ti = {
|
|
1360
1361
|
info: {
|
|
1361
1362
|
key: "httpclient",
|
|
1362
1363
|
title: "HttpClient",
|
|
@@ -1371,10 +1372,10 @@ ${r}`);
|
|
|
1371
1372
|
}, { push: t, join: o } = new Q({ indent: i.indent });
|
|
1372
1373
|
t("using System.Net.Http.Headers;");
|
|
1373
1374
|
let s = "";
|
|
1374
|
-
const u = !!e.cookie,
|
|
1375
|
-
(u ||
|
|
1376
|
-
const
|
|
1377
|
-
r = r.toUpperCase(), r &&
|
|
1375
|
+
const u = !!e.cookie, p = Oi(e);
|
|
1376
|
+
(u || p.length) && (s = "clientHandler", t("var clientHandler = new HttpClientHandler"), t("{"), u && t("UseCookies = false,", 1), p.length && t(`AutomaticDecompression = ${p.join(" | ")},`, 1), t("};")), t(`var client = new HttpClient(${s});`), t("var request = new HttpRequestMessage"), t("{");
|
|
1377
|
+
const d = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
1378
|
+
r = r.toUpperCase(), r && d.includes(r) ? r = `HttpMethod.${r[0]}${r.substring(1).toLowerCase()}` : r = `new HttpMethod("${r}")`, t(`Method = ${r},`, 1), t(`RequestUri = new Uri("${a}"),`, 1);
|
|
1378
1379
|
const m = Object.keys(e).filter((y) => {
|
|
1379
1380
|
switch (y.toLowerCase()) {
|
|
1380
1381
|
case "content-type":
|
|
@@ -1408,10 +1409,10 @@ ${r}`);
|
|
|
1408
1409
|
return t("};"), t("using (var response = await client.SendAsync(request))"), t("{"), t("response.EnsureSuccessStatusCode();", 1), t("var body = await response.Content.ReadAsStringAsync();", 1), t("Console.WriteLine(body);", 1), t("}"), o();
|
|
1409
1410
|
}
|
|
1410
1411
|
};
|
|
1411
|
-
function
|
|
1412
|
+
function Ci(e) {
|
|
1412
1413
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
1413
1414
|
}
|
|
1414
|
-
var
|
|
1415
|
+
var Pi = {
|
|
1415
1416
|
info: {
|
|
1416
1417
|
key: "restsharp",
|
|
1417
1418
|
title: "RestSharp",
|
|
@@ -1430,42 +1431,42 @@ var Ni = {
|
|
|
1430
1431
|
|
|
1431
1432
|
`), t(`var options = new RestClientOptions("${n}");`), t("var client = new RestClient(options);"), t('var request = new RestRequest("");');
|
|
1432
1433
|
const u = c.mimeType && c.mimeType === "multipart/form-data";
|
|
1433
|
-
switch (u && t("request.AlwaysMultipartFormData = true;"), Object.keys(r).forEach((
|
|
1434
|
-
if (c.mimeType &&
|
|
1434
|
+
switch (u && t("request.AlwaysMultipartFormData = true;"), Object.keys(r).forEach((p) => {
|
|
1435
|
+
if (c.mimeType && p.toLowerCase() === "content-type" && c.text) {
|
|
1435
1436
|
u && c.boundary && t(`request.FormBoundary = "${c.boundary}";`);
|
|
1436
1437
|
return;
|
|
1437
1438
|
}
|
|
1438
|
-
t(`request.AddHeader("${
|
|
1439
|
-
}), a.forEach(({ name:
|
|
1440
|
-
t(`request.AddCookie("${
|
|
1439
|
+
t(`request.AddHeader("${p}", "${le(r[p])}");`);
|
|
1440
|
+
}), a.forEach(({ name: p, value: d }) => {
|
|
1441
|
+
t(`request.AddCookie("${p}", "${le(d)}", "${i.pathname}", "${i.host}");`);
|
|
1441
1442
|
}), c.mimeType) {
|
|
1442
1443
|
case "multipart/form-data":
|
|
1443
1444
|
if (!c.params) break;
|
|
1444
|
-
c.params.forEach((
|
|
1445
|
-
|
|
1445
|
+
c.params.forEach((p) => {
|
|
1446
|
+
p.fileName ? t(`request.AddFile("${p.name}", "${p.fileName}");`) : t(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
1446
1447
|
});
|
|
1447
1448
|
break;
|
|
1448
1449
|
case "application/x-www-form-urlencoded":
|
|
1449
1450
|
if (!c.params) break;
|
|
1450
|
-
c.params.forEach((
|
|
1451
|
-
t(`request.AddParameter("${
|
|
1451
|
+
c.params.forEach((p) => {
|
|
1452
|
+
t(`request.AddParameter("${p.name}", "${p.value}");`);
|
|
1452
1453
|
});
|
|
1453
1454
|
break;
|
|
1454
1455
|
case "application/json": {
|
|
1455
1456
|
if (!c.text) break;
|
|
1456
|
-
const
|
|
1457
|
-
t(`request.AddJsonBody(${
|
|
1457
|
+
const p = JSON.stringify(c.text);
|
|
1458
|
+
t(`request.AddJsonBody(${p}, false);`);
|
|
1458
1459
|
break;
|
|
1459
1460
|
}
|
|
1460
1461
|
default:
|
|
1461
1462
|
if (!c.text) break;
|
|
1462
1463
|
t(`request.AddStringBody("${c.text}", "${c.mimeType}");`);
|
|
1463
1464
|
}
|
|
1464
|
-
return t(`var response = await client.${
|
|
1465
|
+
return t(`var response = await client.${Ci(e)}Async(request);
|
|
1465
1466
|
`), t(`Console.WriteLine("{0}", response.Content);
|
|
1466
1467
|
`), o();
|
|
1467
1468
|
}
|
|
1468
|
-
},
|
|
1469
|
+
}, Ni = {
|
|
1469
1470
|
info: {
|
|
1470
1471
|
key: "csharp",
|
|
1471
1472
|
title: "C#",
|
|
@@ -1473,10 +1474,10 @@ var Ni = {
|
|
|
1473
1474
|
cli: "dotnet"
|
|
1474
1475
|
},
|
|
1475
1476
|
clientsById: {
|
|
1476
|
-
httpclient:
|
|
1477
|
-
restsharp:
|
|
1477
|
+
httpclient: Ti,
|
|
1478
|
+
restsharp: Pi
|
|
1478
1479
|
}
|
|
1479
|
-
},
|
|
1480
|
+
}, ki = {
|
|
1480
1481
|
info: {
|
|
1481
1482
|
key: "native",
|
|
1482
1483
|
title: "NewRequest",
|
|
@@ -1485,16 +1486,16 @@ var Ni = {
|
|
|
1485
1486
|
extname: ".go"
|
|
1486
1487
|
},
|
|
1487
1488
|
convert: ({ postData: e, method: n, allHeaders: r, fullUrl: a }, c = {}) => {
|
|
1488
|
-
const { blank: i, push: t, join: o } = new Q({ indent: " " }), { showBoilerplate: s = !0, checkErrors: u = !1, printBody:
|
|
1489
|
+
const { blank: i, push: t, join: o } = new Q({ indent: " " }), { showBoilerplate: s = !0, checkErrors: u = !1, printBody: p = !0, timeout: d = -1 } = c, m = u ? "err" : "_", y = s ? 1 : 0, j = () => {
|
|
1489
1490
|
u && (t("if err != nil {", y), t("panic(err)", y + 1), t("}", y));
|
|
1490
1491
|
};
|
|
1491
|
-
s && (t("package main"), i(), t("import ("), t('"fmt"', y),
|
|
1492
|
-
const b =
|
|
1493
|
-
return f && (t("client := http.Client{", y), b && t(`Timeout: time.Duration(${
|
|
1492
|
+
s && (t("package main"), i(), t("import ("), t('"fmt"', y), d > 0 && t('"time"', y), e.text && t('"strings"', y), t('"net/http"', y), p && t('"io"', y), t(")"), i(), t("func main() {"), i());
|
|
1493
|
+
const b = d > 0, f = b, g = f ? "client" : "http.DefaultClient";
|
|
1494
|
+
return f && (t("client := http.Client{", y), b && t(`Timeout: time.Duration(${d} * time.Second),`, y + 1), t("}", y), i()), t(`url := "${a}"`, y), i(), e.text ? (t(`payload := strings.NewReader(${JSON.stringify(e.text)})`, y), i(), t(`req, ${m} := http.NewRequest("${n}", url, payload)`, y), i()) : (t(`req, ${m} := http.NewRequest("${n}", url, nil)`, y), i()), j(), Object.keys(r).length && (Object.keys(r).forEach((v) => {
|
|
1494
1495
|
t(`req.Header.Add("${v}", "${le(r[v])}")`, y);
|
|
1495
|
-
}), i()), t(`res, ${m} := ${g}.Do(req)`, y), j(),
|
|
1496
|
+
}), i()), t(`res, ${m} := ${g}.Do(req)`, y), j(), p && (i(), t("defer res.Body.Close()", y), t(`body, ${m} := io.ReadAll(res.Body)`, y), j()), i(), p && t("fmt.Println(string(body))", y), s && (i(), t("}")), o();
|
|
1496
1497
|
}
|
|
1497
|
-
},
|
|
1498
|
+
}, qi = {
|
|
1498
1499
|
info: {
|
|
1499
1500
|
key: "go",
|
|
1500
1501
|
title: "Go",
|
|
@@ -1502,7 +1503,7 @@ var Ni = {
|
|
|
1502
1503
|
cli: "go"
|
|
1503
1504
|
},
|
|
1504
1505
|
clientsById: {
|
|
1505
|
-
native:
|
|
1506
|
+
native: ki
|
|
1506
1507
|
}
|
|
1507
1508
|
}, mn = `\r
|
|
1508
1509
|
`, Ri = {
|
|
@@ -1519,8 +1520,8 @@ var Ni = {
|
|
|
1519
1520
|
autoContentLength: !0,
|
|
1520
1521
|
autoHost: !0,
|
|
1521
1522
|
...t
|
|
1522
|
-
}, { blank: s, push: u, join:
|
|
1523
|
-
u(`${e} ${
|
|
1523
|
+
}, { blank: s, push: u, join: p } = new Q({ indent: "", join: mn }), d = o.absoluteURI ? n : r.path;
|
|
1524
|
+
u(`${e} ${d} ${a}`);
|
|
1524
1525
|
const m = Object.keys(c);
|
|
1525
1526
|
if (m.forEach((b) => {
|
|
1526
1527
|
const f = b.toLowerCase().replace(/(^|-)(\w)/g, (g) => g.toUpperCase());
|
|
@@ -1530,10 +1531,10 @@ var Ni = {
|
|
|
1530
1531
|
u(`Content-Length: ${f}`);
|
|
1531
1532
|
}
|
|
1532
1533
|
s();
|
|
1533
|
-
const y =
|
|
1534
|
+
const y = p(), j = i.text || "";
|
|
1534
1535
|
return `${y}${mn}${j}`;
|
|
1535
1536
|
}
|
|
1536
|
-
},
|
|
1537
|
+
}, Ei = {
|
|
1537
1538
|
info: {
|
|
1538
1539
|
key: "http",
|
|
1539
1540
|
title: "HTTP",
|
|
@@ -1542,7 +1543,7 @@ var Ni = {
|
|
|
1542
1543
|
clientsById: {
|
|
1543
1544
|
"http1.1": Ri
|
|
1544
1545
|
}
|
|
1545
|
-
},
|
|
1546
|
+
}, Ai = {
|
|
1546
1547
|
info: {
|
|
1547
1548
|
key: "asynchttp",
|
|
1548
1549
|
title: "AsyncHttp",
|
|
@@ -1559,7 +1560,7 @@ var Ni = {
|
|
|
1559
1560
|
o(`.setHeader("${u}", "${le(n[u])}")`, 1);
|
|
1560
1561
|
}), r.text && o(`.setBody(${JSON.stringify(r.text)})`, 1), o(".execute()", 1), o(".toCompletableFuture()", 1), o(".thenAccept(System.out::println)", 1), o(".join();", 1), t(), o("client.close();"), s();
|
|
1561
1562
|
}
|
|
1562
|
-
},
|
|
1563
|
+
}, Ii = {
|
|
1563
1564
|
info: {
|
|
1564
1565
|
key: "nethttp",
|
|
1565
1566
|
title: "java.net.http",
|
|
@@ -1581,7 +1582,7 @@ var Ni = {
|
|
|
1581
1582
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
1582
1583
|
), t("System.out.println(response.body());"), o();
|
|
1583
1584
|
}
|
|
1584
|
-
},
|
|
1585
|
+
}, Ui = {
|
|
1585
1586
|
info: {
|
|
1586
1587
|
key: "okhttp",
|
|
1587
1588
|
title: "OkHttp",
|
|
@@ -1593,12 +1594,12 @@ var Ni = {
|
|
|
1593
1594
|
const i = {
|
|
1594
1595
|
indent: " ",
|
|
1595
1596
|
...c
|
|
1596
|
-
}, { push: t, blank: o, join: s } = new Q({ indent: i.indent }), u = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
1597
|
-
return t("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? t(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : t(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), t(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), t("Request request = new Request.Builder()"), t(`.url("${r}")`, 1), u.includes(n.toUpperCase()) ?
|
|
1598
|
-
t(`.addHeader("${
|
|
1597
|
+
}, { push: t, blank: o, join: s } = new Q({ indent: i.indent }), u = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1598
|
+
return t("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? t(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : t(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), t(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), t("Request request = new Request.Builder()"), t(`.url("${r}")`, 1), u.includes(n.toUpperCase()) ? p.includes(n.toUpperCase()) ? e.text ? t(`.${n.toLowerCase()}(body)`, 1) : t(`.${n.toLowerCase()}(null)`, 1) : t(`.${n.toLowerCase()}()`, 1) : e.text ? t(`.method("${n.toUpperCase()}", body)`, 1) : t(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((d) => {
|
|
1599
|
+
t(`.addHeader("${d}", "${le(a[d])}")`, 1);
|
|
1599
1600
|
}), t(".build();", 1), o(), t("Response response = client.newCall(request).execute();"), s();
|
|
1600
1601
|
}
|
|
1601
|
-
},
|
|
1602
|
+
}, Li = {
|
|
1602
1603
|
info: {
|
|
1603
1604
|
key: "unirest",
|
|
1604
1605
|
title: "Unirest",
|
|
@@ -1615,19 +1616,19 @@ var Ni = {
|
|
|
1615
1616
|
o(`.header("${u}", "${le(n[u])}")`, 1);
|
|
1616
1617
|
}), r.text && o(`.body(${JSON.stringify(r.text)})`, 1), o(".asString();", 1), t();
|
|
1617
1618
|
}
|
|
1618
|
-
},
|
|
1619
|
+
}, _i = {
|
|
1619
1620
|
info: {
|
|
1620
1621
|
key: "java",
|
|
1621
1622
|
title: "Java",
|
|
1622
1623
|
default: "unirest"
|
|
1623
1624
|
},
|
|
1624
1625
|
clientsById: {
|
|
1625
|
-
asynchttp:
|
|
1626
|
-
nethttp:
|
|
1627
|
-
okhttp:
|
|
1628
|
-
unirest:
|
|
1626
|
+
asynchttp: Ai,
|
|
1627
|
+
nethttp: Ii,
|
|
1628
|
+
okhttp: Ui,
|
|
1629
|
+
unirest: Li
|
|
1629
1630
|
}
|
|
1630
|
-
},
|
|
1631
|
+
}, Fi = {
|
|
1631
1632
|
info: {
|
|
1632
1633
|
key: "axios",
|
|
1633
1634
|
title: "Axios",
|
|
@@ -1640,38 +1641,38 @@ var Ni = {
|
|
|
1640
1641
|
const t = {
|
|
1641
1642
|
indent: " ",
|
|
1642
1643
|
...i
|
|
1643
|
-
}, { blank: o, push: s, join: u, addPostProcessor:
|
|
1644
|
+
}, { blank: o, push: s, join: u, addPostProcessor: p } = new Q({ indent: t.indent });
|
|
1644
1645
|
s("import axios from 'axios';"), o();
|
|
1645
|
-
const
|
|
1646
|
+
const d = {
|
|
1646
1647
|
method: n,
|
|
1647
1648
|
url: r
|
|
1648
1649
|
};
|
|
1649
|
-
switch (Object.keys(a).length && (
|
|
1650
|
+
switch (Object.keys(a).length && (d.params = a), Object.keys(e).length && (d.headers = e), c.mimeType) {
|
|
1650
1651
|
case "application/x-www-form-urlencoded":
|
|
1651
1652
|
c.params && (s("const encodedParams = new URLSearchParams();"), c.params.forEach((y) => {
|
|
1652
1653
|
s(`encodedParams.set('${y.name}', '${y.value}');`);
|
|
1653
|
-
}), o(),
|
|
1654
|
+
}), o(), d.data = "encodedParams,", p((y) => y.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1654
1655
|
break;
|
|
1655
1656
|
case "application/json":
|
|
1656
|
-
c.jsonObj && (
|
|
1657
|
+
c.jsonObj && (d.data = c.jsonObj);
|
|
1657
1658
|
break;
|
|
1658
1659
|
case "multipart/form-data":
|
|
1659
1660
|
if (!c.params)
|
|
1660
1661
|
break;
|
|
1661
1662
|
s("const form = new FormData();"), c.params.forEach((y) => {
|
|
1662
1663
|
s(`form.append('${y.name}', '${y.value || y.fileName || ""}');`);
|
|
1663
|
-
}), o(),
|
|
1664
|
+
}), o(), d.data = "[form]";
|
|
1664
1665
|
break;
|
|
1665
1666
|
default:
|
|
1666
|
-
c.text && (
|
|
1667
|
+
c.text && (d.data = c.text);
|
|
1667
1668
|
}
|
|
1668
|
-
const m = ue(
|
|
1669
|
+
const m = ue(d, {
|
|
1669
1670
|
indent: " ",
|
|
1670
1671
|
inlineCharacterLimit: 80
|
|
1671
1672
|
}).replace('"[form]"', "form");
|
|
1672
1673
|
return s(`const options = ${m};`), o(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), u();
|
|
1673
1674
|
}
|
|
1674
|
-
},
|
|
1675
|
+
}, Hi = {
|
|
1675
1676
|
info: {
|
|
1676
1677
|
key: "fetch",
|
|
1677
1678
|
title: "fetch",
|
|
@@ -1697,9 +1698,9 @@ var Ni = {
|
|
|
1697
1698
|
case "multipart/form-data":
|
|
1698
1699
|
if (!r.params)
|
|
1699
1700
|
break;
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
s(`form.append('${
|
|
1701
|
+
const p = pe(n, "content-type");
|
|
1702
|
+
p && delete n[p], s("const form = new FormData();"), r.params.forEach((d) => {
|
|
1703
|
+
s(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
1703
1704
|
}), t();
|
|
1704
1705
|
break;
|
|
1705
1706
|
default:
|
|
@@ -1712,8 +1713,8 @@ var Ni = {
|
|
|
1712
1713
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
1713
1714
|
// to read, so we keep the object as a literal and use this transform function to wrap the
|
|
1714
1715
|
// literal in a `JSON.stringify` call.
|
|
1715
|
-
transform: (
|
|
1716
|
-
if (
|
|
1716
|
+
transform: (p, d, m) => {
|
|
1717
|
+
if (d === "body") {
|
|
1717
1718
|
if (r.mimeType === "application/x-www-form-urlencoded")
|
|
1718
1719
|
return `new URLSearchParams(${m})`;
|
|
1719
1720
|
if (r.mimeType === "application/json")
|
|
@@ -1724,7 +1725,7 @@ var Ni = {
|
|
|
1724
1725
|
})};`
|
|
1725
1726
|
), t(), r.params && r.mimeType === "multipart/form-data" && (s("options.body = form;"), t()), s(`fetch('${a}', options)`), s(".then(response => response.json())", 1), s(".then(response => console.log(response))", 1), s(".catch(err => console.error(err));", 1), o();
|
|
1726
1727
|
}
|
|
1727
|
-
},
|
|
1728
|
+
}, Mi = {
|
|
1728
1729
|
info: {
|
|
1729
1730
|
key: "jquery",
|
|
1730
1731
|
title: "jQuery",
|
|
@@ -1753,21 +1754,21 @@ var Ni = {
|
|
|
1753
1754
|
case "multipart/form-data":
|
|
1754
1755
|
if (!a.params)
|
|
1755
1756
|
break;
|
|
1756
|
-
if (o("const form = new FormData();"), a.params.forEach((
|
|
1757
|
-
o(`form.append('${
|
|
1757
|
+
if (o("const form = new FormData();"), a.params.forEach((d) => {
|
|
1758
|
+
o(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
1758
1759
|
}), u.processData = !1, u.contentType = !1, u.mimeType = "multipart/form-data", u.data = "[form]", ft(r, "content-type") && ve(r, "content-type")?.includes("boundary")) {
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1760
|
+
const d = pe(r, "content-type");
|
|
1761
|
+
d && delete u.headers[d];
|
|
1761
1762
|
}
|
|
1762
1763
|
t();
|
|
1763
1764
|
break;
|
|
1764
1765
|
default:
|
|
1765
1766
|
a.text && (u.data = a.text);
|
|
1766
1767
|
}
|
|
1767
|
-
const
|
|
1768
|
-
return o(`const settings = ${
|
|
1768
|
+
const p = ue(u, { indent: i.indent }).replace("'[form]'", "form");
|
|
1769
|
+
return o(`const settings = ${p};`), t(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), s();
|
|
1769
1770
|
}
|
|
1770
|
-
},
|
|
1771
|
+
}, Bi = {
|
|
1771
1772
|
info: {
|
|
1772
1773
|
key: "xhr",
|
|
1773
1774
|
title: "XMLHttpRequest",
|
|
@@ -1807,19 +1808,19 @@ var Ni = {
|
|
|
1807
1808
|
o(`xhr.setRequestHeader('${u}', '${We(n[u])}');`);
|
|
1808
1809
|
}), t(), o("xhr.send(data);"), s();
|
|
1809
1810
|
}
|
|
1810
|
-
},
|
|
1811
|
+
}, zi = {
|
|
1811
1812
|
info: {
|
|
1812
1813
|
key: "javascript",
|
|
1813
1814
|
title: "JavaScript",
|
|
1814
1815
|
default: "xhr"
|
|
1815
1816
|
},
|
|
1816
1817
|
clientsById: {
|
|
1817
|
-
xhr:
|
|
1818
|
-
axios:
|
|
1819
|
-
fetch:
|
|
1820
|
-
jquery:
|
|
1818
|
+
xhr: Bi,
|
|
1819
|
+
axios: Fi,
|
|
1820
|
+
fetch: Hi,
|
|
1821
|
+
jquery: Mi
|
|
1821
1822
|
}
|
|
1822
|
-
},
|
|
1823
|
+
}, Gi = {
|
|
1823
1824
|
info: {
|
|
1824
1825
|
key: "native",
|
|
1825
1826
|
title: "Native JSON",
|
|
@@ -1853,16 +1854,16 @@ var Ni = {
|
|
|
1853
1854
|
}
|
|
1854
1855
|
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, r.indent);
|
|
1855
1856
|
}
|
|
1856
|
-
},
|
|
1857
|
+
}, Wi = {
|
|
1857
1858
|
info: {
|
|
1858
1859
|
key: "json",
|
|
1859
1860
|
title: "JSON",
|
|
1860
1861
|
default: "native"
|
|
1861
1862
|
},
|
|
1862
1863
|
clientsById: {
|
|
1863
|
-
native:
|
|
1864
|
+
native: Gi
|
|
1864
1865
|
}
|
|
1865
|
-
},
|
|
1866
|
+
}, Vi = {
|
|
1866
1867
|
info: {
|
|
1867
1868
|
key: "okhttp",
|
|
1868
1869
|
title: "OkHttp",
|
|
@@ -1874,21 +1875,21 @@ var Ni = {
|
|
|
1874
1875
|
const i = {
|
|
1875
1876
|
indent: " ",
|
|
1876
1877
|
...c
|
|
1877
|
-
}, { blank: t, join: o, push: s } = new Q({ indent: i.indent }), u = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
|
|
1878
|
-
return s("val client = OkHttpClient()"), t(), e.text && (e.boundary ? s(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : s(`val mediaType = MediaType.parse("${e.mimeType}")`), s(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), s("val request = Request.Builder()"), s(`.url("${n}")`, 1), u.includes(r.toUpperCase()) ?
|
|
1879
|
-
s(`.addHeader("${
|
|
1878
|
+
}, { blank: t, join: o, push: s } = new Q({ indent: i.indent }), u = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], p = ["POST", "PUT", "DELETE", "PATCH"];
|
|
1879
|
+
return s("val client = OkHttpClient()"), t(), e.text && (e.boundary ? s(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : s(`val mediaType = MediaType.parse("${e.mimeType}")`), s(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), s("val request = Request.Builder()"), s(`.url("${n}")`, 1), u.includes(r.toUpperCase()) ? p.includes(r.toUpperCase()) ? e.text ? s(`.${r.toLowerCase()}(body)`, 1) : s(`.${r.toLowerCase()}(null)`, 1) : s(`.${r.toLowerCase()}()`, 1) : e.text ? s(`.method("${r.toUpperCase()}", body)`, 1) : s(`.method("${r.toUpperCase()}", null)`, 1), Object.keys(a).forEach((d) => {
|
|
1880
|
+
s(`.addHeader("${d}", "${le(a[d])}")`, 1);
|
|
1880
1881
|
}), s(".build()", 1), t(), s("val response = client.newCall(request).execute()"), o();
|
|
1881
1882
|
}
|
|
1882
|
-
},
|
|
1883
|
+
}, Ji = {
|
|
1883
1884
|
info: {
|
|
1884
1885
|
key: "kotlin",
|
|
1885
1886
|
title: "Kotlin",
|
|
1886
1887
|
default: "okhttp"
|
|
1887
1888
|
},
|
|
1888
1889
|
clientsById: {
|
|
1889
|
-
okhttp:
|
|
1890
|
+
okhttp: Vi
|
|
1890
1891
|
}
|
|
1891
|
-
},
|
|
1892
|
+
}, Di = {
|
|
1892
1893
|
info: {
|
|
1893
1894
|
key: "axios",
|
|
1894
1895
|
title: "Axios",
|
|
@@ -1903,26 +1904,26 @@ var Ni = {
|
|
|
1903
1904
|
...c
|
|
1904
1905
|
}, { blank: t, join: o, push: s, addPostProcessor: u } = new Q({ indent: i.indent });
|
|
1905
1906
|
s("const axios = require('axios');");
|
|
1906
|
-
const
|
|
1907
|
+
const p = {
|
|
1907
1908
|
method: e,
|
|
1908
1909
|
url: n
|
|
1909
1910
|
};
|
|
1910
|
-
switch (Object.keys(r).length && (
|
|
1911
|
+
switch (Object.keys(r).length && (p.headers = r), a.mimeType) {
|
|
1911
1912
|
case "application/x-www-form-urlencoded":
|
|
1912
1913
|
a.params && (s("const { URLSearchParams } = require('url');"), t(), s("const encodedParams = new URLSearchParams();"), a.params.forEach((m) => {
|
|
1913
1914
|
s(`encodedParams.set('${m.name}', '${m.value}');`);
|
|
1914
|
-
}), t(),
|
|
1915
|
+
}), t(), p.data = "encodedParams,", u((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
|
|
1915
1916
|
break;
|
|
1916
1917
|
case "application/json":
|
|
1917
|
-
t(), a.jsonObj && (
|
|
1918
|
+
t(), a.jsonObj && (p.data = a.jsonObj);
|
|
1918
1919
|
break;
|
|
1919
1920
|
default:
|
|
1920
|
-
t(), a.text && (
|
|
1921
|
+
t(), a.text && (p.data = a.text);
|
|
1921
1922
|
}
|
|
1922
|
-
const
|
|
1923
|
-
return s(`const options = ${
|
|
1923
|
+
const d = ue(p, { indent: " ", inlineCharacterLimit: 80 });
|
|
1924
|
+
return s(`const options = ${d};`), t(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), o();
|
|
1924
1925
|
}
|
|
1925
|
-
},
|
|
1926
|
+
}, Qi = {
|
|
1926
1927
|
info: {
|
|
1927
1928
|
key: "fetch",
|
|
1928
1929
|
title: "Fetch",
|
|
@@ -1937,14 +1938,14 @@ var Ni = {
|
|
|
1937
1938
|
...i
|
|
1938
1939
|
};
|
|
1939
1940
|
let o = !1;
|
|
1940
|
-
const { blank: s, push: u, join:
|
|
1941
|
+
const { blank: s, push: u, join: p, unshift: d } = new Q({ indent: t.indent });
|
|
1941
1942
|
u("const fetch = require('node-fetch');");
|
|
1942
1943
|
const m = n, y = {
|
|
1943
1944
|
method: e
|
|
1944
1945
|
};
|
|
1945
1946
|
switch (Object.keys(a).length && (y.headers = a), r.mimeType) {
|
|
1946
1947
|
case "application/x-www-form-urlencoded":
|
|
1947
|
-
|
|
1948
|
+
d("const { URLSearchParams } = require('url');"), u("const encodedParams = new URLSearchParams();"), s(), r.params?.forEach((f) => {
|
|
1948
1949
|
u(`encodedParams.set('${f.name}', '${f.value}');`);
|
|
1949
1950
|
}), y.body = "encodedParams";
|
|
1950
1951
|
break;
|
|
@@ -1955,7 +1956,7 @@ var Ni = {
|
|
|
1955
1956
|
if (!r.params)
|
|
1956
1957
|
break;
|
|
1957
1958
|
const b = pe(a, "content-type");
|
|
1958
|
-
b && delete a[b],
|
|
1959
|
+
b && delete a[b], d("const FormData = require('form-data');"), u("const formData = new FormData();"), s(), r.params.forEach((f) => {
|
|
1959
1960
|
if (!f.fileName && !f.fileName && !f.contentType) {
|
|
1960
1961
|
u(`formData.append('${f.name}', '${f.value}');`);
|
|
1961
1962
|
return;
|
|
@@ -1979,9 +1980,9 @@ var Ni = {
|
|
|
1979
1980
|
// in a `JSON.stringify` call.
|
|
1980
1981
|
transform: (b, f, g) => f === "body" && r.mimeType === "application/json" ? `JSON.stringify(${g})` : g
|
|
1981
1982
|
});
|
|
1982
|
-
return u(`const options = ${j};`), s(), o &&
|
|
1983
|
+
return u(`const options = ${j};`), s(), o && d("const fs = require('fs');"), r.params && r.mimeType === "multipart/form-data" && (u("options.body = formData;"), s()), u("fetch(url, options)"), u(".then(res => res.json())", 1), u(".then(json => console.log(json))", 1), u(".catch(err => console.error('error:' + err));", 1), p().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
1983
1984
|
}
|
|
1984
|
-
},
|
|
1985
|
+
}, Ki = {
|
|
1985
1986
|
info: {
|
|
1986
1987
|
key: "native",
|
|
1987
1988
|
title: "HTTP",
|
|
@@ -1990,14 +1991,14 @@ var Ni = {
|
|
|
1990
1991
|
extname: ".cjs"
|
|
1991
1992
|
},
|
|
1992
1993
|
convert: ({ uriObj: e, method: n, allHeaders: r, postData: a }, c = {}) => {
|
|
1993
|
-
const { indent: i = " " } = c, { blank: t, join: o, push: s, unshift: u } = new Q({ indent: i }),
|
|
1994
|
+
const { indent: i = " " } = c, { blank: t, join: o, push: s, unshift: u } = new Q({ indent: i }), p = {
|
|
1994
1995
|
method: n,
|
|
1995
1996
|
hostname: e.hostname,
|
|
1996
1997
|
port: e.port,
|
|
1997
1998
|
path: e.path,
|
|
1998
1999
|
headers: r
|
|
1999
2000
|
};
|
|
2000
|
-
switch (s(`const http = require('${e.protocol?.replace(":", "")}');`), t(), s(`const options = ${ue(
|
|
2001
|
+
switch (s(`const http = require('${e.protocol?.replace(":", "")}');`), t(), s(`const options = ${ue(p, { indent: i })};`), t(), s("const req = http.request(options, function (res) {"), s("const chunks = [];", 1), t(), s("res.on('data', function (chunk) {", 1), s("chunks.push(chunk);", 2), s("});", 1), t(), s("res.on('end', function () {", 1), s("const body = Buffer.concat(chunks);", 2), s("console.log(body.toString());", 2), s("});", 1), s("});"), t(), a.mimeType) {
|
|
2001
2002
|
case "application/x-www-form-urlencoded":
|
|
2002
2003
|
a.paramsObj && (u("const qs = require('querystring');"), s(
|
|
2003
2004
|
`req.write(qs.stringify(${ue(a.paramsObj, {
|
|
@@ -2019,7 +2020,7 @@ var Ni = {
|
|
|
2019
2020
|
}
|
|
2020
2021
|
return s("req.end();"), o();
|
|
2021
2022
|
}
|
|
2022
|
-
},
|
|
2023
|
+
}, Yi = {
|
|
2023
2024
|
info: {
|
|
2024
2025
|
key: "request",
|
|
2025
2026
|
title: "Request",
|
|
@@ -2034,8 +2035,8 @@ var Ni = {
|
|
|
2034
2035
|
...t
|
|
2035
2036
|
};
|
|
2036
2037
|
let s = !1;
|
|
2037
|
-
const { push: u, blank:
|
|
2038
|
-
u("const request = require('request');"),
|
|
2038
|
+
const { push: u, blank: p, join: d, unshift: m, addPostProcessor: y } = new Q({ indent: o.indent });
|
|
2039
|
+
u("const request = require('request');"), p();
|
|
2039
2040
|
const j = {
|
|
2040
2041
|
method: e,
|
|
2041
2042
|
url: r
|
|
@@ -2070,9 +2071,9 @@ var Ni = {
|
|
|
2070
2071
|
}
|
|
2071
2072
|
return i.length && (j.jar = "JAR", u("const jar = request.jar();"), i.forEach(({ name: b, value: f }) => {
|
|
2072
2073
|
u(`jar.setCookie(request.cookie('${encodeURIComponent(b)}=${encodeURIComponent(f)}'), '${n}');`);
|
|
2073
|
-
}),
|
|
2074
|
+
}), p(), y((b) => b.replace(/'JAR'/, "jar"))), s && m("const fs = require('fs');"), u(`const options = ${ue(j, { indent: " ", inlineCharacterLimit: 80 })};`), p(), u("request(options, function (error, response, body) {"), u("if (error) throw new Error(error);", 1), p(), u("console.log(body);", 1), u("});"), d();
|
|
2074
2075
|
}
|
|
2075
|
-
},
|
|
2076
|
+
}, Xi = {
|
|
2076
2077
|
info: {
|
|
2077
2078
|
key: "unirest",
|
|
2078
2079
|
title: "Unirest",
|
|
@@ -2086,17 +2087,17 @@ var Ni = {
|
|
|
2086
2087
|
...t
|
|
2087
2088
|
};
|
|
2088
2089
|
let s = !1;
|
|
2089
|
-
const { addPostProcessor: u, blank:
|
|
2090
|
+
const { addPostProcessor: u, blank: p, join: d, push: m, unshift: y } = new Q({
|
|
2090
2091
|
indent: o.indent
|
|
2091
2092
|
});
|
|
2092
|
-
switch (m("const unirest = require('unirest');"),
|
|
2093
|
+
switch (m("const unirest = require('unirest');"), p(), m(`const req = unirest('${e}', '${n}');`), p(), r.length && (m("const CookieJar = unirest.jar();"), r.forEach((j) => {
|
|
2093
2094
|
m(`CookieJar.add('${encodeURIComponent(j.name)}=${encodeURIComponent(j.value)}', '${n}');`);
|
|
2094
|
-
}), m("req.jar(CookieJar);"),
|
|
2095
|
+
}), m("req.jar(CookieJar);"), p()), Object.keys(a).length && (m(`req.query(${ue(a, { indent: o.indent })});`), p()), Object.keys(i).length && (m(`req.headers(${ue(i, { indent: o.indent })});`), p()), c.mimeType) {
|
|
2095
2096
|
case "application/x-www-form-urlencoded":
|
|
2096
|
-
c.paramsObj && (m(`req.form(${ue(c.paramsObj, { indent: o.indent })});`),
|
|
2097
|
+
c.paramsObj && (m(`req.form(${ue(c.paramsObj, { indent: o.indent })});`), p());
|
|
2097
2098
|
break;
|
|
2098
2099
|
case "application/json":
|
|
2099
|
-
c.jsonObj && (m("req.type('json');"), m(`req.send(${ue(c.jsonObj, { indent: o.indent })});`),
|
|
2100
|
+
c.jsonObj && (m("req.type('json');"), m(`req.send(${ue(c.jsonObj, { indent: o.indent })});`), p());
|
|
2100
2101
|
break;
|
|
2101
2102
|
case "multipart/form-data": {
|
|
2102
2103
|
if (!c.params)
|
|
@@ -2105,15 +2106,15 @@ var Ni = {
|
|
|
2105
2106
|
c.params.forEach((b) => {
|
|
2106
2107
|
const f = {};
|
|
2107
2108
|
b.fileName && !b.value ? (s = !0, f.body = `fs.createReadStream('${b.fileName}')`, u((g) => g.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : b.value && (f.body = b.value), f.body && (b.contentType && (f["content-type"] = b.contentType), j.push(f));
|
|
2108
|
-
}), m(`req.multipart(${ue(j, { indent: o.indent })});`),
|
|
2109
|
+
}), m(`req.multipart(${ue(j, { indent: o.indent })});`), p();
|
|
2109
2110
|
break;
|
|
2110
2111
|
}
|
|
2111
2112
|
default:
|
|
2112
|
-
c.text && (m(`req.send(${ue(c.text, { indent: o.indent })});`),
|
|
2113
|
+
c.text && (m(`req.send(${ue(c.text, { indent: o.indent })});`), p());
|
|
2113
2114
|
}
|
|
2114
|
-
return s && y("const fs = require('fs');"), m("req.end(function (res) {"), m("if (res.error) throw new Error(res.error);", 1),
|
|
2115
|
+
return s && y("const fs = require('fs');"), m("req.end(function (res) {"), m("if (res.error) throw new Error(res.error);", 1), p(), m("console.log(res.body);", 1), m("});"), d();
|
|
2115
2116
|
}
|
|
2116
|
-
},
|
|
2117
|
+
}, Zi = {
|
|
2117
2118
|
info: {
|
|
2118
2119
|
key: "node",
|
|
2119
2120
|
title: "Node.js",
|
|
@@ -2121,11 +2122,11 @@ var Ni = {
|
|
|
2121
2122
|
cli: "node %s"
|
|
2122
2123
|
},
|
|
2123
2124
|
clientsById: {
|
|
2124
|
-
native:
|
|
2125
|
-
request:
|
|
2126
|
-
unirest:
|
|
2127
|
-
axios:
|
|
2128
|
-
fetch:
|
|
2125
|
+
native: Ki,
|
|
2126
|
+
request: Yi,
|
|
2127
|
+
unirest: Xi,
|
|
2128
|
+
axios: Di,
|
|
2129
|
+
fetch: Qi
|
|
2129
2130
|
}
|
|
2130
2131
|
}, Pt = (e, n, r, a) => {
|
|
2131
2132
|
const c = `${e} *${n} = `, i = Nr(r, a ? c.length : void 0);
|
|
@@ -2149,7 +2150,7 @@ var Ni = {
|
|
|
2149
2150
|
default:
|
|
2150
2151
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2151
2152
|
}
|
|
2152
|
-
},
|
|
2153
|
+
}, es = {
|
|
2153
2154
|
info: {
|
|
2154
2155
|
key: "nsurlsession",
|
|
2155
2156
|
title: "NSURLSession",
|
|
@@ -2172,10 +2173,10 @@ var Ni = {
|
|
|
2172
2173
|
case "application/x-www-form-urlencoded":
|
|
2173
2174
|
if (n.params?.length) {
|
|
2174
2175
|
s();
|
|
2175
|
-
const [
|
|
2176
|
+
const [p, ...d] = n.params;
|
|
2176
2177
|
t(
|
|
2177
|
-
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${
|
|
2178
|
-
),
|
|
2178
|
+
`NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${p.name}=${p.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
|
|
2179
|
+
), d.forEach(({ name: m, value: y }) => {
|
|
2179
2180
|
t(`[postData appendData:[@"&${m}=${y}" dataUsingEncoding:NSUTF8StringEncoding]];`);
|
|
2180
2181
|
});
|
|
2181
2182
|
} else
|
|
@@ -2205,16 +2206,16 @@ var Ni = {
|
|
|
2205
2206
|
2
|
|
2206
2207
|
), t(' NSLog(@"%@", httpResponse);', 2), t(" }", 1), t(" }];"), t("[dataTask resume];"), o();
|
|
2207
2208
|
}
|
|
2208
|
-
},
|
|
2209
|
+
}, ts = {
|
|
2209
2210
|
info: {
|
|
2210
2211
|
key: "objc",
|
|
2211
2212
|
title: "Objective-C",
|
|
2212
2213
|
default: "nsurlsession"
|
|
2213
2214
|
},
|
|
2214
2215
|
clientsById: {
|
|
2215
|
-
nsurlsession:
|
|
2216
|
+
nsurlsession: es
|
|
2216
2217
|
}
|
|
2217
|
-
},
|
|
2218
|
+
}, rs = {
|
|
2218
2219
|
info: {
|
|
2219
2220
|
key: "cohttp",
|
|
2220
2221
|
title: "CoHTTP",
|
|
@@ -2229,25 +2230,25 @@ var Ni = {
|
|
|
2229
2230
|
...c
|
|
2230
2231
|
}, t = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: s, join: u } = new Q({ indent: i.indent });
|
|
2231
2232
|
o("open Cohttp_lwt_unix"), o("open Cohttp"), o("open Lwt"), s(), o(`let uri = Uri.of_string "${e}" in`);
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2234
|
-
`let headers = Header.add (Header.init ()) "${
|
|
2235
|
-
n[
|
|
2233
|
+
const p = Object.keys(n);
|
|
2234
|
+
p.length === 1 ? o(
|
|
2235
|
+
`let headers = Header.add (Header.init ()) "${p[0]}" "${le(
|
|
2236
|
+
n[p[0]]
|
|
2236
2237
|
)}" in`
|
|
2237
|
-
) :
|
|
2238
|
+
) : p.length > 1 && (o("let headers = Header.add_list (Header.init ()) ["), p.forEach((j) => {
|
|
2238
2239
|
o(`("${j}", "${le(n[j])}");`, 1);
|
|
2239
2240
|
}), o("] in")), r.text && o(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(r.text)} in`), s();
|
|
2240
|
-
const
|
|
2241
|
-
return o(`Client.call ${
|
|
2241
|
+
const d = p.length ? "~headers " : "", m = r.text ? "~body " : "", y = t.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
2242
|
+
return o(`Client.call ${d}${m}${y} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), u();
|
|
2242
2243
|
}
|
|
2243
|
-
},
|
|
2244
|
+
}, ns = {
|
|
2244
2245
|
info: {
|
|
2245
2246
|
key: "ocaml",
|
|
2246
2247
|
title: "OCaml",
|
|
2247
2248
|
default: "cohttp"
|
|
2248
2249
|
},
|
|
2249
2250
|
clientsById: {
|
|
2250
|
-
cohttp:
|
|
2251
|
+
cohttp: rs
|
|
2251
2252
|
}
|
|
2252
2253
|
}, re = (e, n, r) => {
|
|
2253
2254
|
switch (r = r || "", n = n || "", Object.prototype.toString.call(e)) {
|
|
@@ -2308,7 +2309,7 @@ ${r}]`;
|
|
|
2308
2309
|
"UNLOCK",
|
|
2309
2310
|
"UPDATE",
|
|
2310
2311
|
"VERSION_CONTROL"
|
|
2311
|
-
],
|
|
2312
|
+
], as = {
|
|
2312
2313
|
info: {
|
|
2313
2314
|
key: "curl",
|
|
2314
2315
|
title: "cURL",
|
|
@@ -2320,8 +2321,8 @@ ${r}]`;
|
|
|
2320
2321
|
const {
|
|
2321
2322
|
closingTag: s = !1,
|
|
2322
2323
|
indent: u = " ",
|
|
2323
|
-
maxRedirects:
|
|
2324
|
-
namedErrors:
|
|
2324
|
+
maxRedirects: p = 10,
|
|
2325
|
+
namedErrors: d = !1,
|
|
2325
2326
|
noTags: m = !1,
|
|
2326
2327
|
shortTags: y = !1,
|
|
2327
2328
|
timeout: j = 30
|
|
@@ -2351,7 +2352,7 @@ ${r}]`;
|
|
|
2351
2352
|
{
|
|
2352
2353
|
escape: !1,
|
|
2353
2354
|
name: "CURLOPT_MAXREDIRS",
|
|
2354
|
-
value:
|
|
2355
|
+
value: p
|
|
2355
2356
|
},
|
|
2356
2357
|
{
|
|
2357
2358
|
escape: !1,
|
|
@@ -2382,11 +2383,11 @@ ${u}` });
|
|
|
2382
2383
|
});
|
|
2383
2384
|
const C = i.map((T) => `${encodeURIComponent(T.name)}=${encodeURIComponent(T.value)}`);
|
|
2384
2385
|
C.length && S.push(`CURLOPT_COOKIE => "${C.join("; ")}",`);
|
|
2385
|
-
const
|
|
2386
|
-
return
|
|
2387
|
-
${u}${u}`), 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(
|
|
2386
|
+
const h = Object.keys(t).sort().map((T) => `"${T}: ${le(t[T])}"`);
|
|
2387
|
+
return h.length && (S.push("CURLOPT_HTTPHEADER => ["), S.push(h.join(`,
|
|
2388
|
+
${u}${u}`), 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(d ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), b("} else {"), b("echo $response;", 1), b("}"), !m && s && (f(), b("?>")), g();
|
|
2388
2389
|
}
|
|
2389
|
-
},
|
|
2390
|
+
}, os = {
|
|
2390
2391
|
info: {
|
|
2391
2392
|
key: "guzzle",
|
|
2392
2393
|
title: "Guzzle",
|
|
@@ -2402,10 +2403,10 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2402
2403
|
noTags: !1,
|
|
2403
2404
|
shortTags: !1,
|
|
2404
2405
|
...i
|
|
2405
|
-
}, { push: o, blank: s, join: u } = new Q({ indent: t.indent }), { code:
|
|
2406
|
+
}, { push: o, blank: s, join: u } = new Q({ indent: t.indent }), { code: p, push: d, join: m } = new Q({ indent: t.indent });
|
|
2406
2407
|
switch (t.noTags || o(t.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), s(), e.mimeType) {
|
|
2407
2408
|
case "application/x-www-form-urlencoded":
|
|
2408
|
-
|
|
2409
|
+
d(`'form_params' => ${re(e.paramsObj, t.indent + t.indent, t.indent)},`, 1);
|
|
2409
2410
|
break;
|
|
2410
2411
|
case "multipart/form-data": {
|
|
2411
2412
|
const b = [];
|
|
@@ -2421,22 +2422,22 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2421
2422
|
name: f.name,
|
|
2422
2423
|
contents: f.value
|
|
2423
2424
|
});
|
|
2424
|
-
}), b.length && (
|
|
2425
|
+
}), b.length && (d(`'multipart' => ${re(b, t.indent + t.indent, t.indent)}`, 1), ft(c, "content-type") && ve(c, "content-type")?.indexOf("boundary"))) {
|
|
2425
2426
|
const f = pe(c, "content-type");
|
|
2426
2427
|
f && delete c[f];
|
|
2427
2428
|
}
|
|
2428
2429
|
break;
|
|
2429
2430
|
}
|
|
2430
2431
|
default:
|
|
2431
|
-
e.text &&
|
|
2432
|
+
e.text && d(`'body' => ${re(e.text)},`, 1);
|
|
2432
2433
|
}
|
|
2433
2434
|
const y = Object.keys(c).sort().map(function(b) {
|
|
2434
2435
|
return `${t.indent}${t.indent}'${b}' => '${We(c[b])}',`;
|
|
2435
2436
|
}), j = a.map((b) => `${encodeURIComponent(b.name)}=${encodeURIComponent(b.value)}`).join("; ");
|
|
2436
|
-
return j.length && y.push(`${t.indent}${t.indent}'cookie' => '${We(j)}',`), y.length && (
|
|
2437
|
-
`)),
|
|
2437
|
+
return j.length && y.push(`${t.indent}${t.indent}'cookie' => '${We(j)}',`), y.length && (d("'headers' => [", 1), d(y.join(`
|
|
2438
|
+
`)), d("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), s(), p.length ? (o(`$response = $client->request('${r}', '${n}', [`), o(m()), o("]);")) : o(`$response = $client->request('${r}', '${n}');`), s(), o("echo $response->getBody();"), !t.noTags && t.closingTag && (s(), o("?>")), u();
|
|
2438
2439
|
}
|
|
2439
|
-
},
|
|
2440
|
+
}, is = {
|
|
2440
2441
|
info: {
|
|
2441
2442
|
key: "http1",
|
|
2442
2443
|
title: "HTTP v1",
|
|
@@ -2445,20 +2446,20 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2445
2446
|
extname: ".php"
|
|
2446
2447
|
},
|
|
2447
2448
|
convert: ({ method: e, url: n, postData: r, queryObj: a, headersObj: c, cookiesObj: i }, t = {}) => {
|
|
2448
|
-
const { closingTag: o = !1, indent: s = " ", noTags: u = !1, shortTags:
|
|
2449
|
-
switch (u || (p
|
|
2449
|
+
const { closingTag: o = !1, indent: s = " ", noTags: u = !1, shortTags: p = !1 } = t, { push: d, blank: m, join: y } = new Q({ indent: s });
|
|
2450
|
+
switch (u || (d(p ? "<?" : "<?php"), m()), yn.includes(e.toUpperCase()) || d(`HttpRequest::methodRegister('${e}');`), d("$request = new HttpRequest();"), d(`$request->setUrl(${re(n)});`), yn.includes(e.toUpperCase()) ? d(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : d(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), m(), Object.keys(a).length && (d(`$request->setQueryData(${re(a, s)});`), m()), Object.keys(c).length && (d(`$request->setHeaders(${re(c, s)});`), m()), Object.keys(i).length && (d(`$request->setCookies(${re(i, s)});`), m()), r.mimeType) {
|
|
2450
2451
|
case "application/x-www-form-urlencoded":
|
|
2451
|
-
|
|
2452
|
+
d(`$request->setContentType(${re(r.mimeType)});`), d(`$request->setPostFields(${re(r.paramsObj, s)});`), m();
|
|
2452
2453
|
break;
|
|
2453
2454
|
case "application/json":
|
|
2454
|
-
|
|
2455
|
+
d(`$request->setContentType(${re(r.mimeType)});`), d(`$request->setBody(json_encode(${re(r.jsonObj, s)}));`), m();
|
|
2455
2456
|
break;
|
|
2456
2457
|
default:
|
|
2457
|
-
r.text && (
|
|
2458
|
+
r.text && (d(`$request->setBody(${re(r.text)});`), m());
|
|
2458
2459
|
}
|
|
2459
|
-
return
|
|
2460
|
+
return d("try {"), d("$response = $request->send();", 1), m(), d("echo $response->getBody();", 1), d("} catch (HttpException $ex) {"), d("echo $ex;", 1), d("}"), !u && o && (m(), d("?>")), y();
|
|
2460
2461
|
}
|
|
2461
|
-
},
|
|
2462
|
+
}, ss = {
|
|
2462
2463
|
info: {
|
|
2463
2464
|
key: "http2",
|
|
2464
2465
|
title: "HTTP v2",
|
|
@@ -2467,30 +2468,30 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2467
2468
|
extname: ".php"
|
|
2468
2469
|
},
|
|
2469
2470
|
convert: ({ postData: e, headersObj: n, method: r, queryObj: a, cookiesObj: c, url: i }, t = {}) => {
|
|
2470
|
-
const { closingTag: o = !1, indent: s = " ", noTags: u = !1, shortTags:
|
|
2471
|
+
const { closingTag: o = !1, indent: s = " ", noTags: u = !1, shortTags: p = !1 } = t, { push: d, blank: m, join: y } = new Q({ indent: s });
|
|
2471
2472
|
let j = !1;
|
|
2472
|
-
switch (u || (p
|
|
2473
|
+
switch (u || (d(p ? "<?" : "<?php"), m()), d("$client = new http\\Client;"), d("$request = new http\\Client\\Request;"), m(), e.mimeType) {
|
|
2473
2474
|
case "application/x-www-form-urlencoded":
|
|
2474
|
-
|
|
2475
|
+
d("$body = new http\\Message\\Body;"), d(`$body->append(new http\\QueryString(${re(e.paramsObj, s)}));`), m(), j = !0;
|
|
2475
2476
|
break;
|
|
2476
2477
|
case "multipart/form-data": {
|
|
2477
2478
|
if (!e.params)
|
|
2478
2479
|
break;
|
|
2479
2480
|
const b = [], f = {};
|
|
2480
|
-
e.params.forEach(({ name: S, fileName: C, value:
|
|
2481
|
+
e.params.forEach(({ name: S, fileName: C, value: h, contentType: T }) => {
|
|
2481
2482
|
if (C) {
|
|
2482
2483
|
b.push({
|
|
2483
2484
|
name: S,
|
|
2484
2485
|
type: T,
|
|
2485
2486
|
file: C,
|
|
2486
|
-
data:
|
|
2487
|
+
data: h
|
|
2487
2488
|
});
|
|
2488
2489
|
return;
|
|
2489
2490
|
}
|
|
2490
|
-
|
|
2491
|
+
h && (f[S] = h);
|
|
2491
2492
|
});
|
|
2492
2493
|
const g = Object.keys(f).length ? re(f, s) : "null", v = b.length ? re(b, s) : "null";
|
|
2493
|
-
if (
|
|
2494
|
+
if (d("$body = new http\\Message\\Body;"), d(`$body->addForm(${g}, ${v});`), ft(n, "content-type") && ve(n, "content-type")?.indexOf("boundary")) {
|
|
2494
2495
|
const S = pe(n, "content-type");
|
|
2495
2496
|
S && delete n[S];
|
|
2496
2497
|
}
|
|
@@ -2498,14 +2499,14 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2498
2499
|
break;
|
|
2499
2500
|
}
|
|
2500
2501
|
case "application/json":
|
|
2501
|
-
|
|
2502
|
+
d("$body = new http\\Message\\Body;"), d(`$body->append(json_encode(${re(e.jsonObj, s)}));`), j = !0;
|
|
2502
2503
|
break;
|
|
2503
2504
|
default:
|
|
2504
|
-
e.text && (
|
|
2505
|
+
e.text && (d("$body = new http\\Message\\Body;"), d(`$body->append(${re(e.text)});`), m(), j = !0);
|
|
2505
2506
|
}
|
|
2506
|
-
return
|
|
2507
|
+
return d(`$request->setRequestUrl(${re(i)});`), d(`$request->setRequestMethod(${re(r)});`), j && (d("$request->setBody($body);"), m()), Object.keys(a).length && (d(`$request->setQuery(new http\\QueryString(${re(a, s)}));`), m()), Object.keys(n).length && (d(`$request->setHeaders(${re(n, s)});`), m()), Object.keys(c).length && (m(), d(`$client->setCookies(${re(c, s)});`), m()), d("$client->enqueue($request)->send();"), d("$response = $client->getResponse();"), m(), d("echo $response->getBody();"), !u && o && (m(), d("?>")), y();
|
|
2507
2508
|
}
|
|
2508
|
-
},
|
|
2509
|
+
}, ls = {
|
|
2509
2510
|
info: {
|
|
2510
2511
|
key: "php",
|
|
2511
2512
|
title: "PHP",
|
|
@@ -2513,13 +2514,13 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2513
2514
|
cli: "php %s"
|
|
2514
2515
|
},
|
|
2515
2516
|
clientsById: {
|
|
2516
|
-
curl:
|
|
2517
|
-
guzzle:
|
|
2518
|
-
http1:
|
|
2519
|
-
http2:
|
|
2517
|
+
curl: as,
|
|
2518
|
+
guzzle: os,
|
|
2519
|
+
http1: is,
|
|
2520
|
+
http2: ss
|
|
2520
2521
|
}
|
|
2521
|
-
},
|
|
2522
|
-
const { push: u, join:
|
|
2522
|
+
}, Ra = (e) => ({ method: r, headersObj: a, cookies: c, uriObj: i, fullUrl: t, postData: o, allHeaders: s }) => {
|
|
2523
|
+
const { push: u, join: p } = new Q();
|
|
2523
2524
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(r.toUpperCase()))
|
|
2524
2525
|
return "Method not supported";
|
|
2525
2526
|
const m = [], y = Object.keys(a);
|
|
@@ -2529,8 +2530,8 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2529
2530
|
u("$cookie = New-Object System.Net.Cookie"), u(`$cookie.Name = '${j.name}'`), u(`$cookie.Value = '${j.value}'`), u(`$cookie.Domain = '${i.host}'`), u("$session.Cookies.Add($cookie)");
|
|
2530
2531
|
}), m.push("-WebSession $session")), o.text && (m.push(
|
|
2531
2532
|
`-ContentType '${Ge(ve(s, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
2532
|
-
), m.push(`-Body '${o.text}'`)), u(`$response = ${e} -Uri '${t}' -Method ${r} ${m.join(" ")}`.trim()),
|
|
2533
|
-
},
|
|
2533
|
+
), m.push(`-Body '${o.text}'`)), u(`$response = ${e} -Uri '${t}' -Method ${r} ${m.join(" ")}`.trim()), p();
|
|
2534
|
+
}, cs = {
|
|
2534
2535
|
info: {
|
|
2535
2536
|
key: "restmethod",
|
|
2536
2537
|
title: "Invoke-RestMethod",
|
|
@@ -2538,8 +2539,8 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2538
2539
|
description: "Powershell Invoke-RestMethod client",
|
|
2539
2540
|
extname: ".ps1"
|
|
2540
2541
|
},
|
|
2541
|
-
convert:
|
|
2542
|
-
},
|
|
2542
|
+
convert: Ra("Invoke-RestMethod")
|
|
2543
|
+
}, us = {
|
|
2543
2544
|
info: {
|
|
2544
2545
|
key: "webrequest",
|
|
2545
2546
|
title: "Invoke-WebRequest",
|
|
@@ -2547,16 +2548,16 @@ ${u}${u}`), 1), S.push("],")), b(S.join(), 1), b("]);"), f(), b("$response = cur
|
|
|
2547
2548
|
description: "Powershell Invoke-WebRequest client",
|
|
2548
2549
|
extname: ".ps1"
|
|
2549
2550
|
},
|
|
2550
|
-
convert:
|
|
2551
|
-
},
|
|
2551
|
+
convert: Ra("Invoke-WebRequest")
|
|
2552
|
+
}, ps = {
|
|
2552
2553
|
info: {
|
|
2553
2554
|
key: "powershell",
|
|
2554
2555
|
title: "Powershell",
|
|
2555
2556
|
default: "webrequest"
|
|
2556
2557
|
},
|
|
2557
2558
|
clientsById: {
|
|
2558
|
-
webrequest:
|
|
2559
|
-
restmethod:
|
|
2559
|
+
webrequest: us,
|
|
2560
|
+
restmethod: cs
|
|
2560
2561
|
}
|
|
2561
2562
|
};
|
|
2562
2563
|
function gn(e, n, r, a, c) {
|
|
@@ -2588,7 +2589,7 @@ var Ie = (e, n, r) => {
|
|
|
2588
2589
|
default:
|
|
2589
2590
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2590
2591
|
}
|
|
2591
|
-
},
|
|
2592
|
+
}, fs = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], ds = {
|
|
2592
2593
|
info: {
|
|
2593
2594
|
key: "requests",
|
|
2594
2595
|
title: "Requests",
|
|
@@ -2604,8 +2605,8 @@ var Ie = (e, n, r) => {
|
|
|
2604
2605
|
...c
|
|
2605
2606
|
}, { push: t, blank: o, join: s, addPostProcessor: u } = new Q({ indent: i.indent });
|
|
2606
2607
|
t("import requests"), o(), t(`url = "${e}"`), o();
|
|
2607
|
-
const
|
|
2608
|
-
let
|
|
2608
|
+
const p = r;
|
|
2609
|
+
let d = {};
|
|
2609
2610
|
const m = {};
|
|
2610
2611
|
let y = !1, j = !1, b = !1;
|
|
2611
2612
|
switch (n.mimeType) {
|
|
@@ -2615,12 +2616,12 @@ var Ie = (e, n, r) => {
|
|
|
2615
2616
|
case "multipart/form-data":
|
|
2616
2617
|
if (!n.params)
|
|
2617
2618
|
break;
|
|
2618
|
-
if (
|
|
2619
|
-
v.fileName ? (v.contentType ? m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (
|
|
2619
|
+
if (d = {}, n.params.forEach((v) => {
|
|
2620
|
+
v.fileName ? (v.contentType ? m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'), '${v.contentType}')` : m[v.name] = `('${v.fileName}', open('${v.fileName}', 'rb'))`, y = !0) : (d[v.name] = v.value, j = !0);
|
|
2620
2621
|
}), y) {
|
|
2621
|
-
t(`files = ${Ie(m, i)}`), j && t(`payload = ${Ie(
|
|
2622
|
-
const v = pe(
|
|
2623
|
-
v && delete
|
|
2622
|
+
t(`files = ${Ie(m, i)}`), j && t(`payload = ${Ie(d, i)}`);
|
|
2623
|
+
const v = pe(p, "content-type");
|
|
2624
|
+
v && delete p[v];
|
|
2624
2625
|
} else {
|
|
2625
2626
|
const v = JSON.stringify(n.text);
|
|
2626
2627
|
v && (t(`payload = ${v}`), j = !0);
|
|
@@ -2638,23 +2639,23 @@ var Ie = (e, n, r) => {
|
|
|
2638
2639
|
v && (t(`payload = ${v}`), j = !0);
|
|
2639
2640
|
}
|
|
2640
2641
|
}
|
|
2641
|
-
const f = Object.keys(
|
|
2642
|
+
const f = Object.keys(p).length;
|
|
2642
2643
|
if (f === 0 && (j || y))
|
|
2643
2644
|
o();
|
|
2644
2645
|
else if (f === 1)
|
|
2645
|
-
Object.keys(
|
|
2646
|
-
t(`headers = {"${v}": "${le(
|
|
2646
|
+
Object.keys(p).forEach((v) => {
|
|
2647
|
+
t(`headers = {"${v}": "${le(p[v])}"}`), o();
|
|
2647
2648
|
});
|
|
2648
2649
|
else if (f > 1) {
|
|
2649
2650
|
let v = 1;
|
|
2650
|
-
t("headers = {"), Object.keys(
|
|
2651
|
-
t(v !== f ? `"${S}": "${le(
|
|
2651
|
+
t("headers = {"), Object.keys(p).forEach((S) => {
|
|
2652
|
+
t(v !== f ? `"${S}": "${le(p[S])}",` : `"${S}": "${le(p[S])}"`, 1), v += 1;
|
|
2652
2653
|
}), t("}"), o();
|
|
2653
2654
|
}
|
|
2654
|
-
let g =
|
|
2655
|
+
let g = fs.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
2655
2656
|
return j && (b ? g += ", json=payload" : g += ", data=payload"), y && (g += ", files=files"), f > 0 && (g += ", headers=headers"), g += ")", t(g), o(), t("print(response.text)"), s();
|
|
2656
2657
|
}
|
|
2657
|
-
},
|
|
2658
|
+
}, hs = {
|
|
2658
2659
|
info: {
|
|
2659
2660
|
key: "python",
|
|
2660
2661
|
title: "Python",
|
|
@@ -2662,9 +2663,9 @@ var Ie = (e, n, r) => {
|
|
|
2662
2663
|
cli: "python3 %s"
|
|
2663
2664
|
},
|
|
2664
2665
|
clientsById: {
|
|
2665
|
-
requests:
|
|
2666
|
+
requests: ds
|
|
2666
2667
|
}
|
|
2667
|
-
},
|
|
2668
|
+
}, ms = {
|
|
2668
2669
|
info: {
|
|
2669
2670
|
key: "httr",
|
|
2670
2671
|
title: "httr",
|
|
@@ -2677,12 +2678,12 @@ var Ie = (e, n, r) => {
|
|
|
2677
2678
|
t("library(httr)"), o(), t(`url <- "${e}"`), o();
|
|
2678
2679
|
const u = n;
|
|
2679
2680
|
delete n.key;
|
|
2680
|
-
const
|
|
2681
|
-
r.length === 1 ? (t(`queryString <- list(${Object.keys(u)} = "${Object.values(u).toString()}")`), o()) : r.length > 1 && (t("queryString <- list("), Object.keys(u).forEach((
|
|
2682
|
-
T !==
|
|
2681
|
+
const p = Object.keys(u).length;
|
|
2682
|
+
r.length === 1 ? (t(`queryString <- list(${Object.keys(u)} = "${Object.values(u).toString()}")`), o()) : r.length > 1 && (t("queryString <- list("), Object.keys(u).forEach((h, T) => {
|
|
2683
|
+
T !== p - 1 ? t(` ${h} = "${u[h].toString()}",`) : t(` ${h} = "${u[h].toString()}"`);
|
|
2683
2684
|
}), t(")"), o());
|
|
2684
|
-
const
|
|
2685
|
-
if (
|
|
2685
|
+
const d = JSON.stringify(a.text);
|
|
2686
|
+
if (d && (t(`payload <- ${d}`), o()), a.text || a.jsonObj || a.params)
|
|
2686
2687
|
switch (a.mimeType) {
|
|
2687
2688
|
case "application/x-www-form-urlencoded":
|
|
2688
2689
|
t('encode <- "form"'), o();
|
|
@@ -2697,22 +2698,22 @@ var Ie = (e, n, r) => {
|
|
|
2697
2698
|
t('encode <- "raw"'), o();
|
|
2698
2699
|
break;
|
|
2699
2700
|
}
|
|
2700
|
-
const m = ve(c, "cookie"), y = ve(c, "accept"), j = m ? `set_cookies(\`${String(m).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, b = y ? `accept("${le(y)}")` : void 0, f = `content_type("${le(a.mimeType)}")`, g = Object.entries(c).filter(([
|
|
2701
|
+
const m = ve(c, "cookie"), y = ve(c, "accept"), j = m ? `set_cookies(\`${String(m).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, b = y ? `accept("${le(y)}")` : void 0, f = `content_type("${le(a.mimeType)}")`, g = Object.entries(c).filter(([h]) => !["cookie", "accept", "content-type"].includes(h.toLowerCase())).map(([h, T]) => `'${h}' = '${We(T)}'`).join(", "), v = g ? `add_headers(${g})` : void 0;
|
|
2701
2702
|
let S = `response <- VERB("${i}", url`;
|
|
2702
|
-
|
|
2703
|
-
const C = [v, f, b, j].filter((
|
|
2703
|
+
d && (S += ", body = payload"), r.length && (S += ", query = queryString");
|
|
2704
|
+
const C = [v, f, b, j].filter((h) => !!h).join(", ");
|
|
2704
2705
|
return C && (S += `, ${C}`), (a.text || a.jsonObj || a.params) && (S += ", encode = encode"), S += ")", t(S), o(), t('content(response, "text")'), s();
|
|
2705
2706
|
}
|
|
2706
|
-
},
|
|
2707
|
+
}, ys = {
|
|
2707
2708
|
info: {
|
|
2708
2709
|
key: "r",
|
|
2709
2710
|
title: "R",
|
|
2710
2711
|
default: "httr"
|
|
2711
2712
|
},
|
|
2712
2713
|
clientsById: {
|
|
2713
|
-
httr:
|
|
2714
|
+
httr: ms
|
|
2714
2715
|
}
|
|
2715
|
-
},
|
|
2716
|
+
}, gs = {
|
|
2716
2717
|
info: {
|
|
2717
2718
|
key: "native",
|
|
2718
2719
|
title: "net::http",
|
|
@@ -2736,23 +2737,23 @@ var Ie = (e, n, r) => {
|
|
|
2736
2737
|
"UNLOCK",
|
|
2737
2738
|
"MOVE",
|
|
2738
2739
|
"TRACE"
|
|
2739
|
-
],
|
|
2740
|
-
u.includes(s) || (i(`class Net::HTTP::${
|
|
2741
|
-
const
|
|
2742
|
-
return
|
|
2740
|
+
], p = s.charAt(0) + s.substring(1).toLowerCase();
|
|
2741
|
+
u.includes(s) || (i(`class Net::HTTP::${p} < Net::HTTPRequest`), i(` METHOD = '${s.toUpperCase()}'`), i(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), i(" RESPONSE_HAS_BODY = true"), i("end"), t()), i(`url = URI("${r}")`), t(), i("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && i("http.use_ssl = true"), t(), i(`request = Net::HTTP::${p}.new(url)`);
|
|
2742
|
+
const d = Object.keys(c);
|
|
2743
|
+
return d.length && d.forEach((m) => {
|
|
2743
2744
|
i(`request["${m}"] = '${We(c[m])}'`);
|
|
2744
2745
|
}), a.text && i(`request.body = ${JSON.stringify(a.text)}`), t(), i("response = http.request(request)"), i("puts response.read_body"), o();
|
|
2745
2746
|
}
|
|
2746
|
-
},
|
|
2747
|
+
}, vs = {
|
|
2747
2748
|
info: {
|
|
2748
2749
|
key: "ruby",
|
|
2749
2750
|
title: "Ruby",
|
|
2750
2751
|
default: "native"
|
|
2751
2752
|
},
|
|
2752
2753
|
clientsById: {
|
|
2753
|
-
native:
|
|
2754
|
+
native: gs
|
|
2754
2755
|
}
|
|
2755
|
-
}, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`,
|
|
2756
|
+
}, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, xs = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), bs = {
|
|
2756
2757
|
"http1.0": "0",
|
|
2757
2758
|
"url ": "",
|
|
2758
2759
|
cookie: "b",
|
|
@@ -2762,13 +2763,13 @@ var Ie = (e, n, r) => {
|
|
|
2762
2763
|
header: "H",
|
|
2763
2764
|
insecure: "k",
|
|
2764
2765
|
request: "X"
|
|
2765
|
-
},
|
|
2766
|
+
}, js = (e) => (n) => {
|
|
2766
2767
|
if (e) {
|
|
2767
|
-
const r =
|
|
2768
|
+
const r = bs[n];
|
|
2768
2769
|
return r ? `-${r}` : "";
|
|
2769
2770
|
}
|
|
2770
2771
|
return `--${n}`;
|
|
2771
|
-
},
|
|
2772
|
+
}, $s = {
|
|
2772
2773
|
info: {
|
|
2773
2774
|
key: "curl",
|
|
2774
2775
|
title: "cURL",
|
|
@@ -2777,13 +2778,13 @@ var Ie = (e, n, r) => {
|
|
|
2777
2778
|
extname: ".sh"
|
|
2778
2779
|
},
|
|
2779
2780
|
convert: ({ fullUrl: e, method: n, httpVersion: r, headersObj: a, allHeaders: c, postData: i }, t = {}) => {
|
|
2780
|
-
const { indent: o = " ", short: s = !1, binary: u = !1, globOff:
|
|
2781
|
+
const { indent: o = " ", short: s = !1, binary: u = !1, globOff: p = !1 } = t, d = " ", { push: m, join: y } = new Q({
|
|
2781
2782
|
...typeof o == "string" ? { indent: o } : {},
|
|
2782
2783
|
join: o !== !1 ? ` \\
|
|
2783
2784
|
${o}` : " "
|
|
2784
|
-
}), j =
|
|
2785
|
+
}), j = js(s);
|
|
2785
2786
|
let b = ce(e);
|
|
2786
|
-
if (m(`curl ${j("request")} ${n}`),
|
|
2787
|
+
if (m(`curl ${j("request")} ${n}`), p && (b = unescape(b), m(j("globoff"))), m(`${j("url ")}${b}`), r === "HTTP/1.0" && m(j("http1.0")), ve(c, "accept-encoding") && m("--compressed"), i.mimeType === "multipart/form-data") {
|
|
2787
2788
|
const f = pe(a, "content-type");
|
|
2788
2789
|
if (f) {
|
|
2789
2790
|
const g = a[f];
|
|
@@ -2805,15 +2806,15 @@ ${o}` : " "
|
|
|
2805
2806
|
break;
|
|
2806
2807
|
case "application/x-www-form-urlencoded":
|
|
2807
2808
|
i.params ? i.params.forEach((g) => {
|
|
2808
|
-
const v = g.name, S = encodeURIComponent(g.name), C = S !== v,
|
|
2809
|
-
m(`${T} ${ce(`${
|
|
2809
|
+
const v = g.name, S = encodeURIComponent(g.name), C = S !== v, h = C ? S : v, T = u ? "--data-binary" : C ? "--data-urlencode" : j("data");
|
|
2810
|
+
m(`${T} ${ce(`${h}=${g.value}`)}`);
|
|
2810
2811
|
}) : m(`${u ? "--data-binary" : j("data")} ${ce(i.text)}`);
|
|
2811
2812
|
break;
|
|
2812
2813
|
default:
|
|
2813
2814
|
if (!i.text)
|
|
2814
2815
|
break;
|
|
2815
2816
|
let f = !1;
|
|
2816
|
-
if (
|
|
2817
|
+
if (ji(i.mimeType) && i.text.length > 20)
|
|
2817
2818
|
try {
|
|
2818
2819
|
const g = JSON.parse(i.text);
|
|
2819
2820
|
f = !0, i.text.indexOf("'") > 0 ? m(
|
|
@@ -2821,12 +2822,12 @@ ${o}` : " "
|
|
|
2821
2822
|
${JSON.stringify(
|
|
2822
2823
|
g,
|
|
2823
2824
|
null,
|
|
2824
|
-
|
|
2825
|
+
d
|
|
2825
2826
|
)}
|
|
2826
2827
|
EOF`
|
|
2827
2828
|
) : m(
|
|
2828
2829
|
`${u ? "--data-binary" : j("data")} '
|
|
2829
|
-
${JSON.stringify(g, null,
|
|
2830
|
+
${JSON.stringify(g, null, d)}
|
|
2830
2831
|
'`
|
|
2831
2832
|
);
|
|
2832
2833
|
} catch {
|
|
@@ -2835,7 +2836,7 @@ ${JSON.stringify(g, null, p)}
|
|
|
2835
2836
|
}
|
|
2836
2837
|
return y();
|
|
2837
2838
|
}
|
|
2838
|
-
},
|
|
2839
|
+
}, ws = {
|
|
2839
2840
|
info: {
|
|
2840
2841
|
key: "httpie",
|
|
2841
2842
|
title: "HTTPie",
|
|
@@ -2859,13 +2860,13 @@ ${JSON.stringify(g, null, p)}
|
|
|
2859
2860
|
verbose: !1,
|
|
2860
2861
|
verify: !1,
|
|
2861
2862
|
...t
|
|
2862
|
-
}, { push: s, join: u, unshift:
|
|
2863
|
+
}, { push: s, join: u, unshift: p } = new Q({
|
|
2863
2864
|
indent: o.indent,
|
|
2864
2865
|
// @ts-expect-error SEEMS LEGIT
|
|
2865
2866
|
join: o.indent !== !1 ? ` \\
|
|
2866
2867
|
${o.indent}` : " "
|
|
2867
2868
|
});
|
|
2868
|
-
let
|
|
2869
|
+
let d = !1;
|
|
2869
2870
|
const m = [];
|
|
2870
2871
|
o.headers && m.push(o.short ? "-h" : "--headers"), o.body && m.push(o.short ? "-b" : "--body"), o.verbose && m.push(o.short ? "-v" : "--verbose"), o.print && m.push(`${o.short ? "-p" : "--print"}=${o.print}`), o.verify && m.push(`--verify=${o.verify}`), o.cert && m.push(`--cert=${o.cert}`), o.pretty && m.push(`--pretty=${o.pretty}`), o.style && m.push(`--style=${o.style}`), o.timeout && m.push(`--timeout=${o.timeout}`), o.queryParams && Object.keys(r).forEach((j) => {
|
|
2871
2872
|
const b = r[j];
|
|
@@ -2876,15 +2877,15 @@ ${o.indent}` : " "
|
|
|
2876
2877
|
s(`${j}:${ce(e[j])}`);
|
|
2877
2878
|
}), n.mimeType === "application/x-www-form-urlencoded" ? n.params && n.params.length && (m.push(o.short ? "-f" : "--form"), n.params.forEach((j) => {
|
|
2878
2879
|
s(`${j.name}=${ce(j.value)}`);
|
|
2879
|
-
})) :
|
|
2880
|
+
})) : d = !0;
|
|
2880
2881
|
const y = m.length ? `${m.join(" ")} ` : "";
|
|
2881
|
-
if (i = ce(o.queryParams ? i : a),
|
|
2882
|
+
if (i = ce(o.queryParams ? i : a), p(`http ${y}${c} ${i}`), d && n.text) {
|
|
2882
2883
|
const j = ce(n.text);
|
|
2883
|
-
|
|
2884
|
+
p(`echo ${j} | `);
|
|
2884
2885
|
}
|
|
2885
2886
|
return u();
|
|
2886
2887
|
}
|
|
2887
|
-
},
|
|
2888
|
+
}, Ss = {
|
|
2888
2889
|
info: {
|
|
2889
2890
|
key: "wget",
|
|
2890
2891
|
title: "Wget",
|
|
@@ -2906,9 +2907,9 @@ ${i.indent}` : " "
|
|
|
2906
2907
|
return i.verbose ? t(`wget ${i.short ? "-v" : "--verbose"}`) : t(`wget ${i.short ? "-q" : "--quiet"}`), t(`--method ${ce(e)}`), Object.keys(r).forEach((s) => {
|
|
2907
2908
|
const u = `${s}: ${r[s]}`;
|
|
2908
2909
|
t(`--header ${ce(u)}`);
|
|
2909
|
-
}), n.text && t(`--body-data ${
|
|
2910
|
+
}), n.text && t(`--body-data ${xs(ce(n.text))}`), t(i.short ? "-O" : "--output-document"), t(`- ${ce(a)}`), o();
|
|
2910
2911
|
}
|
|
2911
|
-
},
|
|
2912
|
+
}, Os = {
|
|
2912
2913
|
info: {
|
|
2913
2914
|
key: "shell",
|
|
2914
2915
|
title: "Shell",
|
|
@@ -2916,9 +2917,9 @@ ${i.indent}` : " "
|
|
|
2916
2917
|
cli: "%s"
|
|
2917
2918
|
},
|
|
2918
2919
|
clientsById: {
|
|
2919
|
-
curl:
|
|
2920
|
-
httpie:
|
|
2921
|
-
wget:
|
|
2920
|
+
curl: $s,
|
|
2921
|
+
httpie: ws,
|
|
2922
|
+
wget: Ss
|
|
2922
2923
|
}
|
|
2923
2924
|
}, vn = (e, n) => n.repeat(e), xn = (e, n, r, a) => {
|
|
2924
2925
|
const c = vn(a, r), i = vn(a - 1, r), t = n ? `,
|
|
@@ -2953,7 +2954,7 @@ ${i}]` : `[${e.join(t)}]`;
|
|
|
2953
2954
|
default:
|
|
2954
2955
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2955
2956
|
}
|
|
2956
|
-
},
|
|
2957
|
+
}, Ts = {
|
|
2957
2958
|
info: {
|
|
2958
2959
|
key: "urlsession",
|
|
2959
2960
|
title: "URLSession",
|
|
@@ -2969,8 +2970,8 @@ ${i}]` : `[${e.join(t)}]`;
|
|
|
2969
2970
|
...i
|
|
2970
2971
|
}, { push: o, blank: s, join: u } = new Q({ indent: t.indent });
|
|
2971
2972
|
o("import Foundation"), s();
|
|
2972
|
-
const
|
|
2973
|
-
if (
|
|
2973
|
+
const p = n.text || n.jsonObj || n.params;
|
|
2974
|
+
if (p)
|
|
2974
2975
|
switch (n.mimeType) {
|
|
2975
2976
|
case "application/x-www-form-urlencoded":
|
|
2976
2977
|
if (n.params?.length) {
|
|
@@ -2988,8 +2989,8 @@ ${i}]` : `[${e.join(t)}]`;
|
|
|
2988
2989
|
o(`let postData = Data("${n.text}".utf8)`), s();
|
|
2989
2990
|
}
|
|
2990
2991
|
o(`let url = URL(string: "${r.href}")!`);
|
|
2991
|
-
const
|
|
2992
|
-
return
|
|
2992
|
+
const d = a ? Object.entries(a) : [];
|
|
2993
|
+
return d.length < 1 ? o("var request = URLRequest(url: url)") : (o("var components = URLComponents(url: url, resolvingAgainstBaseURL: true)!"), o("let queryItems: [URLQueryItem] = ["), d.forEach((m) => {
|
|
2993
2994
|
const y = m[0], j = m[1];
|
|
2994
2995
|
switch (Object.prototype.toString.call(j)) {
|
|
2995
2996
|
case "[object String]":
|
|
@@ -3001,50 +3002,50 @@ ${i}]` : `[${e.join(t)}]`;
|
|
|
3001
3002
|
});
|
|
3002
3003
|
break;
|
|
3003
3004
|
}
|
|
3004
|
-
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), s(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${c}"`), o(`request.timeoutInterval = ${t.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${st(e, t)}`),
|
|
3005
|
+
}), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), s(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${c}"`), o(`request.timeoutInterval = ${t.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${st(e, t)}`), p && o("request.httpBody = postData"), s(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), u();
|
|
3005
3006
|
}
|
|
3006
|
-
},
|
|
3007
|
+
}, Cs = {
|
|
3007
3008
|
info: {
|
|
3008
3009
|
key: "swift",
|
|
3009
3010
|
title: "Swift",
|
|
3010
3011
|
default: "urlsession"
|
|
3011
3012
|
},
|
|
3012
3013
|
clientsById: {
|
|
3013
|
-
urlsession:
|
|
3014
|
+
urlsession: Ts
|
|
3014
3015
|
}
|
|
3015
|
-
},
|
|
3016
|
-
c:
|
|
3017
|
-
clojure:
|
|
3018
|
-
csharp:
|
|
3019
|
-
go:
|
|
3020
|
-
http:
|
|
3021
|
-
java:
|
|
3022
|
-
javascript:
|
|
3023
|
-
json:
|
|
3024
|
-
kotlin:
|
|
3025
|
-
node:
|
|
3026
|
-
objc:
|
|
3027
|
-
ocaml:
|
|
3028
|
-
php:
|
|
3029
|
-
powershell:
|
|
3030
|
-
python:
|
|
3031
|
-
r:
|
|
3032
|
-
ruby:
|
|
3033
|
-
shell:
|
|
3034
|
-
swift:
|
|
3016
|
+
}, Ps = {
|
|
3017
|
+
c: bi,
|
|
3018
|
+
clojure: Si,
|
|
3019
|
+
csharp: Ni,
|
|
3020
|
+
go: qi,
|
|
3021
|
+
http: Ei,
|
|
3022
|
+
java: _i,
|
|
3023
|
+
javascript: zi,
|
|
3024
|
+
json: Wi,
|
|
3025
|
+
kotlin: Ji,
|
|
3026
|
+
node: Zi,
|
|
3027
|
+
objc: ts,
|
|
3028
|
+
ocaml: ns,
|
|
3029
|
+
php: ls,
|
|
3030
|
+
powershell: ps,
|
|
3031
|
+
python: hs,
|
|
3032
|
+
r: ys,
|
|
3033
|
+
ruby: vs,
|
|
3034
|
+
shell: Os,
|
|
3035
|
+
swift: Cs
|
|
3035
3036
|
}, Te = {}, _e = { exports: {} };
|
|
3036
3037
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
3037
|
-
var
|
|
3038
|
-
function
|
|
3038
|
+
var Ns = _e.exports, jn;
|
|
3039
|
+
function ks() {
|
|
3039
3040
|
return jn || (jn = 1, (function(e, n) {
|
|
3040
3041
|
(function(r) {
|
|
3041
3042
|
var a = n && !n.nodeType && n, c = e && !e.nodeType && e, i = typeof it == "object" && it;
|
|
3042
3043
|
(i.global === i || i.window === i || i.self === i) && (r = i);
|
|
3043
|
-
var t, o = 2147483647, s = 36, u = 1,
|
|
3044
|
+
var t, o = 2147483647, s = 36, u = 1, p = 26, d = 38, m = 700, y = 72, j = 128, b = "-", f = /^xn--/, g = /[^\x20-\x7E]/, v = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
|
|
3044
3045
|
overflow: "Overflow: input needs wider integers to process",
|
|
3045
3046
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3046
3047
|
"invalid-input": "Invalid input"
|
|
3047
|
-
}, C = s - u,
|
|
3048
|
+
}, C = s - u, h = Math.floor, T = String.fromCharCode, x;
|
|
3048
3049
|
function k(N) {
|
|
3049
3050
|
throw new RangeError(S[N]);
|
|
3050
3051
|
}
|
|
@@ -3053,7 +3054,7 @@ function qs() {
|
|
|
3053
3054
|
P[F] = q(N[F]);
|
|
3054
3055
|
return P;
|
|
3055
3056
|
}
|
|
3056
|
-
function
|
|
3057
|
+
function R(N, q) {
|
|
3057
3058
|
var F = N.split("@"), P = "";
|
|
3058
3059
|
F.length > 1 && (P = F[0] + "@", N = F[1]), N = N.replace(v, ".");
|
|
3059
3060
|
var U = N.split("."), J = A(U, q).join(".");
|
|
@@ -3078,18 +3079,18 @@ function qs() {
|
|
|
3078
3079
|
}
|
|
3079
3080
|
function G(N, q, F) {
|
|
3080
3081
|
var P = 0;
|
|
3081
|
-
for (N = F ?
|
|
3082
|
-
N =
|
|
3083
|
-
return
|
|
3082
|
+
for (N = F ? h(N / m) : N >> 1, N += h(N / q); N > C * p >> 1; P += s)
|
|
3083
|
+
N = h(N / C);
|
|
3084
|
+
return h(P + (C + 1) * N / (N + d));
|
|
3084
3085
|
}
|
|
3085
3086
|
function se(N) {
|
|
3086
3087
|
var q = [], F = N.length, P, U = 0, J = j, W = y, Y, ae, D, I, H, M, K, V, X;
|
|
3087
3088
|
for (Y = N.lastIndexOf(b), Y < 0 && (Y = 0), ae = 0; ae < Y; ++ae)
|
|
3088
3089
|
N.charCodeAt(ae) >= 128 && k("not-basic"), q.push(N.charCodeAt(ae));
|
|
3089
3090
|
for (D = Y > 0 ? Y + 1 : 0; D < F; ) {
|
|
3090
|
-
for (I = U, H = 1, M = s; D >= F && k("invalid-input"), K = B(N.charCodeAt(D++)), (K >= s || K >
|
|
3091
|
-
X = s - V, H >
|
|
3092
|
-
P = q.length + 1, W = G(U - I, P, I == 0),
|
|
3091
|
+
for (I = U, H = 1, M = s; D >= F && k("invalid-input"), K = B(N.charCodeAt(D++)), (K >= s || K > h((o - U) / H)) && k("overflow"), U += K * H, V = M <= W ? u : M >= W + p ? p : M - W, !(K < V); M += s)
|
|
3092
|
+
X = s - V, H > h(o / X) && k("overflow"), H *= X;
|
|
3093
|
+
P = q.length + 1, W = G(U - I, P, I == 0), h(U / P) > o - J && k("overflow"), J += h(U / P), U %= P, q.splice(U++, 0, J);
|
|
3093
3094
|
}
|
|
3094
3095
|
return O(q);
|
|
3095
3096
|
}
|
|
@@ -3100,25 +3101,25 @@ function qs() {
|
|
|
3100
3101
|
for (P = U = M.length, U && M.push(b); P < K; ) {
|
|
3101
3102
|
for (Y = o, W = 0; W < K; ++W)
|
|
3102
3103
|
H = N[W], H >= q && H < Y && (Y = H);
|
|
3103
|
-
for (V = P + 1, Y - q >
|
|
3104
|
+
for (V = P + 1, Y - q > h((o - F) / V) && k("overflow"), F += (Y - q) * V, q = Y, W = 0; W < K; ++W)
|
|
3104
3105
|
if (H = N[W], H < q && ++F > o && k("overflow"), H == q) {
|
|
3105
|
-
for (ae = F, D = s; I = D <= J ? u : D >= J +
|
|
3106
|
+
for (ae = F, D = s; I = D <= J ? u : D >= J + p ? p : D - J, !(ae < I); D += s)
|
|
3106
3107
|
oe = ae - I, X = s - I, M.push(
|
|
3107
3108
|
T(_(I + oe % X, 0))
|
|
3108
|
-
), ae =
|
|
3109
|
+
), ae = h(oe / X);
|
|
3109
3110
|
M.push(T(_(ae, 0))), J = G(F, V, P == U), F = 0, ++P;
|
|
3110
3111
|
}
|
|
3111
3112
|
++F, ++q;
|
|
3112
3113
|
}
|
|
3113
3114
|
return M.join("");
|
|
3114
3115
|
}
|
|
3115
|
-
function
|
|
3116
|
-
return
|
|
3116
|
+
function E(N) {
|
|
3117
|
+
return R(N, function(q) {
|
|
3117
3118
|
return f.test(q) ? se(q.slice(4).toLowerCase()) : q;
|
|
3118
3119
|
});
|
|
3119
3120
|
}
|
|
3120
3121
|
function ne(N) {
|
|
3121
|
-
return
|
|
3122
|
+
return R(N, function(q) {
|
|
3122
3123
|
return g.test(q) ? "xn--" + ee(q) : q;
|
|
3123
3124
|
});
|
|
3124
3125
|
}
|
|
@@ -3143,7 +3144,7 @@ function qs() {
|
|
|
3143
3144
|
decode: se,
|
|
3144
3145
|
encode: ee,
|
|
3145
3146
|
toASCII: ne,
|
|
3146
|
-
toUnicode:
|
|
3147
|
+
toUnicode: E
|
|
3147
3148
|
}, a && c)
|
|
3148
3149
|
if (e.exports == a)
|
|
3149
3150
|
c.exports = t;
|
|
@@ -3152,28 +3153,28 @@ function qs() {
|
|
|
3152
3153
|
t.hasOwnProperty(x) && (a[x] = t[x]);
|
|
3153
3154
|
else
|
|
3154
3155
|
r.punycode = t;
|
|
3155
|
-
})(
|
|
3156
|
+
})(Ns);
|
|
3156
3157
|
})(_e, _e.exports)), _e.exports;
|
|
3157
3158
|
}
|
|
3158
3159
|
var Nt, $n;
|
|
3159
|
-
function
|
|
3160
|
+
function Ea() {
|
|
3160
3161
|
return $n || ($n = 1, Nt = Object), Nt;
|
|
3161
3162
|
}
|
|
3162
3163
|
var kt, wn;
|
|
3163
|
-
function
|
|
3164
|
+
function qs() {
|
|
3164
3165
|
return wn || (wn = 1, kt = Error), kt;
|
|
3165
3166
|
}
|
|
3166
3167
|
var qt, Sn;
|
|
3167
3168
|
function Rs() {
|
|
3168
3169
|
return Sn || (Sn = 1, qt = EvalError), qt;
|
|
3169
3170
|
}
|
|
3170
|
-
var
|
|
3171
|
-
function
|
|
3172
|
-
return On || (On = 1,
|
|
3171
|
+
var Rt, On;
|
|
3172
|
+
function Es() {
|
|
3173
|
+
return On || (On = 1, Rt = RangeError), Rt;
|
|
3173
3174
|
}
|
|
3174
|
-
var
|
|
3175
|
-
function
|
|
3176
|
-
return Tn || (Tn = 1,
|
|
3175
|
+
var Et, Tn;
|
|
3176
|
+
function As() {
|
|
3177
|
+
return Tn || (Tn = 1, Et = ReferenceError), Et;
|
|
3177
3178
|
}
|
|
3178
3179
|
var At, Cn;
|
|
3179
3180
|
function Aa() {
|
|
@@ -3184,57 +3185,57 @@ function Je() {
|
|
|
3184
3185
|
return Pn || (Pn = 1, It = TypeError), It;
|
|
3185
3186
|
}
|
|
3186
3187
|
var Ut, Nn;
|
|
3187
|
-
function
|
|
3188
|
+
function Is() {
|
|
3188
3189
|
return Nn || (Nn = 1, Ut = URIError), Ut;
|
|
3189
3190
|
}
|
|
3190
3191
|
var Lt, kn;
|
|
3191
|
-
function
|
|
3192
|
+
function Us() {
|
|
3192
3193
|
return kn || (kn = 1, Lt = Math.abs), Lt;
|
|
3193
3194
|
}
|
|
3194
3195
|
var _t, qn;
|
|
3195
|
-
function
|
|
3196
|
+
function Ls() {
|
|
3196
3197
|
return qn || (qn = 1, _t = Math.floor), _t;
|
|
3197
3198
|
}
|
|
3198
|
-
var Ft,
|
|
3199
|
-
function
|
|
3200
|
-
return
|
|
3199
|
+
var Ft, Rn;
|
|
3200
|
+
function _s() {
|
|
3201
|
+
return Rn || (Rn = 1, Ft = Math.max), Ft;
|
|
3201
3202
|
}
|
|
3202
|
-
var Ht,
|
|
3203
|
-
function
|
|
3204
|
-
return
|
|
3203
|
+
var Ht, En;
|
|
3204
|
+
function Fs() {
|
|
3205
|
+
return En || (En = 1, Ht = Math.min), Ht;
|
|
3205
3206
|
}
|
|
3206
3207
|
var Mt, An;
|
|
3207
|
-
function
|
|
3208
|
+
function Hs() {
|
|
3208
3209
|
return An || (An = 1, Mt = Math.pow), Mt;
|
|
3209
3210
|
}
|
|
3210
3211
|
var Bt, In;
|
|
3211
|
-
function
|
|
3212
|
+
function Ms() {
|
|
3212
3213
|
return In || (In = 1, Bt = Math.round), Bt;
|
|
3213
3214
|
}
|
|
3214
3215
|
var zt, Un;
|
|
3215
|
-
function
|
|
3216
|
+
function Bs() {
|
|
3216
3217
|
return Un || (Un = 1, zt = Number.isNaN || function(n) {
|
|
3217
3218
|
return n !== n;
|
|
3218
3219
|
}), zt;
|
|
3219
3220
|
}
|
|
3220
3221
|
var Gt, Ln;
|
|
3221
|
-
function
|
|
3222
|
+
function zs() {
|
|
3222
3223
|
if (Ln) return Gt;
|
|
3223
3224
|
Ln = 1;
|
|
3224
|
-
var e = /* @__PURE__ */
|
|
3225
|
+
var e = /* @__PURE__ */ Bs();
|
|
3225
3226
|
return Gt = function(r) {
|
|
3226
3227
|
return e(r) || r === 0 ? r : r < 0 ? -1 : 1;
|
|
3227
3228
|
}, Gt;
|
|
3228
3229
|
}
|
|
3229
3230
|
var Wt, _n;
|
|
3230
|
-
function
|
|
3231
|
+
function Gs() {
|
|
3231
3232
|
return _n || (_n = 1, Wt = Object.getOwnPropertyDescriptor), Wt;
|
|
3232
3233
|
}
|
|
3233
3234
|
var Vt, Fn;
|
|
3234
3235
|
function dt() {
|
|
3235
3236
|
if (Fn) return Vt;
|
|
3236
3237
|
Fn = 1;
|
|
3237
|
-
var e = /* @__PURE__ */
|
|
3238
|
+
var e = /* @__PURE__ */ Gs();
|
|
3238
3239
|
if (e)
|
|
3239
3240
|
try {
|
|
3240
3241
|
e([], "length");
|
|
@@ -3257,7 +3258,7 @@ function ht() {
|
|
|
3257
3258
|
return Jt = e, Jt;
|
|
3258
3259
|
}
|
|
3259
3260
|
var Dt, Mn;
|
|
3260
|
-
function
|
|
3261
|
+
function Ws() {
|
|
3261
3262
|
return Mn || (Mn = 1, Dt = function() {
|
|
3262
3263
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3263
3264
|
return !1;
|
|
@@ -3287,10 +3288,10 @@ function Vs() {
|
|
|
3287
3288
|
}), Dt;
|
|
3288
3289
|
}
|
|
3289
3290
|
var Qt, Bn;
|
|
3290
|
-
function
|
|
3291
|
+
function Vs() {
|
|
3291
3292
|
if (Bn) return Qt;
|
|
3292
3293
|
Bn = 1;
|
|
3293
|
-
var e = typeof Symbol < "u" && Symbol, n =
|
|
3294
|
+
var e = typeof Symbol < "u" && Symbol, n = Ws();
|
|
3294
3295
|
return Qt = function() {
|
|
3295
3296
|
return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
|
|
3296
3297
|
}, Qt;
|
|
@@ -3303,59 +3304,59 @@ var Yt, Gn;
|
|
|
3303
3304
|
function Ua() {
|
|
3304
3305
|
if (Gn) return Yt;
|
|
3305
3306
|
Gn = 1;
|
|
3306
|
-
var e = /* @__PURE__ */
|
|
3307
|
+
var e = /* @__PURE__ */ Ea();
|
|
3307
3308
|
return Yt = e.getPrototypeOf || null, Yt;
|
|
3308
3309
|
}
|
|
3309
3310
|
var Xt, Wn;
|
|
3310
|
-
function
|
|
3311
|
+
function Js() {
|
|
3311
3312
|
if (Wn) return Xt;
|
|
3312
3313
|
Wn = 1;
|
|
3313
3314
|
var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, r = Math.max, a = "[object Function]", c = function(s, u) {
|
|
3314
|
-
for (var
|
|
3315
|
-
|
|
3315
|
+
for (var p = [], d = 0; d < s.length; d += 1)
|
|
3316
|
+
p[d] = s[d];
|
|
3316
3317
|
for (var m = 0; m < u.length; m += 1)
|
|
3317
|
-
|
|
3318
|
-
return
|
|
3318
|
+
p[m + s.length] = u[m];
|
|
3319
|
+
return p;
|
|
3319
3320
|
}, i = function(s, u) {
|
|
3320
|
-
for (var
|
|
3321
|
-
|
|
3322
|
-
return
|
|
3321
|
+
for (var p = [], d = u, m = 0; d < s.length; d += 1, m += 1)
|
|
3322
|
+
p[m] = s[d];
|
|
3323
|
+
return p;
|
|
3323
3324
|
}, t = function(o, s) {
|
|
3324
|
-
for (var u = "",
|
|
3325
|
-
u += o[
|
|
3325
|
+
for (var u = "", p = 0; p < o.length; p += 1)
|
|
3326
|
+
u += o[p], p + 1 < o.length && (u += s);
|
|
3326
3327
|
return u;
|
|
3327
3328
|
};
|
|
3328
3329
|
return Xt = function(s) {
|
|
3329
3330
|
var u = this;
|
|
3330
3331
|
if (typeof u != "function" || n.apply(u) !== a)
|
|
3331
3332
|
throw new TypeError(e + u);
|
|
3332
|
-
for (var
|
|
3333
|
-
if (this instanceof
|
|
3333
|
+
for (var p = i(arguments, 1), d, m = function() {
|
|
3334
|
+
if (this instanceof d) {
|
|
3334
3335
|
var g = u.apply(
|
|
3335
3336
|
this,
|
|
3336
|
-
c(
|
|
3337
|
+
c(p, arguments)
|
|
3337
3338
|
);
|
|
3338
3339
|
return Object(g) === g ? g : this;
|
|
3339
3340
|
}
|
|
3340
3341
|
return u.apply(
|
|
3341
3342
|
s,
|
|
3342
|
-
c(
|
|
3343
|
+
c(p, arguments)
|
|
3343
3344
|
);
|
|
3344
|
-
}, y = r(0, u.length -
|
|
3345
|
+
}, y = r(0, u.length - p.length), j = [], b = 0; b < y; b++)
|
|
3345
3346
|
j[b] = "$" + b;
|
|
3346
|
-
if (
|
|
3347
|
+
if (d = Function("binder", "return function (" + t(j, ",") + "){ return binder.apply(this,arguments); }")(m), u.prototype) {
|
|
3347
3348
|
var f = function() {
|
|
3348
3349
|
};
|
|
3349
|
-
f.prototype = u.prototype,
|
|
3350
|
+
f.prototype = u.prototype, d.prototype = new f(), f.prototype = null;
|
|
3350
3351
|
}
|
|
3351
|
-
return
|
|
3352
|
+
return d;
|
|
3352
3353
|
}, Xt;
|
|
3353
3354
|
}
|
|
3354
3355
|
var Zt, Vn;
|
|
3355
3356
|
function De() {
|
|
3356
3357
|
if (Vn) return Zt;
|
|
3357
3358
|
Vn = 1;
|
|
3358
|
-
var e =
|
|
3359
|
+
var e = Js();
|
|
3359
3360
|
return Zt = Function.prototype.bind || e, Zt;
|
|
3360
3361
|
}
|
|
3361
3362
|
var er, Jn;
|
|
@@ -3367,14 +3368,14 @@ function Hr() {
|
|
|
3367
3368
|
return Dn || (Dn = 1, tr = Function.prototype.apply), tr;
|
|
3368
3369
|
}
|
|
3369
3370
|
var rr, Qn;
|
|
3370
|
-
function
|
|
3371
|
+
function Ds() {
|
|
3371
3372
|
return Qn || (Qn = 1, rr = typeof Reflect < "u" && Reflect && Reflect.apply), rr;
|
|
3372
3373
|
}
|
|
3373
3374
|
var nr, Kn;
|
|
3374
3375
|
function La() {
|
|
3375
3376
|
if (Kn) return nr;
|
|
3376
3377
|
Kn = 1;
|
|
3377
|
-
var e = De(), n = Hr(), r = Fr(), a =
|
|
3378
|
+
var e = De(), n = Hr(), r = Fr(), a = Ds();
|
|
3378
3379
|
return nr = a || e.call(r, n), nr;
|
|
3379
3380
|
}
|
|
3380
3381
|
var ar, Yn;
|
|
@@ -3389,7 +3390,7 @@ function _a() {
|
|
|
3389
3390
|
}, ar;
|
|
3390
3391
|
}
|
|
3391
3392
|
var or, Xn;
|
|
3392
|
-
function
|
|
3393
|
+
function Qs() {
|
|
3393
3394
|
if (Xn) return or;
|
|
3394
3395
|
Xn = 1;
|
|
3395
3396
|
var e = _a(), n = /* @__PURE__ */ dt(), r;
|
|
@@ -3413,10 +3414,10 @@ function Ks() {
|
|
|
3413
3414
|
) : !1, or;
|
|
3414
3415
|
}
|
|
3415
3416
|
var ir, Zn;
|
|
3416
|
-
function
|
|
3417
|
+
function Ks() {
|
|
3417
3418
|
if (Zn) return ir;
|
|
3418
3419
|
Zn = 1;
|
|
3419
|
-
var e = Ia(), n = Ua(), r = /* @__PURE__ */
|
|
3420
|
+
var e = Ia(), n = Ua(), r = /* @__PURE__ */ Qs();
|
|
3420
3421
|
return ir = e ? function(c) {
|
|
3421
3422
|
return e(c);
|
|
3422
3423
|
} : n ? function(c) {
|
|
@@ -3428,7 +3429,7 @@ function Ys() {
|
|
|
3428
3429
|
} : null, ir;
|
|
3429
3430
|
}
|
|
3430
3431
|
var sr, ea;
|
|
3431
|
-
function
|
|
3432
|
+
function Ys() {
|
|
3432
3433
|
if (ea) return sr;
|
|
3433
3434
|
ea = 1;
|
|
3434
3435
|
var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, r = De();
|
|
@@ -3438,14 +3439,14 @@ var lr, ta;
|
|
|
3438
3439
|
function Mr() {
|
|
3439
3440
|
if (ta) return lr;
|
|
3440
3441
|
ta = 1;
|
|
3441
|
-
var e, n = /* @__PURE__ */
|
|
3442
|
+
var e, n = /* @__PURE__ */ Ea(), r = /* @__PURE__ */ qs(), a = /* @__PURE__ */ Rs(), c = /* @__PURE__ */ Es(), i = /* @__PURE__ */ As(), t = /* @__PURE__ */ Aa(), o = /* @__PURE__ */ Je(), s = /* @__PURE__ */ Is(), u = /* @__PURE__ */ Us(), p = /* @__PURE__ */ Ls(), d = /* @__PURE__ */ _s(), m = /* @__PURE__ */ Fs(), y = /* @__PURE__ */ Hs(), j = /* @__PURE__ */ Ms(), b = /* @__PURE__ */ zs(), f = Function, g = function(D) {
|
|
3442
3443
|
try {
|
|
3443
3444
|
return f('"use strict"; return (' + D + ").constructor;")();
|
|
3444
3445
|
} catch {
|
|
3445
3446
|
}
|
|
3446
3447
|
}, v = /* @__PURE__ */ dt(), S = /* @__PURE__ */ ht(), C = function() {
|
|
3447
3448
|
throw new o();
|
|
3448
|
-
},
|
|
3449
|
+
}, h = v ? (function() {
|
|
3449
3450
|
try {
|
|
3450
3451
|
return arguments.callee, C;
|
|
3451
3452
|
} catch {
|
|
@@ -3455,7 +3456,7 @@ function Mr() {
|
|
|
3455
3456
|
return C;
|
|
3456
3457
|
}
|
|
3457
3458
|
}
|
|
3458
|
-
})() : C, T =
|
|
3459
|
+
})() : C, T = Vs()(), x = Ks(), k = Ua(), A = Ia(), R = Hr(), L = Fr(), O = {}, B = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), _ = {
|
|
3459
3460
|
__proto__: null,
|
|
3460
3461
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
3461
3462
|
"%Array%": Array,
|
|
@@ -3515,7 +3516,7 @@ function Mr() {
|
|
|
3515
3516
|
"%StringIteratorPrototype%": T && x ? x(""[Symbol.iterator]()) : e,
|
|
3516
3517
|
"%Symbol%": T ? Symbol : e,
|
|
3517
3518
|
"%SyntaxError%": t,
|
|
3518
|
-
"%ThrowTypeError%":
|
|
3519
|
+
"%ThrowTypeError%": h,
|
|
3519
3520
|
"%TypedArray%": B,
|
|
3520
3521
|
"%TypeError%": o,
|
|
3521
3522
|
"%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
|
|
@@ -3527,12 +3528,12 @@ function Mr() {
|
|
|
3527
3528
|
"%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
|
|
3528
3529
|
"%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
|
|
3529
3530
|
"%Function.prototype.call%": L,
|
|
3530
|
-
"%Function.prototype.apply%":
|
|
3531
|
+
"%Function.prototype.apply%": R,
|
|
3531
3532
|
"%Object.defineProperty%": S,
|
|
3532
3533
|
"%Object.getPrototypeOf%": k,
|
|
3533
3534
|
"%Math.abs%": u,
|
|
3534
|
-
"%Math.floor%":
|
|
3535
|
-
"%Math.max%":
|
|
3535
|
+
"%Math.floor%": p,
|
|
3536
|
+
"%Math.max%": d,
|
|
3536
3537
|
"%Math.min%": m,
|
|
3537
3538
|
"%Math.pow%": y,
|
|
3538
3539
|
"%Math.round%": j,
|
|
@@ -3615,7 +3616,7 @@ function Mr() {
|
|
|
3615
3616
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3616
3617
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3617
3618
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3618
|
-
},
|
|
3619
|
+
}, E = De(), ne = /* @__PURE__ */ Ys(), N = E.call(L, Array.prototype.concat), q = E.call(R, Array.prototype.splice), F = E.call(L, String.prototype.replace), P = E.call(L, String.prototype.slice), U = E.call(L, RegExp.prototype.exec), J = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, W = /\\(\\)?/g, Y = function(I) {
|
|
3619
3620
|
var H = P(I, 0, 1), M = P(I, -1);
|
|
3620
3621
|
if (H === "%" && M !== "%")
|
|
3621
3622
|
throw new t("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -3672,7 +3673,7 @@ function Mr() {
|
|
|
3672
3673
|
}, lr;
|
|
3673
3674
|
}
|
|
3674
3675
|
var cr = { exports: {} }, ur, ra;
|
|
3675
|
-
function
|
|
3676
|
+
function Xs() {
|
|
3676
3677
|
if (ra) return ur;
|
|
3677
3678
|
ra = 1;
|
|
3678
3679
|
var e = /* @__PURE__ */ ht(), n = /* @__PURE__ */ Aa(), r = /* @__PURE__ */ Je(), a = /* @__PURE__ */ dt();
|
|
@@ -3689,22 +3690,22 @@ function Zs() {
|
|
|
3689
3690
|
throw new r("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3690
3691
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3691
3692
|
throw new r("`loose`, if provided, must be a boolean");
|
|
3692
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null,
|
|
3693
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, p = arguments.length > 5 ? arguments[5] : null, d = arguments.length > 6 ? arguments[6] : !1, m = !!a && a(i, t);
|
|
3693
3694
|
if (e)
|
|
3694
3695
|
e(i, t, {
|
|
3695
|
-
configurable:
|
|
3696
|
+
configurable: p === null && m ? m.configurable : !p,
|
|
3696
3697
|
enumerable: s === null && m ? m.enumerable : !s,
|
|
3697
3698
|
value: o,
|
|
3698
3699
|
writable: u === null && m ? m.writable : !u
|
|
3699
3700
|
});
|
|
3700
|
-
else if (
|
|
3701
|
+
else if (d || !s && !u && !p)
|
|
3701
3702
|
i[t] = o;
|
|
3702
3703
|
else
|
|
3703
3704
|
throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3704
3705
|
}, ur;
|
|
3705
3706
|
}
|
|
3706
3707
|
var pr, na;
|
|
3707
|
-
function
|
|
3708
|
+
function Zs() {
|
|
3708
3709
|
if (na) return pr;
|
|
3709
3710
|
na = 1;
|
|
3710
3711
|
var e = /* @__PURE__ */ ht(), n = function() {
|
|
@@ -3721,21 +3722,21 @@ function el() {
|
|
|
3721
3722
|
}, pr = n, pr;
|
|
3722
3723
|
}
|
|
3723
3724
|
var fr, aa;
|
|
3724
|
-
function
|
|
3725
|
+
function el() {
|
|
3725
3726
|
if (aa) return fr;
|
|
3726
3727
|
aa = 1;
|
|
3727
|
-
var e = /* @__PURE__ */ Mr(), n = /* @__PURE__ */
|
|
3728
|
+
var e = /* @__PURE__ */ Mr(), n = /* @__PURE__ */ Xs(), r = /* @__PURE__ */ Zs()(), a = /* @__PURE__ */ dt(), c = /* @__PURE__ */ Je(), i = e("%Math.floor%");
|
|
3728
3729
|
return fr = function(o, s) {
|
|
3729
3730
|
if (typeof o != "function")
|
|
3730
3731
|
throw new c("`fn` is not a function");
|
|
3731
3732
|
if (typeof s != "number" || s < 0 || s > 4294967295 || i(s) !== s)
|
|
3732
3733
|
throw new c("`length` must be a positive 32-bit integer");
|
|
3733
|
-
var u = arguments.length > 2 && !!arguments[2],
|
|
3734
|
+
var u = arguments.length > 2 && !!arguments[2], p = !0, d = !0;
|
|
3734
3735
|
if ("length" in o && a) {
|
|
3735
3736
|
var m = a(o, "length");
|
|
3736
|
-
m && !m.configurable && (
|
|
3737
|
+
m && !m.configurable && (p = !1), m && !m.writable && (d = !1);
|
|
3737
3738
|
}
|
|
3738
|
-
return (
|
|
3739
|
+
return (p || d || !u) && (r ? n(
|
|
3739
3740
|
/** @type {Parameters<define>[0]} */
|
|
3740
3741
|
o,
|
|
3741
3742
|
"length",
|
|
@@ -3751,7 +3752,7 @@ function tl() {
|
|
|
3751
3752
|
}, fr;
|
|
3752
3753
|
}
|
|
3753
3754
|
var dr, oa;
|
|
3754
|
-
function
|
|
3755
|
+
function tl() {
|
|
3755
3756
|
if (oa) return dr;
|
|
3756
3757
|
oa = 1;
|
|
3757
3758
|
var e = De(), n = Hr(), r = La();
|
|
@@ -3760,9 +3761,9 @@ function rl() {
|
|
|
3760
3761
|
}, dr;
|
|
3761
3762
|
}
|
|
3762
3763
|
var ia;
|
|
3763
|
-
function
|
|
3764
|
+
function rl() {
|
|
3764
3765
|
return ia || (ia = 1, (function(e) {
|
|
3765
|
-
var n = /* @__PURE__ */
|
|
3766
|
+
var n = /* @__PURE__ */ el(), r = /* @__PURE__ */ ht(), a = _a(), c = tl();
|
|
3766
3767
|
e.exports = function(t) {
|
|
3767
3768
|
var o = a(arguments), s = t.length - (arguments.length - 1);
|
|
3768
3769
|
return n(
|
|
@@ -3774,28 +3775,28 @@ function nl() {
|
|
|
3774
3775
|
})(cr)), cr.exports;
|
|
3775
3776
|
}
|
|
3776
3777
|
var hr, sa;
|
|
3777
|
-
function
|
|
3778
|
+
function nl() {
|
|
3778
3779
|
if (sa) return hr;
|
|
3779
3780
|
sa = 1;
|
|
3780
|
-
var e = /* @__PURE__ */ Mr(), n =
|
|
3781
|
+
var e = /* @__PURE__ */ Mr(), n = rl(), r = n(e("String.prototype.indexOf"));
|
|
3781
3782
|
return hr = function(c, i) {
|
|
3782
3783
|
var t = e(c, !!i);
|
|
3783
3784
|
return typeof t == "function" && r(c, ".prototype.") > -1 ? n(t) : t;
|
|
3784
3785
|
}, hr;
|
|
3785
3786
|
}
|
|
3786
3787
|
var mr, la;
|
|
3787
|
-
function
|
|
3788
|
+
function al() {
|
|
3788
3789
|
if (la) return mr;
|
|
3789
3790
|
la = 1;
|
|
3790
|
-
var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, r = e && n && typeof n.get == "function" ? n.get : null, a = e && Map.prototype.forEach, c = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, t = c && i && typeof i.get == "function" ? i.get : null, o = c && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, u = s ? WeakMap.prototype.has : null,
|
|
3791
|
+
var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, r = e && n && typeof n.get == "function" ? n.get : null, a = e && Map.prototype.forEach, c = typeof Set == "function" && Set.prototype, i = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, t = c && i && typeof i.get == "function" ? i.get : null, o = c && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, u = s ? WeakMap.prototype.has : null, p = typeof WeakSet == "function" && WeakSet.prototype, d = p ? WeakSet.prototype.has : null, m = typeof WeakRef == "function" && WeakRef.prototype, y = m ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, b = Object.prototype.toString, f = Function.prototype.toString, g = String.prototype.match, v = String.prototype.slice, S = String.prototype.replace, C = String.prototype.toUpperCase, h = String.prototype.toLowerCase, T = RegExp.prototype.test, x = Array.prototype.concat, k = Array.prototype.join, A = Array.prototype.slice, R = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, O = Object.getOwnPropertySymbols, B = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, _ = typeof Symbol == "function" && typeof Symbol.iterator == "object", G = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === _ || !0) ? Symbol.toStringTag : null, se = Object.prototype.propertyIsEnumerable, ee = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function($) {
|
|
3791
3792
|
return $.__proto__;
|
|
3792
3793
|
} : null);
|
|
3793
|
-
function
|
|
3794
|
+
function E($, w) {
|
|
3794
3795
|
if ($ === 1 / 0 || $ === -1 / 0 || $ !== $ || $ && $ > -1e3 && $ < 1e3 || T.call(/e/, w))
|
|
3795
3796
|
return w;
|
|
3796
3797
|
var Z = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
3797
3798
|
if (typeof $ == "number") {
|
|
3798
|
-
var te = $ < 0 ? -
|
|
3799
|
+
var te = $ < 0 ? -R(-$) : R($);
|
|
3799
3800
|
if (te !== $) {
|
|
3800
3801
|
var ie = String(te), z = v.call(w, ie.length + 1);
|
|
3801
3802
|
return S.call(ie, Z, "$&_") + "." + S.call(S.call(z, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
@@ -3803,7 +3804,7 @@ function ol() {
|
|
|
3803
3804
|
}
|
|
3804
3805
|
return S.call(w, Z, "$&_");
|
|
3805
3806
|
}
|
|
3806
|
-
var ne =
|
|
3807
|
+
var ne = Wo, N = ne.custom, q = H(N) ? N : null;
|
|
3807
3808
|
mr = function $(w, Z, te, ie) {
|
|
3808
3809
|
var z = Z || {};
|
|
3809
3810
|
if (V(z, "quoteStyle") && z.quoteStyle !== "single" && z.quoteStyle !== "double")
|
|
@@ -3830,28 +3831,28 @@ function ol() {
|
|
|
3830
3831
|
if (w === 0)
|
|
3831
3832
|
return 1 / 0 / w > 0 ? "0" : "-0";
|
|
3832
3833
|
var de = String(w);
|
|
3833
|
-
return Oe ?
|
|
3834
|
+
return Oe ? E(w, de) : de;
|
|
3834
3835
|
}
|
|
3835
3836
|
if (typeof w == "bigint") {
|
|
3836
3837
|
var je = String(w) + "n";
|
|
3837
|
-
return Oe ?
|
|
3838
|
+
return Oe ? E(w, je) : je;
|
|
3838
3839
|
}
|
|
3839
3840
|
var gt = typeof z.depth > "u" ? 5 : z.depth;
|
|
3840
3841
|
if (typeof te > "u" && (te = 0), te >= gt && gt > 0 && typeof w == "object")
|
|
3841
3842
|
return U(w) ? "[Array]" : "[Object]";
|
|
3842
|
-
var
|
|
3843
|
+
var Re = Ga(z, te);
|
|
3843
3844
|
if (typeof ie > "u")
|
|
3844
3845
|
ie = [];
|
|
3845
3846
|
else if (he(ie, w) >= 0)
|
|
3846
3847
|
return "[Circular]";
|
|
3847
|
-
function ye(
|
|
3848
|
+
function ye(Ee, Ye, Va) {
|
|
3848
3849
|
if (Ye && (ie = A.call(ie), ie.push(Ye)), Va) {
|
|
3849
3850
|
var Yr = {
|
|
3850
3851
|
depth: z.depth
|
|
3851
3852
|
};
|
|
3852
|
-
return V(z, "quoteStyle") && (Yr.quoteStyle = z.quoteStyle), $(
|
|
3853
|
+
return V(z, "quoteStyle") && (Yr.quoteStyle = z.quoteStyle), $(Ee, Yr, te + 1, ie);
|
|
3853
3854
|
}
|
|
3854
|
-
return $(
|
|
3855
|
+
return $(Ee, z, te + 1, ie);
|
|
3855
3856
|
}
|
|
3856
3857
|
if (typeof w == "function" && !W(w)) {
|
|
3857
3858
|
var Gr = oe(w), Wr = Qe(w, ye);
|
|
@@ -3862,15 +3863,15 @@ function ol() {
|
|
|
3862
3863
|
return typeof w == "object" && !_ ? Ue(Vr) : Vr;
|
|
3863
3864
|
}
|
|
3864
3865
|
if (qe(w)) {
|
|
3865
|
-
for (var Le = "<" +
|
|
3866
|
+
for (var Le = "<" + h.call(String(w.nodeName)), vt = w.attributes || [], Ke = 0; Ke < vt.length; Ke++)
|
|
3866
3867
|
Le += " " + vt[Ke].name + "=" + F(P(vt[Ke].value), "double", z);
|
|
3867
|
-
return Le += ">", w.childNodes && w.childNodes.length && (Le += "..."), Le += "</" +
|
|
3868
|
+
return Le += ">", w.childNodes && w.childNodes.length && (Le += "..."), Le += "</" + h.call(String(w.nodeName)) + ">", Le;
|
|
3868
3869
|
}
|
|
3869
3870
|
if (U(w)) {
|
|
3870
3871
|
if (w.length === 0)
|
|
3871
3872
|
return "[]";
|
|
3872
3873
|
var xt = Qe(w, ye);
|
|
3873
|
-
return
|
|
3874
|
+
return Re && !za(xt) ? "[" + yt(xt, Re) + "]" : "[ " + k.call(xt, ", ") + " ]";
|
|
3874
3875
|
}
|
|
3875
3876
|
if (Y(w)) {
|
|
3876
3877
|
var bt = Qe(w, ye);
|
|
@@ -3884,15 +3885,15 @@ function ol() {
|
|
|
3884
3885
|
}
|
|
3885
3886
|
if ($e(w)) {
|
|
3886
3887
|
var Jr = [];
|
|
3887
|
-
return a && a.call(w, function(
|
|
3888
|
-
Jr.push(ye(Ye, w, !0) + " => " + ye(
|
|
3889
|
-
}), zr("Map", r.call(w), Jr,
|
|
3888
|
+
return a && a.call(w, function(Ee, Ye) {
|
|
3889
|
+
Jr.push(ye(Ye, w, !0) + " => " + ye(Ee, w));
|
|
3890
|
+
}), zr("Map", r.call(w), Jr, Re);
|
|
3890
3891
|
}
|
|
3891
3892
|
if (me(w)) {
|
|
3892
3893
|
var Dr = [];
|
|
3893
|
-
return o && o.call(w, function(
|
|
3894
|
-
Dr.push(ye(
|
|
3895
|
-
}), zr("Set", t.call(w), Dr,
|
|
3894
|
+
return o && o.call(w, function(Ee) {
|
|
3895
|
+
Dr.push(ye(Ee, w));
|
|
3896
|
+
}), zr("Set", t.call(w), Dr, Re);
|
|
3896
3897
|
}
|
|
3897
3898
|
if (Ne(w))
|
|
3898
3899
|
return mt("WeakMap");
|
|
@@ -3914,7 +3915,7 @@ function ol() {
|
|
|
3914
3915
|
return "{ [object globalThis] }";
|
|
3915
3916
|
if (!J(w) && !W(w)) {
|
|
3916
3917
|
var jt = Qe(w, ye), Qr = ee ? ee(w) === Object.prototype : w instanceof Object || w.constructor === Object, $t = w instanceof Object ? "" : "null prototype", Kr = !Qr && G && Object(w) === w && G in w ? v.call(X(w), 8, -1) : $t ? "Object" : "", Wa = Qr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", wt = Wa + (Kr || $t ? "[" + k.call(x.call([], Kr || [], $t || []), ": ") + "] " : "");
|
|
3917
|
-
return jt.length === 0 ? wt + "{}" :
|
|
3918
|
+
return jt.length === 0 ? wt + "{}" : Re ? wt + "{" + yt(jt, Re) + "}" : wt + "{ " + k.call(jt, ", ") + " }";
|
|
3918
3919
|
}
|
|
3919
3920
|
return String(w);
|
|
3920
3921
|
};
|
|
@@ -4012,7 +4013,7 @@ function ol() {
|
|
|
4012
4013
|
try {
|
|
4013
4014
|
u.call($, u);
|
|
4014
4015
|
try {
|
|
4015
|
-
|
|
4016
|
+
d.call($, d);
|
|
4016
4017
|
} catch {
|
|
4017
4018
|
return !0;
|
|
4018
4019
|
}
|
|
@@ -4046,10 +4047,10 @@ function ol() {
|
|
|
4046
4047
|
return !1;
|
|
4047
4048
|
}
|
|
4048
4049
|
function ke($) {
|
|
4049
|
-
if (!
|
|
4050
|
+
if (!d || !$ || typeof $ != "object")
|
|
4050
4051
|
return !1;
|
|
4051
4052
|
try {
|
|
4052
|
-
|
|
4053
|
+
d.call($, d);
|
|
4053
4054
|
try {
|
|
4054
4055
|
u.call($, u);
|
|
4055
4056
|
} catch {
|
|
@@ -4142,10 +4143,10 @@ function ol() {
|
|
|
4142
4143
|
return mr;
|
|
4143
4144
|
}
|
|
4144
4145
|
var yr, ca;
|
|
4145
|
-
function
|
|
4146
|
+
function ol() {
|
|
4146
4147
|
if (ca) return yr;
|
|
4147
4148
|
ca = 1;
|
|
4148
|
-
var e = /* @__PURE__ */ Mr(), n =
|
|
4149
|
+
var e = /* @__PURE__ */ Mr(), n = nl(), r = /* @__PURE__ */ al(), a = /* @__PURE__ */ Je(), c = e("%WeakMap%", !0), i = e("%Map%", !0), t = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), s = n("WeakMap.prototype.has", !0), u = n("Map.prototype.get", !0), p = n("Map.prototype.set", !0), d = n("Map.prototype.has", !0), m = function(f, g) {
|
|
4149
4150
|
for (var v = f, S; (S = v.next) !== null; v = S)
|
|
4150
4151
|
if (S.key === g)
|
|
4151
4152
|
return v.next = S.next, S.next = /** @type {NonNullable<typeof list.next>} */
|
|
@@ -4167,33 +4168,33 @@ function il() {
|
|
|
4167
4168
|
};
|
|
4168
4169
|
return yr = function() {
|
|
4169
4170
|
var g, v, S, C = {
|
|
4170
|
-
assert: function(
|
|
4171
|
-
if (!C.has(
|
|
4172
|
-
throw new a("Side channel does not contain " + r(
|
|
4171
|
+
assert: function(h) {
|
|
4172
|
+
if (!C.has(h))
|
|
4173
|
+
throw new a("Side channel does not contain " + r(h));
|
|
4173
4174
|
},
|
|
4174
|
-
get: function(
|
|
4175
|
-
if (c &&
|
|
4175
|
+
get: function(h) {
|
|
4176
|
+
if (c && h && (typeof h == "object" || typeof h == "function")) {
|
|
4176
4177
|
if (g)
|
|
4177
|
-
return t(g,
|
|
4178
|
+
return t(g, h);
|
|
4178
4179
|
} else if (i) {
|
|
4179
4180
|
if (v)
|
|
4180
|
-
return u(v,
|
|
4181
|
+
return u(v, h);
|
|
4181
4182
|
} else if (S)
|
|
4182
|
-
return y(S,
|
|
4183
|
+
return y(S, h);
|
|
4183
4184
|
},
|
|
4184
|
-
has: function(
|
|
4185
|
-
if (c &&
|
|
4185
|
+
has: function(h) {
|
|
4186
|
+
if (c && h && (typeof h == "object" || typeof h == "function")) {
|
|
4186
4187
|
if (g)
|
|
4187
|
-
return s(g,
|
|
4188
|
+
return s(g, h);
|
|
4188
4189
|
} else if (i) {
|
|
4189
4190
|
if (v)
|
|
4190
|
-
return
|
|
4191
|
+
return d(v, h);
|
|
4191
4192
|
} else if (S)
|
|
4192
|
-
return b(S,
|
|
4193
|
+
return b(S, h);
|
|
4193
4194
|
return !1;
|
|
4194
4195
|
},
|
|
4195
|
-
set: function(
|
|
4196
|
-
c &&
|
|
4196
|
+
set: function(h, T) {
|
|
4197
|
+
c && h && (typeof h == "object" || typeof h == "function") ? (g || (g = new c()), o(g, h, T)) : i ? (v || (v = new i()), p(v, h, T)) : (S || (S = { key: {}, next: null }), j(S, h, T));
|
|
4197
4198
|
}
|
|
4198
4199
|
};
|
|
4199
4200
|
return C;
|
|
@@ -4233,8 +4234,8 @@ function Fa() {
|
|
|
4233
4234
|
for (; g.length > 1; ) {
|
|
4234
4235
|
var v = g.pop(), S = v.obj[v.prop];
|
|
4235
4236
|
if (r(S)) {
|
|
4236
|
-
for (var C = [],
|
|
4237
|
-
typeof S[
|
|
4237
|
+
for (var C = [], h = 0; h < S.length; ++h)
|
|
4238
|
+
typeof S[h] < "u" && C.push(S[h]);
|
|
4238
4239
|
v.obj[v.prop] = C;
|
|
4239
4240
|
}
|
|
4240
4241
|
}
|
|
@@ -4257,15 +4258,15 @@ function Fa() {
|
|
|
4257
4258
|
if (!g || typeof g != "object")
|
|
4258
4259
|
return [g].concat(v);
|
|
4259
4260
|
var C = g;
|
|
4260
|
-
return r(g) && !r(v) && (C = i(g, S)), r(g) && r(v) ? (v.forEach(function(
|
|
4261
|
+
return r(g) && !r(v) && (C = i(g, S)), r(g) && r(v) ? (v.forEach(function(h, T) {
|
|
4261
4262
|
if (n.call(g, T)) {
|
|
4262
4263
|
var x = g[T];
|
|
4263
|
-
x && typeof x == "object" &&
|
|
4264
|
+
x && typeof x == "object" && h && typeof h == "object" ? g[T] = f(x, h, S) : g.push(h);
|
|
4264
4265
|
} else
|
|
4265
|
-
g[T] =
|
|
4266
|
-
}), g) : Object.keys(v).reduce(function(
|
|
4266
|
+
g[T] = h;
|
|
4267
|
+
}), g) : Object.keys(v).reduce(function(h, T) {
|
|
4267
4268
|
var x = v[T];
|
|
4268
|
-
return n.call(
|
|
4269
|
+
return n.call(h, T) ? h[T] = f(h[T], x, S) : h[T] = x, h;
|
|
4269
4270
|
}, C);
|
|
4270
4271
|
}, o = function(g, v) {
|
|
4271
4272
|
return Object.keys(v).reduce(function(S, C) {
|
|
@@ -4280,7 +4281,7 @@ function Fa() {
|
|
|
4280
4281
|
} catch {
|
|
4281
4282
|
return S;
|
|
4282
4283
|
}
|
|
4283
|
-
}, u = 1024,
|
|
4284
|
+
}, u = 1024, p = function(g, v, S, C, h) {
|
|
4284
4285
|
if (g.length === 0)
|
|
4285
4286
|
return g;
|
|
4286
4287
|
var T = g;
|
|
@@ -4289,34 +4290,34 @@ function Fa() {
|
|
|
4289
4290
|
return "%26%23" + parseInt(B.slice(2), 16) + "%3B";
|
|
4290
4291
|
});
|
|
4291
4292
|
for (var x = "", k = 0; k < T.length; k += u) {
|
|
4292
|
-
for (var A = T.length >= u ? T.slice(k, k + u) : T,
|
|
4293
|
+
for (var A = T.length >= u ? T.slice(k, k + u) : T, R = [], L = 0; L < A.length; ++L) {
|
|
4293
4294
|
var O = A.charCodeAt(L);
|
|
4294
|
-
if (O === 45 || O === 46 || O === 95 || O === 126 || O >= 48 && O <= 57 || O >= 65 && O <= 90 || O >= 97 && O <= 122 ||
|
|
4295
|
-
|
|
4295
|
+
if (O === 45 || O === 46 || O === 95 || O === 126 || O >= 48 && O <= 57 || O >= 65 && O <= 90 || O >= 97 && O <= 122 || h === e.RFC1738 && (O === 40 || O === 41)) {
|
|
4296
|
+
R[R.length] = A.charAt(L);
|
|
4296
4297
|
continue;
|
|
4297
4298
|
}
|
|
4298
4299
|
if (O < 128) {
|
|
4299
|
-
|
|
4300
|
+
R[R.length] = a[O];
|
|
4300
4301
|
continue;
|
|
4301
4302
|
}
|
|
4302
4303
|
if (O < 2048) {
|
|
4303
|
-
|
|
4304
|
+
R[R.length] = a[192 | O >> 6] + a[128 | O & 63];
|
|
4304
4305
|
continue;
|
|
4305
4306
|
}
|
|
4306
4307
|
if (O < 55296 || O >= 57344) {
|
|
4307
|
-
|
|
4308
|
+
R[R.length] = a[224 | O >> 12] + a[128 | O >> 6 & 63] + a[128 | O & 63];
|
|
4308
4309
|
continue;
|
|
4309
4310
|
}
|
|
4310
|
-
L += 1, O = 65536 + ((O & 1023) << 10 | A.charCodeAt(L) & 1023),
|
|
4311
|
+
L += 1, O = 65536 + ((O & 1023) << 10 | A.charCodeAt(L) & 1023), R[R.length] = a[240 | O >> 18] + a[128 | O >> 12 & 63] + a[128 | O >> 6 & 63] + a[128 | O & 63];
|
|
4311
4312
|
}
|
|
4312
|
-
x +=
|
|
4313
|
+
x += R.join("");
|
|
4313
4314
|
}
|
|
4314
4315
|
return x;
|
|
4315
|
-
},
|
|
4316
|
+
}, d = function(g) {
|
|
4316
4317
|
for (var v = [{ obj: { o: g }, prop: "o" }], S = [], C = 0; C < v.length; ++C)
|
|
4317
|
-
for (var
|
|
4318
|
-
var A = x[k],
|
|
4319
|
-
typeof
|
|
4318
|
+
for (var h = v[C], T = h.obj[h.prop], x = Object.keys(T), k = 0; k < x.length; ++k) {
|
|
4319
|
+
var A = x[k], R = T[A];
|
|
4320
|
+
typeof R == "object" && R !== null && S.indexOf(R) === -1 && (v.push({ obj: T, prop: A }), S.push(R));
|
|
4320
4321
|
}
|
|
4321
4322
|
return c(v), g;
|
|
4322
4323
|
}, m = function(g) {
|
|
@@ -4337,9 +4338,9 @@ function Fa() {
|
|
|
4337
4338
|
arrayToObject: i,
|
|
4338
4339
|
assign: o,
|
|
4339
4340
|
combine: j,
|
|
4340
|
-
compact:
|
|
4341
|
+
compact: d,
|
|
4341
4342
|
decode: s,
|
|
4342
|
-
encode:
|
|
4343
|
+
encode: p,
|
|
4343
4344
|
isBuffer: y,
|
|
4344
4345
|
isRegExp: m,
|
|
4345
4346
|
maybeMap: b,
|
|
@@ -4347,10 +4348,10 @@ function Fa() {
|
|
|
4347
4348
|
}, vr;
|
|
4348
4349
|
}
|
|
4349
4350
|
var xr, fa;
|
|
4350
|
-
function
|
|
4351
|
+
function il() {
|
|
4351
4352
|
if (fa) return xr;
|
|
4352
4353
|
fa = 1;
|
|
4353
|
-
var e =
|
|
4354
|
+
var e = ol(), n = /* @__PURE__ */ Fa(), r = /* @__PURE__ */ Br(), a = Object.prototype.hasOwnProperty, c = {
|
|
4354
4355
|
brackets: function(f) {
|
|
4355
4356
|
return f + "[]";
|
|
4356
4357
|
},
|
|
@@ -4363,7 +4364,7 @@ function sl() {
|
|
|
4363
4364
|
}
|
|
4364
4365
|
}, i = Array.isArray, t = Array.prototype.push, o = function(b, f) {
|
|
4365
4366
|
t.apply(b, i(f) ? f : [f]);
|
|
4366
|
-
}, s = Date.prototype.toISOString, u = r.default,
|
|
4367
|
+
}, s = Date.prototype.toISOString, u = r.default, p = {
|
|
4367
4368
|
addQueryPrefix: !1,
|
|
4368
4369
|
allowDots: !1,
|
|
4369
4370
|
allowEmptyArrays: !1,
|
|
@@ -4384,10 +4385,10 @@ function sl() {
|
|
|
4384
4385
|
},
|
|
4385
4386
|
skipNulls: !1,
|
|
4386
4387
|
strictNullHandling: !1
|
|
4387
|
-
},
|
|
4388
|
+
}, d = function(f) {
|
|
4388
4389
|
return typeof f == "string" || typeof f == "number" || typeof f == "boolean" || typeof f == "symbol" || typeof f == "bigint";
|
|
4389
|
-
}, m = {}, y = function b(f, g, v, S, C,
|
|
4390
|
-
for (var
|
|
4390
|
+
}, m = {}, y = function b(f, g, v, S, C, h, T, x, k, A, R, L, O, B, _, G, se, ee) {
|
|
4391
|
+
for (var E = f, ne = ee, N = 0, q = !1; (ne = ne.get(m)) !== void 0 && !q; ) {
|
|
4391
4392
|
var F = ne.get(f);
|
|
4392
4393
|
if (N += 1, typeof F < "u") {
|
|
4393
4394
|
if (F === N)
|
|
@@ -4396,39 +4397,39 @@ function sl() {
|
|
|
4396
4397
|
}
|
|
4397
4398
|
typeof ne.get(m) > "u" && (N = 0);
|
|
4398
4399
|
}
|
|
4399
|
-
if (typeof A == "function" ?
|
|
4400
|
+
if (typeof A == "function" ? E = A(g, E) : E instanceof Date ? E = O(E) : v === "comma" && i(E) && (E = n.maybeMap(E, function(X) {
|
|
4400
4401
|
return X instanceof Date ? O(X) : X;
|
|
4401
|
-
})),
|
|
4402
|
-
if (
|
|
4403
|
-
return k && !G ? k(g,
|
|
4404
|
-
|
|
4402
|
+
})), E === null) {
|
|
4403
|
+
if (h)
|
|
4404
|
+
return k && !G ? k(g, p.encoder, se, "key", B) : g;
|
|
4405
|
+
E = "";
|
|
4405
4406
|
}
|
|
4406
|
-
if (
|
|
4407
|
+
if (d(E) || n.isBuffer(E)) {
|
|
4407
4408
|
if (k) {
|
|
4408
|
-
var P = G ? g : k(g,
|
|
4409
|
-
return [_(P) + "=" + _(k(
|
|
4409
|
+
var P = G ? g : k(g, p.encoder, se, "key", B);
|
|
4410
|
+
return [_(P) + "=" + _(k(E, p.encoder, se, "value", B))];
|
|
4410
4411
|
}
|
|
4411
|
-
return [_(g) + "=" + _(String(
|
|
4412
|
+
return [_(g) + "=" + _(String(E))];
|
|
4412
4413
|
}
|
|
4413
4414
|
var U = [];
|
|
4414
|
-
if (typeof
|
|
4415
|
+
if (typeof E > "u")
|
|
4415
4416
|
return U;
|
|
4416
4417
|
var J;
|
|
4417
|
-
if (v === "comma" && i(
|
|
4418
|
-
G && k && (
|
|
4418
|
+
if (v === "comma" && i(E))
|
|
4419
|
+
G && k && (E = n.maybeMap(E, k)), J = [{ value: E.length > 0 ? E.join(",") || null : void 0 }];
|
|
4419
4420
|
else if (i(A))
|
|
4420
4421
|
J = A;
|
|
4421
4422
|
else {
|
|
4422
|
-
var W = Object.keys(
|
|
4423
|
-
J =
|
|
4423
|
+
var W = Object.keys(E);
|
|
4424
|
+
J = R ? W.sort(R) : W;
|
|
4424
4425
|
}
|
|
4425
|
-
var Y = x ? g.replace(/\./g, "%2E") : g, ae = S && i(
|
|
4426
|
-
if (C && i(
|
|
4426
|
+
var Y = x ? g.replace(/\./g, "%2E") : g, ae = S && i(E) && E.length === 1 ? Y + "[]" : Y;
|
|
4427
|
+
if (C && i(E) && E.length === 0)
|
|
4427
4428
|
return ae + "[]";
|
|
4428
4429
|
for (var D = 0; D < J.length; ++D) {
|
|
4429
|
-
var I = J[D], H = typeof I == "object" && typeof I.value < "u" ? I.value :
|
|
4430
|
+
var I = J[D], H = typeof I == "object" && typeof I.value < "u" ? I.value : E[I];
|
|
4430
4431
|
if (!(T && H === null)) {
|
|
4431
|
-
var M = L && x ? I.replace(/\./g, "%2E") : I, K = i(
|
|
4432
|
+
var M = L && x ? I.replace(/\./g, "%2E") : I, K = i(E) ? typeof v == "function" ? v(ae, M) : ae : ae + (L ? "." + M : "[" + M + "]");
|
|
4432
4433
|
ee.set(f, N);
|
|
4433
4434
|
var V = e();
|
|
4434
4435
|
V.set(m, ee), o(U, b(
|
|
@@ -4437,12 +4438,12 @@ function sl() {
|
|
|
4437
4438
|
v,
|
|
4438
4439
|
S,
|
|
4439
4440
|
C,
|
|
4440
|
-
|
|
4441
|
+
h,
|
|
4441
4442
|
T,
|
|
4442
4443
|
x,
|
|
4443
|
-
v === "comma" && G && i(
|
|
4444
|
+
v === "comma" && G && i(E) ? null : k,
|
|
4444
4445
|
A,
|
|
4445
|
-
|
|
4446
|
+
R,
|
|
4446
4447
|
L,
|
|
4447
4448
|
O,
|
|
4448
4449
|
B,
|
|
@@ -4456,14 +4457,14 @@ function sl() {
|
|
|
4456
4457
|
return U;
|
|
4457
4458
|
}, j = function(f) {
|
|
4458
4459
|
if (!f)
|
|
4459
|
-
return
|
|
4460
|
+
return p;
|
|
4460
4461
|
if (typeof f.allowEmptyArrays < "u" && typeof f.allowEmptyArrays != "boolean")
|
|
4461
4462
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4462
4463
|
if (typeof f.encodeDotInKeys < "u" && typeof f.encodeDotInKeys != "boolean")
|
|
4463
4464
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
4464
4465
|
if (f.encoder !== null && typeof f.encoder < "u" && typeof f.encoder != "function")
|
|
4465
4466
|
throw new TypeError("Encoder has to be a function.");
|
|
4466
|
-
var g = f.charset ||
|
|
4467
|
+
var g = f.charset || p.charset;
|
|
4467
4468
|
if (typeof f.charset < "u" && f.charset !== "utf-8" && f.charset !== "iso-8859-1")
|
|
4468
4469
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4469
4470
|
var v = r.default;
|
|
@@ -4472,47 +4473,47 @@ function sl() {
|
|
|
4472
4473
|
throw new TypeError("Unknown format option provided.");
|
|
4473
4474
|
v = f.format;
|
|
4474
4475
|
}
|
|
4475
|
-
var S = r.formatters[v], C =
|
|
4476
|
+
var S = r.formatters[v], C = p.filter;
|
|
4476
4477
|
(typeof f.filter == "function" || i(f.filter)) && (C = f.filter);
|
|
4477
|
-
var
|
|
4478
|
-
if (f.arrayFormat in c ?
|
|
4478
|
+
var h;
|
|
4479
|
+
if (f.arrayFormat in c ? h = f.arrayFormat : "indices" in f ? h = f.indices ? "indices" : "repeat" : h = p.arrayFormat, "commaRoundTrip" in f && typeof f.commaRoundTrip != "boolean")
|
|
4479
4480
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4480
|
-
var T = typeof f.allowDots > "u" ? f.encodeDotInKeys === !0 ? !0 :
|
|
4481
|
+
var T = typeof f.allowDots > "u" ? f.encodeDotInKeys === !0 ? !0 : p.allowDots : !!f.allowDots;
|
|
4481
4482
|
return {
|
|
4482
|
-
addQueryPrefix: typeof f.addQueryPrefix == "boolean" ? f.addQueryPrefix :
|
|
4483
|
+
addQueryPrefix: typeof f.addQueryPrefix == "boolean" ? f.addQueryPrefix : p.addQueryPrefix,
|
|
4483
4484
|
allowDots: T,
|
|
4484
|
-
allowEmptyArrays: typeof f.allowEmptyArrays == "boolean" ? !!f.allowEmptyArrays :
|
|
4485
|
-
arrayFormat:
|
|
4485
|
+
allowEmptyArrays: typeof f.allowEmptyArrays == "boolean" ? !!f.allowEmptyArrays : p.allowEmptyArrays,
|
|
4486
|
+
arrayFormat: h,
|
|
4486
4487
|
charset: g,
|
|
4487
|
-
charsetSentinel: typeof f.charsetSentinel == "boolean" ? f.charsetSentinel :
|
|
4488
|
+
charsetSentinel: typeof f.charsetSentinel == "boolean" ? f.charsetSentinel : p.charsetSentinel,
|
|
4488
4489
|
commaRoundTrip: f.commaRoundTrip,
|
|
4489
|
-
delimiter: typeof f.delimiter > "u" ?
|
|
4490
|
-
encode: typeof f.encode == "boolean" ? f.encode :
|
|
4491
|
-
encodeDotInKeys: typeof f.encodeDotInKeys == "boolean" ? f.encodeDotInKeys :
|
|
4492
|
-
encoder: typeof f.encoder == "function" ? f.encoder :
|
|
4493
|
-
encodeValuesOnly: typeof f.encodeValuesOnly == "boolean" ? f.encodeValuesOnly :
|
|
4490
|
+
delimiter: typeof f.delimiter > "u" ? p.delimiter : f.delimiter,
|
|
4491
|
+
encode: typeof f.encode == "boolean" ? f.encode : p.encode,
|
|
4492
|
+
encodeDotInKeys: typeof f.encodeDotInKeys == "boolean" ? f.encodeDotInKeys : p.encodeDotInKeys,
|
|
4493
|
+
encoder: typeof f.encoder == "function" ? f.encoder : p.encoder,
|
|
4494
|
+
encodeValuesOnly: typeof f.encodeValuesOnly == "boolean" ? f.encodeValuesOnly : p.encodeValuesOnly,
|
|
4494
4495
|
filter: C,
|
|
4495
4496
|
format: v,
|
|
4496
4497
|
formatter: S,
|
|
4497
|
-
serializeDate: typeof f.serializeDate == "function" ? f.serializeDate :
|
|
4498
|
-
skipNulls: typeof f.skipNulls == "boolean" ? f.skipNulls :
|
|
4498
|
+
serializeDate: typeof f.serializeDate == "function" ? f.serializeDate : p.serializeDate,
|
|
4499
|
+
skipNulls: typeof f.skipNulls == "boolean" ? f.skipNulls : p.skipNulls,
|
|
4499
4500
|
sort: typeof f.sort == "function" ? f.sort : null,
|
|
4500
|
-
strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling :
|
|
4501
|
+
strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling : p.strictNullHandling
|
|
4501
4502
|
};
|
|
4502
4503
|
};
|
|
4503
4504
|
return xr = function(b, f) {
|
|
4504
4505
|
var g = b, v = j(f), S, C;
|
|
4505
4506
|
typeof v.filter == "function" ? (C = v.filter, g = C("", g)) : i(v.filter) && (C = v.filter, S = C);
|
|
4506
|
-
var
|
|
4507
|
+
var h = [];
|
|
4507
4508
|
if (typeof g != "object" || g === null)
|
|
4508
4509
|
return "";
|
|
4509
4510
|
var T = c[v.arrayFormat], x = T === "comma" && v.commaRoundTrip;
|
|
4510
4511
|
S || (S = Object.keys(g)), v.sort && S.sort(v.sort);
|
|
4511
4512
|
for (var k = e(), A = 0; A < S.length; ++A) {
|
|
4512
|
-
var
|
|
4513
|
-
v.skipNulls && g[
|
|
4514
|
-
g[
|
|
4515
|
-
|
|
4513
|
+
var R = S[A];
|
|
4514
|
+
v.skipNulls && g[R] === null || o(h, y(
|
|
4515
|
+
g[R],
|
|
4516
|
+
R,
|
|
4516
4517
|
T,
|
|
4517
4518
|
x,
|
|
4518
4519
|
v.allowEmptyArrays,
|
|
@@ -4531,12 +4532,12 @@ function sl() {
|
|
|
4531
4532
|
k
|
|
4532
4533
|
));
|
|
4533
4534
|
}
|
|
4534
|
-
var L =
|
|
4535
|
+
var L = h.join(v.delimiter), O = v.addQueryPrefix === !0 ? "?" : "";
|
|
4535
4536
|
return v.charsetSentinel && (v.charset === "iso-8859-1" ? O += "utf8=%26%2310003%3B&" : O += "utf8=%E2%9C%93&"), L.length > 0 ? O + L : "";
|
|
4536
4537
|
}, xr;
|
|
4537
4538
|
}
|
|
4538
4539
|
var br, da;
|
|
4539
|
-
function
|
|
4540
|
+
function sl() {
|
|
4540
4541
|
if (da) return br;
|
|
4541
4542
|
da = 1;
|
|
4542
4543
|
var e = /* @__PURE__ */ Fa(), n = Object.prototype.hasOwnProperty, r = Array.isArray, a = {
|
|
@@ -4569,21 +4570,21 @@ function ll() {
|
|
|
4569
4570
|
}, t = "utf8=%26%2310003%3B", o = "utf8=%E2%9C%93", s = function(y, j) {
|
|
4570
4571
|
var b = { __proto__: null }, f = j.ignoreQueryPrefix ? y.replace(/^\?/, "") : y;
|
|
4571
4572
|
f = f.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
4572
|
-
var g = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, v = f.split(j.delimiter, g), S = -1, C,
|
|
4573
|
+
var g = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, v = f.split(j.delimiter, g), S = -1, C, h = j.charset;
|
|
4573
4574
|
if (j.charsetSentinel)
|
|
4574
4575
|
for (C = 0; C < v.length; ++C)
|
|
4575
|
-
v[C].indexOf("utf8=") === 0 && (v[C] === o ?
|
|
4576
|
+
v[C].indexOf("utf8=") === 0 && (v[C] === o ? h = "utf-8" : v[C] === t && (h = "iso-8859-1"), S = C, C = v.length);
|
|
4576
4577
|
for (C = 0; C < v.length; ++C)
|
|
4577
4578
|
if (C !== S) {
|
|
4578
|
-
var T = v[C], x = T.indexOf("]="), k = x === -1 ? T.indexOf("=") : x + 1, A,
|
|
4579
|
-
k === -1 ? (A = j.decoder(T, a.decoder,
|
|
4579
|
+
var T = v[C], x = T.indexOf("]="), k = x === -1 ? T.indexOf("=") : x + 1, A, R;
|
|
4580
|
+
k === -1 ? (A = j.decoder(T, a.decoder, h, "key"), R = j.strictNullHandling ? null : "") : (A = j.decoder(T.slice(0, k), a.decoder, h, "key"), R = e.maybeMap(
|
|
4580
4581
|
i(T.slice(k + 1), j),
|
|
4581
4582
|
function(O) {
|
|
4582
|
-
return j.decoder(O, a.decoder,
|
|
4583
|
+
return j.decoder(O, a.decoder, h, "value");
|
|
4583
4584
|
}
|
|
4584
|
-
)),
|
|
4585
|
+
)), R && j.interpretNumericEntities && h === "iso-8859-1" && (R = c(R)), T.indexOf("[]=") > -1 && (R = r(R) ? [R] : R);
|
|
4585
4586
|
var L = n.call(b, A);
|
|
4586
|
-
L && j.duplicates === "combine" ? b[A] = e.combine(b[A],
|
|
4587
|
+
L && j.duplicates === "combine" ? b[A] = e.combine(b[A], R) : (!L || j.duplicates === "last") && (b[A] = R);
|
|
4587
4588
|
}
|
|
4588
4589
|
return b;
|
|
4589
4590
|
}, u = function(m, y, j, b) {
|
|
@@ -4593,19 +4594,19 @@ function ll() {
|
|
|
4593
4594
|
v = j.allowEmptyArrays && (f === "" || j.strictNullHandling && f === null) ? [] : [].concat(f);
|
|
4594
4595
|
else {
|
|
4595
4596
|
v = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4596
|
-
var C = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S,
|
|
4597
|
-
!j.parseArrays &&
|
|
4597
|
+
var C = S.charAt(0) === "[" && S.charAt(S.length - 1) === "]" ? S.slice(1, -1) : S, h = j.decodeDotInKeys ? C.replace(/%2E/g, ".") : C, T = parseInt(h, 10);
|
|
4598
|
+
!j.parseArrays && h === "" ? v = { 0: f } : !isNaN(T) && S !== h && String(T) === h && T >= 0 && j.parseArrays && T <= j.arrayLimit ? (v = [], v[T] = f) : h !== "__proto__" && (v[h] = f);
|
|
4598
4599
|
}
|
|
4599
4600
|
f = v;
|
|
4600
4601
|
}
|
|
4601
4602
|
return f;
|
|
4602
|
-
},
|
|
4603
|
+
}, p = function(y, j, b, f) {
|
|
4603
4604
|
if (y) {
|
|
4604
|
-
var g = b.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, C = b.depth > 0 && v.exec(g),
|
|
4605
|
-
if (
|
|
4606
|
-
if (!b.plainObjects && n.call(Object.prototype,
|
|
4605
|
+
var g = b.allowDots ? y.replace(/\.([^.[]+)/g, "[$1]") : y, v = /(\[[^[\]]*])/, S = /(\[[^[\]]*])/g, C = b.depth > 0 && v.exec(g), h = C ? g.slice(0, C.index) : g, T = [];
|
|
4606
|
+
if (h) {
|
|
4607
|
+
if (!b.plainObjects && n.call(Object.prototype, h) && !b.allowPrototypes)
|
|
4607
4608
|
return;
|
|
4608
|
-
T.push(
|
|
4609
|
+
T.push(h);
|
|
4609
4610
|
}
|
|
4610
4611
|
for (var x = 0; b.depth > 0 && (C = S.exec(g)) !== null && x < b.depth; ) {
|
|
4611
4612
|
if (x += 1, !b.plainObjects && n.call(Object.prototype, C[1].slice(1, -1)) && !b.allowPrototypes)
|
|
@@ -4619,7 +4620,7 @@ function ll() {
|
|
|
4619
4620
|
}
|
|
4620
4621
|
return u(T, j, b, f);
|
|
4621
4622
|
}
|
|
4622
|
-
},
|
|
4623
|
+
}, d = function(y) {
|
|
4623
4624
|
if (!y)
|
|
4624
4625
|
return a;
|
|
4625
4626
|
if (typeof y.allowEmptyArrays < "u" && typeof y.allowEmptyArrays != "boolean")
|
|
@@ -4659,11 +4660,11 @@ function ll() {
|
|
|
4659
4660
|
};
|
|
4660
4661
|
};
|
|
4661
4662
|
return br = function(m, y) {
|
|
4662
|
-
var j =
|
|
4663
|
+
var j = d(y);
|
|
4663
4664
|
if (m === "" || m === null || typeof m > "u")
|
|
4664
4665
|
return j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
4665
4666
|
for (var b = typeof m == "string" ? s(m, j) : m, f = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, g = Object.keys(b), v = 0; v < g.length; ++v) {
|
|
4666
|
-
var S = g[v], C =
|
|
4667
|
+
var S = g[v], C = p(S, b[S], j, typeof m == "string");
|
|
4667
4668
|
f = e.merge(f, C, j);
|
|
4668
4669
|
}
|
|
4669
4670
|
return j.allowSparse === !0 ? f : e.compact(f);
|
|
@@ -4673,7 +4674,7 @@ var jr, ha;
|
|
|
4673
4674
|
function Ha() {
|
|
4674
4675
|
if (ha) return jr;
|
|
4675
4676
|
ha = 1;
|
|
4676
|
-
var e = /* @__PURE__ */
|
|
4677
|
+
var e = /* @__PURE__ */ il(), n = /* @__PURE__ */ sl(), r = /* @__PURE__ */ Br();
|
|
4677
4678
|
return jr = {
|
|
4678
4679
|
formats: r,
|
|
4679
4680
|
parse: n,
|
|
@@ -4681,10 +4682,10 @@ function Ha() {
|
|
|
4681
4682
|
}, jr;
|
|
4682
4683
|
}
|
|
4683
4684
|
var ma;
|
|
4684
|
-
function
|
|
4685
|
+
function ll() {
|
|
4685
4686
|
if (ma) return Te;
|
|
4686
4687
|
ma = 1;
|
|
4687
|
-
var e =
|
|
4688
|
+
var e = ks();
|
|
4688
4689
|
function n() {
|
|
4689
4690
|
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;
|
|
4690
4691
|
}
|
|
@@ -4715,7 +4716,7 @@ function cl() {
|
|
|
4715
4716
|
"/",
|
|
4716
4717
|
"?",
|
|
4717
4718
|
"#"
|
|
4718
|
-
],
|
|
4719
|
+
], p = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, m = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = {
|
|
4719
4720
|
javascript: !0,
|
|
4720
4721
|
"javascript:": !0
|
|
4721
4722
|
}, j = {
|
|
@@ -4733,19 +4734,19 @@ function cl() {
|
|
|
4733
4734
|
"gopher:": !0,
|
|
4734
4735
|
"file:": !0
|
|
4735
4736
|
}, f = /* @__PURE__ */ Ha();
|
|
4736
|
-
function g(
|
|
4737
|
-
if (
|
|
4738
|
-
return
|
|
4737
|
+
function g(h, T, x) {
|
|
4738
|
+
if (h && typeof h == "object" && h instanceof n)
|
|
4739
|
+
return h;
|
|
4739
4740
|
var k = new n();
|
|
4740
|
-
return k.parse(
|
|
4741
|
+
return k.parse(h, T, x), k;
|
|
4741
4742
|
}
|
|
4742
|
-
n.prototype.parse = function(
|
|
4743
|
-
if (typeof
|
|
4744
|
-
throw new TypeError("Parameter 'url' must be a string, not " + typeof
|
|
4745
|
-
var k =
|
|
4746
|
-
|
|
4747
|
-
var O =
|
|
4748
|
-
if (O = O.trim(), !x &&
|
|
4743
|
+
n.prototype.parse = function(h, T, x) {
|
|
4744
|
+
if (typeof h != "string")
|
|
4745
|
+
throw new TypeError("Parameter 'url' must be a string, not " + typeof h);
|
|
4746
|
+
var k = h.indexOf("?"), A = k !== -1 && k < h.indexOf("#") ? "?" : "#", R = h.split(A), L = /\\/g;
|
|
4747
|
+
R[0] = R[0].replace(L, "/"), h = R.join(A);
|
|
4748
|
+
var O = h;
|
|
4749
|
+
if (O = O.trim(), !x && h.split("#").length === 1) {
|
|
4749
4750
|
var B = c.exec(O);
|
|
4750
4751
|
if (B)
|
|
4751
4752
|
return this.path = O, this.href = O, this.pathname = B[1], B[2] ? (this.search = B[2], T ? this.query = f.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : T && (this.search = "", this.query = {}), this;
|
|
@@ -4761,38 +4762,38 @@ function cl() {
|
|
|
4761
4762
|
se && !(_ && j[_]) && (O = O.substr(2), this.slashes = !0);
|
|
4762
4763
|
}
|
|
4763
4764
|
if (!j[_] && (se || _ && !b[_])) {
|
|
4764
|
-
for (var ee = -1,
|
|
4765
|
-
var ne = O.indexOf(u[
|
|
4765
|
+
for (var ee = -1, E = 0; E < u.length; E++) {
|
|
4766
|
+
var ne = O.indexOf(u[E]);
|
|
4766
4767
|
ne !== -1 && (ee === -1 || ne < ee) && (ee = ne);
|
|
4767
4768
|
}
|
|
4768
4769
|
var N, q;
|
|
4769
4770
|
ee === -1 ? q = O.lastIndexOf("@") : q = O.lastIndexOf("@", ee), q !== -1 && (N = O.slice(0, q), O = O.slice(q + 1), this.auth = decodeURIComponent(N)), ee = -1;
|
|
4770
|
-
for (var
|
|
4771
|
-
var ne = O.indexOf(s[
|
|
4771
|
+
for (var E = 0; E < s.length; E++) {
|
|
4772
|
+
var ne = O.indexOf(s[E]);
|
|
4772
4773
|
ne !== -1 && (ee === -1 || ne < ee) && (ee = ne);
|
|
4773
4774
|
}
|
|
4774
4775
|
ee === -1 && (ee = O.length), this.host = O.slice(0, ee), O = O.slice(ee), this.parseHost(), this.hostname = this.hostname || "";
|
|
4775
4776
|
var F = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
4776
4777
|
if (!F)
|
|
4777
|
-
for (var P = this.hostname.split(/\./),
|
|
4778
|
-
var J = P[
|
|
4779
|
-
if (J && !J.match(
|
|
4778
|
+
for (var P = this.hostname.split(/\./), E = 0, U = P.length; E < U; E++) {
|
|
4779
|
+
var J = P[E];
|
|
4780
|
+
if (J && !J.match(d)) {
|
|
4780
4781
|
for (var W = "", Y = 0, ae = J.length; Y < ae; Y++)
|
|
4781
4782
|
J.charCodeAt(Y) > 127 ? W += "x" : W += J[Y];
|
|
4782
|
-
if (!W.match(
|
|
4783
|
-
var D = P.slice(0,
|
|
4783
|
+
if (!W.match(d)) {
|
|
4784
|
+
var D = P.slice(0, E), I = P.slice(E + 1), H = J.match(m);
|
|
4784
4785
|
H && (D.push(H[1]), I.unshift(H[2])), I.length && (O = "/" + I.join(".") + O), this.hostname = D.join(".");
|
|
4785
4786
|
break;
|
|
4786
4787
|
}
|
|
4787
4788
|
}
|
|
4788
4789
|
}
|
|
4789
|
-
this.hostname.length >
|
|
4790
|
+
this.hostname.length > p ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), F || (this.hostname = e.toASCII(this.hostname));
|
|
4790
4791
|
var M = this.port ? ":" + this.port : "", K = this.hostname || "";
|
|
4791
4792
|
this.host = K + M, this.href += this.host, F && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), O[0] !== "/" && (O = "/" + O));
|
|
4792
4793
|
}
|
|
4793
4794
|
if (!y[G])
|
|
4794
|
-
for (var
|
|
4795
|
-
var V = o[
|
|
4795
|
+
for (var E = 0, U = o.length; E < U; E++) {
|
|
4796
|
+
var V = o[E];
|
|
4796
4797
|
if (O.indexOf(V) !== -1) {
|
|
4797
4798
|
var X = encodeURIComponent(V);
|
|
4798
4799
|
X === V && (X = escape(V)), O = O.split(V).join(X);
|
|
@@ -4807,85 +4808,85 @@ function cl() {
|
|
|
4807
4808
|
}
|
|
4808
4809
|
return this.href = this.format(), this;
|
|
4809
4810
|
};
|
|
4810
|
-
function v(
|
|
4811
|
-
return typeof
|
|
4811
|
+
function v(h) {
|
|
4812
|
+
return typeof h == "string" && (h = g(h)), h instanceof n ? h.format() : n.prototype.format.call(h);
|
|
4812
4813
|
}
|
|
4813
4814
|
n.prototype.format = function() {
|
|
4814
|
-
var
|
|
4815
|
-
|
|
4816
|
-
var T = this.protocol || "", x = this.pathname || "", k = this.hash || "", A = !1,
|
|
4817
|
-
this.host ? A =
|
|
4815
|
+
var h = this.auth || "";
|
|
4816
|
+
h && (h = encodeURIComponent(h), h = h.replace(/%3A/i, ":"), h += "@");
|
|
4817
|
+
var T = this.protocol || "", x = this.pathname || "", k = this.hash || "", A = !1, R = "";
|
|
4818
|
+
this.host ? A = h + this.host : this.hostname && (A = h + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (A += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (R = f.stringify(this.query, {
|
|
4818
4819
|
arrayFormat: "repeat",
|
|
4819
4820
|
addQueryPrefix: !1
|
|
4820
4821
|
}));
|
|
4821
|
-
var L = this.search ||
|
|
4822
|
+
var L = this.search || R && "?" + R || "";
|
|
4822
4823
|
return T && T.substr(-1) !== ":" && (T += ":"), this.slashes || (!T || b[T]) && A !== !1 ? (A = "//" + (A || ""), x && x.charAt(0) !== "/" && (x = "/" + x)) : A || (A = ""), k && k.charAt(0) !== "#" && (k = "#" + k), L && L.charAt(0) !== "?" && (L = "?" + L), x = x.replace(/[?#]/g, function(O) {
|
|
4823
4824
|
return encodeURIComponent(O);
|
|
4824
4825
|
}), L = L.replace("#", "%23"), T + A + x + L + k;
|
|
4825
4826
|
};
|
|
4826
|
-
function S(
|
|
4827
|
-
return g(
|
|
4827
|
+
function S(h, T) {
|
|
4828
|
+
return g(h, !1, !0).resolve(T);
|
|
4828
4829
|
}
|
|
4829
|
-
n.prototype.resolve = function(
|
|
4830
|
-
return this.resolveObject(g(
|
|
4830
|
+
n.prototype.resolve = function(h) {
|
|
4831
|
+
return this.resolveObject(g(h, !1, !0)).format();
|
|
4831
4832
|
};
|
|
4832
|
-
function C(
|
|
4833
|
-
return
|
|
4833
|
+
function C(h, T) {
|
|
4834
|
+
return h ? g(h, !1, !0).resolveObject(T) : T;
|
|
4834
4835
|
}
|
|
4835
|
-
return n.prototype.resolveObject = function(
|
|
4836
|
-
if (typeof
|
|
4836
|
+
return n.prototype.resolveObject = function(h) {
|
|
4837
|
+
if (typeof h == "string") {
|
|
4837
4838
|
var T = new n();
|
|
4838
|
-
T.parse(
|
|
4839
|
+
T.parse(h, !1, !0), h = T;
|
|
4839
4840
|
}
|
|
4840
4841
|
for (var x = new n(), k = Object.keys(this), A = 0; A < k.length; A++) {
|
|
4841
|
-
var
|
|
4842
|
-
x[
|
|
4842
|
+
var R = k[A];
|
|
4843
|
+
x[R] = this[R];
|
|
4843
4844
|
}
|
|
4844
|
-
if (x.hash =
|
|
4845
|
+
if (x.hash = h.hash, h.href === "")
|
|
4845
4846
|
return x.href = x.format(), x;
|
|
4846
|
-
if (
|
|
4847
|
-
for (var L = Object.keys(
|
|
4847
|
+
if (h.slashes && !h.protocol) {
|
|
4848
|
+
for (var L = Object.keys(h), O = 0; O < L.length; O++) {
|
|
4848
4849
|
var B = L[O];
|
|
4849
|
-
B !== "protocol" && (x[B] =
|
|
4850
|
+
B !== "protocol" && (x[B] = h[B]);
|
|
4850
4851
|
}
|
|
4851
4852
|
return b[x.protocol] && x.hostname && !x.pathname && (x.pathname = "/", x.path = x.pathname), x.href = x.format(), x;
|
|
4852
4853
|
}
|
|
4853
|
-
if (
|
|
4854
|
-
if (!b[
|
|
4855
|
-
for (var _ = Object.keys(
|
|
4854
|
+
if (h.protocol && h.protocol !== x.protocol) {
|
|
4855
|
+
if (!b[h.protocol]) {
|
|
4856
|
+
for (var _ = Object.keys(h), G = 0; G < _.length; G++) {
|
|
4856
4857
|
var se = _[G];
|
|
4857
|
-
x[se] =
|
|
4858
|
+
x[se] = h[se];
|
|
4858
4859
|
}
|
|
4859
4860
|
return x.href = x.format(), x;
|
|
4860
4861
|
}
|
|
4861
|
-
if (x.protocol =
|
|
4862
|
-
for (var U = (
|
|
4862
|
+
if (x.protocol = h.protocol, !h.host && !j[h.protocol]) {
|
|
4863
|
+
for (var U = (h.pathname || "").split("/"); U.length && !(h.host = U.shift()); )
|
|
4863
4864
|
;
|
|
4864
|
-
|
|
4865
|
+
h.host || (h.host = ""), h.hostname || (h.hostname = ""), U[0] !== "" && U.unshift(""), U.length < 2 && U.unshift(""), x.pathname = U.join("/");
|
|
4865
4866
|
} else
|
|
4866
|
-
x.pathname =
|
|
4867
|
-
if (x.search =
|
|
4868
|
-
var ee = x.pathname || "",
|
|
4869
|
-
x.path = ee +
|
|
4867
|
+
x.pathname = h.pathname;
|
|
4868
|
+
if (x.search = h.search, x.query = h.query, x.host = h.host || "", x.auth = h.auth, x.hostname = h.hostname || h.host, x.port = h.port, x.pathname || x.search) {
|
|
4869
|
+
var ee = x.pathname || "", E = x.search || "";
|
|
4870
|
+
x.path = ee + E;
|
|
4870
4871
|
}
|
|
4871
|
-
return x.slashes = x.slashes ||
|
|
4872
|
+
return x.slashes = x.slashes || h.slashes, x.href = x.format(), x;
|
|
4872
4873
|
}
|
|
4873
|
-
var ne = x.pathname && x.pathname.charAt(0) === "/", N =
|
|
4874
|
-
if (J && (x.hostname = "", x.port = null, x.host && (P[0] === "" ? P[0] = x.host : P.unshift(x.host)), x.host = "",
|
|
4875
|
-
x.host =
|
|
4874
|
+
var ne = x.pathname && x.pathname.charAt(0) === "/", N = h.host || h.pathname && h.pathname.charAt(0) === "/", q = N || ne || x.host && h.pathname, F = q, P = x.pathname && x.pathname.split("/") || [], U = h.pathname && h.pathname.split("/") || [], J = x.protocol && !b[x.protocol];
|
|
4875
|
+
if (J && (x.hostname = "", x.port = null, x.host && (P[0] === "" ? P[0] = x.host : P.unshift(x.host)), x.host = "", h.protocol && (h.hostname = null, h.port = null, h.host && (U[0] === "" ? U[0] = h.host : U.unshift(h.host)), h.host = null), q = q && (U[0] === "" || P[0] === "")), N)
|
|
4876
|
+
x.host = h.host || h.host === "" ? h.host : x.host, x.hostname = h.hostname || h.hostname === "" ? h.hostname : x.hostname, x.search = h.search, x.query = h.query, P = U;
|
|
4876
4877
|
else if (U.length)
|
|
4877
|
-
P || (P = []), P.pop(), P = P.concat(U), x.search =
|
|
4878
|
-
else if (
|
|
4878
|
+
P || (P = []), P.pop(), P = P.concat(U), x.search = h.search, x.query = h.query;
|
|
4879
|
+
else if (h.search != null) {
|
|
4879
4880
|
if (J) {
|
|
4880
4881
|
x.host = P.shift(), x.hostname = x.host;
|
|
4881
4882
|
var W = x.host && x.host.indexOf("@") > 0 ? x.host.split("@") : !1;
|
|
4882
4883
|
W && (x.auth = W.shift(), x.hostname = W.shift(), x.host = x.hostname);
|
|
4883
4884
|
}
|
|
4884
|
-
return x.search =
|
|
4885
|
+
return x.search = h.search, x.query = h.query, (x.pathname !== null || x.search !== null) && (x.path = (x.pathname ? x.pathname : "") + (x.search ? x.search : "")), x.href = x.format(), x;
|
|
4885
4886
|
}
|
|
4886
4887
|
if (!P.length)
|
|
4887
4888
|
return x.pathname = null, x.search ? x.path = "/" + x.search : x.path = null, x.href = x.format(), x;
|
|
4888
|
-
for (var Y = P.slice(-1)[0], ae = (x.host ||
|
|
4889
|
+
for (var Y = P.slice(-1)[0], ae = (x.host || h.host || P.length > 1) && (Y === "." || Y === "..") || Y === "", D = 0, I = P.length; I >= 0; I--)
|
|
4889
4890
|
Y = P[I], Y === "." ? P.splice(I, 1) : Y === ".." ? (P.splice(I, 1), D++) : D && (P.splice(I, 1), D--);
|
|
4890
4891
|
if (!q && !F)
|
|
4891
4892
|
for (; D--; D)
|
|
@@ -4897,18 +4898,18 @@ function cl() {
|
|
|
4897
4898
|
var W = x.host && x.host.indexOf("@") > 0 ? x.host.split("@") : !1;
|
|
4898
4899
|
W && (x.auth = W.shift(), x.hostname = W.shift(), x.host = x.hostname);
|
|
4899
4900
|
}
|
|
4900
|
-
return q = q || x.host && P.length, q && !H && P.unshift(""), P.length > 0 ? x.pathname = P.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 =
|
|
4901
|
+
return q = q || x.host && P.length, q && !H && P.unshift(""), P.length > 0 ? x.pathname = P.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 = h.auth || x.auth, x.slashes = x.slashes || h.slashes, x.href = x.format(), x;
|
|
4901
4902
|
}, n.prototype.parseHost = function() {
|
|
4902
|
-
var
|
|
4903
|
-
T && (T = T[0], T !== ":" && (this.port = T.substr(1)),
|
|
4903
|
+
var h = this.host, T = a.exec(h);
|
|
4904
|
+
T && (T = T[0], T !== ":" && (this.port = T.substr(1)), h = h.substr(0, h.length - T.length)), h && (this.hostname = h);
|
|
4904
4905
|
}, Te.parse = g, Te.resolve = S, Te.resolveObject = C, Te.format = v, Te.Url = n, Te;
|
|
4905
4906
|
}
|
|
4906
|
-
var $r =
|
|
4907
|
+
var $r = ll(), wr = /* @__PURE__ */ Ha(), cl = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), ul = class {
|
|
4907
4908
|
constructor(e, n = {}) {
|
|
4908
4909
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
4909
4910
|
harIsAlreadyEncoded: !1,
|
|
4910
4911
|
...n
|
|
4911
|
-
}, this.requests = [],
|
|
4912
|
+
}, this.requests = [], cl(e) ? this.entries = e.log.entries : this.entries = [
|
|
4912
4913
|
{
|
|
4913
4914
|
request: e
|
|
4914
4915
|
}
|
|
@@ -4942,40 +4943,40 @@ var $r = cl(), wr = /* @__PURE__ */ Ha(), ul = (e) => typeof e == "object" && "l
|
|
|
4942
4943
|
allHeaders: {}
|
|
4943
4944
|
};
|
|
4944
4945
|
if (r.queryString && r.queryString.length && (r.queryObj = r.queryString.reduce(on, {})), r.headers && r.headers.length) {
|
|
4945
|
-
const
|
|
4946
|
-
r.headersObj = r.headers.reduce((
|
|
4947
|
-
const j =
|
|
4946
|
+
const p = /^HTTP\/2/;
|
|
4947
|
+
r.headersObj = r.headers.reduce((d, { name: m, value: y }) => {
|
|
4948
|
+
const j = p.exec(r.httpVersion) ? m.toLocaleLowerCase() : m;
|
|
4948
4949
|
return {
|
|
4949
|
-
...
|
|
4950
|
+
...d,
|
|
4950
4951
|
[j]: y
|
|
4951
4952
|
};
|
|
4952
4953
|
}, {});
|
|
4953
4954
|
}
|
|
4954
4955
|
r.cookies && r.cookies.length && (r.cookiesObj = r.cookies.reduceRight(
|
|
4955
|
-
(
|
|
4956
|
-
...
|
|
4957
|
-
[
|
|
4956
|
+
(p, { name: d, value: m }) => ({
|
|
4957
|
+
...p,
|
|
4958
|
+
[d]: m
|
|
4958
4959
|
}),
|
|
4959
4960
|
{}
|
|
4960
4961
|
));
|
|
4961
|
-
const a = r.cookies?.map(({ name:
|
|
4962
|
+
const a = r.cookies?.map(({ name: p, value: d }) => n.harIsAlreadyEncoded ? `${p}=${d}` : `${encodeURIComponent(p)}=${encodeURIComponent(d)}`);
|
|
4962
4963
|
switch (a?.length && (r.allHeaders.cookie = a.join("; ")), r.postData.mimeType) {
|
|
4963
4964
|
case "multipart/mixed":
|
|
4964
4965
|
case "multipart/related":
|
|
4965
4966
|
case "multipart/form-data":
|
|
4966
4967
|
case "multipart/alternative":
|
|
4967
4968
|
if (r.postData.text = "", r.postData.mimeType = "multipart/form-data", r.postData?.params) {
|
|
4968
|
-
const
|
|
4969
|
+
const p = "---011000010111000001101001", d = `${p}--`, m = `\r
|
|
4969
4970
|
`, y = (g) => g.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), j = (g) => g.replace(/\r?\n|\r/g, `\r
|
|
4970
|
-
`), b = [`--${
|
|
4971
|
+
`), b = [`--${p}`];
|
|
4971
4972
|
r.postData?.params.forEach((g, v) => {
|
|
4972
|
-
const S = g.name, C = g.value || "",
|
|
4973
|
-
|
|
4974
|
-
`Content-Disposition: form-data; name="${y(j(S))}"; filename="${
|
|
4975
|
-
), b.push(`Content-Type: ${T}`)) : b.push(`Content-Disposition: form-data; name="${y(j(S))}"`), b.push(""), b.push(j(C)), v !== r.postData.params.length - 1 && b.push(`--${
|
|
4976
|
-
}), b.push(`--${
|
|
4973
|
+
const S = g.name, C = g.value || "", h = g.fileName || null, T = g.contentType || "application/octet-stream";
|
|
4974
|
+
h ? (b.push(
|
|
4975
|
+
`Content-Disposition: form-data; name="${y(j(S))}"; filename="${h}"`
|
|
4976
|
+
), b.push(`Content-Type: ${T}`)) : b.push(`Content-Disposition: form-data; name="${y(j(S))}"`), b.push(""), b.push(j(C)), v !== r.postData.params.length - 1 && b.push(`--${p}`);
|
|
4977
|
+
}), b.push(`--${d}`), r.postData.boundary = p, r.postData.text = b.join(m);
|
|
4977
4978
|
const f = pe(r.headersObj, "content-type") || "content-type";
|
|
4978
|
-
r.headersObj[f] = `multipart/form-data; boundary=${
|
|
4979
|
+
r.headersObj[f] = `multipart/form-data; boundary=${p}`;
|
|
4979
4980
|
}
|
|
4980
4981
|
break;
|
|
4981
4982
|
case "application/x-www-form-urlencoded":
|
|
@@ -5031,14 +5032,14 @@ var $r = cl(), wr = /* @__PURE__ */ Ha(), ul = (e) => typeof e == "object" && "l
|
|
|
5031
5032
|
}
|
|
5032
5033
|
convert(e, n, r) {
|
|
5033
5034
|
this.initCalled || this.init(), !r && n && (r = n);
|
|
5034
|
-
const a =
|
|
5035
|
+
const a = Ps[e];
|
|
5035
5036
|
if (!a)
|
|
5036
5037
|
return !1;
|
|
5037
5038
|
const { convert: c } = a.clientsById[n || a.info.default];
|
|
5038
5039
|
return this.requests.map((t) => c(t, r));
|
|
5039
5040
|
}
|
|
5040
5041
|
};
|
|
5041
|
-
const
|
|
5042
|
+
const pl = (e) => {
|
|
5042
5043
|
const n = (r) => typeof r == "string" ? r : JSON.stringify(r);
|
|
5043
5044
|
try {
|
|
5044
5045
|
const r = e && JSON.parse(e);
|
|
@@ -5046,16 +5047,16 @@ const fl = (e) => {
|
|
|
5046
5047
|
} catch {
|
|
5047
5048
|
return [];
|
|
5048
5049
|
}
|
|
5049
|
-
},
|
|
5050
|
+
}, fl = ({
|
|
5050
5051
|
operation: e,
|
|
5051
5052
|
selectedServer: n,
|
|
5052
5053
|
exampleBody: r
|
|
5053
5054
|
}) => {
|
|
5054
5055
|
const c = r.mimeType === "multipart/form-data" || r.mimeType === "application/x-www-form-urlencoded" ? {
|
|
5055
5056
|
mimeType: r.mimeType,
|
|
5056
|
-
params:
|
|
5057
|
+
params: pl(r.text)
|
|
5057
5058
|
} : r;
|
|
5058
|
-
return new
|
|
5059
|
+
return new ul({
|
|
5059
5060
|
method: e.method.toUpperCase(),
|
|
5060
5061
|
url: n + e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
5061
5062
|
postData: c,
|
|
@@ -5075,7 +5076,7 @@ const fl = (e) => {
|
|
|
5075
5076
|
headersSize: 0,
|
|
5076
5077
|
bodySize: 0
|
|
5077
5078
|
});
|
|
5078
|
-
},
|
|
5079
|
+
}, dl = (e, n) => {
|
|
5079
5080
|
let r;
|
|
5080
5081
|
switch (n) {
|
|
5081
5082
|
case "shell":
|
|
@@ -5117,7 +5118,7 @@ const fl = (e) => {
|
|
|
5117
5118
|
}
|
|
5118
5119
|
return r ? r[0] : "";
|
|
5119
5120
|
}, Pe = (e, n) => {
|
|
5120
|
-
if (!e ||
|
|
5121
|
+
if (!e || xo(e))
|
|
5121
5122
|
return null;
|
|
5122
5123
|
if (e.example !== void 0)
|
|
5123
5124
|
return e.example;
|
|
@@ -5186,7 +5187,7 @@ const fl = (e) => {
|
|
|
5186
5187
|
purple: "text-purple-600",
|
|
5187
5188
|
indigo: "text-indigo-600",
|
|
5188
5189
|
gray: "text-gray-600"
|
|
5189
|
-
},
|
|
5190
|
+
}, hl = {
|
|
5190
5191
|
get: xe.green,
|
|
5191
5192
|
post: xe.blue,
|
|
5192
5193
|
put: xe.yellow,
|
|
@@ -5195,7 +5196,7 @@ const fl = (e) => {
|
|
|
5195
5196
|
options: xe.indigo,
|
|
5196
5197
|
head: xe.gray,
|
|
5197
5198
|
trace: xe.gray
|
|
5198
|
-
}, Ma = (e) =>
|
|
5199
|
+
}, Ma = (e) => hl[e.toLocaleLowerCase()] ?? xe.gray;
|
|
5199
5200
|
Ve(
|
|
5200
5201
|
/* GraphQL */
|
|
5201
5202
|
`
|
|
@@ -5209,7 +5210,7 @@ Ve(
|
|
|
5209
5210
|
}
|
|
5210
5211
|
`
|
|
5211
5212
|
);
|
|
5212
|
-
const
|
|
5213
|
+
const ml = [
|
|
5213
5214
|
{ value: "shell", label: "cURL" },
|
|
5214
5215
|
{ value: "js", label: "JavaScript" },
|
|
5215
5216
|
{ value: "python", label: "Python" },
|
|
@@ -5221,13 +5222,13 @@ const yl = [
|
|
|
5221
5222
|
{ value: "php", label: "PHP" },
|
|
5222
5223
|
{ value: "ruby", label: "Ruby" },
|
|
5223
5224
|
{ value: "swift", label: "Swift" }
|
|
5224
|
-
],
|
|
5225
|
+
], yl = ({
|
|
5225
5226
|
operation: e,
|
|
5226
5227
|
selectedResponse: n,
|
|
5227
5228
|
globalSelectedServer: r,
|
|
5228
5229
|
shouldLazyHighlight: a
|
|
5229
5230
|
}) => {
|
|
5230
|
-
const { options: c } = ct(), i =
|
|
5231
|
+
const { options: c } = ct(), i = uo(), t = zo(), o = Ma(e.method), [s, u] = Xa(), [, p] = Pa(), d = c?.supportedLanguages ?? ml, m = s.get("lang") ?? c?.examplesLanguage ?? "shell", y = d.find((O) => O.value === m)?.value ?? d.at(0)?.value ?? "shell", j = e.requestBody?.content, b = j && c?.transformExamples ? c.transformExamples({
|
|
5231
5232
|
auth: i,
|
|
5232
5233
|
type: "request",
|
|
5233
5234
|
operation: e,
|
|
@@ -5240,8 +5241,8 @@ const yl = [
|
|
|
5240
5241
|
f.contentTypeIndex
|
|
5241
5242
|
), S = v?.examples?.at(
|
|
5242
5243
|
f.exampleIndex
|
|
5243
|
-
), C = S ? S?.value ?? S : v?.schema ? Pe(v?.schema) : void 0,
|
|
5244
|
-
|
|
5244
|
+
), C = S ? S?.value ?? S : v?.schema ? Pe(v?.schema) : void 0, h = /* @__PURE__ */ l.jsx(
|
|
5245
|
+
ro,
|
|
5245
5246
|
{
|
|
5246
5247
|
path: e.path,
|
|
5247
5248
|
renderParam: ({ name: O }) => /* @__PURE__ */ l.jsx(
|
|
@@ -5255,7 +5256,7 @@ const yl = [
|
|
|
5255
5256
|
}
|
|
5256
5257
|
)
|
|
5257
5258
|
}
|
|
5258
|
-
), T = r || e.servers.at(0)?.url || "", x =
|
|
5259
|
+
), T = r || e.servers.at(0)?.url || "", x = qo(() => {
|
|
5259
5260
|
const O = c?.generateCodeSnippet?.({
|
|
5260
5261
|
selectedLang: y,
|
|
5261
5262
|
selectedServer: T,
|
|
@@ -5265,7 +5266,7 @@ const yl = [
|
|
|
5265
5266
|
auth: i
|
|
5266
5267
|
});
|
|
5267
5268
|
if (O) return O;
|
|
5268
|
-
const B =
|
|
5269
|
+
const B = fl({
|
|
5269
5270
|
operation: e,
|
|
5270
5271
|
selectedServer: T,
|
|
5271
5272
|
exampleBody: C ? {
|
|
@@ -5273,7 +5274,7 @@ const yl = [
|
|
|
5273
5274
|
text: JSON.stringify(C, null, 2)
|
|
5274
5275
|
} : { mimeType: v?.mediaType ?? "application/json" }
|
|
5275
5276
|
});
|
|
5276
|
-
return
|
|
5277
|
+
return dl(B, y);
|
|
5277
5278
|
}, [
|
|
5278
5279
|
C,
|
|
5279
5280
|
e,
|
|
@@ -5283,7 +5284,7 @@ const yl = [
|
|
|
5283
5284
|
c,
|
|
5284
5285
|
i,
|
|
5285
5286
|
t
|
|
5286
|
-
]), [k, A] =
|
|
5287
|
+
]), [k, A] = ii({ rootMargin: "200px 0px 200px 0px" }), R = A && (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 && !c?.disablePlayground), L = e.responses.some(
|
|
5287
5288
|
(O) => O.content?.some((B) => (B.examples?.length ?? 0) > 0)
|
|
5288
5289
|
);
|
|
5289
5290
|
return /* @__PURE__ */ l.jsxs(
|
|
@@ -5307,7 +5308,7 @@ const yl = [
|
|
|
5307
5308
|
children: e.method.toUpperCase()
|
|
5308
5309
|
}
|
|
5309
5310
|
),
|
|
5310
|
-
|
|
5311
|
+
h
|
|
5311
5312
|
] }),
|
|
5312
5313
|
/* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
5313
5314
|
/* @__PURE__ */ l.jsx(
|
|
@@ -5316,11 +5317,11 @@ const yl = [
|
|
|
5316
5317
|
className: "py-0.5 h-fit max-w-32 truncate bg-background",
|
|
5317
5318
|
value: y,
|
|
5318
5319
|
onChange: (O) => {
|
|
5319
|
-
|
|
5320
|
+
p(() => {
|
|
5320
5321
|
u((B) => (B.set("lang", O.target.value), B));
|
|
5321
5322
|
});
|
|
5322
5323
|
},
|
|
5323
|
-
children:
|
|
5324
|
+
children: d.map((O) => /* @__PURE__ */ l.jsx(
|
|
5324
5325
|
ze,
|
|
5325
5326
|
{
|
|
5326
5327
|
value: O.value,
|
|
@@ -5330,8 +5331,8 @@ const yl = [
|
|
|
5330
5331
|
))
|
|
5331
5332
|
}
|
|
5332
5333
|
),
|
|
5333
|
-
|
|
5334
|
-
|
|
5334
|
+
R && /* @__PURE__ */ l.jsx(
|
|
5335
|
+
ui,
|
|
5335
5336
|
{
|
|
5336
5337
|
servers: e.servers.map((O) => O.url),
|
|
5337
5338
|
operation: e,
|
|
@@ -5351,7 +5352,7 @@ const yl = [
|
|
|
5351
5352
|
) })
|
|
5352
5353
|
] }),
|
|
5353
5354
|
b && S ? /* @__PURE__ */ l.jsx(
|
|
5354
|
-
|
|
5355
|
+
di,
|
|
5355
5356
|
{
|
|
5356
5357
|
content: b,
|
|
5357
5358
|
onExampleChange: (O) => {
|
|
@@ -5363,7 +5364,7 @@ const yl = [
|
|
|
5363
5364
|
shouldLazyHighlight: a
|
|
5364
5365
|
}
|
|
5365
5366
|
) : b && C ? /* @__PURE__ */ l.jsx(
|
|
5366
|
-
|
|
5367
|
+
ci,
|
|
5367
5368
|
{
|
|
5368
5369
|
isOnScreen: A,
|
|
5369
5370
|
shouldLazyHighlight: a,
|
|
@@ -5406,15 +5407,15 @@ const yl = [
|
|
|
5406
5407
|
]
|
|
5407
5408
|
}
|
|
5408
5409
|
);
|
|
5409
|
-
},
|
|
5410
|
+
}, gl = ["path", "query", "header", "cookie"], vl = ({
|
|
5410
5411
|
operationFragment: e,
|
|
5411
5412
|
globalSelectedServer: n,
|
|
5412
5413
|
shouldLazyHighlight: r
|
|
5413
5414
|
}) => {
|
|
5414
|
-
const a =
|
|
5415
|
+
const a = Vo(xl, e), c = bo(
|
|
5415
5416
|
a.parameters ?? [],
|
|
5416
|
-
(
|
|
5417
|
-
), { options: i } = ct(), t = n || a.servers.at(0)?.url, o = a.responses.at(0), [s, u] = ge(o?.statusCode),
|
|
5417
|
+
(d) => d.in
|
|
5418
|
+
), { options: i } = ct(), t = n || a.servers.at(0)?.url, o = a.responses.at(0), [s, u] = ge(o?.statusCode), p = a.extensions?.["x-mcp-server"] !== void 0;
|
|
5418
5419
|
return /* @__PURE__ */ l.jsxs("div", { children: [
|
|
5419
5420
|
a.deprecated && /* @__PURE__ */ l.jsx(Me, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
|
|
5420
5421
|
/* @__PURE__ */ l.jsxs(
|
|
@@ -5435,15 +5436,15 @@ const yl = [
|
|
|
5435
5436
|
children: a.summary
|
|
5436
5437
|
}
|
|
5437
5438
|
),
|
|
5438
|
-
!
|
|
5439
|
+
!p && /* @__PURE__ */ l.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
|
|
5439
5440
|
/* @__PURE__ */ l.jsx("span", { className: Ma(a.method), children: a.method.toUpperCase() }),
|
|
5440
|
-
/* @__PURE__ */ l.jsxs(
|
|
5441
|
+
/* @__PURE__ */ l.jsxs(mo, { className: "max-w-full truncate flex cursor-pointer", children: [
|
|
5441
5442
|
t && /* @__PURE__ */ l.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: t.replace(/\/$/, "") }),
|
|
5442
5443
|
/* @__PURE__ */ l.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: a.path })
|
|
5443
5444
|
] })
|
|
5444
5445
|
] }),
|
|
5445
|
-
|
|
5446
|
-
|
|
5446
|
+
p ? /* @__PURE__ */ l.jsx("div", { className: "col-span-full", children: /* @__PURE__ */ l.jsx(
|
|
5447
|
+
ri,
|
|
5447
5448
|
{
|
|
5448
5449
|
serverUrl: t,
|
|
5449
5450
|
summary: a.summary ?? void 0,
|
|
@@ -5464,22 +5465,22 @@ const yl = [
|
|
|
5464
5465
|
content: a.description
|
|
5465
5466
|
}
|
|
5466
5467
|
),
|
|
5467
|
-
a.parameters && a.parameters.length > 0 &&
|
|
5468
|
-
(
|
|
5469
|
-
|
|
5468
|
+
a.parameters && a.parameters.length > 0 && gl.flatMap(
|
|
5469
|
+
(d) => c[d]?.length ? /* @__PURE__ */ l.jsx(
|
|
5470
|
+
oi,
|
|
5470
5471
|
{
|
|
5471
5472
|
summary: a.summary ?? void 0,
|
|
5472
5473
|
id: a.slug,
|
|
5473
|
-
parameters: c[
|
|
5474
|
-
group:
|
|
5474
|
+
parameters: c[d],
|
|
5475
|
+
group: d
|
|
5475
5476
|
},
|
|
5476
|
-
|
|
5477
|
+
d
|
|
5477
5478
|
) : []
|
|
5478
5479
|
),
|
|
5479
5480
|
St(a.requestBody?.content?.at(0)?.schema, () => /* @__PURE__ */ l.jsx(Zr, { className: "my-4" })),
|
|
5480
5481
|
St(
|
|
5481
5482
|
a.requestBody?.content?.at(0)?.schema,
|
|
5482
|
-
(
|
|
5483
|
+
(d) => /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
5483
5484
|
/* @__PURE__ */ l.jsxs(
|
|
5484
5485
|
Fe,
|
|
5485
5486
|
{
|
|
@@ -5498,7 +5499,7 @@ const yl = [
|
|
|
5498
5499
|
]
|
|
5499
5500
|
}
|
|
5500
5501
|
),
|
|
5501
|
-
/* @__PURE__ */ l.jsx(Ir, { schema:
|
|
5502
|
+
/* @__PURE__ */ l.jsx(Ir, { schema: d })
|
|
5502
5503
|
] })
|
|
5503
5504
|
),
|
|
5504
5505
|
/* @__PURE__ */ l.jsx(Zr, { className: "my-4" }),
|
|
@@ -5512,7 +5513,7 @@ const yl = [
|
|
|
5512
5513
|
"Responses"
|
|
5513
5514
|
] }),
|
|
5514
5515
|
/* @__PURE__ */ l.jsx(
|
|
5515
|
-
|
|
5516
|
+
ti,
|
|
5516
5517
|
{
|
|
5517
5518
|
responses: a.responses,
|
|
5518
5519
|
selectedResponse: s,
|
|
@@ -5523,8 +5524,8 @@ const yl = [
|
|
|
5523
5524
|
]
|
|
5524
5525
|
}
|
|
5525
5526
|
),
|
|
5526
|
-
St(!i?.disableSidecar && !
|
|
5527
|
-
|
|
5527
|
+
St(!i?.disableSidecar && !p, () => /* @__PURE__ */ l.jsx(
|
|
5528
|
+
yl,
|
|
5528
5529
|
{
|
|
5529
5530
|
selectedResponse: s,
|
|
5530
5531
|
operation: a,
|
|
@@ -5541,7 +5542,7 @@ const yl = [
|
|
|
5541
5542
|
function ya(e, n = 160) {
|
|
5542
5543
|
return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, n).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
5543
5544
|
}
|
|
5544
|
-
const
|
|
5545
|
+
const xl = Ve(
|
|
5545
5546
|
/* GraphQL */
|
|
5546
5547
|
`
|
|
5547
5548
|
fragment OperationsFragment on OperationItem {
|
|
@@ -5613,7 +5614,7 @@ const bl = Ve(
|
|
|
5613
5614
|
}
|
|
5614
5615
|
}
|
|
5615
5616
|
`
|
|
5616
|
-
),
|
|
5617
|
+
), bl = Ve(
|
|
5617
5618
|
/* GraphQL */
|
|
5618
5619
|
`
|
|
5619
5620
|
query SchemaWarmup($input: JSON!, $type: SchemaType!) {
|
|
@@ -5622,7 +5623,7 @@ const bl = Ve(
|
|
|
5622
5623
|
}
|
|
5623
5624
|
}
|
|
5624
5625
|
`
|
|
5625
|
-
),
|
|
5626
|
+
), jl = Ve(
|
|
5626
5627
|
/* GraphQL */
|
|
5627
5628
|
`
|
|
5628
5629
|
query OperationsForTag(
|
|
@@ -5662,42 +5663,39 @@ const bl = Ve(
|
|
|
5662
5663
|
}
|
|
5663
5664
|
}
|
|
5664
5665
|
`
|
|
5665
|
-
),
|
|
5666
|
-
const n = e.lastIndexOf(".");
|
|
5667
|
-
return n !== -1 ? e.slice(n) : "";
|
|
5668
|
-
}, rc = ({
|
|
5666
|
+
), $l = 30, tc = ({
|
|
5669
5667
|
tag: e,
|
|
5670
5668
|
untagged: n
|
|
5671
5669
|
}) => {
|
|
5672
|
-
const {
|
|
5673
|
-
input:
|
|
5674
|
-
type:
|
|
5675
|
-
tag: e ??
|
|
5670
|
+
const { input: r, type: a, versions: c, version: i, options: t } = ct(), { tag: o } = Za(), s = Sr(jl, {
|
|
5671
|
+
input: r,
|
|
5672
|
+
type: a,
|
|
5673
|
+
tag: e ?? o,
|
|
5676
5674
|
untagged: n
|
|
5677
|
-
}),
|
|
5675
|
+
}), u = ga(s), {
|
|
5678
5676
|
data: { schema: p }
|
|
5679
|
-
} =
|
|
5677
|
+
} = u, { selectedServer: d } = ja(
|
|
5680
5678
|
p.servers
|
|
5681
|
-
),
|
|
5682
|
-
if (
|
|
5683
|
-
...
|
|
5679
|
+
), m = p.title, y = p.summary, j = p.description, b = eo(), f = Sr(bl, { input: r, type: a });
|
|
5680
|
+
if (Ja({
|
|
5681
|
+
...f,
|
|
5684
5682
|
enabled: typeof window < "u",
|
|
5685
5683
|
notifyOnChangeProps: []
|
|
5686
|
-
}),
|
|
5684
|
+
}), po(), !p.tag)
|
|
5687
5685
|
return /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col h-full items-center justify-center text-center", children: [
|
|
5688
5686
|
/* @__PURE__ */ l.jsx("div", { className: "text-muted-foreground font-medium", children: "No operations found" }),
|
|
5689
5687
|
/* @__PURE__ */ l.jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: "This API doesn't have any operations defined yet." })
|
|
5690
5688
|
] });
|
|
5691
|
-
const { operations:
|
|
5692
|
-
prev:
|
|
5693
|
-
to: `../${
|
|
5694
|
-
label:
|
|
5689
|
+
const { operations: g, next: v, prev: S, description: C } = p.tag, h = g.length > $l, T = C ? ya(C) : y || (j ? ya(j) : void 0), x = Object.entries(c).length > 1, k = t?.showVersionSelect === "always" || x && t?.showVersionSelect !== "hide", A = {
|
|
5690
|
+
prev: S ? {
|
|
5691
|
+
to: `../${S.slug}`,
|
|
5692
|
+
label: S.extensions?.["x-displayName"] ?? S.name
|
|
5695
5693
|
} : void 0,
|
|
5696
|
-
next:
|
|
5697
|
-
to: `../${
|
|
5698
|
-
label:
|
|
5694
|
+
next: v ? {
|
|
5695
|
+
to: `../${v.slug ?? no}`,
|
|
5696
|
+
label: v.extensions?.["x-displayName"] ?? v.name ?? "Other endpoints"
|
|
5699
5697
|
} : void 0
|
|
5700
|
-
},
|
|
5698
|
+
}, R = p.tag.extensions?.["x-displayName"] ?? p.tag.name, L = [R, m].filter(Boolean).join(" - "), O = i != null ? c[i] : void 0, B = typeof r == "string" ? a === "url" ? r : O?.downloadUrl : void 0;
|
|
5701
5699
|
return /* @__PURE__ */ l.jsxs(
|
|
5702
5700
|
"div",
|
|
5703
5701
|
{
|
|
@@ -5705,21 +5703,21 @@ const bl = Ve(
|
|
|
5705
5703
|
"data-pagefind-filter": "section:openapi",
|
|
5706
5704
|
"data-pagefind-meta": "section:openapi",
|
|
5707
5705
|
children: [
|
|
5708
|
-
/* @__PURE__ */ l.jsx(Tr, { name: "category", children:
|
|
5709
|
-
/* @__PURE__ */ l.jsxs(
|
|
5710
|
-
|
|
5711
|
-
|
|
5706
|
+
/* @__PURE__ */ l.jsx(Tr, { name: "category", children: m }),
|
|
5707
|
+
/* @__PURE__ */ l.jsxs(Da, { children: [
|
|
5708
|
+
L && /* @__PURE__ */ l.jsx("title", { children: L }),
|
|
5709
|
+
T && /* @__PURE__ */ l.jsx("meta", { name: "description", content: T })
|
|
5712
5710
|
] }),
|
|
5713
5711
|
/* @__PURE__ */ l.jsxs("div", { className: "mb-8", children: [
|
|
5714
5712
|
/* @__PURE__ */ l.jsxs(
|
|
5715
|
-
|
|
5713
|
+
Rr,
|
|
5716
5714
|
{
|
|
5717
5715
|
className: "w-full",
|
|
5718
|
-
defaultOpen:
|
|
5716
|
+
defaultOpen: t?.expandApiInformation,
|
|
5719
5717
|
children: [
|
|
5720
5718
|
/* @__PURE__ */ l.jsxs("div", { className: "flex flex-col gap-4 sm:flex-row justify-around items-start sm:items-end", children: [
|
|
5721
5719
|
/* @__PURE__ */ l.jsxs("div", { className: "flex flex-col flex-1 gap-2", children: [
|
|
5722
|
-
/* @__PURE__ */ l.jsx(
|
|
5720
|
+
/* @__PURE__ */ l.jsx(co, { children: m }),
|
|
5723
5721
|
/* @__PURE__ */ l.jsxs(
|
|
5724
5722
|
Fe,
|
|
5725
5723
|
{
|
|
@@ -5728,38 +5726,38 @@ const bl = Ve(
|
|
|
5728
5726
|
registerNavigationAnchor: !0,
|
|
5729
5727
|
className: "mb-0",
|
|
5730
5728
|
children: [
|
|
5731
|
-
|
|
5732
|
-
|
|
5729
|
+
R,
|
|
5730
|
+
k && /* @__PURE__ */ l.jsxs("span", { className: "text-xl text-muted-foreground ms-1.5", children: [
|
|
5733
5731
|
" ",
|
|
5734
5732
|
"(",
|
|
5735
|
-
|
|
5733
|
+
p.version,
|
|
5736
5734
|
")"
|
|
5737
5735
|
] })
|
|
5738
5736
|
]
|
|
5739
5737
|
}
|
|
5740
5738
|
),
|
|
5741
|
-
/* @__PURE__ */ l.jsx(
|
|
5739
|
+
/* @__PURE__ */ l.jsx(Zo, {})
|
|
5742
5740
|
] }),
|
|
5743
5741
|
/* @__PURE__ */ l.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
|
|
5744
5742
|
/* @__PURE__ */ l.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
5745
|
-
|
|
5746
|
-
|
|
5743
|
+
k && /* @__PURE__ */ l.jsxs(
|
|
5744
|
+
ao,
|
|
5747
5745
|
{
|
|
5748
5746
|
onValueChange: (_) => (
|
|
5749
5747
|
// biome-ignore lint/style/noNonNullAssertion: is guaranteed to be defined
|
|
5750
|
-
|
|
5748
|
+
b(c[_].path)
|
|
5751
5749
|
),
|
|
5752
|
-
defaultValue:
|
|
5753
|
-
disabled: !
|
|
5750
|
+
defaultValue: i,
|
|
5751
|
+
disabled: !x,
|
|
5754
5752
|
children: [
|
|
5755
|
-
/* @__PURE__ */ l.jsx(
|
|
5756
|
-
/* @__PURE__ */ l.jsx(
|
|
5753
|
+
/* @__PURE__ */ l.jsx(oo, { className: "w-[180px]", size: "sm", children: /* @__PURE__ */ l.jsx(io, { placeholder: "Select version" }) }),
|
|
5754
|
+
/* @__PURE__ */ l.jsx(so, { children: Object.entries(c).map(([_, { label: G }]) => /* @__PURE__ */ l.jsx(lo, { value: _, children: G }, _)) })
|
|
5757
5755
|
]
|
|
5758
5756
|
}
|
|
5759
5757
|
),
|
|
5760
|
-
|
|
5758
|
+
t?.schemaDownload?.enabled && B && /* @__PURE__ */ l.jsx(Qo, { downloadUrl: B })
|
|
5761
5759
|
] }),
|
|
5762
|
-
p.description && /* @__PURE__ */ l.jsxs(
|
|
5760
|
+
p.description && /* @__PURE__ */ l.jsxs(Er, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
|
|
5763
5761
|
/* @__PURE__ */ l.jsx("span", { children: "API information" }),
|
|
5764
5762
|
/* @__PURE__ */ l.jsx(
|
|
5765
5763
|
lt,
|
|
@@ -5788,35 +5786,35 @@ const bl = Ve(
|
|
|
5788
5786
|
]
|
|
5789
5787
|
}
|
|
5790
5788
|
),
|
|
5791
|
-
|
|
5789
|
+
C && /* @__PURE__ */ l.jsx(
|
|
5792
5790
|
He,
|
|
5793
5791
|
{
|
|
5794
5792
|
className: "my-4 max-w-full prose-img:max-w-prose",
|
|
5795
|
-
content:
|
|
5793
|
+
content: C
|
|
5796
5794
|
}
|
|
5797
5795
|
)
|
|
5798
5796
|
] }),
|
|
5799
5797
|
/* @__PURE__ */ l.jsx("hr", {}),
|
|
5800
5798
|
/* @__PURE__ */ l.jsxs("div", { className: "px-6 mt-6 -mx-6 [content-visibility:auto]", children: [
|
|
5801
|
-
|
|
5799
|
+
g.map((_) => /* @__PURE__ */ l.jsxs("div", { children: [
|
|
5802
5800
|
/* @__PURE__ */ l.jsx(
|
|
5803
|
-
|
|
5801
|
+
vl,
|
|
5804
5802
|
{
|
|
5805
5803
|
operationFragment: _,
|
|
5806
|
-
globalSelectedServer:
|
|
5807
|
-
shouldLazyHighlight:
|
|
5804
|
+
globalSelectedServer: d,
|
|
5805
|
+
shouldLazyHighlight: h
|
|
5808
5806
|
}
|
|
5809
5807
|
),
|
|
5810
5808
|
/* @__PURE__ */ l.jsx("hr", { className: "my-10" })
|
|
5811
5809
|
] }, _.slug)),
|
|
5812
|
-
/* @__PURE__ */ l.jsx(
|
|
5810
|
+
/* @__PURE__ */ l.jsx(wo, { className: "mb-4", ...A })
|
|
5813
5811
|
] })
|
|
5814
5812
|
]
|
|
5815
5813
|
}
|
|
5816
5814
|
);
|
|
5817
5815
|
};
|
|
5818
5816
|
export {
|
|
5819
|
-
|
|
5820
|
-
|
|
5817
|
+
tc as OperationList,
|
|
5818
|
+
xl as OperationsFragment
|
|
5821
5819
|
};
|
|
5822
|
-
//# sourceMappingURL=OperationList-
|
|
5820
|
+
//# sourceMappingURL=OperationList-BOu9Qd_k.js.map
|