zudoku 0.42.1 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/app/entry.client.js +21 -0
  2. package/dist/app/entry.client.js.map +1 -1
  3. package/dist/config/loader.d.ts +1 -16
  4. package/dist/config/loader.js +9 -90
  5. package/dist/config/loader.js.map +1 -1
  6. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  7. package/dist/lib/authentication/components/SignIn.js +5 -2
  8. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  9. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  10. package/dist/lib/authentication/components/SignUp.js +4 -1
  11. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  12. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  13. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  14. package/dist/lib/plugins/openapi/ParameterListItem.js +8 -1
  15. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  16. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  17. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  18. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  19. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +7 -3
  20. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  21. package/dist/lib/plugins/openapi/schema/SchemaView.js +9 -6
  22. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  23. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  24. package/dist/lib/plugins/openapi/schema/utils.js +3 -0
  25. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  26. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +40 -0
  27. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  28. package/dist/vite/config.js +1 -1
  29. package/dist/vite/config.js.map +1 -1
  30. package/lib/AuthenticationPlugin-ByDF051g.js +99 -0
  31. package/lib/AuthenticationPlugin-ByDF051g.js.map +1 -0
  32. package/lib/Card-BtheiD7j.js +61 -0
  33. package/lib/Card-BtheiD7j.js.map +1 -0
  34. package/lib/{OasProvider-CZiF_RMW.js → OasProvider-DOs0v9u7.js} +2 -2
  35. package/lib/{OasProvider-CZiF_RMW.js.map → OasProvider-DOs0v9u7.js.map} +1 -1
  36. package/lib/{OperationList-CMMzLfIZ.js → OperationList-CKac6iap.js} +1152 -1102
  37. package/lib/OperationList-CKac6iap.js.map +1 -0
  38. package/lib/{SchemaList-_d3Mf4IX.js → SchemaList-BTX2mRMW.js} +3 -3
  39. package/lib/{SchemaList-_d3Mf4IX.js.map → SchemaList-BTX2mRMW.js.map} +1 -1
  40. package/lib/SchemaView-BYRn_-2l.js +388 -0
  41. package/lib/SchemaView-BYRn_-2l.js.map +1 -0
  42. package/lib/{index-BPqJMdth.js → index-DuB48L78.js} +393 -442
  43. package/lib/index-DuB48L78.js.map +1 -0
  44. package/lib/zudoku.auth-clerk.js +1 -1
  45. package/lib/zudoku.auth-openid.js +1 -1
  46. package/lib/zudoku.plugin-openapi.js +1 -1
  47. package/package.json +4 -4
  48. package/src/app/entry.client.tsx +26 -0
  49. package/src/lib/authentication/components/SignIn.tsx +35 -2
  50. package/src/lib/authentication/components/SignUp.tsx +35 -1
  51. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  52. package/src/lib/plugins/openapi/ParameterListItem.tsx +30 -0
  53. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  54. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +10 -4
  55. package/src/lib/plugins/openapi/schema/SchemaView.tsx +31 -20
  56. package/src/lib/plugins/openapi/schema/utils.ts +5 -0
  57. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +45 -0
  58. package/lib/AuthenticationPlugin-DPCuR3xm.js +0 -58
  59. package/lib/AuthenticationPlugin-DPCuR3xm.js.map +0 -1
  60. package/lib/OperationList-CMMzLfIZ.js.map +0 -1
  61. package/lib/SchemaView-J7Srn-Iy.js +0 -357
  62. package/lib/SchemaView-J7Srn-Iy.js.map +0 -1
  63. package/lib/index-BPqJMdth.js.map +0 -1
@@ -1,28 +1,29 @@
1
1
  import { j as $ } from "./jsx-runtime-C5mzlN2N.js";
2
- import { d as yr, u as Pa, m as qa, t as Ca } from "./hook-CldJlP5c.js";
3
- import { H as Ea } from "./RouteGuard-DRtEu9nh.js";
4
- import { ChevronsUpDownIcon as Yn, CheckIcon as Ra, CopyIcon as ka, UnfoldVerticalIcon as Na, FoldVerticalIcon as Aa, ChevronsDownUpIcon as Ia } from "lucide-react";
5
- import { b as Ua, c as La, a as Fa } from "./chunk-BAXFHI7N-BVBOl9s0.js";
6
- import { c as _e, u as mr, d as Xn, C as Zn, b as ea, a as ur, P as _a, m as ta, e as Ba, U as Ha } from "./index-BPqJMdth.js";
7
- import { S as Ma, a as za, b as Wa, c as Ja, e as Ga } from "./Select-CT64Ou40.js";
8
- import { C as Va } from "./CategoryHeading-D06WK_Wo.js";
9
- import { I as Da, S as ra, M as De, H as Ie, P as fr } from "./Markdown-mFpg_n9p.js";
10
- import { P as Qa } from "./Pagination-DLPL5z77.js";
2
+ import { d as gr, u as Ca, m as Ra, t as Ea } from "./hook-CldJlP5c.js";
3
+ import { H as ka } from "./RouteGuard-DRtEu9nh.js";
4
+ import { ChevronsUpDownIcon as Xn, CheckIcon as Na, CopyIcon as Aa, MinusIcon as Ia, PlusIcon as Ua, UnfoldVerticalIcon as La, FoldVerticalIcon as Fa, ChevronsDownUpIcon as _a } from "lucide-react";
5
+ import { b as Ba, c as Ha, a as Ma } from "./chunk-BAXFHI7N-BVBOl9s0.js";
6
+ import { c as _e, u as vr, d as Zn, C as ea, b as ta, a as fr, P as za, m as ra, e as Wa, U as Ja } from "./index-DuB48L78.js";
7
+ import { S as Ga, a as Va, b as Da, c as Qa, e as Ka } from "./Select-CT64Ou40.js";
8
+ import { C as Ya } from "./CategoryHeading-D06WK_Wo.js";
9
+ import { I as Xa, S as na, M as De, H as Ue, P as pr } from "./Markdown-mFpg_n9p.js";
10
+ import { P as Za } from "./Pagination-DLPL5z77.js";
11
11
  import { c as pe } from "./cn-qaFjX9_3.js";
12
- import { useTransition as na, useState as xe, useRef as aa, useEffect as gr, useLayoutEffect as Ka, useMemo as oa } from "react";
13
- import { Button as Ya } from "./ui/Button.js";
14
- import { u as Qe, P as Xa, E as Ar, a as Za, g as eo, S as Ir } from "./SchemaView-J7Srn-Iy.js";
15
- import { u as vr } from "./context-Lrf2Y9bR.js";
16
- import { VisuallyHidden as pr } from "@radix-ui/react-visually-hidden";
17
- import { c as to } from "./index-CPNSgwSb.js";
18
- import { Tabs as ro, TabsList as no, TabsTrigger as ao, TabsContent as oo } from "./ui/Tabs.js";
19
- import { Card as io } from "./ui/Card.js";
20
- import { g as so, c as Ke, a as lo } from "./_commonjsHelpers-B4e78b8K.js";
21
- import { a as co, b as uo } from "./index-DnQftvP4.js";
22
- import { S as ia } from "./SyntaxHighlight-CxhyyMkF.js";
23
- import { B as Ur } from "./Button-BBNrKpQd.js";
12
+ import { useTransition as aa, useState as ve, useRef as oa, useEffect as br, useLayoutEffect as eo, useMemo as ia } from "react";
13
+ import { Button as sa } from "./ui/Button.js";
14
+ import { u as Qe, i as to, P as ro, E as Ur, a as no, S as dr, g as ao } from "./SchemaView-BYRn_-2l.js";
15
+ import { u as xr } from "./context-Lrf2Y9bR.js";
16
+ import { VisuallyHidden as hr } from "@radix-ui/react-visually-hidden";
17
+ import { c as oo } from "./index-CPNSgwSb.js";
18
+ import { Tabs as io, TabsList as so, TabsTrigger as lo, TabsContent as co } from "./ui/Tabs.js";
19
+ import { Card as uo } from "./ui/Card.js";
20
+ import * as ft from "@radix-ui/react-collapsible";
21
+ import { g as fo, c as Ke, a as po } from "./_commonjsHelpers-B4e78b8K.js";
22
+ import { a as ho, b as yo } from "./index-DnQftvP4.js";
23
+ import { S as la } from "./SyntaxHighlight-CxhyyMkF.js";
24
+ import { B as Lr } from "./Button-BBNrKpQd.js";
24
25
  import * as Ge from "@radix-ui/react-tabs";
