@carbon/ibmdotcom-services 2.40.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/umd/ibmdotcom-services.js +349 -184
- package/umd/ibmdotcom-services.min.js +2 -2
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
// utils is a library of generic helper functions non-specific to axios
|
|
846
846
|
|
|
847
847
|
var toString = Object.prototype.toString;
|
|
848
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
848
|
+
var getPrototypeOf$1 = Object.getPrototypeOf;
|
|
849
849
|
var iterator = Symbol.iterator,
|
|
850
850
|
toStringTag = Symbol.toStringTag;
|
|
851
851
|
var kindOf = function (cache) {
|
|
@@ -867,7 +867,7 @@
|
|
|
867
867
|
};
|
|
868
868
|
|
|
869
869
|
/**
|
|
870
|
-
* Determine if a value is
|
|
870
|
+
* Determine if a value is a non-null object
|
|
871
871
|
*
|
|
872
872
|
* @param {Object} val The value to test
|
|
873
873
|
*
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
*
|
|
883
883
|
* @returns {boolean} True if the value is undefined, otherwise false
|
|
884
884
|
*/
|
|
885
|
-
var isUndefined = typeOfTest(
|
|
885
|
+
var isUndefined = typeOfTest("undefined");
|
|
886
886
|
|
|
887
887
|
/**
|
|
888
888
|
* Determine if a value is a Buffer
|
|
@@ -902,7 +902,7 @@
|
|
|
902
902
|
*
|
|
903
903
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
904
904
|
*/
|
|
905
|
-
var isArrayBuffer = kindOfTest(
|
|
905
|
+
var isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
906
906
|
|
|
907
907
|
/**
|
|
908
908
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
*/
|
|
914
914
|
function isArrayBufferView(val) {
|
|
915
915
|
var result;
|
|
916
|
-
if (typeof ArrayBuffer !==
|
|
916
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
917
917
|
result = ArrayBuffer.isView(val);
|
|
918
918
|
} else {
|
|
919
919
|
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
@@ -928,7 +928,7 @@
|
|
|
928
928
|
*
|
|
929
929
|
* @returns {boolean} True if value is a String, otherwise false
|
|
930
930
|
*/
|
|
931
|
-
var isString = typeOfTest(
|
|
931
|
+
var isString = typeOfTest("string");
|
|
932
932
|
|
|
933
933
|
/**
|
|
934
934
|
* Determine if a value is a Function
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
* @param {*} val The value to test
|
|
937
937
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
938
938
|
*/
|
|
939
|
-
var isFunction$1 = typeOfTest(
|
|
939
|
+
var isFunction$1 = typeOfTest("function");
|
|
940
940
|
|
|
941
941
|
/**
|
|
942
942
|
* Determine if a value is a Number
|
|
@@ -945,7 +945,7 @@
|
|
|
945
945
|
*
|
|
946
946
|
* @returns {boolean} True if value is a Number, otherwise false
|
|
947
947
|
*/
|
|
948
|
-
var isNumber = typeOfTest(
|
|
948
|
+
var isNumber = typeOfTest("number");
|
|
949
949
|
|
|
950
950
|
/**
|
|
951
951
|
* Determine if a value is an Object
|
|
@@ -955,7 +955,7 @@
|
|
|
955
955
|
* @returns {boolean} True if value is an Object, otherwise false
|
|
956
956
|
*/
|
|
957
957
|
var isObject = function isObject(thing) {
|
|
958
|
-
return thing !== null && _typeof$1(thing) ===
|
|
958
|
+
return thing !== null && _typeof$1(thing) === "object";
|
|
959
959
|
};
|
|
960
960
|
|
|
961
961
|
/**
|
|
@@ -976,10 +976,10 @@
|
|
|
976
976
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
977
977
|
*/
|
|
978
978
|
var isPlainObject = function isPlainObject(val) {
|
|
979
|
-
if (kindOf(val) !==
|
|
979
|
+
if (kindOf(val) !== "object") {
|
|
980
980
|
return false;
|
|
981
981
|
}
|
|
982
|
-
var prototype = getPrototypeOf(val);
|
|
982
|
+
var prototype = getPrototypeOf$1(val);
|
|
983
983
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
|
984
984
|
};
|
|
985
985
|
|
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
*
|
|
1011
1011
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
1012
1012
|
*/
|
|
1013
|
-
var isDate = kindOfTest(
|
|
1013
|
+
var isDate = kindOfTest("Date");
|
|
1014
1014
|
|
|
1015
1015
|
/**
|
|
1016
1016
|
* Determine if a value is a File
|
|
@@ -1019,7 +1019,7 @@
|
|
|
1019
1019
|
*
|
|
1020
1020
|
* @returns {boolean} True if value is a File, otherwise false
|
|
1021
1021
|
*/
|
|
1022
|
-
var isFile = kindOfTest(
|
|
1022
|
+
var isFile = kindOfTest("File");
|
|
1023
1023
|
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Determine if a value is a Blob
|
|
@@ -1028,7 +1028,7 @@
|
|
|
1028
1028
|
*
|
|
1029
1029
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
1030
1030
|
*/
|
|
1031
|
-
var isBlob = kindOfTest(
|
|
1031
|
+
var isBlob = kindOfTest("Blob");
|
|
1032
1032
|
|
|
1033
1033
|
/**
|
|
1034
1034
|
* Determine if a value is a FileList
|
|
@@ -1037,7 +1037,7 @@
|
|
|
1037
1037
|
*
|
|
1038
1038
|
* @returns {boolean} True if value is a File, otherwise false
|
|
1039
1039
|
*/
|
|
1040
|
-
var isFileList = kindOfTest(
|
|
1040
|
+
var isFileList = kindOfTest("FileList");
|
|
1041
1041
|
|
|
1042
1042
|
/**
|
|
1043
1043
|
* Determine if a value is a Stream
|
|
@@ -1059,9 +1059,9 @@
|
|
|
1059
1059
|
*/
|
|
1060
1060
|
var isFormData = function isFormData(thing) {
|
|
1061
1061
|
var kind;
|
|
1062
|
-
return thing && (typeof FormData ===
|
|
1062
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" ||
|
|
1063
1063
|
// detect form-data instance
|
|
1064
|
-
kind ===
|
|
1064
|
+
kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
|
|
1065
1065
|
};
|
|
1066
1066
|
|
|
1067
1067
|
/**
|
|
@@ -1071,8 +1071,8 @@
|
|
|
1071
1071
|
*
|
|
1072
1072
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
1073
1073
|
*/
|
|
1074
|
-
var isURLSearchParams = kindOfTest(
|
|
1075
|
-
var _map = [
|
|
1074
|
+
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
1075
|
+
var _map = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest),
|
|
1076
1076
|
_map2 = _slicedToArray(_map, 4),
|
|
1077
1077
|
isReadableStream = _map2[0],
|
|
1078
1078
|
isRequest = _map2[1],
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
* @returns {String} The String freed of excess whitespace
|
|
1088
1088
|
*/
|
|
1089
1089
|
var trim = function trim(str) {
|
|
1090
|
-
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
|
1090
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1091
1091
|
};
|
|
1092
1092
|
|
|
1093
1093
|
/**
|
|
@@ -1099,10 +1099,11 @@
|
|
|
1099
1099
|
* If 'obj' is an Object callback will be called passing
|
|
1100
1100
|
* the value, key, and complete object for each property.
|
|
1101
1101
|
*
|
|
1102
|
-
* @param {Object|Array} obj The object to iterate
|
|
1102
|
+
* @param {Object|Array<unknown>} obj The object to iterate
|
|
1103
1103
|
* @param {Function} fn The callback to invoke for each item
|
|
1104
1104
|
*
|
|
1105
|
-
* @param {
|
|
1105
|
+
* @param {Object} [options]
|
|
1106
|
+
* @param {Boolean} [options.allOwnKeys = false]
|
|
1106
1107
|
* @returns {any}
|
|
1107
1108
|
*/
|
|
1108
1109
|
function forEach(obj, fn) {
|
|
@@ -1110,14 +1111,14 @@
|
|
|
1110
1111
|
_ref$allOwnKeys = _ref.allOwnKeys,
|
|
1111
1112
|
allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
|
|
1112
1113
|
// Don't bother if no value provided
|
|
1113
|
-
if (obj === null || typeof obj ===
|
|
1114
|
+
if (obj === null || typeof obj === "undefined") {
|
|
1114
1115
|
return;
|
|
1115
1116
|
}
|
|
1116
1117
|
var i;
|
|
1117
1118
|
var l;
|
|
1118
1119
|
|
|
1119
1120
|
// Force an array if not already something iterable
|
|
1120
|
-
if (_typeof$1(obj) !==
|
|
1121
|
+
if (_typeof$1(obj) !== "object") {
|
|
1121
1122
|
/*eslint no-param-reassign:0*/
|
|
1122
1123
|
obj = [obj];
|
|
1123
1124
|
}
|
|
@@ -1161,7 +1162,7 @@
|
|
|
1161
1162
|
var _global = function () {
|
|
1162
1163
|
/*eslint no-undef:0*/
|
|
1163
1164
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
1164
|
-
return typeof self !== "undefined" ? self : typeof window !==
|
|
1165
|
+
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
1165
1166
|
}();
|
|
1166
1167
|
var isContextDefined = function isContextDefined(context) {
|
|
1167
1168
|
return !isUndefined(context) && context !== _global;
|
|
@@ -1177,7 +1178,7 @@
|
|
|
1177
1178
|
* Example:
|
|
1178
1179
|
*
|
|
1179
1180
|
* ```js
|
|
1180
|
-
*
|
|
1181
|
+
* const result = merge({foo: 123}, {foo: 456});
|
|
1181
1182
|
* console.log(result.foo); // outputs 456
|
|
1182
1183
|
* ```
|
|
1183
1184
|
*
|
|
@@ -1192,6 +1193,10 @@
|
|
|
1192
1193
|
skipUndefined = _ref2.skipUndefined;
|
|
1193
1194
|
var result = {};
|
|
1194
1195
|
var assignValue = function assignValue(val, key) {
|
|
1196
|
+
// Skip dangerous property names to prevent prototype pollution
|
|
1197
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1195
1200
|
var targetKey = caseless && findKey(result, key) || key;
|
|
1196
1201
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
1197
1202
|
result[targetKey] = merge(result[targetKey], val);
|
|
@@ -1216,7 +1221,8 @@
|
|
|
1216
1221
|
* @param {Object} b The object to copy properties from
|
|
1217
1222
|
* @param {Object} thisArg The object to bind function to
|
|
1218
1223
|
*
|
|
1219
|
-
* @param {
|
|
1224
|
+
* @param {Object} [options]
|
|
1225
|
+
* @param {Boolean} [options.allOwnKeys]
|
|
1220
1226
|
* @returns {Object} The resulting value of object a
|
|
1221
1227
|
*/
|
|
1222
1228
|
var extend = function extend(a, b, thisArg) {
|
|
@@ -1224,9 +1230,19 @@
|
|
|
1224
1230
|
allOwnKeys = _ref3.allOwnKeys;
|
|
1225
1231
|
forEach(b, function (val, key) {
|
|
1226
1232
|
if (thisArg && isFunction$1(val)) {
|
|
1227
|
-
a
|
|
1233
|
+
Object.defineProperty(a, key, {
|
|
1234
|
+
value: bind(val, thisArg),
|
|
1235
|
+
writable: true,
|
|
1236
|
+
enumerable: true,
|
|
1237
|
+
configurable: true
|
|
1238
|
+
});
|
|
1228
1239
|
} else {
|
|
1229
|
-
a
|
|
1240
|
+
Object.defineProperty(a, key, {
|
|
1241
|
+
value: val,
|
|
1242
|
+
writable: true,
|
|
1243
|
+
enumerable: true,
|
|
1244
|
+
configurable: true
|
|
1245
|
+
});
|
|
1230
1246
|
}
|
|
1231
1247
|
}, {
|
|
1232
1248
|
allOwnKeys: allOwnKeys
|
|
@@ -1242,7 +1258,7 @@
|
|
|
1242
1258
|
* @returns {string} content value without BOM
|
|
1243
1259
|
*/
|
|
1244
1260
|
var stripBOM = function stripBOM(content) {
|
|
1245
|
-
if (content.charCodeAt(0) ===
|
|
1261
|
+
if (content.charCodeAt(0) === 0xfeff) {
|
|
1246
1262
|
content = content.slice(1);
|
|
1247
1263
|
}
|
|
1248
1264
|
return content;
|
|
@@ -1257,10 +1273,15 @@
|
|
|
1257
1273
|
*
|
|
1258
1274
|
* @returns {void}
|
|
1259
1275
|
*/
|
|
1260
|
-
var inherits = function inherits(constructor, superConstructor, props, descriptors) {
|
|
1276
|
+
var inherits$1 = function inherits(constructor, superConstructor, props, descriptors) {
|
|
1261
1277
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
1262
|
-
constructor.prototype
|
|
1263
|
-
|
|
1278
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
1279
|
+
value: constructor,
|
|
1280
|
+
writable: true,
|
|
1281
|
+
enumerable: false,
|
|
1282
|
+
configurable: true
|
|
1283
|
+
});
|
|
1284
|
+
Object.defineProperty(constructor, "super", {
|
|
1264
1285
|
value: superConstructor.prototype
|
|
1265
1286
|
});
|
|
1266
1287
|
props && Object.assign(constructor.prototype, props);
|
|
@@ -1293,7 +1314,7 @@
|
|
|
1293
1314
|
merged[prop] = true;
|
|
1294
1315
|
}
|
|
1295
1316
|
}
|
|
1296
|
-
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
1317
|
+
sourceObj = filter !== false && getPrototypeOf$1(sourceObj);
|
|
1297
1318
|
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
1298
1319
|
return destObj;
|
|
1299
1320
|
};
|
|
@@ -1350,7 +1371,7 @@
|
|
|
1350
1371
|
return function (thing) {
|
|
1351
1372
|
return TypedArray && thing instanceof TypedArray;
|
|
1352
1373
|
};
|
|
1353
|
-
}(typeof Uint8Array !==
|
|
1374
|
+
}(typeof Uint8Array !== "undefined" && getPrototypeOf$1(Uint8Array));
|
|
1354
1375
|
|
|
1355
1376
|
/**
|
|
1356
1377
|
* For each entry in the object, call the function with the key and value.
|
|
@@ -1388,7 +1409,7 @@
|
|
|
1388
1409
|
};
|
|
1389
1410
|
|
|
1390
1411
|
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
1391
|
-
var isHTMLForm = kindOfTest(
|
|
1412
|
+
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
1392
1413
|
var toCamelCase = function toCamelCase(str) {
|
|
1393
1414
|
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
1394
1415
|
return p1.toUpperCase() + p2;
|
|
@@ -1410,7 +1431,7 @@
|
|
|
1410
1431
|
*
|
|
1411
1432
|
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
1412
1433
|
*/
|
|
1413
|
-
var isRegExp = kindOfTest(
|
|
1434
|
+
var isRegExp = kindOfTest("RegExp");
|
|
1414
1435
|
var reduceDescriptors = function reduceDescriptors(obj, reducer) {
|
|
1415
1436
|
var descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
1416
1437
|
var reducedDescriptors = {};
|
|
@@ -1431,19 +1452,19 @@
|
|
|
1431
1452
|
var freezeMethods = function freezeMethods(obj) {
|
|
1432
1453
|
reduceDescriptors(obj, function (descriptor, name) {
|
|
1433
1454
|
// skip restricted props in strict mode
|
|
1434
|
-
if (isFunction$1(obj) && [
|
|
1455
|
+
if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
1435
1456
|
return false;
|
|
1436
1457
|
}
|
|
1437
1458
|
var value = obj[name];
|
|
1438
1459
|
if (!isFunction$1(value)) return;
|
|
1439
1460
|
descriptor.enumerable = false;
|
|
1440
|
-
if (
|
|
1461
|
+
if ("writable" in descriptor) {
|
|
1441
1462
|
descriptor.writable = false;
|
|
1442
1463
|
return;
|
|
1443
1464
|
}
|
|
1444
1465
|
if (!descriptor.set) {
|
|
1445
1466
|
descriptor.set = function () {
|
|
1446
|
-
throw Error(
|
|
1467
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
1447
1468
|
};
|
|
1448
1469
|
}
|
|
1449
1470
|
});
|
|
@@ -1471,7 +1492,7 @@
|
|
|
1471
1492
|
* @returns {boolean}
|
|
1472
1493
|
*/
|
|
1473
1494
|
function isSpecCompliantForm(thing) {
|
|
1474
|
-
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] ===
|
|
1495
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
1475
1496
|
}
|
|
1476
1497
|
var toJSONObject = function toJSONObject(obj) {
|
|
1477
1498
|
var stack = new Array(10);
|
|
@@ -1485,7 +1506,7 @@
|
|
|
1485
1506
|
if (isBuffer(source)) {
|
|
1486
1507
|
return source;
|
|
1487
1508
|
}
|
|
1488
|
-
if (!(
|
|
1509
|
+
if (!("toJSON" in source)) {
|
|
1489
1510
|
stack[i] = source;
|
|
1490
1511
|
var target = isArray(source) ? [] : {};
|
|
1491
1512
|
forEach(source, function (value, key) {
|
|
@@ -1500,7 +1521,7 @@
|
|
|
1500
1521
|
};
|
|
1501
1522
|
return _visit(obj, 0);
|
|
1502
1523
|
};
|
|
1503
|
-
var isAsyncFn = kindOfTest(
|
|
1524
|
+
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
1504
1525
|
var isThenable = function isThenable(thing) {
|
|
1505
1526
|
return thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
1506
1527
|
};
|
|
@@ -1527,8 +1548,8 @@
|
|
|
1527
1548
|
}("axios@".concat(Math.random()), []) : function (cb) {
|
|
1528
1549
|
return setTimeout(cb);
|
|
1529
1550
|
};
|
|
1530
|
-
}(typeof setImmediate ===
|
|
1531
|
-
var asap = typeof queueMicrotask !==
|
|
1551
|
+
}(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
1552
|
+
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
1532
1553
|
|
|
1533
1554
|
// *********************
|
|
1534
1555
|
|
|
@@ -1566,7 +1587,7 @@
|
|
|
1566
1587
|
extend: extend,
|
|
1567
1588
|
trim: trim,
|
|
1568
1589
|
stripBOM: stripBOM,
|
|
1569
|
-
inherits: inherits,
|
|
1590
|
+
inherits: inherits$1,
|
|
1570
1591
|
toFlatObject: toFlatObject,
|
|
1571
1592
|
kindOf: kindOf,
|
|
1572
1593
|
kindOfTest: kindOfTest,
|
|
@@ -1596,94 +1617,223 @@
|
|
|
1596
1617
|
isIterable: isIterable
|
|
1597
1618
|
};
|
|
1598
1619
|
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
*
|
|
1608
|
-
* @returns {Error} The created error.
|
|
1609
|
-
*/
|
|
1610
|
-
function AxiosError(message, code, config, request, response) {
|
|
1611
|
-
Error.call(this);
|
|
1612
|
-
if (Error.captureStackTrace) {
|
|
1613
|
-
Error.captureStackTrace(this, this.constructor);
|
|
1614
|
-
} else {
|
|
1615
|
-
this.stack = new Error().stack;
|
|
1620
|
+
var possibleConstructorReturn = {exports: {}};
|
|
1621
|
+
|
|
1622
|
+
var assertThisInitialized = {exports: {}};
|
|
1623
|
+
|
|
1624
|
+
(function (module) {
|
|
1625
|
+
function _assertThisInitialized(e) {
|
|
1626
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1627
|
+
return e;
|
|
1616
1628
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1629
|
+
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1630
|
+
})(assertThisInitialized);
|
|
1631
|
+
|
|
1632
|
+
(function (module) {
|
|
1633
|
+
var _typeof = _typeof$2.exports["default"];
|
|
1634
|
+
var assertThisInitialized$1 = assertThisInitialized.exports;
|
|
1635
|
+
function _possibleConstructorReturn(t, e) {
|
|
1636
|
+
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
|
|
1637
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
1638
|
+
return assertThisInitialized$1(t);
|
|
1625
1639
|
}
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
fileName: this.fileName,
|
|
1638
|
-
lineNumber: this.lineNumber,
|
|
1639
|
-
columnNumber: this.columnNumber,
|
|
1640
|
-
stack: this.stack,
|
|
1641
|
-
// Axios
|
|
1642
|
-
config: utils$1.toJSONObject(this.config),
|
|
1643
|
-
code: this.code,
|
|
1644
|
-
status: this.status
|
|
1645
|
-
};
|
|
1640
|
+
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1641
|
+
})(possibleConstructorReturn);
|
|
1642
|
+
var _possibleConstructorReturn = /*@__PURE__*/getDefaultExportFromCjs(possibleConstructorReturn.exports);
|
|
1643
|
+
|
|
1644
|
+
var getPrototypeOf = {exports: {}};
|
|
1645
|
+
|
|
1646
|
+
(function (module) {
|
|
1647
|
+
function _getPrototypeOf(t) {
|
|
1648
|
+
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
|
|
1649
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
1650
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
|
|
1646
1651
|
}
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
var
|
|
1650
|
-
['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL'
|
|
1651
|
-
// eslint-disable-next-line func-names
|
|
1652
|
-
].forEach(function (code) {
|
|
1653
|
-
descriptors[code] = {
|
|
1654
|
-
value: code
|
|
1655
|
-
};
|
|
1656
|
-
});
|
|
1657
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
1658
|
-
Object.defineProperty(prototype$1, 'isAxiosError', {
|
|
1659
|
-
value: true
|
|
1660
|
-
});
|
|
1652
|
+
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1653
|
+
})(getPrototypeOf);
|
|
1654
|
+
var _getPrototypeOf = /*@__PURE__*/getDefaultExportFromCjs(getPrototypeOf.exports);
|
|
1661
1655
|
|
|
1662
|
-
|
|
1663
|
-
AxiosError.from = function (error, code, config, request, response, customProps) {
|
|
1664
|
-
var axiosError = Object.create(prototype$1);
|
|
1665
|
-
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
1666
|
-
return obj !== Error.prototype;
|
|
1667
|
-
}, function (prop) {
|
|
1668
|
-
return prop !== 'isAxiosError';
|
|
1669
|
-
});
|
|
1670
|
-
var msg = error && error.message ? error.message : 'Error';
|
|
1656
|
+
var inherits = {exports: {}};
|
|
1671
1657
|
|
|
1672
|
-
|
|
1673
|
-
var errCode = code == null && error ? error.code : code;
|
|
1674
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
1658
|
+
var setPrototypeOf = {exports: {}};
|
|
1675
1659
|
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
Object.
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
});
|
|
1660
|
+
(function (module) {
|
|
1661
|
+
function _setPrototypeOf(t, e) {
|
|
1662
|
+
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
1663
|
+
return t.__proto__ = e, t;
|
|
1664
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
|
|
1682
1665
|
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1666
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1667
|
+
})(setPrototypeOf);
|
|
1668
|
+
|
|
1669
|
+
(function (module) {
|
|
1670
|
+
var setPrototypeOf$1 = setPrototypeOf.exports;
|
|
1671
|
+
function _inherits(t, e) {
|
|
1672
|
+
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
|
|
1673
|
+
t.prototype = Object.create(e && e.prototype, {
|
|
1674
|
+
constructor: {
|
|
1675
|
+
value: t,
|
|
1676
|
+
writable: !0,
|
|
1677
|
+
configurable: !0
|
|
1678
|
+
}
|
|
1679
|
+
}), Object.defineProperty(t, "prototype", {
|
|
1680
|
+
writable: !1
|
|
1681
|
+
}), e && setPrototypeOf$1(t, e);
|
|
1682
|
+
}
|
|
1683
|
+
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1684
|
+
})(inherits);
|
|
1685
|
+
var _inherits = /*@__PURE__*/getDefaultExportFromCjs(inherits.exports);
|
|
1686
|
+
|
|
1687
|
+
var wrapNativeSuper = {exports: {}};
|
|
1688
|
+
|
|
1689
|
+
var isNativeFunction = {exports: {}};
|
|
1690
|
+
|
|
1691
|
+
(function (module) {
|
|
1692
|
+
function _isNativeFunction(t) {
|
|
1693
|
+
try {
|
|
1694
|
+
return -1 !== Function.toString.call(t).indexOf("[native code]");
|
|
1695
|
+
} catch (n) {
|
|
1696
|
+
return "function" == typeof t;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1700
|
+
})(isNativeFunction);
|
|
1701
|
+
|
|
1702
|
+
var construct = {exports: {}};
|
|
1703
|
+
|
|
1704
|
+
var isNativeReflectConstruct = {exports: {}};
|
|
1705
|
+
|
|
1706
|
+
(function (module) {
|
|
1707
|
+
function _isNativeReflectConstruct() {
|
|
1708
|
+
try {
|
|
1709
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
1710
|
+
} catch (t) {}
|
|
1711
|
+
return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
1712
|
+
return !!t;
|
|
1713
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
|
|
1714
|
+
}
|
|
1715
|
+
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1716
|
+
})(isNativeReflectConstruct);
|
|
1717
|
+
|
|
1718
|
+
(function (module) {
|
|
1719
|
+
var isNativeReflectConstruct$1 = isNativeReflectConstruct.exports;
|
|
1720
|
+
var setPrototypeOf$1 = setPrototypeOf.exports;
|
|
1721
|
+
function _construct(t, e, r) {
|
|
1722
|
+
if (isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments);
|
|
1723
|
+
var o = [null];
|
|
1724
|
+
o.push.apply(o, e);
|
|
1725
|
+
var p = new (t.bind.apply(t, o))();
|
|
1726
|
+
return r && setPrototypeOf$1(p, r.prototype), p;
|
|
1727
|
+
}
|
|
1728
|
+
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1729
|
+
})(construct);
|
|
1730
|
+
|
|
1731
|
+
(function (module) {
|
|
1732
|
+
var getPrototypeOf$1 = getPrototypeOf.exports;
|
|
1733
|
+
var setPrototypeOf$1 = setPrototypeOf.exports;
|
|
1734
|
+
var isNativeFunction$1 = isNativeFunction.exports;
|
|
1735
|
+
var construct$1 = construct.exports;
|
|
1736
|
+
function _wrapNativeSuper(t) {
|
|
1737
|
+
var r = "function" == typeof Map ? new Map() : void 0;
|
|
1738
|
+
return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) {
|
|
1739
|
+
if (null === t || !isNativeFunction$1(t)) return t;
|
|
1740
|
+
if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
|
|
1741
|
+
if (void 0 !== r) {
|
|
1742
|
+
if (r.has(t)) return r.get(t);
|
|
1743
|
+
r.set(t, Wrapper);
|
|
1744
|
+
}
|
|
1745
|
+
function Wrapper() {
|
|
1746
|
+
return construct$1(t, arguments, getPrototypeOf$1(this).constructor);
|
|
1747
|
+
}
|
|
1748
|
+
return Wrapper.prototype = Object.create(t.prototype, {
|
|
1749
|
+
constructor: {
|
|
1750
|
+
value: Wrapper,
|
|
1751
|
+
enumerable: !1,
|
|
1752
|
+
writable: !0,
|
|
1753
|
+
configurable: !0
|
|
1754
|
+
}
|
|
1755
|
+
}), setPrototypeOf$1(Wrapper, t);
|
|
1756
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t);
|
|
1757
|
+
}
|
|
1758
|
+
module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1759
|
+
})(wrapNativeSuper);
|
|
1760
|
+
var _wrapNativeSuper = /*@__PURE__*/getDefaultExportFromCjs(wrapNativeSuper.exports);
|
|
1761
|
+
|
|
1762
|
+
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1763
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1764
|
+
var AxiosError = /*#__PURE__*/function (_Error) {
|
|
1765
|
+
/**
|
|
1766
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
1767
|
+
*
|
|
1768
|
+
* @param {string} message The error message.
|
|
1769
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
1770
|
+
* @param {Object} [config] The config.
|
|
1771
|
+
* @param {Object} [request] The request.
|
|
1772
|
+
* @param {Object} [response] The response.
|
|
1773
|
+
*
|
|
1774
|
+
* @returns {Error} The created error.
|
|
1775
|
+
*/
|
|
1776
|
+
function AxiosError(message, code, config, request, response) {
|
|
1777
|
+
var _this;
|
|
1778
|
+
_classCallCheck$1(this, AxiosError);
|
|
1779
|
+
_this = _callSuper$1(this, AxiosError, [message]);
|
|
1780
|
+
_this.name = 'AxiosError';
|
|
1781
|
+
_this.isAxiosError = true;
|
|
1782
|
+
code && (_this.code = code);
|
|
1783
|
+
config && (_this.config = config);
|
|
1784
|
+
request && (_this.request = request);
|
|
1785
|
+
if (response) {
|
|
1786
|
+
_this.response = response;
|
|
1787
|
+
_this.status = response.status;
|
|
1788
|
+
}
|
|
1789
|
+
return _this;
|
|
1790
|
+
}
|
|
1791
|
+
_inherits(AxiosError, _Error);
|
|
1792
|
+
return _createClass$1(AxiosError, [{
|
|
1793
|
+
key: "toJSON",
|
|
1794
|
+
value: function toJSON() {
|
|
1795
|
+
return {
|
|
1796
|
+
// Standard
|
|
1797
|
+
message: this.message,
|
|
1798
|
+
name: this.name,
|
|
1799
|
+
// Microsoft
|
|
1800
|
+
description: this.description,
|
|
1801
|
+
number: this.number,
|
|
1802
|
+
// Mozilla
|
|
1803
|
+
fileName: this.fileName,
|
|
1804
|
+
lineNumber: this.lineNumber,
|
|
1805
|
+
columnNumber: this.columnNumber,
|
|
1806
|
+
stack: this.stack,
|
|
1807
|
+
// Axios
|
|
1808
|
+
config: utils$1.toJSONObject(this.config),
|
|
1809
|
+
code: this.code,
|
|
1810
|
+
status: this.status
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
}], [{
|
|
1814
|
+
key: "from",
|
|
1815
|
+
value: function from(error, code, config, request, response, customProps) {
|
|
1816
|
+
var axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
1817
|
+
axiosError.cause = error;
|
|
1818
|
+
axiosError.name = error.name;
|
|
1819
|
+
customProps && Object.assign(axiosError, customProps);
|
|
1820
|
+
return axiosError;
|
|
1821
|
+
}
|
|
1822
|
+
}]);
|
|
1823
|
+
}(/*#__PURE__*/_wrapNativeSuper(Error)); // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
|
|
1824
|
+
AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
|
|
1825
|
+
AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
|
|
1826
|
+
AxiosError.ECONNABORTED = 'ECONNABORTED';
|
|
1827
|
+
AxiosError.ETIMEDOUT = 'ETIMEDOUT';
|
|
1828
|
+
AxiosError.ERR_NETWORK = 'ERR_NETWORK';
|
|
1829
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
|
|
1830
|
+
AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
|
|
1831
|
+
AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
|
|
1832
|
+
AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
1833
|
+
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
1834
|
+
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
1835
|
+
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
1836
|
+
var AxiosError$1 = AxiosError;
|
|
1687
1837
|
|
|
1688
1838
|
// eslint-disable-next-line strict
|
|
1689
1839
|
var httpAdapter = null;
|
|
@@ -1801,7 +1951,7 @@
|
|
|
1801
1951
|
return value.toString();
|
|
1802
1952
|
}
|
|
1803
1953
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
1804
|
-
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
1954
|
+
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
|
1805
1955
|
}
|
|
1806
1956
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
1807
1957
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
@@ -1941,22 +2091,19 @@
|
|
|
1941
2091
|
* @returns {string} The formatted url
|
|
1942
2092
|
*/
|
|
1943
2093
|
function buildURL(url, params, options) {
|
|
1944
|
-
/*eslint no-param-reassign:0*/
|
|
1945
2094
|
if (!params) {
|
|
1946
2095
|
return url;
|
|
1947
2096
|
}
|
|
1948
2097
|
var _encode = options && options.encode || encode;
|
|
1949
|
-
|
|
1950
|
-
options
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
}
|
|
1954
|
-
var serializeFn = options && options.serialize;
|
|
2098
|
+
var _options = utils$1.isFunction(options) ? {
|
|
2099
|
+
serialize: options
|
|
2100
|
+
} : options;
|
|
2101
|
+
var serializeFn = _options && _options.serialize;
|
|
1955
2102
|
var serializedParams;
|
|
1956
2103
|
if (serializeFn) {
|
|
1957
|
-
serializedParams = serializeFn(params,
|
|
2104
|
+
serializedParams = serializeFn(params, _options);
|
|
1958
2105
|
} else {
|
|
1959
|
-
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params,
|
|
2106
|
+
serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
|
|
1960
2107
|
}
|
|
1961
2108
|
if (serializedParams) {
|
|
1962
2109
|
var hashmarkIndex = url.indexOf("#");
|
|
@@ -1979,6 +2126,7 @@
|
|
|
1979
2126
|
*
|
|
1980
2127
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1981
2128
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
2129
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
1982
2130
|
*
|
|
1983
2131
|
* @return {Number} An ID used to remove interceptor later
|
|
1984
2132
|
*/
|
|
@@ -2048,7 +2196,8 @@
|
|
|
2048
2196
|
var transitionalDefaults = {
|
|
2049
2197
|
silentJSONParsing: true,
|
|
2050
2198
|
forcedJSONParsing: true,
|
|
2051
|
-
clarifyTimeoutError: false
|
|
2199
|
+
clarifyTimeoutError: false,
|
|
2200
|
+
legacyInterceptorReqResOrdering: true
|
|
2052
2201
|
};
|
|
2053
2202
|
|
|
2054
2203
|
var defineProperty = {exports: {}};
|
|
@@ -2306,7 +2455,7 @@
|
|
|
2306
2455
|
} catch (e) {
|
|
2307
2456
|
if (strictJSONParsing) {
|
|
2308
2457
|
if (e.name === 'SyntaxError') {
|
|
2309
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
2458
|
+
throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
2310
2459
|
}
|
|
2311
2460
|
throw e;
|
|
2312
2461
|
}
|
|
@@ -2750,23 +2899,30 @@
|
|
|
2750
2899
|
return !!(value && value.__CANCEL__);
|
|
2751
2900
|
}
|
|
2752
2901
|
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2902
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
2903
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
2904
|
+
var CanceledError = /*#__PURE__*/function (_AxiosError) {
|
|
2905
|
+
/**
|
|
2906
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
2907
|
+
*
|
|
2908
|
+
* @param {string=} message The message.
|
|
2909
|
+
* @param {Object=} config The config.
|
|
2910
|
+
* @param {Object=} request The request.
|
|
2911
|
+
*
|
|
2912
|
+
* @returns {CanceledError} The created error.
|
|
2913
|
+
*/
|
|
2914
|
+
function CanceledError(message, config, request) {
|
|
2915
|
+
var _this;
|
|
2916
|
+
_classCallCheck$1(this, CanceledError);
|
|
2917
|
+
_this = _callSuper(this, CanceledError, [message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request]);
|
|
2918
|
+
_this.name = 'CanceledError';
|
|
2919
|
+
_this.__CANCEL__ = true;
|
|
2920
|
+
return _this;
|
|
2921
|
+
}
|
|
2922
|
+
_inherits(CanceledError, _AxiosError);
|
|
2923
|
+
return _createClass$1(CanceledError);
|
|
2924
|
+
}(AxiosError$1);
|
|
2925
|
+
var CanceledError$1 = CanceledError;
|
|
2770
2926
|
|
|
2771
2927
|
/**
|
|
2772
2928
|
* Resolve or reject a Promise based on response status.
|
|
@@ -2782,7 +2938,7 @@
|
|
|
2782
2938
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
2783
2939
|
resolve(response);
|
|
2784
2940
|
} else {
|
|
2785
|
-
reject(new AxiosError('Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
2941
|
+
reject(new AxiosError$1('Request failed with status code ' + response.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
2786
2942
|
}
|
|
2787
2943
|
}
|
|
2788
2944
|
|
|
@@ -2982,6 +3138,9 @@
|
|
|
2982
3138
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
2983
3139
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
2984
3140
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
3141
|
+
if (typeof url !== 'string') {
|
|
3142
|
+
return false;
|
|
3143
|
+
}
|
|
2985
3144
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
2986
3145
|
}
|
|
2987
3146
|
|
|
@@ -3046,8 +3205,6 @@
|
|
|
3046
3205
|
}
|
|
3047
3206
|
return source;
|
|
3048
3207
|
}
|
|
3049
|
-
|
|
3050
|
-
// eslint-disable-next-line consistent-return
|
|
3051
3208
|
function mergeDeepProperties(a, b, prop, caseless) {
|
|
3052
3209
|
if (!utils$1.isUndefined(b)) {
|
|
3053
3210
|
return getMergedValue(a, b, prop, caseless);
|
|
@@ -3114,7 +3271,8 @@
|
|
|
3114
3271
|
}
|
|
3115
3272
|
};
|
|
3116
3273
|
utils$1.forEach(Object.keys(_objectSpread$2(_objectSpread$2({}, config1), config2)), function computeConfigValue(prop) {
|
|
3117
|
-
|
|
3274
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
3275
|
+
var merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
3118
3276
|
var configValue = merge(config1[prop], config2[prop], prop);
|
|
3119
3277
|
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
3120
3278
|
});
|
|
@@ -3250,7 +3408,7 @@
|
|
|
3250
3408
|
if (!request) {
|
|
3251
3409
|
return;
|
|
3252
3410
|
}
|
|
3253
|
-
reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
|
|
3411
|
+
reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
|
|
3254
3412
|
|
|
3255
3413
|
// Clean up request
|
|
3256
3414
|
request = null;
|
|
@@ -3262,7 +3420,7 @@
|
|
|
3262
3420
|
// (message may be empty; when present, surface it)
|
|
3263
3421
|
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
|
3264
3422
|
var msg = event && event.message ? event.message : 'Network Error';
|
|
3265
|
-
var err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
|
|
3423
|
+
var err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
|
3266
3424
|
// attach the underlying event for consumers who want details
|
|
3267
3425
|
err.event = event || null;
|
|
3268
3426
|
reject(err);
|
|
@@ -3276,7 +3434,7 @@
|
|
|
3276
3434
|
if (_config.timeoutErrorMessage) {
|
|
3277
3435
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
3278
3436
|
}
|
|
3279
|
-
reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
3437
|
+
reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request));
|
|
3280
3438
|
|
|
3281
3439
|
// Clean up request
|
|
3282
3440
|
request = null;
|
|
@@ -3327,7 +3485,7 @@
|
|
|
3327
3485
|
if (!request) {
|
|
3328
3486
|
return;
|
|
3329
3487
|
}
|
|
3330
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
3488
|
+
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
3331
3489
|
request.abort();
|
|
3332
3490
|
request = null;
|
|
3333
3491
|
};
|
|
@@ -3338,7 +3496,7 @@
|
|
|
3338
3496
|
}
|
|
3339
3497
|
var protocol = parseProtocol(_config.url);
|
|
3340
3498
|
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
3341
|
-
reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
|
|
3499
|
+
reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
|
|
3342
3500
|
return;
|
|
3343
3501
|
}
|
|
3344
3502
|
|
|
@@ -3358,12 +3516,12 @@
|
|
|
3358
3516
|
aborted = true;
|
|
3359
3517
|
unsubscribe();
|
|
3360
3518
|
var err = reason instanceof Error ? reason : this.reason;
|
|
3361
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
3519
|
+
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
3362
3520
|
}
|
|
3363
3521
|
};
|
|
3364
3522
|
var timer = timeout && setTimeout(function () {
|
|
3365
3523
|
timer = null;
|
|
3366
|
-
onabort(new AxiosError("timeout ".concat(timeout, "
|
|
3524
|
+
onabort(new AxiosError$1("timeout of ".concat(timeout, "ms exceeded"), AxiosError$1.ETIMEDOUT));
|
|
3367
3525
|
}, timeout);
|
|
3368
3526
|
var unsubscribe = function unsubscribe() {
|
|
3369
3527
|
if (signals) {
|
|
@@ -3814,7 +3972,7 @@
|
|
|
3814
3972
|
if (method) {
|
|
3815
3973
|
return method.call(res);
|
|
3816
3974
|
}
|
|
3817
|
-
throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
|
|
3975
|
+
throw new AxiosError$1("Response type '".concat(type, "' is not supported"), AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
3818
3976
|
});
|
|
3819
3977
|
});
|
|
3820
3978
|
}();
|
|
@@ -3997,11 +4155,11 @@
|
|
|
3997
4155
|
_context4.next = 9;
|
|
3998
4156
|
break;
|
|
3999
4157
|
}
|
|
4000
|
-
throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
|
|
4158
|
+
throw Object.assign(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request, _t5 && _t5.response), {
|
|
4001
4159
|
cause: _t5.cause || _t5
|
|
4002
4160
|
});
|
|
4003
4161
|
case 9:
|
|
4004
|
-
throw AxiosError.from(_t5, _t5 && _t5.code, config, request);
|
|
4162
|
+
throw AxiosError$1.from(_t5, _t5 && _t5.code, config, request, _t5 && _t5.response);
|
|
4005
4163
|
case 10:
|
|
4006
4164
|
case "end":
|
|
4007
4165
|
return _context4.stop();
|
|
@@ -4112,7 +4270,7 @@
|
|
|
4112
4270
|
if (!isResolvedHandle(nameOrAdapter)) {
|
|
4113
4271
|
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
4114
4272
|
if (adapter === undefined) {
|
|
4115
|
-
throw new AxiosError("Unknown adapter '".concat(id, "'"));
|
|
4273
|
+
throw new AxiosError$1("Unknown adapter '".concat(id, "'"));
|
|
4116
4274
|
}
|
|
4117
4275
|
}
|
|
4118
4276
|
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
@@ -4128,7 +4286,7 @@
|
|
|
4128
4286
|
return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
|
|
4129
4287
|
});
|
|
4130
4288
|
var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
|
|
4131
|
-
throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
|
|
4289
|
+
throw new AxiosError$1("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
|
|
4132
4290
|
}
|
|
4133
4291
|
return adapter;
|
|
4134
4292
|
}
|
|
@@ -4161,7 +4319,7 @@
|
|
|
4161
4319
|
config.cancelToken.throwIfRequested();
|
|
4162
4320
|
}
|
|
4163
4321
|
if (config.signal && config.signal.aborted) {
|
|
4164
|
-
throw new CanceledError(null, config);
|
|
4322
|
+
throw new CanceledError$1(null, config);
|
|
4165
4323
|
}
|
|
4166
4324
|
}
|
|
4167
4325
|
|
|
@@ -4203,7 +4361,7 @@
|
|
|
4203
4361
|
});
|
|
4204
4362
|
}
|
|
4205
4363
|
|
|
4206
|
-
var VERSION = "1.13.
|
|
4364
|
+
var VERSION = "1.13.5";
|
|
4207
4365
|
|
|
4208
4366
|
var validators$1 = {};
|
|
4209
4367
|
|
|
@@ -4232,7 +4390,7 @@
|
|
|
4232
4390
|
// eslint-disable-next-line func-names
|
|
4233
4391
|
return function (value, opt, opts) {
|
|
4234
4392
|
if (validator === false) {
|
|
4235
|
-
throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
|
|
4393
|
+
throw new AxiosError$1(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError$1.ERR_DEPRECATED);
|
|
4236
4394
|
}
|
|
4237
4395
|
if (version && !deprecatedWarnings[opt]) {
|
|
4238
4396
|
deprecatedWarnings[opt] = true;
|
|
@@ -4262,7 +4420,7 @@
|
|
|
4262
4420
|
|
|
4263
4421
|
function assertOptions(options, schema, allowUnknown) {
|
|
4264
4422
|
if (_typeof$1(options) !== 'object') {
|
|
4265
|
-
throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
4423
|
+
throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
4266
4424
|
}
|
|
4267
4425
|
var keys = Object.keys(options);
|
|
4268
4426
|
var i = keys.length;
|
|
@@ -4273,12 +4431,12 @@
|
|
|
4273
4431
|
var value = options[opt];
|
|
4274
4432
|
var result = value === undefined || validator(value, opt, options);
|
|
4275
4433
|
if (result !== true) {
|
|
4276
|
-
throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
4434
|
+
throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
4277
4435
|
}
|
|
4278
4436
|
continue;
|
|
4279
4437
|
}
|
|
4280
4438
|
if (allowUnknown !== true) {
|
|
4281
|
-
throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
4439
|
+
throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
|
|
4282
4440
|
}
|
|
4283
4441
|
}
|
|
4284
4442
|
}
|
|
@@ -4379,7 +4537,8 @@
|
|
|
4379
4537
|
validator.assertOptions(transitional, {
|
|
4380
4538
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
4381
4539
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
4382
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
4540
|
+
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
4541
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
4383
4542
|
}, false);
|
|
4384
4543
|
}
|
|
4385
4544
|
if (paramsSerializer != null) {
|
|
@@ -4424,7 +4583,13 @@
|
|
|
4424
4583
|
return;
|
|
4425
4584
|
}
|
|
4426
4585
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
4427
|
-
|
|
4586
|
+
var transitional = config.transitional || transitionalDefaults;
|
|
4587
|
+
var legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
|
|
4588
|
+
if (legacyInterceptorReqResOrdering) {
|
|
4589
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
4590
|
+
} else {
|
|
4591
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
4592
|
+
}
|
|
4428
4593
|
});
|
|
4429
4594
|
var responseInterceptorChain = [];
|
|
4430
4595
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -4554,7 +4719,7 @@
|
|
|
4554
4719
|
// Cancellation has already been requested
|
|
4555
4720
|
return;
|
|
4556
4721
|
}
|
|
4557
|
-
token.reason = new CanceledError(message, config, request);
|
|
4722
|
+
token.reason = new CanceledError$1(message, config, request);
|
|
4558
4723
|
resolvePromise(token.reason);
|
|
4559
4724
|
});
|
|
4560
4725
|
}
|
|
@@ -4643,7 +4808,7 @@
|
|
|
4643
4808
|
*
|
|
4644
4809
|
* ```js
|
|
4645
4810
|
* function f(x, y, z) {}
|
|
4646
|
-
*
|
|
4811
|
+
* const args = [1, 2, 3];
|
|
4647
4812
|
* f.apply(null, args);
|
|
4648
4813
|
* ```
|
|
4649
4814
|
*
|
|
@@ -4788,14 +4953,14 @@
|
|
|
4788
4953
|
axios.Axios = Axios$1;
|
|
4789
4954
|
|
|
4790
4955
|
// Expose Cancel & CancelToken
|
|
4791
|
-
axios.CanceledError = CanceledError;
|
|
4956
|
+
axios.CanceledError = CanceledError$1;
|
|
4792
4957
|
axios.CancelToken = CancelToken$1;
|
|
4793
4958
|
axios.isCancel = isCancel;
|
|
4794
4959
|
axios.VERSION = VERSION;
|
|
4795
4960
|
axios.toFormData = toFormData;
|
|
4796
4961
|
|
|
4797
4962
|
// Expose AxiosError class
|
|
4798
|
-
axios.AxiosError = AxiosError;
|
|
4963
|
+
axios.AxiosError = AxiosError$1;
|
|
4799
4964
|
|
|
4800
4965
|
// alias for CanceledError for backward compatibility
|
|
4801
4966
|
axios.Cancel = axios.CanceledError;
|