apiuikit 1.11.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -52
- package/dist/{CodeSamples-DHBJ8w0h.js → CodeSamples-DqJT72uU.js} +648 -636
- package/dist/{CodeSamples-zwenaP41.cjs → CodeSamples-ILzruYIb.cjs} +33 -33
- package/dist/{LogoExtension-B35DbEgK.cjs → LogoExtension-pwW1l7NO.cjs} +1 -1
- package/dist/{LogoExtension-vr6PCtIB.js → LogoExtension-yx9jporL.js} +1 -1
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +1 -1
- package/dist/c-B4BAHWS4.cjs +1 -0
- package/dist/{c-Bz1-FJiA.js → c-C0DTNf68.js} +122 -63
- package/dist/components/AsyncCodeSample.d.ts +1 -1
- package/dist/components/Authorization.d.ts +5 -5
- package/dist/components/Bindings.d.ts +1 -1
- package/dist/components/ChannelAddress.d.ts +1 -1
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeSamples.d.ts +1 -1
- package/dist/components/CollapsiblePanel.d.ts +1 -1
- package/dist/components/ContentTab.d.ts +1 -1
- package/dist/components/CopyButton.d.ts +1 -1
- package/dist/components/DefinitionListItem.d.ts +1 -1
- package/dist/components/DocumentTopBar.d.ts +1 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/Examples.d.ts +1 -1
- package/dist/components/InfoMetadata.d.ts +1 -1
- package/dist/components/MarkdownExportMenu.d.ts +1 -1
- package/dist/components/MethodBadge.d.ts +1 -1
- package/dist/components/Navigation/AsyncAPINavigation.d.ts +1 -1
- package/dist/components/Navigation/Navigation.d.ts +1 -1
- package/dist/components/Navigation/OpenAPINavigation.d.ts +1 -1
- package/dist/components/Navigation/SpecNavigation.d.ts +1 -1
- package/dist/components/QueryParameters.d.ts +1 -1
- package/dist/components/RenderExtensions.d.ts +1 -1
- package/dist/components/Reply.d.ts +1 -1
- package/dist/components/SearchPanel.d.ts +1 -1
- package/dist/components/Section.d.ts +8 -1
- package/dist/components/ServerAddressBanner.d.ts +1 -1
- package/dist/components/TabToggle.d.ts +1 -1
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/VerticalNavigation.d.ts +1 -1
- package/dist/components/schema/ExpandToggle.d.ts +1 -1
- package/dist/components/schema/SchemaCaseDetail.d.ts +1 -1
- package/dist/components/schema/SchemaConstraints.d.ts +1 -1
- package/dist/components/schema/SchemaFieldMeta.d.ts +1 -1
- package/dist/components/schema/SchemaIfThenElseBranch.d.ts +1 -1
- package/dist/components/schema/SchemaMapBranch.d.ts +1 -1
- package/dist/components/schema/SchemaNode.d.ts +1 -1
- package/dist/components/schema/SchemaNotBranch.d.ts +2 -2
- package/dist/components/schema/SchemaTab.d.ts +1 -1
- package/dist/components/schema/SchemaTree.d.ts +1 -1
- package/dist/components/schema/SchemaTreeBranch.d.ts +1 -1
- package/dist/components/schema/SchemaTreeRow.d.ts +1 -1
- package/dist/components/schema/SchemaTypeLabel.d.ts +1 -1
- package/dist/components/schema/SchemaUnionBranch.d.ts +1 -1
- package/dist/config/config.d.ts +17 -0
- package/dist/containers/AsyncAPI/AsyncAPI.d.ts +6 -1
- package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/AsyncAPI/AsyncAPIRenderer.d.ts +6 -1
- package/dist/containers/AsyncAPI/Layout.d.ts +7 -1
- package/dist/containers/Information/InformationSection.d.ts +2 -2
- package/dist/containers/Information/OpenAPIInformation.d.ts +1 -1
- package/dist/containers/Messages/Message.d.ts +1 -1
- package/dist/containers/Messages/MessageDetails.d.ts +1 -1
- package/dist/containers/Messages/Messages.d.ts +1 -1
- package/dist/containers/OpenAPI/Layout.d.ts +7 -1
- package/dist/containers/OpenAPI/OpenAPI.d.ts +6 -1
- package/dist/containers/OpenAPI/OpenAPIDocumentProvider.d.ts +1 -1
- package/dist/containers/OpenAPI/OpenAPIRenderer.d.ts +6 -1
- package/dist/containers/Operation/Operation.d.ts +1 -1
- package/dist/containers/Operation/Operations.d.ts +1 -1
- package/dist/containers/Path/OperationCallbacks.d.ts +1 -1
- package/dist/containers/Path/PathOperation.d.ts +1 -1
- package/dist/containers/Path/Paths.d.ts +1 -1
- package/dist/containers/Path/ResponseLinks.d.ts +1 -1
- package/dist/containers/Schema/Schemas.d.ts +1 -1
- package/dist/containers/Server/OpenAPIServer.d.ts +1 -1
- package/dist/containers/Server/OpenAPIServers.d.ts +1 -1
- package/dist/containers/Server/Server.d.ts +1 -1
- package/dist/containers/Server/Servers.d.ts +1 -1
- package/dist/contexts/useSpec.d.ts +5 -0
- package/dist/{crystal-BcGgviMR.cjs → crystal-BA1RB3o9.cjs} +1 -1
- package/dist/{crystal-BtD5fR4q.js → crystal-C5EKc8oK.js} +29 -18
- package/dist/{csharp-AnFv7wyC.js → csharp-B6YWt0KR.js} +47 -47
- package/dist/csharp-IihVQN8U.cjs +1 -0
- package/dist/{go-BpetKc7b.cjs → go-By8nj0Vi.cjs} +1 -1
- package/dist/{go-CkZ9_bn0.js → go-C8VcBUsu.js} +7 -2
- package/dist/helpers/openapiParser.d.ts +1 -1
- package/dist/helpers/parser.d.ts +1 -1
- package/dist/hooks/useDocumentProviderValue.d.ts +1 -0
- package/dist/hooks/useSpecLayoutController.d.ts +17 -1
- package/dist/icons/ArrowDown.d.ts +1 -1
- package/dist/icons/ArrowRight.d.ts +1 -1
- package/dist/icons/AtSymbol.d.ts +1 -1
- package/dist/icons/BookOpen.d.ts +1 -1
- package/dist/icons/Check.d.ts +1 -1
- package/dist/icons/Clipboard.d.ts +1 -1
- package/dist/icons/Connection.d.ts +1 -1
- package/dist/icons/Copy.d.ts +1 -1
- package/dist/icons/ExternalLink.d.ts +1 -1
- package/dist/icons/Globe.d.ts +1 -1
- package/dist/icons/IconWrapper.d.ts +1 -1
- package/dist/icons/Info.d.ts +1 -1
- package/dist/icons/Link.d.ts +1 -1
- package/dist/icons/Message.d.ts +1 -1
- package/dist/icons/Operation.d.ts +1 -1
- package/dist/icons/Scale.d.ts +1 -1
- package/dist/icons/Schema.d.ts +1 -1
- package/dist/icons/Server.d.ts +1 -1
- package/dist/icons/ShieldCheck.d.ts +1 -1
- package/dist/icons/Tag.d.ts +1 -1
- package/dist/icons/Variable.d.ts +1 -1
- package/dist/index-1SEMQuYi.js +1704 -0
- package/dist/{index-AwzSLIDS.js → index-6q1VqGzf.js} +10357 -10196
- package/dist/{index-DsSuZh0k.js → index-BI2__AB3.js} +3637 -3400
- package/dist/index-CI3MIo1V.cjs +137 -0
- package/dist/index-Ccy_JZ0T.cjs +4 -0
- package/dist/index-CfELqow6.cjs +107 -0
- package/dist/index-DNsQrlh-.cjs +178 -0
- package/dist/{index-D2A8jEpz.js → index-Dbr8eb7Z.js} +4838 -4658
- package/dist/index.d.ts +1 -0
- package/dist/{java-BicX26Pg.js → java-BoRJOXvw.js} +48 -39
- package/dist/java-DFXAwvvK.cjs +1 -0
- package/dist/{kotlin-kGuORR5a.cjs → kotlin-B3HlgtFq.cjs} +2 -2
- package/dist/{kotlin-BwB8b-YX.js → kotlin-CIEA64JZ.js} +3 -1
- package/dist/markdown-assets/protoToJsonSchema-B7uaS_Ic.js +83 -0
- package/dist/markdown-assets/{protoToJsonSchema-CBPWaboT.js → protoToJsonSchema-CWtEPUyE.js} +1807 -1788
- package/dist/markdown.cjs +37 -37
- package/dist/markdown.es.js +927 -900
- package/dist/{php-DF4zG2hq.cjs → php-BMUCoWpx.cjs} +2 -2
- package/dist/{php-BL35ZHWM.js → php-DJ7KS8rT.js} +39 -33
- package/dist/plugins/OperationPluginTabs.d.ts +1 -1
- package/dist/plugins/PluginSlot.d.ts +2 -2
- package/dist/{protoToJsonSchema-CZm3Y6FF.js → protoToJsonSchema-CbZrqF4-.js} +787 -769
- package/dist/protoToJsonSchema-QVW5EW0-.cjs +83 -0
- package/dist/{protobufSchemaParser-XBkxg_an.cjs → protobufSchemaParser-BEVutm25.cjs} +1 -1
- package/dist/{protobufSchemaParser-BblMCnwh.js → protobufSchemaParser-CtnNrHbS.js} +2 -2
- package/dist/public/createSectionRoot.d.ts +1 -1
- package/dist/public/openapiSections.d.ts +5 -5
- package/dist/public/schemasSection.d.ts +1 -1
- package/dist/public/sections.d.ts +5 -5
- package/dist/{ruby-nPcbuC2a.cjs → ruby-CGL4kvvH.cjs} +1 -1
- package/dist/{ruby-CvOid-1s.js → ruby-t1jbZ0Fv.js} +2 -2
- package/dist/{rust-BocnJ3Ns.js → rust-DY-oA2gr.js} +40 -26
- package/dist/rust-_vvcEGSJ.cjs +1 -0
- package/dist/swift-BAji1QIq.cjs +1 -0
- package/dist/{swift-C35Eof-I.js → swift-CdDIFB_j.js} +25 -11
- package/dist/utils/theme.d.ts +14 -0
- package/package.json +4 -4
- package/dist/App.d.ts +0 -2
- package/dist/c-C_Sx7N-F.cjs +0 -1
- package/dist/csharp-yuAGIuP4.cjs +0 -1
- package/dist/index-D0oLUuyJ.cjs +0 -178
- package/dist/index-DCDYBZcY.js +0 -1461
- package/dist/index-DWjbhYHQ.cjs +0 -107
- package/dist/index-QekxGfhl.cjs +0 -139
- package/dist/index-d8kJa7YD.cjs +0 -4
- package/dist/java-BIk0G-rH.cjs +0 -1
- package/dist/main.d.ts +0 -0
- package/dist/markdown-assets/protoToJsonSchema-CgkcluFJ.js +0 -83
- package/dist/protoToJsonSchema-BLyZqSxO.cjs +0 -83
- package/dist/rust-DKnYCg2f.cjs +0 -1
- package/dist/swift-CAnH__EC.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as ar, jsx as
|
|
2
|
-
import { useId as _n, useMemo as
|
|
3
|
-
import { g as Ln, c as
|
|
1
|
+
import { jsxs as ar, jsx as Ne } from "react/jsx-runtime";
|
|
2
|
+
import { useId as _n, useMemo as Ve, useState as gt, useEffect as sr } from "react";
|
|
3
|
+
import { g as Ln, c as nt, a as In, u as Un, b as cr, e as Fn, o as Mn, C as Hn, h as Bn } from "./index-Dbr8eb7Z.js";
|
|
4
4
|
function Zr(t, e = /* @__PURE__ */ new Set()) {
|
|
5
5
|
if (e.has(t)) return t;
|
|
6
6
|
if (t.type === "object" && t.properties && typeof t.properties == "object") {
|
|
@@ -20,7 +20,7 @@ function Zr(t, e = /* @__PURE__ */ new Set()) {
|
|
|
20
20
|
}
|
|
21
21
|
async function Wn(t) {
|
|
22
22
|
try {
|
|
23
|
-
const { generate: e } = await import("./index-
|
|
23
|
+
const { generate: e } = await import("./index-1SEMQuYi.js");
|
|
24
24
|
return await e(Zr(t), {
|
|
25
25
|
seed: 42,
|
|
26
26
|
useExamplesValue: !0,
|
|
@@ -32,7 +32,7 @@ async function Wn(t) {
|
|
|
32
32
|
}
|
|
33
33
|
const lr = "", fr = `
|
|
34
34
|
`;
|
|
35
|
-
var
|
|
35
|
+
var j = class {
|
|
36
36
|
/**
|
|
37
37
|
* Helper object to format and aggragate lines of code.
|
|
38
38
|
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
@@ -114,9 +114,9 @@ var Dn = (t, e, r) => {
|
|
|
114
114
|
return "{}";
|
|
115
115
|
n.push(o);
|
|
116
116
|
const u = "{" + c.newLine + f.map((p, d) => {
|
|
117
|
-
const h = f.length - 1 === d ? c.newLine : "," + c.newLineOrSpace, y = typeof p == "symbol", g = !y && /^[a-z$_][a-z$_0-9]*$/i.test(p),
|
|
117
|
+
const h = f.length - 1 === d ? c.newLine : "," + c.newLineOrSpace, y = typeof p == "symbol", g = !y && /^[a-z$_][a-z$_0-9]*$/i.test(p), b = y || g ? p : s(p, a);
|
|
118
118
|
let m = s(o[p], a, i + a.indent);
|
|
119
|
-
return a.transform && (m = a.transform(o, p, m)), c.indent + String(
|
|
119
|
+
return a.transform && (m = a.transform(o, p, m)), c.indent + String(b) + ": " + m + h;
|
|
120
120
|
}).join("") + c.pad + "}";
|
|
121
121
|
return n.pop(), l(u);
|
|
122
122
|
}
|
|
@@ -124,11 +124,11 @@ var Dn = (t, e, r) => {
|
|
|
124
124
|
` ? "\\n" : "\\r"), a.singleQuotes === !1 ? (o = o.replace(/"/g, '\\"'), `"${o}"`) : (o = o.replace(/\\?'/g, "\\'"), `'${o}'`);
|
|
125
125
|
})(t, e, r);
|
|
126
126
|
};
|
|
127
|
-
const
|
|
128
|
-
const r =
|
|
127
|
+
const ie = /* @__PURE__ */ Ln(Dn), B = (t, e) => Object.keys(t).find((r) => r.toLowerCase() === e.toLowerCase()), ce = (t, e) => {
|
|
128
|
+
const r = B(t, e);
|
|
129
129
|
if (r)
|
|
130
130
|
return t[r];
|
|
131
|
-
},
|
|
131
|
+
}, ot = (t, e) => !!B(t, e), Qn = (t) => [
|
|
132
132
|
"application/json",
|
|
133
133
|
"application/x-json",
|
|
134
134
|
"text/json",
|
|
@@ -154,7 +154,7 @@ const oe = /* @__PURE__ */ Ln(Dn), J = (t, e) => Object.keys(t).find((r) => r.to
|
|
|
154
154
|
join: `
|
|
155
155
|
`,
|
|
156
156
|
...s
|
|
157
|
-
}, { blank: a, push: i, join: c } = new
|
|
157
|
+
}, { blank: a, push: i, join: c } = new j(o);
|
|
158
158
|
i("Write code that makes the HTTP request described below. Use my preferred programming language and HTTP client library — if I haven't told you what those are, ask me before writing any code."), a(), i(`Method: ${t}`), i(`URL: ${e}`);
|
|
159
159
|
const l = Object.keys(r);
|
|
160
160
|
return l.length && (a(), i("Headers:"), l.forEach((f) => {
|
|
@@ -163,12 +163,12 @@ const oe = /* @__PURE__ */ Ln(Dn), J = (t, e) => Object.keys(t).find((r) => r.to
|
|
|
163
163
|
}
|
|
164
164
|
} }
|
|
165
165
|
};
|
|
166
|
-
function
|
|
166
|
+
function He(t, e = {}) {
|
|
167
167
|
const { delimiter: r = '"', escapeChar: n = "\\", escapeNewlines: s = !0 } = e;
|
|
168
168
|
return [...t.toString()].map((o) => o === "\b" ? `${n}b` : o === " " ? `${n}t` : o === `
|
|
169
169
|
` ? s ? `${n}n` : o : o === "\f" ? `${n}f` : o === "\r" ? s ? `${n}r` : o : o === n ? n + n : o === r ? n + r : o < " " || o > "~" ? JSON.stringify(o).slice(1, -1) : o).join("");
|
|
170
170
|
}
|
|
171
|
-
const Ce = (t) =>
|
|
171
|
+
const Ce = (t) => He(t, { delimiter: "'" }), L = (t) => He(t, { delimiter: '"' }), Xn = {
|
|
172
172
|
info: {
|
|
173
173
|
key: "c",
|
|
174
174
|
title: "C",
|
|
@@ -184,11 +184,11 @@ const Ce = (t) => Me(t, { delimiter: "'" }), I = (t) => Me(t, { delimiter: '"' }
|
|
|
184
184
|
extname: ".c"
|
|
185
185
|
},
|
|
186
186
|
convert: ({ method: t, fullUrl: e, headersObj: r, allHeaders: n, postData: s }) => {
|
|
187
|
-
const { push: o, blank: a, join: i } = new
|
|
187
|
+
const { push: o, blank: a, join: i } = new j();
|
|
188
188
|
o("CURL *hnd = curl_easy_init();"), a(), o(`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${t.toUpperCase()}");`), o("curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);"), o(`curl_easy_setopt(hnd, CURLOPT_URL, "${e}");`);
|
|
189
189
|
const c = Object.keys(r);
|
|
190
190
|
return c.length && (a(), o("struct curl_slist *headers = NULL;"), c.forEach((l) => {
|
|
191
|
-
o(`headers = curl_slist_append(headers, "${l}: ${
|
|
191
|
+
o(`headers = curl_slist_append(headers, "${l}: ${L(r[l])}");`);
|
|
192
192
|
}), o("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);")), n.cookie && (a(), o(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${n.cookie}");`)), s.text && (a(), o(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(s.text)});`)), a(), o("CURLcode ret = curl_easy_perform(hnd);"), i();
|
|
193
193
|
}
|
|
194
194
|
} }
|
|
@@ -204,7 +204,7 @@ var ur = class {
|
|
|
204
204
|
};
|
|
205
205
|
const en = (t) => t === void 0 ? null : t === null ? "null" : t.constructor.name.toLowerCase(), tn = (t) => t === void 0 ? !0 : en(t) === "object" ? Object.keys(t).length === 0 : !1, pr = (t) => (Object.keys(t).filter((e) => tn(t[e])).forEach((e) => {
|
|
206
206
|
delete t[e];
|
|
207
|
-
}), t),
|
|
207
|
+
}), t), Ye = (t, e) => {
|
|
208
208
|
const r = " ".repeat(t);
|
|
209
209
|
return e.replace(/\n/g, `
|
|
210
210
|
${r}`);
|
|
@@ -221,13 +221,13 @@ ${r}`);
|
|
|
221
221
|
case "regexp":
|
|
222
222
|
return `#"${t.source}"`;
|
|
223
223
|
case "object": {
|
|
224
|
-
const e = Object.keys(t).reduce((r, n) => `${r}:${n} ${
|
|
224
|
+
const e = Object.keys(t).reduce((r, n) => `${r}:${n} ${Ye(n.length + 2, Mt(t[n]))}
|
|
225
225
|
`, "").trim();
|
|
226
|
-
return `{${
|
|
226
|
+
return `{${Ye(1, e)}}`;
|
|
227
227
|
}
|
|
228
228
|
case "array": {
|
|
229
229
|
const e = t.reduce((r, n) => `${r} ${Mt(n)}`, "").trim();
|
|
230
|
-
return `[${
|
|
230
|
+
return `[${Ye(1, e)}]`;
|
|
231
231
|
}
|
|
232
232
|
default:
|
|
233
233
|
return t.toString();
|
|
@@ -247,7 +247,7 @@ ${r}`);
|
|
|
247
247
|
extname: ".clj"
|
|
248
248
|
},
|
|
249
249
|
convert: ({ queryObj: t, method: e, postData: r, url: n, allHeaders: s }, o) => {
|
|
250
|
-
const { push: a, join: i } = new
|
|
250
|
+
const { push: a, join: i } = new j({ indent: o == null ? void 0 : o.indent }), c = [
|
|
251
251
|
"get",
|
|
252
252
|
"post",
|
|
253
253
|
"put",
|
|
@@ -266,21 +266,21 @@ ${r}`);
|
|
|
266
266
|
case "application/json":
|
|
267
267
|
{
|
|
268
268
|
l["content-type"] = new ur("json"), l["form-params"] = r.jsonObj;
|
|
269
|
-
const f =
|
|
269
|
+
const f = B(l.headers, "content-type");
|
|
270
270
|
f && delete l.headers[f];
|
|
271
271
|
}
|
|
272
272
|
break;
|
|
273
273
|
case "application/x-www-form-urlencoded":
|
|
274
274
|
{
|
|
275
275
|
l["form-params"] = r.paramsObj;
|
|
276
|
-
const f =
|
|
276
|
+
const f = B(l.headers, "content-type");
|
|
277
277
|
f && delete l.headers[f];
|
|
278
278
|
}
|
|
279
279
|
break;
|
|
280
280
|
case "text/plain":
|
|
281
281
|
{
|
|
282
282
|
l.body = r.text;
|
|
283
|
-
const f =
|
|
283
|
+
const f = B(l.headers, "content-type");
|
|
284
284
|
f && delete l.headers[f];
|
|
285
285
|
}
|
|
286
286
|
break;
|
|
@@ -293,16 +293,16 @@ ${r}`);
|
|
|
293
293
|
name: u.name,
|
|
294
294
|
content: u.value
|
|
295
295
|
});
|
|
296
|
-
const f =
|
|
296
|
+
const f = B(l.headers, "content-type");
|
|
297
297
|
f && delete l.headers[f];
|
|
298
298
|
}
|
|
299
299
|
break;
|
|
300
300
|
}
|
|
301
|
-
switch (
|
|
301
|
+
switch (ce(l.headers, "accept")) {
|
|
302
302
|
case "application/json":
|
|
303
303
|
{
|
|
304
304
|
l.accept = new ur("json");
|
|
305
|
-
const f =
|
|
305
|
+
const f = B(l.headers, "accept");
|
|
306
306
|
f && delete l.headers[f];
|
|
307
307
|
}
|
|
308
308
|
break;
|
|
@@ -310,7 +310,7 @@ ${r}`);
|
|
|
310
310
|
if (a(`(require '[clj-http.client :as client])
|
|
311
311
|
`), tn(pr(l))) a(`(client/${e} "${n}")`);
|
|
312
312
|
else {
|
|
313
|
-
const f = 11 + e.length + n.length, u =
|
|
313
|
+
const f = 11 + e.length + n.length, u = Ye(f, Mt(pr(l)));
|
|
314
314
|
a(`(client/${e} "${n}" ${u})`);
|
|
315
315
|
}
|
|
316
316
|
return i();
|
|
@@ -331,11 +331,11 @@ ${r}`);
|
|
|
331
331
|
extname: ".cr"
|
|
332
332
|
},
|
|
333
333
|
convert: ({ method: t, fullUrl: e, postData: r, allHeaders: n }, s = {}) => {
|
|
334
|
-
const { insecureSkipVerify: o = !1 } = s, { push: a, blank: i, join: c } = new
|
|
334
|
+
const { insecureSkipVerify: o = !1 } = s, { push: a, blank: i, join: c } = new j();
|
|
335
335
|
a('require "http/client"'), i(), a(`url = "${e}"`);
|
|
336
336
|
const l = Object.keys(n);
|
|
337
337
|
l.length && (a("headers = HTTP::Headers{"), l.forEach((y) => {
|
|
338
|
-
a(` "${y}" => "${
|
|
338
|
+
a(` "${y}" => "${L(n[y])}"`);
|
|
339
339
|
}), a("}")), r.text && a(`reqBody = ${JSON.stringify(r.text)}`), i();
|
|
340
340
|
const f = t.toUpperCase(), u = [
|
|
341
341
|
"GET",
|
|
@@ -350,7 +350,7 @@ ${r}`);
|
|
|
350
350
|
}
|
|
351
351
|
} }
|
|
352
352
|
}, ro = (t) => {
|
|
353
|
-
let e =
|
|
353
|
+
let e = ce(t, "accept-encoding");
|
|
354
354
|
if (!e) return [];
|
|
355
355
|
const r = {
|
|
356
356
|
gzip: "DecompressionMethods.GZip",
|
|
@@ -375,7 +375,7 @@ ${r}`);
|
|
|
375
375
|
},
|
|
376
376
|
convert: ({ allHeaders: t, postData: e, method: r, fullUrl: n }, s) => {
|
|
377
377
|
var p, d;
|
|
378
|
-
const { push: o, join: a } = new
|
|
378
|
+
const { push: o, join: a } = new j({ indent: {
|
|
379
379
|
indent: " ",
|
|
380
380
|
...s
|
|
381
381
|
}.indent });
|
|
@@ -405,7 +405,7 @@ ${r}`);
|
|
|
405
405
|
}
|
|
406
406
|
});
|
|
407
407
|
if (u.length && (o("Headers =", 1), o("{", 1), u.forEach((h) => {
|
|
408
|
-
o(`{ "${h}", "${
|
|
408
|
+
o(`{ "${h}", "${L(t[h])}" },`, 2);
|
|
409
409
|
}), o("},", 1)), e.text) {
|
|
410
410
|
const h = e.mimeType;
|
|
411
411
|
switch (h) {
|
|
@@ -449,7 +449,7 @@ const io = {
|
|
|
449
449
|
installation: () => "dotnet add package RestSharp"
|
|
450
450
|
},
|
|
451
451
|
convert: ({ method: t, fullUrl: e, headersObj: r, cookies: n, postData: s, uriObj: o }) => {
|
|
452
|
-
const { push: a, join: i } = new
|
|
452
|
+
const { push: a, join: i } = new j();
|
|
453
453
|
if (![
|
|
454
454
|
"GET",
|
|
455
455
|
"POST",
|
|
@@ -468,9 +468,9 @@ const io = {
|
|
|
468
468
|
c && s.boundary && a(`request.FormBoundary = "${s.boundary}";`);
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
|
-
a(`request.AddHeader("${l}", "${
|
|
471
|
+
a(`request.AddHeader("${l}", "${L(r[l])}");`);
|
|
472
472
|
}), n.forEach(({ name: l, value: f }) => {
|
|
473
|
-
a(`request.AddCookie("${l}", "${
|
|
473
|
+
a(`request.AddCookie("${l}", "${L(f)}", "${o.pathname}", "${o.host}");`);
|
|
474
474
|
}), s.mimeType) {
|
|
475
475
|
case "multipart/form-data":
|
|
476
476
|
if (!s.params) break;
|
|
@@ -514,13 +514,13 @@ const io = {
|
|
|
514
514
|
extname: ".go"
|
|
515
515
|
},
|
|
516
516
|
convert: ({ postData: t, method: e, allHeaders: r, fullUrl: n }, s = {}) => {
|
|
517
|
-
const { blank: o, push: a, join: i } = new
|
|
517
|
+
const { blank: o, push: a, join: i } = new j({ indent: " " }), { showBoilerplate: c = !0, checkErrors: l = !1, printBody: f = !0, timeout: u = -1, insecureSkipVerify: p = !1 } = s, d = l ? "err" : "_", h = c ? 1 : 0, y = () => {
|
|
518
518
|
l && (a("if err != nil {", h), a("panic(err)", h + 1), a("}", h));
|
|
519
519
|
};
|
|
520
520
|
c && (a("package main"), o(), a("import ("), a('"fmt"', h), u > 0 && a('"time"', h), p && a('"crypto/tls"', h), t.text && a('"strings"', h), a('"net/http"', h), f && a('"io"', h), a(")"), o(), a("func main() {"), o()), p && (a("insecureTransport := http.DefaultTransport.(*http.Transport).Clone()", h), a("insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}", h));
|
|
521
|
-
const g = u > 0,
|
|
522
|
-
return
|
|
523
|
-
a(`req.Header.Add("${
|
|
521
|
+
const g = u > 0, b = g || p, m = b ? "client" : "http.DefaultClient";
|
|
522
|
+
return b && (a("client := http.Client{", h), g && a(`Timeout: time.Duration(${u} * time.Second),`, h + 1), p && a("Transport: insecureTransport,", h + 1), a("}", h), o()), a(`url := "${n}"`, h), o(), t.text ? (a(`payload := strings.NewReader(${JSON.stringify(t.text)})`, h), o(), a(`req, ${d} := http.NewRequest("${e}", url, payload)`, h), o()) : (a(`req, ${d} := http.NewRequest("${e}", url, nil)`, h), o()), y(), Object.keys(r).length && (Object.keys(r).forEach((v) => {
|
|
523
|
+
a(`req.Header.Add("${v}", "${L(r[v])}")`, h);
|
|
524
524
|
}), o()), a(`res, ${d} := ${m}.Do(req)`, h), y(), f && (o(), a("defer res.Body.Close()", h), a(`body, ${d} := io.ReadAll(res.Body)`, h), y()), o(), f && a("fmt.Println(string(body))", h), c && (o(), a("}")), i();
|
|
525
525
|
}
|
|
526
526
|
} }
|
|
@@ -545,7 +545,7 @@ const io = {
|
|
|
545
545
|
autoContentLength: !0,
|
|
546
546
|
autoHost: !0,
|
|
547
547
|
...a
|
|
548
|
-
}, { blank: c, push: l, join: f } = new
|
|
548
|
+
}, { blank: c, push: l, join: f } = new j({
|
|
549
549
|
indent: "",
|
|
550
550
|
join: dr
|
|
551
551
|
});
|
|
@@ -575,12 +575,12 @@ const io = {
|
|
|
575
575
|
extname: ".java"
|
|
576
576
|
},
|
|
577
577
|
convert: ({ method: t, allHeaders: e, postData: r, fullUrl: n }, s) => {
|
|
578
|
-
const { blank: o, push: a, join: i } = new
|
|
578
|
+
const { blank: o, push: a, join: i } = new j({ indent: {
|
|
579
579
|
indent: " ",
|
|
580
580
|
...s
|
|
581
581
|
}.indent });
|
|
582
582
|
return a("AsyncHttpClient client = new DefaultAsyncHttpClient();"), a(`client.prepare("${t.toUpperCase()}", "${n}")`), Object.keys(e).forEach((c) => {
|
|
583
|
-
a(`.setHeader("${c}", "${
|
|
583
|
+
a(`.setHeader("${c}", "${L(e[c])}")`, 1);
|
|
584
584
|
}), r.text && a(`.setBody(${JSON.stringify(r.text)})`, 1), a(".execute()", 1), a(".toCompletableFuture()", 1), a(".thenAccept(System.out::println)", 1), a(".join();", 1), o(), a("client.close();"), i();
|
|
585
585
|
}
|
|
586
586
|
},
|
|
@@ -593,12 +593,12 @@ const io = {
|
|
|
593
593
|
extname: ".java"
|
|
594
594
|
},
|
|
595
595
|
convert: ({ allHeaders: t, fullUrl: e, method: r, postData: n }, s) => {
|
|
596
|
-
const { push: o, join: a } = new
|
|
596
|
+
const { push: o, join: a } = new j({ indent: {
|
|
597
597
|
indent: " ",
|
|
598
598
|
...s
|
|
599
599
|
}.indent });
|
|
600
600
|
return o("HttpRequest request = HttpRequest.newBuilder()"), o(`.uri(URI.create("${e}"))`, 2), Object.keys(t).forEach((i) => {
|
|
601
|
-
o(`.header("${i}", "${
|
|
601
|
+
o(`.header("${i}", "${L(t[i])}")`, 2);
|
|
602
602
|
}), n.text ? o(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.ofString(${JSON.stringify(n.text)}))`, 2) : o(`.method("${r.toUpperCase()}", HttpRequest.BodyPublishers.noBody())`, 2), o(".build();", 2), o("HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"), o("System.out.println(response.body());"), a();
|
|
603
603
|
}
|
|
604
604
|
},
|
|
@@ -611,7 +611,7 @@ const io = {
|
|
|
611
611
|
extname: ".java"
|
|
612
612
|
},
|
|
613
613
|
convert: ({ postData: t, method: e, fullUrl: r, allHeaders: n }, s) => {
|
|
614
|
-
const { push: o, blank: a, join: i } = new
|
|
614
|
+
const { push: o, blank: a, join: i } = new j({ indent: {
|
|
615
615
|
indent: " ",
|
|
616
616
|
...s
|
|
617
617
|
}.indent }), c = [
|
|
@@ -628,7 +628,7 @@ const io = {
|
|
|
628
628
|
"PATCH"
|
|
629
629
|
];
|
|
630
630
|
return o("OkHttpClient client = new OkHttpClient();"), a(), t.text && (t.boundary ? o(`MediaType mediaType = MediaType.parse("${t.mimeType}; boundary=${t.boundary}");`) : o(`MediaType mediaType = MediaType.parse("${t.mimeType}");`), o(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(t.text)});`)), o("Request request = new Request.Builder()"), o(`.url("${r}")`, 1), c.includes(e.toUpperCase()) ? l.includes(e.toUpperCase()) ? t.text ? o(`.${e.toLowerCase()}(body)`, 1) : o(`.${e.toLowerCase()}(null)`, 1) : o(`.${e.toLowerCase()}()`, 1) : t.text ? o(`.method("${e.toUpperCase()}", body)`, 1) : o(`.method("${e.toUpperCase()}", null)`, 1), Object.keys(n).forEach((f) => {
|
|
631
|
-
o(`.addHeader("${f}", "${
|
|
631
|
+
o(`.addHeader("${f}", "${L(n[f])}")`, 1);
|
|
632
632
|
}), o(".build();", 1), a(), o("Response response = client.newCall(request).execute();"), i();
|
|
633
633
|
}
|
|
634
634
|
},
|
|
@@ -641,7 +641,7 @@ const io = {
|
|
|
641
641
|
extname: ".java"
|
|
642
642
|
},
|
|
643
643
|
convert: ({ method: t, allHeaders: e, postData: r, fullUrl: n }, s) => {
|
|
644
|
-
const { join: o, push: a } = new
|
|
644
|
+
const { join: o, push: a } = new j({ indent: {
|
|
645
645
|
indent: " ",
|
|
646
646
|
...s
|
|
647
647
|
}.indent });
|
|
@@ -654,7 +654,7 @@ const io = {
|
|
|
654
654
|
"HEAD",
|
|
655
655
|
"OPTIONS"
|
|
656
656
|
].includes(t.toUpperCase()) ? a(`HttpResponse<String> response = Unirest.${t.toLowerCase()}("${n}")`) : a(`HttpResponse<String> response = Unirest.customMethod("${t.toUpperCase()}","${n}")`), Object.keys(e).forEach((i) => {
|
|
657
|
-
a(`.header("${i}", "${
|
|
657
|
+
a(`.header("${i}", "${L(e[i])}")`, 1);
|
|
658
658
|
}), r.text && a(`.body(${JSON.stringify(r.text)})`, 1), a(".asString();", 1), o();
|
|
659
659
|
}
|
|
660
660
|
}
|
|
@@ -680,17 +680,17 @@ const io = {
|
|
|
680
680
|
indent: " ",
|
|
681
681
|
cors: !0,
|
|
682
682
|
...s
|
|
683
|
-
}, { blank: a, push: i, join: c } = new
|
|
683
|
+
}, { blank: a, push: i, join: c } = new j({ indent: o.indent });
|
|
684
684
|
switch (t.mimeType) {
|
|
685
685
|
case "application/json":
|
|
686
|
-
i(`const data = JSON.stringify(${
|
|
686
|
+
i(`const data = JSON.stringify(${ie(t.jsonObj, { indent: o.indent })});`), a();
|
|
687
687
|
break;
|
|
688
688
|
case "multipart/form-data":
|
|
689
689
|
if (!t.params) break;
|
|
690
690
|
if (i("const data = new FormData();"), t.params.forEach((f) => {
|
|
691
691
|
i(`data.append('${f.name}', '${f.value || f.fileName || ""}');`);
|
|
692
|
-
}),
|
|
693
|
-
const f =
|
|
692
|
+
}), ot(e, "content-type") && (l = ce(e, "content-type")) != null && l.includes("boundary")) {
|
|
693
|
+
const f = B(e, "content-type");
|
|
694
694
|
f && delete e[f];
|
|
695
695
|
}
|
|
696
696
|
a();
|
|
@@ -713,7 +713,7 @@ const io = {
|
|
|
713
713
|
installation: () => "npm install axios --save"
|
|
714
714
|
},
|
|
715
715
|
convert: ({ allHeaders: t, method: e, url: r, queryObj: n, postData: s }, o) => {
|
|
716
|
-
const { blank: a, push: i, join: c, addPostProcessor: l } = new
|
|
716
|
+
const { blank: a, push: i, join: c, addPostProcessor: l } = new j({ indent: {
|
|
717
717
|
indent: " ",
|
|
718
718
|
...o
|
|
719
719
|
}.indent });
|
|
@@ -740,7 +740,7 @@ const io = {
|
|
|
740
740
|
default:
|
|
741
741
|
s.text && (f.data = s.text);
|
|
742
742
|
}
|
|
743
|
-
return i(`const options = ${
|
|
743
|
+
return i(`const options = ${ie(f, {
|
|
744
744
|
indent: " ",
|
|
745
745
|
inlineCharacterLimit: 80
|
|
746
746
|
}).replace('"[form]"', "form")};`), a(), i("try {"), i("const { data } = await axios.request(options);", 1), i("console.log(data);", 1), i("} catch (error) {"), i("console.error(error);", 1), i("}"), c();
|
|
@@ -759,7 +759,7 @@ const io = {
|
|
|
759
759
|
indent: " ",
|
|
760
760
|
credentials: null,
|
|
761
761
|
...s
|
|
762
|
-
}, { blank: a, join: i, push: c } = new
|
|
762
|
+
}, { blank: a, join: i, push: c } = new j({ indent: o.indent }), l = { method: t };
|
|
763
763
|
switch (Object.keys(e).length && (l.headers = e), o.credentials !== null && (l.credentials = o.credentials), r.mimeType) {
|
|
764
764
|
case "application/x-www-form-urlencoded":
|
|
765
765
|
l.body = r.paramsObj ? r.paramsObj : r.text;
|
|
@@ -769,7 +769,7 @@ const io = {
|
|
|
769
769
|
break;
|
|
770
770
|
case "multipart/form-data": {
|
|
771
771
|
if (!r.params) break;
|
|
772
|
-
const f =
|
|
772
|
+
const f = B(e, "content-type");
|
|
773
773
|
f && delete e[f], c("const form = new FormData();"), r.params.forEach((u) => {
|
|
774
774
|
c(`form.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
775
775
|
}), a();
|
|
@@ -778,7 +778,7 @@ const io = {
|
|
|
778
778
|
default:
|
|
779
779
|
r.text && (l.body = r.text);
|
|
780
780
|
}
|
|
781
|
-
return l.headers && !Object.keys(l.headers).length && delete l.headers, c(`const options = ${
|
|
781
|
+
return l.headers && !Object.keys(l.headers).length && delete l.headers, c(`const options = ${ie(l, {
|
|
782
782
|
indent: o.indent,
|
|
783
783
|
inlineCharacterLimit: 80,
|
|
784
784
|
transform: (f, u, p) => {
|
|
@@ -804,7 +804,7 @@ const io = {
|
|
|
804
804
|
const o = {
|
|
805
805
|
indent: " ",
|
|
806
806
|
...s
|
|
807
|
-
}, { blank: a, push: i, join: c } = new
|
|
807
|
+
}, { blank: a, push: i, join: c } = new j({ indent: o.indent }), l = {
|
|
808
808
|
async: !0,
|
|
809
809
|
crossDomain: !0,
|
|
810
810
|
url: t,
|
|
@@ -822,8 +822,8 @@ const io = {
|
|
|
822
822
|
if (!n.params) break;
|
|
823
823
|
if (i("const form = new FormData();"), n.params.forEach((u) => {
|
|
824
824
|
i(`form.append('${u.name}', '${u.value || u.fileName || ""}');`);
|
|
825
|
-
}), l.processData = !1, l.contentType = !1, l.mimeType = "multipart/form-data", l.data = "[form]",
|
|
826
|
-
const u =
|
|
825
|
+
}), l.processData = !1, l.contentType = !1, l.mimeType = "multipart/form-data", l.data = "[form]", ot(r, "content-type") && (f = ce(r, "content-type")) != null && f.includes("boundary")) {
|
|
826
|
+
const u = B(r, "content-type");
|
|
827
827
|
u && delete l.headers[u];
|
|
828
828
|
}
|
|
829
829
|
a();
|
|
@@ -831,7 +831,7 @@ const io = {
|
|
|
831
831
|
default:
|
|
832
832
|
n.text && (l.data = n.text);
|
|
833
833
|
}
|
|
834
|
-
return i(`const settings = ${
|
|
834
|
+
return i(`const settings = ${ie(l, { indent: o.indent }).replace("'[form]'", "form")};`), a(), i("$.ajax(settings).done(res => {"), i("console.log(res);", 1), i("});"), c();
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
837
|
}
|
|
@@ -891,7 +891,7 @@ const io = {
|
|
|
891
891
|
extname: ".kt"
|
|
892
892
|
},
|
|
893
893
|
convert: ({ postData: t, fullUrl: e, method: r, allHeaders: n }, s) => {
|
|
894
|
-
const { blank: o, join: a, push: i } = new
|
|
894
|
+
const { blank: o, join: a, push: i } = new j({ indent: {
|
|
895
895
|
indent: " ",
|
|
896
896
|
...s
|
|
897
897
|
}.indent }), c = [
|
|
@@ -908,7 +908,7 @@ const io = {
|
|
|
908
908
|
"PATCH"
|
|
909
909
|
];
|
|
910
910
|
return i("val client = OkHttpClient()"), o(), t.text && (t.boundary ? i(`val mediaType = MediaType.parse("${t.mimeType}; boundary=${t.boundary}")`) : i(`val mediaType = MediaType.parse("${t.mimeType}")`), i(`val body = RequestBody.create(mediaType, ${JSON.stringify(t.text)})`)), i("val request = Request.Builder()"), i(`.url("${e}")`, 1), c.includes(r.toUpperCase()) ? l.includes(r.toUpperCase()) ? t.text ? i(`.${r.toLowerCase()}(body)`, 1) : i(`.${r.toLowerCase()}(null)`, 1) : i(`.${r.toLowerCase()}()`, 1) : t.text ? i(`.method("${r.toUpperCase()}", body)`, 1) : i(`.method("${r.toUpperCase()}", null)`, 1), Object.keys(n).forEach((f) => {
|
|
911
|
-
i(`.addHeader("${f}", "${
|
|
911
|
+
i(`.addHeader("${f}", "${L(n[f])}")`, 1);
|
|
912
912
|
}), i(".build()", 1), o(), i("val response = client.newCall(request).execute()"), a();
|
|
913
913
|
}
|
|
914
914
|
} }
|
|
@@ -930,28 +930,28 @@ const io = {
|
|
|
930
930
|
},
|
|
931
931
|
convert: ({ uriObj: t, method: e, allHeaders: r, postData: n }, s = {}) => {
|
|
932
932
|
var u;
|
|
933
|
-
const { indent: o = " " } = s, { blank: a, join: i, push: c, unshift: l } = new
|
|
933
|
+
const { indent: o = " " } = s, { blank: a, join: i, push: c, unshift: l } = new j({ indent: o }), f = {
|
|
934
934
|
method: e,
|
|
935
935
|
hostname: t.hostname,
|
|
936
936
|
port: t.port,
|
|
937
937
|
path: t.path,
|
|
938
938
|
headers: r
|
|
939
939
|
};
|
|
940
|
-
switch (c(`const http = require('${(u = t.protocol) == null ? void 0 : u.replace(":", "")}');`), a(), c(`const options = ${
|
|
940
|
+
switch (c(`const http = require('${(u = t.protocol) == null ? void 0 : u.replace(":", "")}');`), a(), c(`const options = ${ie(f, { indent: o })};`), a(), c("const req = http.request(options, function (res) {"), c("const chunks = [];", 1), a(), c("res.on('data', function (chunk) {", 1), c("chunks.push(chunk);", 2), c("});", 1), a(), c("res.on('end', function () {", 1), c("const body = Buffer.concat(chunks);", 2), c("console.log(body.toString());", 2), c("});", 1), c("});"), a(), n.mimeType) {
|
|
941
941
|
case "application/x-www-form-urlencoded":
|
|
942
|
-
n.paramsObj && (l("const qs = require('querystring');"), c(`req.write(qs.stringify(${
|
|
942
|
+
n.paramsObj && (l("const qs = require('querystring');"), c(`req.write(qs.stringify(${ie(n.paramsObj, {
|
|
943
943
|
indent: " ",
|
|
944
944
|
inlineCharacterLimit: 80
|
|
945
945
|
})}));`));
|
|
946
946
|
break;
|
|
947
947
|
case "application/json":
|
|
948
|
-
n.jsonObj && c(`req.write(JSON.stringify(${
|
|
948
|
+
n.jsonObj && c(`req.write(JSON.stringify(${ie(n.jsonObj, {
|
|
949
949
|
indent: " ",
|
|
950
950
|
inlineCharacterLimit: 80
|
|
951
951
|
})}));`);
|
|
952
952
|
break;
|
|
953
953
|
default:
|
|
954
|
-
n.text && c(`req.write(${
|
|
954
|
+
n.text && c(`req.write(${ie(n.text, { indent: o })});`);
|
|
955
955
|
}
|
|
956
956
|
return c("req.end();"), i();
|
|
957
957
|
}
|
|
@@ -966,7 +966,7 @@ const io = {
|
|
|
966
966
|
installation: () => "npm install axios --save"
|
|
967
967
|
},
|
|
968
968
|
convert: ({ method: t, fullUrl: e, allHeaders: r, postData: n }, s) => {
|
|
969
|
-
const { blank: o, join: a, push: i, addPostProcessor: c } = new
|
|
969
|
+
const { blank: o, join: a, push: i, addPostProcessor: c } = new j({ indent: {
|
|
970
970
|
indent: " ",
|
|
971
971
|
...s
|
|
972
972
|
}.indent });
|
|
@@ -987,7 +987,7 @@ const io = {
|
|
|
987
987
|
default:
|
|
988
988
|
n.text && (l.data = n.text);
|
|
989
989
|
}
|
|
990
|
-
return i(`const options = ${
|
|
990
|
+
return i(`const options = ${ie(l, {
|
|
991
991
|
indent: " ",
|
|
992
992
|
inlineCharacterLimit: 80
|
|
993
993
|
})};`), o(), i("axios"), i(".request(options)", 1), i(".then(res => console.log(res.data))", 1), i(".catch(err => console.error(err));", 1), a();
|
|
@@ -1008,7 +1008,7 @@ const io = {
|
|
|
1008
1008
|
...o
|
|
1009
1009
|
};
|
|
1010
1010
|
let i = !1;
|
|
1011
|
-
const { blank: c, push: l, join: f, unshift: u } = new
|
|
1011
|
+
const { blank: c, push: l, join: f, unshift: u } = new j({ indent: a.indent }), p = e, d = { method: t };
|
|
1012
1012
|
switch (Object.keys(n).length && (d.headers = n), r.mimeType) {
|
|
1013
1013
|
case "application/x-www-form-urlencoded":
|
|
1014
1014
|
l("const encodedParams = new URLSearchParams();"), (h = r.params) == null || h.forEach((y) => {
|
|
@@ -1020,7 +1020,7 @@ const io = {
|
|
|
1020
1020
|
break;
|
|
1021
1021
|
case "multipart/form-data": {
|
|
1022
1022
|
if (!r.params) break;
|
|
1023
|
-
const y =
|
|
1023
|
+
const y = B(n, "content-type");
|
|
1024
1024
|
y && delete n[y], l("const formData = new FormData();"), r.params.forEach((g) => {
|
|
1025
1025
|
if (!g.fileName && !g.contentType) {
|
|
1026
1026
|
l(`formData.append('${g.name}', '${g.value}');`);
|
|
@@ -1034,13 +1034,13 @@ const io = {
|
|
|
1034
1034
|
r.text && (d.body = r.text);
|
|
1035
1035
|
}
|
|
1036
1036
|
if (s.length) {
|
|
1037
|
-
const y = s.map(({ name: g, value:
|
|
1037
|
+
const y = s.map(({ name: g, value: b }) => `${encodeURIComponent(g)}=${encodeURIComponent(b)}`).join("; ");
|
|
1038
1038
|
d.headers || (d.headers = {}), d.headers.cookie = y;
|
|
1039
1039
|
}
|
|
1040
|
-
return l(`const url = '${p}';`), d.headers && !Object.keys(d.headers).length && delete d.headers, l(`const options = ${
|
|
1040
|
+
return l(`const url = '${p}';`), d.headers && !Object.keys(d.headers).length && delete d.headers, l(`const options = ${ie(d, {
|
|
1041
1041
|
indent: " ",
|
|
1042
1042
|
inlineCharacterLimit: 80,
|
|
1043
|
-
transform: (y, g,
|
|
1043
|
+
transform: (y, g, b) => g === "body" && r.mimeType === "application/json" ? `JSON.stringify(${b})` : b
|
|
1044
1044
|
})};`), c(), i && u(`import fs from 'fs';
|
|
1045
1045
|
`), l("fetch(url, options)"), l(".then(res => res.json())", 1), l(".then(json => console.log(json))", 1), l(".catch(err => console.error(err));", 1), f().replace(/'encodedParams'/, "encodedParams").replace(/'formData'/, "formData");
|
|
1046
1046
|
}
|
|
@@ -1089,7 +1089,7 @@ const io = {
|
|
|
1089
1089
|
pretty: !0,
|
|
1090
1090
|
timeout: 10,
|
|
1091
1091
|
...s
|
|
1092
|
-
}, { push: a, join: i, blank: c } = new
|
|
1092
|
+
}, { push: a, join: i, blank: c } = new j({ indent: o.indent }), l = {
|
|
1093
1093
|
hasHeaders: !1,
|
|
1094
1094
|
hasBody: !1
|
|
1095
1095
|
};
|
|
@@ -1143,11 +1143,11 @@ const io = {
|
|
|
1143
1143
|
"patch",
|
|
1144
1144
|
"put",
|
|
1145
1145
|
"options"
|
|
1146
|
-
], { push: i, blank: c, join: l } = new
|
|
1146
|
+
], { push: i, blank: c, join: l } = new j({ indent: o.indent });
|
|
1147
1147
|
i("open Cohttp_lwt_unix"), i("open Cohttp"), i("open Lwt"), c(), i(`let uri = Uri.of_string "${t}" in`);
|
|
1148
1148
|
const f = Object.keys(e);
|
|
1149
|
-
return f.length === 1 ? i(`let headers = Header.add (Header.init ()) "${f[0]}" "${
|
|
1150
|
-
i(`("${u}", "${
|
|
1149
|
+
return f.length === 1 ? i(`let headers = Header.add (Header.init ()) "${f[0]}" "${L(e[f[0]])}" in`) : f.length > 1 && (i("let headers = Header.add_list (Header.init ()) ["), f.forEach((u) => {
|
|
1150
|
+
i(`("${u}", "${L(e[u])}");`, 1);
|
|
1151
1151
|
}), i("] in")), r.text && i(`let body = Cohttp_lwt_body.of_string ${JSON.stringify(r.text)} in`), c(), i(`Client.call ${f.length ? "~headers " : ""}${r.text ? "~body " : ""}${a.includes(n.toLowerCase()) ? `\`${n.toUpperCase()}` : `(Code.method_of_string "${n}")`} uri`), i(">>= fun (res, body_stream) ->"), i("(* Do stuff with the result *)", 1), l();
|
|
1152
1152
|
}
|
|
1153
1153
|
} }
|
|
@@ -1160,7 +1160,7 @@ const io = {
|
|
|
1160
1160
|
case "[object Undefined]":
|
|
1161
1161
|
return "null";
|
|
1162
1162
|
case "[object String]":
|
|
1163
|
-
return `'${
|
|
1163
|
+
return `'${He(t, {
|
|
1164
1164
|
delimiter: "'",
|
|
1165
1165
|
escapeNewlines: !1
|
|
1166
1166
|
})}'`;
|
|
@@ -1229,7 +1229,7 @@ ${r}]`;
|
|
|
1229
1229
|
extname: ".php"
|
|
1230
1230
|
},
|
|
1231
1231
|
convert: ({ uriObj: t, postData: e, fullUrl: r, method: n, httpVersion: s, cookies: o, headersObj: a }, i = {}) => {
|
|
1232
|
-
const { closingTag: c = !1, indent: l = " ", maxRedirects: f = 10, namedErrors: u = !1, noTags: p = !1, shortTags: d = !1, timeout: h = 30 } = i, { push: y, blank: g, join:
|
|
1232
|
+
const { closingTag: c = !1, indent: l = " ", maxRedirects: f = 10, namedErrors: u = !1, noTags: p = !1, shortTags: d = !1, timeout: h = 30 } = i, { push: y, blank: g, join: b } = new j({ indent: l });
|
|
1233
1233
|
p || (y(d ? "<?" : "<?php"), g()), y("$curl = curl_init();"), g();
|
|
1234
1234
|
const m = [
|
|
1235
1235
|
{
|
|
@@ -1279,19 +1279,19 @@ ${r}]`;
|
|
|
1279
1279
|
}
|
|
1280
1280
|
];
|
|
1281
1281
|
y("curl_setopt_array($curl, [");
|
|
1282
|
-
const
|
|
1282
|
+
const v = new j({
|
|
1283
1283
|
indent: l,
|
|
1284
1284
|
join: `
|
|
1285
1285
|
${l}`
|
|
1286
1286
|
});
|
|
1287
|
-
m.forEach(({ value:
|
|
1288
|
-
|
|
1287
|
+
m.forEach(({ value: w, name: C, escape: T }) => {
|
|
1288
|
+
w != null && v.push(`${C} => ${T ? JSON.stringify(w) : w},`);
|
|
1289
1289
|
});
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1293
|
-
return
|
|
1294
|
-
${l}${l}`), 1),
|
|
1290
|
+
const O = o.map((w) => `${encodeURIComponent(w.name)}=${encodeURIComponent(w.value)}`);
|
|
1291
|
+
O.length && v.push(`CURLOPT_COOKIE => "${O.join("; ")}",`);
|
|
1292
|
+
const $ = Object.keys(a).sort().map((w) => `"${w}: ${L(a[w])}"`);
|
|
1293
|
+
return $.length && (v.push("CURLOPT_HTTPHEADER => ["), v.push($.join(`,
|
|
1294
|
+
${l}${l}`), 1), v.push("],")), y(v.join(), 1), y("]);"), g(), y("$response = curl_exec($curl);"), y("$err = curl_error($curl);"), g(), y("curl_close($curl);"), g(), y("if ($err) {"), y(u ? 'echo array_flip(get_defined_constants(true)["curl"])[$err];' : 'echo "cURL Error #:" . $err;', 1), y("} else {"), y("echo $response;", 1), y("}"), !p && c && (g(), y("?>")), b();
|
|
1295
1295
|
}
|
|
1296
1296
|
},
|
|
1297
1297
|
guzzle: {
|
|
@@ -1311,28 +1311,28 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1311
1311
|
noTags: !1,
|
|
1312
1312
|
shortTags: !1,
|
|
1313
1313
|
...o
|
|
1314
|
-
}, { push: i, blank: c, join: l } = new
|
|
1314
|
+
}, { push: i, blank: c, join: l } = new j({ indent: a.indent }), { code: f, push: u, join: p } = new j({ indent: a.indent });
|
|
1315
1315
|
switch (a.noTags || i(a.shortTags ? "<?" : "<?php"), i("require_once('vendor/autoload.php');"), c(), t.mimeType) {
|
|
1316
1316
|
case "application/x-www-form-urlencoded":
|
|
1317
1317
|
u(`'form_params' => ${A(t.paramsObj, a.indent + a.indent, a.indent)},`, 1);
|
|
1318
1318
|
break;
|
|
1319
1319
|
case "multipart/form-data": {
|
|
1320
1320
|
const g = [];
|
|
1321
|
-
if (t.params && t.params.forEach((
|
|
1322
|
-
if (
|
|
1321
|
+
if (t.params && t.params.forEach((b) => {
|
|
1322
|
+
if (b.fileName) {
|
|
1323
1323
|
const m = {
|
|
1324
|
-
name:
|
|
1325
|
-
filename:
|
|
1326
|
-
contents:
|
|
1324
|
+
name: b.name,
|
|
1325
|
+
filename: b.fileName,
|
|
1326
|
+
contents: b.value
|
|
1327
1327
|
};
|
|
1328
|
-
|
|
1329
|
-
} else
|
|
1330
|
-
name:
|
|
1331
|
-
contents:
|
|
1328
|
+
b.contentType && (m.headers = { "Content-Type": b.contentType }), g.push(m);
|
|
1329
|
+
} else b.value && g.push({
|
|
1330
|
+
name: b.name,
|
|
1331
|
+
contents: b.value
|
|
1332
1332
|
});
|
|
1333
|
-
}), g.length && (u(`'multipart' => ${A(g, a.indent + a.indent, a.indent)}`, 1),
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1333
|
+
}), g.length && (u(`'multipart' => ${A(g, a.indent + a.indent, a.indent)}`, 1), ot(s, "content-type") && (y = ce(s, "content-type")) != null && y.indexOf("boundary"))) {
|
|
1334
|
+
const b = B(s, "content-type");
|
|
1335
|
+
b && delete s[b];
|
|
1336
1336
|
}
|
|
1337
1337
|
break;
|
|
1338
1338
|
}
|
|
@@ -1353,7 +1353,7 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1353
1353
|
extname: ".php"
|
|
1354
1354
|
},
|
|
1355
1355
|
convert: ({ method: t, url: e, postData: r, queryObj: n, headersObj: s, cookiesObj: o }, a = {}) => {
|
|
1356
|
-
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new
|
|
1356
|
+
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new j({ indent: c });
|
|
1357
1357
|
switch (l || (u(f ? "<?" : "<?php"), p()), hr.includes(t.toUpperCase()) || u(`HttpRequest::methodRegister('${t}');`), u("$request = new HttpRequest();"), u(`$request->setUrl(${A(e)});`), hr.includes(t.toUpperCase()) ? u(`$request->setMethod(HTTP_METH_${t.toUpperCase()});`) : u(`$request->setMethod(HttpRequest::HTTP_METH_${t.toUpperCase()});`), p(), Object.keys(n).length && (u(`$request->setQueryData(${A(n, c)});`), p()), Object.keys(s).length && (u(`$request->setHeaders(${A(s, c)});`), p()), Object.keys(o).length && (u(`$request->setCookies(${A(o, c)});`), p()), r.mimeType) {
|
|
1358
1358
|
case "application/x-www-form-urlencoded":
|
|
1359
1359
|
u(`$request->setContentType(${A(r.mimeType)});`), u(`$request->setPostFields(${A(r.paramsObj, c)});`), p();
|
|
@@ -1377,7 +1377,7 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1377
1377
|
},
|
|
1378
1378
|
convert: ({ postData: t, headersObj: e, method: r, queryObj: n, cookiesObj: s, url: o }, a = {}) => {
|
|
1379
1379
|
var y;
|
|
1380
|
-
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new
|
|
1380
|
+
const { closingTag: i = !1, indent: c = " ", noTags: l = !1, shortTags: f = !1 } = a, { push: u, blank: p, join: d } = new j({ indent: c });
|
|
1381
1381
|
let h = !1;
|
|
1382
1382
|
switch (l || (u(f ? "<?" : "<?php"), p()), u("$client = new http\\Client;"), u("$request = new http\\Client\\Request;"), p(), t.mimeType) {
|
|
1383
1383
|
case "application/x-www-form-urlencoded":
|
|
@@ -1385,23 +1385,23 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1385
1385
|
break;
|
|
1386
1386
|
case "multipart/form-data": {
|
|
1387
1387
|
if (!t.params) break;
|
|
1388
|
-
const g = [],
|
|
1389
|
-
t.params.forEach(({ name:
|
|
1390
|
-
if (
|
|
1388
|
+
const g = [], b = {};
|
|
1389
|
+
t.params.forEach(({ name: O, fileName: $, value: w, contentType: C }) => {
|
|
1390
|
+
if ($) {
|
|
1391
1391
|
g.push({
|
|
1392
|
-
name:
|
|
1393
|
-
type:
|
|
1394
|
-
file:
|
|
1395
|
-
data:
|
|
1392
|
+
name: O,
|
|
1393
|
+
type: C,
|
|
1394
|
+
file: $,
|
|
1395
|
+
data: w
|
|
1396
1396
|
});
|
|
1397
1397
|
return;
|
|
1398
1398
|
}
|
|
1399
|
-
|
|
1399
|
+
w && (b[O] = w);
|
|
1400
1400
|
});
|
|
1401
|
-
const m = Object.keys(
|
|
1402
|
-
if (u("$body = new http\\Message\\Body;"), u(`$body->addForm(${m}, ${
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1401
|
+
const m = Object.keys(b).length ? A(b, c) : "null", v = g.length ? A(g, c) : "null";
|
|
1402
|
+
if (u("$body = new http\\Message\\Body;"), u(`$body->addForm(${m}, ${v});`), ot(e, "content-type") && (y = ce(e, "content-type")) != null && y.indexOf("boundary")) {
|
|
1403
|
+
const O = B(e, "content-type");
|
|
1404
|
+
O && delete e[O];
|
|
1405
1405
|
}
|
|
1406
1406
|
p(), h = !0;
|
|
1407
1407
|
break;
|
|
@@ -1417,7 +1417,7 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
}, rn = (t) => ({ method: r, headersObj: n, cookies: s, uriObj: o, fullUrl: a, postData: i, allHeaders: c }) => {
|
|
1420
|
-
const { push: l, join: f } = new
|
|
1420
|
+
const { push: l, join: f } = new j();
|
|
1421
1421
|
if (![
|
|
1422
1422
|
"GET",
|
|
1423
1423
|
"POST",
|
|
@@ -1429,10 +1429,10 @@ ${l}${l}`), 1), b.push("],")), y(b.join(), 1), y("]);"), g(), y("$response = cur
|
|
|
1429
1429
|
].includes(r.toUpperCase())) return "Method not supported";
|
|
1430
1430
|
const u = [], p = Object.keys(n);
|
|
1431
1431
|
return p.length && (l("$headers=@{}"), p.forEach((d) => {
|
|
1432
|
-
d !== "connection" && l(`$headers.Add("${d}", "${
|
|
1432
|
+
d !== "connection" && l(`$headers.Add("${d}", "${He(n[d], { escapeChar: "`" })}")`);
|
|
1433
1433
|
}), u.push("-Headers $headers")), s.length && (l("$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession"), s.forEach((d) => {
|
|
1434
1434
|
l("$cookie = New-Object System.Net.Cookie"), l(`$cookie.Name = '${d.name}'`), l(`$cookie.Value = '${d.value}'`), l(`$cookie.Domain = '${o.host}'`), l("$session.Cookies.Add($cookie)");
|
|
1435
|
-
}), u.push("-WebSession $session")), i.text && (u.push(`-ContentType '${
|
|
1435
|
+
}), u.push("-WebSession $session")), i.text && (u.push(`-ContentType '${He(ce(c, "content-type"), {
|
|
1436
1436
|
delimiter: "'",
|
|
1437
1437
|
escapeChar: "`"
|
|
1438
1438
|
})}'`), u.push(`-Body '${i.text}'`)), l(`$response = ${t} -Uri '${a}' -Method ${r} ${u.join(" ")}`.trim()), f();
|
|
@@ -1521,7 +1521,7 @@ const Oe = (t, e, r) => {
|
|
|
1521
1521
|
indent: " ",
|
|
1522
1522
|
pretty: !0,
|
|
1523
1523
|
...s
|
|
1524
|
-
}, { push: a, blank: i, join: c, addPostProcessor: l } = new
|
|
1524
|
+
}, { push: a, blank: i, join: c, addPostProcessor: l } = new j({ indent: o.indent });
|
|
1525
1525
|
a("import requests"), i(), a(`url = "${t}"`), i();
|
|
1526
1526
|
const f = r;
|
|
1527
1527
|
let u = {};
|
|
@@ -1537,7 +1537,7 @@ const Oe = (t, e, r) => {
|
|
|
1537
1537
|
m.fileName ? (m.contentType ? p[m.name] = `('${m.fileName}', open('${m.fileName}', 'rb'), '${m.contentType}')` : p[m.name] = `('${m.fileName}', open('${m.fileName}', 'rb'))`, d = !0) : (u[m.name] = m.value, h = !0);
|
|
1538
1538
|
}), d) {
|
|
1539
1539
|
a(`files = ${Oe(p, o)}`), h && a(`payload = ${Oe(u, o)}`);
|
|
1540
|
-
const m =
|
|
1540
|
+
const m = B(f, "content-type");
|
|
1541
1541
|
m && delete f[m];
|
|
1542
1542
|
} else {
|
|
1543
1543
|
const m = JSON.stringify(e.text);
|
|
@@ -1557,16 +1557,16 @@ const Oe = (t, e, r) => {
|
|
|
1557
1557
|
const g = Object.keys(f).length;
|
|
1558
1558
|
if (g === 0 && (h || d)) i();
|
|
1559
1559
|
else if (g === 1) Object.keys(f).forEach((m) => {
|
|
1560
|
-
a(`headers = {"${m}": "${
|
|
1560
|
+
a(`headers = {"${m}": "${L(f[m])}"}`), i();
|
|
1561
1561
|
});
|
|
1562
1562
|
else if (g > 1) {
|
|
1563
1563
|
let m = 1;
|
|
1564
|
-
a("headers = {"), Object.keys(f).forEach((
|
|
1565
|
-
a(m !== g ? `"${
|
|
1564
|
+
a("headers = {"), Object.keys(f).forEach((v) => {
|
|
1565
|
+
a(m !== g ? `"${v}": "${L(f[v])}",` : `"${v}": "${L(f[v])}"`, 1), m += 1;
|
|
1566
1566
|
}), a("}"), i();
|
|
1567
1567
|
}
|
|
1568
|
-
let
|
|
1569
|
-
return h && (y ?
|
|
1568
|
+
let b = $o.includes(n) ? `response = requests.${n.toLowerCase()}(url` : `response = requests.request("${n}", url`;
|
|
1569
|
+
return h && (y ? b += ", json=payload" : b += ", data=payload"), d && (b += ", files=files"), g > 0 && (b += ", headers=headers"), b += ")", a(b), i(), a("print(response.text)"), c();
|
|
1570
1570
|
}
|
|
1571
1571
|
} }
|
|
1572
1572
|
}, wo = {
|
|
@@ -1584,13 +1584,13 @@ const Oe = (t, e, r) => {
|
|
|
1584
1584
|
extname: ".r"
|
|
1585
1585
|
},
|
|
1586
1586
|
convert: ({ url: t, queryObj: e, queryString: r, postData: n, allHeaders: s, method: o }) => {
|
|
1587
|
-
const { push: a, blank: i, join: c } = new
|
|
1587
|
+
const { push: a, blank: i, join: c } = new j();
|
|
1588
1588
|
a("library(httr)"), i(), a(`url <- "${t}"`), i();
|
|
1589
1589
|
const l = e;
|
|
1590
1590
|
delete e.key;
|
|
1591
1591
|
const f = Object.keys(l).length;
|
|
1592
|
-
r.length === 1 ? (a(`queryString <- list(${Object.keys(l)} = "${Object.values(l).toString()}")`), i()) : r.length > 1 && (a("queryString <- list("), Object.keys(l).forEach((
|
|
1593
|
-
|
|
1592
|
+
r.length === 1 ? (a(`queryString <- list(${Object.keys(l)} = "${Object.values(l).toString()}")`), i()) : r.length > 1 && (a("queryString <- list("), Object.keys(l).forEach(($, w) => {
|
|
1593
|
+
w !== f - 1 ? a(` ${$} = "${l[$].toString()}",`) : a(` ${$} = "${l[$].toString()}"`);
|
|
1594
1594
|
}), a(")"), i());
|
|
1595
1595
|
const u = JSON.stringify(n.text);
|
|
1596
1596
|
if (u && (a(`payload <- ${u}`), i()), n.text || n.jsonObj || n.params) switch (n.mimeType) {
|
|
@@ -1607,20 +1607,20 @@ const Oe = (t, e, r) => {
|
|
|
1607
1607
|
a('encode <- "raw"'), i();
|
|
1608
1608
|
break;
|
|
1609
1609
|
}
|
|
1610
|
-
const p =
|
|
1610
|
+
const p = ce(s, "cookie"), d = ce(s, "accept"), h = p ? `set_cookies(\`${String(p).replace(/;/g, '", `').replace(/` /g, "`").replace(/[=]/g, '` = "')}")` : void 0, y = d ? `accept("${L(d)}")` : void 0, g = `content_type("${L(n.mimeType)}")`, b = Object.entries(s).filter(([$]) => ![
|
|
1611
1611
|
"cookie",
|
|
1612
1612
|
"accept",
|
|
1613
1613
|
"content-type"
|
|
1614
|
-
].includes(
|
|
1615
|
-
let
|
|
1616
|
-
u && (
|
|
1617
|
-
const
|
|
1614
|
+
].includes($.toLowerCase())).map(([$, w]) => `'${$}' = '${Ce(w)}'`).join(", "), m = b ? `add_headers(${b})` : void 0;
|
|
1615
|
+
let v = `response <- VERB("${o}", url`;
|
|
1616
|
+
u && (v += ", body = payload"), r.length && (v += ", query = queryString");
|
|
1617
|
+
const O = [
|
|
1618
1618
|
m,
|
|
1619
1619
|
g,
|
|
1620
1620
|
y,
|
|
1621
1621
|
h
|
|
1622
|
-
].filter((
|
|
1623
|
-
return
|
|
1622
|
+
].filter(($) => !!$).join(", ");
|
|
1623
|
+
return O && (v += `, ${O}`), (n.text || n.jsonObj || n.params) && (v += ", encode = encode"), v += ")", a(v), i(), a('content(response, "text")'), c();
|
|
1624
1624
|
}
|
|
1625
1625
|
} }
|
|
1626
1626
|
}, So = {
|
|
@@ -1639,7 +1639,7 @@ const Oe = (t, e, r) => {
|
|
|
1639
1639
|
extname: ".rb"
|
|
1640
1640
|
},
|
|
1641
1641
|
convert: ({ uriObj: t, method: e, fullUrl: r, postData: n, allHeaders: s }) => {
|
|
1642
|
-
const { push: o, blank: a, join: i } = new
|
|
1642
|
+
const { push: o, blank: a, join: i } = new j();
|
|
1643
1643
|
o("require 'uri'"), o("require 'net/http'"), a();
|
|
1644
1644
|
const c = e.toUpperCase(), l = [
|
|
1645
1645
|
"GET",
|
|
@@ -1671,7 +1671,7 @@ const Oe = (t, e, r) => {
|
|
|
1671
1671
|
extname: ".rb"
|
|
1672
1672
|
},
|
|
1673
1673
|
convert: ({ uriObj: t, queryObj: e, method: r, postData: n, allHeaders: s }) => {
|
|
1674
|
-
const { push: o, blank: a, join: i } = new
|
|
1674
|
+
const { push: o, blank: a, join: i } = new j(), c = r.toUpperCase();
|
|
1675
1675
|
if (![
|
|
1676
1676
|
"GET",
|
|
1677
1677
|
"POST",
|
|
@@ -1754,41 +1754,41 @@ const Te = (t, e, r) => {
|
|
|
1754
1754
|
...o
|
|
1755
1755
|
};
|
|
1756
1756
|
let i = 0;
|
|
1757
|
-
const { push: c, blank: l, join: f, pushToLast: u, unshift: p } = new
|
|
1757
|
+
const { push: c, blank: l, join: f, pushToLast: u, unshift: p } = new j({ indent: a.indent });
|
|
1758
1758
|
c("use reqwest;", i), l(), c("#[tokio::main]", i), c("pub async fn main() {", i), i += 1, c(`let url = "${e}";`, i), l();
|
|
1759
1759
|
let d = !1;
|
|
1760
1760
|
if (Object.keys(t).length) {
|
|
1761
1761
|
d = !0, c("let querystring = [", i), i += 1;
|
|
1762
|
-
for (const [
|
|
1763
|
-
else c(`("${
|
|
1762
|
+
for (const [w, C] of Object.entries(t)) if (Array.isArray(C)) for (const T of C) c(`("${w}", "${decodeURIComponent(T)}"),`, i);
|
|
1763
|
+
else c(`("${w}", "${decodeURIComponent(String(C))}"),`, i);
|
|
1764
1764
|
i -= 1, c("];", i), l();
|
|
1765
1765
|
}
|
|
1766
1766
|
let h = {};
|
|
1767
1767
|
const y = {};
|
|
1768
|
-
let g = !1,
|
|
1768
|
+
let g = !1, b = !1, m = !1, v = !1, O = !1;
|
|
1769
1769
|
switch (r.mimeType) {
|
|
1770
1770
|
case "application/json":
|
|
1771
|
-
r.jsonObj && c(`let payload = ${Te(r.jsonObj, a, i)};`, i),
|
|
1771
|
+
r.jsonObj && c(`let payload = ${Te(r.jsonObj, a, i)};`, i), v = !0;
|
|
1772
1772
|
break;
|
|
1773
1773
|
case "multipart/form-data":
|
|
1774
|
-
if (
|
|
1774
|
+
if (O = !0, !r.params) {
|
|
1775
1775
|
c("let form = reqwest::multipart::Form::new()", i), c('.text("", "");', i + 1);
|
|
1776
1776
|
break;
|
|
1777
1777
|
}
|
|
1778
|
-
if (h = {}, r.params.forEach((
|
|
1779
|
-
|
|
1778
|
+
if (h = {}, r.params.forEach((w) => {
|
|
1779
|
+
w.fileName ? (y[w.name] = w.fileName, g = !0) : h[w.name] = w.value;
|
|
1780
1780
|
}), g) {
|
|
1781
|
-
for (const
|
|
1781
|
+
for (const w of To) c(w, i);
|
|
1782
1782
|
l();
|
|
1783
1783
|
}
|
|
1784
1784
|
c("let form = reqwest::multipart::Form::new()", i);
|
|
1785
|
-
for (const [
|
|
1786
|
-
for (const [
|
|
1785
|
+
for (const [w, C] of Object.entries(y)) c(`.part("${w}", file_to_part("${C}").await)`, i + 1);
|
|
1786
|
+
for (const [w, C] of Object.entries(h)) c(`.text("${w}", "${C}")`, i + 1);
|
|
1787
1787
|
u(";");
|
|
1788
1788
|
break;
|
|
1789
1789
|
default:
|
|
1790
1790
|
if (r.mimeType === "application/x-www-form-urlencoded" && r.paramsObj) {
|
|
1791
|
-
c(`let payload = ${Te(r.paramsObj, a, i)};`, i),
|
|
1791
|
+
c(`let payload = ${Te(r.paramsObj, a, i)};`, i), b = !0;
|
|
1792
1792
|
break;
|
|
1793
1793
|
}
|
|
1794
1794
|
if (r.text) {
|
|
@@ -1796,8 +1796,8 @@ const Te = (t, e, r) => {
|
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
|
-
(
|
|
1800
|
-
const
|
|
1799
|
+
(b || v) && p("use serde_json::json;"), (b || v || m || O) && l();
|
|
1800
|
+
const $ = Object.entries(n).filter(([w]) => !(w.toLowerCase() === "content-type" && O));
|
|
1801
1801
|
switch (c("let client = reqwest::Client::new();", i), s) {
|
|
1802
1802
|
case "POST":
|
|
1803
1803
|
c("let response = client.post(url)", i);
|
|
@@ -1809,9 +1809,9 @@ const Te = (t, e, r) => {
|
|
|
1809
1809
|
c(`let response = client.request(reqwest::Method::from_str("${s}").unwrap(), url)`, i), p("use std::str::FromStr;");
|
|
1810
1810
|
break;
|
|
1811
1811
|
}
|
|
1812
|
-
d && c(".query(&querystring)", i + 1),
|
|
1813
|
-
for (const [
|
|
1814
|
-
return
|
|
1812
|
+
d && c(".query(&querystring)", i + 1), O && c(".multipart(form)", i + 1);
|
|
1813
|
+
for (const [w, C] of $) c(`.header("${w}", ${Te(C, a)})`, i + 1);
|
|
1814
|
+
return v && c(".json(&payload)", i + 1), b && c(".form(&payload)", i + 1), m && c(".body(payload)", i + 1), c(".send()", i + 1), c(".await;", i + 1), l(), c("let results = response.unwrap()", i), c(".json::<serde_json::Value>()", i + 1), c(".await", i + 1), c(".unwrap();", i + 1), l(), c('println!("{}", results);', i), c(`}
|
|
1815
1815
|
`), f();
|
|
1816
1816
|
}
|
|
1817
1817
|
}, To = [
|
|
@@ -1829,7 +1829,7 @@ const Te = (t, e, r) => {
|
|
|
1829
1829
|
cli: "rust"
|
|
1830
1830
|
},
|
|
1831
1831
|
clientsById: { reqwest: Oo }
|
|
1832
|
-
},
|
|
1832
|
+
}, M = (t = "") => /^[a-z0-9-_/.@%^=:]+$/i.test(t) ? t : `'${t.replace(/'/g, "'\\''")}'`, Eo = (t) => t.replace(/\r/g, "\\r").replace(/\n/g, "\\n"), jo = {
|
|
1833
1833
|
"http1.0": "0",
|
|
1834
1834
|
"url ": "",
|
|
1835
1835
|
cookie: "b",
|
|
@@ -1862,53 +1862,53 @@ const Te = (t, e, r) => {
|
|
|
1862
1862
|
extname: ".sh"
|
|
1863
1863
|
},
|
|
1864
1864
|
convert: ({ fullUrl: t, method: e, httpVersion: r, headersObj: n, allHeaders: s, postData: o }, a = {}) => {
|
|
1865
|
-
var
|
|
1866
|
-
const { binary: i = !1, globOff: c = !1, indent: l = " ", insecureSkipVerify: f = !1, short: u = !1 } = a, p = " ", { push: d, join: h } = new
|
|
1865
|
+
var b;
|
|
1866
|
+
const { binary: i = !1, globOff: c = !1, indent: l = " ", insecureSkipVerify: f = !1, short: u = !1 } = a, p = " ", { push: d, join: h } = new j({
|
|
1867
1867
|
...typeof l == "string" ? { indent: l } : {},
|
|
1868
1868
|
join: l !== !1 ? ` \\
|
|
1869
1869
|
${l}` : " "
|
|
1870
1870
|
}), y = Po(u);
|
|
1871
|
-
let g =
|
|
1872
|
-
if (d(`curl ${y("request")} ${e}`), c && (g = unescape(g), d(y("globoff"))), d(`${y("url ")}${g}`), f && d(y("insecure")), r === "HTTP/1.0" && d(y("http1.0")),
|
|
1873
|
-
const m =
|
|
1871
|
+
let g = M(t);
|
|
1872
|
+
if (d(`curl ${y("request")} ${e}`), c && (g = unescape(g), d(y("globoff"))), d(`${y("url ")}${g}`), f && d(y("insecure")), r === "HTTP/1.0" && d(y("http1.0")), ce(s, "accept-encoding") && d("--compressed"), o.mimeType === "multipart/form-data") {
|
|
1873
|
+
const m = B(n, "content-type");
|
|
1874
1874
|
if (m) {
|
|
1875
|
-
const
|
|
1876
|
-
if (m &&
|
|
1877
|
-
const
|
|
1878
|
-
n[m] =
|
|
1875
|
+
const v = n[m];
|
|
1876
|
+
if (m && v) {
|
|
1877
|
+
const O = String(v).replace(/; boundary.+?(?=(;|$))/, "");
|
|
1878
|
+
n[m] = O, s[m] = O;
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
}
|
|
1882
1882
|
switch (Object.keys(n).sort().forEach((m) => {
|
|
1883
|
-
const
|
|
1884
|
-
d(`${y("header")} ${
|
|
1885
|
-
}), s.cookie && d(`${y("cookie")} ${
|
|
1883
|
+
const v = `${m}: ${n[m]}`;
|
|
1884
|
+
d(`${y("header")} ${M(v)}`);
|
|
1885
|
+
}), s.cookie && d(`${y("cookie")} ${M(s.cookie)}`), o.mimeType) {
|
|
1886
1886
|
case "multipart/form-data":
|
|
1887
|
-
(
|
|
1888
|
-
let
|
|
1889
|
-
m.fileName ?
|
|
1887
|
+
(b = o.params) == null || b.forEach((m) => {
|
|
1888
|
+
let v = "";
|
|
1889
|
+
m.fileName ? v = `${m.name}='@${m.fileName}'` : v = M(`${m.name}=${m.value}`), d(`${y("form")} ${v}`);
|
|
1890
1890
|
});
|
|
1891
1891
|
break;
|
|
1892
1892
|
case "application/x-www-form-urlencoded":
|
|
1893
1893
|
o.params ? o.params.forEach((m) => {
|
|
1894
|
-
const
|
|
1895
|
-
d(`${i ? "--data-binary" : "--data-urlencode"} ${
|
|
1896
|
-
}) : d(`${i ? "--data-binary" : y("data")} ${
|
|
1894
|
+
const v = encodeURIComponent(m.name), O = v !== m.name ? v : m.name;
|
|
1895
|
+
d(`${i ? "--data-binary" : "--data-urlencode"} ${M(`${O}=${m.value}`)}`);
|
|
1896
|
+
}) : d(`${i ? "--data-binary" : y("data")} ${M(o.text)}`);
|
|
1897
1897
|
break;
|
|
1898
1898
|
default: {
|
|
1899
1899
|
if (!o.text) break;
|
|
1900
1900
|
let m = !1;
|
|
1901
1901
|
if (Qn(o.mimeType) && o.text.length > 20)
|
|
1902
1902
|
try {
|
|
1903
|
-
const
|
|
1903
|
+
const v = JSON.parse(o.text);
|
|
1904
1904
|
m = !0, o.text.indexOf("'") > 0 ? d(`${i ? "--data-binary" : y("data")} @- <<EOF
|
|
1905
|
-
${JSON.stringify(
|
|
1905
|
+
${JSON.stringify(v, null, p)}
|
|
1906
1906
|
EOF`) : d(`${i ? "--data-binary" : y("data")} '
|
|
1907
|
-
${JSON.stringify(
|
|
1907
|
+
${JSON.stringify(v, null, p)}
|
|
1908
1908
|
'`);
|
|
1909
1909
|
} catch {
|
|
1910
1910
|
}
|
|
1911
|
-
m || d(`${i ? "--data-binary" : y("data")} ${
|
|
1911
|
+
m || d(`${i ? "--data-binary" : y("data")} ${M(o.text)}`);
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
1914
|
return h();
|
|
@@ -1939,7 +1939,7 @@ ${JSON.stringify(b, null, p)}
|
|
|
1939
1939
|
verbose: !1,
|
|
1940
1940
|
verify: !1,
|
|
1941
1941
|
...a
|
|
1942
|
-
}, { push: c, join: l, unshift: f } = new
|
|
1942
|
+
}, { push: c, join: l, unshift: f } = new j({
|
|
1943
1943
|
indent: i.indent,
|
|
1944
1944
|
join: i.indent !== !1 ? ` \\
|
|
1945
1945
|
${i.indent}` : " "
|
|
@@ -1948,16 +1948,16 @@ ${i.indent}` : " "
|
|
|
1948
1948
|
const p = [];
|
|
1949
1949
|
i.headers && p.push(i.short ? "-h" : "--headers"), i.body && p.push(i.short ? "-b" : "--body"), i.verbose && p.push(i.short ? "-v" : "--verbose"), i.print && p.push(`${i.short ? "-p" : "--print"}=${i.print}`), i.verify && p.push(`--verify=${i.verify}`), i.cert && p.push(`--cert=${i.cert}`), i.pretty && p.push(`--pretty=${i.pretty}`), i.style && p.push(`--style=${i.style}`), i.timeout && p.push(`--timeout=${i.timeout}`), i.queryParams && Object.keys(r).forEach((y) => {
|
|
1950
1950
|
const g = r[y];
|
|
1951
|
-
Array.isArray(g) ? g.forEach((
|
|
1952
|
-
c(`${y}==${
|
|
1953
|
-
}) : c(`${y}==${
|
|
1951
|
+
Array.isArray(g) ? g.forEach((b) => {
|
|
1952
|
+
c(`${y}==${M(b)}`);
|
|
1953
|
+
}) : c(`${y}==${M(g)}`);
|
|
1954
1954
|
}), Object.keys(t).sort().forEach((y) => {
|
|
1955
|
-
c(`${y}:${
|
|
1955
|
+
c(`${y}:${M(t[y])}`);
|
|
1956
1956
|
}), e.mimeType === "application/x-www-form-urlencoded" ? (h = e.params) != null && h.length && (p.push(i.short ? "-f" : "--form"), e.params.forEach((y) => {
|
|
1957
|
-
c(`${y.name}=${
|
|
1957
|
+
c(`${y.name}=${M(y.value)}`);
|
|
1958
1958
|
})) : u = !0;
|
|
1959
1959
|
const d = p.length ? `${p.join(" ")} ` : "";
|
|
1960
|
-
return o =
|
|
1960
|
+
return o = M(i.queryParams ? o : n), f(`http ${d}${s} ${o}`), u && e.text && f(`echo ${M(e.text)} | `), l();
|
|
1961
1961
|
}
|
|
1962
1962
|
},
|
|
1963
1963
|
wget: {
|
|
@@ -1974,15 +1974,15 @@ ${i.indent}` : " "
|
|
|
1974
1974
|
short: !1,
|
|
1975
1975
|
verbose: !1,
|
|
1976
1976
|
...s
|
|
1977
|
-
}, { push: a, join: i } = new
|
|
1977
|
+
}, { push: a, join: i } = new j({
|
|
1978
1978
|
...typeof o.indent == "string" ? { indent: o.indent } : {},
|
|
1979
1979
|
join: o.indent !== !1 ? ` \\
|
|
1980
1980
|
${o.indent}` : " "
|
|
1981
1981
|
});
|
|
1982
|
-
return o.verbose ? a(`wget ${o.short ? "-v" : "--verbose"}`) : a(`wget ${o.short ? "-q" : "--quiet"}`), a(`--method ${
|
|
1982
|
+
return o.verbose ? a(`wget ${o.short ? "-v" : "--verbose"}`) : a(`wget ${o.short ? "-q" : "--quiet"}`), a(`--method ${M(t)}`), Object.keys(r).forEach((c) => {
|
|
1983
1983
|
const l = `${c}: ${r[c]}`;
|
|
1984
|
-
a(`--header ${
|
|
1985
|
-
}), e.text && a(`--body-data ${Eo(
|
|
1984
|
+
a(`--header ${M(l)}`);
|
|
1985
|
+
}), e.text && a(`--body-data ${Eo(M(e.text))}`), a(o.short ? "-O" : "--output-document"), a(`- ${M(n)}`), i();
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
@@ -1992,18 +1992,18 @@ ${s}` : ", ";
|
|
|
1992
1992
|
return e ? `[
|
|
1993
1993
|
${s}${t.join(a)}
|
|
1994
1994
|
${o}]` : `[${t.join(a)}]`;
|
|
1995
|
-
}, $r = (t, e, r) => `let ${t} = ${
|
|
1995
|
+
}, $r = (t, e, r) => `let ${t} = ${it(e, r)}`, it = (t, e, r) => {
|
|
1996
1996
|
switch (r = r === void 0 ? 1 : r + 1, Object.prototype.toString.call(t)) {
|
|
1997
1997
|
case "[object Number]":
|
|
1998
1998
|
return t;
|
|
1999
1999
|
case "[object Array]": {
|
|
2000
2000
|
let n = !1;
|
|
2001
|
-
const s = t.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (n = Object.keys(o).length > 1),
|
|
2001
|
+
const s = t.map((o) => (Object.prototype.toString.call(o) === "[object Object]" && (n = Object.keys(o).length > 1), it(o, e, r)));
|
|
2002
2002
|
return br(s, n, e.indent, r);
|
|
2003
2003
|
}
|
|
2004
2004
|
case "[object Object]": {
|
|
2005
2005
|
const n = [];
|
|
2006
|
-
for (const s in t) n.push(`"${s}": ${
|
|
2006
|
+
for (const s in t) n.push(`"${s}": ${it(t[s], e, r)}`);
|
|
2007
2007
|
return br(n, e.pretty && n.length > 1, e.indent, r);
|
|
2008
2008
|
}
|
|
2009
2009
|
case "[object Boolean]":
|
|
@@ -2054,7 +2054,7 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2054
2054
|
pretty: !0,
|
|
2055
2055
|
timeout: 10,
|
|
2056
2056
|
...o
|
|
2057
|
-
}, { push: i, blank: c, join: l } = new
|
|
2057
|
+
}, { push: i, blank: c, join: l } = new j({ indent: a.indent });
|
|
2058
2058
|
i("import Foundation"), c();
|
|
2059
2059
|
const f = e.text || e.jsonObj || e.params;
|
|
2060
2060
|
if (f) switch (e.mimeType) {
|
|
@@ -2089,7 +2089,7 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2089
2089
|
});
|
|
2090
2090
|
break;
|
|
2091
2091
|
}
|
|
2092
|
-
}), i("]"), i("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), c(), i("var request = URLRequest(url: components.url!)")), i(`request.httpMethod = "${s}"`), i(`request.timeoutInterval = ${a.timeout}`), Object.keys(t).length && i(`request.allHTTPHeaderFields = ${
|
|
2092
|
+
}), i("]"), i("components.queryItems = components.queryItems.map { $0 + queryItems } ?? queryItems"), c(), i("var request = URLRequest(url: components.url!)")), i(`request.httpMethod = "${s}"`), i(`request.timeoutInterval = ${a.timeout}`), Object.keys(t).length && i(`request.allHTTPHeaderFields = ${it(t, a)}`), f && i("request.httpBody = postData"), c(), i("let (data, _) = try await URLSession.shared.data(for: request)"), i("print(String(decoding: data, as: UTF8.self))"), l();
|
|
2093
2093
|
}
|
|
2094
2094
|
} }
|
|
2095
2095
|
}
|
|
@@ -2097,93 +2097,93 @@ ${o}]` : `[${t.join(a)}]`;
|
|
|
2097
2097
|
const r = t[e.name];
|
|
2098
2098
|
return r === void 0 ? (t[e.name] = e.value, t) : Array.isArray(r) ? (r.push(e.value), t) : (t[e.name] = [r, e.value], t);
|
|
2099
2099
|
};
|
|
2100
|
-
var
|
|
2100
|
+
var at = { exports: {} };
|
|
2101
2101
|
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
2102
|
-
var ko =
|
|
2102
|
+
var ko = at.exports;
|
|
2103
2103
|
(function(t, e) {
|
|
2104
2104
|
(function(r) {
|
|
2105
|
-
var n = e && !e.nodeType && e, s = t && !t.nodeType && t, o = typeof
|
|
2105
|
+
var n = e && !e.nodeType && e, s = t && !t.nodeType && t, o = typeof nt == "object" && nt;
|
|
2106
2106
|
(o.global === o || o.window === o || o.self === o) && (r = o);
|
|
2107
|
-
var a, i = 2147483647, c = 36, l = 1, f = 26, u = 38, p = 700, d = 72, h = 128, y = "-", g = /^xn--/,
|
|
2107
|
+
var a, i = 2147483647, c = 36, l = 1, f = 26, u = 38, p = 700, d = 72, h = 128, y = "-", g = /^xn--/, b = /[^\x20-\x7E]/, m = /[\x2E\u3002\uFF0E\uFF61]/g, v = {
|
|
2108
2108
|
overflow: "Overflow: input needs wider integers to process",
|
|
2109
2109
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
2110
2110
|
"invalid-input": "Invalid input"
|
|
2111
|
-
},
|
|
2112
|
-
function T(
|
|
2113
|
-
throw new RangeError(
|
|
2111
|
+
}, O = c - l, $ = Math.floor, w = String.fromCharCode, C;
|
|
2112
|
+
function T(S) {
|
|
2113
|
+
throw new RangeError(v[S]);
|
|
2114
2114
|
}
|
|
2115
|
-
function k(
|
|
2116
|
-
for (var
|
|
2117
|
-
R[
|
|
2115
|
+
function k(S, x) {
|
|
2116
|
+
for (var E = S.length, R = []; E--; )
|
|
2117
|
+
R[E] = x(S[E]);
|
|
2118
2118
|
return R;
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2121
|
-
var
|
|
2122
|
-
|
|
2123
|
-
var N =
|
|
2124
|
-
return R +
|
|
2120
|
+
function J(S, x) {
|
|
2121
|
+
var E = S.split("@"), R = "";
|
|
2122
|
+
E.length > 1 && (R = E[0] + "@", S = E[1]), S = S.replace(m, ".");
|
|
2123
|
+
var N = S.split("."), W = k(N, x).join(".");
|
|
2124
|
+
return R + W;
|
|
2125
2125
|
}
|
|
2126
|
-
function Q(
|
|
2127
|
-
for (var x = [],
|
|
2128
|
-
N =
|
|
2126
|
+
function Q(S) {
|
|
2127
|
+
for (var x = [], E = 0, R = S.length, N, W; E < R; )
|
|
2128
|
+
N = S.charCodeAt(E++), N >= 55296 && N <= 56319 && E < R ? (W = S.charCodeAt(E++), (W & 64512) == 56320 ? x.push(((N & 1023) << 10) + (W & 1023) + 65536) : (x.push(N), E--)) : x.push(N);
|
|
2129
2129
|
return x;
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2132
|
-
return k(
|
|
2133
|
-
var
|
|
2134
|
-
return x > 65535 && (x -= 65536,
|
|
2131
|
+
function G(S) {
|
|
2132
|
+
return k(S, function(x) {
|
|
2133
|
+
var E = "";
|
|
2134
|
+
return x > 65535 && (x -= 65536, E += w(x >>> 10 & 1023 | 55296), x = 56320 | x & 1023), E += w(x), E;
|
|
2135
2135
|
}).join("");
|
|
2136
2136
|
}
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2137
|
+
function U(S) {
|
|
2138
|
+
return S - 48 < 10 ? S - 22 : S - 65 < 26 ? S - 65 : S - 97 < 26 ? S - 97 : c;
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2140
|
+
function z(S, x) {
|
|
2141
|
+
return S + 22 + 75 * (S < 26) - ((x != 0) << 5);
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function K(S, x, E) {
|
|
2144
2144
|
var R = 0;
|
|
2145
|
-
for (
|
|
2146
|
-
|
|
2147
|
-
return
|
|
2145
|
+
for (S = E ? $(S / p) : S >> 1, S += $(S / x); S > O * f >> 1; R += c)
|
|
2146
|
+
S = $(S / O);
|
|
2147
|
+
return $(R + (O + 1) * S / (S + u));
|
|
2148
2148
|
}
|
|
2149
|
-
function V(
|
|
2150
|
-
var x = [],
|
|
2151
|
-
for (
|
|
2152
|
-
|
|
2153
|
-
for (
|
|
2154
|
-
for (
|
|
2155
|
-
|
|
2156
|
-
R = x.length + 1,
|
|
2149
|
+
function V(S) {
|
|
2150
|
+
var x = [], E = S.length, R, N = 0, W = h, F = d, D, Z, re, le, H, X, ee, ue, ye;
|
|
2151
|
+
for (D = S.lastIndexOf(y), D < 0 && (D = 0), Z = 0; Z < D; ++Z)
|
|
2152
|
+
S.charCodeAt(Z) >= 128 && T("not-basic"), x.push(S.charCodeAt(Z));
|
|
2153
|
+
for (re = D > 0 ? D + 1 : 0; re < E; ) {
|
|
2154
|
+
for (le = N, H = 1, X = c; re >= E && T("invalid-input"), ee = U(S.charCodeAt(re++)), (ee >= c || ee > $((i - N) / H)) && T("overflow"), N += ee * H, ue = X <= F ? l : X >= F + f ? f : X - F, !(ee < ue); X += c)
|
|
2155
|
+
ye = c - ue, H > $(i / ye) && T("overflow"), H *= ye;
|
|
2156
|
+
R = x.length + 1, F = K(N - le, R, le == 0), $(N / R) > i - W && T("overflow"), W += $(N / R), N %= R, x.splice(N++, 0, W);
|
|
2157
2157
|
}
|
|
2158
|
-
return
|
|
2158
|
+
return G(x);
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2161
|
-
var x,
|
|
2162
|
-
for (
|
|
2163
|
-
|
|
2164
|
-
for (R = N =
|
|
2165
|
-
for (
|
|
2166
|
-
|
|
2167
|
-
for (ue = R + 1,
|
|
2168
|
-
if (
|
|
2169
|
-
for (
|
|
2170
|
-
mt =
|
|
2171
|
-
|
|
2172
|
-
),
|
|
2173
|
-
|
|
2160
|
+
function Y(S) {
|
|
2161
|
+
var x, E, R, N, W, F, D, Z, re, le, H, X = [], ee, ue, ye, mt;
|
|
2162
|
+
for (S = Q(S), ee = S.length, x = h, E = 0, W = d, F = 0; F < ee; ++F)
|
|
2163
|
+
H = S[F], H < 128 && X.push(w(H));
|
|
2164
|
+
for (R = N = X.length, N && X.push(y); R < ee; ) {
|
|
2165
|
+
for (D = i, F = 0; F < ee; ++F)
|
|
2166
|
+
H = S[F], H >= x && H < D && (D = H);
|
|
2167
|
+
for (ue = R + 1, D - x > $((i - E) / ue) && T("overflow"), E += (D - x) * ue, x = D, F = 0; F < ee; ++F)
|
|
2168
|
+
if (H = S[F], H < x && ++E > i && T("overflow"), H == x) {
|
|
2169
|
+
for (Z = E, re = c; le = re <= W ? l : re >= W + f ? f : re - W, !(Z < le); re += c)
|
|
2170
|
+
mt = Z - le, ye = c - le, X.push(
|
|
2171
|
+
w(z(le + mt % ye, 0))
|
|
2172
|
+
), Z = $(mt / ye);
|
|
2173
|
+
X.push(w(z(Z, 0))), W = K(E, ue, R == N), E = 0, ++R;
|
|
2174
2174
|
}
|
|
2175
|
-
++
|
|
2175
|
+
++E, ++x;
|
|
2176
2176
|
}
|
|
2177
|
-
return
|
|
2177
|
+
return X.join("");
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2180
|
-
return
|
|
2179
|
+
function ze(S) {
|
|
2180
|
+
return J(S, function(x) {
|
|
2181
2181
|
return g.test(x) ? V(x.slice(4).toLowerCase()) : x;
|
|
2182
2182
|
});
|
|
2183
2183
|
}
|
|
2184
|
-
function
|
|
2185
|
-
return
|
|
2186
|
-
return
|
|
2184
|
+
function qe(S) {
|
|
2185
|
+
return J(S, function(x) {
|
|
2186
|
+
return b.test(x) ? "xn--" + Y(x) : x;
|
|
2187
2187
|
});
|
|
2188
2188
|
}
|
|
2189
2189
|
if (a = {
|
|
@@ -2202,30 +2202,30 @@ var ko = it.exports;
|
|
|
2202
2202
|
*/
|
|
2203
2203
|
ucs2: {
|
|
2204
2204
|
decode: Q,
|
|
2205
|
-
encode:
|
|
2205
|
+
encode: G
|
|
2206
2206
|
},
|
|
2207
2207
|
decode: V,
|
|
2208
|
-
encode:
|
|
2209
|
-
toASCII:
|
|
2210
|
-
toUnicode:
|
|
2208
|
+
encode: Y,
|
|
2209
|
+
toASCII: qe,
|
|
2210
|
+
toUnicode: ze
|
|
2211
2211
|
}, n && s)
|
|
2212
2212
|
if (t.exports == n)
|
|
2213
2213
|
s.exports = a;
|
|
2214
2214
|
else
|
|
2215
|
-
for (
|
|
2216
|
-
a.hasOwnProperty(
|
|
2215
|
+
for (C in a)
|
|
2216
|
+
a.hasOwnProperty(C) && (n[C] = a[C]);
|
|
2217
2217
|
else
|
|
2218
2218
|
r.punycode = a;
|
|
2219
2219
|
})(ko);
|
|
2220
|
-
})(
|
|
2221
|
-
var Ao =
|
|
2220
|
+
})(at, at.exports);
|
|
2221
|
+
var Ao = at.exports, Re = TypeError;
|
|
2222
2222
|
const nn = (t) => String(t);
|
|
2223
2223
|
Object.assign(nn, { custom: Symbol.for("nodejs.util.inspect.custom") });
|
|
2224
2224
|
const Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2225
2225
|
__proto__: null,
|
|
2226
2226
|
default: nn
|
|
2227
2227
|
}, Symbol.toStringTag, { value: "Module" })), qo = /* @__PURE__ */ In(Ro);
|
|
2228
|
-
var Zt = typeof Map == "function" && Map.prototype, $t = Object.getOwnPropertyDescriptor && Zt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null,
|
|
2228
|
+
var Zt = typeof Map == "function" && Map.prototype, $t = Object.getOwnPropertyDescriptor && Zt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, st = Zt && $t && typeof $t.get == "function" ? $t.get : null, wr = Zt && Map.prototype.forEach, er = typeof Set == "function" && Set.prototype, vt = Object.getOwnPropertyDescriptor && er ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ct = er && vt && typeof vt.get == "function" ? vt.get : null, Sr = er && Set.prototype.forEach, No = typeof WeakMap == "function" && WeakMap.prototype, Ie = No ? WeakMap.prototype.has : null, _o = typeof WeakSet == "function" && WeakSet.prototype, Ue = _o ? WeakSet.prototype.has : null, Lo = typeof WeakRef == "function" && WeakRef.prototype, Or = Lo ? WeakRef.prototype.deref : null, Io = Boolean.prototype.valueOf, Uo = Object.prototype.toString, Fo = Function.prototype.toString, Mo = String.prototype.match, tr = String.prototype.slice, de = String.prototype.replace, Ho = String.prototype.toUpperCase, Tr = String.prototype.toLowerCase, on = RegExp.prototype.test, xr = Array.prototype.concat, ae = Array.prototype.join, Bo = Array.prototype.slice, Er = Math.floor, Bt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, wt = Object.getOwnPropertySymbols, Wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, ke = typeof Symbol == "function" && typeof Symbol.iterator == "object", Fe = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === ke || !0) ? Symbol.toStringTag : null, an = Object.prototype.propertyIsEnumerable, jr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
|
|
2229
2229
|
return t.__proto__;
|
|
2230
2230
|
} : null);
|
|
2231
2231
|
function Pr(t, e) {
|
|
@@ -2236,10 +2236,10 @@ function Pr(t, e) {
|
|
|
2236
2236
|
var n = t < 0 ? -Er(-t) : Er(t);
|
|
2237
2237
|
if (n !== t) {
|
|
2238
2238
|
var s = String(n), o = tr.call(e, s.length + 1);
|
|
2239
|
-
return
|
|
2239
|
+
return de.call(s, r, "$&_") + "." + de.call(de.call(o, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
|
-
return
|
|
2242
|
+
return de.call(e, r, "$&_");
|
|
2243
2243
|
}
|
|
2244
2244
|
var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
2245
2245
|
__proto__: null,
|
|
@@ -2249,18 +2249,18 @@ var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
|
2249
2249
|
__proto__: null,
|
|
2250
2250
|
double: /(["\\])/g,
|
|
2251
2251
|
single: /(['\\])/g
|
|
2252
|
-
},
|
|
2252
|
+
}, ut = function t(e, r, n, s) {
|
|
2253
2253
|
var o = r || {};
|
|
2254
|
-
if (
|
|
2254
|
+
if (fe(o, "quoteStyle") && !fe(sn, o.quoteStyle))
|
|
2255
2255
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
2256
|
-
if (
|
|
2256
|
+
if (fe(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
|
|
2257
2257
|
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
2258
|
-
var a =
|
|
2258
|
+
var a = fe(o, "customInspect") ? o.customInspect : !0;
|
|
2259
2259
|
if (typeof a != "boolean" && a !== "symbol")
|
|
2260
2260
|
throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
2261
|
-
if (
|
|
2261
|
+
if (fe(o, "indent") && o.indent !== null && o.indent !== " " && !(parseInt(o.indent, 10) === o.indent && o.indent > 0))
|
|
2262
2262
|
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
2263
|
-
if (
|
|
2263
|
+
if (fe(o, "numericSeparator") && typeof o.numericSeparator != "boolean")
|
|
2264
2264
|
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
2265
2265
|
var i = o.numericSeparator;
|
|
2266
2266
|
if (typeof e > "u")
|
|
@@ -2289,37 +2289,37 @@ var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
|
2289
2289
|
s = [];
|
|
2290
2290
|
else if (fn(s, e) >= 0)
|
|
2291
2291
|
return "[Circular]";
|
|
2292
|
-
function p(
|
|
2293
|
-
if (
|
|
2292
|
+
function p(U, z, K) {
|
|
2293
|
+
if (z && (s = Bo.call(s), s.push(z)), K) {
|
|
2294
2294
|
var V = {
|
|
2295
2295
|
depth: o.depth
|
|
2296
2296
|
};
|
|
2297
|
-
return
|
|
2297
|
+
return fe(o, "quoteStyle") && (V.quoteStyle = o.quoteStyle), t(U, V, n + 1, s);
|
|
2298
2298
|
}
|
|
2299
|
-
return t(
|
|
2299
|
+
return t(U, o, n + 1, s);
|
|
2300
2300
|
}
|
|
2301
2301
|
if (typeof e == "function" && !Ar(e)) {
|
|
2302
|
-
var d = Xo(e), h =
|
|
2303
|
-
return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (h.length > 0 ? " { " +
|
|
2302
|
+
var d = Xo(e), h = Ke(e, p);
|
|
2303
|
+
return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (h.length > 0 ? " { " + ae.call(h, ", ") + " }" : "");
|
|
2304
2304
|
}
|
|
2305
2305
|
if (ln(e)) {
|
|
2306
|
-
var y = ke ?
|
|
2307
|
-
return typeof e == "object" && !ke ?
|
|
2306
|
+
var y = ke ? de.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Wt.call(e);
|
|
2307
|
+
return typeof e == "object" && !ke ? _e(y) : y;
|
|
2308
2308
|
}
|
|
2309
2309
|
if (oi(e)) {
|
|
2310
|
-
for (var g = "<" + Tr.call(String(e.nodeName)),
|
|
2311
|
-
g += " " +
|
|
2310
|
+
for (var g = "<" + Tr.call(String(e.nodeName)), b = e.attributes || [], m = 0; m < b.length; m++)
|
|
2311
|
+
g += " " + b[m].name + "=" + cn(Jo(b[m].value), "double", o);
|
|
2312
2312
|
return g += ">", e.childNodes && e.childNodes.length && (g += "..."), g += "</" + Tr.call(String(e.nodeName)) + ">", g;
|
|
2313
2313
|
}
|
|
2314
2314
|
if (Gt(e)) {
|
|
2315
2315
|
if (e.length === 0)
|
|
2316
2316
|
return "[]";
|
|
2317
|
-
var
|
|
2318
|
-
return u && !ai(
|
|
2317
|
+
var v = Ke(e, p);
|
|
2318
|
+
return u && !ai(v) ? "[" + zt(v, u) + "]" : "[ " + ae.call(v, ", ") + " ]";
|
|
2319
2319
|
}
|
|
2320
2320
|
if (zo(e)) {
|
|
2321
|
-
var
|
|
2322
|
-
return !("cause" in Error.prototype) && "cause" in e && !an.call(e, "cause") ? "{ [" + String(e) + "] " +
|
|
2321
|
+
var O = Ke(e, p);
|
|
2322
|
+
return !("cause" in Error.prototype) && "cause" in e && !an.call(e, "cause") ? "{ [" + String(e) + "] " + ae.call(xr.call("[cause]: " + p(e.cause), O), ", ") + " }" : O.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + ae.call(O, ", ") + " }";
|
|
2323
2323
|
}
|
|
2324
2324
|
if (typeof e == "object" && a) {
|
|
2325
2325
|
if (kr && typeof e[kr] == "function" && Jt)
|
|
@@ -2328,16 +2328,16 @@ var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
|
2328
2328
|
return e.inspect();
|
|
2329
2329
|
}
|
|
2330
2330
|
if (Zo(e)) {
|
|
2331
|
-
var
|
|
2332
|
-
return wr && wr.call(e, function(
|
|
2333
|
-
|
|
2334
|
-
}), Rr("Map",
|
|
2331
|
+
var $ = [];
|
|
2332
|
+
return wr && wr.call(e, function(U, z) {
|
|
2333
|
+
$.push(p(z, e, !0) + " => " + p(U, e));
|
|
2334
|
+
}), Rr("Map", st.call(e), $, u);
|
|
2335
2335
|
}
|
|
2336
2336
|
if (ri(e)) {
|
|
2337
|
-
var
|
|
2338
|
-
return Sr && Sr.call(e, function(
|
|
2339
|
-
|
|
2340
|
-
}), Rr("Set",
|
|
2337
|
+
var w = [];
|
|
2338
|
+
return Sr && Sr.call(e, function(U) {
|
|
2339
|
+
w.push(p(U, e));
|
|
2340
|
+
}), Rr("Set", ct.call(e), w, u);
|
|
2341
2341
|
}
|
|
2342
2342
|
if (ei(e))
|
|
2343
2343
|
return St("WeakMap");
|
|
@@ -2346,20 +2346,20 @@ var Jt = qo, Cr = Jt.custom, kr = ln(Cr) ? Cr : null, sn = {
|
|
|
2346
2346
|
if (ti(e))
|
|
2347
2347
|
return St("WeakRef");
|
|
2348
2348
|
if (Ko(e))
|
|
2349
|
-
return
|
|
2349
|
+
return _e(p(Number(e)));
|
|
2350
2350
|
if (Qo(e))
|
|
2351
|
-
return
|
|
2351
|
+
return _e(p(Bt.call(e)));
|
|
2352
2352
|
if (Do(e))
|
|
2353
|
-
return
|
|
2353
|
+
return _e(Io.call(e));
|
|
2354
2354
|
if (Vo(e))
|
|
2355
|
-
return
|
|
2355
|
+
return _e(p(String(e)));
|
|
2356
2356
|
if (typeof window < "u" && e === window)
|
|
2357
2357
|
return "{ [object Window] }";
|
|
2358
|
-
if (typeof globalThis < "u" && e === globalThis || typeof
|
|
2358
|
+
if (typeof globalThis < "u" && e === globalThis || typeof nt < "u" && e === nt)
|
|
2359
2359
|
return "{ [object globalThis] }";
|
|
2360
2360
|
if (!Go(e) && !Ar(e)) {
|
|
2361
|
-
var
|
|
2362
|
-
return
|
|
2361
|
+
var C = Ke(e, p), T = jr ? jr(e) === Object.prototype : e instanceof Object || e.constructor === Object, k = e instanceof Object ? "" : "null prototype", J = !T && Fe && Object(e) === e && Fe in e ? tr.call(he(e), 8, -1) : k ? "Object" : "", Q = T || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", G = Q + (J || k ? "[" + ae.call(xr.call([], J || [], k || []), ": ") + "] " : "");
|
|
2362
|
+
return C.length === 0 ? G + "{}" : u ? G + "{" + zt(C, u) + "}" : G + "{ " + ae.call(C, ", ") + " }";
|
|
2363
2363
|
}
|
|
2364
2364
|
return String(e);
|
|
2365
2365
|
};
|
|
@@ -2368,31 +2368,31 @@ function cn(t, e, r) {
|
|
|
2368
2368
|
return s + t + s;
|
|
2369
2369
|
}
|
|
2370
2370
|
function Jo(t) {
|
|
2371
|
-
return
|
|
2371
|
+
return de.call(String(t), /"/g, """);
|
|
2372
2372
|
}
|
|
2373
2373
|
function $e(t) {
|
|
2374
|
-
return !
|
|
2374
|
+
return !Fe || !(typeof t == "object" && (Fe in t || typeof t[Fe] < "u"));
|
|
2375
2375
|
}
|
|
2376
2376
|
function Gt(t) {
|
|
2377
|
-
return
|
|
2377
|
+
return he(t) === "[object Array]" && $e(t);
|
|
2378
2378
|
}
|
|
2379
2379
|
function Go(t) {
|
|
2380
|
-
return
|
|
2380
|
+
return he(t) === "[object Date]" && $e(t);
|
|
2381
2381
|
}
|
|
2382
2382
|
function Ar(t) {
|
|
2383
|
-
return
|
|
2383
|
+
return he(t) === "[object RegExp]" && $e(t);
|
|
2384
2384
|
}
|
|
2385
2385
|
function zo(t) {
|
|
2386
|
-
return
|
|
2386
|
+
return he(t) === "[object Error]" && $e(t);
|
|
2387
2387
|
}
|
|
2388
2388
|
function Vo(t) {
|
|
2389
|
-
return
|
|
2389
|
+
return he(t) === "[object String]" && $e(t);
|
|
2390
2390
|
}
|
|
2391
2391
|
function Ko(t) {
|
|
2392
|
-
return
|
|
2392
|
+
return he(t) === "[object Number]" && $e(t);
|
|
2393
2393
|
}
|
|
2394
2394
|
function Do(t) {
|
|
2395
|
-
return
|
|
2395
|
+
return he(t) === "[object Boolean]" && $e(t);
|
|
2396
2396
|
}
|
|
2397
2397
|
function ln(t) {
|
|
2398
2398
|
if (ke)
|
|
@@ -2419,10 +2419,10 @@ function Qo(t) {
|
|
|
2419
2419
|
var Yo = Object.prototype.hasOwnProperty || function(t) {
|
|
2420
2420
|
return t in this;
|
|
2421
2421
|
};
|
|
2422
|
-
function
|
|
2422
|
+
function fe(t, e) {
|
|
2423
2423
|
return Yo.call(t, e);
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function he(t) {
|
|
2426
2426
|
return Uo.call(t);
|
|
2427
2427
|
}
|
|
2428
2428
|
function Xo(t) {
|
|
@@ -2440,12 +2440,12 @@ function fn(t, e) {
|
|
|
2440
2440
|
return -1;
|
|
2441
2441
|
}
|
|
2442
2442
|
function Zo(t) {
|
|
2443
|
-
if (!
|
|
2443
|
+
if (!st || !t || typeof t != "object")
|
|
2444
2444
|
return !1;
|
|
2445
2445
|
try {
|
|
2446
|
-
|
|
2446
|
+
st.call(t);
|
|
2447
2447
|
try {
|
|
2448
|
-
|
|
2448
|
+
ct.call(t);
|
|
2449
2449
|
} catch {
|
|
2450
2450
|
return !0;
|
|
2451
2451
|
}
|
|
@@ -2455,12 +2455,12 @@ function Zo(t) {
|
|
|
2455
2455
|
return !1;
|
|
2456
2456
|
}
|
|
2457
2457
|
function ei(t) {
|
|
2458
|
-
if (!
|
|
2458
|
+
if (!Ie || !t || typeof t != "object")
|
|
2459
2459
|
return !1;
|
|
2460
2460
|
try {
|
|
2461
|
-
|
|
2461
|
+
Ie.call(t, Ie);
|
|
2462
2462
|
try {
|
|
2463
|
-
|
|
2463
|
+
Ue.call(t, Ue);
|
|
2464
2464
|
} catch {
|
|
2465
2465
|
return !0;
|
|
2466
2466
|
}
|
|
@@ -2479,12 +2479,12 @@ function ti(t) {
|
|
|
2479
2479
|
return !1;
|
|
2480
2480
|
}
|
|
2481
2481
|
function ri(t) {
|
|
2482
|
-
if (!
|
|
2482
|
+
if (!ct || !t || typeof t != "object")
|
|
2483
2483
|
return !1;
|
|
2484
2484
|
try {
|
|
2485
|
-
|
|
2485
|
+
ct.call(t);
|
|
2486
2486
|
try {
|
|
2487
|
-
|
|
2487
|
+
st.call(t);
|
|
2488
2488
|
} catch {
|
|
2489
2489
|
return !0;
|
|
2490
2490
|
}
|
|
@@ -2494,12 +2494,12 @@ function ri(t) {
|
|
|
2494
2494
|
return !1;
|
|
2495
2495
|
}
|
|
2496
2496
|
function ni(t) {
|
|
2497
|
-
if (!
|
|
2497
|
+
if (!Ue || !t || typeof t != "object")
|
|
2498
2498
|
return !1;
|
|
2499
2499
|
try {
|
|
2500
|
-
|
|
2500
|
+
Ue.call(t, Ue);
|
|
2501
2501
|
try {
|
|
2502
|
-
|
|
2502
|
+
Ie.call(t, Ie);
|
|
2503
2503
|
} catch {
|
|
2504
2504
|
return !0;
|
|
2505
2505
|
}
|
|
@@ -2518,7 +2518,7 @@ function un(t, e) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
var s = Wo[e.quoteStyle || "single"];
|
|
2520
2520
|
s.lastIndex = 0;
|
|
2521
|
-
var o =
|
|
2521
|
+
var o = de.call(de.call(t, s, "\\$1"), /[\x00-\x1f]/g, ii);
|
|
2522
2522
|
return cn(o, "single", e);
|
|
2523
2523
|
}
|
|
2524
2524
|
function ii(t) {
|
|
@@ -2531,14 +2531,14 @@ function ii(t) {
|
|
|
2531
2531
|
}[e];
|
|
2532
2532
|
return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Ho.call(e.toString(16));
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2534
|
+
function _e(t) {
|
|
2535
2535
|
return "Object(" + t + ")";
|
|
2536
2536
|
}
|
|
2537
2537
|
function St(t) {
|
|
2538
2538
|
return t + " { ? }";
|
|
2539
2539
|
}
|
|
2540
2540
|
function Rr(t, e, r, n) {
|
|
2541
|
-
var s = n ? zt(r, n) :
|
|
2541
|
+
var s = n ? zt(r, n) : ae.call(r, ", ");
|
|
2542
2542
|
return t + " (" + e + ") {" + s + "}";
|
|
2543
2543
|
}
|
|
2544
2544
|
function ai(t) {
|
|
@@ -2553,12 +2553,12 @@ function si(t, e) {
|
|
|
2553
2553
|
if (t.indent === " ")
|
|
2554
2554
|
r = " ";
|
|
2555
2555
|
else if (typeof t.indent == "number" && t.indent > 0)
|
|
2556
|
-
r =
|
|
2556
|
+
r = ae.call(Array(t.indent + 1), " ");
|
|
2557
2557
|
else
|
|
2558
2558
|
return null;
|
|
2559
2559
|
return {
|
|
2560
2560
|
base: r,
|
|
2561
|
-
prev:
|
|
2561
|
+
prev: ae.call(Array(e + 1), r)
|
|
2562
2562
|
};
|
|
2563
2563
|
}
|
|
2564
2564
|
function zt(t, e) {
|
|
@@ -2566,15 +2566,15 @@ function zt(t, e) {
|
|
|
2566
2566
|
return "";
|
|
2567
2567
|
var r = `
|
|
2568
2568
|
` + e.prev + e.base;
|
|
2569
|
-
return r +
|
|
2569
|
+
return r + ae.call(t, "," + r) + `
|
|
2570
2570
|
` + e.prev;
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function Ke(t, e) {
|
|
2573
2573
|
var r = Gt(t), n = [];
|
|
2574
2574
|
if (r) {
|
|
2575
2575
|
n.length = t.length;
|
|
2576
2576
|
for (var s = 0; s < t.length; s++)
|
|
2577
|
-
n[s] =
|
|
2577
|
+
n[s] = fe(t, s) ? e(t[s], t) : "";
|
|
2578
2578
|
}
|
|
2579
2579
|
var o = typeof wt == "function" ? wt(t) : [], a;
|
|
2580
2580
|
if (ke) {
|
|
@@ -2583,24 +2583,24 @@ function Ve(t, e) {
|
|
|
2583
2583
|
a["$" + o[i]] = o[i];
|
|
2584
2584
|
}
|
|
2585
2585
|
for (var c in t)
|
|
2586
|
-
|
|
2586
|
+
fe(t, c) && (r && String(Number(c)) === c && c < t.length || ke && a["$" + c] instanceof Symbol || (on.call(/[^\w$]/, c) ? n.push(e(c, t) + ": " + e(t[c], t)) : n.push(c + ": " + e(t[c], t))));
|
|
2587
2587
|
if (typeof wt == "function")
|
|
2588
2588
|
for (var l = 0; l < o.length; l++)
|
|
2589
2589
|
an.call(t, o[l]) && n.push("[" + e(o[l]) + "]: " + e(t[o[l]], t));
|
|
2590
2590
|
return n;
|
|
2591
2591
|
}
|
|
2592
|
-
var ci =
|
|
2592
|
+
var ci = ut, li = Re, pt = function(t, e, r) {
|
|
2593
2593
|
for (var n = t, s; (s = n.next) != null; n = s)
|
|
2594
2594
|
if (s.key === e)
|
|
2595
2595
|
return n.next = s.next, r || (s.next = /** @type {NonNullable<typeof list.next>} */
|
|
2596
2596
|
t.next, t.next = s), s;
|
|
2597
2597
|
}, fi = function(t, e) {
|
|
2598
2598
|
if (t) {
|
|
2599
|
-
var r =
|
|
2599
|
+
var r = pt(t, e);
|
|
2600
2600
|
return r && r.value;
|
|
2601
2601
|
}
|
|
2602
2602
|
}, ui = function(t, e, r) {
|
|
2603
|
-
var n =
|
|
2603
|
+
var n = pt(t, e);
|
|
2604
2604
|
n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
2605
2605
|
{
|
|
2606
2606
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
@@ -2609,10 +2609,10 @@ var ci = ft, li = Re, ut = function(t, e, r) {
|
|
|
2609
2609
|
value: r
|
|
2610
2610
|
};
|
|
2611
2611
|
}, pi = function(t, e) {
|
|
2612
|
-
return t ? !!
|
|
2612
|
+
return t ? !!pt(t, e) : !1;
|
|
2613
2613
|
}, di = function(t, e) {
|
|
2614
2614
|
if (t)
|
|
2615
|
-
return
|
|
2615
|
+
return pt(t, e, !0);
|
|
2616
2616
|
}, hi = function() {
|
|
2617
2617
|
var e, r = {
|
|
2618
2618
|
assert: function(n) {
|
|
@@ -2645,21 +2645,21 @@ var ci = ft, li = Re, ut = function(t, e, r) {
|
|
|
2645
2645
|
return e !== e;
|
|
2646
2646
|
}, Pi = ji, Ci = function(e) {
|
|
2647
2647
|
return Pi(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
2648
|
-
}, ki = Object.getOwnPropertyDescriptor,
|
|
2649
|
-
if (
|
|
2648
|
+
}, ki = Object.getOwnPropertyDescriptor, Xe = ki;
|
|
2649
|
+
if (Xe)
|
|
2650
2650
|
try {
|
|
2651
|
-
|
|
2651
|
+
Xe([], "length");
|
|
2652
2652
|
} catch {
|
|
2653
|
-
|
|
2653
|
+
Xe = null;
|
|
2654
2654
|
}
|
|
2655
|
-
var dn =
|
|
2656
|
-
if (
|
|
2655
|
+
var dn = Xe, Ze = Object.defineProperty || !1;
|
|
2656
|
+
if (Ze)
|
|
2657
2657
|
try {
|
|
2658
|
-
|
|
2658
|
+
Ze({}, "a", { value: 1 });
|
|
2659
2659
|
} catch {
|
|
2660
|
-
|
|
2660
|
+
Ze = !1;
|
|
2661
2661
|
}
|
|
2662
|
-
var hn =
|
|
2662
|
+
var hn = Ze, Ot, qr;
|
|
2663
2663
|
function Ai() {
|
|
2664
2664
|
return qr || (qr = 1, Ot = function() {
|
|
2665
2665
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
@@ -2734,11 +2734,11 @@ function qi() {
|
|
|
2734
2734
|
throw new TypeError(t + l);
|
|
2735
2735
|
for (var f = o(arguments, 1), u, p = function() {
|
|
2736
2736
|
if (this instanceof u) {
|
|
2737
|
-
var
|
|
2737
|
+
var b = l.apply(
|
|
2738
2738
|
this,
|
|
2739
2739
|
s(f, arguments)
|
|
2740
2740
|
);
|
|
2741
|
-
return Object(
|
|
2741
|
+
return Object(b) === b ? b : this;
|
|
2742
2742
|
}
|
|
2743
2743
|
return l.apply(
|
|
2744
2744
|
c,
|
|
@@ -2755,7 +2755,7 @@ function qi() {
|
|
|
2755
2755
|
}, jt;
|
|
2756
2756
|
}
|
|
2757
2757
|
var Pt, Ur;
|
|
2758
|
-
function
|
|
2758
|
+
function dt() {
|
|
2759
2759
|
if (Ur) return Pt;
|
|
2760
2760
|
Ur = 1;
|
|
2761
2761
|
var t = qi();
|
|
@@ -2769,7 +2769,7 @@ var kt, Mr;
|
|
|
2769
2769
|
function gn() {
|
|
2770
2770
|
return Mr || (Mr = 1, kt = Function.prototype.apply), kt;
|
|
2771
2771
|
}
|
|
2772
|
-
var Ni = typeof Reflect < "u" && Reflect && Reflect.apply, _i =
|
|
2772
|
+
var Ni = typeof Reflect < "u" && Reflect && Reflect.apply, _i = dt(), Li = gn(), Ii = rr(), Ui = Ni, Fi = Ui || _i.call(Ii, Li), Mi = dt(), Hi = Re, Bi = rr(), Wi = Fi, bn = function(e) {
|
|
2773
2773
|
if (e.length < 1 || typeof e[0] != "function")
|
|
2774
2774
|
throw new Hi("a function is required");
|
|
2775
2775
|
return Wi(Mi, Bi, e);
|
|
@@ -2816,43 +2816,43 @@ var qt, Wr;
|
|
|
2816
2816
|
function zi() {
|
|
2817
2817
|
if (Wr) return qt;
|
|
2818
2818
|
Wr = 1;
|
|
2819
|
-
var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r =
|
|
2819
|
+
var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = dt();
|
|
2820
2820
|
return qt = r.call(t, e), qt;
|
|
2821
2821
|
}
|
|
2822
|
-
var
|
|
2822
|
+
var P, Vi = pn, Ki = yi, Di = mi, Qi = gi, Yi = bi, Ae = $i, je = Re, Xi = vi, Zi = wi, ea = Si, ta = Oi, ra = Ti, na = xi, oa = Ei, ia = Ci, $n = Function, Nt = function(t) {
|
|
2823
2823
|
try {
|
|
2824
2824
|
return $n('"use strict"; return (' + t + ").constructor;")();
|
|
2825
2825
|
} catch {
|
|
2826
2826
|
}
|
|
2827
|
-
},
|
|
2827
|
+
}, Be = dn, aa = hn, _t = function() {
|
|
2828
2828
|
throw new je();
|
|
2829
|
-
}, sa =
|
|
2829
|
+
}, sa = Be ? (function() {
|
|
2830
2830
|
try {
|
|
2831
2831
|
return arguments.callee, _t;
|
|
2832
2832
|
} catch {
|
|
2833
2833
|
try {
|
|
2834
|
-
return
|
|
2834
|
+
return Be(arguments, "callee").get;
|
|
2835
2835
|
} catch {
|
|
2836
2836
|
return _t;
|
|
2837
2837
|
}
|
|
2838
2838
|
}
|
|
2839
|
-
})() : _t, ve = Ri()(),
|
|
2839
|
+
})() : _t, ve = Ri()(), I = Gi(), ca = mn(), la = yn(), vn = gn(), We = rr(), Se = {}, fa = typeof Uint8Array > "u" || !I ? P : I(Uint8Array), be = {
|
|
2840
2840
|
__proto__: null,
|
|
2841
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
2841
|
+
"%AggregateError%": typeof AggregateError > "u" ? P : AggregateError,
|
|
2842
2842
|
"%Array%": Array,
|
|
2843
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
2844
|
-
"%ArrayIteratorPrototype%": ve &&
|
|
2845
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
2843
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? P : ArrayBuffer,
|
|
2844
|
+
"%ArrayIteratorPrototype%": ve && I ? I([][Symbol.iterator]()) : P,
|
|
2845
|
+
"%AsyncFromSyncIteratorPrototype%": P,
|
|
2846
2846
|
"%AsyncFunction%": Se,
|
|
2847
2847
|
"%AsyncGenerator%": Se,
|
|
2848
2848
|
"%AsyncGeneratorFunction%": Se,
|
|
2849
2849
|
"%AsyncIteratorPrototype%": Se,
|
|
2850
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
2851
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
2852
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
2853
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
2850
|
+
"%Atomics%": typeof Atomics > "u" ? P : Atomics,
|
|
2851
|
+
"%BigInt%": typeof BigInt > "u" ? P : BigInt,
|
|
2852
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? P : BigInt64Array,
|
|
2853
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? P : BigUint64Array,
|
|
2854
2854
|
"%Boolean%": Boolean,
|
|
2855
|
-
"%DataView%": typeof DataView > "u" ?
|
|
2855
|
+
"%DataView%": typeof DataView > "u" ? P : DataView,
|
|
2856
2856
|
"%Date%": Date,
|
|
2857
2857
|
"%decodeURI%": decodeURI,
|
|
2858
2858
|
"%decodeURIComponent%": decodeURIComponent,
|
|
@@ -2862,52 +2862,52 @@ var j, Vi = pn, Ki = yi, Di = mi, Qi = gi, Yi = bi, Ae = $i, je = Re, Xi = vi, Z
|
|
|
2862
2862
|
"%eval%": eval,
|
|
2863
2863
|
// eslint-disable-line no-eval
|
|
2864
2864
|
"%EvalError%": Di,
|
|
2865
|
-
"%Float16Array%": typeof Float16Array > "u" ?
|
|
2866
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
2867
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
2868
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
2865
|
+
"%Float16Array%": typeof Float16Array > "u" ? P : Float16Array,
|
|
2866
|
+
"%Float32Array%": typeof Float32Array > "u" ? P : Float32Array,
|
|
2867
|
+
"%Float64Array%": typeof Float64Array > "u" ? P : Float64Array,
|
|
2868
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? P : FinalizationRegistry,
|
|
2869
2869
|
"%Function%": $n,
|
|
2870
2870
|
"%GeneratorFunction%": Se,
|
|
2871
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
2872
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
2873
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
2871
|
+
"%Int8Array%": typeof Int8Array > "u" ? P : Int8Array,
|
|
2872
|
+
"%Int16Array%": typeof Int16Array > "u" ? P : Int16Array,
|
|
2873
|
+
"%Int32Array%": typeof Int32Array > "u" ? P : Int32Array,
|
|
2874
2874
|
"%isFinite%": isFinite,
|
|
2875
2875
|
"%isNaN%": isNaN,
|
|
2876
|
-
"%IteratorPrototype%": ve &&
|
|
2877
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
2878
|
-
"%Map%": typeof Map > "u" ?
|
|
2879
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !ve || !
|
|
2876
|
+
"%IteratorPrototype%": ve && I ? I(I([][Symbol.iterator]())) : P,
|
|
2877
|
+
"%JSON%": typeof JSON == "object" ? JSON : P,
|
|
2878
|
+
"%Map%": typeof Map > "u" ? P : Map,
|
|
2879
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !ve || !I ? P : I((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2880
2880
|
"%Math%": Math,
|
|
2881
2881
|
"%Number%": Number,
|
|
2882
2882
|
"%Object%": Vi,
|
|
2883
|
-
"%Object.getOwnPropertyDescriptor%":
|
|
2883
|
+
"%Object.getOwnPropertyDescriptor%": Be,
|
|
2884
2884
|
"%parseFloat%": parseFloat,
|
|
2885
2885
|
"%parseInt%": parseInt,
|
|
2886
|
-
"%Promise%": typeof Promise > "u" ?
|
|
2887
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
2886
|
+
"%Promise%": typeof Promise > "u" ? P : Promise,
|
|
2887
|
+
"%Proxy%": typeof Proxy > "u" ? P : Proxy,
|
|
2888
2888
|
"%RangeError%": Qi,
|
|
2889
2889
|
"%ReferenceError%": Yi,
|
|
2890
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
2890
|
+
"%Reflect%": typeof Reflect > "u" ? P : Reflect,
|
|
2891
2891
|
"%RegExp%": RegExp,
|
|
2892
|
-
"%Set%": typeof Set > "u" ?
|
|
2893
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !ve || !
|
|
2894
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
2892
|
+
"%Set%": typeof Set > "u" ? P : Set,
|
|
2893
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !ve || !I ? P : I((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2894
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? P : SharedArrayBuffer,
|
|
2895
2895
|
"%String%": String,
|
|
2896
|
-
"%StringIteratorPrototype%": ve &&
|
|
2897
|
-
"%Symbol%": ve ? Symbol :
|
|
2896
|
+
"%StringIteratorPrototype%": ve && I ? I(""[Symbol.iterator]()) : P,
|
|
2897
|
+
"%Symbol%": ve ? Symbol : P,
|
|
2898
2898
|
"%SyntaxError%": Ae,
|
|
2899
2899
|
"%ThrowTypeError%": sa,
|
|
2900
2900
|
"%TypedArray%": fa,
|
|
2901
2901
|
"%TypeError%": je,
|
|
2902
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
2903
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
2904
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
2905
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
2902
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? P : Uint8Array,
|
|
2903
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? P : Uint8ClampedArray,
|
|
2904
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? P : Uint16Array,
|
|
2905
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? P : Uint32Array,
|
|
2906
2906
|
"%URIError%": Xi,
|
|
2907
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
2908
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
2909
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
2910
|
-
"%Function.prototype.call%":
|
|
2907
|
+
"%WeakMap%": typeof WeakMap > "u" ? P : WeakMap,
|
|
2908
|
+
"%WeakRef%": typeof WeakRef > "u" ? P : WeakRef,
|
|
2909
|
+
"%WeakSet%": typeof WeakSet > "u" ? P : WeakSet,
|
|
2910
|
+
"%Function.prototype.call%": We,
|
|
2911
2911
|
"%Function.prototype.apply%": vn,
|
|
2912
2912
|
"%Object.defineProperty%": aa,
|
|
2913
2913
|
"%Object.getPrototypeOf%": ca,
|
|
@@ -2920,11 +2920,11 @@ var j, Vi = pn, Ki = yi, Di = mi, Qi = gi, Yi = bi, Ae = $i, je = Re, Xi = vi, Z
|
|
|
2920
2920
|
"%Math.sign%": ia,
|
|
2921
2921
|
"%Reflect.getPrototypeOf%": la
|
|
2922
2922
|
};
|
|
2923
|
-
if (
|
|
2923
|
+
if (I)
|
|
2924
2924
|
try {
|
|
2925
2925
|
null.error;
|
|
2926
2926
|
} catch (t) {
|
|
2927
|
-
var ua =
|
|
2927
|
+
var ua = I(I(t));
|
|
2928
2928
|
be["%Error.prototype%"] = ua;
|
|
2929
2929
|
}
|
|
2930
2930
|
var pa = function t(e) {
|
|
@@ -2940,7 +2940,7 @@ var pa = function t(e) {
|
|
|
2940
2940
|
n && (r = n.prototype);
|
|
2941
2941
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
2942
2942
|
var s = t("%AsyncGenerator%");
|
|
2943
|
-
s &&
|
|
2943
|
+
s && I && (r = I(s.prototype));
|
|
2944
2944
|
}
|
|
2945
2945
|
return be[e] = r, r;
|
|
2946
2946
|
}, Jr = {
|
|
@@ -2996,8 +2996,8 @@ var pa = function t(e) {
|
|
|
2996
2996
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2997
2997
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2998
2998
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2999
|
-
},
|
|
3000
|
-
var r =
|
|
2999
|
+
}, Je = dt(), lt = /* @__PURE__ */ zi(), da = Je.call(We, Array.prototype.concat), ha = Je.call(vn, Array.prototype.splice), Gr = Je.call(We, String.prototype.replace), ft = Je.call(We, String.prototype.slice), ya = Je.call(We, RegExp.prototype.exec), ma = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ga = /\\(\\)?/g, ba = function(e) {
|
|
3000
|
+
var r = ft(e, 0, 1), n = ft(e, -1);
|
|
3001
3001
|
if (r === "%" && n !== "%")
|
|
3002
3002
|
throw new Ae("invalid intrinsic syntax, expected closing `%`");
|
|
3003
3003
|
if (n === "%" && r !== "%")
|
|
@@ -3008,7 +3008,7 @@ var pa = function t(e) {
|
|
|
3008
3008
|
}), s;
|
|
3009
3009
|
}, $a = function(e, r) {
|
|
3010
3010
|
var n = e, s;
|
|
3011
|
-
if (
|
|
3011
|
+
if (lt(Jr, n) && (s = Jr[n], n = "%" + s[0] + "%"), lt(be, n)) {
|
|
3012
3012
|
var o = be[n];
|
|
3013
3013
|
if (o === Se && (o = pa(n)), typeof o > "u" && !r)
|
|
3014
3014
|
throw new je("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
@@ -3029,10 +3029,10 @@ var pa = function t(e) {
|
|
|
3029
3029
|
var n = ba(e), s = n.length > 0 ? n[0] : "", o = $a("%" + s + "%", r), a = o.name, i = o.value, c = !1, l = o.alias;
|
|
3030
3030
|
l && (s = l[0], ha(n, da([0, 1], l)));
|
|
3031
3031
|
for (var f = 1, u = !0; f < n.length; f += 1) {
|
|
3032
|
-
var p = n[f], d =
|
|
3032
|
+
var p = n[f], d = ft(p, 0, 1), h = ft(p, -1);
|
|
3033
3033
|
if ((d === '"' || d === "'" || d === "`" || h === '"' || h === "'" || h === "`") && d !== h)
|
|
3034
3034
|
throw new Ae("property names with quotes must have matching quotes");
|
|
3035
|
-
if ((p === "constructor" || !u) && (c = !0), s += "." + p, a = "%" + s + "%",
|
|
3035
|
+
if ((p === "constructor" || !u) && (c = !0), s += "." + p, a = "%" + s + "%", lt(be, a))
|
|
3036
3036
|
i = be[a];
|
|
3037
3037
|
else if (i != null) {
|
|
3038
3038
|
if (!(p in i)) {
|
|
@@ -3040,11 +3040,11 @@ var pa = function t(e) {
|
|
|
3040
3040
|
throw new je("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3041
3041
|
return;
|
|
3042
3042
|
}
|
|
3043
|
-
if (
|
|
3044
|
-
var y =
|
|
3043
|
+
if (Be && f + 1 >= n.length) {
|
|
3044
|
+
var y = Be(i, p);
|
|
3045
3045
|
u = !!y, u && "get" in y && !("originalValue" in y.get) ? i = y.get : i = i[p];
|
|
3046
3046
|
} else
|
|
3047
|
-
u =
|
|
3047
|
+
u = lt(i, p), i = i[p];
|
|
3048
3048
|
u && !c && (be[a] = i);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
@@ -3058,7 +3058,7 @@ var pa = function t(e) {
|
|
|
3058
3058
|
/** @type {const} */
|
|
3059
3059
|
[n]
|
|
3060
3060
|
) : n;
|
|
3061
|
-
}, wa = nr,
|
|
3061
|
+
}, wa = nr, Ge = On, Sa = ut, Oa = Re, zr = wa("%Map%", !0), Ta = Ge("Map.prototype.get", !0), xa = Ge("Map.prototype.set", !0), Ea = Ge("Map.prototype.has", !0), ja = Ge("Map.prototype.delete", !0), Pa = Ge("Map.prototype.size", !0), Tn = !!zr && /** @type {Exclude<import('.'), false>} */
|
|
3062
3062
|
function() {
|
|
3063
3063
|
var e, r = {
|
|
3064
3064
|
assert: function(n) {
|
|
@@ -3084,7 +3084,7 @@ function() {
|
|
|
3084
3084
|
}
|
|
3085
3085
|
};
|
|
3086
3086
|
return r;
|
|
3087
|
-
}, Ca = nr,
|
|
3087
|
+
}, Ca = nr, ht = On, ka = ut, De = Tn, Aa = Re, we = Ca("%WeakMap%", !0), Ra = ht("WeakMap.prototype.get", !0), qa = ht("WeakMap.prototype.set", !0), Na = ht("WeakMap.prototype.has", !0), _a = ht("WeakMap.prototype.delete", !0), La = we ? (
|
|
3088
3088
|
/** @type {Exclude<import('.'), false>} */
|
|
3089
3089
|
function() {
|
|
3090
3090
|
var e, r, n = {
|
|
@@ -3096,7 +3096,7 @@ function() {
|
|
|
3096
3096
|
if (we && s && (typeof s == "object" || typeof s == "function")) {
|
|
3097
3097
|
if (e)
|
|
3098
3098
|
return _a(e, s);
|
|
3099
|
-
} else if (
|
|
3099
|
+
} else if (De && r)
|
|
3100
3100
|
return r.delete(s);
|
|
3101
3101
|
return !1;
|
|
3102
3102
|
},
|
|
@@ -3107,12 +3107,12 @@ function() {
|
|
|
3107
3107
|
return we && s && (typeof s == "object" || typeof s == "function") && e ? Na(e, s) : !!r && r.has(s);
|
|
3108
3108
|
},
|
|
3109
3109
|
set: function(s, o) {
|
|
3110
|
-
we && s && (typeof s == "object" || typeof s == "function") ? (e || (e = new we()), qa(e, s, o)) :
|
|
3110
|
+
we && s && (typeof s == "object" || typeof s == "function") ? (e || (e = new we()), qa(e, s, o)) : De && (r || (r = De()), r.set(s, o));
|
|
3111
3111
|
}
|
|
3112
3112
|
};
|
|
3113
3113
|
return n;
|
|
3114
3114
|
}
|
|
3115
|
-
) :
|
|
3115
|
+
) : De, Ia = Re, Ua = ut, Fa = hi, Ma = Tn, Ha = La, Ba = Ha || Ma || Fa, xn = function() {
|
|
3116
3116
|
var e, r = {
|
|
3117
3117
|
assert: function(n) {
|
|
3118
3118
|
if (!r.has(n)) {
|
|
@@ -3149,22 +3149,22 @@ function() {
|
|
|
3149
3149
|
},
|
|
3150
3150
|
RFC1738: Lt.RFC1738,
|
|
3151
3151
|
RFC3986: Lt.RFC3986
|
|
3152
|
-
}, Ga = or, En = xn, Vr = hn, It = Object.prototype.hasOwnProperty,
|
|
3153
|
-
return
|
|
3152
|
+
}, Ga = or, En = xn, Vr = hn, It = Object.prototype.hasOwnProperty, pe = Array.isArray, yt = En(), me = function(e, r) {
|
|
3153
|
+
return yt.set(e, r), e;
|
|
3154
3154
|
}, ge = function(e) {
|
|
3155
|
-
return
|
|
3156
|
-
},
|
|
3157
|
-
return
|
|
3155
|
+
return yt.has(e);
|
|
3156
|
+
}, Le = function(e) {
|
|
3157
|
+
return yt.get(e);
|
|
3158
3158
|
}, Vt = function(e, r) {
|
|
3159
|
-
|
|
3160
|
-
},
|
|
3159
|
+
yt.set(e, r);
|
|
3160
|
+
}, ne = (function() {
|
|
3161
3161
|
for (var t = [], e = 0; e < 256; ++e)
|
|
3162
3162
|
t[t.length] = "%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase();
|
|
3163
3163
|
return t;
|
|
3164
3164
|
})(), za = function(e) {
|
|
3165
3165
|
for (; e.length > 1; ) {
|
|
3166
3166
|
var r = e.pop(), n = r.obj[r.prop];
|
|
3167
|
-
if (
|
|
3167
|
+
if (pe(n)) {
|
|
3168
3168
|
for (var s = [], o = 0; o < n.length; ++o)
|
|
3169
3169
|
typeof n[o] < "u" && (s[s.length] = n[o]);
|
|
3170
3170
|
r.obj[r.prop] = s;
|
|
@@ -3185,7 +3185,7 @@ function() {
|
|
|
3185
3185
|
if (!r)
|
|
3186
3186
|
return e;
|
|
3187
3187
|
if (typeof r != "object" && typeof r != "function") {
|
|
3188
|
-
if (
|
|
3188
|
+
if (pe(e)) {
|
|
3189
3189
|
var s = e.length;
|
|
3190
3190
|
if (n && typeof n.arrayLimit == "number" && s >= n.arrayLimit) {
|
|
3191
3191
|
if (n.throwOnLimitExceeded)
|
|
@@ -3195,7 +3195,7 @@ function() {
|
|
|
3195
3195
|
e[s] = r;
|
|
3196
3196
|
} else if (e && typeof e == "object")
|
|
3197
3197
|
if (ge(e)) {
|
|
3198
|
-
var o =
|
|
3198
|
+
var o = Le(e) + 1;
|
|
3199
3199
|
e[o] = r, Vt(e, o);
|
|
3200
3200
|
} else {
|
|
3201
3201
|
if (n && n.strictMerge)
|
|
@@ -3212,7 +3212,7 @@ function() {
|
|
|
3212
3212
|
var l = parseInt(a[c], 10);
|
|
3213
3213
|
i[l + 1] = r[a[c]];
|
|
3214
3214
|
}
|
|
3215
|
-
return me(i,
|
|
3215
|
+
return me(i, Le(r) + 1);
|
|
3216
3216
|
}
|
|
3217
3217
|
var f = [e].concat(r);
|
|
3218
3218
|
if (n && typeof n.arrayLimit == "number" && f.length > n.arrayLimit) {
|
|
@@ -3223,7 +3223,7 @@ function() {
|
|
|
3223
3223
|
return f;
|
|
3224
3224
|
}
|
|
3225
3225
|
var u = e;
|
|
3226
|
-
if (
|
|
3226
|
+
if (pe(e) && !pe(r) && (u = Ee(e, n)), pe(e) && pe(r)) {
|
|
3227
3227
|
if (r.forEach(function(p, d) {
|
|
3228
3228
|
if (It.call(e, d)) {
|
|
3229
3229
|
var h = e[d];
|
|
@@ -3239,9 +3239,9 @@ function() {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
return Object.keys(r).reduce(function(p, d) {
|
|
3241
3241
|
var h = r[d];
|
|
3242
|
-
if (It.call(p, d) ? Kt(p, d, t(p[d], h, n)) : Kt(p, d, h), ge(r) && !ge(p) && me(p,
|
|
3242
|
+
if (It.call(p, d) ? Kt(p, d, t(p[d], h, n)) : Kt(p, d, h), ge(r) && !ge(p) && me(p, Le(r)), ge(p)) {
|
|
3243
3243
|
var y = parseInt(d, 10);
|
|
3244
|
-
String(y) === d && y >= 0 && y >
|
|
3244
|
+
String(y) === d && y >= 0 && y > Le(p) && Vt(p, y);
|
|
3245
3245
|
}
|
|
3246
3246
|
return p;
|
|
3247
3247
|
}, u);
|
|
@@ -3258,7 +3258,7 @@ function() {
|
|
|
3258
3258
|
} catch {
|
|
3259
3259
|
return n;
|
|
3260
3260
|
}
|
|
3261
|
-
},
|
|
3261
|
+
}, Qe = 1024, Qa = function(e, r, n, s, o) {
|
|
3262
3262
|
if (e.length === 0)
|
|
3263
3263
|
return e;
|
|
3264
3264
|
var a = e;
|
|
@@ -3266,9 +3266,9 @@ function() {
|
|
|
3266
3266
|
return escape(a).replace(/%u[0-9a-f]{4}/gi, function(h) {
|
|
3267
3267
|
return "%26%23" + parseInt(h.slice(2), 16) + "%3B";
|
|
3268
3268
|
});
|
|
3269
|
-
for (var i = "", c = 0; c < a.length; c +=
|
|
3270
|
-
var l = a.length >=
|
|
3271
|
-
if (c +
|
|
3269
|
+
for (var i = "", c = 0; c < a.length; c += Qe) {
|
|
3270
|
+
var l = a.length >= Qe ? a.slice(c, c + Qe) : a;
|
|
3271
|
+
if (c + Qe < a.length) {
|
|
3272
3272
|
var f = l.charCodeAt(l.length - 1);
|
|
3273
3273
|
f >= 55296 && f <= 56319 && (l = l.slice(0, -1), c -= 1);
|
|
3274
3274
|
}
|
|
@@ -3279,18 +3279,18 @@ function() {
|
|
|
3279
3279
|
continue;
|
|
3280
3280
|
}
|
|
3281
3281
|
if (d < 128) {
|
|
3282
|
-
u[u.length] =
|
|
3282
|
+
u[u.length] = ne[d];
|
|
3283
3283
|
continue;
|
|
3284
3284
|
}
|
|
3285
3285
|
if (d < 2048) {
|
|
3286
|
-
u[u.length] =
|
|
3286
|
+
u[u.length] = ne[192 | d >> 6] + ne[128 | d & 63];
|
|
3287
3287
|
continue;
|
|
3288
3288
|
}
|
|
3289
3289
|
if (d < 55296 || d >= 57344) {
|
|
3290
|
-
u[u.length] =
|
|
3290
|
+
u[u.length] = ne[224 | d >> 12] + ne[128 | d >> 6 & 63] + ne[128 | d & 63];
|
|
3291
3291
|
continue;
|
|
3292
3292
|
}
|
|
3293
|
-
p += 1, d = 65536 + ((d & 1023) << 10 | l.charCodeAt(p) & 1023), u[u.length] =
|
|
3293
|
+
p += 1, d = 65536 + ((d & 1023) << 10 | l.charCodeAt(p) & 1023), u[u.length] = ne[240 | d >> 18] + ne[128 | d >> 12 & 63] + ne[128 | d >> 6 & 63] + ne[128 | d & 63];
|
|
3294
3294
|
}
|
|
3295
3295
|
i += u.join("");
|
|
3296
3296
|
}
|
|
@@ -3305,23 +3305,24 @@ function() {
|
|
|
3305
3305
|
}, Xa = function(e) {
|
|
3306
3306
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
3307
3307
|
}, Za = function(e) {
|
|
3308
|
-
return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
|
|
3308
|
+
return !e || typeof e != "object" ? !1 : !!(e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
3309
3309
|
}, es = function(e, r, n, s, o) {
|
|
3310
3310
|
if (ge(e)) {
|
|
3311
3311
|
if (o)
|
|
3312
3312
|
throw new RangeError("Array limit exceeded. Only " + n + " element" + (n === 1 ? "" : "s") + " allowed in an array.");
|
|
3313
|
-
var a =
|
|
3314
|
-
|
|
3313
|
+
for (var a = pe(r) ? r : [r], i = Le(e), c = 0; c < a.length; ++c)
|
|
3314
|
+
i += 1, e[i] = a[c];
|
|
3315
|
+
return Vt(e, i), e;
|
|
3315
3316
|
}
|
|
3316
|
-
var
|
|
3317
|
-
if (
|
|
3317
|
+
var l = [].concat(e, r);
|
|
3318
|
+
if (l.length > n) {
|
|
3318
3319
|
if (o)
|
|
3319
3320
|
throw new RangeError("Array limit exceeded. Only " + n + " element" + (n === 1 ? "" : "s") + " allowed in an array.");
|
|
3320
|
-
return me(Ee(
|
|
3321
|
+
return me(Ee(l, { plainObjects: s }), l.length - 1);
|
|
3321
3322
|
}
|
|
3322
|
-
return
|
|
3323
|
+
return l;
|
|
3323
3324
|
}, ts = function(e, r) {
|
|
3324
|
-
if (
|
|
3325
|
+
if (pe(e)) {
|
|
3325
3326
|
for (var n = [], s = 0; s < e.length; s += 1)
|
|
3326
3327
|
n[n.length] = r(e[s]);
|
|
3327
3328
|
return n;
|
|
@@ -3340,7 +3341,7 @@ function() {
|
|
|
3340
3341
|
markOverflow: me,
|
|
3341
3342
|
maybeMap: ts,
|
|
3342
3343
|
merge: Va
|
|
3343
|
-
}, Pn = xn,
|
|
3344
|
+
}, Pn = xn, et = jn, Me = or, rs = Object.prototype.hasOwnProperty, Cn = {
|
|
3344
3345
|
brackets: function(e) {
|
|
3345
3346
|
return e + "[]";
|
|
3346
3347
|
},
|
|
@@ -3351,9 +3352,9 @@ function() {
|
|
|
3351
3352
|
repeat: function(e) {
|
|
3352
3353
|
return e;
|
|
3353
3354
|
}
|
|
3354
|
-
},
|
|
3355
|
-
ns.apply(t,
|
|
3356
|
-
}, os = Date.prototype.toISOString, Kr =
|
|
3355
|
+
}, oe = Array.isArray, ns = Array.prototype.push, kn = function(t, e) {
|
|
3356
|
+
ns.apply(t, oe(e) ? e : [e]);
|
|
3357
|
+
}, os = Date.prototype.toISOString, Kr = Me.default, _ = {
|
|
3357
3358
|
addQueryPrefix: !1,
|
|
3358
3359
|
allowDots: !1,
|
|
3359
3360
|
allowEmptyArrays: !1,
|
|
@@ -3362,13 +3363,14 @@ function() {
|
|
|
3362
3363
|
charsetSentinel: !1,
|
|
3363
3364
|
commaRoundTrip: !1,
|
|
3364
3365
|
delimiter: "&",
|
|
3366
|
+
depth: 1 / 0,
|
|
3365
3367
|
encode: !0,
|
|
3366
3368
|
encodeDotInKeys: !1,
|
|
3367
|
-
encoder:
|
|
3369
|
+
encoder: et.encode,
|
|
3368
3370
|
encodeValuesOnly: !1,
|
|
3369
3371
|
filter: void 0,
|
|
3370
3372
|
format: Kr,
|
|
3371
|
-
formatter:
|
|
3373
|
+
formatter: Me.formatters[Kr],
|
|
3372
3374
|
// deprecated
|
|
3373
3375
|
indices: !1,
|
|
3374
3376
|
serializeDate: function(e) {
|
|
@@ -3378,63 +3380,66 @@ function() {
|
|
|
3378
3380
|
strictNullHandling: !1
|
|
3379
3381
|
}, is = function(e) {
|
|
3380
3382
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
|
3381
|
-
}, Ut = {}, as = function t(e, r, n, s, o, a, i, c, l, f, u, p, d, h, y, g,
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3383
|
+
}, Ut = {}, as = function t(e, r, n, s, o, a, i, c, l, f, u, p, d, h, y, g, b, m, v, O) {
|
|
3384
|
+
var $ = e;
|
|
3385
|
+
if (O > v)
|
|
3386
|
+
throw new RangeError("Input depth exceeded depth option of " + v);
|
|
3387
|
+
for (var w = m, C = 0, T = !1; (w = w.get(Ut)) !== void 0 && !T; ) {
|
|
3388
|
+
var k = w.get(e);
|
|
3389
|
+
if (C += 1, typeof k < "u") {
|
|
3390
|
+
if (k === C)
|
|
3386
3391
|
throw new RangeError("Cyclic object value");
|
|
3387
|
-
|
|
3392
|
+
T = !0;
|
|
3388
3393
|
}
|
|
3389
|
-
typeof
|
|
3394
|
+
typeof w.get(Ut) > "u" && (C = 0);
|
|
3390
3395
|
}
|
|
3391
|
-
if (typeof f == "function" ?
|
|
3392
|
-
return
|
|
3393
|
-
})),
|
|
3396
|
+
if ($ = typeof f == "function" ? f(r, $) : $, $ instanceof Date ? $ = d($) : n === "comma" && oe($) && ($ = et.maybeMap($, function(E) {
|
|
3397
|
+
return E instanceof Date ? d(E) : E;
|
|
3398
|
+
})), $ === null) {
|
|
3394
3399
|
if (a)
|
|
3395
|
-
return y(l && !g ? l(r,
|
|
3396
|
-
|
|
3400
|
+
return y(l && !g ? l(r, _.encoder, b, "key", h) : r);
|
|
3401
|
+
$ = "";
|
|
3397
3402
|
}
|
|
3398
|
-
if (is(
|
|
3403
|
+
if (is($) || et.isBuffer($)) {
|
|
3399
3404
|
if (l) {
|
|
3400
|
-
var
|
|
3401
|
-
return [y(
|
|
3405
|
+
var J = g ? r : l(r, _.encoder, b, "key", h);
|
|
3406
|
+
return [y(J) + "=" + y(l($, _.encoder, b, "value", h))];
|
|
3402
3407
|
}
|
|
3403
|
-
return [y(r) + "=" + y(String(
|
|
3408
|
+
return [y(r) + "=" + y(String($))];
|
|
3404
3409
|
}
|
|
3405
|
-
var
|
|
3406
|
-
if (typeof
|
|
3407
|
-
return
|
|
3408
|
-
var
|
|
3409
|
-
if (n === "comma" &&
|
|
3410
|
-
g && l && (
|
|
3411
|
-
return
|
|
3412
|
-
})),
|
|
3413
|
-
else if (
|
|
3414
|
-
|
|
3410
|
+
var Q = [];
|
|
3411
|
+
if (typeof $ > "u")
|
|
3412
|
+
return Q;
|
|
3413
|
+
var G;
|
|
3414
|
+
if (n === "comma" && oe($))
|
|
3415
|
+
g && l && ($ = et.maybeMap($, function(E) {
|
|
3416
|
+
return E == null ? E : l(E);
|
|
3417
|
+
})), G = [{ value: $.length > 0 ? $.join(",") || null : void 0 }];
|
|
3418
|
+
else if (oe(f))
|
|
3419
|
+
G = f;
|
|
3415
3420
|
else {
|
|
3416
|
-
var
|
|
3417
|
-
|
|
3421
|
+
var U = Object.keys($);
|
|
3422
|
+
G = u ? U.sort(u) : U;
|
|
3418
3423
|
}
|
|
3419
|
-
var
|
|
3420
|
-
if (o &&
|
|
3421
|
-
return
|
|
3422
|
-
for (var
|
|
3423
|
-
var
|
|
3424
|
-
if (!(i &&
|
|
3425
|
-
var
|
|
3426
|
-
m.set(e,
|
|
3427
|
-
var
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3424
|
+
var z = c ? String(r).replace(/\./g, "%2E") : String(r), K = s && oe($) && $.length === 1 ? z + "[]" : z;
|
|
3425
|
+
if (o && oe($) && $.length === 0 && Object.keys($).length === 0)
|
|
3426
|
+
return K + "[]";
|
|
3427
|
+
for (var V = 0; V < G.length; ++V) {
|
|
3428
|
+
var Y = G[V], ze = typeof Y == "object" && Y && typeof Y.value < "u" ? Y.value : $[Y];
|
|
3429
|
+
if (!(i && ze === null)) {
|
|
3430
|
+
var qe = p && c ? String(Y).replace(/\./g, "%2E") : String(Y), S = oe($) ? typeof n == "function" ? n(K, qe) : K : K + (p ? "." + qe : "[" + qe + "]");
|
|
3431
|
+
m.set(e, C);
|
|
3432
|
+
var x = Pn();
|
|
3433
|
+
x.set(Ut, m), kn(Q, t(
|
|
3434
|
+
ze,
|
|
3435
|
+
S,
|
|
3431
3436
|
n,
|
|
3432
3437
|
s,
|
|
3433
3438
|
o,
|
|
3434
3439
|
a,
|
|
3435
3440
|
i,
|
|
3436
3441
|
c,
|
|
3437
|
-
n === "comma" && g &&
|
|
3442
|
+
n === "comma" && g && oe($) ? null : l,
|
|
3438
3443
|
f,
|
|
3439
3444
|
u,
|
|
3440
3445
|
p,
|
|
@@ -3442,60 +3447,63 @@ function() {
|
|
|
3442
3447
|
h,
|
|
3443
3448
|
y,
|
|
3444
3449
|
g,
|
|
3445
|
-
|
|
3446
|
-
|
|
3450
|
+
b,
|
|
3451
|
+
x,
|
|
3452
|
+
v,
|
|
3453
|
+
O + 1
|
|
3447
3454
|
));
|
|
3448
3455
|
}
|
|
3449
3456
|
}
|
|
3450
|
-
return
|
|
3457
|
+
return Q;
|
|
3451
3458
|
}, ss = function(e) {
|
|
3452
3459
|
if (!e)
|
|
3453
|
-
return
|
|
3460
|
+
return _;
|
|
3454
3461
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
3455
3462
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3456
3463
|
if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
|
|
3457
3464
|
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
3458
3465
|
if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
|
|
3459
3466
|
throw new TypeError("Encoder has to be a function.");
|
|
3460
|
-
var r = e.charset ||
|
|
3467
|
+
var r = e.charset || _.charset;
|
|
3461
3468
|
if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
|
|
3462
3469
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3463
|
-
var n =
|
|
3470
|
+
var n = Me.default;
|
|
3464
3471
|
if (typeof e.format < "u") {
|
|
3465
|
-
if (!rs.call(
|
|
3472
|
+
if (!rs.call(Me.formatters, e.format))
|
|
3466
3473
|
throw new TypeError("Unknown format option provided.");
|
|
3467
3474
|
n = e.format;
|
|
3468
3475
|
}
|
|
3469
|
-
var s =
|
|
3470
|
-
(typeof e.filter == "function" ||
|
|
3476
|
+
var s = Me.formatters[n], o = _.filter;
|
|
3477
|
+
(typeof e.filter == "function" || oe(e.filter)) && (o = e.filter);
|
|
3471
3478
|
var a;
|
|
3472
|
-
if (e.arrayFormat in Cn ? a = e.arrayFormat : "indices" in e ? a = e.indices ? "indices" : "repeat" : a =
|
|
3479
|
+
if (e.arrayFormat in Cn ? a = e.arrayFormat : "indices" in e ? a = e.indices ? "indices" : "repeat" : a = _.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
|
|
3473
3480
|
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
3474
|
-
var i = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 :
|
|
3481
|
+
var i = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
|
|
3475
3482
|
return {
|
|
3476
|
-
addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix :
|
|
3483
|
+
addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : _.addQueryPrefix,
|
|
3477
3484
|
allowDots: i,
|
|
3478
|
-
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays :
|
|
3485
|
+
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : _.allowEmptyArrays,
|
|
3479
3486
|
arrayFormat: a,
|
|
3480
3487
|
charset: r,
|
|
3481
|
-
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel :
|
|
3488
|
+
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : _.charsetSentinel,
|
|
3482
3489
|
commaRoundTrip: !!e.commaRoundTrip,
|
|
3483
|
-
delimiter: typeof e.delimiter > "u" ?
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3490
|
+
delimiter: typeof e.delimiter > "u" ? _.delimiter : e.delimiter,
|
|
3491
|
+
depth: typeof e.depth == "number" ? e.depth : _.depth,
|
|
3492
|
+
encode: typeof e.encode == "boolean" ? e.encode : _.encode,
|
|
3493
|
+
encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : _.encodeDotInKeys,
|
|
3494
|
+
encoder: typeof e.encoder == "function" ? e.encoder : _.encoder,
|
|
3495
|
+
encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : _.encodeValuesOnly,
|
|
3488
3496
|
filter: o,
|
|
3489
3497
|
format: n,
|
|
3490
3498
|
formatter: s,
|
|
3491
|
-
serializeDate: typeof e.serializeDate == "function" ? e.serializeDate :
|
|
3492
|
-
skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls :
|
|
3499
|
+
serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : _.serializeDate,
|
|
3500
|
+
skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : _.skipNulls,
|
|
3493
3501
|
sort: typeof e.sort == "function" ? e.sort : null,
|
|
3494
|
-
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling :
|
|
3502
|
+
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling
|
|
3495
3503
|
};
|
|
3496
3504
|
}, cs = function(t, e) {
|
|
3497
3505
|
var r = t, n = ss(e), s, o;
|
|
3498
|
-
typeof n.filter == "function" ? (o = n.filter, r = o("", r)) :
|
|
3506
|
+
typeof n.filter == "function" ? (o = n.filter, r = o("", r)) : oe(n.filter) && (o = n.filter, s = o);
|
|
3499
3507
|
var a = [];
|
|
3500
3508
|
if (typeof r != "object" || r === null)
|
|
3501
3509
|
return "";
|
|
@@ -3505,31 +3513,36 @@ function() {
|
|
|
3505
3513
|
var u = s[f];
|
|
3506
3514
|
if (!(typeof u > "u" || u === null)) {
|
|
3507
3515
|
var p = r[u];
|
|
3508
|
-
n.skipNulls && p === null
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3516
|
+
if (!(n.skipNulls && p === null)) {
|
|
3517
|
+
var d = n.encodeDotInKeys ? String(u).replace(/\./g, "%2E") : String(u);
|
|
3518
|
+
kn(a, as(
|
|
3519
|
+
p,
|
|
3520
|
+
d,
|
|
3521
|
+
i,
|
|
3522
|
+
c,
|
|
3523
|
+
n.allowEmptyArrays,
|
|
3524
|
+
n.strictNullHandling,
|
|
3525
|
+
n.skipNulls,
|
|
3526
|
+
n.encodeDotInKeys,
|
|
3527
|
+
n.encode ? n.encoder : null,
|
|
3528
|
+
n.filter,
|
|
3529
|
+
n.sort,
|
|
3530
|
+
n.allowDots,
|
|
3531
|
+
n.serializeDate,
|
|
3532
|
+
n.format,
|
|
3533
|
+
n.formatter,
|
|
3534
|
+
n.encodeValuesOnly,
|
|
3535
|
+
n.charset,
|
|
3536
|
+
l,
|
|
3537
|
+
n.depth,
|
|
3538
|
+
0
|
|
3539
|
+
));
|
|
3540
|
+
}
|
|
3528
3541
|
}
|
|
3529
3542
|
}
|
|
3530
|
-
var
|
|
3531
|
-
return n.charsetSentinel && (n.charset === "iso-8859-1" ?
|
|
3532
|
-
},
|
|
3543
|
+
var h = a.join(n.delimiter), y = n.addQueryPrefix === !0 ? "?" : "";
|
|
3544
|
+
return n.charsetSentinel && (n.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B" + n.delimiter : y += "utf8=%E2%9C%93" + n.delimiter), h.length > 0 ? y + h : "";
|
|
3545
|
+
}, se = jn, tt = Object.prototype.hasOwnProperty, Ft = Array.isArray, q = {
|
|
3533
3546
|
allowDots: !1,
|
|
3534
3547
|
allowEmptyArrays: !1,
|
|
3535
3548
|
allowPrototypes: !1,
|
|
@@ -3539,7 +3552,7 @@ function() {
|
|
|
3539
3552
|
charsetSentinel: !1,
|
|
3540
3553
|
comma: !1,
|
|
3541
3554
|
decodeDotInKeys: !1,
|
|
3542
|
-
decoder:
|
|
3555
|
+
decoder: se.decode,
|
|
3543
3556
|
delimiter: "&",
|
|
3544
3557
|
depth: 5,
|
|
3545
3558
|
duplicates: "combine",
|
|
@@ -3556,13 +3569,13 @@ function() {
|
|
|
3556
3569
|
return t.replace(/&#(\d+);/g, function(e, r) {
|
|
3557
3570
|
return String.fromCharCode(parseInt(r, 10));
|
|
3558
3571
|
});
|
|
3559
|
-
}, An = function(t, e, r
|
|
3572
|
+
}, An = function(t, e, r) {
|
|
3560
3573
|
if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1) {
|
|
3561
|
-
if (
|
|
3562
|
-
for (var
|
|
3563
|
-
if (
|
|
3574
|
+
if (e.throwOnLimitExceeded)
|
|
3575
|
+
for (var n = 0, s = t.indexOf(","); s > -1; ) {
|
|
3576
|
+
if (n += 1, n >= e.arrayLimit)
|
|
3564
3577
|
throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
3565
|
-
|
|
3578
|
+
s = t.indexOf(",", s + 1);
|
|
3566
3579
|
}
|
|
3567
3580
|
return t.split(",");
|
|
3568
3581
|
}
|
|
@@ -3585,19 +3598,18 @@ function() {
|
|
|
3585
3598
|
for (c = 0; c < a.length; ++c)
|
|
3586
3599
|
if (c !== i) {
|
|
3587
3600
|
var f = a[c], u = f.indexOf("]="), p = u === -1 ? f.indexOf("=") : u + 1, d, h;
|
|
3588
|
-
if (p === -1 ? (d = r.decoder(f, q.decoder, l, "key"), h = r.strictNullHandling ? null : "") : (d = r.decoder(f.slice(0, p), q.decoder, l, "key"), d !== null && (h =
|
|
3601
|
+
if (p === -1 ? (d = r.decoder(f, q.decoder, l, "key"), h = r.strictNullHandling ? null : "") : (d = r.decoder(f.slice(0, p), q.decoder, l, "key"), d !== null && (h = se.maybeMap(
|
|
3589
3602
|
An(
|
|
3590
3603
|
f.slice(p + 1),
|
|
3591
3604
|
r,
|
|
3592
|
-
Ft(n[d]) ? n[d].length : 0
|
|
3593
|
-
f.indexOf("[]=") === -1
|
|
3605
|
+
Ft(n[d]) ? n[d].length : 0
|
|
3594
3606
|
),
|
|
3595
3607
|
function(g) {
|
|
3596
3608
|
return r.decoder(g, q.decoder, l, "value");
|
|
3597
3609
|
}
|
|
3598
|
-
))), h && r.interpretNumericEntities && l === "iso-8859-1" && (h = ls(String(h))), f.indexOf("[]=") > -1 && (h = Ft(h) ? [h] : h), r.comma && Ft(h) && h.length > r.arrayLimit && (h =
|
|
3599
|
-
var y =
|
|
3600
|
-
y && (r.duplicates === "combine" || f.indexOf("[]=") > -1) ? n[d] =
|
|
3610
|
+
))), h && r.interpretNumericEntities && l === "iso-8859-1" && (h = ls(String(h))), f.indexOf("[]=") > -1 && (h = Ft(h) ? [h] : h), r.comma && Ft(h) && h.length > r.arrayLimit && (h = se.combine([], h, r.arrayLimit, r.plainObjects, r.throwOnLimitExceeded)), d !== null) {
|
|
3611
|
+
var y = tt.call(n, d);
|
|
3612
|
+
y && (r.duplicates === "combine" || f.indexOf("[]=") > -1) ? n[d] = se.combine(
|
|
3601
3613
|
n[d],
|
|
3602
3614
|
h,
|
|
3603
3615
|
r.arrayLimit,
|
|
@@ -3616,7 +3628,7 @@ function() {
|
|
|
3616
3628
|
for (var a = n ? e : An(e, r, s), i = t.length - 1; i >= 0; --i) {
|
|
3617
3629
|
var c, l = t[i];
|
|
3618
3630
|
if (l === "[]" && r.parseArrays)
|
|
3619
|
-
|
|
3631
|
+
se.isOverflow(a) ? c = a : c = r.allowEmptyArrays && (a === "" || r.strictNullHandling && a === null) ? [] : se.combine(
|
|
3620
3632
|
[],
|
|
3621
3633
|
a,
|
|
3622
3634
|
r.arrayLimit,
|
|
@@ -3633,7 +3645,7 @@ function() {
|
|
|
3633
3645
|
else {
|
|
3634
3646
|
if (d && r.throwOnLimitExceeded)
|
|
3635
3647
|
throw new RangeError("Array limit exceeded. Only " + r.arrayLimit + " element" + (r.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
3636
|
-
d ? (c[p] = a,
|
|
3648
|
+
d ? (c[p] = a, se.markOverflow(c, p)) : u !== "__proto__" && (c[u] = a);
|
|
3637
3649
|
}
|
|
3638
3650
|
}
|
|
3639
3651
|
a = c;
|
|
@@ -3642,10 +3654,10 @@ function() {
|
|
|
3642
3654
|
}, hs = function(e, r) {
|
|
3643
3655
|
var n = r.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e;
|
|
3644
3656
|
if (r.depth <= 0)
|
|
3645
|
-
return !r.plainObjects &&
|
|
3657
|
+
return !r.plainObjects && tt.call(Object.prototype, n) && !r.allowPrototypes ? void 0 : [n];
|
|
3646
3658
|
var s = [], o = n.indexOf("["), a = o >= 0 ? n.slice(0, o) : n;
|
|
3647
3659
|
if (a) {
|
|
3648
|
-
if (!r.plainObjects &&
|
|
3660
|
+
if (!r.plainObjects && tt.call(Object.prototype, a) && !r.allowPrototypes)
|
|
3649
3661
|
return;
|
|
3650
3662
|
s[s.length] = a;
|
|
3651
3663
|
}
|
|
@@ -3657,7 +3669,7 @@ function() {
|
|
|
3657
3669
|
if (p < 0)
|
|
3658
3670
|
return s[s.length] = "[" + n.slice(c) + "]", s;
|
|
3659
3671
|
var h = n.slice(c, p + 1), y = h.slice(1, -1);
|
|
3660
|
-
if (!r.plainObjects &&
|
|
3672
|
+
if (!r.plainObjects && tt.call(Object.prototype, y) && !r.allowPrototypes)
|
|
3661
3673
|
return;
|
|
3662
3674
|
s[s.length] = h, l += 1, c = n.indexOf("[", p + 1);
|
|
3663
3675
|
}
|
|
@@ -3701,7 +3713,7 @@ function() {
|
|
|
3701
3713
|
comma: typeof e.comma == "boolean" ? e.comma : q.comma,
|
|
3702
3714
|
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : q.decodeDotInKeys,
|
|
3703
3715
|
decoder: typeof e.decoder == "function" ? e.decoder : q.decoder,
|
|
3704
|
-
delimiter: typeof e.delimiter == "string" ||
|
|
3716
|
+
delimiter: typeof e.delimiter == "string" || se.isRegExp(e.delimiter) ? e.delimiter : q.delimiter,
|
|
3705
3717
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3706
3718
|
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : q.depth,
|
|
3707
3719
|
duplicates: n,
|
|
@@ -3721,15 +3733,15 @@ function() {
|
|
|
3721
3733
|
return r.plainObjects ? { __proto__: null } : {};
|
|
3722
3734
|
for (var n = typeof t == "string" ? ps(t, r) : t, s = r.plainObjects ? { __proto__: null } : {}, o = Object.keys(n), a = 0; a < o.length; ++a) {
|
|
3723
3735
|
var i = o[a], c = ys(i, n[i], r, typeof t == "string");
|
|
3724
|
-
s =
|
|
3736
|
+
s = se.merge(s, c, r);
|
|
3725
3737
|
}
|
|
3726
|
-
return r.allowSparse === !0 ? s :
|
|
3727
|
-
}, bs = cs, $s = gs, vs = or,
|
|
3738
|
+
return r.allowSparse === !0 ? s : se.compact(s);
|
|
3739
|
+
}, bs = cs, $s = gs, vs = or, rt = {
|
|
3728
3740
|
formats: vs,
|
|
3729
3741
|
parse: $s,
|
|
3730
3742
|
stringify: bs
|
|
3731
3743
|
}, ws = Ao;
|
|
3732
|
-
function
|
|
3744
|
+
function te() {
|
|
3733
3745
|
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;
|
|
3734
3746
|
}
|
|
3735
3747
|
var Ss = /^([a-z0-9.+-]+:)/i, Os = /:[0-9]*$/, Ts = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, xs = [
|
|
@@ -3776,14 +3788,14 @@ var Ss = /^([a-z0-9.+-]+:)/i, Os = /:[0-9]*$/, Ts = /^(\/\/?(?!\/)[^?\s]*)(\?[^\
|
|
|
3776
3788
|
"ftp:": !0,
|
|
3777
3789
|
"gopher:": !0,
|
|
3778
3790
|
"file:": !0
|
|
3779
|
-
}, Yt =
|
|
3791
|
+
}, Yt = rt;
|
|
3780
3792
|
function ir(t, e, r) {
|
|
3781
|
-
if (t && typeof t == "object" && t instanceof
|
|
3793
|
+
if (t && typeof t == "object" && t instanceof te)
|
|
3782
3794
|
return t;
|
|
3783
|
-
var n = new
|
|
3795
|
+
var n = new te();
|
|
3784
3796
|
return n.parse(t, e, r), n;
|
|
3785
3797
|
}
|
|
3786
|
-
|
|
3798
|
+
te.prototype.parse = function(t, e, r) {
|
|
3787
3799
|
if (typeof t != "string")
|
|
3788
3800
|
throw new TypeError("Parameter 'url' must be a string, not " + typeof t);
|
|
3789
3801
|
var n = t.indexOf("?"), s = n !== -1 && n < t.indexOf("#") ? "?" : "#", o = t.split(s), a = /\\/g;
|
|
@@ -3816,45 +3828,45 @@ ee.prototype.parse = function(t, e, r) {
|
|
|
3816
3828
|
h !== -1 && (p === -1 || h < p) && (p = h);
|
|
3817
3829
|
}
|
|
3818
3830
|
p === -1 && (p = i.length), this.host = i.slice(0, p), i = i.slice(p), this.parseHost(), this.hostname = this.hostname || "";
|
|
3819
|
-
var
|
|
3820
|
-
if (
|
|
3821
|
-
for (var m = this.hostname.split(/\./), d = 0,
|
|
3822
|
-
var
|
|
3823
|
-
if (
|
|
3824
|
-
for (var
|
|
3825
|
-
|
|
3826
|
-
if (
|
|
3827
|
-
var T = m.slice(0, d), k = m.slice(d + 1),
|
|
3828
|
-
|
|
3831
|
+
var b = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
3832
|
+
if (!b)
|
|
3833
|
+
for (var m = this.hostname.split(/\./), d = 0, v = m.length; d < v; d++) {
|
|
3834
|
+
var O = m[d];
|
|
3835
|
+
if (O && !O.match(Yr)) {
|
|
3836
|
+
for (var $ = "", w = 0, C = O.length; w < C; w++)
|
|
3837
|
+
O.charCodeAt(w) > 127 ? $ += "x" : $ += O[w];
|
|
3838
|
+
if (!$.match(Yr)) {
|
|
3839
|
+
var T = m.slice(0, d), k = m.slice(d + 1), J = O.match(Ps);
|
|
3840
|
+
J && (T.push(J[1]), k.unshift(J[2])), k.length && (i = "/" + k.join(".") + i), this.hostname = T.join(".");
|
|
3829
3841
|
break;
|
|
3830
3842
|
}
|
|
3831
3843
|
}
|
|
3832
3844
|
}
|
|
3833
|
-
this.hostname.length > js ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(),
|
|
3834
|
-
var Q = this.port ? ":" + this.port : "",
|
|
3835
|
-
this.host =
|
|
3845
|
+
this.hostname.length > js ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), b || (this.hostname = ws.toASCII(this.hostname));
|
|
3846
|
+
var Q = this.port ? ":" + this.port : "", G = this.hostname || "";
|
|
3847
|
+
this.host = G + Q, this.href += this.host, b && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), i[0] !== "/" && (i = "/" + i));
|
|
3836
3848
|
}
|
|
3837
3849
|
if (!Cs[f])
|
|
3838
|
-
for (var d = 0,
|
|
3839
|
-
var
|
|
3840
|
-
if (i.indexOf(
|
|
3841
|
-
var
|
|
3842
|
-
|
|
3850
|
+
for (var d = 0, v = Dt.length; d < v; d++) {
|
|
3851
|
+
var U = Dt[d];
|
|
3852
|
+
if (i.indexOf(U) !== -1) {
|
|
3853
|
+
var z = encodeURIComponent(U);
|
|
3854
|
+
z === U && (z = escape(U)), i = i.split(U).join(z);
|
|
3843
3855
|
}
|
|
3844
3856
|
}
|
|
3845
|
-
var
|
|
3846
|
-
|
|
3857
|
+
var K = i.indexOf("#");
|
|
3858
|
+
K !== -1 && (this.hash = i.substr(K), i = i.slice(0, K));
|
|
3847
3859
|
var V = i.indexOf("?");
|
|
3848
3860
|
if (V !== -1 ? (this.search = i.substr(V), this.query = i.substr(V + 1), e && (this.query = Yt.parse(this.query)), i = i.slice(0, V)) : e && (this.search = "", this.query = {}), i && (this.pathname = i), Pe[f] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
|
|
3849
|
-
var Q = this.pathname || "",
|
|
3850
|
-
this.path = Q +
|
|
3861
|
+
var Q = this.pathname || "", Y = this.search || "";
|
|
3862
|
+
this.path = Q + Y;
|
|
3851
3863
|
}
|
|
3852
3864
|
return this.href = this.format(), this;
|
|
3853
3865
|
};
|
|
3854
3866
|
function ks(t) {
|
|
3855
|
-
return typeof t == "string" && (t = ir(t)), t instanceof
|
|
3867
|
+
return typeof t == "string" && (t = ir(t)), t instanceof te ? t.format() : te.prototype.format.call(t);
|
|
3856
3868
|
}
|
|
3857
|
-
|
|
3869
|
+
te.prototype.format = function() {
|
|
3858
3870
|
var t = this.auth || "";
|
|
3859
3871
|
t && (t = encodeURIComponent(t), t = t.replace(/%3A/i, ":"), t += "@");
|
|
3860
3872
|
var e = this.protocol || "", r = this.pathname || "", n = this.hash || "", s = !1, o = "";
|
|
@@ -3867,15 +3879,15 @@ ee.prototype.format = function() {
|
|
|
3867
3879
|
return encodeURIComponent(i);
|
|
3868
3880
|
}), a = a.replace("#", "%23"), e + s + r + a + n;
|
|
3869
3881
|
};
|
|
3870
|
-
|
|
3882
|
+
te.prototype.resolve = function(t) {
|
|
3871
3883
|
return this.resolveObject(ir(t, !1, !0)).format();
|
|
3872
3884
|
};
|
|
3873
|
-
|
|
3885
|
+
te.prototype.resolveObject = function(t) {
|
|
3874
3886
|
if (typeof t == "string") {
|
|
3875
|
-
var e = new
|
|
3887
|
+
var e = new te();
|
|
3876
3888
|
e.parse(t, !1, !0), t = e;
|
|
3877
3889
|
}
|
|
3878
|
-
for (var r = new
|
|
3890
|
+
for (var r = new te(), n = Object.keys(this), s = 0; s < n.length; s++) {
|
|
3879
3891
|
var o = n[s];
|
|
3880
3892
|
r[o] = this[o];
|
|
3881
3893
|
}
|
|
@@ -3897,9 +3909,9 @@ ee.prototype.resolveObject = function(t) {
|
|
|
3897
3909
|
return r.href = r.format(), r;
|
|
3898
3910
|
}
|
|
3899
3911
|
if (r.protocol = t.protocol, !t.host && !Qt[t.protocol]) {
|
|
3900
|
-
for (var
|
|
3912
|
+
for (var v = (t.pathname || "").split("/"); v.length && !(t.host = v.shift()); )
|
|
3901
3913
|
;
|
|
3902
|
-
t.host || (t.host = ""), t.hostname || (t.hostname = ""),
|
|
3914
|
+
t.host || (t.host = ""), t.hostname || (t.hostname = ""), v[0] !== "" && v.unshift(""), v.length < 2 && v.unshift(""), r.pathname = v.join("/");
|
|
3903
3915
|
} else
|
|
3904
3916
|
r.pathname = t.pathname;
|
|
3905
3917
|
if (r.search = t.search, r.query = t.query, r.host = t.host || "", r.auth = t.auth, r.hostname = t.hostname || t.host, r.port = t.port, r.pathname || r.search) {
|
|
@@ -3908,36 +3920,36 @@ ee.prototype.resolveObject = function(t) {
|
|
|
3908
3920
|
}
|
|
3909
3921
|
return r.slashes = r.slashes || t.slashes, r.href = r.format(), r;
|
|
3910
3922
|
}
|
|
3911
|
-
var h = r.pathname && r.pathname.charAt(0) === "/", y = t.host || t.pathname && t.pathname.charAt(0) === "/", g = y || h || r.host && t.pathname,
|
|
3912
|
-
if (
|
|
3913
|
-
r.host = t.host || t.host === "" ? t.host : r.host, r.hostname = t.hostname || t.hostname === "" ? t.hostname : r.hostname, r.search = t.search, r.query = t.query, m =
|
|
3914
|
-
else if (
|
|
3915
|
-
m || (m = []), m.pop(), m = m.concat(
|
|
3923
|
+
var h = r.pathname && r.pathname.charAt(0) === "/", y = t.host || t.pathname && t.pathname.charAt(0) === "/", g = y || h || r.host && t.pathname, b = g, m = r.pathname && r.pathname.split("/") || [], v = t.pathname && t.pathname.split("/") || [], O = r.protocol && !Pe[r.protocol];
|
|
3924
|
+
if (O && (r.hostname = "", r.port = null, r.host && (m[0] === "" ? m[0] = r.host : m.unshift(r.host)), r.host = "", t.protocol && (t.hostname = null, t.port = null, t.host && (v[0] === "" ? v[0] = t.host : v.unshift(t.host)), t.host = null), g = g && (v[0] === "" || m[0] === "")), y)
|
|
3925
|
+
r.host = t.host || t.host === "" ? t.host : r.host, r.hostname = t.hostname || t.hostname === "" ? t.hostname : r.hostname, r.search = t.search, r.query = t.query, m = v;
|
|
3926
|
+
else if (v.length)
|
|
3927
|
+
m || (m = []), m.pop(), m = m.concat(v), r.search = t.search, r.query = t.query;
|
|
3916
3928
|
else if (t.search != null) {
|
|
3917
|
-
if (
|
|
3929
|
+
if (O) {
|
|
3918
3930
|
r.host = m.shift(), r.hostname = r.host;
|
|
3919
|
-
var
|
|
3920
|
-
|
|
3931
|
+
var $ = r.host && r.host.indexOf("@") > 0 ? r.host.split("@") : !1;
|
|
3932
|
+
$ && (r.auth = $.shift(), r.hostname = $.shift(), r.host = r.hostname);
|
|
3921
3933
|
}
|
|
3922
3934
|
return r.search = t.search, r.query = t.query, (r.pathname !== null || r.search !== null) && (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.href = r.format(), r;
|
|
3923
3935
|
}
|
|
3924
3936
|
if (!m.length)
|
|
3925
3937
|
return r.pathname = null, r.search ? r.path = "/" + r.search : r.path = null, r.href = r.format(), r;
|
|
3926
|
-
for (var
|
|
3927
|
-
|
|
3928
|
-
if (!g &&
|
|
3938
|
+
for (var w = m.slice(-1)[0], C = (r.host || t.host || m.length > 1) && (w === "." || w === "..") || w === "", T = 0, k = m.length; k >= 0; k--)
|
|
3939
|
+
w = m[k], w === "." ? m.splice(k, 1) : w === ".." ? (m.splice(k, 1), T++) : T && (m.splice(k, 1), T--);
|
|
3940
|
+
if (!g && !b)
|
|
3929
3941
|
for (; T--; T)
|
|
3930
3942
|
m.unshift("..");
|
|
3931
|
-
g && m[0] !== "" && (!m[0] || m[0].charAt(0) !== "/") && m.unshift(""),
|
|
3932
|
-
var
|
|
3933
|
-
if (
|
|
3934
|
-
r.hostname =
|
|
3935
|
-
var
|
|
3936
|
-
|
|
3943
|
+
g && m[0] !== "" && (!m[0] || m[0].charAt(0) !== "/") && m.unshift(""), C && m.join("/").substr(-1) !== "/" && m.push("");
|
|
3944
|
+
var J = m[0] === "" || m[0] && m[0].charAt(0) === "/";
|
|
3945
|
+
if (O) {
|
|
3946
|
+
r.hostname = J ? "" : m.length ? m.shift() : "", r.host = r.hostname;
|
|
3947
|
+
var $ = r.host && r.host.indexOf("@") > 0 ? r.host.split("@") : !1;
|
|
3948
|
+
$ && (r.auth = $.shift(), r.hostname = $.shift(), r.host = r.hostname);
|
|
3937
3949
|
}
|
|
3938
|
-
return g = g || r.host && m.length, g && !
|
|
3950
|
+
return g = g || r.host && m.length, g && !J && m.unshift(""), m.length > 0 ? r.pathname = m.join("/") : (r.pathname = null, r.path = null), (r.pathname !== null || r.search !== null) && (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")), r.auth = t.auth || r.auth, r.slashes = r.slashes || t.slashes, r.href = r.format(), r;
|
|
3939
3951
|
};
|
|
3940
|
-
|
|
3952
|
+
te.prototype.parseHost = function() {
|
|
3941
3953
|
var t = this.host, e = Os.exec(t);
|
|
3942
3954
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), t = t.substr(0, t.length - e.length)), t && (this.hostname = t);
|
|
3943
3955
|
};
|
|
@@ -3983,10 +3995,10 @@ var Ns = class {
|
|
|
3983
3995
|
if (r != null && r.queryString.length && (r.queryObj = r.queryString.reduce(vr, {})), r != null && r.headers.length) {
|
|
3984
3996
|
const d = /^HTTP\/2/;
|
|
3985
3997
|
r.headersObj = r.headers.reduce((h, { name: y, value: g }) => {
|
|
3986
|
-
const
|
|
3998
|
+
const b = d.exec(r.httpVersion) ? y.toLocaleLowerCase() : y;
|
|
3987
3999
|
return {
|
|
3988
4000
|
...h,
|
|
3989
|
-
[
|
|
4001
|
+
[b]: g
|
|
3990
4002
|
};
|
|
3991
4003
|
}, {});
|
|
3992
4004
|
}
|
|
@@ -4004,18 +4016,18 @@ var Ns = class {
|
|
|
4004
4016
|
const d = "---011000010111000001101001", h = `${d}--`, y = `\r
|
|
4005
4017
|
`;
|
|
4006
4018
|
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
4007
|
-
const g = (
|
|
4019
|
+
const g = (O) => O.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"), b = (O) => O.replace(/\r?\n|\r/g, `\r
|
|
4008
4020
|
`), m = [`--${d}`];
|
|
4009
|
-
(p = r.postData) == null || p.params.forEach((
|
|
4010
|
-
const
|
|
4011
|
-
T ? (m.push(`Content-Disposition: form-data; name="${g(
|
|
4021
|
+
(p = r.postData) == null || p.params.forEach((O, $) => {
|
|
4022
|
+
const w = O.name, C = O.value || "", T = O.fileName || null, k = O.contentType || "application/octet-stream";
|
|
4023
|
+
T ? (m.push(`Content-Disposition: form-data; name="${g(b(w))}"; filename="${T}"`), m.push(`Content-Type: ${k}`)) : m.push(`Content-Disposition: form-data; name="${escape(b(w))}"`), m.push(""), m.push(b(C)), $ !== r.postData.params.length - 1 && m.push(`--${d}`);
|
|
4012
4024
|
}), m.push(`--${h}`), r.postData.boundary = d, r.postData.text = m.join(y);
|
|
4013
|
-
const
|
|
4014
|
-
r.headersObj[
|
|
4025
|
+
const v = B(r.headersObj, "content-type") || "content-type";
|
|
4026
|
+
r.headersObj[v] = `multipart/form-data; boundary=${d}`;
|
|
4015
4027
|
}
|
|
4016
4028
|
break;
|
|
4017
4029
|
case "application/x-www-form-urlencoded":
|
|
4018
|
-
r.postData.params ? (r.postData.paramsObj = r.postData.params.reduce(vr, {}), r.postData.text =
|
|
4030
|
+
r.postData.params ? (r.postData.paramsObj = r.postData.params.reduce(vr, {}), r.postData.text = rt.stringify(r.postData.paramsObj)) : r.postData.text = "";
|
|
4019
4031
|
break;
|
|
4020
4032
|
case "text/json":
|
|
4021
4033
|
case "text/x-json":
|
|
@@ -4037,10 +4049,10 @@ var Ns = class {
|
|
|
4037
4049
|
...o.query
|
|
4038
4050
|
};
|
|
4039
4051
|
let a;
|
|
4040
|
-
e.harIsAlreadyEncoded ? a =
|
|
4052
|
+
e.harIsAlreadyEncoded ? a = rt.stringify(r.queryObj, {
|
|
4041
4053
|
encode: !1,
|
|
4042
4054
|
indices: !1
|
|
4043
|
-
}) : a =
|
|
4055
|
+
}) : a = rt.stringify(r.queryObj, { indices: !1 });
|
|
4044
4056
|
const i = {
|
|
4045
4057
|
...o,
|
|
4046
4058
|
query: r.queryObj,
|
|
@@ -4180,28 +4192,28 @@ function Bs(t, e, r) {
|
|
|
4180
4192
|
}
|
|
4181
4193
|
const Ws = `${Rn}:${qn}`;
|
|
4182
4194
|
function Vs({ method: t, path: e, parameters: r, requestBody: n, security: s, id: o }) {
|
|
4183
|
-
var
|
|
4184
|
-
const { document: a, deref: i, showCodeSamples: c } = Un(), l = a, f = _n(), u =
|
|
4195
|
+
var C;
|
|
4196
|
+
const { document: a, deref: i, showCodeSamples: c } = Un(), l = a, f = _n(), u = Ve(() => _s(), []), [p, d] = gt(Ws), [h, y] = p.split(":"), g = Bn(h), b = Ve(() => Ms(n), [n]), [m, v] = gt(void 0);
|
|
4185
4197
|
sr(() => {
|
|
4186
|
-
if (
|
|
4198
|
+
if (v(void 0), !b || b.authorExample !== void 0 || !b.schema) return;
|
|
4187
4199
|
let T = !1;
|
|
4188
|
-
return Wn(
|
|
4189
|
-
T ||
|
|
4200
|
+
return Wn(b.schema).then((k) => {
|
|
4201
|
+
T || v(k);
|
|
4190
4202
|
}), () => {
|
|
4191
4203
|
T = !0;
|
|
4192
4204
|
};
|
|
4193
|
-
}, [
|
|
4194
|
-
const [,
|
|
4205
|
+
}, [b]);
|
|
4206
|
+
const [, O] = gt(() => cr(g));
|
|
4195
4207
|
sr(() => {
|
|
4196
|
-
|
|
4208
|
+
O(cr(g));
|
|
4197
4209
|
let T = !1;
|
|
4198
4210
|
return Fn(g).then(() => {
|
|
4199
|
-
T ||
|
|
4211
|
+
T || O(!0);
|
|
4200
4212
|
}), () => {
|
|
4201
4213
|
T = !0;
|
|
4202
4214
|
};
|
|
4203
4215
|
}, [g]);
|
|
4204
|
-
const
|
|
4216
|
+
const $ = Ve(
|
|
4205
4217
|
() => {
|
|
4206
4218
|
var T;
|
|
4207
4219
|
return Hs({
|
|
@@ -4211,16 +4223,16 @@ function Vs({ method: t, path: e, parameters: r, requestBody: n, security: s, id
|
|
|
4211
4223
|
parameters: r,
|
|
4212
4224
|
security: s,
|
|
4213
4225
|
securitySchemes: (T = l.components) == null ? void 0 : T.securitySchemes,
|
|
4214
|
-
media:
|
|
4215
|
-
resolvedBodyValue: (
|
|
4226
|
+
media: b,
|
|
4227
|
+
resolvedBodyValue: (b == null ? void 0 : b.authorExample) ?? m
|
|
4216
4228
|
});
|
|
4217
4229
|
},
|
|
4218
|
-
[t, e, l.servers, r, s, (
|
|
4219
|
-
),
|
|
4230
|
+
[t, e, l.servers, r, s, (C = l.components) == null ? void 0 : C.securitySchemes, b, m]
|
|
4231
|
+
), w = Ve(() => h === Rn && y === qn ? Mn(l, t, e, i) : Bs($, h, y), [$, h, y, l, t, e, i]);
|
|
4220
4232
|
return c ? /* @__PURE__ */ ar("div", { id: `endpoint-${o}-code-samples`, children: [
|
|
4221
4233
|
/* @__PURE__ */ ar("div", { className: "flex items-center justify-between mb-2", children: [
|
|
4222
|
-
/* @__PURE__ */
|
|
4223
|
-
/* @__PURE__ */
|
|
4234
|
+
/* @__PURE__ */ Ne("label", { htmlFor: f, className: "text-xs font-medium text-foreground-muted uppercase tracking-wider", children: "Example Request" }),
|
|
4235
|
+
/* @__PURE__ */ Ne(
|
|
4224
4236
|
"select",
|
|
4225
4237
|
{
|
|
4226
4238
|
id: f,
|
|
@@ -4228,11 +4240,11 @@ function Vs({ method: t, path: e, parameters: r, requestBody: n, security: s, id
|
|
|
4228
4240
|
onChange: (T) => d(T.target.value),
|
|
4229
4241
|
"aria-label": "Code sample language",
|
|
4230
4242
|
className: "text-xs font-medium rounded-md border border-border bg-surface px-2 py-1 text-foreground-secondary focus:border-secondary-500 focus:ring-secondary-500",
|
|
4231
|
-
children: u.map((T) => /* @__PURE__ */
|
|
4243
|
+
children: u.map((T) => /* @__PURE__ */ Ne("optgroup", { label: T.title, children: T.clients.map((k) => /* @__PURE__ */ Ne("option", { value: `${T.key}:${k.key}`, children: k.title }, k.key)) }, T.key))
|
|
4232
4244
|
}
|
|
4233
4245
|
)
|
|
4234
4246
|
] }),
|
|
4235
|
-
/* @__PURE__ */
|
|
4247
|
+
/* @__PURE__ */ Ne(Hn, { code: w, language: g })
|
|
4236
4248
|
] }) : null;
|
|
4237
4249
|
}
|
|
4238
4250
|
export {
|