25
- function fo(e, n) {
26
+ function mo(e, n) {
26
27
  return n;
27
28
  }
28
29
  const Ye = ({
@@ -30,7 +31,7 @@ const Ye = ({
30
31
  onChange: n,
31
32
  className: t,
32
33
  options: a,
33
- showChevrons: c = !0
34
+ showChevrons: l = !0
34
35
  }) => /* @__PURE__ */ $.jsxs("div", { className: "grid", children: [
35
36
  /* @__PURE__ */ $.jsx(
36
37
  "select",
@@ -49,13 +50,13 @@ const Ye = ({
49
50
  "div",
50
51
  {
51
52
  className: pe(
52
- !c && "hidden",
53
+ !l && "hidden",
53
54
  "row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
54
55
  ),
55
- children: /* @__PURE__ */ $.jsx(Yn, { size: 14 })
56
+ children: /* @__PURE__ */ $.jsx(Xn, { size: 14 })
56
57
  }
57
58
  )
58
- ] }), po = _e(
59
+ ] }), go = _e(
59
60
  /* GraphQL */
60
61
  `
61
62
  query ServersQuery($input: JSON!, $type: SchemaType!) {
@@ -67,10 +68,10 @@ const Ye = ({
67
68
  }
68
69
  }
69
70
  `
70
- ), Lr = ({ url: e }) => {
71
- const [n, t] = xe(!1);
71
+ ), Fr = ({ url: e }) => {
72
+ const [n, t] = ve(!1);
72
73
  return /* @__PURE__ */ $.jsx(
73
- Ya,
74
+ sa,
74
75
  {
75
76
  onClick: () => {
76
77
  navigator.clipboard.writeText(e).then(() => {
@@ -79,37 +80,37 @@ const Ye = ({
79
80
  },
80
81
  variant: "ghost",
81
82
  size: "icon",
82
- children: n ? /* @__PURE__ */ $.jsx(Ra, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ $.jsx(ka, { size: 14, strokeWidth: 1.3 })
83
+ children: n ? /* @__PURE__ */ $.jsx(Na, { className: "text-green-600", size: 14 }) : /* @__PURE__ */ $.jsx(Aa, { size: 14, strokeWidth: 1.3 })
83
84
  }
84
85
  );
85
- }, ho = () => {
86
- const { input: e, type: n } = vr(), t = Qe(po, { input: e, type: n }), a = yr(t), [, c] = na(), { selectedServer: s, setSelectedServer: r } = mr(
86
+ }, vo = () => {
87
+ const { input: e, type: n } = xr(), t = Qe(go, { input: e, type: n }), a = gr(t), [, l] = aa(), { selectedServer: s, setSelectedServer: r } = vr(
87
88
  a.data.schema.servers
88
89
  ), { servers: o } = a.data.schema;
89
90
  if (o.length === 0) return null;
90
91
  const i = o.at(0);
91
92
  return o.length === 1 ? /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
92
93
  /* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint:" }),
93
- /* @__PURE__ */ $.jsx(Da, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: i.url }),
94
- /* @__PURE__ */ $.jsx(Lr, { url: i.url })
94
+ /* @__PURE__ */ $.jsx(Xa, { className: "text-xs px-2 py-1.5", selectOnClick: !0, children: i.url }),
95
+ /* @__PURE__ */ $.jsx(Fr, { url: i.url })
95
96
  ] }) : /* @__PURE__ */ $.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
96
97
  /* @__PURE__ */ $.jsx("span", { className: "font-medium text-sm", children: "Endpoint" }),
97
98
  /* @__PURE__ */ $.jsx(
98
99
  Ye,
99
100
  {
100
101
  className: "font-mono text-xs bg-border/50 dark:bg-border/70 py-1.5 max-w-[450px] truncate",
101
- onChange: (l) => c(() => r(l.target.value)),
102
+ onChange: (c) => l(() => r(c.target.value)),
102
103
  value: s,
103
104
  showChevrons: o.length > 1,
104
- options: o.map((l) => ({
105
- value: l.url,
106
- label: l.url
105
+ options: o.map((c) => ({
106
+ value: c.url,
107
+ label: c.url
107
108
  }))
108
109
  }
109
110
  ),
110
- /* @__PURE__ */ $.jsx(Lr, { url: s })
111
+ /* @__PURE__ */ $.jsx(Fr, { url: s })
111
112
  ] });
112
- }, yo = to(
113
+ }, bo = oo(
113
114
  "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",
114
115
  {
115
116
  variants: {
@@ -126,21 +127,21 @@ const Ye = ({
126
127
  }
127
128
  }
128
129
  );
129
- function Fr({ className: e, variant: n, ...t }) {
130
- return /* @__PURE__ */ $.jsx("div", { className: pe(yo({ variant: n }), e), ...t });
130
+ function _r({ className: e, variant: n, ...t }) {
131
+ return /* @__PURE__ */ $.jsx("div", { className: pe(bo({ variant: n }), e), ...t });
131
132
  }
132
- const mo = (e, n) => e ? n(e) : void 0, go = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
133
+ const xo = (e, n) => e ? n(e) : void 0, $o = (e) => e.schema != null && typeof e.schema == "object" ? e.schema : {
133
134
  type: "string"
134
- }, vo = ({
135
+ }, wo = ({
135
136
  parameter: e,
136
137
  group: n,
137
138
  id: t
138
139
  }) => {
139
- const a = go(e);
140
+ const a = $o(e), [l, s] = ve(!1);
140
141
  return /* @__PURE__ */ $.jsxs("li", { className: "p-4 bg-border/20 text-sm flex flex-col gap-1.5", children: [
141
142
  /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2", children: [
142
- /* @__PURE__ */ $.jsx(ra, { asChild: !0, children: /* @__PURE__ */ $.jsx("code", { children: n === "path" ? /* @__PURE__ */ $.jsx(
143
- Xn,
143
+ /* @__PURE__ */ $.jsx(na, { asChild: !0, children: /* @__PURE__ */ $.jsx("code", { children: n === "path" ? /* @__PURE__ */ $.jsx(
144
+ Zn,
144
145
  {
145
146
  name: e.name,
146
147
  backgroundOpacity: "15%",
@@ -149,7 +150,7 @@ const mo = (e, n) => e ? n(e) : void 0, go = (e) => e.schema != null && typeof e
149
150
  }
150
151
  ) : e.name }) }),
151
152
  /* @__PURE__ */ $.jsx(
152
- Xa,
153
+ ro,
153
154
  {
154
155
  schema: a,
155
156
  extraItems: [
@@ -167,91 +168,111 @@ const mo = (e, n) => e ? n(e) : void 0, go = (e) => e.schema != null && typeof e
167
168
  className: "text-sm prose-p:my-1 prose-code:whitespace-pre-line"
168
169
  }
169
170
  ),
170
- a.type === "array" && a.items.enum ? /* @__PURE__ */ $.jsx(Ar, { values: a.items.enum }) : a.enum && /* @__PURE__ */ $.jsx(Ar, { values: a.enum }),
171
- /* @__PURE__ */ $.jsx(Za, { schema: a })
171
+ a.type === "array" && a.items.enum ? /* @__PURE__ */ $.jsx(Ur, { values: a.items.enum }) : a.enum && /* @__PURE__ */ $.jsx(Ur, { values: a.enum }),
172
+ /* @__PURE__ */ $.jsx(no, { schema: a }),
173
+ (a.type === "object" || to(a)) && /* @__PURE__ */ $.jsxs(
174
+ ft.Root,
175
+ {
176
+ defaultOpen: !1,
177
+ onOpenChange: s,
178
+ open: l,
179
+ children: [
180
+ /* @__PURE__ */ $.jsx(ft.Trigger, { asChild: !0, children: /* @__PURE__ */ $.jsxs(sa, { variant: "expand", size: "sm", children: [
181
+ l ? /* @__PURE__ */ $.jsx(Ia, { size: 12 }) : /* @__PURE__ */ $.jsx(Ua, { size: 12 }),
182
+ l ? "Hide properties" : "Show properties"
183
+ ] }) }),
184
+ /* @__PURE__ */ $.jsx(ft.Content, { children: /* @__PURE__ */ $.jsx("div", { className: "mt-2", children: /* @__PURE__ */ $.jsx(
185
+ dr,
186
+ {
187
+ schema: "items" in a ? a.items : a
188
+ }
189
+ ) }) })
190
+ ]
191
+ }
192
+ )
172
193
  ] });
173
- }, bo = ({
194
+ }, jo = ({
174
195
  summary: e,
175
196
  group: n,
176
197
  parameters: t,
177
198
  id: a
178
199
  }) => /* @__PURE__ */ $.jsxs($.Fragment, { children: [
179
- /* @__PURE__ */ $.jsxs(Ie, { level: 3, id: `${a}/${n}-parameters`, className: "capitalize", children: [
180
- e && /* @__PURE__ */ $.jsxs(pr, { children: [
200
+ /* @__PURE__ */ $.jsxs(Ue, { level: 3, id: `${a}/${n}-parameters`, className: "capitalize", children: [
201
+ e && /* @__PURE__ */ $.jsxs(hr, { children: [
181
202
  e,
182
203
  " › "
183
204
  ] }),
184
205
  n === "header" ? "Headers" : `${n} Parameters`
185
206
  ] }),
186
- /* @__PURE__ */ $.jsx(io, { children: /* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((c, s) => c.required === s.required ? 0 : c.required ? -1 : 1).map((c) => /* @__PURE__ */ $.jsx(
187
- vo,
207
+ /* @__PURE__ */ $.jsx(uo, { children: /* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0 divide-y ", children: t.sort((l, s) => l.required === s.required ? 0 : l.required ? -1 : 1).map((l) => /* @__PURE__ */ $.jsx(
208
+ wo,
188
209
  {
189
- parameter: c,
210
+ parameter: l,
190
211
  id: a,
191
212
  group: n
192
213
  },
193
- `${c.name}-${c.in}`
214
+ `${l.name}-${l.in}`
194
215
  )) }) })
195
216
  ] });
196
- var _r = (e, n) => {
217
+ var Br = (e, n) => {
197
218
  const t = e[n.name];
198
219
  return t === void 0 ? (e[n.name] = n.value, e) : Array.isArray(t) ? (t.push(n.value), e) : (e[n.name] = [t, n.value], e);
199
- }, Br = "", Hr = `
220
+ }, Hr = "", Mr = `
200
221
  `, V = class {
201
222
  /**
202
223
  * Helper object to format and aggragate lines of code.
203
224
  * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
204
225
  */
205
226
  constructor({ indent: e, join: n } = {}) {
206
- this.postProcessors = [], this.code = [], this.indentationCharacter = Br, this.lineJoin = Hr, this.indentLine = (t, a = 0) => `${this.indentationCharacter.repeat(a)}${t}`, this.unshift = (t, a) => {
207
- const c = this.indentLine(t, a);
208
- this.code.unshift(c);
227
+ this.postProcessors = [], this.code = [], this.indentationCharacter = Hr, this.lineJoin = Mr, this.indentLine = (t, a = 0) => `${this.indentationCharacter.repeat(a)}${t}`, this.unshift = (t, a) => {
228
+ const l = this.indentLine(t, a);
229
+ this.code.unshift(l);
209
230
  }, this.push = (t, a) => {
210
- const c = this.indentLine(t, a);
211
- this.code.push(c);
231
+ const l = this.indentLine(t, a);
232
+ this.code.push(l);
212
233
  }, this.blank = () => {
213
234
  this.code.push("");
214
235
  }, this.join = () => {
215
236
  const t = this.code.join(this.lineJoin);
216
- return this.postProcessors.reduce((c, s) => s(c), t);
237
+ return this.postProcessors.reduce((l, s) => s(l), t);
217
238
  }, this.addPostProcessor = (t) => {
218
239
  this.postProcessors = [...this.postProcessors, t];
219
- }, this.indentationCharacter = e || Br, this.lineJoin = n ?? Hr;
240
+ }, this.indentationCharacter = e || Hr, this.lineJoin = n ?? Mr;
220
241
  }
221
- }, ft, Mr;
222
- function xo() {
223
- return Mr || (Mr = 1, ft = function(e) {
242
+ }, pt, zr;
243
+ function So() {
244
+ return zr || (zr = 1, pt = function(e) {
224
245
  return Object.prototype.toString.call(e) === "[object RegExp]";
225
- }), ft;
246
+ }), pt;
226
247
  }
227
- var pt, zr;
228
- function $o() {
229
- return zr || (zr = 1, pt = function(e) {
248
+ var dt, Wr;
249
+ function Oo() {
250
+ return Wr || (Wr = 1, dt = function(e) {
230
251
  var n = typeof e;
231
252
  return e !== null && (n === "object" || n === "function");
232
- }), pt;
253
+ }), dt;
233
254
  }
234
- var Je = {}, Wr;
235
- function wo() {
236
- return Wr || (Wr = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Je;
255
+ var Je = {}, Jr;
256
+ function To() {
257
+ return Jr || (Jr = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.default = (e) => Object.getOwnPropertySymbols(e).filter((n) => Object.prototype.propertyIsEnumerable.call(e, n))), Je;
237
258
  }
238
- var dt, Jr;
239
- function jo() {
240
- if (Jr) return dt;
241
- Jr = 1;
242
- const e = xo(), n = $o(), t = wo().default;
243
- return dt = (a, c, s) => {
259
+ var ht, Gr;
260
+ function Po() {
261
+ if (Gr) return ht;
262
+ Gr = 1;
263
+ const e = So(), n = Oo(), t = To().default;
264
+ return ht = (a, l, s) => {
244
265
  const r = [];
245
- return function o(i, l, u) {
246
- l = l || {}, l.indent = l.indent || " ", u = u || "";
266
+ return function o(i, c, u) {
267
+ c = c || {}, c.indent = c.indent || " ", u = u || "";
247
268
  let y;
248
- l.inlineCharacterLimit === void 0 ? y = {
269
+ c.inlineCharacterLimit === void 0 ? y = {
249
270
  newLine: `
250
271
  `,
251
272
  newLineOrSpace: `
252
273
  `,
253
274
  pad: u,
254
- indent: u + l.indent
275
+ indent: u + c.indent
255
276
  } : y = {
256
277
  newLine: "@@__STRINGIFY_OBJECT_NEW_LINE__@@",
257
278
  newLineOrSpace: "@@__STRINGIFY_OBJECT_NEW_LINE_OR_SPACE__@@",
@@ -259,11 +280,11 @@ function jo() {
259
280
  indent: "@@__STRINGIFY_OBJECT_INDENT__@@"
260
281
  };
261
282
  const g = (m) => {
262
- if (l.inlineCharacterLimit === void 0)
283
+ if (c.inlineCharacterLimit === void 0)
263
284
  return m;
264
285
  const x = m.replace(new RegExp(y.newLine, "g"), "").replace(new RegExp(y.newLineOrSpace, "g"), " ").replace(new RegExp(y.pad + "|" + y.indent, "g"), "");
265
- return x.length <= l.inlineCharacterLimit ? x : m.replace(new RegExp(y.newLine + "|" + y.newLineOrSpace, "g"), `
266
- `).replace(new RegExp(y.pad, "g"), u).replace(new RegExp(y.indent, "g"), u + l.indent);
286
+ return x.length <= c.inlineCharacterLimit ? x : m.replace(new RegExp(y.newLine + "|" + y.newLineOrSpace, "g"), `
287
+ `).replace(new RegExp(y.pad, "g"), u).replace(new RegExp(y.indent, "g"), u + c.indent);
267
288
  };
268
289
  if (r.indexOf(i) !== -1)
269
290
  return '"[Circular]"';
@@ -277,36 +298,36 @@ function jo() {
277
298
  r.push(i);
278
299
  const m = "[" + y.newLine + i.map((x, v) => {
279
300
  const f = i.length - 1 === v ? y.newLine : "," + y.newLineOrSpace;
280
- let h = o(x, l, u + l.indent);
281
- return l.transform && (h = l.transform(i, v, h)), y.indent + h + f;
301
+ let h = o(x, c, u + c.indent);
302
+ return c.transform && (h = c.transform(i, v, h)), y.indent + h + f;
282
303
  }).join("") + y.pad + "]";
283
304
  return r.pop(), g(m);
284
305
  }
285
306
  if (n(i)) {
286
307
  let m = Object.keys(i).concat(t(i));
287
- if (l.filter && (m = m.filter((v) => l.filter(i, v))), m.length === 0)
308
+ if (c.filter && (m = m.filter((v) => c.filter(i, v))), m.length === 0)
288
309
  return "{}";
289
310
  r.push(i);
290
311
  const x = "{" + y.newLine + m.map((v, f) => {
291
- const h = m.length - 1 === f ? y.newLine : "," + y.newLineOrSpace, d = typeof v == "symbol", j = !d && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = d || j ? v : o(v, l);
292
- let p = o(i[v], l, u + l.indent);
293
- return l.transform && (p = l.transform(i, v, p)), y.indent + String(T) + ": " + p + h;
312
+ const h = m.length - 1 === f ? y.newLine : "," + y.newLineOrSpace, d = typeof v == "symbol", j = !d && /^[a-z$_][a-z$_0-9]*$/i.test(v), T = d || j ? v : o(v, c);
313
+ let p = o(i[v], c, u + c.indent);
314
+ return c.transform && (p = c.transform(i, v, p)), y.indent + String(T) + ": " + p + h;
294
315
  }).join("") + y.pad + "}";
295
316
  return r.pop(), g(x);
296
317
  }
297
318
  return i = String(i).replace(/[\r\n]/g, (m) => m === `
298
- ` ? "\\n" : "\\r"), l.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
299
- }(a, c, s);
300
- }, dt;
319
+ ` ? "\\n" : "\\r"), c.singleQuotes === !1 ? (i = i.replace(/"/g, '\\"'), `"${i}"`) : (i = i.replace(/\\?'/g, "\\'"), `'${i}'`);
320
+ }(a, l, s);
321
+ }, ht;
301
322
  }
302
- var So = jo();
303
- const ue = /* @__PURE__ */ so(So);
323
+ var qo = Po();
324
+ const ue = /* @__PURE__ */ fo(qo);
304
325
  function Le(e, n = {}) {
305
- const { delimiter: t = '"', escapeChar: a = "\\", escapeNewlines: c = !0 } = n;
326
+ const { delimiter: t = '"', escapeChar: a = "\\", escapeNewlines: l = !0 } = n;
306
327
  return [...e.toString()].map((r) => r === "\b" ? `${a}b` : r === " " ? `${a}t` : r === `
307
- ` ? c ? `${a}n` : r : r === "\f" ? `${a}f` : r === "\r" ? c ? `${a}r` : r : r === a ? a + a : r === t ? a + t : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
328
+ ` ? l ? `${a}n` : r : r === "\f" ? `${a}f` : r === "\r" ? l ? `${a}r` : r : r === a ? a + a : r === t ? a + t : r < " " || r > "~" ? JSON.stringify(r).slice(1, -1) : r).join("");
308
329
  }
309
- var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' }), Oo = {
330
+ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' }), Co = {
310
331
  info: {
311
332
  key: "libcurl",
312
333
  title: "Libcurl",
@@ -314,15 +335,15 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
314
335
  description: "Simple REST and HTTP API Client for C",
315
336
  extname: ".c"
316
337
  },
317
- convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: a, postData: c }) => {
338
+ convert: ({ method: e, fullUrl: n, headersObj: t, allHeaders: a, postData: l }) => {
318
339
  const { push: s, blank: r, join: o } = new V();
319
340
  s("CURL *hnd = curl_easy_init();"), r(), s(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${e.toUpperCase()}");`), s("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), s(`curl_easy_setopt(hnd, CURLOPT_URL, "${n}");`);
320
341
  const i = Object.keys(t);
321
- return i.length && (r(), s("struct curl_slist *headers = NULL;"), i.forEach((l) => {
322
- s(`headers = curl_slist_append(headers, "${l}: ${le(t[l])}");`);
323
- }), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), c.text && (r(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(c.text)});`)), r(), s("CURLcode ret = curl_easy_perform(hnd);"), o();
342
+ return i.length && (r(), s("struct curl_slist *headers = NULL;"), i.forEach((c) => {
343
+ s(`headers = curl_slist_append(headers, "${c}: ${le(t[c])}");`);
344
+ }), s("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), a.cookie && (r(), s(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${a.cookie}");`)), l.text && (r(), s(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(l.text)});`)), r(), s("CURLcode ret = curl_easy_perform(hnd);"), o();
324
345
  }
325
- }, To = {
346
+ }, Ro = {
326
347
  info: {
327
348
  key: "c",
328
349
  title: "C",
@@ -330,30 +351,30 @@ var Fe = (e) => Le(e, { delimiter: "'" }), le = (e) => Le(e, { delimiter: '"' })
330
351
  cli: "c"
331
352
  },
332
353
  clientsById: {
333
- libcurl: Oo
354
+ libcurl: Co
334
355
  }
335
356
  }, fe = (e, n) => Object.keys(e).find((t) => t.toLowerCase() === n.toLowerCase()), ge = (e, n) => {
336
357
  const t = fe(e, n);
337
358
  if (t)
338
359
  return e[t];
339
- }, Ze = (e, n) => !!fe(e, n), Po = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
360
+ }, Ze = (e, n) => !!fe(e, n), Eo = (e) => ["application/json", "application/x-json", "text/json", "text/x-json", "+json"].some(
340
361
  (n) => e.indexOf(n) > -1
341
- ), Gr = class {
362
+ ), Vr = class {
342
363
  constructor(e) {
343
364
  this.name = "", this.toString = () => `:${this.name}`, this.name = e;
344
365
  }
345
- }, qo = class {
366
+ }, ko = class {
346
367
  constructor(e) {
347
368
  this.path = "", this.toString = () => `(clojure.java.io/file "${this.path}")`, this.path = e;
348
369
  }
349
- }, sa = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), la = (e) => e === void 0 ? !0 : sa(e) === "object" ? Object.keys(e).length === 0 : !1, Vr = (e) => (Object.keys(e).filter((n) => la(e[n])).forEach((n) => {
370
+ }, ca = (e) => e === void 0 ? null : e === null ? "null" : e.constructor.name.toLowerCase(), ua = (e) => e === void 0 ? !0 : ca(e) === "object" ? Object.keys(e).length === 0 : !1, Dr = (e) => (Object.keys(e).filter((n) => ua(e[n])).forEach((n) => {
350
371
  delete e[n];
351
372
  }), e), Ve = (e, n) => {
352
373
  const t = " ".repeat(e);
353
374
  return n.replace(/\n/g, `
354
375
  ${t}`);
355
- }, dr = (e) => {
356
- switch (sa(e)) {
376
+ }, yr = (e) => {
377
+ switch (ca(e)) {
357
378
  case "string":
358
379
  return `"${e.replace(/"/g, '\\"')}"`;
359
380
  case "file":
@@ -366,20 +387,20 @@ ${t}`);
366
387
  return `#"${e.source}"`;
367
388
  case "object": {
368
389
  const n = Object.keys(e).reduce((t, a) => {
369
- const c = Ve(a.length + 2, dr(e[a]));
370
- return `${t}:${a} ${c}
390
+ const l = Ve(a.length + 2, yr(e[a]));
391
+ return `${t}:${a} ${l}
371
392
  `;
372
393
  }, "").trim();
373
394
  return `{${Ve(1, n)}}`;
374
395
  }
375
396
  case "array": {
376
- const n = e.reduce((t, a) => `${t} ${dr(a)}`, "").trim();
397
+ const n = e.reduce((t, a) => `${t} ${yr(a)}`, "").trim();
377
398
  return `[${Ve(1, n)}]`;
378
399
  }
379
400
  default:
380
401
  return e.toString();
381
402
  }
382
- }, Co = {
403
+ }, No = {
383
404
  info: {
384
405
  key: "clj_http",
385
406
  title: "clj-http",
@@ -387,79 +408,79 @@ ${t}`);
387
408
  description: "An idiomatic clojure http client wrapping the apache client.",
388
409
  extname: ".clj"
389
410
  },
390
- convert: ({ queryObj: e, method: n, postData: t, url: a, allHeaders: c }, s) => {
411
+ convert: ({ queryObj: e, method: n, postData: t, url: a, allHeaders: l }, s) => {
391
412
  const { push: r, join: o } = new V({ indent: s == null ? void 0 : s.indent }), i = ["get", "post", "put", "delete", "patch", "head", "options"];
392
413
  if (n = n.toLowerCase(), !i.includes(n))
393
414
  return r("Method not supported"), o();
394
- const l = {
395
- headers: c,
415
+ const c = {
416
+ headers: l,
396
417
  "query-params": e
397
418
  };
398
419
  switch (t.mimeType) {
399
420
  case "application/json":
400
421
  {
401
- l["content-type"] = new Gr("json"), l["form-params"] = t.jsonObj;
402
- const u = fe(l.headers, "content-type");
403
- u && delete l.headers[u];
422
+ c["content-type"] = new Vr("json"), c["form-params"] = t.jsonObj;
423
+ const u = fe(c.headers, "content-type");
424
+ u && delete c.headers[u];
404
425
  }
405
426
  break;
406
427
  case "application/x-www-form-urlencoded":
407
428
  {
408
- l["form-params"] = t.paramsObj;
409
- const u = fe(l.headers, "content-type");
410
- u && delete l.headers[u];
429
+ c["form-params"] = t.paramsObj;
430
+ const u = fe(c.headers, "content-type");
431
+ u && delete c.headers[u];
411
432
  }
412
433
  break;
413
434
  case "text/plain":
414
435
  {
415
- l.body = t.text;
416
- const u = fe(l.headers, "content-type");
417
- u && delete l.headers[u];
436
+ c.body = t.text;
437
+ const u = fe(c.headers, "content-type");
438
+ u && delete c.headers[u];
418
439
  }
419
440
  break;
420
441
  case "multipart/form-data": {
421
442
  if (t.params) {
422
- l.multipart = t.params.map((y) => y.fileName && !y.value ? {
443
+ c.multipart = t.params.map((y) => y.fileName && !y.value ? {
423
444
  name: y.name,
424
- content: new qo(y.fileName)
445
+ content: new ko(y.fileName)
425
446
  } : {
426
447
  name: y.name,
427
448
  content: y.value
428
449
  });
429
- const u = fe(l.headers, "content-type");
430
- u && delete l.headers[u];
450
+ const u = fe(c.headers, "content-type");
451
+ u && delete c.headers[u];
431
452
  }
432
453
  break;
433
454
  }
434
455
  }
435
- switch (ge(l.headers, "accept")) {
456
+ switch (ge(c.headers, "accept")) {
436
457
  case "application/json":
437
458
  {
438
- l.accept = new Gr("json");
439
- const u = fe(l.headers, "accept");
440
- u && delete l.headers[u];
459
+ c.accept = new Vr("json");
460
+ const u = fe(c.headers, "accept");
461
+ u && delete c.headers[u];
441
462
  }
442
463
  break;
443
464
  }
444
465
  if (r(`(require '[clj-http.client :as client])
445
- `), la(Vr(l)))
466
+ `), ua(Dr(c)))
446
467
  r(`(client/${n} "${a}")`);
447
468
  else {
448
- const u = 11 + n.length + a.length, y = Ve(u, dr(Vr(l)));
469
+ const u = 11 + n.length + a.length, y = Ve(u, yr(Dr(c)));
449
470
  r(`(client/${n} "${a}" ${y})`);
450
471
  }
451
472
  return o();
452
473
  }
453
- }, Eo = {
474
+ }, Ao = {
454
475
  info: {
455
476
  key: "clojure",
456
477
  title: "Clojure",
457
478
  default: "clj_http"
458
479
  },
459
480
  clientsById: {
460
- clj_http: Co
481
+ clj_http: No
461
482
  }
462
- }, Ro = (e) => {
483
+ }, Io = (e) => {
463
484
  let n = ge(e, "accept-encoding");
464
485
  if (!n)
465
486
  return [];
@@ -467,8 +488,8 @@ ${t}`);
467
488
  gzip: "DecompressionMethods.GZip",
468
489
  deflate: "DecompressionMethods.Deflate"
469
490
  }, a = [];
470
- return typeof n == "string" && (n = [n]), n.forEach((c) => {
471
- c.split(",").forEach((s) => {
491
+ return typeof n == "string" && (n = [n]), n.forEach((l) => {
492
+ l.split(",").forEach((s) => {
472
493
  const r = /\s*([^;\s]+)/.exec(s);
473
494
  if (r) {
474
495
  const o = t[r[1]];
@@ -476,7 +497,7 @@ ${t}`);
476
497
  }
477
498
  });
478
499
  }), a;
479
- }, ko = {
500
+ }, Uo = {
480
501
  info: {
481
502
  key: "httpclient",
482
503
  title: "HttpClient",
@@ -484,16 +505,16 @@ ${t}`);
484
505
  description: ".NET Standard HTTP Client",
485
506
  extname: ".cs"
486
507
  },
487
- convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, c) => {
508
+ convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
488
509
  var m, x;
489
510
  const s = {
490
511
  indent: " ",
491
- ...c
512
+ ...l
492
513
  }, { push: r, join: o } = new V({ indent: s.indent });
493
514
  r("using System.Net.Http.Headers;");
494
515
  let i = "";
495
- const l = !!e.cookie, u = Ro(e);
496
- (l || u.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), l && r("UseCookies = false,", 1), u.length && r(`AutomaticDecompression = ${u.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
516
+ const c = !!e.cookie, u = Io(e);
517
+ (c || u.length) && (i = "clientHandler", r("var clientHandler = new HttpClientHandler"), r("{"), c && r("UseCookies = false,", 1), u.length && r(`AutomaticDecompression = ${u.join(" | ")},`, 1), r("};")), r(`var client = new HttpClient(${i});`), r("var request = new HttpRequestMessage"), r("{");
497
518
  const y = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"];
498
519
  t = t.toUpperCase(), t && y.includes(t) ? t = `HttpMethod.${t[0]}${t.substring(1).toLowerCase()}` : t = `new HttpMethod("${t}")`, r(`Method = ${t},`, 1), r(`RequestUri = new Uri("${a}"),`, 1);
499
520
  const g = Object.keys(e).filter((v) => {
@@ -529,10 +550,10 @@ ${t}`);
529
550
  return r("};"), r("using (var response = await client.SendAsync(request))"), r("{"), r("response.EnsureSuccessStatusCode();", 1), r("var body = await response.Content.ReadAsStringAsync();", 1), r("Console.WriteLine(body);", 1), r("}"), o();
530
551
  }
531
552
  };
532
- function No(e) {
553
+ function Lo(e) {
533
554
  return e[0].toUpperCase() + e.slice(1).toLowerCase();
534
555
  }
535
- var Ao = {
556
+ var Fo = {
536
557
  info: {
537
558
  key: "restsharp",
538
559
  title: "RestSharp",
@@ -541,7 +562,7 @@ var Ao = {
541
562
  extname: ".cs",
542
563
  installation: "dotnet add package RestSharp"
543
564
  },
544
- convert: ({ method: e, fullUrl: n, headersObj: t, cookies: a, postData: c, uriObj: s }) => {
565
+ convert: ({ method: e, fullUrl: n, headersObj: t, cookies: a, postData: l, uriObj: s }) => {
545
566
  const { push: r, join: o } = new V();
546
567
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(
547
568
  e.toUpperCase()
@@ -550,43 +571,43 @@ var Ao = {
550
571
  r(`using RestSharp;
551
572
 
552
573
  `), r(`var options = new RestClientOptions("${n}");`), r("var client = new RestClient(options);"), r('var request = new RestRequest("");');
553
- const l = c.mimeType && c.mimeType === "multipart/form-data";
554
- switch (l && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((u) => {
555
- if (c.mimeType && u.toLowerCase() === "content-type" && c.text) {
556
- l && c.boundary && r(`request.FormBoundary = "${c.boundary}";`);
574
+ const c = l.mimeType && l.mimeType === "multipart/form-data";
575
+ switch (c && r("request.AlwaysMultipartFormData = true;"), Object.keys(t).forEach((u) => {
576
+ if (l.mimeType && u.toLowerCase() === "content-type" && l.text) {
577
+ c && l.boundary && r(`request.FormBoundary = "${l.boundary}";`);
557
578
  return;
558
579
  }
559
580
  r(`request.AddHeader("${u}", "${le(t[u])}");`);
560
581
  }), a.forEach(({ name: u, value: y }) => {
561
582
  r(`request.AddCookie("${u}", "${le(y)}", "${s.pathname}", "${s.host}");`);
562
- }), c.mimeType) {
583
+ }), l.mimeType) {
563
584
  case "multipart/form-data":
564
- if (!c.params) break;
565
- c.params.forEach((u) => {
585
+ if (!l.params) break;
586
+ l.params.forEach((u) => {
566
587
  u.fileName ? r(`request.AddFile("${u.name}", "${u.fileName}");`) : r(`request.AddParameter("${u.name}", "${u.value}");`);
567
588
  });
568
589
  break;
569
590
  case "application/x-www-form-urlencoded":
570
- if (!c.params) break;
571
- c.params.forEach((u) => {
591
+ if (!l.params) break;
592
+ l.params.forEach((u) => {
572
593
  r(`request.AddParameter("${u.name}", "${u.value}");`);
573
594
  });
574
595
  break;
575
596
  case "application/json": {
576
- if (!c.text) break;
577
- const u = JSON.stringify(c.text);
597
+ if (!l.text) break;
598
+ const u = JSON.stringify(l.text);
578
599
  r(`request.AddJsonBody(${u}, false);`);
579
600
  break;
580
601
  }
581
602
  default:
582
- if (!c.text) break;
583
- r(`request.AddStringBody("${c.text}", "${c.mimeType}");`);
603
+ if (!l.text) break;
604
+ r(`request.AddStringBody("${l.text}", "${l.mimeType}");`);
584
605
  }
585
- return r(`var response = await client.${No(e)}Async(request);
606
+ return r(`var response = await client.${Lo(e)}Async(request);
586
607
  `), r(`Console.WriteLine("{0}", response.Content);
587
608
  `), o();
588
609
  }
589
- }, Io = {
610
+ }, _o = {
590
611
  info: {
591
612
  key: "csharp",
592
613
  title: "C#",
@@ -594,10 +615,10 @@ var Ao = {
594
615
  cli: "dotnet"
595
616
  },
596
617
  clientsById: {
597
- httpclient: ko,
598
- restsharp: Ao
618
+ httpclient: Uo,
619
+ restsharp: Fo
599
620
  }
600
- }, Uo = {
621
+ }, Bo = {
601
622
  info: {
602
623
  key: "native",
603
624
  title: "NewRequest",
@@ -605,9 +626,9 @@ var Ao = {
605
626
  description: "Golang HTTP client request",
606
627
  extname: ".go"
607
628
  },
608
- convert: ({ postData: e, method: n, allHeaders: t, fullUrl: a }, c = {}) => {
609
- const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: l = !1, printBody: u = !0, timeout: y = -1 } = c, g = l ? "err" : "_", m = i ? 1 : 0, x = () => {
610
- l && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
629
+ convert: ({ postData: e, method: n, allHeaders: t, fullUrl: a }, l = {}) => {
630
+ const { blank: s, push: r, join: o } = new V({ indent: " " }), { showBoilerplate: i = !0, checkErrors: c = !1, printBody: u = !0, timeout: y = -1 } = l, g = c ? "err" : "_", m = i ? 1 : 0, x = () => {
631
+ c && (r("if err != nil {", m), r("panic(err)", m + 1), r("}", m));
611
632
  };
612
633
  i && (r("package main"), s(), r("import ("), r('"fmt"', m), y > 0 && r('"time"', m), e.text && r('"strings"', m), r('"net/http"', m), u && r('"io"', m), r(")"), s(), r("func main() {"), s());
613
634
  const v = y > 0, f = v, h = f ? "client" : "http.DefaultClient";
@@ -615,7 +636,7 @@ var Ao = {
615
636
  r(`req.Header.Add("${d}", "${le(t[d])}")`, m);
616
637
  }), s()), r(`res, ${g} := ${h}.Do(req)`, m), x(), u && (s(), r("defer res.Body.Close()", m), r(`body, ${g} := io.ReadAll(res.Body)`, m), x()), s(), u && r("fmt.Println(string(body))", m), i && (s(), r("}")), o();
617
638
  }
618
- }, Lo = {
639
+ }, Ho = {
619
640
  info: {
620
641
  key: "go",
621
642
  title: "Go",
@@ -623,10 +644,10 @@ var Ao = {
623
644
  cli: "go"
624
645
  },
625
646
  clientsById: {
626
- native: Uo
647
+ native: Bo
627
648
  }
628
- }, Dr = `\r
629
- `, Fo = {
649
+ }, Qr = `\r
650
+ `, Mo = {
630
651
  info: {
631
652
  key: "http1.1",
632
653
  title: "HTTP/1.1",
@@ -634,36 +655,36 @@ var Ao = {
634
655
  description: "HTTP/1.1 request string in accordance with RFC 7230",
635
656
  extname: null
636
657
  },
637
- convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: a, allHeaders: c, postData: s }, r) => {
658
+ convert: ({ method: e, fullUrl: n, uriObj: t, httpVersion: a, allHeaders: l, postData: s }, r) => {
638
659
  const o = {
639
660
  absoluteURI: !1,
640
661
  autoContentLength: !0,
641
662
  autoHost: !0,
642
663
  ...r
643
- }, { blank: i, push: l, join: u } = new V({ indent: "", join: Dr }), y = o.absoluteURI ? n : t.path;
644
- l(`${e} ${y} ${a}`);
645
- const g = Object.keys(c);
664
+ }, { blank: i, push: c, join: u } = new V({ indent: "", join: Qr }), y = o.absoluteURI ? n : t.path;
665
+ c(`${e} ${y} ${a}`);
666
+ const g = Object.keys(l);
646
667
  if (g.forEach((v) => {
647
668
  const f = v.toLowerCase().replace(/(^|-)(\w)/g, (h) => h.toUpperCase());
648
- l(`${f}: ${c[v]}`);
649
- }), o.autoHost && !g.includes("host") && l(`Host: ${t.host}`), o.autoContentLength && s.text && !g.includes("content-length")) {
669
+ c(`${f}: ${l[v]}`);
670
+ }), o.autoHost && !g.includes("host") && c(`Host: ${t.host}`), o.autoContentLength && s.text && !g.includes("content-length")) {
650
671
  const f = new TextEncoder().encode(s.text).length.toString();
651
- l(`Content-Length: ${f}`);
672
+ c(`Content-Length: ${f}`);
652
673
  }
653
674
  i();
654
675
  const m = u(), x = s.text || "";
655
- return `${m}${Dr}${x}`;
676
+ return `${m}${Qr}${x}`;
656
677
  }
657
- }, _o = {
678
+ }, zo = {
658
679
  info: {
659
680
  key: "http",
660
681
  title: "HTTP",
661
682
  default: "http1.1"
662
683
  },
663
684
  clientsById: {
664
- "http1.1": Fo
685
+ "http1.1": Mo
665
686
  }
666
- }, Bo = {
687
+ }, Wo = {
667
688
  info: {
668
689
  key: "asynchttp",
669
690
  title: "AsyncHttp",
@@ -671,16 +692,16 @@ var Ao = {
671
692
  description: "Asynchronous Http and WebSocket Client library for Java",
672
693
  extname: ".java"
673
694
  },
674
- convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, c) => {
695
+ convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
675
696
  const s = {
676
697
  indent: " ",
677
- ...c
698
+ ...l
678
699
  }, { blank: r, push: o, join: i } = new V({ indent: s.indent });
679
- return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(n).forEach((l) => {
680
- o(`.setHeader("${l}", "${le(n[l])}")`, 1);
700
+ return o("AsyncHttpClient client = new DefaultAsyncHttpClient();"), o(`client.prepare("${e.toUpperCase()}", "${a}")`), Object.keys(n).forEach((c) => {
701
+ o(`.setHeader("${c}", "${le(n[c])}")`, 1);
681
702
  }), t.text && o(`.setBody(${JSON.stringify(t.text)})`, 1), o(".execute()", 1), o(".toCompletableFuture()", 1), o(".thenAccept(System.out::println)", 1), o(".join();", 1), r(), o("client.close();"), i();
682
703
  }
683
- }, Ho = {
704
+ }, Jo = {
684
705
  info: {
685
706
  key: "nethttp",
686
707
  title: "java.net.http",
@@ -688,10 +709,10 @@ var Ao = {
688
709
  description: "Java Standardized HTTP Client API",
689
710
  extname: ".java"
690
711
  },
691
- convert: ({ allHeaders: e, fullUrl: n, method: t, postData: a }, c) => {
712
+ convert: ({ allHeaders: e, fullUrl: n, method: t, postData: a }, l) => {
692
713
  const s = {
693
714
  indent: " ",
694
- ...c
715
+ ...l
695
716
  }, { push: r, join: o } = new V({ indent: s.indent });
696
717
  return r("HttpRequest request = HttpRequest.newBuilder()"), r(`.uri(URI.create("${n}"))`, 2), Object.keys(e).forEach((i) => {
697
718
  r(`.header("${i}", "${le(e[i])}")`, 2);
@@ -702,7 +723,7 @@ var Ao = {
702
723
  "HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"
703
724
  ), r("System.out.println(response.body());"), o();
704
725
  }
705
- }, Mo = {
726
+ }, Go = {
706
727
  info: {
707
728
  key: "okhttp",
708
729
  title: "OkHttp",
@@ -710,16 +731,16 @@ var Ao = {
710
731
  description: "An HTTP Request Client Library",
711
732
  extname: ".java"
712
733
  },
713
- convert: ({ postData: e, method: n, fullUrl: t, allHeaders: a }, c) => {
734
+ convert: ({ postData: e, method: n, fullUrl: t, allHeaders: a }, l) => {
714
735
  const s = {
715
736
  indent: " ",
716
- ...c
717
- }, { push: r, blank: o, join: i } = new V({ indent: s.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
718
- return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), l.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
737
+ ...l
738
+ }, { push: r, blank: o, join: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
739
+ return r("OkHttpClient client = new OkHttpClient();"), o(), e.text && (e.boundary ? r(`MediaType mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}");`) : r(`MediaType mediaType = MediaType.parse("${e.mimeType}");`), r(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(e.text)});`)), r("Request request = new Request.Builder()"), r(`.url("${t}")`, 1), c.includes(n.toUpperCase()) ? u.includes(n.toUpperCase()) ? e.text ? r(`.${n.toLowerCase()}(body)`, 1) : r(`.${n.toLowerCase()}(null)`, 1) : r(`.${n.toLowerCase()}()`, 1) : e.text ? r(`.method("${n.toUpperCase()}", body)`, 1) : r(`.method("${n.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
719
740
  r(`.addHeader("${y}", "${le(a[y])}")`, 1);
720
741
  }), r(".build();", 1), o(), r("Response response = client.newCall(request).execute();"), i();
721
742
  }
722
- }, zo = {
743
+ }, Vo = {
723
744
  info: {
724
745
  key: "unirest",
725
746
  title: "Unirest",
@@ -727,28 +748,28 @@ var Ao = {
727
748
  description: "Lightweight HTTP Request Client Library",
728
749
  extname: ".java"
729
750
  },
730
- convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, c) => {
751
+ convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
731
752
  const s = {
732
753
  indent: " ",
733
- ...c
754
+ ...l
734
755
  }, { join: r, push: o } = new V({ indent: s.indent });
735
- return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : o(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(n).forEach((l) => {
736
- o(`.header("${l}", "${le(n[l])}")`, 1);
756
+ return ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(e.toUpperCase()) ? o(`HttpResponse<String> response = Unirest.${e.toLowerCase()}("${a}")`) : o(`HttpResponse<String> response = Unirest.customMethod("${e.toUpperCase()}","${a}")`), Object.keys(n).forEach((c) => {
757
+ o(`.header("${c}", "${le(n[c])}")`, 1);
737
758
  }), t.text && o(`.body(${JSON.stringify(t.text)})`, 1), o(".asString();", 1), r();
738
759
  }
739
- }, Wo = {
760
+ }, Do = {
740
761
  info: {
741
762
  key: "java",
742
763
  title: "Java",
743
764
  default: "unirest"
744
765
  },
745
766
  clientsById: {
746
- asynchttp: Bo,
747
- nethttp: Ho,
748
- okhttp: Mo,
749
- unirest: zo
767
+ asynchttp: Wo,
768
+ nethttp: Jo,
769
+ okhttp: Go,
770
+ unirest: Vo
750
771
  }
751
- }, Jo = {
772
+ }, Qo = {
752
773
  info: {
753
774
  key: "axios",
754
775
  title: "Axios",
@@ -757,42 +778,42 @@ var Ao = {
757
778
  extname: ".js",
758
779
  installation: "npm install axios --save"
759
780
  },
760
- convert: ({ allHeaders: e, method: n, url: t, queryObj: a, postData: c }, s) => {
781
+ convert: ({ allHeaders: e, method: n, url: t, queryObj: a, postData: l }, s) => {
761
782
  const r = {
762
783
  indent: " ",
763
784
  ...s
764
- }, { blank: o, push: i, join: l, addPostProcessor: u } = new V({ indent: r.indent });
785
+ }, { blank: o, push: i, join: c, addPostProcessor: u } = new V({ indent: r.indent });
765
786
  i("import axios from 'axios';"), o();
766
787
  const y = {
767
788
  method: n,
768
789
  url: t
769
790
  };
770
- switch (Object.keys(a).length && (y.params = a), Object.keys(e).length && (y.headers = e), c.mimeType) {
791
+ switch (Object.keys(a).length && (y.params = a), Object.keys(e).length && (y.headers = e), l.mimeType) {
771
792
  case "application/x-www-form-urlencoded":
772
- c.params && (i("const encodedParams = new URLSearchParams();"), c.params.forEach((m) => {
793
+ l.params && (i("const encodedParams = new URLSearchParams();"), l.params.forEach((m) => {
773
794
  i(`encodedParams.set('${m.name}', '${m.value}');`);
774
795
  }), o(), y.data = "encodedParams,", u((m) => m.replace(/'encodedParams,'/, "encodedParams,")));
775
796
  break;
776
797
  case "application/json":
777
- c.jsonObj && (y.data = c.jsonObj);
798
+ l.jsonObj && (y.data = l.jsonObj);
778
799
  break;
779
800
  case "multipart/form-data":
780
- if (!c.params)
801
+ if (!l.params)
781
802
  break;
782
- i("const form = new FormData();"), c.params.forEach((m) => {
803
+ i("const form = new FormData();"), l.params.forEach((m) => {
783
804
  i(`form.append('${m.name}', '${m.value || m.fileName || ""}');`);
784
805
  }), o(), y.data = "[form]";
785
806
  break;
786
807
  default:
787
- c.text && (y.data = c.text);
808
+ l.text && (y.data = l.text);
788
809
  }
789
810
  const g = ue(y, {
790
811
  indent: " ",
791
812
  inlineCharacterLimit: 80
792
813
  }).replace('"[form]"', "form");
793
- return i(`const options = ${g};`), o(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), l();
814
+ return i(`const options = ${g};`), o(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), c();
794
815
  }
795
- }, Go = {
816
+ }, Ko = {
796
817
  info: {
797
818
  key: "fetch",
798
819
  title: "fetch",
@@ -800,20 +821,20 @@ var Ao = {
800
821
  description: "Perform asynchronous HTTP requests with the Fetch API",
801
822
  extname: ".js"
802
823
  },
803
- convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, c) => {
824
+ convert: ({ method: e, allHeaders: n, postData: t, fullUrl: a }, l) => {
804
825
  const s = {
805
826
  indent: " ",
806
827
  credentials: null,
807
- ...c
808
- }, { blank: r, join: o, push: i } = new V({ indent: s.indent }), l = {
828
+ ...l
829
+ }, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = {
809
830
  method: e
810
831
  };
811
- switch (Object.keys(n).length && (l.headers = n), s.credentials !== null && (l.credentials = s.credentials), t.mimeType) {
832
+ switch (Object.keys(n).length && (c.headers = n), s.credentials !== null && (c.credentials = s.credentials), t.mimeType) {
812
833
  case "application/x-www-form-urlencoded":
813
- l.body = t.paramsObj ? t.paramsObj : t.text;
834
+ c.body = t.paramsObj ? t.paramsObj : t.text;
814
835
  break;
815
836
  case "application/json":
816
- t.jsonObj && (l.body = t.jsonObj);
837
+ t.jsonObj && (c.body = t.jsonObj);
817
838
  break;
818
839
  case "multipart/form-data":
819
840
  if (!t.params)
@@ -824,10 +845,10 @@ var Ao = {
824
845
  }), r();
825
846
  break;
826
847
  default:
827
- t.text && (l.body = t.text);
848
+ t.text && (c.body = t.text);
828
849
  }
829
- return l.headers && !Object.keys(l.headers).length && delete l.headers, i(
830
- `const options = ${ue(l, {
850
+ return c.headers && !Object.keys(c.headers).length && delete c.headers, i(
851
+ `const options = ${ue(c, {
831
852
  indent: s.indent,
832
853
  inlineCharacterLimit: 80,
833
854
  // The Fetch API body only accepts string parameters, but stringified JSON can be difficult
@@ -845,7 +866,7 @@ var Ao = {
845
866
  })};`
846
867
  ), r(), t.params && t.mimeType === "multipart/form-data" && (i("options.body = form;"), r()), i(`fetch('${a}', options)`), i(".then(response => response.json())", 1), i(".then(response => console.log(response))", 1), i(".catch(err => console.error(err));", 1), o();
847
868
  }
848
- }, Vo = {
869
+ }, Yo = {
849
870
  info: {
850
871
  key: "jquery",
851
872
  title: "jQuery",
@@ -853,12 +874,12 @@ var Ao = {
853
874
  description: "Perform an asynchronous HTTP (Ajax) requests with jQuery",
854
875
  extname: ".js"
855
876
  },
856
- convert: ({ fullUrl: e, method: n, allHeaders: t, postData: a }, c) => {
877
+ convert: ({ fullUrl: e, method: n, allHeaders: t, postData: a }, l) => {
857
878
  var y;
858
879
  const s = {
859
880
  indent: " ",
860
- ...c
861
- }, { blank: r, push: o, join: i } = new V({ indent: s.indent }), l = {
881
+ ...l
882
+ }, { blank: r, push: o, join: i } = new V({ indent: s.indent }), c = {
862
883
  async: !0,
863
884
  crossDomain: !0,
864
885
  url: e,
@@ -867,29 +888,29 @@ var Ao = {
867
888
  };
868
889
  switch (a.mimeType) {
869
890
  case "application/x-www-form-urlencoded":
870
- l.data = a.paramsObj ? a.paramsObj : a.text;
891
+ c.data = a.paramsObj ? a.paramsObj : a.text;
871
892
  break;
872
893
  case "application/json":
873
- l.processData = !1, l.data = a.text;
894
+ c.processData = !1, c.data = a.text;
874
895
  break;
875
896
  case "multipart/form-data":
876
897
  if (!a.params)
877
898
  break;
878
899
  if (o("const form = new FormData();"), a.params.forEach((g) => {
879
900
  o(`form.append('${g.name}', '${g.value || g.fileName || ""}');`);
880
- }), l.processData = !1, l.contentType = !1, l.mimeType = "multipart/form-data", l.data = "[form]", Ze(t, "content-type") && (y = ge(t, "content-type")) != null && y.includes("boundary")) {
901
+ }), c.processData = !1, c.contentType = !1, c.mimeType = "multipart/form-data", c.data = "[form]", Ze(t, "content-type") && (y = ge(t, "content-type")) != null && y.includes("boundary")) {
881
902
  const g = fe(t, "content-type");
882
- g && delete l.headers[g];
903
+ g && delete c.headers[g];
883
904
  }
884
905
  r();
885
906
  break;
886
907
  default:
887
- a.text && (l.data = a.text);
908
+ a.text && (c.data = a.text);
888
909
  }
889
- const u = ue(l, { indent: s.indent }).replace("'[form]'", "form");
910
+ const u = ue(c, { indent: s.indent }).replace("'[form]'", "form");
890
911
  return o(`const settings = ${u};`), r(), o("$.ajax(settings).done(function (response) {"), o("console.log(response);", 1), o("});"), i();
891
912
  }
892
- }, Do = {
913
+ }, Xo = {
893
914
  info: {
894
915
  key: "xhr",
895
916
  title: "XMLHttpRequest",
@@ -897,12 +918,12 @@ var Ao = {
897
918
  description: "W3C Standard API that provides scripted client functionality",
898
919
  extname: ".js"
899
920
  },
900
- convert: ({ postData: e, allHeaders: n, method: t, fullUrl: a }, c) => {
901
- var l;
921
+ convert: ({ postData: e, allHeaders: n, method: t, fullUrl: a }, l) => {
922
+ var c;
902
923
  const s = {
903
924
  indent: " ",
904
925
  cors: !0,
905
- ...c
926
+ ...l
906
927
  }, { blank: r, push: o, join: i } = new V({ indent: s.indent });
907
928
  switch (e.mimeType) {
908
929
  case "application/json":
@@ -917,7 +938,7 @@ var Ao = {
917
938
  break;
918
939
  if (o("const data = new FormData();"), e.params.forEach((u) => {
919
940
  o(`data.append('${u.name}', '${u.value || u.fileName || ""}');`);
920
- }), Ze(n, "content-type") && (l = ge(n, "content-type")) != null && l.includes("boundary")) {
941
+ }), Ze(n, "content-type") && (c = ge(n, "content-type")) != null && c.includes("boundary")) {
921
942
  const u = fe(n, "content-type");
922
943
  u && delete n[u];
923
944
  }
@@ -930,19 +951,19 @@ var Ao = {
930
951
  o(`xhr.setRequestHeader('${u}', '${Fe(n[u])}');`);
931
952
  }), r(), o("xhr.send(data);"), i();
932
953
  }
933
- }, Qo = {
954
+ }, Zo = {
934
955
  info: {
935
956
  key: "javascript",
936
957
  title: "JavaScript",
937
958
  default: "xhr"
938
959
  },
939
960
  clientsById: {
940
- xhr: Do,
941
- axios: Jo,
942
- fetch: Go,
943
- jquery: Vo
961
+ xhr: Xo,
962
+ axios: Qo,
963
+ fetch: Ko,
964
+ jquery: Yo
944
965
  }
945
- }, Ko = {
966
+ }, ei = {
946
967
  info: {
947
968
  key: "native",
948
969
  title: "Native JSON",
@@ -966,26 +987,26 @@ var Ao = {
966
987
  case "multipart/form-data":
967
988
  if (!e.params)
968
989
  break;
969
- const c = {};
990
+ const l = {};
970
991
  e.params.forEach((s) => {
971
- c[s.name] = s.value;
972
- }), a = c;
992
+ l[s.name] = s.value;
993
+ }), a = l;
973
994
  break;
974
995
  default:
975
996
  e.text && (a = e.text);
976
997
  }
977
998
  return typeof a > "u" || a === "" ? "No JSON body" : JSON.stringify(a, null, t.indent);
978
999
  }
979
- }, Yo = {
1000
+ }, ti = {
980
1001
  info: {
981
1002
  key: "json",
982
1003
  title: "JSON",
983
1004
  default: "native"
984
1005
  },
985
1006
  clientsById: {
986
- native: Ko
1007
+ native: ei
987
1008
  }
988
- }, Xo = {
1009
+ }, ri = {
989
1010
  info: {
990
1011
  key: "okhttp",
991
1012
  title: "OkHttp",
@@ -993,25 +1014,25 @@ var Ao = {
993
1014
  description: "An HTTP Request Client Library",
994
1015
  extname: ".kt"
995
1016
  },
996
- convert: ({ postData: e, fullUrl: n, method: t, allHeaders: a }, c) => {
1017
+ convert: ({ postData: e, fullUrl: n, method: t, allHeaders: a }, l) => {
997
1018
  const s = {
998
1019
  indent: " ",
999
- ...c
1000
- }, { blank: r, join: o, push: i } = new V({ indent: s.indent }), l = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
1001
- return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), l.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
1020
+ ...l
1021
+ }, { blank: r, join: o, push: i } = new V({ indent: s.indent }), c = ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"], u = ["POST", "PUT", "DELETE", "PATCH"];
1022
+ return i("val client = OkHttpClient()"), r(), e.text && (e.boundary ? i(`val mediaType = MediaType.parse("${e.mimeType}; boundary=${e.boundary}")`) : i(`val mediaType = MediaType.parse("${e.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(e.text)})`)), i("val request = Request.Builder()"), i(`.url("${n}")`, 1), c.includes(t.toUpperCase()) ? u.includes(t.toUpperCase()) ? e.text ? i(`.${t.toLowerCase()}(body)`, 1) : i(`.${t.toLowerCase()}(null)`, 1) : i(`.${t.toLowerCase()}()`, 1) : e.text ? i(`.method("${t.toUpperCase()}", body)`, 1) : i(`.method("${t.toUpperCase()}", null)`, 1), Object.keys(a).forEach((y) => {
1002
1023
  i(`.addHeader("${y}", "${le(a[y])}")`, 1);
1003
1024
  }), i(".build()", 1), r(), i("val response = client.newCall(request).execute()"), o();
1004
1025
  }
1005
- }, Zo = {
1026
+ }, ni = {
1006
1027
  info: {
1007
1028
  key: "kotlin",
1008
1029
  title: "Kotlin",
1009
1030
  default: "okhttp"
1010
1031
  },
1011
1032
  clientsById: {
1012
- okhttp: Xo
1033
+ okhttp: ri
1013
1034
  }
1014
- }, ei = {
1035
+ }, ai = {
1015
1036
  info: {
1016
1037
  key: "axios",
1017
1038
  title: "Axios",
@@ -1020,11 +1041,11 @@ var Ao = {
1020
1041
  extname: ".cjs",
1021
1042
  installation: "npm install axios --save"
1022
1043
  },
1023
- convert: ({ method: e, fullUrl: n, allHeaders: t, postData: a }, c) => {
1044
+ convert: ({ method: e, fullUrl: n, allHeaders: t, postData: a }, l) => {
1024
1045
  const s = {
1025
1046
  indent: " ",
1026
- ...c
1027
- }, { blank: r, join: o, push: i, addPostProcessor: l } = new V({ indent: s.indent });
1047
+ ...l
1048
+ }, { blank: r, join: o, push: i, addPostProcessor: c } = new V({ indent: s.indent });
1028
1049
  i("const axios = require('axios');");
1029
1050
  const u = {
1030
1051
  method: e,
@@ -1034,7 +1055,7 @@ var Ao = {
1034
1055
  case "application/x-www-form-urlencoded":
1035
1056
  a.params && (i("const { URLSearchParams } = require('url');"), r(), i("const encodedParams = new URLSearchParams();"), a.params.forEach((g) => {
1036
1057
  i(`encodedParams.set('${g.name}', '${g.value}');`);
1037
- }), r(), u.data = "encodedParams,", l((g) => g.replace(/'encodedParams,'/, "encodedParams,")));
1058
+ }), r(), u.data = "encodedParams,", c((g) => g.replace(/'encodedParams,'/, "encodedParams,")));
1038
1059
  break;
1039
1060
  case "application/json":
1040
1061
  r(), a.jsonObj && (u.data = a.jsonObj);
@@ -1045,7 +1066,7 @@ var Ao = {
1045
1066
  const y = ue(u, { indent: " ", inlineCharacterLimit: 80 });
1046
1067
  return i(`const options = ${y};`), r(), i("axios"), i(".request(options)", 1), i(".then(function (response) {", 1), i("console.log(response.data);", 2), i("})", 1), i(".catch(function (error) {", 1), i("console.error(error);", 2), i("});", 1), o();
1047
1068
  }
1048
- }, ti = {
1069
+ }, oi = {
1049
1070
  info: {
1050
1071
  key: "fetch",
1051
1072
  title: "Fetch",
@@ -1054,22 +1075,22 @@ var Ao = {
1054
1075
  extname: ".cjs",
1055
1076
  installation: "npm install node-fetch@2 --save"
1056
1077
  },
1057
- convert: ({ method: e, fullUrl: n, postData: t, headersObj: a, cookies: c }, s) => {
1078
+ convert: ({ method: e, fullUrl: n, postData: t, headersObj: a, cookies: l }, s) => {
1058
1079
  var v;
1059
1080
  const r = {
1060
1081
  indent: " ",
1061
1082
  ...s
1062
1083
  };
1063
1084
  let o = !1;
1064
- const { blank: i, push: l, join: u, unshift: y } = new V({ indent: r.indent });
1065
- l("const fetch = require('node-fetch');");
1085
+ const { blank: i, push: c, join: u, unshift: y } = new V({ indent: r.indent });
1086
+ c("const fetch = require('node-fetch');");
1066
1087
  const g = n, m = {
1067
1088
  method: e
1068
1089
  };
1069
1090
  switch (Object.keys(a).length && (m.headers = a), t.mimeType) {
1070
1091
  case "application/x-www-form-urlencoded":
1071
- y("const { URLSearchParams } = require('url');"), l("const encodedParams = new URLSearchParams();"), i(), (v = t.params) == null || v.forEach((h) => {
1072
- l(`encodedParams.set('${h.name}', '${h.value}');`);
1092
+ y("const { URLSearchParams } = require('url');"), c("const encodedParams = new URLSearchParams();"), i(), (v = t.params) == null || v.forEach((h) => {
1093
+ c(`encodedParams.set('${h.name}', '${h.value}');`);
1073
1094
  }), m.body = "encodedParams";
1074
1095
  break;
1075
1096
  case "application/json":
@@ -1079,22 +1100,22 @@ var Ao = {
1079
1100
  if (!t.params)
1080
1101
  break;
1081
1102
  const f = fe(a, "content-type");
1082
- f && delete a[f], y("const FormData = require('form-data');"), l("const formData = new FormData();"), i(), t.params.forEach((h) => {
1103
+ f && delete a[f], y("const FormData = require('form-data');"), c("const formData = new FormData();"), i(), t.params.forEach((h) => {
1083
1104
  if (!h.fileName && !h.fileName && !h.contentType) {
1084
- l(`formData.append('${h.name}', '${h.value}');`);
1105
+ c(`formData.append('${h.name}', '${h.value}');`);
1085
1106
  return;
1086
1107
  }
1087
- h.fileName && (o = !0, l(`formData.append('${h.name}', fs.createReadStream('${h.fileName}'));`));
1108
+ h.fileName && (o = !0, c(`formData.append('${h.name}', fs.createReadStream('${h.fileName}'));`));
1088
1109
  });
1089
1110
  break;
1090
1111
  default:
1091
1112
  t.text && (m.body = t.text);
1092
1113
  }
1093
- if (c.length) {
1094
- const f = c.map(({ name: h, value: d }) => `${encodeURIComponent(h)}=${encodeURIComponent(d)}`).join("; ");
1114
+ if (l.length) {
1115
+ const f = l.map(({ name: h, value: d }) => `${encodeURIComponent(h)}=${encodeURIComponent(d)}`).join("; ");
1095
1116
  m.headers || (m.headers = {}), m.headers.cookie = f;
1096
1117
  }
1097
- i(), l(`const url = '${g}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1118
+ i(), c(`const url = '${g}';`), m.headers && !Object.keys(m.headers).length && delete m.headers;
1098
1119
  const x = ue(m, {
1099
1120
  indent: " ",
1100
1121
  inlineCharacterLimit: 80,
@@ -1103,9 +1124,9 @@ var Ao = {
1103
1124
  // in a `JSON.stringify` call.
1104
1125
  transform: (f, h, d) => h === "body" && t.mimeType === "application/json" ? `JSON.stringify(${d})` : d
1105
1126
  });
1106
- return l(`const options = ${x};`), i(), o && y("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (l("options.body = formData;"), i()), l("fetch(url, options)"), l(".then(res => res.json())", 1), l(".then(json => console.log(json))", 1), l(".catch(err => console.error('error:' + err));", 1), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1127
+ return c(`const options = ${x};`), i(), o && y("const fs = require('fs');"), t.params && t.mimeType === "multipart/form-data" && (c("options.body = formData;"), i()), c("fetch(url, options)"), c(".then(res => res.json())", 1), c(".then(json => console.log(json))", 1), c(".catch(err => console.error('error:' + err));", 1), u().replace(/'encodedParams'/, "encodedParams").replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/, 'fs.createReadStream("$1")');
1107
1128
  }
1108
- }, ri = {
1129
+ }, ii = {
1109
1130
  info: {
1110
1131
  key: "native",
1111
1132
  title: "HTTP",
@@ -1113,9 +1134,9 @@ var Ao = {
1113
1134
  description: "Node.js native HTTP interface",
1114
1135
  extname: ".cjs"
1115
1136
  },
1116
- convert: ({ uriObj: e, method: n, allHeaders: t, postData: a }, c = {}) => {
1137
+ convert: ({ uriObj: e, method: n, allHeaders: t, postData: a }, l = {}) => {
1117
1138
  var y;
1118
- const { indent: s = " " } = c, { blank: r, join: o, push: i, unshift: l } = new V({ indent: s }), u = {
1139
+ const { indent: s = " " } = l, { blank: r, join: o, push: i, unshift: c } = new V({ indent: s }), u = {
1119
1140
  method: n,
1120
1141
  hostname: e.hostname,
1121
1142
  port: e.port,
@@ -1124,7 +1145,7 @@ var Ao = {
1124
1145
  };
1125
1146
  switch (i(`const http = require('${(y = e.protocol) == null ? void 0 : y.replace(":", "")}');`), r(), i(`const options = ${ue(u, { indent: s })};`), r(), i("const req = http.request(options, function (res) {"), i("const chunks = [];", 1), r(), i("res.on('data', function (chunk) {", 1), i("chunks.push(chunk);", 2), i("});", 1), r(), i("res.on('end', function () {", 1), i("const body = Buffer.concat(chunks);", 2), i("console.log(body.toString());", 2), i("});", 1), i("});"), r(), a.mimeType) {
1126
1147
  case "application/x-www-form-urlencoded":
1127
- a.paramsObj && (l("const qs = require('querystring');"), i(
1148
+ a.paramsObj && (c("const qs = require('querystring');"), i(
1128
1149
  `req.write(qs.stringify(${ue(a.paramsObj, {
1129
1150
  indent: " ",
1130
1151
  inlineCharacterLimit: 80
@@ -1144,7 +1165,7 @@ var Ao = {
1144
1165
  }
1145
1166
  return i("req.end();"), o();
1146
1167
  }
1147
- }, ni = {
1168
+ }, si = {
1148
1169
  info: {
1149
1170
  key: "request",
1150
1171
  title: "Request",
@@ -1153,19 +1174,19 @@ var Ao = {
1153
1174
  extname: ".cjs",
1154
1175
  installation: "npm install request --save"
1155
1176
  },
1156
- convert: ({ method: e, url: n, fullUrl: t, postData: a, headersObj: c, cookies: s }, r) => {
1177
+ convert: ({ method: e, url: n, fullUrl: t, postData: a, headersObj: l, cookies: s }, r) => {
1157
1178
  const o = {
1158
1179
  indent: " ",
1159
1180
  ...r
1160
1181
  };
1161
1182
  let i = !1;
1162
- const { push: l, blank: u, join: y, unshift: g, addPostProcessor: m } = new V({ indent: o.indent });
1163
- l("const request = require('request');"), u();
1183
+ const { push: c, blank: u, join: y, unshift: g, addPostProcessor: m } = new V({ indent: o.indent });
1184
+ c("const request = require('request');"), u();
1164
1185
  const x = {
1165
1186
  method: e,
1166
1187
  url: t
1167
1188
  };
1168
- switch (Object.keys(c).length && (x.headers = c), a.mimeType) {
1189
+ switch (Object.keys(l).length && (x.headers = l), a.mimeType) {
1169
1190
  case "application/x-www-form-urlencoded":
1170
1191
  x.form = a.paramsObj;
1171
1192
  break;
@@ -1193,11 +1214,11 @@ var Ao = {
1193
1214
  default:
1194
1215
  a.text && (x.body = a.text);
1195
1216
  }
1196
- return s.length && (x.jar = "JAR", l("const jar = request.jar();"), s.forEach(({ name: v, value: f }) => {
1197
- l(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(f)}'), '${n}');`);
1198
- }), u(), m((v) => v.replace(/'JAR'/, "jar"))), i && g("const fs = require('fs');"), l(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), u(), l("request(options, function (error, response, body) {"), l("if (error) throw new Error(error);", 1), u(), l("console.log(body);", 1), l("});"), y();
1217
+ return s.length && (x.jar = "JAR", c("const jar = request.jar();"), s.forEach(({ name: v, value: f }) => {
1218
+ c(`jar.setCookie(request.cookie('${encodeURIComponent(v)}=${encodeURIComponent(f)}'), '${n}');`);
1219
+ }), u(), m((v) => v.replace(/'JAR'/, "jar"))), i && g("const fs = require('fs');"), c(`const options = ${ue(x, { indent: " ", inlineCharacterLimit: 80 })};`), u(), c("request(options, function (error, response, body) {"), c("if (error) throw new Error(error);", 1), u(), c("console.log(body);", 1), c("});"), y();
1199
1220
  }
1200
- }, ai = {
1221
+ }, li = {
1201
1222
  info: {
1202
1223
  key: "unirest",
1203
1224
  title: "Unirest",
@@ -1205,40 +1226,40 @@ var Ao = {
1205
1226
  description: "Lightweight HTTP Request Client Library",
1206
1227
  extname: ".cjs"
1207
1228
  },
1208
- convert: ({ method: e, url: n, cookies: t, queryObj: a, postData: c, headersObj: s }, r) => {
1229
+ convert: ({ method: e, url: n, cookies: t, queryObj: a, postData: l, headersObj: s }, r) => {
1209
1230
  const o = {
1210
1231
  indent: " ",
1211
1232
  ...r
1212
1233
  };
1213
1234
  let i = !1;
1214
- const { addPostProcessor: l, blank: u, join: y, push: g, unshift: m } = new V({
1235
+ const { addPostProcessor: c, blank: u, join: y, push: g, unshift: m } = new V({
1215
1236
  indent: o.indent
1216
1237
  });
1217
1238
  switch (g("const unirest = require('unirest');"), u(), g(`const req = unirest('${e}', '${n}');`), u(), t.length && (g("const CookieJar = unirest.jar();"), t.forEach((x) => {
1218
1239
  g(`CookieJar.add('${encodeURIComponent(x.name)}=${encodeURIComponent(x.value)}', '${n}');`);
1219
- }), g("req.jar(CookieJar);"), u()), Object.keys(a).length && (g(`req.query(${ue(a, { indent: o.indent })});`), u()), Object.keys(s).length && (g(`req.headers(${ue(s, { indent: o.indent })});`), u()), c.mimeType) {
1240
+ }), g("req.jar(CookieJar);"), u()), Object.keys(a).length && (g(`req.query(${ue(a, { indent: o.indent })});`), u()), Object.keys(s).length && (g(`req.headers(${ue(s, { indent: o.indent })});`), u()), l.mimeType) {
1220
1241
  case "application/x-www-form-urlencoded":
1221
- c.paramsObj && (g(`req.form(${ue(c.paramsObj, { indent: o.indent })});`), u());
1242
+ l.paramsObj && (g(`req.form(${ue(l.paramsObj, { indent: o.indent })});`), u());
1222
1243
  break;
1223
1244
  case "application/json":
1224
- c.jsonObj && (g("req.type('json');"), g(`req.send(${ue(c.jsonObj, { indent: o.indent })});`), u());
1245
+ l.jsonObj && (g("req.type('json');"), g(`req.send(${ue(l.jsonObj, { indent: o.indent })});`), u());
1225
1246
  break;
1226
1247
  case "multipart/form-data": {
1227
- if (!c.params)
1248
+ if (!l.params)
1228
1249
  break;
1229
1250
  const x = [];
1230
- c.params.forEach((v) => {
1251
+ l.params.forEach((v) => {
1231
1252
  const f = {};
1232
- v.fileName && !v.value ? (i = !0, f.body = `fs.createReadStream('${v.fileName}')`, l((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (f.body = v.value), f.body && (v.contentType && (f["content-type"] = v.contentType), x.push(f));
1253
+ v.fileName && !v.value ? (i = !0, f.body = `fs.createReadStream('${v.fileName}')`, c((h) => h.replace(/'fs\.createReadStream\(\\'(.+)\\'\)'/, "fs.createReadStream('$1')"))) : v.value && (f.body = v.value), f.body && (v.contentType && (f["content-type"] = v.contentType), x.push(f));
1233
1254
  }), g(`req.multipart(${ue(x, { indent: o.indent })});`), u();
1234
1255
  break;
1235
1256
  }
1236
1257
  default:
1237
- c.text && (g(`req.send(${ue(c.text, { indent: o.indent })});`), u());
1258
+ l.text && (g(`req.send(${ue(l.text, { indent: o.indent })});`), u());
1238
1259
  }
1239
1260
  return i && m("const fs = require('fs');"), g("req.end(function (res) {"), g("if (res.error) throw new Error(res.error);", 1), u(), g("console.log(res.body);", 1), g("});"), y();
1240
1261
  }
1241
- }, oi = {
1262
+ }, ci = {
1242
1263
  info: {
1243
1264
  key: "node",
1244
1265
  title: "Node.js",
@@ -1246,27 +1267,27 @@ var Ao = {
1246
1267
  cli: "node %s"
1247
1268
  },
1248
1269
  clientsById: {
1249
- native: ri,
1250
- request: ni,
1251
- unirest: ai,
1252
- axios: ei,
1253
- fetch: ti
1270
+ native: ii,
1271
+ request: si,
1272
+ unirest: li,
1273
+ axios: ai,
1274
+ fetch: oi
1254
1275
  }
1255
- }, ht = (e, n, t, a) => {
1256
- const c = `${e} *${n} = `, s = hr(t, a ? c.length : void 0);
1257
- return `${c}${s};`;
1258
- }, hr = (e, n) => {
1276
+ }, yt = (e, n, t, a) => {
1277
+ const l = `${e} *${n} = `, s = mr(t, a ? l.length : void 0);
1278
+ return `${l}${s};`;
1279
+ }, mr = (e, n) => {
1259
1280
  const t = n === void 0 ? ", " : `,
1260
1281
  ${" ".repeat(n)}`;
1261
1282
  switch (Object.prototype.toString.call(e)) {
1262
1283
  case "[object Number]":
1263
1284
  return `@${e}`;
1264
1285
  case "[object Array]":
1265
- return `@[ ${e.map((c) => hr(c)).join(t)} ]`;
1286
+ return `@[ ${e.map((l) => mr(l)).join(t)} ]`;
1266
1287
  case "[object Object]": {
1267
1288
  const a = [];
1268
- return Object.keys(e).forEach((c) => {
1269
- a.push(`@"${c}": ${hr(e[c])}`);
1289
+ return Object.keys(e).forEach((l) => {
1290
+ a.push(`@"${l}": ${mr(e[l])}`);
1270
1291
  }), `@{ ${a.join(t)} }`;
1271
1292
  }
1272
1293
  case "[object Boolean]":
@@ -1274,7 +1295,7 @@ var Ao = {
1274
1295
  default:
1275
1296
  return e == null ? "" : `@"${e.toString().replace(/"/g, '\\"')}"`;
1276
1297
  }
1277
- }, ii = {
1298
+ }, ui = {
1278
1299
  info: {
1279
1300
  key: "nsurlsession",
1280
1301
  title: "NSURLSession",
@@ -1282,19 +1303,19 @@ var Ao = {
1282
1303
  description: "Foundation's NSURLSession request",
1283
1304
  extname: ".m"
1284
1305
  },
1285
- convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, c) => {
1306
+ convert: ({ allHeaders: e, postData: n, method: t, fullUrl: a }, l) => {
1286
1307
  var u;
1287
1308
  const s = {
1288
1309
  indent: " ",
1289
1310
  pretty: !0,
1290
1311
  timeout: 10,
1291
- ...c
1292
- }, { push: r, join: o, blank: i } = new V({ indent: s.indent }), l = {
1312
+ ...l
1313
+ }, { push: r, join: o, blank: i } = new V({ indent: s.indent }), c = {
1293
1314
  hasHeaders: !1,
1294
1315
  hasBody: !1
1295
1316
  };
1296
- if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (l.hasHeaders = !0, i(), r(ht("NSDictionary", "headers", e, s.pretty))), n.text || n.jsonObj || n.params)
1297
- switch (l.hasBody = !0, n.mimeType) {
1317
+ if (r("#import <Foundation/Foundation.h>"), Object.keys(e).length && (c.hasHeaders = !0, i(), r(yt("NSDictionary", "headers", e, s.pretty))), n.text || n.jsonObj || n.params)
1318
+ switch (c.hasBody = !0, n.mimeType) {
1298
1319
  case "application/x-www-form-urlencoded":
1299
1320
  if ((u = n.params) != null && u.length) {
1300
1321
  i();
@@ -1305,13 +1326,13 @@ var Ao = {
1305
1326
  r(`[postData appendData:[@"&${m}=${x}" dataUsingEncoding:NSUTF8StringEncoding]];`);
1306
1327
  });
1307
1328
  } else
1308
- l.hasBody = !1;
1329
+ c.hasBody = !1;
1309
1330
  break;
1310
1331
  case "application/json":
1311
- n.jsonObj && (r(ht("NSDictionary", "parameters", n.jsonObj, s.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1332
+ n.jsonObj && (r(yt("NSDictionary", "parameters", n.jsonObj, s.pretty)), i(), r("NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];"));
1312
1333
  break;
1313
1334
  case "multipart/form-data":
1314
- r(ht("NSArray", "parameters", n.params || [], s.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1335
+ r(yt("NSArray", "parameters", n.params || [], s.pretty)), r(`NSString *boundary = @"${n.boundary}";`), i(), r("NSError *error;"), r("NSMutableString *body = [NSMutableString string];"), r("for (NSDictionary *param in parameters) {"), r('[body appendFormat:@"--%@\\r\\n", boundary];', 1), r('if (param[@"fileName"]) {', 1), r(
1315
1336
  '[body appendFormat:@"Content-Disposition:form-data; name=\\"%@\\"; filename=\\"%@\\"\\r\\n", param[@"name"], param[@"fileName"]];',
1316
1337
  2
1317
1338
  ), r('[body appendFormat:@"Content-Type: %@\\r\\n\\r\\n", param[@"contentType"]];', 2), r(
@@ -1324,23 +1345,23 @@ var Ao = {
1324
1345
  `NSData *postData = [[NSData alloc] initWithData:[@"${n.text}" dataUsingEncoding:NSUTF8StringEncoding]];`
1325
1346
  );
1326
1347
  }
1327
- return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${a}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${s.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), l.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), l.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1348
+ return i(), r(`NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"${a}"]`), r(" cachePolicy:NSURLRequestUseProtocolCachePolicy"), r(` timeoutInterval:${s.timeout.toFixed(1)}];`), r(`[request setHTTPMethod:@"${t}"];`), c.hasHeaders && r("[request setAllHTTPHeaderFields:headers];"), c.hasBody && r("[request setHTTPBody:postData];"), i(), r("NSURLSession *session = [NSURLSession sharedSession];"), r("NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request"), r(
1328
1349
  " completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {"
1329
1350
  ), r(" if (error) {", 1), r(' NSLog(@"%@", error);', 2), r(" } else {", 1), r(
1330
1351
  " NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;",
1331
1352
  2
1332
1353
  ), r(' NSLog(@"%@", httpResponse);', 2), r(" }", 1), r(" }];"), r("[dataTask resume];"), o();
1333
1354
  }
1334
- }, si = {
1355
+ }, fi = {
1335
1356
  info: {
1336
1357
  key: "objc",
1337
1358
  title: "Objective-C",
1338
1359
  default: "nsurlsession"
1339
1360
  },
1340
1361
  clientsById: {
1341
- nsurlsession: ii
1362
+ nsurlsession: ui
1342
1363
  }
1343
- }, li = {
1364
+ }, pi = {
1344
1365
  info: {
1345
1366
  key: "cohttp",
1346
1367
  title: "CoHTTP",
@@ -1349,11 +1370,11 @@ var Ao = {
1349
1370
  extname: ".ml",
1350
1371
  installation: "opam install cohttp-lwt-unix cohttp-async"
1351
1372
  },
1352
- convert: ({ fullUrl: e, allHeaders: n, postData: t, method: a }, c) => {
1373
+ convert: ({ fullUrl: e, allHeaders: n, postData: t, method: a }, l) => {
1353
1374
  const s = {
1354
1375
  indent: " ",
1355
- ...c
1356
- }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: i, join: l } = new V({ indent: s.indent });
1376
+ ...l
1377
+ }, r = ["get", "post", "head", "delete", "patch", "put", "options"], { push: o, blank: i, join: c } = new V({ indent: s.indent });
1357
1378
  o("open Cohttp_lwt_unix"), o("open Cohttp"), o("open Lwt"), i(), o(`let uri = Uri.of_string "${e}" in`);
1358
1379
  const u = Object.keys(n);
1359
1380
  u.length === 1 ? o(
@@ -1364,16 +1385,16 @@ var Ao = {
1364
1385
  o(`("${x}", "${le(n[x])}");`, 1);
1365
1386
  }), o("] in")), t.text && o(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(t.text)} in`), i();
1366
1387
  const y = u.length ? "~headers " : "", g = t.text ? "~body " : "", m = r.includes(a.toLowerCase()) ? `\`${a.toUpperCase()}` : `(Code.method_of_string "${a}")`;
1367
- return o(`Client.call ${y}${g}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), l();
1388
+ return o(`Client.call ${y}${g}${m} uri`), o(">>= fun (res, body_stream) ->"), o("(* Do stuff with the result *)", 1), c();
1368
1389
  }
1369
- }, ci = {
1390
+ }, di = {
1370
1391
  info: {
1371
1392
  key: "ocaml",
1372
1393
  title: "OCaml",
1373
1394
  default: "cohttp"
1374
1395
  },
1375
1396
  clientsById: {
1376
- cohttp: li
1397
+ cohttp: pi
1377
1398
  }
1378
1399
  }, te = (e, n, t) => {
1379
1400
  switch (t = t || "", n = n || "", Object.prototype.toString.call(e)) {
@@ -1388,7 +1409,7 @@ var Ao = {
1388
1409
  case "[object Number]":
1389
1410
  return e.toString();
1390
1411
  case "[object Array]": {
1391
- const a = e.map((c) => te(c, `${n}${n}`, n)).join(`,
1412
+ const a = e.map((l) => te(l, `${n}${n}`, n)).join(`,
1392
1413
  ${n}`);
1393
1414
  return `[
1394
1415
  ${n}${a}
@@ -1396,8 +1417,8 @@ ${t}]`;
1396
1417
  }
1397
1418
  case "[object Object]": {
1398
1419
  const a = [];
1399
- for (const c in e)
1400
- Object.prototype.hasOwnProperty.call(e, c) && a.push(`${te(c, n)} => ${te(e[c], `${n}${n}`, n)}`);
1420
+ for (const l in e)
1421
+ Object.prototype.hasOwnProperty.call(e, l) && a.push(`${te(l, n)} => ${te(e[l], `${n}${n}`, n)}`);
1401
1422
  return `[
1402
1423
  ${n}${a.join(`,
1403
1424
  ${n}`)}
@@ -1406,7 +1427,7 @@ ${t}]`;
1406
1427
  default:
1407
1428
  return "null";
1408
1429
  }
1409
- }, Qr = [
1430
+ }, Kr = [
1410
1431
  "ACL",
1411
1432
  "BASELINE_CONTROL",
1412
1433
  "CHECKIN",
@@ -1434,7 +1455,7 @@ ${t}]`;
1434
1455
  "UNLOCK",
1435
1456
  "UPDATE",
1436
1457
  "VERSION_CONTROL"
1437
- ], ui = {
1458
+ ], hi = {
1438
1459
  info: {
1439
1460
  key: "curl",
1440
1461
  title: "cURL",
@@ -1442,16 +1463,16 @@ ${t}]`;
1442
1463
  description: "PHP with ext-curl",
1443
1464
  extname: ".php"
1444
1465
  },
1445
- convert: ({ uriObj: e, postData: n, fullUrl: t, method: a, httpVersion: c, cookies: s, headersObj: r }, o = {}) => {
1466
+ convert: ({ uriObj: e, postData: n, fullUrl: t, method: a, httpVersion: l, cookies: s, headersObj: r }, o = {}) => {
1446
1467
  const {
1447
1468
  closingTag: i = !1,
1448
- indent: l = " ",
1469
+ indent: c = " ",
1449
1470
  maxRedirects: u = 10,
1450
1471
  namedErrors: y = !1,
1451
1472
  noTags: g = !1,
1452
1473
  shortTags: m = !1,
1453
1474
  timeout: x = 30
1454
- } = o, { push: v, blank: f, join: h } = new V({ indent: l });
1475
+ } = o, { push: v, blank: f, join: h } = new V({ indent: c });
1455
1476
  g || (v(m ? "<?" : "<?php"), f()), v("$curl = curl_init();"), f();
1456
1477
  const d = [
1457
1478
  {
@@ -1487,7 +1508,7 @@ ${t}]`;
1487
1508
  {
1488
1509
  escape: !1,
1489
1510
  name: "CURLOPT_HTTP_VERSION",
1490
- value: c === "HTTP/1.0" ? "CURL_HTTP_VERSION_1_0" : "CURL_HTTP_VERSION_1_1"
1511
+ value: l === "HTTP/1.0" ? "CURL_HTTP_VERSION_1_0" : "CURL_HTTP_VERSION_1_1"
1491
1512
  },
1492
1513
  {
1493
1514
  escape: !0,
@@ -1497,22 +1518,22 @@ ${t}]`;
1497
1518
  {
1498
1519
  escape: !n.jsonObj,
1499
1520
  name: "CURLOPT_POSTFIELDS",
1500
- value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, l.repeat(2), l)})` : n.text : void 0
1521
+ value: n ? n.jsonObj ? `json_encode(${te(n.jsonObj, c.repeat(2), c)})` : n.text : void 0
1501
1522
  }
1502
1523
  ];
1503
1524
  v("curl_setopt_array($curl, [");
1504
- const j = new V({ indent: l, join: `
1505
- ${l}` });
1506
- d.forEach(({ value: O, name: b, escape: E }) => {
1507
- O != null && j.push(`${b} => ${E ? JSON.stringify(O) : O},`);
1525
+ const j = new V({ indent: c, join: `
1526
+ ${c}` });
1527
+ d.forEach(({ value: O, name: b, escape: R }) => {
1528
+ O != null && j.push(`${b} => ${R ? JSON.stringify(O) : O},`);
1508
1529
  });
1509
1530
  const T = s.map((O) => `${encodeURIComponent(O.name)}=${encodeURIComponent(O.value)}`);
1510
1531
  T.length && j.push(`CURLOPT_COOKIE => "${T.join("; ")}",`);
1511
1532
  const p = Object.keys(r).sort().map((O) => `"${O}: ${le(r[O])}"`);
1512
1533
  return p.length && (j.push("CURLOPT_HTTPHEADER => ["), j.push(p.join(`,
1513
- ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), f(), v("curl_close($curl);"), f(), v("if ($err) {"), v(y ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !g && i && (f(), v("?>")), h();
1534
+ ${c}${c}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = curl_exec($curl);"), v("$err = curl_error($curl);"), f(), v("curl_close($curl);"), f(), v("if ($err) {"), v(y ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), v("} else {"), v("echo $response;", 1), v("}"), !g && i && (f(), v("?>")), h();
1514
1535
  }
1515
- }, fi = {
1536
+ }, yi = {
1516
1537
  info: {
1517
1538
  key: "guzzle",
1518
1539
  title: "Guzzle",
@@ -1521,7 +1542,7 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1521
1542
  extname: ".php",
1522
1543
  installation: "composer require guzzlehttp/guzzle"
1523
1544
  },
1524
- convert: ({ postData: e, fullUrl: n, method: t, cookies: a, headersObj: c }, s) => {
1545
+ convert: ({ postData: e, fullUrl: n, method: t, cookies: a, headersObj: l }, s) => {
1525
1546
  var v;
1526
1547
  const r = {
1527
1548
  closingTag: !1,
@@ -1529,7 +1550,7 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1529
1550
  noTags: !1,
1530
1551
  shortTags: !1,
1531
1552
  ...s
1532
- }, { push: o, blank: i, join: l } = new V({ indent: r.indent }), { code: u, push: y, join: g } = new V({ indent: r.indent });
1553
+ }, { push: o, blank: i, join: c } = new V({ indent: r.indent }), { code: u, push: y, join: g } = new V({ indent: r.indent });
1533
1554
  switch (r.noTags || o(r.shortTags ? "<?" : "<?php"), o("require_once('vendor/autoload.php');"), i(), e.mimeType) {
1534
1555
  case "application/x-www-form-urlencoded":
1535
1556
  y(`'form_params' => ${te(e.paramsObj, r.indent + r.indent, r.indent)},`, 1);
@@ -1548,22 +1569,22 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1548
1569
  name: h.name,
1549
1570
  contents: h.value
1550
1571
  });
1551
- }), f.length && (y(`'multipart' => ${te(f, r.indent + r.indent, r.indent)}`, 1), Ze(c, "content-type") && (v = ge(c, "content-type")) != null && v.indexOf("boundary"))) {
1552
- const h = fe(c, "content-type");
1553
- h && delete c[h];
1572
+ }), f.length && (y(`'multipart' => ${te(f, r.indent + r.indent, r.indent)}`, 1), Ze(l, "content-type") && (v = ge(l, "content-type")) != null && v.indexOf("boundary"))) {
1573
+ const h = fe(l, "content-type");
1574
+ h && delete l[h];
1554
1575
  }
1555
1576
  break;
1556
1577
  }
1557
1578
  default:
1558
1579
  e.text && y(`'body' => ${te(e.text)},`, 1);
1559
1580
  }
1560
- const m = Object.keys(c).sort().map(function(f) {
1561
- return `${r.indent}${r.indent}'${f}' => '${Fe(c[f])}',`;
1581
+ const m = Object.keys(l).sort().map(function(f) {
1582
+ return `${r.indent}${r.indent}'${f}' => '${Fe(l[f])}',`;
1562
1583
  }), x = a.map((f) => `${encodeURIComponent(f.name)}=${encodeURIComponent(f.value)}`).join("; ");
1563
1584
  return x.length && m.push(`${r.indent}${r.indent}'cookie' => '${Fe(x)}',`), m.length && (y("'headers' => [", 1), y(m.join(`
1564
- `)), y("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (o(`$response = $client->request('${t}', '${n}', [`), o(g()), o("]);")) : o(`$response = $client->request('${t}', '${n}');`), i(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), o("?>")), l();
1585
+ `)), y("],", 1)), o("$client = new \\GuzzleHttp\\Client();"), i(), u.length ? (o(`$response = $client->request('${t}', '${n}', [`), o(g()), o("]);")) : o(`$response = $client->request('${t}', '${n}');`), i(), o("echo $response->getBody();"), !r.noTags && r.closingTag && (i(), o("?>")), c();
1565
1586
  }
1566
- }, pi = {
1587
+ }, mi = {
1567
1588
  info: {
1568
1589
  key: "http1",
1569
1590
  title: "HTTP v1",
@@ -1571,9 +1592,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1571
1592
  description: "PHP with pecl/http v1",
1572
1593
  extname: ".php"
1573
1594
  },
1574
- convert: ({ method: e, url: n, postData: t, queryObj: a, headersObj: c, cookiesObj: s }, r = {}) => {
1575
- const { closingTag: o = !1, indent: i = " ", noTags: l = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
1576
- switch (l || (y(u ? "<?" : "<?php"), g()), Qr.includes(e.toUpperCase()) || y(`HttpRequest::methodRegister('${e}');`), y("$request = new HttpRequest();"), y(`$request->setUrl(${te(n)});`), Qr.includes(e.toUpperCase()) ? y(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : y(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), g(), Object.keys(a).length && (y(`$request->setQueryData(${te(a, i)});`), g()), Object.keys(c).length && (y(`$request->setHeaders(${te(c, i)});`), g()), Object.keys(s).length && (y(`$request->setCookies(${te(s, i)});`), g()), t.mimeType) {
1595
+ convert: ({ method: e, url: n, postData: t, queryObj: a, headersObj: l, cookiesObj: s }, r = {}) => {
1596
+ const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
1597
+ switch (c || (y(u ? "<?" : "<?php"), g()), Kr.includes(e.toUpperCase()) || y(`HttpRequest::methodRegister('${e}');`), y("$request = new HttpRequest();"), y(`$request->setUrl(${te(n)});`), Kr.includes(e.toUpperCase()) ? y(`$request->setMethod(HTTP_METH_${e.toUpperCase()});`) : y(`$request->setMethod(HttpRequest::HTTP_METH_${e.toUpperCase()});`), g(), Object.keys(a).length && (y(`$request->setQueryData(${te(a, i)});`), g()), Object.keys(l).length && (y(`$request->setHeaders(${te(l, i)});`), g()), Object.keys(s).length && (y(`$request->setCookies(${te(s, i)});`), g()), t.mimeType) {
1577
1598
  case "application/x-www-form-urlencoded":
1578
1599
  y(`$request->setContentType(${te(t.mimeType)});`), y(`$request->setPostFields(${te(t.paramsObj, i)});`), g();
1579
1600
  break;
@@ -1583,9 +1604,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1583
1604
  default:
1584
1605
  t.text && (y(`$request->setBody(${te(t.text)});`), g());
1585
1606
  }
1586
- return y("try {"), y("$response = $request->send();", 1), g(), y("echo $response->getBody();", 1), y("} catch (HttpException $ex) {"), y("echo $ex;", 1), y("}"), !l && o && (g(), y("?>")), m();
1607
+ return y("try {"), y("$response = $request->send();", 1), g(), y("echo $response->getBody();", 1), y("} catch (HttpException $ex) {"), y("echo $ex;", 1), y("}"), !c && o && (g(), y("?>")), m();
1587
1608
  }
1588
- }, di = {
1609
+ }, gi = {
1589
1610
  info: {
1590
1611
  key: "http2",
1591
1612
  title: "HTTP v2",
@@ -1593,11 +1614,11 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1593
1614
  description: "PHP with pecl/http v2",
1594
1615
  extname: ".php"
1595
1616
  },
1596
- convert: ({ postData: e, headersObj: n, method: t, queryObj: a, cookiesObj: c, url: s }, r = {}) => {
1617
+ convert: ({ postData: e, headersObj: n, method: t, queryObj: a, cookiesObj: l, url: s }, r = {}) => {
1597
1618
  var v;
1598
- const { closingTag: o = !1, indent: i = " ", noTags: l = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
1619
+ const { closingTag: o = !1, indent: i = " ", noTags: c = !1, shortTags: u = !1 } = r, { push: y, blank: g, join: m } = new V({ indent: i });
1599
1620
  let x = !1;
1600
- switch (l || (y(u ? "<?" : "<?php"), g()), y("$client = new http\\Client;"), y("$request = new http\\Client\\Request;"), g(), e.mimeType) {
1621
+ switch (c || (y(u ? "<?" : "<?php"), g()), y("$client = new http\\Client;"), y("$request = new http\\Client\\Request;"), g(), e.mimeType) {
1601
1622
  case "application/x-www-form-urlencoded":
1602
1623
  y("$body = new http\\Message\\Body;"), y(`$body->append(new http\\QueryString(${te(e.paramsObj, i)}));`), g(), x = !0;
1603
1624
  break;
@@ -1631,9 +1652,9 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1631
1652
  default:
1632
1653
  e.text && (y("$body = new http\\Message\\Body;"), y(`$body->append(${te(e.text)});`), g(), x = !0);
1633
1654
  }
1634
- return y(`$request->setRequestUrl(${te(s)});`), y(`$request->setRequestMethod(${te(t)});`), x && (y("$request->setBody($body);"), g()), Object.keys(a).length && (y(`$request->setQuery(new http\\QueryString(${te(a, i)}));`), g()), Object.keys(n).length && (y(`$request->setHeaders(${te(n, i)});`), g()), Object.keys(c).length && (g(), y(`$client->setCookies(${te(c, i)});`), g()), y("$client->enqueue($request)->send();"), y("$response = $client->getResponse();"), g(), y("echo $response->getBody();"), !l && o && (g(), y("?>")), m();
1655
+ return y(`$request->setRequestUrl(${te(s)});`), y(`$request->setRequestMethod(${te(t)});`), x && (y("$request->setBody($body);"), g()), Object.keys(a).length && (y(`$request->setQuery(new http\\QueryString(${te(a, i)}));`), g()), Object.keys(n).length && (y(`$request->setHeaders(${te(n, i)});`), g()), Object.keys(l).length && (g(), y(`$client->setCookies(${te(l, i)});`), g()), y("$client->enqueue($request)->send();"), y("$response = $client->getResponse();"), g(), y("echo $response->getBody();"), !c && o && (g(), y("?>")), m();
1635
1656
  }
1636
- }, hi = {
1657
+ }, vi = {
1637
1658
  info: {
1638
1659
  key: "php",
1639
1660
  title: "PHP",
@@ -1641,24 +1662,24 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1641
1662
  cli: "php %s"
1642
1663
  },
1643
1664
  clientsById: {
1644
- curl: ui,
1645
- guzzle: fi,
1646
- http1: pi,
1647
- http2: di
1665
+ curl: hi,
1666
+ guzzle: yi,
1667
+ http1: mi,
1668
+ http2: gi
1648
1669
  }
1649
- }, ca = (e) => ({ method: t, headersObj: a, cookies: c, uriObj: s, fullUrl: r, postData: o, allHeaders: i }) => {
1650
- const { push: l, join: u } = new V();
1670
+ }, fa = (e) => ({ method: t, headersObj: a, cookies: l, uriObj: s, fullUrl: r, postData: o, allHeaders: i }) => {
1671
+ const { push: c, join: u } = new V();
1651
1672
  if (!["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"].includes(t.toUpperCase()))
1652
1673
  return "Method not supported";
1653
1674
  const g = [], m = Object.keys(a);
1654
- return m.length && (l("$headers=@{}"), m.forEach((x) => {
1655
- x !== "connection" && l(`$headers.Add("${x}", "${Le(a[x], { escapeChar: "`" })}")`);
1656
- }), g.push("-Headers $headers")), c.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), c.forEach((x) => {
1657
- l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${x.name}'`), l(`$cookie.Value = '${x.value}'`), l(`$cookie.Domain = '${s.host}'`), l("$session.Cookies.Add($cookie)");
1675
+ return m.length && (c("$headers=@{}"), m.forEach((x) => {
1676
+ x !== "connection" && c(`$headers.Add("${x}", "${Le(a[x], { escapeChar: "`" })}")`);
1677
+ }), g.push("-Headers $headers")), l.length && (c("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), l.forEach((x) => {
1678
+ c("$cookie = New-Object System.Net.Cookie"), c(`$cookie.Name = '${x.name}'`), c(`$cookie.Value = '${x.value}'`), c(`$cookie.Domain = '${s.host}'`), c("$session.Cookies.Add($cookie)");
1658
1679
  }), g.push("-WebSession $session")), o.text && (g.push(
1659
1680
  `-ContentType '${Le(ge(i, "content-type"), { delimiter: "'", escapeChar: "`" })}'`
1660
- ), g.push(`-Body '${o.text}'`)), l(`$response = ${e} -Uri '${r}' -Method ${t} ${g.join(" ")}`.trim()), u();
1661
- }, yi = {
1681
+ ), g.push(`-Body '${o.text}'`)), c(`$response = ${e} -Uri '${r}' -Method ${t} ${g.join(" ")}`.trim()), u();
1682
+ }, bi = {
1662
1683
  info: {
1663
1684
  key: "restmethod",
1664
1685
  title: "Invoke-RestMethod",
@@ -1666,8 +1687,8 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1666
1687
  description: "Powershell Invoke-RestMethod client",
1667
1688
  extname: ".ps1"
1668
1689
  },
1669
- convert: ca("Invoke-RestMethod")
1670
- }, mi = {
1690
+ convert: fa("Invoke-RestMethod")
1691
+ }, xi = {
1671
1692
  info: {
1672
1693
  key: "webrequest",
1673
1694
  title: "Invoke-WebRequest",
@@ -1675,39 +1696,39 @@ ${l}${l}`), 1), j.push("],")), v(j.join(), 1), v("]);"), f(), v("$response = cur
1675
1696
  description: "Powershell Invoke-WebRequest client",
1676
1697
  extname: ".ps1"
1677
1698
  },
1678
- convert: ca("Invoke-WebRequest")
1679
- }, gi = {
1699
+ convert: fa("Invoke-WebRequest")
1700
+ }, $i = {
1680
1701
  info: {
1681
1702
  key: "powershell",
1682
1703
  title: "Powershell",
1683
1704
  default: "webrequest"
1684
1705
  },
1685
1706
  clientsById: {
1686
- webrequest: mi,
1687
- restmethod: yi
1707
+ webrequest: xi,
1708
+ restmethod: bi
1688
1709
  }
1689
1710
  };
1690
- function Kr(e, n, t, a, c) {
1691
- const s = a.repeat(c), r = a.repeat(c - 1), o = t ? `,
1692
- ${s}` : ", ", i = e === "object" ? "{" : "[", l = e === "object" ? "}" : "]";
1711
+ function Yr(e, n, t, a, l) {
1712
+ const s = a.repeat(l), r = a.repeat(l - 1), o = t ? `,
1713
+ ${s}` : ", ", i = e === "object" ? "{" : "[", c = e === "object" ? "}" : "]";
1693
1714
  return t ? `${i}
1694
1715
  ${s}${n.join(o)}
1695
- ${r}${l}` : e === "object" && n.length > 0 ? `${i} ${n.join(o)} ${l}` : `${i}${n.join(o)}${l}`;
1716
+ ${r}${c}` : e === "object" && n.length > 0 ? `${i} ${n.join(o)} ${c}` : `${i}${n.join(o)}${c}`;
1696
1717
  }
1697
- var Re = (e, n, t) => {
1718
+ var ke = (e, n, t) => {
1698
1719
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
1699
1720
  case "[object Number]":
1700
1721
  return e;
1701
1722
  case "[object Array]": {
1702
1723
  let a = !1;
1703
- const c = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), Re(s, n, t)));
1704
- return Kr("array", c, a, n.indent, t);
1724
+ const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), ke(s, n, t)));
1725
+ return Yr("array", l, a, n.indent, t);
1705
1726
  }
1706
1727
  case "[object Object]": {
1707
1728
  const a = [];
1708
- for (const c in e)
1709
- a.push(`"${c}": ${Re(e[c], n, t)}`);
1710
- return Kr("object", a, n.pretty && a.length > 1, n.indent, t);
1729
+ for (const l in e)
1730
+ a.push(`"${l}": ${ke(e[l], n, t)}`);
1731
+ return Yr("object", a, n.pretty && a.length > 1, n.indent, t);
1711
1732
  }
1712
1733
  case "[object Null]":
1713
1734
  return "None";
@@ -1716,7 +1737,7 @@ var Re = (e, n, t) => {
1716
1737
  default:
1717
1738
  return e == null ? "" : `"${e.toString().replace(/"/g, '\\"')}"`;
1718
1739
  }
1719
- }, vi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], bi = {
1740
+ }, wi = ["HEAD", "GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"], ji = {
1720
1741
  info: {
1721
1742
  key: "requests",
1722
1743
  title: "Requests",
@@ -1725,12 +1746,12 @@ var Re = (e, n, t) => {
1725
1746
  extname: ".py",
1726
1747
  installation: "python -m pip install requests"
1727
1748
  },
1728
- convert: ({ fullUrl: e, postData: n, allHeaders: t, method: a }, c) => {
1749
+ convert: ({ fullUrl: e, postData: n, allHeaders: t, method: a }, l) => {
1729
1750
  const s = {
1730
1751
  indent: " ",
1731
1752
  pretty: !0,
1732
- ...c
1733
- }, { push: r, blank: o, join: i, addPostProcessor: l } = new V({ indent: s.indent });
1753
+ ...l
1754
+ }, { push: r, blank: o, join: i, addPostProcessor: c } = new V({ indent: s.indent });
1734
1755
  r("import requests"), o(), r(`url = "${e}"`), o();
1735
1756
  const u = t;
1736
1757
  let y = {};
@@ -1738,7 +1759,7 @@ var Re = (e, n, t) => {
1738
1759
  let m = !1, x = !1, v = !1;
1739
1760
  switch (n.mimeType) {
1740
1761
  case "application/json":
1741
- n.jsonObj && (r(`payload = ${Re(n.jsonObj, s)}`), v = !0, x = !0);
1762
+ n.jsonObj && (r(`payload = ${ke(n.jsonObj, s)}`), v = !0, x = !0);
1742
1763
  break;
1743
1764
  case "multipart/form-data":
1744
1765
  if (!n.params)
@@ -1746,20 +1767,20 @@ var Re = (e, n, t) => {
1746
1767
  if (y = {}, n.params.forEach((d) => {
1747
1768
  d.fileName ? (d.contentType ? g[d.name] = `('${d.fileName}', open('${d.fileName}', 'rb'), '${d.contentType}')` : g[d.name] = `('${d.fileName}', open('${d.fileName}', 'rb'))`, m = !0) : (y[d.name] = d.value, x = !0);
1748
1769
  }), m) {
1749
- r(`files = ${Re(g, s)}`), x && r(`payload = ${Re(y, s)}`);
1770
+ r(`files = ${ke(g, s)}`), x && r(`payload = ${ke(y, s)}`);
1750
1771
  const d = fe(u, "content-type");
1751
1772
  d && delete u[d];
1752
1773
  } else {
1753
1774
  const d = JSON.stringify(n.text);
1754
1775
  d && (r(`payload = ${d}`), x = !0);
1755
1776
  }
1756
- l(
1777
+ c(
1757
1778
  (d) => d.replace(/"\('(.+)', open\('(.+)', 'rb'\)\)"/g, '("$1", open("$2", "rb"))').replace(/"\('(.+)', open\('(.+)', 'rb'\), '(.+)'\)"/g, '("$1", open("$2", "rb"), "$3")')
1758
1779
  );
1759
1780
  break;
1760
1781
  default: {
1761
1782
  if (n.mimeType === "application/x-www-form-urlencoded" && n.paramsObj) {
1762
- r(`payload = ${Re(n.paramsObj, s)}`), x = !0;
1783
+ r(`payload = ${ke(n.paramsObj, s)}`), x = !0;
1763
1784
  break;
1764
1785
  }
1765
1786
  const d = JSON.stringify(n.text);
@@ -1779,10 +1800,10 @@ var Re = (e, n, t) => {
1779
1800
  r(d !== f ? `"${j}": "${le(u[j])}",` : `"${j}": "${le(u[j])}"`, 1), d += 1;
1780
1801
  }), r("}"), o();
1781
1802
  }
1782
- let h = vi.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
1803
+ let h = wi.includes(a) ? `response = requests.${a.toLowerCase()}(url` : `response = requests.request("${a}", url`;
1783
1804
  return x && (v ? h += ", json=payload" : h += ", data=payload"), m && (h += ", files=files"), f > 0 && (h += ", headers=headers"), h += ")", r(h), o(), r("print(response.text)"), i();
1784
1805
  }
1785
- }, xi = {
1806
+ }, Si = {
1786
1807
  info: {
1787
1808
  key: "python",
1788
1809
  title: "Python",
@@ -1790,9 +1811,9 @@ var Re = (e, n, t) => {
1790
1811
  cli: "python3 %s"
1791
1812
  },
1792
1813
  clientsById: {
1793
- requests: bi
1814
+ requests: ji
1794
1815
  }
1795
- }, $i = {
1816
+ }, Oi = {
1796
1817
  info: {
1797
1818
  key: "httr",
1798
1819
  title: "httr",
@@ -1800,14 +1821,14 @@ var Re = (e, n, t) => {
1800
1821
  description: "httr: Tools for Working with URLs and HTTP",
1801
1822
  extname: ".r"
1802
1823
  },
1803
- convert: ({ url: e, queryObj: n, queryString: t, postData: a, allHeaders: c, method: s }) => {
1824
+ convert: ({ url: e, queryObj: n, queryString: t, postData: a, allHeaders: l, method: s }) => {
1804
1825
  const { push: r, blank: o, join: i } = new V();
1805
1826
  r("library(httr)"), o(), r(`url <- "${e}"`), o();
1806
- const l = n;
1827
+ const c = n;
1807
1828
  delete n.key;
1808
- const u = Object.keys(l).length;
1809
- t.length === 1 ? (r(`queryString <- list(${Object.keys(l)} = "${Object.values(l).toString()}")`), o()) : t.length > 1 && (r("queryString <- list("), Object.keys(l).forEach((p, O) => {
1810
- O !== u - 1 ? r(` ${p} = "${l[p].toString()}",`) : r(` ${p} = "${l[p].toString()}"`);
1829
+ const u = Object.keys(c).length;
1830
+ t.length === 1 ? (r(`queryString <- list(${Object.keys(c)} = "${Object.values(c).toString()}")`), o()) : t.length > 1 && (r("queryString <- list("), Object.keys(c).forEach((p, O) => {
1831
+ O !== u - 1 ? r(` ${p} = "${c[p].toString()}",`) : r(` ${p} = "${c[p].toString()}"`);
1811
1832
  }), r(")"), o());
1812
1833
  const y = JSON.stringify(a.text);
1813
1834
  if (y && (r(`payload <- ${y}`), o()), a.text || a.jsonObj || a.params)
@@ -1825,22 +1846,22 @@ var Re = (e, n, t) => {
1825
1846
  r('encode <- "raw"'), o();
1826
1847
  break;
1827
1848
  }
1828
- const g = ge(c, "cookie"), m = ge(c, "accept"), x = g ? `set_cookies(\`${String(g).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${le(m)}")` : void 0, f = `content_type("${le(a.mimeType)}")`, h = Object.entries(c).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, O]) => `'${p}' = '${Fe(O)}'`).join(", "), d = h ? `add_headers(${h})` : void 0;
1849
+ const g = ge(l, "cookie"), m = ge(l, "accept"), x = g ? `set_cookies(\`${String(g).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, v = m ? `accept("${le(m)}")` : void 0, f = `content_type("${le(a.mimeType)}")`, h = Object.entries(l).filter(([p]) => !["cookie", "accept", "content-type"].includes(p.toLowerCase())).map(([p, O]) => `'${p}' = '${Fe(O)}'`).join(", "), d = h ? `add_headers(${h})` : void 0;
1829
1850
  let j = `response <- VERB("${s}", url`;
1830
1851
  y && (j += ", body = payload"), t.length && (j += ", query = queryString");
1831
1852
  const T = [d, f, v, x].filter((p) => !!p).join(", ");
1832
1853
  return T && (j += `, ${T}`), (a.text || a.jsonObj || a.params) && (j += ", encode = encode"), j += ")", r(j), o(), r('content(response, "text")'), i();
1833
1854
  }
1834
- }, wi = {
1855
+ }, Ti = {
1835
1856
  info: {
1836
1857
  key: "r",
1837
1858
  title: "R",
1838
1859
  default: "httr"
1839
1860
  },
1840
1861
  clientsById: {
1841
- httr: $i
1862
+ httr: Oi
1842
1863
  }
1843
- }, ji = {
1864
+ }, Pi = {
1844
1865
  info: {
1845
1866
  key: "native",
1846
1867
  title: "net::http",
@@ -1848,10 +1869,10 @@ var Re = (e, n, t) => {
1848
1869
  description: "Ruby HTTP client",
1849
1870
  extname: ".rb"
1850
1871
  },
1851
- convert: ({ uriObj: e, method: n, fullUrl: t, postData: a, allHeaders: c }) => {
1872
+ convert: ({ uriObj: e, method: n, fullUrl: t, postData: a, allHeaders: l }) => {
1852
1873
  const { push: s, blank: r, join: o } = new V();
1853
1874
  s("require 'uri'"), s("require 'net/http'"), r();
1854
- const i = n.toUpperCase(), l = [
1875
+ const i = n.toUpperCase(), c = [
1855
1876
  "GET",
1856
1877
  "POST",
1857
1878
  "HEAD",
@@ -1865,22 +1886,22 @@ var Re = (e, n, t) => {
1865
1886
  "MOVE",
1866
1887
  "TRACE"
1867
1888
  ], u = i.charAt(0) + i.substring(1).toLowerCase();
1868
- l.includes(i) || (s(`class Net::HTTP::${u} < Net::HTTPRequest`), s(` METHOD = '${i.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), r()), s(`url = URI("${t}")`), r(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), r(), s(`request = Net::HTTP::${u}.new(url)`);
1869
- const y = Object.keys(c);
1889
+ c.includes(i) || (s(`class Net::HTTP::${u} < Net::HTTPRequest`), s(` METHOD = '${i.toUpperCase()}'`), s(` REQUEST_HAS_BODY = '${a.text ? "true" : "false"}'`), s(" RESPONSE_HAS_BODY = true"), s("end"), r()), s(`url = URI("${t}")`), r(), s("http = Net::HTTP.new(url.host, url.port)"), e.protocol === "https:" && s("http.use_ssl = true"), r(), s(`request = Net::HTTP::${u}.new(url)`);
1890
+ const y = Object.keys(l);
1870
1891
  return y.length && y.forEach((g) => {
1871
- s(`request["${g}"] = '${Fe(c[g])}'`);
1892
+ s(`request["${g}"] = '${Fe(l[g])}'`);
1872
1893
  }), a.text && s(`request.body = ${JSON.stringify(a.text)}`), r(), s("response = http.request(request)"), s("puts response.read_body"), o();
1873
1894
  }
1874
- }, Si = {
1895
+ }, qi = {
1875
1896
  info: {
1876
1897
  key: "ruby",
1877
1898
  title: "Ruby",
1878
1899
  default: "native"
1879
1900
  },
1880
1901
  clientsById: {
1881
- native: ji
1902
+ native: Pi
1882
1903
  }
1883
- }, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Oi = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ti = {
1904
+ }, ce = (e = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Ci = (e) => e.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), Ri = {
1884
1905
  "http1.0": "0",
1885
1906
  "url ": "",
1886
1907
  cookie: "b",
@@ -1890,13 +1911,13 @@ var Re = (e, n, t) => {
1890
1911
  header: "H",
1891
1912
  insecure: "k",
1892
1913
  request: "X"
1893
- }, Pi = (e) => (n) => {
1914
+ }, Ei = (e) => (n) => {
1894
1915
  if (e) {
1895
- const t = Ti[n];
1916
+ const t = Ri[n];
1896
1917
  return t ? `-${t}` : "";
1897
1918
  }
1898
1919
  return `--${n}`;
1899
- }, qi = {
1920
+ }, ki = {
1900
1921
  info: {
1901
1922
  key: "curl",
1902
1923
  title: "cURL",
@@ -1904,28 +1925,28 @@ var Re = (e, n, t) => {
1904
1925
  description: "cURL is a command line tool and library for transferring data with URL syntax",
1905
1926
  extname: ".sh"
1906
1927
  },
1907
- convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: a, allHeaders: c, postData: s }, r = {}) => {
1928
+ convert: ({ fullUrl: e, method: n, httpVersion: t, headersObj: a, allHeaders: l, postData: s }, r = {}) => {
1908
1929
  var f;
1909
- const { indent: o = " ", short: i = !1, binary: l = !1, globOff: u = !1 } = r, y = " ", { push: g, join: m } = new V({
1930
+ const { indent: o = " ", short: i = !1, binary: c = !1, globOff: u = !1 } = r, y = " ", { push: g, join: m } = new V({
1910
1931
  ...typeof o == "string" ? { indent: o } : {},
1911
1932
  join: o !== !1 ? ` \\
1912
1933
  ${o}` : " "
1913
- }), x = Pi(i);
1934
+ }), x = Ei(i);
1914
1935
  let v = ce(e);
1915
- if (g(`curl ${x("request")} ${n}`), u && (v = unescape(v), g(x("globoff"))), g(`${x("url ")}${v}`), t === "HTTP/1.0" && g(x("http1.0")), ge(c, "accept-encoding") && g("--compressed"), s.mimeType === "multipart/form-data") {
1936
+ if (g(`curl ${x("request")} ${n}`), u && (v = unescape(v), g(x("globoff"))), g(`${x("url ")}${v}`), t === "HTTP/1.0" && g(x("http1.0")), ge(l, "accept-encoding") && g("--compressed"), s.mimeType === "multipart/form-data") {
1916
1937
  const h = fe(a, "content-type");
1917
1938
  if (h) {
1918
1939
  const d = a[h];
1919
1940
  if (h && d) {
1920
1941
  const j = String(d).replace(/; boundary.+?(?=(;|$))/, "");
1921
- a[h] = j, c[h] = j;
1942
+ a[h] = j, l[h] = j;
1922
1943
  }
1923
1944
  }
1924
1945
  }
1925
1946
  switch (Object.keys(a).sort().forEach((h) => {
1926
1947
  const d = `${h}: ${a[h]}`;
1927
1948
  g(`${x("header")} ${ce(d)}`);
1928
- }), c.cookie && g(`${x("cookie")} ${ce(c.cookie)}`), s.mimeType) {
1949
+ }), l.cookie && g(`${x("cookie")} ${ce(l.cookie)}`), s.mimeType) {
1929
1950
  case "multipart/form-data":
1930
1951
  (f = s.params) == null || f.forEach((d) => {
1931
1952
  let j = "";
@@ -1934,19 +1955,19 @@ ${o}` : " "
1934
1955
  break;
1935
1956
  case "application/x-www-form-urlencoded":
1936
1957
  s.params ? s.params.forEach((d) => {
1937
- const j = d.name, T = encodeURIComponent(d.name), p = T !== j, O = p ? T : j, b = l ? "--data-binary" : p ? "--data-urlencode" : x("data");
1958
+ const j = d.name, T = encodeURIComponent(d.name), p = T !== j, O = p ? T : j, b = c ? "--data-binary" : p ? "--data-urlencode" : x("data");
1938
1959
  g(`${b} ${ce(`${O}=${d.value}`)}`);
1939
- }) : g(`${l ? "--data-binary" : x("data")} ${ce(s.text)}`);
1960
+ }) : g(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
1940
1961
  break;
1941
1962
  default:
1942
1963
  if (!s.text)
1943
1964
  break;
1944
1965
  let h = !1;
1945
- if (Po(s.mimeType) && s.text.length > 20)
1966
+ if (Eo(s.mimeType) && s.text.length > 20)
1946
1967
  try {
1947
1968
  const d = JSON.parse(s.text);
1948
1969
  h = !0, s.text.indexOf("'") > 0 ? g(
1949
- `${l ? "--data-binary" : x("data")} @- <<EOF
1970
+ `${c ? "--data-binary" : x("data")} @- <<EOF
1950
1971
  ${JSON.stringify(
1951
1972
  d,
1952
1973
  null,
@@ -1954,17 +1975,17 @@ ${JSON.stringify(
1954
1975
  )}
1955
1976
  EOF`
1956
1977
  ) : g(
1957
- `${l ? "--data-binary" : x("data")} '
1978
+ `${c ? "--data-binary" : x("data")} '
1958
1979
  ${JSON.stringify(d, null, y)}
1959
1980
  '`
1960
1981
  );
1961
1982
  } catch {
1962
1983
  }
1963
- h || g(`${l ? "--data-binary" : x("data")} ${ce(s.text)}`);
1984
+ h || g(`${c ? "--data-binary" : x("data")} ${ce(s.text)}`);
1964
1985
  }
1965
1986
  return m();
1966
1987
  }
1967
- }, Ci = {
1988
+ }, Ni = {
1968
1989
  info: {
1969
1990
  key: "httpie",
1970
1991
  title: "HTTPie",
@@ -1973,7 +1994,7 @@ ${JSON.stringify(d, null, y)}
1973
1994
  extname: ".sh",
1974
1995
  installation: "brew install httpie"
1975
1996
  },
1976
- convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: a, method: c, url: s }, r) => {
1997
+ convert: ({ allHeaders: e, postData: n, queryObj: t, fullUrl: a, method: l, url: s }, r) => {
1977
1998
  const o = {
1978
1999
  body: !1,
1979
2000
  cert: !1,
@@ -1988,7 +2009,7 @@ ${JSON.stringify(d, null, y)}
1988
2009
  verbose: !1,
1989
2010
  verify: !1,
1990
2011
  ...r
1991
- }, { push: i, join: l, unshift: u } = new V({
2012
+ }, { push: i, join: c, unshift: u } = new V({
1992
2013
  indent: o.indent,
1993
2014
  // @ts-expect-error SEEMS LEGIT
1994
2015
  join: o.indent !== !1 ? ` \\
@@ -2007,13 +2028,13 @@ ${o.indent}` : " "
2007
2028
  i(`${x.name}=${ce(x.value)}`);
2008
2029
  })) : y = !0;
2009
2030
  const m = g.length ? `${g.join(" ")} ` : "";
2010
- if (s = ce(o.queryParams ? s : a), u(`http ${m}${c} ${s}`), y && n.text) {
2031
+ if (s = ce(o.queryParams ? s : a), u(`http ${m}${l} ${s}`), y && n.text) {
2011
2032
  const x = ce(n.text);
2012
2033
  u(`echo ${x} | `);
2013
2034
  }
2014
- return l();
2035
+ return c();
2015
2036
  }
2016
- }, Ei = {
2037
+ }, Ai = {
2017
2038
  info: {
2018
2039
  key: "wget",
2019
2040
  title: "Wget",
@@ -2021,23 +2042,23 @@ ${o.indent}` : " "
2021
2042
  description: "a free software package for retrieving files using HTTP, HTTPS",
2022
2043
  extname: ".sh"
2023
2044
  },
2024
- convert: ({ method: e, postData: n, allHeaders: t, fullUrl: a }, c) => {
2045
+ convert: ({ method: e, postData: n, allHeaders: t, fullUrl: a }, l) => {
2025
2046
  const s = {
2026
2047
  indent: " ",
2027
2048
  short: !1,
2028
2049
  verbose: !1,
2029
- ...c
2050
+ ...l
2030
2051
  }, { push: r, join: o } = new V({
2031
2052
  ...typeof s.indent == "string" ? { indent: s.indent } : {},
2032
2053
  join: s.indent !== !1 ? ` \\
2033
2054
  ${s.indent}` : " "
2034
2055
  });
2035
2056
  return s.verbose ? r(`wget ${s.short ? "-v" : "--verbose"}`) : r(`wget ${s.short ? "-q" : "--quiet"}`), r(`--method ${ce(e)}`), Object.keys(t).forEach((i) => {
2036
- const l = `${i}: ${t[i]}`;
2037
- r(`--header ${ce(l)}`);
2038
- }), n.text && r(`--body-data ${Oi(ce(n.text))}`), r(s.short ? "-O" : "--output-document"), r(`- ${ce(a)}`), o();
2057
+ const c = `${i}: ${t[i]}`;
2058
+ r(`--header ${ce(c)}`);
2059
+ }), n.text && r(`--body-data ${Ci(ce(n.text))}`), r(s.short ? "-O" : "--output-document"), r(`- ${ce(a)}`), o();
2039
2060
  }
2040
- }, Ri = {
2061
+ }, Ii = {
2041
2062
  info: {
2042
2063
  key: "shell",
2043
2064
  title: "Shell",
@@ -2045,30 +2066,30 @@ ${s.indent}` : " "
2045
2066
  cli: "%s"
2046
2067
  },
2047
2068
  clientsById: {
2048
- curl: qi,
2049
- httpie: Ci,
2050
- wget: Ei
2069
+ curl: ki,
2070
+ httpie: Ni,
2071
+ wget: Ai
2051
2072
  }
2052
- }, Yr = (e, n) => n.repeat(e), Xr = (e, n, t, a) => {
2053
- const c = Yr(a, t), s = Yr(a - 1, t), r = n ? `,
2054
- ${c}` : ", ";
2073
+ }, Xr = (e, n) => n.repeat(e), Zr = (e, n, t, a) => {
2074
+ const l = Xr(a, t), s = Xr(a - 1, t), r = n ? `,
2075
+ ${l}` : ", ";
2055
2076
  return n ? `[
2056
- ${c}${e.join(r)}
2077
+ ${l}${e.join(r)}
2057
2078
  ${s}]` : `[${e.join(r)}]`;
2058
- }, Zr = (e, n, t) => `let ${e} = ${Xe(n, t)}`, Xe = (e, n, t) => {
2079
+ }, en = (e, n, t) => `let ${e} = ${Xe(n, t)}`, Xe = (e, n, t) => {
2059
2080
  switch (t = t === void 0 ? 1 : t + 1, Object.prototype.toString.call(e)) {
2060
2081
  case "[object Number]":
2061
2082
  return e;
2062
2083
  case "[object Array]": {
2063
2084
  let a = !1;
2064
- const c = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), Xe(s, n, t)));
2065
- return Xr(c, a, n.indent, t);
2085
+ const l = e.map((s) => (Object.prototype.toString.call(s) === "[object Object]" && (a = Object.keys(s).length > 1), Xe(s, n, t)));
2086
+ return Zr(l, a, n.indent, t);
2066
2087
  }
2067
2088
  case "[object Object]": {
2068
2089
  const a = [];
2069
- for (const c in e)
2070
- a.push(`"${c}": ${Xe(e[c], n, t)}`);
2071
- return Xr(
2090
+ for (const l in e)
2091
+ a.push(`"${l}": ${Xe(e[l], n, t)}`);
2092
+ return Zr(
2072
2093
  a,
2073
2094
  // @ts-expect-error needs better types
2074
2095
  n.pretty && a.length > 1,
@@ -2082,7 +2103,7 @@ ${s}]` : `[${e.join(r)}]`;
2082
2103
  default:
2083
2104
  return e == null ? "nil" : `"${e.toString().replace(/"/g, '\\"')}"`;
2084
2105
  }
2085
- }, ki = {
2106
+ }, Ui = {
2086
2107
  info: {
2087
2108
  key: "urlsession",
2088
2109
  title: "URLSession",
@@ -2090,14 +2111,14 @@ ${s}]` : `[${e.join(r)}]`;
2090
2111
  description: "Foundation's URLSession request",
2091
2112
  extname: ".swift"
2092
2113
  },
2093
- convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: a, method: c }, s) => {
2114
+ convert: ({ allHeaders: e, postData: n, uriObj: t, queryObj: a, method: l }, s) => {
2094
2115
  var g;
2095
2116
  const r = {
2096
2117
  indent: " ",
2097
2118
  pretty: !0,
2098
2119
  timeout: 10,
2099
2120
  ...s
2100
- }, { push: o, blank: i, join: l } = new V({ indent: r.indent });
2121
+ }, { push: o, blank: i, join: c } = new V({ indent: r.indent });
2101
2122
  o("import Foundation"), i();
2102
2123
  const u = n.text || n.jsonObj || n.params;
2103
2124
  if (u)
@@ -2109,10 +2130,10 @@ ${s}]` : `[${e.join(r)}]`;
2109
2130
  }
2110
2131
  break;
2111
2132
  case "application/json":
2112
- n.jsonObj && (o(`${Zr("parameters", n.jsonObj, r)} as [String : Any?]`), i(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
2133
+ n.jsonObj && (o(`${en("parameters", n.jsonObj, r)} as [String : Any?]`), i(), o("let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])"), i());
2113
2134
  break;
2114
2135
  case "multipart/form-data":
2115
- o(Zr("parameters", n.params, r)), i(), o(`let boundary = "${n.boundary}"`), i(), o('var body = ""'), o("for param in parameters {"), o('let paramName = param["name"]!', 1), o('body += "--\\(boundary)\\r\\n"', 1), o('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), o('if let filename = param["fileName"] {', 1), o('let contentType = param["contentType"]!', 2), o("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), o('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), o('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), o("body += fileContent", 2), o('} else if let paramValue = param["value"] {', 1), o('body += "\\r\\n\\r\\n\\(paramValue)"', 2), o("}", 1), o("}"), i(), o("let postData = Data(body.utf8)"), i();
2136
+ o(en("parameters", n.params, r)), i(), o(`let boundary = "${n.boundary}"`), i(), o('var body = ""'), o("for param in parameters {"), o('let paramName = param["name"]!', 1), o('body += "--\\(boundary)\\r\\n"', 1), o('body += "Content-Disposition:form-data; name=\\"\\(paramName)\\""', 1), o('if let filename = param["fileName"] {', 1), o('let contentType = param["contentType"]!', 2), o("let fileContent = try String(contentsOfFile: filename, encoding: .utf8)", 2), o('body += "; filename=\\"\\(filename)\\"\\r\\n"', 2), o('body += "Content-Type: \\(contentType)\\r\\n\\r\\n"', 2), o("body += fileContent", 2), o('} else if let paramValue = param["value"] {', 1), o('body += "\\r\\n\\r\\n\\(paramValue)"', 2), o("}", 1), o("}"), i(), o("let postData = Data(body.utf8)"), i();
2116
2137
  break;
2117
2138
  default:
2118
2139
  o(`let postData = Data("${n.text}".utf8)`), i();
@@ -2131,108 +2152,108 @@ ${s}]` : `[${e.join(r)}]`;
2131
2152
  });
2132
2153
  break;
2133
2154
  }
2134
- }), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${c}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${Xe(e, r)}`), u && o("request.httpBody = postData"), i(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), l();
2155
+ }), o("]"), o("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), i(), o("var request = URLRequest(url: components.url!)")), o(`request.httpMethod = "${l}"`), o(`request.timeoutInterval = ${r.timeout}`), Object.keys(e).length && o(`request.allHTTPHeaderFields = ${Xe(e, r)}`), u && o("request.httpBody = postData"), i(), o("let (data, _) = try await URLSession.shared.data(for: request)"), o("print(String(decoding: data, as: UTF8.self))"), c();
2135
2156
  }
2136
- }, Ni = {
2157
+ }, Li = {
2137
2158
  info: {
2138
2159
  key: "swift",
2139
2160
  title: "Swift",
2140
2161
  default: "urlsession"
2141
2162
  },
2142
2163
  clientsById: {
2143
- urlsession: ki
2164
+ urlsession: Ui
2144
2165
  }
2145
- }, Ai = {
2146
- c: To,
2147
- clojure: Eo,
2148
- csharp: Io,
2149
- go: Lo,
2150
- http: _o,
2151
- java: Wo,
2152
- javascript: Qo,
2153
- json: Yo,
2154
- kotlin: Zo,
2155
- node: oi,
2156
- objc: si,
2157
- ocaml: ci,
2158
- php: hi,
2159
- powershell: gi,
2160
- python: xi,
2161
- r: wi,
2162
- ruby: Si,
2163
- shell: Ri,
2164
- swift: Ni
2165
- }, Oe = {}, Ae = { exports: {} };
2166
+ }, Fi = {
2167
+ c: Ro,
2168
+ clojure: Ao,
2169
+ csharp: _o,
2170
+ go: Ho,
2171
+ http: zo,
2172
+ java: Do,
2173
+ javascript: Zo,
2174
+ json: ti,
2175
+ kotlin: ni,
2176
+ node: ci,
2177
+ objc: fi,
2178
+ ocaml: di,
2179
+ php: vi,
2180
+ powershell: $i,
2181
+ python: Si,
2182
+ r: Ti,
2183
+ ruby: qi,
2184
+ shell: Ii,
2185
+ swift: Li
2186
+ }, Te = {}, Ie = { exports: {} };
2166
2187
  /*! https://mths.be/punycode v1.4.1 by @mathias */
2167
- var Ii = Ae.exports, en;
2168
- function Ui() {
2169
- return en || (en = 1, function(e, n) {
2188
+ var _i = Ie.exports, tn;
2189
+ function Bi() {
2190
+ return tn || (tn = 1, function(e, n) {
2170
2191
  (function(t) {
2171
- var a = n && !n.nodeType && n, c = e && !e.nodeType && e, s = typeof Ke == "object" && Ke;
2192
+ var a = n && !n.nodeType && n, l = e && !e.nodeType && e, s = typeof Ke == "object" && Ke;
2172
2193
  (s.global === s || s.window === s || s.self === s) && (t = s);
2173
- var r, o = 2147483647, i = 36, l = 1, u = 26, y = 38, g = 700, m = 72, x = 128, v = "-", f = /^xn--/, h = /[^\x20-\x7E]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, j = {
2194
+ var r, o = 2147483647, i = 36, c = 1, u = 26, y = 38, g = 700, m = 72, x = 128, v = "-", f = /^xn--/, h = /[^\x20-\x7E]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, j = {
2174
2195
  overflow: "Overflow: input needs wider integers to process",
2175
2196
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
2176
2197
  "invalid-input": "Invalid input"
2177
- }, T = i - l, p = Math.floor, O = String.fromCharCode, b;
2178
- function E(R) {
2179
- throw new RangeError(j[R]);
2198
+ }, T = i - c, p = Math.floor, O = String.fromCharCode, b;
2199
+ function R(E) {
2200
+ throw new RangeError(j[E]);
2180
2201
  }
2181
- function N(R, k) {
2182
- for (var F = R.length, q = []; F--; )
2183
- q[F] = k(R[F]);
2202
+ function N(E, k) {
2203
+ for (var F = E.length, q = []; F--; )
2204
+ q[F] = k(E[F]);
2184
2205
  return q;
2185
2206
  }
2186
- function C(R, k) {
2187
- var F = R.split("@"), q = "";
2188
- F.length > 1 && (q = F[0] + "@", R = F[1]), R = R.replace(d, ".");
2189
- var U = R.split("."), J = N(U, k).join(".");
2207
+ function C(E, k) {
2208
+ var F = E.split("@"), q = "";
2209
+ F.length > 1 && (q = F[0] + "@", E = F[1]), E = E.replace(d, ".");
2210
+ var U = E.split("."), J = N(U, k).join(".");
2190
2211
  return q + J;
2191
2212
  }
2192
- function L(R) {
2193
- for (var k = [], F = 0, q = R.length, U, J; F < q; )
2194
- U = R.charCodeAt(F++), U >= 55296 && U <= 56319 && F < q ? (J = R.charCodeAt(F++), (J & 64512) == 56320 ? k.push(((U & 1023) << 10) + (J & 1023) + 65536) : (k.push(U), F--)) : k.push(U);
2213
+ function L(E) {
2214
+ for (var k = [], F = 0, q = E.length, U, J; F < q; )
2215
+ U = E.charCodeAt(F++), U >= 55296 && U <= 56319 && F < q ? (J = E.charCodeAt(F++), (J & 64512) == 56320 ? k.push(((U & 1023) << 10) + (J & 1023) + 65536) : (k.push(U), F--)) : k.push(U);
2195
2216
  return k;
2196
2217
  }
2197
- function P(R) {
2198
- return N(R, function(k) {
2218
+ function P(E) {
2219
+ return N(E, function(k) {
2199
2220
  var F = "";
2200
2221
  return k > 65535 && (k -= 65536, F += O(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), F += O(k), F;
2201
2222
  }).join("");
2202
2223
  }
2203
- function oe(R) {
2204
- return R - 48 < 10 ? R - 22 : R - 65 < 26 ? R - 65 : R - 97 < 26 ? R - 97 : i;
2224
+ function oe(E) {
2225
+ return E - 48 < 10 ? E - 22 : E - 65 < 26 ? E - 65 : E - 97 < 26 ? E - 97 : i;
2205
2226
  }
2206
- function H(R, k) {
2207
- return R + 22 + 75 * (R < 26) - ((k != 0) << 5);
2227
+ function H(E, k) {
2228
+ return E + 22 + 75 * (E < 26) - ((k != 0) << 5);
2208
2229
  }
2209
- function D(R, k, F) {
2230
+ function D(E, k, F) {
2210
2231
  var q = 0;
2211
- for (R = F ? p(R / g) : R >> 1, R += p(R / k); R > T * u >> 1; q += i)
2212
- R = p(R / T);
2213
- return p(q + (T + 1) * R / (R + y));
2232
+ for (E = F ? p(E / g) : E >> 1, E += p(E / k); E > T * u >> 1; q += i)
2233
+ E = p(E / T);
2234
+ return p(q + (T + 1) * E / (E + y));
2214
2235
  }
2215
- function se(R) {
2216
- var k = [], F = R.length, q, U = 0, J = x, z = m, K, ne, G, I, _, B, Q, W, Y;
2217
- for (K = R.lastIndexOf(v), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
2218
- R.charCodeAt(ne) >= 128 && E("not-basic"), k.push(R.charCodeAt(ne));
2236
+ function se(E) {
2237
+ var k = [], F = E.length, q, U = 0, J = x, z = m, K, ne, G, I, _, B, Q, W, Y;
2238
+ for (K = E.lastIndexOf(v), K < 0 && (K = 0), ne = 0; ne < K; ++ne)
2239
+ E.charCodeAt(ne) >= 128 && R("not-basic"), k.push(E.charCodeAt(ne));
2219
2240
  for (G = K > 0 ? K + 1 : 0; G < F; ) {
2220
- for (I = U, _ = 1, B = i; G >= F && E("invalid-input"), Q = oe(R.charCodeAt(G++)), (Q >= i || Q > p((o - U) / _)) && E("overflow"), U += Q * _, W = B <= z ? l : B >= z + u ? u : B - z, !(Q < W); B += i)
2221
- Y = i - W, _ > p(o / Y) && E("overflow"), _ *= Y;
2222
- q = k.length + 1, z = D(U - I, q, I == 0), p(U / q) > o - J && E("overflow"), J += p(U / q), U %= q, k.splice(U++, 0, J);
2241
+ for (I = U, _ = 1, B = i; G >= F && R("invalid-input"), Q = oe(E.charCodeAt(G++)), (Q >= i || Q > p((o - U) / _)) && R("overflow"), U += Q * _, W = B <= z ? c : B >= z + u ? u : B - z, !(Q < W); B += i)
2242
+ Y = i - W, _ > p(o / Y) && R("overflow"), _ *= Y;
2243
+ q = k.length + 1, z = D(U - I, q, I == 0), p(U / q) > o - J && R("overflow"), J += p(U / q), U %= q, k.splice(U++, 0, J);
2223
2244
  }
2224
2245
  return P(k);
2225
2246
  }
2226
- function Z(R) {
2247
+ function Z(E) {
2227
2248
  var k, F, q, U, J, z, K, ne, G, I, _, B = [], Q, W, Y, ae;
2228
- for (R = L(R), Q = R.length, k = x, F = 0, J = m, z = 0; z < Q; ++z)
2229
- _ = R[z], _ < 128 && B.push(O(_));
2249
+ for (E = L(E), Q = E.length, k = x, F = 0, J = m, z = 0; z < Q; ++z)
2250
+ _ = E[z], _ < 128 && B.push(O(_));
2230
2251
  for (q = U = B.length, U && B.push(v); q < Q; ) {
2231
2252
  for (K = o, z = 0; z < Q; ++z)
2232
- _ = R[z], _ >= k && _ < K && (K = _);
2233
- for (W = q + 1, K - k > p((o - F) / W) && E("overflow"), F += (K - k) * W, k = K, z = 0; z < Q; ++z)
2234
- if (_ = R[z], _ < k && ++F > o && E("overflow"), _ == k) {
2235
- for (ne = F, G = i; I = G <= J ? l : G >= J + u ? u : G - J, !(ne < I); G += i)
2253
+ _ = E[z], _ >= k && _ < K && (K = _);
2254
+ for (W = q + 1, K - k > p((o - F) / W) && R("overflow"), F += (K - k) * W, k = K, z = 0; z < Q; ++z)
2255
+ if (_ = E[z], _ < k && ++F > o && R("overflow"), _ == k) {
2256
+ for (ne = F, G = i; I = G <= J ? c : G >= J + u ? u : G - J, !(ne < I); G += i)
2236
2257
  ae = ne - I, Y = i - I, B.push(
2237
2258
  O(H(I + ae % Y, 0))
2238
2259
  ), ne = p(ae / Y);
@@ -2242,13 +2263,13 @@ function Ui() {
2242
2263
  }
2243
2264
  return B.join("");
2244
2265
  }
2245
- function A(R) {
2246
- return C(R, function(k) {
2266
+ function A(E) {
2267
+ return C(E, function(k) {
2247
2268
  return f.test(k) ? se(k.slice(4).toLowerCase()) : k;
2248
2269
  });
2249
2270
  }
2250
- function re(R) {
2251
- return C(R, function(k) {
2271
+ function re(E) {
2272
+ return C(E, function(k) {
2252
2273
  return h.test(k) ? "xn--" + Z(k) : k;
2253
2274
  });
2254
2275
  }
@@ -2274,109 +2295,109 @@ function Ui() {
2274
2295
  encode: Z,
2275
2296
  toASCII: re,
2276
2297
  toUnicode: A
2277
- }, a && c)
2298
+ }, a && l)
2278
2299
  if (e.exports == a)
2279
- c.exports = r;
2300
+ l.exports = r;
2280
2301
  else
2281
2302
  for (b in r)
2282
2303
  r.hasOwnProperty(b) && (a[b] = r[b]);
2283
2304
  else
2284
2305
  t.punycode = r;
2285
- })(Ii);
2286
- }(Ae, Ae.exports)), Ae.exports;
2287
- }
2288
- var yt, tn;
2289
- function ua() {
2290
- return tn || (tn = 1, yt = Object), yt;
2306
+ })(_i);
2307
+ }(Ie, Ie.exports)), Ie.exports;
2291
2308
  }
2292
2309
  var mt, rn;
2293
- function Li() {
2294
- return rn || (rn = 1, mt = Error), mt;
2310
+ function pa() {
2311
+ return rn || (rn = 1, mt = Object), mt;
2295
2312
  }
2296
2313
  var gt, nn;
2297
- function Fi() {
2298
- return nn || (nn = 1, gt = EvalError), gt;
2314
+ function Hi() {
2315
+ return nn || (nn = 1, gt = Error), gt;
2299
2316
  }
2300
2317
  var vt, an;
2301
- function _i() {
2302
- return an || (an = 1, vt = RangeError), vt;
2318
+ function Mi() {
2319
+ return an || (an = 1, vt = EvalError), vt;
2303
2320
  }
2304
2321
  var bt, on;
2305
- function Bi() {
2306
- return on || (on = 1, bt = ReferenceError), bt;
2322
+ function zi() {
2323
+ return on || (on = 1, bt = RangeError), bt;
2307
2324
  }
2308
2325
  var xt, sn;
2309
- function fa() {
2310
- return sn || (sn = 1, xt = SyntaxError), xt;
2326
+ function Wi() {
2327
+ return sn || (sn = 1, xt = ReferenceError), xt;
2311
2328
  }
2312
2329
  var $t, ln;
2313
- function Be() {
2314
- return ln || (ln = 1, $t = TypeError), $t;
2330
+ function da() {
2331
+ return ln || (ln = 1, $t = SyntaxError), $t;
2315
2332
  }
2316
2333
  var wt, cn;
2317
- function Hi() {
2318
- return cn || (cn = 1, wt = URIError), wt;
2334
+ function Be() {
2335
+ return cn || (cn = 1, wt = TypeError), wt;
2319
2336
  }
2320
2337
  var jt, un;
2321
- function Mi() {
2322
- return un || (un = 1, jt = Math.abs), jt;
2338
+ function Ji() {
2339
+ return un || (un = 1, jt = URIError), jt;
2323
2340
  }
2324
2341
  var St, fn;
2325
- function zi() {
2326
- return fn || (fn = 1, St = Math.floor), St;
2342
+ function Gi() {
2343
+ return fn || (fn = 1, St = Math.abs), St;
2327
2344
  }
2328
2345
  var Ot, pn;
2329
- function Wi() {
2330
- return pn || (pn = 1, Ot = Math.max), Ot;
2346
+ function Vi() {
2347
+ return pn || (pn = 1, Ot = Math.floor), Ot;
2331
2348
  }
2332
2349
  var Tt, dn;
2333
- function Ji() {
2334
- return dn || (dn = 1, Tt = Math.min), Tt;
2350
+ function Di() {
2351
+ return dn || (dn = 1, Tt = Math.max), Tt;
2335
2352
  }
2336
2353
  var Pt, hn;
2337
- function Gi() {
2338
- return hn || (hn = 1, Pt = Math.pow), Pt;
2354
+ function Qi() {
2355
+ return hn || (hn = 1, Pt = Math.min), Pt;
2339
2356
  }
2340
2357
  var qt, yn;
2341
- function Vi() {
2342
- return yn || (yn = 1, qt = Math.round), qt;
2358
+ function Ki() {
2359
+ return yn || (yn = 1, qt = Math.pow), qt;
2343
2360
  }
2344
2361
  var Ct, mn;
2345
- function Di() {
2346
- return mn || (mn = 1, Ct = Number.isNaN || function(n) {
2362
+ function Yi() {
2363
+ return mn || (mn = 1, Ct = Math.round), Ct;
2364
+ }
2365
+ var Rt, gn;
2366
+ function Xi() {
2367
+ return gn || (gn = 1, Rt = Number.isNaN || function(n) {
2347
2368
  return n !== n;
2348
- }), Ct;
2369
+ }), Rt;
2349
2370
  }
2350
- var Et, gn;
2351
- function Qi() {
2352
- if (gn) return Et;
2353
- gn = 1;
2354
- var e = /* @__PURE__ */ Di();
2371
+ var Et, vn;
2372
+ function Zi() {
2373
+ if (vn) return Et;
2374
+ vn = 1;
2375
+ var e = /* @__PURE__ */ Xi();
2355
2376
  return Et = function(t) {
2356
2377
  return e(t) || t === 0 ? t : t < 0 ? -1 : 1;
2357
2378
  }, Et;
2358
2379
  }
2359
- var Rt, vn;
2360
- function Ki() {
2361
- return vn || (vn = 1, Rt = Object.getOwnPropertyDescriptor), Rt;
2362
- }
2363
2380
  var kt, bn;
2381
+ function es() {
2382
+ return bn || (bn = 1, kt = Object.getOwnPropertyDescriptor), kt;
2383
+ }
2384
+ var Nt, xn;
2364
2385
  function et() {
2365
- if (bn) return kt;
2366
- bn = 1;
2367
- var e = /* @__PURE__ */ Ki();
2386
+ if (xn) return Nt;
2387
+ xn = 1;
2388
+ var e = /* @__PURE__ */ es();
2368
2389
  if (e)
2369
2390
  try {
2370
2391
  e([], "length");
2371
2392
  } catch {
2372
2393
  e = null;
2373
2394
  }
2374
- return kt = e, kt;
2395
+ return Nt = e, Nt;
2375
2396
  }
2376
- var Nt, xn;
2397
+ var At, $n;
2377
2398
  function tt() {
2378
- if (xn) return Nt;
2379
- xn = 1;
2399
+ if ($n) return At;
2400
+ $n = 1;
2380
2401
  var e = Object.defineProperty || !1;
2381
2402
  if (e)
2382
2403
  try {
@@ -2384,11 +2405,11 @@ function tt() {
2384
2405
  } catch {
2385
2406
  e = !1;
2386
2407
  }
2387
- return Nt = e, Nt;
2408
+ return At = e, At;
2388
2409
  }
2389
- var At, $n;
2390
- function Yi() {
2391
- return $n || ($n = 1, At = function() {
2410
+ var It, wn;
2411
+ function ts() {
2412
+ return wn || (wn = 1, It = function() {
2392
2413
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2393
2414
  return !1;
2394
2415
  if (typeof Symbol.iterator == "symbol")
@@ -2396,8 +2417,8 @@ function Yi() {
2396
2417
  var n = {}, t = Symbol("test"), a = Object(t);
2397
2418
  if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(a) !== "[object Symbol]")
2398
2419
  return !1;
2399
- var c = 42;
2400
- n[t] = c;
2420
+ var l = 42;
2421
+ n[t] = l;
2401
2422
  for (var s in n)
2402
2423
  return !1;
2403
2424
  if (typeof Object.keys == "function" && Object.keys(n).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(n).length !== 0)
@@ -2410,119 +2431,119 @@ function Yi() {
2410
2431
  /** @type {PropertyDescriptor} */
2411
2432
  Object.getOwnPropertyDescriptor(n, t)
2412
2433
  );
2413
- if (o.value !== c || o.enumerable !== !0)
2434
+ if (o.value !== l || o.enumerable !== !0)
2414
2435
  return !1;
2415
2436
  }
2416
2437
  return !0;
2417
- }), At;
2418
- }
2419
- var It, wn;
2420
- function Xi() {
2421
- if (wn) return It;
2422
- wn = 1;
2423
- var e = typeof Symbol < "u" && Symbol, n = Yi();
2424
- return It = function() {
2425
- return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
2426
- }, It;
2438
+ }), It;
2427
2439
  }
2428
2440
  var Ut, jn;
2429
- function pa() {
2430
- return jn || (jn = 1, Ut = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Ut;
2441
+ function rs() {
2442
+ if (jn) return Ut;
2443
+ jn = 1;
2444
+ var e = typeof Symbol < "u" && Symbol, n = ts();
2445
+ return Ut = function() {
2446
+ return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : n();
2447
+ }, Ut;
2431
2448
  }
2432
2449
  var Lt, Sn;
2433
- function da() {
2434
- if (Sn) return Lt;
2435
- Sn = 1;
2436
- var e = /* @__PURE__ */ ua();
2437
- return Lt = e.getPrototypeOf || null, Lt;
2450
+ function ha() {
2451
+ return Sn || (Sn = 1, Lt = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Lt;
2438
2452
  }
2439
2453
  var Ft, On;
2440
- function Zi() {
2454
+ function ya() {
2441
2455
  if (On) return Ft;
2442
2456
  On = 1;
2443
- var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, a = "[object Function]", c = function(i, l) {
2457
+ var e = /* @__PURE__ */ pa();
2458
+ return Ft = e.getPrototypeOf || null, Ft;
2459
+ }
2460
+ var _t, Tn;
2461
+ function ns() {
2462
+ if (Tn) return _t;
2463
+ Tn = 1;
2464
+ var e = "Function.prototype.bind called on incompatible ", n = Object.prototype.toString, t = Math.max, a = "[object Function]", l = function(i, c) {
2444
2465
  for (var u = [], y = 0; y < i.length; y += 1)
2445
2466
  u[y] = i[y];
2446
- for (var g = 0; g < l.length; g += 1)
2447
- u[g + i.length] = l[g];
2467
+ for (var g = 0; g < c.length; g += 1)
2468
+ u[g + i.length] = c[g];
2448
2469
  return u;
2449
- }, s = function(i, l) {
2450
- for (var u = [], y = l, g = 0; y < i.length; y += 1, g += 1)
2470
+ }, s = function(i, c) {
2471
+ for (var u = [], y = c, g = 0; y < i.length; y += 1, g += 1)
2451
2472
  u[g] = i[y];
2452
2473
  return u;
2453
2474
  }, r = function(o, i) {
2454
- for (var l = "", u = 0; u < o.length; u += 1)
2455
- l += o[u], u + 1 < o.length && (l += i);
2456
- return l;
2475
+ for (var c = "", u = 0; u < o.length; u += 1)
2476
+ c += o[u], u + 1 < o.length && (c += i);
2477
+ return c;
2457
2478
  };
2458
- return Ft = function(i) {
2459
- var l = this;
2460
- if (typeof l != "function" || n.apply(l) !== a)
2461
- throw new TypeError(e + l);
2479
+ return _t = function(i) {
2480
+ var c = this;
2481
+ if (typeof c != "function" || n.apply(c) !== a)
2482
+ throw new TypeError(e + c);
2462
2483
  for (var u = s(arguments, 1), y, g = function() {
2463
2484
  if (this instanceof y) {
2464
- var h = l.apply(
2485
+ var h = c.apply(
2465
2486
  this,
2466
- c(u, arguments)
2487
+ l(u, arguments)
2467
2488
  );
2468
2489
  return Object(h) === h ? h : this;
2469
2490
  }
2470
- return l.apply(
2491
+ return c.apply(
2471
2492
  i,
2472
- c(u, arguments)
2493
+ l(u, arguments)
2473
2494
  );
2474
- }, m = t(0, l.length - u.length), x = [], v = 0; v < m; v++)
2495
+ }, m = t(0, c.length - u.length), x = [], v = 0; v < m; v++)
2475
2496
  x[v] = "$" + v;
2476
- if (y = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(g), l.prototype) {
2497
+ if (y = Function("binder", "return function (" + r(x, ",") + "){ return binder.apply(this,arguments); }")(g), c.prototype) {
2477
2498
  var f = function() {
2478
2499
  };
2479
- f.prototype = l.prototype, y.prototype = new f(), f.prototype = null;
2500
+ f.prototype = c.prototype, y.prototype = new f(), f.prototype = null;
2480
2501
  }
2481
2502
  return y;
2482
- }, Ft;
2483
- }
2484
- var _t, Tn;
2485
- function He() {
2486
- if (Tn) return _t;
2487
- Tn = 1;
2488
- var e = Zi();
2489
- return _t = Function.prototype.bind || e, _t;
2503
+ }, _t;
2490
2504
  }
2491
2505
  var Bt, Pn;
2492
- function br() {
2493
- return Pn || (Pn = 1, Bt = Function.prototype.call), Bt;
2506
+ function He() {
2507
+ if (Pn) return Bt;
2508
+ Pn = 1;
2509
+ var e = ns();
2510
+ return Bt = Function.prototype.bind || e, Bt;
2494
2511
  }
2495
2512
  var Ht, qn;
2496
- function xr() {
2497
- return qn || (qn = 1, Ht = Function.prototype.apply), Ht;
2513
+ function $r() {
2514
+ return qn || (qn = 1, Ht = Function.prototype.call), Ht;
2498
2515
  }
2499
2516
  var Mt, Cn;
2500
- function es() {
2501
- return Cn || (Cn = 1, Mt = typeof Reflect < "u" && Reflect && Reflect.apply), Mt;
2517
+ function wr() {
2518
+ return Cn || (Cn = 1, Mt = Function.prototype.apply), Mt;
2502
2519
  }
2503
- var zt, En;
2504
- function ha() {
2505
- if (En) return zt;
2520
+ var zt, Rn;
2521
+ function as() {
2522
+ return Rn || (Rn = 1, zt = typeof Reflect < "u" && Reflect && Reflect.apply), zt;
2523
+ }
2524
+ var Wt, En;
2525
+ function ma() {
2526
+ if (En) return Wt;
2506
2527
  En = 1;
2507
- var e = He(), n = xr(), t = br(), a = es();
2508
- return zt = a || e.call(t, n), zt;
2528
+ var e = He(), n = wr(), t = $r(), a = as();
2529
+ return Wt = a || e.call(t, n), Wt;
2509
2530
  }
2510
- var Wt, Rn;
2511
- function ya() {
2512
- if (Rn) return Wt;
2513
- Rn = 1;
2514
- var e = He(), n = /* @__PURE__ */ Be(), t = br(), a = ha();
2515
- return Wt = function(s) {
2531
+ var Jt, kn;
2532
+ function ga() {
2533
+ if (kn) return Jt;
2534
+ kn = 1;
2535
+ var e = He(), n = /* @__PURE__ */ Be(), t = $r(), a = ma();
2536
+ return Jt = function(s) {
2516
2537
  if (s.length < 1 || typeof s[0] != "function")
2517
2538
  throw new n("a function is required");
2518
2539
  return a(e, t, s);
2519
- }, Wt;
2540
+ }, Jt;
2520
2541
  }
2521
- var Jt, kn;
2522
- function ts() {
2523
- if (kn) return Jt;
2524
- kn = 1;
2525
- var e = ya(), n = /* @__PURE__ */ et(), t;
2542
+ var Gt, Nn;
2543
+ function os() {
2544
+ if (Nn) return Gt;
2545
+ Nn = 1;
2546
+ var e = ga(), n = /* @__PURE__ */ et(), t;
2526
2547
  try {
2527
2548
  t = /** @type {{ __proto__?: typeof Array.prototype }} */
2528
2549
  [].__proto__ === Array.prototype;
@@ -2534,41 +2555,41 @@ function ts() {
2534
2555
  Object.prototype,
2535
2556
  /** @type {keyof typeof Object.prototype} */
2536
2557
  "__proto__"
2537
- ), c = Object, s = c.getPrototypeOf;
2538
- return Jt = a && typeof a.get == "function" ? e([a.get]) : typeof s == "function" ? (
2558
+ ), l = Object, s = l.getPrototypeOf;
2559
+ return Gt = a && typeof a.get == "function" ? e([a.get]) : typeof s == "function" ? (
2539
2560
  /** @type {import('./get')} */
2540
2561
  function(o) {
2541
- return s(o == null ? o : c(o));
2562
+ return s(o == null ? o : l(o));
2542
2563
  }
2543
- ) : !1, Jt;
2544
- }
2545
- var Gt, Nn;
2546
- function rs() {
2547
- if (Nn) return Gt;
2548
- Nn = 1;
2549
- var e = pa(), n = da(), t = /* @__PURE__ */ ts();
2550
- return Gt = e ? function(c) {
2551
- return e(c);
2552
- } : n ? function(c) {
2553
- if (!c || typeof c != "object" && typeof c != "function")
2554
- throw new TypeError("getProto: not an object");
2555
- return n(c);
2556
- } : t ? function(c) {
2557
- return t(c);
2558
- } : null, Gt;
2564
+ ) : !1, Gt;
2559
2565
  }
2560
2566
  var Vt, An;
2561
- function ns() {
2567
+ function is() {
2562
2568
  if (An) return Vt;
2563
2569
  An = 1;
2564
- var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = He();
2565
- return Vt = t.call(e, n), Vt;
2570
+ var e = ha(), n = ya(), t = /* @__PURE__ */ os();
2571
+ return Vt = e ? function(l) {
2572
+ return e(l);
2573
+ } : n ? function(l) {
2574
+ if (!l || typeof l != "object" && typeof l != "function")
2575
+ throw new TypeError("getProto: not an object");
2576
+ return n(l);
2577
+ } : t ? function(l) {
2578
+ return t(l);
2579
+ } : null, Vt;
2566
2580
  }
2567
2581
  var Dt, In;
2568
- function $r() {
2582
+ function ss() {
2569
2583
  if (In) return Dt;
2570
2584
  In = 1;
2571
- var e, n = /* @__PURE__ */ ua(), t = /* @__PURE__ */ Li(), a = /* @__PURE__ */ Fi(), c = /* @__PURE__ */ _i(), s = /* @__PURE__ */ Bi(), r = /* @__PURE__ */ fa(), o = /* @__PURE__ */ Be(), i = /* @__PURE__ */ Hi(), l = /* @__PURE__ */ Mi(), u = /* @__PURE__ */ zi(), y = /* @__PURE__ */ Wi(), g = /* @__PURE__ */ Ji(), m = /* @__PURE__ */ Gi(), x = /* @__PURE__ */ Vi(), v = /* @__PURE__ */ Qi(), f = Function, h = function(G) {
2585
+ var e = Function.prototype.call, n = Object.prototype.hasOwnProperty, t = He();
2586
+ return Dt = t.call(e, n), Dt;
2587
+ }
2588
+ var Qt, Un;
2589
+ function jr() {
2590
+ if (Un) return Qt;
2591
+ Un = 1;
2592
+ var e, n = /* @__PURE__ */ pa(), t = /* @__PURE__ */ Hi(), a = /* @__PURE__ */ Mi(), l = /* @__PURE__ */ zi(), s = /* @__PURE__ */ Wi(), r = /* @__PURE__ */ da(), o = /* @__PURE__ */ Be(), i = /* @__PURE__ */ Ji(), c = /* @__PURE__ */ Gi(), u = /* @__PURE__ */ Vi(), y = /* @__PURE__ */ Di(), g = /* @__PURE__ */ Qi(), m = /* @__PURE__ */ Ki(), x = /* @__PURE__ */ Yi(), v = /* @__PURE__ */ Zi(), f = Function, h = function(G) {
2572
2593
  try {
2573
2594
  return f('"use strict"; return (' + G + ").constructor;")();
2574
2595
  } catch {
@@ -2585,7 +2606,7 @@ function $r() {
2585
2606
  return T;
2586
2607
  }
2587
2608
  }
2588
- }() : T, O = Xi()(), b = rs(), E = da(), N = pa(), C = xr(), L = br(), P = {}, oe = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
2609
+ }() : T, O = rs()(), b = is(), R = ya(), N = ha(), C = wr(), L = $r(), P = {}, oe = typeof Uint8Array > "u" || !b ? e : b(Uint8Array), H = {
2589
2610
  __proto__: null,
2590
2611
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
2591
2612
  "%Array%": Array,
@@ -2634,7 +2655,7 @@ function $r() {
2634
2655
  "%parseInt%": parseInt,
2635
2656
  "%Promise%": typeof Promise > "u" ? e : Promise,
2636
2657
  "%Proxy%": typeof Proxy > "u" ? e : Proxy,
2637
- "%RangeError%": c,
2658
+ "%RangeError%": l,
2638
2659
  "%ReferenceError%": s,
2639
2660
  "%Reflect%": typeof Reflect > "u" ? e : Reflect,
2640
2661
  "%RegExp%": RegExp,
@@ -2659,8 +2680,8 @@ function $r() {
2659
2680
  "%Function.prototype.call%": L,
2660
2681
  "%Function.prototype.apply%": C,
2661
2682
  "%Object.defineProperty%": j,
2662
- "%Object.getPrototypeOf%": E,
2663
- "%Math.abs%": l,
2683
+ "%Object.getPrototypeOf%": R,
2684
+ "%Math.abs%": c,
2664
2685
  "%Math.floor%": u,
2665
2686
  "%Math.max%": y,
2666
2687
  "%Math.min%": g,
@@ -2745,7 +2766,7 @@ function $r() {
2745
2766
  "%URIErrorPrototype%": ["URIError", "prototype"],
2746
2767
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2747
2768
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2748
- }, A = He(), re = /* @__PURE__ */ ns(), R = A.call(L, Array.prototype.concat), k = A.call(C, Array.prototype.splice), F = A.call(L, String.prototype.replace), q = A.call(L, String.prototype.slice), U = A.call(L, RegExp.prototype.exec), J = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(I) {
2769
+ }, A = He(), re = /* @__PURE__ */ ss(), E = A.call(L, Array.prototype.concat), k = A.call(C, Array.prototype.splice), F = A.call(L, String.prototype.replace), q = A.call(L, String.prototype.slice), U = A.call(L, RegExp.prototype.exec), J = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, z = /\\(\\)?/g, K = function(I) {
2749
2770
  var _ = q(I, 0, 1), B = q(I, -1);
2750
2771
  if (_ === "%" && B !== "%")
2751
2772
  throw new r("invalid intrinsic syntax, expected closing `%`");
@@ -2769,20 +2790,20 @@ function $r() {
2769
2790
  }
2770
2791
  throw new r("intrinsic " + I + " does not exist!");
2771
2792
  };
2772
- return Dt = function(I, _) {
2793
+ return Qt = function(I, _) {
2773
2794
  if (typeof I != "string" || I.length === 0)
2774
2795
  throw new o("intrinsic name must be a non-empty string");
2775
2796
  if (arguments.length > 1 && typeof _ != "boolean")
2776
2797
  throw new o('"allowMissing" argument must be a boolean');
2777
2798
  if (U(/^%?[^%]*%?$/, I) === null)
2778
2799
  throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2779
- var B = K(I), Q = B.length > 0 ? B[0] : "", W = ne("%" + Q + "%", _), Y = W.name, ae = W.value, he = !1, $e = W.alias;
2780
- $e && (Q = $e[0], k(B, R([0, 1], $e)));
2781
- for (var Te = 1, we = !0; Te < B.length; Te += 1) {
2782
- var ye = B[Te], Pe = q(ye, 0, 1), qe = q(ye, -1);
2783
- if ((Pe === '"' || Pe === "'" || Pe === "`" || qe === '"' || qe === "'" || qe === "`") && Pe !== qe)
2800
+ var B = K(I), Q = B.length > 0 ? B[0] : "", W = ne("%" + Q + "%", _), Y = W.name, ae = W.value, he = !1, we = W.alias;
2801
+ we && (Q = we[0], k(B, E([0, 1], we)));
2802
+ for (var Pe = 1, je = !0; Pe < B.length; Pe += 1) {
2803
+ var ye = B[Pe], qe = q(ye, 0, 1), Ce = q(ye, -1);
2804
+ if ((qe === '"' || qe === "'" || qe === "`" || Ce === '"' || Ce === "'" || Ce === "`") && qe !== Ce)
2784
2805
  throw new r("property names with quotes must have matching quotes");
2785
- if ((ye === "constructor" || !we) && (he = !0), Q += "." + ye, Y = "%" + Q + "%", re(H, Y))
2806
+ if ((ye === "constructor" || !je) && (he = !0), Q += "." + ye, Y = "%" + Q + "%", re(H, Y))
2786
2807
  ae = H[Y];
2787
2808
  else if (ae != null) {
2788
2809
  if (!(ye in ae)) {
@@ -2790,23 +2811,23 @@ function $r() {
2790
2811
  throw new o("base intrinsic for " + I + " exists, but the property is not available.");
2791
2812
  return;
2792
2813
  }
2793
- if (d && Te + 1 >= B.length) {
2794
- var je = d(ae, ye);
2795
- we = !!je, we && "get" in je && !("originalValue" in je.get) ? ae = je.get : ae = ae[ye];
2814
+ if (d && Pe + 1 >= B.length) {
2815
+ var Se = d(ae, ye);
2816
+ je = !!Se, je && "get" in Se && !("originalValue" in Se.get) ? ae = Se.get : ae = ae[ye];
2796
2817
  } else
2797
- we = re(ae, ye), ae = ae[ye];
2798
- we && !he && (H[Y] = ae);
2818
+ je = re(ae, ye), ae = ae[ye];
2819
+ je && !he && (H[Y] = ae);
2799
2820
  }
2800
2821
  }
2801
2822
  return ae;
2802
- }, Dt;
2823
+ }, Qt;
2803
2824
  }
2804
- var Qt = { exports: {} }, Kt, Un;
2805
- function as() {
2806
- if (Un) return Kt;
2807
- Un = 1;
2808
- var e = /* @__PURE__ */ tt(), n = /* @__PURE__ */ fa(), t = /* @__PURE__ */ Be(), a = /* @__PURE__ */ et();
2809
- return Kt = function(s, r, o) {
2825
+ var Kt = { exports: {} }, Yt, Ln;
2826
+ function ls() {
2827
+ if (Ln) return Yt;
2828
+ Ln = 1;
2829
+ var e = /* @__PURE__ */ tt(), n = /* @__PURE__ */ da(), t = /* @__PURE__ */ Be(), a = /* @__PURE__ */ et();
2830
+ return Yt = function(s, r, o) {
2810
2831
  if (!s || typeof s != "object" && typeof s != "function")
2811
2832
  throw new t("`obj` must be an object or a function`");
2812
2833
  if (typeof r != "string" && typeof r != "symbol")
@@ -2819,24 +2840,24 @@ function as() {
2819
2840
  throw new t("`nonConfigurable`, if provided, must be a boolean or null");
2820
2841
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2821
2842
  throw new t("`loose`, if provided, must be a boolean");
2822
- var i = arguments.length > 3 ? arguments[3] : null, l = arguments.length > 4 ? arguments[4] : null, u = arguments.length > 5 ? arguments[5] : null, y = arguments.length > 6 ? arguments[6] : !1, g = !!a && a(s, r);
2843
+ var i = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, u = arguments.length > 5 ? arguments[5] : null, y = arguments.length > 6 ? arguments[6] : !1, g = !!a && a(s, r);
2823
2844
  if (e)
2824
2845
  e(s, r, {
2825
2846
  configurable: u === null && g ? g.configurable : !u,
2826
2847
  enumerable: i === null && g ? g.enumerable : !i,
2827
2848
  value: o,
2828
- writable: l === null && g ? g.writable : !l
2849
+ writable: c === null && g ? g.writable : !c
2829
2850
  });
2830
- else if (y || !i && !l && !u)
2851
+ else if (y || !i && !c && !u)
2831
2852
  s[r] = o;
2832
2853
  else
2833
2854
  throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2834
- }, Kt;
2855
+ }, Yt;
2835
2856
  }
2836
- var Yt, Ln;
2837
- function os() {
2838
- if (Ln) return Yt;
2839
- Ln = 1;
2857
+ var Xt, Fn;
2858
+ function cs() {
2859
+ if (Fn) return Xt;
2860
+ Fn = 1;
2840
2861
  var e = /* @__PURE__ */ tt(), n = function() {
2841
2862
  return !!e;
2842
2863
  };
@@ -2848,24 +2869,24 @@ function os() {
2848
2869
  } catch {
2849
2870
  return !0;
2850
2871
  }
2851
- }, Yt = n, Yt;
2872
+ }, Xt = n, Xt;
2852
2873
  }
2853
- var Xt, Fn;
2854
- function is() {
2855
- if (Fn) return Xt;
2856
- Fn = 1;
2857
- var e = /* @__PURE__ */ $r(), n = /* @__PURE__ */ as(), t = /* @__PURE__ */ os()(), a = /* @__PURE__ */ et(), c = /* @__PURE__ */ Be(), s = e("%Math.floor%");
2858
- return Xt = function(o, i) {
2874
+ var Zt, _n;
2875
+ function us() {
2876
+ if (_n) return Zt;
2877
+ _n = 1;
2878
+ var e = /* @__PURE__ */ jr(), n = /* @__PURE__ */ ls(), t = /* @__PURE__ */ cs()(), a = /* @__PURE__ */ et(), l = /* @__PURE__ */ Be(), s = e("%Math.floor%");
2879
+ return Zt = function(o, i) {
2859
2880
  if (typeof o != "function")
2860
- throw new c("`fn` is not a function");
2881
+ throw new l("`fn` is not a function");
2861
2882
  if (typeof i != "number" || i < 0 || i > 4294967295 || s(i) !== i)
2862
- throw new c("`length` must be a positive 32-bit integer");
2863
- var l = arguments.length > 2 && !!arguments[2], u = !0, y = !0;
2883
+ throw new l("`length` must be a positive 32-bit integer");
2884
+ var c = arguments.length > 2 && !!arguments[2], u = !0, y = !0;
2864
2885
  if ("length" in o && a) {
2865
2886
  var g = a(o, "length");
2866
2887
  g && !g.configurable && (u = !1), g && !g.writable && (y = !1);
2867
2888
  }
2868
- return (u || y || !l) && (t ? n(
2889
+ return (u || y || !c) && (t ? n(
2869
2890
  /** @type {Parameters<define>[0]} */
2870
2891
  o,
2871
2892
  "length",
@@ -2878,21 +2899,21 @@ function is() {
2878
2899
  "length",
2879
2900
  i
2880
2901
  )), o;
2881
- }, Xt;
2902
+ }, Zt;
2882
2903
  }
2883
- var Zt, _n;
2884
- function ss() {
2885
- if (_n) return Zt;
2886
- _n = 1;
2887
- var e = He(), n = xr(), t = ha();
2888
- return Zt = function() {
2904
+ var er, Bn;
2905
+ function fs() {
2906
+ if (Bn) return er;
2907
+ Bn = 1;
2908
+ var e = He(), n = wr(), t = ma();
2909
+ return er = function() {
2889
2910
  return t(e, n, arguments);
2890
- }, Zt;
2911
+ }, er;
2891
2912
  }
2892
- var Bn;
2893
- function ls() {
2894
- return Bn || (Bn = 1, function(e) {
2895
- var n = /* @__PURE__ */ is(), t = /* @__PURE__ */ tt(), a = ya(), c = ss();
2913
+ var Hn;
2914
+ function ps() {
2915
+ return Hn || (Hn = 1, function(e) {
2916
+ var n = /* @__PURE__ */ us(), t = /* @__PURE__ */ tt(), a = ga(), l = fs();
2896
2917
  e.exports = function(r) {
2897
2918
  var o = a(arguments), i = r.length - (arguments.length - 1);
2898
2919
  return n(
@@ -2900,28 +2921,28 @@ function ls() {
2900
2921
  1 + (i > 0 ? i : 0),
2901
2922
  !0
2902
2923
  );
2903
- }, t ? t(e.exports, "apply", { value: c }) : e.exports.apply = c;
2904
- }(Qt)), Qt.exports;
2924
+ }, t ? t(e.exports, "apply", { value: l }) : e.exports.apply = l;
2925
+ }(Kt)), Kt.exports;
2905
2926
  }
2906
- var er, Hn;
2907
- function cs() {
2908
- if (Hn) return er;
2909
- Hn = 1;
2910
- var e = /* @__PURE__ */ $r(), n = ls(), t = n(e("String.prototype.indexOf"));
2911
- return er = function(c, s) {
2912
- var r = e(c, !!s);
2913
- return typeof r == "function" && t(c, ".prototype.") > -1 ? n(r) : r;
2914
- }, er;
2915
- }
2916
- const us = {}, fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2917
- __proto__: null,
2918
- default: us
2919
- }, Symbol.toStringTag, { value: "Module" })), ps = /* @__PURE__ */ lo(fs);
2920
2927
  var tr, Mn;
2921
2928
  function ds() {
2922
2929
  if (Mn) return tr;
2923
2930
  Mn = 1;
2924
- var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, a = e && Map.prototype.forEach, c = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = c && s && typeof s.get == "function" ? s.get : null, o = c && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, l = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, y = u ? WeakSet.prototype.has : null, g = typeof WeakRef == "function" && WeakRef.prototype, m = g ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, v = Object.prototype.toString, f = Function.prototype.toString, h = String.prototype.match, d = String.prototype.slice, j = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, E = Array.prototype.join, N = Array.prototype.slice, C = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, oe = 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, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(w) {
2931
+ var e = /* @__PURE__ */ jr(), n = ps(), t = n(e("String.prototype.indexOf"));
2932
+ return tr = function(l, s) {
2933
+ var r = e(l, !!s);
2934
+ return typeof r == "function" && t(l, ".prototype.") > -1 ? n(r) : r;
2935
+ }, tr;
2936
+ }
2937
+ const hs = {}, ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2938
+ __proto__: null,
2939
+ default: hs
2940
+ }, Symbol.toStringTag, { value: "Module" })), ms = /* @__PURE__ */ po(ys);
2941
+ var rr, zn;
2942
+ function gs() {
2943
+ if (zn) return rr;
2944
+ zn = 1;
2945
+ var e = typeof Map == "function" && Map.prototype, n = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = e && n && typeof n.get == "function" ? n.get : null, a = e && Map.prototype.forEach, l = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && l ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, r = l && s && typeof s.get == "function" ? s.get : null, o = l && Set.prototype.forEach, i = typeof WeakMap == "function" && WeakMap.prototype, c = i ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, y = u ? WeakSet.prototype.has : null, g = typeof WeakRef == "function" && WeakRef.prototype, m = g ? WeakRef.prototype.deref : null, x = Boolean.prototype.valueOf, v = Object.prototype.toString, f = Function.prototype.toString, h = String.prototype.match, d = String.prototype.slice, j = String.prototype.replace, T = String.prototype.toUpperCase, p = String.prototype.toLowerCase, O = RegExp.prototype.test, b = Array.prototype.concat, R = Array.prototype.join, N = Array.prototype.slice, C = Math.floor, L = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, P = Object.getOwnPropertySymbols, oe = 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, se = Object.prototype.propertyIsEnumerable, Z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(w) {
2925
2946
  return w.__proto__;
2926
2947
  } : null);
2927
2948
  function A(w, S) {
@@ -2937,21 +2958,21 @@ function ds() {
2937
2958
  }
2938
2959
  return j.call(S, X, "$&_");
2939
2960
  }
2940
- var re = ps, R = re.custom, k = _(R) ? R : null;
2941
- tr = function w(S, X, ee, ie) {
2961
+ var re = ms, E = re.custom, k = _(E) ? E : null;
2962
+ rr = function w(S, X, ee, ie) {
2942
2963
  var M = X || {};
2943
2964
  if (W(M, "quoteStyle") && M.quoteStyle !== "single" && M.quoteStyle !== "double")
2944
2965
  throw new TypeError('option "quoteStyle" must be "single" or "double"');
2945
2966
  if (W(M, "maxStringLength") && (typeof M.maxStringLength == "number" ? M.maxStringLength < 0 && M.maxStringLength !== 1 / 0 : M.maxStringLength !== null))
2946
2967
  throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
2947
- var ve = W(M, "customInspect") ? M.customInspect : !0;
2948
- if (typeof ve != "boolean" && ve !== "symbol")
2968
+ var be = W(M, "customInspect") ? M.customInspect : !0;
2969
+ if (typeof be != "boolean" && be !== "symbol")
2949
2970
  throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
2950
2971
  if (W(M, "indent") && M.indent !== null && M.indent !== " " && !(parseInt(M.indent, 10) === M.indent && M.indent > 0))
2951
2972
  throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
2952
2973
  if (W(M, "numericSeparator") && typeof M.numericSeparator != "boolean")
2953
2974
  throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
2954
- var Se = M.numericSeparator;
2975
+ var Oe = M.numericSeparator;
2955
2976
  if (typeof S > "u")
2956
2977
  return "undefined";
2957
2978
  if (S === null)
@@ -2959,96 +2980,96 @@ function ds() {
2959
2980
  if (typeof S == "boolean")
2960
2981
  return S ? "true" : "false";
2961
2982
  if (typeof S == "string")
2962
- return je(S, M);
2983
+ return Se(S, M);
2963
2984
  if (typeof S == "number") {
2964
2985
  if (S === 0)
2965
2986
  return 1 / 0 / S > 0 ? "0" : "-0";
2966
2987
  var de = String(S);
2967
- return Se ? A(S, de) : de;
2988
+ return Oe ? A(S, de) : de;
2968
2989
  }
2969
2990
  if (typeof S == "bigint") {
2970
- var be = String(S) + "n";
2971
- return Se ? A(S, be) : be;
2991
+ var xe = String(S) + "n";
2992
+ return Oe ? A(S, xe) : xe;
2972
2993
  }
2973
2994
  var at = typeof M.depth > "u" ? 5 : M.depth;
2974
2995
  if (typeof ee > "u" && (ee = 0), ee >= at && at > 0 && typeof S == "object")
2975
2996
  return U(S) ? "[Array]" : "[Object]";
2976
- var Ce = Sa(M, ee);
2997
+ var Re = Ta(M, ee);
2977
2998
  if (typeof ie > "u")
2978
2999
  ie = [];
2979
3000
  else if (he(ie, S) >= 0)
2980
3001
  return "[Circular]";
2981
- function me(Ee, We, Ta) {
2982
- if (We && (ie = N.call(ie), ie.push(We)), Ta) {
2983
- var Nr = {
3002
+ function me(Ee, We, qa) {
3003
+ if (We && (ie = N.call(ie), ie.push(We)), qa) {
3004
+ var Ir = {
2984
3005
  depth: M.depth
2985
3006
  };
2986
- return W(M, "quoteStyle") && (Nr.quoteStyle = M.quoteStyle), w(Ee, Nr, ee + 1, ie);
3007
+ return W(M, "quoteStyle") && (Ir.quoteStyle = M.quoteStyle), w(Ee, Ir, ee + 1, ie);
2987
3008
  }
2988
3009
  return w(Ee, M, ee + 1, ie);
2989
3010
  }
2990
3011
  if (typeof S == "function" && !z(S)) {
2991
- var Tr = ae(S), Pr = Me(S, me);
2992
- return "[Function" + (Tr ? ": " + Tr : " (anonymous)") + "]" + (Pr.length > 0 ? " { " + E.call(Pr, ", ") + " }" : "");
3012
+ var qr = ae(S), Cr = Me(S, me);
3013
+ return "[Function" + (qr ? ": " + qr : " (anonymous)") + "]" + (Cr.length > 0 ? " { " + R.call(Cr, ", ") + " }" : "");
2993
3014
  }
2994
3015
  if (_(S)) {
2995
- var qr = H ? j.call(String(S), /^(Symbol\(.*\))_[^)]*$/, "$1") : oe.call(S);
2996
- return typeof S == "object" && !H ? ke(qr) : qr;
3016
+ var Rr = H ? j.call(String(S), /^(Symbol\(.*\))_[^)]*$/, "$1") : oe.call(S);
3017
+ return typeof S == "object" && !H ? Ne(Rr) : Rr;
2997
3018
  }
2998
- if (qe(S)) {
2999
- for (var Ne = "<" + p.call(String(S.nodeName)), ot = S.attributes || [], ze = 0; ze < ot.length; ze++)
3000
- Ne += " " + ot[ze].name + "=" + F(q(ot[ze].value), "double", M);
3001
- return Ne += ">", S.childNodes && S.childNodes.length && (Ne += "..."), Ne += "</" + p.call(String(S.nodeName)) + ">", Ne;
3019
+ if (Ce(S)) {
3020
+ for (var Ae = "<" + p.call(String(S.nodeName)), ot = S.attributes || [], ze = 0; ze < ot.length; ze++)
3021
+ Ae += " " + ot[ze].name + "=" + F(q(ot[ze].value), "double", M);
3022
+ return Ae += ">", S.childNodes && S.childNodes.length && (Ae += "..."), Ae += "</" + p.call(String(S.nodeName)) + ">", Ae;
3002
3023
  }
3003
3024
  if (U(S)) {
3004
3025
  if (S.length === 0)
3005
3026
  return "[]";
3006
3027
  var it = Me(S, me);
3007
- return Ce && !ja(it) ? "[" + nt(it, Ce) + "]" : "[ " + E.call(it, ", ") + " ]";
3028
+ return Re && !Oa(it) ? "[" + nt(it, Re) + "]" : "[ " + R.call(it, ", ") + " ]";
3008
3029
  }
3009
3030
  if (K(S)) {
3010
3031
  var st = Me(S, me);
3011
- return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + E.call(b.call("[cause]: " + me(S.cause), st), ", ") + " }" : st.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + E.call(st, ", ") + " }";
3032
+ return !("cause" in Error.prototype) && "cause" in S && !se.call(S, "cause") ? "{ [" + String(S) + "] " + R.call(b.call("[cause]: " + me(S.cause), st), ", ") + " }" : st.length === 0 ? "[" + String(S) + "]" : "{ [" + String(S) + "] " + R.call(st, ", ") + " }";
3012
3033
  }
3013
- if (typeof S == "object" && ve) {
3034
+ if (typeof S == "object" && be) {
3014
3035
  if (k && typeof S[k] == "function" && re)
3015
3036
  return re(S, { depth: at - ee });
3016
- if (ve !== "symbol" && typeof S.inspect == "function")
3037
+ if (be !== "symbol" && typeof S.inspect == "function")
3017
3038
  return S.inspect();
3018
3039
  }
3019
- if ($e(S)) {
3020
- var Cr = [];
3040
+ if (we(S)) {
3041
+ var Er = [];
3021
3042
  return a && a.call(S, function(Ee, We) {
3022
- Cr.push(me(We, S, !0) + " => " + me(Ee, S));
3023
- }), Or("Map", t.call(S), Cr, Ce);
3043
+ Er.push(me(We, S, !0) + " => " + me(Ee, S));
3044
+ }), Pr("Map", t.call(S), Er, Re);
3024
3045
  }
3025
3046
  if (ye(S)) {
3026
- var Er = [];
3047
+ var kr = [];
3027
3048
  return o && o.call(S, function(Ee) {
3028
- Er.push(me(Ee, S));
3029
- }), Or("Set", r.call(S), Er, Ce);
3049
+ kr.push(me(Ee, S));
3050
+ }), Pr("Set", r.call(S), kr, Re);
3030
3051
  }
3031
- if (Te(S))
3032
- return rt("WeakMap");
3033
3052
  if (Pe(S))
3053
+ return rt("WeakMap");
3054
+ if (qe(S))
3034
3055
  return rt("WeakSet");
3035
- if (we(S))
3056
+ if (je(S))
3036
3057
  return rt("WeakRef");
3037
3058
  if (G(S))
3038
- return ke(me(Number(S)));
3059
+ return Ne(me(Number(S)));
3039
3060
  if (B(S))
3040
- return ke(me(L.call(S)));
3061
+ return Ne(me(L.call(S)));
3041
3062
  if (I(S))
3042
- return ke(x.call(S));
3063
+ return Ne(x.call(S));
3043
3064
  if (ne(S))
3044
- return ke(me(String(S)));
3065
+ return Ne(me(String(S)));
3045
3066
  if (typeof window < "u" && S === window)
3046
3067
  return "{ [object Window] }";
3047
3068
  if (typeof globalThis < "u" && S === globalThis || typeof Ke < "u" && S === Ke)
3048
3069
  return "{ [object globalThis] }";
3049
3070
  if (!J(S) && !z(S)) {
3050
- var lt = Me(S, me), Rr = Z ? Z(S) === Object.prototype : S instanceof Object || S.constructor === Object, ct = S instanceof Object ? "" : "null prototype", kr = !Rr && D && Object(S) === S && D in S ? d.call(Y(S), 8, -1) : ct ? "Object" : "", Oa = Rr || typeof S.constructor != "function" ? "" : S.constructor.name ? S.constructor.name + " " : "", ut = Oa + (kr || ct ? "[" + E.call(b.call([], kr || [], ct || []), ": ") + "] " : "");
3051
- return lt.length === 0 ? ut + "{}" : Ce ? ut + "{" + nt(lt, Ce) + "}" : ut + "{ " + E.call(lt, ", ") + " }";
3071
+ var lt = Me(S, me), Nr = Z ? Z(S) === Object.prototype : S instanceof Object || S.constructor === Object, ct = S instanceof Object ? "" : "null prototype", Ar = !Nr && D && Object(S) === S && D in S ? d.call(Y(S), 8, -1) : ct ? "Object" : "", Pa = Nr || typeof S.constructor != "function" ? "" : S.constructor.name ? S.constructor.name + " " : "", ut = Pa + (Ar || ct ? "[" + R.call(b.call([], Ar || [], ct || []), ": ") + "] " : "");
3072
+ return lt.length === 0 ? ut + "{}" : Re ? ut + "{" + nt(lt, Re) + "}" : ut + "{ " + R.call(lt, ", ") + " }";
3052
3073
  }
3053
3074
  return String(S);
3054
3075
  };
@@ -3125,7 +3146,7 @@ function ds() {
3125
3146
  return X;
3126
3147
  return -1;
3127
3148
  }
3128
- function $e(w) {
3149
+ function we(w) {
3129
3150
  if (!t || !w || typeof w != "object")
3130
3151
  return !1;
3131
3152
  try {
@@ -3140,11 +3161,11 @@ function ds() {
3140
3161
  }
3141
3162
  return !1;
3142
3163
  }
3143
- function Te(w) {
3144
- if (!l || !w || typeof w != "object")
3164
+ function Pe(w) {
3165
+ if (!c || !w || typeof w != "object")
3145
3166
  return !1;
3146
3167
  try {
3147
- l.call(w, l);
3168
+ c.call(w, c);
3148
3169
  try {
3149
3170
  y.call(w, y);
3150
3171
  } catch {
@@ -3155,7 +3176,7 @@ function ds() {
3155
3176
  }
3156
3177
  return !1;
3157
3178
  }
3158
- function we(w) {
3179
+ function je(w) {
3159
3180
  if (!m || !w || typeof w != "object")
3160
3181
  return !1;
3161
3182
  try {
@@ -3179,13 +3200,13 @@ function ds() {
3179
3200
  }
3180
3201
  return !1;
3181
3202
  }
3182
- function Pe(w) {
3203
+ function qe(w) {
3183
3204
  if (!y || !w || typeof w != "object")
3184
3205
  return !1;
3185
3206
  try {
3186
3207
  y.call(w, y);
3187
3208
  try {
3188
- l.call(w, l);
3209
+ c.call(w, c);
3189
3210
  } catch {
3190
3211
  return !0;
3191
3212
  }
@@ -3194,18 +3215,18 @@ function ds() {
3194
3215
  }
3195
3216
  return !1;
3196
3217
  }
3197
- function qe(w) {
3218
+ function Ce(w) {
3198
3219
  return !w || typeof w != "object" ? !1 : typeof HTMLElement < "u" && w instanceof HTMLElement ? !0 : typeof w.nodeName == "string" && typeof w.getAttribute == "function";
3199
3220
  }
3200
- function je(w, S) {
3221
+ function Se(w, S) {
3201
3222
  if (w.length > S.maxStringLength) {
3202
3223
  var X = w.length - S.maxStringLength, ee = "... " + X + " more character" + (X > 1 ? "s" : "");
3203
- return je(d.call(w, 0, S.maxStringLength), S) + ee;
3224
+ return Se(d.call(w, 0, S.maxStringLength), S) + ee;
3204
3225
  }
3205
- var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, wa);
3226
+ var ie = j.call(j.call(w, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Sa);
3206
3227
  return F(ie, "single", S);
3207
3228
  }
3208
- function wa(w) {
3229
+ function Sa(w) {
3209
3230
  var S = w.charCodeAt(0), X = {
3210
3231
  8: "b",
3211
3232
  9: "t",
@@ -3215,34 +3236,34 @@ function ds() {
3215
3236
  }[S];
3216
3237
  return X ? "\\" + X : "\\x" + (S < 16 ? "0" : "") + T.call(S.toString(16));
3217
3238
  }
3218
- function ke(w) {
3239
+ function Ne(w) {
3219
3240
  return "Object(" + w + ")";
3220
3241
  }
3221
3242
  function rt(w) {
3222
3243
  return w + " { ? }";
3223
3244
  }
3224
- function Or(w, S, X, ee) {
3225
- var ie = ee ? nt(X, ee) : E.call(X, ", ");
3245
+ function Pr(w, S, X, ee) {
3246
+ var ie = ee ? nt(X, ee) : R.call(X, ", ");
3226
3247
  return w + " (" + S + ") {" + ie + "}";
3227
3248
  }
3228
- function ja(w) {
3249
+ function Oa(w) {
3229
3250
  for (var S = 0; S < w.length; S++)
3230
3251
  if (he(w[S], `
3231
3252
  `) >= 0)
3232
3253
  return !1;
3233
3254
  return !0;
3234
3255
  }
3235
- function Sa(w, S) {
3256
+ function Ta(w, S) {
3236
3257
  var X;
3237
3258
  if (w.indent === " ")
3238
3259
  X = " ";
3239
3260
  else if (typeof w.indent == "number" && w.indent > 0)
3240
- X = E.call(Array(w.indent + 1), " ");
3261
+ X = R.call(Array(w.indent + 1), " ");
3241
3262
  else
3242
3263
  return null;
3243
3264
  return {
3244
3265
  base: X,
3245
- prev: E.call(Array(S + 1), X)
3266
+ prev: R.call(Array(S + 1), X)
3246
3267
  };
3247
3268
  }
3248
3269
  function nt(w, S) {
@@ -3250,7 +3271,7 @@ function ds() {
3250
3271
  return "";
3251
3272
  var X = `
3252
3273
  ` + S.prev + S.base;
3253
- return X + E.call(w, "," + X) + `
3274
+ return X + R.call(w, "," + X) + `
3254
3275
  ` + S.prev;
3255
3276
  }
3256
3277
  function Me(w, S) {
@@ -3260,26 +3281,26 @@ function ds() {
3260
3281
  for (var ie = 0; ie < w.length; ie++)
3261
3282
  ee[ie] = W(w, ie) ? S(w[ie], w) : "";
3262
3283
  }
3263
- var M = typeof P == "function" ? P(w) : [], ve;
3284
+ var M = typeof P == "function" ? P(w) : [], be;
3264
3285
  if (H) {
3265
- ve = {};
3266
- for (var Se = 0; Se < M.length; Se++)
3267
- ve["$" + M[Se]] = M[Se];
3286
+ be = {};
3287
+ for (var Oe = 0; Oe < M.length; Oe++)
3288
+ be["$" + M[Oe]] = M[Oe];
3268
3289
  }
3269
3290
  for (var de in w)
3270
- W(w, de) && (X && String(Number(de)) === de && de < w.length || H && ve["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(S(de, w) + ": " + S(w[de], w)) : ee.push(de + ": " + S(w[de], w))));
3291
+ W(w, de) && (X && String(Number(de)) === de && de < w.length || H && be["$" + de] instanceof Symbol || (O.call(/[^\w$]/, de) ? ee.push(S(de, w) + ": " + S(w[de], w)) : ee.push(de + ": " + S(w[de], w))));
3271
3292
  if (typeof P == "function")
3272
- for (var be = 0; be < M.length; be++)
3273
- se.call(w, M[be]) && ee.push("[" + S(M[be]) + "]: " + S(w[M[be]], w));
3293
+ for (var xe = 0; xe < M.length; xe++)
3294
+ se.call(w, M[xe]) && ee.push("[" + S(M[xe]) + "]: " + S(w[M[xe]], w));
3274
3295
  return ee;
3275
3296
  }
3276
- return tr;
3297
+ return rr;
3277
3298
  }
3278
- var rr, zn;
3279
- function hs() {
3280
- if (zn) return rr;
3281
- zn = 1;
3282
- var e = /* @__PURE__ */ $r(), n = cs(), t = /* @__PURE__ */ ds(), a = /* @__PURE__ */ Be(), c = e("%WeakMap%", !0), s = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), l = n("Map.prototype.get", !0), u = n("Map.prototype.set", !0), y = n("Map.prototype.has", !0), g = function(f, h) {
3299
+ var nr, Wn;
3300
+ function vs() {
3301
+ if (Wn) return nr;
3302
+ Wn = 1;
3303
+ var e = /* @__PURE__ */ jr(), n = ds(), t = /* @__PURE__ */ gs(), a = /* @__PURE__ */ Be(), l = e("%WeakMap%", !0), s = e("%Map%", !0), r = n("WeakMap.prototype.get", !0), o = n("WeakMap.prototype.set", !0), i = n("WeakMap.prototype.has", !0), c = n("Map.prototype.get", !0), u = n("Map.prototype.set", !0), y = n("Map.prototype.has", !0), g = function(f, h) {
3283
3304
  for (var d = f, j; (j = d.next) !== null; d = j)
3284
3305
  if (j.key === h)
3285
3306
  return d.next = j.next, j.next = /** @type {NonNullable<typeof list.next>} */
@@ -3299,24 +3320,24 @@ function hs() {
3299
3320
  }, v = function(f, h) {
3300
3321
  return !!g(f, h);
3301
3322
  };
3302
- return rr = function() {
3323
+ return nr = function() {
3303
3324
  var h, d, j, T = {
3304
3325
  assert: function(p) {
3305
3326
  if (!T.has(p))
3306
3327
  throw new a("Side channel does not contain " + t(p));
3307
3328
  },
3308
3329
  get: function(p) {
3309
- if (c && p && (typeof p == "object" || typeof p == "function")) {
3330
+ if (l && p && (typeof p == "object" || typeof p == "function")) {
3310
3331
  if (h)
3311
3332
  return r(h, p);
3312
3333
  } else if (s) {
3313
3334
  if (d)
3314
- return l(d, p);
3335
+ return c(d, p);
3315
3336
  } else if (j)
3316
3337
  return m(j, p);
3317
3338
  },
3318
3339
  has: function(p) {
3319
- if (c && p && (typeof p == "object" || typeof p == "function")) {
3340
+ if (l && p && (typeof p == "object" || typeof p == "function")) {
3320
3341
  if (h)
3321
3342
  return i(h, p);
3322
3343
  } else if (s) {
@@ -3327,21 +3348,21 @@ function hs() {
3327
3348
  return !1;
3328
3349
  },
3329
3350
  set: function(p, O) {
3330
- c && p && (typeof p == "object" || typeof p == "function") ? (h || (h = new c()), o(h, p, O)) : s ? (d || (d = new s()), u(d, p, O)) : (j || (j = { key: {}, next: null }), x(j, p, O));
3351
+ l && p && (typeof p == "object" || typeof p == "function") ? (h || (h = new l()), o(h, p, O)) : s ? (d || (d = new s()), u(d, p, O)) : (j || (j = { key: {}, next: null }), x(j, p, O));
3331
3352
  }
3332
3353
  };
3333
3354
  return T;
3334
- }, rr;
3355
+ }, nr;
3335
3356
  }
3336
- var nr, Wn;
3337
- function wr() {
3338
- if (Wn) return nr;
3339
- Wn = 1;
3357
+ var ar, Jn;
3358
+ function Sr() {
3359
+ if (Jn) return ar;
3360
+ Jn = 1;
3340
3361
  var e = String.prototype.replace, n = /%20/g, t = {
3341
3362
  RFC1738: "RFC1738",
3342
3363
  RFC3986: "RFC3986"
3343
3364
  };
3344
- return nr = {
3365
+ return ar = {
3345
3366
  default: t.RFC3986,
3346
3367
  formatters: {
3347
3368
  RFC1738: function(a) {
@@ -3353,17 +3374,17 @@ function wr() {
3353
3374
  },
3354
3375
  RFC1738: t.RFC1738,
3355
3376
  RFC3986: t.RFC3986
3356
- }, nr;
3377
+ }, ar;
3357
3378
  }
3358
- var ar, Jn;
3359
- function ma() {
3360
- if (Jn) return ar;
3361
- Jn = 1;
3362
- var e = /* @__PURE__ */ wr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = function() {
3379
+ var or, Gn;
3380
+ function va() {
3381
+ if (Gn) return or;
3382
+ Gn = 1;
3383
+ var e = /* @__PURE__ */ Sr(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = function() {
3363
3384
  for (var f = [], h = 0; h < 256; ++h)
3364
3385
  f.push("%" + ((h < 16 ? "0" : "") + h.toString(16)).toUpperCase());
3365
3386
  return f;
3366
- }(), c = function(h) {
3387
+ }(), l = function(h) {
3367
3388
  for (; h.length > 1; ) {
3368
3389
  var d = h.pop(), j = d.obj[d.prop];
3369
3390
  if (t(j)) {
@@ -3414,7 +3435,7 @@ function ma() {
3414
3435
  } catch {
3415
3436
  return j;
3416
3437
  }
3417
- }, l = 1024, u = function(h, d, j, T, p) {
3438
+ }, c = 1024, u = function(h, d, j, T, p) {
3418
3439
  if (h.length === 0)
3419
3440
  return h;
3420
3441
  var O = h;
@@ -3422,8 +3443,8 @@ function ma() {
3422
3443
  return escape(O).replace(/%u[0-9a-f]{4}/gi, function(oe) {
3423
3444
  return "%26%23" + parseInt(oe.slice(2), 16) + "%3B";
3424
3445
  });
3425
- for (var b = "", E = 0; E < O.length; E += l) {
3426
- for (var N = O.length >= l ? O.slice(E, E + l) : O, C = [], L = 0; L < N.length; ++L) {
3446
+ for (var b = "", R = 0; R < O.length; R += c) {
3447
+ for (var N = O.length >= c ? O.slice(R, R + c) : O, C = [], L = 0; L < N.length; ++L) {
3427
3448
  var P = N.charCodeAt(L);
3428
3449
  if (P === 45 || P === 46 || P === 95 || P === 126 || P >= 48 && P <= 57 || P >= 65 && P <= 90 || P >= 97 && P <= 122 || p === e.RFC1738 && (P === 40 || P === 41)) {
3429
3450
  C[C.length] = N.charAt(L);
@@ -3448,11 +3469,11 @@ function ma() {
3448
3469
  return b;
3449
3470
  }, y = function(h) {
3450
3471
  for (var d = [{ obj: { o: h }, prop: "o" }], j = [], T = 0; T < d.length; ++T)
3451
- for (var p = d[T], O = p.obj[p.prop], b = Object.keys(O), E = 0; E < b.length; ++E) {
3452
- var N = b[E], C = O[N];
3472
+ for (var p = d[T], O = p.obj[p.prop], b = Object.keys(O), R = 0; R < b.length; ++R) {
3473
+ var N = b[R], C = O[N];
3453
3474
  typeof C == "object" && C !== null && j.indexOf(C) === -1 && (d.push({ obj: O, prop: N }), j.push(C));
3454
3475
  }
3455
- return c(d), h;
3476
+ return l(d), h;
3456
3477
  }, g = function(h) {
3457
3478
  return Object.prototype.toString.call(h) === "[object RegExp]";
3458
3479
  }, m = function(h) {
@@ -3467,7 +3488,7 @@ function ma() {
3467
3488
  }
3468
3489
  return d(h);
3469
3490
  };
3470
- return ar = {
3491
+ return or = {
3471
3492
  arrayToObject: s,
3472
3493
  assign: o,
3473
3494
  combine: x,
@@ -3478,13 +3499,13 @@ function ma() {
3478
3499
  isRegExp: g,
3479
3500
  maybeMap: v,
3480
3501
  merge: r
3481
- }, ar;
3502
+ }, or;
3482
3503
  }
3483
- var or, Gn;
3484
- function ys() {
3485
- if (Gn) return or;
3486
- Gn = 1;
3487
- var e = hs(), n = /* @__PURE__ */ ma(), t = /* @__PURE__ */ wr(), a = Object.prototype.hasOwnProperty, c = {
3504
+ var ir, Vn;
3505
+ function bs() {
3506
+ if (Vn) return ir;
3507
+ Vn = 1;
3508
+ var e = vs(), n = /* @__PURE__ */ va(), t = /* @__PURE__ */ Sr(), a = Object.prototype.hasOwnProperty, l = {
3488
3509
  brackets: function(f) {
3489
3510
  return f + "[]";
3490
3511
  },
@@ -3497,7 +3518,7 @@ function ys() {
3497
3518
  }
3498
3519
  }, s = Array.isArray, r = Array.prototype.push, o = function(v, f) {
3499
3520
  r.apply(v, s(f) ? f : [f]);
3500
- }, i = Date.prototype.toISOString, l = t.default, u = {
3521
+ }, i = Date.prototype.toISOString, c = t.default, u = {
3501
3522
  addQueryPrefix: !1,
3502
3523
  allowDots: !1,
3503
3524
  allowEmptyArrays: !1,
@@ -3509,8 +3530,8 @@ function ys() {
3509
3530
  encodeDotInKeys: !1,
3510
3531
  encoder: n.encode,
3511
3532
  encodeValuesOnly: !1,
3512
- format: l,
3513
- formatter: t.formatters[l],
3533
+ format: c,
3534
+ formatter: t.formatters[c],
3514
3535
  // deprecated
3515
3536
  indices: !1,
3516
3537
  serializeDate: function(f) {
@@ -3520,27 +3541,27 @@ function ys() {
3520
3541
  strictNullHandling: !1
3521
3542
  }, y = function(f) {
3522
3543
  return typeof f == "string" || typeof f == "number" || typeof f == "boolean" || typeof f == "symbol" || typeof f == "bigint";
3523
- }, g = {}, m = function v(f, h, d, j, T, p, O, b, E, N, C, L, P, oe, H, D, se, Z) {
3524
- for (var A = f, re = Z, R = 0, k = !1; (re = re.get(g)) !== void 0 && !k; ) {
3544
+ }, g = {}, m = function v(f, h, d, j, T, p, O, b, R, N, C, L, P, oe, H, D, se, Z) {
3545
+ for (var A = f, re = Z, E = 0, k = !1; (re = re.get(g)) !== void 0 && !k; ) {
3525
3546
  var F = re.get(f);
3526
- if (R += 1, typeof F < "u") {
3527
- if (F === R)
3547
+ if (E += 1, typeof F < "u") {
3548
+ if (F === E)
3528
3549
  throw new RangeError("Cyclic object value");
3529
3550
  k = !0;
3530
3551
  }
3531
- typeof re.get(g) > "u" && (R = 0);
3552
+ typeof re.get(g) > "u" && (E = 0);
3532
3553
  }
3533
3554
  if (typeof N == "function" ? A = N(h, A) : A instanceof Date ? A = P(A) : d === "comma" && s(A) && (A = n.maybeMap(A, function(Y) {
3534
3555
  return Y instanceof Date ? P(Y) : Y;
3535
3556
  })), A === null) {
3536
3557
  if (p)
3537
- return E && !D ? E(h, u.encoder, se, "key", oe) : h;
3558
+ return R && !D ? R(h, u.encoder, se, "key", oe) : h;
3538
3559
  A = "";
3539
3560
  }
3540
3561
  if (y(A) || n.isBuffer(A)) {
3541
- if (E) {
3542
- var q = D ? h : E(h, u.encoder, se, "key", oe);
3543
- return [H(q) + "=" + H(E(A, u.encoder, se, "value", oe))];
3562
+ if (R) {
3563
+ var q = D ? h : R(h, u.encoder, se, "key", oe);
3564
+ return [H(q) + "=" + H(R(A, u.encoder, se, "value", oe))];
3544
3565
  }
3545
3566
  return [H(h) + "=" + H(String(A))];
3546
3567
  }
@@ -3549,7 +3570,7 @@ function ys() {
3549
3570
  return U;
3550
3571
  var J;
3551
3572
  if (d === "comma" && s(A))
3552
- D && E && (A = n.maybeMap(A, E)), J = [{ value: A.length > 0 ? A.join(",") || null : void 0 }];
3573
+ D && R && (A = n.maybeMap(A, R)), J = [{ value: A.length > 0 ? A.join(",") || null : void 0 }];
3553
3574
  else if (s(N))
3554
3575
  J = N;
3555
3576
  else {
@@ -3563,7 +3584,7 @@ function ys() {
3563
3584
  var I = J[G], _ = typeof I == "object" && typeof I.value < "u" ? I.value : A[I];
3564
3585
  if (!(O && _ === null)) {
3565
3586
  var B = L && b ? I.replace(/\./g, "%2E") : I, Q = s(A) ? typeof d == "function" ? d(ne, B) : ne : ne + (L ? "." + B : "[" + B + "]");
3566
- Z.set(f, R);
3587
+ Z.set(f, E);
3567
3588
  var W = e();
3568
3589
  W.set(g, Z), o(U, v(
3569
3590
  _,
@@ -3574,7 +3595,7 @@ function ys() {
3574
3595
  p,
3575
3596
  O,
3576
3597
  b,
3577
- d === "comma" && D && s(A) ? null : E,
3598
+ d === "comma" && D && s(A) ? null : R,
3578
3599
  N,
3579
3600
  C,
3580
3601
  L,
@@ -3609,7 +3630,7 @@ function ys() {
3609
3630
  var j = t.formatters[d], T = u.filter;
3610
3631
  (typeof f.filter == "function" || s(f.filter)) && (T = f.filter);
3611
3632
  var p;
3612
- if (f.arrayFormat in c ? p = f.arrayFormat : "indices" in f ? p = f.indices ? "indices" : "repeat" : p = u.arrayFormat, "commaRoundTrip" in f && typeof f.commaRoundTrip != "boolean")
3633
+ if (f.arrayFormat in l ? p = f.arrayFormat : "indices" in f ? p = f.indices ? "indices" : "repeat" : p = u.arrayFormat, "commaRoundTrip" in f && typeof f.commaRoundTrip != "boolean")
3613
3634
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
3614
3635
  var O = typeof f.allowDots > "u" ? f.encodeDotInKeys === !0 ? !0 : u.allowDots : !!f.allowDots;
3615
3636
  return {
@@ -3634,15 +3655,15 @@ function ys() {
3634
3655
  strictNullHandling: typeof f.strictNullHandling == "boolean" ? f.strictNullHandling : u.strictNullHandling
3635
3656
  };
3636
3657
  };
3637
- return or = function(v, f) {
3658
+ return ir = function(v, f) {
3638
3659
  var h = v, d = x(f), j, T;
3639
3660
  typeof d.filter == "function" ? (T = d.filter, h = T("", h)) : s(d.filter) && (T = d.filter, j = T);
3640
3661
  var p = [];
3641
3662
  if (typeof h != "object" || h === null)
3642
3663
  return "";
3643
- var O = c[d.arrayFormat], b = O === "comma" && d.commaRoundTrip;
3664
+ var O = l[d.arrayFormat], b = O === "comma" && d.commaRoundTrip;
3644
3665
  j || (j = Object.keys(h)), d.sort && j.sort(d.sort);
3645
- for (var E = e(), N = 0; N < j.length; ++N) {
3666
+ for (var R = e(), N = 0; N < j.length; ++N) {
3646
3667
  var C = j[N];
3647
3668
  d.skipNulls && h[C] === null || o(p, m(
3648
3669
  h[C],
@@ -3662,18 +3683,18 @@ function ys() {
3662
3683
  d.formatter,
3663
3684
  d.encodeValuesOnly,
3664
3685
  d.charset,
3665
- E
3686
+ R
3666
3687
  ));
3667
3688
  }
3668
3689
  var L = p.join(d.delimiter), P = d.addQueryPrefix === !0 ? "?" : "";
3669
3690
  return d.charsetSentinel && (d.charset === "iso-8859-1" ? P += "utf8=%26%2310003%3B&" : P += "utf8=%E2%9C%93&"), L.length > 0 ? P + L : "";
3670
- }, or;
3691
+ }, ir;
3671
3692
  }
3672
- var ir, Vn;
3673
- function ms() {
3674
- if (Vn) return ir;
3675
- Vn = 1;
3676
- var e = /* @__PURE__ */ ma(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = {
3693
+ var sr, Dn;
3694
+ function xs() {
3695
+ if (Dn) return sr;
3696
+ Dn = 1;
3697
+ var e = /* @__PURE__ */ va(), n = Object.prototype.hasOwnProperty, t = Array.isArray, a = {
3677
3698
  allowDots: !1,
3678
3699
  allowEmptyArrays: !1,
3679
3700
  allowPrototypes: !1,
@@ -3694,7 +3715,7 @@ function ms() {
3694
3715
  plainObjects: !1,
3695
3716
  strictDepth: !1,
3696
3717
  strictNullHandling: !1
3697
- }, c = function(g) {
3718
+ }, l = function(g) {
3698
3719
  return g.replace(/&#(\d+);/g, function(m, x) {
3699
3720
  return String.fromCharCode(parseInt(x, 10));
3700
3721
  });
@@ -3709,18 +3730,18 @@ function ms() {
3709
3730
  d[T].indexOf("utf8=") === 0 && (d[T] === o ? p = "utf-8" : d[T] === r && (p = "iso-8859-1"), j = T, T = d.length);
3710
3731
  for (T = 0; T < d.length; ++T)
3711
3732
  if (T !== j) {
3712
- var O = d[T], b = O.indexOf("]="), E = b === -1 ? O.indexOf("=") : b + 1, N, C;
3713
- E === -1 ? (N = x.decoder(O, a.decoder, p, "key"), C = x.strictNullHandling ? null : "") : (N = x.decoder(O.slice(0, E), a.decoder, p, "key"), C = e.maybeMap(
3714
- s(O.slice(E + 1), x),
3733
+ var O = d[T], b = O.indexOf("]="), R = b === -1 ? O.indexOf("=") : b + 1, N, C;
3734
+ R === -1 ? (N = x.decoder(O, a.decoder, p, "key"), C = x.strictNullHandling ? null : "") : (N = x.decoder(O.slice(0, R), a.decoder, p, "key"), C = e.maybeMap(
3735
+ s(O.slice(R + 1), x),
3715
3736
  function(P) {
3716
3737
  return x.decoder(P, a.decoder, p, "value");
3717
3738
  }
3718
- )), C && x.interpretNumericEntities && p === "iso-8859-1" && (C = c(C)), O.indexOf("[]=") > -1 && (C = t(C) ? [C] : C);
3739
+ )), C && x.interpretNumericEntities && p === "iso-8859-1" && (C = l(C)), O.indexOf("[]=") > -1 && (C = t(C) ? [C] : C);
3719
3740
  var L = n.call(v, N);
3720
3741
  L && x.duplicates === "combine" ? v[N] = e.combine(v[N], C) : (!L || x.duplicates === "last") && (v[N] = C);
3721
3742
  }
3722
3743
  return v;
3723
- }, l = function(g, m, x, v) {
3744
+ }, c = function(g, m, x, v) {
3724
3745
  for (var f = v ? m : s(m, x), h = g.length - 1; h >= 0; --h) {
3725
3746
  var d, j = g[h];
3726
3747
  if (j === "[]" && x.parseArrays)
@@ -3751,7 +3772,7 @@ function ms() {
3751
3772
  throw new RangeError("Input depth exceeded depth option of " + v.depth + " and strictDepth is true");
3752
3773
  O.push("[" + h.slice(T.index) + "]");
3753
3774
  }
3754
- return l(O, x, v, f);
3775
+ return c(O, x, v, f);
3755
3776
  }
3756
3777
  }, y = function(m) {
3757
3778
  if (!m)
@@ -3792,7 +3813,7 @@ function ms() {
3792
3813
  strictNullHandling: typeof m.strictNullHandling == "boolean" ? m.strictNullHandling : a.strictNullHandling
3793
3814
  };
3794
3815
  };
3795
- return ir = function(g, m) {
3816
+ return sr = function(g, m) {
3796
3817
  var x = y(m);
3797
3818
  if (g === "" || g === null || typeof g > "u")
3798
3819
  return x.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
@@ -3801,28 +3822,28 @@ function ms() {
3801
3822
  f = e.merge(f, T, x);
3802
3823
  }
3803
3824
  return x.allowSparse === !0 ? f : e.compact(f);
3804
- }, ir;
3825
+ }, sr;
3805
3826
  }
3806
- var sr, Dn;
3807
- function ga() {
3808
- if (Dn) return sr;
3809
- Dn = 1;
3810
- var e = /* @__PURE__ */ ys(), n = /* @__PURE__ */ ms(), t = /* @__PURE__ */ wr();
3811
- return sr = {
3827
+ var lr, Qn;
3828
+ function ba() {
3829
+ if (Qn) return lr;
3830
+ Qn = 1;
3831
+ var e = /* @__PURE__ */ bs(), n = /* @__PURE__ */ xs(), t = /* @__PURE__ */ Sr();
3832
+ return lr = {
3812
3833
  formats: t,
3813
3834
  parse: n,
3814
3835
  stringify: e
3815
- }, sr;
3836
+ }, lr;
3816
3837
  }
3817
- var Qn;
3818
- function gs() {
3819
- if (Qn) return Oe;
3820
- Qn = 1;
3821
- var e = Ui();
3838
+ var Kn;
3839
+ function $s() {
3840
+ if (Kn) return Te;
3841
+ Kn = 1;
3842
+ var e = Bi();
3822
3843
  function n() {
3823
3844
  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;
3824
3845
  }
3825
- var t = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, c = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, s = [
3846
+ var t = /^([a-z0-9.+-]+:)/i, a = /:[0-9]*$/, l = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, s = [
3826
3847
  "<",
3827
3848
  ">",
3828
3849
  '"',
@@ -3845,7 +3866,7 @@ function gs() {
3845
3866
  "?",
3846
3867
  ";",
3847
3868
  "#"
3848
- ].concat(o), l = [
3869
+ ].concat(o), c = [
3849
3870
  "/",
3850
3871
  "?",
3851
3872
  "#"
@@ -3866,21 +3887,21 @@ function gs() {
3866
3887
  "ftp:": !0,
3867
3888
  "gopher:": !0,
3868
3889
  "file:": !0
3869
- }, f = /* @__PURE__ */ ga();
3890
+ }, f = /* @__PURE__ */ ba();
3870
3891
  function h(p, O, b) {
3871
3892
  if (p && typeof p == "object" && p instanceof n)
3872
3893
  return p;
3873
- var E = new n();
3874
- return E.parse(p, O, b), E;
3894
+ var R = new n();
3895
+ return R.parse(p, O, b), R;
3875
3896
  }
3876
3897
  n.prototype.parse = function(p, O, b) {
3877
3898
  if (typeof p != "string")
3878
3899
  throw new TypeError("Parameter 'url' must be a string, not " + typeof p);
3879
- var E = p.indexOf("?"), N = E !== -1 && E < p.indexOf("#") ? "?" : "#", C = p.split(N), L = /\\/g;
3900
+ var R = p.indexOf("?"), N = R !== -1 && R < p.indexOf("#") ? "?" : "#", C = p.split(N), L = /\\/g;
3880
3901
  C[0] = C[0].replace(L, "/"), p = C.join(N);
3881
3902
  var P = p;
3882
3903
  if (P = P.trim(), !b && p.split("#").length === 1) {
3883
- var oe = c.exec(P);
3904
+ var oe = l.exec(P);
3884
3905
  if (oe)
3885
3906
  return this.path = P, this.href = P, this.pathname = oe[1], oe[2] ? (this.search = oe[2], O ? this.query = f.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : O && (this.search = "", this.query = {}), this;
3886
3907
  }
@@ -3895,12 +3916,12 @@ function gs() {
3895
3916
  se && !(H && x[H]) && (P = P.substr(2), this.slashes = !0);
3896
3917
  }
3897
3918
  if (!x[H] && (se || H && !v[H])) {
3898
- for (var Z = -1, A = 0; A < l.length; A++) {
3899
- var re = P.indexOf(l[A]);
3919
+ for (var Z = -1, A = 0; A < c.length; A++) {
3920
+ var re = P.indexOf(c[A]);
3900
3921
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
3901
3922
  }
3902
- var R, k;
3903
- Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (R = P.slice(0, k), P = P.slice(k + 1), this.auth = decodeURIComponent(R)), Z = -1;
3923
+ var E, k;
3924
+ Z === -1 ? k = P.lastIndexOf("@") : k = P.lastIndexOf("@", Z), k !== -1 && (E = P.slice(0, k), P = P.slice(k + 1), this.auth = decodeURIComponent(E)), Z = -1;
3904
3925
  for (var A = 0; A < i.length; A++) {
3905
3926
  var re = P.indexOf(i[A]);
3906
3927
  re !== -1 && (Z === -1 || re < Z) && (Z = re);
@@ -3936,8 +3957,8 @@ function gs() {
3936
3957
  ae !== -1 && (this.hash = P.substr(ae), P = P.slice(0, ae));
3937
3958
  var he = P.indexOf("?");
3938
3959
  if (he !== -1 ? (this.search = P.substr(he), this.query = P.substr(he + 1), O && (this.query = f.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) {
3939
- var B = this.pathname || "", $e = this.search || "";
3940
- this.path = B + $e;
3960
+ var B = this.pathname || "", we = this.search || "";
3961
+ this.path = B + we;
3941
3962
  }
3942
3963
  return this.href = this.format(), this;
3943
3964
  };
@@ -3947,15 +3968,15 @@ function gs() {
3947
3968
  n.prototype.format = function() {
3948
3969
  var p = this.auth || "";
3949
3970
  p && (p = encodeURIComponent(p), p = p.replace(/%3A/i, ":"), p += "@");
3950
- var O = this.protocol || "", b = this.pathname || "", E = this.hash || "", N = !1, C = "";
3971
+ var O = this.protocol || "", b = this.pathname || "", R = this.hash || "", N = !1, C = "";
3951
3972
  this.host ? N = p + this.host : this.hostname && (N = p + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"), this.port && (N += ":" + this.port)), this.query && typeof this.query == "object" && Object.keys(this.query).length && (C = f.stringify(this.query, {
3952
3973
  arrayFormat: "repeat",
3953
3974
  addQueryPrefix: !1
3954
3975
  }));
3955
3976
  var L = this.search || C && "?" + C || "";
3956
- return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || v[O]) && N !== !1 ? (N = "//" + (N || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : N || (N = ""), E && E.charAt(0) !== "#" && (E = "#" + E), L && L.charAt(0) !== "?" && (L = "?" + L), b = b.replace(/[?#]/g, function(P) {
3977
+ return O && O.substr(-1) !== ":" && (O += ":"), this.slashes || (!O || v[O]) && N !== !1 ? (N = "//" + (N || ""), b && b.charAt(0) !== "/" && (b = "/" + b)) : N || (N = ""), R && R.charAt(0) !== "#" && (R = "#" + R), L && L.charAt(0) !== "?" && (L = "?" + L), b = b.replace(/[?#]/g, function(P) {
3957
3978
  return encodeURIComponent(P);
3958
- }), L = L.replace("#", "%23"), O + N + b + L + E;
3979
+ }), L = L.replace("#", "%23"), O + N + b + L + R;
3959
3980
  };
3960
3981
  function j(p, O) {
3961
3982
  return h(p, !1, !0).resolve(O);
@@ -3971,8 +3992,8 @@ function gs() {
3971
3992
  var O = new n();
3972
3993
  O.parse(p, !1, !0), p = O;
3973
3994
  }
3974
- for (var b = new n(), E = Object.keys(this), N = 0; N < E.length; N++) {
3975
- var C = E[N];
3995
+ for (var b = new n(), R = Object.keys(this), N = 0; N < R.length; N++) {
3996
+ var C = R[N];
3976
3997
  b[C] = this[C];
3977
3998
  }
3978
3999
  if (b.hash = p.hash, p.href === "")
@@ -4004,8 +4025,8 @@ function gs() {
4004
4025
  }
4005
4026
  return b.slashes = b.slashes || p.slashes, b.href = b.format(), b;
4006
4027
  }
4007
- var re = b.pathname && b.pathname.charAt(0) === "/", R = p.host || p.pathname && p.pathname.charAt(0) === "/", k = R || re || b.host && p.pathname, F = k, q = b.pathname && b.pathname.split("/") || [], U = p.pathname && p.pathname.split("/") || [], J = b.protocol && !v[b.protocol];
4008
- if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (U[0] === "" ? U[0] = p.host : U.unshift(p.host)), p.host = null), k = k && (U[0] === "" || q[0] === "")), R)
4028
+ var re = b.pathname && b.pathname.charAt(0) === "/", E = p.host || p.pathname && p.pathname.charAt(0) === "/", k = E || re || b.host && p.pathname, F = k, q = b.pathname && b.pathname.split("/") || [], U = p.pathname && p.pathname.split("/") || [], J = b.protocol && !v[b.protocol];
4029
+ if (J && (b.hostname = "", b.port = null, b.host && (q[0] === "" ? q[0] = b.host : q.unshift(b.host)), b.host = "", p.protocol && (p.hostname = null, p.port = null, p.host && (U[0] === "" ? U[0] = p.host : U.unshift(p.host)), p.host = null), k = k && (U[0] === "" || q[0] === "")), E)
4009
4030
  b.host = p.host || p.host === "" ? p.host : b.host, b.hostname = p.hostname || p.hostname === "" ? p.hostname : b.hostname, b.search = p.search, b.query = p.query, q = U;
4010
4031
  else if (U.length)
4011
4032
  q || (q = []), q.pop(), q = q.concat(U), b.search = p.search, b.query = p.query;
@@ -4035,14 +4056,14 @@ function gs() {
4035
4056
  }, n.prototype.parseHost = function() {
4036
4057
  var p = this.host, O = a.exec(p);
4037
4058
  O && (O = O[0], O !== ":" && (this.port = O.substr(1)), p = p.substr(0, p.length - O.length)), p && (this.hostname = p);
4038
- }, Oe.parse = h, Oe.resolve = j, Oe.resolveObject = T, Oe.format = d, Oe.Url = n, Oe;
4059
+ }, Te.parse = h, Te.resolve = j, Te.resolveObject = T, Te.format = d, Te.Url = n, Te;
4039
4060
  }
4040
- var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), bs = class {
4061
+ var cr = $s(), ur = /* @__PURE__ */ ba(), ws = (e) => typeof e == "object" && "log" in e && typeof e.log == "object" && "entries" in e.log && Array.isArray(e.log.entries), js = class {
4041
4062
  constructor(e, n = {}) {
4042
4063
  this.initCalled = !1, this.entries = [], this.requests = [], this.options = {}, this.options = {
4043
4064
  harIsAlreadyEncoded: !1,
4044
4065
  ...n
4045
- }, this.requests = [], vs(e) ? this.entries = e.log.entries : this.entries = [
4066
+ }, this.requests = [], ws(e) ? this.entries = e.log.entries : this.entries = [
4046
4067
  {
4047
4068
  request: e
4048
4069
  }
@@ -4077,7 +4098,7 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
4077
4098
  cookiesObj: {},
4078
4099
  allHeaders: {}
4079
4100
  };
4080
- if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(_r, {})), t.headers && t.headers.length) {
4101
+ if (t.queryString && t.queryString.length && (t.queryObj = t.queryString.reduce(Br, {})), t.headers && t.headers.length) {
4081
4102
  const m = /^HTTP\/2/;
4082
4103
  t.headersObj = t.headers.reduce((x, { name: v, value: f }) => {
4083
4104
  const h = m.exec(t.httpVersion) ? v.toLocaleLowerCase() : v;
@@ -4105,9 +4126,9 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
4105
4126
  `, f = (T) => T.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), h = (T) => T.replace(/\r?\n|\r/g, `\r
4106
4127
  `), d = [`--${m}`];
4107
4128
  (g = t.postData) == null || g.params.forEach((T, p) => {
4108
- const O = T.name, b = T.value || "", E = T.fileName || null, N = T.contentType || "application/octet-stream";
4109
- E ? (d.push(
4110
- `Content-Disposition: form-data; name="${f(h(O))}"; filename="${E}"`
4129
+ const O = T.name, b = T.value || "", R = T.fileName || null, N = T.contentType || "application/octet-stream";
4130
+ R ? (d.push(
4131
+ `Content-Disposition: form-data; name="${f(h(O))}"; filename="${R}"`
4111
4132
  ), d.push(`Content-Type: ${N}`)) : d.push(`Content-Disposition: form-data; name="${f(h(O))}"`), d.push(""), d.push(h(b)), p !== t.postData.params.length - 1 && d.push(`--${m}`);
4112
4133
  }), d.push(`--${x}`), t.postData.boundary = m, t.postData.text = d.join(v);
4113
4134
  const j = fe(t.headersObj, "content-type") || "content-type";
@@ -4115,7 +4136,7 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
4115
4136
  }
4116
4137
  break;
4117
4138
  case "application/x-www-form-urlencoded":
4118
- t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(_r, {}), t.postData.text = cr.stringify(t.postData.paramsObj)) : t.postData.text = "";
4139
+ t.postData.params ? (t.postData.paramsObj = t.postData.params.reduce(Br, {}), t.postData.text = ur.stringify(t.postData.paramsObj)) : t.postData.text = "";
4119
4140
  break;
4120
4141
  case "text/json":
4121
4142
  case "text/x-json":
@@ -4129,19 +4150,19 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
4129
4150
  }
4130
4151
  break;
4131
4152
  }
4132
- const c = {
4153
+ const l = {
4133
4154
  ...t.allHeaders,
4134
4155
  ...t.headersObj
4135
- }, s = lr.parse(t.url, !0, !0);
4156
+ }, s = cr.parse(t.url, !0, !0);
4136
4157
  t.queryObj = {
4137
4158
  ...t.queryObj,
4138
4159
  ...s.query
4139
4160
  };
4140
4161
  let r;
4141
- n.harIsAlreadyEncoded ? r = cr.stringify(t.queryObj, {
4162
+ n.harIsAlreadyEncoded ? r = ur.stringify(t.queryObj, {
4142
4163
  encode: !1,
4143
4164
  indices: !1
4144
- }) : r = cr.stringify(t.queryObj, {
4165
+ }) : r = ur.stringify(t.queryObj, {
4145
4166
  indices: !1
4146
4167
  });
4147
4168
  const o = {
@@ -4149,62 +4170,62 @@ var lr = gs(), cr = /* @__PURE__ */ ga(), vs = (e) => typeof e == "object" && "l
4149
4170
  query: t.queryObj,
4150
4171
  search: r,
4151
4172
  path: r ? `${s.pathname}?${r}` : s.pathname
4152
- }, i = lr.format({
4173
+ }, i = cr.format({
4153
4174
  ...s,
4154
4175
  query: null,
4155
4176
  search: null
4156
- }), l = lr.format({
4177
+ }), c = cr.format({
4157
4178
  ...s,
4158
4179
  ...o
4159
4180
  });
4160
4181
  return {
4161
4182
  ...t,
4162
- allHeaders: c,
4163
- fullUrl: l,
4183
+ allHeaders: l,
4184
+ fullUrl: c,
4164
4185
  url: i,
4165
4186
  uriObj: o
4166
4187
  };
4167
4188
  }
4168
4189
  convert(e, n, t) {
4169
4190
  this.initCalled || this.init(), !t && n && (t = n);
4170
- const a = Ai[e];
4191
+ const a = Fi[e];
4171
4192
  if (!a)
4172
4193
  return !1;
4173
- const { convert: c } = a.clientsById[n || a.info.default];
4174
- return this.requests.map((r) => c(r, t));
4194
+ const { convert: l } = a.clientsById[n || a.info.default];
4195
+ return this.requests.map((r) => l(r, t));
4175
4196
  }
4176
4197
  };
4177
- const xs = ({
4198
+ const Ss = ({
4178
4199
  rootMargin: e = "0px",
4179
4200
  threshold: n,
4180
4201
  root: t
4181
4202
  } = {}) => {
4182
- const [a, c] = xe(!1), s = aa(null);
4183
- return gr(() => {
4203
+ const [a, l] = ve(!1), s = oa(null);
4204
+ return br(() => {
4184
4205
  const r = new IntersectionObserver(
4185
4206
  ([i]) => {
4186
- i && c(i.isIntersecting);
4207
+ i && l(i.isIntersecting);
4187
4208
  },
4188
4209
  { rootMargin: e, threshold: n, root: t }
4189
4210
  ), o = s.current;
4190
4211
  if (o)
4191
4212
  return r.observe(o), () => r.unobserve(o);
4192
4213
  }, [t, e, n]), [s, a];
4193
- }, $s = typeof window < "u" ? Ka : gr, va = ({
4214
+ }, Os = typeof window < "u" ? eo : br, xa = ({
4194
4215
  children: e,
4195
4216
  maxHeight: n = 250
4196
4217
  }) => {
4197
- const t = aa(null), [a, c] = xe(!1), [s, r] = xe(!1);
4198
- return $s(() => {
4218
+ const t = oa(null), [a, l] = ve(!1), [s, r] = ve(!1);
4219
+ return Os(() => {
4199
4220
  const o = t.current;
4200
4221
  if (!o) return;
4201
- c(o.scrollHeight > n);
4222
+ l(o.scrollHeight > n);
4202
4223
  const i = new ResizeObserver(() => {
4203
- c(o.scrollHeight > n);
4224
+ l(o.scrollHeight > n);
4204
4225
  });
4205
4226
  return i.observe(o), () => i.disconnect();
4206
4227
  }, [n]), /* @__PURE__ */ $.jsxs(
4207
- Zn,
4228
+ ea,
4208
4229
  {
4209
4230
  className: "group",
4210
4231
  open: s,
@@ -4212,7 +4233,7 @@ const xs = ({
4212
4233
  style: { "--max-height": `${n}px` },
4213
4234
  children: [
4214
4235
  /* @__PURE__ */ $.jsxs(
4215
- ea,
4236
+ ta,
4216
4237
  {
4217
4238
  forceMount: !0,
4218
4239
  className: pe(
@@ -4223,12 +4244,12 @@ const xs = ({
4223
4244
  !s && a && /* @__PURE__ */ $.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" }),
4224
4245
  /* @__PURE__ */ $.jsx("div", { ref: t, children: e }),
4225
4246
  !s && a && /* @__PURE__ */ $.jsx(
4226
- ur,
4247
+ fr,
4227
4248
  {
4228
4249
  className: "absolute inset-0 grid place-items-center z-10 cursor-pointer peer",
4229
4250
  asChild: !0,
4230
- children: /* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsxs(Ur, { variant: "outline", className: "hidden group-hover:flex", children: [
4231
- /* @__PURE__ */ $.jsx(Na, { size: 14, className: "mr-1.5" }),
4251
+ children: /* @__PURE__ */ $.jsx("div", { children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", className: "hidden group-hover:flex", children: [
4252
+ /* @__PURE__ */ $.jsx(La, { size: 14, className: "mr-1.5" }),
4232
4253
  "Click to expand"
4233
4254
  ] }) })
4234
4255
  }
@@ -4240,27 +4261,27 @@ const xs = ({
4240
4261
  "div",
4241
4262
  {
4242
4263
  className: pe("flex justify-center w-full mb-2", !s && "hidden"),
4243
- children: /* @__PURE__ */ $.jsx(ur, { asChild: !0, children: /* @__PURE__ */ $.jsxs(Ur, { variant: "outline", size: "sm", children: [
4264
+ children: /* @__PURE__ */ $.jsx(fr, { asChild: !0, children: /* @__PURE__ */ $.jsxs(Lr, { variant: "outline", size: "sm", children: [
4244
4265
  "Collapse",
4245
- /* @__PURE__ */ $.jsx(Aa, { size: 14, className: "ml-1.5" })
4266
+ /* @__PURE__ */ $.jsx(Fa, { size: 14, className: "ml-1.5" })
4246
4267
  ] }) })
4247
4268
  }
4248
4269
  )
4249
4270
  ]
4250
4271
  }
4251
4272
  );
4252
- }, ws = ({
4273
+ }, Ts = ({
4253
4274
  server: e,
4254
4275
  servers: n,
4255
4276
  operation: t,
4256
4277
  examples: a
4257
4278
  }) => {
4258
4279
  var g, m, x;
4259
- const { isAuthEnabled: c, login: s, signup: r, isPending: o, isAuthenticated: i } = co(), l = (g = t.parameters) == null ? void 0 : g.filter((v) => v.in === "header").sort((v, f) => v.required && !f.required ? -1 : 1).map((v) => {
4280
+ const { isAuthEnabled: l, login: s, signup: r, isPending: o, isAuthenticated: i } = ho(), c = (g = t.parameters) == null ? void 0 : g.filter((v) => v.in === "header").sort((v, f) => v.required && !f.required ? -1 : 1).map((v) => {
4260
4281
  var f, h, d, j, T, p, O, b;
4261
4282
  return {
4262
4283
  name: v.name,
4263
- defaultValue: ((f = v.schema) == null ? void 0 : f.default) ?? ((d = (h = v.examples) == null ? void 0 : h.find((E) => E.value)) == null ? void 0 : d.value) ?? "",
4284
+ defaultValue: ((f = v.schema) == null ? void 0 : f.default) ?? ((d = (h = v.examples) == null ? void 0 : h.find((R) => R.value)) == null ? void 0 : d.value) ?? "",
4264
4285
  defaultActive: v.required ?? !1,
4265
4286
  isRequired: v.required ?? !1,
4266
4287
  enum: ((j = v.schema) == null ? void 0 : j.type) == "array" ? (p = (T = v.schema) == null ? void 0 : T.items) == null ? void 0 : p.enum : (O = v.schema) == null ? void 0 : O.enum,
@@ -4277,28 +4298,28 @@ const xs = ({
4277
4298
  };
4278
4299
  }), y = (x = t.parameters) == null ? void 0 : x.filter((v) => v.in === "path").map((v) => ({ name: v.name }));
4279
4300
  return /* @__PURE__ */ $.jsx(
4280
- _a,
4301
+ za,
4281
4302
  {
4282
4303
  server: e,
4283
4304
  servers: n,
4284
4305
  method: t.method,
4285
4306
  url: t.path,
4286
- headers: l,
4307
+ headers: c,
4287
4308
  queryParams: u,
4288
4309
  pathParams: y,
4289
4310
  examples: a,
4290
- requiresLogin: c && !i && !o,
4311
+ requiresLogin: l && !i && !o,
4291
4312
  onLogin: () => s(),
4292
4313
  onSignUp: () => r()
4293
4314
  }
4294
4315
  );
4295
- }, jr = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
4316
+ }, Or = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
4296
4317
  "div",
4297
4318
  {
4298
4319
  className: pe("rounded-xl overflow-hidden border border-border", n),
4299
4320
  children: e
4300
4321
  }
4301
- ), Sr = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
4322
+ ), Tr = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx(
4302
4323
  "div",
4303
4324
  {
4304
4325
  className: pe(
@@ -4307,7 +4328,7 @@ const xs = ({
4307
4328
  ),
4308
4329
  children: e
4309
4330
  }
4310
- ), ba = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("bg-card overflow-auto p-2", n), children: e }), xa = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("border-t bg-muted dark:bg-transparent p-3", n), children: e }), Ue = (e, n) => {
4331
+ ), $a = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("bg-card overflow-auto p-2", n), children: e }), wa = ({ children: e, className: n }) => /* @__PURE__ */ $.jsx("div", { className: pe("border-t bg-muted dark:bg-transparent p-3", n), children: e }), $e = (e, n) => {
4311
4332
  if (e.example !== void 0)
4312
4333
  return e.example;
4313
4334
  if (e.examples && typeof e.examples == "object" && "default" in e.examples) {
@@ -4315,18 +4336,47 @@ const xs = ({
4315
4336
  if (t !== null)
4316
4337
  return typeof t == "object" && "value" in t ? t.value : t;
4317
4338
  }
4339
+ if (e.const !== void 0)
4340
+ return e.const;
4318
4341
  if (e.type === "object" && e.properties) {
4319
4342
  const t = {};
4320
- for (const [a, c] of Object.entries(e.properties))
4321
- typeof c == "object" && (t[a] = Ue(c, a));
4343
+ for (const [a, l] of Object.entries(e.properties))
4344
+ typeof l == "object" && (t[a] = $e(l, a));
4322
4345
  return t;
4323
4346
  }
4324
4347
  if (e.type === "array")
4325
4348
  return Array.isArray(e.items) ? e.items.map(
4326
- (t) => Ue(t)
4327
- ) : e.items ? [Ue(e.items)] : [];
4349
+ (t) => $e(t)
4350
+ ) : e.items ? [$e(e.items)] : [];
4351
+ if (e.format !== void 0)
4352
+ switch (e.format) {
4353
+ case "date-time":
4354
+ return "2024-08-25T15:00:00Z";
4355
+ case "date":
4356
+ return "2024-08-25";
4357
+ case "time":
4358
+ return "15:00:00";
4359
+ case "email":
4360
+ return "test@example.com";
4361
+ case "uri":
4362
+ return "https://www.example.com/path/to/resource";
4363
+ case "uri-reference":
4364
+ return "/path/to/resource";
4365
+ case "uuid":
4366
+ return "00000000-0000-0000-0000-000000000000";
4367
+ }
4328
4368
  if (e.enum)
4329
4369
  return e.enum[0];
4370
+ if (e.oneOf) {
4371
+ const t = Math.floor(Math.random() * e.oneOf.length);
4372
+ return $e(e.oneOf[t]);
4373
+ }
4374
+ if (e.anyOf) {
4375
+ const t = Math.floor(Math.random() * e.anyOf.length);
4376
+ return $e(e.anyOf[t]);
4377
+ }
4378
+ if (e.allOf)
4379
+ return e.allOf.reduce((t, a) => ({ ...t, ...$e(a) }), {});
4330
4380
  switch (e.type) {
4331
4381
  case "string":
4332
4382
  return n || "string";
@@ -4343,42 +4393,42 @@ const xs = ({
4343
4393
  default:
4344
4394
  return {};
4345
4395
  }
4346
- }, js = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), Ss = (e) => e ? {
4396
+ }, Ps = (e) => e == null ? "No example" : typeof e == "string" ? e.trim() : JSON.stringify(e, null, 2), qs = (e) => e ? {
4347
4397
  "application/json": "json",
4348
4398
  "application/xml": "xml",
4349
4399
  "application/x-yaml": "yaml",
4350
4400
  "text/csv": "csv",
4351
4401
  "application/javascript": "javascript",
4352
4402
  "application/graphql": "graphql"
4353
- }[e] ?? "plain" : "plain", $a = ({
4403
+ }[e] ?? "plain" : "plain", ja = ({
4354
4404
  content: e,
4355
4405
  description: n,
4356
4406
  onExampleChange: t
4357
4407
  }) => {
4358
4408
  var m;
4359
- const [a, c] = xe(0), [s, r] = xe(0), o = Array.isArray(e) && e.length === 1 ? e[0] : e[a], i = (o == null ? void 0 : o.examples) ?? [], l = i[s], u = oa(() => {
4360
- if (l)
4361
- return "value" in l ? l.value : l;
4409
+ const [a, l] = ve(0), [s, r] = ve(0), o = Array.isArray(e) && e.length === 1 ? e[0] : e[a], i = (o == null ? void 0 : o.examples) ?? [], c = i[s], u = ia(() => {
4410
+ if (c)
4411
+ return "value" in c ? c.value : c;
4362
4412
  if (o != null && o.schema)
4363
- return Ue(o.schema);
4364
- }, [l, o == null ? void 0 : o.schema]);
4365
- gr(() => {
4413
+ return $e(o.schema);
4414
+ }, [c, o == null ? void 0 : o.schema]);
4415
+ br(() => {
4366
4416
  u && (t == null || t(u));
4367
4417
  }, [u, t]);
4368
- const y = js(u), g = Ss(o == null ? void 0 : o.mediaType);
4418
+ const y = Ps(u), g = qs(o == null ? void 0 : o.mediaType);
4369
4419
  return /* @__PURE__ */ $.jsxs($.Fragment, { children: [
4370
- /* @__PURE__ */ $.jsxs(ba, { className: "p-0", children: [
4371
- l != null && l.externalValue ? /* @__PURE__ */ $.jsx("div", { className: "p-2", children: /* @__PURE__ */ $.jsx(
4420
+ /* @__PURE__ */ $.jsxs($a, { className: "p-0", children: [
4421
+ c != null && c.externalValue ? /* @__PURE__ */ $.jsx("div", { className: "p-2", children: /* @__PURE__ */ $.jsx(
4372
4422
  "a",
4373
4423
  {
4374
- href: l.externalValue,
4424
+ href: c.externalValue,
4375
4425
  target: "_blank",
4376
4426
  rel: "noopener noreferrer",
4377
4427
  className: "text-xs text-primary hover:underline",
4378
4428
  children: "View External Example →"
4379
4429
  }
4380
- ) }) : /* @__PURE__ */ $.jsx(va, { children: /* @__PURE__ */ $.jsx(
4381
- ia,
4430
+ ) }) : /* @__PURE__ */ $.jsx(xa, { children: /* @__PURE__ */ $.jsx(
4431
+ la,
4382
4432
  {
4383
4433
  language: g,
4384
4434
  noBackground: !0,
@@ -4386,9 +4436,9 @@ const xs = ({
4386
4436
  code: y
4387
4437
  }
4388
4438
  ) }),
4389
- (l == null ? void 0 : l.description) && /* @__PURE__ */ $.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: l.description })
4439
+ (c == null ? void 0 : c.description) && /* @__PURE__ */ $.jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: c.description })
4390
4440
  ] }),
4391
- /* @__PURE__ */ $.jsxs(xa, { className: "text-xs p-0 divide-y divide-border", children: [
4441
+ /* @__PURE__ */ $.jsxs(wa, { className: "text-xs p-0 divide-y divide-border", children: [
4392
4442
  n && /* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: n }),
4393
4443
  (i.length !== 0 || e.length !== 0) && /* @__PURE__ */ $.jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [
4394
4444
  /* @__PURE__ */ $.jsx("div", { className: "flex items-center gap-2 min-w-0", children: e.length > 1 ? /* @__PURE__ */ $.jsx(
@@ -4396,7 +4446,7 @@ const xs = ({
4396
4446
  {
4397
4447
  className: "max-w-[200px]",
4398
4448
  value: a.toString(),
4399
- onChange: (x) => c(Number(x.target.value)),
4449
+ onChange: (x) => l(Number(x.target.value)),
4400
4450
  options: e.map((x, v) => ({
4401
4451
  value: v.toString(),
4402
4452
  label: x.mediaType
@@ -4418,52 +4468,52 @@ const xs = ({
4418
4468
  ] })
4419
4469
  ] })
4420
4470
  ] });
4421
- }, Os = ({
4471
+ }, Cs = ({
4422
4472
  content: e,
4423
4473
  onExampleChange: n
4424
- }) => e.length === 0 ? null : /* @__PURE__ */ $.jsxs(jr, { children: [
4425
- /* @__PURE__ */ $.jsx(Sr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
4426
- /* @__PURE__ */ $.jsx($a, { content: e, onExampleChange: n })
4427
- ] }), Ts = ({ response: e }) => /* @__PURE__ */ $.jsx(Ge.Content, { value: e.statusCode, children: /* @__PURE__ */ $.jsx(
4428
- $a,
4474
+ }) => e.length === 0 ? null : /* @__PURE__ */ $.jsxs(Or, { children: [
4475
+ /* @__PURE__ */ $.jsx(Tr, { className: "text-xs flex justify-between items-center", children: /* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Request Body Example" }) }),
4476
+ /* @__PURE__ */ $.jsx(ja, { content: e, onExampleChange: n })
4477
+ ] }), Rs = ({ response: e }) => /* @__PURE__ */ $.jsx(Ge.Content, { value: e.statusCode, children: /* @__PURE__ */ $.jsx(
4478
+ ja,
4429
4479
  {
4430
4480
  content: e.content ?? [],
4431
4481
  description: e.description ?? void 0
4432
4482
  }
4433
- ) }), Ps = ({
4483
+ ) }), Es = ({
4434
4484
  responses: e,
4435
4485
  selectedResponse: n,
4436
4486
  onSelectResponse: t
4437
4487
  }) => {
4438
4488
  var a;
4439
- return /* @__PURE__ */ $.jsx(jr, { children: /* @__PURE__ */ $.jsxs(
4489
+ return /* @__PURE__ */ $.jsx(Or, { children: /* @__PURE__ */ $.jsxs(
4440
4490
  Ge.Root,
4441
4491
  {
4442
4492
  defaultValue: (a = e[0]) == null ? void 0 : a.statusCode,
4443
4493
  value: n,
4444
- onValueChange: (c) => t(c),
4494
+ onValueChange: (l) => t(l),
4445
4495
  children: [
4446
- /* @__PURE__ */ $.jsxs(Sr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
4496
+ /* @__PURE__ */ $.jsxs(Tr, { className: "text-xs flex flex-col gap-2 pb-0", children: [
4447
4497
  /* @__PURE__ */ $.jsx("span", { className: "font-mono", children: "Example Responses" }),
4448
- /* @__PURE__ */ $.jsx(Ge.List, { className: "flex gap-2", children: e.map((c) => /* @__PURE__ */ $.jsx(
4498
+ /* @__PURE__ */ $.jsx(Ge.List, { className: "flex gap-2", children: e.map((l) => /* @__PURE__ */ $.jsx(
4449
4499
  Ge.Trigger,
4450
4500
  {
4451
- value: c.statusCode,
4501
+ value: l.statusCode,
4452
4502
  className: pe(
4453
4503
  "text-xs font-mono px-1.5 py-1 pb-px translate-y-px border-b-2 border-transparent rounded-t cursor-pointer",
4454
4504
  "data-[state=active]:text-primary data-[state=active]:dark:text-inherit data-[state=active]:border-primary",
4455
4505
  "hover:border-accent-foreground/25"
4456
4506
  ),
4457
- children: c.statusCode
4507
+ children: l.statusCode
4458
4508
  },
4459
- c.statusCode
4509
+ l.statusCode
4460
4510
  )) })
4461
4511
  ] }),
4462
- e.map((c) => /* @__PURE__ */ $.jsx(Ts, { response: c }, c.statusCode))
4512
+ e.map((l) => /* @__PURE__ */ $.jsx(Rs, { response: l }, l.statusCode))
4463
4513
  ]
4464
4514
  }
4465
4515
  ) });
4466
- }, qs = (e, n) => {
4516
+ }, ks = (e, n) => {
4467
4517
  let t;
4468
4518
  switch (n) {
4469
4519
  case "shell":
@@ -4504,7 +4554,7 @@ const xs = ({
4504
4554
  break;
4505
4555
  }
4506
4556
  return t ? t[0] : "";
4507
- }, Cs = _e(
4557
+ }, Ns = _e(
4508
4558
  /* GraphQL */
4509
4559
  `
4510
4560
  query getServerQuery($input: JSON!, $type: SchemaType!) {
@@ -4516,7 +4566,7 @@ const xs = ({
4516
4566
  }
4517
4567
  }
4518
4568
  `
4519
- ), Es = [
4569
+ ), As = [
4520
4570
  { value: "shell", label: "cURL" },
4521
4571
  { value: "js", label: "JavaScript" },
4522
4572
  { value: "python", label: "Python" },
@@ -4528,24 +4578,24 @@ const xs = ({
4528
4578
  { value: "php", label: "PHP" },
4529
4579
  { value: "ruby", label: "Ruby" },
4530
4580
  { value: "swift", label: "Swift" }
4531
- ], Rs = ({
4581
+ ], Is = ({
4532
4582
  operation: e,
4533
4583
  selectedResponse: n,
4534
4584
  onSelectResponse: t
4535
4585
  }) => {
4536
4586
  var N;
4537
- const { input: a, type: c, options: s } = vr(), r = Pa(), o = Qe(Cs, { input: a, type: c }), i = yr(o), l = uo(), u = ta(e.method), [y, g] = Ua(), [, m] = na(), [x, v] = xe(), f = y.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", h = (N = e.requestBody) == null ? void 0 : N.content, d = h && (s != null && s.transformExamples) ? s.transformExamples({
4587
+ const { input: a, type: l, options: s } = xr(), r = Ca(), o = Qe(Ns, { input: a, type: l }), i = gr(o), c = yo(), u = ra(e.method), [y, g] = Ba(), [, m] = aa(), [x, v] = ve(), f = y.get("lang") ?? (s == null ? void 0 : s.examplesLanguage) ?? "shell", h = (N = e.requestBody) == null ? void 0 : N.content, d = h && (s != null && s.transformExamples) ? s.transformExamples({
4538
4588
  auth: r,
4539
4589
  type: "request",
4540
4590
  operation: e,
4541
4591
  content: h,
4542
- context: l
4592
+ context: c
4543
4593
  }) : h, j = /* @__PURE__ */ $.jsx(
4544
- Ba,
4594
+ Wa,
4545
4595
  {
4546
4596
  path: e.path,
4547
4597
  renderParam: ({ name: C }) => /* @__PURE__ */ $.jsx(
4548
- Xn,
4598
+ Zn,
4549
4599
  {
4550
4600
  name: C,
4551
4601
  backgroundOpacity: "0",
@@ -4554,11 +4604,11 @@ const xs = ({
4554
4604
  }
4555
4605
  )
4556
4606
  }
4557
- ), { selectedServer: T } = mr(i.data.schema.servers), p = oa(() => {
4607
+ ), { selectedServer: T } = vr(i.data.schema.servers), p = ia(() => {
4558
4608
  var P;
4559
- const C = x ?? ((P = d == null ? void 0 : d[0]) != null && P.schema ? Ue(
4609
+ const C = x ?? ((P = d == null ? void 0 : d[0]) != null && P.schema ? $e(
4560
4610
  d[0].schema
4561
- ) : void 0), L = new bs({
4611
+ ) : void 0), L = new js({
4562
4612
  method: e.method.toLocaleUpperCase(),
4563
4613
  url: T + e.path.replaceAll("{", ":").replaceAll("}", ""),
4564
4614
  postData: C ? {
@@ -4572,7 +4622,7 @@ const xs = ({
4572
4622
  headersSize: 0,
4573
4623
  bodySize: 0
4574
4624
  });
4575
- return qs(L, f);
4625
+ return ks(L, f);
4576
4626
  }, [
4577
4627
  x,
4578
4628
  d,
@@ -4580,7 +4630,7 @@ const xs = ({
4580
4630
  e.path,
4581
4631
  T,
4582
4632
  f
4583
- ]), [O, b] = xs({ rootMargin: "200px 0px 200px 0px" }), E = b && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
4633
+ ]), [O, b] = Ss({ rootMargin: "200px 0px 200px 0px" }), R = b && (e.extensions["x-explorer-enabled"] === !0 || e.extensions["x-zudoku-playground-enabled"] === !0 || e.extensions["x-explorer-enabled"] === void 0 && e.extensions["x-zudoku-playground-enabled"] === void 0 && !(s != null && s.disablePlayground));
4584
4634
  return /* @__PURE__ */ $.jsxs(
4585
4635
  "aside",
4586
4636
  {
@@ -4588,15 +4638,15 @@ const xs = ({
4588
4638
  className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4",
4589
4639
  "data-pagefind-ignore": "all",
4590
4640
  children: [
4591
- /* @__PURE__ */ $.jsxs(jr, { children: [
4592
- /* @__PURE__ */ $.jsxs(Sr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
4641
+ /* @__PURE__ */ $.jsxs(Or, { children: [
4642
+ /* @__PURE__ */ $.jsxs(Tr, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [
4593
4643
  /* @__PURE__ */ $.jsxs("span", { className: "font-mono break-words leading-6", children: [
4594
4644
  /* @__PURE__ */ $.jsx("span", { className: pe("font-semibold", u), children: e.method.toLocaleUpperCase() }),
4595
4645
  " ",
4596
4646
  j
4597
4647
  ] }),
4598
- E && /* @__PURE__ */ $.jsx(
4599
- ws,
4648
+ R && /* @__PURE__ */ $.jsx(
4649
+ Ts,
4600
4650
  {
4601
4651
  servers: i.data.schema.servers.map((C) => C.url),
4602
4652
  operation: e,
@@ -4605,8 +4655,8 @@ const xs = ({
4605
4655
  )
4606
4656
  ] }),
4607
4657
  b && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
4608
- /* @__PURE__ */ $.jsx(ba, { className: "p-0", children: /* @__PURE__ */ $.jsx(va, { children: /* @__PURE__ */ $.jsx(
4609
- ia,
4658
+ /* @__PURE__ */ $.jsx($a, { className: "p-0", children: /* @__PURE__ */ $.jsx(xa, { children: /* @__PURE__ */ $.jsx(
4659
+ la,
4610
4660
  {
4611
4661
  language: f,
4612
4662
  noBackground: !0,
@@ -4614,7 +4664,7 @@ const xs = ({
4614
4664
  code: p
4615
4665
  }
4616
4666
  ) }) }),
4617
- /* @__PURE__ */ $.jsxs(xa, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
4667
+ /* @__PURE__ */ $.jsxs(wa, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [
4618
4668
  /* @__PURE__ */ $.jsx("span", { children: "Show example in" }),
4619
4669
  /* @__PURE__ */ $.jsx(
4620
4670
  Ye,
@@ -4626,21 +4676,21 @@ const xs = ({
4626
4676
  g((L) => (L.set("lang", C.target.value), L));
4627
4677
  });
4628
4678
  },
4629
- options: Es
4679
+ options: As
4630
4680
  }
4631
4681
  )
4632
4682
  ] })
4633
4683
  ] })
4634
4684
  ] }),
4635
4685
  b && d && /* @__PURE__ */ $.jsx(
4636
- Os,
4686
+ Cs,
4637
4687
  {
4638
4688
  content: d,
4639
4689
  onExampleChange: v
4640
4690
  }
4641
4691
  ),
4642
4692
  b && e.responses.length > 0 && /* @__PURE__ */ $.jsx(
4643
- Ps,
4693
+ Es,
4644
4694
  {
4645
4695
  selectedResponse: n,
4646
4696
  onSelectResponse: t,
@@ -4649,7 +4699,7 @@ const xs = ({
4649
4699
  content: C.content && (s != null && s.transformExamples) ? s.transformExamples({
4650
4700
  auth: r,
4651
4701
  type: "response",
4652
- context: l,
4702
+ context: c,
4653
4703
  operation: e,
4654
4704
  content: C.content
4655
4705
  }) : C.content
@@ -4659,17 +4709,17 @@ const xs = ({
4659
4709
  ]
4660
4710
  }
4661
4711
  );
4662
- }, ks = ["path", "query", "header", "cookie"], Ns = ({
4712
+ }, Us = ["path", "query", "header", "cookie"], Ls = ({
4663
4713
  operationFragment: e,
4664
4714
  serverUrl: n
4665
4715
  }) => {
4666
- var o, i, l;
4667
- const t = fo(As, e), a = eo(
4716
+ var o, i, c;
4717
+ const t = mo(Fs, e), a = ao(
4668
4718
  t.parameters ?? [],
4669
4719
  (u) => u.in
4670
- ), c = t.responses.at(0), [s, r] = xe(c == null ? void 0 : c.statusCode);
4720
+ ), l = t.responses.at(0), [s, r] = ve(l == null ? void 0 : l.statusCode);
4671
4721
  return /* @__PURE__ */ $.jsxs("div", { children: [
4672
- t.deprecated && /* @__PURE__ */ $.jsx(Fr, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
4722
+ t.deprecated && /* @__PURE__ */ $.jsx(_r, { variant: "muted", className: "text-xs mb-4", children: "deprecated" }),
4673
4723
  /* @__PURE__ */ $.jsxs(
4674
4724
  "div",
4675
4725
  {
@@ -4679,7 +4729,7 @@ const xs = ({
4679
4729
  ),
4680
4730
  children: [
4681
4731
  /* @__PURE__ */ $.jsx(
4682
- Ie,
4732
+ Ue,
4683
4733
  {
4684
4734
  level: 2,
4685
4735
  id: t.slug,
@@ -4689,8 +4739,8 @@ const xs = ({
4689
4739
  }
4690
4740
  ),
4691
4741
  /* @__PURE__ */ $.jsxs("div", { className: "text-sm flex gap-2 font-mono col-span-full", children: [
4692
- /* @__PURE__ */ $.jsx("span", { className: ta(t.method), children: t.method.toUpperCase() }),
4693
- /* @__PURE__ */ $.jsxs(ra, { className: "max-w-full truncate flex cursor-pointer", children: [
4742
+ /* @__PURE__ */ $.jsx("span", { className: ra(t.method), children: t.method.toUpperCase() }),
4743
+ /* @__PURE__ */ $.jsxs(na, { className: "max-w-full truncate flex cursor-pointer", children: [
4694
4744
  n && /* @__PURE__ */ $.jsx("div", { className: "text-neutral-400 dark:text-neutral-500 truncate", children: n.replace(/\/$/, "") }),
4695
4745
  /* @__PURE__ */ $.jsx("div", { className: "text-neutral-900 dark:text-neutral-200", children: t.path })
4696
4746
  ] })
@@ -4699,15 +4749,15 @@ const xs = ({
4699
4749
  t.description && /* @__PURE__ */ $.jsx(
4700
4750
  De,
4701
4751
  {
4702
- className: `${fr} max-w-full prose-img:max-w-prose`,
4752
+ className: `${pr} max-w-full prose-img:max-w-prose`,
4703
4753
  content: t.description
4704
4754
  }
4705
4755
  ),
4706
- t.parameters && t.parameters.length > 0 && /* @__PURE__ */ $.jsx($.Fragment, { children: ks.flatMap(
4756
+ t.parameters && t.parameters.length > 0 && /* @__PURE__ */ $.jsx($.Fragment, { children: Us.flatMap(
4707
4757
  (u) => {
4708
4758
  var y;
4709
4759
  return (y = a[u]) != null && y.length ? /* @__PURE__ */ $.jsx(
4710
- bo,
4760
+ jo,
4711
4761
  {
4712
4762
  summary: t.summary ?? void 0,
4713
4763
  id: t.slug,
@@ -4718,38 +4768,38 @@ const xs = ({
4718
4768
  ) : [];
4719
4769
  }
4720
4770
  ) }),
4721
- mo((l = (i = (o = t.requestBody) == null ? void 0 : o.content) == null ? void 0 : i.at(0)) == null ? void 0 : l.schema, (u) => {
4771
+ xo((c = (i = (o = t.requestBody) == null ? void 0 : o.content) == null ? void 0 : i.at(0)) == null ? void 0 : c.schema, (u) => {
4722
4772
  var y;
4723
4773
  return /* @__PURE__ */ $.jsxs("div", { className: "mt-4 flex flex-col gap-4", children: [
4724
4774
  /* @__PURE__ */ $.jsxs(
4725
- Ie,
4775
+ Ue,
4726
4776
  {
4727
4777
  level: 3,
4728
4778
  className: "capitalize flex items-center gap-2",
4729
4779
  id: `${t.slug}/request-body`,
4730
4780
  children: [
4731
- t.summary && /* @__PURE__ */ $.jsxs(pr, { children: [
4781
+ t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
4732
4782
  t.summary,
4733
4783
  " › "
4734
4784
  ] }),
4735
4785
  "Request Body",
4736
4786
  " ",
4737
- ((y = t.requestBody) == null ? void 0 : y.required) === !1 ? /* @__PURE__ */ $.jsx(Fr, { variant: "muted", children: "optional" }) : ""
4787
+ ((y = t.requestBody) == null ? void 0 : y.required) === !1 ? /* @__PURE__ */ $.jsx(_r, { variant: "muted", children: "optional" }) : ""
4738
4788
  ]
4739
4789
  }
4740
4790
  ),
4741
- /* @__PURE__ */ $.jsx(Ir, { schema: u })
4791
+ /* @__PURE__ */ $.jsx(dr, { schema: u })
4742
4792
  ] });
4743
4793
  }),
4744
4794
  t.responses.length > 0 && /* @__PURE__ */ $.jsxs($.Fragment, { children: [
4745
4795
  /* @__PURE__ */ $.jsxs(
4746
- Ie,
4796
+ Ue,
4747
4797
  {
4748
4798
  level: 3,
4749
4799
  className: "capitalize mt-8 pt-8 border-t",
4750
4800
  id: `${t.slug}/responses`,
4751
4801
  children: [
4752
- t.summary && /* @__PURE__ */ $.jsxs(pr, { children: [
4802
+ t.summary && /* @__PURE__ */ $.jsxs(hr, { children: [
4753
4803
  t.summary,
4754
4804
  " › "
4755
4805
  ] }),
@@ -4758,13 +4808,13 @@ const xs = ({
4758
4808
  }
4759
4809
  ),
4760
4810
  /* @__PURE__ */ $.jsxs(
4761
- ro,
4811
+ io,
4762
4812
  {
4763
4813
  onValueChange: (u) => r(u),
4764
4814
  value: s,
4765
4815
  children: [
4766
- t.responses.length > 1 && /* @__PURE__ */ $.jsx(no, { children: t.responses.map((u) => /* @__PURE__ */ $.jsx(
4767
- ao,
4816
+ t.responses.length > 1 && /* @__PURE__ */ $.jsx(so, { children: t.responses.map((u) => /* @__PURE__ */ $.jsx(
4817
+ lo,
4768
4818
  {
4769
4819
  value: u.statusCode,
4770
4820
  title: u.description ?? void 0,
@@ -4775,11 +4825,11 @@ const xs = ({
4775
4825
  /* @__PURE__ */ $.jsx("ul", { className: "list-none m-0 px-0", children: t.responses.map((u) => {
4776
4826
  var y, g;
4777
4827
  return /* @__PURE__ */ $.jsx(
4778
- oo,
4828
+ co,
4779
4829
  {
4780
4830
  value: u.statusCode,
4781
4831
  children: /* @__PURE__ */ $.jsx(
4782
- Ir,
4832
+ dr,
4783
4833
  {
4784
4834
  schema: (g = (y = u.content) == null ? void 0 : y.find((m) => m.schema)) == null ? void 0 : g.schema
4785
4835
  }
@@ -4794,7 +4844,7 @@ const xs = ({
4794
4844
  ] })
4795
4845
  ] }),
4796
4846
  /* @__PURE__ */ $.jsx(
4797
- Rs,
4847
+ Is,
4798
4848
  {
4799
4849
  selectedResponse: s,
4800
4850
  onSelectResponse: r,
@@ -4807,10 +4857,10 @@ const xs = ({
4807
4857
  )
4808
4858
  ] });
4809
4859
  };
4810
- function Kn(e, n = 160) {
4860
+ function Yn(e, n = 160) {
4811
4861
  return e ? e.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[.*?\]\(.*?\)/g, "").replace(/[_*`~]/g, "").replace(/^(?:>|\s*#+|-{3,}|\*{3,})/gm, "").replace(/[|>{}[\]]/g, "").replace(/\s+/g, " ").trim().substring(0, n).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;") : "";
4812
4862
  }
4813
- const As = _e(
4863
+ const Fs = _e(
4814
4864
  /* GraphQL */
4815
4865
  `
4816
4866
  fragment OperationsFragment on OperationItem {
@@ -4878,7 +4928,7 @@ const As = _e(
4878
4928
  }
4879
4929
  }
4880
4930
  `
4881
- ), Is = _e(
4931
+ ), _s = _e(
4882
4932
  /* GraphQL */
4883
4933
  `
4884
4934
  query SchemaWarmup($input: JSON!, $type: SchemaType!) {
@@ -4887,7 +4937,7 @@ const As = _e(
4887
4937
  }
4888
4938
  }
4889
4939
  `
4890
- ), Us = _e(
4940
+ ), Bs = _e(
4891
4941
  /* GraphQL */
4892
4942
  `
4893
4943
  query OperationsForTag(
@@ -4924,31 +4974,31 @@ const As = _e(
4924
4974
  }
4925
4975
  }
4926
4976
  `
4927
- ), il = ({
4977
+ ), ul = ({
4928
4978
  tag: e,
4929
4979
  untagged: n
4930
4980
  }) => {
4931
- const { input: t, type: a, versions: c, version: s, options: r } = vr(), { tag: o } = La(), i = Qe(Us, {
4981
+ const { input: t, type: a, versions: l, version: s, options: r } = xr(), { tag: o } = Ha(), i = Qe(Bs, {
4932
4982
  input: t,
4933
4983
  type: a,
4934
4984
  tag: e ?? o,
4935
4985
  untagged: n
4936
- }), l = yr(i), {
4986
+ }), c = gr(i), {
4937
4987
  data: { schema: u }
4938
- } = l, { selectedServer: y } = mr(u.servers), g = u.title, m = u.summary, x = u.description, v = Fa(), f = Qe(Is, { input: t, type: a });
4939
- if (qa({
4988
+ } = c, { selectedServer: y } = vr(u.servers), g = u.title, m = u.summary, x = u.description, v = Ma(), f = Qe(_s, { input: t, type: a });
4989
+ if (Ra({
4940
4990
  ...f,
4941
4991
  enabled: typeof window < "u",
4942
4992
  notifyOnChangeProps: []
4943
- }), Ca(), !u.tag)
4993
+ }), Ea(), !u.tag)
4944
4994
  return /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col h-full items-center justify-center text-center", children: [
4945
4995
  /* @__PURE__ */ $.jsx("div", { className: "text-muted-foreground font-medium", children: "No operations found" }),
4946
4996
  /* @__PURE__ */ $.jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: "This API doesn't have any operations defined yet." })
4947
4997
  ] });
4948
- const { operations: h, next: d, prev: j, description: T } = u.tag, p = T ? Kn(T) : m || (x ? Kn(x) : void 0), O = Object.entries(c).length > 1, b = (r == null ? void 0 : r.showVersionSelect) === "always" || O && (r == null ? void 0 : r.showVersionSelect) !== "hide", E = {
4998
+ const { operations: h, next: d, prev: j, description: T } = u.tag, p = T ? Yn(T) : m || (x ? Yn(x) : void 0), O = Object.entries(l).length > 1, b = (r == null ? void 0 : r.showVersionSelect) === "always" || O && (r == null ? void 0 : r.showVersionSelect) !== "hide", R = {
4949
4999
  prev: j != null && j.name ? { to: `../${j.slug}`, label: j.name } : void 0,
4950
5000
  next: d ? {
4951
- to: `../${d.slug ?? Ha}`,
5001
+ to: `../${d.slug ?? Ja}`,
4952
5002
  label: d.name ?? "Other endpoints"
4953
5003
  } : void 0
4954
5004
  };
@@ -4959,17 +5009,17 @@ const As = _e(
4959
5009
  "data-pagefind-filter": "section:openapi",
4960
5010
  "data-pagefind-meta": "section:openapi",
4961
5011
  children: [
4962
- /* @__PURE__ */ $.jsxs(Ea, { children: [
5012
+ /* @__PURE__ */ $.jsxs(ka, { children: [
4963
5013
  /* @__PURE__ */ $.jsx("title", { children: [u.tag.name, g].filter(Boolean).join(" - ") }),
4964
5014
  p && /* @__PURE__ */ $.jsx("meta", { name: "description", content: p })
4965
5015
  ] }),
4966
5016
  /* @__PURE__ */ $.jsxs("div", { className: "mb-8", children: [
4967
- /* @__PURE__ */ $.jsxs(Zn, { className: "w-full", children: [
5017
+ /* @__PURE__ */ $.jsxs(ea, { className: "w-full", children: [
4968
5018
  /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end", children: [
4969
5019
  /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col flex-1 gap-2", children: [
4970
- /* @__PURE__ */ $.jsx(Va, { children: g }),
5020
+ /* @__PURE__ */ $.jsx(Ya, { children: g }),
4971
5021
  /* @__PURE__ */ $.jsxs(
4972
- Ie,
5022
+ Ue,
4973
5023
  {
4974
5024
  level: 1,
4975
5025
  id: "description",
@@ -4986,32 +5036,32 @@ const As = _e(
4986
5036
  ]
4987
5037
  }
4988
5038
  ),
4989
- /* @__PURE__ */ $.jsx(ho, {})
5039
+ /* @__PURE__ */ $.jsx(vo, {})
4990
5040
  ] }),
4991
5041
  /* @__PURE__ */ $.jsxs("div", { className: "flex flex-col gap-4 sm:items-end", children: [
4992
5042
  b && /* @__PURE__ */ $.jsxs(
4993
- Ma,
5043
+ Ga,
4994
5044
  {
4995
- onValueChange: (N) => v(c[N]),
5045
+ onValueChange: (N) => v(l[N]),
4996
5046
  defaultValue: s,
4997
5047
  disabled: !O,
4998
5048
  children: [
4999
- /* @__PURE__ */ $.jsx(za, { className: "w-[180px]", children: /* @__PURE__ */ $.jsx(Wa, { placeholder: "Select version" }) }),
5000
- /* @__PURE__ */ $.jsx(Ja, { children: Object.entries(c).map(([N]) => /* @__PURE__ */ $.jsx(Ga, { value: N, children: N }, N)) })
5049
+ /* @__PURE__ */ $.jsx(Va, { className: "w-[180px]", children: /* @__PURE__ */ $.jsx(Da, { placeholder: "Select version" }) }),
5050
+ /* @__PURE__ */ $.jsx(Qa, { children: Object.entries(l).map(([N]) => /* @__PURE__ */ $.jsx(Ka, { value: N, children: N }, N)) })
5001
5051
  ]
5002
5052
  }
5003
5053
  ),
5004
- u.description && /* @__PURE__ */ $.jsxs(ur, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
5054
+ u.description && /* @__PURE__ */ $.jsxs(fr, { className: "flex items-center gap-1 text-sm font-medium text-muted-foreground group", children: [
5005
5055
  /* @__PURE__ */ $.jsx("span", { children: "API information" }),
5006
5056
  /* @__PURE__ */ $.jsx(
5007
- Yn,
5057
+ Xn,
5008
5058
  {
5009
5059
  className: "group-data-[state=open]:hidden translate-y-px",
5010
5060
  size: 14
5011
5061
  }
5012
5062
  ),
5013
5063
  /* @__PURE__ */ $.jsx(
5014
- Ia,
5064
+ _a,
5015
5065
  {
5016
5066
  className: "group-data-[state=closed]:hidden translate-y-px",
5017
5067
  size: 13
@@ -5020,11 +5070,11 @@ const As = _e(
5020
5070
  ] })
5021
5071
  ] })
5022
5072
  ] }),
5023
- u.description && /* @__PURE__ */ $.jsx(ea, { className: "CollapsibleContent", children: /* @__PURE__ */ $.jsx(
5073
+ u.description && /* @__PURE__ */ $.jsx(ta, { className: "CollapsibleContent", children: /* @__PURE__ */ $.jsx(
5024
5074
  "div",
5025
5075
  {
5026
5076
  className: pe(
5027
- fr,
5077
+ pr,
5028
5078
  "pt-4 max-w-full prose-img:max-w-prose"
5029
5079
  ),
5030
5080
  children: /* @__PURE__ */ $.jsx(
@@ -5041,7 +5091,7 @@ const As = _e(
5041
5091
  "div",
5042
5092
  {
5043
5093
  className: pe(
5044
- fr,
5094
+ pr,
5045
5095
  "my-4 max-w-full prose-img:max-w-prose"
5046
5096
  ),
5047
5097
  children: /* @__PURE__ */ $.jsx(De, { content: T })
@@ -5052,7 +5102,7 @@ const As = _e(
5052
5102
  /* @__PURE__ */ $.jsxs("div", { className: "px-6 mt-6 -mx-6 [content-visibility:auto]", children: [
5053
5103
  h.map((N) => /* @__PURE__ */ $.jsxs("div", { children: [
5054
5104
  /* @__PURE__ */ $.jsx(
5055
- Ns,
5105
+ Ls,
5056
5106
  {
5057
5107
  serverUrl: y,
5058
5108
  operationFragment: N
@@ -5060,14 +5110,14 @@ const As = _e(
5060
5110
  ),
5061
5111
  /* @__PURE__ */ $.jsx("hr", { className: "my-10" })
5062
5112
  ] }, N.slug)),
5063
- /* @__PURE__ */ $.jsx(Qa, { className: "mb-4", ...E })
5113
+ /* @__PURE__ */ $.jsx(Za, { className: "mb-4", ...R })
5064
5114
  ] })
5065
5115
  ]
5066
5116
  }
5067
5117
  );
5068
5118
  };
5069
5119
  export {
5070
- il as OperationList,
5071
- As as OperationsFragment
5120
+ ul as OperationList,
5121
+ Fs as OperationsFragment
5072
5122
  };
5073
- //# sourceMappingURL=OperationList-CMMzLfIZ.js.map
5123
+ //# sourceMappingURL=OperationList-CKac6iap.js.map