zudoku 0.35.3 → 0.35.5

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.
Files changed (47) hide show
  1. package/dist/lib/components/Layout.js +1 -1
  2. package/dist/lib/components/Layout.js.map +1 -1
  3. package/dist/lib/plugins/openapi/OperationList.js +1 -0
  4. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  5. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  6. package/dist/lib/plugins/openapi/ParamInfos.js +34 -0
  7. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  8. package/dist/lib/plugins/openapi/ParameterListItem.js +7 -4
  9. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  10. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  11. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  12. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  13. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
  14. package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
  15. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  16. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +9 -8
  17. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  18. package/dist/lib/ui/Button.d.ts +2 -2
  19. package/dist/lib/ui/Button.js +1 -0
  20. package/dist/lib/ui/Button.js.map +1 -1
  21. package/lib/{OasProvider-7Z9UwS9y.js → OasProvider-CJ8KOnsH.js} +2 -2
  22. package/lib/{OasProvider-7Z9UwS9y.js.map → OasProvider-CJ8KOnsH.js.map} +1 -1
  23. package/lib/{OperationList-a7wnHdXv.js → OperationList-C4rpJdcE.js} +1081 -1049
  24. package/lib/OperationList-C4rpJdcE.js.map +1 -0
  25. package/lib/{Spinner-1KrEmx1V.js → Spinner-C6n4eOvh.js} +13 -12
  26. package/lib/Spinner-C6n4eOvh.js.map +1 -0
  27. package/lib/{index-UmhI2mj7.js → index-Dowg8c_k.js} +7 -5
  28. package/lib/index-Dowg8c_k.js.map +1 -0
  29. package/lib/ui/ActionButton.js +1 -1
  30. package/lib/ui/Button.js +12 -11
  31. package/lib/ui/Button.js.map +1 -1
  32. package/lib/zudoku.components.js +2 -2
  33. package/lib/zudoku.components.js.map +1 -1
  34. package/lib/zudoku.plugin-openapi.js +1 -1
  35. package/package.json +1 -1
  36. package/src/app/main.css +4 -0
  37. package/src/lib/components/Layout.tsx +1 -1
  38. package/src/lib/plugins/openapi/OperationList.tsx +1 -0
  39. package/src/lib/plugins/openapi/ParamInfos.tsx +64 -0
  40. package/src/lib/plugins/openapi/ParameterListItem.tsx +26 -22
  41. package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
  42. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  43. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +22 -34
  44. package/src/lib/ui/Button.tsx +3 -1
  45. package/lib/OperationList-a7wnHdXv.js.map +0 -1
  46. package/lib/Spinner-1KrEmx1V.js.map +0 -1
  47. package/lib/index-UmhI2mj7.js.map +0 -1
@@ -1,40 +1,40 @@
1
1
  import { j as u } from "./jsx-runtime-CYK1ROHF.js";
2
- import { b as jr, k as $r, l as Uo } from "./hook-CfCFKZ-2.js";
3
- import { H as Fo } from "./index.esm-CltAN0Tf.js";
4
- import { ChevronsUpDownIcon as to, CheckIcon as _o, CopyIcon as Bo, ChevronUpIcon as Ho, ChevronDownIcon as ro, UnfoldVerticalIcon as Mo, FoldVerticalIcon as zo, CircleIcon as Go, CircleDotIcon as Wo, CircleFadingPlusIcon as Jo, SquareMinusIcon as Vo, SquarePlusIcon as Do, ListPlusIcon as Qo, RefreshCcwDotIcon as Ko, ChevronsDownUpIcon as Yo } from "lucide-react";
5
- import { b as Xo, a as Zo } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
6
- import { a as rt, C as no, b as oo, c as ao, d as yr, P as ea, m as io, e as ta } from "./index-UmhI2mj7.js";
7
- import { S as ra, a as na, b as oa, c as aa, e as ia } from "./Select-FAYHOYTy.js";
8
- import { C as sa } from "./CategoryHeading-DpB47wvk.js";
9
- import { I as la, c as so, M as Se, H as Be, P as qe } from "./Markdown-hBN9vkm5.js";
2
+ import { b as $r, k as wr, l as Fo } from "./hook-CfCFKZ-2.js";
3
+ import { H as _o } from "./index.esm-CltAN0Tf.js";
4
+ import { ChevronsUpDownIcon as ro, CheckIcon as Bo, CopyIcon as Ho, ChevronUpIcon as Mo, ChevronDownIcon as no, UnfoldVerticalIcon as zo, FoldVerticalIcon as Go, CircleIcon as Wo, CircleDotIcon as Jo, CircleFadingPlusIcon as Vo, SquareMinusIcon as Do, SquarePlusIcon as Qo, MinusIcon as Ko, PlusIcon as Yo, RefreshCcwDotIcon as Xo, ChevronsDownUpIcon as Zo } from "lucide-react";
5
+ import { b as ea, a as ta } from "./chunk-HA7DTUK3-ZGg2W6yV.js";
6
+ import { a as tt, C as oo, b as ao, c as io, d as yr, P as ra, m as so, e as na } from "./index-Dowg8c_k.js";
7
+ import { S as oa, a as aa, b as ia, c as sa, e as la } from "./Select-FAYHOYTy.js";
8
+ import { C as ca } from "./CategoryHeading-DpB47wvk.js";
9
+ import { I as lo, c as rt, M as we, H as _e, P as Ne } from "./Markdown-hBN9vkm5.js";
10
10
  import { c as se } from "./cn-qaFjX9_3.js";
11
- import { useContext as ca, useTransition as lo, useState as ye, useRef as co, useEffect as wr, useLayoutEffect as ua, useMemo as uo, useCallback as fa } from "react";
12
- import { Button as fo } from "./ui/Button.js";
13
- import { a as pa, u as Sr } from "./context-DLCwaMXN.js";
11
+ import { useContext as ua, useTransition as co, useState as ye, isValidElement as fa, useRef as uo, useEffect as Sr, useLayoutEffect as pa, useMemo as fo, useCallback as da } from "react";
12
+ import { Button as po } from "./ui/Button.js";
13
+ import { a as ha, u as Or } from "./context-DLCwaMXN.js";
14
14
  import { VisuallyHidden as mr } from "@radix-ui/react-visually-hidden";
15
- import { c as da } from "./index-CPNSgwSb.js";
16
- import { Tabs as ha, TabsList as ya, TabsTrigger as ma, TabsContent as ga } from "./ui/Tabs.js";
17
- import { Card as be, CardHeader as va, CardTitle as ba, CardContent as xa } from "./ui/Card.js";
18
- import { B as gr } from "./Spinner-1KrEmx1V.js";
19
- import { g as ja, c as Ze, a as $a } from "./_commonjsHelpers-BkfeUUK-.js";
20
- import { S as po } from "./SyntaxHighlight-BEoSoPEo.js";
21
- import { useAuth as wa } from "./zudoku.components.js";
22
- import * as Ye from "@radix-ui/react-tabs";
15
+ import { c as ya } from "./index-CPNSgwSb.js";
16
+ import { Tabs as ma, TabsList as ga, TabsTrigger as va, TabsContent as ba } from "./ui/Tabs.js";
17
+ import { Card as be, CardHeader as xa, CardTitle as ja, CardContent as $a } from "./ui/Card.js";
18
+ import { B as gr } from "./Spinner-C6n4eOvh.js";
19
+ import { g as wa, c as Xe, a as Sa } from "./_commonjsHelpers-BkfeUUK-.js";
20
+ import { S as ho } from "./SyntaxHighlight-BEoSoPEo.js";
21
+ import { useAuth as Oa } from "./zudoku.components.js";
22
+ import * as Ke from "@radix-ui/react-tabs";
23
23
  import * as xe from "@radix-ui/react-collapsible";
24
- import { o as Sa } from "./objectEntries-BS7aAgOm.js";
25
- import { C as Oa } from "./circular-v7K6lDDh.js";
26
- function Ta(e, r) {
24
+ import { o as Ta } from "./objectEntries-BS7aAgOm.js";
25
+ import { C as Pa } from "./circular-v7K6lDDh.js";
26
+ function Ca(e, r) {
27
27
  return r;
28
28
  }
29
- const Or = (e, ...r) => {
30
- const t = ca(pa);
29
+ const Tr = (e, ...r) => {
30
+ const t = ua(ha);
31
31
  if (t === void 0)
32
32
  throw new Error("useGraphQL must be used within a GraphQLProvider");
33
33
  return {
34
34
  queryFn: () => t.fetch(e, ...r),
35
35
  queryKey: [e, r[0]]
36
36
  };
37
- }, et = ({
37
+ }, Ze = ({
38
38
  value: e,
39
39
  onChange: r,
40
40
  className: t,
@@ -51,7 +51,7 @@ const Or = (e, ...r) => {
51
51
  ),
52
52
  value: e,
53
53
  onChange: r,
54
- children: o.map((l) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: l.label }, l.value))
54
+ children: o.map((s) => /* @__PURE__ */ u.jsx("option", { value: s.value, children: s.label }, s.value))
55
55
  }
56
56
  ),
57
57
  /* @__PURE__ */ u.jsx(
@@ -61,10 +61,10 @@ const Or = (e, ...r) => {
61
61
  !i && "hidden",
62
62
  "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
63
63
  ),
64
- children: /* @__PURE__ */ u.jsx(to, { size: 14 })
64
+ children: /* @__PURE__ */ u.jsx(ro, { size: 14 })
65
65
  }
66
66
  )
67
- ] }), Pa = rt(
67
+ ] }), Na = tt(
68
68
  /* GraphQL */
69
69
  `
70
70
  query ServersQuery($input: JSON!, $type: SchemaType!) {
@@ -76,10 +76,10 @@ const Or = (e, ...r) => {
76
76
  }
77
77
  }
78
78
  `
79
- ), Hr = ({ url: e }) => {
79
+ ), Mr = ({ url: e }) => {
80
80
  const [r, t] = ye(!1);
81
81
  return /* @__PURE__ */ u.jsx(
82
- fo,
82
+ po,
83
83
  {
84
84
  onClick: () => {
85
85
  navigator.clipboard.writeText(e).then(() => {
@@ -88,27 +88,27 @@ const Or = (e, ...r) => {
88
88
  },
89
89
  variant: "ghost",
90
90
  size: "icon",
91
- children: r ? /* @__PURE__ */ u.jsx(_o, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ u.jsx(Bo, { size: 14, strokeWidth: 1.3 })
91
+ children: r ? /* @__PURE__ */ u.jsx(Bo, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ u.jsx(Ho, { size: 14, strokeWidth: 1.3 })
92
92
  }
93
93
  );
94
- }, Ca = () => {
95
- const { input: e, type: r } = Sr(), t = Or(Pa, { input: e, type: r }), o = jr(t), [, i] = lo(), { selectedServer: l, setSelectedServer: n } = $r(
94
+ }, qa = () => {
95
+ const { input: e, type: r } = Or(), t = Tr(Na, { input: e, type: r }), o = $r(t), [, i] = co(), { selectedServer: s, setSelectedServer: n } = wr(
96
96
  o.data.schema.servers
97
97
  ), { servers: a } = o.data.schema;
98
98
  if (a.length === 0) return null;
99
- const s = a.at(0);
99
+ const l = a.at(0);
100
100
  return a.length === 1 ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
101
101
  /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
102
- /* @__PURE__ */ u.jsx(la, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: s.url }),
103
- /* @__PURE__ */ u.jsx(Hr, { url: s.url })
102
+ /* @__PURE__ */ u.jsx(lo, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: l.url }),
103
+ /* @__PURE__ */ u.jsx(Mr, { url: l.url })
104
104
  ] }) : /* @__PURE__ */ u.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
105
105
  /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
106
106
  /* @__PURE__ */ u.jsx(
107
- et,
107
+ Ze,
108
108
  {
109
109
  className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
110
110
  onChange: (c) => i(() => n(c.target.value)),
111
- value: l,
111
+ value: s,
112
112
  showChevrons: a.length > 1,
113
113
  options: a.map((c) => ({
114
114
  value: c.url,
@@ -116,9 +116,9 @@ const Or = (e, ...r) => {
116
116
  }))
117
117
  }
118
118
  ),
119
- /* @__PURE__ */ u.jsx(Hr, { url: l })
119
+ /* @__PURE__ */ u.jsx(Mr, { url: s })
120
120
  ] });
121
- }, Na = da(
121
+ }, Ra = ya(
122
122
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
123
123
  {
124
124
  variants: {
@@ -135,27 +135,59 @@ const Or = (e, ...r) => {
135
135
  }
136
136
  }
137
137
  );
138
- function we({ className: e, variant: r, ...t }) {
139
- return /* @__PURE__ */ u.jsx("div", { className: se(Na({ variant: r }), e), ...t });
138
+ function ka({ className: e, variant: r, ...t }) {
139
+ return /* @__PURE__ */ u.jsx("div", { className: se(Ra({ variant: r }), e), ...t });
140
140
  }
141
- const ho = (e, r) => e.reduce(
141
+ const yo = (e, r) => e.reduce(
142
142
  (t, o) => {
143
143
  const i = r(o);
144
144
  return t[i] || (t[i] = []), t[i].push(o), t;
145
145
  },
146
146
  {}
147
- ), qa = (e, r) => e ? r(e) : void 0, yo = ({
147
+ ), Ea = (e, r) => e ? r(e) : void 0, Aa = (e) => e ? [
148
+ e.type === "array" && e.items.type ? `${e.items.type}[]` : Array.isArray(e.type) ? e.type.join(" | ") : e.type,
149
+ e.enum && "enum",
150
+ e.format,
151
+ e.minimum && `min: ${e.minimum}`,
152
+ e.maximum && `max: ${e.maximum}`,
153
+ e.minLength && `minLength: ${e.minLength}`,
154
+ e.maxLength && `maxLength: ${e.maxLength}`,
155
+ e.minItems && `minItems: ${e.minItems}`,
156
+ e.maxItems && `maxItems: ${e.maxItems}`,
157
+ e.uniqueItems && "unique",
158
+ e.minProperties && `minProps: ${e.minProperties}`,
159
+ e.maxProperties && `maxProps: ${e.maxProperties}`,
160
+ e.readOnly && "readOnly",
161
+ e.writeOnly && "writeOnly",
162
+ e.deprecated && "deprecated",
163
+ e.pattern && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
164
+ "pattern: ",
165
+ /* @__PURE__ */ u.jsx(lo, { className: "text-xs", children: e.pattern })
166
+ ] })
167
+ ] : [], vr = ({
168
+ schema: e,
169
+ extraItems: r = [],
170
+ className: t
171
+ }) => {
172
+ const o = [...Aa(e), ...r].flatMap(
173
+ (i) => typeof i == "string" || fa(i) ? i : []
174
+ );
175
+ return /* @__PURE__ */ u.jsx("div", { className: t, children: o.map((i, s) => /* @__PURE__ */ u.jsxs("span", { className: "text-muted-foreground", children: [
176
+ i,
177
+ s < o.length - 1 && /* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground/50", children: " · " })
178
+ ] }, s)) });
179
+ }, mo = ({
148
180
  values: e,
149
181
  className: r,
150
182
  maxVisibleValues: t = 8
151
183
  }) => {
152
184
  const [o, i] = ye(!1);
153
185
  if (!e.length) return null;
154
- const l = e.length > t, n = l && !o ? e.slice(0, t) : e;
186
+ const s = e.length > t, n = s && !o ? e.slice(0, t) : e;
155
187
  return /* @__PURE__ */ u.jsxs("div", { className: se("flex flex-wrap gap-1.5 text-xs", r), children: [
156
188
  /* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: "Enum values: " }),
157
- n.map((a) => /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx(so, { className: "border rounded px-1 font-mono cursor-pointer", children: a }) }, a)),
158
- l && /* @__PURE__ */ u.jsx(
189
+ n.map((a) => /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsx(rt, { className: "border rounded px-1 font-mono cursor-pointer", children: a }) }, a)),
190
+ s && /* @__PURE__ */ u.jsx(
159
191
  gr,
160
192
  {
161
193
  variant: "ghost",
@@ -163,10 +195,10 @@ const ho = (e, r) => e.reduce(
163
195
  className: "h-fit px-0",
164
196
  onClick: () => i(!o),
165
197
  children: o ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
166
- /* @__PURE__ */ u.jsx(Ho, { size: 12 }),
198
+ /* @__PURE__ */ u.jsx(Mo, { size: 12 }),
167
199
  /* @__PURE__ */ u.jsx("span", { className: "text-muted-foreground", children: "show less" })
168
200
  ] }) : /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1", children: [
169
- /* @__PURE__ */ u.jsx(ro, { size: 12 }),
201
+ /* @__PURE__ */ u.jsx(no, { size: 12 }),
170
202
  /* @__PURE__ */ u.jsxs("span", { className: "text-muted-foreground", children: [
171
203
  "show ",
172
204
  e.length - t,
@@ -176,53 +208,61 @@ const ho = (e, r) => e.reduce(
176
208
  }
177
209
  )
178
210
  ] });
179
- }, Ra = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
211
+ }, Ia = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
180
212
  type: "string"
181
- }, ka = ({
213
+ }, La = ({
182
214
  parameter: e,
183
215
  group: r,
184
216
  id: t
185
217
  }) => {
186
- const o = Ra(e);
218
+ const o = Ia(e);
187
219
  return /* @__PURE__ */ u.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
188
220
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2", children: [
189
- /* @__PURE__ */ u.jsx("code", { children: r === "path" ? /* @__PURE__ */ u.jsx(
190
- no,
221
+ /* @__PURE__ */ u.jsx(rt, { asChild: !0, children: /* @__PURE__ */ u.jsx("code", { children: r === "path" ? /* @__PURE__ */ u.jsx(
222
+ oo,
191
223
  {
192
224
  name: e.name,
193
225
  backgroundOpacity: "15%",
194
- className: "px-1",
226
+ className: "px-2",
195
227
  slug: `${t}-${e.name}`
196
228
  }
197
- ) : e.name }),
198
- o.type && /* @__PURE__ */ u.jsx(we, { variant: "muted", children: o.type === "array" ? `${o.items.type}[]` : o.type }),
199
- e.required && /* @__PURE__ */ u.jsx(we, { variant: "outline", children: "required" }),
200
- e.style === "form" && /* @__PURE__ */ u.jsx(we, { variant: "secondary", children: "form" })
229
+ ) : e.name }) }),
230
+ /* @__PURE__ */ u.jsx(
231
+ vr,
232
+ {
233
+ schema: o,
234
+ extraItems: [
235
+ e.required && /* @__PURE__ */ u.jsx("span", { className: "text-primary", children: "required" }),
236
+ e.style && `style: ${e.style}`,
237
+ e.explode && `explode: ${e.explode}`
238
+ ]
239
+ }
240
+ )
201
241
  ] }),
202
242
  e.description && /* @__PURE__ */ u.jsx(
203
- Se,
243
+ we,
204
244
  {
205
245
  content: e.description,
206
246
  className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
207
247
  }
208
248
  ),
209
- o.enum && /* @__PURE__ */ u.jsx(yo, { values: o.enum })
249
+ o.enum && /* @__PURE__ */ u.jsx(mo, { values: o.enum })
210
250
  ] });
211
- }, Ea = ({
251
+ }, Ua = ({
212
252
  summary: e,
213
253
  group: r,
214
254
  parameters: t,
215
255
  id: o
216
256
  }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
217
- /* @__PURE__ */ u.jsxs(Be, { level: 3, id: `${o}/${r}-parameters`, className: "capitalize", children: [
257
+ /* @__PURE__ */ u.jsxs(_e, { level: 3, id: `${o}/${r}-parameters`, className: "capitalize", children: [
218
258
  e && /* @__PURE__ */ u.jsxs(mr, { children: [
219
259
  e,
220
260
  " › "
221
261
  ] }),
222
262
  r === "header" ? "Headers" : `${r} Parameters`
223
263
  ] }),
224
- /* @__PURE__ */ u.jsx(be, { children: /* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((i, l) => i.required === l.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ u.jsx(
225
- ka,
264
+ /* @__PURE__ */ u.jsx(be, { children: /* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((i, s) => i.required === s.required ? 0 : i.required ? -1 : 1).map((i) => /* @__PURE__ */ u.jsx(
265
+ La,
226
266
  {
227
267
  parameter: i,
228
268
  id: o,
@@ -231,17 +271,17 @@ const ho = (e, r) => e.reduce(
231
271
  `${i.name}-${i.in}`
232
272
  )) }) })
233
273
  ] });
234
- var Mr = (e, r) => {
274
+ var zr = (e, r) => {
235
275
  const t = e[r.name];
236
276
  return t === void 0 ? (e[r.name] = r.value, e) : Array.isArray(t) ? (t.push(r.value), e) : (e[r.name] = [t, r.value], e);
237
- }, zr = "", Gr = `
277
+ }, Gr = "", Wr = `
238
278
  `, V = class {
239
279
  /**
240
280
  * Helper object to format and aggragate lines of code.
241
281
  * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
242
282
  */
243
283
  constructor({ indent: e, join: r } = {}) {
244
- this.postProcessors = [], this.code = [], this.indentationCharacter = zr, this.lineJoin = Gr, this.indentLine = (t, o = 0) => `${this.indentationCharacter.repeat(o)}${t}`, this.unshift = (t, o) => {
284
+ this.postProcessors = [], this.code = [], this.indentationCharacter = Gr, this.lineJoin = Wr, this.indentLine = (t, o = 0) => `${this.indentationCharacter.repeat(o)}${t}`, this.unshift = (t, o) => {
245
285
  const i = this.indentLine(t, o);
246
286
  this.code.unshift(i);
247
287
  }, this.push = (t, o) => {
@@ -251,36 +291,36 @@ var Mr = (e, r) => {
251
291
  this.code.push("");
252
292
  }, this.join = () => {
253
293
  const t = this.code.join(this.lineJoin);
254
- return this.postProcessors.reduce((i, l) => l(i), t);
294
+ return this.postProcessors.reduce((i, s) => s(i), t);
255
295
  }, this.addPostProcessor = (t) => {
256
296
  this.postProcessors = [...this.postProcessors, t];
257
- }, this.indentationCharacter = e || zr, this.lineJoin = r ?? Gr;
297
+ }, this.indentationCharacter = e || Gr, this.lineJoin = r ?? Wr;
258
298
  }
259
- }, yt, Wr;
260
- function Aa() {
261
- return Wr || (Wr = 1, yt = function(e) {
299
+ }, yt, Jr;
300
+ function Fa() {
301
+ return Jr || (Jr = 1, yt = function(e) {
262
302
  return Object.prototype.toString.call(e) === "[object RegExp]";
263
303
  }), yt;
264
304
  }
265
- var mt, Jr;
266
- function Ia() {
267
- return Jr || (Jr = 1, mt = function(e) {
305
+ var mt, Vr;
306
+ function _a() {
307
+ return Vr || (Vr = 1, mt = function(e) {
268
308
  var r = typeof e;
269
309
  return e !== null && (r === "object" || r === "function");
270
310
  }), mt;
271
311
  }
272
- var Ke = {}, Vr;
273
- function La() {
274
- return Vr || (Vr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Ke;
312
+ var Qe = {}, Dr;
313
+ function Ba() {
314
+ return Dr || (Dr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 }), Qe.default = (e) => Object.getOwnPropertySymbols(e).filter((r) => Object.prototype.propertyIsEnumerable.call(e, r))), Qe;
275
315
  }
276
- var gt, Dr;
277
- function Ua() {
278
- if (Dr) return gt;
279
- Dr = 1;
280
- const e = Aa(), r = Ia(), t = La().default;
281
- return gt = (o, i, l) => {
316
+ var gt, Qr;
317
+ function Ha() {
318
+ if (Qr) return gt;
319
+ Qr = 1;
320
+ const e = Fa(), r = _a(), t = Ba().default;
321
+ return gt = (o, i, s) => {
282
322
  const n = [];
283
- return function a(s, c, f) {
323
+ return function a(l, c, f) {
284
324
  c = c || {}, c.indent = c.indent || " ", f = f || "";
285
325
  let g;
286
326
  c.inlineCharacterLimit === void 0 ? g = {
@@ -303,48 +343,48 @@ function Ua() {
303
343
  return j.length <= c.inlineCharacterLimit ? j : m.replace(new RegExp(g.newLine + "|" + g.newLineOrSpace, "g"), `
304
344
  `).replace(new RegExp(g.pad, "g"), f).replace(new RegExp(g.indent, "g"), f + c.indent);
305
345
  };
306
- if (n.indexOf(s) !== -1)
346
+ if (n.indexOf(l) !== -1)
307
347
  return '"[Circular]"';
308
- if (s == null || typeof s == "number" || typeof s == "boolean" || typeof s == "function" || typeof s == "symbol" || e(s))
309
- return String(s);
310
- if (s instanceof Date)
311
- return `new Date('${s.toISOString()}')`;
312
- if (Array.isArray(s)) {
313
- if (s.length === 0)
348
+ if (l == null || typeof l == "number" || typeof l == "boolean" || typeof l == "function" || typeof l == "symbol" || e(l))
349
+ return String(l);
350
+ if (l instanceof Date)
351
+ return `new Date('${l.toISOString()}')`;
352
+ if (Array.isArray(l)) {
353
+ if (l.length === 0)
314
354
  return "[]";
315
- n.push(s);
316
- const m = "[" + g.newLine + s.map((j, v) => {
317
- const p = s.length - 1 === v ? g.newLine : "," + g.newLineOrSpace;
355
+ n.push(l);
356
+ const m = "[" + g.newLine + l.map((j, v) => {
357
+ const p = l.length - 1 === v ? g.newLine : "," + g.newLineOrSpace;
318
358
  let h = a(j, c, f + c.indent);
319
- return c.transform && (h = c.transform(s, v, h)), g.indent + h + p;
359
+ return c.transform && (h = c.transform(l, v, h)), g.indent + h + p;
320
360
  }).join("") + g.pad + "]";
321
361
  return n.pop(), b(m);
322
362
  }
323
- if (r(s)) {
324
- let m = Object.keys(s).concat(t(s));
325
- if (c.filter && (m = m.filter((v) => c.filter(s, v))), m.length === 0)
363
+ if (r(l)) {
364
+ let m = Object.keys(l).concat(t(l));
365
+ if (c.filter && (m = m.filter((v) => c.filter(l, v))), m.length === 0)
326
366
  return "{}";
327
- n.push(s);
367
+ n.push(l);
328
368
  const j = "{" + g.newLine + m.map((v, p) => {
329
369
  const h = m.length - 1 === p ? g.newLine : "," + g.newLineOrSpace, y = typeof v == "symbol", S = !y && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = y || S ? v : a(v, c);
330
- let d = a(s[v], c, f + c.indent);
331
- return c.transform && (d = c.transform(s, v, d)), g.indent + String(T) + ": " + d + h;
370
+ let d = a(l[v], c, f + c.indent);
371
+ return c.transform && (d = c.transform(l, v, d)), g.indent + String(T) + ": " + d + h;
332
372
  }).join("") + g.pad + "}";
333
373
  return n.pop(), b(j);
334
374
  }
335
- return s = String(s).replace(/[\r\n]/g, (m) => m === `
336
- ` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (s = s.replace(/"/g, '\\"'), `"${s}"`) : (s = s.replace(/\\?'/g, "\\'"), `'${s}'`);
337
- }(o, i, l);
375
+ return l = String(l).replace(/[\r\n]/g, (m) => m === `
376
+ ` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (l = l.replace(/"/g, '\\"'), `"${l}"`) : (l = l.replace(/\\?'/g, "\\'"), `'${l}'`);
377
+ }(o, i, s);
338
378
  }, gt;
339
379
  }
340
- var Fa = Ua();
341
- const fe = /* @__PURE__ */ ja(Fa);
342
- function Me(e, r = {}) {
380
+ var Ma = Ha();
381
+ const fe = /* @__PURE__ */ wa(Ma);
382
+ function He(e, r = {}) {
343
383
  const { delimiter: t = '"', escapeChar: o = "\\", escapeNewlines: i = !0 } = r;
344
384
  return [...e.toString()].map((n) => n === "\b" ? `${o}b` : n === " " ? `${o}t` : n === `
345
385
  ` ? i ? `${o}n` : n : n === "\f" ? `${o}f` : n === "\r" ? i ? `${o}r` : n : n === o ? o + o : n === t ? o + t : n < " " || n > "~" ? JSON.stringify(n).slice(1, -1) : n).join("");
346
386
  }
347
- var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' }), _a = {
387
+ var Me = (e) => He(e, { delimiter: "'" }), ce = (e) => He(e, { delimiter: '"' }), za = {
348
388
  info: {
349
389
  key: "libcurl",
350
390
  title: "Libcurl",
@@ -353,14 +393,14 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
353
393
  extname: ".c"
354
394
  },
355
395
  convert: ({ method: e, fullUrl: r, headersObj: t, allHeaders: o, postData: i }) => {
356
- const { push: l, blank: n, join: a } = new V();
357
- l("CURL *hnd = curl_easy_init();"), n(), l(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), l("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), l(`curl_easy_setopt(hnd, CURLOPT_URL, "${r}");`);
358
- const s = Object.keys(t);
359
- return s.length && (n(), l("struct curl_slist *headers = NULL;"), s.forEach((c) => {
360
- l(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
361
- }), l("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), l(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), i.text && (n(), l(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(i.text)});`)), n(), l("CURLcode ret = curl_easy_perform(hnd);"), a();
396
+ const { push: s, blank: n, join: a } = new V();
397
+ s("CURL *hnd = curl_easy_init();"), n(), s(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), s("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), s(`curl_easy_setopt(hnd, CURLOPT_URL, "${r}");`);
398
+ const l = Object.keys(t);
399
+ return l.length && (n(), s("struct curl_slist *headers = NULL;"), l.forEach((c) => {
400
+ s(`headers = curl_slist_append(headers, "${c}: ${ce(t[c])}");`);
401
+ }), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), o.cookie && (n(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${o.cookie}");`)), i.text && (n(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(i.text)});`)), n(), s("CURLcode ret = curl_easy_perform(hnd);"), a();
362
402
  }
363
- }, Ba = {
403
+ }, Ga = {
364
404
  info: {
365
405
  key: "c",
366
406
  title: "C",
@@ -368,30 +408,30 @@ var ze = (e) => Me(e, { delimiter: "'" }), ce = (e) => Me(e, { delimiter: '"' })
368
408
  cli: "c"
369
409
  },
370
410
  clientsById: {
371
- libcurl: _a
411
+ libcurl: za
372
412
  }
373
413
  }, pe = (e, r) => Object.keys(e).find((t) => t.toLowerCase() === r.toLowerCase()), ve = (e, r) => {
374
414
  const t = pe(e, r);
375
415
  if (t)
376
416
  return e[t];
377
- }, nt = (e, r) => !!pe(e, r), Ha = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
417
+ }, nt = (e, r) => !!pe(e, r), Wa = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
378
418
  (r) => e.indexOf(r) > -1
379
- ), Qr = class {
419
+ ), Kr = class {
380
420
  constructor(e) {
381
421
  this.name = "", this.toString = () => `:${this.name}`, this.name = e;
382
422
  }
383
- }, Ma = class {
423
+ }, Ja = class {
384
424
  constructor(e) {
385
425
  this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
386
426
  }
387
- }, mo = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), go = (e) => e === void 0 ? !0 : mo(e) === "object" ? Object.keys(e).length === 0 : !1, Kr = (e) => (Object.keys(e).filter((r) => go(e[r])).forEach((r) => {
427
+ }, go = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), vo = (e) => e === void 0 ? !0 : go(e) === "object" ? Object.keys(e).length === 0 : !1, Yr = (e) => (Object.keys(e).filter((r) => vo(e[r])).forEach((r) => {
388
428
  delete e[r];
389
- }), e), Xe = (e, r) => {
429
+ }), e), Ye = (e, r) => {
390
430
  const t = " ".repeat(e);
391
431
  return r.replace(/\n/g, `
392
432
  ${t}`);
393
- }, vr = (e) => {
394
- switch (mo(e)) {
433
+ }, br = (e) => {
434
+ switch (go(e)) {
395
435
  case "string":
396
436
  return `"${e.replace(/"/g, '\\"')}"`;
397
437
  case "file":
@@ -404,20 +444,20 @@ ${t}`);
404
444
  return `#"${e.source}"`;
405
445
  case "object": {
406
446
  const r = Object.keys(e).reduce((t, o) => {
407
- const i = Xe(o.length + 2, vr(e[o]));
447
+ const i = Ye(o.length + 2, br(e[o]));
408
448
  return `${t}:${o} ${i}
409
449
  `;
410
450
  }, "").trim();
411
- return `{${Xe(1, r)}}`;
451
+ return `{${Ye(1, r)}}`;
412
452
  }
413
453
  case "array": {
414
- const r = e.reduce((t, o) => `${t} ${vr(o)}`, "").trim();
415
- return `[${Xe(1, r)}]`;
454
+ const r = e.reduce((t, o) => `${t} ${br(o)}`, "").trim();
455
+ return `[${Ye(1, r)}]`;
416
456
  }
417
457
  default:
418
458
  return e.toString();
419
459
  }
420
- }, za = {
460
+ }, Va = {
421
461
  info: {
422
462
  key: "clj_http",
423
463
  title: "clj-http",
@@ -425,9 +465,9 @@ ${t}`);
425
465
  description: "An idiomatic clojure http client wrapping the apache client.",
426
466
  extname: ".clj"
427
467
  },
428
- convert: ({ queryObj: e, method: r, postData: t, url: o, allHeaders: i }, l) => {
429
- const { push: n, join: a } = new V({ indent: l == null ? void 0 : l.indent }), s = ["get", "post", "put", "delete", "patch", "head", "options"];
430
- if (r = r.toLowerCase(), !s.includes(r))
468
+ convert: ({ queryObj: e, method: r, postData: t, url: o, allHeaders: i }, s) => {
469
+ const { push: n, join: a } = new V({ indent: s == null ? void 0 : s.indent }), l = ["get", "post", "put", "delete", "patch", "head", "options"];
470
+ if (r = r.toLowerCase(), !l.includes(r))
431
471
  return n("Method not supported"), a();
432
472
  const c = {
433
473
  headers: i,
@@ -436,7 +476,7 @@ ${t}`);
436
476
  switch (t.mimeType) {
437
477
  case "application/json":
438
478
  {
439
- c["content-type"] = new Qr("json"), c["form-params"] = t.jsonObj;
479
+ c["content-type"] = new Kr("json"), c["form-params"] = t.jsonObj;
440
480
  const f = pe(c.headers, "content-type");
441
481
  f && delete c.headers[f];
442
482
  }
@@ -459,7 +499,7 @@ ${t}`);
459
499
  if (t.params) {
460
500
  c.multipart = t.params.map((g) => g.fileName && !g.value ? {
461
501
  name: g.name,
462
- content: new Ma(g.fileName)
502
+ content: new Ja(g.fileName)
463
503
  } : {
464
504
  name: g.name,
465
505
  content: g.value
@@ -473,31 +513,31 @@ ${t}`);
473
513
  switch (ve(c.headers, "accept")) {
474
514
  case "application/json":
475
515
  {
476
- c.accept = new Qr("json");
516
+ c.accept = new Kr("json");
477
517
  const f = pe(c.headers, "accept");
478
518
  f && delete c.headers[f];
479
519
  }
480
520
  break;
481
521
  }
482
522
  if (n(`(require '[clj-http.client :as client])
483
- `), go(Kr(c)))
523
+ `), vo(Yr(c)))
484
524
  n(`(client/${r} "${o}")`);
485
525
  else {
486
- const f = 11 + r.length + o.length, g = Xe(f, vr(Kr(c)));
526
+ const f = 11 + r.length + o.length, g = Ye(f, br(Yr(c)));
487
527
  n(`(client/${r} "${o}" ${g})`);
488
528
  }
489
529
  return a();
490
530
  }
491
- }, Ga = {
531
+ }, Da = {
492
532
  info: {
493
533
  key: "clojure",
494
534
  title: "Clojure",
495
535
  default: "clj_http"
496
536
  },
497
537
  clientsById: {
498
- clj_http: za
538
+ clj_http: Va
499
539
  }
500
- }, Wa = (e) => {
540
+ }, Qa = (e) => {
501
541
  let r = ve(e, "accept-encoding");
502
542
  if (!r)
503
543
  return [];
@@ -506,15 +546,15 @@ ${t}`);
506
546
  deflate: "DecompressionMethods.Deflate"
507
547
  }, o = [];
