zudoku 0.3.0-dev.123 → 0.3.0-dev.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/plugins/openapi/Sidecar.js +9 -5
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -3
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +5 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/lib/{OperationList-NXG3nRzP.js → OperationList-BoB5bkdm.js} +2 -2
- package/lib/{OperationList-NXG3nRzP.js.map → OperationList-BoB5bkdm.js.map} +1 -1
- package/lib/{Route-CqCSuSdD.js → Route-DnFLPnPw.js} +2 -2
- package/lib/{Route-CqCSuSdD.js.map → Route-DnFLPnPw.js.map} +1 -1
- package/lib/{index-YcqHGXdv.js → index-Bx0AgZT5.js} +834 -853
- package/lib/index-Bx0AgZT5.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +25 -19
- package/src/lib/plugins/openapi/playground/Playground.tsx +3 -6
- package/src/lib/plugins/openapi/playground/createUrl.ts +6 -5
- package/lib/index-YcqHGXdv.js.map +0 -1
|
@@ -2,13 +2,13 @@ import { j as f } from "./jsx-runtime-B6kdoens.js";
|
|
|
2
2
|
import { u as Ea, C as Ra, c as Aa, f as Fa } from "./urql-DrBfkb92.js";
|
|
3
3
|
import { v as qa, w as Ia } from "./ZudokuContext-BIZ8zHbZ.js";
|
|
4
4
|
import { createClient as _a } from "zudoku/openapi-worker";
|
|
5
|
-
import { a as dr, u as Yt, P as me, d as be, R as La, S as fr, h as Ua, e as Ma, F as Ha, D as Ba, q as Da, m as Va, o as pr, n as rt, k as
|
|
5
|
+
import { a as dr, u as Yt, P as me, d as be, R as La, S as fr, h as Ua, e as Ma, F as Ha, D as Ba, q as Da, m as Va, o as pr, n as rt, k as Wa, B as qe, p as za } from "./Combination-DTfV-c98.js";
|
|
6
6
|
import { L as Ja, e as Ga, g as Ka } from "./index-7kcHaXD6.js";
|
|
7
7
|
import { C as Qa } from "./CategoryHeading-z15xh7Jb.js";
|
|
8
8
|
import { c as Ke, P as Ya, H as Xa, a as A, u as Za, g as eo, S as Qe } from "./Markdown-CEccPMI_.js";
|
|
9
9
|
import { j as to } from "./joinPath-B7kNnUX4.js";
|
|
10
10
|
import { g as Xt, h as Sn, C as Se, I as mr, i as no, u as ro, a as ao, F as oo, S as io, b as so, c as lo, d as co, f as wn, V as uo } from "./Input-DB9VROFR.js";
|
|
11
|
-
import * as
|
|
11
|
+
import * as j from "react";
|
|
12
12
|
import { useRef as hr, useEffect as yr, useState as gr, Fragment as at, createContext as fo, useContext as po, useTransition as mo, useMemo as ho } from "react";
|
|
13
13
|
import { P as gt, c as vr, R as yo, I as go, a as jn, T as pe } from "./Spinner-BT_AYFrA.js";
|
|
14
14
|
import { a as vo, c as ot, g as bo } from "./_commonjsHelpers-BVfed4GL.js";
|
|
@@ -660,7 +660,7 @@ const Oo = ({
|
|
|
660
660
|
/* @__PURE__ */ f.jsx("p", { children: t }),
|
|
661
661
|
/* @__PURE__ */ f.jsx(Ja, { to: "/", children: "Go back home" })
|
|
662
662
|
] });
|
|
663
|
-
var Zt = "Dialog", [Sr,
|
|
663
|
+
var Zt = "Dialog", [Sr, Eu] = dr(Zt), [Co, ie] = Sr(Zt), wr = (e) => {
|
|
664
664
|
const {
|
|
665
665
|
__scopeDialog: t,
|
|
666
666
|
children: n,
|
|
@@ -668,7 +668,7 @@ var Zt = "Dialog", [Sr, Ru] = dr(Zt), [Co, ie] = Sr(Zt), wr = (e) => {
|
|
|
668
668
|
defaultOpen: s,
|
|
669
669
|
onOpenChange: o,
|
|
670
670
|
modal: r = !0
|
|
671
|
-
} = e, i =
|
|
671
|
+
} = e, i = j.useRef(null), l = j.useRef(null), [c = !1, u] = pr({
|
|
672
672
|
prop: a,
|
|
673
673
|
defaultProp: s,
|
|
674
674
|
onChange: o
|
|
@@ -684,14 +684,14 @@ var Zt = "Dialog", [Sr, Ru] = dr(Zt), [Co, ie] = Sr(Zt), wr = (e) => {
|
|
|
684
684
|
descriptionId: rt(),
|
|
685
685
|
open: c,
|
|
686
686
|
onOpenChange: u,
|
|
687
|
-
onOpenToggle:
|
|
687
|
+
onOpenToggle: j.useCallback(() => u((p) => !p), [u]),
|
|
688
688
|
modal: r,
|
|
689
689
|
children: n
|
|
690
690
|
}
|
|
691
691
|
);
|
|
692
692
|
};
|
|
693
693
|
wr.displayName = Zt;
|
|
694
|
-
var jr = "DialogTrigger", Nr =
|
|
694
|
+
var jr = "DialogTrigger", Nr = j.forwardRef(
|
|
695
695
|
(e, t) => {
|
|
696
696
|
const { __scopeDialog: n, ...a } = e, s = ie(jr, n), o = Yt(t, s.triggerRef);
|
|
697
697
|
return /* @__PURE__ */ f.jsx(
|
|
@@ -714,17 +714,17 @@ var en = "DialogPortal", [Po, Tr] = Sr(en, {
|
|
|
714
714
|
forceMount: void 0
|
|
715
715
|
}), Or = (e) => {
|
|
716
716
|
const { __scopeDialog: t, forceMount: n, children: a, container: s } = e, o = ie(en, t);
|
|
717
|
-
return /* @__PURE__ */ f.jsx(Po, { scope: t, forceMount: n, children:
|
|
717
|
+
return /* @__PURE__ */ f.jsx(Po, { scope: t, forceMount: n, children: j.Children.map(a, (r) => /* @__PURE__ */ f.jsx(gt, { present: n || o.open, children: /* @__PURE__ */ f.jsx(Va, { asChild: !0, container: s, children: r }) })) });
|
|
718
718
|
};
|
|
719
719
|
Or.displayName = en;
|
|
720
|
-
var ut = "DialogOverlay", Cr =
|
|
720
|
+
var ut = "DialogOverlay", Cr = j.forwardRef(
|
|
721
721
|
(e, t) => {
|
|
722
722
|
const n = Tr(ut, e.__scopeDialog), { forceMount: a = n.forceMount, ...s } = e, o = ie(ut, e.__scopeDialog);
|
|
723
723
|
return o.modal ? /* @__PURE__ */ f.jsx(gt, { present: a || o.open, children: /* @__PURE__ */ f.jsx(Eo, { ...s, ref: t }) }) : null;
|
|
724
724
|
}
|
|
725
725
|
);
|
|
726
726
|
Cr.displayName = ut;
|
|
727
|
-
var Eo =
|
|
727
|
+
var Eo = j.forwardRef(
|
|
728
728
|
(e, t) => {
|
|
729
729
|
const { __scopeDialog: n, ...a } = e, s = ie(ut, n);
|
|
730
730
|
return (
|
|
@@ -741,17 +741,17 @@ var Eo = N.forwardRef(
|
|
|
741
741
|
) })
|
|
742
742
|
);
|
|
743
743
|
}
|
|
744
|
-
), Ne = "DialogContent", Pr =
|
|
744
|
+
), Ne = "DialogContent", Pr = j.forwardRef(
|
|
745
745
|
(e, t) => {
|
|
746
746
|
const n = Tr(Ne, e.__scopeDialog), { forceMount: a = n.forceMount, ...s } = e, o = ie(Ne, e.__scopeDialog);
|
|
747
747
|
return /* @__PURE__ */ f.jsx(gt, { present: a || o.open, children: o.modal ? /* @__PURE__ */ f.jsx(Ro, { ...s, ref: t }) : /* @__PURE__ */ f.jsx(Ao, { ...s, ref: t }) });
|
|
748
748
|
}
|
|
749
749
|
);
|
|
750
750
|
Pr.displayName = Ne;
|
|
751
|
-
var Ro =
|
|
751
|
+
var Ro = j.forwardRef(
|
|
752
752
|
(e, t) => {
|
|
753
|
-
const n = ie(Ne, e.__scopeDialog), a =
|
|
754
|
-
return
|
|
753
|
+
const n = ie(Ne, e.__scopeDialog), a = j.useRef(null), s = Yt(t, n.contentRef, a);
|
|
754
|
+
return j.useEffect(() => {
|
|
755
755
|
const o = a.current;
|
|
756
756
|
if (o) return Ua(o);
|
|
757
757
|
}, []), /* @__PURE__ */ f.jsx(
|
|
@@ -776,9 +776,9 @@ var Ro = N.forwardRef(
|
|
|
776
776
|
}
|
|
777
777
|
);
|
|
778
778
|
}
|
|
779
|
-
), Ao =
|
|
779
|
+
), Ao = j.forwardRef(
|
|
780
780
|
(e, t) => {
|
|
781
|
-
const n = ie(Ne, e.__scopeDialog), a =
|
|
781
|
+
const n = ie(Ne, e.__scopeDialog), a = j.useRef(!1), s = j.useRef(!1);
|
|
782
782
|
return /* @__PURE__ */ f.jsx(
|
|
783
783
|
Er,
|
|
784
784
|
{
|
|
@@ -799,9 +799,9 @@ var Ro = N.forwardRef(
|
|
|
799
799
|
}
|
|
800
800
|
);
|
|
801
801
|
}
|
|
802
|
-
), Er =
|
|
802
|
+
), Er = j.forwardRef(
|
|
803
803
|
(e, t) => {
|
|
804
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: o, ...r } = e, i = ie(Ne, n), l =
|
|
804
|
+
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: s, onCloseAutoFocus: o, ...r } = e, i = ie(Ne, n), l = j.useRef(null), c = Yt(t, l);
|
|
805
805
|
return Ma(), /* @__PURE__ */ f.jsxs(f.Fragment, { children: [
|
|
806
806
|
/* @__PURE__ */ f.jsx(
|
|
807
807
|
Ha,
|
|
@@ -832,21 +832,21 @@ var Ro = N.forwardRef(
|
|
|
832
832
|
] })
|
|
833
833
|
] });
|
|
834
834
|
}
|
|
835
|
-
), tn = "DialogTitle", Rr =
|
|
835
|
+
), tn = "DialogTitle", Rr = j.forwardRef(
|
|
836
836
|
(e, t) => {
|
|
837
837
|
const { __scopeDialog: n, ...a } = e, s = ie(tn, n);
|
|
838
838
|
return /* @__PURE__ */ f.jsx(me.h2, { id: s.titleId, ...a, ref: t });
|
|
839
839
|
}
|
|
840
840
|
);
|
|
841
841
|
Rr.displayName = tn;
|
|
842
|
-
var Ar = "DialogDescription", Fr =
|
|
842
|
+
var Ar = "DialogDescription", Fr = j.forwardRef(
|
|
843
843
|
(e, t) => {
|
|
844
844
|
const { __scopeDialog: n, ...a } = e, s = ie(Ar, n);
|
|
845
845
|
return /* @__PURE__ */ f.jsx(me.p, { id: s.descriptionId, ...a, ref: t });
|
|
846
846
|
}
|
|
847
847
|
);
|
|
848
848
|
Fr.displayName = Ar;
|
|
849
|
-
var qr = "DialogClose", Ir =
|
|
849
|
+
var qr = "DialogClose", Ir = j.forwardRef(
|
|
850
850
|
(e, t) => {
|
|
851
851
|
const { __scopeDialog: n, ...a } = e, s = ie(qr, n);
|
|
852
852
|
return /* @__PURE__ */ f.jsx(
|
|
@@ -864,7 +864,7 @@ Ir.displayName = qr;
|
|
|
864
864
|
function nn(e) {
|
|
865
865
|
return e ? "open" : "closed";
|
|
866
866
|
}
|
|
867
|
-
var _r = "DialogTitleWarning", [
|
|
867
|
+
var _r = "DialogTitleWarning", [Ru, Lr] = Da(_r, {
|
|
868
868
|
contentName: Ne,
|
|
869
869
|
titleName: tn,
|
|
870
870
|
docsSlug: "dialog"
|
|
@@ -874,18 +874,18 @@ var _r = "DialogTitleWarning", [Au, Lr] = Da(_r, {
|
|
|
874
874
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
875
875
|
|
|
876
876
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
877
|
-
return
|
|
877
|
+
return j.useEffect(() => {
|
|
878
878
|
e && (document.getElementById(e) || console.error(n));
|
|
879
879
|
}, [n, e]), null;
|
|
880
880
|
}, qo = "DialogDescriptionWarning", Io = ({ contentRef: e, descriptionId: t }) => {
|
|
881
881
|
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Lr(qo).contentName}}.`;
|
|
882
|
-
return
|
|
882
|
+
return j.useEffect(() => {
|
|
883
883
|
var o;
|
|
884
884
|
const s = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
885
885
|
t && s && (document.getElementById(t) || console.warn(a));
|
|
886
886
|
}, [a, e, t]), null;
|
|
887
887
|
}, _o = wr, Lo = Nr, Uo = Or, Ur = Cr, Mr = Pr, Hr = Rr, Br = Fr, Mo = Ir;
|
|
888
|
-
const Ho = _o, Bo = Lo, Do = Uo, Dr =
|
|
888
|
+
const Ho = _o, Bo = Lo, Do = Uo, Dr = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
889
889
|
Ur,
|
|
890
890
|
{
|
|
891
891
|
ref: n,
|
|
@@ -897,7 +897,7 @@ const Ho = _o, Bo = Lo, Do = Uo, Dr = N.forwardRef(({ className: e, ...t }, n) =
|
|
|
897
897
|
}
|
|
898
898
|
));
|
|
899
899
|
Dr.displayName = Ur.displayName;
|
|
900
|
-
const Vr =
|
|
900
|
+
const Vr = j.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ f.jsxs(Do, { children: [
|
|
901
901
|
/* @__PURE__ */ f.jsx(Dr, {}),
|
|
902
902
|
/* @__PURE__ */ f.jsxs(
|
|
903
903
|
Mr,
|
|
@@ -919,7 +919,7 @@ const Vr = N.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__
|
|
|
919
919
|
)
|
|
920
920
|
] }));
|
|
921
921
|
Vr.displayName = Mr.displayName;
|
|
922
|
-
const
|
|
922
|
+
const Wr = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
923
923
|
Hr,
|
|
924
924
|
{
|
|
925
925
|
ref: n,
|
|
@@ -930,8 +930,8 @@ const zr = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
930
930
|
...t
|
|
931
931
|
}
|
|
932
932
|
));
|
|
933
|
-
|
|
934
|
-
const Vo =
|
|
933
|
+
Wr.displayName = Hr.displayName;
|
|
934
|
+
const Vo = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
935
935
|
Br,
|
|
936
936
|
{
|
|
937
937
|
ref: n,
|
|
@@ -940,7 +940,7 @@ const Vo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
940
940
|
}
|
|
941
941
|
));
|
|
942
942
|
Vo.displayName = Br.displayName;
|
|
943
|
-
const rn =
|
|
943
|
+
const rn = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
944
944
|
"div",
|
|
945
945
|
{
|
|
946
946
|
ref: n,
|
|
@@ -952,7 +952,7 @@ const rn = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
952
952
|
}
|
|
953
953
|
));
|
|
954
954
|
rn.displayName = "Card";
|
|
955
|
-
const
|
|
955
|
+
const Wo = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
956
956
|
"div",
|
|
957
957
|
{
|
|
958
958
|
ref: n,
|
|
@@ -960,8 +960,8 @@ const zo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
960
960
|
...t
|
|
961
961
|
}
|
|
962
962
|
));
|
|
963
|
-
|
|
964
|
-
const
|
|
963
|
+
Wo.displayName = "CardHeader";
|
|
964
|
+
const zo = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
965
965
|
"h3",
|
|
966
966
|
{
|
|
967
967
|
ref: n,
|
|
@@ -969,8 +969,8 @@ const Wo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
969
969
|
...t
|
|
970
970
|
}
|
|
971
971
|
));
|
|
972
|
-
|
|
973
|
-
const Jo =
|
|
972
|
+
zo.displayName = "CardTitle";
|
|
973
|
+
const Jo = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
974
974
|
"p",
|
|
975
975
|
{
|
|
976
976
|
ref: n,
|
|
@@ -979,9 +979,9 @@ const Jo = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
979
979
|
}
|
|
980
980
|
));
|
|
981
981
|
Jo.displayName = "CardDescription";
|
|
982
|
-
const Go =
|
|
982
|
+
const Go = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx("div", { ref: n, className: A("p-6 pt-0", e), ...t }));
|
|
983
983
|
Go.displayName = "CardContent";
|
|
984
|
-
const Ko =
|
|
984
|
+
const Ko = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
985
985
|
"div",
|
|
986
986
|
{
|
|
987
987
|
ref: n,
|
|
@@ -990,9 +990,9 @@ const Ko = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
990
990
|
}
|
|
991
991
|
));
|
|
992
992
|
Ko.displayName = "CardFooter";
|
|
993
|
-
var an = "Tabs", [Qo,
|
|
993
|
+
var an = "Tabs", [Qo, Au] = dr(an, [
|
|
994
994
|
vr
|
|
995
|
-
]),
|
|
995
|
+
]), zr = vr(), [Yo, on] = Qo(an), Jr = j.forwardRef(
|
|
996
996
|
(e, t) => {
|
|
997
997
|
const {
|
|
998
998
|
__scopeTabs: n,
|
|
@@ -1003,7 +1003,7 @@ var an = "Tabs", [Qo, Fu] = dr(an, [
|
|
|
1003
1003
|
dir: i,
|
|
1004
1004
|
activationMode: l = "automatic",
|
|
1005
1005
|
...c
|
|
1006
|
-
} = e, u =
|
|
1006
|
+
} = e, u = Wa(i), [p, d] = pr({
|
|
1007
1007
|
prop: a,
|
|
1008
1008
|
onChange: s,
|
|
1009
1009
|
defaultProp: o
|
|
@@ -1032,9 +1032,9 @@ var an = "Tabs", [Qo, Fu] = dr(an, [
|
|
|
1032
1032
|
}
|
|
1033
1033
|
);
|
|
1034
1034
|
Jr.displayName = an;
|
|
1035
|
-
var Gr = "TabsList", Kr =
|
|
1035
|
+
var Gr = "TabsList", Kr = j.forwardRef(
|
|
1036
1036
|
(e, t) => {
|
|
1037
|
-
const { __scopeTabs: n, loop: a = !0, ...s } = e, o = on(Gr, n), r =
|
|
1037
|
+
const { __scopeTabs: n, loop: a = !0, ...s } = e, o = on(Gr, n), r = zr(n);
|
|
1038
1038
|
return /* @__PURE__ */ f.jsx(
|
|
1039
1039
|
yo,
|
|
1040
1040
|
{
|
|
@@ -1057,9 +1057,9 @@ var Gr = "TabsList", Kr = N.forwardRef(
|
|
|
1057
1057
|
}
|
|
1058
1058
|
);
|
|
1059
1059
|
Kr.displayName = Gr;
|
|
1060
|
-
var Qr = "TabsTrigger", Yr =
|
|
1060
|
+
var Qr = "TabsTrigger", Yr = j.forwardRef(
|
|
1061
1061
|
(e, t) => {
|
|
1062
|
-
const { __scopeTabs: n, value: a, disabled: s = !1, ...o } = e, r = on(Qr, n), i =
|
|
1062
|
+
const { __scopeTabs: n, value: a, disabled: s = !1, ...o } = e, r = on(Qr, n), i = zr(n), l = ea(r.baseId, a), c = ta(r.baseId, a), u = a === r.value;
|
|
1063
1063
|
return /* @__PURE__ */ f.jsx(
|
|
1064
1064
|
go,
|
|
1065
1065
|
{
|
|
@@ -1097,10 +1097,10 @@ var Qr = "TabsTrigger", Yr = N.forwardRef(
|
|
|
1097
1097
|
}
|
|
1098
1098
|
);
|
|
1099
1099
|
Yr.displayName = Qr;
|
|
1100
|
-
var Xr = "TabsContent", Zr =
|
|
1100
|
+
var Xr = "TabsContent", Zr = j.forwardRef(
|
|
1101
1101
|
(e, t) => {
|
|
1102
|
-
const { __scopeTabs: n, value: a, forceMount: s, children: o, ...r } = e, i = on(Xr, n), l = ea(i.baseId, a), c = ta(i.baseId, a), u = a === i.value, p =
|
|
1103
|
-
return
|
|
1102
|
+
const { __scopeTabs: n, value: a, forceMount: s, children: o, ...r } = e, i = on(Xr, n), l = ea(i.baseId, a), c = ta(i.baseId, a), u = a === i.value, p = j.useRef(u);
|
|
1103
|
+
return j.useEffect(() => {
|
|
1104
1104
|
const d = requestAnimationFrame(() => p.current = !1);
|
|
1105
1105
|
return () => cancelAnimationFrame(d);
|
|
1106
1106
|
}, []), /* @__PURE__ */ f.jsx(gt, { present: s || u, children: ({ present: d }) => /* @__PURE__ */ f.jsx(
|
|
@@ -1132,7 +1132,7 @@ function ta(e, t) {
|
|
|
1132
1132
|
return `${e}-content-${t}`;
|
|
1133
1133
|
}
|
|
1134
1134
|
var na = Jr, sn = Kr, ln = Yr, cn = Zr;
|
|
1135
|
-
const Nn = na, _t =
|
|
1135
|
+
const Nn = na, _t = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1136
1136
|
sn,
|
|
1137
1137
|
{
|
|
1138
1138
|
ref: n,
|
|
@@ -1144,7 +1144,7 @@ const Nn = na, _t = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */
|
|
|
1144
1144
|
}
|
|
1145
1145
|
));
|
|
1146
1146
|
_t.displayName = sn.displayName;
|
|
1147
|
-
const Ce =
|
|
1147
|
+
const Ce = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1148
1148
|
ln,
|
|
1149
1149
|
{
|
|
1150
1150
|
ref: n,
|
|
@@ -1156,7 +1156,7 @@ const Ce = N.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
|
1156
1156
|
}
|
|
1157
1157
|
));
|
|
1158
1158
|
Ce.displayName = ln.displayName;
|
|
1159
|
-
const Pe =
|
|
1159
|
+
const Pe = j.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f.jsx(
|
|
1160
1160
|
cn,
|
|
1161
1161
|
{
|
|
1162
1162
|
ref: n,
|
|
@@ -1209,8 +1209,8 @@ const Xo = async (e, t, n = 5e3) => {
|
|
|
1209
1209
|
});
|
|
1210
1210
|
};
|
|
1211
1211
|
return i.current.addEventListener("mouseenter", m), i.current.addEventListener("mouseleave", h), () => {
|
|
1212
|
-
var y,
|
|
1213
|
-
(y = i.current) == null || y.removeEventListener("mouseenter", m), (
|
|
1212
|
+
var y, v;
|
|
1213
|
+
(y = i.current) == null || y.removeEventListener("mouseenter", m), (v = i.current) == null || v.removeEventListener("mouseleave", h);
|
|
1214
1214
|
};
|
|
1215
1215
|
}, [c]), /* @__PURE__ */ f.jsxs(
|
|
1216
1216
|
"span",
|
|
@@ -1232,20 +1232,18 @@ const Xo = async (e, t, n = 5e3) => {
|
|
|
1232
1232
|
}
|
|
1233
1233
|
);
|
|
1234
1234
|
}, ti = (e, t, n) => {
|
|
1235
|
-
const a = t.replace(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
}
|
|
1241
|
-
), s = new URL(a, e);
|
|
1235
|
+
const a = t.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
1236
|
+
var l;
|
|
1237
|
+
const r = o.replace(/[:{}]/g, "");
|
|
1238
|
+
return ((l = n.pathParams.find((c) => c.name === r)) == null ? void 0 : l.value) ?? o;
|
|
1239
|
+
}), s = new URL(a, e);
|
|
1242
1240
|
return n.queryParams.filter((o) => o.active).forEach((o) => {
|
|
1243
1241
|
s.searchParams.set(o.name, o.value);
|
|
1244
1242
|
}), s;
|
|
1245
1243
|
}, ni = (e, t) => {
|
|
1246
|
-
const n =
|
|
1244
|
+
const n = j.forwardRef(({ className: a, asChild: s, ...o }, r) => {
|
|
1247
1245
|
const i = s ? fr : e;
|
|
1248
|
-
return
|
|
1246
|
+
return j.createElement(i, {
|
|
1249
1247
|
...o,
|
|
1250
1248
|
ref: r,
|
|
1251
1249
|
className: A(t, a)
|
|
@@ -1560,23 +1558,7 @@ const Xo = async (e, t, n = 5e3) => {
|
|
|
1560
1558
|
}
|
|
1561
1559
|
) })
|
|
1562
1560
|
] });
|
|
1563
|
-
}, Be = "__none"
|
|
1564
|
-
function ui(e) {
|
|
1565
|
-
var n;
|
|
1566
|
-
return (n = Object.entries({
|
|
1567
|
-
"application/json": "json",
|
|
1568
|
-
"text/json": "json",
|
|
1569
|
-
"text/html": "html",
|
|
1570
|
-
"text/css": "css",
|
|
1571
|
-
"text/javascript": "javascript",
|
|
1572
|
-
"application/xml": "xml",
|
|
1573
|
-
"application/xhtml+xml": "xhtml",
|
|
1574
|
-
"text/plain": "plain"
|
|
1575
|
-
}).find(
|
|
1576
|
-
([a]) => e.includes(a)
|
|
1577
|
-
)) == null ? void 0 : n[1];
|
|
1578
|
-
}
|
|
1579
|
-
const di = {
|
|
1561
|
+
}, Be = "__none", ui = {
|
|
1580
1562
|
200: "OK",
|
|
1581
1563
|
201: "Created",
|
|
1582
1564
|
202: "Accepted",
|
|
@@ -1587,7 +1569,7 @@ const di = {
|
|
|
1587
1569
|
404: "Not Found",
|
|
1588
1570
|
405: "Method Not Allowed",
|
|
1589
1571
|
500: "Internal Server Error"
|
|
1590
|
-
},
|
|
1572
|
+
}, di = ({
|
|
1591
1573
|
server: e,
|
|
1592
1574
|
url: t,
|
|
1593
1575
|
method: n,
|
|
@@ -1596,7 +1578,7 @@ const di = {
|
|
|
1596
1578
|
pathParams: o = [],
|
|
1597
1579
|
defaultBody: r = ""
|
|
1598
1580
|
}) => {
|
|
1599
|
-
var w, S
|
|
1581
|
+
var w, S;
|
|
1600
1582
|
const { register: i, control: l, handleSubmit: c, watch: u, setValue: p, ...d } = ro({
|
|
1601
1583
|
defaultValues: {
|
|
1602
1584
|
body: r,
|
|
@@ -1617,57 +1599,53 @@ const di = {
|
|
|
1617
1599
|
}
|
|
1618
1600
|
}), m = u(), h = qa(), y = hr(!1);
|
|
1619
1601
|
yr(() => {
|
|
1620
|
-
var
|
|
1602
|
+
var C;
|
|
1621
1603
|
if (y.current) return;
|
|
1622
|
-
const k = (
|
|
1604
|
+
const k = (C = h.data) == null ? void 0 : C.at(0);
|
|
1623
1605
|
k && (p("identity", k.id), y.current = !0);
|
|
1624
1606
|
}, [p, h.data]);
|
|
1625
|
-
const
|
|
1607
|
+
const v = ao({
|
|
1626
1608
|
mutationFn: async (k) => {
|
|
1627
|
-
var
|
|
1628
|
-
const
|
|
1609
|
+
var I, H;
|
|
1610
|
+
const C = ti(e, t, k), P = performance.now(), R = new Request(C, {
|
|
1629
1611
|
method: n.toUpperCase(),
|
|
1630
1612
|
headers: Object.fromEntries(
|
|
1631
|
-
k.headers.filter((
|
|
1613
|
+
k.headers.filter((L) => L.name).map((L) => [L.name, L.value])
|
|
1632
1614
|
)
|
|
1633
1615
|
});
|
|
1634
|
-
k.identity !== Be && ((H = (
|
|
1635
|
-
const
|
|
1616
|
+
k.identity !== Be && ((H = (I = h.data) == null ? void 0 : I.find((L) => L.id === k.identity)) == null || H.authorizeRequest(R));
|
|
1617
|
+
const q = await Xo(R), G = performance.now() - P, K = await q.text();
|
|
1636
1618
|
return {
|
|
1637
|
-
status:
|
|
1638
|
-
headers:
|
|
1639
|
-
size:
|
|
1640
|
-
body:
|
|
1641
|
-
time:
|
|
1619
|
+
status: q.status,
|
|
1620
|
+
headers: q.headers,
|
|
1621
|
+
size: K.length,
|
|
1622
|
+
body: K,
|
|
1623
|
+
time: G
|
|
1642
1624
|
};
|
|
1643
1625
|
}
|
|
1644
|
-
}), b = t.split("/").map((k,
|
|
1645
|
-
var
|
|
1646
|
-
const
|
|
1626
|
+
}), b = t.split("/").map((k, C, P) => {
|
|
1627
|
+
var I;
|
|
1628
|
+
const R = k.startsWith("{") && k.endsWith("}") || k.startsWith(":"), q = k.replace(/[:{}]/g, ""), G = (I = m.pathParams.find((H) => H.name === q)) == null ? void 0 : I.value, K = G ? /* @__PURE__ */ f.jsx(un, { backgroundOpacity: "25%", name: k, slug: k, children: encodeURIComponent(G) }) : /* @__PURE__ */ f.jsx(
|
|
1647
1629
|
"span",
|
|
1648
1630
|
{
|
|
1649
1631
|
className: "underline decoration-wavy decoration-red-500",
|
|
1650
|
-
title: `Missing value for path parameter \`${
|
|
1632
|
+
title: `Missing value for path parameter \`${q}\``,
|
|
1651
1633
|
children: k
|
|
1652
1634
|
}
|
|
1653
1635
|
);
|
|
1654
1636
|
return (
|
|
1655
1637
|
// eslint-disable-next-line react/no-array-index-key
|
|
1656
1638
|
/* @__PURE__ */ f.jsxs(at, { children: [
|
|
1657
|
-
|
|
1658
|
-
|
|
1639
|
+
R ? K : k,
|
|
1640
|
+
C < P.length - 1 && "/",
|
|
1659
1641
|
/* @__PURE__ */ f.jsx("wbr", {})
|
|
1660
|
-
] }, k +
|
|
1642
|
+
] }, k + C)
|
|
1661
1643
|
);
|
|
1662
|
-
})
|
|
1663
|
-
ui(
|
|
1664
|
-
((w = g.data) == null ? void 0 : w.headers.get("Content-Type")) ?? ""
|
|
1665
|
-
);
|
|
1666
|
-
const v = Array.from(((S = g.data) == null ? void 0 : S.headers.entries()) ?? []), x = m.queryParams.filter((k) => k.active).map((k, O, R) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
1644
|
+
}), g = Array.from(((w = v.data) == null ? void 0 : w.headers.entries()) ?? []), x = m.queryParams.filter((k) => k.active).map((k, C, P) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
1667
1645
|
k.name,
|
|
1668
1646
|
"=",
|
|
1669
1647
|
encodeURIComponent(k.value).replaceAll("%20", "+"),
|
|
1670
|
-
|
|
1648
|
+
C < P.length - 1 && "&",
|
|
1671
1649
|
/* @__PURE__ */ f.jsx("wbr", {})
|
|
1672
1650
|
] }, k.name));
|
|
1673
1651
|
return /* @__PURE__ */ f.jsx(
|
|
@@ -1679,7 +1657,7 @@ const di = {
|
|
|
1679
1657
|
watch: u,
|
|
1680
1658
|
setValue: p,
|
|
1681
1659
|
...d,
|
|
1682
|
-
children: /* @__PURE__ */ f.jsx("form", { onSubmit: c((k) =>
|
|
1660
|
+
children: /* @__PURE__ */ f.jsx("form", { onSubmit: c((k) => v.mutateAsync(k)), children: /* @__PURE__ */ f.jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [
|
|
1683
1661
|
/* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
1684
1662
|
/* @__PURE__ */ f.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1685
1663
|
/* @__PURE__ */ f.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
@@ -1728,7 +1706,7 @@ const di = {
|
|
|
1728
1706
|
/* @__PURE__ */ f.jsx(so, { className: "w-[180px] flex", children: h.isPending ? /* @__PURE__ */ f.jsx(jn, {}) : /* @__PURE__ */ f.jsx(lo, {}) }),
|
|
1729
1707
|
/* @__PURE__ */ f.jsxs(co, { align: "center", children: [
|
|
1730
1708
|
/* @__PURE__ */ f.jsx(wn, { value: Be, children: "None" }),
|
|
1731
|
-
(
|
|
1709
|
+
(S = h.data) == null ? void 0 : S.map((k) => /* @__PURE__ */ f.jsx(wn, { value: k.id, children: k.label }, k.id))
|
|
1732
1710
|
] })
|
|
1733
1711
|
]
|
|
1734
1712
|
}
|
|
@@ -1757,51 +1735,51 @@ const di = {
|
|
|
1757
1735
|
}
|
|
1758
1736
|
)
|
|
1759
1737
|
] }),
|
|
1760
|
-
/* @__PURE__ */ f.jsx("div", { className: "flex flex-col gap-4 p-8 bg-muted/70", children:
|
|
1738
|
+
/* @__PURE__ */ f.jsx("div", { className: "flex flex-col gap-4 p-8 bg-muted/70", children: v.error ? /* @__PURE__ */ f.jsxs("div", { children: [
|
|
1761
1739
|
"Error:",
|
|
1762
1740
|
" ",
|
|
1763
|
-
|
|
1764
|
-
] }) :
|
|
1741
|
+
v.error.message || String(v.error) || "Unexpected error"
|
|
1742
|
+
] }) : v.data ? /* @__PURE__ */ f.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1765
1743
|
/* @__PURE__ */ f.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ f.jsxs("div", { className: "flex text-xs gap-6", children: [
|
|
1766
1744
|
/* @__PURE__ */ f.jsxs("div", { children: [
|
|
1767
1745
|
"Status: ",
|
|
1768
|
-
|
|
1746
|
+
v.data.status,
|
|
1769
1747
|
" ",
|
|
1770
|
-
|
|
1748
|
+
ui[v.data.status] ?? ""
|
|
1771
1749
|
] }),
|
|
1772
1750
|
/* @__PURE__ */ f.jsxs("div", { children: [
|
|
1773
1751
|
"Time: ",
|
|
1774
|
-
|
|
1752
|
+
v.data.time.toFixed(0),
|
|
1775
1753
|
"ms"
|
|
1776
1754
|
] }),
|
|
1777
1755
|
/* @__PURE__ */ f.jsxs("div", { children: [
|
|
1778
1756
|
"Size: ",
|
|
1779
|
-
|
|
1757
|
+
v.data.size,
|
|
1780
1758
|
" B"
|
|
1781
1759
|
] })
|
|
1782
1760
|
] }) }),
|
|
1783
1761
|
/* @__PURE__ */ f.jsxs(Nn, { defaultValue: "response", children: [
|
|
1784
1762
|
/* @__PURE__ */ f.jsxs(_t, { children: [
|
|
1785
1763
|
/* @__PURE__ */ f.jsx(Ce, { value: "response", children: "Response" }),
|
|
1786
|
-
/* @__PURE__ */ f.jsx(Ce, { value: "headers", children:
|
|
1764
|
+
/* @__PURE__ */ f.jsx(Ce, { value: "headers", children: g.length ? `Headers (${g.length})` : "No headers" })
|
|
1787
1765
|
] }),
|
|
1788
1766
|
/* @__PURE__ */ f.jsx(Pe, { value: "response", children: /* @__PURE__ */ f.jsx(
|
|
1789
1767
|
ci,
|
|
1790
1768
|
{
|
|
1791
|
-
headers:
|
|
1792
|
-
body:
|
|
1769
|
+
headers: v.data.headers,
|
|
1770
|
+
body: v.data.body
|
|
1793
1771
|
}
|
|
1794
1772
|
) }),
|
|
1795
1773
|
/* @__PURE__ */ f.jsx(Pe, { value: "headers", children: /* @__PURE__ */ f.jsxs(rn, { className: "grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4", children: [
|
|
1796
1774
|
/* @__PURE__ */ f.jsx("div", { className: "font-semibold", children: "Key" }),
|
|
1797
1775
|
/* @__PURE__ */ f.jsx("div", { className: "font-semibold", children: "Value" }),
|
|
1798
|
-
|
|
1776
|
+
g.map(([k, C]) => /* @__PURE__ */ f.jsxs(at, { children: [
|
|
1799
1777
|
/* @__PURE__ */ f.jsx("div", { children: k }),
|
|
1800
|
-
/* @__PURE__ */ f.jsx("div", { className: "break-words", children:
|
|
1778
|
+
/* @__PURE__ */ f.jsx("div", { className: "break-words", children: C })
|
|
1801
1779
|
] }, k))
|
|
1802
1780
|
] }) })
|
|
1803
1781
|
] })
|
|
1804
|
-
] }) : /* @__PURE__ */ f.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ f.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children:
|
|
1782
|
+
] }) : /* @__PURE__ */ f.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ f.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: v.isPending ? /* @__PURE__ */ f.jsx(jn, {}) : "Send a request first to see the response here" }) }) })
|
|
1805
1783
|
] }) })
|
|
1806
1784
|
}
|
|
1807
1785
|
);
|
|
@@ -1821,8 +1799,8 @@ const di = {
|
|
|
1821
1799
|
className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
|
|
1822
1800
|
"aria-describedby": void 0,
|
|
1823
1801
|
children: [
|
|
1824
|
-
/* @__PURE__ */ f.jsx(uo, { children: /* @__PURE__ */ f.jsx(
|
|
1825
|
-
t && /* @__PURE__ */ f.jsx(
|
|
1802
|
+
/* @__PURE__ */ f.jsx(uo, { children: /* @__PURE__ */ f.jsx(Wr, { children: "Playground" }) }),
|
|
1803
|
+
t && /* @__PURE__ */ f.jsx(di, { ...e })
|
|
1826
1804
|
]
|
|
1827
1805
|
}
|
|
1828
1806
|
)
|
|
@@ -1832,7 +1810,7 @@ var Tn = (e, t) => {
|
|
|
1832
1810
|
const n = e[t.name];
|
|
1833
1811
|
return n === void 0 ? (e[t.name] = t.value, e) : Array.isArray(n) ? (n.push(t.value), e) : (e[t.name] = [n, t.value], e);
|
|
1834
1812
|
}, On = "", Cn = `
|
|
1835
|
-
`,
|
|
1813
|
+
`, O = class {
|
|
1836
1814
|
/**
|
|
1837
1815
|
* Helper object to format and aggragate lines of code.
|
|
1838
1816
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
@@ -1853,16 +1831,16 @@ var Tn = (e, t) => {
|
|
|
1853
1831
|
this.postProcessors = [...this.postProcessors, n];
|
|
1854
1832
|
}, this.indentationCharacter = e || On, this.lineJoin = t ?? Cn;
|
|
1855
1833
|
}
|
|
1856
|
-
},
|
|
1834
|
+
}, fi = function(e) {
|
|
1857
1835
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
1858
|
-
},
|
|
1836
|
+
}, pi = function(e) {
|
|
1859
1837
|
var t = typeof e;
|
|
1860
1838
|
return e !== null && (t === "object" || t === "function");
|
|
1861
1839
|
}, dn = {};
|
|
1862
1840
|
Object.defineProperty(dn, "__esModule", { value: !0 });
|
|
1863
1841
|
dn.default = (e) => Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
|
|
1864
|
-
const
|
|
1865
|
-
var
|
|
1842
|
+
const mi = fi, hi = pi, yi = dn.default;
|
|
1843
|
+
var gi = (e, t, n) => {
|
|
1866
1844
|
const a = [];
|
|
1867
1845
|
return function s(o, r, i) {
|
|
1868
1846
|
r = r || {}, r.indent = r.indent || " ", i = i || "";
|
|
@@ -1889,7 +1867,7 @@ var vi = (e, t, n) => {
|
|
|
1889
1867
|
};
|
|
1890
1868
|
if (a.indexOf(o) !== -1)
|
|
1891
1869
|
return '"[Circular]"';
|
|
1892
|
-
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" ||
|
|
1870
|
+
if (o == null || typeof o == "number" || typeof o == "boolean" || typeof o == "function" || typeof o == "symbol" || mi(o))
|
|
1893
1871
|
return String(o);
|
|
1894
1872
|
if (o instanceof Date)
|
|
1895
1873
|
return `new Date('${o.toISOString()}')`;
|
|
@@ -1904,15 +1882,15 @@ var vi = (e, t, n) => {
|
|
|
1904
1882
|
}).join("") + l.pad + "]";
|
|
1905
1883
|
return a.pop(), c(u);
|
|
1906
1884
|
}
|
|
1907
|
-
if (
|
|
1908
|
-
let u = Object.keys(o).concat(
|
|
1885
|
+
if (hi(o)) {
|
|
1886
|
+
let u = Object.keys(o).concat(yi(o));
|
|
1909
1887
|
if (r.filter && (u = u.filter((d) => r.filter(o, d))), u.length === 0)
|
|
1910
1888
|
return "{}";
|
|
1911
1889
|
a.push(o);
|
|
1912
1890
|
const p = "{" + l.newLine + u.map((d, m) => {
|
|
1913
|
-
const h = u.length - 1 === m ? l.newLine : "," + l.newLineOrSpace, y = typeof d == "symbol",
|
|
1914
|
-
let
|
|
1915
|
-
return r.transform && (
|
|
1891
|
+
const h = u.length - 1 === m ? l.newLine : "," + l.newLineOrSpace, y = typeof d == "symbol", v = !y && /^[a-z$_][a-z$_0-9]*$/i.test(d), b = y || v ? d : s(d, r);
|
|
1892
|
+
let g = s(o[d], r, i + r.indent);
|
|
1893
|
+
return r.transform && (g = r.transform(o, d, g)), l.indent + String(b) + ": " + g + h;
|
|
1916
1894
|
}).join("") + l.pad + "}";
|
|
1917
1895
|
return a.pop(), c(p);
|
|
1918
1896
|
}
|
|
@@ -1920,13 +1898,13 @@ var vi = (e, t, n) => {
|
|
|
1920
1898
|
` ? "\\n" : "\\r"), r.singleQuotes === !1 ? (o = o.replace(/"/g, '\\"'), `"${o}"`) : (o = o.replace(/\\?'/g, "\\'"), `'${o}'`);
|
|
1921
1899
|
}(e, t, n);
|
|
1922
1900
|
};
|
|
1923
|
-
const
|
|
1924
|
-
function
|
|
1901
|
+
const J = /* @__PURE__ */ vo(gi);
|
|
1902
|
+
function ze(e, t = {}) {
|
|
1925
1903
|
const { delimiter: n = '"', escapeChar: a = "\\", escapeNewlines: s = !0 } = t;
|
|
1926
1904
|
return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
|
|
1927
1905
|
` ? s ? `${a}n` : r : r === "\f" ? `${a}f` : r === "\r" ? s ? `${a}r` : r : r === a ? a + a : r === n ? a + n : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
|
|
1928
1906
|
}
|
|
1929
|
-
var Je = (e) =>
|
|
1907
|
+
var Je = (e) => ze(e, { delimiter: "'" }), V = (e) => ze(e, { delimiter: '"' }), vi = {
|
|
1930
1908
|
info: {
|
|
1931
1909
|
key: "libcurl",
|
|
1932
1910
|
title: "Libcurl",
|
|
@@ -1935,14 +1913,14 @@ var Je = (e) => We(e, { delimiter: "'" }), W = (e) => We(e, { delimiter: '"' }),
|
|
|
1935
1913
|
extname: ".c"
|
|
1936
1914
|
},
|
|
1937
1915
|
convert: ({ method: e, fullUrl: t, headersObj: n, allHeaders: a, postData: s }) => {
|
|
1938
|
-
const { push: o, blank: r, join: i } = new
|
|
1916
|
+
const { push: o, blank: r, join: i } = new O();
|
|
1939
1917
|
o("CURL *hnd = curl_easy_init();"), r(), o(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), o("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), o(`curl_easy_setopt(hnd, CURLOPT_URL, "${t}");`);
|
|
1940
1918
|
const l = Object.keys(n);
|
|
1941
1919
|
return l.length && (r(), o("struct curl_slist *headers = NULL;"), l.forEach((c) => {
|
|
1942
|
-
o(`headers = curl_slist_append(headers, "${c}: ${
|
|
1920
|
+
o(`headers = curl_slist_append(headers, "${c}: ${V(n[c])}");`);
|
|
1943
1921
|
}), o("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), o(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), s.text && (r(), o(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), r(), o("CURLcode ret = curl_easy_perform(hnd);"), i();
|
|
1944
1922
|
}
|
|
1945
|
-
},
|
|
1923
|
+
}, bi = {
|
|
1946
1924
|
info: {
|
|
1947
1925
|
key: "c",
|
|
1948
1926
|
title: "C",
|
|
@@ -1950,19 +1928,19 @@ var Je = (e) => We(e, { delimiter: "'" }), W = (e) => We(e, { delimiter: '"' }),
|
|
|
1950
1928
|
cli: "c"
|
|
1951
1929
|
},
|
|
1952
1930
|
clientsById: {
|
|
1953
|
-
libcurl:
|
|
1931
|
+
libcurl: vi
|
|
1954
1932
|
}
|
|
1955
|
-
},
|
|
1956
|
-
const n =
|
|
1933
|
+
}, Y = (e, t) => Object.keys(e).find((n) => n.toLowerCase() === t.toLowerCase()), de = (e, t) => {
|
|
1934
|
+
const n = Y(e, t);
|
|
1957
1935
|
if (n)
|
|
1958
1936
|
return e[n];
|
|
1959
|
-
}, vt = (e, t) => !!
|
|
1937
|
+
}, vt = (e, t) => !!Y(e, t), xi = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
|
|
1960
1938
|
(t) => e.indexOf(t) > -1
|
|
1961
1939
|
), Pn = class {
|
|
1962
1940
|
constructor(e) {
|
|
1963
1941
|
this.name = "", this.toString = () => `:${this.name}`, this.name = e;
|
|
1964
1942
|
}
|
|
1965
|
-
},
|
|
1943
|
+
}, ki = class {
|
|
1966
1944
|
constructor(e) {
|
|
1967
1945
|
this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
|
|
1968
1946
|
}
|
|
@@ -1999,7 +1977,7 @@ ${n}`);
|
|
|
1999
1977
|
default:
|
|
2000
1978
|
return e.toString();
|
|
2001
1979
|
}
|
|
2002
|
-
},
|
|
1980
|
+
}, $i = {
|
|
2003
1981
|
info: {
|
|
2004
1982
|
key: "clj_http",
|
|
2005
1983
|
title: "clj-http",
|
|
@@ -2008,7 +1986,7 @@ ${n}`);
|
|
|
2008
1986
|
extname: ".clj"
|
|
2009
1987
|
},
|
|
2010
1988
|
convert: ({ queryObj: e, method: t, postData: n, url: a, allHeaders: s }, o) => {
|
|
2011
|
-
const { push: r, join: i } = new
|
|
1989
|
+
const { push: r, join: i } = new O({ indent: o == null ? void 0 : o.indent }), l = ["get", "post", "put", "delete", "patch", "head", "options"];
|
|
2012
1990
|
if (t = t.toLowerCase(), !l.includes(t))
|
|
2013
1991
|
return r("Method not supported"), i();
|
|
2014
1992
|
const c = {
|
|
@@ -2019,21 +1997,21 @@ ${n}`);
|
|
|
2019
1997
|
case "application/json":
|
|
2020
1998
|
{
|
|
2021
1999
|
c["content-type"] = new Pn("json"), c["form-params"] = n.jsonObj;
|
|
2022
|
-
const u =
|
|
2000
|
+
const u = Y(c.headers, "content-type");
|
|
2023
2001
|
u && delete c.headers[u];
|
|
2024
2002
|
}
|
|
2025
2003
|
break;
|
|
2026
2004
|
case "application/x-www-form-urlencoded":
|
|
2027
2005
|
{
|
|
2028
2006
|
c["form-params"] = n.paramsObj;
|
|
2029
|
-
const u =
|
|
2007
|
+
const u = Y(c.headers, "content-type");
|
|
2030
2008
|
u && delete c.headers[u];
|
|
2031
2009
|
}
|
|
2032
2010
|
break;
|
|
2033
2011
|
case "text/plain":
|
|
2034
2012
|
{
|
|
2035
2013
|
c.body = n.text;
|
|
2036
|
-
const u =
|
|
2014
|
+
const u = Y(c.headers, "content-type");
|
|
2037
2015
|
u && delete c.headers[u];
|
|
2038
2016
|
}
|
|
2039
2017
|
break;
|
|
@@ -2041,12 +2019,12 @@ ${n}`);
|
|
|
2041
2019
|
if (n.params) {
|
|
2042
2020
|
c.multipart = n.params.map((p) => p.fileName && !p.value ? {
|
|
2043
2021
|
name: p.name,
|
|
2044
|
-
content: new
|
|
2022
|
+
content: new ki(p.fileName)
|
|
2045
2023
|
} : {
|
|
2046
2024
|
name: p.name,
|
|
2047
2025
|
content: p.value
|
|
2048
2026
|
});
|
|
2049
|
-
const u =
|
|
2027
|
+
const u = Y(c.headers, "content-type");
|
|
2050
2028
|
u && delete c.headers[u];
|
|
2051
2029
|
}
|
|
2052
2030
|
break;
|
|
@@ -2056,7 +2034,7 @@ ${n}`);
|
|
|
2056
2034
|
case "application/json":
|
|
2057
2035
|
{
|
|
2058
2036
|
c.accept = new Pn("json");
|
|
2059
|
-
const u =
|
|
2037
|
+
const u = Y(c.headers, "accept");
|
|
2060
2038
|
u && delete c.headers[u];
|
|
2061
2039
|
}
|
|
2062
2040
|
break;
|
|
@@ -2070,16 +2048,16 @@ ${n}`);
|
|
|
2070
2048
|
}
|
|
2071
2049
|
return i();
|
|
2072
2050
|
}
|
|
2073
|
-
},
|
|
2051
|
+
}, Si = {
|
|
2074
2052
|
info: {
|
|
2075
2053
|
key: "clojure",
|
|
2076
2054
|
title: "Clojure",
|
|
2077
2055
|
default: "clj_http"
|
|
2078
2056
|
},
|
|
2079
2057
|
clientsById: {
|
|
2080
|
-
clj_http:
|
|
2058
|
+
clj_http: $i
|
|
2081
2059
|
}
|
|
2082
|
-
},
|
|
2060
|
+
}, wi = (e) => {
|
|
2083
2061
|
let t = de(e, "accept-encoding");
|
|
2084
2062
|
if (!t)
|
|
2085
2063
|
return [];
|
|
@@ -2096,7 +2074,7 @@ ${n}`);
|
|
|
2096
2074
|
}
|
|
2097
2075
|
});
|
|
2098
2076
|
}), a;
|
|
2099
|
-
},
|
|
2077
|
+
}, ji = {
|
|
2100
2078
|
info: {
|
|
2101
2079
|
key: "httpclient",
|
|
2102
2080
|
title: "HttpClient",
|
|
@@ -2109,10 +2087,10 @@ ${n}`);
|
|
|
2109
2087
|
const o = {
|
|
2110
2088
|
indent: " ",
|
|
2111
2089
|
...s
|
|
2112
|
-
}, { push: r, join: i } = new
|
|
2090
|
+
}, { push: r, join: i } = new O({ indent: o.indent });
|
|
2113
2091
|
r("using System.Net.Http.Headers;");
|
|
2114
2092
|
let l = "";
|
|
2115
|
-
const c = !!e.cookie, u =
|
|
2093
|
+
const c = !!e.cookie, u = wi(e);
|
|
2116
2094
|
(c || u.length) && (l = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), u.length && r(`AutomaticDecompression = ${u.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${l});`), r("var request = new HttpRequestMessage"), r("{");
|
|
2117
2095
|
const p = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
|
|
2118
2096
|
n = n.toUpperCase(), n && p.includes(n) ? n = `HttpMethod.${n[0]}${n.substring(1).toLowerCase()}` : n = `new HttpMethod("${n}")`, r(`Method = ${n},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
|
|
@@ -2127,18 +2105,18 @@ ${n}`);
|
|
|
2127
2105
|
}
|
|
2128
2106
|
});
|
|
2129
2107
|
if (d.length && (r("Headers =", 1), r("{", 1), d.forEach((y) => {
|
|
2130
|
-
r(`{ "${y}", "${
|
|
2108
|
+
r(`{ "${y}", "${V(e[y])}" },`, 2);
|
|
2131
2109
|
}), r("},", 1)), t.text) {
|
|
2132
2110
|
const y = t.mimeType;
|
|
2133
2111
|
switch (y) {
|
|
2134
2112
|
case "application/x-www-form-urlencoded":
|
|
2135
|
-
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (m = t.params) == null || m.forEach((
|
|
2136
|
-
r(`{ "${
|
|
2113
|
+
r("Content = new FormUrlEncodedContent(new Dictionary<string, string>", 1), r("{", 1), (m = t.params) == null || m.forEach((v) => {
|
|
2114
|
+
r(`{ "${v.name}", "${v.value}" },`, 2);
|
|
2137
2115
|
}), r("}),", 1);
|
|
2138
2116
|
break;
|
|
2139
2117
|
case "multipart/form-data":
|
|
2140
|
-
r("Content = new MultipartFormDataContent", 1), r("{", 1), (h = t.params) == null || h.forEach((
|
|
2141
|
-
r(`new StringContent(${JSON.stringify(
|
|
2118
|
+
r("Content = new MultipartFormDataContent", 1), r("{", 1), (h = t.params) == null || h.forEach((v) => {
|
|
2119
|
+
r(`new StringContent(${JSON.stringify(v.value || "")})`, 2), r("{", 2), r("Headers =", 3), r("{", 3), v.contentType && r(`ContentType = new MediaTypeHeaderValue("${v.contentType}"),`, 4), r('ContentDisposition = new ContentDispositionHeaderValue("form-data")', 4), r("{", 4), r(`Name = "${v.name}",`, 5), v.fileName && r(`FileName = "${v.fileName}",`, 5), r("}", 4), r("}", 3), r("},", 2);
|
|
2142
2120
|
}), r("},", 1);
|
|
2143
2121
|
break;
|
|
2144
2122
|
default:
|
|
@@ -2149,10 +2127,10 @@ ${n}`);
|
|
|
2149
2127
|
return r("};"), r("using (var response = await client.SendAsync(request))"), r("{"), r("response.EnsureSuccessStatusCode();", 1), r("var body = await response.Content.ReadAsStringAsync();", 1), r("Console.WriteLine(body);", 1), r("}"), i();
|
|
2150
2128
|
}
|
|
2151
2129
|
};
|
|
2152
|
-
function
|
|
2130
|
+
function Ni(e) {
|
|
2153
2131
|
return e[0].toUpperCase() + e.slice(1).toLowerCase();
|
|
2154
2132
|
}
|
|
2155
|
-
var
|
|
2133
|
+
var Ti = {
|
|
2156
2134
|
info: {
|
|
2157
2135
|
key: "restsharp",
|
|
2158
2136
|
title: "RestSharp",
|
|
@@ -2162,7 +2140,7 @@ var Oi = {
|
|
|
2162
2140
|
installation: "dotnet add package RestSharp"
|
|
2163
2141
|
},
|
|
2164
2142
|
convert: ({ method: e, fullUrl: t, headersObj: n, cookies: a, postData: s, uriObj: o }) => {
|
|
2165
|
-
const { push: r, join: i } = new
|
|
2143
|
+
const { push: r, join: i } = new O();
|
|
2166
2144
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
|
|
2167
2145
|
e.toUpperCase()
|
|
2168
2146
|
))
|
|
@@ -2176,9 +2154,9 @@ var Oi = {
|
|
|
2176
2154
|
c && s.boundary && r(`request.FormBoundary = "${s.boundary}";`);
|
|
2177
2155
|
return;
|
|
2178
2156
|
}
|
|
2179
|
-
r(`request.AddHeader("${u}", "${
|
|
2157
|
+
r(`request.AddHeader("${u}", "${V(n[u])}");`);
|
|
2180
2158
|
}), a.forEach(({ name: u, value: p }) => {
|
|
2181
|
-
r(`request.AddCookie("${u}", "${
|
|
2159
|
+
r(`request.AddCookie("${u}", "${V(p)}", "${o.pathname}", "${o.host}");`);
|
|
2182
2160
|
}), s.mimeType) {
|
|
2183
2161
|
case "multipart/form-data":
|
|
2184
2162
|
if (!s.params) break;
|
|
@@ -2202,11 +2180,11 @@ var Oi = {
|
|
|
2202
2180
|
if (!s.text) break;
|
|
2203
2181
|
r(`request.AddStringBody("${s.text}", "${s.mimeType}");`);
|
|
2204
2182
|
}
|
|
2205
|
-
return r(`var response = await client.${
|
|
2183
|
+
return r(`var response = await client.${Ni(e)}Async(request);
|
|
2206
2184
|
`), r(`Console.WriteLine("{0}", response.Content);
|
|
2207
2185
|
`), i();
|
|
2208
2186
|
}
|
|
2209
|
-
},
|
|
2187
|
+
}, Oi = {
|
|
2210
2188
|
info: {
|
|
2211
2189
|
key: "csharp",
|
|
2212
2190
|
title: "C#",
|
|
@@ -2214,10 +2192,10 @@ var Oi = {
|
|
|
2214
2192
|
cli: "dotnet"
|
|
2215
2193
|
},
|
|
2216
2194
|
clientsById: {
|
|
2217
|
-
httpclient:
|
|
2218
|
-
restsharp:
|
|
2195
|
+
httpclient: ji,
|
|
2196
|
+
restsharp: Ti
|
|
2219
2197
|
}
|
|
2220
|
-
},
|
|
2198
|
+
}, Ci = {
|
|
2221
2199
|
info: {
|
|
2222
2200
|
key: "native",
|
|
2223
2201
|
title: "NewRequest",
|
|
@@ -2226,16 +2204,16 @@ var Oi = {
|
|
|
2226
2204
|
extname: ".go"
|
|
2227
2205
|
},
|
|
2228
2206
|
convert: ({ postData: e, method: t, allHeaders: n, fullUrl: a }, s = {}) => {
|
|
2229
|
-
const { blank: o, push: r, join: i } = new
|
|
2207
|
+
const { blank: o, push: r, join: i } = new O({ indent: " " }), { showBoilerplate: l = !0, checkErrors: c = !1, printBody: u = !0, timeout: p = -1 } = s, d = c ? "err" : "_", m = l ? 1 : 0, h = () => {
|
|
2230
2208
|
c && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
|
|
2231
2209
|
};
|
|
2232
2210
|
l && (r("package main"), o(), r("import ("), r('"fmt"', m), p > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), u && r('"io"', m), r(")"), o(), r("func main() {"), o());
|
|
2233
|
-
const y = p > 0,
|
|
2234
|
-
return
|
|
2235
|
-
r(`req.Header.Add("${
|
|
2211
|
+
const y = p > 0, v = y, b = v ? "client" : "http.DefaultClient";
|
|
2212
|
+
return v && (r("client := http.Client{", m), y && r(`Timeout: time.Duration(${p} * time.Second),`, m + 1), r("}", m), o()), r(`url := "${a}"`, m), o(), e.text ? (r(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), o(), r(`req, ${d} := http.NewRequest("${t}", url, payload)`, m), o()) : (r(`req, ${d} := http.NewRequest("${t}", url, nil)`, m), o()), h(), Object.keys(n).length && (Object.keys(n).forEach((g) => {
|
|
2213
|
+
r(`req.Header.Add("${g}", "${V(n[g])}")`, m);
|
|
2236
2214
|
}), o()), r(`res, ${d} := ${b}.Do(req)`, m), h(), u && (o(), r("defer res.Body.Close()", m), r(`body, ${d} := io.ReadAll(res.Body)`, m), h()), o(), u && r("fmt.Println(string(body))", m), l && (o(), r("}")), i();
|
|
2237
2215
|
}
|
|
2238
|
-
},
|
|
2216
|
+
}, Pi = {
|
|
2239
2217
|
info: {
|
|
2240
2218
|
key: "go",
|
|
2241
2219
|
title: "Go",
|
|
@@ -2243,10 +2221,10 @@ var Oi = {
|
|
|
2243
2221
|
cli: "go"
|
|
2244
2222
|
},
|
|
2245
2223
|
clientsById: {
|
|
2246
|
-
native:
|
|
2224
|
+
native: Ci
|
|
2247
2225
|
}
|
|
2248
2226
|
}, Rn = `\r
|
|
2249
|
-
`,
|
|
2227
|
+
`, Ei = {
|
|
2250
2228
|
info: {
|
|
2251
2229
|
key: "http1.1",
|
|
2252
2230
|
title: "HTTP/1.1",
|
|
@@ -2260,30 +2238,30 @@ var Oi = {
|
|
|
2260
2238
|
autoContentLength: !0,
|
|
2261
2239
|
autoHost: !0,
|
|
2262
2240
|
...r
|
|
2263
|
-
}, { blank: l, push: c, join: u } = new
|
|
2241
|
+
}, { blank: l, push: c, join: u } = new O({ indent: "", join: Rn }), p = i.absoluteURI ? t : n.path;
|
|
2264
2242
|
c(`${e} ${p} ${a}`);
|
|
2265
2243
|
const d = Object.keys(s);
|
|
2266
2244
|
if (d.forEach((y) => {
|
|
2267
|
-
const
|
|
2268
|
-
c(`${
|
|
2245
|
+
const v = y.toLowerCase().replace(/(^|-)(\w)/g, (b) => b.toUpperCase());
|
|
2246
|
+
c(`${v}: ${s[y]}`);
|
|
2269
2247
|
}), i.autoHost && !d.includes("host") && c(`Host: ${n.host}`), i.autoContentLength && o.text && !d.includes("content-length")) {
|
|
2270
|
-
const
|
|
2271
|
-
c(`Content-Length: ${
|
|
2248
|
+
const v = new TextEncoder().encode(o.text).length.toString();
|
|
2249
|
+
c(`Content-Length: ${v}`);
|
|
2272
2250
|
}
|
|
2273
2251
|
l();
|
|
2274
2252
|
const m = u(), h = o.text || "";
|
|
2275
2253
|
return `${m}${Rn}${h}`;
|
|
2276
2254
|
}
|
|
2277
|
-
},
|
|
2255
|
+
}, Ri = {
|
|
2278
2256
|
info: {
|
|
2279
2257
|
key: "http",
|
|
2280
2258
|
title: "HTTP",
|
|
2281
2259
|
default: "http1.1"
|
|
2282
2260
|
},
|
|
2283
2261
|
clientsById: {
|
|
2284
|
-
"http1.1":
|
|
2262
|
+
"http1.1": Ei
|
|
2285
2263
|
}
|
|
2286
|
-
},
|
|
2264
|
+
}, Ai = {
|
|
2287
2265
|
info: {
|
|
2288
2266
|
key: "asynchttp",
|
|
2289
2267
|
title: "AsyncHttp",
|
|
@@ -2295,12 +2273,12 @@ var Oi = {
|
|
|
2295
2273
|
const o = {
|
|
2296
2274
|
indent: " ",
|
|
2297
2275
|
...s
|
|
2298
|
-
}, { blank: r, push: i, join: l } = new
|
|
2276
|
+
}, { blank: r, push: i, join: l } = new O({ indent: o.indent });
|
|
2299
2277
|
return i("AsyncHttpClient client = new DefaultAsyncHttpClient();"), i(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(t).forEach((c) => {
|
|
2300
|
-
i(`.setHeader("${c}", "${
|
|
2278
|
+
i(`.setHeader("${c}", "${V(t[c])}")`, 1);
|
|
2301
2279
|
}), n.text && i(`.setBody(${JSON.stringify(n.text)})`, 1), i(".execute()", 1), i(".toCompletableFuture()", 1), i(".thenAccept(System.out::println)", 1), i(".join();", 1), r(), i("client.close();"), l();
|
|
2302
2280
|
}
|
|
2303
|
-
},
|
|
2281
|
+
}, Fi = {
|
|
2304
2282
|
info: {
|
|
2305
2283
|
key: "nethttp",
|
|
2306
2284
|
title: "java.net.http",
|
|
@@ -2312,9 +2290,9 @@ var Oi = {
|
|
|
2312
2290
|
const o = {
|
|
2313
2291
|
indent: " ",
|
|
2314
2292
|
...s
|
|
2315
|
-
}, { push: r, join: i } = new
|
|
2293
|
+
}, { push: r, join: i } = new O({ indent: o.indent });
|
|
2316
2294
|
return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${t}"))`, 2), Object.keys(e).forEach((l) => {
|
|
2317
|
-
r(`.header("${l}", "${
|
|
2295
|
+
r(`.header("${l}", "${V(e[l])}")`, 2);
|
|
2318
2296
|
}), a.text ? r(
|
|
2319
2297
|
`.method("${n.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(a.text)}))`,
|
|
2320
2298
|
2
|
|
@@ -2322,7 +2300,7 @@ var Oi = {
|
|
|
2322
2300
|
"HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
|
|
2323
2301
|
), r("System.out.println(response.body());"), i();
|
|
2324
2302
|
}
|
|
2325
|
-
},
|
|
2303
|
+
}, qi = {
|
|
2326
2304
|
info: {
|
|
2327
2305
|
key: "okhttp",
|
|
2328
2306
|
title: "OkHttp",
|
|
@@ -2334,12 +2312,12 @@ var Oi = {
|
|
|
2334
2312
|
const o = {
|
|
2335
2313
|
indent: " ",
|
|
2336
2314
|
...s
|
|
2337
|
-
}, { push: r, blank: i, join: l } = new
|
|
2315
|
+
}, { push: r, blank: i, join: l } = new O({ indent: o.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
2338
2316
|
return r("OkHttpClient client = new OkHttpClient();"), i(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? r(`.${t.toLowerCase()}(body)`, 1) : r(`.${t.toLowerCase()}(null)`, 1) : r(`.${t.toLowerCase()}()`, 1) : e.text ? r(`.method("${t.toUpperCase()}", body)`, 1) : r(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((p) => {
|
|
2339
|
-
r(`.addHeader("${p}", "${
|
|
2317
|
+
r(`.addHeader("${p}", "${V(a[p])}")`, 1);
|
|
2340
2318
|
}), r(".build();", 1), i(), r("Response response = client.newCall(request).execute();"), l();
|
|
2341
2319
|
}
|
|
2342
|
-
},
|
|
2320
|
+
}, Ii = {
|
|
2343
2321
|
info: {
|
|
2344
2322
|
key: "unirest",
|
|
2345
2323
|
title: "Unirest",
|
|
@@ -2351,24 +2329,24 @@ var Oi = {
|
|
|
2351
2329
|
const o = {
|
|
2352
2330
|
indent: " ",
|
|
2353
2331
|
...s
|
|
2354
|
-
}, { join: r, push: i } = new
|
|
2332
|
+
}, { join: r, push: i } = new O({ indent: o.indent });
|
|
2355
2333
|
return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? i(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : i(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(t).forEach((c) => {
|
|
2356
|
-
i(`.header("${c}", "${
|
|
2334
|
+
i(`.header("${c}", "${V(t[c])}")`, 1);
|
|
2357
2335
|
}), n.text && i(`.body(${JSON.stringify(n.text)})`, 1), i(".asString();", 1), r();
|
|
2358
2336
|
}
|
|
2359
|
-
},
|
|
2337
|
+
}, _i = {
|
|
2360
2338
|
info: {
|
|
2361
2339
|
key: "java",
|
|
2362
2340
|
title: "Java",
|
|
2363
2341
|
default: "unirest"
|
|
2364
2342
|
},
|
|
2365
2343
|
clientsById: {
|
|
2366
|
-
asynchttp:
|
|
2367
|
-
nethttp:
|
|
2368
|
-
okhttp:
|
|
2369
|
-
unirest:
|
|
2344
|
+
asynchttp: Ai,
|
|
2345
|
+
nethttp: Fi,
|
|
2346
|
+
okhttp: qi,
|
|
2347
|
+
unirest: Ii
|
|
2370
2348
|
}
|
|
2371
|
-
},
|
|
2349
|
+
}, Li = {
|
|
2372
2350
|
info: {
|
|
2373
2351
|
key: "axios",
|
|
2374
2352
|
title: "Axios",
|
|
@@ -2381,7 +2359,7 @@ var Oi = {
|
|
|
2381
2359
|
const r = {
|
|
2382
2360
|
indent: " ",
|
|
2383
2361
|
...o
|
|
2384
|
-
}, { blank: i, push: l, join: c, addPostProcessor: u } = new
|
|
2362
|
+
}, { blank: i, push: l, join: c, addPostProcessor: u } = new O({ indent: r.indent });
|
|
2385
2363
|
l("import axios from 'axios';"), i();
|
|
2386
2364
|
const p = {
|
|
2387
2365
|
method: t,
|
|
@@ -2406,13 +2384,13 @@ var Oi = {
|
|
|
2406
2384
|
default:
|
|
2407
2385
|
s.text && (p.data = s.text);
|
|
2408
2386
|
}
|
|
2409
|
-
const d =
|
|
2387
|
+
const d = J(p, {
|
|
2410
2388
|
indent: " ",
|
|
2411
2389
|
inlineCharacterLimit: 80
|
|
2412
2390
|
}).replace('"[form]"', "form");
|
|
2413
2391
|
return l(`const options = ${d};`), i(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
|
|
2414
2392
|
}
|
|
2415
|
-
},
|
|
2393
|
+
}, Ui = {
|
|
2416
2394
|
info: {
|
|
2417
2395
|
key: "fetch",
|
|
2418
2396
|
title: "fetch",
|
|
@@ -2425,7 +2403,7 @@ var Oi = {
|
|
|
2425
2403
|
indent: " ",
|
|
2426
2404
|
credentials: null,
|
|
2427
2405
|
...s
|
|
2428
|
-
}, { blank: r, join: i, push: l } = new
|
|
2406
|
+
}, { blank: r, join: i, push: l } = new O({ indent: o.indent }), c = {
|
|
2429
2407
|
method: e
|
|
2430
2408
|
};
|
|
2431
2409
|
switch (Object.keys(t).length && (c.headers = t), o.credentials !== null && (c.credentials = o.credentials), n.mimeType) {
|
|
@@ -2438,7 +2416,7 @@ var Oi = {
|
|
|
2438
2416
|
case "multipart/form-data":
|
|
2439
2417
|
if (!n.params)
|
|
2440
2418
|
break;
|
|
2441
|
-
const u =
|
|
2419
|
+
const u = Y(t, "content-type");
|
|
2442
2420
|
u && delete t[u], l("const form = new FormData();"), n.params.forEach((p) => {
|
|
2443
2421
|
l(`form.append('${p.name}', '${p.value || p.fileName || ""}');`);
|
|
2444
2422
|
}), r();
|
|
@@ -2447,7 +2425,7 @@ var Oi = {
|
|
|
2447
2425
|
n.text && (c.body = n.text);
|
|
2448
2426
|
}
|
|
2449
2427
|
return c.headers && !Object.keys(c.headers).length && delete c.headers, l(
|
|
2450
|
-
`const options = ${
|
|
2428
|
+
`const options = ${J(c, {
|
|
2451
2429
|
indent: o.indent,
|
|
2452
2430
|
inlineCharacterLimit: 80,
|
|
2453
2431
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult
|
|
@@ -2465,7 +2443,7 @@ var Oi = {
|
|
|
2465
2443
|
})};`
|
|
2466
2444
|
), r(), n.params && n.mimeType === "multipart/form-data" && (l("options.body = form;"), r()), l(`fetch('${a}', options)`), l(".then(response => response.json())", 1), l(".then(response => console.log(response))", 1), l(".catch(err => console.error(err));", 1), i();
|
|
2467
2445
|
}
|
|
2468
|
-
},
|
|
2446
|
+
}, Mi = {
|
|
2469
2447
|
info: {
|
|
2470
2448
|
key: "jquery",
|
|
2471
2449
|
title: "jQuery",
|
|
@@ -2478,7 +2456,7 @@ var Oi = {
|
|
|
2478
2456
|
const o = {
|
|
2479
2457
|
indent: " ",
|
|
2480
2458
|
...s
|
|
2481
|
-
}, { blank: r, push: i, join: l } = new
|
|
2459
|
+
}, { blank: r, push: i, join: l } = new O({ indent: o.indent }), c = {
|
|
2482
2460
|
async: !0,
|
|
2483
2461
|
crossDomain: !0,
|
|
2484
2462
|
url: e,
|
|
@@ -2498,7 +2476,7 @@ var Oi = {
|
|
|
2498
2476
|
if (i("const form = new FormData();"), a.params.forEach((d) => {
|
|
2499
2477
|
i(`form.append('${d.name}', '${d.value || d.fileName || ""}');`);
|
|
2500
2478
|
}), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", vt(n, "content-type") && (p = de(n, "content-type")) != null && p.includes("boundary")) {
|
|
2501
|
-
const d =
|
|
2479
|
+
const d = Y(n, "content-type");
|
|
2502
2480
|
d && delete c.headers[d];
|
|
2503
2481
|
}
|
|
2504
2482
|
r();
|
|
@@ -2506,10 +2484,10 @@ var Oi = {
|
|
|
2506
2484
|
default:
|
|
2507
2485
|
a.text && (c.data = a.text);
|
|
2508
2486
|
}
|
|
2509
|
-
const u =
|
|
2487
|
+
const u = J(c, { indent: o.indent }).replace("'[form]'", "form");
|
|
2510
2488
|
return i(`const settings = ${u};`), r(), i("$.ajax(settings).done(function (response) {"), i("console.log(response);", 1), i("});"), l();
|
|
2511
2489
|
}
|
|
2512
|
-
},
|
|
2490
|
+
}, Hi = {
|
|
2513
2491
|
info: {
|
|
2514
2492
|
key: "xhr",
|
|
2515
2493
|
title: "XMLHttpRequest",
|
|
@@ -2523,11 +2501,11 @@ var Oi = {
|
|
|
2523
2501
|
indent: " ",
|
|
2524
2502
|
cors: !0,
|
|
2525
2503
|
...s
|
|
2526
|
-
}, { blank: r, push: i, join: l } = new
|
|
2504
|
+
}, { blank: r, push: i, join: l } = new O({ indent: o.indent });
|
|
2527
2505
|
switch (e.mimeType) {
|
|
2528
2506
|
case "application/json":
|
|
2529
2507
|
i(
|
|
2530
|
-
`const data = JSON.stringify(${
|
|
2508
|
+
`const data = JSON.stringify(${J(e.jsonObj, {
|
|
2531
2509
|
indent: o.indent
|
|
2532
2510
|
})});`
|
|
2533
2511
|
), r();
|
|
@@ -2538,7 +2516,7 @@ var Oi = {
|
|
|
2538
2516
|
if (i("const data = new FormData();"), e.params.forEach((u) => {
|
|
2539
2517
|
i(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
2540
2518
|
}), vt(t, "content-type") && (c = de(t, "content-type")) != null && c.includes("boundary")) {
|
|
2541
|
-
const u =
|
|
2519
|
+
const u = Y(t, "content-type");
|
|
2542
2520
|
u && delete t[u];
|
|
2543
2521
|
}
|
|
2544
2522
|
r();
|
|
@@ -2550,19 +2528,19 @@ var Oi = {
|
|
|
2550
2528
|
i(`xhr.setRequestHeader('${u}', '${Je(t[u])}');`);
|
|
2551
2529
|
}), r(), i("xhr.send(data);"), l();
|
|
2552
2530
|
}
|
|
2553
|
-
},
|
|
2531
|
+
}, Bi = {
|
|
2554
2532
|
info: {
|
|
2555
2533
|
key: "javascript",
|
|
2556
2534
|
title: "JavaScript",
|
|
2557
2535
|
default: "xhr"
|
|
2558
2536
|
},
|
|
2559
2537
|
clientsById: {
|
|
2560
|
-
xhr:
|
|
2561
|
-
axios:
|
|
2562
|
-
fetch:
|
|
2563
|
-
jquery:
|
|
2538
|
+
xhr: Hi,
|
|
2539
|
+
axios: Li,
|
|
2540
|
+
fetch: Ui,
|
|
2541
|
+
jquery: Mi
|
|
2564
2542
|
}
|
|
2565
|
-
},
|
|
2543
|
+
}, Di = {
|
|
2566
2544
|
info: {
|
|
2567
2545
|
key: "native",
|
|
2568
2546
|
title: "Native JSON",
|
|
@@ -2596,14 +2574,14 @@ var Oi = {
|
|
|
2596
2574
|
}
|
|
2597
2575
|
return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, n.indent);
|
|
2598
2576
|
}
|
|
2599
|
-
},
|
|
2577
|
+
}, Vi = {
|
|
2600
2578
|
info: {
|
|
2601
2579
|
key: "json",
|
|
2602
2580
|
title: "JSON",
|
|
2603
2581
|
default: "native"
|
|
2604
2582
|
},
|
|
2605
2583
|
clientsById: {
|
|
2606
|
-
native:
|
|
2584
|
+
native: Di
|
|
2607
2585
|
}
|
|
2608
2586
|
}, Wi = {
|
|
2609
2587
|
info: {
|
|
@@ -2617,12 +2595,12 @@ var Oi = {
|
|
|
2617
2595
|
const o = {
|
|
2618
2596
|
indent: " ",
|
|
2619
2597
|
...s
|
|
2620
|
-
}, { blank: r, join: i, push: l } = new
|
|
2598
|
+
}, { blank: r, join: i, push: l } = new O({ indent: o.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
|
|
2621
2599
|
return l("val client = OkHttpClient()"), r(), e.text && (e.boundary ? l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : l(`val mediaType = MediaType.parse("${e.mimeType}")`), l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), l("val request = Request.Builder()"), l(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? l(`.${n.toLowerCase()}(body)`, 1) : l(`.${n.toLowerCase()}(null)`, 1) : l(`.${n.toLowerCase()}()`, 1) : e.text ? l(`.method("${n.toUpperCase()}", body)`, 1) : l(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((p) => {
|
|
2622
|
-
l(`.addHeader("${p}", "${
|
|
2600
|
+
l(`.addHeader("${p}", "${V(a[p])}")`, 1);
|
|
2623
2601
|
}), l(".build()", 1), r(), l("val response = client.newCall(request).execute()"), i();
|
|
2624
2602
|
}
|
|
2625
|
-
},
|
|
2603
|
+
}, zi = {
|
|
2626
2604
|
info: {
|
|
2627
2605
|
key: "kotlin",
|
|
2628
2606
|
title: "Kotlin",
|
|
@@ -2631,7 +2609,7 @@ var Oi = {
|
|
|
2631
2609
|
clientsById: {
|
|
2632
2610
|
okhttp: Wi
|
|
2633
2611
|
}
|
|
2634
|
-
},
|
|
2612
|
+
}, Ji = {
|
|
2635
2613
|
info: {
|
|
2636
2614
|
key: "axios",
|
|
2637
2615
|
title: "Axios",
|
|
@@ -2644,7 +2622,7 @@ var Oi = {
|
|
|
2644
2622
|
const o = {
|
|
2645
2623
|
indent: " ",
|
|
2646
2624
|
...s
|
|
2647
|
-
}, { blank: r, join: i, push: l, addPostProcessor: c } = new
|
|
2625
|
+
}, { blank: r, join: i, push: l, addPostProcessor: c } = new O({ indent: o.indent });
|
|
2648
2626
|
l("const axios = require('axios');");
|
|
2649
2627
|
const u = {
|
|
2650
2628
|
method: e,
|
|
@@ -2662,10 +2640,10 @@ var Oi = {
|
|
|
2662
2640
|
default:
|
|
2663
2641
|
r(), a.text && (u.data = a.text);
|
|
2664
2642
|
}
|
|
2665
|
-
const p =
|
|
2643
|
+
const p = J(u, { indent: " ", inlineCharacterLimit: 80 });
|
|
2666
2644
|
return l(`const options = ${p};`), r(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), i();
|
|
2667
2645
|
}
|
|
2668
|
-
},
|
|
2646
|
+
}, Gi = {
|
|
2669
2647
|
info: {
|
|
2670
2648
|
key: "fetch",
|
|
2671
2649
|
title: "Fetch",
|
|
@@ -2681,7 +2659,7 @@ var Oi = {
|
|
|
2681
2659
|
...o
|
|
2682
2660
|
};
|
|
2683
2661
|
let i = !1;
|
|
2684
|
-
const { blank: l, push: c, join: u, unshift: p } = new
|
|
2662
|
+
const { blank: l, push: c, join: u, unshift: p } = new O({ indent: r.indent });
|
|
2685
2663
|
c("const fetch = require('node-fetch');");
|
|
2686
2664
|
const d = t, m = {
|
|
2687
2665
|
method: e
|
|
@@ -2698,8 +2676,8 @@ var Oi = {
|
|
|
2698
2676
|
case "multipart/form-data":
|
|
2699
2677
|
if (!n.params)
|
|
2700
2678
|
break;
|
|
2701
|
-
const
|
|
2702
|
-
|
|
2679
|
+
const v = Y(a, "content-type");
|
|
2680
|
+
v && delete a[v], p("const FormData = require('form-data');"), c("const formData = new FormData();"), l(), n.params.forEach((b) => {
|
|
2703
2681
|
if (!b.fileName && !b.fileName && !b.contentType) {
|
|
2704
2682
|
c(`formData.append('${b.name}', '${b.value}');`);
|
|
2705
2683
|
return;
|
|
@@ -2711,21 +2689,21 @@ var Oi = {
|
|
|
2711
2689
|
n.text && (m.body = n.text);
|
|
2712
2690
|
}
|
|
2713
2691
|
if (s.length) {
|
|
2714
|
-
const
|
|
2715
|
-
m.headers || (m.headers = {}), m.headers.cookie =
|
|
2692
|
+
const v = s.map(({ name: b, value: g }) => `${encodeURIComponent(b)}=${encodeURIComponent(g)}`).join("; ");
|
|
2693
|
+
m.headers || (m.headers = {}), m.headers.cookie = v;
|
|
2716
2694
|
}
|
|
2717
2695
|
l(), c(`const url = '${d}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
|
|
2718
|
-
const h =
|
|
2696
|
+
const h = J(m, {
|
|
2719
2697
|
indent: " ",
|
|
2720
2698
|
inlineCharacterLimit: 80,
|
|
2721
2699
|
// The Fetch API body only accepts string parameters, but stringified JSON can be difficult to
|
|
2722
2700
|
// read, so we keep the object as a literal and use this transform function to wrap the literal
|
|
2723
2701
|
// in a `JSON.stringify` call.
|
|
2724
|
-
transform: (
|
|
2702
|
+
transform: (v, b, g) => b === "body" && n.mimeType === "application/json" ? `JSON.stringify(${g})` : g
|
|
2725
2703
|
});
|
|
2726
2704
|
return c(`const options = ${h};`), l(), i && p("const fs = require('fs');"), n.params && n.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
|
|
2727
2705
|
}
|
|
2728
|
-
},
|
|
2706
|
+
}, Ki = {
|
|
2729
2707
|
info: {
|
|
2730
2708
|
key: "native",
|
|
2731
2709
|
title: "HTTP",
|
|
@@ -2735,17 +2713,17 @@ var Oi = {
|
|
|
2735
2713
|
},
|
|
2736
2714
|
convert: ({ uriObj: e, method: t, allHeaders: n, postData: a }, s = {}) => {
|
|
2737
2715
|
var p;
|
|
2738
|
-
const { indent: o = " " } = s, { blank: r, join: i, push: l, unshift: c } = new
|
|
2716
|
+
const { indent: o = " " } = s, { blank: r, join: i, push: l, unshift: c } = new O({ indent: o }), u = {
|
|
2739
2717
|
method: t,
|
|
2740
2718
|
hostname: e.hostname,
|
|
2741
2719
|
port: e.port,
|
|
2742
2720
|
path: e.path,
|
|
2743
2721
|
headers: n
|
|
2744
2722
|
};
|
|
2745
|
-
switch (l(`const http = require('${(p = e.protocol) == null ? void 0 : p.replace(":", "")}');`), r(), l(`const options = ${
|
|
2723
|
+
switch (l(`const http = require('${(p = e.protocol) == null ? void 0 : p.replace(":", "")}');`), r(), l(`const options = ${J(u, { indent: o })};`), r(), l("const req = http.request(options, function (res) {"), l("const chunks = [];", 1), r(), l("res.on('data', function (chunk) {", 1), l("chunks.push(chunk);", 2), l("});", 1), r(), l("res.on('end', function () {", 1), l("const body = Buffer.concat(chunks);", 2), l("console.log(body.toString());", 2), l("});", 1), l("});"), r(), a.mimeType) {
|
|
2746
2724
|
case "application/x-www-form-urlencoded":
|
|
2747
2725
|
a.paramsObj && (c("const qs = require('querystring');"), l(
|
|
2748
|
-
`req.write(qs.stringify(${
|
|
2726
|
+
`req.write(qs.stringify(${J(a.paramsObj, {
|
|
2749
2727
|
indent: " ",
|
|
2750
2728
|
inlineCharacterLimit: 80
|
|
2751
2729
|
})}));`
|
|
@@ -2753,18 +2731,18 @@ var Oi = {
|
|
|
2753
2731
|
break;
|
|
2754
2732
|
case "application/json":
|
|
2755
2733
|
a.jsonObj && l(
|
|
2756
|
-
`req.write(JSON.stringify(${
|
|
2734
|
+
`req.write(JSON.stringify(${J(a.jsonObj, {
|
|
2757
2735
|
indent: " ",
|
|
2758
2736
|
inlineCharacterLimit: 80
|
|
2759
2737
|
})}));`
|
|
2760
2738
|
);
|
|
2761
2739
|
break;
|
|
2762
2740
|
default:
|
|
2763
|
-
a.text && l(`req.write(${
|
|
2741
|
+
a.text && l(`req.write(${J(a.text, { indent: o })});`);
|
|
2764
2742
|
}
|
|
2765
2743
|
return l("req.end();"), i();
|
|
2766
2744
|
}
|
|
2767
|
-
},
|
|
2745
|
+
}, Qi = {
|
|
2768
2746
|
info: {
|
|
2769
2747
|
key: "request",
|
|
2770
2748
|
title: "Request",
|
|
@@ -2779,7 +2757,7 @@ var Oi = {
|
|
|
2779
2757
|
...r
|
|
2780
2758
|
};
|
|
2781
2759
|
let l = !1;
|
|
2782
|
-
const { push: c, blank: u, join: p, unshift: d, addPostProcessor: m } = new
|
|
2760
|
+
const { push: c, blank: u, join: p, unshift: d, addPostProcessor: m } = new O({ indent: i.indent });
|
|
2783
2761
|
c("const request = require('request');"), u();
|
|
2784
2762
|
const h = {
|
|
2785
2763
|
method: e,
|
|
@@ -2800,24 +2778,24 @@ var Oi = {
|
|
|
2800
2778
|
h.formData[y.name] = y.value;
|
|
2801
2779
|
return;
|
|
2802
2780
|
}
|
|
2803
|
-
let
|
|
2804
|
-
y.fileName ? (l = !0,
|
|
2781
|
+
let v = {};
|
|
2782
|
+
y.fileName ? (l = !0, v = {
|
|
2805
2783
|
value: `fs.createReadStream(${y.fileName})`,
|
|
2806
2784
|
options: {
|
|
2807
2785
|
filename: y.fileName,
|
|
2808
2786
|
contentType: y.contentType ? y.contentType : null
|
|
2809
2787
|
}
|
|
2810
|
-
}) : y.value && (
|
|
2788
|
+
}) : y.value && (v.value = y.value), h.formData[y.name] = v;
|
|
2811
2789
|
}), m((y) => y.replace(/'fs\.createReadStream\((.*)\)'/, "fs.createReadStream('$1')"));
|
|
2812
2790
|
break;
|
|
2813
2791
|
default:
|
|
2814
2792
|
a.text && (h.body = a.text);
|
|
2815
2793
|
}
|
|
2816
|
-
return o.length && (h.jar = "JAR", c("const jar = request.jar();"), o.forEach(({ name: y, value:
|
|
2817
|
-
c(`jar.setCookie(request.cookie('${encodeURIComponent(y)}=${encodeURIComponent(
|
|
2818
|
-
}), u(), m((y) => y.replace(/'JAR'/, "jar"))), l && d("const fs = require('fs');"), c(`const options = ${
|
|
2794
|
+
return o.length && (h.jar = "JAR", c("const jar = request.jar();"), o.forEach(({ name: y, value: v }) => {
|
|
2795
|
+
c(`jar.setCookie(request.cookie('${encodeURIComponent(y)}=${encodeURIComponent(v)}'), '${t}');`);
|
|
2796
|
+
}), u(), m((y) => y.replace(/'JAR'/, "jar"))), l && d("const fs = require('fs');"), c(`const options = ${J(h, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), p();
|
|
2819
2797
|
}
|
|
2820
|
-
},
|
|
2798
|
+
}, Yi = {
|
|
2821
2799
|
info: {
|
|
2822
2800
|
key: "unirest",
|
|
2823
2801
|
title: "Unirest",
|
|
@@ -2831,34 +2809,34 @@ var Oi = {
|
|
|
2831
2809
|
...r
|
|
2832
2810
|
};
|
|
2833
2811
|
let l = !1;
|
|
2834
|
-
const { addPostProcessor: c, blank: u, join: p, push: d, unshift: m } = new
|
|
2812
|
+
const { addPostProcessor: c, blank: u, join: p, push: d, unshift: m } = new O({
|
|
2835
2813
|
indent: i.indent
|
|
2836
2814
|
});
|
|
2837
2815
|
switch (d("const unirest = require('unirest');"), u(), d(`const req = unirest('${e}', '${t}');`), u(), n.length && (d("const CookieJar = unirest.jar();"), n.forEach((h) => {
|
|
2838
2816
|
d(`CookieJar.add('${encodeURIComponent(h.name)}=${encodeURIComponent(h.value)}', '${t}');`);
|
|
2839
|
-
}), d("req.jar(CookieJar);"), u()), Object.keys(a).length && (d(`req.query(${
|
|
2817
|
+
}), d("req.jar(CookieJar);"), u()), Object.keys(a).length && (d(`req.query(${J(a, { indent: i.indent })});`), u()), Object.keys(o).length && (d(`req.headers(${J(o, { indent: i.indent })});`), u()), s.mimeType) {
|
|
2840
2818
|
case "application/x-www-form-urlencoded":
|
|
2841
|
-
s.paramsObj && (d(`req.form(${
|
|
2819
|
+
s.paramsObj && (d(`req.form(${J(s.paramsObj, { indent: i.indent })});`), u());
|
|
2842
2820
|
break;
|
|
2843
2821
|
case "application/json":
|
|
2844
|
-
s.jsonObj && (d("req.type('json');"), d(`req.send(${
|
|
2822
|
+
s.jsonObj && (d("req.type('json');"), d(`req.send(${J(s.jsonObj, { indent: i.indent })});`), u());
|
|
2845
2823
|
break;
|
|
2846
2824
|
case "multipart/form-data": {
|
|
2847
2825
|
if (!s.params)
|
|
2848
2826
|
break;
|
|
2849
2827
|
const h = [];
|
|
2850
2828
|
s.params.forEach((y) => {
|
|
2851
|
-
const
|
|
2852
|
-
y.fileName && !y.value ? (l = !0,
|
|
2853
|
-
}), d(`req.multipart(${
|
|
2829
|
+
const v = {};
|
|
2830
|
+
y.fileName && !y.value ? (l = !0, v.body = `fs.createReadStream('${y.fileName}')`, c((b) => b.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : y.value && (v.body = y.value), v.body && (y.contentType && (v["content-type"] = y.contentType), h.push(v));
|
|
2831
|
+
}), d(`req.multipart(${J(h, { indent: i.indent })});`), u();
|
|
2854
2832
|
break;
|
|
2855
2833
|
}
|
|
2856
2834
|
default:
|
|
2857
|
-
s.text && (d(`req.send(${
|
|
2835
|
+
s.text && (d(`req.send(${J(s.text, { indent: i.indent })});`), u());
|
|
2858
2836
|
}
|
|
2859
2837
|
return l && m("const fs = require('fs');"), d("req.end(function (res) {"), d("if (res.error) throw new Error(res.error);", 1), u(), d("console.log(res.body);", 1), d("});"), p();
|
|
2860
2838
|
}
|
|
2861
|
-
},
|
|
2839
|
+
}, Xi = {
|
|
2862
2840
|
info: {
|
|
2863
2841
|
key: "node",
|
|
2864
2842
|
title: "Node.js",
|
|
@@ -2866,11 +2844,11 @@ var Oi = {
|
|
|
2866
2844
|
cli: "node %s"
|
|
2867
2845
|
},
|
|
2868
2846
|
clientsById: {
|
|
2869
|
-
native:
|
|
2870
|
-
request:
|
|
2871
|
-
unirest:
|
|
2872
|
-
axios:
|
|
2873
|
-
fetch:
|
|
2847
|
+
native: Ki,
|
|
2848
|
+
request: Qi,
|
|
2849
|
+
unirest: Yi,
|
|
2850
|
+
axios: Ji,
|
|
2851
|
+
fetch: Gi
|
|
2874
2852
|
}
|
|
2875
2853
|
}, wt = (e, t, n, a) => {
|
|
2876
2854
|
const s = `${e} *${t} = `, o = Mt(n, a ? s.length : void 0);
|
|
@@ -2894,7 +2872,7 @@ var Oi = {
|
|
|
2894
2872
|
default:
|
|
2895
2873
|
return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
|
|
2896
2874
|
}
|
|
2897
|
-
},
|
|
2875
|
+
}, Zi = {
|
|
2898
2876
|
info: {
|
|
2899
2877
|
key: "nsurlsession",
|
|
2900
2878
|
title: "NSURLSession",
|
|
@@ -2909,7 +2887,7 @@ var Oi = {
|
|
|
2909
2887
|
pretty: !0,
|
|
2910
2888
|
timeout: 10,
|
|
2911
2889
|
...s
|
|
2912
|
-
}, { push: r, join: i, blank: l } = new
|
|
2890
|
+
}, { push: r, join: i, blank: l } = new O({ indent: o.indent }), c = {
|
|
2913
2891
|
hasHeaders: !1,
|
|
2914
2892
|
hasBody: !1
|
|
2915
2893
|
};
|
|
@@ -2951,16 +2929,16 @@ var Oi = {
|
|
|
2951
2929
|
2
|
|
2952
2930
|
), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), i();
|
|
2953
2931
|
}
|
|
2954
|
-
},
|
|
2932
|
+
}, es = {
|
|
2955
2933
|
info: {
|
|
2956
2934
|
key: "objc",
|
|
2957
2935
|
title: "Objective-C",
|
|
2958
2936
|
default: "nsurlsession"
|
|
2959
2937
|
},
|
|
2960
2938
|
clientsById: {
|
|
2961
|
-
nsurlsession:
|
|
2939
|
+
nsurlsession: Zi
|
|
2962
2940
|
}
|
|
2963
|
-
},
|
|
2941
|
+
}, ts = {
|
|
2964
2942
|
info: {
|
|
2965
2943
|
key: "cohttp",
|
|
2966
2944
|
title: "CoHTTP",
|
|
@@ -2973,27 +2951,27 @@ var Oi = {
|
|
|
2973
2951
|
const o = {
|
|
2974
2952
|
indent: " ",
|
|
2975
2953
|
...s
|
|
2976
|
-
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: i, blank: l, join: c } = new
|
|
2954
|
+
}, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: i, blank: l, join: c } = new O({ indent: o.indent });
|
|
2977
2955
|
i("open Cohttp_lwt_unix"), i("open Cohttp"), i("open Lwt"), l(), i(`let uri = Uri.of_string "${e}" in`);
|
|
2978
2956
|
const u = Object.keys(t);
|
|
2979
2957
|
u.length === 1 ? i(
|
|
2980
|
-
`let headers = Header.add (Header.init ()) "${u[0]}" "${
|
|
2958
|
+
`let headers = Header.add (Header.init ()) "${u[0]}" "${V(
|
|
2981
2959
|
t[u[0]]
|
|
2982
2960
|
)}" in`
|
|
2983
2961
|
) : u.length > 1 && (i("let headers = Header.add_list (Header.init ()) ["), u.forEach((h) => {
|
|
2984
|
-
i(`("${h}", "${
|
|
2962
|
+
i(`("${h}", "${V(t[h])}");`, 1);
|
|
2985
2963
|
}), i("] in")), n.text && i(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(n.text)} in`), l();
|
|
2986
2964
|
const p = u.length ? "~headers " : "", d = n.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
|
|
2987
2965
|
return i(`Client.call ${p}${d}${m} uri`), i(">>= fun (res, body_stream) ->"), i("(* Do stuff with the result *)", 1), c();
|
|
2988
2966
|
}
|
|
2989
|
-
},
|
|
2967
|
+
}, ns = {
|
|
2990
2968
|
info: {
|
|
2991
2969
|
key: "ocaml",
|
|
2992
2970
|
title: "OCaml",
|
|
2993
2971
|
default: "cohttp"
|
|
2994
2972
|
},
|
|
2995
2973
|
clientsById: {
|
|
2996
|
-
cohttp:
|
|
2974
|
+
cohttp: ts
|
|
2997
2975
|
}
|
|
2998
2976
|
}, F = (e, t, n) => {
|
|
2999
2977
|
switch (n = n || "", t = t || "", Object.prototype.toString.call(e)) {
|
|
@@ -3004,7 +2982,7 @@ var Oi = {
|
|
|
3004
2982
|
case "[object Undefined]":
|
|
3005
2983
|
return "null";
|
|
3006
2984
|
case "[object String]":
|
|
3007
|
-
return `'${
|
|
2985
|
+
return `'${ze(e, { delimiter: "'", escapeNewlines: !1 })}'`;
|
|
3008
2986
|
case "[object Number]":
|
|
3009
2987
|
return e.toString();
|
|
3010
2988
|
case "[object Array]": {
|
|
@@ -3054,7 +3032,7 @@ ${n}]`;
|
|
|
3054
3032
|
"UNLOCK",
|
|
3055
3033
|
"UPDATE",
|
|
3056
3034
|
"VERSION_CONTROL"
|
|
3057
|
-
],
|
|
3035
|
+
], rs = {
|
|
3058
3036
|
info: {
|
|
3059
3037
|
key: "curl",
|
|
3060
3038
|
title: "cURL",
|
|
@@ -3071,9 +3049,9 @@ ${n}]`;
|
|
|
3071
3049
|
noTags: d = !1,
|
|
3072
3050
|
shortTags: m = !1,
|
|
3073
3051
|
timeout: h = 30
|
|
3074
|
-
} = i, { push: y, blank:
|
|
3075
|
-
d || (y(m ? "<?" : "<?php"),
|
|
3076
|
-
const
|
|
3052
|
+
} = i, { push: y, blank: v, join: b } = new O({ indent: c });
|
|
3053
|
+
d || (y(m ? "<?" : "<?php"), v()), y("$curl = curl_init();"), v();
|
|
3054
|
+
const g = [
|
|
3077
3055
|
{
|
|
3078
3056
|
escape: !0,
|
|
3079
3057
|
name: "CURLOPT_PORT",
|
|
@@ -3121,18 +3099,18 @@ ${n}]`;
|
|
|
3121
3099
|
}
|
|
3122
3100
|
];
|
|
3123
3101
|
y("curl_setopt_array($curl, [");
|
|
3124
|
-
const x = new
|
|
3102
|
+
const x = new O({ indent: c, join: `
|
|
3125
3103
|
${c}` });
|
|
3126
|
-
|
|
3127
|
-
|
|
3104
|
+
g.forEach(({ value: k, name: C, escape: P }) => {
|
|
3105
|
+
k != null && x.push(`${C} => ${P ? JSON.stringify(k) : k},`);
|
|
3128
3106
|
});
|
|
3129
|
-
const w = o.map((
|
|
3107
|
+
const w = o.map((k) => `${encodeURIComponent(k.name)}=${encodeURIComponent(k.value)}`);
|
|
3130
3108
|
w.length && x.push(`CURLOPT_COOKIE => "${w.join("; ")}",`);
|
|
3131
|
-
const S = Object.keys(r).sort().map((
|
|
3109
|
+
const S = Object.keys(r).sort().map((k) => `"${k}: ${V(r[k])}"`);
|
|
3132
3110
|
return S.length && (x.push("CURLOPT_HTTPHEADER => ["), x.push(S.join(`,
|
|
3133
|
-
${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"),
|
|
3111
|
+
${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), v(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), v(), y("curl_close($curl);"), v(), y("if ($err) {"), y(p ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !d && l && (v(), y("?>")), b();
|
|
3134
3112
|
}
|
|
3135
|
-
},
|
|
3113
|
+
}, as = {
|
|
3136
3114
|
info: {
|
|
3137
3115
|
key: "guzzle",
|
|
3138
3116
|
title: "Guzzle",
|
|
@@ -3149,27 +3127,27 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3149
3127
|
noTags: !1,
|
|
3150
3128
|
shortTags: !1,
|
|
3151
3129
|
...o
|
|
3152
|
-
}, { push: i, blank: l, join: c } = new
|
|
3130
|
+
}, { push: i, blank: l, join: c } = new O({ indent: r.indent }), { code: u, push: p, join: d } = new O({ indent: r.indent });
|
|
3153
3131
|
switch (r.noTags || i(r.shortTags ? "<?" : "<?php"), i("require_once('vendor/autoload.php');"), l(), e.mimeType) {
|
|
3154
3132
|
case "application/x-www-form-urlencoded":
|
|
3155
3133
|
p(`'form_params' => ${F(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
|
|
3156
3134
|
break;
|
|
3157
3135
|
case "multipart/form-data": {
|
|
3158
|
-
const
|
|
3136
|
+
const v = [];
|
|
3159
3137
|
if (e.params && e.params.forEach((b) => {
|
|
3160
3138
|
if (b.fileName) {
|
|
3161
|
-
const
|
|
3139
|
+
const g = {
|
|
3162
3140
|
name: b.name,
|
|
3163
3141
|
filename: b.fileName,
|
|
3164
3142
|
contents: b.value
|
|
3165
3143
|
};
|
|
3166
|
-
b.contentType && (
|
|
3167
|
-
} else b.value &&
|
|
3144
|
+
b.contentType && (g.headers = { "Content-Type": b.contentType }), v.push(g);
|
|
3145
|
+
} else b.value && v.push({
|
|
3168
3146
|
name: b.name,
|
|
3169
3147
|
contents: b.value
|
|
3170
3148
|
});
|
|
3171
|
-
}),
|
|
3172
|
-
const b =
|
|
3149
|
+
}), v.length && (p(`'multipart' => ${F(v, r.indent + r.indent, r.indent)}`, 1), vt(s, "content-type") && (y = de(s, "content-type")) != null && y.indexOf("boundary"))) {
|
|
3150
|
+
const b = Y(s, "content-type");
|
|
3173
3151
|
b && delete s[b];
|
|
3174
3152
|
}
|
|
3175
3153
|
break;
|
|
@@ -3177,13 +3155,13 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3177
3155
|
default:
|
|
3178
3156
|
e.text && p(`'body' => ${F(e.text)},`, 1);
|
|
3179
3157
|
}
|
|
3180
|
-
const m = Object.keys(s).sort().map(function(
|
|
3181
|
-
return `${r.indent}${r.indent}'${
|
|
3182
|
-
}), h = a.map((
|
|
3158
|
+
const m = Object.keys(s).sort().map(function(v) {
|
|
3159
|
+
return `${r.indent}${r.indent}'${v}' => '${Je(s[v])}',`;
|
|
3160
|
+
}), h = a.map((v) => `${encodeURIComponent(v.name)}=${encodeURIComponent(v.value)}`).join("; ");
|
|
3183
3161
|
return h.length && m.push(`${r.indent}${r.indent}'cookie' => '${Je(h)}',`), m.length && (p("'headers' => [", 1), p(m.join(`
|
|
3184
3162
|
`)), p("],", 1)), i("$client = new \\GuzzleHttp\\Client();"), l(), u.length ? (i(`$response = $client->request('${n}', '${t}', [`), i(d()), i("]);")) : i(`$response = $client->request('${n}', '${t}');`), l(), i("echo $response->getBody();"), !r.noTags && r.closingTag && (l(), i("?>")), c();
|
|
3185
3163
|
}
|
|
3186
|
-
},
|
|
3164
|
+
}, os = {
|
|
3187
3165
|
info: {
|
|
3188
3166
|
key: "http1",
|
|
3189
3167
|
title: "HTTP v1",
|
|
@@ -3192,7 +3170,7 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3192
3170
|
extname: ".php"
|
|
3193
3171
|
},
|
|
3194
3172
|
convert: ({ method: e, url: t, postData: n, queryObj: a, headersObj: s, cookiesObj: o }, r = {}) => {
|
|
3195
|
-
const { closingTag: i = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: m } = new
|
|
3173
|
+
const { closingTag: i = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: m } = new O({ indent: l });
|
|
3196
3174
|
switch (c || (p(u ? "<?" : "<?php"), d()), An.includes(e.toUpperCase()) || p(`HttpRequest::methodRegister('${e}');`), p("$request = new HttpRequest();"), p(`$request->setUrl(${F(t)});`), An.includes(e.toUpperCase()) ? p(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : p(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), d(), Object.keys(a).length && (p(`$request->setQueryData(${F(a, l)});`), d()), Object.keys(s).length && (p(`$request->setHeaders(${F(s, l)});`), d()), Object.keys(o).length && (p(`$request->setCookies(${F(o, l)});`), d()), n.mimeType) {
|
|
3197
3175
|
case "application/x-www-form-urlencoded":
|
|
3198
3176
|
p(`$request->setContentType(${F(n.mimeType)});`), p(`$request->setPostFields(${F(n.paramsObj, l)});`), d();
|
|
@@ -3205,7 +3183,7 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3205
3183
|
}
|
|
3206
3184
|
return p("try {"), p("$response = $request->send();", 1), d(), p("echo $response->getBody();", 1), p("} catch (HttpException $ex) {"), p("echo $ex;", 1), p("}"), !c && i && (d(), p("?>")), m();
|
|
3207
3185
|
}
|
|
3208
|
-
},
|
|
3186
|
+
}, is = {
|
|
3209
3187
|
info: {
|
|
3210
3188
|
key: "http2",
|
|
3211
3189
|
title: "HTTP v2",
|
|
@@ -3215,7 +3193,7 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3215
3193
|
},
|
|
3216
3194
|
convert: ({ postData: e, headersObj: t, method: n, queryObj: a, cookiesObj: s, url: o }, r = {}) => {
|
|
3217
3195
|
var y;
|
|
3218
|
-
const { closingTag: i = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: m } = new
|
|
3196
|
+
const { closingTag: i = !1, indent: l = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: p, blank: d, join: m } = new O({ indent: l });
|
|
3219
3197
|
let h = !1;
|
|
3220
3198
|
switch (c || (p(u ? "<?" : "<?php"), d()), p("$client = new http\\Client;"), p("$request = new http\\Client\\Request;"), d(), e.mimeType) {
|
|
3221
3199
|
case "application/x-www-form-urlencoded":
|
|
@@ -3224,22 +3202,22 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3224
3202
|
case "multipart/form-data": {
|
|
3225
3203
|
if (!e.params)
|
|
3226
3204
|
break;
|
|
3227
|
-
const
|
|
3228
|
-
e.params.forEach(({ name: w, fileName: S, value:
|
|
3205
|
+
const v = [], b = {};
|
|
3206
|
+
e.params.forEach(({ name: w, fileName: S, value: k, contentType: C }) => {
|
|
3229
3207
|
if (S) {
|
|
3230
|
-
|
|
3208
|
+
v.push({
|
|
3231
3209
|
name: w,
|
|
3232
|
-
type:
|
|
3210
|
+
type: C,
|
|
3233
3211
|
file: S,
|
|
3234
|
-
data:
|
|
3212
|
+
data: k
|
|
3235
3213
|
});
|
|
3236
3214
|
return;
|
|
3237
3215
|
}
|
|
3238
|
-
|
|
3216
|
+
k && (b[w] = k);
|
|
3239
3217
|
});
|
|
3240
|
-
const
|
|
3241
|
-
if (p("$body = new http\\Message\\Body;"), p(`$body->addForm(${
|
|
3242
|
-
const w =
|
|
3218
|
+
const g = Object.keys(b).length ? F(b, l) : "null", x = v.length ? F(v, l) : "null";
|
|
3219
|
+
if (p("$body = new http\\Message\\Body;"), p(`$body->addForm(${g}, ${x});`), vt(t, "content-type") && (y = de(t, "content-type")) != null && y.indexOf("boundary")) {
|
|
3220
|
+
const w = Y(t, "content-type");
|
|
3243
3221
|
w && delete t[w];
|
|
3244
3222
|
}
|
|
3245
3223
|
d(), h = !0;
|
|
@@ -3253,7 +3231,7 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3253
3231
|
}
|
|
3254
3232
|
return p(`$request->setRequestUrl(${F(o)});`), p(`$request->setRequestMethod(${F(n)});`), h && (p("$request->setBody($body);"), d()), Object.keys(a).length && (p(`$request->setQuery(new http\\QueryString(${F(a, l)}));`), d()), Object.keys(t).length && (p(`$request->setHeaders(${F(t, l)});`), d()), Object.keys(s).length && (d(), p(`$client->setCookies(${F(s, l)});`), d()), p("$client->enqueue($request)->send();"), p("$response = $client->getResponse();"), d(), p("echo $response->getBody();"), !c && i && (d(), p("?>")), m();
|
|
3255
3233
|
}
|
|
3256
|
-
},
|
|
3234
|
+
}, ss = {
|
|
3257
3235
|
info: {
|
|
3258
3236
|
key: "php",
|
|
3259
3237
|
title: "PHP",
|
|
@@ -3261,24 +3239,24 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3261
3239
|
cli: "php %s"
|
|
3262
3240
|
},
|
|
3263
3241
|
clientsById: {
|
|
3264
|
-
curl:
|
|
3265
|
-
guzzle:
|
|
3266
|
-
http1:
|
|
3267
|
-
http2:
|
|
3242
|
+
curl: rs,
|
|
3243
|
+
guzzle: as,
|
|
3244
|
+
http1: os,
|
|
3245
|
+
http2: is
|
|
3268
3246
|
}
|
|
3269
3247
|
}, sa = (e) => ({ method: n, headersObj: a, cookies: s, uriObj: o, fullUrl: r, postData: i, allHeaders: l }) => {
|
|
3270
|
-
const { push: c, join: u } = new
|
|
3248
|
+
const { push: c, join: u } = new O();
|
|
3271
3249
|
if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(n.toUpperCase()))
|
|
3272
3250
|
return "Method not supported";
|
|
3273
3251
|
const d = [], m = Object.keys(a);
|
|
3274
3252
|
return m.length && (c("$headers=@{}"), m.forEach((h) => {
|
|
3275
|
-
h !== "connection" && c(`$headers.Add("${h}", "${
|
|
3253
|
+
h !== "connection" && c(`$headers.Add("${h}", "${ze(a[h], { escapeChar: "`" })}")`);
|
|
3276
3254
|
}), d.push("-Headers $headers")), s.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((h) => {
|
|
3277
3255
|
c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${h.name}'`), c(`$cookie.Value = '${h.value}'`), c(`$cookie.Domain = '${o.host}'`), c("$session.Cookies.Add($cookie)");
|
|
3278
3256
|
}), d.push("-WebSession $session")), i.text && (d.push(
|
|
3279
|
-
`-ContentType '${
|
|
3257
|
+
`-ContentType '${ze(de(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
|
|
3280
3258
|
), d.push(`-Body '${i.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${n} ${d.join(" ")}`.trim()), u();
|
|
3281
|
-
},
|
|
3259
|
+
}, ls = {
|
|
3282
3260
|
info: {
|
|
3283
3261
|
key: "restmethod",
|
|
3284
3262
|
title: "Invoke-RestMethod",
|
|
@@ -3287,7 +3265,7 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3287
3265
|
extname: ".ps1"
|
|
3288
3266
|
},
|
|
3289
3267
|
convert: sa("Invoke-RestMethod")
|
|
3290
|
-
},
|
|
3268
|
+
}, cs = {
|
|
3291
3269
|
info: {
|
|
3292
3270
|
key: "webrequest",
|
|
3293
3271
|
title: "Invoke-WebRequest",
|
|
@@ -3296,15 +3274,15 @@ ${c}${c}`), 1), x.push("],")), y(x.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
3296
3274
|
extname: ".ps1"
|
|
3297
3275
|
},
|
|
3298
3276
|
convert: sa("Invoke-WebRequest")
|
|
3299
|
-
},
|
|
3277
|
+
}, us = {
|
|
3300
3278
|
info: {
|
|
3301
3279
|
key: "powershell",
|
|
3302
3280
|
title: "Powershell",
|
|
3303
3281
|
default: "webrequest"
|
|
3304
3282
|
},
|
|
3305
3283
|
clientsById: {
|
|
3306
|
-
webrequest:
|
|
3307
|
-
restmethod:
|
|
3284
|
+
webrequest: cs,
|
|
3285
|
+
restmethod: ls
|
|
3308
3286
|
}
|
|
3309
3287
|
};
|
|
3310
3288
|
function Fn(e, t, n, a, s) {
|
|
@@ -3336,7 +3314,7 @@ var Re = (e, t, n) => {
|
|
|
3336
3314
|
default:
|
|
3337
3315
|
return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3338
3316
|
}
|
|
3339
|
-
},
|
|
3317
|
+
}, ds = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], fs = {
|
|
3340
3318
|
info: {
|
|
3341
3319
|
key: "requests",
|
|
3342
3320
|
title: "Requests",
|
|
@@ -3350,7 +3328,7 @@ var Re = (e, t, n) => {
|
|
|
3350
3328
|
indent: " ",
|
|
3351
3329
|
pretty: !0,
|
|
3352
3330
|
...s
|
|
3353
|
-
}, { push: r, blank: i, join: l, addPostProcessor: c } = new
|
|
3331
|
+
}, { push: r, blank: i, join: l, addPostProcessor: c } = new O({ indent: o.indent });
|
|
3354
3332
|
r("import requests"), i(), r(`url = "${e}"`), i();
|
|
3355
3333
|
const u = n;
|
|
3356
3334
|
let p = {};
|
|
@@ -3363,18 +3341,18 @@ var Re = (e, t, n) => {
|
|
|
3363
3341
|
case "multipart/form-data":
|
|
3364
3342
|
if (!t.params)
|
|
3365
3343
|
break;
|
|
3366
|
-
if (p = {}, t.params.forEach((
|
|
3367
|
-
|
|
3344
|
+
if (p = {}, t.params.forEach((g) => {
|
|
3345
|
+
g.fileName ? (g.contentType ? d[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'), '${g.contentType}')` : d[g.name] = `('${g.fileName}', open('${g.fileName}', 'rb'))`, m = !0) : (p[g.name] = g.value, h = !0);
|
|
3368
3346
|
}), m) {
|
|
3369
3347
|
r(`files = ${Re(d, o)}`), h && r(`payload = ${Re(p, o)}`);
|
|
3370
|
-
const
|
|
3371
|
-
|
|
3348
|
+
const g = Y(u, "content-type");
|
|
3349
|
+
g && delete u[g];
|
|
3372
3350
|
} else {
|
|
3373
|
-
const
|
|
3374
|
-
|
|
3351
|
+
const g = JSON.stringify(t.text);
|
|
3352
|
+
g && (r(`payload = ${g}`), h = !0);
|
|
3375
3353
|
}
|
|
3376
3354
|
c(
|
|
3377
|
-
(
|
|
3355
|
+
(g) => g.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
|
|
3378
3356
|
);
|
|
3379
3357
|
break;
|
|
3380
3358
|
default: {
|
|
@@ -3382,27 +3360,27 @@ var Re = (e, t, n) => {
|
|
|
3382
3360
|
r(`payload = ${Re(t.paramsObj, o)}`), h = !0;
|
|
3383
3361
|
break;
|
|
3384
3362
|
}
|
|
3385
|
-
const
|
|
3386
|
-
|
|
3363
|
+
const g = JSON.stringify(t.text);
|
|
3364
|
+
g && (r(`payload = ${g}`), h = !0);
|
|
3387
3365
|
}
|
|
3388
3366
|
}
|
|
3389
|
-
const
|
|
3390
|
-
if (
|
|
3367
|
+
const v = Object.keys(u).length;
|
|
3368
|
+
if (v === 0 && (h || m))
|
|
3391
3369
|
i();
|
|
3392
|
-
else if (
|
|
3393
|
-
Object.keys(u).forEach((
|
|
3394
|
-
r(`headers = {"${
|
|
3370
|
+
else if (v === 1)
|
|
3371
|
+
Object.keys(u).forEach((g) => {
|
|
3372
|
+
r(`headers = {"${g}": "${V(u[g])}"}`), i();
|
|
3395
3373
|
});
|
|
3396
|
-
else if (
|
|
3397
|
-
let
|
|
3374
|
+
else if (v > 1) {
|
|
3375
|
+
let g = 1;
|
|
3398
3376
|
r("headers = {"), Object.keys(u).forEach((x) => {
|
|
3399
|
-
r(
|
|
3377
|
+
r(g !== v ? `"${x}": "${V(u[x])}",` : `"${x}": "${V(u[x])}"`, 1), g += 1;
|
|
3400
3378
|
}), r("}"), i();
|
|
3401
3379
|
}
|
|
3402
|
-
let b =
|
|
3403
|
-
return h && (y ? b += ", json=payload" : b += ", data=payload"), m && (b += ", files=files"),
|
|
3380
|
+
let b = ds.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
|
|
3381
|
+
return h && (y ? b += ", json=payload" : b += ", data=payload"), m && (b += ", files=files"), v > 0 && (b += ", headers=headers"), b += ")", r(b), i(), r("print(response.text)"), l();
|
|
3404
3382
|
}
|
|
3405
|
-
},
|
|
3383
|
+
}, ps = {
|
|
3406
3384
|
info: {
|
|
3407
3385
|
key: "python",
|
|
3408
3386
|
title: "Python",
|
|
@@ -3410,9 +3388,9 @@ var Re = (e, t, n) => {
|
|
|
3410
3388
|
cli: "python3 %s"
|
|
3411
3389
|
},
|
|
3412
3390
|
clientsById: {
|
|
3413
|
-
requests:
|
|
3391
|
+
requests: fs
|
|
3414
3392
|
}
|
|
3415
|
-
},
|
|
3393
|
+
}, ms = {
|
|
3416
3394
|
info: {
|
|
3417
3395
|
key: "httr",
|
|
3418
3396
|
title: "httr",
|
|
@@ -3421,13 +3399,13 @@ var Re = (e, t, n) => {
|
|
|
3421
3399
|
extname: ".r"
|
|
3422
3400
|
},
|
|
3423
3401
|
convert: ({ url: e, queryObj: t, queryString: n, postData: a, allHeaders: s, method: o }) => {
|
|
3424
|
-
const { push: r, blank: i, join: l } = new
|
|
3402
|
+
const { push: r, blank: i, join: l } = new O();
|
|
3425
3403
|
r("library(httr)"), i(), r(`url <- "${e}"`), i();
|
|
3426
3404
|
const c = t;
|
|
3427
3405
|
delete t.key;
|
|
3428
3406
|
const u = Object.keys(c).length;
|
|
3429
|
-
n.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), i()) : n.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((S,
|
|
3430
|
-
|
|
3407
|
+
n.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), i()) : n.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((S, k) => {
|
|
3408
|
+
k !== u - 1 ? r(` ${S} = "${c[S].toString()}",`) : r(` ${S} = "${c[S].toString()}"`);
|
|
3431
3409
|
}), r(")"), i());
|
|
3432
3410
|
const p = JSON.stringify(a.text);
|
|
3433
3411
|
if (p && (r(`payload <- ${p}`), i()), a.text || a.jsonObj || a.params)
|
|
@@ -3445,22 +3423,22 @@ var Re = (e, t, n) => {
|
|
|
3445
3423
|
r('encode <- "raw"'), i();
|
|
3446
3424
|
break;
|
|
3447
3425
|
}
|
|
3448
|
-
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, y = m ? `accept("${
|
|
3426
|
+
const d = de(s, "cookie"), m = de(s, "accept"), h = d ? `set_cookies(\`${String(d).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, y = m ? `accept("${V(m)}")` : void 0, v = `content_type("${V(a.mimeType)}")`, b = Object.entries(s).filter(([S]) => !["cookie", "accept", "content-type"].includes(S.toLowerCase())).map(([S, k]) => `'${S}' = '${Je(k)}'`).join(", "), g = b ? `add_headers(${b})` : void 0;
|
|
3449
3427
|
let x = `response <- VERB("${o}", url`;
|
|
3450
3428
|
p && (x += ", body = payload"), n.length && (x += ", query = queryString");
|
|
3451
|
-
const w = [
|
|
3429
|
+
const w = [g, v, y, h].filter((S) => !!S).join(", ");
|
|
3452
3430
|
return w && (x += `, ${w}`), (a.text || a.jsonObj || a.params) && (x += ", encode = encode"), x += ")", r(x), i(), r('content(response, "text")'), l();
|
|
3453
3431
|
}
|
|
3454
|
-
},
|
|
3432
|
+
}, hs = {
|
|
3455
3433
|
info: {
|
|
3456
3434
|
key: "r",
|
|
3457
3435
|
title: "R",
|
|
3458
3436
|
default: "httr"
|
|
3459
3437
|
},
|
|
3460
3438
|
clientsById: {
|
|
3461
|
-
httr:
|
|
3439
|
+
httr: ms
|
|
3462
3440
|
}
|
|
3463
|
-
},
|
|
3441
|
+
}, ys = {
|
|
3464
3442
|
info: {
|
|
3465
3443
|
key: "native",
|
|
3466
3444
|
title: "net::http",
|
|
@@ -3469,7 +3447,7 @@ var Re = (e, t, n) => {
|
|
|
3469
3447
|
extname: ".rb"
|
|
3470
3448
|
},
|
|
3471
3449
|
convert: ({ uriObj: e, method: t, fullUrl: n, postData: a, allHeaders: s }) => {
|
|
3472
|
-
const { push: o, blank: r, join: i } = new
|
|
3450
|
+
const { push: o, blank: r, join: i } = new O();
|
|
3473
3451
|
o("require 'uri'"), o("require 'net/http'"), r();
|
|
3474
3452
|
const l = t.toUpperCase(), c = [
|
|
3475
3453
|
"GET",
|
|
@@ -3491,16 +3469,16 @@ var Re = (e, t, n) => {
|
|
|
3491
3469
|
o(`request["${d}"] = '${Je(s[d])}'`);
|
|
3492
3470
|
}), a.text && o(`request.body = ${JSON.stringify(a.text)}`), r(), o("response = http.request(request)"), o("puts response.read_body"), i();
|
|
3493
3471
|
}
|
|
3494
|
-
},
|
|
3472
|
+
}, gs = {
|
|
3495
3473
|
info: {
|
|
3496
3474
|
key: "ruby",
|
|
3497
3475
|
title: "Ruby",
|
|
3498
3476
|
default: "native"
|
|
3499
3477
|
},
|
|
3500
3478
|
clientsById: {
|
|
3501
|
-
native:
|
|
3479
|
+
native: ys
|
|
3502
3480
|
}
|
|
3503
|
-
},
|
|
3481
|
+
}, z = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, vs = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), bs = {
|
|
3504
3482
|
"http1.0": "0",
|
|
3505
3483
|
"url ": "",
|
|
3506
3484
|
cookie: "b",
|
|
@@ -3510,13 +3488,13 @@ var Re = (e, t, n) => {
|
|
|
3510
3488
|
header: "H",
|
|
3511
3489
|
insecure: "k",
|
|
3512
3490
|
request: "X"
|
|
3513
|
-
},
|
|
3491
|
+
}, xs = (e) => (t) => {
|
|
3514
3492
|
if (e) {
|
|
3515
|
-
const n =
|
|
3493
|
+
const n = bs[t];
|
|
3516
3494
|
return n ? `-${n}` : "";
|
|
3517
3495
|
}
|
|
3518
3496
|
return `--${t}`;
|
|
3519
|
-
},
|
|
3497
|
+
}, ks = {
|
|
3520
3498
|
info: {
|
|
3521
3499
|
key: "curl",
|
|
3522
3500
|
title: "cURL",
|
|
@@ -3525,66 +3503,66 @@ var Re = (e, t, n) => {
|
|
|
3525
3503
|
extname: ".sh"
|
|
3526
3504
|
},
|
|
3527
3505
|
convert: ({ fullUrl: e, method: t, httpVersion: n, headersObj: a, allHeaders: s, postData: o }, r = {}) => {
|
|
3528
|
-
var
|
|
3529
|
-
const { indent: i = " ", short: l = !1, binary: c = !1, globOff: u = !1 } = r, p = " ", { push: d, join: m } = new
|
|
3506
|
+
var v;
|
|
3507
|
+
const { indent: i = " ", short: l = !1, binary: c = !1, globOff: u = !1 } = r, p = " ", { push: d, join: m } = new O({
|
|
3530
3508
|
...typeof i == "string" ? { indent: i } : {},
|
|
3531
3509
|
join: i !== !1 ? ` \\
|
|
3532
3510
|
${i}` : " "
|
|
3533
|
-
}), h =
|
|
3534
|
-
let y =
|
|
3511
|
+
}), h = xs(l);
|
|
3512
|
+
let y = z(e);
|
|
3535
3513
|
if (d(`curl ${h("request")} ${t}`), u && (y = unescape(y), d(h("globoff"))), d(`${h("url ")}${y}`), n === "HTTP/1.0" && d(h("http1.0")), de(s, "accept-encoding") && d("--compressed"), o.mimeType === "multipart/form-data") {
|
|
3536
|
-
const b =
|
|
3514
|
+
const b = Y(a, "content-type");
|
|
3537
3515
|
if (b) {
|
|
3538
|
-
const
|
|
3539
|
-
if (b &&
|
|
3540
|
-
const x = String(
|
|
3516
|
+
const g = a[b];
|
|
3517
|
+
if (b && g) {
|
|
3518
|
+
const x = String(g).replace(/; boundary.+?(?=(;|$))/, "");
|
|
3541
3519
|
a[b] = x, s[b] = x;
|
|
3542
3520
|
}
|
|
3543
3521
|
}
|
|
3544
3522
|
}
|
|
3545
3523
|
switch (Object.keys(a).sort().forEach((b) => {
|
|
3546
|
-
const
|
|
3547
|
-
d(`${h("header")} ${
|
|
3548
|
-
}), s.cookie && d(`${h("cookie")} ${
|
|
3524
|
+
const g = `${b}: ${a[b]}`;
|
|
3525
|
+
d(`${h("header")} ${z(g)}`);
|
|
3526
|
+
}), s.cookie && d(`${h("cookie")} ${z(s.cookie)}`), o.mimeType) {
|
|
3549
3527
|
case "multipart/form-data":
|
|
3550
|
-
(
|
|
3528
|
+
(v = o.params) == null || v.forEach((g) => {
|
|
3551
3529
|
let x = "";
|
|
3552
|
-
|
|
3530
|
+
g.fileName ? x = `${g.name}='@${g.fileName}'` : x = z(`${g.name}=${g.value}`), d(`${h("form")} ${x}`);
|
|
3553
3531
|
});
|
|
3554
3532
|
break;
|
|
3555
3533
|
case "application/x-www-form-urlencoded":
|
|
3556
|
-
o.params ? o.params.forEach((
|
|
3557
|
-
const x =
|
|
3558
|
-
d(`${
|
|
3559
|
-
}) : d(`${c ? "--data-binary" : h("data")} ${
|
|
3534
|
+
o.params ? o.params.forEach((g) => {
|
|
3535
|
+
const x = g.name, w = encodeURIComponent(g.name), S = w !== x, k = S ? w : x, C = c ? "--data-binary" : S ? "--data-urlencode" : h("data");
|
|
3536
|
+
d(`${C} ${z(`${k}=${g.value}`)}`);
|
|
3537
|
+
}) : d(`${c ? "--data-binary" : h("data")} ${z(o.text)}`);
|
|
3560
3538
|
break;
|
|
3561
3539
|
default:
|
|
3562
3540
|
if (!o.text)
|
|
3563
3541
|
break;
|
|
3564
3542
|
let b = !1;
|
|
3565
|
-
if (
|
|
3543
|
+
if (xi(o.mimeType) && o.text.length > 20)
|
|
3566
3544
|
try {
|
|
3567
|
-
const
|
|
3545
|
+
const g = JSON.parse(o.text);
|
|
3568
3546
|
b = !0, o.text.indexOf("'") > 0 ? d(
|
|
3569
3547
|
`${c ? "--data-binary" : h("data")} @- <<EOF
|
|
3570
3548
|
${JSON.stringify(
|
|
3571
|
-
|
|
3549
|
+
g,
|
|
3572
3550
|
null,
|
|
3573
3551
|
p
|
|
3574
3552
|
)}
|
|
3575
3553
|
EOF`
|
|
3576
3554
|
) : d(
|
|
3577
3555
|
`${c ? "--data-binary" : h("data")} '
|
|
3578
|
-
${JSON.stringify(
|
|
3556
|
+
${JSON.stringify(g, null, p)}
|
|
3579
3557
|
'`
|
|
3580
3558
|
);
|
|
3581
3559
|
} catch {
|
|
3582
3560
|
}
|
|
3583
|
-
b || d(`${c ? "--data-binary" : h("data")} ${
|
|
3561
|
+
b || d(`${c ? "--data-binary" : h("data")} ${z(o.text)}`);
|
|
3584
3562
|
}
|
|
3585
3563
|
return m();
|
|
3586
3564
|
}
|
|
3587
|
-
},
|
|
3565
|
+
}, $s = {
|
|
3588
3566
|
info: {
|
|
3589
3567
|
key: "httpie",
|
|
3590
3568
|
title: "HTTPie",
|
|
@@ -3608,7 +3586,7 @@ ${JSON.stringify(v, null, p)}
|
|
|
3608
3586
|
verbose: !1,
|
|
3609
3587
|
verify: !1,
|
|
3610
3588
|
...r
|
|
3611
|
-
}, { push: l, join: c, unshift: u } = new
|
|
3589
|
+
}, { push: l, join: c, unshift: u } = new O({
|
|
3612
3590
|
indent: i.indent,
|
|
3613
3591
|
// @ts-expect-error SEEMS LEGIT
|
|
3614
3592
|
join: i.indent !== !1 ? ` \\
|
|
@@ -3618,22 +3596,22 @@ ${i.indent}` : " "
|
|
|
3618
3596
|
const d = [];
|
|
3619
3597
|
i.headers && d.push(i.short ? "-h" : "--headers"), i.body && d.push(i.short ? "-b" : "--body"), i.verbose && d.push(i.short ? "-v" : "--verbose"), i.print && d.push(`${i.short ? "-p" : "--print"}=${i.print}`), i.verify && d.push(`--verify=${i.verify}`), i.cert && d.push(`--cert=${i.cert}`), i.pretty && d.push(`--pretty=${i.pretty}`), i.style && d.push(`--style=${i.style}`), i.timeout && d.push(`--timeout=${i.timeout}`), i.queryParams && Object.keys(n).forEach((h) => {
|
|
3620
3598
|
const y = n[h];
|
|
3621
|
-
Array.isArray(y) ? y.forEach((
|
|
3622
|
-
l(`${h}==${
|
|
3623
|
-
}) : l(`${h}==${
|
|
3599
|
+
Array.isArray(y) ? y.forEach((v) => {
|
|
3600
|
+
l(`${h}==${z(v)}`);
|
|
3601
|
+
}) : l(`${h}==${z(y)}`);
|
|
3624
3602
|
}), Object.keys(e).sort().forEach((h) => {
|
|
3625
|
-
l(`${h}:${
|
|
3603
|
+
l(`${h}:${z(e[h])}`);
|
|
3626
3604
|
}), t.mimeType === "application/x-www-form-urlencoded" ? t.params && t.params.length && (d.push(i.short ? "-f" : "--form"), t.params.forEach((h) => {
|
|
3627
|
-
l(`${h.name}=${
|
|
3605
|
+
l(`${h.name}=${z(h.value)}`);
|
|
3628
3606
|
})) : p = !0;
|
|
3629
3607
|
const m = d.length ? `${d.join(" ")} ` : "";
|
|
3630
|
-
if (o =
|
|
3631
|
-
const h =
|
|
3608
|
+
if (o = z(i.queryParams ? o : a), u(`http ${m}${s} ${o}`), p && t.text) {
|
|
3609
|
+
const h = z(t.text);
|
|
3632
3610
|
u(`echo ${h} | `);
|
|
3633
3611
|
}
|
|
3634
3612
|
return c();
|
|
3635
3613
|
}
|
|
3636
|
-
},
|
|
3614
|
+
}, Ss = {
|
|
3637
3615
|
info: {
|
|
3638
3616
|
key: "wget",
|
|
3639
3617
|
title: "Wget",
|
|
@@ -3647,17 +3625,17 @@ ${i.indent}` : " "
|
|
|
3647
3625
|
short: !1,
|
|
3648
3626
|
verbose: !1,
|
|
3649
3627
|
...s
|
|
3650
|
-
}, { push: r, join: i } = new
|
|
3628
|
+
}, { push: r, join: i } = new O({
|
|
3651
3629
|
...typeof o.indent == "string" ? { indent: o.indent } : {},
|
|
3652
3630
|
join: o.indent !== !1 ? ` \\
|
|
3653
3631
|
${o.indent}` : " "
|
|
3654
3632
|
});
|
|
3655
|
-
return o.verbose ? r(`wget ${o.short ? "-v" : "--verbose"}`) : r(`wget ${o.short ? "-q" : "--quiet"}`), r(`--method ${
|
|
3633
|
+
return o.verbose ? r(`wget ${o.short ? "-v" : "--verbose"}`) : r(`wget ${o.short ? "-q" : "--quiet"}`), r(`--method ${z(e)}`), Object.keys(n).forEach((l) => {
|
|
3656
3634
|
const c = `${l}: ${n[l]}`;
|
|
3657
|
-
r(`--header ${
|
|
3658
|
-
}), t.text && r(`--body-data ${
|
|
3635
|
+
r(`--header ${z(c)}`);
|
|
3636
|
+
}), t.text && r(`--body-data ${vs(z(t.text))}`), r(o.short ? "-O" : "--output-document"), r(`- ${z(a)}`), i();
|
|
3659
3637
|
}
|
|
3660
|
-
},
|
|
3638
|
+
}, ws = {
|
|
3661
3639
|
info: {
|
|
3662
3640
|
key: "shell",
|
|
3663
3641
|
title: "Shell",
|
|
@@ -3665,9 +3643,9 @@ ${o.indent}` : " "
|
|
|
3665
3643
|
cli: "%s"
|
|
3666
3644
|
},
|
|
3667
3645
|
clientsById: {
|
|
3668
|
-
curl:
|
|
3669
|
-
httpie:
|
|
3670
|
-
wget:
|
|
3646
|
+
curl: ks,
|
|
3647
|
+
httpie: $s,
|
|
3648
|
+
wget: Ss
|
|
3671
3649
|
}
|
|
3672
3650
|
}, qn = (e, t) => t.repeat(e), In = (e, t, n, a) => {
|
|
3673
3651
|
const s = qn(a, n), o = qn(a - 1, n), r = t ? `,
|
|
@@ -3702,7 +3680,7 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3702
3680
|
default:
|
|
3703
3681
|
return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
|
|
3704
3682
|
}
|
|
3705
|
-
},
|
|
3683
|
+
}, js = {
|
|
3706
3684
|
info: {
|
|
3707
3685
|
key: "urlsession",
|
|
3708
3686
|
title: "URLSession",
|
|
@@ -3717,7 +3695,7 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3717
3695
|
pretty: !0,
|
|
3718
3696
|
timeout: 10,
|
|
3719
3697
|
...o
|
|
3720
|
-
}, { push: i, blank: l, join: c } = new
|
|
3698
|
+
}, { push: i, blank: l, join: c } = new O({ indent: r.indent });
|
|
3721
3699
|
i("import Foundation"), l();
|
|
3722
3700
|
const u = t.text || t.jsonObj || t.params;
|
|
3723
3701
|
if (u)
|
|
@@ -3746,42 +3724,42 @@ ${o}]` : `[${e.join(r)}]`;
|
|
|
3746
3724
|
i(`URLQueryItem(name: "${h}", value: "${y}"),`, 1);
|
|
3747
3725
|
break;
|
|
3748
3726
|
case "[object Array]":
|
|
3749
|
-
y.forEach((
|
|
3750
|
-
i(`URLQueryItem(name: "${h}", value: "${
|
|
3727
|
+
y.forEach((v) => {
|
|
3728
|
+
i(`URLQueryItem(name: "${h}", value: "${v}"),`, 1);
|
|
3751
3729
|
});
|
|
3752
3730
|
break;
|
|
3753
3731
|
}
|
|
3754
3732
|
}), i("]"), i("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), i("var request = URLRequest(url: components.url!)")), i(`request.httpMethod = "${s}"`), i(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && i(`request.allHTTPHeaderFields = ${dt(e, r)}`), u && i("request.httpBody = postData"), l(), i("let (data, _) = try await URLSession.shared.data(for: request)"), i("print(String(decoding: data, as: UTF8.self))"), c();
|
|
3755
3733
|
}
|
|
3756
|
-
},
|
|
3734
|
+
}, Ns = {
|
|
3757
3735
|
info: {
|
|
3758
3736
|
key: "swift",
|
|
3759
3737
|
title: "Swift",
|
|
3760
3738
|
default: "urlsession"
|
|
3761
3739
|
},
|
|
3762
3740
|
clientsById: {
|
|
3763
|
-
urlsession:
|
|
3764
|
-
}
|
|
3765
|
-
},
|
|
3766
|
-
c:
|
|
3767
|
-
clojure:
|
|
3768
|
-
csharp:
|
|
3769
|
-
go:
|
|
3770
|
-
http:
|
|
3771
|
-
java:
|
|
3772
|
-
javascript:
|
|
3773
|
-
json:
|
|
3774
|
-
kotlin:
|
|
3775
|
-
node:
|
|
3776
|
-
objc:
|
|
3777
|
-
ocaml:
|
|
3778
|
-
php:
|
|
3779
|
-
powershell:
|
|
3780
|
-
python:
|
|
3781
|
-
r:
|
|
3782
|
-
ruby:
|
|
3783
|
-
shell:
|
|
3784
|
-
swift:
|
|
3741
|
+
urlsession: js
|
|
3742
|
+
}
|
|
3743
|
+
}, Ts = {
|
|
3744
|
+
c: bi,
|
|
3745
|
+
clojure: Si,
|
|
3746
|
+
csharp: Oi,
|
|
3747
|
+
go: Pi,
|
|
3748
|
+
http: Ri,
|
|
3749
|
+
java: _i,
|
|
3750
|
+
javascript: Bi,
|
|
3751
|
+
json: Vi,
|
|
3752
|
+
kotlin: zi,
|
|
3753
|
+
node: Xi,
|
|
3754
|
+
objc: es,
|
|
3755
|
+
ocaml: ns,
|
|
3756
|
+
php: ss,
|
|
3757
|
+
powershell: us,
|
|
3758
|
+
python: ps,
|
|
3759
|
+
r: hs,
|
|
3760
|
+
ruby: gs,
|
|
3761
|
+
shell: ws,
|
|
3762
|
+
swift: Ns
|
|
3785
3763
|
}, ft = { exports: {} };
|
|
3786
3764
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
3787
3765
|
ft.exports;
|
|
@@ -3789,86 +3767,86 @@ ft.exports;
|
|
|
3789
3767
|
(function(n) {
|
|
3790
3768
|
var a = t && !t.nodeType && t, s = e && !e.nodeType && e, o = typeof ot == "object" && ot;
|
|
3791
3769
|
(o.global === o || o.window === o || o.self === o) && (n = o);
|
|
3792
|
-
var r, i = 2147483647, l = 36, c = 1, u = 26, p = 38, d = 700, m = 72, h = 128, y = "-",
|
|
3770
|
+
var r, i = 2147483647, l = 36, c = 1, u = 26, p = 38, d = 700, m = 72, h = 128, y = "-", v = /^xn--/, b = /[^\x20-\x7E]/, g = /[\x2E\u3002\uFF0E\uFF61]/g, x = {
|
|
3793
3771
|
overflow: "Overflow: input needs wider integers to process",
|
|
3794
3772
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3795
3773
|
"invalid-input": "Invalid input"
|
|
3796
|
-
}, w = l - c, S = Math.floor,
|
|
3797
|
-
function
|
|
3774
|
+
}, w = l - c, S = Math.floor, k = String.fromCharCode, C;
|
|
3775
|
+
function P($) {
|
|
3798
3776
|
throw new RangeError(x[$]);
|
|
3799
3777
|
}
|
|
3800
|
-
function R($,
|
|
3778
|
+
function R($, N) {
|
|
3801
3779
|
for (var E = $.length, _ = []; E--; )
|
|
3802
|
-
_[E] =
|
|
3780
|
+
_[E] = N($[E]);
|
|
3803
3781
|
return _;
|
|
3804
3782
|
}
|
|
3805
|
-
function
|
|
3783
|
+
function q($, N) {
|
|
3806
3784
|
var E = $.split("@"), _ = "";
|
|
3807
|
-
E.length > 1 && (_ = E[0] + "@", $ = E[1]), $ = $.replace(
|
|
3808
|
-
var U = $.split("."),
|
|
3809
|
-
return _ +
|
|
3785
|
+
E.length > 1 && (_ = E[0] + "@", $ = E[1]), $ = $.replace(g, ".");
|
|
3786
|
+
var U = $.split("."), Z = R(U, N).join(".");
|
|
3787
|
+
return _ + Z;
|
|
3810
3788
|
}
|
|
3811
|
-
function
|
|
3812
|
-
for (var
|
|
3813
|
-
U = $.charCodeAt(E++), U >= 55296 && U <= 56319 && E < _ ? (
|
|
3814
|
-
return
|
|
3789
|
+
function G($) {
|
|
3790
|
+
for (var N = [], E = 0, _ = $.length, U, Z; E < _; )
|
|
3791
|
+
U = $.charCodeAt(E++), U >= 55296 && U <= 56319 && E < _ ? (Z = $.charCodeAt(E++), (Z & 64512) == 56320 ? N.push(((U & 1023) << 10) + (Z & 1023) + 65536) : (N.push(U), E--)) : N.push(U);
|
|
3792
|
+
return N;
|
|
3815
3793
|
}
|
|
3816
|
-
function
|
|
3817
|
-
return R($, function(
|
|
3794
|
+
function K($) {
|
|
3795
|
+
return R($, function(N) {
|
|
3818
3796
|
var E = "";
|
|
3819
|
-
return
|
|
3797
|
+
return N > 65535 && (N -= 65536, E += k(N >>> 10 & 1023 | 55296), N = 56320 | N & 1023), E += k(N), E;
|
|
3820
3798
|
}).join("");
|
|
3821
3799
|
}
|
|
3822
|
-
function
|
|
3800
|
+
function I($) {
|
|
3823
3801
|
return $ - 48 < 10 ? $ - 22 : $ - 65 < 26 ? $ - 65 : $ - 97 < 26 ? $ - 97 : l;
|
|
3824
3802
|
}
|
|
3825
|
-
function
|
|
3826
|
-
return $ + 22 + 75 * ($ < 26) - ((
|
|
3803
|
+
function H($, N) {
|
|
3804
|
+
return $ + 22 + 75 * ($ < 26) - ((N != 0) << 5);
|
|
3827
3805
|
}
|
|
3828
|
-
function
|
|
3806
|
+
function L($, N, E) {
|
|
3829
3807
|
var _ = 0;
|
|
3830
|
-
for ($ = E ? S($ / d) : $ >> 1, $ += S($ /
|
|
3808
|
+
for ($ = E ? S($ / d) : $ >> 1, $ += S($ / N); $ > w * u >> 1; _ += l)
|
|
3831
3809
|
$ = S($ / w);
|
|
3832
3810
|
return S(_ + (w + 1) * $ / ($ + p));
|
|
3833
3811
|
}
|
|
3834
|
-
function
|
|
3835
|
-
var
|
|
3812
|
+
function ee($) {
|
|
3813
|
+
var N = [], E = $.length, _, U = 0, Z = h, W = m, te, re, se, fe, Q, ne, ae, ye, ke;
|
|
3836
3814
|
for (te = $.lastIndexOf(y), te < 0 && (te = 0), re = 0; re < te; ++re)
|
|
3837
|
-
$.charCodeAt(re) >= 128 &&
|
|
3815
|
+
$.charCodeAt(re) >= 128 && P("not-basic"), N.push($.charCodeAt(re));
|
|
3838
3816
|
for (se = te > 0 ? te + 1 : 0; se < E; ) {
|
|
3839
|
-
for (fe = U,
|
|
3840
|
-
ke = l - ye,
|
|
3841
|
-
_ =
|
|
3817
|
+
for (fe = U, Q = 1, ne = l; se >= E && P("invalid-input"), ae = I($.charCodeAt(se++)), (ae >= l || ae > S((i - U) / Q)) && P("overflow"), U += ae * Q, ye = ne <= W ? c : ne >= W + u ? u : ne - W, !(ae < ye); ne += l)
|
|
3818
|
+
ke = l - ye, Q > S(i / ke) && P("overflow"), Q *= ke;
|
|
3819
|
+
_ = N.length + 1, W = L(U - fe, _, fe == 0), S(U / _) > i - Z && P("overflow"), Z += S(U / _), U %= _, N.splice(U++, 0, Z);
|
|
3842
3820
|
}
|
|
3843
|
-
return
|
|
3821
|
+
return K(N);
|
|
3844
3822
|
}
|
|
3845
3823
|
function he($) {
|
|
3846
|
-
var
|
|
3847
|
-
for ($ =
|
|
3848
|
-
|
|
3824
|
+
var N, E, _, U, Z, W, te, re, se, fe, Q, ne = [], ae, ye, ke, xt;
|
|
3825
|
+
for ($ = G($), ae = $.length, N = h, E = 0, Z = m, W = 0; W < ae; ++W)
|
|
3826
|
+
Q = $[W], Q < 128 && ne.push(k(Q));
|
|
3849
3827
|
for (_ = U = ne.length, U && ne.push(y); _ < ae; ) {
|
|
3850
|
-
for (te = i,
|
|
3851
|
-
|
|
3852
|
-
for (ye = _ + 1, te -
|
|
3853
|
-
if (
|
|
3854
|
-
for (re = E, se = l; fe = se <=
|
|
3828
|
+
for (te = i, W = 0; W < ae; ++W)
|
|
3829
|
+
Q = $[W], Q >= N && Q < te && (te = Q);
|
|
3830
|
+
for (ye = _ + 1, te - N > S((i - E) / ye) && P("overflow"), E += (te - N) * ye, N = te, W = 0; W < ae; ++W)
|
|
3831
|
+
if (Q = $[W], Q < N && ++E > i && P("overflow"), Q == N) {
|
|
3832
|
+
for (re = E, se = l; fe = se <= Z ? c : se >= Z + u ? u : se - Z, !(re < fe); se += l)
|
|
3855
3833
|
xt = re - fe, ke = l - fe, ne.push(
|
|
3856
|
-
|
|
3834
|
+
k(H(fe + xt % ke, 0))
|
|
3857
3835
|
), re = S(xt / ke);
|
|
3858
|
-
ne.push(
|
|
3836
|
+
ne.push(k(H(re, 0))), Z = L(E, ye, _ == U), E = 0, ++_;
|
|
3859
3837
|
}
|
|
3860
|
-
++E, ++
|
|
3838
|
+
++E, ++N;
|
|
3861
3839
|
}
|
|
3862
3840
|
return ne.join("");
|
|
3863
3841
|
}
|
|
3864
3842
|
function bt($) {
|
|
3865
|
-
return
|
|
3866
|
-
return
|
|
3843
|
+
return q($, function(N) {
|
|
3844
|
+
return v.test(N) ? ee(N.slice(4).toLowerCase()) : N;
|
|
3867
3845
|
});
|
|
3868
3846
|
}
|
|
3869
3847
|
function Ze($) {
|
|
3870
|
-
return
|
|
3871
|
-
return b.test(
|
|
3848
|
+
return q($, function(N) {
|
|
3849
|
+
return b.test(N) ? "xn--" + he(N) : N;
|
|
3872
3850
|
});
|
|
3873
3851
|
}
|
|
3874
3852
|
if (r = {
|
|
@@ -3886,10 +3864,10 @@ ft.exports;
|
|
|
3886
3864
|
* @type Object
|
|
3887
3865
|
*/
|
|
3888
3866
|
ucs2: {
|
|
3889
|
-
decode:
|
|
3890
|
-
encode:
|
|
3867
|
+
decode: G,
|
|
3868
|
+
encode: K
|
|
3891
3869
|
},
|
|
3892
|
-
decode:
|
|
3870
|
+
decode: ee,
|
|
3893
3871
|
encode: he,
|
|
3894
3872
|
toASCII: Ze,
|
|
3895
3873
|
toUnicode: bt
|
|
@@ -3897,13 +3875,13 @@ ft.exports;
|
|
|
3897
3875
|
if (e.exports == a)
|
|
3898
3876
|
s.exports = r;
|
|
3899
3877
|
else
|
|
3900
|
-
for (
|
|
3901
|
-
r.hasOwnProperty(
|
|
3878
|
+
for (C in r)
|
|
3879
|
+
r.hasOwnProperty(C) && (a[C] = r[C]);
|
|
3902
3880
|
else
|
|
3903
3881
|
n.punycode = r;
|
|
3904
3882
|
})(ot);
|
|
3905
3883
|
})(ft, ft.exports);
|
|
3906
|
-
var
|
|
3884
|
+
var Os = ft.exports, Cs = Error, Ps = EvalError, Es = RangeError, Rs = ReferenceError, la = SyntaxError, Ye = TypeError, As = URIError, Fs = function() {
|
|
3907
3885
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3908
3886
|
return !1;
|
|
3909
3887
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3926,32 +3904,32 @@ var Cs = ft.exports, Ps = Error, Es = EvalError, Rs = RangeError, As = Reference
|
|
|
3926
3904
|
return !1;
|
|
3927
3905
|
}
|
|
3928
3906
|
return !0;
|
|
3929
|
-
}, Ln = typeof Symbol < "u" && Symbol,
|
|
3930
|
-
return typeof Ln != "function" || typeof Symbol != "function" || typeof Ln("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3907
|
+
}, Ln = typeof Symbol < "u" && Symbol, qs = Fs, Is = function() {
|
|
3908
|
+
return typeof Ln != "function" || typeof Symbol != "function" || typeof Ln("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : qs();
|
|
3931
3909
|
}, jt = {
|
|
3932
3910
|
__proto__: null,
|
|
3933
3911
|
foo: {}
|
|
3934
|
-
},
|
|
3935
|
-
return { __proto__: jt }.foo === jt.foo && !(jt instanceof
|
|
3936
|
-
},
|
|
3912
|
+
}, _s = Object, Ls = function() {
|
|
3913
|
+
return { __proto__: jt }.foo === jt.foo && !(jt instanceof _s);
|
|
3914
|
+
}, Us = "Function.prototype.bind called on incompatible ", Ms = Object.prototype.toString, Hs = Math.max, Bs = "[object Function]", Un = function(t, n) {
|
|
3937
3915
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
3938
3916
|
a[s] = t[s];
|
|
3939
3917
|
for (var o = 0; o < n.length; o += 1)
|
|
3940
3918
|
a[o + t.length] = n[o];
|
|
3941
3919
|
return a;
|
|
3942
|
-
},
|
|
3920
|
+
}, Ds = function(t, n) {
|
|
3943
3921
|
for (var a = [], s = n, o = 0; s < t.length; s += 1, o += 1)
|
|
3944
3922
|
a[o] = t[s];
|
|
3945
3923
|
return a;
|
|
3946
|
-
},
|
|
3924
|
+
}, Vs = function(e, t) {
|
|
3947
3925
|
for (var n = "", a = 0; a < e.length; a += 1)
|
|
3948
3926
|
n += e[a], a + 1 < e.length && (n += t);
|
|
3949
3927
|
return n;
|
|
3950
3928
|
}, Ws = function(t) {
|
|
3951
3929
|
var n = this;
|
|
3952
|
-
if (typeof n != "function" ||
|
|
3953
|
-
throw new TypeError(
|
|
3954
|
-
for (var a =
|
|
3930
|
+
if (typeof n != "function" || Ms.apply(n) !== Bs)
|
|
3931
|
+
throw new TypeError(Us + n);
|
|
3932
|
+
for (var a = Ds(arguments, 1), s, o = function() {
|
|
3955
3933
|
if (this instanceof s) {
|
|
3956
3934
|
var u = n.apply(
|
|
3957
3935
|
this,
|
|
@@ -3963,15 +3941,15 @@ var Cs = ft.exports, Ps = Error, Es = EvalError, Rs = RangeError, As = Reference
|
|
|
3963
3941
|
t,
|
|
3964
3942
|
Un(a, arguments)
|
|
3965
3943
|
);
|
|
3966
|
-
}, r =
|
|
3944
|
+
}, r = Hs(0, n.length - a.length), i = [], l = 0; l < r; l++)
|
|
3967
3945
|
i[l] = "$" + l;
|
|
3968
|
-
if (s = Function("binder", "return function (" +
|
|
3946
|
+
if (s = Function("binder", "return function (" + Vs(i, ",") + "){ return binder.apply(this,arguments); }")(o), n.prototype) {
|
|
3969
3947
|
var c = function() {
|
|
3970
3948
|
};
|
|
3971
3949
|
c.prototype = n.prototype, s.prototype = new c(), c.prototype = null;
|
|
3972
3950
|
}
|
|
3973
3951
|
return s;
|
|
3974
|
-
},
|
|
3952
|
+
}, zs = Ws, fn = Function.prototype.bind || zs, Js = Function.prototype.call, Gs = Object.prototype.hasOwnProperty, Ks = fn, Qs = Ks.call(Js, Gs), T, Ys = Cs, Xs = Ps, Zs = Es, el = Rs, Ie = la, Ae = Ye, tl = As, ca = Function, Nt = function(e) {
|
|
3975
3953
|
try {
|
|
3976
3954
|
return ca('"use strict"; return (' + e + ").constructor;")();
|
|
3977
3955
|
} catch {
|
|
@@ -3985,7 +3963,7 @@ if (we)
|
|
|
3985
3963
|
}
|
|
3986
3964
|
var Tt = function() {
|
|
3987
3965
|
throw new Ae();
|
|
3988
|
-
},
|
|
3966
|
+
}, nl = we ? function() {
|
|
3989
3967
|
try {
|
|
3990
3968
|
return arguments.callee, Tt;
|
|
3991
3969
|
} catch {
|
|
@@ -3995,86 +3973,86 @@ var Tt = function() {
|
|
|
3995
3973
|
return Tt;
|
|
3996
3974
|
}
|
|
3997
3975
|
}
|
|
3998
|
-
}() : Tt, Te =
|
|
3976
|
+
}() : Tt, Te = Is(), rl = Ls(), D = Object.getPrototypeOf || (rl ? function(e) {
|
|
3999
3977
|
return e.__proto__;
|
|
4000
|
-
} : null), Ee = {},
|
|
3978
|
+
} : null), Ee = {}, al = typeof Uint8Array > "u" || !D ? T : D(Uint8Array), je = {
|
|
4001
3979
|
__proto__: null,
|
|
4002
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
3980
|
+
"%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
|
|
4003
3981
|
"%Array%": Array,
|
|
4004
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
4005
|
-
"%ArrayIteratorPrototype%": Te &&
|
|
4006
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
3982
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? T : ArrayBuffer,
|
|
3983
|
+
"%ArrayIteratorPrototype%": Te && D ? D([][Symbol.iterator]()) : T,
|
|
3984
|
+
"%AsyncFromSyncIteratorPrototype%": T,
|
|
4007
3985
|
"%AsyncFunction%": Ee,
|
|
4008
3986
|
"%AsyncGenerator%": Ee,
|
|
4009
3987
|
"%AsyncGeneratorFunction%": Ee,
|
|
4010
3988
|
"%AsyncIteratorPrototype%": Ee,
|
|
4011
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
4012
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
4013
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
4014
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
3989
|
+
"%Atomics%": typeof Atomics > "u" ? T : Atomics,
|
|
3990
|
+
"%BigInt%": typeof BigInt > "u" ? T : BigInt,
|
|
3991
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? T : BigInt64Array,
|
|
3992
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? T : BigUint64Array,
|
|
4015
3993
|
"%Boolean%": Boolean,
|
|
4016
|
-
"%DataView%": typeof DataView > "u" ?
|
|
3994
|
+
"%DataView%": typeof DataView > "u" ? T : DataView,
|
|
4017
3995
|
"%Date%": Date,
|
|
4018
3996
|
"%decodeURI%": decodeURI,
|
|
4019
3997
|
"%decodeURIComponent%": decodeURIComponent,
|
|
4020
3998
|
"%encodeURI%": encodeURI,
|
|
4021
3999
|
"%encodeURIComponent%": encodeURIComponent,
|
|
4022
|
-
"%Error%":
|
|
4000
|
+
"%Error%": Ys,
|
|
4023
4001
|
"%eval%": eval,
|
|
4024
4002
|
// eslint-disable-line no-eval
|
|
4025
|
-
"%EvalError%":
|
|
4026
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
4027
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
4028
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
4003
|
+
"%EvalError%": Xs,
|
|
4004
|
+
"%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
|
|
4005
|
+
"%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
|
|
4006
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
|
|
4029
4007
|
"%Function%": ca,
|
|
4030
4008
|
"%GeneratorFunction%": Ee,
|
|
4031
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
4032
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
4033
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
4009
|
+
"%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
|
|
4010
|
+
"%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
|
|
4011
|
+
"%Int32Array%": typeof Int32Array > "u" ? T : Int32Array,
|
|
4034
4012
|
"%isFinite%": isFinite,
|
|
4035
4013
|
"%isNaN%": isNaN,
|
|
4036
|
-
"%IteratorPrototype%": Te &&
|
|
4037
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
4038
|
-
"%Map%": typeof Map > "u" ?
|
|
4039
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !Te || !
|
|
4014
|
+
"%IteratorPrototype%": Te && D ? D(D([][Symbol.iterator]())) : T,
|
|
4015
|
+
"%JSON%": typeof JSON == "object" ? JSON : T,
|
|
4016
|
+
"%Map%": typeof Map > "u" ? T : Map,
|
|
4017
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Te || !D ? T : D((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
4040
4018
|
"%Math%": Math,
|
|
4041
4019
|
"%Number%": Number,
|
|
4042
4020
|
"%Object%": Object,
|
|
4043
4021
|
"%parseFloat%": parseFloat,
|
|
4044
4022
|
"%parseInt%": parseInt,
|
|
4045
|
-
"%Promise%": typeof Promise > "u" ?
|
|
4046
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
4047
|
-
"%RangeError%":
|
|
4048
|
-
"%ReferenceError%":
|
|
4049
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
4023
|
+
"%Promise%": typeof Promise > "u" ? T : Promise,
|
|
4024
|
+
"%Proxy%": typeof Proxy > "u" ? T : Proxy,
|
|
4025
|
+
"%RangeError%": Zs,
|
|
4026
|
+
"%ReferenceError%": el,
|
|
4027
|
+
"%Reflect%": typeof Reflect > "u" ? T : Reflect,
|
|
4050
4028
|
"%RegExp%": RegExp,
|
|
4051
|
-
"%Set%": typeof Set > "u" ?
|
|
4052
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !Te || !
|
|
4053
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
4029
|
+
"%Set%": typeof Set > "u" ? T : Set,
|
|
4030
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Te || !D ? T : D((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
4031
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? T : SharedArrayBuffer,
|
|
4054
4032
|
"%String%": String,
|
|
4055
|
-
"%StringIteratorPrototype%": Te &&
|
|
4056
|
-
"%Symbol%": Te ? Symbol :
|
|
4033
|
+
"%StringIteratorPrototype%": Te && D ? D(""[Symbol.iterator]()) : T,
|
|
4034
|
+
"%Symbol%": Te ? Symbol : T,
|
|
4057
4035
|
"%SyntaxError%": Ie,
|
|
4058
|
-
"%ThrowTypeError%":
|
|
4059
|
-
"%TypedArray%":
|
|
4036
|
+
"%ThrowTypeError%": nl,
|
|
4037
|
+
"%TypedArray%": al,
|
|
4060
4038
|
"%TypeError%": Ae,
|
|
4061
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
4062
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
4063
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
4064
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
4065
|
-
"%URIError%":
|
|
4066
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
4067
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
4068
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
4039
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? T : Uint8Array,
|
|
4040
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? T : Uint8ClampedArray,
|
|
4041
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? T : Uint16Array,
|
|
4042
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? T : Uint32Array,
|
|
4043
|
+
"%URIError%": tl,
|
|
4044
|
+
"%WeakMap%": typeof WeakMap > "u" ? T : WeakMap,
|
|
4045
|
+
"%WeakRef%": typeof WeakRef > "u" ? T : WeakRef,
|
|
4046
|
+
"%WeakSet%": typeof WeakSet > "u" ? T : WeakSet
|
|
4069
4047
|
};
|
|
4070
|
-
if (
|
|
4048
|
+
if (D)
|
|
4071
4049
|
try {
|
|
4072
4050
|
null.error;
|
|
4073
4051
|
} catch (e) {
|
|
4074
|
-
var
|
|
4075
|
-
je["%Error.prototype%"] =
|
|
4052
|
+
var ol = D(D(e));
|
|
4053
|
+
je["%Error.prototype%"] = ol;
|
|
4076
4054
|
}
|
|
4077
|
-
var
|
|
4055
|
+
var il = function e(t) {
|
|
4078
4056
|
var n;
|
|
4079
4057
|
if (t === "%AsyncFunction%")
|
|
4080
4058
|
n = Nt("async function () {}");
|
|
@@ -4087,7 +4065,7 @@ var sl = function e(t) {
|
|
|
4087
4065
|
a && (n = a.prototype);
|
|
4088
4066
|
} else if (t === "%AsyncIteratorPrototype%") {
|
|
4089
4067
|
var s = e("%AsyncGenerator%");
|
|
4090
|
-
s &&
|
|
4068
|
+
s && D && (n = D(s.prototype));
|
|
4091
4069
|
}
|
|
4092
4070
|
return je[t] = n, n;
|
|
4093
4071
|
}, Mn = {
|
|
@@ -4143,21 +4121,21 @@ var sl = function e(t) {
|
|
|
4143
4121
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4144
4122
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4145
4123
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4146
|
-
}, Xe = fn, pt =
|
|
4124
|
+
}, Xe = fn, pt = Qs, sl = Xe.call(Function.call, Array.prototype.concat), ll = Xe.call(Function.apply, Array.prototype.splice), Hn = Xe.call(Function.call, String.prototype.replace), mt = Xe.call(Function.call, String.prototype.slice), cl = Xe.call(Function.call, RegExp.prototype.exec), ul = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, dl = /\\(\\)?/g, fl = function(t) {
|
|
4147
4125
|
var n = mt(t, 0, 1), a = mt(t, -1);
|
|
4148
4126
|
if (n === "%" && a !== "%")
|
|
4149
4127
|
throw new Ie("invalid intrinsic syntax, expected closing `%`");
|
|
4150
4128
|
if (a === "%" && n !== "%")
|
|
4151
4129
|
throw new Ie("invalid intrinsic syntax, expected opening `%`");
|
|
4152
4130
|
var s = [];
|
|
4153
|
-
return Hn(t,
|
|
4154
|
-
s[s.length] = i ? Hn(l,
|
|
4131
|
+
return Hn(t, ul, function(o, r, i, l) {
|
|
4132
|
+
s[s.length] = i ? Hn(l, dl, "$1") : r || o;
|
|
4155
4133
|
}), s;
|
|
4156
|
-
},
|
|
4134
|
+
}, pl = function(t, n) {
|
|
4157
4135
|
var a = t, s;
|
|
4158
4136
|
if (pt(Mn, a) && (s = Mn[a], a = "%" + s[0] + "%"), pt(je, a)) {
|
|
4159
4137
|
var o = je[a];
|
|
4160
|
-
if (o === Ee && (o =
|
|
4138
|
+
if (o === Ee && (o = il(a)), typeof o > "u" && !n)
|
|
4161
4139
|
throw new Ae("intrinsic " + t + " exists, but is not available. Please file an issue!");
|
|
4162
4140
|
return {
|
|
4163
4141
|
alias: s,
|
|
@@ -4171,10 +4149,10 @@ var sl = function e(t) {
|
|
|
4171
4149
|
throw new Ae("intrinsic name must be a non-empty string");
|
|
4172
4150
|
if (arguments.length > 1 && typeof n != "boolean")
|
|
4173
4151
|
throw new Ae('"allowMissing" argument must be a boolean');
|
|
4174
|
-
if (
|
|
4152
|
+
if (cl(/^%?[^%]*%?$/, t) === null)
|
|
4175
4153
|
throw new Ie("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4176
|
-
var a =
|
|
4177
|
-
c && (s = c[0],
|
|
4154
|
+
var a = fl(t), s = a.length > 0 ? a[0] : "", o = pl("%" + s + "%", n), r = o.name, i = o.value, l = !1, c = o.alias;
|
|
4155
|
+
c && (s = c[0], ll(a, sl([0, 1], c)));
|
|
4178
4156
|
for (var u = 1, p = !0; u < a.length; u += 1) {
|
|
4179
4157
|
var d = a[u], m = mt(d, 0, 1), h = mt(d, -1);
|
|
4180
4158
|
if ((m === '"' || m === "'" || m === "`" || h === '"' || h === "'" || h === "`") && m !== h)
|
|
@@ -4209,14 +4187,14 @@ function pn() {
|
|
|
4209
4187
|
}
|
|
4210
4188
|
return Ot = t, Ot;
|
|
4211
4189
|
}
|
|
4212
|
-
var
|
|
4190
|
+
var ml = Ue, st = ml("%Object.getOwnPropertyDescriptor%", !0);
|
|
4213
4191
|
if (st)
|
|
4214
4192
|
try {
|
|
4215
4193
|
st([], "length");
|
|
4216
4194
|
} catch {
|
|
4217
4195
|
st = null;
|
|
4218
4196
|
}
|
|
4219
|
-
var da = st, Dn = pn(),
|
|
4197
|
+
var da = st, Dn = pn(), hl = la, Oe = Ye, Vn = da, yl = function(t, n, a) {
|
|
4220
4198
|
if (!t || typeof t != "object" && typeof t != "function")
|
|
4221
4199
|
throw new Oe("`obj` must be an object or a function`");
|
|
4222
4200
|
if (typeof n != "string" && typeof n != "symbol")
|
|
@@ -4240,7 +4218,7 @@ var da = st, Dn = pn(), yl = la, Oe = Ye, Vn = da, gl = function(t, n, a) {
|
|
|
4240
4218
|
else if (i || !s && !o && !r)
|
|
4241
4219
|
t[n] = a;
|
|
4242
4220
|
else
|
|
4243
|
-
throw new
|
|
4221
|
+
throw new hl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4244
4222
|
}, Ht = pn(), fa = function() {
|
|
4245
4223
|
return !!Ht;
|
|
4246
4224
|
};
|
|
@@ -4253,24 +4231,24 @@ fa.hasArrayLengthDefineBug = function() {
|
|
|
4253
4231
|
return !0;
|
|
4254
4232
|
}
|
|
4255
4233
|
};
|
|
4256
|
-
var
|
|
4234
|
+
var gl = fa, vl = Ue, Wn = yl, bl = gl(), zn = da, Jn = Ye, xl = vl("%Math.floor%"), kl = function(t, n) {
|
|
4257
4235
|
if (typeof t != "function")
|
|
4258
4236
|
throw new Jn("`fn` is not a function");
|
|
4259
|
-
if (typeof n != "number" || n < 0 || n > 4294967295 ||
|
|
4237
|
+
if (typeof n != "number" || n < 0 || n > 4294967295 || xl(n) !== n)
|
|
4260
4238
|
throw new Jn("`length` must be a positive 32-bit integer");
|
|
4261
4239
|
var a = arguments.length > 2 && !!arguments[2], s = !0, o = !0;
|
|
4262
|
-
if ("length" in t &&
|
|
4263
|
-
var r =
|
|
4240
|
+
if ("length" in t && zn) {
|
|
4241
|
+
var r = zn(t, "length");
|
|
4264
4242
|
r && !r.configurable && (s = !1), r && !r.writable && (o = !1);
|
|
4265
4243
|
}
|
|
4266
|
-
return (s || o || !a) && (
|
|
4244
|
+
return (s || o || !a) && (bl ? Wn(
|
|
4267
4245
|
/** @type {Parameters<define>[0]} */
|
|
4268
4246
|
t,
|
|
4269
4247
|
"length",
|
|
4270
4248
|
n,
|
|
4271
4249
|
!0,
|
|
4272
4250
|
!0
|
|
4273
|
-
) :
|
|
4251
|
+
) : Wn(
|
|
4274
4252
|
/** @type {Parameters<define>[0]} */
|
|
4275
4253
|
t,
|
|
4276
4254
|
"length",
|
|
@@ -4278,7 +4256,7 @@ var vl = fa, bl = Ue, zn = gl, xl = vl(), Wn = da, Jn = Ye, kl = bl("%Math.floor
|
|
|
4278
4256
|
)), t;
|
|
4279
4257
|
};
|
|
4280
4258
|
(function(e) {
|
|
4281
|
-
var t = fn, n = Ue, a =
|
|
4259
|
+
var t = fn, n = Ue, a = kl, s = Ye, o = n("%Function.prototype.apply%"), r = n("%Function.prototype.call%"), i = n("%Reflect.apply%", !0) || t.call(r, o), l = pn(), c = n("%Math.max%");
|
|
4282
4260
|
e.exports = function(d) {
|
|
4283
4261
|
if (typeof d != "function")
|
|
4284
4262
|
throw new s("a function is required");
|
|
@@ -4294,15 +4272,15 @@ var vl = fa, bl = Ue, zn = gl, xl = vl(), Wn = da, Jn = Ye, kl = bl("%Math.floor
|
|
|
4294
4272
|
};
|
|
4295
4273
|
l ? l(e.exports, "apply", { value: u }) : e.exports.apply = u;
|
|
4296
4274
|
})(ua);
|
|
4297
|
-
var
|
|
4275
|
+
var $l = ua.exports, pa = Ue, ma = $l, Sl = ma(pa("String.prototype.indexOf")), wl = function(t, n) {
|
|
4298
4276
|
var a = pa(t, !!n);
|
|
4299
|
-
return typeof a == "function" &&
|
|
4277
|
+
return typeof a == "function" && Sl(t, ".prototype.") > -1 ? ma(a) : a;
|
|
4300
4278
|
};
|
|
4301
|
-
const
|
|
4279
|
+
const jl = {}, Nl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4302
4280
|
__proto__: null,
|
|
4303
|
-
default:
|
|
4304
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4305
|
-
var mn = typeof Map == "function" && Map.prototype, Ct = Object.getOwnPropertyDescriptor && mn ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ht = mn && Ct && typeof Ct.get == "function" ? Ct.get : null, Gn = mn && Map.prototype.forEach, hn = typeof Set == "function" && Set.prototype, Pt = Object.getOwnPropertyDescriptor && hn ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, yt = hn && Pt && typeof Pt.get == "function" ? Pt.get : null, Kn = hn && Set.prototype.forEach,
|
|
4281
|
+
default: jl
|
|
4282
|
+
}, Symbol.toStringTag, { value: "Module" })), Tl = /* @__PURE__ */ bo(Nl);
|
|
4283
|
+
var mn = typeof Map == "function" && Map.prototype, Ct = Object.getOwnPropertyDescriptor && mn ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, ht = mn && Ct && typeof Ct.get == "function" ? Ct.get : null, Gn = mn && Map.prototype.forEach, hn = typeof Set == "function" && Set.prototype, Pt = Object.getOwnPropertyDescriptor && hn ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, yt = hn && Pt && typeof Pt.get == "function" ? Pt.get : null, Kn = hn && Set.prototype.forEach, Ol = typeof WeakMap == "function" && WeakMap.prototype, De = Ol ? WeakMap.prototype.has : null, Cl = typeof WeakSet == "function" && WeakSet.prototype, Ve = Cl ? WeakSet.prototype.has : null, Pl = typeof WeakRef == "function" && WeakRef.prototype, Qn = Pl ? WeakRef.prototype.deref : null, El = Boolean.prototype.valueOf, Rl = Object.prototype.toString, Al = Function.prototype.toString, Fl = String.prototype.match, yn = String.prototype.slice, ve = String.prototype.replace, ql = String.prototype.toUpperCase, Yn = String.prototype.toLowerCase, ha = RegExp.prototype.test, Xn = Array.prototype.concat, ue = Array.prototype.join, Il = Array.prototype.slice, Zn = Math.floor, Bt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Et = Object.getOwnPropertySymbols, Dt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, _e = typeof Symbol == "function" && typeof Symbol.iterator == "object", X = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === _e || !0) ? Symbol.toStringTag : null, ya = Object.prototype.propertyIsEnumerable, er = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
4306
4284
|
return e.__proto__;
|
|
4307
4285
|
} : null);
|
|
4308
4286
|
function tr(e, t) {
|
|
@@ -4318,7 +4296,7 @@ function tr(e, t) {
|
|
|
4318
4296
|
}
|
|
4319
4297
|
return ve.call(t, n, "$&_");
|
|
4320
4298
|
}
|
|
4321
|
-
var Vt =
|
|
4299
|
+
var Vt = Tl, nr = Vt.custom, rr = va(nr) ? nr : null, _l = function e(t, n, a, s) {
|
|
4322
4300
|
var o = n || {};
|
|
4323
4301
|
if (ge(o, "quoteStyle") && o.quoteStyle !== "single" && o.quoteStyle !== "double")
|
|
4324
4302
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -4352,41 +4330,41 @@ var Vt = Ol, nr = Vt.custom, rr = va(nr) ? nr : null, Ll = function e(t, n, a, s
|
|
|
4352
4330
|
}
|
|
4353
4331
|
var u = typeof o.depth > "u" ? 5 : o.depth;
|
|
4354
4332
|
if (typeof a > "u" && (a = 0), a >= u && u > 0 && typeof t == "object")
|
|
4355
|
-
return
|
|
4356
|
-
var p =
|
|
4333
|
+
return Wt(t) ? "[Array]" : "[Object]";
|
|
4334
|
+
var p = tc(o, a);
|
|
4357
4335
|
if (typeof s > "u")
|
|
4358
4336
|
s = [];
|
|
4359
4337
|
else if (ba(s, t) >= 0)
|
|
4360
4338
|
return "[Circular]";
|
|
4361
|
-
function d(
|
|
4362
|
-
if (
|
|
4363
|
-
var
|
|
4339
|
+
function d(I, H, L) {
|
|
4340
|
+
if (H && (s = Il.call(s), s.push(H)), L) {
|
|
4341
|
+
var ee = {
|
|
4364
4342
|
depth: o.depth
|
|
4365
4343
|
};
|
|
4366
|
-
return ge(o, "quoteStyle") && (
|
|
4344
|
+
return ge(o, "quoteStyle") && (ee.quoteStyle = o.quoteStyle), e(I, ee, a + 1, s);
|
|
4367
4345
|
}
|
|
4368
|
-
return e(
|
|
4346
|
+
return e(I, o, a + 1, s);
|
|
4369
4347
|
}
|
|
4370
4348
|
if (typeof t == "function" && !ar(t)) {
|
|
4371
|
-
var m =
|
|
4349
|
+
var m = zl(t), h = et(t, d);
|
|
4372
4350
|
return "[Function" + (m ? ": " + m : " (anonymous)") + "]" + (h.length > 0 ? " { " + ue.call(h, ", ") + " }" : "");
|
|
4373
4351
|
}
|
|
4374
4352
|
if (va(t)) {
|
|
4375
4353
|
var y = _e ? ve.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : Dt.call(t);
|
|
4376
4354
|
return typeof t == "object" && !_e ? He(y) : y;
|
|
4377
4355
|
}
|
|
4378
|
-
if (
|
|
4379
|
-
for (var
|
|
4380
|
-
|
|
4381
|
-
return
|
|
4356
|
+
if (Xl(t)) {
|
|
4357
|
+
for (var v = "<" + Yn.call(String(t.nodeName)), b = t.attributes || [], g = 0; g < b.length; g++)
|
|
4358
|
+
v += " " + b[g].name + "=" + ga(Ll(b[g].value), "double", o);
|
|
4359
|
+
return v += ">", t.childNodes && t.childNodes.length && (v += "..."), v += "</" + Yn.call(String(t.nodeName)) + ">", v;
|
|
4382
4360
|
}
|
|
4383
|
-
if (
|
|
4361
|
+
if (Wt(t)) {
|
|
4384
4362
|
if (t.length === 0)
|
|
4385
4363
|
return "[]";
|
|
4386
4364
|
var x = et(t, d);
|
|
4387
|
-
return p && !
|
|
4365
|
+
return p && !ec(x) ? "[" + zt(x, p) + "]" : "[ " + ue.call(x, ", ") + " ]";
|
|
4388
4366
|
}
|
|
4389
|
-
if (
|
|
4367
|
+
if (Ml(t)) {
|
|
4390
4368
|
var w = et(t, d);
|
|
4391
4369
|
return !("cause" in Error.prototype) && "cause" in t && !ya.call(t, "cause") ? "{ [" + String(t) + "] " + ue.call(Xn.call("[cause]: " + d(t.cause), w), ", ") + " }" : w.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ue.call(w, ", ") + " }";
|
|
4392
4370
|
}
|
|
@@ -4396,39 +4374,39 @@ var Vt = Ol, nr = Vt.custom, rr = va(nr) ? nr : null, Ll = function e(t, n, a, s
|
|
|
4396
4374
|
if (r !== "symbol" && typeof t.inspect == "function")
|
|
4397
4375
|
return t.inspect();
|
|
4398
4376
|
}
|
|
4399
|
-
if (
|
|
4377
|
+
if (Jl(t)) {
|
|
4400
4378
|
var S = [];
|
|
4401
|
-
return Gn && Gn.call(t, function(
|
|
4402
|
-
S.push(d(
|
|
4379
|
+
return Gn && Gn.call(t, function(I, H) {
|
|
4380
|
+
S.push(d(H, t, !0) + " => " + d(I, t));
|
|
4403
4381
|
}), or("Map", ht.call(t), S, p);
|
|
4404
4382
|
}
|
|
4405
|
-
if (
|
|
4406
|
-
var
|
|
4407
|
-
return Kn && Kn.call(t, function(
|
|
4408
|
-
|
|
4409
|
-
}), or("Set", yt.call(t),
|
|
4383
|
+
if (Ql(t)) {
|
|
4384
|
+
var k = [];
|
|
4385
|
+
return Kn && Kn.call(t, function(I) {
|
|
4386
|
+
k.push(d(I, t));
|
|
4387
|
+
}), or("Set", yt.call(t), k, p);
|
|
4410
4388
|
}
|
|
4411
|
-
if (
|
|
4389
|
+
if (Gl(t))
|
|
4412
4390
|
return Rt("WeakMap");
|
|
4413
|
-
if (
|
|
4391
|
+
if (Yl(t))
|
|
4414
4392
|
return Rt("WeakSet");
|
|
4415
|
-
if (
|
|
4393
|
+
if (Kl(t))
|
|
4416
4394
|
return Rt("WeakRef");
|
|
4417
|
-
if (
|
|
4395
|
+
if (Bl(t))
|
|
4418
4396
|
return He(d(Number(t)));
|
|
4419
|
-
if (zl(t))
|
|
4420
|
-
return He(d(Bt.call(t)));
|
|
4421
4397
|
if (Vl(t))
|
|
4422
|
-
return He(
|
|
4423
|
-
if (
|
|
4398
|
+
return He(d(Bt.call(t)));
|
|
4399
|
+
if (Dl(t))
|
|
4400
|
+
return He(El.call(t));
|
|
4401
|
+
if (Hl(t))
|
|
4424
4402
|
return He(d(String(t)));
|
|
4425
4403
|
if (typeof window < "u" && t === window)
|
|
4426
4404
|
return "{ [object Window] }";
|
|
4427
4405
|
if (t === ot)
|
|
4428
4406
|
return "{ [object globalThis] }";
|
|
4429
|
-
if (!
|
|
4430
|
-
var
|
|
4431
|
-
return
|
|
4407
|
+
if (!Ul(t) && !ar(t)) {
|
|
4408
|
+
var C = et(t, d), P = er ? er(t) === Object.prototype : t instanceof Object || t.constructor === Object, R = t instanceof Object ? "" : "null prototype", q = !P && X && Object(t) === t && X in t ? yn.call(xe(t), 8, -1) : R ? "Object" : "", G = P || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", K = G + (q || R ? "[" + ue.call(Xn.call([], q || [], R || []), ": ") + "] " : "");
|
|
4409
|
+
return C.length === 0 ? K + "{}" : p ? K + "{" + zt(C, p) + "}" : K + "{ " + ue.call(C, ", ") + " }";
|
|
4432
4410
|
}
|
|
4433
4411
|
return String(t);
|
|
4434
4412
|
};
|
|
@@ -4436,29 +4414,29 @@ function ga(e, t, n) {
|
|
|
4436
4414
|
var a = (n.quoteStyle || t) === "double" ? '"' : "'";
|
|
4437
4415
|
return a + e + a;
|
|
4438
4416
|
}
|
|
4439
|
-
function
|
|
4417
|
+
function Ll(e) {
|
|
4440
4418
|
return ve.call(String(e), /"/g, """);
|
|
4441
4419
|
}
|
|
4442
|
-
function
|
|
4443
|
-
return xe(e) === "[object Array]" && (!
|
|
4420
|
+
function Wt(e) {
|
|
4421
|
+
return xe(e) === "[object Array]" && (!X || !(typeof e == "object" && X in e));
|
|
4444
4422
|
}
|
|
4445
|
-
function
|
|
4446
|
-
return xe(e) === "[object Date]" && (!
|
|
4423
|
+
function Ul(e) {
|
|
4424
|
+
return xe(e) === "[object Date]" && (!X || !(typeof e == "object" && X in e));
|
|
4447
4425
|
}
|
|
4448
4426
|
function ar(e) {
|
|
4449
|
-
return xe(e) === "[object RegExp]" && (!
|
|
4427
|
+
return xe(e) === "[object RegExp]" && (!X || !(typeof e == "object" && X in e));
|
|
4428
|
+
}
|
|
4429
|
+
function Ml(e) {
|
|
4430
|
+
return xe(e) === "[object Error]" && (!X || !(typeof e == "object" && X in e));
|
|
4450
4431
|
}
|
|
4451
4432
|
function Hl(e) {
|
|
4452
|
-
return xe(e) === "[object
|
|
4433
|
+
return xe(e) === "[object String]" && (!X || !(typeof e == "object" && X in e));
|
|
4453
4434
|
}
|
|
4454
4435
|
function Bl(e) {
|
|
4455
|
-
return xe(e) === "[object
|
|
4436
|
+
return xe(e) === "[object Number]" && (!X || !(typeof e == "object" && X in e));
|
|
4456
4437
|
}
|
|
4457
4438
|
function Dl(e) {
|
|
4458
|
-
return xe(e) === "[object
|
|
4459
|
-
}
|
|
4460
|
-
function Vl(e) {
|
|
4461
|
-
return xe(e) === "[object Boolean]" && (!Z || !(typeof e == "object" && Z in e));
|
|
4439
|
+
return xe(e) === "[object Boolean]" && (!X || !(typeof e == "object" && X in e));
|
|
4462
4440
|
}
|
|
4463
4441
|
function va(e) {
|
|
4464
4442
|
if (_e)
|
|
@@ -4473,7 +4451,7 @@ function va(e) {
|
|
|
4473
4451
|
}
|
|
4474
4452
|
return !1;
|
|
4475
4453
|
}
|
|
4476
|
-
function
|
|
4454
|
+
function Vl(e) {
|
|
4477
4455
|
if (!e || typeof e != "object" || !Bt)
|
|
4478
4456
|
return !1;
|
|
4479
4457
|
try {
|
|
@@ -4489,12 +4467,12 @@ function ge(e, t) {
|
|
|
4489
4467
|
return Wl.call(e, t);
|
|
4490
4468
|
}
|
|
4491
4469
|
function xe(e) {
|
|
4492
|
-
return
|
|
4470
|
+
return Rl.call(e);
|
|
4493
4471
|
}
|
|
4494
|
-
function
|
|
4472
|
+
function zl(e) {
|
|
4495
4473
|
if (e.name)
|
|
4496
4474
|
return e.name;
|
|
4497
|
-
var t =
|
|
4475
|
+
var t = Fl.call(Al.call(e), /^function\s*([\w$]+)/);
|
|
4498
4476
|
return t ? t[1] : null;
|
|
4499
4477
|
}
|
|
4500
4478
|
function ba(e, t) {
|
|
@@ -4505,7 +4483,7 @@ function ba(e, t) {
|
|
|
4505
4483
|
return n;
|
|
4506
4484
|
return -1;
|
|
4507
4485
|
}
|
|
4508
|
-
function
|
|
4486
|
+
function Jl(e) {
|
|
4509
4487
|
if (!ht || !e || typeof e != "object")
|
|
4510
4488
|
return !1;
|
|
4511
4489
|
try {
|
|
@@ -4520,7 +4498,7 @@ function Gl(e) {
|
|
|
4520
4498
|
}
|
|
4521
4499
|
return !1;
|
|
4522
4500
|
}
|
|
4523
|
-
function
|
|
4501
|
+
function Gl(e) {
|
|
4524
4502
|
if (!De || !e || typeof e != "object")
|
|
4525
4503
|
return !1;
|
|
4526
4504
|
try {
|
|
@@ -4535,7 +4513,7 @@ function Kl(e) {
|
|
|
4535
4513
|
}
|
|
4536
4514
|
return !1;
|
|
4537
4515
|
}
|
|
4538
|
-
function
|
|
4516
|
+
function Kl(e) {
|
|
4539
4517
|
if (!Qn || !e || typeof e != "object")
|
|
4540
4518
|
return !1;
|
|
4541
4519
|
try {
|
|
@@ -4544,7 +4522,7 @@ function Ql(e) {
|
|
|
4544
4522
|
}
|
|
4545
4523
|
return !1;
|
|
4546
4524
|
}
|
|
4547
|
-
function
|
|
4525
|
+
function Ql(e) {
|
|
4548
4526
|
if (!yt || !e || typeof e != "object")
|
|
4549
4527
|
return !1;
|
|
4550
4528
|
try {
|
|
@@ -4559,7 +4537,7 @@ function Yl(e) {
|
|
|
4559
4537
|
}
|
|
4560
4538
|
return !1;
|
|
4561
4539
|
}
|
|
4562
|
-
function
|
|
4540
|
+
function Yl(e) {
|
|
4563
4541
|
if (!Ve || !e || typeof e != "object")
|
|
4564
4542
|
return !1;
|
|
4565
4543
|
try {
|
|
@@ -4574,7 +4552,7 @@ function Xl(e) {
|
|
|
4574
4552
|
}
|
|
4575
4553
|
return !1;
|
|
4576
4554
|
}
|
|
4577
|
-
function
|
|
4555
|
+
function Xl(e) {
|
|
4578
4556
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
4579
4557
|
}
|
|
4580
4558
|
function xa(e, t) {
|
|
@@ -4582,10 +4560,10 @@ function xa(e, t) {
|
|
|
4582
4560
|
var n = e.length - t.maxStringLength, a = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
4583
4561
|
return xa(yn.call(e, 0, t.maxStringLength), t) + a;
|
|
4584
4562
|
}
|
|
4585
|
-
var s = ve.call(ve.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g,
|
|
4563
|
+
var s = ve.call(ve.call(e, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Zl);
|
|
4586
4564
|
return ga(s, "single", t);
|
|
4587
4565
|
}
|
|
4588
|
-
function
|
|
4566
|
+
function Zl(e) {
|
|
4589
4567
|
var t = e.charCodeAt(0), n = {
|
|
4590
4568
|
8: "b",
|
|
4591
4569
|
9: "t",
|
|
@@ -4593,7 +4571,7 @@ function ec(e) {
|
|
|
4593
4571
|
12: "f",
|
|
4594
4572
|
13: "r"
|
|
4595
4573
|
}[t];
|
|
4596
|
-
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") +
|
|
4574
|
+
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + ql.call(t.toString(16));
|
|
4597
4575
|
}
|
|
4598
4576
|
function He(e) {
|
|
4599
4577
|
return "Object(" + e + ")";
|
|
@@ -4602,17 +4580,17 @@ function Rt(e) {
|
|
|
4602
4580
|
return e + " { ? }";
|
|
4603
4581
|
}
|
|
4604
4582
|
function or(e, t, n, a) {
|
|
4605
|
-
var s = a ?
|
|
4583
|
+
var s = a ? zt(n, a) : ue.call(n, ", ");
|
|
4606
4584
|
return e + " (" + t + ") {" + s + "}";
|
|
4607
4585
|
}
|
|
4608
|
-
function
|
|
4586
|
+
function ec(e) {
|
|
4609
4587
|
for (var t = 0; t < e.length; t++)
|
|
4610
4588
|
if (ba(e[t], `
|
|
4611
4589
|
`) >= 0)
|
|
4612
4590
|
return !1;
|
|
4613
4591
|
return !0;
|
|
4614
4592
|
}
|
|
4615
|
-
function
|
|
4593
|
+
function tc(e, t) {
|
|
4616
4594
|
var n;
|
|
4617
4595
|
if (e.indent === " ")
|
|
4618
4596
|
n = " ";
|
|
@@ -4625,7 +4603,7 @@ function nc(e, t) {
|
|
|
4625
4603
|
prev: ue.call(Array(t + 1), n)
|
|
4626
4604
|
};
|
|
4627
4605
|
}
|
|
4628
|
-
function
|
|
4606
|
+
function zt(e, t) {
|
|
4629
4607
|
if (e.length === 0)
|
|
4630
4608
|
return "";
|
|
4631
4609
|
var n = `
|
|
@@ -4634,7 +4612,7 @@ function Wt(e, t) {
|
|
|
4634
4612
|
` + t.prev;
|
|
4635
4613
|
}
|
|
4636
4614
|
function et(e, t) {
|
|
4637
|
-
var n =
|
|
4615
|
+
var n = Wt(e), a = [];
|
|
4638
4616
|
if (n) {
|
|
4639
4617
|
a.length = e.length;
|
|
4640
4618
|
for (var s = 0; s < e.length; s++)
|
|
@@ -4653,15 +4631,15 @@ function et(e, t) {
|
|
|
4653
4631
|
ya.call(e, o[c]) && a.push("[" + t(o[c]) + "]: " + t(e[o[c]], e));
|
|
4654
4632
|
return a;
|
|
4655
4633
|
}
|
|
4656
|
-
var ka = Ue, Me =
|
|
4634
|
+
var ka = Ue, Me = wl, nc = _l, rc = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%", !0), ac = Me("WeakMap.prototype.get", !0), oc = Me("WeakMap.prototype.set", !0), ic = Me("WeakMap.prototype.has", !0), sc = Me("Map.prototype.get", !0), lc = Me("Map.prototype.set", !0), cc = Me("Map.prototype.has", !0), gn = function(e, t) {
|
|
4657
4635
|
for (var n = e, a; (a = n.next) !== null; n = a)
|
|
4658
4636
|
if (a.key === t)
|
|
4659
4637
|
return n.next = a.next, a.next = /** @type {NonNullable<typeof list.next>} */
|
|
4660
4638
|
e.next, e.next = a, a;
|
|
4661
|
-
},
|
|
4639
|
+
}, uc = function(e, t) {
|
|
4662
4640
|
var n = gn(e, t);
|
|
4663
4641
|
return n && n.value;
|
|
4664
|
-
},
|
|
4642
|
+
}, dc = function(e, t, n) {
|
|
4665
4643
|
var a = gn(e, t);
|
|
4666
4644
|
a ? a.value = n : e.next = /** @type {import('.').ListNode<typeof value>} */
|
|
4667
4645
|
{
|
|
@@ -4670,48 +4648,48 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4670
4648
|
next: e.next,
|
|
4671
4649
|
value: n
|
|
4672
4650
|
};
|
|
4673
|
-
},
|
|
4651
|
+
}, fc = function(e, t) {
|
|
4674
4652
|
return !!gn(e, t);
|
|
4675
|
-
},
|
|
4653
|
+
}, pc = function() {
|
|
4676
4654
|
var t, n, a, s = {
|
|
4677
4655
|
assert: function(o) {
|
|
4678
4656
|
if (!s.has(o))
|
|
4679
|
-
throw new
|
|
4657
|
+
throw new rc("Side channel does not contain " + nc(o));
|
|
4680
4658
|
},
|
|
4681
4659
|
get: function(o) {
|
|
4682
4660
|
if (tt && o && (typeof o == "object" || typeof o == "function")) {
|
|
4683
4661
|
if (t)
|
|
4684
|
-
return
|
|
4662
|
+
return ac(t, o);
|
|
4685
4663
|
} else if (nt) {
|
|
4686
4664
|
if (n)
|
|
4687
|
-
return
|
|
4665
|
+
return sc(n, o);
|
|
4688
4666
|
} else if (a)
|
|
4689
|
-
return
|
|
4667
|
+
return uc(a, o);
|
|
4690
4668
|
},
|
|
4691
4669
|
has: function(o) {
|
|
4692
4670
|
if (tt && o && (typeof o == "object" || typeof o == "function")) {
|
|
4693
4671
|
if (t)
|
|
4694
|
-
return
|
|
4672
|
+
return ic(t, o);
|
|
4695
4673
|
} else if (nt) {
|
|
4696
4674
|
if (n)
|
|
4697
|
-
return
|
|
4675
|
+
return cc(n, o);
|
|
4698
4676
|
} else if (a)
|
|
4699
|
-
return
|
|
4677
|
+
return fc(a, o);
|
|
4700
4678
|
return !1;
|
|
4701
4679
|
},
|
|
4702
4680
|
set: function(o, r) {
|
|
4703
|
-
tt && o && (typeof o == "object" || typeof o == "function") ? (t || (t = new tt()),
|
|
4681
|
+
tt && o && (typeof o == "object" || typeof o == "function") ? (t || (t = new tt()), oc(t, o, r)) : nt ? (n || (n = new nt()), lc(n, o, r)) : (a || (a = { key: {}, next: null }), dc(a, o, r));
|
|
4704
4682
|
}
|
|
4705
4683
|
};
|
|
4706
4684
|
return s;
|
|
4707
|
-
},
|
|
4685
|
+
}, mc = String.prototype.replace, hc = /%20/g, At = {
|
|
4708
4686
|
RFC1738: "RFC1738",
|
|
4709
4687
|
RFC3986: "RFC3986"
|
|
4710
4688
|
}, vn = {
|
|
4711
4689
|
default: At.RFC3986,
|
|
4712
4690
|
formatters: {
|
|
4713
4691
|
RFC1738: function(e) {
|
|
4714
|
-
return
|
|
4692
|
+
return mc.call(e, hc, "+");
|
|
4715
4693
|
},
|
|
4716
4694
|
RFC3986: function(e) {
|
|
4717
4695
|
return String(e);
|
|
@@ -4719,11 +4697,11 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4719
4697
|
},
|
|
4720
4698
|
RFC1738: At.RFC1738,
|
|
4721
4699
|
RFC3986: At.RFC3986
|
|
4722
|
-
},
|
|
4700
|
+
}, yc = vn, Ft = Object.prototype.hasOwnProperty, $e = Array.isArray, le = function() {
|
|
4723
4701
|
for (var e = [], t = 0; t < 256; ++t)
|
|
4724
4702
|
e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
|
|
4725
4703
|
return e;
|
|
4726
|
-
}(),
|
|
4704
|
+
}(), gc = function(t) {
|
|
4727
4705
|
for (; t.length > 1; ) {
|
|
4728
4706
|
var n = t.pop(), a = n.obj[n.prop];
|
|
4729
4707
|
if ($e(a)) {
|
|
@@ -4736,7 +4714,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4736
4714
|
for (var a = n && n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, s = 0; s < t.length; ++s)
|
|
4737
4715
|
typeof t[s] < "u" && (a[s] = t[s]);
|
|
4738
4716
|
return a;
|
|
4739
|
-
},
|
|
4717
|
+
}, vc = function e(t, n, a) {
|
|
4740
4718
|
if (!n)
|
|
4741
4719
|
return t;
|
|
4742
4720
|
if (typeof n != "object") {
|
|
@@ -4761,11 +4739,11 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4761
4739
|
var i = n[r];
|
|
4762
4740
|
return Ft.call(o, r) ? o[r] = e(o[r], i, a) : o[r] = i, o;
|
|
4763
4741
|
}, s);
|
|
4764
|
-
},
|
|
4742
|
+
}, bc = function(t, n) {
|
|
4765
4743
|
return Object.keys(n).reduce(function(a, s) {
|
|
4766
4744
|
return a[s] = n[s], a;
|
|
4767
4745
|
}, t);
|
|
4768
|
-
},
|
|
4746
|
+
}, xc = function(e, t, n) {
|
|
4769
4747
|
var a = e.replace(/\+/g, " ");
|
|
4770
4748
|
if (n === "iso-8859-1")
|
|
4771
4749
|
return a.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -4774,7 +4752,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4774
4752
|
} catch {
|
|
4775
4753
|
return a;
|
|
4776
4754
|
}
|
|
4777
|
-
}, qt = 1024,
|
|
4755
|
+
}, qt = 1024, kc = function(t, n, a, s, o) {
|
|
4778
4756
|
if (t.length === 0)
|
|
4779
4757
|
return t;
|
|
4780
4758
|
var r = t;
|
|
@@ -4785,7 +4763,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4785
4763
|
for (var i = "", l = 0; l < r.length; l += qt) {
|
|
4786
4764
|
for (var c = r.length >= qt ? r.slice(l, l + qt) : r, u = [], p = 0; p < c.length; ++p) {
|
|
4787
4765
|
var d = c.charCodeAt(p);
|
|
4788
|
-
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o ===
|
|
4766
|
+
if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o === yc.RFC1738 && (d === 40 || d === 41)) {
|
|
4789
4767
|
u[u.length] = c.charAt(p);
|
|
4790
4768
|
continue;
|
|
4791
4769
|
}
|
|
@@ -4806,20 +4784,20 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4806
4784
|
i += u.join("");
|
|
4807
4785
|
}
|
|
4808
4786
|
return i;
|
|
4809
|
-
},
|
|
4787
|
+
}, $c = function(t) {
|
|
4810
4788
|
for (var n = [{ obj: { o: t }, prop: "o" }], a = [], s = 0; s < n.length; ++s)
|
|
4811
4789
|
for (var o = n[s], r = o.obj[o.prop], i = Object.keys(r), l = 0; l < i.length; ++l) {
|
|
4812
4790
|
var c = i[l], u = r[c];
|
|
4813
4791
|
typeof u == "object" && u !== null && a.indexOf(u) === -1 && (n.push({ obj: r, prop: c }), a.push(u));
|
|
4814
4792
|
}
|
|
4815
|
-
return
|
|
4816
|
-
},
|
|
4793
|
+
return gc(n), t;
|
|
4794
|
+
}, Sc = function(t) {
|
|
4817
4795
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
4818
|
-
},
|
|
4796
|
+
}, wc = function(t) {
|
|
4819
4797
|
return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
|
|
4820
|
-
},
|
|
4798
|
+
}, jc = function(t, n) {
|
|
4821
4799
|
return [].concat(t, n);
|
|
4822
|
-
},
|
|
4800
|
+
}, Nc = function(t, n) {
|
|
4823
4801
|
if ($e(t)) {
|
|
4824
4802
|
for (var a = [], s = 0; s < t.length; s += 1)
|
|
4825
4803
|
a.push(n(t[s]));
|
|
@@ -4828,16 +4806,16 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4828
4806
|
return n(t);
|
|
4829
4807
|
}, Sa = {
|
|
4830
4808
|
arrayToObject: $a,
|
|
4831
|
-
assign:
|
|
4832
|
-
combine:
|
|
4833
|
-
compact:
|
|
4834
|
-
decode:
|
|
4835
|
-
encode:
|
|
4836
|
-
isBuffer:
|
|
4837
|
-
isRegExp:
|
|
4838
|
-
maybeMap:
|
|
4839
|
-
merge:
|
|
4840
|
-
}, wa =
|
|
4809
|
+
assign: bc,
|
|
4810
|
+
combine: jc,
|
|
4811
|
+
compact: $c,
|
|
4812
|
+
decode: xc,
|
|
4813
|
+
encode: kc,
|
|
4814
|
+
isBuffer: wc,
|
|
4815
|
+
isRegExp: Sc,
|
|
4816
|
+
maybeMap: Nc,
|
|
4817
|
+
merge: vc
|
|
4818
|
+
}, wa = pc, lt = Sa, We = vn, Tc = Object.prototype.hasOwnProperty, ja = {
|
|
4841
4819
|
brackets: function(t) {
|
|
4842
4820
|
return t + "[]";
|
|
4843
4821
|
},
|
|
@@ -4848,9 +4826,9 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4848
4826
|
repeat: function(t) {
|
|
4849
4827
|
return t;
|
|
4850
4828
|
}
|
|
4851
|
-
}, ce = Array.isArray,
|
|
4852
|
-
|
|
4853
|
-
},
|
|
4829
|
+
}, ce = Array.isArray, Oc = Array.prototype.push, Na = function(e, t) {
|
|
4830
|
+
Oc.apply(e, ce(t) ? t : [t]);
|
|
4831
|
+
}, Cc = Date.prototype.toISOString, ir = We.default, B = {
|
|
4854
4832
|
addQueryPrefix: !1,
|
|
4855
4833
|
allowDots: !1,
|
|
4856
4834
|
allowEmptyArrays: !1,
|
|
@@ -4863,23 +4841,23 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4863
4841
|
encoder: lt.encode,
|
|
4864
4842
|
encodeValuesOnly: !1,
|
|
4865
4843
|
format: ir,
|
|
4866
|
-
formatter:
|
|
4844
|
+
formatter: We.formatters[ir],
|
|
4867
4845
|
// deprecated
|
|
4868
4846
|
indices: !1,
|
|
4869
4847
|
serializeDate: function(t) {
|
|
4870
|
-
return
|
|
4848
|
+
return Cc.call(t);
|
|
4871
4849
|
},
|
|
4872
4850
|
skipNulls: !1,
|
|
4873
4851
|
strictNullHandling: !1
|
|
4874
|
-
},
|
|
4852
|
+
}, Pc = function(t) {
|
|
4875
4853
|
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
|
|
4876
|
-
}, It = {},
|
|
4877
|
-
for (var x = t, w =
|
|
4878
|
-
var
|
|
4879
|
-
if (S += 1, typeof
|
|
4880
|
-
if (
|
|
4854
|
+
}, It = {}, Ec = function e(t, n, a, s, o, r, i, l, c, u, p, d, m, h, y, v, b, g) {
|
|
4855
|
+
for (var x = t, w = g, S = 0, k = !1; (w = w.get(It)) !== void 0 && !k; ) {
|
|
4856
|
+
var C = w.get(t);
|
|
4857
|
+
if (S += 1, typeof C < "u") {
|
|
4858
|
+
if (C === S)
|
|
4881
4859
|
throw new RangeError("Cyclic object value");
|
|
4882
|
-
|
|
4860
|
+
k = !0;
|
|
4883
4861
|
}
|
|
4884
4862
|
typeof w.get(It) > "u" && (S = 0);
|
|
4885
4863
|
}
|
|
@@ -4887,39 +4865,39 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4887
4865
|
return $ instanceof Date ? m($) : $;
|
|
4888
4866
|
})), x === null) {
|
|
4889
4867
|
if (r)
|
|
4890
|
-
return c && !
|
|
4868
|
+
return c && !v ? c(n, B.encoder, b, "key", h) : n;
|
|
4891
4869
|
x = "";
|
|
4892
4870
|
}
|
|
4893
|
-
if (
|
|
4871
|
+
if (Pc(x) || lt.isBuffer(x)) {
|
|
4894
4872
|
if (c) {
|
|
4895
|
-
var
|
|
4896
|
-
return [y(
|
|
4873
|
+
var P = v ? n : c(n, B.encoder, b, "key", h);
|
|
4874
|
+
return [y(P) + "=" + y(c(x, B.encoder, b, "value", h))];
|
|
4897
4875
|
}
|
|
4898
4876
|
return [y(n) + "=" + y(String(x))];
|
|
4899
4877
|
}
|
|
4900
4878
|
var R = [];
|
|
4901
4879
|
if (typeof x > "u")
|
|
4902
4880
|
return R;
|
|
4903
|
-
var
|
|
4881
|
+
var q;
|
|
4904
4882
|
if (a === "comma" && ce(x))
|
|
4905
|
-
|
|
4883
|
+
v && c && (x = lt.maybeMap(x, c)), q = [{ value: x.length > 0 ? x.join(",") || null : void 0 }];
|
|
4906
4884
|
else if (ce(u))
|
|
4907
|
-
|
|
4885
|
+
q = u;
|
|
4908
4886
|
else {
|
|
4909
|
-
var
|
|
4910
|
-
|
|
4887
|
+
var G = Object.keys(x);
|
|
4888
|
+
q = p ? G.sort(p) : G;
|
|
4911
4889
|
}
|
|
4912
|
-
var
|
|
4890
|
+
var K = l ? n.replace(/\./g, "%2E") : n, I = s && ce(x) && x.length === 1 ? K + "[]" : K;
|
|
4913
4891
|
if (o && ce(x) && x.length === 0)
|
|
4914
|
-
return
|
|
4915
|
-
for (var
|
|
4916
|
-
var
|
|
4917
|
-
if (!(i &&
|
|
4918
|
-
var he = d && l ?
|
|
4919
|
-
|
|
4892
|
+
return I + "[]";
|
|
4893
|
+
for (var H = 0; H < q.length; ++H) {
|
|
4894
|
+
var L = q[H], ee = typeof L == "object" && typeof L.value < "u" ? L.value : x[L];
|
|
4895
|
+
if (!(i && ee === null)) {
|
|
4896
|
+
var he = d && l ? L.replace(/\./g, "%2E") : L, bt = ce(x) ? typeof a == "function" ? a(I, he) : I : I + (d ? "." + he : "[" + he + "]");
|
|
4897
|
+
g.set(t, S);
|
|
4920
4898
|
var Ze = wa();
|
|
4921
|
-
Ze.set(It,
|
|
4922
|
-
|
|
4899
|
+
Ze.set(It, g), Na(R, e(
|
|
4900
|
+
ee,
|
|
4923
4901
|
bt,
|
|
4924
4902
|
a,
|
|
4925
4903
|
s,
|
|
@@ -4927,67 +4905,67 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4927
4905
|
r,
|
|
4928
4906
|
i,
|
|
4929
4907
|
l,
|
|
4930
|
-
a === "comma" &&
|
|
4908
|
+
a === "comma" && v && ce(x) ? null : c,
|
|
4931
4909
|
u,
|
|
4932
4910
|
p,
|
|
4933
4911
|
d,
|
|
4934
4912
|
m,
|
|
4935
4913
|
h,
|
|
4936
4914
|
y,
|
|
4937
|
-
|
|
4915
|
+
v,
|
|
4938
4916
|
b,
|
|
4939
4917
|
Ze
|
|
4940
4918
|
));
|
|
4941
4919
|
}
|
|
4942
4920
|
}
|
|
4943
4921
|
return R;
|
|
4944
|
-
},
|
|
4922
|
+
}, Rc = function(t) {
|
|
4945
4923
|
if (!t)
|
|
4946
|
-
return
|
|
4924
|
+
return B;
|
|
4947
4925
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
4948
4926
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4949
4927
|
if (typeof t.encodeDotInKeys < "u" && typeof t.encodeDotInKeys != "boolean")
|
|
4950
4928
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
4951
4929
|
if (t.encoder !== null && typeof t.encoder < "u" && typeof t.encoder != "function")
|
|
4952
4930
|
throw new TypeError("Encoder has to be a function.");
|
|
4953
|
-
var n = t.charset ||
|
|
4931
|
+
var n = t.charset || B.charset;
|
|
4954
4932
|
if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
|
|
4955
4933
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4956
|
-
var a =
|
|
4934
|
+
var a = We.default;
|
|
4957
4935
|
if (typeof t.format < "u") {
|
|
4958
|
-
if (!
|
|
4936
|
+
if (!Tc.call(We.formatters, t.format))
|
|
4959
4937
|
throw new TypeError("Unknown format option provided.");
|
|
4960
4938
|
a = t.format;
|
|
4961
4939
|
}
|
|
4962
|
-
var s =
|
|
4940
|
+
var s = We.formatters[a], o = B.filter;
|
|
4963
4941
|
(typeof t.filter == "function" || ce(t.filter)) && (o = t.filter);
|
|
4964
4942
|
var r;
|
|
4965
|
-
if (t.arrayFormat in ja ? r = t.arrayFormat : "indices" in t ? r = t.indices ? "indices" : "repeat" : r =
|
|
4943
|
+
if (t.arrayFormat in ja ? r = t.arrayFormat : "indices" in t ? r = t.indices ? "indices" : "repeat" : r = B.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
|
|
4966
4944
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4967
|
-
var i = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 :
|
|
4945
|
+
var i = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 : B.allowDots : !!t.allowDots;
|
|
4968
4946
|
return {
|
|
4969
|
-
addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix :
|
|
4947
|
+
addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : B.addQueryPrefix,
|
|
4970
4948
|
allowDots: i,
|
|
4971
|
-
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays :
|
|
4949
|
+
allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : B.allowEmptyArrays,
|
|
4972
4950
|
arrayFormat: r,
|
|
4973
4951
|
charset: n,
|
|
4974
|
-
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel :
|
|
4952
|
+
charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : B.charsetSentinel,
|
|
4975
4953
|
commaRoundTrip: t.commaRoundTrip,
|
|
4976
|
-
delimiter: typeof t.delimiter > "u" ?
|
|
4977
|
-
encode: typeof t.encode == "boolean" ? t.encode :
|
|
4978
|
-
encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys :
|
|
4979
|
-
encoder: typeof t.encoder == "function" ? t.encoder :
|
|
4980
|
-
encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly :
|
|
4954
|
+
delimiter: typeof t.delimiter > "u" ? B.delimiter : t.delimiter,
|
|
4955
|
+
encode: typeof t.encode == "boolean" ? t.encode : B.encode,
|
|
4956
|
+
encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys : B.encodeDotInKeys,
|
|
4957
|
+
encoder: typeof t.encoder == "function" ? t.encoder : B.encoder,
|
|
4958
|
+
encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : B.encodeValuesOnly,
|
|
4981
4959
|
filter: o,
|
|
4982
4960
|
format: a,
|
|
4983
4961
|
formatter: s,
|
|
4984
|
-
serializeDate: typeof t.serializeDate == "function" ? t.serializeDate :
|
|
4985
|
-
skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls :
|
|
4962
|
+
serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : B.serializeDate,
|
|
4963
|
+
skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : B.skipNulls,
|
|
4986
4964
|
sort: typeof t.sort == "function" ? t.sort : null,
|
|
4987
|
-
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling :
|
|
4965
|
+
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : B.strictNullHandling
|
|
4988
4966
|
};
|
|
4989
|
-
},
|
|
4990
|
-
var n = e, a =
|
|
4967
|
+
}, Ac = function(e, t) {
|
|
4968
|
+
var n = e, a = Rc(t), s, o;
|
|
4991
4969
|
typeof a.filter == "function" ? (o = a.filter, n = o("", n)) : ce(a.filter) && (o = a.filter, s = o);
|
|
4992
4970
|
var r = [];
|
|
4993
4971
|
if (typeof n != "object" || n === null)
|
|
@@ -4996,7 +4974,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
4996
4974
|
s || (s = Object.keys(n)), a.sort && s.sort(a.sort);
|
|
4997
4975
|
for (var c = wa(), u = 0; u < s.length; ++u) {
|
|
4998
4976
|
var p = s[u];
|
|
4999
|
-
a.skipNulls && n[p] === null || Na(r,
|
|
4977
|
+
a.skipNulls && n[p] === null || Na(r, Ec(
|
|
5000
4978
|
n[p],
|
|
5001
4979
|
p,
|
|
5002
4980
|
i,
|
|
@@ -5019,7 +4997,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
5019
4997
|
}
|
|
5020
4998
|
var d = r.join(a.delimiter), m = a.addQueryPrefix === !0 ? "?" : "";
|
|
5021
4999
|
return a.charsetSentinel && (a.charset === "iso-8859-1" ? m += "utf8=%26%2310003%3B&" : m += "utf8=%E2%9C%93&"), d.length > 0 ? m + d : "";
|
|
5022
|
-
}, Le = Sa, Jt = Object.prototype.hasOwnProperty,
|
|
5000
|
+
}, Le = Sa, Jt = Object.prototype.hasOwnProperty, Fc = Array.isArray, M = {
|
|
5023
5001
|
allowDots: !1,
|
|
5024
5002
|
allowEmptyArrays: !1,
|
|
5025
5003
|
allowPrototypes: !1,
|
|
@@ -5039,31 +5017,31 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
5039
5017
|
parseArrays: !0,
|
|
5040
5018
|
plainObjects: !1,
|
|
5041
5019
|
strictNullHandling: !1
|
|
5042
|
-
},
|
|
5020
|
+
}, qc = function(e) {
|
|
5043
5021
|
return e.replace(/&#(\d+);/g, function(t, n) {
|
|
5044
5022
|
return String.fromCharCode(parseInt(n, 10));
|
|
5045
5023
|
});
|
|
5046
5024
|
}, Ta = function(e, t) {
|
|
5047
5025
|
return e && typeof e == "string" && t.comma && e.indexOf(",") > -1 ? e.split(",") : e;
|
|
5048
|
-
},
|
|
5026
|
+
}, Ic = "utf8=%26%2310003%3B", _c = "utf8=%E2%9C%93", Lc = function(t, n) {
|
|
5049
5027
|
var a = { __proto__: null }, s = n.ignoreQueryPrefix ? t.replace(/^\?/, "") : t, o = n.parameterLimit === 1 / 0 ? void 0 : n.parameterLimit, r = s.split(n.delimiter, o), i = -1, l, c = n.charset;
|
|
5050
5028
|
if (n.charsetSentinel)
|
|
5051
5029
|
for (l = 0; l < r.length; ++l)
|
|
5052
|
-
r[l].indexOf("utf8=") === 0 && (r[l] ===
|
|
5030
|
+
r[l].indexOf("utf8=") === 0 && (r[l] === _c ? c = "utf-8" : r[l] === Ic && (c = "iso-8859-1"), i = l, l = r.length);
|
|
5053
5031
|
for (l = 0; l < r.length; ++l)
|
|
5054
5032
|
if (l !== i) {
|
|
5055
5033
|
var u = r[l], p = u.indexOf("]="), d = p === -1 ? u.indexOf("=") : p + 1, m, h;
|
|
5056
5034
|
d === -1 ? (m = n.decoder(u, M.decoder, c, "key"), h = n.strictNullHandling ? null : "") : (m = n.decoder(u.slice(0, d), M.decoder, c, "key"), h = Le.maybeMap(
|
|
5057
5035
|
Ta(u.slice(d + 1), n),
|
|
5058
|
-
function(
|
|
5059
|
-
return n.decoder(
|
|
5036
|
+
function(v) {
|
|
5037
|
+
return n.decoder(v, M.decoder, c, "value");
|
|
5060
5038
|
}
|
|
5061
|
-
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h =
|
|
5039
|
+
)), h && n.interpretNumericEntities && c === "iso-8859-1" && (h = qc(h)), u.indexOf("[]=") > -1 && (h = Fc(h) ? [h] : h);
|
|
5062
5040
|
var y = Jt.call(a, m);
|
|
5063
5041
|
y && n.duplicates === "combine" ? a[m] = Le.combine(a[m], h) : (!y || n.duplicates === "last") && (a[m] = h);
|
|
5064
5042
|
}
|
|
5065
5043
|
return a;
|
|
5066
|
-
},
|
|
5044
|
+
}, Uc = function(e, t, n, a) {
|
|
5067
5045
|
for (var s = a ? t : Ta(t, n), o = e.length - 1; o >= 0; --o) {
|
|
5068
5046
|
var r, i = e[o];
|
|
5069
5047
|
if (i === "[]" && n.parseArrays)
|
|
@@ -5076,7 +5054,7 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
5076
5054
|
s = r;
|
|
5077
5055
|
}
|
|
5078
5056
|
return s;
|
|
5079
|
-
},
|
|
5057
|
+
}, Mc = function(t, n, a, s) {
|
|
5080
5058
|
if (t) {
|
|
5081
5059
|
var o = a.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, r = /(\[[^[\]]*])/, i = /(\[[^[\]]*])/g, l = a.depth > 0 && r.exec(o), c = l ? o.slice(0, l.index) : o, u = [];
|
|
5082
5060
|
if (c) {
|
|
@@ -5089,9 +5067,9 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
5089
5067
|
return;
|
|
5090
5068
|
u.push(l[1]);
|
|
5091
5069
|
}
|
|
5092
|
-
return l && u.push("[" + o.slice(l.index) + "]"),
|
|
5070
|
+
return l && u.push("[" + o.slice(l.index) + "]"), Uc(u, n, a, s);
|
|
5093
5071
|
}
|
|
5094
|
-
},
|
|
5072
|
+
}, Hc = function(t) {
|
|
5095
5073
|
if (!t)
|
|
5096
5074
|
return M;
|
|
5097
5075
|
if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
|
|
@@ -5128,24 +5106,24 @@ var ka = Ue, Me = jl, rc = Ll, ac = Ye, tt = ka("%WeakMap%", !0), nt = ka("%Map%
|
|
|
5128
5106
|
plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : M.plainObjects,
|
|
5129
5107
|
strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : M.strictNullHandling
|
|
5130
5108
|
};
|
|
5131
|
-
},
|
|
5132
|
-
var n =
|
|
5109
|
+
}, Bc = function(e, t) {
|
|
5110
|
+
var n = Hc(t);
|
|
5133
5111
|
if (e === "" || e === null || typeof e > "u")
|
|
5134
5112
|
return n.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
|
|
5135
|
-
for (var a = typeof e == "string" ?
|
|
5136
|
-
var i = o[r], l =
|
|
5113
|
+
for (var a = typeof e == "string" ? Lc(e, n) : e, s = n.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = Object.keys(a), r = 0; r < o.length; ++r) {
|
|
5114
|
+
var i = o[r], l = Mc(i, a[i], n, typeof e == "string");
|
|
5137
5115
|
s = Le.merge(s, l, n);
|
|
5138
5116
|
}
|
|
5139
5117
|
return n.allowSparse === !0 ? s : Le.compact(s);
|
|
5140
|
-
},
|
|
5118
|
+
}, Dc = Ac, Vc = Bc, Wc = vn, ct = {
|
|
5141
5119
|
formats: Wc,
|
|
5142
|
-
parse:
|
|
5143
|
-
stringify:
|
|
5144
|
-
},
|
|
5120
|
+
parse: Vc,
|
|
5121
|
+
stringify: Dc
|
|
5122
|
+
}, zc = Os;
|
|
5145
5123
|
function oe() {
|
|
5146
5124
|
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;
|
|
5147
5125
|
}
|
|
5148
|
-
var
|
|
5126
|
+
var Jc = /^([a-z0-9.+-]+:)/i, Gc = /:[0-9]*$/, Kc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, Qc = [
|
|
5149
5127
|
"<",
|
|
5150
5128
|
">",
|
|
5151
5129
|
'"',
|
|
@@ -5155,14 +5133,14 @@ var Gc = /^([a-z0-9.+-]+:)/i, Kc = /:[0-9]*$/, Qc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5155
5133
|
`
|
|
5156
5134
|
`,
|
|
5157
5135
|
" "
|
|
5158
|
-
],
|
|
5136
|
+
], Yc = [
|
|
5159
5137
|
"{",
|
|
5160
5138
|
"}",
|
|
5161
5139
|
"|",
|
|
5162
5140
|
"\\",
|
|
5163
5141
|
"^",
|
|
5164
5142
|
"`"
|
|
5165
|
-
].concat(
|
|
5143
|
+
].concat(Qc), Gt = ["'"].concat(Yc), sr = [
|
|
5166
5144
|
"%",
|
|
5167
5145
|
"/",
|
|
5168
5146
|
"?",
|
|
@@ -5172,7 +5150,7 @@ var Gc = /^([a-z0-9.+-]+:)/i, Kc = /:[0-9]*$/, Qc = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
5172
5150
|
"/",
|
|
5173
5151
|
"?",
|
|
5174
5152
|
"#"
|
|
5175
|
-
],
|
|
5153
|
+
], Xc = 255, cr = /^[+a-z0-9A-Z_-]{0,63}$/, Zc = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, eu = {
|
|
5176
5154
|
javascript: !0,
|
|
5177
5155
|
"javascript:": !0
|
|
5178
5156
|
}, Kt = {
|
|
@@ -5203,11 +5181,11 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5203
5181
|
o[0] = o[0].replace(r, "/"), e = o.join(s);
|
|
5204
5182
|
var i = e;
|
|
5205
5183
|
if (i = i.trim(), !n && e.split("#").length === 1) {
|
|
5206
|
-
var l =
|
|
5184
|
+
var l = Kc.exec(i);
|
|
5207
5185
|
if (l)
|
|
5208
5186
|
return this.path = i, this.href = i, this.pathname = l[1], l[2] ? (this.search = l[2], t ? this.query = Qt.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : t && (this.search = "", this.query = {}), this;
|
|
5209
5187
|
}
|
|
5210
|
-
var c =
|
|
5188
|
+
var c = Jc.exec(i);
|
|
5211
5189
|
if (c) {
|
|
5212
5190
|
c = c[0];
|
|
5213
5191
|
var u = c.toLowerCase();
|
|
@@ -5222,8 +5200,8 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5222
5200
|
var h = i.indexOf(lr[m]);
|
|
5223
5201
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
5224
5202
|
}
|
|
5225
|
-
var y,
|
|
5226
|
-
d === -1 ?
|
|
5203
|
+
var y, v;
|
|
5204
|
+
d === -1 ? v = i.lastIndexOf("@") : v = i.lastIndexOf("@", d), v !== -1 && (y = i.slice(0, v), i = i.slice(v + 1), this.auth = decodeURIComponent(y)), d = -1;
|
|
5227
5205
|
for (var m = 0; m < sr.length; m++) {
|
|
5228
5206
|
var h = i.indexOf(sr[m]);
|
|
5229
5207
|
h !== -1 && (d === -1 || h < d) && (d = h);
|
|
@@ -5231,40 +5209,40 @@ oe.prototype.parse = function(e, t, n) {
|
|
|
5231
5209
|
d === -1 && (d = i.length), this.host = i.slice(0, d), i = i.slice(d), this.parseHost(), this.hostname = this.hostname || "";
|
|
5232
5210
|
var b = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
5233
5211
|
if (!b)
|
|
5234
|
-
for (var
|
|
5235
|
-
var w =
|
|
5212
|
+
for (var g = this.hostname.split(/\./), m = 0, x = g.length; m < x; m++) {
|
|
5213
|
+
var w = g[m];
|
|
5236
5214
|
if (w && !w.match(cr)) {
|
|
5237
|
-
for (var S = "",
|
|
5238
|
-
w.charCodeAt(
|
|
5215
|
+
for (var S = "", k = 0, C = w.length; k < C; k++)
|
|
5216
|
+
w.charCodeAt(k) > 127 ? S += "x" : S += w[k];
|
|
5239
5217
|
if (!S.match(cr)) {
|
|
5240
|
-
var
|
|
5241
|
-
|
|
5218
|
+
var P = g.slice(0, m), R = g.slice(m + 1), q = w.match(Zc);
|
|
5219
|
+
q && (P.push(q[1]), R.unshift(q[2])), R.length && (i = "/" + R.join(".") + i), this.hostname = P.join(".");
|
|
5242
5220
|
break;
|
|
5243
5221
|
}
|
|
5244
5222
|
}
|
|
5245
5223
|
}
|
|
5246
|
-
this.hostname.length >
|
|
5247
|
-
var
|
|
5248
|
-
this.host =
|
|
5224
|
+
this.hostname.length > Xc ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), b || (this.hostname = zc.toASCII(this.hostname));
|
|
5225
|
+
var G = this.port ? ":" + this.port : "", K = this.hostname || "";
|
|
5226
|
+
this.host = K + G, this.href += this.host, b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), i[0] !== "/" && (i = "/" + i));
|
|
5249
5227
|
}
|
|
5250
|
-
if (!
|
|
5228
|
+
if (!eu[u])
|
|
5251
5229
|
for (var m = 0, x = Gt.length; m < x; m++) {
|
|
5252
|
-
var
|
|
5253
|
-
if (i.indexOf(
|
|
5254
|
-
var
|
|
5255
|
-
|
|
5230
|
+
var I = Gt[m];
|
|
5231
|
+
if (i.indexOf(I) !== -1) {
|
|
5232
|
+
var H = encodeURIComponent(I);
|
|
5233
|
+
H === I && (H = escape(I)), i = i.split(I).join(H);
|
|
5256
5234
|
}
|
|
5257
5235
|
}
|
|
5258
|
-
var
|
|
5259
|
-
|
|
5260
|
-
var
|
|
5261
|
-
if (
|
|
5262
|
-
var
|
|
5263
|
-
this.path =
|
|
5236
|
+
var L = i.indexOf("#");
|
|
5237
|
+
L !== -1 && (this.hash = i.substr(L), i = i.slice(0, L));
|
|
5238
|
+
var ee = i.indexOf("?");
|
|
5239
|
+
if (ee !== -1 ? (this.search = i.substr(ee), this.query = i.substr(ee + 1), t && (this.query = Qt.parse(this.query)), i = i.slice(0, ee)) : t && (this.search = "", this.query = {}), i && (this.pathname = i), Fe[u] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
5240
|
+
var G = this.pathname || "", he = this.search || "";
|
|
5241
|
+
this.path = G + he;
|
|
5264
5242
|
}
|
|
5265
5243
|
return this.href = this.format(), this;
|
|
5266
5244
|
};
|
|
5267
|
-
function
|
|
5245
|
+
function tu(e) {
|
|
5268
5246
|
return typeof e == "string" && (e = bn(e)), e instanceof oe ? e.format() : oe.prototype.format.call(e);
|
|
5269
5247
|
}
|
|
5270
5248
|
oe.prototype.format = function() {
|
|
@@ -5321,45 +5299,45 @@ oe.prototype.resolveObject = function(e) {
|
|
|
5321
5299
|
}
|
|
5322
5300
|
return n.slashes = n.slashes || e.slashes, n.href = n.format(), n;
|
|
5323
5301
|
}
|
|
5324
|
-
var h = n.pathname && n.pathname.charAt(0) === "/", y = e.host || e.pathname && e.pathname.charAt(0) === "/",
|
|
5325
|
-
if (w && (n.hostname = "", n.port = null, n.host && (
|
|
5326
|
-
n.host = e.host || e.host === "" ? e.host : n.host, n.hostname = e.hostname || e.hostname === "" ? e.hostname : n.hostname, n.search = e.search, n.query = e.query,
|
|
5302
|
+
var h = n.pathname && n.pathname.charAt(0) === "/", y = e.host || e.pathname && e.pathname.charAt(0) === "/", v = y || h || n.host && e.pathname, b = v, g = n.pathname && n.pathname.split("/") || [], x = e.pathname && e.pathname.split("/") || [], w = n.protocol && !Fe[n.protocol];
|
|
5303
|
+
if (w && (n.hostname = "", n.port = null, n.host && (g[0] === "" ? g[0] = n.host : g.unshift(n.host)), n.host = "", e.protocol && (e.hostname = null, e.port = null, e.host && (x[0] === "" ? x[0] = e.host : x.unshift(e.host)), e.host = null), v = v && (x[0] === "" || g[0] === "")), y)
|
|
5304
|
+
n.host = e.host || e.host === "" ? e.host : n.host, n.hostname = e.hostname || e.hostname === "" ? e.hostname : n.hostname, n.search = e.search, n.query = e.query, g = x;
|
|
5327
5305
|
else if (x.length)
|
|
5328
|
-
|
|
5306
|
+
g || (g = []), g.pop(), g = g.concat(x), n.search = e.search, n.query = e.query;
|
|
5329
5307
|
else if (e.search != null) {
|
|
5330
5308
|
if (w) {
|
|
5331
|
-
n.host =
|
|
5309
|
+
n.host = g.shift(), n.hostname = n.host;
|
|
5332
5310
|
var S = n.host && n.host.indexOf("@") > 0 ? n.host.split("@") : !1;
|
|
5333
5311
|
S && (n.auth = S.shift(), n.hostname = S.shift(), n.host = n.hostname);
|
|
5334
5312
|
}
|
|
5335
5313
|
return n.search = e.search, n.query = e.query, (n.pathname !== null || n.search !== null) && (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.href = n.format(), n;
|
|
5336
5314
|
}
|
|
5337
|
-
if (!
|
|
5315
|
+
if (!g.length)
|
|
5338
5316
|
return n.pathname = null, n.search ? n.path = "/" + n.search : n.path = null, n.href = n.format(), n;
|
|
5339
|
-
for (var
|
|
5340
|
-
|
|
5341
|
-
if (!
|
|
5342
|
-
for (;
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
var
|
|
5317
|
+
for (var k = g.slice(-1)[0], C = (n.host || e.host || g.length > 1) && (k === "." || k === "..") || k === "", P = 0, R = g.length; R >= 0; R--)
|
|
5318
|
+
k = g[R], k === "." ? g.splice(R, 1) : k === ".." ? (g.splice(R, 1), P++) : P && (g.splice(R, 1), P--);
|
|
5319
|
+
if (!v && !b)
|
|
5320
|
+
for (; P--; P)
|
|
5321
|
+
g.unshift("..");
|
|
5322
|
+
v && g[0] !== "" && (!g[0] || g[0].charAt(0) !== "/") && g.unshift(""), C && g.join("/").substr(-1) !== "/" && g.push("");
|
|
5323
|
+
var q = g[0] === "" || g[0] && g[0].charAt(0) === "/";
|
|
5346
5324
|
if (w) {
|
|
5347
|
-
n.hostname =
|
|
5325
|
+
n.hostname = q ? "" : g.length ? g.shift() : "", n.host = n.hostname;
|
|
5348
5326
|
var S = n.host && n.host.indexOf("@") > 0 ? n.host.split("@") : !1;
|
|
5349
5327
|
S && (n.auth = S.shift(), n.hostname = S.shift(), n.host = n.hostname);
|
|
5350
5328
|
}
|
|
5351
|
-
return
|
|
5329
|
+
return v = v || n.host && g.length, v && !q && g.unshift(""), g.length > 0 ? n.pathname = g.join("/") : (n.pathname = null, n.path = null), (n.pathname !== null || n.search !== null) && (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")), n.auth = e.auth || n.auth, n.slashes = n.slashes || e.slashes, n.href = n.format(), n;
|
|
5352
5330
|
};
|
|
5353
5331
|
oe.prototype.parseHost = function() {
|
|
5354
|
-
var e = this.host, t =
|
|
5332
|
+
var e = this.host, t = Gc.exec(e);
|
|
5355
5333
|
t && (t = t[0], t !== ":" && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)), e && (this.hostname = e);
|
|
5356
5334
|
};
|
|
5357
|
-
var
|
|
5335
|
+
var nu = bn, ur = tu, ru = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), au = class {
|
|
5358
5336
|
constructor(e, t = {}) {
|
|
5359
5337
|
this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
|
|
5360
5338
|
harIsAlreadyEncoded: !1,
|
|
5361
5339
|
...t
|
|
5362
|
-
}, this.requests = [],
|
|
5340
|
+
}, this.requests = [], ru(e) ? this.entries = e.log.entries : this.entries = [
|
|
5363
5341
|
{
|
|
5364
5342
|
request: e
|
|
5365
5343
|
}
|
|
@@ -5396,11 +5374,11 @@ var ru = bn, ur = nu, au = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5396
5374
|
};
|
|
5397
5375
|
if (n.queryString && n.queryString.length && (n.queryObj = n.queryString.reduce(Tn, {})), n.headers && n.headers.length) {
|
|
5398
5376
|
const m = /^HTTP\/2/;
|
|
5399
|
-
n.headersObj = n.headers.reduce((h, { name: y, value:
|
|
5377
|
+
n.headersObj = n.headers.reduce((h, { name: y, value: v }) => {
|
|
5400
5378
|
const b = m.exec(n.httpVersion) ? y.toLocaleLowerCase() : y;
|
|
5401
5379
|
return {
|
|
5402
5380
|
...h,
|
|
5403
|
-
[b]:
|
|
5381
|
+
[b]: v
|
|
5404
5382
|
};
|
|
5405
5383
|
}, {});
|
|
5406
5384
|
}
|
|
@@ -5419,15 +5397,15 @@ var ru = bn, ur = nu, au = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5419
5397
|
case "multipart/alternative":
|
|
5420
5398
|
if (n.postData.text = "", n.postData.mimeType = "multipart/form-data", (p = n.postData) != null && p.params) {
|
|
5421
5399
|
const m = "---011000010111000001101001", h = `${m}--`, y = `\r
|
|
5422
|
-
`,
|
|
5423
|
-
`),
|
|
5400
|
+
`, v = (w) => w.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), b = (w) => w.replace(/\r?\n|\r/g, `\r
|
|
5401
|
+
`), g = [`--${m}`];
|
|
5424
5402
|
(d = n.postData) == null || d.params.forEach((w, S) => {
|
|
5425
|
-
const
|
|
5426
|
-
|
|
5427
|
-
`Content-Disposition: form-data; name="${
|
|
5428
|
-
),
|
|
5429
|
-
}),
|
|
5430
|
-
const x =
|
|
5403
|
+
const k = w.name, C = w.value || "", P = w.fileName || null, R = w.contentType || "application/octet-stream";
|
|
5404
|
+
P ? (g.push(
|
|
5405
|
+
`Content-Disposition: form-data; name="${v(b(k))}"; filename="${P}"`
|
|
5406
|
+
), g.push(`Content-Type: ${R}`)) : g.push(`Content-Disposition: form-data; name="${v(b(k))}"`), g.push(""), g.push(b(C)), S !== n.postData.params.length - 1 && g.push(`--${m}`);
|
|
5407
|
+
}), g.push(`--${h}`), n.postData.boundary = m, n.postData.text = g.join(y);
|
|
5408
|
+
const x = Y(n.headersObj, "content-type") || "content-type";
|
|
5431
5409
|
n.headersObj[x] = `multipart/form-data; boundary=${m}`;
|
|
5432
5410
|
}
|
|
5433
5411
|
break;
|
|
@@ -5449,7 +5427,7 @@ var ru = bn, ur = nu, au = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5449
5427
|
const s = {
|
|
5450
5428
|
...n.allHeaders,
|
|
5451
5429
|
...n.headersObj
|
|
5452
|
-
}, o =
|
|
5430
|
+
}, o = nu(n.url, !0, !0);
|
|
5453
5431
|
n.queryObj = {
|
|
5454
5432
|
...n.queryObj,
|
|
5455
5433
|
...o.query
|
|
@@ -5484,7 +5462,7 @@ var ru = bn, ur = nu, au = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5484
5462
|
}
|
|
5485
5463
|
convert(e, t, n) {
|
|
5486
5464
|
this.initCalled || this.init(), !n && t && (n = t);
|
|
5487
|
-
const a =
|
|
5465
|
+
const a = Ts[e];
|
|
5488
5466
|
if (!a)
|
|
5489
5467
|
return !1;
|
|
5490
5468
|
const { convert: s } = a.clientsById[t || a.info.default];
|
|
@@ -5493,12 +5471,12 @@ var ru = bn, ur = nu, au = (e) => typeof e == "object" && "log" in e && typeof e
|
|
|
5493
5471
|
};
|
|
5494
5472
|
const Oa = fo(
|
|
5495
5473
|
void 0
|
|
5496
|
-
),
|
|
5474
|
+
), Fu = Oa.Provider, ou = () => {
|
|
5497
5475
|
const e = po(Oa);
|
|
5498
5476
|
if (!e)
|
|
5499
5477
|
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
5500
5478
|
return e.config;
|
|
5501
|
-
},
|
|
5479
|
+
}, iu = ({
|
|
5502
5480
|
server: e,
|
|
5503
5481
|
operation: t
|
|
5504
5482
|
}) => {
|
|
@@ -5558,8 +5536,8 @@ const Oa = fo(
|
|
|
5558
5536
|
),
|
|
5559
5537
|
children: e
|
|
5560
5538
|
}
|
|
5561
|
-
),
|
|
5562
|
-
function
|
|
5539
|
+
), su = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Ge = (e, t) => e.example !== void 0 ? e.example : e.default !== void 0 ? e.default : e.examples && su(e.examples) ? Object.values(e.examples)[0] : lu(e);
|
|
5540
|
+
function lu(e, t) {
|
|
5563
5541
|
const n = Object.entries(e.properties ?? {}).concat(
|
|
5564
5542
|
Object.entries(e.additionalProperties ?? {})
|
|
5565
5543
|
);
|
|
@@ -5574,7 +5552,7 @@ function cu(e, t) {
|
|
|
5574
5552
|
return a !== void 0 ? [a] : [];
|
|
5575
5553
|
}
|
|
5576
5554
|
}
|
|
5577
|
-
const
|
|
5555
|
+
const cu = ({ content: e }) => {
|
|
5578
5556
|
var t;
|
|
5579
5557
|
return e.length ? /* @__PURE__ */ f.jsx(f.Fragment, { children: /* @__PURE__ */ f.jsxs(xn, { children: [
|
|
5580
5558
|
/* @__PURE__ */ f.jsx(kn, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ f.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
|
|
@@ -5593,7 +5571,7 @@ const uu = ({ content: e }) => {
|
|
|
5593
5571
|
}
|
|
5594
5572
|
) })
|
|
5595
5573
|
] }) }) : null;
|
|
5596
|
-
},
|
|
5574
|
+
}, uu = ({
|
|
5597
5575
|
responses: e,
|
|
5598
5576
|
selectedResponse: t,
|
|
5599
5577
|
onSelectResponse: n
|
|
@@ -5641,7 +5619,7 @@ const uu = ({ content: e }) => {
|
|
|
5641
5619
|
]
|
|
5642
5620
|
}
|
|
5643
5621
|
) });
|
|
5644
|
-
},
|
|
5622
|
+
}, du = (e, t) => {
|
|
5645
5623
|
let n;
|
|
5646
5624
|
switch (t) {
|
|
5647
5625
|
case "shell":
|
|
@@ -5691,7 +5669,7 @@ const uu = ({ content: e }) => {
|
|
|
5691
5669
|
}
|
|
5692
5670
|
}
|
|
5693
5671
|
`
|
|
5694
|
-
),
|
|
5672
|
+
), fu = { suspense: !0 }, pu = {
|
|
5695
5673
|
get: pe.green,
|
|
5696
5674
|
post: pe.blue,
|
|
5697
5675
|
put: pe.yellow,
|
|
@@ -5700,34 +5678,37 @@ const uu = ({ content: e }) => {
|
|
|
5700
5678
|
options: pe.indigo,
|
|
5701
5679
|
head: pe.gray,
|
|
5702
5680
|
trace: pe.gray
|
|
5703
|
-
},
|
|
5681
|
+
}, qu = ({
|
|
5704
5682
|
operation: e,
|
|
5705
5683
|
selectedResponse: t,
|
|
5706
5684
|
onSelectResponse: n
|
|
5707
5685
|
}) => {
|
|
5708
5686
|
var m, h;
|
|
5709
|
-
const a =
|
|
5687
|
+
const a = ou(), [s] = Ea({
|
|
5710
5688
|
query: Pa,
|
|
5711
5689
|
variables: a,
|
|
5712
|
-
context:
|
|
5713
|
-
}), o =
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5690
|
+
context: fu
|
|
5691
|
+
}), o = pu[e.method.toLocaleLowerCase()] ?? pe.gray, [r, i] = Ga(), [, l] = mo(), c = r.get("lang") ?? "shell", u = (m = e.requestBody) == null ? void 0 : m.content, p = e.path.split("/").map((y, v, b) => {
|
|
5692
|
+
const x = y.startsWith("{") && y.endsWith("}") || y.startsWith(":") ? y.replace(/[:{}]/g, "") : void 0;
|
|
5693
|
+
return (
|
|
5694
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
5695
|
+
/* @__PURE__ */ f.jsxs(at, { children: [
|
|
5696
|
+
x ? /* @__PURE__ */ f.jsx(
|
|
5697
|
+
un,
|
|
5698
|
+
{
|
|
5699
|
+
name: x,
|
|
5700
|
+
backgroundOpacity: "0",
|
|
5701
|
+
slug: `${e.slug}-${x.toLocaleLowerCase()}`,
|
|
5702
|
+
children: y
|
|
5703
|
+
}
|
|
5704
|
+
) : y,
|
|
5705
|
+
v < b.length - 1 ? "/" : null,
|
|
5706
|
+
/* @__PURE__ */ f.jsx("wbr", {})
|
|
5707
|
+
] }, y + v)
|
|
5708
|
+
);
|
|
5709
|
+
}), d = ho(() => {
|
|
5729
5710
|
var b;
|
|
5730
|
-
const y = (b = u == null ? void 0 : u[0]) != null && b.schema ? Ge(u[0].schema) : void 0,
|
|
5711
|
+
const y = (b = u == null ? void 0 : u[0]) != null && b.schema ? Ge(u[0].schema) : void 0, v = new au(
|
|
5731
5712
|
{
|
|
5732
5713
|
method: e.method.toLocaleUpperCase(),
|
|
5733
5714
|
url: e.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
@@ -5739,7 +5720,7 @@ const uu = ({ content: e }) => {
|
|
|
5739
5720
|
}
|
|
5740
5721
|
// 👈 never touch this
|
|
5741
5722
|
);
|
|
5742
|
-
return
|
|
5723
|
+
return du(v, c);
|
|
5743
5724
|
}, [c, e.method, e.path, u]);
|
|
5744
5725
|
return /* @__PURE__ */ f.jsxs("aside", { className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [
|
|
5745
5726
|
/* @__PURE__ */ f.jsxs(xn, { children: [
|
|
@@ -5750,7 +5731,7 @@ const uu = ({ content: e }) => {
|
|
|
5750
5731
|
p
|
|
5751
5732
|
] }),
|
|
5752
5733
|
/* @__PURE__ */ f.jsx(
|
|
5753
|
-
|
|
5734
|
+
iu,
|
|
5754
5735
|
{
|
|
5755
5736
|
server: ((h = s.data) == null ? void 0 : h.schema.url) ?? "",
|
|
5756
5737
|
operation: e
|
|
@@ -5795,9 +5776,9 @@ const uu = ({ content: e }) => {
|
|
|
5795
5776
|
)
|
|
5796
5777
|
] })
|
|
5797
5778
|
] }),
|
|
5798
|
-
u && /* @__PURE__ */ f.jsx(
|
|
5779
|
+
u && /* @__PURE__ */ f.jsx(cu, { content: u }),
|
|
5799
5780
|
e.responses.length > 0 && /* @__PURE__ */ f.jsx(
|
|
5800
|
-
|
|
5781
|
+
uu,
|
|
5801
5782
|
{
|
|
5802
5783
|
selectedResponse: t,
|
|
5803
5784
|
onSelectResponse: n,
|
|
@@ -5805,7 +5786,7 @@ const uu = ({ content: e }) => {
|
|
|
5805
5786
|
}
|
|
5806
5787
|
)
|
|
5807
5788
|
] });
|
|
5808
|
-
},
|
|
5789
|
+
}, mu = $r(`
|
|
5809
5790
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
5810
5791
|
schema(input: $input, type: $type) {
|
|
5811
5792
|
tags {
|
|
@@ -5823,10 +5804,10 @@ const uu = ({ content: e }) => {
|
|
|
5823
5804
|
}
|
|
5824
5805
|
}
|
|
5825
5806
|
}
|
|
5826
|
-
`),
|
|
5807
|
+
`), hu = () => {
|
|
5827
5808
|
const e = Ka(), t = e instanceof Error ? /* @__PURE__ */ f.jsx(Qe, { code: e.message }) : "An unknown error occurred";
|
|
5828
5809
|
return /* @__PURE__ */ f.jsx(Oo, { category: "Error", title: "An error occurred", message: t });
|
|
5829
|
-
},
|
|
5810
|
+
}, yu = {
|
|
5830
5811
|
get: "green",
|
|
5831
5812
|
post: "blue",
|
|
5832
5813
|
put: "yellow",
|
|
@@ -5834,7 +5815,7 @@ const uu = ({ content: e }) => {
|
|
|
5834
5815
|
patch: "purple",
|
|
5835
5816
|
options: "gray",
|
|
5836
5817
|
head: "gray"
|
|
5837
|
-
},
|
|
5818
|
+
}, Iu = (e) => {
|
|
5838
5819
|
const t = to(e.navigationId ?? "/reference"), n = e.server ? new Ra({
|
|
5839
5820
|
url: e.server,
|
|
5840
5821
|
exchanges: [Aa, Fa]
|
|
@@ -5863,7 +5844,7 @@ const uu = ({ content: e }) => {
|
|
|
5863
5844
|
...i
|
|
5864
5845
|
}) => {
|
|
5865
5846
|
var u;
|
|
5866
|
-
const l =
|
|
5847
|
+
const l = za(), c = Ia({
|
|
5867
5848
|
queryFn: async () => (await n.query(Pa, {
|
|
5868
5849
|
type: e.type,
|
|
5869
5850
|
input: e.input
|
|
@@ -5900,7 +5881,7 @@ const uu = ({ content: e }) => {
|
|
|
5900
5881
|
getSidebar: async (a) => {
|
|
5901
5882
|
if (!xo({ path: t, end: !1 }, a))
|
|
5902
5883
|
return [];
|
|
5903
|
-
const { data: s } = await n.query(
|
|
5884
|
+
const { data: s } = await n.query(mu, {
|
|
5904
5885
|
input: e.input,
|
|
5905
5886
|
type: e.type
|
|
5906
5887
|
});
|
|
@@ -5916,7 +5897,7 @@ const uu = ({ content: e }) => {
|
|
|
5916
5897
|
href: `#${i.slug}`,
|
|
5917
5898
|
badge: {
|
|
5918
5899
|
label: i.method,
|
|
5919
|
-
color:
|
|
5900
|
+
color: yu[i.method.toLowerCase()]
|
|
5920
5901
|
}
|
|
5921
5902
|
}))
|
|
5922
5903
|
}));
|
|
@@ -5929,12 +5910,12 @@ const uu = ({ content: e }) => {
|
|
|
5929
5910
|
getRoutes: () => [
|
|
5930
5911
|
{
|
|
5931
5912
|
async lazy() {
|
|
5932
|
-
const { OpenApiRoute: a } = await import("./Route-
|
|
5913
|
+
const { OpenApiRoute: a } = await import("./Route-DnFLPnPw.js");
|
|
5933
5914
|
return {
|
|
5934
5915
|
element: /* @__PURE__ */ f.jsx(a, { client: n, config: e })
|
|
5935
5916
|
};
|
|
5936
5917
|
},
|
|
5937
|
-
errorElement: /* @__PURE__ */ f.jsx(
|
|
5918
|
+
errorElement: /* @__PURE__ */ f.jsx(hu, {}),
|
|
5938
5919
|
children: [
|
|
5939
5920
|
{
|
|
5940
5921
|
path: t,
|
|
@@ -5942,7 +5923,7 @@ const uu = ({ content: e }) => {
|
|
|
5942
5923
|
{
|
|
5943
5924
|
index: !0,
|
|
5944
5925
|
async lazy() {
|
|
5945
|
-
const { OperationList: a } = await import("./OperationList-
|
|
5926
|
+
const { OperationList: a } = await import("./OperationList-BoB5bkdm.js");
|
|
5946
5927
|
return { element: /* @__PURE__ */ f.jsx(a, {}) };
|
|
5947
5928
|
}
|
|
5948
5929
|
}
|
|
@@ -5956,18 +5937,18 @@ const uu = ({ content: e }) => {
|
|
|
5956
5937
|
export {
|
|
5957
5938
|
un as C,
|
|
5958
5939
|
Oo as E,
|
|
5959
|
-
|
|
5960
|
-
|
|
5940
|
+
Fu as O,
|
|
5941
|
+
qu as S,
|
|
5961
5942
|
Nn as T,
|
|
5962
5943
|
rn as a,
|
|
5963
5944
|
Go as b,
|
|
5964
|
-
|
|
5965
|
-
|
|
5945
|
+
Wo as c,
|
|
5946
|
+
zo as d,
|
|
5966
5947
|
_t as e,
|
|
5967
5948
|
Ce as f,
|
|
5968
5949
|
Pe as g,
|
|
5969
5950
|
$r as h,
|
|
5970
|
-
|
|
5971
|
-
|
|
5951
|
+
Iu as o,
|
|
5952
|
+
ou as u
|
|
5972
5953
|
};
|
|
5973
|
-
//# sourceMappingURL=index-
|
|
5954
|
+
//# sourceMappingURL=index-Bx0AgZT5.js.map
|