@kontent-ai/delivery-sdk 16.4.0 → 16.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles/kontent-delivery.umd.js +1237 -862
- package/dist/bundles/kontent-delivery.umd.js.map +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js +1 -1
- package/dist/bundles/kontent-delivery.umd.min.js.map +1 -1
- package/dist/bundles/report.json +1 -1
- package/dist/bundles/report.min.json +1 -1
- package/dist/bundles/stats.json +6046 -6018
- package/dist/bundles/stats.min.json +7919 -7877
- package/dist/cjs/sdk-info.generated.js +1 -1
- package/dist/es6/sdk-info.generated.js +1 -1
- package/dist/esnext/sdk-info.generated.js +1 -1
- package/lib/sdk-info.generated.ts +1 -1
- package/package.json +3 -2
|
@@ -3501,7 +3501,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
3501
3501
|
exports.sdkInfo = void 0;
|
|
3502
3502
|
exports.sdkInfo = {
|
|
3503
3503
|
host: 'npmjs.com',
|
|
3504
|
-
version: '16.4.
|
|
3504
|
+
version: '16.4.2',
|
|
3505
3505
|
name: '@kontent-ai/delivery-sdk'
|
|
3506
3506
|
};
|
|
3507
3507
|
|
|
@@ -5255,7 +5255,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5255
5255
|
* - `http` for Node.js
|
|
5256
5256
|
* - `xhr` for browsers
|
|
5257
5257
|
* - `fetch` for fetch API-based requests
|
|
5258
|
-
*
|
|
5258
|
+
*
|
|
5259
5259
|
* @type {Object<string, Function|Object>}
|
|
5260
5260
|
*/
|
|
5261
5261
|
const knownAdapters = {
|
|
@@ -5263,7 +5263,7 @@ const knownAdapters = {
|
|
|
5263
5263
|
xhr: _xhr_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
5264
5264
|
fetch: {
|
|
5265
5265
|
get: _fetch_js__WEBPACK_IMPORTED_MODULE_3__.getFetch,
|
|
5266
|
-
}
|
|
5266
|
+
},
|
|
5267
5267
|
};
|
|
5268
5268
|
|
|
5269
5269
|
// Assign adapter names for easier debugging and identification
|
|
@@ -5280,7 +5280,7 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(knownAdapters, (fn, va
|
|
|
5280
5280
|
|
|
5281
5281
|
/**
|
|
5282
5282
|
* Render a rejection reason string for unknown or unsupported adapters
|
|
5283
|
-
*
|
|
5283
|
+
*
|
|
5284
5284
|
* @param {string} reason
|
|
5285
5285
|
* @returns {string}
|
|
5286
5286
|
*/
|
|
@@ -5288,17 +5288,18 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
5288
5288
|
|
|
5289
5289
|
/**
|
|
5290
5290
|
* Check if the adapter is resolved (function, null, or false)
|
|
5291
|
-
*
|
|
5291
|
+
*
|
|
5292
5292
|
* @param {Function|null|false} adapter
|
|
5293
5293
|
* @returns {boolean}
|
|
5294
5294
|
*/
|
|
5295
|
-
const isResolvedHandle = (adapter) =>
|
|
5295
|
+
const isResolvedHandle = (adapter) =>
|
|
5296
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(adapter) || adapter === null || adapter === false;
|
|
5296
5297
|
|
|
5297
5298
|
/**
|
|
5298
5299
|
* Get the first suitable adapter from the provided list.
|
|
5299
5300
|
* Tries each adapter in order until a supported one is found.
|
|
5300
5301
|
* Throws an AxiosError if no adapter is suitable.
|
|
5301
|
-
*
|
|
5302
|
+
*
|
|
5302
5303
|
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
5303
5304
|
* @param {Object} config - Axios request configuration
|
|
5304
5305
|
* @throws {AxiosError} If no suitable adapter is available
|
|
@@ -5335,14 +5336,17 @@ function getAdapter(adapters, config) {
|
|
|
5335
5336
|
}
|
|
5336
5337
|
|
|
5337
5338
|
if (!adapter) {
|
|
5338
|
-
const reasons = Object.entries(rejectedReasons)
|
|
5339
|
-
|
|
5339
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
5340
|
+
([id, state]) =>
|
|
5341
|
+
`adapter ${id} ` +
|
|
5340
5342
|
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
5341
|
-
|
|
5343
|
+
);
|
|
5342
5344
|
|
|
5343
|
-
let s = length
|
|
5344
|
-
|
|
5345
|
-
|
|
5345
|
+
let s = length
|
|
5346
|
+
? reasons.length > 1
|
|
5347
|
+
? 'since :\n' + reasons.map(renderReason).join('\n')
|
|
5348
|
+
: ' ' + renderReason(reasons[0])
|
|
5349
|
+
: 'as no adapter specified';
|
|
5346
5350
|
|
|
5347
5351
|
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_4__["default"](
|
|
5348
5352
|
`There is no suitable adapter to dispatch the request ` + s,
|
|
@@ -5367,7 +5371,7 @@ function getAdapter(adapters, config) {
|
|
|
5367
5371
|
* Exposes all known adapters
|
|
5368
5372
|
* @type {Object<string, Function|Object>}
|
|
5369
5373
|
*/
|
|
5370
|
-
adapters: knownAdapters
|
|
5374
|
+
adapters: knownAdapters,
|
|
5371
5375
|
});
|
|
5372
5376
|
|
|
5373
5377
|
|
|
@@ -5405,31 +5409,33 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5405
5409
|
|
|
5406
5410
|
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
5407
5411
|
|
|
5408
|
-
const {isFunction} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
5412
|
+
const { isFunction } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
5409
5413
|
|
|
5410
|
-
const globalFetchAPI = (({Request, Response}) => ({
|
|
5411
|
-
Request,
|
|
5414
|
+
const globalFetchAPI = (({ Request, Response }) => ({
|
|
5415
|
+
Request,
|
|
5416
|
+
Response,
|
|
5412
5417
|
}))(_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global);
|
|
5413
5418
|
|
|
5414
|
-
const {
|
|
5415
|
-
ReadableStream, TextEncoder
|
|
5416
|
-
} = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
5417
|
-
|
|
5419
|
+
const { ReadableStream, TextEncoder } = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].global;
|
|
5418
5420
|
|
|
5419
5421
|
const test = (fn, ...args) => {
|
|
5420
5422
|
try {
|
|
5421
5423
|
return !!fn(...args);
|
|
5422
5424
|
} catch (e) {
|
|
5423
|
-
return false
|
|
5425
|
+
return false;
|
|
5424
5426
|
}
|
|
5425
|
-
}
|
|
5427
|
+
};
|
|
5426
5428
|
|
|
5427
5429
|
const factory = (env) => {
|
|
5428
|
-
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
5429
|
-
|
|
5430
|
-
|
|
5430
|
+
env = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].merge.call(
|
|
5431
|
+
{
|
|
5432
|
+
skipUndefined: true,
|
|
5433
|
+
},
|
|
5434
|
+
globalFetchAPI,
|
|
5435
|
+
env
|
|
5436
|
+
);
|
|
5431
5437
|
|
|
5432
|
-
const {fetch: envFetch, Request, Response} = env;
|
|
5438
|
+
const { fetch: envFetch, Request, Response } = env;
|
|
5433
5439
|
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
|
5434
5440
|
const isRequestSupported = isFunction(Request);
|
|
5435
5441
|
const isResponseSupported = isFunction(Response);
|
|
@@ -5440,46 +5446,65 @@ const factory = (env) => {
|
|
|
5440
5446
|
|
|
5441
5447
|
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
|
|
5442
5448
|
|
|
5443
|
-
const encodeText =
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5449
|
+
const encodeText =
|
|
5450
|
+
isFetchSupported &&
|
|
5451
|
+
(typeof TextEncoder === 'function'
|
|
5452
|
+
? (
|
|
5453
|
+
(encoder) => (str) =>
|
|
5454
|
+
encoder.encode(str)
|
|
5455
|
+
)(new TextEncoder())
|
|
5456
|
+
: async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
5447
5457
|
|
|
5448
|
-
const supportsRequestStream =
|
|
5449
|
-
|
|
5458
|
+
const supportsRequestStream =
|
|
5459
|
+
isRequestSupported &&
|
|
5460
|
+
isReadableStreamSupported &&
|
|
5461
|
+
test(() => {
|
|
5462
|
+
let duplexAccessed = false;
|
|
5450
5463
|
|
|
5451
|
-
|
|
5452
|
-
body: new ReadableStream(),
|
|
5453
|
-
method: 'POST',
|
|
5454
|
-
get duplex() {
|
|
5455
|
-
duplexAccessed = true;
|
|
5456
|
-
return 'half';
|
|
5457
|
-
},
|
|
5458
|
-
}).headers.has('Content-Type');
|
|
5464
|
+
const body = new ReadableStream();
|
|
5459
5465
|
|
|
5460
|
-
|
|
5461
|
-
|
|
5466
|
+
const hasContentType = new Request(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin, {
|
|
5467
|
+
body,
|
|
5468
|
+
method: 'POST',
|
|
5469
|
+
get duplex() {
|
|
5470
|
+
duplexAccessed = true;
|
|
5471
|
+
return 'half';
|
|
5472
|
+
},
|
|
5473
|
+
}).headers.has('Content-Type');
|
|
5474
|
+
|
|
5475
|
+
body.cancel();
|
|
5462
5476
|
|
|
5463
|
-
|
|
5477
|
+
return duplexAccessed && !hasContentType;
|
|
5478
|
+
});
|
|
5479
|
+
|
|
5480
|
+
const supportsResponseStream =
|
|
5481
|
+
isResponseSupported &&
|
|
5482
|
+
isReadableStreamSupported &&
|
|
5464
5483
|
test(() => _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isReadableStream(new Response('').body));
|
|
5465
5484
|
|
|
5466
5485
|
const resolvers = {
|
|
5467
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
5486
|
+
stream: supportsResponseStream && ((res) => res.body),
|
|
5468
5487
|
};
|
|
5469
5488
|
|
|
5470
|
-
isFetchSupported &&
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5489
|
+
isFetchSupported &&
|
|
5490
|
+
(() => {
|
|
5491
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
|
|
5492
|
+
!resolvers[type] &&
|
|
5493
|
+
(resolvers[type] = (res, config) => {
|
|
5494
|
+
let method = res && res[type];
|
|
5474
5495
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5496
|
+
if (method) {
|
|
5497
|
+
return method.call(res);
|
|
5498
|
+
}
|
|
5478
5499
|
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5500
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5501
|
+
`Response type '${type}' is not supported`,
|
|
5502
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NOT_SUPPORT,
|
|
5503
|
+
config
|
|
5504
|
+
);
|
|
5505
|
+
});
|
|
5506
|
+
});
|
|
5507
|
+
})();
|
|
5483
5508
|
|
|
5484
5509
|
const getBodyLength = async (body) => {
|
|
5485
5510
|
if (body == null) {
|
|
@@ -5509,13 +5534,13 @@ const factory = (env) => {
|
|
|
5509
5534
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(body)) {
|
|
5510
5535
|
return (await encodeText(body)).byteLength;
|
|
5511
5536
|
}
|
|
5512
|
-
}
|
|
5537
|
+
};
|
|
5513
5538
|
|
|
5514
5539
|
const resolveBodyLength = async (headers, body) => {
|
|
5515
5540
|
const length = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(headers.getContentLength());
|
|
5516
5541
|
|
|
5517
5542
|
return length == null ? getBodyLength(body) : length;
|
|
5518
|
-
}
|
|
5543
|
+
};
|
|
5519
5544
|
|
|
5520
5545
|
return async (config) => {
|
|
5521
5546
|
let {
|
|
@@ -5530,38 +5555,47 @@ const factory = (env) => {
|
|
|
5530
5555
|
responseType,
|
|
5531
5556
|
headers,
|
|
5532
5557
|
withCredentials = 'same-origin',
|
|
5533
|
-
fetchOptions
|
|
5558
|
+
fetchOptions,
|
|
5534
5559
|
} = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_7__["default"])(config);
|
|
5535
5560
|
|
|
5536
5561
|
let _fetch = envFetch || fetch;
|
|
5537
5562
|
|
|
5538
5563
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
5539
5564
|
|
|
5540
|
-
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
5565
|
+
let composedSignal = (0,_helpers_composeSignals_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
5566
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
5567
|
+
timeout
|
|
5568
|
+
);
|
|
5541
5569
|
|
|
5542
5570
|
let request = null;
|
|
5543
5571
|
|
|
5544
|
-
const unsubscribe =
|
|
5545
|
-
composedSignal
|
|
5546
|
-
|
|
5572
|
+
const unsubscribe =
|
|
5573
|
+
composedSignal &&
|
|
5574
|
+
composedSignal.unsubscribe &&
|
|
5575
|
+
(() => {
|
|
5576
|
+
composedSignal.unsubscribe();
|
|
5577
|
+
});
|
|
5547
5578
|
|
|
5548
5579
|
let requestContentLength;
|
|
5549
5580
|
|
|
5550
5581
|
try {
|
|
5551
5582
|
if (
|
|
5552
|
-
onUploadProgress &&
|
|
5583
|
+
onUploadProgress &&
|
|
5584
|
+
supportsRequestStream &&
|
|
5585
|
+
method !== 'get' &&
|
|
5586
|
+
method !== 'head' &&
|
|
5553
5587
|
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
|
5554
5588
|
) {
|
|
5555
5589
|
let _request = new Request(url, {
|
|
5556
5590
|
method: 'POST',
|
|
5557
5591
|
body: data,
|
|
5558
|
-
duplex:
|
|
5592
|
+
duplex: 'half',
|
|
5559
5593
|
});
|
|
5560
5594
|
|
|
5561
5595
|
let contentTypeHeader;
|
|
5562
5596
|
|
|
5563
5597
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
5564
|
-
headers.setContentType(contentTypeHeader)
|
|
5598
|
+
headers.setContentType(contentTypeHeader);
|
|
5565
5599
|
}
|
|
5566
5600
|
|
|
5567
5601
|
if (_request.body) {
|
|
@@ -5580,7 +5614,7 @@ const factory = (env) => {
|
|
|
5580
5614
|
|
|
5581
5615
|
// Cloudflare Workers throws when credentials are defined
|
|
5582
5616
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
5583
|
-
const isCredentialsSupported = isRequestSupported &&
|
|
5617
|
+
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
5584
5618
|
|
|
5585
5619
|
const resolvedOptions = {
|
|
5586
5620
|
...fetchOptions,
|
|
@@ -5588,29 +5622,35 @@ const factory = (env) => {
|
|
|
5588
5622
|
method: method.toUpperCase(),
|
|
5589
5623
|
headers: headers.normalize().toJSON(),
|
|
5590
5624
|
body: data,
|
|
5591
|
-
duplex:
|
|
5592
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
5625
|
+
duplex: 'half',
|
|
5626
|
+
credentials: isCredentialsSupported ? withCredentials : undefined,
|
|
5593
5627
|
};
|
|
5594
5628
|
|
|
5595
5629
|
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
5596
5630
|
|
|
5597
|
-
let response = await (isRequestSupported
|
|
5631
|
+
let response = await (isRequestSupported
|
|
5632
|
+
? _fetch(request, fetchOptions)
|
|
5633
|
+
: _fetch(url, resolvedOptions));
|
|
5598
5634
|
|
|
5599
|
-
const isStreamResponse =
|
|
5635
|
+
const isStreamResponse =
|
|
5636
|
+
supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
5600
5637
|
|
|
5601
5638
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
5602
5639
|
const options = {};
|
|
5603
5640
|
|
|
5604
|
-
['status', 'statusText', 'headers'].forEach(prop => {
|
|
5641
|
+
['status', 'statusText', 'headers'].forEach((prop) => {
|
|
5605
5642
|
options[prop] = response[prop];
|
|
5606
5643
|
});
|
|
5607
5644
|
|
|
5608
5645
|
const responseContentLength = _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].toFiniteNumber(response.headers.get('content-length'));
|
|
5609
5646
|
|
|
5610
|
-
const [onProgress, flush] =
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5647
|
+
const [onProgress, flush] =
|
|
5648
|
+
(onDownloadProgress &&
|
|
5649
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventDecorator)(
|
|
5650
|
+
responseContentLength,
|
|
5651
|
+
(0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.progressEventReducer)((0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_6__.asyncDecorator)(onDownloadProgress), true)
|
|
5652
|
+
)) ||
|
|
5653
|
+
[];
|
|
5614
5654
|
|
|
5615
5655
|
response = new Response(
|
|
5616
5656
|
(0,_helpers_trackStream_js__WEBPACK_IMPORTED_MODULE_4__.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
@@ -5623,7 +5663,10 @@ const factory = (env) => {
|
|
|
5623
5663
|
|
|
5624
5664
|
responseType = responseType || 'text';
|
|
5625
5665
|
|
|
5626
|
-
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
5666
|
+
let responseData = await resolvers[_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].findKey(resolvers, responseType) || 'text'](
|
|
5667
|
+
response,
|
|
5668
|
+
config
|
|
5669
|
+
);
|
|
5627
5670
|
|
|
5628
5671
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
5629
5672
|
|
|
@@ -5634,43 +5677,50 @@ const factory = (env) => {
|
|
|
5634
5677
|
status: response.status,
|
|
5635
5678
|
statusText: response.statusText,
|
|
5636
5679
|
config,
|
|
5637
|
-
request
|
|
5638
|
-
})
|
|
5639
|
-
})
|
|
5680
|
+
request,
|
|
5681
|
+
});
|
|
5682
|
+
});
|
|
5640
5683
|
} catch (err) {
|
|
5641
5684
|
unsubscribe && unsubscribe();
|
|
5642
5685
|
|
|
5643
5686
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
5644
5687
|
throw Object.assign(
|
|
5645
|
-
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5688
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"](
|
|
5689
|
+
'Network Error',
|
|
5690
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERR_NETWORK,
|
|
5691
|
+
config,
|
|
5692
|
+
request,
|
|
5693
|
+
err && err.response
|
|
5694
|
+
),
|
|
5646
5695
|
{
|
|
5647
|
-
cause: err.cause || err
|
|
5696
|
+
cause: err.cause || err,
|
|
5648
5697
|
}
|
|
5649
|
-
)
|
|
5698
|
+
);
|
|
5650
5699
|
}
|
|
5651
5700
|
|
|
5652
|
-
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request);
|
|
5701
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_2__["default"].from(err, err && err.code, config, request, err && err.response);
|
|
5653
5702
|
}
|
|
5654
|
-
}
|
|
5655
|
-
}
|
|
5703
|
+
};
|
|
5704
|
+
};
|
|
5656
5705
|
|
|
5657
5706
|
const seedCache = new Map();
|
|
5658
5707
|
|
|
5659
5708
|
const getFetch = (config) => {
|
|
5660
5709
|
let env = (config && config.env) || {};
|
|
5661
|
-
const {fetch, Request, Response} = env;
|
|
5662
|
-
const seeds = [
|
|
5663
|
-
Request, Response, fetch
|
|
5664
|
-
];
|
|
5710
|
+
const { fetch, Request, Response } = env;
|
|
5711
|
+
const seeds = [Request, Response, fetch];
|
|
5665
5712
|
|
|
5666
|
-
let len = seeds.length,
|
|
5667
|
-
|
|
5713
|
+
let len = seeds.length,
|
|
5714
|
+
i = len,
|
|
5715
|
+
seed,
|
|
5716
|
+
target,
|
|
5717
|
+
map = seedCache;
|
|
5668
5718
|
|
|
5669
5719
|
while (i--) {
|
|
5670
5720
|
seed = seeds[i];
|
|
5671
5721
|
target = map.get(seed);
|
|
5672
5722
|
|
|
5673
|
-
target === undefined && map.set(seed, target =
|
|
5723
|
+
target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
|
|
5674
5724
|
|
|
5675
5725
|
map = target;
|
|
5676
5726
|
}
|
|
@@ -5695,8 +5745,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5695
5745
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5696
5746
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
5697
5747
|
/* harmony export */ });
|
|
5698
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
5699
|
-
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*!
|
|
5748
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
5749
|
+
/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/settle.js */ "./node_modules/axios/lib/core/settle.js");
|
|
5700
5750
|
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
|
|
5701
5751
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
5702
5752
|
/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
|
|
@@ -5718,193 +5768,215 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5718
5768
|
|
|
5719
5769
|
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
5720
5770
|
|
|
5721
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5771
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (isXHRAdapterSupported &&
|
|
5772
|
+
function (config) {
|
|
5773
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
5774
|
+
const _config = (0,_helpers_resolveConfig_js__WEBPACK_IMPORTED_MODULE_9__["default"])(config);
|
|
5775
|
+
let requestData = _config.data;
|
|
5776
|
+
const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(_config.headers).normalize();
|
|
5777
|
+
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
5778
|
+
let onCanceled;
|
|
5779
|
+
let uploadThrottled, downloadThrottled;
|
|
5780
|
+
let flushUpload, flushDownload;
|
|
5730
5781
|
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5782
|
+
function done() {
|
|
5783
|
+
flushUpload && flushUpload(); // flush events
|
|
5784
|
+
flushDownload && flushDownload(); // flush events
|
|
5734
5785
|
|
|
5735
|
-
|
|
5786
|
+
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
5736
5787
|
|
|
5737
|
-
|
|
5738
|
-
|
|
5788
|
+
_config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
5789
|
+
}
|
|
5739
5790
|
|
|
5740
|
-
|
|
5791
|
+
let request = new XMLHttpRequest();
|
|
5741
5792
|
|
|
5742
|
-
|
|
5793
|
+
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
5743
5794
|
|
|
5744
|
-
|
|
5745
|
-
|
|
5795
|
+
// Set the request timeout in MS
|
|
5796
|
+
request.timeout = _config.timeout;
|
|
5746
5797
|
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5798
|
+
function onloadend() {
|
|
5799
|
+
if (!request) {
|
|
5800
|
+
return;
|
|
5801
|
+
}
|
|
5802
|
+
// Prepare the response
|
|
5803
|
+
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
5804
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
5805
|
+
);
|
|
5806
|
+
const responseData =
|
|
5807
|
+
!responseType || responseType === 'text' || responseType === 'json'
|
|
5808
|
+
? request.responseText
|
|
5809
|
+
: request.response;
|
|
5810
|
+
const response = {
|
|
5811
|
+
data: responseData,
|
|
5812
|
+
status: request.status,
|
|
5813
|
+
statusText: request.statusText,
|
|
5814
|
+
headers: responseHeaders,
|
|
5815
|
+
config,
|
|
5816
|
+
request,
|
|
5817
|
+
};
|
|
5818
|
+
|
|
5819
|
+
(0,_core_settle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(
|
|
5820
|
+
function _resolve(value) {
|
|
5821
|
+
resolve(value);
|
|
5822
|
+
done();
|
|
5823
|
+
},
|
|
5824
|
+
function _reject(err) {
|
|
5825
|
+
reject(err);
|
|
5826
|
+
done();
|
|
5827
|
+
},
|
|
5828
|
+
response
|
|
5829
|
+
);
|
|
5830
|
+
|
|
5831
|
+
// Clean up request
|
|
5832
|
+
request = null;
|
|
5750
5833
|
}
|
|
5751
|
-
// Prepare the response
|
|
5752
|
-
const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].from(
|
|
5753
|
-
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
5754
|
-
);
|
|
5755
|
-
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
5756
|
-
request.responseText : request.response;
|
|
5757
|
-
const response = {
|
|
5758
|
-
data: responseData,
|
|
5759
|
-
status: request.status,
|
|
5760
|
-
statusText: request.statusText,
|
|
5761
|
-
headers: responseHeaders,
|
|
5762
|
-
config,
|
|
5763
|
-
request
|
|
5764
|
-
};
|
|
5765
5834
|
|
|
5766
|
-
(
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
}
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5835
|
+
if ('onloadend' in request) {
|
|
5836
|
+
// Use onloadend if available
|
|
5837
|
+
request.onloadend = onloadend;
|
|
5838
|
+
} else {
|
|
5839
|
+
// Listen for ready state to emulate onloadend
|
|
5840
|
+
request.onreadystatechange = function handleLoad() {
|
|
5841
|
+
if (!request || request.readyState !== 4) {
|
|
5842
|
+
return;
|
|
5843
|
+
}
|
|
5773
5844
|
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5845
|
+
// The request errored out and we didn't get a response, this will be
|
|
5846
|
+
// handled by onerror instead
|
|
5847
|
+
// With one exception: request that using file: protocol, most browsers
|
|
5848
|
+
// will return status as 0 even though it's a successful request
|
|
5849
|
+
if (
|
|
5850
|
+
request.status === 0 &&
|
|
5851
|
+
!(request.responseURL && request.responseURL.indexOf('file:') === 0)
|
|
5852
|
+
) {
|
|
5853
|
+
return;
|
|
5854
|
+
}
|
|
5855
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
5856
|
+
// so we should call onloadend on the next 'tick'
|
|
5857
|
+
setTimeout(onloadend);
|
|
5858
|
+
};
|
|
5859
|
+
}
|
|
5777
5860
|
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
} else {
|
|
5782
|
-
// Listen for ready state to emulate onloadend
|
|
5783
|
-
request.onreadystatechange = function handleLoad() {
|
|
5784
|
-
if (!request || request.readyState !== 4) {
|
|
5861
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
5862
|
+
request.onabort = function handleAbort() {
|
|
5863
|
+
if (!request) {
|
|
5785
5864
|
return;
|
|
5786
5865
|
}
|
|
5787
5866
|
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
//
|
|
5791
|
-
|
|
5792
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
5793
|
-
return;
|
|
5794
|
-
}
|
|
5795
|
-
// readystate handler is calling before onerror or ontimeout handlers,
|
|
5796
|
-
// so we should call onloadend on the next 'tick'
|
|
5797
|
-
setTimeout(onloadend);
|
|
5867
|
+
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED, config, request));
|
|
5868
|
+
|
|
5869
|
+
// Clean up request
|
|
5870
|
+
request = null;
|
|
5798
5871
|
};
|
|
5799
|
-
}
|
|
5800
5872
|
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5873
|
+
// Handle low level network errors
|
|
5874
|
+
request.onerror = function handleError(event) {
|
|
5875
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
|
5876
|
+
// (message may be empty; when present, surface it)
|
|
5877
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
5878
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
|
5879
|
+
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
5880
|
+
// attach the underlying event for consumers who want details
|
|
5881
|
+
err.event = event || null;
|
|
5882
|
+
reject(err);
|
|
5883
|
+
request = null;
|
|
5884
|
+
};
|
|
5806
5885
|
|
|
5807
|
-
|
|
5886
|
+
// Handle timeout
|
|
5887
|
+
request.ontimeout = function handleTimeout() {
|
|
5888
|
+
let timeoutErrorMessage = _config.timeout
|
|
5889
|
+
? 'timeout of ' + _config.timeout + 'ms exceeded'
|
|
5890
|
+
: 'timeout exceeded';
|
|
5891
|
+
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
5892
|
+
if (_config.timeoutErrorMessage) {
|
|
5893
|
+
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
5894
|
+
}
|
|
5895
|
+
reject(
|
|
5896
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5897
|
+
timeoutErrorMessage,
|
|
5898
|
+
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
5899
|
+
config,
|
|
5900
|
+
request
|
|
5901
|
+
)
|
|
5902
|
+
);
|
|
5808
5903
|
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5904
|
+
// Clean up request
|
|
5905
|
+
request = null;
|
|
5906
|
+
};
|
|
5812
5907
|
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
// Browsers deliver a ProgressEvent in XHR onerror
|
|
5816
|
-
// (message may be empty; when present, surface it)
|
|
5817
|
-
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
5818
|
-
const msg = event && event.message ? event.message : 'Network Error';
|
|
5819
|
-
const err = new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](msg, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_NETWORK, config, request);
|
|
5820
|
-
// attach the underlying event for consumers who want details
|
|
5821
|
-
err.event = event || null;
|
|
5822
|
-
reject(err);
|
|
5823
|
-
request = null;
|
|
5824
|
-
};
|
|
5825
|
-
|
|
5826
|
-
// Handle timeout
|
|
5827
|
-
request.ontimeout = function handleTimeout() {
|
|
5828
|
-
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
5829
|
-
const transitional = _config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
5830
|
-
if (_config.timeoutErrorMessage) {
|
|
5831
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
5832
|
-
}
|
|
5833
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5834
|
-
timeoutErrorMessage,
|
|
5835
|
-
transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ECONNABORTED,
|
|
5836
|
-
config,
|
|
5837
|
-
request));
|
|
5838
|
-
|
|
5839
|
-
// Clean up request
|
|
5840
|
-
request = null;
|
|
5841
|
-
};
|
|
5908
|
+
// Remove Content-Type if data is undefined
|
|
5909
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
5842
5910
|
|
|
5843
|
-
|
|
5844
|
-
|
|
5911
|
+
// Add headers to the request
|
|
5912
|
+
if ('setRequestHeader' in request) {
|
|
5913
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
5914
|
+
request.setRequestHeader(key, val);
|
|
5915
|
+
});
|
|
5916
|
+
}
|
|
5845
5917
|
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
});
|
|
5851
|
-
}
|
|
5918
|
+
// Add withCredentials to request if needed
|
|
5919
|
+
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(_config.withCredentials)) {
|
|
5920
|
+
request.withCredentials = !!_config.withCredentials;
|
|
5921
|
+
}
|
|
5852
5922
|
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5923
|
+
// Add responseType to request if needed
|
|
5924
|
+
if (responseType && responseType !== 'json') {
|
|
5925
|
+
request.responseType = _config.responseType;
|
|
5926
|
+
}
|
|
5857
5927
|
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5928
|
+
// Handle progress if needed
|
|
5929
|
+
if (onDownloadProgress) {
|
|
5930
|
+
[downloadThrottled, flushDownload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onDownloadProgress, true);
|
|
5931
|
+
request.addEventListener('progress', downloadThrottled);
|
|
5932
|
+
}
|
|
5862
5933
|
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
request.addEventListener('progress', downloadThrottled);
|
|
5867
|
-
}
|
|
5934
|
+
// Not all browsers support upload events
|
|
5935
|
+
if (onUploadProgress && request.upload) {
|
|
5936
|
+
[uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress);
|
|
5868
5937
|
|
|
5869
|
-
|
|
5870
|
-
if (onUploadProgress && request.upload) {
|
|
5871
|
-
([uploadThrottled, flushUpload] = (0,_helpers_progressEventReducer_js__WEBPACK_IMPORTED_MODULE_8__.progressEventReducer)(onUploadProgress));
|
|
5938
|
+
request.upload.addEventListener('progress', uploadThrottled);
|
|
5872
5939
|
|
|
5873
|
-
|
|
5940
|
+
request.upload.addEventListener('loadend', flushUpload);
|
|
5941
|
+
}
|
|
5874
5942
|
|
|
5875
|
-
|
|
5876
|
-
|
|
5943
|
+
if (_config.cancelToken || _config.signal) {
|
|
5944
|
+
// Handle cancellation
|
|
5945
|
+
// eslint-disable-next-line func-names
|
|
5946
|
+
onCanceled = (cancel) => {
|
|
5947
|
+
if (!request) {
|
|
5948
|
+
return;
|
|
5949
|
+
}
|
|
5950
|
+
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
5951
|
+
request.abort();
|
|
5952
|
+
request = null;
|
|
5953
|
+
};
|
|
5877
5954
|
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
return;
|
|
5955
|
+
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
5956
|
+
if (_config.signal) {
|
|
5957
|
+
_config.signal.aborted
|
|
5958
|
+
? onCanceled()
|
|
5959
|
+
: _config.signal.addEventListener('abort', onCanceled);
|
|
5884
5960
|
}
|
|
5885
|
-
reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_4__["default"](null, config, request) : cancel);
|
|
5886
|
-
request.abort();
|
|
5887
|
-
request = null;
|
|
5888
|
-
};
|
|
5889
|
-
|
|
5890
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
5891
|
-
if (_config.signal) {
|
|
5892
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
|
|
5893
5961
|
}
|
|
5894
|
-
}
|
|
5895
5962
|
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
|
|
5899
|
-
reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST, config));
|
|
5900
|
-
return;
|
|
5901
|
-
}
|
|
5963
|
+
const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_config.url);
|
|
5902
5964
|
|
|
5965
|
+
if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_6__["default"].protocols.indexOf(protocol) === -1) {
|
|
5966
|
+
reject(
|
|
5967
|
+
new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
|
|
5968
|
+
'Unsupported protocol ' + protocol + ':',
|
|
5969
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"].ERR_BAD_REQUEST,
|
|
5970
|
+
config
|
|
5971
|
+
)
|
|
5972
|
+
);
|
|
5973
|
+
return;
|
|
5974
|
+
}
|
|
5903
5975
|
|
|
5904
|
-
|
|
5905
|
-
|
|
5976
|
+
// Send the request
|
|
5977
|
+
request.send(requestData || null);
|
|
5978
|
+
});
|
|
5906
5979
|
});
|
|
5907
|
-
});
|
|
5908
5980
|
|
|
5909
5981
|
|
|
5910
5982
|
/***/ }),
|
|
@@ -5968,10 +6040,10 @@ function createInstance(defaultConfig) {
|
|
|
5968
6040
|
const instance = (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype.request, context);
|
|
5969
6041
|
|
|
5970
6042
|
// Copy axios.prototype to instance
|
|
5971
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, {allOwnKeys: true});
|
|
6043
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, _core_Axios_js__WEBPACK_IMPORTED_MODULE_2__["default"].prototype, context, { allOwnKeys: true });
|
|
5972
6044
|
|
|
5973
6045
|
// Copy context to instance
|
|
5974
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, {allOwnKeys: true});
|
|
6046
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].extend(instance, context, null, { allOwnKeys: true });
|
|
5975
6047
|
|
|
5976
6048
|
// Factory for creating new instances
|
|
5977
6049
|
instance.create = function create(instanceConfig) {
|
|
@@ -6015,7 +6087,7 @@ axios.mergeConfig = _core_mergeConfig_js__WEBPACK_IMPORTED_MODULE_3__["default"]
|
|
|
6015
6087
|
|
|
6016
6088
|
axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_14__["default"];
|
|
6017
6089
|
|
|
6018
|
-
axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6090
|
+
axios.formToJSON = (thing) => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
6019
6091
|
|
|
6020
6092
|
axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;
|
|
6021
6093
|
|
|
@@ -6066,7 +6138,7 @@ class CancelToken {
|
|
|
6066
6138
|
const token = this;
|
|
6067
6139
|
|
|
6068
6140
|
// eslint-disable-next-line func-names
|
|
6069
|
-
this.promise.then(cancel => {
|
|
6141
|
+
this.promise.then((cancel) => {
|
|
6070
6142
|
if (!token._listeners) return;
|
|
6071
6143
|
|
|
6072
6144
|
let i = token._listeners.length;
|
|
@@ -6078,10 +6150,10 @@ class CancelToken {
|
|
|
6078
6150
|
});
|
|
6079
6151
|
|
|
6080
6152
|
// eslint-disable-next-line func-names
|
|
6081
|
-
this.promise.then = onfulfilled => {
|
|
6153
|
+
this.promise.then = (onfulfilled) => {
|
|
6082
6154
|
let _resolve;
|
|
6083
6155
|
// eslint-disable-next-line func-names
|
|
6084
|
-
const promise = new Promise(resolve => {
|
|
6156
|
+
const promise = new Promise((resolve) => {
|
|
6085
6157
|
token.subscribe(resolve);
|
|
6086
6158
|
_resolve = resolve;
|
|
6087
6159
|
}).then(onfulfilled);
|
|
@@ -6169,7 +6241,7 @@ class CancelToken {
|
|
|
6169
6241
|
});
|
|
6170
6242
|
return {
|
|
6171
6243
|
token,
|
|
6172
|
-
cancel
|
|
6244
|
+
cancel,
|
|
6173
6245
|
};
|
|
6174
6246
|
}
|
|
6175
6247
|
}
|
|
@@ -6190,31 +6262,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6190
6262
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6191
6263
|
/* harmony export */ });
|
|
6192
6264
|
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
|
|
6193
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
6194
|
-
|
|
6195
6265
|
|
|
6196
6266
|
|
|
6197
6267
|
|
|
6198
6268
|
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6269
|
+
class CanceledError extends _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
6270
|
+
/**
|
|
6271
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
6272
|
+
*
|
|
6273
|
+
* @param {string=} message The message.
|
|
6274
|
+
* @param {Object=} config The config.
|
|
6275
|
+
* @param {Object=} request The request.
|
|
6276
|
+
*
|
|
6277
|
+
* @returns {CanceledError} The created error.
|
|
6278
|
+
*/
|
|
6279
|
+
constructor(message, config, request) {
|
|
6280
|
+
super(message == null ? 'canceled' : message, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_CANCELED, config, request);
|
|
6281
|
+
this.name = 'CanceledError';
|
|
6282
|
+
this.__CANCEL__ = true;
|
|
6283
|
+
}
|
|
6212
6284
|
}
|
|
6213
6285
|
|
|
6214
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].inherits(CanceledError, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
|
6215
|
-
__CANCEL__: true
|
|
6216
|
-
});
|
|
6217
|
-
|
|
6218
6286
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CanceledError);
|
|
6219
6287
|
|
|
6220
6288
|
|
|
@@ -6249,7 +6317,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6249
6317
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6250
6318
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6251
6319
|
/* harmony export */ });
|
|
6252
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
6320
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
6253
6321
|
/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../helpers/buildURL.js */ "./node_modules/axios/lib/helpers/buildURL.js");
|
|
6254
6322
|
/* harmony import */ var _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InterceptorManager.js */ "./node_modules/axios/lib/core/InterceptorManager.js");
|
|
6255
6323
|
/* harmony import */ var _dispatchRequest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dispatchRequest.js */ "./node_modules/axios/lib/core/dispatchRequest.js");
|
|
@@ -6257,6 +6325,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6257
6325
|
/* harmony import */ var _buildFullPath_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./buildFullPath.js */ "./node_modules/axios/lib/core/buildFullPath.js");
|
|
6258
6326
|
/* harmony import */ var _helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../helpers/validator.js */ "./node_modules/axios/lib/helpers/validator.js");
|
|
6259
6327
|
/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
6328
|
+
/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
|
|
6329
|
+
|
|
6260
6330
|
|
|
6261
6331
|
|
|
6262
6332
|
|
|
@@ -6282,7 +6352,7 @@ class Axios {
|
|
|
6282
6352
|
this.defaults = instanceConfig || {};
|
|
6283
6353
|
this.interceptors = {
|
|
6284
6354
|
request: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
6285
|
-
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"]()
|
|
6355
|
+
response: new _InterceptorManager_js__WEBPACK_IMPORTED_MODULE_2__["default"](),
|
|
6286
6356
|
};
|
|
6287
6357
|
}
|
|
6288
6358
|
|
|
@@ -6304,13 +6374,29 @@ class Axios {
|
|
|
6304
6374
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
|
6305
6375
|
|
|
6306
6376
|
// slice off the Error: ... line
|
|
6307
|
-
const stack =
|
|
6377
|
+
const stack = (() => {
|
|
6378
|
+
if (!dummy.stack) {
|
|
6379
|
+
return '';
|
|
6380
|
+
}
|
|
6381
|
+
|
|
6382
|
+
const firstNewlineIndex = dummy.stack.indexOf('\n');
|
|
6383
|
+
|
|
6384
|
+
return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
|
|
6385
|
+
})();
|
|
6308
6386
|
try {
|
|
6309
6387
|
if (!err.stack) {
|
|
6310
6388
|
err.stack = stack;
|
|
6311
6389
|
// match without the 2 top stack lines
|
|
6312
|
-
} else if (stack
|
|
6313
|
-
|
|
6390
|
+
} else if (stack) {
|
|
6391
|
+
const firstNewlineIndex = stack.indexOf('\n');
|
|
6392
|
+
const secondNewlineIndex =
|
|
6393
|
+
firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
|
|
6394
|
+
const stackWithoutTwoTopLines =
|
|
6395
|
+
secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
|
|
6396
|
+
|
|
6397
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
6398
|
+
err.stack += '\n' + stack;
|
|
6399
|
+
}
|
|
6314
6400
|
}
|
|
6315
6401
|
} catch (e) {
|
|
6316
6402
|
// ignore the case where "stack" is an un-writable property
|
|
@@ -6333,26 +6419,35 @@ class Axios {
|
|
|
6333
6419
|
|
|
6334
6420
|
config = (0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(this.defaults, config);
|
|
6335
6421
|
|
|
6336
|
-
const {transitional, paramsSerializer, headers} = config;
|
|
6422
|
+
const { transitional, paramsSerializer, headers } = config;
|
|
6337
6423
|
|
|
6338
6424
|
if (transitional !== undefined) {
|
|
6339
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6425
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6426
|
+
transitional,
|
|
6427
|
+
{
|
|
6428
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
6429
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
6430
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
6431
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
6432
|
+
},
|
|
6433
|
+
false
|
|
6434
|
+
);
|
|
6344
6435
|
}
|
|
6345
6436
|
|
|
6346
6437
|
if (paramsSerializer != null) {
|
|
6347
6438
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(paramsSerializer)) {
|
|
6348
6439
|
config.paramsSerializer = {
|
|
6349
|
-
serialize: paramsSerializer
|
|
6350
|
-
}
|
|
6440
|
+
serialize: paramsSerializer,
|
|
6441
|
+
};
|
|
6351
6442
|
} else {
|
|
6352
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6443
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6444
|
+
paramsSerializer,
|
|
6445
|
+
{
|
|
6446
|
+
encode: validators.function,
|
|
6447
|
+
serialize: validators.function,
|
|
6448
|
+
},
|
|
6449
|
+
true
|
|
6450
|
+
);
|
|
6356
6451
|
}
|
|
6357
6452
|
}
|
|
6358
6453
|
|
|
@@ -6365,26 +6460,25 @@ class Axios {
|
|
|
6365
6460
|
config.allowAbsoluteUrls = true;
|
|
6366
6461
|
}
|
|
6367
6462
|
|
|
6368
|
-
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6463
|
+
_helpers_validator_js__WEBPACK_IMPORTED_MODULE_6__["default"].assertOptions(
|
|
6464
|
+
config,
|
|
6465
|
+
{
|
|
6466
|
+
baseUrl: validators.spelling('baseURL'),
|
|
6467
|
+
withXsrfToken: validators.spelling('withXSRFToken'),
|
|
6468
|
+
},
|
|
6469
|
+
true
|
|
6470
|
+
);
|
|
6372
6471
|
|
|
6373
6472
|
// Set config.method
|
|
6374
6473
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
6375
6474
|
|
|
6376
6475
|
// Flatten headers
|
|
6377
|
-
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(
|
|
6378
|
-
headers.common,
|
|
6379
|
-
headers[config.method]
|
|
6380
|
-
);
|
|
6476
|
+
let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(headers.common, headers[config.method]);
|
|
6381
6477
|
|
|
6382
|
-
headers &&
|
|
6383
|
-
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
6384
|
-
(method) => {
|
|
6478
|
+
headers &&
|
|
6479
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
|
|
6385
6480
|
delete headers[method];
|
|
6386
|
-
}
|
|
6387
|
-
);
|
|
6481
|
+
});
|
|
6388
6482
|
|
|
6389
6483
|
config.headers = _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_7__["default"].concat(contextHeaders, headers);
|
|
6390
6484
|
|
|
@@ -6398,7 +6492,15 @@ class Axios {
|
|
|
6398
6492
|
|
|
6399
6493
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
6400
6494
|
|
|
6401
|
-
|
|
6495
|
+
const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
6496
|
+
const legacyInterceptorReqResOrdering =
|
|
6497
|
+
transitional && transitional.legacyInterceptorReqResOrdering;
|
|
6498
|
+
|
|
6499
|
+
if (legacyInterceptorReqResOrdering) {
|
|
6500
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
6501
|
+
} else {
|
|
6502
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
6503
|
+
}
|
|
6402
6504
|
});
|
|
6403
6505
|
|
|
6404
6506
|
const responseInterceptorChain = [];
|
|
@@ -6466,28 +6568,32 @@ class Axios {
|
|
|
6466
6568
|
// Provide aliases for supported request methods
|
|
6467
6569
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
6468
6570
|
/*eslint func-names:0*/
|
|
6469
|
-
Axios.prototype[method] = function(url, config) {
|
|
6470
|
-
return this.request(
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6571
|
+
Axios.prototype[method] = function (url, config) {
|
|
6572
|
+
return this.request(
|
|
6573
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
6574
|
+
method,
|
|
6575
|
+
url,
|
|
6576
|
+
data: (config || {}).data,
|
|
6577
|
+
})
|
|
6578
|
+
);
|
|
6475
6579
|
};
|
|
6476
6580
|
});
|
|
6477
6581
|
|
|
6478
6582
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
6479
|
-
/*eslint func-names:0*/
|
|
6480
|
-
|
|
6481
6583
|
function generateHTTPMethod(isForm) {
|
|
6482
6584
|
return function httpMethod(url, data, config) {
|
|
6483
|
-
return this.request(
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6585
|
+
return this.request(
|
|
6586
|
+
(0,_mergeConfig_js__WEBPACK_IMPORTED_MODULE_4__["default"])(config || {}, {
|
|
6587
|
+
method,
|
|
6588
|
+
headers: isForm
|
|
6589
|
+
? {
|
|
6590
|
+
'Content-Type': 'multipart/form-data',
|
|
6591
|
+
}
|
|
6592
|
+
: {},
|
|
6593
|
+
url,
|
|
6594
|
+
data,
|
|
6595
|
+
})
|
|
6596
|
+
);
|
|
6491
6597
|
};
|
|
6492
6598
|
}
|
|
6493
6599
|
|
|
@@ -6516,39 +6622,57 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6516
6622
|
|
|
6517
6623
|
|
|
6518
6624
|
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
* @param {Object} [config] The config.
|
|
6525
|
-
* @param {Object} [request] The request.
|
|
6526
|
-
* @param {Object} [response] The response.
|
|
6527
|
-
*
|
|
6528
|
-
* @returns {Error} The created error.
|
|
6529
|
-
*/
|
|
6530
|
-
function AxiosError(message, code, config, request, response) {
|
|
6531
|
-
Error.call(this);
|
|
6625
|
+
class AxiosError extends Error {
|
|
6626
|
+
static from(error, code, config, request, response, customProps) {
|
|
6627
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
6628
|
+
axiosError.cause = error;
|
|
6629
|
+
axiosError.name = error.name;
|
|
6532
6630
|
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
}
|
|
6631
|
+
// Preserve status from the original error if not already set from response
|
|
6632
|
+
if (error.status != null && axiosError.status == null) {
|
|
6633
|
+
axiosError.status = error.status;
|
|
6634
|
+
}
|
|
6538
6635
|
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
code && (this.code = code);
|
|
6542
|
-
config && (this.config = config);
|
|
6543
|
-
request && (this.request = request);
|
|
6544
|
-
if (response) {
|
|
6545
|
-
this.response = response;
|
|
6546
|
-
this.status = response.status ? response.status : null;
|
|
6636
|
+
customProps && Object.assign(axiosError, customProps);
|
|
6637
|
+
return axiosError;
|
|
6547
6638
|
}
|
|
6548
|
-
}
|
|
6549
6639
|
|
|
6550
|
-
|
|
6551
|
-
|
|
6640
|
+
/**
|
|
6641
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
6642
|
+
*
|
|
6643
|
+
* @param {string} message The error message.
|
|
6644
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
6645
|
+
* @param {Object} [config] The config.
|
|
6646
|
+
* @param {Object} [request] The request.
|
|
6647
|
+
* @param {Object} [response] The response.
|
|
6648
|
+
*
|
|
6649
|
+
* @returns {Error} The created error.
|
|
6650
|
+
*/
|
|
6651
|
+
constructor(message, code, config, request, response) {
|
|
6652
|
+
super(message);
|
|
6653
|
+
|
|
6654
|
+
// Make message enumerable to maintain backward compatibility
|
|
6655
|
+
// The native Error constructor sets message as non-enumerable,
|
|
6656
|
+
// but axios < v1.13.3 had it as enumerable
|
|
6657
|
+
Object.defineProperty(this, 'message', {
|
|
6658
|
+
value: message,
|
|
6659
|
+
enumerable: true,
|
|
6660
|
+
writable: true,
|
|
6661
|
+
configurable: true
|
|
6662
|
+
});
|
|
6663
|
+
|
|
6664
|
+
this.name = 'AxiosError';
|
|
6665
|
+
this.isAxiosError = true;
|
|
6666
|
+
code && (this.code = code);
|
|
6667
|
+
config && (this.config = config);
|
|
6668
|
+
request && (this.request = request);
|
|
6669
|
+
if (response) {
|
|
6670
|
+
this.response = response;
|
|
6671
|
+
this.status = response.status;
|
|
6672
|
+
}
|
|
6673
|
+
}
|
|
6674
|
+
|
|
6675
|
+
toJSON() {
|
|
6552
6676
|
return {
|
|
6553
6677
|
// Standard
|
|
6554
6678
|
message: this.message,
|
|
@@ -6564,62 +6688,24 @@ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].inherits(AxiosError, Error, {
|
|
|
6564
6688
|
// Axios
|
|
6565
6689
|
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toJSONObject(this.config),
|
|
6566
6690
|
code: this.code,
|
|
6567
|
-
status: this.status
|
|
6691
|
+
status: this.status,
|
|
6568
6692
|
};
|
|
6569
6693
|
}
|
|
6570
|
-
}
|
|
6571
|
-
|
|
6572
|
-
const prototype = AxiosError.prototype;
|
|
6573
|
-
const descriptors = {};
|
|
6574
|
-
|
|
6575
|
-
[
|
|
6576
|
-
'ERR_BAD_OPTION_VALUE',
|
|
6577
|
-
'ERR_BAD_OPTION',
|
|
6578
|
-
'ECONNABORTED',
|
|
6579
|
-
'ETIMEDOUT',
|
|
6580
|
-
'ERR_NETWORK',
|
|
6581
|
-
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
6582
|
-
'ERR_DEPRECATED',
|
|
6583
|
-
'ERR_BAD_RESPONSE',
|
|
6584
|
-
'ERR_BAD_REQUEST',
|
|
6585
|
-
'ERR_CANCELED',
|
|
6586
|
-
'ERR_NOT_SUPPORT',
|
|
6587
|
-
'ERR_INVALID_URL'
|
|
6588
|
-
// eslint-disable-next-line func-names
|
|
6589
|
-
].forEach(code => {
|
|
6590
|
-
descriptors[code] = {value: code};
|
|
6591
|
-
});
|
|
6592
|
-
|
|
6593
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
6594
|
-
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
6595
|
-
|
|
6596
|
-
// eslint-disable-next-line func-names
|
|
6597
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
6598
|
-
const axiosError = Object.create(prototype);
|
|
6599
|
-
|
|
6600
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(error, axiosError, function filter(obj) {
|
|
6601
|
-
return obj !== Error.prototype;
|
|
6602
|
-
}, prop => {
|
|
6603
|
-
return prop !== 'isAxiosError';
|
|
6604
|
-
});
|
|
6605
|
-
|
|
6606
|
-
const msg = error && error.message ? error.message : 'Error';
|
|
6607
|
-
|
|
6608
|
-
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
|
6609
|
-
const errCode = code == null && error ? error.code : code;
|
|
6610
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
6611
|
-
|
|
6612
|
-
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
|
6613
|
-
if (error && axiosError.cause == null) {
|
|
6614
|
-
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
|
6615
|
-
}
|
|
6616
|
-
|
|
6617
|
-
axiosError.name = (error && error.name) || 'Error';
|
|
6618
|
-
|
|
6619
|
-
customProps && Object.assign(axiosError, customProps);
|
|
6694
|
+
}
|
|
6620
6695
|
|
|
6621
|
-
|
|
6622
|
-
|
|
6696
|
+
// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
6697
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
6698
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
6699
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
6700
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
6701
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
6702
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
6703
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
6704
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
6705
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
6706
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
6707
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
6708
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
6623
6709
|
|
|
6624
6710
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosError);
|
|
6625
6711
|
|
|
@@ -6645,16 +6731,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6645
6731
|
|
|
6646
6732
|
const $internals = Symbol('internals');
|
|
6647
6733
|
|
|
6734
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
6735
|
+
|
|
6736
|
+
function assertValidHeaderValue(value, header) {
|
|
6737
|
+
if (value === false || value == null) {
|
|
6738
|
+
return;
|
|
6739
|
+
}
|
|
6740
|
+
|
|
6741
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value)) {
|
|
6742
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
6743
|
+
return;
|
|
6744
|
+
}
|
|
6745
|
+
|
|
6746
|
+
if (!isValidHeaderValue(String(value))) {
|
|
6747
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
|
|
6648
6751
|
function normalizeHeader(header) {
|
|
6649
6752
|
return header && String(header).trim().toLowerCase();
|
|
6650
6753
|
}
|
|
6651
6754
|
|
|
6755
|
+
function stripTrailingCRLF(str) {
|
|
6756
|
+
let end = str.length;
|
|
6757
|
+
|
|
6758
|
+
while (end > 0) {
|
|
6759
|
+
const charCode = str.charCodeAt(end - 1);
|
|
6760
|
+
|
|
6761
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
6762
|
+
break;
|
|
6763
|
+
}
|
|
6764
|
+
|
|
6765
|
+
end -= 1;
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6768
|
+
return end === str.length ? str : str.slice(0, end);
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6652
6771
|
function normalizeValue(value) {
|
|
6653
6772
|
if (value === false || value == null) {
|
|
6654
6773
|
return value;
|
|
6655
6774
|
}
|
|
6656
6775
|
|
|
6657
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : String(value);
|
|
6776
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
6658
6777
|
}
|
|
6659
6778
|
|
|
6660
6779
|
function parseTokens(str) {
|
|
@@ -6692,8 +6811,10 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
6692
6811
|
}
|
|
6693
6812
|
|
|
6694
6813
|
function formatHeader(header) {
|
|
6695
|
-
return header
|
|
6696
|
-
.
|
|
6814
|
+
return header
|
|
6815
|
+
.trim()
|
|
6816
|
+
.toLowerCase()
|
|
6817
|
+
.replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
6697
6818
|
return char.toUpperCase() + str;
|
|
6698
6819
|
});
|
|
6699
6820
|
}
|
|
@@ -6701,12 +6822,12 @@ function formatHeader(header) {
|
|
|
6701
6822
|
function buildAccessors(obj, header) {
|
|
6702
6823
|
const accessorName = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toCamelCase(' ' + header);
|
|
6703
6824
|
|
|
6704
|
-
['get', 'set', 'has'].forEach(methodName => {
|
|
6825
|
+
['get', 'set', 'has'].forEach((methodName) => {
|
|
6705
6826
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
6706
|
-
value: function(arg1, arg2, arg3) {
|
|
6827
|
+
value: function (arg1, arg2, arg3) {
|
|
6707
6828
|
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
6708
6829
|
},
|
|
6709
|
-
configurable: true
|
|
6830
|
+
configurable: true,
|
|
6710
6831
|
});
|
|
6711
6832
|
});
|
|
6712
6833
|
}
|
|
@@ -6728,7 +6849,13 @@ class AxiosHeaders {
|
|
|
6728
6849
|
|
|
6729
6850
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(self, lHeader);
|
|
6730
6851
|
|
|
6731
|
-
if
|
|
6852
|
+
if (
|
|
6853
|
+
!key ||
|
|
6854
|
+
self[key] === undefined ||
|
|
6855
|
+
_rewrite === true ||
|
|
6856
|
+
(_rewrite === undefined && self[key] !== false)
|
|
6857
|
+
) {
|
|
6858
|
+
assertValidHeaderValue(_value, _header);
|
|
6732
6859
|
self[key || _header] = normalizeValue(_value);
|
|
6733
6860
|
}
|
|
6734
6861
|
}
|
|
@@ -6737,21 +6864,26 @@ class AxiosHeaders {
|
|
|
6737
6864
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
6738
6865
|
|
|
6739
6866
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(header) || header instanceof this.constructor) {
|
|
6740
|
-
setHeaders(header, valueOrRewrite)
|
|
6741
|
-
} else if(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
6867
|
+
setHeaders(header, valueOrRewrite);
|
|
6868
|
+
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
6742
6869
|
setHeaders((0,_helpers_parseHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"])(header), valueOrRewrite);
|
|
6743
6870
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(header) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isIterable(header)) {
|
|
6744
|
-
let obj = {},
|
|
6871
|
+
let obj = {},
|
|
6872
|
+
dest,
|
|
6873
|
+
key;
|
|
6745
6874
|
for (const entry of header) {
|
|
6746
6875
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(entry)) {
|
|
6747
6876
|
throw TypeError('Object iterator must return a key-value pair');
|
|
6748
6877
|
}
|
|
6749
6878
|
|
|
6750
|
-
obj[key = entry[0]] = (dest = obj[key])
|
|
6751
|
-
|
|
6879
|
+
obj[(key = entry[0])] = (dest = obj[key])
|
|
6880
|
+
? _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(dest)
|
|
6881
|
+
? [...dest, entry[1]]
|
|
6882
|
+
: [dest, entry[1]]
|
|
6883
|
+
: entry[1];
|
|
6752
6884
|
}
|
|
6753
6885
|
|
|
6754
|
-
setHeaders(obj, valueOrRewrite)
|
|
6886
|
+
setHeaders(obj, valueOrRewrite);
|
|
6755
6887
|
} else {
|
|
6756
6888
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
6757
6889
|
}
|
|
@@ -6795,7 +6927,11 @@ class AxiosHeaders {
|
|
|
6795
6927
|
if (header) {
|
|
6796
6928
|
const key = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].findKey(this, header);
|
|
6797
6929
|
|
|
6798
|
-
return !!(
|
|
6930
|
+
return !!(
|
|
6931
|
+
key &&
|
|
6932
|
+
this[key] !== undefined &&
|
|
6933
|
+
(!matcher || matchHeaderValue(this, this[key], key, matcher))
|
|
6934
|
+
);
|
|
6799
6935
|
}
|
|
6800
6936
|
|
|
6801
6937
|
return false;
|
|
@@ -6835,7 +6971,7 @@ class AxiosHeaders {
|
|
|
6835
6971
|
|
|
6836
6972
|
while (i--) {
|
|
6837
6973
|
const key = keys[i];
|
|
6838
|
-
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
6974
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
6839
6975
|
delete this[key];
|
|
6840
6976
|
deleted = true;
|
|
6841
6977
|
}
|
|
@@ -6879,7 +7015,9 @@ class AxiosHeaders {
|
|
|
6879
7015
|
const obj = Object.create(null);
|
|
6880
7016
|
|
|
6881
7017
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(this, (value, header) => {
|
|
6882
|
-
value != null &&
|
|
7018
|
+
value != null &&
|
|
7019
|
+
value !== false &&
|
|
7020
|
+
(obj[header] = asStrings && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) ? value.join(', ') : value);
|
|
6883
7021
|
});
|
|
6884
7022
|
|
|
6885
7023
|
return obj;
|
|
@@ -6890,11 +7028,13 @@ class AxiosHeaders {
|
|
|
6890
7028
|
}
|
|
6891
7029
|
|
|
6892
7030
|
toString() {
|
|
6893
|
-
return Object.entries(this.toJSON())
|
|
7031
|
+
return Object.entries(this.toJSON())
|
|
7032
|
+
.map(([header, value]) => header + ': ' + value)
|
|
7033
|
+
.join('\n');
|
|
6894
7034
|
}
|
|
6895
7035
|
|
|
6896
7036
|
getSetCookie() {
|
|
6897
|
-
return this.get(
|
|
7037
|
+
return this.get('set-cookie') || [];
|
|
6898
7038
|
}
|
|
6899
7039
|
|
|
6900
7040
|
get [Symbol.toStringTag]() {
|
|
@@ -6914,9 +7054,12 @@ class AxiosHeaders {
|
|
|
6914
7054
|
}
|
|
6915
7055
|
|
|
6916
7056
|
static accessor(header) {
|
|
6917
|
-
const internals =
|
|
6918
|
-
|
|
6919
|
-
|
|
7057
|
+
const internals =
|
|
7058
|
+
(this[$internals] =
|
|
7059
|
+
this[$internals] =
|
|
7060
|
+
{
|
|
7061
|
+
accessors: {},
|
|
7062
|
+
});
|
|
6920
7063
|
|
|
6921
7064
|
const accessors = internals.accessors;
|
|
6922
7065
|
const prototype = this.prototype;
|
|
@@ -6936,17 +7079,24 @@ class AxiosHeaders {
|
|
|
6936
7079
|
}
|
|
6937
7080
|
}
|
|
6938
7081
|
|
|
6939
|
-
AxiosHeaders.accessor([
|
|
7082
|
+
AxiosHeaders.accessor([
|
|
7083
|
+
'Content-Type',
|
|
7084
|
+
'Content-Length',
|
|
7085
|
+
'Accept',
|
|
7086
|
+
'Accept-Encoding',
|
|
7087
|
+
'User-Agent',
|
|
7088
|
+
'Authorization',
|
|
7089
|
+
]);
|
|
6940
7090
|
|
|
6941
7091
|
// reserved names hotfix
|
|
6942
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
7092
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
6943
7093
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
6944
7094
|
return {
|
|
6945
7095
|
get: () => value,
|
|
6946
7096
|
set(headerValue) {
|
|
6947
7097
|
this[mapped] = headerValue;
|
|
6948
|
-
}
|
|
6949
|
-
}
|
|
7098
|
+
},
|
|
7099
|
+
};
|
|
6950
7100
|
});
|
|
6951
7101
|
|
|
6952
7102
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
|
|
@@ -6966,7 +7116,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6966
7116
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6967
7117
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6968
7118
|
/* harmony export */ });
|
|
6969
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
7119
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
6970
7120
|
|
|
6971
7121
|
|
|
6972
7122
|
|
|
@@ -6981,6 +7131,7 @@ class InterceptorManager {
|
|
|
6981
7131
|
*
|
|
6982
7132
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
6983
7133
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
7134
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
6984
7135
|
*
|
|
6985
7136
|
* @return {Number} An ID used to remove interceptor later
|
|
6986
7137
|
*/
|
|
@@ -6989,7 +7140,7 @@ class InterceptorManager {
|
|
|
6989
7140
|
fulfilled,
|
|
6990
7141
|
rejected,
|
|
6991
7142
|
synchronous: options ? options.synchronous : false,
|
|
6992
|
-
runWhen: options ? options.runWhen : null
|
|
7143
|
+
runWhen: options ? options.runWhen : null,
|
|
6993
7144
|
});
|
|
6994
7145
|
return this.handlers.length - 1;
|
|
6995
7146
|
}
|
|
@@ -7135,10 +7286,7 @@ function dispatchRequest(config) {
|
|
|
7135
7286
|
config.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(config.headers);
|
|
7136
7287
|
|
|
7137
7288
|
// Transform request data
|
|
7138
|
-
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7139
|
-
config,
|
|
7140
|
-
config.transformRequest
|
|
7141
|
-
);
|
|
7289
|
+
config.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformRequest);
|
|
7142
7290
|
|
|
7143
7291
|
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
7144
7292
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
@@ -7146,36 +7294,35 @@ function dispatchRequest(config) {
|
|
|
7146
7294
|
|
|
7147
7295
|
const adapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_5__["default"].getAdapter(config.adapter || _defaults_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].adapter, config);
|
|
7148
7296
|
|
|
7149
|
-
return adapter(config).then(
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
// Transform response data
|
|
7153
|
-
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7154
|
-
config,
|
|
7155
|
-
config.transformResponse,
|
|
7156
|
-
response
|
|
7157
|
-
);
|
|
7158
|
-
|
|
7159
|
-
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
7160
|
-
|
|
7161
|
-
return response;
|
|
7162
|
-
}, function onAdapterRejection(reason) {
|
|
7163
|
-
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
7297
|
+
return adapter(config).then(
|
|
7298
|
+
function onAdapterResolution(response) {
|
|
7164
7299
|
throwIfCancellationRequested(config);
|
|
7165
7300
|
|
|
7166
7301
|
// Transform response data
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7302
|
+
response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(config, config.transformResponse, response);
|
|
7303
|
+
|
|
7304
|
+
response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(response.headers);
|
|
7305
|
+
|
|
7306
|
+
return response;
|
|
7307
|
+
},
|
|
7308
|
+
function onAdapterRejection(reason) {
|
|
7309
|
+
if (!(0,_cancel_isCancel_js__WEBPACK_IMPORTED_MODULE_1__["default"])(reason)) {
|
|
7310
|
+
throwIfCancellationRequested(config);
|
|
7311
|
+
|
|
7312
|
+
// Transform response data
|
|
7313
|
+
if (reason && reason.response) {
|
|
7314
|
+
reason.response.data = _transformData_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(
|
|
7315
|
+
config,
|
|
7316
|
+
config.transformResponse,
|
|
7317
|
+
reason.response
|
|
7318
|
+
);
|
|
7319
|
+
reason.response.headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_4__["default"].from(reason.response.headers);
|
|
7320
|
+
}
|
|
7174
7321
|
}
|
|
7175
|
-
}
|
|
7176
7322
|
|
|
7177
|
-
|
|
7178
|
-
|
|
7323
|
+
return Promise.reject(reason);
|
|
7324
|
+
}
|
|
7325
|
+
);
|
|
7179
7326
|
}
|
|
7180
7327
|
|
|
7181
7328
|
|
|
@@ -7198,7 +7345,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7198
7345
|
|
|
7199
7346
|
|
|
7200
7347
|
|
|
7201
|
-
const headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing;
|
|
7348
|
+
const headersToObject = (thing) => (thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"] ? { ...thing } : thing);
|
|
7202
7349
|
|
|
7203
7350
|
/**
|
|
7204
7351
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -7216,7 +7363,7 @@ function mergeConfig(config1, config2) {
|
|
|
7216
7363
|
|
|
7217
7364
|
function getMergedValue(target, source, prop, caseless) {
|
|
7218
7365
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
7219
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({caseless}, target, source);
|
|
7366
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge.call({ caseless }, target, source);
|
|
7220
7367
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isPlainObject(source)) {
|
|
7221
7368
|
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge({}, source);
|
|
7222
7369
|
} else if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(source)) {
|
|
@@ -7225,7 +7372,6 @@ function mergeConfig(config1, config2) {
|
|
|
7225
7372
|
return source;
|
|
7226
7373
|
}
|
|
7227
7374
|
|
|
7228
|
-
// eslint-disable-next-line consistent-return
|
|
7229
7375
|
function mergeDeepProperties(a, b, prop, caseless) {
|
|
7230
7376
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(b)) {
|
|
7231
7377
|
return getMergedValue(a, b, prop, caseless);
|
|
@@ -7288,11 +7434,13 @@ function mergeConfig(config1, config2) {
|
|
|
7288
7434
|
socketPath: defaultToConfig2,
|
|
7289
7435
|
responseEncoding: defaultToConfig2,
|
|
7290
7436
|
validateStatus: mergeDirectKeys,
|
|
7291
|
-
headers: (a, b, prop) =>
|
|
7437
|
+
headers: (a, b, prop) =>
|
|
7438
|
+
mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
|
|
7292
7439
|
};
|
|
7293
7440
|
|
|
7294
|
-
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
7295
|
-
|
|
7441
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
7442
|
+
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
7443
|
+
const merge = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
7296
7444
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
7297
7445
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
7298
7446
|
});
|
|
@@ -7332,13 +7480,17 @@ function settle(resolve, reject, response) {
|
|
|
7332
7480
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
7333
7481
|
resolve(response);
|
|
7334
7482
|
} else {
|
|
7335
|
-
reject(
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7483
|
+
reject(
|
|
7484
|
+
new _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"](
|
|
7485
|
+
'Request failed with status code ' + response.status,
|
|
7486
|
+
[_AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_REQUEST, _AxiosError_js__WEBPACK_IMPORTED_MODULE_0__["default"].ERR_BAD_RESPONSE][
|
|
7487
|
+
Math.floor(response.status / 100) - 4
|
|
7488
|
+
],
|
|
7489
|
+
response.config,
|
|
7490
|
+
response.request,
|
|
7491
|
+
response
|
|
7492
|
+
)
|
|
7493
|
+
);
|
|
7342
7494
|
}
|
|
7343
7495
|
}
|
|
7344
7496
|
|
|
@@ -7355,7 +7507,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7355
7507
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7356
7508
|
/* harmony export */ "default": () => (/* binding */ transformData)
|
|
7357
7509
|
/* harmony export */ });
|
|
7358
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
7510
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
7359
7511
|
/* harmony import */ var _defaults_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../defaults/index.js */ "./node_modules/axios/lib/defaults/index.js");
|
|
7360
7512
|
/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
|
|
7361
7513
|
|
|
@@ -7443,96 +7595,107 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
7443
7595
|
}
|
|
7444
7596
|
|
|
7445
7597
|
const defaults = {
|
|
7446
|
-
|
|
7447
7598
|
transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
7448
7599
|
|
|
7449
7600
|
adapter: ['xhr', 'http', 'fetch'],
|
|
7450
7601
|
|
|
7451
|
-
transformRequest: [
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7602
|
+
transformRequest: [
|
|
7603
|
+
function transformRequest(data, headers) {
|
|
7604
|
+
const contentType = headers.getContentType() || '';
|
|
7605
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
7606
|
+
const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(data);
|
|
7455
7607
|
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7608
|
+
if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isHTMLForm(data)) {
|
|
7609
|
+
data = new FormData(data);
|
|
7610
|
+
}
|
|
7459
7611
|
|
|
7460
|
-
|
|
7612
|
+
const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFormData(data);
|
|
7461
7613
|
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7614
|
+
if (isFormData) {
|
|
7615
|
+
return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_6__["default"])(data)) : data;
|
|
7616
|
+
}
|
|
7465
7617
|
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7618
|
+
if (
|
|
7619
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBuffer(data) ||
|
|
7620
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(data) ||
|
|
7621
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStream(data) ||
|
|
7622
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFile(data) ||
|
|
7623
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBlob(data) ||
|
|
7624
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)
|
|
7625
|
+
) {
|
|
7626
|
+
return data;
|
|
7627
|
+
}
|
|
7628
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArrayBufferView(data)) {
|
|
7629
|
+
return data.buffer;
|
|
7630
|
+
}
|
|
7631
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(data)) {
|
|
7632
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
7633
|
+
return data.toString();
|
|
7634
|
+
}
|
|
7482
7635
|
|
|
7483
|
-
|
|
7636
|
+
let isFileList;
|
|
7484
7637
|
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7638
|
+
if (isObjectPayload) {
|
|
7639
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
7640
|
+
return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_4__["default"])(data, this.formSerializer).toString();
|
|
7641
|
+
}
|
|
7489
7642
|
|
|
7490
|
-
|
|
7491
|
-
|
|
7643
|
+
if (
|
|
7644
|
+
(isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(data)) ||
|
|
7645
|
+
contentType.indexOf('multipart/form-data') > -1
|
|
7646
|
+
) {
|
|
7647
|
+
const _FormData = this.env && this.env.FormData;
|
|
7492
7648
|
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7649
|
+
return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
|
7650
|
+
isFileList ? { 'files[]': data } : data,
|
|
7651
|
+
_FormData && new _FormData(),
|
|
7652
|
+
this.formSerializer
|
|
7653
|
+
);
|
|
7654
|
+
}
|
|
7498
7655
|
}
|
|
7499
|
-
}
|
|
7500
7656
|
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7657
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
7658
|
+
headers.setContentType('application/json', false);
|
|
7659
|
+
return stringifySafely(data);
|
|
7660
|
+
}
|
|
7505
7661
|
|
|
7506
|
-
|
|
7507
|
-
|
|
7662
|
+
return data;
|
|
7663
|
+
},
|
|
7664
|
+
],
|
|
7508
7665
|
|
|
7509
|
-
transformResponse: [
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7666
|
+
transformResponse: [
|
|
7667
|
+
function transformResponse(data) {
|
|
7668
|
+
const transitional = this.transitional || defaults.transitional;
|
|
7669
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
7670
|
+
const JSONRequested = this.responseType === 'json';
|
|
7513
7671
|
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7672
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isResponse(data) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReadableStream(data)) {
|
|
7673
|
+
return data;
|
|
7674
|
+
}
|
|
7517
7675
|
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7676
|
+
if (
|
|
7677
|
+
data &&
|
|
7678
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(data) &&
|
|
7679
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
7680
|
+
) {
|
|
7681
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
7682
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
7521
7683
|
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7684
|
+
try {
|
|
7685
|
+
return JSON.parse(data, this.parseReviver);
|
|
7686
|
+
} catch (e) {
|
|
7687
|
+
if (strictJSONParsing) {
|
|
7688
|
+
if (e.name === 'SyntaxError') {
|
|
7689
|
+
throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_RESPONSE, this, null, this.response);
|
|
7690
|
+
}
|
|
7691
|
+
throw e;
|
|
7528
7692
|
}
|
|
7529
|
-
throw e;
|
|
7530
7693
|
}
|
|
7531
7694
|
}
|
|
7532
|
-
}
|
|
7533
7695
|
|
|
7534
|
-
|
|
7535
|
-
|
|
7696
|
+
return data;
|
|
7697
|
+
},
|
|
7698
|
+
],
|
|
7536
7699
|
|
|
7537
7700
|
/**
|
|
7538
7701
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
@@ -7548,7 +7711,7 @@ const defaults = {
|
|
|
7548
7711
|
|
|
7549
7712
|
env: {
|
|
7550
7713
|
FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.FormData,
|
|
7551
|
-
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob
|
|
7714
|
+
Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_5__["default"].classes.Blob,
|
|
7552
7715
|
},
|
|
7553
7716
|
|
|
7554
7717
|
validateStatus: function validateStatus(status) {
|
|
@@ -7557,10 +7720,10 @@ const defaults = {
|
|
|
7557
7720
|
|
|
7558
7721
|
headers: {
|
|
7559
7722
|
common: {
|
|
7560
|
-
|
|
7561
|
-
'Content-Type': undefined
|
|
7562
|
-
}
|
|
7563
|
-
}
|
|
7723
|
+
Accept: 'application/json, text/plain, */*',
|
|
7724
|
+
'Content-Type': undefined,
|
|
7725
|
+
},
|
|
7726
|
+
},
|
|
7564
7727
|
};
|
|
7565
7728
|
|
|
7566
7729
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
@@ -7587,7 +7750,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7587
7750
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
7588
7751
|
silentJSONParsing: true,
|
|
7589
7752
|
forcedJSONParsing: true,
|
|
7590
|
-
clarifyTimeoutError: false
|
|
7753
|
+
clarifyTimeoutError: false,
|
|
7754
|
+
legacyInterceptorReqResOrdering: true,
|
|
7591
7755
|
});
|
|
7592
7756
|
|
|
7593
7757
|
|
|
@@ -7603,7 +7767,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7603
7767
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7604
7768
|
/* harmony export */ VERSION: () => (/* binding */ VERSION)
|
|
7605
7769
|
/* harmony export */ });
|
|
7606
|
-
const VERSION = "1.
|
|
7770
|
+
const VERSION = "1.15.0";
|
|
7607
7771
|
|
|
7608
7772
|
/***/ }),
|
|
7609
7773
|
|
|
@@ -7638,7 +7802,7 @@ function encode(str) {
|
|
|
7638
7802
|
')': '%29',
|
|
7639
7803
|
'~': '%7E',
|
|
7640
7804
|
'%20': '+',
|
|
7641
|
-
'%00': '\x00'
|
|
7805
|
+
'%00': '\x00',
|
|
7642
7806
|
};
|
|
7643
7807
|
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
7644
7808
|
return charMap[match];
|
|
@@ -7666,13 +7830,17 @@ prototype.append = function append(name, value) {
|
|
|
7666
7830
|
};
|
|
7667
7831
|
|
|
7668
7832
|
prototype.toString = function toString(encoder) {
|
|
7669
|
-
const _encode = encoder
|
|
7670
|
-
|
|
7671
|
-
|
|
7833
|
+
const _encode = encoder
|
|
7834
|
+
? function (value) {
|
|
7835
|
+
return encoder.call(this, value, encode);
|
|
7836
|
+
}
|
|
7837
|
+
: encode;
|
|
7672
7838
|
|
|
7673
|
-
return this._pairs
|
|
7674
|
-
|
|
7675
|
-
|
|
7839
|
+
return this._pairs
|
|
7840
|
+
.map(function each(pair) {
|
|
7841
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
7842
|
+
}, '')
|
|
7843
|
+
.join('&');
|
|
7676
7844
|
};
|
|
7677
7845
|
|
|
7678
7846
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosURLSearchParams);
|
|
@@ -7817,19 +7985,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7817
7985
|
|
|
7818
7986
|
|
|
7819
7987
|
/**
|
|
7820
|
-
* It replaces
|
|
7821
|
-
*
|
|
7988
|
+
* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
|
|
7989
|
+
* their plain counterparts (`:`, `$`, `,`, `+`).
|
|
7822
7990
|
*
|
|
7823
7991
|
* @param {string} val The value to be encoded.
|
|
7824
7992
|
*
|
|
7825
7993
|
* @returns {string} The encoded value.
|
|
7826
7994
|
*/
|
|
7827
7995
|
function encode(val) {
|
|
7828
|
-
return encodeURIComponent(val)
|
|
7829
|
-
replace(/%3A/gi, ':')
|
|
7830
|
-
replace(/%24/g, '$')
|
|
7831
|
-
replace(/%2C/gi, ',')
|
|
7832
|
-
replace(/%20/g, '+');
|
|
7996
|
+
return encodeURIComponent(val)
|
|
7997
|
+
.replace(/%3A/gi, ':')
|
|
7998
|
+
.replace(/%24/g, '$')
|
|
7999
|
+
.replace(/%2C/gi, ',')
|
|
8000
|
+
.replace(/%20/g, '+');
|
|
7833
8001
|
}
|
|
7834
8002
|
|
|
7835
8003
|
/**
|
|
@@ -7842,33 +8010,32 @@ function encode(val) {
|
|
|
7842
8010
|
* @returns {string} The formatted url
|
|
7843
8011
|
*/
|
|
7844
8012
|
function buildURL(url, params, options) {
|
|
7845
|
-
/*eslint no-param-reassign:0*/
|
|
7846
8013
|
if (!params) {
|
|
7847
8014
|
return url;
|
|
7848
8015
|
}
|
|
7849
|
-
|
|
7850
|
-
const _encode = options && options.encode || encode;
|
|
7851
8016
|
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
8017
|
+
const _encode = (options && options.encode) || encode;
|
|
8018
|
+
|
|
8019
|
+
const _options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(options)
|
|
8020
|
+
? {
|
|
8021
|
+
serialize: options,
|
|
8022
|
+
}
|
|
8023
|
+
: options;
|
|
7857
8024
|
|
|
7858
|
-
const serializeFn =
|
|
8025
|
+
const serializeFn = _options && _options.serialize;
|
|
7859
8026
|
|
|
7860
8027
|
let serializedParams;
|
|
7861
8028
|
|
|
7862
8029
|
if (serializeFn) {
|
|
7863
|
-
serializedParams = serializeFn(params,
|
|
8030
|
+
serializedParams = serializeFn(params, _options);
|
|
7864
8031
|
} else {
|
|
7865
|
-
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
7866
|
-
params.toString()
|
|
7867
|
-
new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params,
|
|
8032
|
+
serializedParams = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isURLSearchParams(params)
|
|
8033
|
+
? params.toString()
|
|
8034
|
+
: new _helpers_AxiosURLSearchParams_js__WEBPACK_IMPORTED_MODULE_1__["default"](params, _options).toString(_encode);
|
|
7868
8035
|
}
|
|
7869
8036
|
|
|
7870
8037
|
if (serializedParams) {
|
|
7871
|
-
const hashmarkIndex = url.indexOf(
|
|
8038
|
+
const hashmarkIndex = url.indexOf('#');
|
|
7872
8039
|
|
|
7873
8040
|
if (hashmarkIndex !== -1) {
|
|
7874
8041
|
url = url.slice(0, hashmarkIndex);
|
|
@@ -7929,7 +8096,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7929
8096
|
|
|
7930
8097
|
|
|
7931
8098
|
const composeSignals = (signals, timeout) => {
|
|
7932
|
-
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
8099
|
+
const { length } = (signals = signals ? signals.filter(Boolean) : []);
|
|
7933
8100
|
|
|
7934
8101
|
if (timeout || length) {
|
|
7935
8102
|
let controller = new AbortController();
|
|
@@ -7941,35 +8108,43 @@ const composeSignals = (signals, timeout) => {
|
|
|
7941
8108
|
aborted = true;
|
|
7942
8109
|
unsubscribe();
|
|
7943
8110
|
const err = reason instanceof Error ? reason : this.reason;
|
|
7944
|
-
controller.abort(
|
|
8111
|
+
controller.abort(
|
|
8112
|
+
err instanceof _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
8113
|
+
? err
|
|
8114
|
+
: new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_0__["default"](err instanceof Error ? err.message : err)
|
|
8115
|
+
);
|
|
7945
8116
|
}
|
|
7946
|
-
}
|
|
8117
|
+
};
|
|
7947
8118
|
|
|
7948
|
-
let timer =
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
8119
|
+
let timer =
|
|
8120
|
+
timeout &&
|
|
8121
|
+
setTimeout(() => {
|
|
8122
|
+
timer = null;
|
|
8123
|
+
onabort(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](`timeout of ${timeout}ms exceeded`, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ETIMEDOUT));
|
|
8124
|
+
}, timeout);
|
|
7952
8125
|
|
|
7953
8126
|
const unsubscribe = () => {
|
|
7954
8127
|
if (signals) {
|
|
7955
8128
|
timer && clearTimeout(timer);
|
|
7956
8129
|
timer = null;
|
|
7957
|
-
signals.forEach(signal => {
|
|
7958
|
-
signal.unsubscribe
|
|
8130
|
+
signals.forEach((signal) => {
|
|
8131
|
+
signal.unsubscribe
|
|
8132
|
+
? signal.unsubscribe(onabort)
|
|
8133
|
+
: signal.removeEventListener('abort', onabort);
|
|
7959
8134
|
});
|
|
7960
8135
|
signals = null;
|
|
7961
8136
|
}
|
|
7962
|
-
}
|
|
8137
|
+
};
|
|
7963
8138
|
|
|
7964
8139
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
7965
8140
|
|
|
7966
|
-
const {signal} = controller;
|
|
8141
|
+
const { signal } = controller;
|
|
7967
8142
|
|
|
7968
8143
|
signal.unsubscribe = () => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(unsubscribe);
|
|
7969
8144
|
|
|
7970
8145
|
return signal;
|
|
7971
8146
|
}
|
|
7972
|
-
}
|
|
8147
|
+
};
|
|
7973
8148
|
|
|
7974
8149
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (composeSignals);
|
|
7975
8150
|
|
|
@@ -7986,61 +8161,56 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7986
8161
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7987
8162
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7988
8163
|
/* harmony export */ });
|
|
7989
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
8164
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
7990
8165
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
7991
8166
|
|
|
7992
8167
|
|
|
7993
8168
|
|
|
7994
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
if (typeof document === 'undefined') return;
|
|
8169
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__["default"].hasStandardBrowserEnv
|
|
8170
|
+
? // Standard browser envs support document.cookie
|
|
8171
|
+
{
|
|
8172
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
8173
|
+
if (typeof document === 'undefined') return;
|
|
8000
8174
|
|
|
8001
|
-
|
|
8175
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
8002
8176
|
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8177
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isNumber(expires)) {
|
|
8178
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
8179
|
+
}
|
|
8180
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(path)) {
|
|
8181
|
+
cookie.push(`path=${path}`);
|
|
8182
|
+
}
|
|
8183
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(domain)) {
|
|
8184
|
+
cookie.push(`domain=${domain}`);
|
|
8185
|
+
}
|
|
8186
|
+
if (secure === true) {
|
|
8187
|
+
cookie.push('secure');
|
|
8188
|
+
}
|
|
8189
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(sameSite)) {
|
|
8190
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
8191
|
+
}
|
|
8018
8192
|
|
|
8019
|
-
|
|
8020
|
-
|
|
8193
|
+
document.cookie = cookie.join('; ');
|
|
8194
|
+
},
|
|
8021
8195
|
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8196
|
+
read(name) {
|
|
8197
|
+
if (typeof document === 'undefined') return null;
|
|
8198
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
8199
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
8200
|
+
},
|
|
8027
8201
|
|
|
8028
|
-
|
|
8029
|
-
|
|
8202
|
+
remove(name) {
|
|
8203
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
8204
|
+
},
|
|
8030
8205
|
}
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
return null;
|
|
8040
|
-
},
|
|
8041
|
-
remove() {}
|
|
8042
|
-
});
|
|
8043
|
-
|
|
8206
|
+
: // Non-standard browser env (web workers, react-native) lack needed support.
|
|
8207
|
+
{
|
|
8208
|
+
write() {},
|
|
8209
|
+
read() {
|
|
8210
|
+
return null;
|
|
8211
|
+
},
|
|
8212
|
+
remove() {},
|
|
8213
|
+
});
|
|
8044
8214
|
|
|
8045
8215
|
|
|
8046
8216
|
/***/ }),
|
|
@@ -8072,7 +8242,7 @@ function parsePropPath(name) {
|
|
|
8072
8242
|
// foo.x.y.z
|
|
8073
8243
|
// foo-x-y-z
|
|
8074
8244
|
// foo x y z
|
|
8075
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
8245
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
8076
8246
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
8077
8247
|
});
|
|
8078
8248
|
}
|
|
@@ -8178,6 +8348,10 @@ function isAbsoluteURL(url) {
|
|
|
8178
8348
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
8179
8349
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
8180
8350
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
8351
|
+
if (typeof url !== 'string') {
|
|
8352
|
+
return false;
|
|
8353
|
+
}
|
|
8354
|
+
|
|
8181
8355
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
8182
8356
|
}
|
|
8183
8357
|
|
|
@@ -8194,7 +8368,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8194
8368
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8195
8369
|
/* harmony export */ "default": () => (/* binding */ isAxiosError)
|
|
8196
8370
|
/* harmony export */ });
|
|
8197
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
8371
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
8198
8372
|
|
|
8199
8373
|
|
|
8200
8374
|
|
|
@@ -8207,7 +8381,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8207
8381
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
8208
8382
|
*/
|
|
8209
8383
|
function isAxiosError(payload) {
|
|
8210
|
-
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) &&
|
|
8384
|
+
return _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isObject(payload) && payload.isAxiosError === true;
|
|
8211
8385
|
}
|
|
8212
8386
|
|
|
8213
8387
|
|
|
@@ -8226,18 +8400,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8226
8400
|
/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
|
|
8227
8401
|
|
|
8228
8402
|
|
|
8229
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
8230
|
-
|
|
8403
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv
|
|
8404
|
+
? ((origin, isMSIE) => (url) => {
|
|
8405
|
+
url = new URL(url, _platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin);
|
|
8231
8406
|
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
})(
|
|
8238
|
-
|
|
8239
|
-
|
|
8240
|
-
)
|
|
8407
|
+
return (
|
|
8408
|
+
origin.protocol === url.protocol &&
|
|
8409
|
+
origin.host === url.host &&
|
|
8410
|
+
(isMSIE || origin.port === url.port)
|
|
8411
|
+
);
|
|
8412
|
+
})(
|
|
8413
|
+
new URL(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].origin),
|
|
8414
|
+
_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator && /(msie|trident)/i.test(_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].navigator.userAgent)
|
|
8415
|
+
)
|
|
8416
|
+
: () => true);
|
|
8241
8417
|
|
|
8242
8418
|
|
|
8243
8419
|
/***/ }),
|
|
@@ -8268,7 +8444,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8268
8444
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8269
8445
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
8270
8446
|
/* harmony export */ });
|
|
8271
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
8447
|
+
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
|
|
8272
8448
|
|
|
8273
8449
|
|
|
8274
8450
|
|
|
@@ -8276,10 +8452,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8276
8452
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
8277
8453
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
8278
8454
|
const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toObjectSet([
|
|
8279
|
-
'age',
|
|
8280
|
-
'
|
|
8281
|
-
'
|
|
8282
|
-
'
|
|
8455
|
+
'age',
|
|
8456
|
+
'authorization',
|
|
8457
|
+
'content-length',
|
|
8458
|
+
'content-type',
|
|
8459
|
+
'etag',
|
|
8460
|
+
'expires',
|
|
8461
|
+
'from',
|
|
8462
|
+
'host',
|
|
8463
|
+
'if-modified-since',
|
|
8464
|
+
'if-unmodified-since',
|
|
8465
|
+
'last-modified',
|
|
8466
|
+
'location',
|
|
8467
|
+
'max-forwards',
|
|
8468
|
+
'proxy-authorization',
|
|
8469
|
+
'referer',
|
|
8470
|
+
'retry-after',
|
|
8471
|
+
'user-agent',
|
|
8283
8472
|
]);
|
|
8284
8473
|
|
|
8285
8474
|
/**
|
|
@@ -8296,31 +8485,32 @@ const ignoreDuplicateOf = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toOb
|
|
|
8296
8485
|
*
|
|
8297
8486
|
* @returns {Object} Headers parsed into an object
|
|
8298
8487
|
*/
|
|
8299
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rawHeaders => {
|
|
8488
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((rawHeaders) => {
|
|
8300
8489
|
const parsed = {};
|
|
8301
8490
|
let key;
|
|
8302
8491
|
let val;
|
|
8303
8492
|
let i;
|
|
8304
8493
|
|
|
8305
|
-
rawHeaders &&
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8494
|
+
rawHeaders &&
|
|
8495
|
+
rawHeaders.split('\n').forEach(function parser(line) {
|
|
8496
|
+
i = line.indexOf(':');
|
|
8497
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
8498
|
+
val = line.substring(i + 1).trim();
|
|
8309
8499
|
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8500
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
8501
|
+
return;
|
|
8502
|
+
}
|
|
8313
8503
|
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8504
|
+
if (key === 'set-cookie') {
|
|
8505
|
+
if (parsed[key]) {
|
|
8506
|
+
parsed[key].push(val);
|
|
8507
|
+
} else {
|
|
8508
|
+
parsed[key] = [val];
|
|
8509
|
+
}
|
|
8317
8510
|
} else {
|
|
8318
|
-
parsed[key] = [val
|
|
8511
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
8319
8512
|
}
|
|
8320
|
-
}
|
|
8321
|
-
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
8322
|
-
}
|
|
8323
|
-
});
|
|
8513
|
+
});
|
|
8324
8514
|
|
|
8325
8515
|
return parsed;
|
|
8326
8516
|
});
|
|
@@ -8342,7 +8532,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8342
8532
|
|
|
8343
8533
|
function parseProtocol(url) {
|
|
8344
8534
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
8345
|
-
return match && match[1] || '';
|
|
8535
|
+
return (match && match[1]) || '';
|
|
8346
8536
|
}
|
|
8347
8537
|
|
|
8348
8538
|
|
|
@@ -8371,7 +8561,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
8371
8561
|
let bytesNotified = 0;
|
|
8372
8562
|
const _speedometer = (0,_speedometer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(50, 250);
|
|
8373
8563
|
|
|
8374
|
-
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e => {
|
|
8564
|
+
return (0,_throttle_js__WEBPACK_IMPORTED_MODULE_1__["default"])((e) => {
|
|
8375
8565
|
const loaded = e.loaded;
|
|
8376
8566
|
const total = e.lengthComputable ? e.total : undefined;
|
|
8377
8567
|
const progressBytes = loaded - bytesNotified;
|
|
@@ -8383,30 +8573,37 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
8383
8573
|
const data = {
|
|
8384
8574
|
loaded,
|
|
8385
8575
|
total,
|
|
8386
|
-
progress: total ?
|
|
8576
|
+
progress: total ? loaded / total : undefined,
|
|
8387
8577
|
bytes: progressBytes,
|
|
8388
8578
|
rate: rate ? rate : undefined,
|
|
8389
8579
|
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
8390
8580
|
event: e,
|
|
8391
8581
|
lengthComputable: total != null,
|
|
8392
|
-
[isDownloadStream ? 'download' : 'upload']: true
|
|
8582
|
+
[isDownloadStream ? 'download' : 'upload']: true,
|
|
8393
8583
|
};
|
|
8394
8584
|
|
|
8395
8585
|
listener(data);
|
|
8396
8586
|
}, freq);
|
|
8397
|
-
}
|
|
8587
|
+
};
|
|
8398
8588
|
|
|
8399
8589
|
const progressEventDecorator = (total, throttled) => {
|
|
8400
8590
|
const lengthComputable = total != null;
|
|
8401
8591
|
|
|
8402
|
-
return [
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8592
|
+
return [
|
|
8593
|
+
(loaded) =>
|
|
8594
|
+
throttled[0]({
|
|
8595
|
+
lengthComputable,
|
|
8596
|
+
total,
|
|
8597
|
+
loaded,
|
|
8598
|
+
}),
|
|
8599
|
+
throttled[1],
|
|
8600
|
+
];
|
|
8601
|
+
};
|
|
8408
8602
|
|
|
8409
|
-
const asyncDecorator =
|
|
8603
|
+
const asyncDecorator =
|
|
8604
|
+
(fn) =>
|
|
8605
|
+
(...args) =>
|
|
8606
|
+
_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].asap(() => fn(...args));
|
|
8410
8607
|
|
|
8411
8608
|
|
|
8412
8609
|
/***/ }),
|
|
@@ -8445,12 +8642,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8445
8642
|
|
|
8446
8643
|
newConfig.headers = headers = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_6__["default"].from(headers);
|
|
8447
8644
|
|
|
8448
|
-
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
8645
|
+
newConfig.url = (0,_buildURL_js__WEBPACK_IMPORTED_MODULE_7__["default"])(
|
|
8646
|
+
(0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__["default"])(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
|
|
8647
|
+
config.params,
|
|
8648
|
+
config.paramsSerializer
|
|
8649
|
+
);
|
|
8449
8650
|
|
|
8450
8651
|
// HTTP basic authentication
|
|
8451
8652
|
if (auth) {
|
|
8452
|
-
headers.set(
|
|
8453
|
-
|
|
8653
|
+
headers.set(
|
|
8654
|
+
'Authorization',
|
|
8655
|
+
'Basic ' +
|
|
8656
|
+
btoa(
|
|
8657
|
+
(auth.username || '') +
|
|
8658
|
+
':' +
|
|
8659
|
+
(auth.password ? unescape(encodeURIComponent(auth.password)) : '')
|
|
8660
|
+
)
|
|
8454
8661
|
);
|
|
8455
8662
|
}
|
|
8456
8663
|
|
|
@@ -8468,7 +8675,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8468
8675
|
}
|
|
8469
8676
|
});
|
|
8470
8677
|
}
|
|
8471
|
-
}
|
|
8678
|
+
}
|
|
8472
8679
|
|
|
8473
8680
|
// Add xsrf header
|
|
8474
8681
|
// This is only done if running in a standard browser environment.
|
|
@@ -8491,7 +8698,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8491
8698
|
});
|
|
8492
8699
|
|
|
8493
8700
|
|
|
8494
|
-
|
|
8495
8701
|
/***/ }),
|
|
8496
8702
|
|
|
8497
8703
|
/***/ "./node_modules/axios/lib/helpers/speedometer.js":
|
|
@@ -8554,7 +8760,7 @@ function speedometer(samplesCount, min) {
|
|
|
8554
8760
|
|
|
8555
8761
|
const passed = startedAt && now - startedAt;
|
|
8556
8762
|
|
|
8557
|
-
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
8763
|
+
return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
|
|
8558
8764
|
};
|
|
8559
8765
|
}
|
|
8560
8766
|
|
|
@@ -8582,7 +8788,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8582
8788
|
*
|
|
8583
8789
|
* ```js
|
|
8584
8790
|
* function f(x, y, z) {}
|
|
8585
|
-
*
|
|
8791
|
+
* const args = [1, 2, 3];
|
|
8586
8792
|
* f.apply(null, args);
|
|
8587
8793
|
* ```
|
|
8588
8794
|
*
|
|
@@ -8635,23 +8841,23 @@ function throttle(fn, freq) {
|
|
|
8635
8841
|
timer = null;
|
|
8636
8842
|
}
|
|
8637
8843
|
fn(...args);
|
|
8638
|
-
}
|
|
8844
|
+
};
|
|
8639
8845
|
|
|
8640
8846
|
const throttled = (...args) => {
|
|
8641
8847
|
const now = Date.now();
|
|
8642
8848
|
const passed = now - timestamp;
|
|
8643
|
-
if (
|
|
8849
|
+
if (passed >= threshold) {
|
|
8644
8850
|
invoke(args, now);
|
|
8645
8851
|
} else {
|
|
8646
8852
|
lastArgs = args;
|
|
8647
8853
|
if (!timer) {
|
|
8648
8854
|
timer = setTimeout(() => {
|
|
8649
8855
|
timer = null;
|
|
8650
|
-
invoke(lastArgs)
|
|
8856
|
+
invoke(lastArgs);
|
|
8651
8857
|
}, threshold - passed);
|
|
8652
8858
|
}
|
|
8653
8859
|
}
|
|
8654
|
-
}
|
|
8860
|
+
};
|
|
8655
8861
|
|
|
8656
8862
|
const flush = () => lastArgs && invoke(lastArgs);
|
|
8657
8863
|
|
|
@@ -8716,11 +8922,14 @@ function removeBrackets(key) {
|
|
|
8716
8922
|
*/
|
|
8717
8923
|
function renderKey(path, key, dots) {
|
|
8718
8924
|
if (!path) return key;
|
|
8719
|
-
return path
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8925
|
+
return path
|
|
8926
|
+
.concat(key)
|
|
8927
|
+
.map(function each(token, i) {
|
|
8928
|
+
// eslint-disable-next-line no-param-reassign
|
|
8929
|
+
token = removeBrackets(token);
|
|
8930
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
8931
|
+
})
|
|
8932
|
+
.join(dots ? '.' : '');
|
|
8724
8933
|
}
|
|
8725
8934
|
|
|
8726
8935
|
/**
|
|
@@ -8770,21 +8979,26 @@ function toFormData(obj, formData, options) {
|
|
|
8770
8979
|
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__["default"] || FormData)();
|
|
8771
8980
|
|
|
8772
8981
|
// eslint-disable-next-line no-param-reassign
|
|
8773
|
-
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8982
|
+
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toFlatObject(
|
|
8983
|
+
options,
|
|
8984
|
+
{
|
|
8985
|
+
metaTokens: true,
|
|
8986
|
+
dots: false,
|
|
8987
|
+
indexes: false,
|
|
8988
|
+
},
|
|
8989
|
+
false,
|
|
8990
|
+
function defined(option, source) {
|
|
8991
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
8992
|
+
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(source[option]);
|
|
8993
|
+
}
|
|
8994
|
+
);
|
|
8781
8995
|
|
|
8782
8996
|
const metaTokens = options.metaTokens;
|
|
8783
8997
|
// eslint-disable-next-line no-use-before-define
|
|
8784
8998
|
const visitor = options.visitor || defaultVisitor;
|
|
8785
8999
|
const dots = options.dots;
|
|
8786
9000
|
const indexes = options.indexes;
|
|
8787
|
-
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
9001
|
+
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
8788
9002
|
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isSpecCompliantForm(formData);
|
|
8789
9003
|
|
|
8790
9004
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFunction(visitor)) {
|
|
@@ -8826,6 +9040,11 @@ function toFormData(obj, formData, options) {
|
|
|
8826
9040
|
function defaultVisitor(value, key, path) {
|
|
8827
9041
|
let arr = value;
|
|
8828
9042
|
|
|
9043
|
+
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNative(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isReactNativeBlob(value)) {
|
|
9044
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
9045
|
+
return false;
|
|
9046
|
+
}
|
|
9047
|
+
|
|
8829
9048
|
if (value && !path && typeof value === 'object') {
|
|
8830
9049
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '{}')) {
|
|
8831
9050
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -8834,17 +9053,22 @@ function toFormData(obj, formData, options) {
|
|
|
8834
9053
|
value = JSON.stringify(value);
|
|
8835
9054
|
} else if (
|
|
8836
9055
|
(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isArray(value) && isFlatArray(value)) ||
|
|
8837
|
-
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value))
|
|
8838
|
-
|
|
9056
|
+
((_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].toArray(value)))
|
|
9057
|
+
) {
|
|
8839
9058
|
// eslint-disable-next-line no-param-reassign
|
|
8840
9059
|
key = removeBrackets(key);
|
|
8841
9060
|
|
|
8842
9061
|
arr.forEach(function each(el, index) {
|
|
8843
|
-
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
9062
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
9063
|
+
formData.append(
|
|
9064
|
+
// eslint-disable-next-line no-nested-ternary
|
|
9065
|
+
indexes === true
|
|
9066
|
+
? renderKey([key], index, dots)
|
|
9067
|
+
: indexes === null
|
|
9068
|
+
? key
|
|
9069
|
+
: key + '[]',
|
|
9070
|
+
convertValue(el)
|
|
9071
|
+
);
|
|
8848
9072
|
});
|
|
8849
9073
|
return false;
|
|
8850
9074
|
}
|
|
@@ -8864,7 +9088,7 @@ function toFormData(obj, formData, options) {
|
|
|
8864
9088
|
const exposedHelpers = Object.assign(predicates, {
|
|
8865
9089
|
defaultVisitor,
|
|
8866
9090
|
convertValue,
|
|
8867
|
-
isVisitable
|
|
9091
|
+
isVisitable,
|
|
8868
9092
|
});
|
|
8869
9093
|
|
|
8870
9094
|
function build(value, path) {
|
|
@@ -8877,9 +9101,9 @@ function toFormData(obj, formData, options) {
|
|
|
8877
9101
|
stack.push(value);
|
|
8878
9102
|
|
|
8879
9103
|
_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(value, function each(el, key) {
|
|
8880
|
-
const result =
|
|
8881
|
-
|
|
8882
|
-
|
|
9104
|
+
const result =
|
|
9105
|
+
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isUndefined(el) || el === null) &&
|
|
9106
|
+
visitor.call(formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
8883
9107
|
|
|
8884
9108
|
if (result === true) {
|
|
8885
9109
|
build(el, path ? path.concat(key) : [key]);
|
|
@@ -8924,7 +9148,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8924
9148
|
|
|
8925
9149
|
function toURLEncodedForm(data, options) {
|
|
8926
9150
|
return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_1__["default"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].classes.URLSearchParams(), {
|
|
8927
|
-
visitor: function(value, key, path, helpers) {
|
|
9151
|
+
visitor: function (value, key, path, helpers) {
|
|
8928
9152
|
if (_platform_index_js__WEBPACK_IMPORTED_MODULE_2__["default"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].isBuffer(value)) {
|
|
8929
9153
|
this.append(key, value.toString('base64'));
|
|
8930
9154
|
return false;
|
|
@@ -8932,7 +9156,7 @@ function toURLEncodedForm(data, options) {
|
|
|
8932
9156
|
|
|
8933
9157
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
8934
9158
|
},
|
|
8935
|
-
...options
|
|
9159
|
+
...options,
|
|
8936
9160
|
});
|
|
8937
9161
|
}
|
|
8938
9162
|
|
|
@@ -8951,7 +9175,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8951
9175
|
/* harmony export */ streamChunk: () => (/* binding */ streamChunk),
|
|
8952
9176
|
/* harmony export */ trackStream: () => (/* binding */ trackStream)
|
|
8953
9177
|
/* harmony export */ });
|
|
8954
|
-
|
|
8955
9178
|
const streamChunk = function* (chunk, chunkSize) {
|
|
8956
9179
|
let len = chunk.byteLength;
|
|
8957
9180
|
|
|
@@ -8968,13 +9191,13 @@ const streamChunk = function* (chunk, chunkSize) {
|
|
|
8968
9191
|
yield chunk.slice(pos, end);
|
|
8969
9192
|
pos = end;
|
|
8970
9193
|
}
|
|
8971
|
-
}
|
|
9194
|
+
};
|
|
8972
9195
|
|
|
8973
9196
|
const readBytes = async function* (iterable, chunkSize) {
|
|
8974
9197
|
for await (const chunk of readStream(iterable)) {
|
|
8975
9198
|
yield* streamChunk(chunk, chunkSize);
|
|
8976
9199
|
}
|
|
8977
|
-
}
|
|
9200
|
+
};
|
|
8978
9201
|
|
|
8979
9202
|
const readStream = async function* (stream) {
|
|
8980
9203
|
if (stream[Symbol.asyncIterator]) {
|
|
@@ -8985,7 +9208,7 @@ const readStream = async function* (stream) {
|
|
|
8985
9208
|
const reader = stream.getReader();
|
|
8986
9209
|
try {
|
|
8987
9210
|
for (;;) {
|
|
8988
|
-
const {done, value} = await reader.read();
|
|
9211
|
+
const { done, value } = await reader.read();
|
|
8989
9212
|
if (done) {
|
|
8990
9213
|
break;
|
|
8991
9214
|
}
|
|
@@ -8994,7 +9217,7 @@ const readStream = async function* (stream) {
|
|
|
8994
9217
|
} finally {
|
|
8995
9218
|
await reader.cancel();
|
|
8996
9219
|
}
|
|
8997
|
-
}
|
|
9220
|
+
};
|
|
8998
9221
|
|
|
8999
9222
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
9000
9223
|
const iterator = readBytes(stream, chunkSize);
|
|
@@ -9006,38 +9229,41 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
9006
9229
|
done = true;
|
|
9007
9230
|
onFinish && onFinish(e);
|
|
9008
9231
|
}
|
|
9009
|
-
}
|
|
9232
|
+
};
|
|
9010
9233
|
|
|
9011
|
-
return new ReadableStream(
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9234
|
+
return new ReadableStream(
|
|
9235
|
+
{
|
|
9236
|
+
async pull(controller) {
|
|
9237
|
+
try {
|
|
9238
|
+
const { done, value } = await iterator.next();
|
|
9015
9239
|
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9240
|
+
if (done) {
|
|
9241
|
+
_onFinish();
|
|
9242
|
+
controller.close();
|
|
9243
|
+
return;
|
|
9244
|
+
}
|
|
9021
9245
|
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9246
|
+
let len = value.byteLength;
|
|
9247
|
+
if (onProgress) {
|
|
9248
|
+
let loadedBytes = (bytes += len);
|
|
9249
|
+
onProgress(loadedBytes);
|
|
9250
|
+
}
|
|
9251
|
+
controller.enqueue(new Uint8Array(value));
|
|
9252
|
+
} catch (err) {
|
|
9253
|
+
_onFinish(err);
|
|
9254
|
+
throw err;
|
|
9026
9255
|
}
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
_onFinish(
|
|
9030
|
-
|
|
9031
|
-
}
|
|
9256
|
+
},
|
|
9257
|
+
cancel(reason) {
|
|
9258
|
+
_onFinish(reason);
|
|
9259
|
+
return iterator.return();
|
|
9260
|
+
},
|
|
9032
9261
|
},
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
return iterator.return();
|
|
9262
|
+
{
|
|
9263
|
+
highWaterMark: 2,
|
|
9036
9264
|
}
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
})
|
|
9040
|
-
}
|
|
9265
|
+
);
|
|
9266
|
+
};
|
|
9041
9267
|
|
|
9042
9268
|
|
|
9043
9269
|
/***/ }),
|
|
@@ -9081,7 +9307,15 @@ const deprecatedWarnings = {};
|
|
|
9081
9307
|
*/
|
|
9082
9308
|
validators.transitional = function transitional(validator, version, message) {
|
|
9083
9309
|
function formatMessage(opt, desc) {
|
|
9084
|
-
return
|
|
9310
|
+
return (
|
|
9311
|
+
'[Axios v' +
|
|
9312
|
+
_env_data_js__WEBPACK_IMPORTED_MODULE_0__.VERSION +
|
|
9313
|
+
"] Transitional option '" +
|
|
9314
|
+
opt +
|
|
9315
|
+
"'" +
|
|
9316
|
+
desc +
|
|
9317
|
+
(message ? '. ' + message : '')
|
|
9318
|
+
);
|
|
9085
9319
|
}
|
|
9086
9320
|
|
|
9087
9321
|
// eslint-disable-next-line func-names
|
|
@@ -9113,7 +9347,7 @@ validators.spelling = function spelling(correctSpelling) {
|
|
|
9113
9347
|
// eslint-disable-next-line no-console
|
|
9114
9348
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
9115
9349
|
return true;
|
|
9116
|
-
}
|
|
9350
|
+
};
|
|
9117
9351
|
};
|
|
9118
9352
|
|
|
9119
9353
|
/**
|
|
@@ -9139,7 +9373,10 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
9139
9373
|
const value = options[opt];
|
|
9140
9374
|
const result = value === undefined || validator(value, opt, options);
|
|
9141
9375
|
if (result !== true) {
|
|
9142
|
-
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
9376
|
+
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"](
|
|
9377
|
+
'option ' + opt + ' must be ' + result,
|
|
9378
|
+
_core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERR_BAD_OPTION_VALUE
|
|
9379
|
+
);
|
|
9143
9380
|
}
|
|
9144
9381
|
continue;
|
|
9145
9382
|
}
|
|
@@ -9151,7 +9388,7 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
9151
9388
|
|
|
9152
9389
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
9153
9390
|
assertOptions,
|
|
9154
|
-
validators
|
|
9391
|
+
validators,
|
|
9155
9392
|
});
|
|
9156
9393
|
|
|
9157
9394
|
|
|
@@ -9232,9 +9469,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9232
9469
|
classes: {
|
|
9233
9470
|
URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
9234
9471
|
FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
9235
|
-
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
|
|
9472
|
+
Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
9236
9473
|
},
|
|
9237
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
9474
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
|
|
9238
9475
|
});
|
|
9239
9476
|
|
|
9240
9477
|
|
|
@@ -9256,7 +9493,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9256
9493
|
/* harmony export */ });
|
|
9257
9494
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
9258
9495
|
|
|
9259
|
-
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
9496
|
+
const _navigator = (typeof navigator === 'object' && navigator) || undefined;
|
|
9260
9497
|
|
|
9261
9498
|
/**
|
|
9262
9499
|
* Determine if we're running in a standard browser environment
|
|
@@ -9275,7 +9512,8 @@ const _navigator = typeof navigator === 'object' && navigator || undefined;
|
|
|
9275
9512
|
*
|
|
9276
9513
|
* @returns {boolean}
|
|
9277
9514
|
*/
|
|
9278
|
-
const hasStandardBrowserEnv =
|
|
9515
|
+
const hasStandardBrowserEnv =
|
|
9516
|
+
hasBrowserEnv &&
|
|
9279
9517
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
|
9280
9518
|
|
|
9281
9519
|
/**
|
|
@@ -9296,7 +9534,7 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
|
|
9296
9534
|
);
|
|
9297
9535
|
})();
|
|
9298
9536
|
|
|
9299
|
-
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
|
9537
|
+
const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
|
|
9300
9538
|
|
|
9301
9539
|
|
|
9302
9540
|
|
|
@@ -9320,7 +9558,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9320
9558
|
|
|
9321
9559
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
9322
9560
|
..._common_utils_js__WEBPACK_IMPORTED_MODULE_1__,
|
|
9323
|
-
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
9561
|
+
..._node_index_js__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
9324
9562
|
});
|
|
9325
9563
|
|
|
9326
9564
|
|
|
@@ -9343,30 +9581,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9343
9581
|
|
|
9344
9582
|
// utils is a library of generic helper functions non-specific to axios
|
|
9345
9583
|
|
|
9346
|
-
const {toString} = Object.prototype;
|
|
9347
|
-
const {getPrototypeOf} = Object;
|
|
9348
|
-
const {iterator, toStringTag} = Symbol;
|
|
9584
|
+
const { toString } = Object.prototype;
|
|
9585
|
+
const { getPrototypeOf } = Object;
|
|
9586
|
+
const { iterator, toStringTag } = Symbol;
|
|
9349
9587
|
|
|
9350
|
-
const kindOf = (cache => thing => {
|
|
9351
|
-
|
|
9352
|
-
|
|
9588
|
+
const kindOf = ((cache) => (thing) => {
|
|
9589
|
+
const str = toString.call(thing);
|
|
9590
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
9353
9591
|
})(Object.create(null));
|
|
9354
9592
|
|
|
9355
9593
|
const kindOfTest = (type) => {
|
|
9356
9594
|
type = type.toLowerCase();
|
|
9357
|
-
return (thing) => kindOf(thing) === type
|
|
9358
|
-
}
|
|
9595
|
+
return (thing) => kindOf(thing) === type;
|
|
9596
|
+
};
|
|
9359
9597
|
|
|
9360
|
-
const typeOfTest = type => thing => typeof thing === type;
|
|
9598
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
9361
9599
|
|
|
9362
9600
|
/**
|
|
9363
|
-
* Determine if a value is
|
|
9601
|
+
* Determine if a value is a non-null object
|
|
9364
9602
|
*
|
|
9365
9603
|
* @param {Object} val The value to test
|
|
9366
9604
|
*
|
|
9367
9605
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
9368
9606
|
*/
|
|
9369
|
-
const {isArray} = Array;
|
|
9607
|
+
const { isArray } = Array;
|
|
9370
9608
|
|
|
9371
9609
|
/**
|
|
9372
9610
|
* Determine if a value is undefined
|
|
@@ -9385,8 +9623,14 @@ const isUndefined = typeOfTest('undefined');
|
|
|
9385
9623
|
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
9386
9624
|
*/
|
|
9387
9625
|
function isBuffer(val) {
|
|
9388
|
-
return
|
|
9389
|
-
|
|
9626
|
+
return (
|
|
9627
|
+
val !== null &&
|
|
9628
|
+
!isUndefined(val) &&
|
|
9629
|
+
val.constructor !== null &&
|
|
9630
|
+
!isUndefined(val.constructor) &&
|
|
9631
|
+
isFunction(val.constructor.isBuffer) &&
|
|
9632
|
+
val.constructor.isBuffer(val)
|
|
9633
|
+
);
|
|
9390
9634
|
}
|
|
9391
9635
|
|
|
9392
9636
|
/**
|
|
@@ -9398,7 +9642,6 @@ function isBuffer(val) {
|
|
|
9398
9642
|
*/
|
|
9399
9643
|
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
9400
9644
|
|
|
9401
|
-
|
|
9402
9645
|
/**
|
|
9403
9646
|
* Determine if a value is a view on an ArrayBuffer
|
|
9404
9647
|
*
|
|
@@ -9408,10 +9651,10 @@ const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
|
9408
9651
|
*/
|
|
9409
9652
|
function isArrayBufferView(val) {
|
|
9410
9653
|
let result;
|
|
9411
|
-
if (
|
|
9654
|
+
if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
|
|
9412
9655
|
result = ArrayBuffer.isView(val);
|
|
9413
9656
|
} else {
|
|
9414
|
-
result =
|
|
9657
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
9415
9658
|
}
|
|
9416
9659
|
return result;
|
|
9417
9660
|
}
|
|
@@ -9457,7 +9700,7 @@ const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
|
9457
9700
|
* @param {*} thing The value to test
|
|
9458
9701
|
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
9459
9702
|
*/
|
|
9460
|
-
const isBoolean = thing => thing === true || thing === false;
|
|
9703
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
9461
9704
|
|
|
9462
9705
|
/**
|
|
9463
9706
|
* Determine if a value is a plain Object
|
|
@@ -9472,8 +9715,14 @@ const isPlainObject = (val) => {
|
|
|
9472
9715
|
}
|
|
9473
9716
|
|
|
9474
9717
|
const prototype = getPrototypeOf(val);
|
|
9475
|
-
return (
|
|
9476
|
-
|
|
9718
|
+
return (
|
|
9719
|
+
(prototype === null ||
|
|
9720
|
+
prototype === Object.prototype ||
|
|
9721
|
+
Object.getPrototypeOf(prototype) === null) &&
|
|
9722
|
+
!(toStringTag in val) &&
|
|
9723
|
+
!(iterator in val)
|
|
9724
|
+
);
|
|
9725
|
+
};
|
|
9477
9726
|
|
|
9478
9727
|
/**
|
|
9479
9728
|
* Determine if a value is an empty object (safely handles Buffers)
|
|
@@ -9494,7 +9743,7 @@ const isEmptyObject = (val) => {
|
|
|
9494
9743
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
|
9495
9744
|
return false;
|
|
9496
9745
|
}
|
|
9497
|
-
}
|
|
9746
|
+
};
|
|
9498
9747
|
|
|
9499
9748
|
/**
|
|
9500
9749
|
* Determine if a value is a Date
|
|
@@ -9514,6 +9763,31 @@ const isDate = kindOfTest('Date');
|
|
|
9514
9763
|
*/
|
|
9515
9764
|
const isFile = kindOfTest('File');
|
|
9516
9765
|
|
|
9766
|
+
/**
|
|
9767
|
+
* Determine if a value is a React Native Blob
|
|
9768
|
+
* React Native "blob": an object with a `uri` attribute. Optionally, it can
|
|
9769
|
+
* also have a `name` and `type` attribute to specify filename and content type
|
|
9770
|
+
*
|
|
9771
|
+
* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
|
|
9772
|
+
*
|
|
9773
|
+
* @param {*} value The value to test
|
|
9774
|
+
*
|
|
9775
|
+
* @returns {boolean} True if value is a React Native Blob, otherwise false
|
|
9776
|
+
*/
|
|
9777
|
+
const isReactNativeBlob = (value) => {
|
|
9778
|
+
return !!(value && typeof value.uri !== 'undefined');
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9781
|
+
/**
|
|
9782
|
+
* Determine if environment is React Native
|
|
9783
|
+
* ReactNative `FormData` has a non-standard `getParts()` method
|
|
9784
|
+
*
|
|
9785
|
+
* @param {*} formData The formData to test
|
|
9786
|
+
*
|
|
9787
|
+
* @returns {boolean} True if environment is React Native, otherwise false
|
|
9788
|
+
*/
|
|
9789
|
+
const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
|
|
9790
|
+
|
|
9517
9791
|
/**
|
|
9518
9792
|
* Determine if a value is a Blob
|
|
9519
9793
|
*
|
|
@@ -9548,18 +9822,29 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
|
9548
9822
|
*
|
|
9549
9823
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
9550
9824
|
*/
|
|
9825
|
+
function getGlobal() {
|
|
9826
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
9827
|
+
if (typeof self !== 'undefined') return self;
|
|
9828
|
+
if (typeof window !== 'undefined') return window;
|
|
9829
|
+
if (typeof global !== 'undefined') return global;
|
|
9830
|
+
return {};
|
|
9831
|
+
}
|
|
9832
|
+
|
|
9833
|
+
const G = getGlobal();
|
|
9834
|
+
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
9835
|
+
|
|
9551
9836
|
const isFormData = (thing) => {
|
|
9552
9837
|
let kind;
|
|
9553
9838
|
return thing && (
|
|
9554
|
-
(
|
|
9839
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
9555
9840
|
isFunction(thing.append) && (
|
|
9556
9841
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
9557
9842
|
// detect form-data instance
|
|
9558
9843
|
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
9559
9844
|
)
|
|
9560
9845
|
)
|
|
9561
|
-
)
|
|
9562
|
-
}
|
|
9846
|
+
);
|
|
9847
|
+
};
|
|
9563
9848
|
|
|
9564
9849
|
/**
|
|
9565
9850
|
* Determine if a value is a URLSearchParams object
|
|
@@ -9570,7 +9855,12 @@ const isFormData = (thing) => {
|
|
|
9570
9855
|
*/
|
|
9571
9856
|
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
9572
9857
|
|
|
9573
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
9858
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
9859
|
+
'ReadableStream',
|
|
9860
|
+
'Request',
|
|
9861
|
+
'Response',
|
|
9862
|
+
'Headers',
|
|
9863
|
+
].map(kindOfTest);
|
|
9574
9864
|
|
|
9575
9865
|
/**
|
|
9576
9866
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -9579,9 +9869,9 @@ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream',
|
|
|
9579
9869
|
*
|
|
9580
9870
|
* @returns {String} The String freed of excess whitespace
|
|
9581
9871
|
*/
|
|
9582
|
-
const trim = (str) =>
|
|
9583
|
-
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
9584
|
-
|
|
9872
|
+
const trim = (str) => {
|
|
9873
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
9874
|
+
};
|
|
9585
9875
|
/**
|
|
9586
9876
|
* Iterate over an Array or an Object invoking a function for each item.
|
|
9587
9877
|
*
|
|
@@ -9591,13 +9881,14 @@ const trim = (str) => str.trim ?
|
|
|
9591
9881
|
* If 'obj' is an Object callback will be called passing
|
|
9592
9882
|
* the value, key, and complete object for each property.
|
|
9593
9883
|
*
|
|
9594
|
-
* @param {Object|Array} obj The object to iterate
|
|
9884
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
9595
9885
|
* @param {Function} fn The callback to invoke for each item
|
|
9596
9886
|
*
|
|
9597
|
-
* @param {
|
|
9887
|
+
* @param {Object} [options]
|
|
9888
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
9598
9889
|
* @returns {any}
|
|
9599
9890
|
*/
|
|
9600
|
-
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
9891
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
9601
9892
|
// Don't bother if no value provided
|
|
9602
9893
|
if (obj === null || typeof obj === 'undefined') {
|
|
9603
9894
|
return;
|
|
@@ -9635,8 +9926,16 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
9635
9926
|
}
|
|
9636
9927
|
}
|
|
9637
9928
|
|
|
9929
|
+
/**
|
|
9930
|
+
* Finds a key in an object, case-insensitive, returning the actual key name.
|
|
9931
|
+
* Returns null if the object is a Buffer or if no match is found.
|
|
9932
|
+
*
|
|
9933
|
+
* @param {Object} obj - The object to search.
|
|
9934
|
+
* @param {string} key - The key to find (case-insensitive).
|
|
9935
|
+
* @returns {?string} The actual key name if found, otherwise null.
|
|
9936
|
+
*/
|
|
9638
9937
|
function findKey(obj, key) {
|
|
9639
|
-
if (isBuffer(obj)){
|
|
9938
|
+
if (isBuffer(obj)) {
|
|
9640
9939
|
return null;
|
|
9641
9940
|
}
|
|
9642
9941
|
|
|
@@ -9655,8 +9954,8 @@ function findKey(obj, key) {
|
|
|
9655
9954
|
|
|
9656
9955
|
const _global = (() => {
|
|
9657
9956
|
/*eslint no-undef:0*/
|
|
9658
|
-
if (typeof globalThis !==
|
|
9659
|
-
return typeof self !==
|
|
9957
|
+
if (typeof globalThis !== 'undefined') return globalThis;
|
|
9958
|
+
return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
|
|
9660
9959
|
})();
|
|
9661
9960
|
|
|
9662
9961
|
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
@@ -9671,7 +9970,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
9671
9970
|
* Example:
|
|
9672
9971
|
*
|
|
9673
9972
|
* ```js
|
|
9674
|
-
*
|
|
9973
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
9675
9974
|
* console.log(result.foo); // outputs 456
|
|
9676
9975
|
* ```
|
|
9677
9976
|
*
|
|
@@ -9680,10 +9979,15 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
9680
9979
|
* @returns {Object} Result of all merge properties
|
|
9681
9980
|
*/
|
|
9682
9981
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
9683
|
-
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
9982
|
+
const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
|
|
9684
9983
|
const result = {};
|
|
9685
9984
|
const assignValue = (val, key) => {
|
|
9686
|
-
|
|
9985
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
9986
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
9987
|
+
return;
|
|
9988
|
+
}
|
|
9989
|
+
|
|
9990
|
+
const targetKey = (caseless && findKey(result, key)) || key;
|
|
9687
9991
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
9688
9992
|
result[targetKey] = merge(result[targetKey], val);
|
|
9689
9993
|
} else if (isPlainObject(val)) {
|
|
@@ -9693,7 +9997,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
9693
9997
|
} else if (!skipUndefined || !isUndefined(val)) {
|
|
9694
9998
|
result[targetKey] = val;
|
|
9695
9999
|
}
|
|
9696
|
-
}
|
|
10000
|
+
};
|
|
9697
10001
|
|
|
9698
10002
|
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
9699
10003
|
arguments[i] && forEach(arguments[i], assignValue);
|
|
@@ -9708,19 +10012,34 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
9708
10012
|
* @param {Object} b The object to copy properties from
|
|
9709
10013
|
* @param {Object} thisArg The object to bind function to
|
|
9710
10014
|
*
|
|
9711
|
-
* @param {
|
|
10015
|
+
* @param {Object} [options]
|
|
10016
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
9712
10017
|
* @returns {Object} The resulting value of object a
|
|
9713
10018
|
*/
|
|
9714
|
-
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
9715
|
-
forEach(
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
10019
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
10020
|
+
forEach(
|
|
10021
|
+
b,
|
|
10022
|
+
(val, key) => {
|
|
10023
|
+
if (thisArg && isFunction(val)) {
|
|
10024
|
+
Object.defineProperty(a, key, {
|
|
10025
|
+
value: (0,_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__["default"])(val, thisArg),
|
|
10026
|
+
writable: true,
|
|
10027
|
+
enumerable: true,
|
|
10028
|
+
configurable: true,
|
|
10029
|
+
});
|
|
10030
|
+
} else {
|
|
10031
|
+
Object.defineProperty(a, key, {
|
|
10032
|
+
value: val,
|
|
10033
|
+
writable: true,
|
|
10034
|
+
enumerable: true,
|
|
10035
|
+
configurable: true,
|
|
10036
|
+
});
|
|
10037
|
+
}
|
|
10038
|
+
},
|
|
10039
|
+
{ allOwnKeys }
|
|
10040
|
+
);
|
|
9722
10041
|
return a;
|
|
9723
|
-
}
|
|
10042
|
+
};
|
|
9724
10043
|
|
|
9725
10044
|
/**
|
|
9726
10045
|
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
@@ -9730,11 +10049,11 @@ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
|
9730
10049
|
* @returns {string} content value without BOM
|
|
9731
10050
|
*/
|
|
9732
10051
|
const stripBOM = (content) => {
|
|
9733
|
-
if (content.charCodeAt(0) ===
|
|
10052
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
9734
10053
|
content = content.slice(1);
|
|
9735
10054
|
}
|
|
9736
10055
|
return content;
|
|
9737
|
-
}
|
|
10056
|
+
};
|
|
9738
10057
|
|
|
9739
10058
|
/**
|
|
9740
10059
|
* Inherit the prototype methods from one constructor into another
|
|
@@ -9747,12 +10066,17 @@ const stripBOM = (content) => {
|
|
|
9747
10066
|
*/
|
|
9748
10067
|
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
9749
10068
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
9750
|
-
constructor.prototype
|
|
10069
|
+
Object.defineProperty(constructor.prototype, 'constructor', {
|
|
10070
|
+
value: constructor,
|
|
10071
|
+
writable: true,
|
|
10072
|
+
enumerable: false,
|
|
10073
|
+
configurable: true,
|
|
10074
|
+
});
|
|
9751
10075
|
Object.defineProperty(constructor, 'super', {
|
|
9752
|
-
value: superConstructor.prototype
|
|
10076
|
+
value: superConstructor.prototype,
|
|
9753
10077
|
});
|
|
9754
10078
|
props && Object.assign(constructor.prototype, props);
|
|
9755
|
-
}
|
|
10079
|
+
};
|
|
9756
10080
|
|
|
9757
10081
|
/**
|
|
9758
10082
|
* Resolve object with deep prototype chain to a flat object
|
|
@@ -9787,7 +10111,7 @@ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
|
9787
10111
|
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
9788
10112
|
|
|
9789
10113
|
return destObj;
|
|
9790
|
-
}
|
|
10114
|
+
};
|
|
9791
10115
|
|
|
9792
10116
|
/**
|
|
9793
10117
|
* Determines whether a string ends with the characters of a specified string
|
|
@@ -9806,8 +10130,7 @@ const endsWith = (str, searchString, position) => {
|
|
|
9806
10130
|
position -= searchString.length;
|
|
9807
10131
|
const lastIndex = str.indexOf(searchString, position);
|
|
9808
10132
|
return lastIndex !== -1 && lastIndex === position;
|
|
9809
|
-
}
|
|
9810
|
-
|
|
10133
|
+
};
|
|
9811
10134
|
|
|
9812
10135
|
/**
|
|
9813
10136
|
* Returns new array from array like object or null if failed
|
|
@@ -9826,7 +10149,7 @@ const toArray = (thing) => {
|
|
|
9826
10149
|
arr[i] = thing[i];
|
|
9827
10150
|
}
|
|
9828
10151
|
return arr;
|
|
9829
|
-
}
|
|
10152
|
+
};
|
|
9830
10153
|
|
|
9831
10154
|
/**
|
|
9832
10155
|
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
@@ -9837,9 +10160,9 @@ const toArray = (thing) => {
|
|
|
9837
10160
|
* @returns {Array}
|
|
9838
10161
|
*/
|
|
9839
10162
|
// eslint-disable-next-line func-names
|
|
9840
|
-
const isTypedArray = (TypedArray => {
|
|
10163
|
+
const isTypedArray = ((TypedArray) => {
|
|
9841
10164
|
// eslint-disable-next-line func-names
|
|
9842
|
-
return thing => {
|
|
10165
|
+
return (thing) => {
|
|
9843
10166
|
return TypedArray && thing instanceof TypedArray;
|
|
9844
10167
|
};
|
|
9845
10168
|
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
@@ -9863,7 +10186,7 @@ const forEachEntry = (obj, fn) => {
|
|
|
9863
10186
|
const pair = result.value;
|
|
9864
10187
|
fn.call(obj, pair[0], pair[1]);
|
|
9865
10188
|
}
|
|
9866
|
-
}
|
|
10189
|
+
};
|
|
9867
10190
|
|
|
9868
10191
|
/**
|
|
9869
10192
|
* It takes a regular expression and a string, and returns an array of all the matches
|
|
@@ -9882,21 +10205,23 @@ const matchAll = (regExp, str) => {
|
|
|
9882
10205
|
}
|
|
9883
10206
|
|
|
9884
10207
|
return arr;
|
|
9885
|
-
}
|
|
10208
|
+
};
|
|
9886
10209
|
|
|
9887
10210
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
9888
10211
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
9889
10212
|
|
|
9890
|
-
const toCamelCase = str => {
|
|
9891
|
-
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
9892
|
-
|
|
9893
|
-
|
|
9894
|
-
}
|
|
9895
|
-
);
|
|
10213
|
+
const toCamelCase = (str) => {
|
|
10214
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
10215
|
+
return p1.toUpperCase() + p2;
|
|
10216
|
+
});
|
|
9896
10217
|
};
|
|
9897
10218
|
|
|
9898
10219
|
/* Creating a function that will check if an object has a property. */
|
|
9899
|
-
const hasOwnProperty = (
|
|
10220
|
+
const hasOwnProperty = (
|
|
10221
|
+
({ hasOwnProperty }) =>
|
|
10222
|
+
(obj, prop) =>
|
|
10223
|
+
hasOwnProperty.call(obj, prop)
|
|
10224
|
+
)(Object.prototype);
|
|
9900
10225
|
|
|
9901
10226
|
/**
|
|
9902
10227
|
* Determine if a value is a RegExp object
|
|
@@ -9919,7 +10244,7 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
9919
10244
|
});
|
|
9920
10245
|
|
|
9921
10246
|
Object.defineProperties(obj, reducedDescriptors);
|
|
9922
|
-
}
|
|
10247
|
+
};
|
|
9923
10248
|
|
|
9924
10249
|
/**
|
|
9925
10250
|
* Makes all methods read-only
|
|
@@ -9946,33 +10271,39 @@ const freezeMethods = (obj) => {
|
|
|
9946
10271
|
|
|
9947
10272
|
if (!descriptor.set) {
|
|
9948
10273
|
descriptor.set = () => {
|
|
9949
|
-
throw Error(
|
|
10274
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
9950
10275
|
};
|
|
9951
10276
|
}
|
|
9952
10277
|
});
|
|
9953
|
-
}
|
|
10278
|
+
};
|
|
9954
10279
|
|
|
10280
|
+
/**
|
|
10281
|
+
* Converts an array or a delimited string into an object set with values as keys and true as values.
|
|
10282
|
+
* Useful for fast membership checks.
|
|
10283
|
+
*
|
|
10284
|
+
* @param {Array|string} arrayOrString - The array or string to convert.
|
|
10285
|
+
* @param {string} delimiter - The delimiter to use if input is a string.
|
|
10286
|
+
* @returns {Object} An object with keys from the array or string, values set to true.
|
|
10287
|
+
*/
|
|
9955
10288
|
const toObjectSet = (arrayOrString, delimiter) => {
|
|
9956
10289
|
const obj = {};
|
|
9957
10290
|
|
|
9958
10291
|
const define = (arr) => {
|
|
9959
|
-
arr.forEach(value => {
|
|
10292
|
+
arr.forEach((value) => {
|
|
9960
10293
|
obj[value] = true;
|
|
9961
10294
|
});
|
|
9962
|
-
}
|
|
10295
|
+
};
|
|
9963
10296
|
|
|
9964
10297
|
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
9965
10298
|
|
|
9966
10299
|
return obj;
|
|
9967
|
-
}
|
|
10300
|
+
};
|
|
9968
10301
|
|
|
9969
|
-
const noop = () => {}
|
|
10302
|
+
const noop = () => {};
|
|
9970
10303
|
|
|
9971
10304
|
const toFiniteNumber = (value, defaultValue) => {
|
|
9972
|
-
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
9973
|
-
}
|
|
9974
|
-
|
|
9975
|
-
|
|
10305
|
+
return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
|
|
10306
|
+
};
|
|
9976
10307
|
|
|
9977
10308
|
/**
|
|
9978
10309
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
@@ -9982,14 +10313,24 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
9982
10313
|
* @returns {boolean}
|
|
9983
10314
|
*/
|
|
9984
10315
|
function isSpecCompliantForm(thing) {
|
|
9985
|
-
return !!(
|
|
10316
|
+
return !!(
|
|
10317
|
+
thing &&
|
|
10318
|
+
isFunction(thing.append) &&
|
|
10319
|
+
thing[toStringTag] === 'FormData' &&
|
|
10320
|
+
thing[iterator]
|
|
10321
|
+
);
|
|
9986
10322
|
}
|
|
9987
10323
|
|
|
10324
|
+
/**
|
|
10325
|
+
* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
|
|
10326
|
+
*
|
|
10327
|
+
* @param {Object} obj - The object to convert.
|
|
10328
|
+
* @returns {Object} The JSON-compatible object.
|
|
10329
|
+
*/
|
|
9988
10330
|
const toJSONObject = (obj) => {
|
|
9989
10331
|
const stack = new Array(10);
|
|
9990
10332
|
|
|
9991
10333
|
const visit = (source, i) => {
|
|
9992
|
-
|
|
9993
10334
|
if (isObject(source)) {
|
|
9994
10335
|
if (stack.indexOf(source) >= 0) {
|
|
9995
10336
|
return;
|
|
@@ -10000,7 +10341,7 @@ const toJSONObject = (obj) => {
|
|
|
10000
10341
|
return source;
|
|
10001
10342
|
}
|
|
10002
10343
|
|
|
10003
|
-
if(!('toJSON' in source)) {
|
|
10344
|
+
if (!('toJSON' in source)) {
|
|
10004
10345
|
stack[i] = source;
|
|
10005
10346
|
const target = isArray(source) ? [] : {};
|
|
10006
10347
|
|
|
@@ -10016,50 +10357,82 @@ const toJSONObject = (obj) => {
|
|
|
10016
10357
|
}
|
|
10017
10358
|
|
|
10018
10359
|
return source;
|
|
10019
|
-
}
|
|
10360
|
+
};
|
|
10020
10361
|
|
|
10021
10362
|
return visit(obj, 0);
|
|
10022
|
-
}
|
|
10363
|
+
};
|
|
10023
10364
|
|
|
10365
|
+
/**
|
|
10366
|
+
* Determines if a value is an async function.
|
|
10367
|
+
*
|
|
10368
|
+
* @param {*} thing - The value to test.
|
|
10369
|
+
* @returns {boolean} True if value is an async function, otherwise false.
|
|
10370
|
+
*/
|
|
10024
10371
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
10025
10372
|
|
|
10373
|
+
/**
|
|
10374
|
+
* Determines if a value is thenable (has then and catch methods).
|
|
10375
|
+
*
|
|
10376
|
+
* @param {*} thing - The value to test.
|
|
10377
|
+
* @returns {boolean} True if value is thenable, otherwise false.
|
|
10378
|
+
*/
|
|
10026
10379
|
const isThenable = (thing) =>
|
|
10027
|
-
thing &&
|
|
10380
|
+
thing &&
|
|
10381
|
+
(isObject(thing) || isFunction(thing)) &&
|
|
10382
|
+
isFunction(thing.then) &&
|
|
10383
|
+
isFunction(thing.catch);
|
|
10028
10384
|
|
|
10029
10385
|
// original code
|
|
10030
10386
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
10031
10387
|
|
|
10388
|
+
/**
|
|
10389
|
+
* Provides a cross-platform setImmediate implementation.
|
|
10390
|
+
* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
|
|
10391
|
+
*
|
|
10392
|
+
* @param {boolean} setImmediateSupported - Whether setImmediate is supported.
|
|
10393
|
+
* @param {boolean} postMessageSupported - Whether postMessage is supported.
|
|
10394
|
+
* @returns {Function} A function to schedule a callback asynchronously.
|
|
10395
|
+
*/
|
|
10032
10396
|
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
10033
10397
|
if (setImmediateSupported) {
|
|
10034
10398
|
return setImmediate;
|
|
10035
10399
|
}
|
|
10036
10400
|
|
|
10037
|
-
return postMessageSupported
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10401
|
+
return postMessageSupported
|
|
10402
|
+
? ((token, callbacks) => {
|
|
10403
|
+
_global.addEventListener(
|
|
10404
|
+
'message',
|
|
10405
|
+
({ source, data }) => {
|
|
10406
|
+
if (source === _global && data === token) {
|
|
10407
|
+
callbacks.length && callbacks.shift()();
|
|
10408
|
+
}
|
|
10409
|
+
},
|
|
10410
|
+
false
|
|
10411
|
+
);
|
|
10043
10412
|
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
isFunction(_global.postMessage)
|
|
10052
|
-
);
|
|
10413
|
+
return (cb) => {
|
|
10414
|
+
callbacks.push(cb);
|
|
10415
|
+
_global.postMessage(token, '*');
|
|
10416
|
+
};
|
|
10417
|
+
})(`axios@${Math.random()}`, [])
|
|
10418
|
+
: (cb) => setTimeout(cb);
|
|
10419
|
+
})(typeof setImmediate === 'function', isFunction(_global.postMessage));
|
|
10053
10420
|
|
|
10054
|
-
|
|
10055
|
-
|
|
10421
|
+
/**
|
|
10422
|
+
* Schedules a microtask or asynchronous callback as soon as possible.
|
|
10423
|
+
* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
|
|
10424
|
+
*
|
|
10425
|
+
* @type {Function}
|
|
10426
|
+
*/
|
|
10427
|
+
const asap =
|
|
10428
|
+
typeof queueMicrotask !== 'undefined'
|
|
10429
|
+
? queueMicrotask.bind(_global)
|
|
10430
|
+
: (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
|
|
10056
10431
|
|
|
10057
10432
|
// *********************
|
|
10058
10433
|
|
|
10059
|
-
|
|
10060
10434
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
10061
10435
|
|
|
10062
|
-
|
|
10063
10436
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
10064
10437
|
isArray,
|
|
10065
10438
|
isArrayBuffer,
|
|
@@ -10079,6 +10452,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
10079
10452
|
isUndefined,
|
|
10080
10453
|
isDate,
|
|
10081
10454
|
isFile,
|
|
10455
|
+
isReactNativeBlob,
|
|
10456
|
+
isReactNative,
|
|
10082
10457
|
isBlob,
|
|
10083
10458
|
isRegExp,
|
|
10084
10459
|
isFunction,
|
|
@@ -10117,7 +10492,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
10117
10492
|
isThenable,
|
|
10118
10493
|
setImmediate: _setImmediate,
|
|
10119
10494
|
asap,
|
|
10120
|
-
isIterable
|
|
10495
|
+
isIterable,
|
|
10121
10496
|
});
|
|
10122
10497
|
|
|
10123
10498
|
|