508
548
  return typeof r == "string" && (r = [r]), r.forEach((i) => {
509
- i.split(",").forEach((l) => {
510
- const n = /\s*([^;\s]+)/.exec(l);
549
+ i.split(",").forEach((s) => {
550
+ const n = /\s*([^;\s]+)/.exec(s);
511
551
  if (n) {
512
552
  const a = t[n[1]];
513
553
  a && o.push(a);
514
554
  }
515
555
  });
516
556
  }), o;
517
- }, Ja = {
557
+ }, Ka = {
518
558
  info: {
519
559
  key: "httpclient",
520
560
  title: "HttpClient",
@@ -524,14 +564,14 @@ ${t}`);
524
564
  },
525
565
  convert: ({ allHeaders: e, postData: r, method: t, fullUrl: o }, i) => {
526
566
  var m, j;
527
- const l = {
567
+ const s = {
528
568
  indent: " ",
529
569
  ...i
530
- }, { push: n, join: a } = new V({ indent: l.indent });
570
+ }, { push: n, join: a } = new V({ indent: s.indent });
531
571
  n("using System.Net.Http.Headers;");
532
- let s = "";
533
- const c = !!e.cookie, f = Wa(e);
534
- (c || f.length) && (s = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), f.length && n(`AutomaticDecompression = ${f.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${s});`), n("var request = new HttpRequestMessage"), n("{");
572
+ let l = "";
573
+ const c = !!e.cookie, f = Qa(e);
574
+ (c || f.length) && (l = "clientHandler", n("var clientHandler = new HttpClientHandler"), n("{"), c && n("UseCookies = false,", 1), f.length && n(`AutomaticDecompression = ${f.join(" | ")},`, 1), n("};")), n(`var client = new HttpClient(${l});`), n("var request = new HttpRequestMessage"), n("{");
535
575
  const g = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
536
576
  t = t.toUpperCase(), t && g.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, n(`Method = ${t},`, 1), n(`RequestUri = new Uri("${o}"),`, 1);
537
577
  const b = Object.keys(e).filter((v) => {
@@ -567,10 +607,10 @@ ${t}`);
567
607
  return n("};"), n("using (var response = await client.SendAsync(request))"), n("{"), n("response.EnsureSuccessStatusCode();", 1), n("var body = await response.Content.ReadAsStringAsync();", 1), n("Console.WriteLine(body);", 1), n("}"), a();
568
608
  }
569
609
  };
