@jerome-benoit/sap-ai-provider 4.6.9 → 4.7.1
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/LICENSE +202 -0
- package/README.md +22 -32
- package/dist/{chunk-EXOXZ5OU.js → chunk-4JIMBRMV.js} +44 -7
- package/dist/chunk-4JIMBRMV.js.map +1 -0
- package/dist/{chunk-4RRRJBEL.js → chunk-BZWUUBX2.js} +407 -275
- package/dist/chunk-BZWUUBX2.js.map +1 -0
- package/dist/chunk-HDOSHLV6.js +190 -0
- package/dist/chunk-HDOSHLV6.js.map +1 -0
- package/dist/chunk-OA6TJHD2.js +93 -0
- package/dist/chunk-OA6TJHD2.js.map +1 -0
- package/dist/{chunk-DYFBCE2W.js → chunk-RUCURXS7.js} +60 -6
- package/dist/chunk-RUCURXS7.js.map +1 -0
- package/dist/{chunk-F4MUYVQJ.js → chunk-XIWHF23D.js} +1919 -955
- package/dist/chunk-XIWHF23D.js.map +1 -0
- package/dist/{foundation-models-embedding-model-strategy-3MMM3QDC.js → foundation-models-embedding-model-strategy-TACUPFS2.js} +8 -4
- package/dist/foundation-models-embedding-model-strategy-TACUPFS2.js.map +1 -0
- package/dist/{foundation-models-language-model-strategy-OPGTN6DA.js → foundation-models-language-model-strategy-LLWYUGA3.js} +15 -10
- package/dist/foundation-models-language-model-strategy-LLWYUGA3.js.map +1 -0
- package/dist/index.cjs +2546 -1311
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -66
- package/dist/index.d.ts +68 -66
- package/dist/index.js +11 -172
- package/dist/index.js.map +1 -1
- package/dist/{orchestration-embedding-model-strategy-R6G6VVU6.js → orchestration-embedding-model-strategy-RYI3HWRZ.js} +14 -4
- package/dist/orchestration-embedding-model-strategy-RYI3HWRZ.js.map +1 -0
- package/dist/{orchestration-language-model-strategy-KFW3CFRY.js → orchestration-language-model-strategy-NIUPRYDW.js} +53 -77
- package/dist/orchestration-language-model-strategy-NIUPRYDW.js.map +1 -0
- package/package.json +18 -14
- package/LICENSE.md +0 -187
- package/dist/chunk-4RRRJBEL.js.map +0 -1
- package/dist/chunk-DYFBCE2W.js.map +0 -1
- package/dist/chunk-EXOXZ5OU.js.map +0 -1
- package/dist/chunk-F4MUYVQJ.js.map +0 -1
- package/dist/chunk-NQJIUL3F.js +0 -61
- package/dist/chunk-NQJIUL3F.js.map +0 -1
- package/dist/foundation-models-embedding-model-strategy-3MMM3QDC.js.map +0 -1
- package/dist/foundation-models-language-model-strategy-OPGTN6DA.js.map +0 -1
- package/dist/orchestration-embedding-model-strategy-R6G6VVU6.js.map +0 -1
- package/dist/orchestration-language-model-strategy-KFW3CFRY.js.map +0 -1
|
@@ -24179,6 +24179,456 @@ var require_src = __commonJS({
|
|
|
24179
24179
|
}
|
|
24180
24180
|
});
|
|
24181
24181
|
|
|
24182
|
+
// node_modules/agent-base/dist/src/promisify.js
|
|
24183
|
+
var require_promisify = __commonJS({
|
|
24184
|
+
"node_modules/agent-base/dist/src/promisify.js"(exports) {
|
|
24185
|
+
"use strict";
|
|
24186
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24187
|
+
function promisify(fn) {
|
|
24188
|
+
return function(req, opts) {
|
|
24189
|
+
return new Promise((resolve, reject) => {
|
|
24190
|
+
fn.call(this, req, opts, (err, rtn) => {
|
|
24191
|
+
if (err) {
|
|
24192
|
+
reject(err);
|
|
24193
|
+
} else {
|
|
24194
|
+
resolve(rtn);
|
|
24195
|
+
}
|
|
24196
|
+
});
|
|
24197
|
+
});
|
|
24198
|
+
};
|
|
24199
|
+
}
|
|
24200
|
+
exports.default = promisify;
|
|
24201
|
+
}
|
|
24202
|
+
});
|
|
24203
|
+
|
|
24204
|
+
// node_modules/agent-base/dist/src/index.js
|
|
24205
|
+
var require_src2 = __commonJS({
|
|
24206
|
+
"node_modules/agent-base/dist/src/index.js"(exports, module) {
|
|
24207
|
+
"use strict";
|
|
24208
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
24209
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
24210
|
+
};
|
|
24211
|
+
var events_1 = __require("events");
|
|
24212
|
+
var debug_1 = __importDefault(require_src());
|
|
24213
|
+
var promisify_1 = __importDefault(require_promisify());
|
|
24214
|
+
var debug = debug_1.default("agent-base");
|
|
24215
|
+
function isAgent(v) {
|
|
24216
|
+
return Boolean(v) && typeof v.addRequest === "function";
|
|
24217
|
+
}
|
|
24218
|
+
function isSecureEndpoint() {
|
|
24219
|
+
const { stack } = new Error();
|
|
24220
|
+
if (typeof stack !== "string")
|
|
24221
|
+
return false;
|
|
24222
|
+
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
24223
|
+
}
|
|
24224
|
+
function createAgent(callback, opts) {
|
|
24225
|
+
return new createAgent.Agent(callback, opts);
|
|
24226
|
+
}
|
|
24227
|
+
(function(createAgent2) {
|
|
24228
|
+
class Agent extends events_1.EventEmitter {
|
|
24229
|
+
constructor(callback, _opts) {
|
|
24230
|
+
super();
|
|
24231
|
+
let opts = _opts;
|
|
24232
|
+
if (typeof callback === "function") {
|
|
24233
|
+
this.callback = callback;
|
|
24234
|
+
} else if (callback) {
|
|
24235
|
+
opts = callback;
|
|
24236
|
+
}
|
|
24237
|
+
this.timeout = null;
|
|
24238
|
+
if (opts && typeof opts.timeout === "number") {
|
|
24239
|
+
this.timeout = opts.timeout;
|
|
24240
|
+
}
|
|
24241
|
+
this.maxFreeSockets = 1;
|
|
24242
|
+
this.maxSockets = 1;
|
|
24243
|
+
this.maxTotalSockets = Infinity;
|
|
24244
|
+
this.sockets = {};
|
|
24245
|
+
this.freeSockets = {};
|
|
24246
|
+
this.requests = {};
|
|
24247
|
+
this.options = {};
|
|
24248
|
+
}
|
|
24249
|
+
get defaultPort() {
|
|
24250
|
+
if (typeof this.explicitDefaultPort === "number") {
|
|
24251
|
+
return this.explicitDefaultPort;
|
|
24252
|
+
}
|
|
24253
|
+
return isSecureEndpoint() ? 443 : 80;
|
|
24254
|
+
}
|
|
24255
|
+
set defaultPort(v) {
|
|
24256
|
+
this.explicitDefaultPort = v;
|
|
24257
|
+
}
|
|
24258
|
+
get protocol() {
|
|
24259
|
+
if (typeof this.explicitProtocol === "string") {
|
|
24260
|
+
return this.explicitProtocol;
|
|
24261
|
+
}
|
|
24262
|
+
return isSecureEndpoint() ? "https:" : "http:";
|
|
24263
|
+
}
|
|
24264
|
+
set protocol(v) {
|
|
24265
|
+
this.explicitProtocol = v;
|
|
24266
|
+
}
|
|
24267
|
+
callback(req, opts, fn) {
|
|
24268
|
+
throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`');
|
|
24269
|
+
}
|
|
24270
|
+
/**
|
|
24271
|
+
* Called by node-core's "_http_client.js" module when creating
|
|
24272
|
+
* a new HTTP request with this Agent instance.
|
|
24273
|
+
*
|
|
24274
|
+
* @api public
|
|
24275
|
+
*/
|
|
24276
|
+
addRequest(req, _opts) {
|
|
24277
|
+
const opts = Object.assign({}, _opts);
|
|
24278
|
+
if (typeof opts.secureEndpoint !== "boolean") {
|
|
24279
|
+
opts.secureEndpoint = isSecureEndpoint();
|
|
24280
|
+
}
|
|
24281
|
+
if (opts.host == null) {
|
|
24282
|
+
opts.host = "localhost";
|
|
24283
|
+
}
|
|
24284
|
+
if (opts.port == null) {
|
|
24285
|
+
opts.port = opts.secureEndpoint ? 443 : 80;
|
|
24286
|
+
}
|
|
24287
|
+
if (opts.protocol == null) {
|
|
24288
|
+
opts.protocol = opts.secureEndpoint ? "https:" : "http:";
|
|
24289
|
+
}
|
|
24290
|
+
if (opts.host && opts.path) {
|
|
24291
|
+
delete opts.path;
|
|
24292
|
+
}
|
|
24293
|
+
delete opts.agent;
|
|
24294
|
+
delete opts.hostname;
|
|
24295
|
+
delete opts._defaultAgent;
|
|
24296
|
+
delete opts.defaultPort;
|
|
24297
|
+
delete opts.createConnection;
|
|
24298
|
+
req._last = true;
|
|
24299
|
+
req.shouldKeepAlive = false;
|
|
24300
|
+
let timedOut = false;
|
|
24301
|
+
let timeoutId = null;
|
|
24302
|
+
const timeoutMs = opts.timeout || this.timeout;
|
|
24303
|
+
const onerror = (err) => {
|
|
24304
|
+
if (req._hadError)
|
|
24305
|
+
return;
|
|
24306
|
+
req.emit("error", err);
|
|
24307
|
+
req._hadError = true;
|
|
24308
|
+
};
|
|
24309
|
+
const ontimeout = () => {
|
|
24310
|
+
timeoutId = null;
|
|
24311
|
+
timedOut = true;
|
|
24312
|
+
const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
|
|
24313
|
+
err.code = "ETIMEOUT";
|
|
24314
|
+
onerror(err);
|
|
24315
|
+
};
|
|
24316
|
+
const callbackError = (err) => {
|
|
24317
|
+
if (timedOut)
|
|
24318
|
+
return;
|
|
24319
|
+
if (timeoutId !== null) {
|
|
24320
|
+
clearTimeout(timeoutId);
|
|
24321
|
+
timeoutId = null;
|
|
24322
|
+
}
|
|
24323
|
+
onerror(err);
|
|
24324
|
+
};
|
|
24325
|
+
const onsocket = (socket) => {
|
|
24326
|
+
if (timedOut)
|
|
24327
|
+
return;
|
|
24328
|
+
if (timeoutId != null) {
|
|
24329
|
+
clearTimeout(timeoutId);
|
|
24330
|
+
timeoutId = null;
|
|
24331
|
+
}
|
|
24332
|
+
if (isAgent(socket)) {
|
|
24333
|
+
debug("Callback returned another Agent instance %o", socket.constructor.name);
|
|
24334
|
+
socket.addRequest(req, opts);
|
|
24335
|
+
return;
|
|
24336
|
+
}
|
|
24337
|
+
if (socket) {
|
|
24338
|
+
socket.once("free", () => {
|
|
24339
|
+
this.freeSocket(socket, opts);
|
|
24340
|
+
});
|
|
24341
|
+
req.onSocket(socket);
|
|
24342
|
+
return;
|
|
24343
|
+
}
|
|
24344
|
+
const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
|
|
24345
|
+
onerror(err);
|
|
24346
|
+
};
|
|
24347
|
+
if (typeof this.callback !== "function") {
|
|
24348
|
+
onerror(new Error("`callback` is not defined"));
|
|
24349
|
+
return;
|
|
24350
|
+
}
|
|
24351
|
+
if (!this.promisifiedCallback) {
|
|
24352
|
+
if (this.callback.length >= 3) {
|
|
24353
|
+
debug("Converting legacy callback function to promise");
|
|
24354
|
+
this.promisifiedCallback = promisify_1.default(this.callback);
|
|
24355
|
+
} else {
|
|
24356
|
+
this.promisifiedCallback = this.callback;
|
|
24357
|
+
}
|
|
24358
|
+
}
|
|
24359
|
+
if (typeof timeoutMs === "number" && timeoutMs > 0) {
|
|
24360
|
+
timeoutId = setTimeout(ontimeout, timeoutMs);
|
|
24361
|
+
}
|
|
24362
|
+
if ("port" in opts && typeof opts.port !== "number") {
|
|
24363
|
+
opts.port = Number(opts.port);
|
|
24364
|
+
}
|
|
24365
|
+
try {
|
|
24366
|
+
debug("Resolving socket for %o request: %o", opts.protocol, `${req.method} ${req.path}`);
|
|
24367
|
+
Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);
|
|
24368
|
+
} catch (err) {
|
|
24369
|
+
Promise.reject(err).catch(callbackError);
|
|
24370
|
+
}
|
|
24371
|
+
}
|
|
24372
|
+
freeSocket(socket, opts) {
|
|
24373
|
+
debug("Freeing socket %o %o", socket.constructor.name, opts);
|
|
24374
|
+
socket.destroy();
|
|
24375
|
+
}
|
|
24376
|
+
destroy() {
|
|
24377
|
+
debug("Destroying agent %o", this.constructor.name);
|
|
24378
|
+
}
|
|
24379
|
+
}
|
|
24380
|
+
createAgent2.Agent = Agent;
|
|
24381
|
+
createAgent2.prototype = createAgent2.Agent.prototype;
|
|
24382
|
+
})(createAgent || (createAgent = {}));
|
|
24383
|
+
module.exports = createAgent;
|
|
24384
|
+
}
|
|
24385
|
+
});
|
|
24386
|
+
|
|
24387
|
+
// node_modules/https-proxy-agent/dist/parse-proxy-response.js
|
|
24388
|
+
var require_parse_proxy_response = __commonJS({
|
|
24389
|
+
"node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
|
|
24390
|
+
"use strict";
|
|
24391
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
24392
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
24393
|
+
};
|
|
24394
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24395
|
+
var debug_1 = __importDefault(require_src());
|
|
24396
|
+
var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
|
|
24397
|
+
function parseProxyResponse(socket) {
|
|
24398
|
+
return new Promise((resolve, reject) => {
|
|
24399
|
+
let buffersLength = 0;
|
|
24400
|
+
const buffers = [];
|
|
24401
|
+
function read() {
|
|
24402
|
+
const b = socket.read();
|
|
24403
|
+
if (b)
|
|
24404
|
+
ondata(b);
|
|
24405
|
+
else
|
|
24406
|
+
socket.once("readable", read);
|
|
24407
|
+
}
|
|
24408
|
+
function cleanup() {
|
|
24409
|
+
socket.removeListener("end", onend);
|
|
24410
|
+
socket.removeListener("error", onerror);
|
|
24411
|
+
socket.removeListener("close", onclose);
|
|
24412
|
+
socket.removeListener("readable", read);
|
|
24413
|
+
}
|
|
24414
|
+
function onclose(err) {
|
|
24415
|
+
debug("onclose had error %o", err);
|
|
24416
|
+
}
|
|
24417
|
+
function onend() {
|
|
24418
|
+
debug("onend");
|
|
24419
|
+
}
|
|
24420
|
+
function onerror(err) {
|
|
24421
|
+
cleanup();
|
|
24422
|
+
debug("onerror %o", err);
|
|
24423
|
+
reject(err);
|
|
24424
|
+
}
|
|
24425
|
+
function ondata(b) {
|
|
24426
|
+
buffers.push(b);
|
|
24427
|
+
buffersLength += b.length;
|
|
24428
|
+
const buffered = Buffer.concat(buffers, buffersLength);
|
|
24429
|
+
const endOfHeaders = buffered.indexOf("\r\n\r\n");
|
|
24430
|
+
if (endOfHeaders === -1) {
|
|
24431
|
+
debug("have not received end of HTTP headers yet...");
|
|
24432
|
+
read();
|
|
24433
|
+
return;
|
|
24434
|
+
}
|
|
24435
|
+
const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
|
|
24436
|
+
const statusCode = +firstLine.split(" ")[1];
|
|
24437
|
+
debug("got proxy server response: %o", firstLine);
|
|
24438
|
+
resolve({
|
|
24439
|
+
statusCode,
|
|
24440
|
+
buffered
|
|
24441
|
+
});
|
|
24442
|
+
}
|
|
24443
|
+
socket.on("error", onerror);
|
|
24444
|
+
socket.on("close", onclose);
|
|
24445
|
+
socket.on("end", onend);
|
|
24446
|
+
read();
|
|
24447
|
+
});
|
|
24448
|
+
}
|
|
24449
|
+
exports.default = parseProxyResponse;
|
|
24450
|
+
}
|
|
24451
|
+
});
|
|
24452
|
+
|
|
24453
|
+
// node_modules/https-proxy-agent/dist/agent.js
|
|
24454
|
+
var require_agent = __commonJS({
|
|
24455
|
+
"node_modules/https-proxy-agent/dist/agent.js"(exports) {
|
|
24456
|
+
"use strict";
|
|
24457
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
24458
|
+
function adopt(value) {
|
|
24459
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
24460
|
+
resolve(value);
|
|
24461
|
+
});
|
|
24462
|
+
}
|
|
24463
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
24464
|
+
function fulfilled(value) {
|
|
24465
|
+
try {
|
|
24466
|
+
step(generator.next(value));
|
|
24467
|
+
} catch (e) {
|
|
24468
|
+
reject(e);
|
|
24469
|
+
}
|
|
24470
|
+
}
|
|
24471
|
+
function rejected(value) {
|
|
24472
|
+
try {
|
|
24473
|
+
step(generator["throw"](value));
|
|
24474
|
+
} catch (e) {
|
|
24475
|
+
reject(e);
|
|
24476
|
+
}
|
|
24477
|
+
}
|
|
24478
|
+
function step(result) {
|
|
24479
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24480
|
+
}
|
|
24481
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24482
|
+
});
|
|
24483
|
+
};
|
|
24484
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
24485
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
24486
|
+
};
|
|
24487
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24488
|
+
var net_1 = __importDefault(__require("net"));
|
|
24489
|
+
var tls_1 = __importDefault(__require("tls"));
|
|
24490
|
+
var url_1 = __importDefault(__require("url"));
|
|
24491
|
+
var assert_1 = __importDefault(__require("assert"));
|
|
24492
|
+
var debug_1 = __importDefault(require_src());
|
|
24493
|
+
var agent_base_1 = require_src2();
|
|
24494
|
+
var parse_proxy_response_1 = __importDefault(require_parse_proxy_response());
|
|
24495
|
+
var debug = debug_1.default("https-proxy-agent:agent");
|
|
24496
|
+
var HttpsProxyAgent = class extends agent_base_1.Agent {
|
|
24497
|
+
constructor(_opts) {
|
|
24498
|
+
let opts;
|
|
24499
|
+
if (typeof _opts === "string") {
|
|
24500
|
+
opts = url_1.default.parse(_opts);
|
|
24501
|
+
} else {
|
|
24502
|
+
opts = _opts;
|
|
24503
|
+
}
|
|
24504
|
+
if (!opts) {
|
|
24505
|
+
throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");
|
|
24506
|
+
}
|
|
24507
|
+
debug("creating new HttpsProxyAgent instance: %o", opts);
|
|
24508
|
+
super(opts);
|
|
24509
|
+
const proxy = Object.assign({}, opts);
|
|
24510
|
+
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
|
|
24511
|
+
proxy.host = proxy.hostname || proxy.host;
|
|
24512
|
+
if (typeof proxy.port === "string") {
|
|
24513
|
+
proxy.port = parseInt(proxy.port, 10);
|
|
24514
|
+
}
|
|
24515
|
+
if (!proxy.port && proxy.host) {
|
|
24516
|
+
proxy.port = this.secureProxy ? 443 : 80;
|
|
24517
|
+
}
|
|
24518
|
+
if (this.secureProxy && !("ALPNProtocols" in proxy)) {
|
|
24519
|
+
proxy.ALPNProtocols = ["http 1.1"];
|
|
24520
|
+
}
|
|
24521
|
+
if (proxy.host && proxy.path) {
|
|
24522
|
+
delete proxy.path;
|
|
24523
|
+
delete proxy.pathname;
|
|
24524
|
+
}
|
|
24525
|
+
this.proxy = proxy;
|
|
24526
|
+
}
|
|
24527
|
+
/**
|
|
24528
|
+
* Called when the node-core HTTP client library is creating a
|
|
24529
|
+
* new HTTP request.
|
|
24530
|
+
*
|
|
24531
|
+
* @api protected
|
|
24532
|
+
*/
|
|
24533
|
+
callback(req, opts) {
|
|
24534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24535
|
+
const { proxy, secureProxy } = this;
|
|
24536
|
+
let socket;
|
|
24537
|
+
if (secureProxy) {
|
|
24538
|
+
debug("Creating `tls.Socket`: %o", proxy);
|
|
24539
|
+
socket = tls_1.default.connect(proxy);
|
|
24540
|
+
} else {
|
|
24541
|
+
debug("Creating `net.Socket`: %o", proxy);
|
|
24542
|
+
socket = net_1.default.connect(proxy);
|
|
24543
|
+
}
|
|
24544
|
+
const headers = Object.assign({}, proxy.headers);
|
|
24545
|
+
const hostname = `${opts.host}:${opts.port}`;
|
|
24546
|
+
let payload = `CONNECT ${hostname} HTTP/1.1\r
|
|
24547
|
+
`;
|
|
24548
|
+
if (proxy.auth) {
|
|
24549
|
+
headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
|
|
24550
|
+
}
|
|
24551
|
+
let { host, port, secureEndpoint } = opts;
|
|
24552
|
+
if (!isDefaultPort(port, secureEndpoint)) {
|
|
24553
|
+
host += `:${port}`;
|
|
24554
|
+
}
|
|
24555
|
+
headers.Host = host;
|
|
24556
|
+
headers.Connection = "close";
|
|
24557
|
+
for (const name of Object.keys(headers)) {
|
|
24558
|
+
payload += `${name}: ${headers[name]}\r
|
|
24559
|
+
`;
|
|
24560
|
+
}
|
|
24561
|
+
const proxyResponsePromise = parse_proxy_response_1.default(socket);
|
|
24562
|
+
socket.write(`${payload}\r
|
|
24563
|
+
`);
|
|
24564
|
+
const { statusCode, buffered } = yield proxyResponsePromise;
|
|
24565
|
+
if (statusCode === 200) {
|
|
24566
|
+
req.once("socket", resume);
|
|
24567
|
+
if (opts.secureEndpoint) {
|
|
24568
|
+
debug("Upgrading socket connection to TLS");
|
|
24569
|
+
const servername = opts.servername || opts.host;
|
|
24570
|
+
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), {
|
|
24571
|
+
socket,
|
|
24572
|
+
servername
|
|
24573
|
+
}));
|
|
24574
|
+
}
|
|
24575
|
+
return socket;
|
|
24576
|
+
}
|
|
24577
|
+
socket.destroy();
|
|
24578
|
+
const fakeSocket = new net_1.default.Socket({ writable: false });
|
|
24579
|
+
fakeSocket.readable = true;
|
|
24580
|
+
req.once("socket", (s) => {
|
|
24581
|
+
debug("replaying proxy buffer for failed request");
|
|
24582
|
+
assert_1.default(s.listenerCount("data") > 0);
|
|
24583
|
+
s.push(buffered);
|
|
24584
|
+
s.push(null);
|
|
24585
|
+
});
|
|
24586
|
+
return fakeSocket;
|
|
24587
|
+
});
|
|
24588
|
+
}
|
|
24589
|
+
};
|
|
24590
|
+
exports.default = HttpsProxyAgent;
|
|
24591
|
+
function resume(socket) {
|
|
24592
|
+
socket.resume();
|
|
24593
|
+
}
|
|
24594
|
+
function isDefaultPort(port, secure) {
|
|
24595
|
+
return Boolean(!secure && port === 80 || secure && port === 443);
|
|
24596
|
+
}
|
|
24597
|
+
function isHTTPS(protocol) {
|
|
24598
|
+
return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false;
|
|
24599
|
+
}
|
|
24600
|
+
function omit(obj, ...keys) {
|
|
24601
|
+
const ret = {};
|
|
24602
|
+
let key;
|
|
24603
|
+
for (key in obj) {
|
|
24604
|
+
if (!keys.includes(key)) {
|
|
24605
|
+
ret[key] = obj[key];
|
|
24606
|
+
}
|
|
24607
|
+
}
|
|
24608
|
+
return ret;
|
|
24609
|
+
}
|
|
24610
|
+
}
|
|
24611
|
+
});
|
|
24612
|
+
|
|
24613
|
+
// node_modules/https-proxy-agent/dist/index.js
|
|
24614
|
+
var require_dist = __commonJS({
|
|
24615
|
+
"node_modules/https-proxy-agent/dist/index.js"(exports, module) {
|
|
24616
|
+
"use strict";
|
|
24617
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
24618
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
24619
|
+
};
|
|
24620
|
+
var agent_1 = __importDefault(require_agent());
|
|
24621
|
+
function createHttpsProxyAgent(opts) {
|
|
24622
|
+
return new agent_1.default(opts);
|
|
24623
|
+
}
|
|
24624
|
+
(function(createHttpsProxyAgent2) {
|
|
24625
|
+
createHttpsProxyAgent2.HttpsProxyAgent = agent_1.default;
|
|
24626
|
+
createHttpsProxyAgent2.prototype = agent_1.default.prototype;
|
|
24627
|
+
})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));
|
|
24628
|
+
module.exports = createHttpsProxyAgent;
|
|
24629
|
+
}
|
|
24630
|
+
});
|
|
24631
|
+
|
|
24182
24632
|
// node_modules/follow-redirects/debug.js
|
|
24183
24633
|
var require_debug = __commonJS({
|
|
24184
24634
|
"node_modules/follow-redirects/debug.js"(exports, module) {
|
|
@@ -24719,6 +25169,7 @@ var require_axios = __commonJS({
|
|
|
24719
25169
|
var FormData$1 = require_form_data();
|
|
24720
25170
|
var crypto = __require("crypto");
|
|
24721
25171
|
var url = __require("url");
|
|
25172
|
+
var HttpsProxyAgent = require_dist();
|
|
24722
25173
|
var http = __require("http");
|
|
24723
25174
|
var https = __require("https");
|
|
24724
25175
|
var http2 = __require("http2");
|
|
@@ -24873,7 +25324,7 @@ var require_axios = __commonJS({
|
|
|
24873
25324
|
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
24874
25325
|
})();
|
|
24875
25326
|
var isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
24876
|
-
function merge() {
|
|
25327
|
+
function merge(...objs) {
|
|
24877
25328
|
const {
|
|
24878
25329
|
caseless,
|
|
24879
25330
|
skipUndefined
|
|
@@ -24883,9 +25334,10 @@ var require_axios = __commonJS({
|
|
|
24883
25334
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
24884
25335
|
return;
|
|
24885
25336
|
}
|
|
24886
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
24887
|
-
|
|
24888
|
-
|
|
25337
|
+
const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
|
|
25338
|
+
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
25339
|
+
if (isPlainObject2(existing) && isPlainObject2(val)) {
|
|
25340
|
+
result[targetKey] = merge(existing, val);
|
|
24889
25341
|
} else if (isPlainObject2(val)) {
|
|
24890
25342
|
result[targetKey] = merge({}, val);
|
|
24891
25343
|
} else if (isArray(val)) {
|
|
@@ -24894,8 +25346,22 @@ var require_axios = __commonJS({
|
|
|
24894
25346
|
result[targetKey] = val;
|
|
24895
25347
|
}
|
|
24896
25348
|
};
|
|
24897
|
-
for (let i = 0, l =
|
|
24898
|
-
|
|
25349
|
+
for (let i = 0, l = objs.length; i < l; i++) {
|
|
25350
|
+
const source = objs[i];
|
|
25351
|
+
if (!source || isBuffer(source)) {
|
|
25352
|
+
continue;
|
|
25353
|
+
}
|
|
25354
|
+
forEach(source, assignValue);
|
|
25355
|
+
if (typeof source !== "object" || isArray(source)) {
|
|
25356
|
+
continue;
|
|
25357
|
+
}
|
|
25358
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
25359
|
+
for (let j = 0; j < symbols.length; j++) {
|
|
25360
|
+
const symbol = symbols[j];
|
|
25361
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
25362
|
+
assignValue(source[symbol], symbol);
|
|
25363
|
+
}
|
|
25364
|
+
}
|
|
24899
25365
|
}
|
|
24900
25366
|
return result;
|
|
24901
25367
|
}
|
|
@@ -24905,6 +25371,9 @@ var require_axios = __commonJS({
|
|
|
24905
25371
|
forEach(b, (val, key) => {
|
|
24906
25372
|
if (thisArg && isFunction$1(val)) {
|
|
24907
25373
|
Object.defineProperty(a, key, {
|
|
25374
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
25375
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
25376
|
+
__proto__: null,
|
|
24908
25377
|
value: bind(val, thisArg),
|
|
24909
25378
|
writable: true,
|
|
24910
25379
|
enumerable: true,
|
|
@@ -24912,6 +25381,7 @@ var require_axios = __commonJS({
|
|
|
24912
25381
|
});
|
|
24913
25382
|
} else {
|
|
24914
25383
|
Object.defineProperty(a, key, {
|
|
25384
|
+
__proto__: null,
|
|
24915
25385
|
value: val,
|
|
24916
25386
|
writable: true,
|
|
24917
25387
|
enumerable: true,
|
|
@@ -24932,12 +25402,14 @@ var require_axios = __commonJS({
|
|
|
24932
25402
|
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
24933
25403
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
24934
25404
|
Object.defineProperty(constructor.prototype, "constructor", {
|
|
25405
|
+
__proto__: null,
|
|
24935
25406
|
value: constructor,
|
|
24936
25407
|
writable: true,
|
|
24937
25408
|
enumerable: false,
|
|
24938
25409
|
configurable: true
|
|
24939
25410
|
});
|
|
24940
25411
|
Object.defineProperty(constructor, "super", {
|
|
25412
|
+
__proto__: null,
|
|
24941
25413
|
value: superConstructor.prototype
|
|
24942
25414
|
});
|
|
24943
25415
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -25014,6 +25486,9 @@ var require_axios = __commonJS({
|
|
|
25014
25486
|
var hasOwnProperty = (({
|
|
25015
25487
|
hasOwnProperty: hasOwnProperty2
|
|
25016
25488
|
}) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
25489
|
+
var {
|
|
25490
|
+
propertyIsEnumerable
|
|
25491
|
+
} = Object.prototype;
|
|
25017
25492
|
var isRegExp = kindOfTest("RegExp");
|
|
25018
25493
|
var reduceDescriptors = (obj, reducer) => {
|
|
25019
25494
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -25028,7 +25503,7 @@ var require_axios = __commonJS({
|
|
|
25028
25503
|
};
|
|
25029
25504
|
var freezeMethods = (obj) => {
|
|
25030
25505
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
25031
|
-
if (isFunction$1(obj) && ["arguments", "caller", "callee"].
|
|
25506
|
+
if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
|
|
25032
25507
|
return false;
|
|
25033
25508
|
}
|
|
25034
25509
|
const value = obj[name];
|
|
@@ -25064,29 +25539,29 @@ var require_axios = __commonJS({
|
|
|
25064
25539
|
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
25065
25540
|
}
|
|
25066
25541
|
var toJSONObject = (obj) => {
|
|
25067
|
-
const
|
|
25068
|
-
const visit = (source
|
|
25542
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
25543
|
+
const visit = (source) => {
|
|
25069
25544
|
if (isObject(source)) {
|
|
25070
|
-
if (
|
|
25545
|
+
if (visited.has(source)) {
|
|
25071
25546
|
return;
|
|
25072
25547
|
}
|
|
25073
25548
|
if (isBuffer(source)) {
|
|
25074
25549
|
return source;
|
|
25075
25550
|
}
|
|
25076
25551
|
if (!("toJSON" in source)) {
|
|
25077
|
-
|
|
25552
|
+
visited.add(source);
|
|
25078
25553
|
const target = isArray(source) ? [] : {};
|
|
25079
25554
|
forEach(source, (value, key) => {
|
|
25080
|
-
const reducedValue = visit(value
|
|
25555
|
+
const reducedValue = visit(value);
|
|
25081
25556
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
25082
25557
|
});
|
|
25083
|
-
|
|
25558
|
+
visited.delete(source);
|
|
25084
25559
|
return target;
|
|
25085
25560
|
}
|
|
25086
25561
|
}
|
|
25087
25562
|
return source;
|
|
25088
25563
|
};
|
|
25089
|
-
return visit(obj
|
|
25564
|
+
return visit(obj);
|
|
25090
25565
|
};
|
|
25091
25566
|
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
25092
25567
|
var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
@@ -25173,814 +25648,890 @@ var require_axios = __commonJS({
|
|
|
25173
25648
|
asap,
|
|
25174
25649
|
isIterable
|
|
25175
25650
|
};
|
|
25176
|
-
var
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25651
|
+
var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
|
|
25652
|
+
var parseHeaders = (rawHeaders) => {
|
|
25653
|
+
const parsed = {};
|
|
25654
|
+
let key;
|
|
25655
|
+
let val;
|
|
25656
|
+
let i;
|
|
25657
|
+
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
25658
|
+
i = line.indexOf(":");
|
|
25659
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
25660
|
+
val = line.substring(i + 1).trim();
|
|
25661
|
+
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
25662
|
+
return;
|
|
25183
25663
|
}
|
|
25184
|
-
|
|
25185
|
-
|
|
25664
|
+
if (key === "set-cookie") {
|
|
25665
|
+
if (parsed[key]) {
|
|
25666
|
+
parsed[key].push(val);
|
|
25667
|
+
} else {
|
|
25668
|
+
parsed[key] = [val];
|
|
25669
|
+
}
|
|
25670
|
+
} else {
|
|
25671
|
+
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
25672
|
+
}
|
|
25673
|
+
});
|
|
25674
|
+
return parsed;
|
|
25675
|
+
};
|
|
25676
|
+
function trimSPorHTAB(str) {
|
|
25677
|
+
let start = 0;
|
|
25678
|
+
let end = str.length;
|
|
25679
|
+
while (start < end) {
|
|
25680
|
+
const code = str.charCodeAt(start);
|
|
25681
|
+
if (code !== 9 && code !== 32) {
|
|
25682
|
+
break;
|
|
25683
|
+
}
|
|
25684
|
+
start += 1;
|
|
25186
25685
|
}
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
25192
|
-
* @param {Object} [config] The config.
|
|
25193
|
-
* @param {Object} [request] The request.
|
|
25194
|
-
* @param {Object} [response] The response.
|
|
25195
|
-
*
|
|
25196
|
-
* @returns {Error} The created error.
|
|
25197
|
-
*/
|
|
25198
|
-
constructor(message, code, config, request, response) {
|
|
25199
|
-
super(message);
|
|
25200
|
-
Object.defineProperty(this, "message", {
|
|
25201
|
-
value: message,
|
|
25202
|
-
enumerable: true,
|
|
25203
|
-
writable: true,
|
|
25204
|
-
configurable: true
|
|
25205
|
-
});
|
|
25206
|
-
this.name = "AxiosError";
|
|
25207
|
-
this.isAxiosError = true;
|
|
25208
|
-
code && (this.code = code);
|
|
25209
|
-
config && (this.config = config);
|
|
25210
|
-
request && (this.request = request);
|
|
25211
|
-
if (response) {
|
|
25212
|
-
this.response = response;
|
|
25213
|
-
this.status = response.status;
|
|
25686
|
+
while (end > start) {
|
|
25687
|
+
const code = str.charCodeAt(end - 1);
|
|
25688
|
+
if (code !== 9 && code !== 32) {
|
|
25689
|
+
break;
|
|
25214
25690
|
}
|
|
25691
|
+
end -= 1;
|
|
25215
25692
|
}
|
|
25216
|
-
|
|
25217
|
-
|
|
25218
|
-
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
number: this.number,
|
|
25224
|
-
// Mozilla
|
|
25225
|
-
fileName: this.fileName,
|
|
25226
|
-
lineNumber: this.lineNumber,
|
|
25227
|
-
columnNumber: this.columnNumber,
|
|
25228
|
-
stack: this.stack,
|
|
25229
|
-
// Axios
|
|
25230
|
-
config: utils$1.toJSONObject(this.config),
|
|
25231
|
-
code: this.code,
|
|
25232
|
-
status: this.status
|
|
25233
|
-
};
|
|
25693
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
25694
|
+
}
|
|
25695
|
+
var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g");
|
|
25696
|
+
var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
25697
|
+
function sanitizeValue(value, invalidChars) {
|
|
25698
|
+
if (utils$1.isArray(value)) {
|
|
25699
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
25234
25700
|
}
|
|
25235
|
-
|
|
25236
|
-
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
25237
|
-
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
25238
|
-
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
25239
|
-
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
25240
|
-
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
25241
|
-
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
25242
|
-
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
25243
|
-
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
25244
|
-
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
25245
|
-
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
25246
|
-
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
25247
|
-
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
25248
|
-
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
25249
|
-
function isVisitable(thing) {
|
|
25250
|
-
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
25701
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ""));
|
|
25251
25702
|
}
|
|
25252
|
-
|
|
25253
|
-
|
|
25703
|
+
var sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
25704
|
+
var sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
25705
|
+
function toByteStringHeaderObject(headers) {
|
|
25706
|
+
const byteStringHeaders = /* @__PURE__ */ Object.create(null);
|
|
25707
|
+
utils$1.forEach(headers.toJSON(), (value, header) => {
|
|
25708
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
25709
|
+
});
|
|
25710
|
+
return byteStringHeaders;
|
|
25254
25711
|
}
|
|
25255
|
-
|
|
25256
|
-
|
|
25257
|
-
return
|
|
25258
|
-
token2 = removeBrackets(token2);
|
|
25259
|
-
return !dots && i ? "[" + token2 + "]" : token2;
|
|
25260
|
-
}).join(dots ? "." : "");
|
|
25712
|
+
var $internals = /* @__PURE__ */ Symbol("internals");
|
|
25713
|
+
function normalizeHeader(header) {
|
|
25714
|
+
return header && String(header).trim().toLowerCase();
|
|
25261
25715
|
}
|
|
25262
|
-
function
|
|
25263
|
-
|
|
25716
|
+
function normalizeValue(value) {
|
|
25717
|
+
if (value === false || value == null) {
|
|
25718
|
+
return value;
|
|
25719
|
+
}
|
|
25720
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
25264
25721
|
}
|
|
25265
|
-
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25270
|
-
|
|
25722
|
+
function parseTokens(str) {
|
|
25723
|
+
const tokens = /* @__PURE__ */ Object.create(null);
|
|
25724
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
25725
|
+
let match2;
|
|
25726
|
+
while (match2 = tokensRE.exec(str)) {
|
|
25727
|
+
tokens[match2[1]] = match2[2];
|
|
25271
25728
|
}
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25729
|
+
return tokens;
|
|
25730
|
+
}
|
|
25731
|
+
var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
25732
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
25733
|
+
if (utils$1.isFunction(filter)) {
|
|
25734
|
+
return filter.call(this, value, header);
|
|
25735
|
+
}
|
|
25736
|
+
if (isHeaderNameFilter) {
|
|
25737
|
+
value = header;
|
|
25738
|
+
}
|
|
25739
|
+
if (!utils$1.isString(value)) return;
|
|
25740
|
+
if (utils$1.isString(filter)) {
|
|
25741
|
+
return value.indexOf(filter) !== -1;
|
|
25742
|
+
}
|
|
25743
|
+
if (utils$1.isRegExp(filter)) {
|
|
25744
|
+
return filter.test(value);
|
|
25745
|
+
}
|
|
25746
|
+
}
|
|
25747
|
+
function formatHeader(header) {
|
|
25748
|
+
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
25749
|
+
return char.toUpperCase() + str;
|
|
25279
25750
|
});
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
const
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25751
|
+
}
|
|
25752
|
+
function buildAccessors(obj, header) {
|
|
25753
|
+
const accessorName = utils$1.toCamelCase(" " + header);
|
|
25754
|
+
["get", "set", "has"].forEach((methodName) => {
|
|
25755
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
25756
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
25757
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
25758
|
+
__proto__: null,
|
|
25759
|
+
value: function(arg1, arg2, arg3) {
|
|
25760
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
25761
|
+
},
|
|
25762
|
+
configurable: true
|
|
25763
|
+
});
|
|
25764
|
+
});
|
|
25765
|
+
}
|
|
25766
|
+
var AxiosHeaders = class {
|
|
25767
|
+
constructor(headers) {
|
|
25768
|
+
headers && this.set(headers);
|
|
25289
25769
|
}
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25770
|
+
set(header, valueOrRewrite, rewrite) {
|
|
25771
|
+
const self2 = this;
|
|
25772
|
+
function setHeader(_value, _header, _rewrite) {
|
|
25773
|
+
const lHeader = normalizeHeader(_header);
|
|
25774
|
+
if (!lHeader) {
|
|
25775
|
+
return;
|
|
25776
|
+
}
|
|
25777
|
+
const key = utils$1.findKey(self2, lHeader);
|
|
25778
|
+
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
25779
|
+
self2[key || _header] = normalizeValue(_value);
|
|
25780
|
+
}
|
|
25300
25781
|
}
|
|
25301
|
-
|
|
25302
|
-
|
|
25782
|
+
const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
25783
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
25784
|
+
setHeaders(header, valueOrRewrite);
|
|
25785
|
+
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
25786
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
25787
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
|
25788
|
+
let obj = {}, dest, key;
|
|
25789
|
+
for (const entry of header) {
|
|
25790
|
+
if (!utils$1.isArray(entry)) {
|
|
25791
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
25792
|
+
}
|
|
25793
|
+
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
25794
|
+
}
|
|
25795
|
+
setHeaders(obj, valueOrRewrite);
|
|
25796
|
+
} else {
|
|
25797
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
25303
25798
|
}
|
|
25304
|
-
return
|
|
25799
|
+
return this;
|
|
25305
25800
|
}
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
if (
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
return false;
|
|
25801
|
+
get(header, parser) {
|
|
25802
|
+
header = normalizeHeader(header);
|
|
25803
|
+
if (header) {
|
|
25804
|
+
const key = utils$1.findKey(this, header);
|
|
25805
|
+
if (key) {
|
|
25806
|
+
const value = this[key];
|
|
25807
|
+
if (!parser) {
|
|
25808
|
+
return value;
|
|
25809
|
+
}
|
|
25810
|
+
if (parser === true) {
|
|
25811
|
+
return parseTokens(value);
|
|
25812
|
+
}
|
|
25813
|
+
if (utils$1.isFunction(parser)) {
|
|
25814
|
+
return parser.call(this, value, key);
|
|
25815
|
+
}
|
|
25816
|
+
if (utils$1.isRegExp(parser)) {
|
|
25817
|
+
return parser.exec(value);
|
|
25818
|
+
}
|
|
25819
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
25326
25820
|
}
|
|
25327
25821
|
}
|
|
25328
|
-
|
|
25329
|
-
|
|
25822
|
+
}
|
|
25823
|
+
has(header, matcher) {
|
|
25824
|
+
header = normalizeHeader(header);
|
|
25825
|
+
if (header) {
|
|
25826
|
+
const key = utils$1.findKey(this, header);
|
|
25827
|
+
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
25330
25828
|
}
|
|
25331
|
-
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
25332
25829
|
return false;
|
|
25333
25830
|
}
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25343
|
-
|
|
25831
|
+
delete(header, matcher) {
|
|
25832
|
+
const self2 = this;
|
|
25833
|
+
let deleted = false;
|
|
25834
|
+
function deleteHeader(_header) {
|
|
25835
|
+
_header = normalizeHeader(_header);
|
|
25836
|
+
if (_header) {
|
|
25837
|
+
const key = utils$1.findKey(self2, _header);
|
|
25838
|
+
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
25839
|
+
delete self2[key];
|
|
25840
|
+
deleted = true;
|
|
25841
|
+
}
|
|
25842
|
+
}
|
|
25344
25843
|
}
|
|
25345
|
-
if (
|
|
25346
|
-
|
|
25844
|
+
if (utils$1.isArray(header)) {
|
|
25845
|
+
header.forEach(deleteHeader);
|
|
25846
|
+
} else {
|
|
25847
|
+
deleteHeader(header);
|
|
25347
25848
|
}
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25849
|
+
return deleted;
|
|
25850
|
+
}
|
|
25851
|
+
clear(matcher) {
|
|
25852
|
+
const keys = Object.keys(this);
|
|
25853
|
+
let i = keys.length;
|
|
25854
|
+
let deleted = false;
|
|
25855
|
+
while (i--) {
|
|
25856
|
+
const key = keys[i];
|
|
25857
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
25858
|
+
delete this[key];
|
|
25859
|
+
deleted = true;
|
|
25860
|
+
}
|
|
25861
|
+
}
|
|
25862
|
+
return deleted;
|
|
25863
|
+
}
|
|
25864
|
+
normalize(format2) {
|
|
25865
|
+
const self2 = this;
|
|
25866
|
+
const headers = {};
|
|
25867
|
+
utils$1.forEach(this, (value, header) => {
|
|
25868
|
+
const key = utils$1.findKey(headers, header);
|
|
25869
|
+
if (key) {
|
|
25870
|
+
self2[key] = normalizeValue(value);
|
|
25871
|
+
delete self2[header];
|
|
25872
|
+
return;
|
|
25873
|
+
}
|
|
25874
|
+
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
25875
|
+
if (normalized !== header) {
|
|
25876
|
+
delete self2[header];
|
|
25353
25877
|
}
|
|
25878
|
+
self2[normalized] = normalizeValue(value);
|
|
25879
|
+
headers[normalized] = true;
|
|
25354
25880
|
});
|
|
25355
|
-
|
|
25881
|
+
return this;
|
|
25356
25882
|
}
|
|
25357
|
-
|
|
25358
|
-
|
|
25883
|
+
concat(...targets) {
|
|
25884
|
+
return this.constructor.concat(this, ...targets);
|
|
25359
25885
|
}
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
"'": "%27",
|
|
25367
|
-
"(": "%28",
|
|
25368
|
-
")": "%29",
|
|
25369
|
-
"~": "%7E",
|
|
25370
|
-
"%20": "+"
|
|
25371
|
-
};
|
|
25372
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match2) {
|
|
25373
|
-
return charMap[match2];
|
|
25374
|
-
});
|
|
25375
|
-
}
|
|
25376
|
-
function AxiosURLSearchParams(params, options) {
|
|
25377
|
-
this._pairs = [];
|
|
25378
|
-
params && toFormData(params, this, options);
|
|
25379
|
-
}
|
|
25380
|
-
var prototype = AxiosURLSearchParams.prototype;
|
|
25381
|
-
prototype.append = function append(name, value) {
|
|
25382
|
-
this._pairs.push([name, value]);
|
|
25383
|
-
};
|
|
25384
|
-
prototype.toString = function toString3(encoder) {
|
|
25385
|
-
const _encode = encoder ? function(value) {
|
|
25386
|
-
return encoder.call(this, value, encode$1);
|
|
25387
|
-
} : encode$1;
|
|
25388
|
-
return this._pairs.map(function each(pair) {
|
|
25389
|
-
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
25390
|
-
}, "").join("&");
|
|
25391
|
-
};
|
|
25392
|
-
function encode(val) {
|
|
25393
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
25394
|
-
}
|
|
25395
|
-
function buildURL(url2, params, options) {
|
|
25396
|
-
if (!params) {
|
|
25397
|
-
return url2;
|
|
25886
|
+
toJSON(asStrings) {
|
|
25887
|
+
const obj = /* @__PURE__ */ Object.create(null);
|
|
25888
|
+
utils$1.forEach(this, (value, header) => {
|
|
25889
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
|
|
25890
|
+
});
|
|
25891
|
+
return obj;
|
|
25398
25892
|
}
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
serialize: options
|
|
25402
|
-
} : options;
|
|
25403
|
-
const serializeFn = _options && _options.serialize;
|
|
25404
|
-
let serializedParams;
|
|
25405
|
-
if (serializeFn) {
|
|
25406
|
-
serializedParams = serializeFn(params, _options);
|
|
25407
|
-
} else {
|
|
25408
|
-
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
25893
|
+
[Symbol.iterator]() {
|
|
25894
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
25409
25895
|
}
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
if (hashmarkIndex !== -1) {
|
|
25413
|
-
url2 = url2.slice(0, hashmarkIndex);
|
|
25414
|
-
}
|
|
25415
|
-
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
25896
|
+
toString() {
|
|
25897
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
25416
25898
|
}
|
|
25417
|
-
|
|
25418
|
-
|
|
25419
|
-
var InterceptorManager = class {
|
|
25420
|
-
constructor() {
|
|
25421
|
-
this.handlers = [];
|
|
25899
|
+
getSetCookie() {
|
|
25900
|
+
return this.get("set-cookie") || [];
|
|
25422
25901
|
}
|
|
25423
|
-
|
|
25424
|
-
|
|
25425
|
-
*
|
|
25426
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
25427
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
25428
|
-
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
25429
|
-
*
|
|
25430
|
-
* @return {Number} An ID used to remove interceptor later
|
|
25431
|
-
*/
|
|
25432
|
-
use(fulfilled, rejected, options) {
|
|
25433
|
-
this.handlers.push({
|
|
25434
|
-
fulfilled,
|
|
25435
|
-
rejected,
|
|
25436
|
-
synchronous: options ? options.synchronous : false,
|
|
25437
|
-
runWhen: options ? options.runWhen : null
|
|
25438
|
-
});
|
|
25439
|
-
return this.handlers.length - 1;
|
|
25902
|
+
get [Symbol.toStringTag]() {
|
|
25903
|
+
return "AxiosHeaders";
|
|
25440
25904
|
}
|
|
25441
|
-
|
|
25442
|
-
|
|
25443
|
-
|
|
25444
|
-
|
|
25445
|
-
|
|
25446
|
-
|
|
25447
|
-
|
|
25448
|
-
|
|
25449
|
-
|
|
25450
|
-
|
|
25905
|
+
static from(thing) {
|
|
25906
|
+
return thing instanceof this ? thing : new this(thing);
|
|
25907
|
+
}
|
|
25908
|
+
static concat(first2, ...targets) {
|
|
25909
|
+
const computed = new this(first2);
|
|
25910
|
+
targets.forEach((target) => computed.set(target));
|
|
25911
|
+
return computed;
|
|
25912
|
+
}
|
|
25913
|
+
static accessor(header) {
|
|
25914
|
+
const internals = this[$internals] = this[$internals] = {
|
|
25915
|
+
accessors: {}
|
|
25916
|
+
};
|
|
25917
|
+
const accessors = internals.accessors;
|
|
25918
|
+
const prototype2 = this.prototype;
|
|
25919
|
+
function defineAccessor(_header) {
|
|
25920
|
+
const lHeader = normalizeHeader(_header);
|
|
25921
|
+
if (!accessors[lHeader]) {
|
|
25922
|
+
buildAccessors(prototype2, _header);
|
|
25923
|
+
accessors[lHeader] = true;
|
|
25924
|
+
}
|
|
25451
25925
|
}
|
|
25926
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
25927
|
+
return this;
|
|
25452
25928
|
}
|
|
25453
|
-
|
|
25454
|
-
|
|
25455
|
-
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25929
|
+
};
|
|
25930
|
+
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
25931
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
|
|
25932
|
+
value
|
|
25933
|
+
}, key) => {
|
|
25934
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
25935
|
+
return {
|
|
25936
|
+
get: () => value,
|
|
25937
|
+
set(headerValue) {
|
|
25938
|
+
this[mapped] = headerValue;
|
|
25939
|
+
}
|
|
25940
|
+
};
|
|
25941
|
+
});
|
|
25942
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
25943
|
+
var REDACTED = "[REDACTED ****]";
|
|
25944
|
+
function hasOwnOrPrototypeToJSON(source) {
|
|
25945
|
+
if (utils$1.hasOwnProp(source, "toJSON")) {
|
|
25946
|
+
return true;
|
|
25947
|
+
}
|
|
25948
|
+
let prototype2 = Object.getPrototypeOf(source);
|
|
25949
|
+
while (prototype2 && prototype2 !== Object.prototype) {
|
|
25950
|
+
if (utils$1.hasOwnProp(prototype2, "toJSON")) {
|
|
25951
|
+
return true;
|
|
25952
|
+
}
|
|
25953
|
+
prototype2 = Object.getPrototypeOf(prototype2);
|
|
25954
|
+
}
|
|
25955
|
+
return false;
|
|
25956
|
+
}
|
|
25957
|
+
function redactConfig(config, redactKeys) {
|
|
25958
|
+
const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
|
|
25959
|
+
const seen = [];
|
|
25960
|
+
const visit = (source) => {
|
|
25961
|
+
if (source === null || typeof source !== "object") return source;
|
|
25962
|
+
if (utils$1.isBuffer(source)) return source;
|
|
25963
|
+
if (seen.indexOf(source) !== -1) return void 0;
|
|
25964
|
+
if (source instanceof AxiosHeaders) {
|
|
25965
|
+
source = source.toJSON();
|
|
25966
|
+
}
|
|
25967
|
+
seen.push(source);
|
|
25968
|
+
let result;
|
|
25969
|
+
if (utils$1.isArray(source)) {
|
|
25970
|
+
result = [];
|
|
25971
|
+
source.forEach((v, i) => {
|
|
25972
|
+
const reducedValue = visit(v);
|
|
25973
|
+
if (!utils$1.isUndefined(reducedValue)) {
|
|
25974
|
+
result[i] = reducedValue;
|
|
25975
|
+
}
|
|
25976
|
+
});
|
|
25977
|
+
} else {
|
|
25978
|
+
if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
|
|
25979
|
+
seen.pop();
|
|
25980
|
+
return source;
|
|
25981
|
+
}
|
|
25982
|
+
result = /* @__PURE__ */ Object.create(null);
|
|
25983
|
+
for (const [key, value] of Object.entries(source)) {
|
|
25984
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
|
|
25985
|
+
if (!utils$1.isUndefined(reducedValue)) {
|
|
25986
|
+
result[key] = reducedValue;
|
|
25987
|
+
}
|
|
25988
|
+
}
|
|
25989
|
+
}
|
|
25990
|
+
seen.pop();
|
|
25991
|
+
return result;
|
|
25992
|
+
};
|
|
25993
|
+
return visit(config);
|
|
25994
|
+
}
|
|
25995
|
+
var AxiosError = class _AxiosError extends Error {
|
|
25996
|
+
static from(error, code, config, request, response, customProps) {
|
|
25997
|
+
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
25998
|
+
axiosError.cause = error;
|
|
25999
|
+
axiosError.name = error.name;
|
|
26000
|
+
if (error.status != null && axiosError.status == null) {
|
|
26001
|
+
axiosError.status = error.status;
|
|
25461
26002
|
}
|
|
26003
|
+
customProps && Object.assign(axiosError, customProps);
|
|
26004
|
+
return axiosError;
|
|
25462
26005
|
}
|
|
25463
26006
|
/**
|
|
25464
|
-
*
|
|
25465
|
-
*
|
|
25466
|
-
* This method is particularly useful for skipping over any
|
|
25467
|
-
* interceptors that may have become `null` calling `eject`.
|
|
26007
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
25468
26008
|
*
|
|
25469
|
-
* @param {
|
|
26009
|
+
* @param {string} message The error message.
|
|
26010
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
26011
|
+
* @param {Object} [config] The config.
|
|
26012
|
+
* @param {Object} [request] The request.
|
|
26013
|
+
* @param {Object} [response] The response.
|
|
25470
26014
|
*
|
|
25471
|
-
* @returns {
|
|
26015
|
+
* @returns {Error} The created error.
|
|
25472
26016
|
*/
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
26017
|
+
constructor(message, code, config, request, response) {
|
|
26018
|
+
super(message);
|
|
26019
|
+
Object.defineProperty(this, "message", {
|
|
26020
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
26021
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
26022
|
+
__proto__: null,
|
|
26023
|
+
value: message,
|
|
26024
|
+
enumerable: true,
|
|
26025
|
+
writable: true,
|
|
26026
|
+
configurable: true
|
|
25478
26027
|
});
|
|
26028
|
+
this.name = "AxiosError";
|
|
26029
|
+
this.isAxiosError = true;
|
|
26030
|
+
code && (this.code = code);
|
|
26031
|
+
config && (this.config = config);
|
|
26032
|
+
request && (this.request = request);
|
|
26033
|
+
if (response) {
|
|
26034
|
+
this.response = response;
|
|
26035
|
+
this.status = response.status;
|
|
26036
|
+
}
|
|
25479
26037
|
}
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25483
|
-
|
|
25484
|
-
|
|
25485
|
-
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25498
|
-
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
crypto.randomFillSync(randomValues);
|
|
25502
|
-
for (let i = 0; i < size; i++) {
|
|
25503
|
-
str += alphabet[randomValues[i] % length];
|
|
26038
|
+
toJSON() {
|
|
26039
|
+
const config = this.config;
|
|
26040
|
+
const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
|
|
26041
|
+
const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
|
|
26042
|
+
return {
|
|
26043
|
+
// Standard
|
|
26044
|
+
message: this.message,
|
|
26045
|
+
name: this.name,
|
|
26046
|
+
// Microsoft
|
|
26047
|
+
description: this.description,
|
|
26048
|
+
number: this.number,
|
|
26049
|
+
// Mozilla
|
|
26050
|
+
fileName: this.fileName,
|
|
26051
|
+
lineNumber: this.lineNumber,
|
|
26052
|
+
columnNumber: this.columnNumber,
|
|
26053
|
+
stack: this.stack,
|
|
26054
|
+
// Axios
|
|
26055
|
+
config: serializedConfig,
|
|
26056
|
+
code: this.code,
|
|
26057
|
+
status: this.status
|
|
26058
|
+
};
|
|
25504
26059
|
}
|
|
25505
|
-
return str;
|
|
25506
|
-
};
|
|
25507
|
-
var platform$1 = {
|
|
25508
|
-
isNode: true,
|
|
25509
|
-
classes: {
|
|
25510
|
-
URLSearchParams,
|
|
25511
|
-
FormData: FormData$1,
|
|
25512
|
-
Blob: typeof Blob !== "undefined" && Blob || null
|
|
25513
|
-
},
|
|
25514
|
-
ALPHABET,
|
|
25515
|
-
generateString,
|
|
25516
|
-
protocols: ["http", "https", "file", "data"]
|
|
25517
26060
|
};
|
|
25518
|
-
|
|
25519
|
-
|
|
25520
|
-
|
|
25521
|
-
|
|
25522
|
-
|
|
25523
|
-
|
|
25524
|
-
|
|
25525
|
-
|
|
25526
|
-
|
|
25527
|
-
|
|
25528
|
-
|
|
25529
|
-
|
|
25530
|
-
|
|
25531
|
-
|
|
25532
|
-
|
|
25533
|
-
|
|
25534
|
-
var platform = {
|
|
25535
|
-
...utils,
|
|
25536
|
-
...platform$1
|
|
25537
|
-
};
|
|
25538
|
-
function toURLEncodedForm(data, options) {
|
|
25539
|
-
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
25540
|
-
visitor: function(value, key, path2, helpers) {
|
|
25541
|
-
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
25542
|
-
this.append(key, value.toString("base64"));
|
|
25543
|
-
return false;
|
|
25544
|
-
}
|
|
25545
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
25546
|
-
},
|
|
25547
|
-
...options
|
|
25548
|
-
});
|
|
26061
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
26062
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
26063
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
26064
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
26065
|
+
AxiosError.ECONNREFUSED = "ECONNREFUSED";
|
|
26066
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
26067
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
26068
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
26069
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
26070
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
26071
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
26072
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
26073
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
26074
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
26075
|
+
function isVisitable(thing) {
|
|
26076
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
25549
26077
|
}
|
|
25550
|
-
function
|
|
25551
|
-
return utils$1.
|
|
25552
|
-
return match2[0] === "[]" ? "" : match2[1] || match2[0];
|
|
25553
|
-
});
|
|
26078
|
+
function removeBrackets(key) {
|
|
26079
|
+
return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
25554
26080
|
}
|
|
25555
|
-
function
|
|
25556
|
-
|
|
25557
|
-
|
|
25558
|
-
|
|
25559
|
-
|
|
25560
|
-
|
|
25561
|
-
for (i = 0; i < len; i++) {
|
|
25562
|
-
key = keys[i];
|
|
25563
|
-
obj[key] = arr[key];
|
|
25564
|
-
}
|
|
25565
|
-
return obj;
|
|
26081
|
+
function renderKey(path2, key, dots) {
|
|
26082
|
+
if (!path2) return key;
|
|
26083
|
+
return path2.concat(key).map(function each(token2, i) {
|
|
26084
|
+
token2 = removeBrackets(token2);
|
|
26085
|
+
return !dots && i ? "[" + token2 + "]" : token2;
|
|
26086
|
+
}).join(dots ? "." : "");
|
|
25566
26087
|
}
|
|
25567
|
-
function
|
|
25568
|
-
|
|
25569
|
-
let name = path2[index++];
|
|
25570
|
-
if (name === "__proto__") return true;
|
|
25571
|
-
const isNumericKey = Number.isFinite(+name);
|
|
25572
|
-
const isLast = index >= path2.length;
|
|
25573
|
-
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
25574
|
-
if (isLast) {
|
|
25575
|
-
if (utils$1.hasOwnProp(target, name)) {
|
|
25576
|
-
target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
25577
|
-
} else {
|
|
25578
|
-
target[name] = value;
|
|
25579
|
-
}
|
|
25580
|
-
return !isNumericKey;
|
|
25581
|
-
}
|
|
25582
|
-
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
25583
|
-
target[name] = [];
|
|
25584
|
-
}
|
|
25585
|
-
const result = buildPath(path2, value, target[name], index);
|
|
25586
|
-
if (result && utils$1.isArray(target[name])) {
|
|
25587
|
-
target[name] = arrayToObject(target[name]);
|
|
25588
|
-
}
|
|
25589
|
-
return !isNumericKey;
|
|
25590
|
-
}
|
|
25591
|
-
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
25592
|
-
const obj = {};
|
|
25593
|
-
utils$1.forEachEntry(formData, (name, value) => {
|
|
25594
|
-
buildPath(parsePropPath(name), value, obj, 0);
|
|
25595
|
-
});
|
|
25596
|
-
return obj;
|
|
25597
|
-
}
|
|
25598
|
-
return null;
|
|
26088
|
+
function isFlatArray(arr) {
|
|
26089
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
25599
26090
|
}
|
|
25600
|
-
var
|
|
25601
|
-
|
|
25602
|
-
|
|
25603
|
-
|
|
25604
|
-
|
|
25605
|
-
|
|
25606
|
-
} catch (e) {
|
|
25607
|
-
if (e.name !== "SyntaxError") {
|
|
25608
|
-
throw e;
|
|
25609
|
-
}
|
|
25610
|
-
}
|
|
26091
|
+
var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
26092
|
+
return /^is[A-Z]/.test(prop);
|
|
26093
|
+
});
|
|
26094
|
+
function toFormData(obj, formData, options) {
|
|
26095
|
+
if (!utils$1.isObject(obj)) {
|
|
26096
|
+
throw new TypeError("target must be an object");
|
|
25611
26097
|
}
|
|
25612
|
-
|
|
25613
|
-
|
|
25614
|
-
|
|
25615
|
-
|
|
25616
|
-
|
|
25617
|
-
|
|
25618
|
-
|
|
25619
|
-
|
|
25620
|
-
|
|
25621
|
-
|
|
25622
|
-
|
|
26098
|
+
formData = formData || new (FormData$1 || FormData)();
|
|
26099
|
+
options = utils$1.toFlatObject(options, {
|
|
26100
|
+
metaTokens: true,
|
|
26101
|
+
dots: false,
|
|
26102
|
+
indexes: false
|
|
26103
|
+
}, false, function defined(option, source) {
|
|
26104
|
+
return !utils$1.isUndefined(source[option]);
|
|
26105
|
+
});
|
|
26106
|
+
const metaTokens = options.metaTokens;
|
|
26107
|
+
const visitor = options.visitor || defaultVisitor;
|
|
26108
|
+
const dots = options.dots;
|
|
26109
|
+
const indexes = options.indexes;
|
|
26110
|
+
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
26111
|
+
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
26112
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
26113
|
+
if (!utils$1.isFunction(visitor)) {
|
|
26114
|
+
throw new TypeError("visitor must be a function");
|
|
26115
|
+
}
|
|
26116
|
+
function convertValue(value) {
|
|
26117
|
+
if (value === null) return "";
|
|
26118
|
+
if (utils$1.isDate(value)) {
|
|
26119
|
+
return value.toISOString();
|
|
25623
26120
|
}
|
|
25624
|
-
|
|
25625
|
-
|
|
25626
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
26121
|
+
if (utils$1.isBoolean(value)) {
|
|
26122
|
+
return value.toString();
|
|
25627
26123
|
}
|
|
25628
|
-
if (
|
|
25629
|
-
|
|
26124
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
26125
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
25630
26126
|
}
|
|
25631
|
-
if (utils$1.
|
|
25632
|
-
return
|
|
26127
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
26128
|
+
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
25633
26129
|
}
|
|
25634
|
-
|
|
25635
|
-
|
|
25636
|
-
|
|
26130
|
+
return value;
|
|
26131
|
+
}
|
|
26132
|
+
function defaultVisitor(value, key, path2) {
|
|
26133
|
+
let arr = value;
|
|
26134
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
26135
|
+
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
26136
|
+
return false;
|
|
25637
26137
|
}
|
|
25638
|
-
|
|
25639
|
-
|
|
25640
|
-
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
|
|
25644
|
-
|
|
25645
|
-
|
|
25646
|
-
|
|
25647
|
-
|
|
25648
|
-
|
|
25649
|
-
|
|
26138
|
+
if (value && !path2 && typeof value === "object") {
|
|
26139
|
+
if (utils$1.endsWith(key, "{}")) {
|
|
26140
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
26141
|
+
value = JSON.stringify(value);
|
|
26142
|
+
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
26143
|
+
key = removeBrackets(key);
|
|
26144
|
+
arr.forEach(function each(el, index) {
|
|
26145
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
26146
|
+
// eslint-disable-next-line no-nested-ternary
|
|
26147
|
+
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
26148
|
+
convertValue(el)
|
|
26149
|
+
);
|
|
26150
|
+
});
|
|
26151
|
+
return false;
|
|
25650
26152
|
}
|
|
25651
26153
|
}
|
|
25652
|
-
if (
|
|
25653
|
-
|
|
25654
|
-
return stringifySafely(data);
|
|
26154
|
+
if (isVisitable(value)) {
|
|
26155
|
+
return true;
|
|
25655
26156
|
}
|
|
25656
|
-
|
|
25657
|
-
|
|
25658
|
-
|
|
25659
|
-
|
|
25660
|
-
|
|
25661
|
-
|
|
25662
|
-
|
|
25663
|
-
|
|
25664
|
-
|
|
26157
|
+
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
26158
|
+
return false;
|
|
26159
|
+
}
|
|
26160
|
+
const stack = [];
|
|
26161
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
26162
|
+
defaultVisitor,
|
|
26163
|
+
convertValue,
|
|
26164
|
+
isVisitable
|
|
26165
|
+
});
|
|
26166
|
+
function build(value, path2, depth = 0) {
|
|
26167
|
+
if (utils$1.isUndefined(value)) return;
|
|
26168
|
+
if (depth > maxDepth) {
|
|
26169
|
+
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
25665
26170
|
}
|
|
25666
|
-
if (
|
|
25667
|
-
|
|
25668
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
25669
|
-
try {
|
|
25670
|
-
return JSON.parse(data, own(this, "parseReviver"));
|
|
25671
|
-
} catch (e) {
|
|
25672
|
-
if (strictJSONParsing) {
|
|
25673
|
-
if (e.name === "SyntaxError") {
|
|
25674
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
25675
|
-
}
|
|
25676
|
-
throw e;
|
|
25677
|
-
}
|
|
25678
|
-
}
|
|
26171
|
+
if (stack.indexOf(value) !== -1) {
|
|
26172
|
+
throw new Error("Circular reference detected in " + path2.join("."));
|
|
25679
26173
|
}
|
|
25680
|
-
|
|
25681
|
-
|
|
25682
|
-
|
|
25683
|
-
|
|
25684
|
-
|
|
25685
|
-
*/
|
|
25686
|
-
timeout: 0,
|
|
25687
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
25688
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
25689
|
-
maxContentLength: -1,
|
|
25690
|
-
maxBodyLength: -1,
|
|
25691
|
-
env: {
|
|
25692
|
-
FormData: platform.classes.FormData,
|
|
25693
|
-
Blob: platform.classes.Blob
|
|
25694
|
-
},
|
|
25695
|
-
validateStatus: function validateStatus(status) {
|
|
25696
|
-
return status >= 200 && status < 300;
|
|
25697
|
-
},
|
|
25698
|
-
headers: {
|
|
25699
|
-
common: {
|
|
25700
|
-
Accept: "application/json, text/plain, */*",
|
|
25701
|
-
"Content-Type": void 0
|
|
25702
|
-
}
|
|
25703
|
-
}
|
|
25704
|
-
};
|
|
25705
|
-
utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
25706
|
-
defaults.headers[method] = {};
|
|
25707
|
-
});
|
|
25708
|
-
var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
|
|
25709
|
-
var parseHeaders = (rawHeaders) => {
|
|
25710
|
-
const parsed = {};
|
|
25711
|
-
let key;
|
|
25712
|
-
let val;
|
|
25713
|
-
let i;
|
|
25714
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
25715
|
-
i = line.indexOf(":");
|
|
25716
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
25717
|
-
val = line.substring(i + 1).trim();
|
|
25718
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
25719
|
-
return;
|
|
25720
|
-
}
|
|
25721
|
-
if (key === "set-cookie") {
|
|
25722
|
-
if (parsed[key]) {
|
|
25723
|
-
parsed[key].push(val);
|
|
25724
|
-
} else {
|
|
25725
|
-
parsed[key] = [val];
|
|
26174
|
+
stack.push(value);
|
|
26175
|
+
utils$1.forEach(value, function each(el, key) {
|
|
26176
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
|
|
26177
|
+
if (result === true) {
|
|
26178
|
+
build(el, path2 ? path2.concat(key) : [key], depth + 1);
|
|
25726
26179
|
}
|
|
25727
|
-
}
|
|
25728
|
-
|
|
25729
|
-
}
|
|
25730
|
-
});
|
|
25731
|
-
return parsed;
|
|
25732
|
-
};
|
|
25733
|
-
var $internals = /* @__PURE__ */ Symbol("internals");
|
|
25734
|
-
var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
25735
|
-
function trimSPorHTAB(str) {
|
|
25736
|
-
let start = 0;
|
|
25737
|
-
let end = str.length;
|
|
25738
|
-
while (start < end) {
|
|
25739
|
-
const code = str.charCodeAt(start);
|
|
25740
|
-
if (code !== 9 && code !== 32) {
|
|
25741
|
-
break;
|
|
25742
|
-
}
|
|
25743
|
-
start += 1;
|
|
26180
|
+
});
|
|
26181
|
+
stack.pop();
|
|
25744
26182
|
}
|
|
25745
|
-
|
|
25746
|
-
|
|
25747
|
-
if (code !== 9 && code !== 32) {
|
|
25748
|
-
break;
|
|
25749
|
-
}
|
|
25750
|
-
end -= 1;
|
|
26183
|
+
if (!utils$1.isObject(obj)) {
|
|
26184
|
+
throw new TypeError("data must be an object");
|
|
25751
26185
|
}
|
|
25752
|
-
|
|
25753
|
-
|
|
25754
|
-
function normalizeHeader(header) {
|
|
25755
|
-
return header && String(header).trim().toLowerCase();
|
|
26186
|
+
build(obj);
|
|
26187
|
+
return formData;
|
|
25756
26188
|
}
|
|
25757
|
-
function
|
|
25758
|
-
|
|
26189
|
+
function encode$1(str) {
|
|
26190
|
+
const charMap = {
|
|
26191
|
+
"!": "%21",
|
|
26192
|
+
"'": "%27",
|
|
26193
|
+
"(": "%28",
|
|
26194
|
+
")": "%29",
|
|
26195
|
+
"~": "%7E",
|
|
26196
|
+
"%20": "+"
|
|
26197
|
+
};
|
|
26198
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match2) {
|
|
26199
|
+
return charMap[match2];
|
|
26200
|
+
});
|
|
25759
26201
|
}
|
|
25760
|
-
function
|
|
25761
|
-
|
|
25762
|
-
|
|
25763
|
-
}
|
|
25764
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
26202
|
+
function AxiosURLSearchParams(params, options) {
|
|
26203
|
+
this._pairs = [];
|
|
26204
|
+
params && toFormData(params, this, options);
|
|
25765
26205
|
}
|
|
25766
|
-
|
|
25767
|
-
|
|
25768
|
-
|
|
25769
|
-
|
|
25770
|
-
|
|
25771
|
-
|
|
25772
|
-
|
|
25773
|
-
|
|
26206
|
+
var prototype = AxiosURLSearchParams.prototype;
|
|
26207
|
+
prototype.append = function append(name, value) {
|
|
26208
|
+
this._pairs.push([name, value]);
|
|
26209
|
+
};
|
|
26210
|
+
prototype.toString = function toString3(encoder) {
|
|
26211
|
+
const _encode = encoder ? function(value) {
|
|
26212
|
+
return encoder.call(this, value, encode$1);
|
|
26213
|
+
} : encode$1;
|
|
26214
|
+
return this._pairs.map(function each(pair) {
|
|
26215
|
+
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
26216
|
+
}, "").join("&");
|
|
26217
|
+
};
|
|
26218
|
+
function encode(val) {
|
|
26219
|
+
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
25774
26220
|
}
|
|
25775
|
-
|
|
25776
|
-
|
|
25777
|
-
|
|
25778
|
-
return filter.call(this, value, header);
|
|
25779
|
-
}
|
|
25780
|
-
if (isHeaderNameFilter) {
|
|
25781
|
-
value = header;
|
|
26221
|
+
function buildURL(url2, params, options) {
|
|
26222
|
+
if (!params) {
|
|
26223
|
+
return url2;
|
|
25782
26224
|
}
|
|
25783
|
-
|
|
25784
|
-
|
|
25785
|
-
|
|
26225
|
+
const _encode = options && options.encode || encode;
|
|
26226
|
+
const _options = utils$1.isFunction(options) ? {
|
|
26227
|
+
serialize: options
|
|
26228
|
+
} : options;
|
|
26229
|
+
const serializeFn = _options && _options.serialize;
|
|
26230
|
+
let serializedParams;
|
|
26231
|
+
if (serializeFn) {
|
|
26232
|
+
serializedParams = serializeFn(params, _options);
|
|
26233
|
+
} else {
|
|
26234
|
+
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
25786
26235
|
}
|
|
25787
|
-
if (
|
|
25788
|
-
|
|
26236
|
+
if (serializedParams) {
|
|
26237
|
+
const hashmarkIndex = url2.indexOf("#");
|
|
26238
|
+
if (hashmarkIndex !== -1) {
|
|
26239
|
+
url2 = url2.slice(0, hashmarkIndex);
|
|
26240
|
+
}
|
|
26241
|
+
url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
25789
26242
|
}
|
|
26243
|
+
return url2;
|
|
25790
26244
|
}
|
|
25791
|
-
|
|
25792
|
-
|
|
25793
|
-
|
|
25794
|
-
}
|
|
25795
|
-
|
|
25796
|
-
|
|
25797
|
-
|
|
25798
|
-
|
|
25799
|
-
|
|
25800
|
-
|
|
25801
|
-
|
|
25802
|
-
|
|
25803
|
-
|
|
26245
|
+
var InterceptorManager = class {
|
|
26246
|
+
constructor() {
|
|
26247
|
+
this.handlers = [];
|
|
26248
|
+
}
|
|
26249
|
+
/**
|
|
26250
|
+
* Add a new interceptor to the stack
|
|
26251
|
+
*
|
|
26252
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
26253
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
26254
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
26255
|
+
*
|
|
26256
|
+
* @return {Number} An ID used to remove interceptor later
|
|
26257
|
+
*/
|
|
26258
|
+
use(fulfilled, rejected, options) {
|
|
26259
|
+
this.handlers.push({
|
|
26260
|
+
fulfilled,
|
|
26261
|
+
rejected,
|
|
26262
|
+
synchronous: options ? options.synchronous : false,
|
|
26263
|
+
runWhen: options ? options.runWhen : null
|
|
25804
26264
|
});
|
|
25805
|
-
|
|
25806
|
-
}
|
|
25807
|
-
var AxiosHeaders = class {
|
|
25808
|
-
constructor(headers) {
|
|
25809
|
-
headers && this.set(headers);
|
|
26265
|
+
return this.handlers.length - 1;
|
|
25810
26266
|
}
|
|
25811
|
-
|
|
25812
|
-
|
|
25813
|
-
|
|
25814
|
-
|
|
25815
|
-
|
|
25816
|
-
|
|
25817
|
-
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
|
|
25821
|
-
}
|
|
26267
|
+
/**
|
|
26268
|
+
* Remove an interceptor from the stack
|
|
26269
|
+
*
|
|
26270
|
+
* @param {Number} id The ID that was returned by `use`
|
|
26271
|
+
*
|
|
26272
|
+
* @returns {void}
|
|
26273
|
+
*/
|
|
26274
|
+
eject(id) {
|
|
26275
|
+
if (this.handlers[id]) {
|
|
26276
|
+
this.handlers[id] = null;
|
|
25822
26277
|
}
|
|
25823
|
-
|
|
25824
|
-
|
|
25825
|
-
|
|
25826
|
-
|
|
25827
|
-
|
|
25828
|
-
|
|
25829
|
-
|
|
25830
|
-
|
|
25831
|
-
|
|
25832
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
25833
|
-
}
|
|
25834
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
25835
|
-
}
|
|
25836
|
-
setHeaders(obj, valueOrRewrite);
|
|
25837
|
-
} else {
|
|
25838
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
26278
|
+
}
|
|
26279
|
+
/**
|
|
26280
|
+
* Clear all interceptors from the stack
|
|
26281
|
+
*
|
|
26282
|
+
* @returns {void}
|
|
26283
|
+
*/
|
|
26284
|
+
clear() {
|
|
26285
|
+
if (this.handlers) {
|
|
26286
|
+
this.handlers = [];
|
|
25839
26287
|
}
|
|
25840
|
-
return this;
|
|
25841
26288
|
}
|
|
25842
|
-
|
|
25843
|
-
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
|
|
25847
|
-
|
|
25848
|
-
|
|
25849
|
-
|
|
25850
|
-
|
|
25851
|
-
|
|
25852
|
-
|
|
25853
|
-
|
|
25854
|
-
|
|
25855
|
-
|
|
25856
|
-
}
|
|
25857
|
-
if (utils$1.isRegExp(parser)) {
|
|
25858
|
-
return parser.exec(value);
|
|
25859
|
-
}
|
|
25860
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
26289
|
+
/**
|
|
26290
|
+
* Iterate over all the registered interceptors
|
|
26291
|
+
*
|
|
26292
|
+
* This method is particularly useful for skipping over any
|
|
26293
|
+
* interceptors that may have become `null` calling `eject`.
|
|
26294
|
+
*
|
|
26295
|
+
* @param {Function} fn The function to call for each interceptor
|
|
26296
|
+
*
|
|
26297
|
+
* @returns {void}
|
|
26298
|
+
*/
|
|
26299
|
+
forEach(fn) {
|
|
26300
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
26301
|
+
if (h !== null) {
|
|
26302
|
+
fn(h);
|
|
25861
26303
|
}
|
|
25862
|
-
}
|
|
26304
|
+
});
|
|
25863
26305
|
}
|
|
25864
|
-
|
|
25865
|
-
|
|
25866
|
-
|
|
25867
|
-
|
|
25868
|
-
|
|
25869
|
-
|
|
25870
|
-
|
|
26306
|
+
};
|
|
26307
|
+
var transitionalDefaults = {
|
|
26308
|
+
silentJSONParsing: true,
|
|
26309
|
+
forcedJSONParsing: true,
|
|
26310
|
+
clarifyTimeoutError: false,
|
|
26311
|
+
legacyInterceptorReqResOrdering: true,
|
|
26312
|
+
advertiseZstdAcceptEncoding: false
|
|
26313
|
+
};
|
|
26314
|
+
var URLSearchParams = url.URLSearchParams;
|
|
26315
|
+
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
26316
|
+
var DIGIT = "0123456789";
|
|
26317
|
+
var ALPHABET = {
|
|
26318
|
+
DIGIT,
|
|
26319
|
+
ALPHA,
|
|
26320
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
26321
|
+
};
|
|
26322
|
+
var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
26323
|
+
let str = "";
|
|
26324
|
+
const {
|
|
26325
|
+
length
|
|
26326
|
+
} = alphabet;
|
|
26327
|
+
const randomValues = new Uint32Array(size);
|
|
26328
|
+
crypto.randomFillSync(randomValues);
|
|
26329
|
+
for (let i = 0; i < size; i++) {
|
|
26330
|
+
str += alphabet[randomValues[i] % length];
|
|
25871
26331
|
}
|
|
25872
|
-
|
|
25873
|
-
|
|
25874
|
-
|
|
25875
|
-
|
|
25876
|
-
|
|
25877
|
-
|
|
25878
|
-
|
|
25879
|
-
|
|
25880
|
-
|
|
25881
|
-
|
|
25882
|
-
|
|
26332
|
+
return str;
|
|
26333
|
+
};
|
|
26334
|
+
var platform$1 = {
|
|
26335
|
+
isNode: true,
|
|
26336
|
+
classes: {
|
|
26337
|
+
URLSearchParams,
|
|
26338
|
+
FormData: FormData$1,
|
|
26339
|
+
Blob: typeof Blob !== "undefined" && Blob || null
|
|
26340
|
+
},
|
|
26341
|
+
ALPHABET,
|
|
26342
|
+
generateString,
|
|
26343
|
+
protocols: ["http", "https", "file", "data"]
|
|
26344
|
+
};
|
|
26345
|
+
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
26346
|
+
var _navigator = typeof navigator === "object" && navigator || void 0;
|
|
26347
|
+
var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
26348
|
+
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
26349
|
+
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
26350
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
26351
|
+
})();
|
|
26352
|
+
var origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
26353
|
+
var utils = /* @__PURE__ */ Object.freeze({
|
|
26354
|
+
__proto__: null,
|
|
26355
|
+
hasBrowserEnv,
|
|
26356
|
+
hasStandardBrowserEnv,
|
|
26357
|
+
hasStandardBrowserWebWorkerEnv,
|
|
26358
|
+
navigator: _navigator,
|
|
26359
|
+
origin
|
|
26360
|
+
});
|
|
26361
|
+
var platform = {
|
|
26362
|
+
...utils,
|
|
26363
|
+
...platform$1
|
|
26364
|
+
};
|
|
26365
|
+
function toURLEncodedForm(data, options) {
|
|
26366
|
+
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
26367
|
+
visitor: function(value, key, path2, helpers) {
|
|
26368
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
26369
|
+
this.append(key, value.toString("base64"));
|
|
26370
|
+
return false;
|
|
26371
|
+
}
|
|
26372
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
26373
|
+
},
|
|
26374
|
+
...options
|
|
26375
|
+
});
|
|
26376
|
+
}
|
|
26377
|
+
function parsePropPath(name) {
|
|
26378
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => {
|
|
26379
|
+
return match2[0] === "[]" ? "" : match2[1] || match2[0];
|
|
26380
|
+
});
|
|
26381
|
+
}
|
|
26382
|
+
function arrayToObject(arr) {
|
|
26383
|
+
const obj = {};
|
|
26384
|
+
const keys = Object.keys(arr);
|
|
26385
|
+
let i;
|
|
26386
|
+
const len = keys.length;
|
|
26387
|
+
let key;
|
|
26388
|
+
for (i = 0; i < len; i++) {
|
|
26389
|
+
key = keys[i];
|
|
26390
|
+
obj[key] = arr[key];
|
|
26391
|
+
}
|
|
26392
|
+
return obj;
|
|
26393
|
+
}
|
|
26394
|
+
function formDataToJSON(formData) {
|
|
26395
|
+
function buildPath(path2, value, target, index) {
|
|
26396
|
+
let name = path2[index++];
|
|
26397
|
+
if (name === "__proto__") return true;
|
|
26398
|
+
const isNumericKey = Number.isFinite(+name);
|
|
26399
|
+
const isLast = index >= path2.length;
|
|
26400
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
26401
|
+
if (isLast) {
|
|
26402
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
26403
|
+
target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
26404
|
+
} else {
|
|
26405
|
+
target[name] = value;
|
|
25883
26406
|
}
|
|
26407
|
+
return !isNumericKey;
|
|
25884
26408
|
}
|
|
25885
|
-
if (utils$1.
|
|
25886
|
-
|
|
25887
|
-
} else {
|
|
25888
|
-
deleteHeader(header);
|
|
26409
|
+
if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
|
|
26410
|
+
target[name] = [];
|
|
25889
26411
|
}
|
|
25890
|
-
|
|
25891
|
-
|
|
25892
|
-
|
|
25893
|
-
const keys = Object.keys(this);
|
|
25894
|
-
let i = keys.length;
|
|
25895
|
-
let deleted = false;
|
|
25896
|
-
while (i--) {
|
|
25897
|
-
const key = keys[i];
|
|
25898
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
25899
|
-
delete this[key];
|
|
25900
|
-
deleted = true;
|
|
25901
|
-
}
|
|
26412
|
+
const result = buildPath(path2, value, target[name], index);
|
|
26413
|
+
if (result && utils$1.isArray(target[name])) {
|
|
26414
|
+
target[name] = arrayToObject(target[name]);
|
|
25902
26415
|
}
|
|
25903
|
-
return
|
|
25904
|
-
}
|
|
25905
|
-
normalize(format2) {
|
|
25906
|
-
const self2 = this;
|
|
25907
|
-
const headers = {};
|
|
25908
|
-
utils$1.forEach(this, (value, header) => {
|
|
25909
|
-
const key = utils$1.findKey(headers, header);
|
|
25910
|
-
if (key) {
|
|
25911
|
-
self2[key] = normalizeValue(value);
|
|
25912
|
-
delete self2[header];
|
|
25913
|
-
return;
|
|
25914
|
-
}
|
|
25915
|
-
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
25916
|
-
if (normalized !== header) {
|
|
25917
|
-
delete self2[header];
|
|
25918
|
-
}
|
|
25919
|
-
self2[normalized] = normalizeValue(value);
|
|
25920
|
-
headers[normalized] = true;
|
|
25921
|
-
});
|
|
25922
|
-
return this;
|
|
25923
|
-
}
|
|
25924
|
-
concat(...targets) {
|
|
25925
|
-
return this.constructor.concat(this, ...targets);
|
|
26416
|
+
return !isNumericKey;
|
|
25926
26417
|
}
|
|
25927
|
-
|
|
25928
|
-
const obj =
|
|
25929
|
-
utils$1.
|
|
25930
|
-
|
|
26418
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
26419
|
+
const obj = {};
|
|
26420
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
26421
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
25931
26422
|
});
|
|
25932
26423
|
return obj;
|
|
25933
26424
|
}
|
|
25934
|
-
|
|
25935
|
-
|
|
25936
|
-
|
|
25937
|
-
|
|
25938
|
-
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
25943
|
-
|
|
25944
|
-
|
|
25945
|
-
|
|
25946
|
-
|
|
25947
|
-
return thing instanceof this ? thing : new this(thing);
|
|
25948
|
-
}
|
|
25949
|
-
static concat(first2, ...targets) {
|
|
25950
|
-
const computed = new this(first2);
|
|
25951
|
-
targets.forEach((target) => computed.set(target));
|
|
25952
|
-
return computed;
|
|
26425
|
+
return null;
|
|
26426
|
+
}
|
|
26427
|
+
var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
26428
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
26429
|
+
if (utils$1.isString(rawValue)) {
|
|
26430
|
+
try {
|
|
26431
|
+
(parser || JSON.parse)(rawValue);
|
|
26432
|
+
return utils$1.trim(rawValue);
|
|
26433
|
+
} catch (e) {
|
|
26434
|
+
if (e.name !== "SyntaxError") {
|
|
26435
|
+
throw e;
|
|
26436
|
+
}
|
|
26437
|
+
}
|
|
25953
26438
|
}
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
|
|
25957
|
-
|
|
25958
|
-
|
|
25959
|
-
|
|
25960
|
-
|
|
25961
|
-
|
|
25962
|
-
|
|
25963
|
-
|
|
25964
|
-
|
|
26439
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
26440
|
+
}
|
|
26441
|
+
var defaults = {
|
|
26442
|
+
transitional: transitionalDefaults,
|
|
26443
|
+
adapter: ["xhr", "http", "fetch"],
|
|
26444
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
26445
|
+
const contentType = headers.getContentType() || "";
|
|
26446
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
26447
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
26448
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
26449
|
+
data = new FormData(data);
|
|
26450
|
+
}
|
|
26451
|
+
const isFormData2 = utils$1.isFormData(data);
|
|
26452
|
+
if (isFormData2) {
|
|
26453
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
26454
|
+
}
|
|
26455
|
+
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
|
|
26456
|
+
return data;
|
|
26457
|
+
}
|
|
26458
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
26459
|
+
return data.buffer;
|
|
26460
|
+
}
|
|
26461
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
26462
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
26463
|
+
return data.toString();
|
|
26464
|
+
}
|
|
26465
|
+
let isFileList2;
|
|
26466
|
+
if (isObjectPayload) {
|
|
26467
|
+
const formSerializer = own(this, "formSerializer");
|
|
26468
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
26469
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
26470
|
+
}
|
|
26471
|
+
if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
26472
|
+
const env = own(this, "env");
|
|
26473
|
+
const _FormData = env && env.FormData;
|
|
26474
|
+
return toFormData(isFileList2 ? {
|
|
26475
|
+
"files[]": data
|
|
26476
|
+
} : data, _FormData && new _FormData(), formSerializer);
|
|
25965
26477
|
}
|
|
25966
26478
|
}
|
|
25967
|
-
|
|
25968
|
-
|
|
26479
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
26480
|
+
headers.setContentType("application/json", false);
|
|
26481
|
+
return stringifySafely(data);
|
|
26482
|
+
}
|
|
26483
|
+
return data;
|
|
26484
|
+
}],
|
|
26485
|
+
transformResponse: [function transformResponse(data) {
|
|
26486
|
+
const transitional = own(this, "transitional") || defaults.transitional;
|
|
26487
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
26488
|
+
const responseType = own(this, "responseType");
|
|
26489
|
+
const JSONRequested = responseType === "json";
|
|
26490
|
+
if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
|
|
26491
|
+
return data;
|
|
26492
|
+
}
|
|
26493
|
+
if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
26494
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
26495
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
26496
|
+
try {
|
|
26497
|
+
return JSON.parse(data, own(this, "parseReviver"));
|
|
26498
|
+
} catch (e) {
|
|
26499
|
+
if (strictJSONParsing) {
|
|
26500
|
+
if (e.name === "SyntaxError") {
|
|
26501
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
26502
|
+
}
|
|
26503
|
+
throw e;
|
|
26504
|
+
}
|
|
26505
|
+
}
|
|
26506
|
+
}
|
|
26507
|
+
return data;
|
|
26508
|
+
}],
|
|
26509
|
+
/**
|
|
26510
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
26511
|
+
* timeout is not created.
|
|
26512
|
+
*/
|
|
26513
|
+
timeout: 0,
|
|
26514
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
26515
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
26516
|
+
maxContentLength: -1,
|
|
26517
|
+
maxBodyLength: -1,
|
|
26518
|
+
env: {
|
|
26519
|
+
FormData: platform.classes.FormData,
|
|
26520
|
+
Blob: platform.classes.Blob
|
|
26521
|
+
},
|
|
26522
|
+
validateStatus: function validateStatus(status) {
|
|
26523
|
+
return status >= 200 && status < 300;
|
|
26524
|
+
},
|
|
26525
|
+
headers: {
|
|
26526
|
+
common: {
|
|
26527
|
+
Accept: "application/json, text/plain, */*",
|
|
26528
|
+
"Content-Type": void 0
|
|
26529
|
+
}
|
|
25969
26530
|
}
|
|
25970
26531
|
};
|
|
25971
|
-
|
|
25972
|
-
|
|
25973
|
-
value
|
|
25974
|
-
}, key) => {
|
|
25975
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
25976
|
-
return {
|
|
25977
|
-
get: () => value,
|
|
25978
|
-
set(headerValue) {
|
|
25979
|
-
this[mapped] = headerValue;
|
|
25980
|
-
}
|
|
25981
|
-
};
|
|
26532
|
+
utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
|
|
26533
|
+
defaults.headers[method] = {};
|
|
25982
26534
|
});
|
|
25983
|
-
utils$1.freezeMethods(AxiosHeaders);
|
|
25984
26535
|
function transformData(fns, response) {
|
|
25985
26536
|
const config = this || defaults;
|
|
25986
26537
|
const context = response || config;
|
|
@@ -26016,7 +26567,7 @@ var require_axios = __commonJS({
|
|
|
26016
26567
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
26017
26568
|
resolve(response);
|
|
26018
26569
|
} else {
|
|
26019
|
-
reject(new AxiosError("Request failed with status code " + response.status,
|
|
26570
|
+
reject(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
|
|
26020
26571
|
}
|
|
26021
26572
|
}
|
|
26022
26573
|
function isAbsoluteURL(url2) {
|
|
@@ -26100,12 +26651,12 @@ var require_axios = __commonJS({
|
|
|
26100
26651
|
function getEnv(key) {
|
|
26101
26652
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
26102
26653
|
}
|
|
26103
|
-
var VERSION2 = "1.
|
|
26654
|
+
var VERSION2 = "1.17.0";
|
|
26104
26655
|
function parseProtocol(url2) {
|
|
26105
|
-
const match2 = /^([-+\w]{1,25})(
|
|
26656
|
+
const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
26106
26657
|
return match2 && match2[1] || "";
|
|
26107
26658
|
}
|
|
26108
|
-
var DATA_URL_PATTERN = /^(
|
|
26659
|
+
var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
|
|
26109
26660
|
function fromDataURI(uri, asBlob, options) {
|
|
26110
26661
|
const _Blob = options && options.Blob || platform.classes.Blob;
|
|
26111
26662
|
const protocol = parseProtocol(uri);
|
|
@@ -26118,10 +26669,17 @@ var require_axios = __commonJS({
|
|
|
26118
26669
|
if (!match2) {
|
|
26119
26670
|
throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
|
|
26120
26671
|
}
|
|
26121
|
-
const
|
|
26122
|
-
const
|
|
26123
|
-
const
|
|
26124
|
-
const
|
|
26672
|
+
const type = match2[1];
|
|
26673
|
+
const params = match2[2];
|
|
26674
|
+
const encoding = match2[3] ? "base64" : "utf8";
|
|
26675
|
+
const body = match2[4];
|
|
26676
|
+
let mime;
|
|
26677
|
+
if (type) {
|
|
26678
|
+
mime = params ? type + params : type;
|
|
26679
|
+
} else if (params) {
|
|
26680
|
+
mime = "text/plain" + params;
|
|
26681
|
+
}
|
|
26682
|
+
const buffer = Buffer.from(decodeURIComponent(body), encoding);
|
|
26125
26683
|
if (asBlob) {
|
|
26126
26684
|
if (!_Blob) {
|
|
26127
26685
|
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
@@ -26310,10 +26868,10 @@ var require_axios = __commonJS({
|
|
|
26310
26868
|
boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET)
|
|
26311
26869
|
} = options || {};
|
|
26312
26870
|
if (!utils$1.isFormData(form)) {
|
|
26313
|
-
throw TypeError("FormData instance required");
|
|
26871
|
+
throw new TypeError("FormData instance required");
|
|
26314
26872
|
}
|
|
26315
26873
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
26316
|
-
throw Error("boundary must be
|
|
26874
|
+
throw new Error("boundary must be 1-70 characters long");
|
|
26317
26875
|
}
|
|
26318
26876
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
26319
26877
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -26355,7 +26913,82 @@ var require_axios = __commonJS({
|
|
|
26355
26913
|
this.push(header, encoding);
|
|
26356
26914
|
}
|
|
26357
26915
|
}
|
|
26358
|
-
this.__transform(chunk, encoding, callback);
|
|
26916
|
+
this.__transform(chunk, encoding, callback);
|
|
26917
|
+
}
|
|
26918
|
+
};
|
|
26919
|
+
var Http2Sessions = class {
|
|
26920
|
+
constructor() {
|
|
26921
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
26922
|
+
}
|
|
26923
|
+
getSession(authority, options) {
|
|
26924
|
+
options = Object.assign({
|
|
26925
|
+
sessionTimeout: 1e3
|
|
26926
|
+
}, options);
|
|
26927
|
+
let authoritySessions = this.sessions[authority];
|
|
26928
|
+
if (authoritySessions) {
|
|
26929
|
+
let len = authoritySessions.length;
|
|
26930
|
+
for (let i = 0; i < len; i++) {
|
|
26931
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
26932
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
26933
|
+
return sessionHandle;
|
|
26934
|
+
}
|
|
26935
|
+
}
|
|
26936
|
+
}
|
|
26937
|
+
const session = http2.connect(authority, options);
|
|
26938
|
+
let removed;
|
|
26939
|
+
let timer;
|
|
26940
|
+
const removeSession = () => {
|
|
26941
|
+
if (removed) {
|
|
26942
|
+
return;
|
|
26943
|
+
}
|
|
26944
|
+
removed = true;
|
|
26945
|
+
if (timer) {
|
|
26946
|
+
clearTimeout(timer);
|
|
26947
|
+
timer = null;
|
|
26948
|
+
}
|
|
26949
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
26950
|
+
while (i--) {
|
|
26951
|
+
if (entries[i][0] === session) {
|
|
26952
|
+
if (len === 1) {
|
|
26953
|
+
delete this.sessions[authority];
|
|
26954
|
+
} else {
|
|
26955
|
+
entries.splice(i, 1);
|
|
26956
|
+
}
|
|
26957
|
+
if (!session.closed) {
|
|
26958
|
+
session.close();
|
|
26959
|
+
}
|
|
26960
|
+
return;
|
|
26961
|
+
}
|
|
26962
|
+
}
|
|
26963
|
+
};
|
|
26964
|
+
const originalRequestFn = session.request;
|
|
26965
|
+
const {
|
|
26966
|
+
sessionTimeout
|
|
26967
|
+
} = options;
|
|
26968
|
+
if (sessionTimeout != null) {
|
|
26969
|
+
let streamsCount = 0;
|
|
26970
|
+
session.request = function() {
|
|
26971
|
+
const stream2 = originalRequestFn.apply(this, arguments);
|
|
26972
|
+
streamsCount++;
|
|
26973
|
+
if (timer) {
|
|
26974
|
+
clearTimeout(timer);
|
|
26975
|
+
timer = null;
|
|
26976
|
+
}
|
|
26977
|
+
stream2.once("close", () => {
|
|
26978
|
+
if (!--streamsCount) {
|
|
26979
|
+
timer = setTimeout(() => {
|
|
26980
|
+
timer = null;
|
|
26981
|
+
removeSession();
|
|
26982
|
+
}, sessionTimeout);
|
|
26983
|
+
}
|
|
26984
|
+
});
|
|
26985
|
+
return stream2;
|
|
26986
|
+
};
|
|
26987
|
+
}
|
|
26988
|
+
session.once("close", removeSession);
|
|
26989
|
+
let entry = [session, options];
|
|
26990
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
26991
|
+
return session;
|
|
26359
26992
|
}
|
|
26360
26993
|
};
|
|
26361
26994
|
var callbackify = (fn, reducer) => {
|
|
@@ -26430,6 +27063,20 @@ var require_axios = __commonJS({
|
|
|
26430
27063
|
}
|
|
26431
27064
|
return [entryHost, entryPort];
|
|
26432
27065
|
};
|
|
27066
|
+
var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
|
|
27067
|
+
var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
|
|
27068
|
+
var unmapIPv4MappedIPv6 = (host) => {
|
|
27069
|
+
if (typeof host !== "string" || host.indexOf(":") === -1) return host;
|
|
27070
|
+
const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
|
|
27071
|
+
if (dotted) return dotted[1];
|
|
27072
|
+
const hex = host.match(IPV4_MAPPED_HEX_RE);
|
|
27073
|
+
if (hex) {
|
|
27074
|
+
const high = parseInt(hex[1], 16);
|
|
27075
|
+
const low = parseInt(hex[2], 16);
|
|
27076
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
27077
|
+
}
|
|
27078
|
+
return host;
|
|
27079
|
+
};
|
|
26433
27080
|
var normalizeNoProxyHost = (hostname) => {
|
|
26434
27081
|
if (!hostname) {
|
|
26435
27082
|
return hostname;
|
|
@@ -26437,7 +27084,7 @@ var require_axios = __commonJS({
|
|
|
26437
27084
|
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
26438
27085
|
hostname = hostname.slice(1, -1);
|
|
26439
27086
|
}
|
|
26440
|
-
return hostname.replace(/\.+$/, "");
|
|
27087
|
+
return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
|
|
26441
27088
|
};
|
|
26442
27089
|
function shouldBypassProxy(location) {
|
|
26443
27090
|
let parsed;
|
|
@@ -26545,6 +27192,9 @@ var require_axios = __commonJS({
|
|
|
26545
27192
|
let bytesNotified = 0;
|
|
26546
27193
|
const _speedometer = speedometer(50, 250);
|
|
26547
27194
|
return throttle((e) => {
|
|
27195
|
+
if (!e || typeof e.loaded !== "number") {
|
|
27196
|
+
return;
|
|
27197
|
+
}
|
|
26548
27198
|
const rawLoaded = e.loaded;
|
|
26549
27199
|
const total = e.lengthComputable ? e.total : void 0;
|
|
26550
27200
|
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
@@ -26618,10 +27268,32 @@ var require_axios = __commonJS({
|
|
|
26618
27268
|
}
|
|
26619
27269
|
}
|
|
26620
27270
|
const groups = Math.floor(effectiveLen / 4);
|
|
26621
|
-
const
|
|
26622
|
-
return
|
|
27271
|
+
const bytes2 = groups * 3 - (pad3 || 0);
|
|
27272
|
+
return bytes2 > 0 ? bytes2 : 0;
|
|
27273
|
+
}
|
|
27274
|
+
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
27275
|
+
return Buffer.byteLength(body, "utf8");
|
|
27276
|
+
}
|
|
27277
|
+
let bytes = 0;
|
|
27278
|
+
for (let i = 0, len = body.length; i < len; i++) {
|
|
27279
|
+
const c = body.charCodeAt(i);
|
|
27280
|
+
if (c < 128) {
|
|
27281
|
+
bytes += 1;
|
|
27282
|
+
} else if (c < 2048) {
|
|
27283
|
+
bytes += 2;
|
|
27284
|
+
} else if (c >= 55296 && c <= 56319 && i + 1 < len) {
|
|
27285
|
+
const next = body.charCodeAt(i + 1);
|
|
27286
|
+
if (next >= 56320 && next <= 57343) {
|
|
27287
|
+
bytes += 4;
|
|
27288
|
+
i++;
|
|
27289
|
+
} else {
|
|
27290
|
+
bytes += 3;
|
|
27291
|
+
}
|
|
27292
|
+
} else {
|
|
27293
|
+
bytes += 3;
|
|
27294
|
+
}
|
|
26623
27295
|
}
|
|
26624
|
-
return
|
|
27296
|
+
return bytes;
|
|
26625
27297
|
}
|
|
26626
27298
|
var zlibOptions = {
|
|
26627
27299
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
@@ -26631,102 +27303,92 @@ var require_axios = __commonJS({
|
|
|
26631
27303
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
26632
27304
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
26633
27305
|
};
|
|
27306
|
+
var zstdOptions = {
|
|
27307
|
+
flush: zlib.constants.ZSTD_e_flush,
|
|
27308
|
+
finishFlush: zlib.constants.ZSTD_e_flush
|
|
27309
|
+
};
|
|
26634
27310
|
var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
27311
|
+
var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
|
|
27312
|
+
var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
|
|
27313
|
+
var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
|
|
26635
27314
|
var {
|
|
26636
27315
|
http: httpFollow,
|
|
26637
27316
|
https: httpsFollow
|
|
26638
27317
|
} = followRedirects;
|
|
26639
27318
|
var isHttps = /https:?/;
|
|
27319
|
+
var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
|
|
27320
|
+
function setFormDataHeaders$1(headers, formHeaders, policy) {
|
|
27321
|
+
if (policy !== "content-only") {
|
|
27322
|
+
headers.set(formHeaders);
|
|
27323
|
+
return;
|
|
27324
|
+
}
|
|
27325
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
27326
|
+
if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
|
|
27327
|
+
headers.set(key, val);
|
|
27328
|
+
}
|
|
27329
|
+
});
|
|
27330
|
+
}
|
|
26640
27331
|
var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
|
|
26641
27332
|
var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
|
|
27333
|
+
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
27334
|
+
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
27335
|
+
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
27336
|
+
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
27337
|
+
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
27338
|
+
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
27339
|
+
let agent = cache.get(key);
|
|
27340
|
+
if (agent) return agent;
|
|
27341
|
+
const merged = userHttpsAgent && userHttpsAgent.options ? {
|
|
27342
|
+
...userHttpsAgent.options,
|
|
27343
|
+
...agentOptions
|
|
27344
|
+
} : agentOptions;
|
|
27345
|
+
agent = new HttpsProxyAgent(merged);
|
|
27346
|
+
if (userHttpsAgent && userHttpsAgent.options) {
|
|
27347
|
+
const originTLSOptions = {
|
|
27348
|
+
...userHttpsAgent.options
|
|
27349
|
+
};
|
|
27350
|
+
const callback = agent.callback;
|
|
27351
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
27352
|
+
return callback.call(this, req, {
|
|
27353
|
+
...originTLSOptions,
|
|
27354
|
+
...opts
|
|
27355
|
+
});
|
|
27356
|
+
};
|
|
27357
|
+
}
|
|
27358
|
+
agent[kAxiosInstalledTunnel] = true;
|
|
27359
|
+
cache.set(key, agent);
|
|
27360
|
+
return agent;
|
|
27361
|
+
}
|
|
26642
27362
|
var supportedProtocols = platform.protocols.map((protocol) => {
|
|
26643
27363
|
return protocol + ":";
|
|
26644
27364
|
});
|
|
27365
|
+
var decodeURIComponentSafe$1 = (value) => {
|
|
27366
|
+
if (!utils$1.isString(value)) {
|
|
27367
|
+
return value;
|
|
27368
|
+
}
|
|
27369
|
+
try {
|
|
27370
|
+
return decodeURIComponent(value);
|
|
27371
|
+
} catch (error) {
|
|
27372
|
+
return value;
|
|
27373
|
+
}
|
|
27374
|
+
};
|
|
26645
27375
|
var flushOnFinish = (stream2, [throttled, flush]) => {
|
|
26646
27376
|
stream2.on("end", flush).on("error", flush);
|
|
26647
27377
|
return throttled;
|
|
26648
27378
|
};
|
|
26649
|
-
var Http2Sessions = class {
|
|
26650
|
-
constructor() {
|
|
26651
|
-
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
26652
|
-
}
|
|
26653
|
-
getSession(authority, options) {
|
|
26654
|
-
options = Object.assign({
|
|
26655
|
-
sessionTimeout: 1e3
|
|
26656
|
-
}, options);
|
|
26657
|
-
let authoritySessions = this.sessions[authority];
|
|
26658
|
-
if (authoritySessions) {
|
|
26659
|
-
let len = authoritySessions.length;
|
|
26660
|
-
for (let i = 0; i < len; i++) {
|
|
26661
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
26662
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
26663
|
-
return sessionHandle;
|
|
26664
|
-
}
|
|
26665
|
-
}
|
|
26666
|
-
}
|
|
26667
|
-
const session = http2.connect(authority, options);
|
|
26668
|
-
let removed;
|
|
26669
|
-
const removeSession = () => {
|
|
26670
|
-
if (removed) {
|
|
26671
|
-
return;
|
|
26672
|
-
}
|
|
26673
|
-
removed = true;
|
|
26674
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
26675
|
-
while (i--) {
|
|
26676
|
-
if (entries[i][0] === session) {
|
|
26677
|
-
if (len === 1) {
|
|
26678
|
-
delete this.sessions[authority];
|
|
26679
|
-
} else {
|
|
26680
|
-
entries.splice(i, 1);
|
|
26681
|
-
}
|
|
26682
|
-
if (!session.closed) {
|
|
26683
|
-
session.close();
|
|
26684
|
-
}
|
|
26685
|
-
return;
|
|
26686
|
-
}
|
|
26687
|
-
}
|
|
26688
|
-
};
|
|
26689
|
-
const originalRequestFn = session.request;
|
|
26690
|
-
const {
|
|
26691
|
-
sessionTimeout
|
|
26692
|
-
} = options;
|
|
26693
|
-
if (sessionTimeout != null) {
|
|
26694
|
-
let timer;
|
|
26695
|
-
let streamsCount = 0;
|
|
26696
|
-
session.request = function() {
|
|
26697
|
-
const stream2 = originalRequestFn.apply(this, arguments);
|
|
26698
|
-
streamsCount++;
|
|
26699
|
-
if (timer) {
|
|
26700
|
-
clearTimeout(timer);
|
|
26701
|
-
timer = null;
|
|
26702
|
-
}
|
|
26703
|
-
stream2.once("close", () => {
|
|
26704
|
-
if (!--streamsCount) {
|
|
26705
|
-
timer = setTimeout(() => {
|
|
26706
|
-
timer = null;
|
|
26707
|
-
removeSession();
|
|
26708
|
-
}, sessionTimeout);
|
|
26709
|
-
}
|
|
26710
|
-
});
|
|
26711
|
-
return stream2;
|
|
26712
|
-
};
|
|
26713
|
-
}
|
|
26714
|
-
session.once("close", removeSession);
|
|
26715
|
-
let entry = [session, options];
|
|
26716
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
26717
|
-
return session;
|
|
26718
|
-
}
|
|
26719
|
-
};
|
|
26720
27379
|
var http2Sessions = new Http2Sessions();
|
|
26721
|
-
function dispatchBeforeRedirect(options, responseDetails) {
|
|
27380
|
+
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
26722
27381
|
if (options.beforeRedirects.proxy) {
|
|
26723
27382
|
options.beforeRedirects.proxy(options);
|
|
26724
27383
|
}
|
|
27384
|
+
if (options.beforeRedirects.auth) {
|
|
27385
|
+
options.beforeRedirects.auth(options);
|
|
27386
|
+
}
|
|
26725
27387
|
if (options.beforeRedirects.config) {
|
|
26726
|
-
options.beforeRedirects.config(options, responseDetails);
|
|
27388
|
+
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
26727
27389
|
}
|
|
26728
27390
|
}
|
|
26729
|
-
function setProxy(options, configProxy, location) {
|
|
27391
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
|
|
26730
27392
|
let proxy = configProxy;
|
|
26731
27393
|
if (!proxy && proxy !== false) {
|
|
26732
27394
|
const proxyUrl = getProxyForUrl(location);
|
|
@@ -26736,34 +27398,90 @@ var require_axios = __commonJS({
|
|
|
26736
27398
|
}
|
|
26737
27399
|
}
|
|
26738
27400
|
}
|
|
26739
|
-
if (
|
|
26740
|
-
|
|
26741
|
-
|
|
27401
|
+
if (isRedirect && options.headers) {
|
|
27402
|
+
for (const name of Object.keys(options.headers)) {
|
|
27403
|
+
if (name.toLowerCase() === "proxy-authorization") {
|
|
27404
|
+
delete options.headers[name];
|
|
27405
|
+
}
|
|
26742
27406
|
}
|
|
26743
|
-
|
|
26744
|
-
|
|
27407
|
+
}
|
|
27408
|
+
if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) {
|
|
27409
|
+
options.agent = void 0;
|
|
27410
|
+
}
|
|
27411
|
+
if (proxy) {
|
|
27412
|
+
const isProxyURL = proxy instanceof URL;
|
|
27413
|
+
const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
27414
|
+
const proxyUsername = readProxyField("username");
|
|
27415
|
+
const proxyPassword = readProxyField("password");
|
|
27416
|
+
let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
|
|
27417
|
+
if (proxyUsername) {
|
|
27418
|
+
proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
|
|
27419
|
+
}
|
|
27420
|
+
if (proxyAuth) {
|
|
27421
|
+
const authIsObject = typeof proxyAuth === "object";
|
|
27422
|
+
const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
|
|
27423
|
+
const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
|
|
27424
|
+
const validProxyAuth = Boolean(authUsername || authPassword);
|
|
26745
27425
|
if (validProxyAuth) {
|
|
26746
|
-
|
|
26747
|
-
} else if (
|
|
27426
|
+
proxyAuth = (authUsername || "") + ":" + (authPassword || "");
|
|
27427
|
+
} else if (authIsObject) {
|
|
26748
27428
|
throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
|
|
26749
27429
|
proxy
|
|
26750
27430
|
});
|
|
26751
27431
|
}
|
|
26752
|
-
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
26753
|
-
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
26754
27432
|
}
|
|
26755
|
-
|
|
26756
|
-
|
|
26757
|
-
|
|
26758
|
-
|
|
26759
|
-
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
27433
|
+
const targetIsHttps = isHttps.test(options.protocol);
|
|
27434
|
+
if (targetIsHttps) {
|
|
27435
|
+
if (!(configHttpsAgent instanceof HttpsProxyAgent)) {
|
|
27436
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
27437
|
+
const proxyPort = readProxyField("port");
|
|
27438
|
+
const rawProxyProtocol = readProxyField("protocol");
|
|
27439
|
+
const normalizedProtocol = rawProxyProtocol ? rawProxyProtocol.includes(":") ? rawProxyProtocol : `${rawProxyProtocol}:` : "http:";
|
|
27440
|
+
const proxyHostForURL = proxyHost && proxyHost.includes(":") && !proxyHost.startsWith("[") ? `[${proxyHost}]` : proxyHost;
|
|
27441
|
+
const proxyURL = new URL(`${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ":" + proxyPort : ""}`);
|
|
27442
|
+
const agentOptions = {
|
|
27443
|
+
protocol: proxyURL.protocol,
|
|
27444
|
+
hostname: proxyURL.hostname.replace(/^\[|\]$/g, ""),
|
|
27445
|
+
port: proxyURL.port,
|
|
27446
|
+
auth: proxyAuth && typeof proxyAuth === "string" ? proxyAuth : void 0
|
|
27447
|
+
};
|
|
27448
|
+
if (proxyURL.protocol === "https:") {
|
|
27449
|
+
agentOptions.ALPNProtocols = ["http/1.1"];
|
|
27450
|
+
}
|
|
27451
|
+
const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent);
|
|
27452
|
+
options.agent = tunnelingAgent;
|
|
27453
|
+
if (options.agents) {
|
|
27454
|
+
options.agents.https = tunnelingAgent;
|
|
27455
|
+
}
|
|
27456
|
+
}
|
|
27457
|
+
} else {
|
|
27458
|
+
if (proxyAuth) {
|
|
27459
|
+
const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
|
|
27460
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
27461
|
+
}
|
|
27462
|
+
let hasUserHostHeader = false;
|
|
27463
|
+
for (const name of Object.keys(options.headers)) {
|
|
27464
|
+
if (name.toLowerCase() === "host") {
|
|
27465
|
+
hasUserHostHeader = true;
|
|
27466
|
+
break;
|
|
27467
|
+
}
|
|
27468
|
+
}
|
|
27469
|
+
if (!hasUserHostHeader) {
|
|
27470
|
+
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
27471
|
+
}
|
|
27472
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
27473
|
+
options.hostname = proxyHost;
|
|
27474
|
+
options.host = proxyHost;
|
|
27475
|
+
options.port = readProxyField("port");
|
|
27476
|
+
options.path = location;
|
|
27477
|
+
const proxyProtocol = readProxyField("protocol");
|
|
27478
|
+
if (proxyProtocol) {
|
|
27479
|
+
options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
|
|
27480
|
+
}
|
|
26763
27481
|
}
|
|
26764
27482
|
}
|
|
26765
27483
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
26766
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href);
|
|
27484
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
|
|
26767
27485
|
};
|
|
26768
27486
|
}
|
|
26769
27487
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -26841,6 +27559,7 @@ var require_axios = __commonJS({
|
|
|
26841
27559
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
|
|
26842
27560
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
26843
27561
|
const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
27562
|
+
const transitional = own2("transitional") || transitionalDefaults;
|
|
26844
27563
|
let data = own2("data");
|
|
26845
27564
|
let lookup = own2("lookup");
|
|
26846
27565
|
let family = own2("family");
|
|
@@ -26853,6 +27572,7 @@ var require_axios = __commonJS({
|
|
|
26853
27572
|
let isDone;
|
|
26854
27573
|
let rejected = false;
|
|
26855
27574
|
let req;
|
|
27575
|
+
let connectPhaseTimer;
|
|
26856
27576
|
httpVersion = +httpVersion;
|
|
26857
27577
|
if (Number.isNaN(httpVersion)) {
|
|
26858
27578
|
throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
|
|
@@ -26878,11 +27598,24 @@ var require_axios = __commonJS({
|
|
|
26878
27598
|
try {
|
|
26879
27599
|
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
26880
27600
|
} catch (err) {
|
|
26881
|
-
console.warn("emit error", err);
|
|
26882
27601
|
}
|
|
26883
27602
|
}
|
|
27603
|
+
function clearConnectPhaseTimer() {
|
|
27604
|
+
if (connectPhaseTimer) {
|
|
27605
|
+
clearTimeout(connectPhaseTimer);
|
|
27606
|
+
connectPhaseTimer = null;
|
|
27607
|
+
}
|
|
27608
|
+
}
|
|
27609
|
+
function createTimeoutError() {
|
|
27610
|
+
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
27611
|
+
if (config.timeoutErrorMessage) {
|
|
27612
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
27613
|
+
}
|
|
27614
|
+
return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
|
|
27615
|
+
}
|
|
26884
27616
|
abortEmitter.once("abort", reject);
|
|
26885
27617
|
const onFinished = () => {
|
|
27618
|
+
clearConnectPhaseTimer();
|
|
26886
27619
|
if (config.cancelToken) {
|
|
26887
27620
|
config.cancelToken.unsubscribe(abort);
|
|
26888
27621
|
}
|
|
@@ -26899,6 +27632,7 @@ var require_axios = __commonJS({
|
|
|
26899
27632
|
}
|
|
26900
27633
|
onDone((response, isRejected) => {
|
|
26901
27634
|
isDone = true;
|
|
27635
|
+
clearConnectPhaseTimer();
|
|
26902
27636
|
if (isRejected) {
|
|
26903
27637
|
rejected = true;
|
|
26904
27638
|
onFinished();
|
|
@@ -26980,7 +27714,7 @@ var require_axios = __commonJS({
|
|
|
26980
27714
|
boundary: userBoundary && userBoundary[1] || void 0
|
|
26981
27715
|
});
|
|
26982
27716
|
} else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
|
|
26983
|
-
headers
|
|
27717
|
+
setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
26984
27718
|
if (!headers.hasContentLength()) {
|
|
26985
27719
|
try {
|
|
26986
27720
|
const knownLength = await util.promisify(data.getLength).call(data);
|
|
@@ -27031,9 +27765,9 @@ var require_axios = __commonJS({
|
|
|
27031
27765
|
const password = configAuth.password || "";
|
|
27032
27766
|
auth = username + ":" + password;
|
|
27033
27767
|
}
|
|
27034
|
-
if (!auth && parsed.username) {
|
|
27035
|
-
const urlUsername = parsed.username;
|
|
27036
|
-
const urlPassword = parsed.password;
|
|
27768
|
+
if (!auth && (parsed.username || parsed.password)) {
|
|
27769
|
+
const urlUsername = decodeURIComponentSafe$1(parsed.username);
|
|
27770
|
+
const urlPassword = decodeURIComponentSafe$1(parsed.password);
|
|
27037
27771
|
auth = urlUsername + ":" + urlPassword;
|
|
27038
27772
|
}
|
|
27039
27773
|
auth && headers.delete("authorization");
|
|
@@ -27047,11 +27781,11 @@ var require_axios = __commonJS({
|
|
|
27047
27781
|
customErr.exists = true;
|
|
27048
27782
|
return reject(customErr);
|
|
27049
27783
|
}
|
|
27050
|
-
headers.set("Accept-Encoding",
|
|
27784
|
+
headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
27051
27785
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
27052
27786
|
path: path$1,
|
|
27053
27787
|
method,
|
|
27054
|
-
headers: headers
|
|
27788
|
+
headers: toByteStringHeaderObject(headers),
|
|
27055
27789
|
agents: {
|
|
27056
27790
|
http: config.httpAgent,
|
|
27057
27791
|
https: config.httpsAgent
|
|
@@ -27064,27 +27798,32 @@ var require_axios = __commonJS({
|
|
|
27064
27798
|
http2Options
|
|
27065
27799
|
});
|
|
27066
27800
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
27067
|
-
|
|
27068
|
-
|
|
27801
|
+
const socketPath = own2("socketPath");
|
|
27802
|
+
if (socketPath) {
|
|
27803
|
+
if (typeof socketPath !== "string") {
|
|
27069
27804
|
return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
27070
27805
|
}
|
|
27071
|
-
|
|
27072
|
-
|
|
27073
|
-
const
|
|
27806
|
+
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
27807
|
+
if (allowedSocketPaths != null) {
|
|
27808
|
+
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
27809
|
+
const resolvedSocket = path.resolve(socketPath);
|
|
27074
27810
|
const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
|
|
27075
27811
|
if (!isAllowed) {
|
|
27076
|
-
return reject(new AxiosError(`socketPath "${
|
|
27812
|
+
return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
27077
27813
|
}
|
|
27078
27814
|
}
|
|
27079
|
-
options.socketPath =
|
|
27815
|
+
options.socketPath = socketPath;
|
|
27080
27816
|
} else {
|
|
27081
27817
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
27082
27818
|
options.port = parsed.port;
|
|
27083
|
-
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
|
|
27819
|
+
setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, config.httpsAgent);
|
|
27084
27820
|
}
|
|
27085
27821
|
let transport;
|
|
27822
|
+
let isNativeTransport = false;
|
|
27086
27823
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
27087
|
-
options.agent
|
|
27824
|
+
if (options.agent == null) {
|
|
27825
|
+
options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
|
27826
|
+
}
|
|
27088
27827
|
if (isHttp2) {
|
|
27089
27828
|
transport = http2Transport;
|
|
27090
27829
|
} else {
|
|
@@ -27093,6 +27832,7 @@ var require_axios = __commonJS({
|
|
|
27093
27832
|
transport = configTransport;
|
|
27094
27833
|
} else if (config.maxRedirects === 0) {
|
|
27095
27834
|
transport = isHttpsRequest ? https : http;
|
|
27835
|
+
isNativeTransport = true;
|
|
27096
27836
|
} else {
|
|
27097
27837
|
if (config.maxRedirects) {
|
|
27098
27838
|
options.maxRedirects = config.maxRedirects;
|
|
@@ -27101,6 +27841,18 @@ var require_axios = __commonJS({
|
|
|
27101
27841
|
if (configBeforeRedirect) {
|
|
27102
27842
|
options.beforeRedirects.config = configBeforeRedirect;
|
|
27103
27843
|
}
|
|
27844
|
+
if (auth) {
|
|
27845
|
+
const requestOrigin = parsed.origin;
|
|
27846
|
+
const authToRestore = auth;
|
|
27847
|
+
options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
|
|
27848
|
+
try {
|
|
27849
|
+
if (new URL(redirectOptions.href).origin === requestOrigin) {
|
|
27850
|
+
redirectOptions.auth = authToRestore;
|
|
27851
|
+
}
|
|
27852
|
+
} catch (e) {
|
|
27853
|
+
}
|
|
27854
|
+
};
|
|
27855
|
+
}
|
|
27104
27856
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
27105
27857
|
}
|
|
27106
27858
|
}
|
|
@@ -27111,6 +27863,7 @@ var require_axios = __commonJS({
|
|
|
27111
27863
|
}
|
|
27112
27864
|
options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
|
|
27113
27865
|
req = transport.request(options, function handleResponse(res) {
|
|
27866
|
+
clearConnectPhaseTimer();
|
|
27114
27867
|
if (req.destroyed) return;
|
|
27115
27868
|
const streams = [res];
|
|
27116
27869
|
const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
|
|
@@ -27146,6 +27899,13 @@ var require_axios = __commonJS({
|
|
|
27146
27899
|
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
27147
27900
|
delete res.headers["content-encoding"];
|
|
27148
27901
|
}
|
|
27902
|
+
break;
|
|
27903
|
+
case "zstd":
|
|
27904
|
+
if (isZstdSupported) {
|
|
27905
|
+
streams.push(zlib.createZstdDecompress(zstdOptions));
|
|
27906
|
+
delete res.headers["content-encoding"];
|
|
27907
|
+
}
|
|
27908
|
+
break;
|
|
27149
27909
|
}
|
|
27150
27910
|
}
|
|
27151
27911
|
responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
|
|
@@ -27192,13 +27952,13 @@ var require_axios = __commonJS({
|
|
|
27192
27952
|
if (rejected) {
|
|
27193
27953
|
return;
|
|
27194
27954
|
}
|
|
27195
|
-
const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
27955
|
+
const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
|
|
27196
27956
|
responseStream.destroy(err);
|
|
27197
27957
|
reject(err);
|
|
27198
27958
|
});
|
|
27199
27959
|
responseStream.on("error", function handleStreamError(err) {
|
|
27200
|
-
if (
|
|
27201
|
-
reject(AxiosError.from(err, null, config, lastRequest));
|
|
27960
|
+
if (rejected) return;
|
|
27961
|
+
reject(AxiosError.from(err, null, config, lastRequest, response));
|
|
27202
27962
|
});
|
|
27203
27963
|
responseStream.on("end", function handleStreamEnd() {
|
|
27204
27964
|
try {
|
|
@@ -27233,6 +27993,7 @@ var require_axios = __commonJS({
|
|
|
27233
27993
|
req.on("error", function handleRequestError(err) {
|
|
27234
27994
|
reject(AxiosError.from(err, null, config, req));
|
|
27235
27995
|
});
|
|
27996
|
+
const boundSockets = /* @__PURE__ */ new Set();
|
|
27236
27997
|
req.on("socket", function handleRequestSocket(socket) {
|
|
27237
27998
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
27238
27999
|
if (!socket[kAxiosSocketListener]) {
|
|
@@ -27245,11 +28006,16 @@ var require_axios = __commonJS({
|
|
|
27245
28006
|
socket[kAxiosSocketListener] = true;
|
|
27246
28007
|
}
|
|
27247
28008
|
socket[kAxiosCurrentReq] = req;
|
|
27248
|
-
|
|
28009
|
+
boundSockets.add(socket);
|
|
28010
|
+
});
|
|
28011
|
+
req.once("close", function clearCurrentReq() {
|
|
28012
|
+
clearConnectPhaseTimer();
|
|
28013
|
+
for (const socket of boundSockets) {
|
|
27249
28014
|
if (socket[kAxiosCurrentReq] === req) {
|
|
27250
28015
|
socket[kAxiosCurrentReq] = null;
|
|
27251
28016
|
}
|
|
27252
|
-
}
|
|
28017
|
+
}
|
|
28018
|
+
boundSockets.clear();
|
|
27253
28019
|
});
|
|
27254
28020
|
if (config.timeout) {
|
|
27255
28021
|
const timeout = parseInt(config.timeout, 10);
|
|
@@ -27257,15 +28023,14 @@ var require_axios = __commonJS({
|
|
|
27257
28023
|
abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
27258
28024
|
return;
|
|
27259
28025
|
}
|
|
27260
|
-
|
|
28026
|
+
const handleTimeout = function handleTimeout2() {
|
|
27261
28027
|
if (isDone) return;
|
|
27262
|
-
|
|
27263
|
-
|
|
27264
|
-
|
|
27265
|
-
|
|
27266
|
-
|
|
27267
|
-
|
|
27268
|
-
});
|
|
28028
|
+
abort(createTimeoutError());
|
|
28029
|
+
};
|
|
28030
|
+
if (isNativeTransport && timeout > 0) {
|
|
28031
|
+
connectPhaseTimer = setTimeout(handleTimeout, timeout);
|
|
28032
|
+
}
|
|
28033
|
+
req.setTimeout(timeout, handleTimeout);
|
|
27269
28034
|
} else {
|
|
27270
28035
|
req.setTimeout(0);
|
|
27271
28036
|
}
|
|
@@ -27337,8 +28102,15 @@ var require_axios = __commonJS({
|
|
|
27337
28102
|
},
|
|
27338
28103
|
read(name) {
|
|
27339
28104
|
if (typeof document === "undefined") return null;
|
|
27340
|
-
const
|
|
27341
|
-
|
|
28105
|
+
const cookies2 = document.cookie.split(";");
|
|
28106
|
+
for (let i = 0; i < cookies2.length; i++) {
|
|
28107
|
+
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
28108
|
+
const eq = cookie.indexOf("=");
|
|
28109
|
+
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
28110
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
28111
|
+
}
|
|
28112
|
+
}
|
|
28113
|
+
return null;
|
|
27342
28114
|
},
|
|
27343
28115
|
remove(name) {
|
|
27344
28116
|
this.write(name, "", Date.now() - 864e5, "/");
|
|
@@ -27363,6 +28135,9 @@ var require_axios = __commonJS({
|
|
|
27363
28135
|
config2 = config2 || {};
|
|
27364
28136
|
const config = /* @__PURE__ */ Object.create(null);
|
|
27365
28137
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
28138
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
28139
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
28140
|
+
__proto__: null,
|
|
27366
28141
|
value: Object.prototype.hasOwnProperty,
|
|
27367
28142
|
enumerable: false,
|
|
27368
28143
|
writable: true,
|
|
@@ -27451,7 +28226,20 @@ var require_axios = __commonJS({
|
|
|
27451
28226
|
});
|
|
27452
28227
|
return config;
|
|
27453
28228
|
}
|
|
27454
|
-
var
|
|
28229
|
+
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
28230
|
+
function setFormDataHeaders(headers, formHeaders, policy) {
|
|
28231
|
+
if (policy !== "content-only") {
|
|
28232
|
+
headers.set(formHeaders);
|
|
28233
|
+
return;
|
|
28234
|
+
}
|
|
28235
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
28236
|
+
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
28237
|
+
headers.set(key, val);
|
|
28238
|
+
}
|
|
28239
|
+
});
|
|
28240
|
+
}
|
|
28241
|
+
var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
28242
|
+
function resolveConfig(config) {
|
|
27455
28243
|
const newConfig = mergeConfig({}, config);
|
|
27456
28244
|
const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
27457
28245
|
const data = own2("data");
|
|
@@ -27464,21 +28252,15 @@ var require_axios = __commonJS({
|
|
|
27464
28252
|
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
27465
28253
|
const url2 = own2("url");
|
|
27466
28254
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
27467
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
28255
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), own2("params"), own2("paramsSerializer"));
|
|
27468
28256
|
if (auth) {
|
|
27469
|
-
headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ?
|
|
28257
|
+
headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : "")));
|
|
27470
28258
|
}
|
|
27471
28259
|
if (utils$1.isFormData(data)) {
|
|
27472
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
28260
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
27473
28261
|
headers.setContentType(void 0);
|
|
27474
28262
|
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
27475
|
-
|
|
27476
|
-
const allowedHeaders = ["content-type", "content-length"];
|
|
27477
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
27478
|
-
if (allowedHeaders.includes(key.toLowerCase())) {
|
|
27479
|
-
headers.set(key, val);
|
|
27480
|
-
}
|
|
27481
|
-
});
|
|
28263
|
+
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
27482
28264
|
}
|
|
27483
28265
|
}
|
|
27484
28266
|
if (platform.hasStandardBrowserEnv) {
|
|
@@ -27494,7 +28276,7 @@ var require_axios = __commonJS({
|
|
|
27494
28276
|
}
|
|
27495
28277
|
}
|
|
27496
28278
|
return newConfig;
|
|
27497
|
-
}
|
|
28279
|
+
}
|
|
27498
28280
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
27499
28281
|
var xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
27500
28282
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -27548,7 +28330,7 @@ var require_axios = __commonJS({
|
|
|
27548
28330
|
if (!request || request.readyState !== 4) {
|
|
27549
28331
|
return;
|
|
27550
28332
|
}
|
|
27551
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.
|
|
28333
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
|
|
27552
28334
|
return;
|
|
27553
28335
|
}
|
|
27554
28336
|
setTimeout(onloadend);
|
|
@@ -27559,6 +28341,7 @@ var require_axios = __commonJS({
|
|
|
27559
28341
|
return;
|
|
27560
28342
|
}
|
|
27561
28343
|
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
28344
|
+
done();
|
|
27562
28345
|
request = null;
|
|
27563
28346
|
};
|
|
27564
28347
|
request.onerror = function handleError(event) {
|
|
@@ -27566,6 +28349,7 @@ var require_axios = __commonJS({
|
|
|
27566
28349
|
const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
27567
28350
|
err.event = event || null;
|
|
27568
28351
|
reject(err);
|
|
28352
|
+
done();
|
|
27569
28353
|
request = null;
|
|
27570
28354
|
};
|
|
27571
28355
|
request.ontimeout = function handleTimeout() {
|
|
@@ -27575,11 +28359,12 @@ var require_axios = __commonJS({
|
|
|
27575
28359
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
27576
28360
|
}
|
|
27577
28361
|
reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
28362
|
+
done();
|
|
27578
28363
|
request = null;
|
|
27579
28364
|
};
|
|
27580
28365
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
27581
28366
|
if ("setRequestHeader" in request) {
|
|
27582
|
-
utils$1.forEach(requestHeaders
|
|
28367
|
+
utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
27583
28368
|
request.setRequestHeader(key, val);
|
|
27584
28369
|
});
|
|
27585
28370
|
}
|
|
@@ -27605,6 +28390,7 @@ var require_axios = __commonJS({
|
|
|
27605
28390
|
}
|
|
27606
28391
|
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
27607
28392
|
request.abort();
|
|
28393
|
+
done();
|
|
27608
28394
|
request = null;
|
|
27609
28395
|
};
|
|
27610
28396
|
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
@@ -27613,7 +28399,7 @@ var require_axios = __commonJS({
|
|
|
27613
28399
|
}
|
|
27614
28400
|
}
|
|
27615
28401
|
const protocol = parseProtocol(_config.url);
|
|
27616
|
-
if (protocol && platform.protocols.
|
|
28402
|
+
if (protocol && !platform.protocols.includes(protocol)) {
|
|
27617
28403
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
27618
28404
|
return;
|
|
27619
28405
|
}
|
|
@@ -27621,41 +28407,41 @@ var require_axios = __commonJS({
|
|
|
27621
28407
|
});
|
|
27622
28408
|
};
|
|
27623
28409
|
var composeSignals = (signals, timeout) => {
|
|
27624
|
-
|
|
27625
|
-
|
|
27626
|
-
|
|
27627
|
-
if (timeout || length) {
|
|
27628
|
-
let controller = new AbortController();
|
|
27629
|
-
let aborted;
|
|
27630
|
-
const onabort = function(reason) {
|
|
27631
|
-
if (!aborted) {
|
|
27632
|
-
aborted = true;
|
|
27633
|
-
unsubscribe();
|
|
27634
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
27635
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
27636
|
-
}
|
|
27637
|
-
};
|
|
27638
|
-
let timer = timeout && setTimeout(() => {
|
|
27639
|
-
timer = null;
|
|
27640
|
-
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
27641
|
-
}, timeout);
|
|
27642
|
-
const unsubscribe = () => {
|
|
27643
|
-
if (signals) {
|
|
27644
|
-
timer && clearTimeout(timer);
|
|
27645
|
-
timer = null;
|
|
27646
|
-
signals.forEach((signal2) => {
|
|
27647
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
27648
|
-
});
|
|
27649
|
-
signals = null;
|
|
27650
|
-
}
|
|
27651
|
-
};
|
|
27652
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
27653
|
-
const {
|
|
27654
|
-
signal
|
|
27655
|
-
} = controller;
|
|
27656
|
-
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
27657
|
-
return signal;
|
|
28410
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
28411
|
+
if (!timeout && !signals.length) {
|
|
28412
|
+
return;
|
|
27658
28413
|
}
|
|
28414
|
+
const controller = new AbortController();
|
|
28415
|
+
let aborted = false;
|
|
28416
|
+
const onabort = function(reason) {
|
|
28417
|
+
if (!aborted) {
|
|
28418
|
+
aborted = true;
|
|
28419
|
+
unsubscribe();
|
|
28420
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
28421
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
28422
|
+
}
|
|
28423
|
+
};
|
|
28424
|
+
let timer = timeout && setTimeout(() => {
|
|
28425
|
+
timer = null;
|
|
28426
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
28427
|
+
}, timeout);
|
|
28428
|
+
const unsubscribe = () => {
|
|
28429
|
+
if (!signals) {
|
|
28430
|
+
return;
|
|
28431
|
+
}
|
|
28432
|
+
timer && clearTimeout(timer);
|
|
28433
|
+
timer = null;
|
|
28434
|
+
signals.forEach((signal2) => {
|
|
28435
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
28436
|
+
});
|
|
28437
|
+
signals = null;
|
|
28438
|
+
};
|
|
28439
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
28440
|
+
const {
|
|
28441
|
+
signal
|
|
28442
|
+
} = controller;
|
|
28443
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
28444
|
+
return signal;
|
|
27659
28445
|
};
|
|
27660
28446
|
var streamChunk = function* (chunk, chunkSize) {
|
|
27661
28447
|
let len = chunk.byteLength;
|
|
@@ -27742,17 +28528,17 @@ var require_axios = __commonJS({
|
|
|
27742
28528
|
var {
|
|
27743
28529
|
isFunction
|
|
27744
28530
|
} = utils$1;
|
|
27745
|
-
var
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27754
|
-
|
|
27755
|
-
}
|
|
28531
|
+
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
28532
|
+
var decodeURIComponentSafe = (value) => {
|
|
28533
|
+
if (!utils$1.isString(value)) {
|
|
28534
|
+
return value;
|
|
28535
|
+
}
|
|
28536
|
+
try {
|
|
28537
|
+
return decodeURIComponent(value);
|
|
28538
|
+
} catch (error) {
|
|
28539
|
+
return value;
|
|
28540
|
+
}
|
|
28541
|
+
};
|
|
27756
28542
|
var test = (fn, ...args) => {
|
|
27757
28543
|
try {
|
|
27758
28544
|
return !!fn(...args);
|
|
@@ -27760,10 +28546,26 @@ var require_axios = __commonJS({
|
|
|
27760
28546
|
return false;
|
|
27761
28547
|
}
|
|
27762
28548
|
};
|
|
28549
|
+
var maybeWithAuthCredentials = (url2) => {
|
|
28550
|
+
const protocolIndex = url2.indexOf("://");
|
|
28551
|
+
let urlToCheck = url2;
|
|
28552
|
+
if (protocolIndex !== -1) {
|
|
28553
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
28554
|
+
}
|
|
28555
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
28556
|
+
};
|
|
27763
28557
|
var factory = (env) => {
|
|
28558
|
+
const globalObject2 = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
|
|
28559
|
+
const {
|
|
28560
|
+
ReadableStream: ReadableStream2,
|
|
28561
|
+
TextEncoder: TextEncoder2
|
|
28562
|
+
} = globalObject2;
|
|
27764
28563
|
env = utils$1.merge.call({
|
|
27765
28564
|
skipUndefined: true
|
|
27766
|
-
},
|
|
28565
|
+
}, {
|
|
28566
|
+
Request: globalObject2.Request,
|
|
28567
|
+
Response: globalObject2.Response
|
|
28568
|
+
}, env);
|
|
27767
28569
|
const {
|
|
27768
28570
|
fetch: envFetch,
|
|
27769
28571
|
Request,
|
|
@@ -27775,12 +28577,12 @@ var require_axios = __commonJS({
|
|
|
27775
28577
|
if (!isFetchSupported) {
|
|
27776
28578
|
return false;
|
|
27777
28579
|
}
|
|
27778
|
-
const isReadableStreamSupported = isFetchSupported && isFunction(
|
|
27779
|
-
const encodeText = isFetchSupported && (typeof
|
|
28580
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
|
|
28581
|
+
const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
27780
28582
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
27781
28583
|
let duplexAccessed = false;
|
|
27782
28584
|
const request = new Request(platform.origin, {
|
|
27783
|
-
body: new
|
|
28585
|
+
body: new ReadableStream2(),
|
|
27784
28586
|
method: "POST",
|
|
27785
28587
|
get duplex() {
|
|
27786
28588
|
duplexAccessed = true;
|
|
@@ -27849,8 +28651,13 @@ var require_axios = __commonJS({
|
|
|
27849
28651
|
responseType,
|
|
27850
28652
|
headers,
|
|
27851
28653
|
withCredentials = "same-origin",
|
|
27852
|
-
fetchOptions
|
|
28654
|
+
fetchOptions,
|
|
28655
|
+
maxContentLength,
|
|
28656
|
+
maxBodyLength
|
|
27853
28657
|
} = resolveConfig(config);
|
|
28658
|
+
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
28659
|
+
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
28660
|
+
const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
27854
28661
|
let _fetch = envFetch || fetch;
|
|
27855
28662
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
27856
28663
|
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -27860,6 +28667,48 @@ var require_axios = __commonJS({
|
|
|
27860
28667
|
});
|
|
27861
28668
|
let requestContentLength;
|
|
27862
28669
|
try {
|
|
28670
|
+
let auth = void 0;
|
|
28671
|
+
const configAuth = own2("auth");
|
|
28672
|
+
if (configAuth) {
|
|
28673
|
+
const username = configAuth.username || "";
|
|
28674
|
+
const password = configAuth.password || "";
|
|
28675
|
+
auth = {
|
|
28676
|
+
username,
|
|
28677
|
+
password
|
|
28678
|
+
};
|
|
28679
|
+
}
|
|
28680
|
+
if (maybeWithAuthCredentials(url2)) {
|
|
28681
|
+
const parsedURL = new URL(url2, platform.origin);
|
|
28682
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
28683
|
+
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
28684
|
+
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
28685
|
+
auth = {
|
|
28686
|
+
username: urlUsername,
|
|
28687
|
+
password: urlPassword
|
|
28688
|
+
};
|
|
28689
|
+
}
|
|
28690
|
+
if (parsedURL.username || parsedURL.password) {
|
|
28691
|
+
parsedURL.username = "";
|
|
28692
|
+
parsedURL.password = "";
|
|
28693
|
+
url2 = parsedURL.href;
|
|
28694
|
+
}
|
|
28695
|
+
}
|
|
28696
|
+
if (auth) {
|
|
28697
|
+
headers.delete("authorization");
|
|
28698
|
+
headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || ""))));
|
|
28699
|
+
}
|
|
28700
|
+
if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
|
|
28701
|
+
const estimated = estimateDataURLDecodedBytes(url2);
|
|
28702
|
+
if (estimated > maxContentLength) {
|
|
28703
|
+
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
28704
|
+
}
|
|
28705
|
+
}
|
|
28706
|
+
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
28707
|
+
const outboundLength = await resolveBodyLength(headers, data);
|
|
28708
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
|
|
28709
|
+
throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
28710
|
+
}
|
|
28711
|
+
}
|
|
27863
28712
|
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
27864
28713
|
let _request = new Request(url2, {
|
|
27865
28714
|
method: "POST",
|
|
@@ -27885,32 +28734,64 @@ var require_axios = __commonJS({
|
|
|
27885
28734
|
headers.delete("content-type");
|
|
27886
28735
|
}
|
|
27887
28736
|
}
|
|
28737
|
+
headers.set("User-Agent", "axios/" + VERSION2, false);
|
|
27888
28738
|
const resolvedOptions = {
|
|
27889
28739
|
...fetchOptions,
|
|
27890
28740
|
signal: composedSignal,
|
|
27891
28741
|
method: method.toUpperCase(),
|
|
27892
|
-
headers: headers.normalize()
|
|
28742
|
+
headers: toByteStringHeaderObject(headers.normalize()),
|
|
27893
28743
|
body: data,
|
|
27894
28744
|
duplex: "half",
|
|
27895
28745
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
27896
28746
|
};
|
|
27897
28747
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
27898
28748
|
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
|
|
28749
|
+
if (hasMaxContentLength) {
|
|
28750
|
+
const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
28751
|
+
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
28752
|
+
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
28753
|
+
}
|
|
28754
|
+
}
|
|
27899
28755
|
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
27900
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
28756
|
+
if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
|
|
27901
28757
|
const options = {};
|
|
27902
28758
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
27903
28759
|
options[prop] = response[prop];
|
|
27904
28760
|
});
|
|
27905
28761
|
const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
|
|
27906
28762
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
27907
|
-
|
|
28763
|
+
let bytesRead = 0;
|
|
28764
|
+
const onChunkProgress = (loadedBytes) => {
|
|
28765
|
+
if (hasMaxContentLength) {
|
|
28766
|
+
bytesRead = loadedBytes;
|
|
28767
|
+
if (bytesRead > maxContentLength) {
|
|
28768
|
+
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
28769
|
+
}
|
|
28770
|
+
}
|
|
28771
|
+
onProgress && onProgress(loadedBytes);
|
|
28772
|
+
};
|
|
28773
|
+
response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
27908
28774
|
flush && flush();
|
|
27909
28775
|
unsubscribe && unsubscribe();
|
|
27910
28776
|
}), options);
|
|
27911
28777
|
}
|
|
27912
28778
|
responseType = responseType || "text";
|
|
27913
28779
|
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
|
|
28780
|
+
if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
|
|
28781
|
+
let materializedSize;
|
|
28782
|
+
if (responseData != null) {
|
|
28783
|
+
if (typeof responseData.byteLength === "number") {
|
|
28784
|
+
materializedSize = responseData.byteLength;
|
|
28785
|
+
} else if (typeof responseData.size === "number") {
|
|
28786
|
+
materializedSize = responseData.size;
|
|
28787
|
+
} else if (typeof responseData === "string") {
|
|
28788
|
+
materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
|
|
28789
|
+
}
|
|
28790
|
+
}
|
|
28791
|
+
if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
|
|
28792
|
+
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
28793
|
+
}
|
|
28794
|
+
}
|
|
27914
28795
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
27915
28796
|
return await new Promise((resolve, reject) => {
|
|
27916
28797
|
settle(resolve, reject, {
|
|
@@ -27924,6 +28805,13 @@ var require_axios = __commonJS({
|
|
|
27924
28805
|
});
|
|
27925
28806
|
} catch (err) {
|
|
27926
28807
|
unsubscribe && unsubscribe();
|
|
28808
|
+
if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
|
|
28809
|
+
const canceledError = composedSignal.reason;
|
|
28810
|
+
canceledError.config = config;
|
|
28811
|
+
request && (canceledError.request = request);
|
|
28812
|
+
err !== canceledError && (canceledError.cause = err);
|
|
28813
|
+
throw canceledError;
|
|
28814
|
+
}
|
|
27927
28815
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
27928
28816
|
throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
|
|
27929
28817
|
cause: err.cause || err
|
|
@@ -27963,11 +28851,13 @@ var require_axios = __commonJS({
|
|
|
27963
28851
|
if (fn) {
|
|
27964
28852
|
try {
|
|
27965
28853
|
Object.defineProperty(fn, "name", {
|
|
28854
|
+
__proto__: null,
|
|
27966
28855
|
value
|
|
27967
28856
|
});
|
|
27968
28857
|
} catch (e) {
|
|
27969
28858
|
}
|
|
27970
28859
|
Object.defineProperty(fn, "adapterName", {
|
|
28860
|
+
__proto__: null,
|
|
27971
28861
|
value
|
|
27972
28862
|
});
|
|
27973
28863
|
}
|
|
@@ -28034,14 +28924,24 @@ var require_axios = __commonJS({
|
|
|
28034
28924
|
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
28035
28925
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
28036
28926
|
throwIfCancellationRequested(config);
|
|
28037
|
-
response
|
|
28927
|
+
config.response = response;
|
|
28928
|
+
try {
|
|
28929
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
28930
|
+
} finally {
|
|
28931
|
+
delete config.response;
|
|
28932
|
+
}
|
|
28038
28933
|
response.headers = AxiosHeaders.from(response.headers);
|
|
28039
28934
|
return response;
|
|
28040
28935
|
}, function onAdapterRejection(reason) {
|
|
28041
28936
|
if (!isCancel(reason)) {
|
|
28042
28937
|
throwIfCancellationRequested(config);
|
|
28043
28938
|
if (reason && reason.response) {
|
|
28044
|
-
|
|
28939
|
+
config.response = reason.response;
|
|
28940
|
+
try {
|
|
28941
|
+
reason.response.data = transformData.call(config, config.transformResponse, reason.response);
|
|
28942
|
+
} finally {
|
|
28943
|
+
delete config.response;
|
|
28944
|
+
}
|
|
28045
28945
|
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
28046
28946
|
}
|
|
28047
28947
|
}
|
|
@@ -28168,7 +29068,8 @@ var require_axios = __commonJS({
|
|
|
28168
29068
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
28169
29069
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
28170
29070
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
28171
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
29071
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
29072
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
|
|
28172
29073
|
}, false);
|
|
28173
29074
|
}
|
|
28174
29075
|
if (paramsSerializer != null) {
|
|
@@ -28195,7 +29096,7 @@ var require_axios = __commonJS({
|
|
|
28195
29096
|
}, true);
|
|
28196
29097
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
28197
29098
|
let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
|
|
28198
|
-
headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
|
|
29099
|
+
headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
|
|
28199
29100
|
delete headers[method];
|
|
28200
29101
|
});
|
|
28201
29102
|
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
@@ -28271,7 +29172,7 @@ var require_axios = __commonJS({
|
|
|
28271
29172
|
}));
|
|
28272
29173
|
};
|
|
28273
29174
|
});
|
|
28274
|
-
utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
29175
|
+
utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
|
|
28275
29176
|
function generateHTTPMethod(isForm) {
|
|
28276
29177
|
return function httpMethod(url2, data, config) {
|
|
28277
29178
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -28285,7 +29186,9 @@ var require_axios = __commonJS({
|
|
|
28285
29186
|
};
|
|
28286
29187
|
}
|
|
28287
29188
|
Axios.prototype[method] = generateHTTPMethod();
|
|
28288
|
-
|
|
29189
|
+
if (method !== "query") {
|
|
29190
|
+
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
29191
|
+
}
|
|
28289
29192
|
});
|
|
28290
29193
|
var CancelToken = class _CancelToken {
|
|
28291
29194
|
constructor(executor) {
|
|
@@ -28510,8 +29413,17 @@ var require_url = __commonJS({
|
|
|
28510
29413
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
28511
29414
|
};
|
|
28512
29415
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29416
|
+
exports.isValidUrl = isValidUrl;
|
|
28513
29417
|
exports.checkUrlExists = checkUrlExists;
|
|
28514
29418
|
var axios_1 = __importDefault(require_axios());
|
|
29419
|
+
function isValidUrl(url) {
|
|
29420
|
+
try {
|
|
29421
|
+
new URL(url);
|
|
29422
|
+
return true;
|
|
29423
|
+
} catch {
|
|
29424
|
+
return false;
|
|
29425
|
+
}
|
|
29426
|
+
}
|
|
28515
29427
|
async function checkUrlExists(url) {
|
|
28516
29428
|
return axios_1.default.request({ url, method: "HEAD" }).then((response) => response.status);
|
|
28517
29429
|
}
|
|
@@ -28519,7 +29431,7 @@ var require_url = __commonJS({
|
|
|
28519
29431
|
});
|
|
28520
29432
|
|
|
28521
29433
|
// node_modules/@sap-cloud-sdk/util/dist/index.js
|
|
28522
|
-
var
|
|
29434
|
+
var require_dist2 = __commonJS({
|
|
28523
29435
|
"node_modules/@sap-cloud-sdk/util/dist/index.js"(exports) {
|
|
28524
29436
|
"use strict";
|
|
28525
29437
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -28601,6 +29513,36 @@ function validateModelParamsWithWarnings(params, warnings) {
|
|
|
28601
29513
|
}
|
|
28602
29514
|
}
|
|
28603
29515
|
var sapAIApiTypeSchema = z.enum(["orchestration", "foundation-models"]);
|
|
29516
|
+
var cacheControlSchema = z.object({
|
|
29517
|
+
ttl: z.enum(["5m", "1h"]).optional(),
|
|
29518
|
+
type: z.literal("ephemeral")
|
|
29519
|
+
});
|
|
29520
|
+
var sapAIPartProviderOptionsSchema = z.object({
|
|
29521
|
+
cacheControl: cacheControlSchema.optional()
|
|
29522
|
+
});
|
|
29523
|
+
function parseSAPPartProviderOptions(providerOptions, warnings) {
|
|
29524
|
+
if (!providerOptions || typeof providerOptions !== "object") {
|
|
29525
|
+
return void 0;
|
|
29526
|
+
}
|
|
29527
|
+
const block = providerOptions[SAP_AI_PROVIDER_NAME];
|
|
29528
|
+
if (block === void 0) {
|
|
29529
|
+
return void 0;
|
|
29530
|
+
}
|
|
29531
|
+
const parsed = sapAIPartProviderOptionsSchema.safeParse(block);
|
|
29532
|
+
if (parsed.success) {
|
|
29533
|
+
return parsed.data;
|
|
29534
|
+
}
|
|
29535
|
+
if (warnings) {
|
|
29536
|
+
for (const issue of parsed.error.issues) {
|
|
29537
|
+
const path = issue.path.join(".");
|
|
29538
|
+
const message = `providerOptions['sap-ai']${path ? `.${path}` : ""} is invalid: ${issue.message}. The directive was dropped.`;
|
|
29539
|
+
if (!warnings.some((w) => w.message === message)) {
|
|
29540
|
+
warnings.push({ message, type: "other" });
|
|
29541
|
+
}
|
|
29542
|
+
}
|
|
29543
|
+
}
|
|
29544
|
+
return void 0;
|
|
29545
|
+
}
|
|
28604
29546
|
var promptTemplateScopeSchema = z.enum(["tenant", "resource_group"]);
|
|
28605
29547
|
var promptTemplateRefByIdSchema = z.object({
|
|
28606
29548
|
id: z.string().min(1, "Template ID cannot be empty"),
|
|
@@ -28713,7 +29655,7 @@ function mergeTwo(target, source, ancestors, depth) {
|
|
|
28713
29655
|
}
|
|
28714
29656
|
|
|
28715
29657
|
// src/sap-ai-error.ts
|
|
28716
|
-
var import_util = __toESM(
|
|
29658
|
+
var import_util = __toESM(require_dist2(), 1);
|
|
28717
29659
|
import { APICallError, LoadAPIKeyError, NoSuchModelError } from "@ai-sdk/provider";
|
|
28718
29660
|
var HTTP_STATUS = {
|
|
28719
29661
|
BAD_REQUEST: 400,
|
|
@@ -29020,15 +29962,23 @@ See: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-depl
|
|
|
29020
29962
|
}
|
|
29021
29963
|
function normalizeHeaders(headers) {
|
|
29022
29964
|
if (!headers || typeof headers !== "object") return void 0;
|
|
29965
|
+
if (typeof Headers !== "undefined" && headers instanceof Headers) {
|
|
29966
|
+
const out = {};
|
|
29967
|
+
headers.forEach((value, key) => {
|
|
29968
|
+
out[key.toLowerCase()] = value;
|
|
29969
|
+
});
|
|
29970
|
+
return Object.keys(out).length === 0 ? void 0 : out;
|
|
29971
|
+
}
|
|
29023
29972
|
const record = headers;
|
|
29024
29973
|
const entries = Object.entries(record).flatMap(([key, value]) => {
|
|
29025
|
-
|
|
29974
|
+
const k = key.toLowerCase();
|
|
29975
|
+
if (typeof value === "string") return [[k, value]];
|
|
29026
29976
|
if (Array.isArray(value)) {
|
|
29027
29977
|
const strings = value.filter((item) => typeof item === "string").join("; ");
|
|
29028
|
-
return strings.length > 0 ? [[
|
|
29978
|
+
return strings.length > 0 ? [[k, strings]] : [];
|
|
29029
29979
|
}
|
|
29030
29980
|
if (typeof value === "number" || typeof value === "boolean") {
|
|
29031
|
-
return [[
|
|
29981
|
+
return [[k, String(value)]];
|
|
29032
29982
|
}
|
|
29033
29983
|
return [];
|
|
29034
29984
|
});
|
|
@@ -29204,10 +30154,23 @@ function serializeAxiosResponseData(data, maxLength = 2e3) {
|
|
|
29204
30154
|
return serialized;
|
|
29205
30155
|
}
|
|
29206
30156
|
function tryExtractSAPErrorFromMessage(message) {
|
|
29207
|
-
const
|
|
29208
|
-
if (
|
|
30157
|
+
const startIdx = message.indexOf("{");
|
|
30158
|
+
if (startIdx === -1) return null;
|
|
30159
|
+
let depth = 0;
|
|
30160
|
+
let endIdx = -1;
|
|
30161
|
+
for (let i = startIdx; i < message.length; i++) {
|
|
30162
|
+
if (message[i] === "{") depth++;
|
|
30163
|
+
else if (message[i] === "}") {
|
|
30164
|
+
depth--;
|
|
30165
|
+
if (depth === 0) {
|
|
30166
|
+
endIdx = i;
|
|
30167
|
+
break;
|
|
30168
|
+
}
|
|
30169
|
+
}
|
|
30170
|
+
}
|
|
30171
|
+
if (endIdx === -1) return null;
|
|
29209
30172
|
try {
|
|
29210
|
-
const parsed = JSON.parse(
|
|
30173
|
+
const parsed = JSON.parse(message.slice(startIdx, endIdx + 1));
|
|
29211
30174
|
if (parsed && typeof parsed === "object" && "error" in parsed) {
|
|
29212
30175
|
return parsed;
|
|
29213
30176
|
}
|
|
@@ -29221,7 +30184,7 @@ function tryExtractSAPErrorFromMessage(message) {
|
|
|
29221
30184
|
}
|
|
29222
30185
|
|
|
29223
30186
|
// src/version.ts
|
|
29224
|
-
var VERSION = true ? "4.
|
|
30187
|
+
var VERSION = true ? "4.7.1" : "0.0.0-test";
|
|
29225
30188
|
|
|
29226
30189
|
export {
|
|
29227
30190
|
__toESM,
|
|
@@ -29230,11 +30193,12 @@ export {
|
|
|
29230
30193
|
validateEmbeddingModelParamsSettings,
|
|
29231
30194
|
validateModelParamsSettings,
|
|
29232
30195
|
validateModelParamsWithWarnings,
|
|
30196
|
+
parseSAPPartProviderOptions,
|
|
29233
30197
|
orchestrationConfigRefSchema,
|
|
29234
30198
|
sapAILanguageModelProviderOptions,
|
|
29235
30199
|
sapAIEmbeddingProviderOptions,
|
|
29236
30200
|
deepMerge,
|
|
29237
|
-
require_dist,
|
|
30201
|
+
require_dist2 as require_dist,
|
|
29238
30202
|
ApiSwitchError,
|
|
29239
30203
|
UnsupportedFeatureError,
|
|
29240
30204
|
convertToAISDKError,
|
|
@@ -29272,6 +30236,6 @@ mime-types/index.js:
|
|
|
29272
30236
|
*)
|
|
29273
30237
|
|
|
29274
30238
|
axios/dist/node/axios.cjs:
|
|
29275
|
-
(*! Axios v1.
|
|
30239
|
+
(*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
29276
30240
|
*/
|
|
29277
|
-
//# sourceMappingURL=chunk-
|
|
30241
|
+
//# sourceMappingURL=chunk-XIWHF23D.js.map
|