570
- function Va(e) {
610
+ function Ya(e) {
571
611
  return e[0].toUpperCase() + e.slice(1).toLowerCase();
572
612
  }
573
- var Da = {
613
+ var Xa = {
574
614
  info: {
575
615
  key: "restsharp",
576
616
  title: "RestSharp",
@@ -579,7 +619,7 @@ var Da = {
579
619
  extname: ".cs",
580
620
  installation: "dotnet add package RestSharp"
581
621
  },
582
- convert: ({ method: e, fullUrl: r, headersObj: t, cookies: o, postData: i, uriObj: l }) => {
622
+ convert: ({ method: e, fullUrl: r, headersObj: t, cookies: o, postData: i, uriObj: s }) => {
583
623
  const { push: n, join: a } = new V();
584
624
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
585
625
  e.toUpperCase()
@@ -596,7 +636,7 @@ var Da = {
596
636
  }
597
637
  n(`request.AddHeader("${f}", "${ce(t[f])}");`);
598
638
  }), o.forEach(({ name: f, value: g }) => {
599
- n(`request.AddCookie("${f}", "${ce(g)}", "${l.pathname}", "${l.host}");`);
639
+ n(`request.AddCookie("${f}", "${ce(g)}", "${s.pathname}", "${s.host}");`);
600
640
  }), i.mimeType) {
601
641
  case "multipart/form-data":
602
642
  if (!i.params) break;
@@ -620,11 +660,11 @@ var Da = {
620
660
  if (!i.text) break;
621
661
  n(`request.AddStringBody("${i.text}", "${i.mimeType}");`);
622
662
  }
623
- return n(`var response = await client.${Va(e)}Async(request);
663
+ return n(`var response = await client.${Ya(e)}Async(request);
624
664
  `), n(`Console.WriteLine("{0}", response.Content);
625
665
  `), a();
626
666
  }
627
- }, Qa = {
667
+ }, Za = {
628
668
  info: {
629
669
  key: "csharp",
630
670
  title: "C#",
@@ -632,10 +672,10 @@ var Da = {
632
672
  cli: "dotnet"
633
673
  },
634
674
  clientsById: {
635
- httpclient: Ja,
636
- restsharp: Da
675
+ httpclient: Ka,
676
+ restsharp: Xa
637
677
  }
638
- }, Ka = {
678
+ }, ei = {
639
679
  info: {
640
680
  key: "native",
641
681
  title: "NewRequest",
@@ -644,16 +684,16 @@ var Da = {
644
684
  extname: ".go"
645
685
  },
646
686
  convert: ({ postData: e, method: r, allHeaders: t, fullUrl: o }, i = {}) => {
647
- const { blank: l, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: s = !0, checkErrors: c = !1, printBody: f = !0, timeout: g = -1 } = i, b = c ? "err" : "_", m = s ? 1 : 0, j = () => {
687
+ const { blank: s, push: n, join: a } = new V({ indent: " " }), { showBoilerplate: l = !0, checkErrors: c = !1, printBody: f = !0, timeout: g = -1 } = i, b = c ? "err" : "_", m = l ? 1 : 0, j = () => {
648
688
  c && (n("if err != nil {", m), n("panic(err)", m + 1), n("}", m));
649
689
  };
650
- s && (n("package main"), l(), n("import ("), n('"fmt"', m), g > 0 && n('"time"', m), e.text && n('"strings"', m), n('"net/http"', m), f && n('"io"', m), n(")"), l(), n("func main() {"), l());
690
+ l && (n("package main"), s(), n("import ("), n('"fmt"', m), g > 0 && n('"time"', m), e.text && n('"strings"', m), n('"net/http"', m), f && n('"io"', m), n(")"), s(), n("func main() {"), s());
651
691
  const v = g > 0, p = v, h = p ? "client" : "http.DefaultClient";
652
- return p && (n("client := http.Client{", m), v && n(`Timeout: time.Duration(${g} * time.Second),`, m + 1), n("}", m), l()), n(`url := "${o}"`, m), l(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), l(), n(`req, ${b} := http.NewRequest("${r}", url, payload)`, m), l()) : (n(`req, ${b} := http.NewRequest("${r}", url, nil)`, m), l()), j(), Object.keys(t).length && (Object.keys(t).forEach((y) => {
692
+ return p && (n("client := http.Client{", m), v && n(`Timeout: time.Duration(${g} * time.Second),`, m + 1), n("}", m), s()), n(`url := "${o}"`, m), s(), e.text ? (n(`payload := strings.NewReader(${JSON.stringify(e.text)})`, m), s(), n(`req, ${b} := http.NewRequest("${r}", url, payload)`, m), s()) : (n(`req, ${b} := http.NewRequest("${r}", url, nil)`, m), s()), j(), Object.keys(t).length && (Object.keys(t).forEach((y) => {
653
693
  n(`req.Header.Add("${y}", "${ce(t[y])}")`, m);
654
- }), l()), n(`res, ${b} := ${h}.Do(req)`, m), j(), f && (l(), n("defer res.Body.Close()", m), n(`body, ${b} := io.ReadAll(res.Body)`, m), j()), l(), f && n("fmt.Println(string(body))", m), s && (l(), n("}")), a();
694
+ }), s()), n(`res, ${b} := ${h}.Do(req)`, m), j(), f && (s(), n("defer res.Body.Close()", m), n(`body, ${b} := io.ReadAll(res.Body)`, m), j()), s(), f && n("fmt.Println(string(body))", m), l && (s(), n("}")), a();
655
695
  }
656
- }, Ya = {
696
+ }, ti = {
657
697
  info: {
658
698
  key: "go",
659
699
  title: "Go",
@@ -661,10 +701,10 @@ var Da = {
661
701
  cli: "go"
662
702
  },
663
703
  clientsById: {
664
- native: Ka
704
+ native: ei
665
705
  }
666
- }, Yr = `\r
667
- `, Xa = {
706
+ }, Xr = `\r
707
+ `, ri = {
668
708
  info: {
669
709
  key: "http1.1",
670
710
  title: "HTTP/1.1",
@@ -672,36 +712,36 @@ var Da = {
672
712
  description: "HTTP/1.1 request string in accordance with RFC 7230",
673
713
  extname: null
674
714
  },
675
- convert: ({ method: e, fullUrl: r, uriObj: t, httpVersion: o, allHeaders: i, postData: l }, n) => {
715
+ convert: ({ method: e, fullUrl: r, uriObj: t, httpVersion: o, allHeaders: i, postData: s }, n) => {
676
716
  const a = {
677
717
  absoluteURI: !1,
678
718
  autoContentLength: !0,
679
719
  autoHost: !0,
680
720
  ...n
681
- }, { blank: s, push: c, join: f } = new V({ indent: "", join: Yr }), g = a.absoluteURI ? r : t.path;
721
+ }, { blank: l, push: c, join: f } = new V({ indent: "", join: Xr }), g = a.absoluteURI ? r : t.path;
682
722
  c(`${e} ${g} ${o}`);
683
723
  const b = Object.keys(i);
684
724
  if (b.forEach((v) => {
685
725
  const p = v.toLowerCase().replace(/(^|-)(\w)/g, (h) => h.toUpperCase());
686
726
  c(`${p}: ${i[v]}`);
687
- }), a.autoHost && !b.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && l.text && !b.includes("content-length")) {
688
- const p = new TextEncoder().encode(l.text).length.toString();
727
+ }), a.autoHost && !b.includes("host") && c(`Host: ${t.host}`), a.autoContentLength && s.text && !b.includes("content-length")) {
728
+ const p = new TextEncoder().encode(s.text).length.toString();
689
729
  c(`Content-Length: ${p}`);
690
730
  }
691
- s();
692
- const m = f(), j = l.text || "";
693
- return `${m}${Yr}${j}`;
731
+ l();
732
+ const m = f(), j = s.text || "";
733
+ return `${m}${Xr}${j}`;
694
734
  }
695
- }, Za = {
735
+ }, ni = {
696
736
  info: {
697
737
  key: "http",
698
738
  title: "HTTP",
699
739
  default: "http1.1"
700
740
  },
701
741
  clientsById: {
702
- "http1.1": Xa
742
+ "http1.1": ri
703
743
  }
704
- }, ei = {
744
+ }, oi = {
705
745
  info: {
706
746
  key: "asynchttp",
707
747
  title: "AsyncHttp",
@@ -710,15 +750,15 @@ var Da = {
710
750
  extname: ".java"
711
751
  },
712
752
  convert: ({ method: e, allHeaders: r, postData: t, fullUrl: o }, i) => {
713
- const l = {
753
+ const s = {
714
754
  indent: " ",
715
755
  ...i
716
- }, { blank: n, push: a, join: s } = new V({ indent: l.indent });
756
+ }, { blank: n, push: a, join: l } = new V({ indent: s.indent });
717
757
  return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${e.toUpperCase()}", "${o}")`), Object.keys(r).forEach((c) => {
718
758
  a(`.setHeader("${c}", "${ce(r[c])}")`, 1);
719
- }), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), s();
759
+ }), t.text && a(`.setBody(${JSON.stringify(t.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), n(), a("client.close();"), l();
720
760
  }
721
- }, ti = {
761
+ }, ai = {
722
762
  info: {
723
763
  key: "nethttp",
724
764
  title: "java.net.http",
@@ -727,12 +767,12 @@ var Da = {
727
767
  extname: ".java"
728
768
  },
729
769
  convert: ({ allHeaders: e, fullUrl: r, method: t, postData: o }, i) => {
730
- const l = {
770
+ const s = {
731
771
  indent: " ",
732
772
  ...i
733
- }, { push: n, join: a } = new V({ indent: l.indent });
734
- return n("HttpRequest request = HttpRequest.newBuilder()"), n(`.uri(URI.create("${r}"))`, 2), Object.keys(e).forEach((s) => {
735
- n(`.header("${s}", "${ce(e[s])}")`, 2);
773
+ }, { push: n, join: a } = new V({ indent: s.indent });
774
+ return n("HttpRequest request = HttpRequest.newBuilder()"), n(`.uri(URI.create("${r}"))`, 2), Object.keys(e).forEach((l) => {
775
+ n(`.header("${l}", "${ce(e[l])}")`, 2);
736
776
  }), o.text ? n(
737
777
  `.method("${t.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(o.text)}))`,
738
778
  2
@@ -740,7 +780,7 @@ var Da = {
740
780
  "HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
741
781
  ), n("System.out.println(response.body());"), a();
742
782
  }
743
- }, ri = {
783
+ }, ii = {
744
784
  info: {
745
785
  key: "okhttp",
746
786
  title: "OkHttp",
@@ -749,15 +789,15 @@ var Da = {
749
789
  extname: ".java"
750
790
  },
751
791
  convert: ({ postData: e, method: r, fullUrl: t, allHeaders: o }, i) => {
752
- const l = {
792
+ const s = {
753
793
  indent: " ",
754
794
  ...i
755
- }, { push: n, blank: a, join: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], f = ["POST", "PUT", "DELETE", "PATCH"];
795
+ }, { push: n, blank: a, join: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], f = ["POST", "PUT", "DELETE", "PATCH"];
756
796
  return n("OkHttpClient client = new OkHttpClient();"), a(), e.text && (e.boundary ? n(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : n(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), n(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), n("Request request = new Request.Builder()"), n(`.url("${t}")`, 1), c.includes(r.toUpperCase()) ? f.includes(r.toUpperCase()) ? e.text ? n(`.${r.toLowerCase()}(body)`, 1) : n(`.${r.toLowerCase()}(null)`, 1) : n(`.${r.toLowerCase()}()`, 1) : e.text ? n(`.method("${r.toUpperCase()}", body)`, 1) : n(`.method("${r.toUpperCase()}", null)`, 1), Object.keys(o).forEach((g) => {
757
797
  n(`.addHeader("${g}", "${ce(o[g])}")`, 1);
758
- }), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), s();
798
+ }), n(".build();", 1), a(), n("Response response = client.newCall(request).execute();"), l();
759
799
  }
760
- }, ni = {
800
+ }, si = {
761
801
  info: {
762
802
  key: "unirest",
763
803
  title: "Unirest",
@@ -766,27 +806,27 @@ var Da = {
766
806
  extname: ".java"
767
807
  },
768
808
  convert: ({ method: e, allHeaders: r, postData: t, fullUrl: o }, i) => {
769
- const l = {
809
+ const s = {
770
810
  indent: " ",
771
811
  ...i
772
- }, { join: n, push: a } = new V({ indent: l.indent });
812
+ }, { join: n, push: a } = new V({ indent: s.indent });
773
813
  return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${o}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${o}")`), Object.keys(r).forEach((c) => {
774
814
  a(`.header("${c}", "${ce(r[c])}")`, 1);
775
815
  }), t.text && a(`.body(${JSON.stringify(t.text)})`, 1), a(".asString();", 1), n();
776
816
  }
777
- }, oi = {
817
+ }, li = {
778
818
  info: {
779
819
  key: "java",
780
820
  title: "Java",
781
821
  default: "unirest"
782
822
  },
783
823
  clientsById: {
784
- asynchttp: ei,
785
- nethttp: ti,
786
- okhttp: ri,
787
- unirest: ni
824
+ asynchttp: oi,
825
+ nethttp: ai,
826
+ okhttp: ii,
827
+ unirest: si
788
828
  }
789
- }, ai = {
829
+ }, ci = {
790
830
  info: {
791
831
  key: "axios",
792
832
  title: "Axios",
@@ -795,20 +835,20 @@ var Da = {
795
835
  extname: ".js",
796
836
  installation: "npm install axios --save"
797
837
  },
798
- convert: ({ allHeaders: e, method: r, url: t, queryObj: o, postData: i }, l) => {
838
+ convert: ({ allHeaders: e, method: r, url: t, queryObj: o, postData: i }, s) => {
799
839
  const n = {
800
840
  indent: " ",
801
- ...l
802
- }, { blank: a, push: s, join: c, addPostProcessor: f } = new V({ indent: n.indent });
803
- s("import axios from 'axios';"), a();
841
+ ...s
842
+ }, { blank: a, push: l, join: c, addPostProcessor: f } = new V({ indent: n.indent });
843
+ l("import axios from 'axios';"), a();
804
844
  const g = {
805
845
  method: r,
806
846
  url: t
807
847
  };
808
848
  switch (Object.keys(o).length && (g.params = o), Object.keys(e).length && (g.headers = e), i.mimeType) {
809
849
  case "application/x-www-form-urlencoded":
810
- i.params && (s("const encodedParams = new URLSearchParams();"), i.params.forEach((m) => {
811
- s(`encodedParams.set('${m.name}', '${m.value}');`);
850
+ i.params && (l("const encodedParams = new URLSearchParams();"), i.params.forEach((m) => {
851
+ l(`encodedParams.set('${m.name}', '${m.value}');`);
812
852
  }), a(), g.data = "encodedParams,", f((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
813
853
  break;
814
854
  case "application/json":
@@ -817,8 +857,8 @@ var Da = {
817
857
  case "multipart/form-data":
818
858
  if (!i.params)
819
859
  break;
820
- s("const form = new FormData();"), i.params.forEach((m) => {
821
- s(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
860
+ l("const form = new FormData();"), i.params.forEach((m) => {
861
+ l(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
822
862
  }), a(), g.data = "[form]";
823
863
  break;
824
864
  default:
@@ -828,9 +868,9 @@ var Da = {
828
868
  indent: " ",
829
869
  inlineCharacterLimit: 80
830
870
  }).replace('"[form]"', "form");
831
- return s(`const options = ${b};`), a(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), c();
871
+ return l(`const options = ${b};`), a(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), c();
832
872
  }
833
- }, ii = {
873
+ }, ui = {
834
874
  info: {
835
875
  key: "fetch",
836
876
  title: "fetch",
@@ -839,14 +879,14 @@ var Da = {
839
879
  extname: ".js"
840
880
  },
841
881
  convert: ({ method: e, allHeaders: r, postData: t, fullUrl: o }, i) => {
842
- const l = {
882
+ const s = {
843
883
  indent: " ",
844
884
  credentials: null,
845
885
  ...i
846
- }, { blank: n, join: a, push: s } = new V({ indent: l.indent }), c = {
886
+ }, { blank: n, join: a, push: l } = new V({ indent: s.indent }), c = {
847
887
  method: e
848
888
  };
849
- switch (Object.keys(r).length && (c.headers = r), l.credentials !== null && (c.credentials = l.credentials), t.mimeType) {
889
+ switch (Object.keys(r).length && (c.headers = r), s.credentials !== null && (c.credentials = s.credentials), t.mimeType) {
850
890
  case "application/x-www-form-urlencoded":
851
891
  c.body = t.paramsObj ? t.paramsObj : t.text;
852
892
  break;
@@ -857,16 +897,16 @@ var Da = {
857
897
  if (!t.params)
858
898
  break;
859
899
  const f = pe(r, "content-type");
860
- f && delete r[f], s("const form = new FormData();"), t.params.forEach((g) => {
861
- s(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
900
+ f && delete r[f], l("const form = new FormData();"), t.params.forEach((g) => {
901
+ l(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
862
902
  }), n();
863
903
  break;
864
904
  default:
865
905
  t.text && (c.body = t.text);
866
906
  }
867
- return c.headers && !Object.keys(c.headers).length && delete c.headers, s(
907
+ return c.headers && !Object.keys(c.headers).length && delete c.headers, l(
868
908
  `const options = ${fe(c, {
869
- indent: l.indent,
909
+ indent: s.indent,
870
910
  inlineCharacterLimit: 80,
871
911
  // The Fetch API body only accepts string parameters, but stringified JSON can be difficult
872
912
  // to read, so we keep the object as a literal and use this transform function to wrap the
@@ -881,9 +921,9 @@ var Da = {
881
921
  return b;
882
922
  }
883
923
  })};`
884
- ), n(), t.params && t.mimeType === "multipart/form-data" && (s("options.body = form;"), n()), s(`fetch('${o}', options)`), s(".then(response => response.json())", 1), s(".then(response => console.log(response))", 1), s(".catch(err => console.error(err));", 1), a();
924
+ ), n(), t.params && t.mimeType === "multipart/form-data" && (l("options.body = form;"), n()), l(`fetch('${o}', options)`), l(".then(response => response.json())", 1), l(".then(response => console.log(response))", 1), l(".catch(err => console.error(err));", 1), a();
885
925
  }
886
- }, si = {
926
+ }, fi = {
887
927
  info: {
888
928
  key: "jquery",
889
929
  title: "jQuery",
@@ -893,10 +933,10 @@ var Da = {
893
933
  },
894
934
  convert: ({ fullUrl: e, method: r, allHeaders: t, postData: o }, i) => {
895
935
  var g;
896
- const l = {
936
+ const s = {
897
937
  indent: " ",
898
938
  ...i
899
- }, { blank: n, push: a, join: s } = new V({ indent: l.indent }), c = {
939
+ }, { blank: n, push: a, join: l } = new V({ indent: s.indent }), c = {
900
940
  async: !0,
901
941
  crossDomain: !0,
902
942
  url: e,
@@ -924,10 +964,10 @@ var Da = {
924
964
  default:
925
965
  o.text && (c.data = o.text);
926
966
  }
927
- const f = fe(c, { indent: l.indent }).replace("'[form]'", "form");
928
- return a(`const settings = ${f};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), s();
967
+ const f = fe(c, { indent: s.indent }).replace("'[form]'", "form");
968
+ return a(`const settings = ${f};`), n(), a("$.ajax(settings).done(function (response) {"), a("console.log(response);", 1), a("});"), l();
929
969
  }
930
- }, li = {
970
+ }, pi = {
931
971
  info: {
932
972
  key: "xhr",
933
973
  title: "XMLHttpRequest",
@@ -937,16 +977,16 @@ var Da = {
937
977
  },
938
978
  convert: ({ postData: e, allHeaders: r, method: t, fullUrl: o }, i) => {
939
979
  var c;
940
- const l = {
980
+ const s = {
941
981
  indent: " ",
942
982
  cors: !0,
943
983
  ...i
944
- }, { blank: n, push: a, join: s } = new V({ indent: l.indent });
984
+ }, { blank: n, push: a, join: l } = new V({ indent: s.indent });
945
985
  switch (e.mimeType) {
946
986
  case "application/json":
947
987
  a(
948
988
  `const data = JSON.stringify(${fe(e.jsonObj, {
949
- indent: l.indent
989
+ indent: s.indent
950
990
  })});`
951
991
  ), n();
952
992
  break;
@@ -964,23 +1004,23 @@ var Da = {
964
1004
  default:
965
1005
  a(`const data = ${e.text ? `'${e.text}'` : "null"};`), n();
966
1006
  }
967
- return a("const xhr = new XMLHttpRequest();"), l.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((f) => {
968
- a(`xhr.setRequestHeader('${f}', '${ze(r[f])}');`);
969
- }), n(), a("xhr.send(data);"), s();
1007
+ return a("const xhr = new XMLHttpRequest();"), s.cors && a("xhr.withCredentials = true;"), n(), a("xhr.addEventListener('readystatechange', function () {"), a("if (this.readyState === this.DONE) {", 1), a("console.log(this.responseText);", 2), a("}", 1), a("});"), n(), a(`xhr.open('${t}', '${o}');`), Object.keys(r).forEach((f) => {
1008
+ a(`xhr.setRequestHeader('${f}', '${Me(r[f])}');`);
1009
+ }), n(), a("xhr.send(data);"), l();
970
1010
  }
971
- }, ci = {
1011
+ }, di = {
972
1012
  info: {
973
1013
  key: "javascript",
974
1014
  title: "JavaScript",
975
1015
  default: "xhr"
976
1016
  },
977
1017
  clientsById: {
978
- xhr: li,
979
- axios: ai,
980
- fetch: ii,
981
- jquery: si
1018
+ xhr: pi,
1019
+ axios: ci,
1020
+ fetch: ui,
1021
+ jquery: fi
982
1022
  }
983
- }, ui = {
1023
+ }, hi = {
984
1024
  info: {
985
1025
  key: "native",
986
1026
  title: "Native JSON",
@@ -1005,8 +1045,8 @@ var Da = {
1005
1045
  if (!e.params)
1006
1046
  break;
1007
1047
  const i = {};
1008
- e.params.forEach((l) => {
1009
- i[l.name] = l.value;
1048
+ e.params.forEach((s) => {
1049
+ i[s.name] = s.value;
1010
1050
  }), o = i;
1011
1051
  break;
1012
1052
  default:
@@ -1014,16 +1054,16 @@ var Da = {
1014
1054
  }
1015
1055
  return typeof o > "u" || o === "" ? "No JSON body" : JSON.stringify(o, null, t.indent);
1016
1056
  }
1017
- }, fi = {
1057
+ }, yi = {
1018
1058
  info: {
1019
1059
  key: "json",
1020
1060
  title: "JSON",
1021
1061
  default: "native"
1022
1062
  },
1023
1063
  clientsById: {
1024
- native: ui
1064
+ native: hi
1025
1065
  }
1026
- }, pi = {
1066
+ }, mi = {
1027
1067
  info: {
1028
1068
  key: "okhttp",
1029
1069
  title: "OkHttp",
@@ -1032,24 +1072,24 @@ var Da = {
1032
1072
  extname: ".kt"
1033
1073
  },
1034
1074
  convert: ({ postData: e, fullUrl: r, method: t, allHeaders: o }, i) => {
1035
- const l = {
1075
+ const s = {
1036
1076
  indent: " ",
1037
1077
  ...i
1038
- }, { blank: n, join: a, push: s } = new V({ indent: l.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], f = ["POST", "PUT", "DELETE", "PATCH"];
1039
- return s("val client = OkHttpClient()"), n(), e.text && (e.boundary ? s(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : s(`val mediaType = MediaType.parse("${e.mimeType}")`), s(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), s("val request = Request.Builder()"), s(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ? f.includes(t.toUpperCase()) ? e.text ? s(`.${t.toLowerCase()}(body)`, 1) : s(`.${t.toLowerCase()}(null)`, 1) : s(`.${t.toLowerCase()}()`, 1) : e.text ? s(`.method("${t.toUpperCase()}", body)`, 1) : s(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((g) => {
1040
- s(`.addHeader("${g}", "${ce(o[g])}")`, 1);
1041
- }), s(".build()", 1), n(), s("val response = client.newCall(request).execute()"), a();
1078
+ }, { blank: n, join: a, push: l } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], f = ["POST", "PUT", "DELETE", "PATCH"];
1079
+ return l("val client = OkHttpClient()"), n(), e.text && (e.boundary ? l(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : l(`val mediaType = MediaType.parse("${e.mimeType}")`), l(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), l("val request = Request.Builder()"), l(`.url("${r}")`, 1), c.includes(t.toUpperCase()) ? f.includes(t.toUpperCase()) ? e.text ? l(`.${t.toLowerCase()}(body)`, 1) : l(`.${t.toLowerCase()}(null)`, 1) : l(`.${t.toLowerCase()}()`, 1) : e.text ? l(`.method("${t.toUpperCase()}", body)`, 1) : l(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(o).forEach((g) => {
1080
+ l(`.addHeader("${g}", "${ce(o[g])}")`, 1);
1081
+ }), l(".build()", 1), n(), l("val response = client.newCall(request).execute()"), a();
1042
1082
  }
1043
- }, di = {
1083
+ }, gi = {
1044
1084
  info: {
1045
1085
  key: "kotlin",
1046
1086
  title: "Kotlin",
1047
1087
  default: "okhttp"
1048
1088
  },
1049
1089
  clientsById: {
1050
- okhttp: pi
1090
+ okhttp: mi
1051
1091
  }
1052
- }, hi = {
1092
+ }, vi = {
1053
1093
  info: {
1054
1094
  key: "axios",
1055
1095
  title: "Axios",
@@ -1059,19 +1099,19 @@ var Da = {
1059
1099
  installation: "npm install axios --save"
1060
1100
  },
1061
1101
  convert: ({ method: e, fullUrl: r, allHeaders: t, postData: o }, i) => {
1062
- const l = {
1102
+ const s = {
1063
1103
  indent: " ",
1064
1104
  ...i
1065
- }, { blank: n, join: a, push: s, addPostProcessor: c } = new V({ indent: l.indent });
1066
- s("const axios = require('axios');");
1105
+ }, { blank: n, join: a, push: l, addPostProcessor: c } = new V({ indent: s.indent });
1106
+ l("const axios = require('axios');");
1067
1107
  const f = {
1068
1108
  method: e,
1069
1109
  url: r
1070
1110
  };
1071
1111
  switch (Object.keys(t).length && (f.headers = t), o.mimeType) {
1072
1112
  case "application/x-www-form-urlencoded":
1073
- o.params && (s("const { URLSearchParams } = require('url');"), n(), s("const encodedParams = new URLSearchParams();"), o.params.forEach((b) => {
1074
- s(`encodedParams.set('${b.name}', '${b.value}');`);
1113
+ o.params && (l("const { URLSearchParams } = require('url');"), n(), l("const encodedParams = new URLSearchParams();"), o.params.forEach((b) => {
1114
+ l(`encodedParams.set('${b.name}', '${b.value}');`);
1075
1115
  }), n(), f.data = "encodedParams,", c((b) => b.replace(/'encodedParams,'/, "encodedParams,")));
1076
1116
  break;
1077
1117
  case "application/json":
@@ -1081,9 +1121,9 @@ var Da = {
1081
1121
  n(), o.text && (f.data = o.text);
1082
1122
  }
1083
1123
  const g = fe(f, { indent: " ", inlineCharacterLimit: 80 });
1084
- return s(`const options = ${g};`), n(), s("axios"), s(".request(options)", 1), s(".then(function (response) {", 1), s("console.log(response.data);", 2), s("})", 1), s(".catch(function (error) {", 1), s("console.error(error);", 2), s("});", 1), a();
1124
+ return l(`const options = ${g};`), n(), l("axios"), l(".request(options)", 1), l(".then(function (response) {", 1), l("console.log(response.data);", 2), l("})", 1), l(".catch(function (error) {", 1), l("console.error(error);", 2), l("});", 1), a();
1085
1125
  }
1086
- }, yi = {
1126
+ }, bi = {
1087
1127
  info: {
1088
1128
  key: "fetch",
1089
1129
  title: "Fetch",
@@ -1092,21 +1132,21 @@ var Da = {
1092
1132
  extname: ".cjs",
1093
1133
  installation: "npm install node-fetch@2 --save"
1094
1134
  },
1095
- convert: ({ method: e, fullUrl: r, postData: t, headersObj: o, cookies: i }, l) => {
1135
+ convert: ({ method: e, fullUrl: r, postData: t, headersObj: o, cookies: i }, s) => {
1096
1136
  var v;
1097
1137
  const n = {
1098
1138
  indent: " ",
1099
- ...l
1139
+ ...s
1100
1140
  };
1101
1141
  let a = !1;
1102
- const { blank: s, push: c, join: f, unshift: g } = new V({ indent: n.indent });
1142
+ const { blank: l, push: c, join: f, unshift: g } = new V({ indent: n.indent });
1103
1143
  c("const fetch = require('node-fetch');");
1104
1144
  const b = r, m = {
1105
1145
  method: e
1106
1146
  };
1107
1147
  switch (Object.keys(o).length && (m.headers = o), t.mimeType) {
1108
1148
  case "application/x-www-form-urlencoded":
1109
- g("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), s(), (v = t.params) == null || v.forEach((h) => {
1149
+ g("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), l(), (v = t.params) == null || v.forEach((h) => {
1110
1150
  c(`encodedParams.set('${h.name}', '${h.value}');`);
1111
1151
  }), m.body = "encodedParams";
1112
1152
  break;
@@ -1117,7 +1157,7 @@ var Da = {
1117
1157
  if (!t.params)
1118
1158
  break;
1119
1159
  const p = pe(o, "content-type");
1120
- p && delete o[p], g("const FormData = require('form-data');"), c("const formData = new FormData();"), s(), t.params.forEach((h) => {
1160
+ p && delete o[p], g("const FormData = require('form-data');"), c("const formData = new FormData();"), l(), t.params.forEach((h) => {
1121
1161
  if (!h.fileName && !h.fileName && !h.contentType) {
1122
1162
  c(`formData.append('${h.name}', '${h.value}');`);
1123
1163
  return;
@@ -1132,7 +1172,7 @@ var Da = {
1132
1172
  const p = i.map(({ name: h, value: y }) => `${encodeURIComponent(h)}=${encodeURIComponent(y)}`).join("; ");
1133
1173
  m.headers || (m.headers = {}), m.headers.cookie = p;
1134
1174
  }
1135
- s(), c(`const url = '${b}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1175
+ l(), c(`const url = '${b}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1136
1176
  const j = fe(m, {
1137
1177
  indent: " ",
1138
1178
  inlineCharacterLimit: 80,
@@ -1141,9 +1181,9 @@ var Da = {
1141
1181
  // in a `JSON.stringify` call.
1142
1182
  transform: (p, h, y) => h === "body" && t.mimeType === "application/json" ? `JSON.stringify(${y})` : y
1143
1183
  });
1144
- return c(`const options = ${j};`), s(), a && g("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), s()), 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), f().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1184
+ return c(`const options = ${j};`), l(), a && g("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), l()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), f().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1145
1185
  }
1146
- }, mi = {
1186
+ }, xi = {
1147
1187
  info: {
1148
1188
  key: "native",
1149
1189
  title: "HTTP",
@@ -1153,16 +1193,16 @@ var Da = {
1153
1193
  },
1154
1194
  convert: ({ uriObj: e, method: r, allHeaders: t, postData: o }, i = {}) => {
1155
1195
  var g;
1156
- const { indent: l = " " } = i, { blank: n, join: a, push: s, unshift: c } = new V({ indent: l }), f = {
1196
+ const { indent: s = " " } = i, { blank: n, join: a, push: l, unshift: c } = new V({ indent: s }), f = {
1157
1197
  method: r,
1158
1198
  hostname: e.hostname,
1159
1199
  port: e.port,
1160
1200
  path: e.path,
1161
1201
  headers: t
1162
1202
  };
1163
- switch (s(`const http = require('${(g = e.protocol) == null ? void 0 : g.replace(":", "")}');`), n(), s(`const options = ${fe(f, { indent: l })};`), n(), s("const req = http.request(options, function (res) {"), s("const chunks = [];", 1), n(), s("res.on('data', function (chunk) {", 1), s("chunks.push(chunk);", 2), s("});", 1), n(), s("res.on('end', function () {", 1), s("const body = Buffer.concat(chunks);", 2), s("console.log(body.toString());", 2), s("});", 1), s("});"), n(), o.mimeType) {
1203
+ switch (l(`const http = require('${(g = e.protocol) == null ? void 0 : g.replace(":", "")}');`), n(), l(`const options = ${fe(f, { indent: s })};`), n(), l("const req = http.request(options, function (res) {"), l("const chunks = [];", 1), n(), l("res.on('data', function (chunk) {", 1), l("chunks.push(chunk);", 2), l("});", 1), n(), l("res.on('end', function () {", 1), l("const body = Buffer.concat(chunks);", 2), l("console.log(body.toString());", 2), l("});", 1), l("});"), n(), o.mimeType) {
1164
1204
  case "application/x-www-form-urlencoded":
1165
- o.paramsObj && (c("const qs = require('querystring');"), s(
1205
+ o.paramsObj && (c("const qs = require('querystring');"), l(
1166
1206
  `req.write(qs.stringify(${fe(o.paramsObj, {
1167
1207
  indent: " ",
1168
1208
  inlineCharacterLimit: 80
@@ -1170,7 +1210,7 @@ var Da = {
1170
1210
  ));
1171
1211
  break;
1172
1212
  case "application/json":
1173
- o.jsonObj && s(
1213
+ o.jsonObj && l(
1174
1214
  `req.write(JSON.stringify(${fe(o.jsonObj, {
1175
1215
  indent: " ",
1176
1216
  inlineCharacterLimit: 80
@@ -1178,11 +1218,11 @@ var Da = {
1178
1218
  );
1179
1219
  break;
1180
1220
  default:
1181
- o.text && s(`req.write(${fe(o.text, { indent: l })});`);
1221
+ o.text && l(`req.write(${fe(o.text, { indent: s })});`);
1182
1222
  }
1183
- return s("req.end();"), a();
1223
+ return l("req.end();"), a();
1184
1224
  }
1185
- }, gi = {
1225
+ }, ji = {
1186
1226
  info: {
1187
1227
  key: "request",
1188
1228
  title: "Request",
@@ -1191,12 +1231,12 @@ var Da = {
1191
1231
  extname: ".cjs",
1192
1232
  installation: "npm install request --save"
1193
1233
  },
1194
- convert: ({ method: e, url: r, fullUrl: t, postData: o, headersObj: i, cookies: l }, n) => {
1234
+ convert: ({ method: e, url: r, fullUrl: t, postData: o, headersObj: i, cookies: s }, n) => {
1195
1235
  const a = {
1196
1236
  indent: " ",
1197
1237
  ...n
1198
1238
  };
1199
- let s = !1;
1239
+ let l = !1;
1200
1240
  const { push: c, blank: f, join: g, unshift: b, addPostProcessor: m } = new V({ indent: a.indent });
1201
1241
  c("const request = require('request');"), f();
1202
1242
  const j = {
@@ -1219,7 +1259,7 @@ var Da = {
1219
1259
  return;
1220
1260
  }
1221
1261
  let p = {};
1222
- v.fileName ? (s = !0, p = {
1262
+ v.fileName ? (l = !0, p = {
1223
1263
  value: `fs.createReadStream(${v.fileName})`,
1224
1264
  options: {
1225
1265
  filename: v.fileName,
@@ -1231,11 +1271,11 @@ var Da = {
1231
1271
  default:
1232
1272
  o.text && (j.body = o.text);
1233
1273
  }
1234
- return l.length && (j.jar = "JAR", c("const jar = request.jar();"), l.forEach(({ name: v, value: p }) => {
1274
+ return s.length && (j.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: v, value: p }) => {
1235
1275
  c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(p)}'), '${r}');`);
1236
- }), f(), m((v) => v.replace(/'JAR'/, "jar"))), s && b("const fs = require('fs');"), c(`const options = ${fe(j, { indent: " ", inlineCharacterLimit: 80 })};`), f(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), f(), c("console.log(body);", 1), c("});"), g();
1276
+ }), f(), m((v) => v.replace(/'JAR'/, "jar"))), l && b("const fs = require('fs');"), c(`const options = ${fe(j, { indent: " ", inlineCharacterLimit: 80 })};`), f(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), f(), c("console.log(body);", 1), c("});"), g();
1237
1277
  }
1238
- }, vi = {
1278
+ }, $i = {
1239
1279
  info: {
1240
1280
  key: "unirest",
1241
1281
  title: "Unirest",
@@ -1243,18 +1283,18 @@ var Da = {
1243
1283
  description: "Lightweight HTTP Request Client Library",
1244
1284
  extname: ".cjs"
1245
1285
  },
1246
- convert: ({ method: e, url: r, cookies: t, queryObj: o, postData: i, headersObj: l }, n) => {
1286
+ convert: ({ method: e, url: r, cookies: t, queryObj: o, postData: i, headersObj: s }, n) => {
1247
1287
  const a = {
1248
1288
  indent: " ",
1249
1289
  ...n
1250
1290
  };
1251
- let s = !1;
1291
+ let l = !1;
1252
1292
  const { addPostProcessor: c, blank: f, join: g, push: b, unshift: m } = new V({
1253
1293
  indent: a.indent
1254
1294
  });
1255
1295
  switch (b("const unirest = require('unirest');"), f(), b(`const req = unirest('${e}', '${r}');`), f(), t.length && (b("const CookieJar = unirest.jar();"), t.forEach((j) => {
1256
1296
  b(`CookieJar.add('${encodeURIComponent(j.name)}=${encodeURIComponent(j.value)}', '${r}');`);
1257
- }), b("req.jar(CookieJar);"), f()), Object.keys(o).length && (b(`req.query(${fe(o, { indent: a.indent })});`), f()), Object.keys(l).length && (b(`req.headers(${fe(l, { indent: a.indent })});`), f()), i.mimeType) {
1297
+ }), b("req.jar(CookieJar);"), f()), Object.keys(o).length && (b(`req.query(${fe(o, { indent: a.indent })});`), f()), Object.keys(s).length && (b(`req.headers(${fe(s, { indent: a.indent })});`), f()), i.mimeType) {
1258
1298
  case "application/x-www-form-urlencoded":
1259
1299
  i.paramsObj && (b(`req.form(${fe(i.paramsObj, { indent: a.indent })});`), f());
1260
1300
  break;
@@ -1267,16 +1307,16 @@ var Da = {
1267
1307
  const j = [];
1268
1308
  i.params.forEach((v) => {
1269
1309
  const p = {};
1270
- v.fileName && !v.value ? (s = !0, p.body = `fs.createReadStream('${v.fileName}')`, c((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (p.body = v.value), p.body && (v.contentType && (p["content-type"] = v.contentType), j.push(p));
1310
+ v.fileName && !v.value ? (l = !0, p.body = `fs.createReadStream('${v.fileName}')`, c((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (p.body = v.value), p.body && (v.contentType && (p["content-type"] = v.contentType), j.push(p));
1271
1311
  }), b(`req.multipart(${fe(j, { indent: a.indent })});`), f();
1272
1312
  break;
1273
1313
  }
1274
1314
  default:
1275
1315
  i.text && (b(`req.send(${fe(i.text, { indent: a.indent })});`), f());
1276
1316
  }
1277
- return s && m("const fs = require('fs');"), b("req.end(function (res) {"), b("if (res.error) throw new Error(res.error);", 1), f(), b("console.log(res.body);", 1), b("});"), g();
1317
+ return l && m("const fs = require('fs');"), b("req.end(function (res) {"), b("if (res.error) throw new Error(res.error);", 1), f(), b("console.log(res.body);", 1), b("});"), g();
1278
1318
  }
1279
- }, bi = {
1319
+ }, wi = {
1280
1320
  info: {
1281
1321
  key: "node",
1282
1322
  title: "Node.js",
@@ -1284,27 +1324,27 @@ var Da = {
1284
1324
  cli: "node %s"
1285
1325
  },
1286
1326
  clientsById: {
1287
- native: mi,
1288
- request: gi,
1289
- unirest: vi,
1290
- axios: hi,
1291
- fetch: yi
1327
+ native: xi,
1328
+ request: ji,
1329
+ unirest: $i,
1330
+ axios: vi,
1331
+ fetch: bi
1292
1332
  }
1293
1333
  }, vt = (e, r, t, o) => {
1294
- const i = `${e} *${r} = `, l = br(t, o ? i.length : void 0);
1295
- return `${i}${l};`;
1296
- }, br = (e, r) => {
1334
+ const i = `${e} *${r} = `, s = xr(t, o ? i.length : void 0);
1335
+ return `${i}${s};`;
1336
+ }, xr = (e, r) => {
1297
1337
  const t = r === void 0 ? ", " : `,
1298
1338
  ${" ".repeat(r)}`;
1299
1339
  switch (Object.prototype.toString.call(e)) {
1300
1340
  case "[object Number]":
1301
1341
  return `@${e}`;
1302
1342
  case "[object Array]":
1303
- return `@[ ${e.map((i) => br(i)).join(t)} ]`;
1343
+ return `@[ ${e.map((i) => xr(i)).join(t)} ]`;
1304
1344
  case "[object Object]": {
1305
1345
  const o = [];
1306
1346
  return Object.keys(e).forEach((i) => {
1307
- o.push(`@"${i}": ${br(e[i])}`);
1347
+ o.push(`@"${i}": ${xr(e[i])}`);
1308
1348
  }), `@{ ${o.join(t)} }`;
1309
1349
  }
1310
1350
  case "[object Boolean]":
@@ -1312,7 +1352,7 @@ var Da = {
1312
1352
  default:
1313
1353
  return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
1314
1354
  }
1315
- }, xi = {
1355
+ }, Si = {
1316
1356
  info: {
1317
1357
  key: "nsurlsession",
1318
1358
  title: "NSURLSession",
@@ -1322,20 +1362,20 @@ var Da = {
1322
1362
  },
1323
1363
  convert: ({ allHeaders: e, postData: r, method: t, fullUrl: o }, i) => {
1324
1364
  var f;
1325
- const l = {
1365
+ const s = {
1326
1366
  indent: " ",
1327
1367
  pretty: !0,
1328
1368
  timeout: 10,
1329
1369
  ...i
1330
- }, { push: n, join: a, blank: s } = new V({ indent: l.indent }), c = {
1370
+ }, { push: n, join: a, blank: l } = new V({ indent: s.indent }), c = {
1331
1371
  hasHeaders: !1,
1332
1372
  hasBody: !1
1333
1373
  };
1334
- if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, s(), n(vt("NSDictionary", "headers", e, l.pretty))), r.text || r.jsonObj || r.params)
1374
+ if (n("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, l(), n(vt("NSDictionary", "headers", e, s.pretty))), r.text || r.jsonObj || r.params)
1335
1375
  switch (c.hasBody = !0, r.mimeType) {
1336
1376
  case "application/x-www-form-urlencoded":
1337
1377
  if ((f = r.params) != null && f.length) {
1338
- s();
1378
+ l();
1339
1379
  const [g, ...b] = r.params;
1340
1380
  n(
1341
1381
  `NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"${g.name}=${g.value}" dataUsingEncoding:NSUTF8StringEncoding]];`
@@ -1346,10 +1386,10 @@ var Da = {
1346
1386
  c.hasBody = !1;
1347
1387
  break;
1348
1388
  case "application/json":
1349
- r.jsonObj && (n(vt("NSDictionary", "parameters", r.jsonObj, l.pretty)), s(), n("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1389
+ r.jsonObj && (n(vt("NSDictionary", "parameters", r.jsonObj, s.pretty)), l(), n("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1350
1390
  break;
1351
1391
  case "multipart/form-data":
1352
- n(vt("NSArray", "parameters", r.params || [], l.pretty)), n(`NSString *boundary = @"${r.boundary}";`), s(), n("NSError *error;"), n("NSMutableString *body = [NSMutableString string];"), n("for (NSDictionary *param in parameters) {"), n('[body appendFormat:@"--%@\\r\\n", boundary];', 1), n('if (param[@"fileName"]) {', 1), n(
1392
+ n(vt("NSArray", "parameters", r.params || [], s.pretty)), n(`NSString *boundary = @"${r.boundary}";`), l(), n("NSError *error;"), n("NSMutableString *body = [NSMutableString string];"), n("for (NSDictionary *param in parameters) {"), n('[body appendFormat:@"--%@\\r\\n", boundary];', 1), n('if (param[@"fileName"]) {', 1), n(
1353
1393
  '[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
1354
1394
  2
1355
1395
  ), n('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), n(
@@ -1358,27 +1398,27 @@ var Da = {
1358
1398
  ), n("if (error) {", 2), n('NSLog(@"%@", error);', 3), n("}", 2), n("} else {", 1), n('[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"\\r\\n\\r\\n", param[@"name"]];', 2), n('[body appendFormat:@"%@", param[@"value"]];', 2), n("}", 1), n("}"), n('[body appendFormat:@"\\r\\n--%@--\\r\\n", boundary];'), n("NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];");
1359
1399
  break;
1360
1400
  default:
1361
- s(), n(
1401
+ l(), n(
1362
1402
  `NSData *postData = [[NSData alloc] initWithData:[@"${r.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
1363
1403
  );
1364
1404
  }
1365
- return s(), n(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), n(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), n(` timeoutInterval:${l.timeout.toFixed(1)}];`), n(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && n("[request setAllHTTPHeaderFields:headers];"), c.hasBody && n("[request setHTTPBody:postData];"), s(), n("NSURLSession *session = [NSURLSession sharedSession];"), n("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), n(
1405
+ return l(), n(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${o}"]`), n(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), n(` timeoutInterval:${s.timeout.toFixed(1)}];`), n(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && n("[request setAllHTTPHeaderFields:headers];"), c.hasBody && n("[request setHTTPBody:postData];"), l(), n("NSURLSession *session = [NSURLSession sharedSession];"), n("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), n(
1366
1406
  " completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
1367
1407
  ), n(" if (error) {", 1), n(' NSLog(@"%@", error);', 2), n(" } else {", 1), n(
1368
1408
  " NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
1369
1409
  2
1370
1410
  ), n(' NSLog(@"%@", httpResponse);', 2), n(" }", 1), n(" }];"), n("[dataTask resume];"), a();
1371
1411
  }
1372
- }, ji = {
1412
+ }, Oi = {
1373
1413
  info: {
1374
1414
  key: "objc",
1375
1415
  title: "Objective-C",
1376
1416
  default: "nsurlsession"
1377
1417
  },
1378
1418
  clientsById: {
1379
- nsurlsession: xi
1419
+ nsurlsession: Si
1380
1420
  }
1381
- }, $i = {
1421
+ }, Ti = {
1382
1422
  info: {
1383
1423
  key: "cohttp",
1384
1424
  title: "CoHTTP",
@@ -1388,11 +1428,11 @@ var Da = {
1388
1428
  installation: "opam install cohttp-lwt-unix cohttp-async"
1389
1429
  },
1390
1430
  convert: ({ fullUrl: e, allHeaders: r, postData: t, method: o }, i) => {
1391
- const l = {
1431
+ const s = {
1392
1432
  indent: " ",
1393
1433
  ...i
1394
- }, n = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: s, join: c } = new V({ indent: l.indent });
1395
- a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), s(), a(`let uri = Uri.of_string "${e}" in`);
1434
+ }, n = ["get", "post", "head", "delete", "patch", "put", "options"], { push: a, blank: l, join: c } = new V({ indent: s.indent });
1435
+ a("open Cohttp_lwt_unix"), a("open Cohttp"), a("open Lwt"), l(), a(`let uri = Uri.of_string "${e}" in`);
1396
1436
  const f = Object.keys(r);
1397
1437
  f.length === 1 ? a(
1398
1438
  `let headers = Header.add (Header.init ()) "${f[0]}" "${ce(
@@ -1400,18 +1440,18 @@ var Da = {
1400
1440
  )}" in`
1401
1441
  ) : f.length > 1 && (a("let headers = Header.add_list (Header.init ()) ["), f.forEach((j) => {
1402
1442
  a(`("${j}", "${ce(r[j])}");`, 1);
1403
- }), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), s();
1443
+ }), a("] in")), t.text && a(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), l();
1404
1444
  const g = f.length ? "~headers " : "", b = t.text ? "~body " : "", m = n.includes(o.toLowerCase()) ? `\`${o.toUpperCase()}` : `(Code.method_of_string "${o}")`;
1405
1445
  return a(`Client.call ${g}${b}${m} uri`), a(">>= fun (res, body_stream) ->"), a("(* Do stuff with the result *)", 1), c();
1406
1446
  }
1407
- }, wi = {
1447
+ }, Pi = {
1408
1448
  info: {
1409
1449
  key: "ocaml",
1410
1450
  title: "OCaml",
1411
1451
  default: "cohttp"
1412
1452
  },
1413
1453
  clientsById: {
1414
- cohttp: $i
1454
+ cohttp: Ti
1415
1455
  }
1416
1456
  }, te = (e, r, t) => {
1417
1457
  switch (t = t || "", r = r || "", Object.prototype.toString.call(e)) {
@@ -1422,7 +1462,7 @@ var Da = {
1422
1462
  case "[object Undefined]":
1423
1463
  return "null";
1424
1464
  case "[object String]":
1425
- return `'${Me(e, { delimiter: "'", escapeNewlines: !1 })}'`;
1465
+ return `'${He(e, { delimiter: "'", escapeNewlines: !1 })}'`;
1426
1466
  case "[object Number]":
1427
1467
  return e.toString();
1428
1468
  case "[object Array]": {
@@ -1444,7 +1484,7 @@ ${t}]`;
1444
1484
  default:
1445
1485
  return "null";
1446
1486
  }
1447
- }, Xr = [
1487
+ }, Zr = [
1448
1488
  "ACL",
1449
1489
  "BASELINE_CONTROL",
1450
1490
  "CHECKIN",
@@ -1472,7 +1512,7 @@ ${t}]`;
1472
1512
  "UNLOCK",
1473
1513
  "UPDATE",
1474
1514
  "VERSION_CONTROL"
1475
- ], Si = {
1515
+ ], Ci = {
1476
1516
  info: {
1477
1517
  key: "curl",
1478
1518
  title: "cURL",
@@ -1480,9 +1520,9 @@ ${t}]`;
1480
1520
  description: "PHP with ext-curl",
1481
1521
  extname: ".php"
1482
1522
  },
1483
- convert: ({ uriObj: e, postData: r, fullUrl: t, method: o, httpVersion: i, cookies: l, headersObj: n }, a = {}) => {
1523
+ convert: ({ uriObj: e, postData: r, fullUrl: t, method: o, httpVersion: i, cookies: s, headersObj: n }, a = {}) => {
1484
1524
  const {
1485
- closingTag: s = !1,
1525
+ closingTag: l = !1,
1486
1526
  indent: c = " ",
1487
1527
  maxRedirects: f = 10,
1488
1528
  namedErrors: g = !1,
@@ -1544,13 +1584,13 @@ ${c}` });
1544
1584
  y.forEach(({ value: O, name: x, escape: N }) => {
1545
1585
  O != null && S.push(`${x} => ${N ? JSON.stringify(O) : O},`);
1546
1586
  });
1547
- const T = l.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1587
+ const T = s.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1548
1588
  T.length && S.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
1549
1589
  const d = Object.keys(n).sort().map((O) => `"${O}: ${ce(n[O])}"`);
1550
1590
  return d.length && (S.push("CURLOPT_HTTPHEADER => ["), S.push(d.join(`,
1551
- ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), p(), v("curl_close($curl);"), p(), v("if ($err) {"), v(g ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !b && s && (p(), v("?>")), h();
1591
+ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), p(), v("curl_close($curl);"), p(), v("if ($err) {"), v(g ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !b && l && (p(), v("?>")), h();
1552
1592
  }
1553
- }, Oi = {
1593
+ }, Ni = {
1554
1594
  info: {
1555
1595
  key: "guzzle",
1556
1596
  title: "Guzzle",
@@ -1559,16 +1599,16 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1559
1599
  extname: ".php",
1560
1600
  installation: "composer require guzzlehttp/guzzle"
1561
1601
  },
1562
- convert: ({ postData: e, fullUrl: r, method: t, cookies: o, headersObj: i }, l) => {
1602
+ convert: ({ postData: e, fullUrl: r, method: t, cookies: o, headersObj: i }, s) => {
1563
1603
  var v;
1564
1604
  const n = {
1565
1605
  closingTag: !1,
1566
1606
  indent: " ",
1567
1607
  noTags: !1,
1568
1608
  shortTags: !1,
1569
- ...l
1570
- }, { push: a, blank: s, join: c } = new V({ indent: n.indent }), { code: f, push: g, join: b } = new V({ indent: n.indent });
1571
- switch (n.noTags || a(n.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), s(), e.mimeType) {
1609
+ ...s
1610
+ }, { push: a, blank: l, join: c } = new V({ indent: n.indent }), { code: f, push: g, join: b } = new V({ indent: n.indent });
1611
+ switch (n.noTags || a(n.shortTags ? "<?" : "<?php"), a("require_once('vendor/autoload.php');"), l(), e.mimeType) {
1572
1612
  case "application/x-www-form-urlencoded":
1573
1613
  g(`'form_params' => ${te(e.paramsObj, n.indent + n.indent, n.indent)},`, 1);
1574
1614
  break;
@@ -1596,12 +1636,12 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1596
1636
  e.text && g(`'body' => ${te(e.text)},`, 1);
1597
1637
  }
1598
1638
  const m = Object.keys(i).sort().map(function(p) {
1599
- return `${n.indent}${n.indent}'${p}' => '${ze(i[p])}',`;
1639
+ return `${n.indent}${n.indent}'${p}' => '${Me(i[p])}',`;
1600
1640
  }), j = o.map((p) => `${encodeURIComponent(p.name)}=${encodeURIComponent(p.value)}`).join("; ");
1601
- return j.length && m.push(`${n.indent}${n.indent}'cookie' => '${ze(j)}',`), m.length && (g("'headers' => [", 1), g(m.join(`
1602
- `)), g("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), s(), f.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(b()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), s(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (s(), a("?>")), c();
1641
+ return j.length && m.push(`${n.indent}${n.indent}'cookie' => '${Me(j)}',`), m.length && (g("'headers' => [", 1), g(m.join(`
1642
+ `)), g("],", 1)), a("$client = new \\GuzzleHttp\\Client();"), l(), f.length ? (a(`$response = $client->request('${t}', '${r}', [`), a(b()), a("]);")) : a(`$response = $client->request('${t}', '${r}');`), l(), a("echo $response->getBody();"), !n.noTags && n.closingTag && (l(), a("?>")), c();
1603
1643
  }
1604
- }, Ti = {
1644
+ }, qi = {
1605
1645
  info: {
1606
1646
  key: "http1",
1607
1647
  title: "HTTP v1",
@@ -1609,21 +1649,21 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1609
1649
  description: "PHP with pecl/http v1",
1610
1650
  extname: ".php"
1611
1651
  },
1612
- convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: i, cookiesObj: l }, n = {}) => {
1613
- const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags: f = !1 } = n, { push: g, blank: b, join: m } = new V({ indent: s });
1614
- switch (c || (g(f ? "<?" : "<?php"), b()), Xr.includes(e.toUpperCase()) || g(`HttpRequest::methodRegister('${e}');`), g("$request = new HttpRequest();"), g(`$request->setUrl(${te(r)});`), Xr.includes(e.toUpperCase()) ? g(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : g(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), b(), Object.keys(o).length && (g(`$request->setQueryData(${te(o, s)});`), b()), Object.keys(i).length && (g(`$request->setHeaders(${te(i, s)});`), b()), Object.keys(l).length && (g(`$request->setCookies(${te(l, s)});`), b()), t.mimeType) {
1652
+ convert: ({ method: e, url: r, postData: t, queryObj: o, headersObj: i, cookiesObj: s }, n = {}) => {
1653
+ const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags: f = !1 } = n, { push: g, blank: b, join: m } = new V({ indent: l });
1654
+ switch (c || (g(f ? "<?" : "<?php"), b()), Zr.includes(e.toUpperCase()) || g(`HttpRequest::methodRegister('${e}');`), g("$request = new HttpRequest();"), g(`$request->setUrl(${te(r)});`), Zr.includes(e.toUpperCase()) ? g(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : g(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), b(), Object.keys(o).length && (g(`$request->setQueryData(${te(o, l)});`), b()), Object.keys(i).length && (g(`$request->setHeaders(${te(i, l)});`), b()), Object.keys(s).length && (g(`$request->setCookies(${te(s, l)});`), b()), t.mimeType) {
1615
1655
  case "application/x-www-form-urlencoded":
1616
- g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setPostFields(${te(t.paramsObj, s)});`), b();
1656
+ g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setPostFields(${te(t.paramsObj, l)});`), b();
1617
1657
  break;
1618
1658
  case "application/json":
1619
- g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setBody(json_encode(${te(t.jsonObj, s)}));`), b();
1659
+ g(`$request->setContentType(${te(t.mimeType)});`), g(`$request->setBody(json_encode(${te(t.jsonObj, l)}));`), b();
1620
1660
  break;
1621
1661
  default:
1622
1662
  t.text && (g(`$request->setBody(${te(t.text)});`), b());
1623
1663
  }
1624
1664
  return g("try {"), g("$response = $request->send();", 1), b(), g("echo $response->getBody();", 1), g("} catch (HttpException $ex) {"), g("echo $ex;", 1), g("}"), !c && a && (b(), g("?>")), m();
1625
1665
  }
1626
- }, Pi = {
1666
+ }, Ri = {
1627
1667
  info: {
1628
1668
  key: "http2",
1629
1669
  title: "HTTP v2",
@@ -1631,13 +1671,13 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1631
1671
  description: "PHP with pecl/http v2",
1632
1672
  extname: ".php"
1633
1673
  },
1634
- convert: ({ postData: e, headersObj: r, method: t, queryObj: o, cookiesObj: i, url: l }, n = {}) => {
1674
+ convert: ({ postData: e, headersObj: r, method: t, queryObj: o, cookiesObj: i, url: s }, n = {}) => {
1635
1675
  var v;
1636
- const { closingTag: a = !1, indent: s = " ", noTags: c = !1, shortTags: f = !1 } = n, { push: g, blank: b, join: m } = new V({ indent: s });
1676
+ const { closingTag: a = !1, indent: l = " ", noTags: c = !1, shortTags: f = !1 } = n, { push: g, blank: b, join: m } = new V({ indent: l });
1637
1677
  let j = !1;
1638
1678
  switch (c || (g(f ? "<?" : "<?php"), b()), g("$client = new http\\Client;"), g("$request = new http\\Client\\Request;"), b(), e.mimeType) {
1639
1679
  case "application/x-www-form-urlencoded":
1640
- g("$body = new http\\Message\\Body;"), g(`$body->append(new http\\QueryString(${te(e.paramsObj, s)}));`), b(), j = !0;
1680
+ g("$body = new http\\Message\\Body;"), g(`$body->append(new http\\QueryString(${te(e.paramsObj, l)}));`), b(), j = !0;
1641
1681
  break;
1642
1682
  case "multipart/form-data": {
1643
1683
  if (!e.params)
@@ -1655,7 +1695,7 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1655
1695
  }
1656
1696
  O && (h[T] = O);
1657
1697
  });
1658
- const y = Object.keys(h).length ? te(h, s) : "null", S = p.length ? te(p, s) : "null";
1698
+ const y = Object.keys(h).length ? te(h, l) : "null", S = p.length ? te(p, l) : "null";
1659
1699
  if (g("$body = new http\\Message\\Body;"), g(`$body->addForm(${y}, ${S});`), nt(r, "content-type") && (v = ve(r, "content-type")) != null && v.indexOf("boundary")) {
1660
1700
  const T = pe(r, "content-type");
1661
1701
  T && delete r[T];
@@ -1664,14 +1704,14 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1664
1704
  break;
1665
1705
  }
1666
1706
  case "application/json":
1667
- g("$body = new http\\Message\\Body;"), g(`$body->append(json_encode(${te(e.jsonObj, s)}));`), j = !0;
1707
+ g("$body = new http\\Message\\Body;"), g(`$body->append(json_encode(${te(e.jsonObj, l)}));`), j = !0;
1668
1708
  break;
1669
1709
  default:
1670
1710
  e.text && (g("$body = new http\\Message\\Body;"), g(`$body->append(${te(e.text)});`), b(), j = !0);
1671
1711
  }
1672
- return g(`$request->setRequestUrl(${te(l)});`), g(`$request->setRequestMethod(${te(t)});`), j && (g("$request->setBody($body);"), b()), Object.keys(o).length && (g(`$request->setQuery(new http\\QueryString(${te(o, s)}));`), b()), Object.keys(r).length && (g(`$request->setHeaders(${te(r, s)});`), b()), Object.keys(i).length && (b(), g(`$client->setCookies(${te(i, s)});`), b()), g("$client->enqueue($request)->send();"), g("$response = $client->getResponse();"), b(), g("echo $response->getBody();"), !c && a && (b(), g("?>")), m();
1712
+ return g(`$request->setRequestUrl(${te(s)});`), g(`$request->setRequestMethod(${te(t)});`), j && (g("$request->setBody($body);"), b()), Object.keys(o).length && (g(`$request->setQuery(new http\\QueryString(${te(o, l)}));`), b()), Object.keys(r).length && (g(`$request->setHeaders(${te(r, l)});`), b()), Object.keys(i).length && (b(), g(`$client->setCookies(${te(i, l)});`), b()), g("$client->enqueue($request)->send();"), g("$response = $client->getResponse();"), b(), g("echo $response->getBody();"), !c && a && (b(), g("?>")), m();
1673
1713
  }
1674
- }, Ci = {
1714
+ }, ki = {
1675
1715
  info: {
1676
1716
  key: "php",
1677
1717
  title: "PHP",
@@ -1679,24 +1719,24 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1679
1719
  cli: "php %s"
1680
1720
  },
1681
1721
  clientsById: {
1682
- curl: Si,
1683
- guzzle: Oi,
1684
- http1: Ti,
1685
- http2: Pi
1722
+ curl: Ci,
1723
+ guzzle: Ni,
1724
+ http1: qi,
1725
+ http2: Ri
1686
1726
  }
1687
- }, vo = (e) => ({ method: t, headersObj: o, cookies: i, uriObj: l, fullUrl: n, postData: a, allHeaders: s }) => {
1727
+ }, bo = (e) => ({ method: t, headersObj: o, cookies: i, uriObj: s, fullUrl: n, postData: a, allHeaders: l }) => {
1688
1728
  const { push: c, join: f } = new V();
1689
1729
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
1690
1730
  return "Method not supported";
1691
1731
  const b = [], m = Object.keys(o);
1692
1732
  return m.length && (c("$headers=@{}"), m.forEach((j) => {
1693
- j !== "connection" && c(`$headers.Add("${j}", "${Me(o[j], { escapeChar: "`" })}")`);
1733
+ j !== "connection" && c(`$headers.Add("${j}", "${He(o[j], { escapeChar: "`" })}")`);
1694
1734
  }), b.push("-Headers $headers")), i.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), i.forEach((j) => {
1695
- c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${j.name}'`), c(`$cookie.Value = '${j.value}'`), c(`$cookie.Domain = '${l.host}'`), c("$session.Cookies.Add($cookie)");
1735
+ c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${j.name}'`), c(`$cookie.Value = '${j.value}'`), c(`$cookie.Domain = '${s.host}'`), c("$session.Cookies.Add($cookie)");
1696
1736
  }), b.push("-WebSession $session")), a.text && (b.push(
1697
- `-ContentType '${Me(ve(s, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
1737
+ `-ContentType '${He(ve(l, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
1698
1738
  ), b.push(`-Body '${a.text}'`)), c(`$response = ${e} -Uri '${n}' -Method ${t} ${b.join(" ")}`.trim()), f();
1699
- }, Ni = {
1739
+ }, Ei = {
1700
1740
  info: {
1701
1741
  key: "restmethod",
1702
1742
  title: "Invoke-RestMethod",
@@ -1704,8 +1744,8 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1704
1744
  description: "Powershell Invoke-RestMethod client",
1705
1745
  extname: ".ps1"
1706
1746
  },
1707
- convert: vo("Invoke-RestMethod")
1708
- }, qi = {
1747
+ convert: bo("Invoke-RestMethod")
1748
+ }, Ai = {
1709
1749
  info: {
1710
1750
  key: "webrequest",
1711
1751
  title: "Invoke-WebRequest",
@@ -1713,39 +1753,39 @@ ${c}${c}`), 1), S.push("],")), v(S.join(), 1), v("]);"), p(), v("$response = cur
1713
1753
  description: "Powershell Invoke-WebRequest client",
1714
1754
  extname: ".ps1"
1715
1755
  },
1716
- convert: vo("Invoke-WebRequest")
1717
- }, Ri = {
1756
+ convert: bo("Invoke-WebRequest")
1757
+ }, Ii = {
1718
1758
  info: {
1719
1759
  key: "powershell",
1720
1760
  title: "Powershell",
1721
1761
  default: "webrequest"
1722
1762
  },
1723
1763
  clientsById: {
1724
- webrequest: qi,
1725
- restmethod: Ni
1764
+ webrequest: Ai,
1765
+ restmethod: Ei
1726
1766
  }
1727
1767
  };
1728
- function Zr(e, r, t, o, i) {
1729
- const l = o.repeat(i), n = o.repeat(i - 1), a = t ? `,
1730
- ${l}` : ", ", s = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
1731
- return t ? `${s}
1732
- ${l}${r.join(a)}
1733
- ${n}${c}` : e === "object" && r.length > 0 ? `${s} ${r.join(a)} ${c}` : `${s}${r.join(a)}${c}`;
1768
+ function en(e, r, t, o, i) {
1769
+ const s = o.repeat(i), n = o.repeat(i - 1), a = t ? `,
1770
+ ${s}` : ", ", l = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
1771
+ return t ? `${l}
1772
+ ${s}${r.join(a)}
1773
+ ${n}${c}` : e === "object" && r.length > 0 ? `${l} ${r.join(a)} ${c}` : `${l}${r.join(a)}${c}`;
1734
1774
  }
1735
- var Le = (e, r, t) => {
1775
+ var Ie = (e, r, t) => {
1736
1776
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
1737
1777
  case "[object Number]":
1738
1778
  return e;
1739
1779
  case "[object Array]": {
1740
1780
  let o = !1;
1741
- const i = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), Le(l, r, t)));
1742
- return Zr("array", i, o, r.indent, t);
1781
+ const i = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (o = Object.keys(s).length > 1), Ie(s, r, t)));
1782
+ return en("array", i, o, r.indent, t);
1743
1783
  }
1744
1784
  case "[object Object]": {
1745
1785
  const o = [];
1746
1786
  for (const i in e)
1747
- o.push(`"${i}": ${Le(e[i], r, t)}`);
1748
- return Zr("object", o, r.pretty && o.length > 1, r.indent, t);
1787
+ o.push(`"${i}": ${Ie(e[i], r, t)}`);
1788
+ return en("object", o, r.pretty && o.length > 1, r.indent, t);
1749
1789
  }
1750
1790
  case "[object Null]":
1751
1791
  return "None";
@@ -1754,7 +1794,7 @@ var Le = (e, r, t) => {
1754
1794
  default:
1755
1795
  return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
1756
1796
  }
1757
- }, ki = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Ei = {
1797
+ }, Li = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], Ui = {
1758
1798
  info: {
1759
1799
  key: "requests",
1760
1800
  title: "Requests",
@@ -1764,11 +1804,11 @@ var Le = (e, r, t) => {
1764
1804
  installation: "python -m pip install requests"
1765
1805
  },
1766
1806
  convert: ({ fullUrl: e, postData: r, allHeaders: t, method: o }, i) => {
1767
- const l = {
1807
+ const s = {
1768
1808
  indent: " ",
1769
1809
  pretty: !0,
1770
1810
  ...i
1771
- }, { push: n, blank: a, join: s, addPostProcessor: c } = new V({ indent: l.indent });
1811
+ }, { push: n, blank: a, join: l, addPostProcessor: c } = new V({ indent: s.indent });
1772
1812
  n("import requests"), a(), n(`url = "${e}"`), a();
1773
1813
  const f = t;
1774
1814
  let g = {};
@@ -1776,7 +1816,7 @@ var Le = (e, r, t) => {
1776
1816
  let m = !1, j = !1, v = !1;
1777
1817
  switch (r.mimeType) {
1778
1818
  case "application/json":
1779
- r.jsonObj && (n(`payload = ${Le(r.jsonObj, l)}`), v = !0, j = !0);
1819
+ r.jsonObj && (n(`payload = ${Ie(r.jsonObj, s)}`), v = !0, j = !0);
1780
1820
  break;
1781
1821
  case "multipart/form-data":
1782
1822
  if (!r.params)
@@ -1784,7 +1824,7 @@ var Le = (e, r, t) => {
1784
1824
  if (g = {}, r.params.forEach((y) => {
1785
1825
  y.fileName ? (y.contentType ? b[y.name] = `('${y.fileName}', open('${y.fileName}', 'rb'), '${y.contentType}')` : b[y.name] = `('${y.fileName}', open('${y.fileName}', 'rb'))`, m = !0) : (g[y.name] = y.value, j = !0);
1786
1826
  }), m) {
1787
- n(`files = ${Le(b, l)}`), j && n(`payload = ${Le(g, l)}`);
1827
+ n(`files = ${Ie(b, s)}`), j && n(`payload = ${Ie(g, s)}`);
1788
1828
  const y = pe(f, "content-type");
1789
1829
  y && delete f[y];
1790
1830
  } else {
@@ -1797,7 +1837,7 @@ var Le = (e, r, t) => {
1797
1837
  break;
1798
1838
  default: {
1799
1839
  if (r.mimeType === "application/x-www-form-urlencoded" && r.paramsObj) {
1800
- n(`payload = ${Le(r.paramsObj, l)}`), j = !0;
1840
+ n(`payload = ${Ie(r.paramsObj, s)}`), j = !0;
1801
1841
  break;
1802
1842
  }
1803
1843
  const y = JSON.stringify(r.text);
@@ -1817,10 +1857,10 @@ var Le = (e, r, t) => {
1817
1857
  n(y !== p ? `"${S}": "${ce(f[S])}",` : `"${S}": "${ce(f[S])}"`, 1), y += 1;
1818
1858
  }), n("}"), a();
1819
1859
  }
1820
- let h = ki.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
1821
- return j && (v ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), p > 0 && (h += ", headers=headers"), h += ")", n(h), a(), n("print(response.text)"), s();
1860
+ let h = Li.includes(o) ? `response = requests.${o.toLowerCase()}(url` : `response = requests.request("${o}", url`;
1861
+ return j && (v ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), p > 0 && (h += ", headers=headers"), h += ")", n(h), a(), n("print(response.text)"), l();
1822
1862
  }
1823
- }, Ai = {
1863
+ }, Fi = {
1824
1864
  info: {
1825
1865
  key: "python",
1826
1866
  title: "Python",
@@ -1828,9 +1868,9 @@ var Le = (e, r, t) => {
1828
1868
  cli: "python3 %s"
1829
1869
  },
1830
1870
  clientsById: {
1831
- requests: Ei
1871
+ requests: Ui
1832
1872
  }
1833
- }, Ii = {
1873
+ }, _i = {
1834
1874
  info: {
1835
1875
  key: "httr",
1836
1876
  title: "httr",
@@ -1838,8 +1878,8 @@ var Le = (e, r, t) => {
1838
1878
  description: "httr: Tools for Working with URLs and HTTP",
1839
1879
  extname: ".r"
1840
1880
  },
1841
- convert: ({ url: e, queryObj: r, queryString: t, postData: o, allHeaders: i, method: l }) => {
1842
- const { push: n, blank: a, join: s } = new V();
1881
+ convert: ({ url: e, queryObj: r, queryString: t, postData: o, allHeaders: i, method: s }) => {
1882
+ const { push: n, blank: a, join: l } = new V();
1843
1883
  n("library(httr)"), a(), n(`url <- "${e}"`), a();
1844
1884
  const c = r;
1845
1885
  delete r.key;
@@ -1863,22 +1903,22 @@ var Le = (e, r, t) => {
1863
1903
  n('encode <- "raw"'), a();
1864
1904
  break;
1865
1905
  }
1866
- const b = ve(i, "cookie"), m = ve(i, "accept"), j = b ? `set_cookies(\`${String(b).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${ce(m)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`, h = Object.entries(i).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, O]) => `'${d}' = '${ze(O)}'`).join(", "), y = h ? `add_headers(${h})` : void 0;
1867
- let S = `response <- VERB("${l}", url`;
1906
+ const b = ve(i, "cookie"), m = ve(i, "accept"), j = b ? `set_cookies(\`${String(b).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${ce(m)}")` : void 0, p = `content_type("${ce(o.mimeType)}")`, h = Object.entries(i).filter(([d]) => !["cookie", "accept", "content-type"].includes(d.toLowerCase())).map(([d, O]) => `'${d}' = '${Me(O)}'`).join(", "), y = h ? `add_headers(${h})` : void 0;
1907
+ let S = `response <- VERB("${s}", url`;
1868
1908
  g && (S += ", body = payload"), t.length && (S += ", query = queryString");
1869
1909
  const T = [y, p, v, j].filter((d) => !!d).join(", ");
1870
- return T && (S += `, ${T}`), (o.text || o.jsonObj || o.params) && (S += ", encode = encode"), S += ")", n(S), a(), n('content(response, "text")'), s();
1910
+ return T && (S += `, ${T}`), (o.text || o.jsonObj || o.params) && (S += ", encode = encode"), S += ")", n(S), a(), n('content(response, "text")'), l();
1871
1911
  }
1872
- }, Li = {
1912
+ }, Bi = {
1873
1913
  info: {
1874
1914
  key: "r",
1875
1915
  title: "R",
1876
1916
  default: "httr"
1877
1917
  },
1878
1918
  clientsById: {
1879
- httr: Ii
1919
+ httr: _i
1880
1920
  }
1881
- }, Ui = {
1921
+ }, Hi = {
1882
1922
  info: {
1883
1923
  key: "native",
1884
1924
  title: "net::http",
@@ -1887,9 +1927,9 @@ var Le = (e, r, t) => {
1887
1927
  extname: ".rb"
1888
1928
  },
1889
1929
  convert: ({ uriObj: e, method: r, fullUrl: t, postData: o, allHeaders: i }) => {
1890
- const { push: l, blank: n, join: a } = new V();
1891
- l("require 'uri'"), l("require 'net/http'"), n();
1892
- const s = r.toUpperCase(), c = [
1930
+ const { push: s, blank: n, join: a } = new V();
1931
+ s("require 'uri'"), s("require 'net/http'"), n();
1932
+ const l = r.toUpperCase(), c = [
1893
1933
  "GET",
1894
1934
  "POST",
1895
1935
  "HEAD",
@@ -1902,23 +1942,23 @@ var Le = (e, r, t) => {
1902
1942
  "UNLOCK",
1903
1943
  "MOVE",
1904
1944
  "TRACE"
1905
- ], f = s.charAt(0) + s.substring(1).toLowerCase();
1906
- c.includes(s) || (l(`class Net::HTTP::${f} < Net::HTTPRequest`), l(` METHOD = '${s.toUpperCase()}'`), l(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), l(" RESPONSE_HAS_BODY = true"), l("end"), n()), l(`url = URI("${t}")`), n(), l("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && l("http.use_ssl = true"), n(), l(`request = Net::HTTP::${f}.new(url)`);
1945
+ ], f = l.charAt(0) + l.substring(1).toLowerCase();
1946
+ c.includes(l) || (s(`class Net::HTTP::${f} < Net::HTTPRequest`), s(` METHOD = '${l.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${o.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), n()), s(`url = URI("${t}")`), n(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), n(), s(`request = Net::HTTP::${f}.new(url)`);
1907
1947
  const g = Object.keys(i);
1908
1948
  return g.length && g.forEach((b) => {
1909
- l(`request["${b}"] = '${ze(i[b])}'`);
1910
- }), o.text && l(`request.body = ${JSON.stringify(o.text)}`), n(), l("response = http.request(request)"), l("puts response.read_body"), a();
1949
+ s(`request["${b}"] = '${Me(i[b])}'`);
1950
+ }), o.text && s(`request.body = ${JSON.stringify(o.text)}`), n(), s("response = http.request(request)"), s("puts response.read_body"), a();
1911
1951
  }
1912
- }, Fi = {
1952
+ }, Mi = {
1913
1953
  info: {
1914
1954
  key: "ruby",
1915
1955
  title: "Ruby",
1916
1956
  default: "native"
1917
1957
  },
1918
1958
  clientsById: {
1919
- native: Ui
1959
+ native: Hi
1920
1960
  }
1921
- }, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, _i = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Bi = {
1961
+ }, ue = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, zi = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Gi = {
1922
1962
  "http1.0": "0",
1923
1963
  "url ": "",
1924
1964
  cookie: "b",
@@ -1928,13 +1968,13 @@ var Le = (e, r, t) => {
1928
1968
  header: "H",
1929
1969
  insecure: "k",
1930
1970
  request: "X"
1931
- }, Hi = (e) => (r) => {
1971
+ }, Wi = (e) => (r) => {
1932
1972
  if (e) {
1933
- const t = Bi[r];
1973
+ const t = Gi[r];
1934
1974
  return t ? `-${t}` : "";
1935
1975
  }
1936
1976
  return `--${r}`;
1937
- }, Mi = {
1977
+ }, Ji = {
1938
1978
  info: {
1939
1979
  key: "curl",
1940
1980
  title: "cURL",
@@ -1942,15 +1982,15 @@ var Le = (e, r, t) => {
1942
1982
  description: "cURL is a command line tool and library for transferring data with URL syntax",
1943
1983
  extname: ".sh"
1944
1984
  },
1945
- convert: ({ fullUrl: e, method: r, httpVersion: t, headersObj: o, allHeaders: i, postData: l }, n = {}) => {
1985
+ convert: ({ fullUrl: e, method: r, httpVersion: t, headersObj: o, allHeaders: i, postData: s }, n = {}) => {
1946
1986
  var p;
1947
- const { indent: a = " ", short: s = !1, binary: c = !1, globOff: f = !1 } = n, g = " ", { push: b, join: m } = new V({
1987
+ const { indent: a = " ", short: l = !1, binary: c = !1, globOff: f = !1 } = n, g = " ", { push: b, join: m } = new V({
1948
1988
  ...typeof a == "string" ? { indent: a } : {},
1949
1989
  join: a !== !1 ? ` \\
1950
1990
  ${a}` : " "
1951
- }), j = Hi(s);
1991
+ }), j = Wi(l);
1952
1992
  let v = ue(e);
1953
- if (b(`curl ${j("request")} ${r}`), f && (v = unescape(v), b(j("globoff"))), b(`${j("url ")}${v}`), t === "HTTP/1.0" && b(j("http1.0")), ve(i, "accept-encoding") && b("--compressed"), l.mimeType === "multipart/form-data") {
1993
+ if (b(`curl ${j("request")} ${r}`), f && (v = unescape(v), b(j("globoff"))), b(`${j("url ")}${v}`), t === "HTTP/1.0" && b(j("http1.0")), ve(i, "accept-encoding") && b("--compressed"), s.mimeType === "multipart/form-data") {
1954
1994
  const h = pe(o, "content-type");
1955
1995
  if (h) {
1956
1996
  const y = o[h];
@@ -1963,27 +2003,27 @@ ${a}` : " "
1963
2003
  switch (Object.keys(o).sort().forEach((h) => {
1964
2004
  const y = `${h}: ${o[h]}`;
1965
2005
  b(`${j("header")} ${ue(y)}`);
1966
- }), i.cookie && b(`${j("cookie")} ${ue(i.cookie)}`), l.mimeType) {
2006
+ }), i.cookie && b(`${j("cookie")} ${ue(i.cookie)}`), s.mimeType) {
1967
2007
  case "multipart/form-data":
1968
- (p = l.params) == null || p.forEach((y) => {
2008
+ (p = s.params) == null || p.forEach((y) => {
1969
2009
  let S = "";
1970
2010
  y.fileName ? S = `${y.name}='@${y.fileName}'` : S = ue(`${y.name}=${y.value}`), b(`${j("form")} ${S}`);
1971
2011
  });
1972
2012
  break;
1973
2013
  case "application/x-www-form-urlencoded":
1974
- l.params ? l.params.forEach((y) => {
2014
+ s.params ? s.params.forEach((y) => {
1975
2015
  const S = y.name, T = encodeURIComponent(y.name), d = T !== S, O = d ? T : S, x = c ? "--data-binary" : d ? "--data-urlencode" : j("data");
1976
2016
  b(`${x} ${ue(`${O}=${y.value}`)}`);
1977
- }) : b(`${c ? "--data-binary" : j("data")} ${ue(l.text)}`);
2017
+ }) : b(`${c ? "--data-binary" : j("data")} ${ue(s.text)}`);
1978
2018
  break;
1979
2019
  default:
1980
- if (!l.text)
2020
+ if (!s.text)
1981
2021
  break;
1982
2022
  let h = !1;
1983
- if (Ha(l.mimeType) && l.text.length > 20)
2023
+ if (Wa(s.mimeType) && s.text.length > 20)
1984
2024
  try {
1985
- const y = JSON.parse(l.text);
1986
- h = !0, l.text.indexOf("'") > 0 ? b(
2025
+ const y = JSON.parse(s.text);
2026
+ h = !0, s.text.indexOf("'") > 0 ? b(
1987
2027
  `${c ? "--data-binary" : j("data")} @- <<EOF
1988
2028
  ${JSON.stringify(
1989
2029
  y,
@@ -1998,11 +2038,11 @@ ${JSON.stringify(y, null, g)}
1998
2038
  );
1999
2039
  } catch {
2000
2040
  }
2001
- h || b(`${c ? "--data-binary" : j("data")} ${ue(l.text)}`);
2041
+ h || b(`${c ? "--data-binary" : j("data")} ${ue(s.text)}`);
2002
2042
  }
2003
2043
  return m();
2004
2044
  }
2005
- }, zi = {
2045
+ }, Vi = {
2006
2046
  info: {
2007
2047
  key: "httpie",
2008
2048
  title: "HTTPie",
@@ -2011,7 +2051,7 @@ ${JSON.stringify(y, null, g)}
2011
2051
  extname: ".sh",
2012
2052
  installation: "brew install httpie"
2013
2053
  },
2014
- convert: ({ allHeaders: e, postData: r, queryObj: t, fullUrl: o, method: i, url: l }, n) => {
2054
+ convert: ({ allHeaders: e, postData: r, queryObj: t, fullUrl: o, method: i, url: s }, n) => {
2015
2055
  const a = {
2016
2056
  body: !1,
2017
2057
  cert: !1,
@@ -2026,7 +2066,7 @@ ${JSON.stringify(y, null, g)}
2026
2066
  verbose: !1,
2027
2067
  verify: !1,
2028
2068
  ...n
2029
- }, { push: s, join: c, unshift: f } = new V({
2069
+ }, { push: l, join: c, unshift: f } = new V({
2030
2070
  indent: a.indent,
2031
2071
  // @ts-expect-error SEEMS LEGIT
2032
2072
  join: a.indent !== !1 ? ` \\
@@ -2037,21 +2077,21 @@ ${a.indent}` : " "
2037
2077
  a.headers && b.push(a.short ? "-h" : "--headers"), a.body && b.push(a.short ? "-b" : "--body"), a.verbose && b.push(a.short ? "-v" : "--verbose"), a.print && b.push(`${a.short ? "-p" : "--print"}=${a.print}`), a.verify && b.push(`--verify=${a.verify}`), a.cert && b.push(`--cert=${a.cert}`), a.pretty && b.push(`--pretty=${a.pretty}`), a.style && b.push(`--style=${a.style}`), a.timeout && b.push(`--timeout=${a.timeout}`), a.queryParams && Object.keys(t).forEach((j) => {
2038
2078
  const v = t[j];
2039
2079
  Array.isArray(v) ? v.forEach((p) => {
2040
- s(`${j}==${ue(p)}`);
2041
- }) : s(`${j}==${ue(v)}`);
2080
+ l(`${j}==${ue(p)}`);
2081
+ }) : l(`${j}==${ue(v)}`);
2042
2082
  }), Object.keys(e).sort().forEach((j) => {
2043
- s(`${j}:${ue(e[j])}`);
2083
+ l(`${j}:${ue(e[j])}`);
2044
2084
  }), r.mimeType === "application/x-www-form-urlencoded" ? r.params && r.params.length && (b.push(a.short ? "-f" : "--form"), r.params.forEach((j) => {
2045
- s(`${j.name}=${ue(j.value)}`);
2085
+ l(`${j.name}=${ue(j.value)}`);
2046
2086
  })) : g = !0;
2047
2087
  const m = b.length ? `${b.join(" ")} ` : "";
2048
- if (l = ue(a.queryParams ? l : o), f(`http ${m}${i} ${l}`), g && r.text) {
2088
+ if (s = ue(a.queryParams ? s : o), f(`http ${m}${i} ${s}`), g && r.text) {
2049
2089
  const j = ue(r.text);
2050
2090
  f(`echo ${j} | `);
2051
2091
  }
2052
2092
  return c();
2053
2093
  }
2054
- }, Gi = {
2094
+ }, Di = {
2055
2095
  info: {
2056
2096
  key: "wget",
2057
2097
  title: "Wget",
@@ -2060,22 +2100,22 @@ ${a.indent}` : " "
2060
2100
  extname: ".sh"
2061
2101
  },
2062
2102
  convert: ({ method: e, postData: r, allHeaders: t, fullUrl: o }, i) => {
2063
- const l = {
2103
+ const s = {
2064
2104
  indent: " ",
2065
2105
  short: !1,
2066
2106
  verbose: !1,
2067
2107
  ...i
2068
2108
  }, { push: n, join: a } = new V({
2069
- ...typeof l.indent == "string" ? { indent: l.indent } : {},
2070
- join: l.indent !== !1 ? ` \\
2071
- ${l.indent}` : " "
2109
+ ...typeof s.indent == "string" ? { indent: s.indent } : {},
2110
+ join: s.indent !== !1 ? ` \\
2111
+ ${s.indent}` : " "
2072
2112
  });
2073
- return l.verbose ? n(`wget ${l.short ? "-v" : "--verbose"}`) : n(`wget ${l.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((s) => {
2074
- const c = `${s}: ${t[s]}`;
2113
+ return s.verbose ? n(`wget ${s.short ? "-v" : "--verbose"}`) : n(`wget ${s.short ? "-q" : "--quiet"}`), n(`--method ${ue(e)}`), Object.keys(t).forEach((l) => {
2114
+ const c = `${l}: ${t[l]}`;
2075
2115
  n(`--header ${ue(c)}`);
2076
- }), r.text && n(`--body-data ${_i(ue(r.text))}`), n(l.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
2116
+ }), r.text && n(`--body-data ${zi(ue(r.text))}`), n(s.short ? "-O" : "--output-document"), n(`- ${ue(o)}`), a();
2077
2117
  }
2078
- }, Wi = {
2118
+ }, Qi = {
2079
2119
  info: {
2080
2120
  key: "shell",
2081
2121
  title: "Shell",
@@ -2083,30 +2123,30 @@ ${l.indent}` : " "
2083
2123
  cli: "%s"
2084
2124
  },
2085
2125
  clientsById: {
2086
- curl: Mi,
2087
- httpie: zi,
2088
- wget: Gi
2126
+ curl: Ji,
2127
+ httpie: Vi,
2128
+ wget: Di
2089
2129
  }
2090
- }, en = (e, r) => r.repeat(e), tn = (e, r, t, o) => {
2091
- const i = en(o, t), l = en(o - 1, t), n = r ? `,
2130
+ }, tn = (e, r) => r.repeat(e), rn = (e, r, t, o) => {
2131
+ const i = tn(o, t), s = tn(o - 1, t), n = r ? `,
2092
2132
  ${i}` : ", ";
2093
2133
  return r ? `[
2094
2134
  ${i}${e.join(n)}
2095
- ${l}]` : `[${e.join(n)}]`;
2096
- }, rn = (e, r, t) => `let ${e} = ${tt(r, t)}`, tt = (e, r, t) => {
2135
+ ${s}]` : `[${e.join(n)}]`;
2136
+ }, nn = (e, r, t) => `let ${e} = ${et(r, t)}`, et = (e, r, t) => {
2097
2137
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
2098
2138
  case "[object Number]":
2099
2139
  return e;
2100
2140
  case "[object Array]": {
2101
2141
  let o = !1;
2102
- const i = e.map((l) => (Object.prototype.toString.call(l) === "[object Object]" && (o = Object.keys(l).length > 1), tt(l, r, t)));
2103
- return tn(i, o, r.indent, t);
2142
+ const i = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (o = Object.keys(s).length > 1), et(s, r, t)));
2143
+ return rn(i, o, r.indent, t);
2104
2144
  }
2105
2145
  case "[object Object]": {
2106
2146
  const o = [];
2107
2147
  for (const i in e)
2108
- o.push(`"${i}": ${tt(e[i], r, t)}`);
2109
- return tn(
2148
+ o.push(`"${i}": ${et(e[i], r, t)}`);
2149
+ return rn(
2110
2150
  o,
2111
2151
  // @ts-expect-error needs better types
2112
2152
  r.pretty && o.length > 1,
@@ -2120,7 +2160,7 @@ ${l}]` : `[${e.join(n)}]`;
2120
2160
  default:
2121
2161
  return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
2122
2162
  }
2123
- }, Ji = {
2163
+ }, Ki = {
2124
2164
  info: {
2125
2165
  key: "urlsession",
2126
2166
  title: "URLSession",
@@ -2128,32 +2168,32 @@ ${l}]` : `[${e.join(n)}]`;
2128
2168
  description: "Foundation's URLSession request",
2129
2169
  extname: ".swift"
2130
2170
  },
2131
- convert: ({ allHeaders: e, postData: r, uriObj: t, queryObj: o, method: i }, l) => {
2171
+ convert: ({ allHeaders: e, postData: r, uriObj: t, queryObj: o, method: i }, s) => {
2132
2172
  var b;
2133
2173
  const n = {
2134
2174
  indent: " ",
2135
2175
  pretty: !0,
2136
2176
  timeout: 10,
2137
- ...l
2138
- }, { push: a, blank: s, join: c } = new V({ indent: n.indent });
2139
- a("import Foundation"), s();
2177
+ ...s
2178
+ }, { push: a, blank: l, join: c } = new V({ indent: n.indent });
2179
+ a("import Foundation"), l();
2140
2180
  const f = r.text || r.jsonObj || r.params;
2141
2181
  if (f)
2142
2182
  switch (r.mimeType) {
2143
2183
  case "application/x-www-form-urlencoded":
2144
2184
  if ((b = r.params) != null && b.length) {
2145
2185
  const m = r.params.map((j) => `"${j.name}": "${j.value}"`);
2146
- n.pretty ? (a("let parameters = ["), m.forEach((j) => a(`${j},`, 1)), a("]")) : a(`let parameters = [${m.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), s();
2186
+ n.pretty ? (a("let parameters = ["), m.forEach((j) => a(`${j},`, 1)), a("]")) : a(`let parameters = [${m.join(", ")}]`), a('let joinedParameters = parameters.map { "\\($0.key)=\\($0.value)" }.joined(separator: "&")'), a("let postData = Data(joinedParameters.utf8)"), l();
2147
2187
  }
2148
2188
  break;
2149
2189
  case "application/json":
2150
- r.jsonObj && (a(`${rn("parameters", r.jsonObj, n)} as [String : Any?]`), s(), a("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), s());
2190
+ r.jsonObj && (a(`${nn("parameters", r.jsonObj, n)} as [String : Any?]`), l(), a("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), l());
2151
2191
  break;
2152
2192
  case "multipart/form-data":
2153
- a(rn("parameters", r.params, n)), s(), a(`let boundary = "${r.boundary}"`), s(), a('var body = ""'), a("for param in parameters {"), a('let paramName = param["name"]!', 1), a('body += "--\\(boundary)\\r\\n"', 1), a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), a('if let filename = param["fileName"] {', 1), a('let contentType = param["contentType"]!', 2), a("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), a('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), a("body += fileContent", 2), a('} else if let paramValue = param["value"] {', 1), a('body += "\\r\\n\\r\\n\\(paramValue)"', 2), a("}", 1), a("}"), s(), a("let postData = Data(body.utf8)"), s();
2193
+ a(nn("parameters", r.params, n)), l(), a(`let boundary = "${r.boundary}"`), l(), a('var body = ""'), a("for param in parameters {"), a('let paramName = param["name"]!', 1), a('body += "--\\(boundary)\\r\\n"', 1), a('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), a('if let filename = param["fileName"] {', 1), a('let contentType = param["contentType"]!', 2), a("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), a('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), a('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), a("body += fileContent", 2), a('} else if let paramValue = param["value"] {', 1), a('body += "\\r\\n\\r\\n\\(paramValue)"', 2), a("}", 1), a("}"), l(), a("let postData = Data(body.utf8)"), l();
2154
2194
  break;
2155
2195
  default:
2156
- a(`let postData = Data("${r.text}".utf8)`), s();
2196
+ a(`let postData = Data("${r.text}".utf8)`), l();
2157
2197
  }
2158
2198
  a(`let url = URL(string: "${t.href}")!`);
2159
2199
  const g = o ? Object.entries(o) : [];
@@ -2169,50 +2209,50 @@ ${l}]` : `[${e.join(n)}]`;
2169
2209
  });
2170
2210
  break;
2171
2211
  }
2172
- }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), s(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${tt(e, n)}`), f && a("request.httpBody = postData"), s(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
2212
+ }), a("]"), a("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), l(), a("var request = URLRequest(url: components.url!)")), a(`request.httpMethod = "${i}"`), a(`request.timeoutInterval = ${n.timeout}`), Object.keys(e).length && a(`request.allHTTPHeaderFields = ${et(e, n)}`), f && a("request.httpBody = postData"), l(), a("let (data, _) = try await URLSession.shared.data(for: request)"), a("print(String(decoding: data, as: UTF8.self))"), c();
2173
2213
  }
2174
- }, Vi = {
2214
+ }, Yi = {
2175
2215
  info: {
2176
2216
  key: "swift",
2177
2217
  title: "Swift",
2178
2218
  default: "urlsession"
2179
2219
  },
2180
2220
  clientsById: {
2181
- urlsession: Ji
2221
+ urlsession: Ki
2182
2222
  }
2183
- }, Di = {
2184
- c: Ba,
2185
- clojure: Ga,
2186
- csharp: Qa,
2187
- go: Ya,
2188
- http: Za,
2189
- java: oi,
2190
- javascript: ci,
2191
- json: fi,
2192
- kotlin: di,
2193
- node: bi,
2194
- objc: ji,
2195
- ocaml: wi,
2196
- php: Ci,
2197
- powershell: Ri,
2198
- python: Ai,
2199
- r: Li,
2200
- ruby: Fi,
2201
- shell: Wi,
2202
- swift: Vi
2203
- }, Ne = {}, _e = { exports: {} };
2223
+ }, Xi = {
2224
+ c: Ga,
2225
+ clojure: Da,
2226
+ csharp: Za,
2227
+ go: ti,
2228
+ http: ni,
2229
+ java: li,
2230
+ javascript: di,
2231
+ json: yi,
2232
+ kotlin: gi,
2233
+ node: wi,
2234
+ objc: Oi,
2235
+ ocaml: Pi,
2236
+ php: ki,
2237
+ powershell: Ii,
2238
+ python: Fi,
2239
+ r: Bi,
2240
+ ruby: Mi,
2241
+ shell: Qi,
2242
+ swift: Yi
2243
+ }, Ce = {}, Fe = { exports: {} };
2204
2244
  /*! https://mths.be/punycode v1.4.1 by @mathias */
2205
- var Qi = _e.exports, nn;
2206
- function Ki() {
2207
- return nn || (nn = 1, function(e, r) {
2245
+ var Zi = Fe.exports, on;
2246
+ function es() {
2247
+ return on || (on = 1, function(e, r) {
2208
2248
  (function(t) {
2209
- var o = r && !r.nodeType && r, i = e && !e.nodeType && e, l = typeof Ze == "object" && Ze;
2210
- (l.global === l || l.window === l || l.self === l) && (t = l);
2211
- var n, a = 2147483647, s = 36, c = 1, f = 26, g = 38, b = 700, m = 72, j = 128, v = "-", p = /^xn--/, h = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
2249
+ var o = r && !r.nodeType && r, i = e && !e.nodeType && e, s = typeof Xe == "object" && Xe;
2250
+ (s.global === s || s.window === s || s.self === s) && (t = s);
2251
+ var n, a = 2147483647, l = 36, c = 1, f = 26, g = 38, b = 700, m = 72, j = 128, v = "-", p = /^xn--/, h = /[^\x20-\x7E]/, y = /[\x2E\u3002\uFF0E\uFF61]/g, S = {
2212
2252
  overflow: "Overflow: input needs wider integers to process",
2213
2253
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
2214
2254
  "invalid-input": "Invalid input"
2215
- }, T = s - c, d = Math.floor, O = String.fromCharCode, x;
2255
+ }, T = l - c, d = Math.floor, O = String.fromCharCode, x;
2216
2256
  function N(q) {
2217
2257
  throw new RangeError(S[q]);
2218
2258
  }
@@ -2239,14 +2279,14 @@ function Ki() {
2239
2279
  }).join("");
2240
2280
  }
2241
2281
  function ae(q) {
2242
- return q - 48 < 10 ? q - 22 : q - 65 < 26 ? q - 65 : q - 97 < 26 ? q - 97 : s;
2282
+ return q - 48 < 10 ? q - 22 : q - 65 < 26 ? q - 65 : q - 97 < 26 ? q - 97 : l;
2243
2283
  }
2244
2284
  function H(q, R) {
2245
2285
  return q + 22 + 75 * (q < 26) - ((R != 0) << 5);
2246
2286
  }
2247
2287
  function D(q, R, U) {
2248
2288
  var C = 0;
2249
- for (q = U ? d(q / b) : q >> 1, q += d(q / R); q > T * f >> 1; C += s)
2289
+ for (q = U ? d(q / b) : q >> 1, q += d(q / R); q > T * f >> 1; C += l)
2250
2290
  q = d(q / T);
2251
2291
  return d(C + (T + 1) * q / (q + g));
2252
2292
  }
@@ -2255,8 +2295,8 @@ function Ki() {
2255
2295
  for (K = q.lastIndexOf(v), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
2256
2296
  q.charCodeAt(ne) >= 128 && N("not-basic"), R.push(q.charCodeAt(ne));
2257
2297
  for (J = K > 0 ? K + 1 : 0; J < U; ) {
2258
- for (I = L, F = 1, _ = s; J >= U && N("invalid-input"), Q = ae(q.charCodeAt(J++)), (Q >= s || Q > d((a - L) / F)) && N("overflow"), L += Q * F, G = _ <= z ? c : _ >= z + f ? f : _ - z, !(Q < G); _ += s)
2259
- Y = s - G, F > d(a / Y) && N("overflow"), F *= Y;
2298
+ for (I = L, F = 1, _ = l; J >= U && N("invalid-input"), Q = ae(q.charCodeAt(J++)), (Q >= l || Q > d((a - L) / F)) && N("overflow"), L += Q * F, G = _ <= z ? c : _ >= z + f ? f : _ - z, !(Q < G); _ += l)
2299
+ Y = l - G, F > d(a / Y) && N("overflow"), F *= Y;
2260
2300
  C = R.length + 1, z = D(L - I, C, I == 0), d(L / C) > a - W && N("overflow"), W += d(L / C), L %= C, R.splice(L++, 0, W);
2261
2301
  }
2262
2302
  return P(R);
@@ -2270,8 +2310,8 @@ function Ki() {
2270
2310
  F = q[z], F >= R && F < K && (K = F);
2271
2311
  for (G = C + 1, K - R > d((a - U) / G) && N("overflow"), U += (K - R) * G, R = K, z = 0; z < Q; ++z)
2272
2312
  if (F = q[z], F < R && ++U > a && N("overflow"), F == R) {
2273
- for (ne = U, J = s; I = J <= W ? c : J >= W + f ? f : J - W, !(ne < I); J += s)
2274
- oe = ne - I, Y = s - I, _.push(
2313
+ for (ne = U, J = l; I = J <= W ? c : J >= W + f ? f : J - W, !(ne < I); J += l)
2314
+ oe = ne - I, Y = l - I, _.push(
2275
2315
  O(H(I + oe % Y, 0))
2276
2316
  ), ne = d(oe / Y);
2277
2317
  _.push(O(H(ne, 0))), W = D(U, G, C == L), U = 0, ++C;
@@ -2320,89 +2360,89 @@ function Ki() {
2320
2360
  n.hasOwnProperty(x) && (o[x] = n[x]);
2321
2361
  else
2322
2362
  t.punycode = n;
2323
- })(Qi);
2324
- }(_e, _e.exports)), _e.exports;
2325
- }
2326
- var bt, on;
2327
- function bo() {
2328
- return on || (on = 1, bt = Object), bt;
2363
+ })(Zi);
2364
+ }(Fe, Fe.exports)), Fe.exports;
2329
2365
  }
2330
- var xt, an;
2331
- function Yi() {
2332
- return an || (an = 1, xt = Error), xt;
2333
- }
2334
- var jt, sn;
2335
- function Xi() {
2336
- return sn || (sn = 1, jt = EvalError), jt;
2337
- }
2338
- var $t, ln;
2339
- function Zi() {
2340
- return ln || (ln = 1, $t = RangeError), $t;
2341
- }
2342
- var wt, cn;
2343
- function es() {
2344
- return cn || (cn = 1, wt = ReferenceError), wt;
2345
- }
2346
- var St, un;
2366
+ var bt, an;
2347
2367
  function xo() {
2348
- return un || (un = 1, St = SyntaxError), St;
2349
- }
2350
- var Ot, fn;
2351
- function We() {
2352
- return fn || (fn = 1, Ot = TypeError), Ot;
2368
+ return an || (an = 1, bt = Object), bt;
2353
2369
  }
2354
- var Tt, pn;
2370
+ var xt, sn;
2355
2371
  function ts() {
2356
- return pn || (pn = 1, Tt = URIError), Tt;
2372
+ return sn || (sn = 1, xt = Error), xt;
2357
2373
  }
2358
- var Pt, dn;
2374
+ var jt, ln;
2359
2375
  function rs() {
2360
- return dn || (dn = 1, Pt = Math.abs), Pt;
2376
+ return ln || (ln = 1, jt = EvalError), jt;
2361
2377
  }
2362
- var Ct, hn;
2378
+ var $t, cn;
2363
2379
  function ns() {
2364
- return hn || (hn = 1, Ct = Math.floor), Ct;
2380
+ return cn || (cn = 1, $t = RangeError), $t;
2365
2381
  }
2366
- var Nt, yn;
2382
+ var wt, un;
2367
2383
  function os() {
2368
- return yn || (yn = 1, Nt = Math.max), Nt;
2384
+ return un || (un = 1, wt = ReferenceError), wt;
2385
+ }
2386
+ var St, fn;
2387
+ function jo() {
2388
+ return fn || (fn = 1, St = SyntaxError), St;
2389
+ }
2390
+ var Ot, pn;
2391
+ function Ge() {
2392
+ return pn || (pn = 1, Ot = TypeError), Ot;
2369
2393
  }
2370
- var qt, mn;
2394
+ var Tt, dn;
2371
2395
  function as() {
2372
- return mn || (mn = 1, qt = Math.min), qt;
2396
+ return dn || (dn = 1, Tt = URIError), Tt;
2373
2397
  }
2374
- var Rt, gn;
2398
+ var Pt, hn;
2375
2399
  function is() {
2376
- return gn || (gn = 1, Rt = Math.pow), Rt;
2400
+ return hn || (hn = 1, Pt = Math.abs), Pt;
2377
2401
  }
2378
- var kt, vn;
2402
+ var Ct, yn;
2379
2403
  function ss() {
2380
- return vn || (vn = 1, kt = Math.round), kt;
2404
+ return yn || (yn = 1, Ct = Math.floor), Ct;
2381
2405
  }
2382
- var Et, bn;
2406
+ var Nt, mn;
2383
2407
  function ls() {
2384
- return bn || (bn = 1, Et = Number.isNaN || function(r) {
2408
+ return mn || (mn = 1, Nt = Math.max), Nt;
2409
+ }
2410
+ var qt, gn;
2411
+ function cs() {
2412
+ return gn || (gn = 1, qt = Math.min), qt;
2413
+ }
2414
+ var Rt, vn;
2415
+ function us() {
2416
+ return vn || (vn = 1, Rt = Math.pow), Rt;
2417
+ }
2418
+ var kt, bn;
2419
+ function fs() {
2420
+ return bn || (bn = 1, kt = Math.round), kt;
2421
+ }
2422
+ var Et, xn;
2423
+ function ps() {
2424
+ return xn || (xn = 1, Et = Number.isNaN || function(r) {
2385
2425
  return r !== r;
2386
2426
  }), Et;
2387
2427
  }
2388
- var At, xn;
2389
- function cs() {
2390
- if (xn) return At;
2391
- xn = 1;
2392
- var e = /* @__PURE__ */ ls();
2428
+ var At, jn;
2429
+ function ds() {
2430
+ if (jn) return At;
2431
+ jn = 1;
2432
+ var e = /* @__PURE__ */ ps();
2393
2433
  return At = function(t) {
2394
2434
  return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
2395
2435
  }, At;
2396
2436
  }
2397
- var It, jn;
2398
- function us() {
2399
- return jn || (jn = 1, It = Object.getOwnPropertyDescriptor), It;
2437
+ var It, $n;
2438
+ function hs() {
2439
+ return $n || ($n = 1, It = Object.getOwnPropertyDescriptor), It;
2400
2440
  }
2401
- var Lt, $n;
2441
+ var Lt, wn;
2402
2442
  function ot() {
2403
- if ($n) return Lt;
2404
- $n = 1;
2405
- var e = /* @__PURE__ */ us();
2443
+ if (wn) return Lt;
2444
+ wn = 1;
2445
+ var e = /* @__PURE__ */ hs();
2406
2446
  if (e)
2407
2447
  try {
2408
2448
  e([], "length");
@@ -2411,10 +2451,10 @@ function ot() {
2411
2451
  }
2412
2452
  return Lt = e, Lt;
2413
2453
  }
2414
- var Ut, wn;
2454
+ var Ut, Sn;
2415
2455
  function at() {
2416
- if (wn) return Ut;
2417
- wn = 1;
2456
+ if (Sn) return Ut;
2457
+ Sn = 1;
2418
2458
  var e = Object.defineProperty || !1;
2419
2459
  if (e)
2420
2460
  try {
@@ -2424,9 +2464,9 @@ function at() {
2424
2464
  }
2425
2465
  return Ut = e, Ut;
2426
2466
  }
2427
- var Ft, Sn;
2428
- function fs() {
2429
- return Sn || (Sn = 1, Ft = function() {
2467
+ var Ft, On;
2468
+ function ys() {
2469
+ return On || (On = 1, Ft = function() {
2430
2470
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2431
2471
  return !1;
2432
2472
  if (typeof Symbol.iterator == "symbol")
@@ -2436,7 +2476,7 @@ function fs() {
2436
2476
  return !1;
2437
2477
  var i = 42;
2438
2478
  r[t] = i;
2439
- for (var l in r)
2479
+ for (var s in r)
2440
2480
  return !1;
2441
2481
  if (typeof Object.keys == "function" && Object.keys(r).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(r).length !== 0)
2442
2482
  return !1;
@@ -2454,50 +2494,50 @@ function fs() {
2454
2494
  return !0;
2455
2495
  }), Ft;
2456
2496
  }
2457
- var _t, On;
2458
- function ps() {
2459
- if (On) return _t;
2460
- On = 1;
2461
- var e = typeof Symbol < "u" && Symbol, r = fs();
2497
+ var _t, Tn;
2498
+ function ms() {
2499
+ if (Tn) return _t;
2500
+ Tn = 1;
2501
+ var e = typeof Symbol < "u" && Symbol, r = ys();
2462
2502
  return _t = function() {
2463
2503
  return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
2464
2504
  }, _t;
2465
2505
  }
2466
- var Bt, Tn;
2467
- function jo() {
2468
- return Tn || (Tn = 1, Bt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Bt;
2469
- }
2470
- var Ht, Pn;
2506
+ var Bt, Pn;
2471
2507
  function $o() {
2472
- if (Pn) return Ht;
2473
- Pn = 1;
2474
- var e = /* @__PURE__ */ bo();
2475
- return Ht = e.getPrototypeOf || null, Ht;
2508
+ return Pn || (Pn = 1, Bt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Bt;
2476
2509
  }
2477
- var Mt, Cn;
2478
- function ds() {
2479
- if (Cn) return Mt;
2510
+ var Ht, Cn;
2511
+ function wo() {
2512
+ if (Cn) return Ht;
2480
2513
  Cn = 1;
2481
- var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", i = function(s, c) {
2482
- for (var f = [], g = 0; g < s.length; g += 1)
2483
- f[g] = s[g];
2514
+ var e = /* @__PURE__ */ xo();
2515
+ return Ht = e.getPrototypeOf || null, Ht;
2516
+ }
2517
+ var Mt, Nn;
2518
+ function gs() {
2519
+ if (Nn) return Mt;
2520
+ Nn = 1;
2521
+ var e = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, t = Math.max, o = "[object Function]", i = function(l, c) {
2522
+ for (var f = [], g = 0; g < l.length; g += 1)
2523
+ f[g] = l[g];
2484
2524
  for (var b = 0; b < c.length; b += 1)
2485
- f[b + s.length] = c[b];
2525
+ f[b + l.length] = c[b];
2486
2526
  return f;
2487
- }, l = function(s, c) {
2488
- for (var f = [], g = c, b = 0; g < s.length; g += 1, b += 1)
2489
- f[b] = s[g];
2527
+ }, s = function(l, c) {
2528
+ for (var f = [], g = c, b = 0; g < l.length; g += 1, b += 1)
2529
+ f[b] = l[g];
2490
2530
  return f;
2491
- }, n = function(a, s) {
2531
+ }, n = function(a, l) {
2492
2532
  for (var c = "", f = 0; f < a.length; f += 1)
2493
- c += a[f], f + 1 < a.length && (c += s);
2533
+ c += a[f], f + 1 < a.length && (c += l);
2494
2534
  return c;
2495
2535
  };
2496
- return Mt = function(s) {
2536
+ return Mt = function(l) {
2497
2537
  var c = this;
2498
2538
  if (typeof c != "function" || r.apply(c) !== o)
2499
2539
  throw new TypeError(e + c);
2500
- for (var f = l(arguments, 1), g, b = function() {
2540
+ for (var f = s(arguments, 1), g, b = function() {
2501
2541
  if (this instanceof g) {
2502
2542
  var h = c.apply(
2503
2543
  this,
@@ -2506,7 +2546,7 @@ function ds() {
2506
2546
  return Object(h) === h ? h : this;
2507
2547
  }
2508
2548
  return c.apply(
2509
- s,
2549
+ l,
2510
2550
  i(f, arguments)
2511
2551
  );
2512
2552
  }, m = t(0, c.length - f.length), j = [], v = 0; v < m; v++)
@@ -2519,48 +2559,48 @@ function ds() {
2519
2559
  return g;
2520
2560
  }, Mt;
2521
2561
  }
2522
- var zt, Nn;
2523
- function Je() {
2524
- if (Nn) return zt;
2525
- Nn = 1;
2526
- var e = ds();
2562
+ var zt, qn;
2563
+ function We() {
2564
+ if (qn) return zt;
2565
+ qn = 1;
2566
+ var e = gs();
2527
2567
  return zt = Function.prototype.bind || e, zt;
2528
2568
  }
2529
- var Gt, qn;
2530
- function Tr() {
2531
- return qn || (qn = 1, Gt = Function.prototype.call), Gt;
2532
- }
2533
- var Wt, Rn;
2569
+ var Gt, Rn;
2534
2570
  function Pr() {
2535
- return Rn || (Rn = 1, Wt = Function.prototype.apply), Wt;
2571
+ return Rn || (Rn = 1, Gt = Function.prototype.call), Gt;
2536
2572
  }
2537
- var Jt, kn;
2538
- function hs() {
2539
- return kn || (kn = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
2573
+ var Wt, kn;
2574
+ function Cr() {
2575
+ return kn || (kn = 1, Wt = Function.prototype.apply), Wt;
2540
2576
  }
2541
- var Vt, En;
2542
- function wo() {
2543
- if (En) return Vt;
2544
- En = 1;
2545
- var e = Je(), r = Pr(), t = Tr(), o = hs();
2546
- return Vt = o || e.call(t, r), Vt;
2577
+ var Jt, En;
2578
+ function vs() {
2579
+ return En || (En = 1, Jt = typeof Reflect < "u" && Reflect && Reflect.apply), Jt;
2547
2580
  }
2548
- var Dt, An;
2581
+ var Vt, An;
2549
2582
  function So() {
2550
- if (An) return Dt;
2583
+ if (An) return Vt;
2551
2584
  An = 1;
2552
- var e = Je(), r = /* @__PURE__ */ We(), t = Tr(), o = wo();
2553
- return Dt = function(l) {
2554
- if (l.length < 1 || typeof l[0] != "function")
2585
+ var e = We(), r = Cr(), t = Pr(), o = vs();
2586
+ return Vt = o || e.call(t, r), Vt;
2587
+ }
2588
+ var Dt, In;
2589
+ function Oo() {
2590
+ if (In) return Dt;
2591
+ In = 1;
2592
+ var e = We(), r = /* @__PURE__ */ Ge(), t = Pr(), o = So();
2593
+ return Dt = function(s) {
2594
+ if (s.length < 1 || typeof s[0] != "function")
2555
2595
  throw new r("a function is required");
2556
- return o(e, t, l);
2596
+ return o(e, t, s);
2557
2597
  }, Dt;
2558
2598
  }
2559
- var Qt, In;
2560
- function ys() {
2561
- if (In) return Qt;
2562
- In = 1;
2563
- var e = So(), r = /* @__PURE__ */ ot(), t;
2599
+ var Qt, Ln;
2600
+ function bs() {
2601
+ if (Ln) return Qt;
2602
+ Ln = 1;
2603
+ var e = Oo(), r = /* @__PURE__ */ ot(), t;
2564
2604
  try {
2565
2605
  t = /** @type {{ __proto__?: typeof Array.prototype }} */
2566
2606
  [].__proto__ === Array.prototype;
@@ -2572,19 +2612,19 @@ function ys() {
2572
2612
  Object.prototype,
2573
2613
  /** @type {keyof typeof Object.prototype} */
2574
2614
  "__proto__"
2575
- ), i = Object, l = i.getPrototypeOf;
2576
- return Qt = o && typeof o.get == "function" ? e([o.get]) : typeof l == "function" ? (
2615
+ ), i = Object, s = i.getPrototypeOf;
2616
+ return Qt = o && typeof o.get == "function" ? e([o.get]) : typeof s == "function" ? (
2577
2617
  /** @type {import('./get')} */
2578
2618
  function(a) {
2579
- return l(a == null ? a : i(a));
2619
+ return s(a == null ? a : i(a));
2580
2620
  }
2581
2621
  ) : !1, Qt;
2582
2622
  }
2583
- var Kt, Ln;
2584
- function ms() {
2585
- if (Ln) return Kt;
2586
- Ln = 1;
2587
- var e = jo(), r = $o(), t = /* @__PURE__ */ ys();
2623
+ var Kt, Un;
2624
+ function xs() {
2625
+ if (Un) return Kt;
2626
+ Un = 1;
2627
+ var e = $o(), r = wo(), t = /* @__PURE__ */ bs();
2588
2628
  return Kt = e ? function(i) {
2589
2629
  return e(i);
2590
2630
  } : r ? function(i) {
@@ -2595,18 +2635,18 @@ function ms() {
2595
2635
  return t(i);
2596
2636
  } : null, Kt;
2597
2637
  }
2598
- var Yt, Un;
2599
- function gs() {
2600
- if (Un) return Yt;
2601
- Un = 1;
2602
- var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = Je();
2638
+ var Yt, Fn;
2639
+ function js() {
2640
+ if (Fn) return Yt;
2641
+ Fn = 1;
2642
+ var e = Function.prototype.call, r = Object.prototype.hasOwnProperty, t = We();
2603
2643
  return Yt = t.call(e, r), Yt;
2604
2644
  }
2605
- var Xt, Fn;
2606
- function Cr() {
2607
- if (Fn) return Xt;
2608
- Fn = 1;
2609
- var e, r = /* @__PURE__ */ bo(), t = /* @__PURE__ */ Yi(), o = /* @__PURE__ */ Xi(), i = /* @__PURE__ */ Zi(), l = /* @__PURE__ */ es(), n = /* @__PURE__ */ xo(), a = /* @__PURE__ */ We(), s = /* @__PURE__ */ ts(), c = /* @__PURE__ */ rs(), f = /* @__PURE__ */ ns(), g = /* @__PURE__ */ os(), b = /* @__PURE__ */ as(), m = /* @__PURE__ */ is(), j = /* @__PURE__ */ ss(), v = /* @__PURE__ */ cs(), p = Function, h = function(J) {
2645
+ var Xt, _n;
2646
+ function Nr() {
2647
+ if (_n) return Xt;
2648
+ _n = 1;
2649
+ var e, r = /* @__PURE__ */ xo(), t = /* @__PURE__ */ ts(), o = /* @__PURE__ */ rs(), i = /* @__PURE__ */ ns(), s = /* @__PURE__ */ os(), n = /* @__PURE__ */ jo(), a = /* @__PURE__ */ Ge(), l = /* @__PURE__ */ as(), c = /* @__PURE__ */ is(), f = /* @__PURE__ */ ss(), g = /* @__PURE__ */ ls(), b = /* @__PURE__ */ cs(), m = /* @__PURE__ */ us(), j = /* @__PURE__ */ fs(), v = /* @__PURE__ */ ds(), p = Function, h = function(J) {
2610
2650
  try {
2611
2651
  return p('"use strict"; return (' + J + ").constructor;")();
2612
2652
  } catch {
@@ -2623,7 +2663,7 @@ function Cr() {
2623
2663
  return T;
2624
2664
  }
2625
2665
  }
2626
- }() : T, O = ps()(), x = ms(), N = $o(), A = jo(), E = Pr(), B = Tr(), P = {}, ae = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), H = {
2666
+ }() : T, O = ms()(), x = xs(), N = wo(), A = $o(), E = Cr(), B = Pr(), P = {}, ae = typeof Uint8Array > "u" || !x ? e : x(Uint8Array), H = {
2627
2667
  __proto__: null,
2628
2668
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
2629
2669
  "%Array%": Array,
@@ -2672,7 +2712,7 @@ function Cr() {
2672
2712
  "%Promise%": typeof Promise > "u" ? e : Promise,
2673
2713
  "%Proxy%": typeof Proxy > "u" ? e : Proxy,
2674
2714
  "%RangeError%": i,
2675
- "%ReferenceError%": l,
2715
+ "%ReferenceError%": s,
2676
2716
  "%Reflect%": typeof Reflect > "u" ? e : Reflect,
2677
2717
  "%RegExp%": RegExp,
2678
2718
  "%Set%": typeof Set > "u" ? e : Set,
@@ -2689,7 +2729,7 @@ function Cr() {
2689
2729
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
2690
2730
  "%Uint16Array%": typeof Uint16Array > "u" ? e : Uint16Array,
2691
2731
  "%Uint32Array%": typeof Uint32Array > "u" ? e : Uint32Array,
2692
- "%URIError%": s,
2732
+ "%URIError%": l,
2693
2733
  "%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
2694
2734
  "%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
2695
2735
  "%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
@@ -2782,7 +2822,7 @@ function Cr() {
2782
2822
  "%URIErrorPrototype%": ["URIError", "prototype"],
2783
2823
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2784
2824
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2785
- }, k = Je(), re = /* @__PURE__ */ gs(), q = k.call(B, Array.prototype.concat), R = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), L = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(I) {
2825
+ }, k = We(), re = /* @__PURE__ */ js(), q = k.call(B, Array.prototype.concat), R = k.call(E, Array.prototype.splice), U = k.call(B, String.prototype.replace), C = k.call(B, String.prototype.slice), L = k.call(B, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(I) {
2786
2826
  var F = C(I, 0, 1), _ = C(I, -1);
2787
2827
  if (F === "%" && _ !== "%")
2788
2828
  throw new n("invalid intrinsic syntax, expected closing `%`");
@@ -2813,13 +2853,13 @@ function Cr() {
2813
2853
  throw new a('"allowMissing" argument must be a boolean');
2814
2854
  if (L(/^%?[^%]*%?$/, I) === null)
2815
2855
  throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2816
- var _ = K(I), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, Oe = G.alias;
2817
- Oe && (Q = Oe[0], R(_, q([0, 1], Oe)));
2818
- for (var Re = 1, Te = !0; Re < _.length; Re += 1) {
2819
- var me = _[Re], ke = C(me, 0, 1), Ee = C(me, -1);
2820
- if ((ke === '"' || ke === "'" || ke === "`" || Ee === '"' || Ee === "'" || Ee === "`") && ke !== Ee)
2856
+ var _ = K(I), Q = _.length > 0 ? _[0] : "", G = ne("%" + Q + "%", F), Y = G.name, oe = G.value, he = !1, Se = G.alias;
2857
+ Se && (Q = Se[0], R(_, q([0, 1], Se)));
2858
+ for (var qe = 1, Oe = !0; qe < _.length; qe += 1) {
2859
+ var me = _[qe], Re = C(me, 0, 1), ke = C(me, -1);
2860
+ if ((Re === '"' || Re === "'" || Re === "`" || ke === '"' || ke === "'" || ke === "`") && Re !== ke)
2821
2861
  throw new n("property names with quotes must have matching quotes");
2822
- if ((me === "constructor" || !Te) && (he = !0), Q += "." + me, Y = "%" + Q + "%", re(H, Y))
2862
+ if ((me === "constructor" || !Oe) && (he = !0), Q += "." + me, Y = "%" + Q + "%", re(H, Y))
2823
2863
  oe = H[Y];
2824
2864
  else if (oe != null) {
2825
2865
  if (!(me in oe)) {
@@ -2827,24 +2867,24 @@ function Cr() {
2827
2867
  throw new a("base intrinsic for " + I + " exists, but the property is not available.");
2828
2868
  return;
2829
2869
  }
2830
- if (y && Re + 1 >= _.length) {
2831
- var Pe = y(oe, me);
2832
- Te = !!Pe, Te && "get" in Pe && !("originalValue" in Pe.get) ? oe = Pe.get : oe = oe[me];
2870
+ if (y && qe + 1 >= _.length) {
2871
+ var Te = y(oe, me);
2872
+ Oe = !!Te, Oe && "get" in Te && !("originalValue" in Te.get) ? oe = Te.get : oe = oe[me];
2833
2873
  } else
2834
- Te = re(oe, me), oe = oe[me];
2835
- Te && !he && (H[Y] = oe);
2874
+ Oe = re(oe, me), oe = oe[me];
2875
+ Oe && !he && (H[Y] = oe);
2836
2876
  }
2837
2877
  }
2838
2878
  return oe;
2839
2879
  }, Xt;
2840
2880
  }
2841
- var Zt = { exports: {} }, er, _n;
2842
- function vs() {
2843
- if (_n) return er;
2844
- _n = 1;
2845
- var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ xo(), t = /* @__PURE__ */ We(), o = /* @__PURE__ */ ot();
2846
- return er = function(l, n, a) {
2847
- if (!l || typeof l != "object" && typeof l != "function")
2881
+ var Zt = { exports: {} }, er, Bn;
2882
+ function $s() {
2883
+ if (Bn) return er;
2884
+ Bn = 1;
2885
+ var e = /* @__PURE__ */ at(), r = /* @__PURE__ */ jo(), t = /* @__PURE__ */ Ge(), o = /* @__PURE__ */ ot();
2886
+ return er = function(s, n, a) {
2887
+ if (!s || typeof s != "object" && typeof s != "function")
2848
2888
  throw new t("`obj` must be an object or a function`");
2849
2889
  if (typeof n != "string" && typeof n != "symbol")
2850
2890
  throw new t("`property` must be a string or a symbol`");
@@ -2856,24 +2896,24 @@ function vs() {
2856
2896
  throw new t("`nonConfigurable`, if provided, must be a boolean or null");
2857
2897
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2858
2898
  throw new t("`loose`, if provided, must be a boolean");
2859
- var s = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, f = arguments.length > 5 ? arguments[5] : null, g = arguments.length > 6 ? arguments[6] : !1, b = !!o && o(l, n);
2899
+ var l = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, f = arguments.length > 5 ? arguments[5] : null, g = arguments.length > 6 ? arguments[6] : !1, b = !!o && o(s, n);
2860
2900
  if (e)
2861
- e(l, n, {
2901
+ e(s, n, {
2862
2902
  configurable: f === null && b ? b.configurable : !f,
2863
- enumerable: s === null && b ? b.enumerable : !s,
2903
+ enumerable: l === null && b ? b.enumerable : !l,
2864
2904
  value: a,
2865
2905
  writable: c === null && b ? b.writable : !c
2866
2906
  });
2867
- else if (g || !s && !c && !f)
2868
- l[n] = a;
2907
+ else if (g || !l && !c && !f)
2908
+ s[n] = a;
2869
2909
  else
2870
2910
  throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2871
2911
  }, er;
2872
2912
  }
2873
- var tr, Bn;
2874
- function bs() {
2875
- if (Bn) return tr;
2876
- Bn = 1;
2913
+ var tr, Hn;
2914
+ function ws() {
2915
+ if (Hn) return tr;
2916
+ Hn = 1;
2877
2917
  var e = /* @__PURE__ */ at(), r = function() {
2878
2918
  return !!e;
2879
2919
  };
@@ -2887,15 +2927,15 @@ function bs() {
2887
2927
  }
2888
2928
  }, tr = r, tr;
2889
2929
  }
2890
- var rr, Hn;
2891
- function xs() {
2892
- if (Hn) return rr;
2893
- Hn = 1;
2894
- var e = /* @__PURE__ */ Cr(), r = /* @__PURE__ */ vs(), t = /* @__PURE__ */ bs()(), o = /* @__PURE__ */ ot(), i = /* @__PURE__ */ We(), l = e("%Math.floor%");
2895
- return rr = function(a, s) {
2930
+ var rr, Mn;
2931
+ function Ss() {
2932
+ if (Mn) return rr;
2933
+ Mn = 1;
2934
+ var e = /* @__PURE__ */ Nr(), r = /* @__PURE__ */ $s(), t = /* @__PURE__ */ ws()(), o = /* @__PURE__ */ ot(), i = /* @__PURE__ */ Ge(), s = e("%Math.floor%");
2935
+ return rr = function(a, l) {
2896
2936
  if (typeof a != "function")
2897
2937
  throw new i("`fn` is not a function");
2898
- if (typeof s != "number" || s < 0 || s > 4294967295 || l(s) !== s)
2938
+ if (typeof l != "number" || l < 0 || l > 4294967295 || s(l) !== l)
2899
2939
  throw new i("`length` must be a positive 32-bit integer");
2900
2940
  var c = arguments.length > 2 && !!arguments[2], f = !0, g = !0;
2901
2941
  if ("length" in a && o) {
@@ -2906,59 +2946,59 @@ function xs() {
2906
2946
  /** @type {Parameters<define>[0]} */
2907
2947
  a,
2908
2948
  "length",
2909
- s,
2949
+ l,
2910
2950
  !0,
2911
2951
  !0
2912
2952
  ) : r(
2913
2953
  /** @type {Parameters<define>[0]} */
2914
2954
  a,
2915
2955
  "length",
2916
- s
2956
+ l
2917
2957
  )), a;
2918
2958
  }, rr;
2919
2959
  }
2920
- var nr, Mn;
2921
- function js() {
2922
- if (Mn) return nr;
2923
- Mn = 1;
2924
- var e = Je(), r = Pr(), t = wo();
2960
+ var nr, zn;
2961
+ function Os() {
2962
+ if (zn) return nr;
2963
+ zn = 1;
2964
+ var e = We(), r = Cr(), t = So();
2925
2965
  return nr = function() {
2926
2966
  return t(e, r, arguments);
2927
2967
  }, nr;
2928
2968
  }
2929
- var zn;
2930
- function $s() {
2931
- return zn || (zn = 1, function(e) {
2932
- var r = /* @__PURE__ */ xs(), t = /* @__PURE__ */ at(), o = So(), i = js();
2969
+ var Gn;
2970
+ function Ts() {
2971
+ return Gn || (Gn = 1, function(e) {
2972
+ var r = /* @__PURE__ */ Ss(), t = /* @__PURE__ */ at(), o = Oo(), i = Os();
2933
2973
  e.exports = function(n) {
2934
- var a = o(arguments), s = n.length - (arguments.length - 1);
2974
+ var a = o(arguments), l = n.length - (arguments.length - 1);
2935
2975
  return r(
2936
2976
  a,
2937
- 1 + (s > 0 ? s : 0),
2977
+ 1 + (l > 0 ? l : 0),
2938
2978
  !0
2939
2979
  );
2940
2980
  }, t ? t(e.exports, "apply", { value: i }) : e.exports.apply = i;
2941
2981
  }(Zt)), Zt.exports;
2942
2982
  }
2943
- var or, Gn;
2944
- function ws() {
2945
- if (Gn) return or;
2946
- Gn = 1;
2947
- var e = /* @__PURE__ */ Cr(), r = $s(), t = r(e("String.prototype.indexOf"));
2948
- return or = function(i, l) {
2949
- var n = e(i, !!l);
2983
+ var or, Wn;
2984
+ function Ps() {
2985
+ if (Wn) return or;
2986
+ Wn = 1;
2987
+ var e = /* @__PURE__ */ Nr(), r = Ts(), t = r(e("String.prototype.indexOf"));
2988
+ return or = function(i, s) {
2989
+ var n = e(i, !!s);
2950
2990
  return typeof n == "function" && t(i, ".prototype.") > -1 ? r(n) : n;
2951
2991
  }, or;
2952
2992
  }
2953
- const Ss = {}, Os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2993
+ const Cs = {}, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2954
2994
  __proto__: null,
2955
- default: Ss
2956
- }, Symbol.toStringTag, { value: "Module" })), Ts = /* @__PURE__ */ $a(Os);
2957
- var ar, Wn;
2958
- function Ps() {
2959
- if (Wn) return ar;
2960
- Wn = 1;
2961
- var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && l && typeof l.get == "function" ? l.get : null, a = i && Set.prototype.forEach, s = typeof WeakMap == "function" && WeakMap.prototype, c = s ? WeakMap.prototype.has : null, f = typeof WeakSet == "function" && WeakSet.prototype, g = f ? WeakSet.prototype.has : null, b = typeof WeakRef == "function" && WeakRef.prototype, m = b ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, v = Object.prototype.toString, p = Function.prototype.toString, h = String.prototype.match, y = String.prototype.slice, S = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, O = RegExp.prototype.test, x = Array.prototype.concat, N = Array.prototype.join, A = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, le = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function($) {
2995
+ default: Cs
2996
+ }, Symbol.toStringTag, { value: "Module" })), qs = /* @__PURE__ */ Sa(Ns);
2997
+ var ar, Jn;
2998
+ function Rs() {
2999
+ if (Jn) return ar;
3000
+ Jn = 1;
3001
+ var e = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && r && typeof r.get == "function" ? r.get : null, o = e && Map.prototype.forEach, i = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, n = i && s && typeof s.get == "function" ? s.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, f = typeof WeakSet == "function" && WeakSet.prototype, g = f ? WeakSet.prototype.has : null, b = typeof WeakRef == "function" && WeakRef.prototype, m = b ? WeakRef.prototype.deref : null, j = Boolean.prototype.valueOf, v = Object.prototype.toString, p = Function.prototype.toString, h = String.prototype.match, y = String.prototype.slice, S = String.prototype.replace, T = String.prototype.toUpperCase, d = String.prototype.toLowerCase, O = RegExp.prototype.test, x = Array.prototype.concat, N = Array.prototype.join, A = Array.prototype.slice, E = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, H = typeof Symbol == "function" && typeof Symbol.iterator == "object", D = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === H || !0) ? Symbol.toStringTag : null, le = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function($) {
2962
3002
  return $.__proto__;
2963
3003
  } : null);
2964
3004
  function k($, w) {
@@ -2974,7 +3014,7 @@ function Ps() {
2974
3014
  }
2975
3015
  return S.call(w, X, "$&_");
2976
3016
  }
2977
- var re = Ts, q = re.custom, R = F(q) ? q : null;
3017
+ var re = qs, q = re.custom, R = F(q) ? q : null;
2978
3018
  ar = function $(w, X, ee, ie) {
2979
3019
  var M = X || {};
2980
3020
  if (G(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
@@ -2988,7 +3028,7 @@ function Ps() {
2988
3028
  throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
2989
3029
  if (G(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
2990
3030
  throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
2991
- var Ce = M.numericSeparator;
3031
+ var Pe = M.numericSeparator;
2992
3032
  if (typeof w > "u")
2993
3033
  return "undefined";
2994
3034
  if (w === null)
@@ -2996,55 +3036,55 @@ function Ps() {
2996
3036
  if (typeof w == "boolean")
2997
3037
  return w ? "true" : "false";
2998
3038
  if (typeof w == "string")
2999
- return Pe(w, M);
3039
+ return Te(w, M);
3000
3040
  if (typeof w == "number") {
3001
3041
  if (w === 0)
3002
3042
  return 1 / 0 / w > 0 ? "0" : "-0";
3003
3043
  var de = String(w);
3004
- return Ce ? k(w, de) : de;
3044
+ return Pe ? k(w, de) : de;
3005
3045
  }
3006
3046
  if (typeof w == "bigint") {
3007
3047
  var $e = String(w) + "n";
3008
- return Ce ? k(w, $e) : $e;
3048
+ return Pe ? k(w, $e) : $e;
3009
3049
  }
3010
3050
  var lt = typeof M.depth > "u" ? 5 : M.depth;
3011
3051
  if (typeof ee > "u" && (ee = 0), ee >= lt && lt > 0 && typeof w == "object")
3012
3052
  return L(w) ? "[Array]" : "[Object]";
3013
- var Ae = Ao(M, ee);
3053
+ var Ee = Io(M, ee);
3014
3054
  if (typeof ie > "u")
3015
3055
  ie = [];
3016
3056
  else if (he(ie, w) >= 0)
3017
3057
  return "[Circular]";
3018
- function ge(Ie, Qe, Lo) {
3019
- if (Qe && (ie = A.call(ie), ie.push(Qe)), Lo) {
3020
- var Br = {
3058
+ function ge(Ae, De, Uo) {
3059
+ if (De && (ie = A.call(ie), ie.push(De)), Uo) {
3060
+ var Hr = {
3021
3061
  depth: M.depth
3022
3062
  };
3023
- return G(M, "quoteStyle") && (Br.quoteStyle = M.quoteStyle), $(Ie, Br, ee + 1, ie);
3063
+ return G(M, "quoteStyle") && (Hr.quoteStyle = M.quoteStyle), $(Ae, Hr, ee + 1, ie);
3024
3064
  }
3025
- return $(Ie, M, ee + 1, ie);
3065
+ return $(Ae, M, ee + 1, ie);
3026
3066
  }
3027
3067
  if (typeof w == "function" && !z(w)) {
3028
- var Er = oe(w), Ar = Ve(w, ge);
3029
- return "[Function" + (Er ? ": " + Er : " (anonymous)") + "]" + (Ar.length > 0 ? " { " + N.call(Ar, ", ") + " }" : "");
3068
+ var Ar = oe(w), Ir = Je(w, ge);
3069
+ return "[Function" + (Ar ? ": " + Ar : " (anonymous)") + "]" + (Ir.length > 0 ? " { " + N.call(Ir, ", ") + " }" : "");
3030
3070
  }
3031
3071
  if (F(w)) {
3032
- var Ir = H ? S.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
3033
- return typeof w == "object" && !H ? Ue(Ir) : Ir;
3072
+ var Lr = H ? S.call(String(w), /^(Symbol\(.*\))_[^)]*$/, "$1") : ae.call(w);
3073
+ return typeof w == "object" && !H ? Le(Lr) : Lr;
3034
3074
  }
3035
- if (Ee(w)) {
3036
- for (var Fe = "<" + d.call(String(w.nodeName)), ct = w.attributes || [], De = 0; De < ct.length; De++)
3037
- Fe += " " + ct[De].name + "=" + U(C(ct[De].value), "double", M);
3038
- return Fe += ">", w.childNodes && w.childNodes.length && (Fe += "..."), Fe += "</" + d.call(String(w.nodeName)) + ">", Fe;
3075
+ if (ke(w)) {
3076
+ for (var Ue = "<" + d.call(String(w.nodeName)), ct = w.attributes || [], Ve = 0; Ve < ct.length; Ve++)
3077
+ Ue += " " + ct[Ve].name + "=" + U(C(ct[Ve].value), "double", M);
3078
+ return Ue += ">", w.childNodes && w.childNodes.length && (Ue += "..."), Ue += "</" + d.call(String(w.nodeName)) + ">", Ue;
3039
3079
  }
3040
3080
  if (L(w)) {
3041
3081
  if (w.length === 0)
3042
3082
  return "[]";
3043
- var ut = Ve(w, ge);
3044
- return Ae && !Eo(ut) ? "[" + st(ut, Ae) + "]" : "[ " + N.call(ut, ", ") + " ]";
3083
+ var ut = Je(w, ge);
3084
+ return Ee && !Ao(ut) ? "[" + st(ut, Ee) + "]" : "[ " + N.call(ut, ", ") + " ]";
3045
3085
  }
3046
3086
  if (K(w)) {
3047
- var ft = Ve(w, ge);
3087
+ var ft = Je(w, ge);
3048
3088
  return !("cause" in Error.prototype) && "cause" in w && !le.call(w, "cause") ? "{ [" + String(w) + "] " + N.call(x.call("[cause]: " + ge(w.cause), ft), ", ") + " }" : ft.length === 0 ? "[" + String(w) + "]" : "{ [" + String(w) + "] " + N.call(ft, ", ") + " }";
3049
3089
  }
3050
3090
  if (typeof w == "object" && je) {
@@ -3053,39 +3093,39 @@ function Ps() {
3053
3093
  if (je !== "symbol" && typeof w.inspect == "function")
3054
3094
  return w.inspect();
3055
3095
  }
3056
- if (Oe(w)) {
3057
- var Lr = [];
3058
- return o && o.call(w, function(Ie, Qe) {
3059
- Lr.push(ge(Qe, w, !0) + " => " + ge(Ie, w));
3060
- }), kr("Map", t.call(w), Lr, Ae);
3096
+ if (Se(w)) {
3097
+ var Ur = [];
3098
+ return o && o.call(w, function(Ae, De) {
3099
+ Ur.push(ge(De, w, !0) + " => " + ge(Ae, w));
3100
+ }), Er("Map", t.call(w), Ur, Ee);
3061
3101
  }
3062
3102
  if (me(w)) {
3063
- var Ur = [];
3064
- return a && a.call(w, function(Ie) {
3065
- Ur.push(ge(Ie, w));
3066
- }), kr("Set", n.call(w), Ur, Ae);
3103
+ var Fr = [];
3104
+ return a && a.call(w, function(Ae) {
3105
+ Fr.push(ge(Ae, w));
3106
+ }), Er("Set", n.call(w), Fr, Ee);
3067
3107
  }
3068
- if (Re(w))
3108
+ if (qe(w))
3069
3109
  return it("WeakMap");
3070
- if (ke(w))
3110
+ if (Re(w))
3071
3111
  return it("WeakSet");
3072
- if (Te(w))
3112
+ if (Oe(w))
3073
3113
  return it("WeakRef");
3074
3114
  if (J(w))
3075
- return Ue(ge(Number(w)));
3115
+ return Le(ge(Number(w)));
3076
3116
  if (_(w))
3077
- return Ue(ge(B.call(w)));
3117
+ return Le(ge(B.call(w)));
3078
3118
  if (I(w))
3079
- return Ue(j.call(w));
3119
+ return Le(j.call(w));
3080
3120
  if (ne(w))
3081
- return Ue(ge(String(w)));
3121
+ return Le(ge(String(w)));
3082
3122
  if (typeof window < "u" && w === window)
3083
3123
  return "{ [object Window] }";
3084
- if (typeof globalThis < "u" && w === globalThis || typeof Ze < "u" && w === Ze)
3124
+ if (typeof globalThis < "u" && w === globalThis || typeof Xe < "u" && w === Xe)
3085
3125
  return "{ [object globalThis] }";
3086
3126
  if (!W(w) && !z(w)) {
3087
- var pt = Ve(w, ge), Fr = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, dt = w instanceof Object ? "" : "null prototype", _r = !Fr && D && Object(w) === w && D in w ? y.call(Y(w), 8, -1) : dt ? "Object" : "", Io = Fr || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", ht = Io + (_r || dt ? "[" + N.call(x.call([], _r || [], dt || []), ": ") + "] " : "");
3088
- return pt.length === 0 ? ht + "{}" : Ae ? ht + "{" + st(pt, Ae) + "}" : ht + "{ " + N.call(pt, ", ") + " }";
3127
+ var pt = Je(w, ge), _r = Z ? Z(w) === Object.prototype : w instanceof Object || w.constructor === Object, dt = w instanceof Object ? "" : "null prototype", Br = !_r && D && Object(w) === w && D in w ? y.call(Y(w), 8, -1) : dt ? "Object" : "", Lo = _r || typeof w.constructor != "function" ? "" : w.constructor.name ? w.constructor.name + " " : "", ht = Lo + (Br || dt ? "[" + N.call(x.call([], Br || [], dt || []), ": ") + "] " : "");
3128
+ return pt.length === 0 ? ht + "{}" : Ee ? ht + "{" + st(pt, Ee) + "}" : ht + "{ " + N.call(pt, ", ") + " }";
3089
3129
  }
3090
3130
  return String(w);
3091
3131
  };
@@ -3162,7 +3202,7 @@ function Ps() {
3162
3202
  return X;
3163
3203
  return -1;
3164
3204
  }
3165
- function Oe($) {
3205
+ function Se($) {
3166
3206
  if (!t || !$ || typeof $ != "object")
3167
3207
  return !1;
3168
3208
  try {
@@ -3177,7 +3217,7 @@ function Ps() {
3177
3217
  }
3178
3218
  return !1;
3179
3219
  }
3180
- function Re($) {
3220
+ function qe($) {
3181
3221
  if (!c || !$ || typeof $ != "object")
3182
3222
  return !1;
3183
3223
  try {
@@ -3192,7 +3232,7 @@ function Ps() {
3192
3232
  }
3193
3233
  return !1;
3194
3234
  }
3195
- function Te($) {
3235
+ function Oe($) {
3196
3236
  if (!m || !$ || typeof $ != "object")
3197
3237
  return !1;
3198
3238
  try {
@@ -3216,7 +3256,7 @@ function Ps() {
3216
3256
  }
3217
3257
  return !1;
3218
3258
  }
3219
- function ke($) {
3259
+ function Re($) {
3220
3260
  if (!g || !$ || typeof $ != "object")
3221
3261
  return !1;
3222
3262
  try {
@@ -3231,18 +3271,18 @@ function Ps() {
3231
3271
  }
3232
3272
  return !1;
3233
3273
  }
3234
- function Ee($) {
3274
+ function ke($) {
3235
3275
  return !$ || typeof $ != "object" ? !1 : typeof HTMLElement < "u" && $ instanceof HTMLElement ? !0 : typeof $.nodeName == "string" && typeof $.getAttribute == "function";
3236
3276
  }
3237
- function Pe($, w) {
3277
+ function Te($, w) {
3238
3278
  if ($.length > w.maxStringLength) {
3239
3279
  var X = $.length - w.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
3240
- return Pe(y.call($, 0, w.maxStringLength), w) + ee;
3280
+ return Te(y.call($, 0, w.maxStringLength), w) + ee;
3241
3281
  }
3242
- var ie = S.call(S.call($, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, ko);
3282
+ var ie = S.call(S.call($, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Eo);
3243
3283
  return U(ie, "single", w);
3244
3284
  }
3245
- function ko($) {
3285
+ function Eo($) {
3246
3286
  var w = $.charCodeAt(0), X = {
3247
3287
  8: "b",
3248
3288
  9: "t",
@@ -3252,24 +3292,24 @@ function Ps() {
3252
3292
  }[w];
3253
3293
  return X ? "\\" + X : "\\x" + (w < 16 ? "0" : "") + T.call(w.toString(16));
3254
3294
  }
3255
- function Ue($) {
3295
+ function Le($) {
3256
3296
  return "Object(" + $ + ")";
3257
3297
  }
3258
3298
  function it($) {
3259
3299
  return $ + " { ? }";
3260
3300
  }
3261
- function kr($, w, X, ee) {
3301
+ function Er($, w, X, ee) {
3262
3302
  var ie = ee ? st(X, ee) : N.call(X, ", ");
3263
3303
  return $ + " (" + w + ") {" + ie + "}";
3264
3304
  }
3265
- function Eo($) {
3305
+ function Ao($) {
3266
3306
  for (var w = 0; w < $.length; w++)
3267
3307
  if (he($[w], `
3268
3308
  `) >= 0)
3269
3309
  return !1;
3270
3310
  return !0;
3271
3311
  }
3272
- function Ao($, w) {
3312
+ function Io($, w) {
3273
3313
  var X;
3274
3314
  if ($.indent === " ")
3275
3315
  X = " ";
@@ -3290,7 +3330,7 @@ function Ps() {
3290
3330
  return X + N.call($, "," + X) + `
3291
3331
  ` + w.prev;
3292
3332
  }
3293
- function Ve($, w) {
3333
+ function Je($, w) {
3294
3334
  var X = L($), ee = [];
3295
3335
  if (X) {
3296
3336
  ee.length = $.length;
@@ -3300,8 +3340,8 @@ function Ps() {
3300
3340
  var M = typeof P == "function" ? P($) : [], je;
3301
3341
  if (H) {
3302
3342
  je = {};
3303
- for (var Ce = 0; Ce < M.length; Ce++)
3304
- je["$" + M[Ce]] = M[Ce];
3343
+ for (var Pe = 0; Pe < M.length; Pe++)
3344
+ je["$" + M[Pe]] = M[Pe];
3305
3345
  }
3306
3346
  for (var de in $)
3307
3347
  G($, de) && (X && String(Number(de)) === de && de < $.length || H && je["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(w(de, $) + ": " + w($[de], $)) : ee.push(de + ": " + w($[de], $))));
@@ -3312,11 +3352,11 @@ function Ps() {
3312
3352
  }
3313
3353
  return ar;
3314
3354
  }
3315
- var ir, Jn;
3316
- function Cs() {
3317
- if (Jn) return ir;
3318
- Jn = 1;
3319
- var e = /* @__PURE__ */ Cr(), r = ws(), t = /* @__PURE__ */ Ps(), o = /* @__PURE__ */ We(), i = e("%WeakMap%", !0), l = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), s = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), f = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), b = function(p, h) {
3355
+ var ir, Vn;
3356
+ function ks() {
3357
+ if (Vn) return ir;
3358
+ Vn = 1;
3359
+ var e = /* @__PURE__ */ Nr(), r = Ps(), t = /* @__PURE__ */ Rs(), o = /* @__PURE__ */ Ge(), i = e("%WeakMap%", !0), s = e("%Map%", !0), n = r("WeakMap.prototype.get", !0), a = r("WeakMap.prototype.set", !0), l = r("WeakMap.prototype.has", !0), c = r("Map.prototype.get", !0), f = r("Map.prototype.set", !0), g = r("Map.prototype.has", !0), b = function(p, h) {
3320
3360
  for (var y = p, S; (S = y.next) !== null; y = S)
3321
3361
  if (S.key === h)
3322
3362
  return y.next = S.next, S.next = /** @type {NonNullable<typeof list.next>} */
@@ -3346,7 +3386,7 @@ function Cs() {
3346
3386
  if (i && d && (typeof d == "object" || typeof d == "function")) {
3347
3387
  if (h)
3348
3388
  return n(h, d);
3349
- } else if (l) {
3389
+ } else if (s) {
3350
3390
  if (y)
3351
3391
  return c(y, d);
3352
3392
  } else if (S)
@@ -3355,8 +3395,8 @@ function Cs() {
3355
3395
  has: function(d) {
3356
3396
  if (i && d && (typeof d == "object" || typeof d == "function")) {
3357
3397
  if (h)
3358
- return s(h, d);
3359
- } else if (l) {
3398
+ return l(h, d);
3399
+ } else if (s) {
3360
3400
  if (y)
3361
3401
  return g(y, d);
3362
3402
  } else if (S)
@@ -3364,16 +3404,16 @@ function Cs() {
3364
3404
  return !1;
3365
3405
  },
3366
3406
  set: function(d, O) {
3367
- i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d, O)) : l ? (y || (y = new l()), f(y, d, O)) : (S || (S = { key: {}, next: null }), j(S, d, O));
3407
+ i && d && (typeof d == "object" || typeof d == "function") ? (h || (h = new i()), a(h, d, O)) : s ? (y || (y = new s()), f(y, d, O)) : (S || (S = { key: {}, next: null }), j(S, d, O));
3368
3408
  }
3369
3409
  };
3370
3410
  return T;
3371
3411
  }, ir;
3372
3412
  }
3373
- var sr, Vn;
3374
- function Nr() {
3375
- if (Vn) return sr;
3376
- Vn = 1;
3413
+ var sr, Dn;
3414
+ function qr() {
3415
+ if (Dn) return sr;
3416
+ Dn = 1;
3377
3417
  var e = String.prototype.replace, r = /%20/g, t = {
3378
3418
  RFC1738: "RFC1738",
3379
3419
  RFC3986: "RFC3986"
@@ -3392,11 +3432,11 @@ function Nr() {
3392
3432
  RFC3986: t.RFC3986
3393
3433
  }, sr;
3394
3434
  }
3395
- var lr, Dn;
3396
- function Oo() {
3397
- if (Dn) return lr;
3398
- Dn = 1;
3399
- var e = /* @__PURE__ */ Nr(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
3435
+ var lr, Qn;
3436
+ function To() {
3437
+ if (Qn) return lr;
3438
+ Qn = 1;
3439
+ var e = /* @__PURE__ */ qr(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = function() {
3400
3440
  for (var p = [], h = 0; h < 256; ++h)
3401
3441
  p.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
3402
3442
  return p;
@@ -3409,7 +3449,7 @@ function Oo() {
3409
3449
  y.obj[y.prop] = T;
3410
3450
  }
3411
3451
  }
3412
- }, l = function(h, y) {
3452
+ }, s = function(h, y) {
3413
3453
  for (var S = y && y.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, T = 0; T < h.length; ++T)
3414
3454
  typeof h[T] < "u" && (S[T] = h[T]);
3415
3455
  return S;
@@ -3428,7 +3468,7 @@ function Oo() {
3428
3468
  if (!h || typeof h != "object")
3429
3469
  return [h].concat(y);
3430
3470
  var T = h;
3431
- return t(h) && !t(y) && (T = l(h, S)), t(h) && t(y) ? (y.forEach(function(d, O) {
3471
+ return t(h) && !t(y) && (T = s(h, S)), t(h) && t(y) ? (y.forEach(function(d, O) {
3432
3472
  if (r.call(h, O)) {
3433
3473
  var x = h[O];
3434
3474
  x && typeof x == "object" && d && typeof d == "object" ? h[O] = p(x, d, S) : h.push(d);
@@ -3442,7 +3482,7 @@ function Oo() {
3442
3482
  return Object.keys(y).reduce(function(S, T) {
3443
3483
  return S[T] = y[T], S;
3444
3484
  }, h);
3445
- }, s = function(p, h, y) {
3485
+ }, l = function(p, h, y) {
3446
3486
  var S = p.replace(/\+/g, " ");
3447
3487
  if (y === "iso-8859-1")
3448
3488
  return S.replace(/%[0-9a-f]{2}/gi, unescape);
@@ -3505,11 +3545,11 @@ function Oo() {
3505
3545
  return y(h);
3506
3546
  };
3507
3547
  return lr = {
3508
- arrayToObject: l,
3548
+ arrayToObject: s,
3509
3549
  assign: a,
3510
3550
  combine: j,
3511
3551
  compact: g,
3512
- decode: s,
3552
+ decode: l,
3513
3553
  encode: f,
3514
3554
  isBuffer: m,
3515
3555
  isRegExp: b,
@@ -3517,11 +3557,11 @@ function Oo() {
3517
3557
  merge: n
3518
3558
  }, lr;
3519
3559
  }
3520
- var cr, Qn;
3521
- function Ns() {
3522
- if (Qn) return cr;
3523
- Qn = 1;
3524
- var e = Cs(), r = /* @__PURE__ */ Oo(), t = /* @__PURE__ */ Nr(), o = Object.prototype.hasOwnProperty, i = {
3560
+ var cr, Kn;
3561
+ function Es() {
3562
+ if (Kn) return cr;
3563
+ Kn = 1;
3564
+ var e = ks(), r = /* @__PURE__ */ To(), t = /* @__PURE__ */ qr(), o = Object.prototype.hasOwnProperty, i = {
3525
3565
  brackets: function(p) {
3526
3566
  return p + "[]";
3527
3567
  },
@@ -3532,9 +3572,9 @@ function Ns() {
3532
3572
  repeat: function(p) {
3533
3573
  return p;
3534
3574
  }
3535
- }, l = Array.isArray, n = Array.prototype.push, a = function(v, p) {
3536
- n.apply(v, l(p) ? p : [p]);
3537
- }, s = Date.prototype.toISOString, c = t.default, f = {
3575
+ }, s = Array.isArray, n = Array.prototype.push, a = function(v, p) {
3576
+ n.apply(v, s(p) ? p : [p]);
3577
+ }, l = Date.prototype.toISOString, c = t.default, f = {
3538
3578
  addQueryPrefix: !1,
3539
3579
  allowDots: !1,
3540
3580
  allowEmptyArrays: !1,
@@ -3551,7 +3591,7 @@ function Ns() {
3551
3591
  // deprecated
3552
3592
  indices: !1,
3553
3593
  serializeDate: function(p) {
3554
- return s.call(p);
3594
+ return l.call(p);
3555
3595
  },
3556
3596
  skipNulls: !1,
3557
3597
  strictNullHandling: !1
@@ -3567,7 +3607,7 @@ function Ns() {
3567
3607
  }
3568
3608
  typeof re.get(b) > "u" && (q = 0);
3569
3609
  }
3570
- if (typeof A == "function" ? k = A(h, k) : k instanceof Date ? k = P(k) : y === "comma" && l(k) && (k = r.maybeMap(k, function(Y) {
3610
+ if (typeof A == "function" ? k = A(h, k) : k instanceof Date ? k = P(k) : y === "comma" && s(k) && (k = r.maybeMap(k, function(Y) {
3571
3611
  return Y instanceof Date ? P(Y) : Y;
3572
3612
  })), k === null) {
3573
3613
  if (d)
@@ -3585,21 +3625,21 @@ function Ns() {
3585
3625
  if (typeof k > "u")
3586
3626
  return L;
3587
3627
  var W;
3588
- if (y === "comma" && l(k))
3628
+ if (y === "comma" && s(k))
3589
3629
  D && N && (k = r.maybeMap(k, N)), W = [{ value: k.length > 0 ? k.join(",") || null : void 0 }];
3590
- else if (l(A))
3630
+ else if (s(A))
3591
3631
  W = A;
3592
3632
  else {
3593
3633
  var z = Object.keys(k);
3594
3634
  W = E ? z.sort(E) : z;
3595
3635
  }
3596
- var K = x ? h.replace(/\./g, "%2E") : h, ne = S && l(k) && k.length === 1 ? K + "[]" : K;
3597
- if (T && l(k) && k.length === 0)
3636
+ var K = x ? h.replace(/\./g, "%2E") : h, ne = S && s(k) && k.length === 1 ? K + "[]" : K;
3637
+ if (T && s(k) && k.length === 0)
3598
3638
  return ne + "[]";
3599
3639
  for (var J = 0; J < W.length; ++J) {
3600
3640
  var I = W[J], F = typeof I == "object" && typeof I.value < "u" ? I.value : k[I];
3601
3641
  if (!(O && F === null)) {
3602
- var _ = B && x ? I.replace(/\./g, "%2E") : I, Q = l(k) ? typeof y == "function" ? y(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3642
+ var _ = B && x ? I.replace(/\./g, "%2E") : I, Q = s(k) ? typeof y == "function" ? y(ne, _) : ne : ne + (B ? "." + _ : "[" + _ + "]");
3603
3643
  Z.set(p, q);
3604
3644
  var G = e();
3605
3645
  G.set(b, Z), a(L, v(
@@ -3611,7 +3651,7 @@ function Ns() {
3611
3651
  d,
3612
3652
  O,
3613
3653
  x,
3614
- y === "comma" && D && l(k) ? null : N,
3654
+ y === "comma" && D && s(k) ? null : N,
3615
3655
  A,
3616
3656
  E,
3617
3657
  B,
@@ -3644,7 +3684,7 @@ function Ns() {
3644
3684
  y = p.format;
3645
3685
  }
3646
3686
  var S = t.formatters[y], T = f.filter;
3647
- (typeof p.filter == "function" || l(p.filter)) && (T = p.filter);
3687
+ (typeof p.filter == "function" || s(p.filter)) && (T = p.filter);
3648
3688
  var d;
3649
3689
  if (p.arrayFormat in i ? d = p.arrayFormat : "indices" in p ? d = p.indices ? "indices" : "repeat" : d = f.arrayFormat, "commaRoundTrip" in p && typeof p.commaRoundTrip != "boolean")
3650
3690
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
@@ -3673,7 +3713,7 @@ function Ns() {
3673
3713
  };
3674
3714
  return cr = function(v, p) {
3675
3715
  var h = v, y = j(p), S, T;
3676
- typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : l(y.filter) && (T = y.filter, S = T);
3716
+ typeof y.filter == "function" ? (T = y.filter, h = T("", h)) : s(y.filter) && (T = y.filter, S = T);
3677
3717
  var d = [];
3678
3718
  if (typeof h != "object" || h === null)
3679
3719
  return "";
@@ -3706,11 +3746,11 @@ function Ns() {
3706
3746
  return y.charsetSentinel && (y.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), B.length > 0 ? P + B : "";
3707
3747
  }, cr;
3708
3748
  }
3709
- var ur, Kn;
3710
- function qs() {
3711
- if (Kn) return ur;
3712
- Kn = 1;
3713
- var e = /* @__PURE__ */ Oo(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
3749
+ var ur, Yn;
3750
+ function As() {
3751
+ if (Yn) return ur;
3752
+ Yn = 1;
3753
+ var e = /* @__PURE__ */ To(), r = Object.prototype.hasOwnProperty, t = Array.isArray, o = {
3714
3754
  allowDots: !1,
3715
3755
  allowEmptyArrays: !1,
3716
3756
  allowPrototypes: !1,
@@ -3735,9 +3775,9 @@ function qs() {
3735
3775
  return b.replace(/&#(\d+);/g, function(m, j) {
3736
3776
  return String.fromCharCode(parseInt(j, 10));
3737
3777
  });
3738
- }, l = function(b, m) {
3778
+ }, s = function(b, m) {
3739
3779
  return b && typeof b == "string" && m.comma && b.indexOf(",") > -1 ? b.split(",") : b;
3740
- }, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", s = function(m, j) {
3780
+ }, n = "utf8=%26%2310003%3B", a = "utf8=%E2%9C%93", l = function(m, j) {
3741
3781
  var v = { __proto__: null }, p = j.ignoreQueryPrefix ? m.replace(/^\?/, "") : m;
3742
3782
  p = p.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
3743
3783
  var h = j.parameterLimit === 1 / 0 ? void 0 : j.parameterLimit, y = p.split(j.delimiter, h), S = -1, T, d = j.charset;
@@ -3748,7 +3788,7 @@ function qs() {
3748
3788
  if (T !== S) {
3749
3789
  var O = y[T], x = O.indexOf("]="), N = x === -1 ? O.indexOf("=") : x + 1, A, E;
3750
3790
  N === -1 ? (A = j.decoder(O, o.decoder, d, "key"), E = j.strictNullHandling ? null : "") : (A = j.decoder(O.slice(0, N), o.decoder, d, "key"), E = e.maybeMap(
3751
- l(O.slice(N + 1), j),
3791
+ s(O.slice(N + 1), j),
3752
3792
  function(P) {
3753
3793
  return j.decoder(P, o.decoder, d, "value");
3754
3794
  }
@@ -3758,7 +3798,7 @@ function qs() {
3758
3798
  }
3759
3799
  return v;
3760
3800
  }, c = function(b, m, j, v) {
3761
- for (var p = v ? m : l(m, j), h = b.length - 1; h >= 0; --h) {
3801
+ for (var p = v ? m : s(m, j), h = b.length - 1; h >= 0; --h) {
3762
3802
  var y, S = b[h];
3763
3803
  if (S === "[]" && j.parseArrays)
3764
3804
  y = j.allowEmptyArrays && (p === "" || j.strictNullHandling && p === null) ? [] : [].concat(p);
@@ -3833,33 +3873,33 @@ function qs() {
3833
3873
  var j = g(m);
3834
3874
  if (b === "" || b === null || typeof b > "u")
3835
3875
  return j.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
3836
- for (var v = typeof b == "string" ? s(b, j) : b, p = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, h = Object.keys(v), y = 0; y < h.length; ++y) {
3876
+ for (var v = typeof b == "string" ? l(b, j) : b, p = j.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, h = Object.keys(v), y = 0; y < h.length; ++y) {
3837
3877
  var S = h[y], T = f(S, v[S], j, typeof b == "string");
3838
3878
  p = e.merge(p, T, j);
3839
3879
  }
3840
3880
  return j.allowSparse === !0 ? p : e.compact(p);
3841
3881
  }, ur;
3842
3882
  }
3843
- var fr, Yn;
3844
- function To() {
3845
- if (Yn) return fr;
3846
- Yn = 1;
3847
- var e = /* @__PURE__ */ Ns(), r = /* @__PURE__ */ qs(), t = /* @__PURE__ */ Nr();
3883
+ var fr, Xn;
3884
+ function Po() {
3885
+ if (Xn) return fr;
3886
+ Xn = 1;
3887
+ var e = /* @__PURE__ */ Es(), r = /* @__PURE__ */ As(), t = /* @__PURE__ */ qr();
3848
3888
  return fr = {
3849
3889
  formats: t,
3850
3890
  parse: r,
3851
3891
  stringify: e
3852
3892
  }, fr;
3853
3893
  }
3854
- var Xn;
3855
- function Rs() {
3856
- if (Xn) return Ne;
3857
- Xn = 1;
3858
- var e = Ki();
3894
+ var Zn;
3895
+ function Is() {
3896
+ if (Zn) return Ce;
3897
+ Zn = 1;
3898
+ var e = es();
3859
3899
  function r() {
3860
3900
  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;
3861
3901
  }
3862
- var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, i = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, l = [
3902
+ var t = /^([a-z0-9.+-]+:)/i, o = /:[0-9]*$/, i = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, s = [
3863
3903
  "<",
3864
3904
  ">",
3865
3905
  '"',
@@ -3876,7 +3916,7 @@ function Rs() {
3876
3916
  "\\",
3877
3917
  "^",
3878
3918
  "`"
3879
- ].concat(l), a = ["'"].concat(n), s = [
3919
+ ].concat(s), a = ["'"].concat(n), l = [
3880
3920
  "%",
3881
3921
  "/",
3882
3922
  "?",
@@ -3903,7 +3943,7 @@ function Rs() {
3903
3943
  "ftp:": !0,
3904
3944
  "gopher:": !0,
3905
3945
  "file:": !0
3906
- }, p = /* @__PURE__ */ To();
3946
+ }, p = /* @__PURE__ */ Po();
3907
3947
  function h(d, O, x) {
3908
3948
  if (d && typeof d == "object" && d instanceof r)
3909
3949
  return d;
@@ -3938,8 +3978,8 @@ function Rs() {
3938
3978
  }
3939
3979
  var q, R;
3940
3980
  Z === -1 ? R = P.lastIndexOf("@") : R = P.lastIndexOf("@", Z), R !== -1 && (q = P.slice(0, R), P = P.slice(R + 1), this.auth = decodeURIComponent(q)), Z = -1;
3941
- for (var k = 0; k < s.length; k++) {
3942
- var re = P.indexOf(s[k]);
3981
+ for (var k = 0; k < l.length; k++) {
3982
+ var re = P.indexOf(l[k]);
3943
3983
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
3944
3984
  }
3945
3985
  Z === -1 && (Z = P.length), this.host = P.slice(0, Z), P = P.slice(Z), this.parseHost(), this.hostname = this.hostname || "";
@@ -3973,8 +4013,8 @@ function Rs() {
3973
4013
  oe !== -1 && (this.hash = P.substr(oe), P = P.slice(0, oe));
3974
4014
  var he = P.indexOf("?");
3975
4015
  if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), O && (this.query = p.parse(this.query)), P = P.slice(0, he)) : O && (this.search = "", this.query = {}), P && (this.pathname = P), v[D] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
3976
- var _ = this.pathname || "", Oe = this.search || "";
3977
- this.path = _ + Oe;
4016
+ var _ = this.pathname || "", Se = this.search || "";
4017
+ this.path = _ + Se;
3978
4018
  }
3979
4019
  return this.href = this.format(), this;
3980
4020
  };
@@ -4072,14 +4112,14 @@ function Rs() {
4072
4112
  }, r.prototype.parseHost = function() {
4073
4113
  var d = this.host, O = o.exec(d);
4074
4114
  O && (O = O[0], O !== ":" && (this.port = O.substr(1)), d = d.substr(0, d.length - O.length)), d && (this.hostname = d);
4075
- }, Ne.parse = h, Ne.resolve = S, Ne.resolveObject = T, Ne.format = y, Ne.Url = r, Ne;
4115
+ }, Ce.parse = h, Ce.resolve = S, Ce.resolveObject = T, Ce.format = y, Ce.Url = r, Ce;
4076
4116
  }
4077
- var pr = Rs(), dr = /* @__PURE__ */ To(), ks = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Es = class {
4117
+ var pr = Is(), dr = /* @__PURE__ */ Po(), Ls = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), Us = class {
4078
4118
  constructor(e, r = {}) {
4079
4119
  this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
4080
4120
  harIsAlreadyEncoded: !1,
4081
4121
  ...r
4082
- }, this.requests = [], ks(e) ? this.entries = e.log.entries : this.entries = [
4122
+ }, this.requests = [], Ls(e) ? this.entries = e.log.entries : this.entries = [
4083
4123
  {
4084
4124
  request: e
4085
4125
  }
@@ -4114,7 +4154,7 @@ var pr = Rs(), dr = /* @__PURE__ */ To(), ks = (e) => typeof e == "object" && "l
4114
4154
  cookiesObj: {},
4115
4155
  allHeaders: {}
4116
4156
  };
4117
- if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Mr, {})), t.headers && t.headers.length) {
4157
+ if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(zr, {})), t.headers && t.headers.length) {
4118
4158
  const m = /^HTTP\/2/;
4119
4159
  t.headersObj = t.headers.reduce((j, { name: v, value: p }) => {
4120
4160
  const h = m.exec(t.httpVersion) ? v.toLocaleLowerCase() : v;
@@ -4152,7 +4192,7 @@ var pr = Rs(), dr = /* @__PURE__ */ To(), ks = (e) => typeof e == "object" && "l
4152
4192
  }
4153
4193
  break;
4154
4194
  case "application/x-www-form-urlencoded":
4155
- t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Mr, {}), t.postData.text = dr.stringify(t.postData.paramsObj)) : t.postData.text = "";
4195
+ t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(zr, {}), t.postData.text = dr.stringify(t.postData.paramsObj)) : t.postData.text = "";
4156
4196
  break;
4157
4197
  case "text/json":
4158
4198
  case "text/x-json":
@@ -4169,10 +4209,10 @@ var pr = Rs(), dr = /* @__PURE__ */ To(), ks = (e) => typeof e == "object" && "l
4169
4209
  const i = {
4170
4210
  ...t.allHeaders,
4171
4211
  ...t.headersObj
4172
- }, l = pr.parse(t.url, !0, !0);
4212
+ }, s = pr.parse(t.url, !0, !0);
4173
4213
  t.queryObj = {
4174
4214
  ...t.queryObj,
4175
- ...l.query
4215
+ ...s.query
4176
4216
  };
4177
4217
  let n;
4178
4218
  r.harIsAlreadyEncoded ? n = dr.stringify(t.queryObj, {
@@ -4182,89 +4222,89 @@ var pr = Rs(), dr = /* @__PURE__ */ To(), ks = (e) => typeof e == "object" && "l
4182
4222
  indices: !1
4183
4223
  });
4184
4224
  const a = {
4185
- ...l,
4225
+ ...s,
4186
4226
  query: t.queryObj,
4187
4227
  search: n,
4188
- path: n ? `${l.pathname}?${n}` : l.pathname
4189
- }, s = pr.format({
4190
- ...l,
4228
+ path: n ? `${s.pathname}?${n}` : s.pathname
4229
+ }, l = pr.format({
4230
+ ...s,
4191
4231
  query: null,
4192
4232
  search: null
4193
4233
  }), c = pr.format({
4194
- ...l,
4234
+ ...s,
4195
4235
  ...a
4196
4236
  });
4197
4237
  return {
4198
4238
  ...t,
4199
4239
  allHeaders: i,
4200
4240
  fullUrl: c,
4201
- url: s,
4241
+ url: l,
4202
4242
  uriObj: a
4203
4243
  };
4204
4244
  }
4205
4245
  convert(e, r, t) {
4206
4246
  this.initCalled || this.init(), !t && r && (t = r);
4207
- const o = Di[e];
4247
+ const o = Xi[e];
4208
4248
  if (!o)
4209
4249
  return !1;
4210
4250
  const { convert: i } = o.clientsById[r || o.info.default];
4211
4251
  return this.requests.map((n) => i(n, t));
4212
4252
  }
4213
4253
  };
4214
- const As = ({
4254
+ const Fs = ({
4215
4255
  rootMargin: e = "0px",
4216
4256
  threshold: r
4217
4257
  } = {}) => {
4218
- const [t, o] = ye(!1), i = co(null);
4219
- return wr(() => {
4220
- const l = new IntersectionObserver(
4258
+ const [t, o] = ye(!1), i = uo(null);
4259
+ return Sr(() => {
4260
+ const s = new IntersectionObserver(
4221
4261
  ([a]) => {
4222
4262
  a && o(a.isIntersecting);
4223
4263
  },
4224
4264
  { rootMargin: e, threshold: r }
4225
4265
  ), n = i.current;
4226
4266
  if (n)
4227
- return l.observe(n), () => l.unobserve(n);
4267
+ return s.observe(n), () => s.unobserve(n);
4228
4268
  }, [e, r]), [i, t];
4229
- }, Is = typeof window < "u" ? ua : wr, Po = ({
4269
+ }, _s = typeof window < "u" ? pa : Sr, Co = ({
4230
4270
  children: e,
4231
4271
  maxHeight: r = 250
4232
4272
  }) => {
4233
- const t = co(null), [o, i] = ye(!1), [l, n] = ye(!1);
4234
- return Is(() => {
4273
+ const t = uo(null), [o, i] = ye(!1), [s, n] = ye(!1);
4274
+ return _s(() => {
4235
4275
  const a = t.current;
4236
4276
  if (!a) return;
4237
4277
  i(a.scrollHeight > r);
4238
- const s = new ResizeObserver(() => {
4278
+ const l = new ResizeObserver(() => {
4239
4279
  i(a.scrollHeight > r);
4240
4280
  });
4241
- return s.observe(a), () => s.disconnect();
4281
+ return l.observe(a), () => l.disconnect();
4242
4282
  }, [r]), /* @__PURE__ */ u.jsxs(
4243
- oo,
4283
+ ao,
4244
4284
  {
4245
4285
  className: "group",
4246
- open: l,
4286
+ open: s,
4247
4287
  onOpenChange: n,
4248
4288
  style: { "--max-height": `${r}px` },
4249
4289
  children: [
4250
4290
  /* @__PURE__ */ u.jsxs(
4251
- ao,
4291
+ io,
4252
4292
  {
4253
4293
  forceMount: !0,
4254
4294
  className: se(
4255
4295
  "relative overflow-hidden group",
4256
- !l && o && "max-h-[--max-height]"
4296
+ !s && o && "max-h-[--max-height]"
4257
4297
  ),
4258
4298
  children: [
4259
- !l && o && /* @__PURE__ */ u.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
4299
+ !s && o && /* @__PURE__ */ u.jsx("div", { className: " absolute inset-0 bg-gradient-to-b from-transparent to-zinc-50/60 dark:to-zinc-950/90 z-10 group-hover:to-transparent" }),
4260
4300
  /* @__PURE__ */ u.jsx("div", { ref: t, children: e }),
4261
- !l && o && /* @__PURE__ */ u.jsx(
4301
+ !s && o && /* @__PURE__ */ u.jsx(
4262
4302
  yr,
4263
4303
  {
4264
4304
  className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
4265
4305
  asChild: !0,
4266
4306
  children: /* @__PURE__ */ u.jsx("div", { children: /* @__PURE__ */ u.jsxs(gr, { variant: "outline", className: "hidden group-hover:flex", children: [
4267
- /* @__PURE__ */ u.jsx(Mo, { size: 14, className: "mr-1.5" }),
4307
+ /* @__PURE__ */ u.jsx(zo, { size: 14, className: "mr-1.5" }),
4268
4308
  "Click to expand"
4269
4309
  ] }) })
4270
4310
  }
@@ -4275,24 +4315,24 @@ const As = ({
4275
4315
  o && /* @__PURE__ */ u.jsx(
4276
4316
  "div",
4277
4317
  {
4278
- className: se("flex justify-center w-full mb-2", !l && "hidden"),
4318
+ className: se("flex justify-center w-full mb-2", !s && "hidden"),
4279
4319
  children: /* @__PURE__ */ u.jsx(yr, { asChild: !0, children: /* @__PURE__ */ u.jsxs(gr, { variant: "outline", size: "sm", children: [
4280
4320
  "Collapse",
4281
- /* @__PURE__ */ u.jsx(zo, { size: 14, className: "ml-1.5" })
4321
+ /* @__PURE__ */ u.jsx(Go, { size: 14, className: "ml-1.5" })
4282
4322
  ] }) })
4283
4323
  }
4284
4324
  )
4285
4325
  ]
4286
4326
  }
4287
4327
  );
4288
- }, Ls = ({
4328
+ }, Bs = ({
4289
4329
  server: e,
4290
4330
  servers: r,
4291
4331
  operation: t,
4292
4332
  examples: o
4293
4333
  }) => {
4294
4334
  var b, m, j;
4295
- const { isAuthEnabled: i, login: l, signup: n, isPending: a, isAuthenticated: s } = wa(), c = (b = t.parameters) == null ? void 0 : b.filter((v) => v.in === "header").sort((v, p) => v.required && !p.required ? -1 : 1).map((v) => {
4335
+ const { isAuthEnabled: i, login: s, signup: n, isPending: a, isAuthenticated: l } = Oa(), c = (b = t.parameters) == null ? void 0 : b.filter((v) => v.in === "header").sort((v, p) => v.required && !p.required ? -1 : 1).map((v) => {
4296
4336
  var p, h, y, S, T, d, O, x;
4297
4337
  return {
4298
4338
  name: v.name,
@@ -4313,7 +4353,7 @@ const As = ({
4313
4353
  };
4314
4354
  }), g = (j = t.parameters) == null ? void 0 : j.filter((v) => v.in === "path").map((v) => ({ name: v.name }));
4315
4355
  return /* @__PURE__ */ u.jsx(
4316
- ea,
4356
+ ra,
4317
4357
  {
4318
4358
  server: e,
4319
4359
  servers: r,
@@ -4323,18 +4363,18 @@ const As = ({
4323
4363
  queryParams: f,
4324
4364
  pathParams: g,
4325
4365
  examples: o,
4326
- requiresLogin: i && !s && !a,
4327
- onLogin: () => l(),
4366
+ requiresLogin: i && !l && !a,
4367
+ onLogin: () => s(),
4328
4368
  onSignUp: () => n()
4329
4369
  }
4330
4370
  );
4331
- }, qr = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx(
4371
+ }, Rr = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx(
4332
4372
  "div",
4333
4373
  {
4334
4374
  className: se("rounded-xl overflow-hidden border border-border", r),
4335
4375
  children: e
4336
4376
  }
4337
- ), Rr = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx(
4377
+ ), kr = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx(
4338
4378
  "div",
4339
4379
  {
4340
4380
  className: se(
@@ -4343,7 +4383,7 @@ const As = ({
4343
4383
  ),
4344
4384
  children: e
4345
4385
  }
4346
- ), Co = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("bg-card overflow-auto p-2", r), children: e }), No = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("border-t bg-muted dark:bg-transparent p-3", r), children: e }), He = (e, r) => {
4386
+ ), No = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("bg-card overflow-auto p-2", r), children: e }), qo = ({ children: e, className: r }) => /* @__PURE__ */ u.jsx("div", { className: se("border-t bg-muted dark:bg-transparent p-3", r), children: e }), Be = (e, r) => {
4347
4387
  if (e.example !== void 0)
4348
4388
  return e.example;
4349
4389
  if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
@@ -4354,13 +4394,13 @@ const As = ({
4354
4394
  if (e.type === "object" && e.properties) {
4355
4395
  const t = {};
4356
4396
  for (const [o, i] of Object.entries(e.properties))
4357
- typeof i == "object" && (t[o] = He(i, o));
4397
+ typeof i == "object" && (t[o] = Be(i, o));
4358
4398
  return t;
4359
4399
  }
4360
4400
  if (e.type === "array")
4361
4401
  return Array.isArray(e.items) ? e.items.map(
4362
- (t) => He(t)
4363
- ) : e.items ? [He(e.items)] : [];
4402
+ (t) => Be(t)
4403
+ ) : e.items ? [Be(e.items)] : [];
4364
4404
  if (e.enum)
4365
4405
  return e.enum[0];
4366
4406
  switch (e.type) {
@@ -4379,31 +4419,31 @@ const As = ({
4379
4419
  default:
4380
4420
  return {};
4381
4421
  }
4382
- }, Us = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Fs = (e) => e ? {
4422
+ }, Hs = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Ms = (e) => e ? {
4383
4423
  "application/json": "json",
4384
4424
  "application/xml": "xml",
4385
4425
  "application/x-yaml": "yaml",
4386
4426
  "text/csv": "csv",
4387
4427
  "application/javascript": "javascript",
4388
4428
  "application/graphql": "graphql"
4389
- }[e] ?? "plain" : "plain", qo = ({
4429
+ }[e] ?? "plain" : "plain", Ro = ({
4390
4430
  content: e,
4391
4431
  description: r,
4392
4432
  onExampleChange: t
4393
4433
  }) => {
4394
4434
  var m;
4395
- const [o, i] = ye(0), [l, n] = ye(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], s = (a == null ? void 0 : a.examples) ?? [], c = s[l], f = uo(() => {
4435
+ const [o, i] = ye(0), [s, n] = ye(0), a = Array.isArray(e) && e.length === 1 ? e[0] : e[o], l = (a == null ? void 0 : a.examples) ?? [], c = l[s], f = fo(() => {
4396
4436
  if (c)
4397
4437
  return "value" in c ? c.value : c;
4398
4438
  if (a != null && a.schema)
4399
- return He(a.schema);
4439
+ return Be(a.schema);
4400
4440
  }, [c, a == null ? void 0 : a.schema]);
4401
- wr(() => {
4441
+ Sr(() => {
4402
4442
  f && (t == null || t(f));
4403
4443
  }, [f, t]);
4404
- const g = Us(f), b = Fs(a == null ? void 0 : a.mediaType);
4444
+ const g = Hs(f), b = Ms(a == null ? void 0 : a.mediaType);
4405
4445
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
4406
- /* @__PURE__ */ u.jsxs(Co, { className: "p-0", children: [
4446
+ /* @__PURE__ */ u.jsxs(No, { className: "p-0", children: [
4407
4447
  c != null && c.externalValue ? /* @__PURE__ */ u.jsx("div", { className: "p-2", children: /* @__PURE__ */ u.jsx(
4408
4448
  "a",
4409
4449
  {
@@ -4413,8 +4453,8 @@ const As = ({
4413
4453
  className: "text-xs text-primary hover:underline",
4414
4454
  children: "View External Example →"
4415
4455
  }
4416
- ) }) : /* @__PURE__ */ u.jsx(Po, { children: /* @__PURE__ */ u.jsx(
4417
- po,
4456
+ ) }) : /* @__PURE__ */ u.jsx(Co, { children: /* @__PURE__ */ u.jsx(
4457
+ ho,
4418
4458
  {
4419
4459
  language: b,
4420
4460
  noBackground: !0,
@@ -4424,11 +4464,11 @@ const As = ({
4424
4464
  ) }),
4425
4465
  (c == null ? void 0 : c.description) && /* @__PURE__ */ u.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
4426
4466
  ] }),
4427
- /* @__PURE__ */ u.jsxs(No, { className: "text-xs p-0 divide-y divide-border", children: [
4467
+ /* @__PURE__ */ u.jsxs(qo, { className: "text-xs p-0 divide-y divide-border", children: [
4428
4468
  r && /* @__PURE__ */ u.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: r }),
4429
- (s.length !== 0 || e.length !== 0) && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
4469
+ (l.length !== 0 || e.length !== 0) && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
4430
4470
  /* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ u.jsx(
4431
- et,
4471
+ Ze,
4432
4472
  {
4433
4473
  className: "max-w-[200px]",
4434
4474
  value: o.toString(),
@@ -4439,13 +4479,13 @@ const As = ({
4439
4479
  }))
4440
4480
  }
4441
4481
  ) : /* @__PURE__ */ u.jsx("span", { className: "font-mono text-[11px]", children: (m = e[0]) == null ? void 0 : m.mediaType }) }),
4442
- s.length > 1 && /* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ u.jsx(
4443
- et,
4482
+ l.length > 1 && /* @__PURE__ */ u.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ u.jsx(
4483
+ Ze,
4444
4484
  {
4445
4485
  className: "max-w-[180px]",
4446
- value: l.toString(),
4486
+ value: s.toString(),
4447
4487
  onChange: (j) => n(Number(j.target.value)),
4448
- options: s.map((j, v) => ({
4488
+ options: l.map((j, v) => ({
4449
4489
  value: v.toString(),
4450
4490
  label: j.summary || j.name || j.description || `Example ${v + 1}`
4451
4491
  }))
@@ -4454,35 +4494,35 @@ const As = ({
4454
4494
  ] })
4455
4495
  ] })
4456
4496
  ] });
4457
- }, _s = ({
4497
+ }, zs = ({
4458
4498
  content: e,
4459
4499
  onExampleChange: r
4460
- }) => e.length === 0 ? null : /* @__PURE__ */ u.jsxs(qr, { children: [
4461
- /* @__PURE__ */ u.jsx(Rr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
4462
- /* @__PURE__ */ u.jsx(qo, { content: e, onExampleChange: r })
4463
- ] }), Bs = ({ response: e }) => /* @__PURE__ */ u.jsx(Ye.Content, { value: e.statusCode, children: /* @__PURE__ */ u.jsx(
4464
- qo,
4500
+ }) => e.length === 0 ? null : /* @__PURE__ */ u.jsxs(Rr, { children: [
4501
+ /* @__PURE__ */ u.jsx(kr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
4502
+ /* @__PURE__ */ u.jsx(Ro, { content: e, onExampleChange: r })
4503
+ ] }), Gs = ({ response: e }) => /* @__PURE__ */ u.jsx(Ke.Content, { value: e.statusCode, children: /* @__PURE__ */ u.jsx(
4504
+ Ro,
4465
4505
  {
4466
4506
  content: e.content ?? [],
4467
4507
  description: e.description ?? void 0
4468
4508
  }
4469
- ) }), Hs = ({
4509
+ ) }), Ws = ({
4470
4510
  responses: e,
4471
4511
  selectedResponse: r,
4472
4512
  onSelectResponse: t
4473
4513
  }) => {
4474
4514
  var o;
4475
- return /* @__PURE__ */ u.jsx(qr, { children: /* @__PURE__ */ u.jsxs(
4476
- Ye.Root,
4515
+ return /* @__PURE__ */ u.jsx(Rr, { children: /* @__PURE__ */ u.jsxs(
4516
+ Ke.Root,
4477
4517
  {
4478
4518
  defaultValue: (o = e[0]) == null ? void 0 : o.statusCode,
4479
4519
  value: r,
4480
4520
  onValueChange: (i) => t(i),
4481
4521
  children: [
4482
- /* @__PURE__ */ u.jsxs(Rr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
4522
+ /* @__PURE__ */ u.jsxs(kr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
4483
4523
  /* @__PURE__ */ u.jsx("span", { className: "font-mono", children: "Example Responses" }),
4484
- /* @__PURE__ */ u.jsx(Ye.List, { className: "flex gap-2", children: e.map((i) => /* @__PURE__ */ u.jsx(
4485
- Ye.Trigger,
4524
+ /* @__PURE__ */ u.jsx(Ke.List, { className: "flex gap-2", children: e.map((i) => /* @__PURE__ */ u.jsx(
4525
+ Ke.Trigger,
4486
4526
  {
4487
4527
  value: i.statusCode,
4488
4528
  className: se(
@@ -4495,11 +4535,11 @@ const As = ({
4495
4535
  i.statusCode
4496
4536
  )) })
4497
4537
  ] }),
4498
- e.map((i) => /* @__PURE__ */ u.jsx(Bs, { response: i }, i.statusCode))
4538
+ e.map((i) => /* @__PURE__ */ u.jsx(Gs, { response: i }, i.statusCode))
4499
4539
  ]
4500
4540
  }
4501
4541
  ) });
4502
- }, Ms = (e, r) => {
4542
+ }, Js = (e, r) => {
4503
4543
  let t;
4504
4544
  switch (r) {
4505
4545
  case "shell":
@@ -4540,7 +4580,7 @@ const As = ({
4540
4580
  break;
4541
4581
  }
4542
4582
  return t ? t[0] : "";
4543
- }, zs = rt(
4583
+ }, Vs = tt(
4544
4584
  /* GraphQL */
4545
4585
  `
4546
4586
  query getServerQuery($input: JSON!, $type: SchemaType!) {
@@ -4552,7 +4592,7 @@ const As = ({
4552
4592
  }
4553
4593
  }
4554
4594
  `
4555
- ), Gs = [
4595
+ ), Ds = [
4556
4596
  { value: "shell", label: "cURL" },
4557
4597
  { value: "js", label: "JavaScript" },
4558
4598
  { value: "python", label: "Python" },
@@ -4564,18 +4604,18 @@ const As = ({
4564
4604
  { value: "php", label: "PHP" },
4565
4605
  { value: "ruby", label: "Ruby" },
4566
4606
  { value: "swift", label: "Swift" }
4567
- ], Ws = ({
4607
+ ], Qs = ({
4568
4608
  operation: e,
4569
4609
  selectedResponse: r,
4570
4610
  onSelectResponse: t
4571
4611
  }) => {
4572
4612
  var O;
4573
- const { input: o, type: i, options: l } = Sr(), n = Or(zs, { input: o, type: i }), a = jr(n), s = io(e.method), [c, f] = Xo(), [, g] = lo(), [b, m] = ye(), j = c.get("lang") ?? (l == null ? void 0 : l.examplesLanguage) ?? "shell", v = (O = e.requestBody) == null ? void 0 : O.content, p = /* @__PURE__ */ u.jsx(
4574
- ta,
4613
+ const { input: o, type: i, options: s } = Or(), n = Tr(Vs, { input: o, type: i }), a = $r(n), l = so(e.method), [c, f] = ea(), [, g] = co(), [b, m] = ye(), j = c.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", v = (O = e.requestBody) == null ? void 0 : O.content, p = /* @__PURE__ */ u.jsx(
4614
+ na,
4575
4615
  {
4576
4616
  path: e.path,
4577
4617
  renderParam: ({ name: x }) => /* @__PURE__ */ u.jsx(
4578
- no,
4618
+ oo,
4579
4619
  {
4580
4620
  name: x,
4581
4621
  backgroundOpacity: "0",
@@ -4584,9 +4624,9 @@ const As = ({
4584
4624
  }
4585
4625
  )
4586
4626
  }
4587
- ), { selectedServer: h } = $r(a.data.schema.servers), y = uo(() => {
4627
+ ), { selectedServer: h } = wr(a.data.schema.servers), y = fo(() => {
4588
4628
  var A;
4589
- const x = b ?? ((A = v == null ? void 0 : v[0]) != null && A.schema ? He(v[0].schema) : void 0), N = new Es({
4629
+ const x = b ?? ((A = v == null ? void 0 : v[0]) != null && A.schema ? Be(v[0].schema) : void 0), N = new Us({
4590
4630
  method: e.method.toLocaleUpperCase(),
4591
4631
  url: h + e.path.replaceAll("{", ":").replaceAll("}", ""),
4592
4632
  postData: x ? {
@@ -4600,7 +4640,7 @@ const As = ({
4600
4640
  headersSize: 0,
4601
4641
  bodySize: 0
4602
4642
  });
4603
- return Ms(N, j);
4643
+ return Js(N, j);
4604
4644
  }, [
4605
4645
  b,
4606
4646
  v,
@@ -4608,7 +4648,7 @@ const As = ({
4608
4648
  e.path,
4609
4649
  h,
4610
4650
  j
4611
- ]), [S, T] = As({ rootMargin: "200px 0px 200px 0px" }), d = T && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-playground-enabled"] === void 0 && !(l != null && l.disablePlayground));
4651
+ ]), [S, T] = Fs({ rootMargin: "200px 0px 200px 0px" }), d = T && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
4612
4652
  return /* @__PURE__ */ u.jsxs(
4613
4653
  "aside",
4614
4654
  {
@@ -4616,15 +4656,15 @@ const As = ({
4616
4656
  className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
4617
4657
  "data-pagefind-ignore": "all",
4618
4658
  children: [
4619
- /* @__PURE__ */ u.jsxs(qr, { children: [
4620
- /* @__PURE__ */ u.jsxs(Rr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
4659
+ /* @__PURE__ */ u.jsxs(Rr, { children: [
4660
+ /* @__PURE__ */ u.jsxs(kr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
4621
4661
  /* @__PURE__ */ u.jsxs("span", { className: "font-mono break-words leading-6", children: [
4622
- /* @__PURE__ */ u.jsx("span", { className: se("font-semibold", s), children: e.method.toLocaleUpperCase() }),
4662
+ /* @__PURE__ */ u.jsx("span", { className: se("font-semibold", l), children: e.method.toLocaleUpperCase() }),
4623
4663
  " ",
4624
4664
  p
4625
4665
  ] }),
4626
4666
  d && /* @__PURE__ */ u.jsx(
4627
- Ls,
4667
+ Bs,
4628
4668
  {
4629
4669
  servers: a.data.schema.servers.map((x) => x.url),
4630
4670
  operation: e,
@@ -4633,8 +4673,8 @@ const As = ({
4633
4673
  )
4634
4674
  ] }),
4635
4675
  T && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
4636
- /* @__PURE__ */ u.jsx(Co, { className: "p-0", children: /* @__PURE__ */ u.jsx(Po, { children: /* @__PURE__ */ u.jsx(
4637
- po,
4676
+ /* @__PURE__ */ u.jsx(No, { className: "p-0", children: /* @__PURE__ */ u.jsx(Co, { children: /* @__PURE__ */ u.jsx(
4677
+ ho,
4638
4678
  {
4639
4679
  language: j,
4640
4680
  noBackground: !0,
@@ -4642,10 +4682,10 @@ const As = ({
4642
4682
  code: y
4643
4683
  }
4644
4684
  ) }) }),
4645
- /* @__PURE__ */ u.jsxs(No, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
4685
+ /* @__PURE__ */ u.jsxs(qo, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
4646
4686
  /* @__PURE__ */ u.jsx("span", { children: "Show example in" }),
4647
4687
  /* @__PURE__ */ u.jsx(
4648
- et,
4688
+ Ze,
4649
4689
  {
4650
4690
  className: "self-start max-w-[150px]",
4651
4691
  value: j,
@@ -4654,21 +4694,21 @@ const As = ({
4654
4694
  f((N) => (N.set("lang", x.target.value), N));
4655
4695
  });
4656
4696
  },
4657
- options: Gs
4697
+ options: Ds
4658
4698
  }
4659
4699
  )
4660
4700
  ] })
4661
4701
  ] })
4662
4702
  ] }),
4663
4703
  T && v && /* @__PURE__ */ u.jsx(
4664
- _s,
4704
+ zs,
4665
4705
  {
4666
4706
  content: v,
4667
4707
  onExampleChange: m
4668
4708
  }
4669
4709
  ),
4670
4710
  T && e.responses.length > 0 && /* @__PURE__ */ u.jsx(
4671
- Hs,
4711
+ Ws,
4672
4712
  {
4673
4713
  selectedResponse: r,
4674
4714
  onSelectResponse: t,
@@ -4678,15 +4718,15 @@ const As = ({
4678
4718
  ]
4679
4719
  }
4680
4720
  );
4681
- }, Js = {
4682
- AND: /* @__PURE__ */ u.jsx(Jo, { size: 16, className: "fill-card" }),
4683
- OR: /* @__PURE__ */ u.jsx(Wo, { size: 16, className: "fill-card" }),
4684
- ONE: /* @__PURE__ */ u.jsx(Go, { size: 14, className: "fill-card" })
4685
- }, Vs = {
4721
+ }, Ks = {
4722
+ AND: /* @__PURE__ */ u.jsx(Vo, { size: 16, className: "fill-card" }),
4723
+ OR: /* @__PURE__ */ u.jsx(Jo, { size: 16, className: "fill-card" }),
4724
+ ONE: /* @__PURE__ */ u.jsx(Wo, { size: 14, className: "fill-card" })
4725
+ }, Ys = {
4686
4726
  AND: "text-green-500 dark:text-green-300/60",
4687
4727
  OR: "text-blue-400 dark:text-blue-500",
4688
4728
  ONE: "text-purple-500 dark:text-purple-300/60"
4689
- }, Ds = ({
4729
+ }, Xs = ({
4690
4730
  type: e,
4691
4731
  isOpen: r,
4692
4732
  className: t
@@ -4694,13 +4734,13 @@ const As = ({
4694
4734
  "div",
4695
4735
  {
4696
4736
  className: se(
4697
- Vs[e],
4737
+ Ys[e],
4698
4738
  "relative text-sm flex py-2",
4699
4739
  "before:border-l before:absolute before:-top-2 before:-bottom-2 before:border-border before:border-dashed before:content-['']",
4700
4740
  t
4701
4741
  ),
4702
4742
  children: /* @__PURE__ */ u.jsxs("div", { className: "-translate-x-[7px] flex gap-1 items-center", children: [
4703
- Js[e],
4743
+ Ks[e],
4704
4744
  /* @__PURE__ */ u.jsx(
4705
4745
  "div",
4706
4746
  {
@@ -4708,12 +4748,12 @@ const As = ({
4708
4748
  "translate-y-px mx-px opacity-0 group-hover:opacity-100 transition",
4709
4749
  !r && "-rotate-90"
4710
4750
  ),
4711
- children: /* @__PURE__ */ u.jsx(ro, { size: 16 })
4751
+ children: /* @__PURE__ */ u.jsx(no, { size: 16 })
4712
4752
  }
4713
4753
  )
4714
4754
  ] })
4715
4755
  }
4716
- ), Qs = (e) => {
4756
+ ), Zs = (e) => {
4717
4757
  const [r, t] = ye(!0);
4718
4758
  return /* @__PURE__ */ u.jsxs(
4719
4759
  xe.Root,
@@ -4722,17 +4762,17 @@ const As = ({
4722
4762
  onOpenChange: () => t((o) => !o),
4723
4763
  className: "group",
4724
4764
  children: [
4725
- /* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(Ds, { type: e.type, isOpen: r }) }),
4765
+ /* @__PURE__ */ u.jsx(xe.Trigger, { children: /* @__PURE__ */ u.jsx(Xs, { type: e.type, isOpen: r }) }),
4726
4766
  !r && /* @__PURE__ */ u.jsx("div", { className: "wavy-line bg-border translate-y-1" }),
4727
- /* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx(Ge, { schema: e.schema, level: e.level + 1 }) })
4767
+ /* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx(ze, { schema: e.schema, level: e.level + 1 }) })
4728
4768
  ]
4729
4769
  }
4730
4770
  );
4731
- }, Ks = {
4771
+ }, el = {
4732
4772
  AND: "All of",
4733
4773
  OR: "Any of",
4734
4774
  ONE: "One of"
4735
- }, Ys = ({
4775
+ }, tl = ({
4736
4776
  schemas: e,
4737
4777
  type: r,
4738
4778
  isOpen: t,
@@ -4740,115 +4780,106 @@ const As = ({
4740
4780
  toggleOpen: i
4741
4781
  }) => /* @__PURE__ */ u.jsx(xe.Root, { open: t, onOpenChange: i, asChild: !0, children: /* @__PURE__ */ u.jsxs(be, { className: "px-6", children: [
4742
4782
  /* @__PURE__ */ u.jsxs(xe.Trigger, { className: "flex gap-2 items-center py-2 w-full text-sm text-muted-foreground -translate-x-1.5", children: [
4743
- t ? /* @__PURE__ */ u.jsx(Vo, { size: 14 }) : /* @__PURE__ */ u.jsx(Do, { size: 14 }),
4744
- /* @__PURE__ */ u.jsx("span", { children: Ks[r] })
4783
+ t ? /* @__PURE__ */ u.jsx(Do, { size: 14 }) : /* @__PURE__ */ u.jsx(Qo, { size: 14 }),
4784
+ /* @__PURE__ */ u.jsx("span", { children: el[r] })
4745
4785
  ] }),
4746
- /* @__PURE__ */ u.jsx(xe.Content, { className: "pb-4", children: e.map((l, n) => (
4786
+ /* @__PURE__ */ u.jsx(xe.Content, { className: "pb-4", children: e.map((s, n) => (
4747
4787
  // eslint-disable-next-line react/no-array-index-key
4748
4788
  /* @__PURE__ */ u.jsx(
4749
- Qs,
4789
+ Zs,
4750
4790
  {
4751
4791
  type: r,
4752
- schema: l,
4792
+ schema: s,
4753
4793
  level: o
4754
4794
  },
4755
4795
  n
4756
4796
  )
4757
4797
  )) })
4758
- ] }) }), Xs = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), xr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), Zs = {
4798
+ ] }) }), rl = (e) => e.type === "object" || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object"), jr = (e) => !!(e.oneOf ?? e.allOf ?? e.anyOf), nl = {
4759
4799
  allOf: "AND",
4760
4800
  anyOf: "OR",
4761
4801
  oneOf: "ONE"
4762
- }, hr = (e) => e === Oa, Ro = ({
4802
+ }, hr = (e) => e === Pa, ko = ({
4763
4803
  schema: e,
4764
4804
  level: r
4765
4805
  }) => {
4766
- const [t, o] = ye(!0), i = fa(() => o((l) => !l), []);
4767
- for (const [l, n] of Sa(Zs))
4768
- if (e[l])
4806
+ const [t, o] = ye(!0), i = da(() => o((s) => !s), []);
4807
+ for (const [s, n] of Ta(nl))
4808
+ if (e[s])
4769
4809
  return /* @__PURE__ */ u.jsx(
4770
- Ys,
4810
+ tl,
4771
4811
  {
4772
- schemas: e[l],
4812
+ schemas: e[s],
4773
4813
  type: n,
4774
4814
  isOpen: t,
4775
4815
  toggleOpen: i,
4776
4816
  level: r
4777
4817
  }
4778
4818
  );
4779
- }, Zn = () => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 italic text-sm text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
4780
- /* @__PURE__ */ u.jsx(Ko, { size: 16 }),
4819
+ }, eo = () => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-1.5 italic text-xs text-muted-foreground font-mono bg-muted px-2 py-0.5 rounded-md", children: [
4820
+ /* @__PURE__ */ u.jsx(Xo, { size: 13 }),
4781
4821
  /* @__PURE__ */ u.jsx("span", { children: "circular" })
4782
- ] }), el = ({
4822
+ ] }), ol = ({
4783
4823
  name: e,
4784
4824
  schema: r,
4785
4825
  group: t,
4786
4826
  level: o,
4787
4827
  defaultOpen: i = !1,
4788
- showCollapseButton: l = !0
4828
+ showCollapseButton: s = !0
4789
4829
  }) => {
4790
4830
  const [n, a] = ye(i);
4791
- return hr(r) ? /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-1 justify-between text-sm", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 items-center", children: [
4831
+ return hr(r) ? /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-2.5 justify-between text-sm", children: /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 items-center", children: [
4792
4832
  /* @__PURE__ */ u.jsx("code", { children: e }),
4793
- /* @__PURE__ */ u.jsx(we, { variant: "muted", children: "object" }),
4794
- t === "optional" && /* @__PURE__ */ u.jsx(we, { variant: "outline", children: "optional" }),
4795
- /* @__PURE__ */ u.jsx(Zn, {})
4796
- ] }) }) }) : /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-1.5 justify-between text-sm", children: [
4833
+ /* @__PURE__ */ u.jsx(vr, { schema: r }),
4834
+ /* @__PURE__ */ u.jsx(eo, {})
4835
+ ] }) }) }) : /* @__PURE__ */ u.jsx("li", { className: "p-4 bg-border/20 hover:bg-border/30", children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-2.5 justify-between text-sm", children: [
4797
4836
  /* @__PURE__ */ u.jsxs("div", { className: "flex gap-2 items-center", children: [
4798
- /* @__PURE__ */ u.jsx("code", { children: e }),
4799
- /* @__PURE__ */ u.jsx(we, { variant: "muted", children: r.type === "array" && r.items.type ? /* @__PURE__ */ u.jsxs("span", { children: [
4800
- r.items.type,
4801
- "[]"
4802
- ] }) : Array.isArray(r.type) ? /* @__PURE__ */ u.jsx("span", { children: r.type.join(" | ") }) : /* @__PURE__ */ u.jsx("span", { children: r.type }) }),
4803
- t === "optional" && /* @__PURE__ */ u.jsx(we, { variant: "outline", children: "optional" }),
4804
- r.type === "array" && "items" in r && hr(r.items) && /* @__PURE__ */ u.jsx(Zn, {})
4837
+ /* @__PURE__ */ u.jsx(rt, { asChild: !0, children: /* @__PURE__ */ u.jsx("code", { children: e }) }),
4838
+ /* @__PURE__ */ u.jsx(
4839
+ vr,
4840
+ {
4841
+ schema: r,
4842
+ extraItems: [
4843
+ t !== "optional" && /* @__PURE__ */ u.jsx("span", { className: "text-primary", children: "required" })
4844
+ ]
4845
+ }
4846
+ ),
4847
+ r.type === "array" && "items" in r && hr(r.items) && /* @__PURE__ */ u.jsx(eo, {})
4805
4848
  ] }),
4806
4849
  r.description && /* @__PURE__ */ u.jsx(
4807
- Se,
4850
+ we,
4808
4851
  {
4809
- className: se(qe, "text-sm leading-normal line-clamp-4"),
4852
+ className: se(Ne, "text-sm leading-normal line-clamp-4"),
4810
4853
  content: r.description
4811
4854
  }
4812
4855
  ),
4813
- r.format && /* @__PURE__ */ u.jsxs("div", { children: [
4814
- /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "Format: " }),
4815
- /* @__PURE__ */ u.jsx("code", { children: r.format })
4816
- ] }),
4817
- r.enum && /* @__PURE__ */ u.jsx(yo, { values: r.enum }),
4818
- (xr(r) || Xs(r)) && /* @__PURE__ */ u.jsxs(
4856
+ r.enum && /* @__PURE__ */ u.jsx(mo, { values: r.enum }),
4857
+ (jr(r) || rl(r)) && /* @__PURE__ */ u.jsxs(
4819
4858
  xe.Root,
4820
4859
  {
4821
4860
  defaultOpen: i,
4822
4861
  open: n,
4823
4862
  onOpenChange: () => a(!n),
4824
4863
  children: [
4825
- l && /* @__PURE__ */ u.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ u.jsxs(
4826
- fo,
4827
- {
4828
- variant: "outline",
4829
- size: "sm",
4830
- className: "mt-2 flex gap-1.5",
4831
- children: [
4832
- /* @__PURE__ */ u.jsx(Qo, { size: 18 }),
4833
- n ? "Hide nested properties" : "Show nested properties"
4834
- ]
4835
- }
4836
- ) }),
4837
- /* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx("div", { className: "mt-2", children: xr(r) ? /* @__PURE__ */ u.jsx(Ro, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ u.jsx(Ge, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !hr(r.items) && /* @__PURE__ */ u.jsx(Ge, { schema: r.items, level: o + 1 }) }) })
4864
+ s && /* @__PURE__ */ u.jsx(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ u.jsxs(po, { variant: "expand", size: "sm", className: "h-7", children: [
4865
+ n ? /* @__PURE__ */ u.jsx(Ko, { size: 12 }) : /* @__PURE__ */ u.jsx(Yo, { size: 12 }),
4866
+ n ? "Hide properties" : "Show properties"
4867
+ ] }) }),
4868
+ /* @__PURE__ */ u.jsx(xe.Content, { children: /* @__PURE__ */ u.jsx("div", { className: "mt-2", children: jr(r) ? /* @__PURE__ */ u.jsx(ko, { schema: r, level: o + 1 }) : r.type === "object" ? /* @__PURE__ */ u.jsx(ze, { schema: r, level: o + 1 }) : r.type === "array" && "items" in r && typeof r.items == "object" && !hr(r.items) && /* @__PURE__ */ u.jsx(ze, { schema: r.items, level: o + 1 }) }) })
4838
4869
  ]
4839
4870
  }
4840
4871
  )
4841
4872
  ] }) });
4842
- }, Ge = ({
4873
+ }, ze = ({
4843
4874
  schema: e,
4844
4875
  level: r = 0,
4845
4876
  defaultOpen: t = !1
4846
4877
  }) => {
4847
4878
  if (!e || Object.keys(e).length === 0)
4848
4879
  return /* @__PURE__ */ u.jsx(be, { className: "p-4", children: /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground italic", children: "No response specified" }) });
4849
- const o = (i, l) => {
4850
- if (xr(i))
4851
- return /* @__PURE__ */ u.jsx(Ro, { schema: i, level: l });
4880
+ const o = (i, s) => {
4881
+ if (jr(i))
4882
+ return /* @__PURE__ */ u.jsx(ko, { schema: i, level: s });
4852
4883
  if (i.type === "array" && i.items) {
4853
4884
  const n = i.items;
4854
4885
  return typeof n.type == "string" && ["string", "number", "boolean", "integer"].includes(n.type) ? /* @__PURE__ */ u.jsxs(be, { className: "p-4", children: [
@@ -4857,10 +4888,10 @@ const As = ({
4857
4888
  "[]"
4858
4889
  ] }),
4859
4890
  i.description && /* @__PURE__ */ u.jsx(
4860
- Se,
4891
+ we,
4861
4892
  {
4862
4893
  className: se(
4863
- qe,
4894
+ Ne,
4864
4895
  "text-sm leading-normal line-clamp-4"
4865
4896
  ),
4866
4897
  content: i.description
@@ -4868,18 +4899,18 @@ const As = ({
4868
4899
  )
4869
4900
  ] }) : n.type === "object" ? /* @__PURE__ */ u.jsxs(be, { className: "flex flex-col gap-2 bg-border/30 p-4", children: [
4870
4901
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "object[]" }),
4871
- o(n, l + 1)
4872
- ] }) : o(n, l + 1);
4902
+ o(n, s + 1)
4903
+ ] }) : o(n, s + 1);
4873
4904
  }
4874
4905
  if (i.type === "object" && (!i.properties || Object.keys(i.properties).length === 0))
4875
4906
  return /* @__PURE__ */ u.jsxs(be, { className: "p-4 flex gap-2 items-center", children: [
4876
4907
  "name" in i && /* @__PURE__ */ u.jsx(u.Fragment, { children: i.name }),
4877
4908
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "object" }),
4878
4909
  i.description && /* @__PURE__ */ u.jsx(
4879
- Se,
4910
+ we,
4880
4911
  {
4881
4912
  className: se(
4882
- qe,
4913
+ Ne,
4883
4914
  "text-sm leading-normal line-clamp-4"
4884
4915
  ),
4885
4916
  content: i.description
@@ -4887,59 +4918,59 @@ const As = ({
4887
4918
  )
4888
4919
  ] });
4889
4920
  if (i.properties) {
4890
- const n = ho(
4921
+ const n = yo(
4891
4922
  Object.entries(i.properties),
4892
- ([s, c]) => {
4923
+ ([l, c]) => {
4893
4924
  var f;
4894
- return c.deprecated ? "deprecated" : (f = i.required) != null && f.includes(s) ? "required" : "optional";
4925
+ return c.deprecated ? "deprecated" : (f = i.required) != null && f.includes(l) ? "required" : "optional";
4895
4926
  }
4896
4927
  ), a = ["required", "optional", "deprecated"];
4897
4928
  return /* @__PURE__ */ u.jsx(be, { className: "divide-y overflow-hidden", children: a.map(
4898
- (s) => n[s] && /* @__PURE__ */ u.jsx("ul", { className: "divide-y", children: n[s].map(([c, f]) => /* @__PURE__ */ u.jsx(
4899
- el,
4929
+ (l) => n[l] && /* @__PURE__ */ u.jsx("ul", { className: "divide-y", children: n[l].map(([c, f]) => /* @__PURE__ */ u.jsx(
4930
+ ol,
4900
4931
  {
4901
4932
  name: c,
4902
4933
  schema: f,
4903
- group: s,
4904
- level: l,
4934
+ group: l,
4935
+ level: s,
4905
4936
  defaultOpen: t
4906
4937
  },
4907
4938
  c
4908
- )) }, s)
4939
+ )) }, l)
4909
4940
  ) });
4910
4941
  }
4911
4942
  return typeof i.type == "string" && ["string", "number", "boolean", "integer", "null"].includes(i.type) ? /* @__PURE__ */ u.jsxs(be, { className: "p-4", children: [
4912
4943
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: i.type }),
4913
4944
  i.description && /* @__PURE__ */ u.jsx(
4914
- Se,
4945
+ we,
4915
4946
  {
4916
4947
  className: se(
4917
- qe,
4948
+ Ne,
4918
4949
  "text-sm leading-normal line-clamp-4"
4919
4950
  ),
4920
4951
  content: i.description
4921
4952
  }
4922
4953
  )
4923
4954
  ] }) : i.additionalProperties ? /* @__PURE__ */ u.jsxs(be, { className: "my-2", children: [
4924
- /* @__PURE__ */ u.jsx(va, { children: /* @__PURE__ */ u.jsx(ba, { children: "Additional Properties:" }) }),
4925
- /* @__PURE__ */ u.jsx(xa, { children: o(
4955
+ /* @__PURE__ */ u.jsx(xa, { children: /* @__PURE__ */ u.jsx(ja, { children: "Additional Properties:" }) }),
4956
+ /* @__PURE__ */ u.jsx($a, { children: o(
4926
4957
  i.additionalProperties,
4927
- l + 1
4958
+ s + 1
4928
4959
  ) })
4929
4960
  ] }) : null;
4930
4961
  };
4931
4962
  return o(e, r);
4932
- }, tl = ["path", "query", "header", "cookie"], rl = ({
4963
+ }, al = ["path", "query", "header", "cookie"], il = ({
4933
4964
  operationFragment: e,
4934
4965
  serverUrl: r
4935
4966
  }) => {
4936
- var a, s, c;
4937
- const t = Ta(nl, e), o = ho(
4967
+ var a, l, c;
4968
+ const t = Ca(sl, e), o = yo(
4938
4969
  t.parameters ?? [],
4939
4970
  (f) => f.in
4940
- ), i = t.responses.at(0), [l, n] = ye(i == null ? void 0 : i.statusCode);
4971
+ ), i = t.responses.at(0), [s, n] = ye(i == null ? void 0 : i.statusCode);
4941
4972
  return /* @__PURE__ */ u.jsxs("div", { className: "border-b-2 mb-16 pb-16", children: [
4942
- t.deprecated && /* @__PURE__ */ u.jsx(we, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
4973
+ t.deprecated && /* @__PURE__ */ u.jsx(ka, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
4943
4974
  /* @__PURE__ */ u.jsxs(
4944
4975
  "div",
4945
4976
  {
@@ -4949,7 +4980,7 @@ const As = ({
4949
4980
  ),
4950
4981
  children: [
4951
4982
  /* @__PURE__ */ u.jsx(
4952
- Be,
4983
+ _e,
4953
4984
  {
4954
4985
  level: 2,
4955
4986
  id: t.slug,
@@ -4959,25 +4990,25 @@ const As = ({
4959
4990
  }
4960
4991
  ),
4961
4992
  /* @__PURE__ */ u.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
4962
- /* @__PURE__ */ u.jsx("span", { className: io(t.method), children: t.method.toUpperCase() }),
4963
- /* @__PURE__ */ u.jsxs(so, { className: "max-w-full truncate flex cursor-pointer", children: [
4993
+ /* @__PURE__ */ u.jsx("span", { className: so(t.method), children: t.method.toUpperCase() }),
4994
+ /* @__PURE__ */ u.jsxs(rt, { className: "max-w-full truncate flex cursor-pointer", children: [
4964
4995
  r && /* @__PURE__ */ u.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: r }),
4965
4996
  /* @__PURE__ */ u.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
4966
4997
  ] })
4967
4998
  ] }),
4968
4999
  /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-4", children: [
4969
5000
  t.description && /* @__PURE__ */ u.jsx(
4970
- Se,
5001
+ we,
4971
5002
  {
4972
- className: `${qe} max-w-full prose-img:max-w-prose`,
5003
+ className: `${Ne} max-w-full prose-img:max-w-prose`,
4973
5004
  content: t.description
4974
5005
  }
4975
5006
  ),
4976
- t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children: tl.flatMap(
5007
+ t.parameters && t.parameters.length > 0 && /* @__PURE__ */ u.jsx(u.Fragment, { children: al.flatMap(
4977
5008
  (f) => {
4978
5009
  var g;
4979
5010
  return (g = o[f]) != null && g.length ? /* @__PURE__ */ u.jsx(
4980
- Ea,
5011
+ Ua,
4981
5012
  {
4982
5013
  summary: t.summary ?? void 0,
4983
5014
  id: t.slug,
@@ -4988,9 +5019,9 @@ const As = ({
4988
5019
  ) : [];
4989
5020
  }
4990
5021
  ) }),
4991
- qa((c = (s = (a = t.requestBody) == null ? void 0 : a.content) == null ? void 0 : s.at(0)) == null ? void 0 : c.schema, (f) => /* @__PURE__ */ u.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
5022
+ Ea((c = (l = (a = t.requestBody) == null ? void 0 : a.content) == null ? void 0 : l.at(0)) == null ? void 0 : c.schema, (f) => /* @__PURE__ */ u.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4992
5023
  /* @__PURE__ */ u.jsxs(
4993
- Be,
5024
+ _e,
4994
5025
  {
4995
5026
  level: 3,
4996
5027
  className: "capitalize",
@@ -5004,11 +5035,11 @@ const As = ({
5004
5035
  ]
5005
5036
  }
5006
5037
  ),
5007
- /* @__PURE__ */ u.jsx(Ge, { schema: f })
5038
+ /* @__PURE__ */ u.jsx(ze, { schema: f })
5008
5039
  ] })),
5009
5040
  t.responses.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
5010
5041
  /* @__PURE__ */ u.jsxs(
5011
- Be,
5042
+ _e,
5012
5043
  {
5013
5044
  level: 3,
5014
5045
  className: "capitalize mt-8 pt-8 border-t",
@@ -5023,13 +5054,13 @@ const As = ({
5023
5054
  }
5024
5055
  ),
5025
5056
  /* @__PURE__ */ u.jsxs(
5026
- ha,
5057
+ ma,
5027
5058
  {
5028
5059
  onValueChange: (f) => n(f),
5029
- value: l,
5060
+ value: s,
5030
5061
  children: [
5031
- t.responses.length > 1 && /* @__PURE__ */ u.jsx(ya, { children: t.responses.map((f) => /* @__PURE__ */ u.jsx(
5032
- ma,
5062
+ t.responses.length > 1 && /* @__PURE__ */ u.jsx(ga, { children: t.responses.map((f) => /* @__PURE__ */ u.jsx(
5063
+ va,
5033
5064
  {
5034
5065
  value: f.statusCode,
5035
5066
  title: f.description ?? void 0,
@@ -5040,11 +5071,11 @@ const As = ({
5040
5071
  /* @__PURE__ */ u.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((f) => {
5041
5072
  var g, b;
5042
5073
  return /* @__PURE__ */ u.jsx(
5043
- ga,
5074
+ ba,
5044
5075
  {
5045
5076
  value: f.statusCode,
5046
5077
  children: /* @__PURE__ */ u.jsx(
5047
- Ge,
5078
+ ze,
5048
5079
  {
5049
5080
  schema: (b = (g = f.content) == null ? void 0 : g.find((m) => m.schema)) == null ? void 0 : b.schema
5050
5081
  }
@@ -5059,9 +5090,9 @@ const As = ({
5059
5090
  ] })
5060
5091
  ] }),
5061
5092
  /* @__PURE__ */ u.jsx(
5062
- Ws,
5093
+ Qs,
5063
5094
  {
5064
- selectedResponse: l,
5095
+ selectedResponse: s,
5065
5096
  onSelectResponse: n,
5066
5097
  operation: t
5067
5098
  }
@@ -5072,10 +5103,10 @@ const As = ({
5072
5103
  )
5073
5104
  ] });
5074
5105
  };
5075
- function eo(e, r = 160) {
5106
+ function to(e, r = 160) {
5076
5107
  return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, r).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;") : "";
5077
5108
  }
5078
- const nl = rt(
5109
+ const sl = tt(
5079
5110
  /* GraphQL */
5080
5111
  `
5081
5112
  fragment OperationsFragment on OperationItem {
@@ -5095,6 +5126,7 @@ const nl = rt(
5095
5126
  required
5096
5127
  schema
5097
5128
  style
5129
+ explode
5098
5130
  examples {
5099
5131
  name
5100
5132
  description
@@ -5142,7 +5174,7 @@ const nl = rt(
5142
5174
  }
5143
5175
  }
5144
5176
  `
5145
- ), ol = rt(
5177
+ ), ll = tt(
5146
5178
  /* GraphQL */
5147
5179
  `
5148
5180
  query AllOperations(
@@ -5171,21 +5203,21 @@ const nl = rt(
5171
5203
  }
5172
5204
  }
5173
5205
  `
5174
- ), Cl = ({
5206
+ ), kl = ({
5175
5207
  tag: e,
5176
5208
  untagged: r
5177
5209
  }) => {
5178
5210
  var T;
5179
- const { input: t, type: o, versions: i, version: l, options: n } = Sr(), a = Or(ol, {
5211
+ const { input: t, type: o, versions: i, version: s, options: n } = Or(), a = Tr(ll, {
5180
5212
  input: t,
5181
5213
  type: o,
5182
5214
  tag: e,
5183
5215
  untagged: r
5184
- }), s = jr(a), {
5216
+ }), l = $r(a), {
5185
5217
  data: { schema: c }
5186
- } = s, { selectedServer: f } = $r(c.servers), g = c.title, b = c.summary, m = c.description, j = Zo(), v = c.operations, p = (T = c.tags.find((d) => d.name === e)) == null ? void 0 : T.description;
5187
- Uo();
5188
- const h = p ? eo(p) : b || (m ? eo(m) : void 0), y = Object.entries(i).length > 1, S = (n == null ? void 0 : n.showVersionSelect) === "always" || y && (n == null ? void 0 : n.showVersionSelect) !== "hide";
5218
+ } = l, { selectedServer: f } = wr(c.servers), g = c.title, b = c.summary, m = c.description, j = ta(), v = c.operations, p = (T = c.tags.find((d) => d.name === e)) == null ? void 0 : T.description;
5219
+ Fo();
5220
+ const h = p ? to(p) : b || (m ? to(m) : void 0), y = Object.entries(i).length > 1, S = (n == null ? void 0 : n.showVersionSelect) === "always" || y && (n == null ? void 0 : n.showVersionSelect) !== "hide";
5189
5221
  return /* @__PURE__ */ u.jsxs(
5190
5222
  "div",
5191
5223
  {
@@ -5193,17 +5225,17 @@ const nl = rt(
5193
5225
  "data-pagefind-filter": "section:openapi",
5194
5226
  "data-pagefind-meta": "section:openapi",
5195
5227
  children: [
5196
- /* @__PURE__ */ u.jsxs(Fo, { children: [
5228
+ /* @__PURE__ */ u.jsxs(_o, { children: [
5197
5229
  /* @__PURE__ */ u.jsx("title", { children: [e, g].filter(Boolean).join(" - ") }),
5198
5230
  h && /* @__PURE__ */ u.jsx("meta", { name: "description", content: h })
5199
5231
  ] }),
5200
5232
  /* @__PURE__ */ u.jsxs("div", { className: "mb-8", children: [
5201
- /* @__PURE__ */ u.jsxs(oo, { className: "w-full", children: [
5233
+ /* @__PURE__ */ u.jsxs(ao, { className: "w-full", children: [
5202
5234
  /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
5203
5235
  /* @__PURE__ */ u.jsxs("div", { className: "flex-1", children: [
5204
- /* @__PURE__ */ u.jsx(sa, { children: g }),
5236
+ /* @__PURE__ */ u.jsx(ca, { children: g }),
5205
5237
  /* @__PURE__ */ u.jsxs(
5206
- Be,
5238
+ _e,
5207
5239
  {
5208
5240
  level: 1,
5209
5241
  id: "description",
@@ -5214,7 +5246,7 @@ const nl = rt(
5214
5246
  S && /* @__PURE__ */ u.jsxs("span", { className: "text-xl text-muted-foreground ml-1.5", children: [
5215
5247
  " ",
5216
5248
  "(",
5217
- l,
5249
+ s,
5218
5250
  ")"
5219
5251
  ] })
5220
5252
  ]
@@ -5223,28 +5255,28 @@ const nl = rt(
5223
5255
  ] }),
5224
5256
  /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
5225
5257
  S && /* @__PURE__ */ u.jsxs(
5226
- ra,
5258
+ oa,
5227
5259
  {
5228
5260
  onValueChange: (d) => j(i[d]),
5229
- defaultValue: l,
5261
+ defaultValue: s,
5230
5262
  disabled: !y,
5231
5263
  children: [
5232
- /* @__PURE__ */ u.jsx(na, { className: "w-[180px]", children: /* @__PURE__ */ u.jsx(oa, { placeholder: "Select version" }) }),
5233
- /* @__PURE__ */ u.jsx(aa, { children: Object.entries(i).map(([d]) => /* @__PURE__ */ u.jsx(ia, { value: d, children: d }, d)) })
5264
+ /* @__PURE__ */ u.jsx(aa, { className: "w-[180px]", children: /* @__PURE__ */ u.jsx(ia, { placeholder: "Select version" }) }),
5265
+ /* @__PURE__ */ u.jsx(sa, { children: Object.entries(i).map(([d]) => /* @__PURE__ */ u.jsx(la, { value: d, children: d }, d)) })
5234
5266
  ]
5235
5267
  }
5236
5268
  ),
5237
5269
  c.description && /* @__PURE__ */ u.jsxs(yr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
5238
5270
  /* @__PURE__ */ u.jsx("span", { children: "Schema description" }),
5239
5271
  /* @__PURE__ */ u.jsx(
5240
- to,
5272
+ ro,
5241
5273
  {
5242
5274
  className: "group-data-[state=open]:hidden translate-y-px",
5243
5275
  size: 14
5244
5276
  }
5245
5277
  ),
5246
5278
  /* @__PURE__ */ u.jsx(
5247
- Yo,
5279
+ Zo,
5248
5280
  {
5249
5281
  className: "group-data-[state=closed]:hidden translate-y-px",
5250
5282
  size: 13
@@ -5253,15 +5285,15 @@ const nl = rt(
5253
5285
  ] })
5254
5286
  ] })
5255
5287
  ] }),
5256
- c.description && /* @__PURE__ */ u.jsx(ao, { className: "CollapsibleContent", children: /* @__PURE__ */ u.jsx(
5288
+ c.description && /* @__PURE__ */ u.jsx(io, { className: "CollapsibleContent", children: /* @__PURE__ */ u.jsx(
5257
5289
  "div",
5258
5290
  {
5259
5291
  className: se(
5260
- qe,
5292
+ Ne,
5261
5293
  "pt-4 max-w-full prose-img:max-w-prose"
5262
5294
  ),
5263
5295
  children: /* @__PURE__ */ u.jsx(
5264
- Se,
5296
+ we,
5265
5297
  {
5266
5298
  className: "border rounded bg-muted/25 border-border px-2.5 md:px-4",
5267
5299
  content: c.description
@@ -5274,17 +5306,17 @@ const nl = rt(
5274
5306
  "div",
5275
5307
  {
5276
5308
  className: se(
5277
- qe,
5309
+ Ne,
5278
5310
  "my-4 max-w-full prose-img:max-w-prose"
5279
5311
  ),
5280
- children: /* @__PURE__ */ u.jsx(Se, { content: p })
5312
+ children: /* @__PURE__ */ u.jsx(we, { content: p })
5281
5313
  }
5282
5314
  )
5283
5315
  ] }),
5284
5316
  /* @__PURE__ */ u.jsx("hr", {}),
5285
- /* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(Ca, {}) }),
5317
+ /* @__PURE__ */ u.jsx("div", { className: "my-4 flex items-center justify-end gap-4", children: /* @__PURE__ */ u.jsx(qa, {}) }),
5286
5318
  v.map((d) => /* @__PURE__ */ u.jsx(
5287
- rl,
5319
+ il,
5288
5320
  {
5289
5321
  serverUrl: f,
5290
5322
  operationFragment: d
@@ -5296,7 +5328,7 @@ const nl = rt(
5296
5328
  );
5297
5329
  };
5298
5330
  export {
5299
- Cl as OperationList,
5300
- nl as OperationsFragment
5331
+ kl as OperationList,
5332
+ sl as OperationsFragment
5301
5333
  };
5302
- //# sourceMappingURL=OperationList-a7wnHdXv.js.map
5334
+ //# sourceMappingURL=OperationList-C4rpJdcE.js.map