byt-ui 0.1.4 → 0.1.5
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/lib/byt-ui.common.js +3798 -45
- package/lib/byt-ui.umd.js +3798 -45
- package/lib/byt-ui.umd.min.js +6 -6
- package/package.json +1 -1
- package/packages/common/index.js +8 -5
- package/packages/common/modules/cookie.js +13 -5
- package/packages/common/modules/request.js +159 -0
package/lib/byt-ui.umd.js
CHANGED
|
@@ -94441,28 +94441,3717 @@ var website = __webpack_require__(4522);
|
|
|
94441
94441
|
* @Description:
|
|
94442
94442
|
* @Author: 王国火
|
|
94443
94443
|
* @Date: 2022-10-18 12:37:03
|
|
94444
|
-
* @LastEditTime: 2024-04-
|
|
94444
|
+
* @LastEditTime: 2024-04-22 14:40:35
|
|
94445
94445
|
* @LastEditors: 王国火
|
|
94446
94446
|
*/
|
|
94447
94447
|
|
|
94448
94448
|
|
|
94449
94449
|
const getCookie = key => {
|
|
94450
|
-
const
|
|
94451
|
-
return api.get(
|
|
94450
|
+
const fullKey = `${website["default"].key}-${key}`;
|
|
94451
|
+
return api.get(fullKey, {
|
|
94452
|
+
domain: window.location.hostname
|
|
94453
|
+
}) || '';
|
|
94452
94454
|
};
|
|
94453
94455
|
const setCookie = (key, value, expires = 7, path = '/') => {
|
|
94454
|
-
|
|
94456
|
+
const fullKey = `${website["default"].key}-${key}`;
|
|
94457
|
+
return api.set(fullKey, value, {
|
|
94455
94458
|
expires,
|
|
94456
|
-
path
|
|
94459
|
+
path,
|
|
94460
|
+
domain: window.location.hostname
|
|
94461
|
+
});
|
|
94462
|
+
};
|
|
94463
|
+
const removeCookie = (key, path = '/') => {
|
|
94464
|
+
const fullKey = `${website["default"].key}-${key}`;
|
|
94465
|
+
return api.remove(fullKey, {
|
|
94466
|
+
path,
|
|
94467
|
+
domain: window.location.hostname
|
|
94468
|
+
});
|
|
94469
|
+
};
|
|
94470
|
+
|
|
94471
|
+
/***/ }),
|
|
94472
|
+
|
|
94473
|
+
/***/ 68873:
|
|
94474
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
94475
|
+
|
|
94476
|
+
"use strict";
|
|
94477
|
+
// ESM COMPAT FLAG
|
|
94478
|
+
__webpack_require__.r(__webpack_exports__);
|
|
94479
|
+
|
|
94480
|
+
// EXPORTS
|
|
94481
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
94482
|
+
"default": function() { return /* binding */ modules_request; },
|
|
94483
|
+
request: function() { return /* binding */ request; }
|
|
94484
|
+
});
|
|
94485
|
+
|
|
94486
|
+
// NAMESPACE OBJECT: ./node_modules/axios/lib/platform/common/utils.js
|
|
94487
|
+
var common_utils_namespaceObject = {};
|
|
94488
|
+
__webpack_require__.r(common_utils_namespaceObject);
|
|
94489
|
+
__webpack_require__.d(common_utils_namespaceObject, {
|
|
94490
|
+
hasBrowserEnv: function() { return hasBrowserEnv; },
|
|
94491
|
+
hasStandardBrowserEnv: function() { return hasStandardBrowserEnv; },
|
|
94492
|
+
hasStandardBrowserWebWorkerEnv: function() { return hasStandardBrowserWebWorkerEnv; }
|
|
94493
|
+
});
|
|
94494
|
+
|
|
94495
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
|
|
94496
|
+
|
|
94497
|
+
|
|
94498
|
+
function bind(fn, thisArg) {
|
|
94499
|
+
return function wrap() {
|
|
94500
|
+
return fn.apply(thisArg, arguments);
|
|
94501
|
+
};
|
|
94502
|
+
}
|
|
94503
|
+
|
|
94504
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/utils.js
|
|
94505
|
+
|
|
94506
|
+
|
|
94507
|
+
|
|
94508
|
+
|
|
94509
|
+
// utils is a library of generic helper functions non-specific to axios
|
|
94510
|
+
|
|
94511
|
+
const {toString: utils_toString} = Object.prototype;
|
|
94512
|
+
const {getPrototypeOf} = Object;
|
|
94513
|
+
|
|
94514
|
+
const kindOf = (cache => thing => {
|
|
94515
|
+
const str = utils_toString.call(thing);
|
|
94516
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
94517
|
+
})(Object.create(null));
|
|
94518
|
+
|
|
94519
|
+
const kindOfTest = (type) => {
|
|
94520
|
+
type = type.toLowerCase();
|
|
94521
|
+
return (thing) => kindOf(thing) === type
|
|
94522
|
+
}
|
|
94523
|
+
|
|
94524
|
+
const typeOfTest = type => thing => typeof thing === type;
|
|
94525
|
+
|
|
94526
|
+
/**
|
|
94527
|
+
* Determine if a value is an Array
|
|
94528
|
+
*
|
|
94529
|
+
* @param {Object} val The value to test
|
|
94530
|
+
*
|
|
94531
|
+
* @returns {boolean} True if value is an Array, otherwise false
|
|
94532
|
+
*/
|
|
94533
|
+
const {isArray} = Array;
|
|
94534
|
+
|
|
94535
|
+
/**
|
|
94536
|
+
* Determine if a value is undefined
|
|
94537
|
+
*
|
|
94538
|
+
* @param {*} val The value to test
|
|
94539
|
+
*
|
|
94540
|
+
* @returns {boolean} True if the value is undefined, otherwise false
|
|
94541
|
+
*/
|
|
94542
|
+
const isUndefined = typeOfTest('undefined');
|
|
94543
|
+
|
|
94544
|
+
/**
|
|
94545
|
+
* Determine if a value is a Buffer
|
|
94546
|
+
*
|
|
94547
|
+
* @param {*} val The value to test
|
|
94548
|
+
*
|
|
94549
|
+
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
94550
|
+
*/
|
|
94551
|
+
function isBuffer(val) {
|
|
94552
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
94553
|
+
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
94554
|
+
}
|
|
94555
|
+
|
|
94556
|
+
/**
|
|
94557
|
+
* Determine if a value is an ArrayBuffer
|
|
94558
|
+
*
|
|
94559
|
+
* @param {*} val The value to test
|
|
94560
|
+
*
|
|
94561
|
+
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
94562
|
+
*/
|
|
94563
|
+
const isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
94564
|
+
|
|
94565
|
+
|
|
94566
|
+
/**
|
|
94567
|
+
* Determine if a value is a view on an ArrayBuffer
|
|
94568
|
+
*
|
|
94569
|
+
* @param {*} val The value to test
|
|
94570
|
+
*
|
|
94571
|
+
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
94572
|
+
*/
|
|
94573
|
+
function isArrayBufferView(val) {
|
|
94574
|
+
let result;
|
|
94575
|
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
94576
|
+
result = ArrayBuffer.isView(val);
|
|
94577
|
+
} else {
|
|
94578
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
94579
|
+
}
|
|
94580
|
+
return result;
|
|
94581
|
+
}
|
|
94582
|
+
|
|
94583
|
+
/**
|
|
94584
|
+
* Determine if a value is a String
|
|
94585
|
+
*
|
|
94586
|
+
* @param {*} val The value to test
|
|
94587
|
+
*
|
|
94588
|
+
* @returns {boolean} True if value is a String, otherwise false
|
|
94589
|
+
*/
|
|
94590
|
+
const isString = typeOfTest('string');
|
|
94591
|
+
|
|
94592
|
+
/**
|
|
94593
|
+
* Determine if a value is a Function
|
|
94594
|
+
*
|
|
94595
|
+
* @param {*} val The value to test
|
|
94596
|
+
* @returns {boolean} True if value is a Function, otherwise false
|
|
94597
|
+
*/
|
|
94598
|
+
const isFunction = typeOfTest('function');
|
|
94599
|
+
|
|
94600
|
+
/**
|
|
94601
|
+
* Determine if a value is a Number
|
|
94602
|
+
*
|
|
94603
|
+
* @param {*} val The value to test
|
|
94604
|
+
*
|
|
94605
|
+
* @returns {boolean} True if value is a Number, otherwise false
|
|
94606
|
+
*/
|
|
94607
|
+
const isNumber = typeOfTest('number');
|
|
94608
|
+
|
|
94609
|
+
/**
|
|
94610
|
+
* Determine if a value is an Object
|
|
94611
|
+
*
|
|
94612
|
+
* @param {*} thing The value to test
|
|
94613
|
+
*
|
|
94614
|
+
* @returns {boolean} True if value is an Object, otherwise false
|
|
94615
|
+
*/
|
|
94616
|
+
const isObject = (thing) => thing !== null && typeof thing === 'object';
|
|
94617
|
+
|
|
94618
|
+
/**
|
|
94619
|
+
* Determine if a value is a Boolean
|
|
94620
|
+
*
|
|
94621
|
+
* @param {*} thing The value to test
|
|
94622
|
+
* @returns {boolean} True if value is a Boolean, otherwise false
|
|
94623
|
+
*/
|
|
94624
|
+
const isBoolean = thing => thing === true || thing === false;
|
|
94625
|
+
|
|
94626
|
+
/**
|
|
94627
|
+
* Determine if a value is a plain Object
|
|
94628
|
+
*
|
|
94629
|
+
* @param {*} val The value to test
|
|
94630
|
+
*
|
|
94631
|
+
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
94632
|
+
*/
|
|
94633
|
+
const isPlainObject = (val) => {
|
|
94634
|
+
if (kindOf(val) !== 'object') {
|
|
94635
|
+
return false;
|
|
94636
|
+
}
|
|
94637
|
+
|
|
94638
|
+
const prototype = getPrototypeOf(val);
|
|
94639
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
94640
|
+
}
|
|
94641
|
+
|
|
94642
|
+
/**
|
|
94643
|
+
* Determine if a value is a Date
|
|
94644
|
+
*
|
|
94645
|
+
* @param {*} val The value to test
|
|
94646
|
+
*
|
|
94647
|
+
* @returns {boolean} True if value is a Date, otherwise false
|
|
94648
|
+
*/
|
|
94649
|
+
const isDate = kindOfTest('Date');
|
|
94650
|
+
|
|
94651
|
+
/**
|
|
94652
|
+
* Determine if a value is a File
|
|
94653
|
+
*
|
|
94654
|
+
* @param {*} val The value to test
|
|
94655
|
+
*
|
|
94656
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
94657
|
+
*/
|
|
94658
|
+
const isFile = kindOfTest('File');
|
|
94659
|
+
|
|
94660
|
+
/**
|
|
94661
|
+
* Determine if a value is a Blob
|
|
94662
|
+
*
|
|
94663
|
+
* @param {*} val The value to test
|
|
94664
|
+
*
|
|
94665
|
+
* @returns {boolean} True if value is a Blob, otherwise false
|
|
94666
|
+
*/
|
|
94667
|
+
const isBlob = kindOfTest('Blob');
|
|
94668
|
+
|
|
94669
|
+
/**
|
|
94670
|
+
* Determine if a value is a FileList
|
|
94671
|
+
*
|
|
94672
|
+
* @param {*} val The value to test
|
|
94673
|
+
*
|
|
94674
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
94675
|
+
*/
|
|
94676
|
+
const isFileList = kindOfTest('FileList');
|
|
94677
|
+
|
|
94678
|
+
/**
|
|
94679
|
+
* Determine if a value is a Stream
|
|
94680
|
+
*
|
|
94681
|
+
* @param {*} val The value to test
|
|
94682
|
+
*
|
|
94683
|
+
* @returns {boolean} True if value is a Stream, otherwise false
|
|
94684
|
+
*/
|
|
94685
|
+
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
94686
|
+
|
|
94687
|
+
/**
|
|
94688
|
+
* Determine if a value is a FormData
|
|
94689
|
+
*
|
|
94690
|
+
* @param {*} thing The value to test
|
|
94691
|
+
*
|
|
94692
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
94693
|
+
*/
|
|
94694
|
+
const isFormData = (thing) => {
|
|
94695
|
+
let kind;
|
|
94696
|
+
return thing && (
|
|
94697
|
+
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
94698
|
+
isFunction(thing.append) && (
|
|
94699
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
94700
|
+
// detect form-data instance
|
|
94701
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
94702
|
+
)
|
|
94703
|
+
)
|
|
94704
|
+
)
|
|
94705
|
+
}
|
|
94706
|
+
|
|
94707
|
+
/**
|
|
94708
|
+
* Determine if a value is a URLSearchParams object
|
|
94709
|
+
*
|
|
94710
|
+
* @param {*} val The value to test
|
|
94711
|
+
*
|
|
94712
|
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
94713
|
+
*/
|
|
94714
|
+
const isURLSearchParams = kindOfTest('URLSearchParams');
|
|
94715
|
+
|
|
94716
|
+
/**
|
|
94717
|
+
* Trim excess whitespace off the beginning and end of a string
|
|
94718
|
+
*
|
|
94719
|
+
* @param {String} str The String to trim
|
|
94720
|
+
*
|
|
94721
|
+
* @returns {String} The String freed of excess whitespace
|
|
94722
|
+
*/
|
|
94723
|
+
const trim = (str) => str.trim ?
|
|
94724
|
+
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
|
|
94725
|
+
|
|
94726
|
+
/**
|
|
94727
|
+
* Iterate over an Array or an Object invoking a function for each item.
|
|
94728
|
+
*
|
|
94729
|
+
* If `obj` is an Array callback will be called passing
|
|
94730
|
+
* the value, index, and complete array for each item.
|
|
94731
|
+
*
|
|
94732
|
+
* If 'obj' is an Object callback will be called passing
|
|
94733
|
+
* the value, key, and complete object for each property.
|
|
94734
|
+
*
|
|
94735
|
+
* @param {Object|Array} obj The object to iterate
|
|
94736
|
+
* @param {Function} fn The callback to invoke for each item
|
|
94737
|
+
*
|
|
94738
|
+
* @param {Boolean} [allOwnKeys = false]
|
|
94739
|
+
* @returns {any}
|
|
94740
|
+
*/
|
|
94741
|
+
function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
94742
|
+
// Don't bother if no value provided
|
|
94743
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
94744
|
+
return;
|
|
94745
|
+
}
|
|
94746
|
+
|
|
94747
|
+
let i;
|
|
94748
|
+
let l;
|
|
94749
|
+
|
|
94750
|
+
// Force an array if not already something iterable
|
|
94751
|
+
if (typeof obj !== 'object') {
|
|
94752
|
+
/*eslint no-param-reassign:0*/
|
|
94753
|
+
obj = [obj];
|
|
94754
|
+
}
|
|
94755
|
+
|
|
94756
|
+
if (isArray(obj)) {
|
|
94757
|
+
// Iterate over array values
|
|
94758
|
+
for (i = 0, l = obj.length; i < l; i++) {
|
|
94759
|
+
fn.call(null, obj[i], i, obj);
|
|
94760
|
+
}
|
|
94761
|
+
} else {
|
|
94762
|
+
// Iterate over object keys
|
|
94763
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
94764
|
+
const len = keys.length;
|
|
94765
|
+
let key;
|
|
94766
|
+
|
|
94767
|
+
for (i = 0; i < len; i++) {
|
|
94768
|
+
key = keys[i];
|
|
94769
|
+
fn.call(null, obj[key], key, obj);
|
|
94770
|
+
}
|
|
94771
|
+
}
|
|
94772
|
+
}
|
|
94773
|
+
|
|
94774
|
+
function findKey(obj, key) {
|
|
94775
|
+
key = key.toLowerCase();
|
|
94776
|
+
const keys = Object.keys(obj);
|
|
94777
|
+
let i = keys.length;
|
|
94778
|
+
let _key;
|
|
94779
|
+
while (i-- > 0) {
|
|
94780
|
+
_key = keys[i];
|
|
94781
|
+
if (key === _key.toLowerCase()) {
|
|
94782
|
+
return _key;
|
|
94783
|
+
}
|
|
94784
|
+
}
|
|
94785
|
+
return null;
|
|
94786
|
+
}
|
|
94787
|
+
|
|
94788
|
+
const _global = (() => {
|
|
94789
|
+
/*eslint no-undef:0*/
|
|
94790
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
94791
|
+
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
|
|
94792
|
+
})();
|
|
94793
|
+
|
|
94794
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
94795
|
+
|
|
94796
|
+
/**
|
|
94797
|
+
* Accepts varargs expecting each argument to be an object, then
|
|
94798
|
+
* immutably merges the properties of each object and returns result.
|
|
94799
|
+
*
|
|
94800
|
+
* When multiple objects contain the same key the later object in
|
|
94801
|
+
* the arguments list will take precedence.
|
|
94802
|
+
*
|
|
94803
|
+
* Example:
|
|
94804
|
+
*
|
|
94805
|
+
* ```js
|
|
94806
|
+
* var result = merge({foo: 123}, {foo: 456});
|
|
94807
|
+
* console.log(result.foo); // outputs 456
|
|
94808
|
+
* ```
|
|
94809
|
+
*
|
|
94810
|
+
* @param {Object} obj1 Object to merge
|
|
94811
|
+
*
|
|
94812
|
+
* @returns {Object} Result of all merge properties
|
|
94813
|
+
*/
|
|
94814
|
+
function merge(/* obj1, obj2, obj3, ... */) {
|
|
94815
|
+
const {caseless} = isContextDefined(this) && this || {};
|
|
94816
|
+
const result = {};
|
|
94817
|
+
const assignValue = (val, key) => {
|
|
94818
|
+
const targetKey = caseless && findKey(result, key) || key;
|
|
94819
|
+
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
94820
|
+
result[targetKey] = merge(result[targetKey], val);
|
|
94821
|
+
} else if (isPlainObject(val)) {
|
|
94822
|
+
result[targetKey] = merge({}, val);
|
|
94823
|
+
} else if (isArray(val)) {
|
|
94824
|
+
result[targetKey] = val.slice();
|
|
94825
|
+
} else {
|
|
94826
|
+
result[targetKey] = val;
|
|
94827
|
+
}
|
|
94828
|
+
}
|
|
94829
|
+
|
|
94830
|
+
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
94831
|
+
arguments[i] && forEach(arguments[i], assignValue);
|
|
94832
|
+
}
|
|
94833
|
+
return result;
|
|
94834
|
+
}
|
|
94835
|
+
|
|
94836
|
+
/**
|
|
94837
|
+
* Extends object a by mutably adding to it the properties of object b.
|
|
94838
|
+
*
|
|
94839
|
+
* @param {Object} a The object to be extended
|
|
94840
|
+
* @param {Object} b The object to copy properties from
|
|
94841
|
+
* @param {Object} thisArg The object to bind function to
|
|
94842
|
+
*
|
|
94843
|
+
* @param {Boolean} [allOwnKeys]
|
|
94844
|
+
* @returns {Object} The resulting value of object a
|
|
94845
|
+
*/
|
|
94846
|
+
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
94847
|
+
forEach(b, (val, key) => {
|
|
94848
|
+
if (thisArg && isFunction(val)) {
|
|
94849
|
+
a[key] = bind(val, thisArg);
|
|
94850
|
+
} else {
|
|
94851
|
+
a[key] = val;
|
|
94852
|
+
}
|
|
94853
|
+
}, {allOwnKeys});
|
|
94854
|
+
return a;
|
|
94855
|
+
}
|
|
94856
|
+
|
|
94857
|
+
/**
|
|
94858
|
+
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
94859
|
+
*
|
|
94860
|
+
* @param {string} content with BOM
|
|
94861
|
+
*
|
|
94862
|
+
* @returns {string} content value without BOM
|
|
94863
|
+
*/
|
|
94864
|
+
const stripBOM = (content) => {
|
|
94865
|
+
if (content.charCodeAt(0) === 0xFEFF) {
|
|
94866
|
+
content = content.slice(1);
|
|
94867
|
+
}
|
|
94868
|
+
return content;
|
|
94869
|
+
}
|
|
94870
|
+
|
|
94871
|
+
/**
|
|
94872
|
+
* Inherit the prototype methods from one constructor into another
|
|
94873
|
+
* @param {function} constructor
|
|
94874
|
+
* @param {function} superConstructor
|
|
94875
|
+
* @param {object} [props]
|
|
94876
|
+
* @param {object} [descriptors]
|
|
94877
|
+
*
|
|
94878
|
+
* @returns {void}
|
|
94879
|
+
*/
|
|
94880
|
+
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
94881
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
94882
|
+
constructor.prototype.constructor = constructor;
|
|
94883
|
+
Object.defineProperty(constructor, 'super', {
|
|
94884
|
+
value: superConstructor.prototype
|
|
94885
|
+
});
|
|
94886
|
+
props && Object.assign(constructor.prototype, props);
|
|
94887
|
+
}
|
|
94888
|
+
|
|
94889
|
+
/**
|
|
94890
|
+
* Resolve object with deep prototype chain to a flat object
|
|
94891
|
+
* @param {Object} sourceObj source object
|
|
94892
|
+
* @param {Object} [destObj]
|
|
94893
|
+
* @param {Function|Boolean} [filter]
|
|
94894
|
+
* @param {Function} [propFilter]
|
|
94895
|
+
*
|
|
94896
|
+
* @returns {Object}
|
|
94897
|
+
*/
|
|
94898
|
+
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
94899
|
+
let props;
|
|
94900
|
+
let i;
|
|
94901
|
+
let prop;
|
|
94902
|
+
const merged = {};
|
|
94903
|
+
|
|
94904
|
+
destObj = destObj || {};
|
|
94905
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
94906
|
+
if (sourceObj == null) return destObj;
|
|
94907
|
+
|
|
94908
|
+
do {
|
|
94909
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
94910
|
+
i = props.length;
|
|
94911
|
+
while (i-- > 0) {
|
|
94912
|
+
prop = props[i];
|
|
94913
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
94914
|
+
destObj[prop] = sourceObj[prop];
|
|
94915
|
+
merged[prop] = true;
|
|
94916
|
+
}
|
|
94917
|
+
}
|
|
94918
|
+
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
94919
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
94920
|
+
|
|
94921
|
+
return destObj;
|
|
94922
|
+
}
|
|
94923
|
+
|
|
94924
|
+
/**
|
|
94925
|
+
* Determines whether a string ends with the characters of a specified string
|
|
94926
|
+
*
|
|
94927
|
+
* @param {String} str
|
|
94928
|
+
* @param {String} searchString
|
|
94929
|
+
* @param {Number} [position= 0]
|
|
94930
|
+
*
|
|
94931
|
+
* @returns {boolean}
|
|
94932
|
+
*/
|
|
94933
|
+
const endsWith = (str, searchString, position) => {
|
|
94934
|
+
str = String(str);
|
|
94935
|
+
if (position === undefined || position > str.length) {
|
|
94936
|
+
position = str.length;
|
|
94937
|
+
}
|
|
94938
|
+
position -= searchString.length;
|
|
94939
|
+
const lastIndex = str.indexOf(searchString, position);
|
|
94940
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
94941
|
+
}
|
|
94942
|
+
|
|
94943
|
+
|
|
94944
|
+
/**
|
|
94945
|
+
* Returns new array from array like object or null if failed
|
|
94946
|
+
*
|
|
94947
|
+
* @param {*} [thing]
|
|
94948
|
+
*
|
|
94949
|
+
* @returns {?Array}
|
|
94950
|
+
*/
|
|
94951
|
+
const toArray = (thing) => {
|
|
94952
|
+
if (!thing) return null;
|
|
94953
|
+
if (isArray(thing)) return thing;
|
|
94954
|
+
let i = thing.length;
|
|
94955
|
+
if (!isNumber(i)) return null;
|
|
94956
|
+
const arr = new Array(i);
|
|
94957
|
+
while (i-- > 0) {
|
|
94958
|
+
arr[i] = thing[i];
|
|
94959
|
+
}
|
|
94960
|
+
return arr;
|
|
94961
|
+
}
|
|
94962
|
+
|
|
94963
|
+
/**
|
|
94964
|
+
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
|
|
94965
|
+
* thing passed in is an instance of Uint8Array
|
|
94966
|
+
*
|
|
94967
|
+
* @param {TypedArray}
|
|
94968
|
+
*
|
|
94969
|
+
* @returns {Array}
|
|
94970
|
+
*/
|
|
94971
|
+
// eslint-disable-next-line func-names
|
|
94972
|
+
const isTypedArray = (TypedArray => {
|
|
94973
|
+
// eslint-disable-next-line func-names
|
|
94974
|
+
return thing => {
|
|
94975
|
+
return TypedArray && thing instanceof TypedArray;
|
|
94976
|
+
};
|
|
94977
|
+
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
|
|
94978
|
+
|
|
94979
|
+
/**
|
|
94980
|
+
* For each entry in the object, call the function with the key and value.
|
|
94981
|
+
*
|
|
94982
|
+
* @param {Object<any, any>} obj - The object to iterate over.
|
|
94983
|
+
* @param {Function} fn - The function to call for each entry.
|
|
94984
|
+
*
|
|
94985
|
+
* @returns {void}
|
|
94986
|
+
*/
|
|
94987
|
+
const forEachEntry = (obj, fn) => {
|
|
94988
|
+
const generator = obj && obj[Symbol.iterator];
|
|
94989
|
+
|
|
94990
|
+
const iterator = generator.call(obj);
|
|
94991
|
+
|
|
94992
|
+
let result;
|
|
94993
|
+
|
|
94994
|
+
while ((result = iterator.next()) && !result.done) {
|
|
94995
|
+
const pair = result.value;
|
|
94996
|
+
fn.call(obj, pair[0], pair[1]);
|
|
94997
|
+
}
|
|
94998
|
+
}
|
|
94999
|
+
|
|
95000
|
+
/**
|
|
95001
|
+
* It takes a regular expression and a string, and returns an array of all the matches
|
|
95002
|
+
*
|
|
95003
|
+
* @param {string} regExp - The regular expression to match against.
|
|
95004
|
+
* @param {string} str - The string to search.
|
|
95005
|
+
*
|
|
95006
|
+
* @returns {Array<boolean>}
|
|
95007
|
+
*/
|
|
95008
|
+
const matchAll = (regExp, str) => {
|
|
95009
|
+
let matches;
|
|
95010
|
+
const arr = [];
|
|
95011
|
+
|
|
95012
|
+
while ((matches = regExp.exec(str)) !== null) {
|
|
95013
|
+
arr.push(matches);
|
|
95014
|
+
}
|
|
95015
|
+
|
|
95016
|
+
return arr;
|
|
95017
|
+
}
|
|
95018
|
+
|
|
95019
|
+
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
|
|
95020
|
+
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
95021
|
+
|
|
95022
|
+
const toCamelCase = str => {
|
|
95023
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
95024
|
+
function replacer(m, p1, p2) {
|
|
95025
|
+
return p1.toUpperCase() + p2;
|
|
95026
|
+
}
|
|
95027
|
+
);
|
|
95028
|
+
};
|
|
95029
|
+
|
|
95030
|
+
/* Creating a function that will check if an object has a property. */
|
|
95031
|
+
const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
|
|
95032
|
+
|
|
95033
|
+
/**
|
|
95034
|
+
* Determine if a value is a RegExp object
|
|
95035
|
+
*
|
|
95036
|
+
* @param {*} val The value to test
|
|
95037
|
+
*
|
|
95038
|
+
* @returns {boolean} True if value is a RegExp object, otherwise false
|
|
95039
|
+
*/
|
|
95040
|
+
const isRegExp = kindOfTest('RegExp');
|
|
95041
|
+
|
|
95042
|
+
const reduceDescriptors = (obj, reducer) => {
|
|
95043
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
95044
|
+
const reducedDescriptors = {};
|
|
95045
|
+
|
|
95046
|
+
forEach(descriptors, (descriptor, name) => {
|
|
95047
|
+
let ret;
|
|
95048
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
95049
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
95050
|
+
}
|
|
95051
|
+
});
|
|
95052
|
+
|
|
95053
|
+
Object.defineProperties(obj, reducedDescriptors);
|
|
95054
|
+
}
|
|
95055
|
+
|
|
95056
|
+
/**
|
|
95057
|
+
* Makes all methods read-only
|
|
95058
|
+
* @param {Object} obj
|
|
95059
|
+
*/
|
|
95060
|
+
|
|
95061
|
+
const freezeMethods = (obj) => {
|
|
95062
|
+
reduceDescriptors(obj, (descriptor, name) => {
|
|
95063
|
+
// skip restricted props in strict mode
|
|
95064
|
+
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
95065
|
+
return false;
|
|
95066
|
+
}
|
|
95067
|
+
|
|
95068
|
+
const value = obj[name];
|
|
95069
|
+
|
|
95070
|
+
if (!isFunction(value)) return;
|
|
95071
|
+
|
|
95072
|
+
descriptor.enumerable = false;
|
|
95073
|
+
|
|
95074
|
+
if ('writable' in descriptor) {
|
|
95075
|
+
descriptor.writable = false;
|
|
95076
|
+
return;
|
|
95077
|
+
}
|
|
95078
|
+
|
|
95079
|
+
if (!descriptor.set) {
|
|
95080
|
+
descriptor.set = () => {
|
|
95081
|
+
throw Error('Can not rewrite read-only method \'' + name + '\'');
|
|
95082
|
+
};
|
|
95083
|
+
}
|
|
95084
|
+
});
|
|
95085
|
+
}
|
|
95086
|
+
|
|
95087
|
+
const toObjectSet = (arrayOrString, delimiter) => {
|
|
95088
|
+
const obj = {};
|
|
95089
|
+
|
|
95090
|
+
const define = (arr) => {
|
|
95091
|
+
arr.forEach(value => {
|
|
95092
|
+
obj[value] = true;
|
|
95093
|
+
});
|
|
95094
|
+
}
|
|
95095
|
+
|
|
95096
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
95097
|
+
|
|
95098
|
+
return obj;
|
|
95099
|
+
}
|
|
95100
|
+
|
|
95101
|
+
const noop = () => {}
|
|
95102
|
+
|
|
95103
|
+
const toFiniteNumber = (value, defaultValue) => {
|
|
95104
|
+
value = +value;
|
|
95105
|
+
return Number.isFinite(value) ? value : defaultValue;
|
|
95106
|
+
}
|
|
95107
|
+
|
|
95108
|
+
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
|
95109
|
+
|
|
95110
|
+
const DIGIT = '0123456789';
|
|
95111
|
+
|
|
95112
|
+
const ALPHABET = {
|
|
95113
|
+
DIGIT,
|
|
95114
|
+
ALPHA,
|
|
95115
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
95116
|
+
}
|
|
95117
|
+
|
|
95118
|
+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
95119
|
+
let str = '';
|
|
95120
|
+
const {length} = alphabet;
|
|
95121
|
+
while (size--) {
|
|
95122
|
+
str += alphabet[Math.random() * length|0]
|
|
95123
|
+
}
|
|
95124
|
+
|
|
95125
|
+
return str;
|
|
95126
|
+
}
|
|
95127
|
+
|
|
95128
|
+
/**
|
|
95129
|
+
* If the thing is a FormData object, return true, otherwise return false.
|
|
95130
|
+
*
|
|
95131
|
+
* @param {unknown} thing - The thing to check.
|
|
95132
|
+
*
|
|
95133
|
+
* @returns {boolean}
|
|
95134
|
+
*/
|
|
95135
|
+
function isSpecCompliantForm(thing) {
|
|
95136
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
|
95137
|
+
}
|
|
95138
|
+
|
|
95139
|
+
const toJSONObject = (obj) => {
|
|
95140
|
+
const stack = new Array(10);
|
|
95141
|
+
|
|
95142
|
+
const visit = (source, i) => {
|
|
95143
|
+
|
|
95144
|
+
if (isObject(source)) {
|
|
95145
|
+
if (stack.indexOf(source) >= 0) {
|
|
95146
|
+
return;
|
|
95147
|
+
}
|
|
95148
|
+
|
|
95149
|
+
if(!('toJSON' in source)) {
|
|
95150
|
+
stack[i] = source;
|
|
95151
|
+
const target = isArray(source) ? [] : {};
|
|
95152
|
+
|
|
95153
|
+
forEach(source, (value, key) => {
|
|
95154
|
+
const reducedValue = visit(value, i + 1);
|
|
95155
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
95156
|
+
});
|
|
95157
|
+
|
|
95158
|
+
stack[i] = undefined;
|
|
95159
|
+
|
|
95160
|
+
return target;
|
|
95161
|
+
}
|
|
95162
|
+
}
|
|
95163
|
+
|
|
95164
|
+
return source;
|
|
95165
|
+
}
|
|
95166
|
+
|
|
95167
|
+
return visit(obj, 0);
|
|
95168
|
+
}
|
|
95169
|
+
|
|
95170
|
+
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
95171
|
+
|
|
95172
|
+
const isThenable = (thing) =>
|
|
95173
|
+
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
95174
|
+
|
|
95175
|
+
/* harmony default export */ var utils = ({
|
|
95176
|
+
isArray,
|
|
95177
|
+
isArrayBuffer,
|
|
95178
|
+
isBuffer,
|
|
95179
|
+
isFormData,
|
|
95180
|
+
isArrayBufferView,
|
|
95181
|
+
isString,
|
|
95182
|
+
isNumber,
|
|
95183
|
+
isBoolean,
|
|
95184
|
+
isObject,
|
|
95185
|
+
isPlainObject,
|
|
95186
|
+
isUndefined,
|
|
95187
|
+
isDate,
|
|
95188
|
+
isFile,
|
|
95189
|
+
isBlob,
|
|
95190
|
+
isRegExp,
|
|
95191
|
+
isFunction,
|
|
95192
|
+
isStream,
|
|
95193
|
+
isURLSearchParams,
|
|
95194
|
+
isTypedArray,
|
|
95195
|
+
isFileList,
|
|
95196
|
+
forEach,
|
|
95197
|
+
merge,
|
|
95198
|
+
extend,
|
|
95199
|
+
trim,
|
|
95200
|
+
stripBOM,
|
|
95201
|
+
inherits,
|
|
95202
|
+
toFlatObject,
|
|
95203
|
+
kindOf,
|
|
95204
|
+
kindOfTest,
|
|
95205
|
+
endsWith,
|
|
95206
|
+
toArray,
|
|
95207
|
+
forEachEntry,
|
|
95208
|
+
matchAll,
|
|
95209
|
+
isHTMLForm,
|
|
95210
|
+
hasOwnProperty: utils_hasOwnProperty,
|
|
95211
|
+
hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
95212
|
+
reduceDescriptors,
|
|
95213
|
+
freezeMethods,
|
|
95214
|
+
toObjectSet,
|
|
95215
|
+
toCamelCase,
|
|
95216
|
+
noop,
|
|
95217
|
+
toFiniteNumber,
|
|
95218
|
+
findKey,
|
|
95219
|
+
global: _global,
|
|
95220
|
+
isContextDefined,
|
|
95221
|
+
ALPHABET,
|
|
95222
|
+
generateString,
|
|
95223
|
+
isSpecCompliantForm,
|
|
95224
|
+
toJSONObject,
|
|
95225
|
+
isAsyncFn,
|
|
95226
|
+
isThenable
|
|
95227
|
+
});
|
|
95228
|
+
|
|
95229
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosError.js
|
|
95230
|
+
|
|
95231
|
+
|
|
95232
|
+
|
|
95233
|
+
|
|
95234
|
+
/**
|
|
95235
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
95236
|
+
*
|
|
95237
|
+
* @param {string} message The error message.
|
|
95238
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
95239
|
+
* @param {Object} [config] The config.
|
|
95240
|
+
* @param {Object} [request] The request.
|
|
95241
|
+
* @param {Object} [response] The response.
|
|
95242
|
+
*
|
|
95243
|
+
* @returns {Error} The created error.
|
|
95244
|
+
*/
|
|
95245
|
+
function AxiosError(message, code, config, request, response) {
|
|
95246
|
+
Error.call(this);
|
|
95247
|
+
|
|
95248
|
+
if (Error.captureStackTrace) {
|
|
95249
|
+
Error.captureStackTrace(this, this.constructor);
|
|
95250
|
+
} else {
|
|
95251
|
+
this.stack = (new Error()).stack;
|
|
95252
|
+
}
|
|
95253
|
+
|
|
95254
|
+
this.message = message;
|
|
95255
|
+
this.name = 'AxiosError';
|
|
95256
|
+
code && (this.code = code);
|
|
95257
|
+
config && (this.config = config);
|
|
95258
|
+
request && (this.request = request);
|
|
95259
|
+
response && (this.response = response);
|
|
95260
|
+
}
|
|
95261
|
+
|
|
95262
|
+
utils.inherits(AxiosError, Error, {
|
|
95263
|
+
toJSON: function toJSON() {
|
|
95264
|
+
return {
|
|
95265
|
+
// Standard
|
|
95266
|
+
message: this.message,
|
|
95267
|
+
name: this.name,
|
|
95268
|
+
// Microsoft
|
|
95269
|
+
description: this.description,
|
|
95270
|
+
number: this.number,
|
|
95271
|
+
// Mozilla
|
|
95272
|
+
fileName: this.fileName,
|
|
95273
|
+
lineNumber: this.lineNumber,
|
|
95274
|
+
columnNumber: this.columnNumber,
|
|
95275
|
+
stack: this.stack,
|
|
95276
|
+
// Axios
|
|
95277
|
+
config: utils.toJSONObject(this.config),
|
|
95278
|
+
code: this.code,
|
|
95279
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
95280
|
+
};
|
|
95281
|
+
}
|
|
95282
|
+
});
|
|
95283
|
+
|
|
95284
|
+
const AxiosError_prototype = AxiosError.prototype;
|
|
95285
|
+
const descriptors = {};
|
|
95286
|
+
|
|
95287
|
+
[
|
|
95288
|
+
'ERR_BAD_OPTION_VALUE',
|
|
95289
|
+
'ERR_BAD_OPTION',
|
|
95290
|
+
'ECONNABORTED',
|
|
95291
|
+
'ETIMEDOUT',
|
|
95292
|
+
'ERR_NETWORK',
|
|
95293
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
95294
|
+
'ERR_DEPRECATED',
|
|
95295
|
+
'ERR_BAD_RESPONSE',
|
|
95296
|
+
'ERR_BAD_REQUEST',
|
|
95297
|
+
'ERR_CANCELED',
|
|
95298
|
+
'ERR_NOT_SUPPORT',
|
|
95299
|
+
'ERR_INVALID_URL'
|
|
95300
|
+
// eslint-disable-next-line func-names
|
|
95301
|
+
].forEach(code => {
|
|
95302
|
+
descriptors[code] = {value: code};
|
|
95303
|
+
});
|
|
95304
|
+
|
|
95305
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
95306
|
+
Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true});
|
|
95307
|
+
|
|
95308
|
+
// eslint-disable-next-line func-names
|
|
95309
|
+
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
95310
|
+
const axiosError = Object.create(AxiosError_prototype);
|
|
95311
|
+
|
|
95312
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
95313
|
+
return obj !== Error.prototype;
|
|
95314
|
+
}, prop => {
|
|
95315
|
+
return prop !== 'isAxiosError';
|
|
95316
|
+
});
|
|
95317
|
+
|
|
95318
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
95319
|
+
|
|
95320
|
+
axiosError.cause = error;
|
|
95321
|
+
|
|
95322
|
+
axiosError.name = error.name;
|
|
95323
|
+
|
|
95324
|
+
customProps && Object.assign(axiosError, customProps);
|
|
95325
|
+
|
|
95326
|
+
return axiosError;
|
|
95327
|
+
};
|
|
95328
|
+
|
|
95329
|
+
/* harmony default export */ var core_AxiosError = (AxiosError);
|
|
95330
|
+
|
|
95331
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/null.js
|
|
95332
|
+
// eslint-disable-next-line strict
|
|
95333
|
+
/* harmony default export */ var helpers_null = (null);
|
|
95334
|
+
|
|
95335
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toFormData.js
|
|
95336
|
+
|
|
95337
|
+
|
|
95338
|
+
|
|
95339
|
+
|
|
95340
|
+
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
95341
|
+
|
|
95342
|
+
|
|
95343
|
+
/**
|
|
95344
|
+
* Determines if the given thing is a array or js object.
|
|
95345
|
+
*
|
|
95346
|
+
* @param {string} thing - The object or array to be visited.
|
|
95347
|
+
*
|
|
95348
|
+
* @returns {boolean}
|
|
95349
|
+
*/
|
|
95350
|
+
function isVisitable(thing) {
|
|
95351
|
+
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
95352
|
+
}
|
|
95353
|
+
|
|
95354
|
+
/**
|
|
95355
|
+
* It removes the brackets from the end of a string
|
|
95356
|
+
*
|
|
95357
|
+
* @param {string} key - The key of the parameter.
|
|
95358
|
+
*
|
|
95359
|
+
* @returns {string} the key without the brackets.
|
|
95360
|
+
*/
|
|
95361
|
+
function removeBrackets(key) {
|
|
95362
|
+
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
95363
|
+
}
|
|
95364
|
+
|
|
95365
|
+
/**
|
|
95366
|
+
* It takes a path, a key, and a boolean, and returns a string
|
|
95367
|
+
*
|
|
95368
|
+
* @param {string} path - The path to the current key.
|
|
95369
|
+
* @param {string} key - The key of the current object being iterated over.
|
|
95370
|
+
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
|
|
95371
|
+
*
|
|
95372
|
+
* @returns {string} The path to the current key.
|
|
95373
|
+
*/
|
|
95374
|
+
function renderKey(path, key, dots) {
|
|
95375
|
+
if (!path) return key;
|
|
95376
|
+
return path.concat(key).map(function each(token, i) {
|
|
95377
|
+
// eslint-disable-next-line no-param-reassign
|
|
95378
|
+
token = removeBrackets(token);
|
|
95379
|
+
return !dots && i ? '[' + token + ']' : token;
|
|
95380
|
+
}).join(dots ? '.' : '');
|
|
95381
|
+
}
|
|
95382
|
+
|
|
95383
|
+
/**
|
|
95384
|
+
* If the array is an array and none of its elements are visitable, then it's a flat array.
|
|
95385
|
+
*
|
|
95386
|
+
* @param {Array<any>} arr - The array to check
|
|
95387
|
+
*
|
|
95388
|
+
* @returns {boolean}
|
|
95389
|
+
*/
|
|
95390
|
+
function isFlatArray(arr) {
|
|
95391
|
+
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
95392
|
+
}
|
|
95393
|
+
|
|
95394
|
+
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
95395
|
+
return /^is[A-Z]/.test(prop);
|
|
95396
|
+
});
|
|
95397
|
+
|
|
95398
|
+
/**
|
|
95399
|
+
* Convert a data object to FormData
|
|
95400
|
+
*
|
|
95401
|
+
* @param {Object} obj
|
|
95402
|
+
* @param {?Object} [formData]
|
|
95403
|
+
* @param {?Object} [options]
|
|
95404
|
+
* @param {Function} [options.visitor]
|
|
95405
|
+
* @param {Boolean} [options.metaTokens = true]
|
|
95406
|
+
* @param {Boolean} [options.dots = false]
|
|
95407
|
+
* @param {?Boolean} [options.indexes = false]
|
|
95408
|
+
*
|
|
95409
|
+
* @returns {Object}
|
|
95410
|
+
**/
|
|
95411
|
+
|
|
95412
|
+
/**
|
|
95413
|
+
* It converts an object into a FormData object
|
|
95414
|
+
*
|
|
95415
|
+
* @param {Object<any, any>} obj - The object to convert to form data.
|
|
95416
|
+
* @param {string} formData - The FormData object to append to.
|
|
95417
|
+
* @param {Object<string, any>} options
|
|
95418
|
+
*
|
|
95419
|
+
* @returns
|
|
95420
|
+
*/
|
|
95421
|
+
function toFormData(obj, formData, options) {
|
|
95422
|
+
if (!utils.isObject(obj)) {
|
|
95423
|
+
throw new TypeError('target must be an object');
|
|
95424
|
+
}
|
|
95425
|
+
|
|
95426
|
+
// eslint-disable-next-line no-param-reassign
|
|
95427
|
+
formData = formData || new (helpers_null || FormData)();
|
|
95428
|
+
|
|
95429
|
+
// eslint-disable-next-line no-param-reassign
|
|
95430
|
+
options = utils.toFlatObject(options, {
|
|
95431
|
+
metaTokens: true,
|
|
95432
|
+
dots: false,
|
|
95433
|
+
indexes: false
|
|
95434
|
+
}, false, function defined(option, source) {
|
|
95435
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
95436
|
+
return !utils.isUndefined(source[option]);
|
|
95437
|
+
});
|
|
95438
|
+
|
|
95439
|
+
const metaTokens = options.metaTokens;
|
|
95440
|
+
// eslint-disable-next-line no-use-before-define
|
|
95441
|
+
const visitor = options.visitor || defaultVisitor;
|
|
95442
|
+
const dots = options.dots;
|
|
95443
|
+
const indexes = options.indexes;
|
|
95444
|
+
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
95445
|
+
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
95446
|
+
|
|
95447
|
+
if (!utils.isFunction(visitor)) {
|
|
95448
|
+
throw new TypeError('visitor must be a function');
|
|
95449
|
+
}
|
|
95450
|
+
|
|
95451
|
+
function convertValue(value) {
|
|
95452
|
+
if (value === null) return '';
|
|
95453
|
+
|
|
95454
|
+
if (utils.isDate(value)) {
|
|
95455
|
+
return value.toISOString();
|
|
95456
|
+
}
|
|
95457
|
+
|
|
95458
|
+
if (!useBlob && utils.isBlob(value)) {
|
|
95459
|
+
throw new core_AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
95460
|
+
}
|
|
95461
|
+
|
|
95462
|
+
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
95463
|
+
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
95464
|
+
}
|
|
95465
|
+
|
|
95466
|
+
return value;
|
|
95467
|
+
}
|
|
95468
|
+
|
|
95469
|
+
/**
|
|
95470
|
+
* Default visitor.
|
|
95471
|
+
*
|
|
95472
|
+
* @param {*} value
|
|
95473
|
+
* @param {String|Number} key
|
|
95474
|
+
* @param {Array<String|Number>} path
|
|
95475
|
+
* @this {FormData}
|
|
95476
|
+
*
|
|
95477
|
+
* @returns {boolean} return true to visit the each prop of the value recursively
|
|
95478
|
+
*/
|
|
95479
|
+
function defaultVisitor(value, key, path) {
|
|
95480
|
+
let arr = value;
|
|
95481
|
+
|
|
95482
|
+
if (value && !path && typeof value === 'object') {
|
|
95483
|
+
if (utils.endsWith(key, '{}')) {
|
|
95484
|
+
// eslint-disable-next-line no-param-reassign
|
|
95485
|
+
key = metaTokens ? key : key.slice(0, -2);
|
|
95486
|
+
// eslint-disable-next-line no-param-reassign
|
|
95487
|
+
value = JSON.stringify(value);
|
|
95488
|
+
} else if (
|
|
95489
|
+
(utils.isArray(value) && isFlatArray(value)) ||
|
|
95490
|
+
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
95491
|
+
)) {
|
|
95492
|
+
// eslint-disable-next-line no-param-reassign
|
|
95493
|
+
key = removeBrackets(key);
|
|
95494
|
+
|
|
95495
|
+
arr.forEach(function each(el, index) {
|
|
95496
|
+
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
95497
|
+
// eslint-disable-next-line no-nested-ternary
|
|
95498
|
+
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
95499
|
+
convertValue(el)
|
|
95500
|
+
);
|
|
95501
|
+
});
|
|
95502
|
+
return false;
|
|
95503
|
+
}
|
|
95504
|
+
}
|
|
95505
|
+
|
|
95506
|
+
if (isVisitable(value)) {
|
|
95507
|
+
return true;
|
|
95508
|
+
}
|
|
95509
|
+
|
|
95510
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
95511
|
+
|
|
95512
|
+
return false;
|
|
95513
|
+
}
|
|
95514
|
+
|
|
95515
|
+
const stack = [];
|
|
95516
|
+
|
|
95517
|
+
const exposedHelpers = Object.assign(predicates, {
|
|
95518
|
+
defaultVisitor,
|
|
95519
|
+
convertValue,
|
|
95520
|
+
isVisitable
|
|
95521
|
+
});
|
|
95522
|
+
|
|
95523
|
+
function build(value, path) {
|
|
95524
|
+
if (utils.isUndefined(value)) return;
|
|
95525
|
+
|
|
95526
|
+
if (stack.indexOf(value) !== -1) {
|
|
95527
|
+
throw Error('Circular reference detected in ' + path.join('.'));
|
|
95528
|
+
}
|
|
95529
|
+
|
|
95530
|
+
stack.push(value);
|
|
95531
|
+
|
|
95532
|
+
utils.forEach(value, function each(el, key) {
|
|
95533
|
+
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
95534
|
+
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
95535
|
+
);
|
|
95536
|
+
|
|
95537
|
+
if (result === true) {
|
|
95538
|
+
build(el, path ? path.concat(key) : [key]);
|
|
95539
|
+
}
|
|
95540
|
+
});
|
|
95541
|
+
|
|
95542
|
+
stack.pop();
|
|
95543
|
+
}
|
|
95544
|
+
|
|
95545
|
+
if (!utils.isObject(obj)) {
|
|
95546
|
+
throw new TypeError('data must be an object');
|
|
95547
|
+
}
|
|
95548
|
+
|
|
95549
|
+
build(obj);
|
|
95550
|
+
|
|
95551
|
+
return formData;
|
|
95552
|
+
}
|
|
95553
|
+
|
|
95554
|
+
/* harmony default export */ var helpers_toFormData = (toFormData);
|
|
95555
|
+
|
|
95556
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
95557
|
+
|
|
95558
|
+
|
|
95559
|
+
|
|
95560
|
+
|
|
95561
|
+
/**
|
|
95562
|
+
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
95563
|
+
* their percent-encoded equivalents
|
|
95564
|
+
*
|
|
95565
|
+
* @param {string} str - The string to encode.
|
|
95566
|
+
*
|
|
95567
|
+
* @returns {string} The encoded string.
|
|
95568
|
+
*/
|
|
95569
|
+
function encode(str) {
|
|
95570
|
+
const charMap = {
|
|
95571
|
+
'!': '%21',
|
|
95572
|
+
"'": '%27',
|
|
95573
|
+
'(': '%28',
|
|
95574
|
+
')': '%29',
|
|
95575
|
+
'~': '%7E',
|
|
95576
|
+
'%20': '+',
|
|
95577
|
+
'%00': '\x00'
|
|
95578
|
+
};
|
|
95579
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
95580
|
+
return charMap[match];
|
|
95581
|
+
});
|
|
95582
|
+
}
|
|
95583
|
+
|
|
95584
|
+
/**
|
|
95585
|
+
* It takes a params object and converts it to a FormData object
|
|
95586
|
+
*
|
|
95587
|
+
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
95588
|
+
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
95589
|
+
*
|
|
95590
|
+
* @returns {void}
|
|
95591
|
+
*/
|
|
95592
|
+
function AxiosURLSearchParams(params, options) {
|
|
95593
|
+
this._pairs = [];
|
|
95594
|
+
|
|
95595
|
+
params && helpers_toFormData(params, this, options);
|
|
95596
|
+
}
|
|
95597
|
+
|
|
95598
|
+
const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
|
|
95599
|
+
|
|
95600
|
+
AxiosURLSearchParams_prototype.append = function append(name, value) {
|
|
95601
|
+
this._pairs.push([name, value]);
|
|
95602
|
+
};
|
|
95603
|
+
|
|
95604
|
+
AxiosURLSearchParams_prototype.toString = function toString(encoder) {
|
|
95605
|
+
const _encode = encoder ? function(value) {
|
|
95606
|
+
return encoder.call(this, value, encode);
|
|
95607
|
+
} : encode;
|
|
95608
|
+
|
|
95609
|
+
return this._pairs.map(function each(pair) {
|
|
95610
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
95611
|
+
}, '').join('&');
|
|
95612
|
+
};
|
|
95613
|
+
|
|
95614
|
+
/* harmony default export */ var helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
|
|
95615
|
+
|
|
95616
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js
|
|
95617
|
+
|
|
95618
|
+
|
|
95619
|
+
|
|
95620
|
+
|
|
95621
|
+
|
|
95622
|
+
/**
|
|
95623
|
+
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
|
|
95624
|
+
* URI encoded counterparts
|
|
95625
|
+
*
|
|
95626
|
+
* @param {string} val The value to be encoded.
|
|
95627
|
+
*
|
|
95628
|
+
* @returns {string} The encoded value.
|
|
95629
|
+
*/
|
|
95630
|
+
function buildURL_encode(val) {
|
|
95631
|
+
return encodeURIComponent(val).
|
|
95632
|
+
replace(/%3A/gi, ':').
|
|
95633
|
+
replace(/%24/g, '$').
|
|
95634
|
+
replace(/%2C/gi, ',').
|
|
95635
|
+
replace(/%20/g, '+').
|
|
95636
|
+
replace(/%5B/gi, '[').
|
|
95637
|
+
replace(/%5D/gi, ']');
|
|
95638
|
+
}
|
|
95639
|
+
|
|
95640
|
+
/**
|
|
95641
|
+
* Build a URL by appending params to the end
|
|
95642
|
+
*
|
|
95643
|
+
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
95644
|
+
* @param {object} [params] The params to be appended
|
|
95645
|
+
* @param {?object} options
|
|
95646
|
+
*
|
|
95647
|
+
* @returns {string} The formatted url
|
|
95648
|
+
*/
|
|
95649
|
+
function buildURL(url, params, options) {
|
|
95650
|
+
/*eslint no-param-reassign:0*/
|
|
95651
|
+
if (!params) {
|
|
95652
|
+
return url;
|
|
95653
|
+
}
|
|
95654
|
+
|
|
95655
|
+
const _encode = options && options.encode || buildURL_encode;
|
|
95656
|
+
|
|
95657
|
+
const serializeFn = options && options.serialize;
|
|
95658
|
+
|
|
95659
|
+
let serializedParams;
|
|
95660
|
+
|
|
95661
|
+
if (serializeFn) {
|
|
95662
|
+
serializedParams = serializeFn(params, options);
|
|
95663
|
+
} else {
|
|
95664
|
+
serializedParams = utils.isURLSearchParams(params) ?
|
|
95665
|
+
params.toString() :
|
|
95666
|
+
new helpers_AxiosURLSearchParams(params, options).toString(_encode);
|
|
95667
|
+
}
|
|
95668
|
+
|
|
95669
|
+
if (serializedParams) {
|
|
95670
|
+
const hashmarkIndex = url.indexOf("#");
|
|
95671
|
+
|
|
95672
|
+
if (hashmarkIndex !== -1) {
|
|
95673
|
+
url = url.slice(0, hashmarkIndex);
|
|
95674
|
+
}
|
|
95675
|
+
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
95676
|
+
}
|
|
95677
|
+
|
|
95678
|
+
return url;
|
|
95679
|
+
}
|
|
95680
|
+
|
|
95681
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js
|
|
95682
|
+
|
|
95683
|
+
|
|
95684
|
+
|
|
95685
|
+
|
|
95686
|
+
class InterceptorManager {
|
|
95687
|
+
constructor() {
|
|
95688
|
+
this.handlers = [];
|
|
95689
|
+
}
|
|
95690
|
+
|
|
95691
|
+
/**
|
|
95692
|
+
* Add a new interceptor to the stack
|
|
95693
|
+
*
|
|
95694
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
95695
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
95696
|
+
*
|
|
95697
|
+
* @return {Number} An ID used to remove interceptor later
|
|
95698
|
+
*/
|
|
95699
|
+
use(fulfilled, rejected, options) {
|
|
95700
|
+
this.handlers.push({
|
|
95701
|
+
fulfilled,
|
|
95702
|
+
rejected,
|
|
95703
|
+
synchronous: options ? options.synchronous : false,
|
|
95704
|
+
runWhen: options ? options.runWhen : null
|
|
95705
|
+
});
|
|
95706
|
+
return this.handlers.length - 1;
|
|
95707
|
+
}
|
|
95708
|
+
|
|
95709
|
+
/**
|
|
95710
|
+
* Remove an interceptor from the stack
|
|
95711
|
+
*
|
|
95712
|
+
* @param {Number} id The ID that was returned by `use`
|
|
95713
|
+
*
|
|
95714
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
95715
|
+
*/
|
|
95716
|
+
eject(id) {
|
|
95717
|
+
if (this.handlers[id]) {
|
|
95718
|
+
this.handlers[id] = null;
|
|
95719
|
+
}
|
|
95720
|
+
}
|
|
95721
|
+
|
|
95722
|
+
/**
|
|
95723
|
+
* Clear all interceptors from the stack
|
|
95724
|
+
*
|
|
95725
|
+
* @returns {void}
|
|
95726
|
+
*/
|
|
95727
|
+
clear() {
|
|
95728
|
+
if (this.handlers) {
|
|
95729
|
+
this.handlers = [];
|
|
95730
|
+
}
|
|
95731
|
+
}
|
|
95732
|
+
|
|
95733
|
+
/**
|
|
95734
|
+
* Iterate over all the registered interceptors
|
|
95735
|
+
*
|
|
95736
|
+
* This method is particularly useful for skipping over any
|
|
95737
|
+
* interceptors that may have become `null` calling `eject`.
|
|
95738
|
+
*
|
|
95739
|
+
* @param {Function} fn The function to call for each interceptor
|
|
95740
|
+
*
|
|
95741
|
+
* @returns {void}
|
|
95742
|
+
*/
|
|
95743
|
+
forEach(fn) {
|
|
95744
|
+
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
95745
|
+
if (h !== null) {
|
|
95746
|
+
fn(h);
|
|
95747
|
+
}
|
|
95748
|
+
});
|
|
95749
|
+
}
|
|
95750
|
+
}
|
|
95751
|
+
|
|
95752
|
+
/* harmony default export */ var core_InterceptorManager = (InterceptorManager);
|
|
95753
|
+
|
|
95754
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js
|
|
95755
|
+
|
|
95756
|
+
|
|
95757
|
+
/* harmony default export */ var defaults_transitional = ({
|
|
95758
|
+
silentJSONParsing: true,
|
|
95759
|
+
forcedJSONParsing: true,
|
|
95760
|
+
clarifyTimeoutError: false
|
|
95761
|
+
});
|
|
95762
|
+
|
|
95763
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
|
|
95764
|
+
|
|
95765
|
+
|
|
95766
|
+
|
|
95767
|
+
/* harmony default export */ var classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
|
|
95768
|
+
|
|
95769
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js
|
|
95770
|
+
|
|
95771
|
+
|
|
95772
|
+
/* harmony default export */ var classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
|
|
95773
|
+
|
|
95774
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/Blob.js
|
|
95775
|
+
|
|
95776
|
+
|
|
95777
|
+
/* harmony default export */ var classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
|
|
95778
|
+
|
|
95779
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js
|
|
95780
|
+
|
|
95781
|
+
|
|
95782
|
+
|
|
95783
|
+
|
|
95784
|
+
/* harmony default export */ var browser = ({
|
|
95785
|
+
isBrowser: true,
|
|
95786
|
+
classes: {
|
|
95787
|
+
URLSearchParams: classes_URLSearchParams,
|
|
95788
|
+
FormData: classes_FormData,
|
|
95789
|
+
Blob: classes_Blob
|
|
95790
|
+
},
|
|
95791
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
95792
|
+
});
|
|
95793
|
+
|
|
95794
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/common/utils.js
|
|
95795
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
95796
|
+
|
|
95797
|
+
/**
|
|
95798
|
+
* Determine if we're running in a standard browser environment
|
|
95799
|
+
*
|
|
95800
|
+
* This allows axios to run in a web worker, and react-native.
|
|
95801
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
95802
|
+
*
|
|
95803
|
+
* web workers:
|
|
95804
|
+
* typeof window -> undefined
|
|
95805
|
+
* typeof document -> undefined
|
|
95806
|
+
*
|
|
95807
|
+
* react-native:
|
|
95808
|
+
* navigator.product -> 'ReactNative'
|
|
95809
|
+
* nativescript
|
|
95810
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
95811
|
+
*
|
|
95812
|
+
* @returns {boolean}
|
|
95813
|
+
*/
|
|
95814
|
+
const hasStandardBrowserEnv = (
|
|
95815
|
+
(product) => {
|
|
95816
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
95817
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
95818
|
+
|
|
95819
|
+
/**
|
|
95820
|
+
* Determine if we're running in a standard browser webWorker environment
|
|
95821
|
+
*
|
|
95822
|
+
* Although the `isStandardBrowserEnv` method indicates that
|
|
95823
|
+
* `allows axios to run in a web worker`, the WebWorker will still be
|
|
95824
|
+
* filtered out due to its judgment standard
|
|
95825
|
+
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
95826
|
+
* This leads to a problem when axios post `FormData` in webWorker
|
|
95827
|
+
*/
|
|
95828
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
95829
|
+
return (
|
|
95830
|
+
typeof WorkerGlobalScope !== 'undefined' &&
|
|
95831
|
+
// eslint-disable-next-line no-undef
|
|
95832
|
+
self instanceof WorkerGlobalScope &&
|
|
95833
|
+
typeof self.importScripts === 'function'
|
|
95834
|
+
);
|
|
95835
|
+
})();
|
|
95836
|
+
|
|
95837
|
+
|
|
95838
|
+
|
|
95839
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/platform/index.js
|
|
95840
|
+
|
|
95841
|
+
|
|
95842
|
+
|
|
95843
|
+
/* harmony default export */ var platform = ({
|
|
95844
|
+
...common_utils_namespaceObject,
|
|
95845
|
+
...browser
|
|
95846
|
+
});
|
|
95847
|
+
|
|
95848
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
95849
|
+
|
|
95850
|
+
|
|
95851
|
+
|
|
95852
|
+
|
|
95853
|
+
|
|
95854
|
+
|
|
95855
|
+
function toURLEncodedForm(data, options) {
|
|
95856
|
+
return helpers_toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
95857
|
+
visitor: function(value, key, path, helpers) {
|
|
95858
|
+
if (platform.isNode && utils.isBuffer(value)) {
|
|
95859
|
+
this.append(key, value.toString('base64'));
|
|
95860
|
+
return false;
|
|
95861
|
+
}
|
|
95862
|
+
|
|
95863
|
+
return helpers.defaultVisitor.apply(this, arguments);
|
|
95864
|
+
}
|
|
95865
|
+
}, options));
|
|
95866
|
+
}
|
|
95867
|
+
|
|
95868
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js
|
|
95869
|
+
|
|
95870
|
+
|
|
95871
|
+
|
|
95872
|
+
|
|
95873
|
+
/**
|
|
95874
|
+
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
95875
|
+
*
|
|
95876
|
+
* @param {string} name - The name of the property to get.
|
|
95877
|
+
*
|
|
95878
|
+
* @returns An array of strings.
|
|
95879
|
+
*/
|
|
95880
|
+
function parsePropPath(name) {
|
|
95881
|
+
// foo[x][y][z]
|
|
95882
|
+
// foo.x.y.z
|
|
95883
|
+
// foo-x-y-z
|
|
95884
|
+
// foo x y z
|
|
95885
|
+
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
95886
|
+
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
95887
|
+
});
|
|
95888
|
+
}
|
|
95889
|
+
|
|
95890
|
+
/**
|
|
95891
|
+
* Convert an array to an object.
|
|
95892
|
+
*
|
|
95893
|
+
* @param {Array<any>} arr - The array to convert to an object.
|
|
95894
|
+
*
|
|
95895
|
+
* @returns An object with the same keys and values as the array.
|
|
95896
|
+
*/
|
|
95897
|
+
function arrayToObject(arr) {
|
|
95898
|
+
const obj = {};
|
|
95899
|
+
const keys = Object.keys(arr);
|
|
95900
|
+
let i;
|
|
95901
|
+
const len = keys.length;
|
|
95902
|
+
let key;
|
|
95903
|
+
for (i = 0; i < len; i++) {
|
|
95904
|
+
key = keys[i];
|
|
95905
|
+
obj[key] = arr[key];
|
|
95906
|
+
}
|
|
95907
|
+
return obj;
|
|
95908
|
+
}
|
|
95909
|
+
|
|
95910
|
+
/**
|
|
95911
|
+
* It takes a FormData object and returns a JavaScript object
|
|
95912
|
+
*
|
|
95913
|
+
* @param {string} formData The FormData object to convert to JSON.
|
|
95914
|
+
*
|
|
95915
|
+
* @returns {Object<string, any> | null} The converted object.
|
|
95916
|
+
*/
|
|
95917
|
+
function formDataToJSON(formData) {
|
|
95918
|
+
function buildPath(path, value, target, index) {
|
|
95919
|
+
let name = path[index++];
|
|
95920
|
+
|
|
95921
|
+
if (name === '__proto__') return true;
|
|
95922
|
+
|
|
95923
|
+
const isNumericKey = Number.isFinite(+name);
|
|
95924
|
+
const isLast = index >= path.length;
|
|
95925
|
+
name = !name && utils.isArray(target) ? target.length : name;
|
|
95926
|
+
|
|
95927
|
+
if (isLast) {
|
|
95928
|
+
if (utils.hasOwnProp(target, name)) {
|
|
95929
|
+
target[name] = [target[name], value];
|
|
95930
|
+
} else {
|
|
95931
|
+
target[name] = value;
|
|
95932
|
+
}
|
|
95933
|
+
|
|
95934
|
+
return !isNumericKey;
|
|
95935
|
+
}
|
|
95936
|
+
|
|
95937
|
+
if (!target[name] || !utils.isObject(target[name])) {
|
|
95938
|
+
target[name] = [];
|
|
95939
|
+
}
|
|
95940
|
+
|
|
95941
|
+
const result = buildPath(path, value, target[name], index);
|
|
95942
|
+
|
|
95943
|
+
if (result && utils.isArray(target[name])) {
|
|
95944
|
+
target[name] = arrayToObject(target[name]);
|
|
95945
|
+
}
|
|
95946
|
+
|
|
95947
|
+
return !isNumericKey;
|
|
95948
|
+
}
|
|
95949
|
+
|
|
95950
|
+
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
95951
|
+
const obj = {};
|
|
95952
|
+
|
|
95953
|
+
utils.forEachEntry(formData, (name, value) => {
|
|
95954
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
95955
|
+
});
|
|
95956
|
+
|
|
95957
|
+
return obj;
|
|
95958
|
+
}
|
|
95959
|
+
|
|
95960
|
+
return null;
|
|
95961
|
+
}
|
|
95962
|
+
|
|
95963
|
+
/* harmony default export */ var helpers_formDataToJSON = (formDataToJSON);
|
|
95964
|
+
|
|
95965
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js
|
|
95966
|
+
|
|
95967
|
+
|
|
95968
|
+
|
|
95969
|
+
|
|
95970
|
+
|
|
95971
|
+
|
|
95972
|
+
|
|
95973
|
+
|
|
95974
|
+
|
|
95975
|
+
|
|
95976
|
+
/**
|
|
95977
|
+
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
95978
|
+
* of the input
|
|
95979
|
+
*
|
|
95980
|
+
* @param {any} rawValue - The value to be stringified.
|
|
95981
|
+
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
95982
|
+
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
95983
|
+
*
|
|
95984
|
+
* @returns {string} A stringified version of the rawValue.
|
|
95985
|
+
*/
|
|
95986
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
95987
|
+
if (utils.isString(rawValue)) {
|
|
95988
|
+
try {
|
|
95989
|
+
(parser || JSON.parse)(rawValue);
|
|
95990
|
+
return utils.trim(rawValue);
|
|
95991
|
+
} catch (e) {
|
|
95992
|
+
if (e.name !== 'SyntaxError') {
|
|
95993
|
+
throw e;
|
|
95994
|
+
}
|
|
95995
|
+
}
|
|
95996
|
+
}
|
|
95997
|
+
|
|
95998
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
95999
|
+
}
|
|
96000
|
+
|
|
96001
|
+
const defaults = {
|
|
96002
|
+
|
|
96003
|
+
transitional: defaults_transitional,
|
|
96004
|
+
|
|
96005
|
+
adapter: ['xhr', 'http'],
|
|
96006
|
+
|
|
96007
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
96008
|
+
const contentType = headers.getContentType() || '';
|
|
96009
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
96010
|
+
const isObjectPayload = utils.isObject(data);
|
|
96011
|
+
|
|
96012
|
+
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
96013
|
+
data = new FormData(data);
|
|
96014
|
+
}
|
|
96015
|
+
|
|
96016
|
+
const isFormData = utils.isFormData(data);
|
|
96017
|
+
|
|
96018
|
+
if (isFormData) {
|
|
96019
|
+
return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
|
|
96020
|
+
}
|
|
96021
|
+
|
|
96022
|
+
if (utils.isArrayBuffer(data) ||
|
|
96023
|
+
utils.isBuffer(data) ||
|
|
96024
|
+
utils.isStream(data) ||
|
|
96025
|
+
utils.isFile(data) ||
|
|
96026
|
+
utils.isBlob(data)
|
|
96027
|
+
) {
|
|
96028
|
+
return data;
|
|
96029
|
+
}
|
|
96030
|
+
if (utils.isArrayBufferView(data)) {
|
|
96031
|
+
return data.buffer;
|
|
96032
|
+
}
|
|
96033
|
+
if (utils.isURLSearchParams(data)) {
|
|
96034
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
96035
|
+
return data.toString();
|
|
96036
|
+
}
|
|
96037
|
+
|
|
96038
|
+
let isFileList;
|
|
96039
|
+
|
|
96040
|
+
if (isObjectPayload) {
|
|
96041
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
96042
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
96043
|
+
}
|
|
96044
|
+
|
|
96045
|
+
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
96046
|
+
const _FormData = this.env && this.env.FormData;
|
|
96047
|
+
|
|
96048
|
+
return helpers_toFormData(
|
|
96049
|
+
isFileList ? {'files[]': data} : data,
|
|
96050
|
+
_FormData && new _FormData(),
|
|
96051
|
+
this.formSerializer
|
|
96052
|
+
);
|
|
96053
|
+
}
|
|
96054
|
+
}
|
|
96055
|
+
|
|
96056
|
+
if (isObjectPayload || hasJSONContentType ) {
|
|
96057
|
+
headers.setContentType('application/json', false);
|
|
96058
|
+
return stringifySafely(data);
|
|
96059
|
+
}
|
|
96060
|
+
|
|
96061
|
+
return data;
|
|
96062
|
+
}],
|
|
96063
|
+
|
|
96064
|
+
transformResponse: [function transformResponse(data) {
|
|
96065
|
+
const transitional = this.transitional || defaults.transitional;
|
|
96066
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
96067
|
+
const JSONRequested = this.responseType === 'json';
|
|
96068
|
+
|
|
96069
|
+
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
96070
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
96071
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
96072
|
+
|
|
96073
|
+
try {
|
|
96074
|
+
return JSON.parse(data);
|
|
96075
|
+
} catch (e) {
|
|
96076
|
+
if (strictJSONParsing) {
|
|
96077
|
+
if (e.name === 'SyntaxError') {
|
|
96078
|
+
throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
96079
|
+
}
|
|
96080
|
+
throw e;
|
|
96081
|
+
}
|
|
96082
|
+
}
|
|
96083
|
+
}
|
|
96084
|
+
|
|
96085
|
+
return data;
|
|
96086
|
+
}],
|
|
96087
|
+
|
|
96088
|
+
/**
|
|
96089
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
96090
|
+
* timeout is not created.
|
|
96091
|
+
*/
|
|
96092
|
+
timeout: 0,
|
|
96093
|
+
|
|
96094
|
+
xsrfCookieName: 'XSRF-TOKEN',
|
|
96095
|
+
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
96096
|
+
|
|
96097
|
+
maxContentLength: -1,
|
|
96098
|
+
maxBodyLength: -1,
|
|
96099
|
+
|
|
96100
|
+
env: {
|
|
96101
|
+
FormData: platform.classes.FormData,
|
|
96102
|
+
Blob: platform.classes.Blob
|
|
96103
|
+
},
|
|
96104
|
+
|
|
96105
|
+
validateStatus: function validateStatus(status) {
|
|
96106
|
+
return status >= 200 && status < 300;
|
|
96107
|
+
},
|
|
96108
|
+
|
|
96109
|
+
headers: {
|
|
96110
|
+
common: {
|
|
96111
|
+
'Accept': 'application/json, text/plain, */*',
|
|
96112
|
+
'Content-Type': undefined
|
|
96113
|
+
}
|
|
96114
|
+
}
|
|
96115
|
+
};
|
|
96116
|
+
|
|
96117
|
+
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
96118
|
+
defaults.headers[method] = {};
|
|
96119
|
+
});
|
|
96120
|
+
|
|
96121
|
+
/* harmony default export */ var lib_defaults = (defaults);
|
|
96122
|
+
|
|
96123
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js
|
|
96124
|
+
|
|
96125
|
+
|
|
96126
|
+
|
|
96127
|
+
|
|
96128
|
+
// RawAxiosHeaders whose duplicates are ignored by node
|
|
96129
|
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
96130
|
+
const ignoreDuplicateOf = utils.toObjectSet([
|
|
96131
|
+
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
96132
|
+
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
96133
|
+
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
96134
|
+
'referer', 'retry-after', 'user-agent'
|
|
96135
|
+
]);
|
|
96136
|
+
|
|
96137
|
+
/**
|
|
96138
|
+
* Parse headers into an object
|
|
96139
|
+
*
|
|
96140
|
+
* ```
|
|
96141
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
96142
|
+
* Content-Type: application/json
|
|
96143
|
+
* Connection: keep-alive
|
|
96144
|
+
* Transfer-Encoding: chunked
|
|
96145
|
+
* ```
|
|
96146
|
+
*
|
|
96147
|
+
* @param {String} rawHeaders Headers needing to be parsed
|
|
96148
|
+
*
|
|
96149
|
+
* @returns {Object} Headers parsed into an object
|
|
96150
|
+
*/
|
|
96151
|
+
/* harmony default export */ var parseHeaders = (rawHeaders => {
|
|
96152
|
+
const parsed = {};
|
|
96153
|
+
let key;
|
|
96154
|
+
let val;
|
|
96155
|
+
let i;
|
|
96156
|
+
|
|
96157
|
+
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
|
|
96158
|
+
i = line.indexOf(':');
|
|
96159
|
+
key = line.substring(0, i).trim().toLowerCase();
|
|
96160
|
+
val = line.substring(i + 1).trim();
|
|
96161
|
+
|
|
96162
|
+
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
|
|
96163
|
+
return;
|
|
96164
|
+
}
|
|
96165
|
+
|
|
96166
|
+
if (key === 'set-cookie') {
|
|
96167
|
+
if (parsed[key]) {
|
|
96168
|
+
parsed[key].push(val);
|
|
96169
|
+
} else {
|
|
96170
|
+
parsed[key] = [val];
|
|
96171
|
+
}
|
|
96172
|
+
} else {
|
|
96173
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
96174
|
+
}
|
|
96175
|
+
});
|
|
96176
|
+
|
|
96177
|
+
return parsed;
|
|
96178
|
+
});
|
|
96179
|
+
|
|
96180
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js
|
|
96181
|
+
|
|
96182
|
+
|
|
96183
|
+
|
|
96184
|
+
|
|
96185
|
+
|
|
96186
|
+
const $internals = Symbol('internals');
|
|
96187
|
+
|
|
96188
|
+
function normalizeHeader(header) {
|
|
96189
|
+
return header && String(header).trim().toLowerCase();
|
|
96190
|
+
}
|
|
96191
|
+
|
|
96192
|
+
function normalizeValue(value) {
|
|
96193
|
+
if (value === false || value == null) {
|
|
96194
|
+
return value;
|
|
96195
|
+
}
|
|
96196
|
+
|
|
96197
|
+
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
96198
|
+
}
|
|
96199
|
+
|
|
96200
|
+
function parseTokens(str) {
|
|
96201
|
+
const tokens = Object.create(null);
|
|
96202
|
+
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
96203
|
+
let match;
|
|
96204
|
+
|
|
96205
|
+
while ((match = tokensRE.exec(str))) {
|
|
96206
|
+
tokens[match[1]] = match[2];
|
|
96207
|
+
}
|
|
96208
|
+
|
|
96209
|
+
return tokens;
|
|
96210
|
+
}
|
|
96211
|
+
|
|
96212
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
96213
|
+
|
|
96214
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
96215
|
+
if (utils.isFunction(filter)) {
|
|
96216
|
+
return filter.call(this, value, header);
|
|
96217
|
+
}
|
|
96218
|
+
|
|
96219
|
+
if (isHeaderNameFilter) {
|
|
96220
|
+
value = header;
|
|
96221
|
+
}
|
|
96222
|
+
|
|
96223
|
+
if (!utils.isString(value)) return;
|
|
96224
|
+
|
|
96225
|
+
if (utils.isString(filter)) {
|
|
96226
|
+
return value.indexOf(filter) !== -1;
|
|
96227
|
+
}
|
|
96228
|
+
|
|
96229
|
+
if (utils.isRegExp(filter)) {
|
|
96230
|
+
return filter.test(value);
|
|
96231
|
+
}
|
|
96232
|
+
}
|
|
96233
|
+
|
|
96234
|
+
function formatHeader(header) {
|
|
96235
|
+
return header.trim()
|
|
96236
|
+
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
96237
|
+
return char.toUpperCase() + str;
|
|
96238
|
+
});
|
|
96239
|
+
}
|
|
96240
|
+
|
|
96241
|
+
function buildAccessors(obj, header) {
|
|
96242
|
+
const accessorName = utils.toCamelCase(' ' + header);
|
|
96243
|
+
|
|
96244
|
+
['get', 'set', 'has'].forEach(methodName => {
|
|
96245
|
+
Object.defineProperty(obj, methodName + accessorName, {
|
|
96246
|
+
value: function(arg1, arg2, arg3) {
|
|
96247
|
+
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
96248
|
+
},
|
|
96249
|
+
configurable: true
|
|
96250
|
+
});
|
|
96251
|
+
});
|
|
96252
|
+
}
|
|
96253
|
+
|
|
96254
|
+
class AxiosHeaders {
|
|
96255
|
+
constructor(headers) {
|
|
96256
|
+
headers && this.set(headers);
|
|
96257
|
+
}
|
|
96258
|
+
|
|
96259
|
+
set(header, valueOrRewrite, rewrite) {
|
|
96260
|
+
const self = this;
|
|
96261
|
+
|
|
96262
|
+
function setHeader(_value, _header, _rewrite) {
|
|
96263
|
+
const lHeader = normalizeHeader(_header);
|
|
96264
|
+
|
|
96265
|
+
if (!lHeader) {
|
|
96266
|
+
throw new Error('header name must be a non-empty string');
|
|
96267
|
+
}
|
|
96268
|
+
|
|
96269
|
+
const key = utils.findKey(self, lHeader);
|
|
96270
|
+
|
|
96271
|
+
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
96272
|
+
self[key || _header] = normalizeValue(_value);
|
|
96273
|
+
}
|
|
96274
|
+
}
|
|
96275
|
+
|
|
96276
|
+
const setHeaders = (headers, _rewrite) =>
|
|
96277
|
+
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
96278
|
+
|
|
96279
|
+
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
96280
|
+
setHeaders(header, valueOrRewrite)
|
|
96281
|
+
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
96282
|
+
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
96283
|
+
} else {
|
|
96284
|
+
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
96285
|
+
}
|
|
96286
|
+
|
|
96287
|
+
return this;
|
|
96288
|
+
}
|
|
96289
|
+
|
|
96290
|
+
get(header, parser) {
|
|
96291
|
+
header = normalizeHeader(header);
|
|
96292
|
+
|
|
96293
|
+
if (header) {
|
|
96294
|
+
const key = utils.findKey(this, header);
|
|
96295
|
+
|
|
96296
|
+
if (key) {
|
|
96297
|
+
const value = this[key];
|
|
96298
|
+
|
|
96299
|
+
if (!parser) {
|
|
96300
|
+
return value;
|
|
96301
|
+
}
|
|
96302
|
+
|
|
96303
|
+
if (parser === true) {
|
|
96304
|
+
return parseTokens(value);
|
|
96305
|
+
}
|
|
96306
|
+
|
|
96307
|
+
if (utils.isFunction(parser)) {
|
|
96308
|
+
return parser.call(this, value, key);
|
|
96309
|
+
}
|
|
96310
|
+
|
|
96311
|
+
if (utils.isRegExp(parser)) {
|
|
96312
|
+
return parser.exec(value);
|
|
96313
|
+
}
|
|
96314
|
+
|
|
96315
|
+
throw new TypeError('parser must be boolean|regexp|function');
|
|
96316
|
+
}
|
|
96317
|
+
}
|
|
96318
|
+
}
|
|
96319
|
+
|
|
96320
|
+
has(header, matcher) {
|
|
96321
|
+
header = normalizeHeader(header);
|
|
96322
|
+
|
|
96323
|
+
if (header) {
|
|
96324
|
+
const key = utils.findKey(this, header);
|
|
96325
|
+
|
|
96326
|
+
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
96327
|
+
}
|
|
96328
|
+
|
|
96329
|
+
return false;
|
|
96330
|
+
}
|
|
96331
|
+
|
|
96332
|
+
delete(header, matcher) {
|
|
96333
|
+
const self = this;
|
|
96334
|
+
let deleted = false;
|
|
96335
|
+
|
|
96336
|
+
function deleteHeader(_header) {
|
|
96337
|
+
_header = normalizeHeader(_header);
|
|
96338
|
+
|
|
96339
|
+
if (_header) {
|
|
96340
|
+
const key = utils.findKey(self, _header);
|
|
96341
|
+
|
|
96342
|
+
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
96343
|
+
delete self[key];
|
|
96344
|
+
|
|
96345
|
+
deleted = true;
|
|
96346
|
+
}
|
|
96347
|
+
}
|
|
96348
|
+
}
|
|
96349
|
+
|
|
96350
|
+
if (utils.isArray(header)) {
|
|
96351
|
+
header.forEach(deleteHeader);
|
|
96352
|
+
} else {
|
|
96353
|
+
deleteHeader(header);
|
|
96354
|
+
}
|
|
96355
|
+
|
|
96356
|
+
return deleted;
|
|
96357
|
+
}
|
|
96358
|
+
|
|
96359
|
+
clear(matcher) {
|
|
96360
|
+
const keys = Object.keys(this);
|
|
96361
|
+
let i = keys.length;
|
|
96362
|
+
let deleted = false;
|
|
96363
|
+
|
|
96364
|
+
while (i--) {
|
|
96365
|
+
const key = keys[i];
|
|
96366
|
+
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
96367
|
+
delete this[key];
|
|
96368
|
+
deleted = true;
|
|
96369
|
+
}
|
|
96370
|
+
}
|
|
96371
|
+
|
|
96372
|
+
return deleted;
|
|
96373
|
+
}
|
|
96374
|
+
|
|
96375
|
+
normalize(format) {
|
|
96376
|
+
const self = this;
|
|
96377
|
+
const headers = {};
|
|
96378
|
+
|
|
96379
|
+
utils.forEach(this, (value, header) => {
|
|
96380
|
+
const key = utils.findKey(headers, header);
|
|
96381
|
+
|
|
96382
|
+
if (key) {
|
|
96383
|
+
self[key] = normalizeValue(value);
|
|
96384
|
+
delete self[header];
|
|
96385
|
+
return;
|
|
96386
|
+
}
|
|
96387
|
+
|
|
96388
|
+
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
96389
|
+
|
|
96390
|
+
if (normalized !== header) {
|
|
96391
|
+
delete self[header];
|
|
96392
|
+
}
|
|
96393
|
+
|
|
96394
|
+
self[normalized] = normalizeValue(value);
|
|
96395
|
+
|
|
96396
|
+
headers[normalized] = true;
|
|
96397
|
+
});
|
|
96398
|
+
|
|
96399
|
+
return this;
|
|
96400
|
+
}
|
|
96401
|
+
|
|
96402
|
+
concat(...targets) {
|
|
96403
|
+
return this.constructor.concat(this, ...targets);
|
|
96404
|
+
}
|
|
96405
|
+
|
|
96406
|
+
toJSON(asStrings) {
|
|
96407
|
+
const obj = Object.create(null);
|
|
96408
|
+
|
|
96409
|
+
utils.forEach(this, (value, header) => {
|
|
96410
|
+
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
96411
|
+
});
|
|
96412
|
+
|
|
96413
|
+
return obj;
|
|
96414
|
+
}
|
|
96415
|
+
|
|
96416
|
+
[Symbol.iterator]() {
|
|
96417
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
96418
|
+
}
|
|
96419
|
+
|
|
96420
|
+
toString() {
|
|
96421
|
+
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
96422
|
+
}
|
|
96423
|
+
|
|
96424
|
+
get [Symbol.toStringTag]() {
|
|
96425
|
+
return 'AxiosHeaders';
|
|
96426
|
+
}
|
|
96427
|
+
|
|
96428
|
+
static from(thing) {
|
|
96429
|
+
return thing instanceof this ? thing : new this(thing);
|
|
96430
|
+
}
|
|
96431
|
+
|
|
96432
|
+
static concat(first, ...targets) {
|
|
96433
|
+
const computed = new this(first);
|
|
96434
|
+
|
|
96435
|
+
targets.forEach((target) => computed.set(target));
|
|
96436
|
+
|
|
96437
|
+
return computed;
|
|
96438
|
+
}
|
|
96439
|
+
|
|
96440
|
+
static accessor(header) {
|
|
96441
|
+
const internals = this[$internals] = (this[$internals] = {
|
|
96442
|
+
accessors: {}
|
|
96443
|
+
});
|
|
96444
|
+
|
|
96445
|
+
const accessors = internals.accessors;
|
|
96446
|
+
const prototype = this.prototype;
|
|
96447
|
+
|
|
96448
|
+
function defineAccessor(_header) {
|
|
96449
|
+
const lHeader = normalizeHeader(_header);
|
|
96450
|
+
|
|
96451
|
+
if (!accessors[lHeader]) {
|
|
96452
|
+
buildAccessors(prototype, _header);
|
|
96453
|
+
accessors[lHeader] = true;
|
|
96454
|
+
}
|
|
96455
|
+
}
|
|
96456
|
+
|
|
96457
|
+
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
96458
|
+
|
|
96459
|
+
return this;
|
|
96460
|
+
}
|
|
96461
|
+
}
|
|
96462
|
+
|
|
96463
|
+
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
96464
|
+
|
|
96465
|
+
// reserved names hotfix
|
|
96466
|
+
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
96467
|
+
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
96468
|
+
return {
|
|
96469
|
+
get: () => value,
|
|
96470
|
+
set(headerValue) {
|
|
96471
|
+
this[mapped] = headerValue;
|
|
96472
|
+
}
|
|
96473
|
+
}
|
|
96474
|
+
});
|
|
96475
|
+
|
|
96476
|
+
utils.freezeMethods(AxiosHeaders);
|
|
96477
|
+
|
|
96478
|
+
/* harmony default export */ var core_AxiosHeaders = (AxiosHeaders);
|
|
96479
|
+
|
|
96480
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js
|
|
96481
|
+
|
|
96482
|
+
|
|
96483
|
+
|
|
96484
|
+
|
|
96485
|
+
|
|
96486
|
+
|
|
96487
|
+
/**
|
|
96488
|
+
* Transform the data for a request or a response
|
|
96489
|
+
*
|
|
96490
|
+
* @param {Array|Function} fns A single function or Array of functions
|
|
96491
|
+
* @param {?Object} response The response object
|
|
96492
|
+
*
|
|
96493
|
+
* @returns {*} The resulting transformed data
|
|
96494
|
+
*/
|
|
96495
|
+
function transformData(fns, response) {
|
|
96496
|
+
const config = this || lib_defaults;
|
|
96497
|
+
const context = response || config;
|
|
96498
|
+
const headers = core_AxiosHeaders.from(context.headers);
|
|
96499
|
+
let data = context.data;
|
|
96500
|
+
|
|
96501
|
+
utils.forEach(fns, function transform(fn) {
|
|
96502
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
96503
|
+
});
|
|
96504
|
+
|
|
96505
|
+
headers.normalize();
|
|
96506
|
+
|
|
96507
|
+
return data;
|
|
96508
|
+
}
|
|
96509
|
+
|
|
96510
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js
|
|
96511
|
+
|
|
96512
|
+
|
|
96513
|
+
function isCancel(value) {
|
|
96514
|
+
return !!(value && value.__CANCEL__);
|
|
96515
|
+
}
|
|
96516
|
+
|
|
96517
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js
|
|
96518
|
+
|
|
96519
|
+
|
|
96520
|
+
|
|
96521
|
+
|
|
96522
|
+
|
|
96523
|
+
/**
|
|
96524
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
96525
|
+
*
|
|
96526
|
+
* @param {string=} message The message.
|
|
96527
|
+
* @param {Object=} config The config.
|
|
96528
|
+
* @param {Object=} request The request.
|
|
96529
|
+
*
|
|
96530
|
+
* @returns {CanceledError} The created error.
|
|
96531
|
+
*/
|
|
96532
|
+
function CanceledError(message, config, request) {
|
|
96533
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
96534
|
+
core_AxiosError.call(this, message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request);
|
|
96535
|
+
this.name = 'CanceledError';
|
|
96536
|
+
}
|
|
96537
|
+
|
|
96538
|
+
utils.inherits(CanceledError, core_AxiosError, {
|
|
96539
|
+
__CANCEL__: true
|
|
96540
|
+
});
|
|
96541
|
+
|
|
96542
|
+
/* harmony default export */ var cancel_CanceledError = (CanceledError);
|
|
96543
|
+
|
|
96544
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js
|
|
96545
|
+
|
|
96546
|
+
|
|
96547
|
+
|
|
96548
|
+
|
|
96549
|
+
/**
|
|
96550
|
+
* Resolve or reject a Promise based on response status.
|
|
96551
|
+
*
|
|
96552
|
+
* @param {Function} resolve A function that resolves the promise.
|
|
96553
|
+
* @param {Function} reject A function that rejects the promise.
|
|
96554
|
+
* @param {object} response The response.
|
|
96555
|
+
*
|
|
96556
|
+
* @returns {object} The response.
|
|
96557
|
+
*/
|
|
96558
|
+
function settle(resolve, reject, response) {
|
|
96559
|
+
const validateStatus = response.config.validateStatus;
|
|
96560
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
96561
|
+
resolve(response);
|
|
96562
|
+
} else {
|
|
96563
|
+
reject(new core_AxiosError(
|
|
96564
|
+
'Request failed with status code ' + response.status,
|
|
96565
|
+
[core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
96566
|
+
response.config,
|
|
96567
|
+
response.request,
|
|
96568
|
+
response
|
|
96569
|
+
));
|
|
96570
|
+
}
|
|
96571
|
+
}
|
|
96572
|
+
|
|
96573
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js
|
|
96574
|
+
|
|
96575
|
+
|
|
96576
|
+
|
|
96577
|
+
/* harmony default export */ var cookies = (platform.hasStandardBrowserEnv ?
|
|
96578
|
+
|
|
96579
|
+
// Standard browser envs support document.cookie
|
|
96580
|
+
{
|
|
96581
|
+
write(name, value, expires, path, domain, secure) {
|
|
96582
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
96583
|
+
|
|
96584
|
+
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
96585
|
+
|
|
96586
|
+
utils.isString(path) && cookie.push('path=' + path);
|
|
96587
|
+
|
|
96588
|
+
utils.isString(domain) && cookie.push('domain=' + domain);
|
|
96589
|
+
|
|
96590
|
+
secure === true && cookie.push('secure');
|
|
96591
|
+
|
|
96592
|
+
document.cookie = cookie.join('; ');
|
|
96593
|
+
},
|
|
96594
|
+
|
|
96595
|
+
read(name) {
|
|
96596
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
96597
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
96598
|
+
},
|
|
96599
|
+
|
|
96600
|
+
remove(name) {
|
|
96601
|
+
this.write(name, '', Date.now() - 86400000);
|
|
96602
|
+
}
|
|
96603
|
+
}
|
|
96604
|
+
|
|
96605
|
+
:
|
|
96606
|
+
|
|
96607
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
96608
|
+
{
|
|
96609
|
+
write() {},
|
|
96610
|
+
read() {
|
|
96611
|
+
return null;
|
|
96612
|
+
},
|
|
96613
|
+
remove() {}
|
|
96614
|
+
});
|
|
96615
|
+
|
|
96616
|
+
|
|
96617
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
96618
|
+
|
|
96619
|
+
|
|
96620
|
+
/**
|
|
96621
|
+
* Determines whether the specified URL is absolute
|
|
96622
|
+
*
|
|
96623
|
+
* @param {string} url The URL to test
|
|
96624
|
+
*
|
|
96625
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
96626
|
+
*/
|
|
96627
|
+
function isAbsoluteURL(url) {
|
|
96628
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
96629
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
96630
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
|
96631
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
96632
|
+
}
|
|
96633
|
+
|
|
96634
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js
|
|
96635
|
+
|
|
96636
|
+
|
|
96637
|
+
/**
|
|
96638
|
+
* Creates a new URL by combining the specified URLs
|
|
96639
|
+
*
|
|
96640
|
+
* @param {string} baseURL The base URL
|
|
96641
|
+
* @param {string} relativeURL The relative URL
|
|
96642
|
+
*
|
|
96643
|
+
* @returns {string} The combined URL
|
|
96644
|
+
*/
|
|
96645
|
+
function combineURLs(baseURL, relativeURL) {
|
|
96646
|
+
return relativeURL
|
|
96647
|
+
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
96648
|
+
: baseURL;
|
|
96649
|
+
}
|
|
96650
|
+
|
|
96651
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js
|
|
96652
|
+
|
|
96653
|
+
|
|
96654
|
+
|
|
96655
|
+
|
|
96656
|
+
|
|
96657
|
+
/**
|
|
96658
|
+
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
96659
|
+
* only when the requestedURL is not already an absolute URL.
|
|
96660
|
+
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
|
96661
|
+
*
|
|
96662
|
+
* @param {string} baseURL The base URL
|
|
96663
|
+
* @param {string} requestedURL Absolute or relative URL to combine
|
|
96664
|
+
*
|
|
96665
|
+
* @returns {string} The combined full path
|
|
96666
|
+
*/
|
|
96667
|
+
function buildFullPath(baseURL, requestedURL) {
|
|
96668
|
+
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
96669
|
+
return combineURLs(baseURL, requestedURL);
|
|
96670
|
+
}
|
|
96671
|
+
return requestedURL;
|
|
96672
|
+
}
|
|
96673
|
+
|
|
96674
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
96675
|
+
|
|
96676
|
+
|
|
96677
|
+
|
|
96678
|
+
|
|
96679
|
+
|
|
96680
|
+
/* harmony default export */ var isURLSameOrigin = (platform.hasStandardBrowserEnv ?
|
|
96681
|
+
|
|
96682
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
96683
|
+
// whether the request URL is of the same origin as current location.
|
|
96684
|
+
(function standardBrowserEnv() {
|
|
96685
|
+
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
96686
|
+
const urlParsingNode = document.createElement('a');
|
|
96687
|
+
let originURL;
|
|
96688
|
+
|
|
96689
|
+
/**
|
|
96690
|
+
* Parse a URL to discover its components
|
|
96691
|
+
*
|
|
96692
|
+
* @param {String} url The URL to be parsed
|
|
96693
|
+
* @returns {Object}
|
|
96694
|
+
*/
|
|
96695
|
+
function resolveURL(url) {
|
|
96696
|
+
let href = url;
|
|
96697
|
+
|
|
96698
|
+
if (msie) {
|
|
96699
|
+
// IE needs attribute set twice to normalize properties
|
|
96700
|
+
urlParsingNode.setAttribute('href', href);
|
|
96701
|
+
href = urlParsingNode.href;
|
|
96702
|
+
}
|
|
96703
|
+
|
|
96704
|
+
urlParsingNode.setAttribute('href', href);
|
|
96705
|
+
|
|
96706
|
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
96707
|
+
return {
|
|
96708
|
+
href: urlParsingNode.href,
|
|
96709
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
96710
|
+
host: urlParsingNode.host,
|
|
96711
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
96712
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
96713
|
+
hostname: urlParsingNode.hostname,
|
|
96714
|
+
port: urlParsingNode.port,
|
|
96715
|
+
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
96716
|
+
urlParsingNode.pathname :
|
|
96717
|
+
'/' + urlParsingNode.pathname
|
|
96718
|
+
};
|
|
96719
|
+
}
|
|
96720
|
+
|
|
96721
|
+
originURL = resolveURL(window.location.href);
|
|
96722
|
+
|
|
96723
|
+
/**
|
|
96724
|
+
* Determine if a URL shares the same origin as the current location
|
|
96725
|
+
*
|
|
96726
|
+
* @param {String} requestURL The URL to test
|
|
96727
|
+
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
96728
|
+
*/
|
|
96729
|
+
return function isURLSameOrigin(requestURL) {
|
|
96730
|
+
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
96731
|
+
return (parsed.protocol === originURL.protocol &&
|
|
96732
|
+
parsed.host === originURL.host);
|
|
96733
|
+
};
|
|
96734
|
+
})() :
|
|
96735
|
+
|
|
96736
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
96737
|
+
(function nonStandardBrowserEnv() {
|
|
96738
|
+
return function isURLSameOrigin() {
|
|
96739
|
+
return true;
|
|
96740
|
+
};
|
|
96741
|
+
})());
|
|
96742
|
+
|
|
96743
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js
|
|
96744
|
+
|
|
96745
|
+
|
|
96746
|
+
function parseProtocol(url) {
|
|
96747
|
+
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
96748
|
+
return match && match[1] || '';
|
|
96749
|
+
}
|
|
96750
|
+
|
|
96751
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js
|
|
96752
|
+
|
|
96753
|
+
|
|
96754
|
+
/**
|
|
96755
|
+
* Calculate data maxRate
|
|
96756
|
+
* @param {Number} [samplesCount= 10]
|
|
96757
|
+
* @param {Number} [min= 1000]
|
|
96758
|
+
* @returns {Function}
|
|
96759
|
+
*/
|
|
96760
|
+
function speedometer(samplesCount, min) {
|
|
96761
|
+
samplesCount = samplesCount || 10;
|
|
96762
|
+
const bytes = new Array(samplesCount);
|
|
96763
|
+
const timestamps = new Array(samplesCount);
|
|
96764
|
+
let head = 0;
|
|
96765
|
+
let tail = 0;
|
|
96766
|
+
let firstSampleTS;
|
|
96767
|
+
|
|
96768
|
+
min = min !== undefined ? min : 1000;
|
|
96769
|
+
|
|
96770
|
+
return function push(chunkLength) {
|
|
96771
|
+
const now = Date.now();
|
|
96772
|
+
|
|
96773
|
+
const startedAt = timestamps[tail];
|
|
96774
|
+
|
|
96775
|
+
if (!firstSampleTS) {
|
|
96776
|
+
firstSampleTS = now;
|
|
96777
|
+
}
|
|
96778
|
+
|
|
96779
|
+
bytes[head] = chunkLength;
|
|
96780
|
+
timestamps[head] = now;
|
|
96781
|
+
|
|
96782
|
+
let i = tail;
|
|
96783
|
+
let bytesCount = 0;
|
|
96784
|
+
|
|
96785
|
+
while (i !== head) {
|
|
96786
|
+
bytesCount += bytes[i++];
|
|
96787
|
+
i = i % samplesCount;
|
|
96788
|
+
}
|
|
96789
|
+
|
|
96790
|
+
head = (head + 1) % samplesCount;
|
|
96791
|
+
|
|
96792
|
+
if (head === tail) {
|
|
96793
|
+
tail = (tail + 1) % samplesCount;
|
|
96794
|
+
}
|
|
96795
|
+
|
|
96796
|
+
if (now - firstSampleTS < min) {
|
|
96797
|
+
return;
|
|
96798
|
+
}
|
|
96799
|
+
|
|
96800
|
+
const passed = startedAt && now - startedAt;
|
|
96801
|
+
|
|
96802
|
+
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
|
|
96803
|
+
};
|
|
96804
|
+
}
|
|
96805
|
+
|
|
96806
|
+
/* harmony default export */ var helpers_speedometer = (speedometer);
|
|
96807
|
+
|
|
96808
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js
|
|
96809
|
+
|
|
96810
|
+
|
|
96811
|
+
|
|
96812
|
+
|
|
96813
|
+
|
|
96814
|
+
|
|
96815
|
+
|
|
96816
|
+
|
|
96817
|
+
|
|
96818
|
+
|
|
96819
|
+
|
|
96820
|
+
|
|
96821
|
+
|
|
96822
|
+
|
|
96823
|
+
|
|
96824
|
+
|
|
96825
|
+
function progressEventReducer(listener, isDownloadStream) {
|
|
96826
|
+
let bytesNotified = 0;
|
|
96827
|
+
const _speedometer = helpers_speedometer(50, 250);
|
|
96828
|
+
|
|
96829
|
+
return e => {
|
|
96830
|
+
const loaded = e.loaded;
|
|
96831
|
+
const total = e.lengthComputable ? e.total : undefined;
|
|
96832
|
+
const progressBytes = loaded - bytesNotified;
|
|
96833
|
+
const rate = _speedometer(progressBytes);
|
|
96834
|
+
const inRange = loaded <= total;
|
|
96835
|
+
|
|
96836
|
+
bytesNotified = loaded;
|
|
96837
|
+
|
|
96838
|
+
const data = {
|
|
96839
|
+
loaded,
|
|
96840
|
+
total,
|
|
96841
|
+
progress: total ? (loaded / total) : undefined,
|
|
96842
|
+
bytes: progressBytes,
|
|
96843
|
+
rate: rate ? rate : undefined,
|
|
96844
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
96845
|
+
event: e
|
|
96846
|
+
};
|
|
96847
|
+
|
|
96848
|
+
data[isDownloadStream ? 'download' : 'upload'] = true;
|
|
96849
|
+
|
|
96850
|
+
listener(data);
|
|
96851
|
+
};
|
|
96852
|
+
}
|
|
96853
|
+
|
|
96854
|
+
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
|
|
96855
|
+
|
|
96856
|
+
/* harmony default export */ var xhr = (isXHRAdapterSupported && function (config) {
|
|
96857
|
+
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
96858
|
+
let requestData = config.data;
|
|
96859
|
+
const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
|
|
96860
|
+
let {responseType, withXSRFToken} = config;
|
|
96861
|
+
let onCanceled;
|
|
96862
|
+
function done() {
|
|
96863
|
+
if (config.cancelToken) {
|
|
96864
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
96865
|
+
}
|
|
96866
|
+
|
|
96867
|
+
if (config.signal) {
|
|
96868
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
96869
|
+
}
|
|
96870
|
+
}
|
|
96871
|
+
|
|
96872
|
+
let contentType;
|
|
96873
|
+
|
|
96874
|
+
if (utils.isFormData(requestData)) {
|
|
96875
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
96876
|
+
requestHeaders.setContentType(false); // Let the browser set it
|
|
96877
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
96878
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
96879
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
96880
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
96881
|
+
}
|
|
96882
|
+
}
|
|
96883
|
+
|
|
96884
|
+
let request = new XMLHttpRequest();
|
|
96885
|
+
|
|
96886
|
+
// HTTP basic authentication
|
|
96887
|
+
if (config.auth) {
|
|
96888
|
+
const username = config.auth.username || '';
|
|
96889
|
+
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
|
|
96890
|
+
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
|
|
96891
|
+
}
|
|
96892
|
+
|
|
96893
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
96894
|
+
|
|
96895
|
+
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
96896
|
+
|
|
96897
|
+
// Set the request timeout in MS
|
|
96898
|
+
request.timeout = config.timeout;
|
|
96899
|
+
|
|
96900
|
+
function onloadend() {
|
|
96901
|
+
if (!request) {
|
|
96902
|
+
return;
|
|
96903
|
+
}
|
|
96904
|
+
// Prepare the response
|
|
96905
|
+
const responseHeaders = core_AxiosHeaders.from(
|
|
96906
|
+
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
96907
|
+
);
|
|
96908
|
+
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
96909
|
+
request.responseText : request.response;
|
|
96910
|
+
const response = {
|
|
96911
|
+
data: responseData,
|
|
96912
|
+
status: request.status,
|
|
96913
|
+
statusText: request.statusText,
|
|
96914
|
+
headers: responseHeaders,
|
|
96915
|
+
config,
|
|
96916
|
+
request
|
|
96917
|
+
};
|
|
96918
|
+
|
|
96919
|
+
settle(function _resolve(value) {
|
|
96920
|
+
resolve(value);
|
|
96921
|
+
done();
|
|
96922
|
+
}, function _reject(err) {
|
|
96923
|
+
reject(err);
|
|
96924
|
+
done();
|
|
96925
|
+
}, response);
|
|
96926
|
+
|
|
96927
|
+
// Clean up request
|
|
96928
|
+
request = null;
|
|
96929
|
+
}
|
|
96930
|
+
|
|
96931
|
+
if ('onloadend' in request) {
|
|
96932
|
+
// Use onloadend if available
|
|
96933
|
+
request.onloadend = onloadend;
|
|
96934
|
+
} else {
|
|
96935
|
+
// Listen for ready state to emulate onloadend
|
|
96936
|
+
request.onreadystatechange = function handleLoad() {
|
|
96937
|
+
if (!request || request.readyState !== 4) {
|
|
96938
|
+
return;
|
|
96939
|
+
}
|
|
96940
|
+
|
|
96941
|
+
// The request errored out and we didn't get a response, this will be
|
|
96942
|
+
// handled by onerror instead
|
|
96943
|
+
// With one exception: request that using file: protocol, most browsers
|
|
96944
|
+
// will return status as 0 even though it's a successful request
|
|
96945
|
+
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
|
96946
|
+
return;
|
|
96947
|
+
}
|
|
96948
|
+
// readystate handler is calling before onerror or ontimeout handlers,
|
|
96949
|
+
// so we should call onloadend on the next 'tick'
|
|
96950
|
+
setTimeout(onloadend);
|
|
96951
|
+
};
|
|
96952
|
+
}
|
|
96953
|
+
|
|
96954
|
+
// Handle browser request cancellation (as opposed to a manual cancellation)
|
|
96955
|
+
request.onabort = function handleAbort() {
|
|
96956
|
+
if (!request) {
|
|
96957
|
+
return;
|
|
96958
|
+
}
|
|
96959
|
+
|
|
96960
|
+
reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request));
|
|
96961
|
+
|
|
96962
|
+
// Clean up request
|
|
96963
|
+
request = null;
|
|
96964
|
+
};
|
|
96965
|
+
|
|
96966
|
+
// Handle low level network errors
|
|
96967
|
+
request.onerror = function handleError() {
|
|
96968
|
+
// Real errors are hidden from us by the browser
|
|
96969
|
+
// onerror should only fire if it's a network error
|
|
96970
|
+
reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request));
|
|
96971
|
+
|
|
96972
|
+
// Clean up request
|
|
96973
|
+
request = null;
|
|
96974
|
+
};
|
|
96975
|
+
|
|
96976
|
+
// Handle timeout
|
|
96977
|
+
request.ontimeout = function handleTimeout() {
|
|
96978
|
+
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
96979
|
+
const transitional = config.transitional || defaults_transitional;
|
|
96980
|
+
if (config.timeoutErrorMessage) {
|
|
96981
|
+
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
96982
|
+
}
|
|
96983
|
+
reject(new core_AxiosError(
|
|
96984
|
+
timeoutErrorMessage,
|
|
96985
|
+
transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED,
|
|
96986
|
+
config,
|
|
96987
|
+
request));
|
|
96988
|
+
|
|
96989
|
+
// Clean up request
|
|
96990
|
+
request = null;
|
|
96991
|
+
};
|
|
96992
|
+
|
|
96993
|
+
// Add xsrf header
|
|
96994
|
+
// This is only done if running in a standard browser environment.
|
|
96995
|
+
// Specifically not if we're in a web worker, or react-native.
|
|
96996
|
+
if(platform.hasStandardBrowserEnv) {
|
|
96997
|
+
withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
96998
|
+
|
|
96999
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
97000
|
+
// Add xsrf header
|
|
97001
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
97002
|
+
|
|
97003
|
+
if (xsrfValue) {
|
|
97004
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
97005
|
+
}
|
|
97006
|
+
}
|
|
97007
|
+
}
|
|
97008
|
+
|
|
97009
|
+
// Remove Content-Type if data is undefined
|
|
97010
|
+
requestData === undefined && requestHeaders.setContentType(null);
|
|
97011
|
+
|
|
97012
|
+
// Add headers to the request
|
|
97013
|
+
if ('setRequestHeader' in request) {
|
|
97014
|
+
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
97015
|
+
request.setRequestHeader(key, val);
|
|
97016
|
+
});
|
|
97017
|
+
}
|
|
97018
|
+
|
|
97019
|
+
// Add withCredentials to request if needed
|
|
97020
|
+
if (!utils.isUndefined(config.withCredentials)) {
|
|
97021
|
+
request.withCredentials = !!config.withCredentials;
|
|
97022
|
+
}
|
|
97023
|
+
|
|
97024
|
+
// Add responseType to request if needed
|
|
97025
|
+
if (responseType && responseType !== 'json') {
|
|
97026
|
+
request.responseType = config.responseType;
|
|
97027
|
+
}
|
|
97028
|
+
|
|
97029
|
+
// Handle progress if needed
|
|
97030
|
+
if (typeof config.onDownloadProgress === 'function') {
|
|
97031
|
+
request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
|
|
97032
|
+
}
|
|
97033
|
+
|
|
97034
|
+
// Not all browsers support upload events
|
|
97035
|
+
if (typeof config.onUploadProgress === 'function' && request.upload) {
|
|
97036
|
+
request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
|
|
97037
|
+
}
|
|
97038
|
+
|
|
97039
|
+
if (config.cancelToken || config.signal) {
|
|
97040
|
+
// Handle cancellation
|
|
97041
|
+
// eslint-disable-next-line func-names
|
|
97042
|
+
onCanceled = cancel => {
|
|
97043
|
+
if (!request) {
|
|
97044
|
+
return;
|
|
97045
|
+
}
|
|
97046
|
+
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
|
|
97047
|
+
request.abort();
|
|
97048
|
+
request = null;
|
|
97049
|
+
};
|
|
97050
|
+
|
|
97051
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
97052
|
+
if (config.signal) {
|
|
97053
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
97054
|
+
}
|
|
97055
|
+
}
|
|
97056
|
+
|
|
97057
|
+
const protocol = parseProtocol(fullPath);
|
|
97058
|
+
|
|
97059
|
+
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
97060
|
+
reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config));
|
|
97061
|
+
return;
|
|
97062
|
+
}
|
|
97063
|
+
|
|
97064
|
+
|
|
97065
|
+
// Send the request
|
|
97066
|
+
request.send(requestData || null);
|
|
94457
97067
|
});
|
|
94458
|
-
};
|
|
94459
|
-
|
|
94460
|
-
|
|
94461
|
-
|
|
94462
|
-
|
|
97068
|
+
});
|
|
97069
|
+
|
|
97070
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/adapters.js
|
|
97071
|
+
|
|
97072
|
+
|
|
97073
|
+
|
|
97074
|
+
|
|
97075
|
+
|
|
97076
|
+
const knownAdapters = {
|
|
97077
|
+
http: helpers_null,
|
|
97078
|
+
xhr: xhr
|
|
97079
|
+
}
|
|
97080
|
+
|
|
97081
|
+
utils.forEach(knownAdapters, (fn, value) => {
|
|
97082
|
+
if (fn) {
|
|
97083
|
+
try {
|
|
97084
|
+
Object.defineProperty(fn, 'name', {value});
|
|
97085
|
+
} catch (e) {
|
|
97086
|
+
// eslint-disable-next-line no-empty
|
|
97087
|
+
}
|
|
97088
|
+
Object.defineProperty(fn, 'adapterName', {value});
|
|
97089
|
+
}
|
|
97090
|
+
});
|
|
97091
|
+
|
|
97092
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
97093
|
+
|
|
97094
|
+
const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
|
|
97095
|
+
|
|
97096
|
+
/* harmony default export */ var adapters = ({
|
|
97097
|
+
getAdapter: (adapters) => {
|
|
97098
|
+
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
97099
|
+
|
|
97100
|
+
const {length} = adapters;
|
|
97101
|
+
let nameOrAdapter;
|
|
97102
|
+
let adapter;
|
|
97103
|
+
|
|
97104
|
+
const rejectedReasons = {};
|
|
97105
|
+
|
|
97106
|
+
for (let i = 0; i < length; i++) {
|
|
97107
|
+
nameOrAdapter = adapters[i];
|
|
97108
|
+
let id;
|
|
97109
|
+
|
|
97110
|
+
adapter = nameOrAdapter;
|
|
97111
|
+
|
|
97112
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
97113
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
97114
|
+
|
|
97115
|
+
if (adapter === undefined) {
|
|
97116
|
+
throw new core_AxiosError(`Unknown adapter '${id}'`);
|
|
97117
|
+
}
|
|
97118
|
+
}
|
|
97119
|
+
|
|
97120
|
+
if (adapter) {
|
|
97121
|
+
break;
|
|
97122
|
+
}
|
|
97123
|
+
|
|
97124
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
97125
|
+
}
|
|
97126
|
+
|
|
97127
|
+
if (!adapter) {
|
|
97128
|
+
|
|
97129
|
+
const reasons = Object.entries(rejectedReasons)
|
|
97130
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
97131
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
97132
|
+
);
|
|
97133
|
+
|
|
97134
|
+
let s = length ?
|
|
97135
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
97136
|
+
'as no adapter specified';
|
|
97137
|
+
|
|
97138
|
+
throw new core_AxiosError(
|
|
97139
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
97140
|
+
'ERR_NOT_SUPPORT'
|
|
97141
|
+
);
|
|
97142
|
+
}
|
|
97143
|
+
|
|
97144
|
+
return adapter;
|
|
97145
|
+
},
|
|
97146
|
+
adapters: knownAdapters
|
|
97147
|
+
});
|
|
97148
|
+
|
|
97149
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js
|
|
97150
|
+
|
|
97151
|
+
|
|
97152
|
+
|
|
97153
|
+
|
|
97154
|
+
|
|
97155
|
+
|
|
97156
|
+
|
|
97157
|
+
|
|
97158
|
+
|
|
97159
|
+
/**
|
|
97160
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
97161
|
+
*
|
|
97162
|
+
* @param {Object} config The config that is to be used for the request
|
|
97163
|
+
*
|
|
97164
|
+
* @returns {void}
|
|
97165
|
+
*/
|
|
97166
|
+
function throwIfCancellationRequested(config) {
|
|
97167
|
+
if (config.cancelToken) {
|
|
97168
|
+
config.cancelToken.throwIfRequested();
|
|
97169
|
+
}
|
|
97170
|
+
|
|
97171
|
+
if (config.signal && config.signal.aborted) {
|
|
97172
|
+
throw new cancel_CanceledError(null, config);
|
|
97173
|
+
}
|
|
97174
|
+
}
|
|
97175
|
+
|
|
97176
|
+
/**
|
|
97177
|
+
* Dispatch a request to the server using the configured adapter.
|
|
97178
|
+
*
|
|
97179
|
+
* @param {object} config The config that is to be used for the request
|
|
97180
|
+
*
|
|
97181
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
97182
|
+
*/
|
|
97183
|
+
function dispatchRequest(config) {
|
|
97184
|
+
throwIfCancellationRequested(config);
|
|
97185
|
+
|
|
97186
|
+
config.headers = core_AxiosHeaders.from(config.headers);
|
|
97187
|
+
|
|
97188
|
+
// Transform request data
|
|
97189
|
+
config.data = transformData.call(
|
|
97190
|
+
config,
|
|
97191
|
+
config.transformRequest
|
|
97192
|
+
);
|
|
97193
|
+
|
|
97194
|
+
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
|
|
97195
|
+
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
97196
|
+
}
|
|
97197
|
+
|
|
97198
|
+
const adapter = adapters.getAdapter(config.adapter || lib_defaults.adapter);
|
|
97199
|
+
|
|
97200
|
+
return adapter(config).then(function onAdapterResolution(response) {
|
|
97201
|
+
throwIfCancellationRequested(config);
|
|
97202
|
+
|
|
97203
|
+
// Transform response data
|
|
97204
|
+
response.data = transformData.call(
|
|
97205
|
+
config,
|
|
97206
|
+
config.transformResponse,
|
|
97207
|
+
response
|
|
97208
|
+
);
|
|
97209
|
+
|
|
97210
|
+
response.headers = core_AxiosHeaders.from(response.headers);
|
|
97211
|
+
|
|
97212
|
+
return response;
|
|
97213
|
+
}, function onAdapterRejection(reason) {
|
|
97214
|
+
if (!isCancel(reason)) {
|
|
97215
|
+
throwIfCancellationRequested(config);
|
|
97216
|
+
|
|
97217
|
+
// Transform response data
|
|
97218
|
+
if (reason && reason.response) {
|
|
97219
|
+
reason.response.data = transformData.call(
|
|
97220
|
+
config,
|
|
97221
|
+
config.transformResponse,
|
|
97222
|
+
reason.response
|
|
97223
|
+
);
|
|
97224
|
+
reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
|
|
97225
|
+
}
|
|
97226
|
+
}
|
|
97227
|
+
|
|
97228
|
+
return Promise.reject(reason);
|
|
94463
97229
|
});
|
|
97230
|
+
}
|
|
97231
|
+
|
|
97232
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js
|
|
97233
|
+
|
|
97234
|
+
|
|
97235
|
+
|
|
97236
|
+
|
|
97237
|
+
|
|
97238
|
+
const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? { ...thing } : thing;
|
|
97239
|
+
|
|
97240
|
+
/**
|
|
97241
|
+
* Config-specific merge-function which creates a new config-object
|
|
97242
|
+
* by merging two configuration objects together.
|
|
97243
|
+
*
|
|
97244
|
+
* @param {Object} config1
|
|
97245
|
+
* @param {Object} config2
|
|
97246
|
+
*
|
|
97247
|
+
* @returns {Object} New object resulting from merging config2 to config1
|
|
97248
|
+
*/
|
|
97249
|
+
function mergeConfig(config1, config2) {
|
|
97250
|
+
// eslint-disable-next-line no-param-reassign
|
|
97251
|
+
config2 = config2 || {};
|
|
97252
|
+
const config = {};
|
|
97253
|
+
|
|
97254
|
+
function getMergedValue(target, source, caseless) {
|
|
97255
|
+
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
97256
|
+
return utils.merge.call({caseless}, target, source);
|
|
97257
|
+
} else if (utils.isPlainObject(source)) {
|
|
97258
|
+
return utils.merge({}, source);
|
|
97259
|
+
} else if (utils.isArray(source)) {
|
|
97260
|
+
return source.slice();
|
|
97261
|
+
}
|
|
97262
|
+
return source;
|
|
97263
|
+
}
|
|
97264
|
+
|
|
97265
|
+
// eslint-disable-next-line consistent-return
|
|
97266
|
+
function mergeDeepProperties(a, b, caseless) {
|
|
97267
|
+
if (!utils.isUndefined(b)) {
|
|
97268
|
+
return getMergedValue(a, b, caseless);
|
|
97269
|
+
} else if (!utils.isUndefined(a)) {
|
|
97270
|
+
return getMergedValue(undefined, a, caseless);
|
|
97271
|
+
}
|
|
97272
|
+
}
|
|
97273
|
+
|
|
97274
|
+
// eslint-disable-next-line consistent-return
|
|
97275
|
+
function valueFromConfig2(a, b) {
|
|
97276
|
+
if (!utils.isUndefined(b)) {
|
|
97277
|
+
return getMergedValue(undefined, b);
|
|
97278
|
+
}
|
|
97279
|
+
}
|
|
97280
|
+
|
|
97281
|
+
// eslint-disable-next-line consistent-return
|
|
97282
|
+
function defaultToConfig2(a, b) {
|
|
97283
|
+
if (!utils.isUndefined(b)) {
|
|
97284
|
+
return getMergedValue(undefined, b);
|
|
97285
|
+
} else if (!utils.isUndefined(a)) {
|
|
97286
|
+
return getMergedValue(undefined, a);
|
|
97287
|
+
}
|
|
97288
|
+
}
|
|
97289
|
+
|
|
97290
|
+
// eslint-disable-next-line consistent-return
|
|
97291
|
+
function mergeDirectKeys(a, b, prop) {
|
|
97292
|
+
if (prop in config2) {
|
|
97293
|
+
return getMergedValue(a, b);
|
|
97294
|
+
} else if (prop in config1) {
|
|
97295
|
+
return getMergedValue(undefined, a);
|
|
97296
|
+
}
|
|
97297
|
+
}
|
|
97298
|
+
|
|
97299
|
+
const mergeMap = {
|
|
97300
|
+
url: valueFromConfig2,
|
|
97301
|
+
method: valueFromConfig2,
|
|
97302
|
+
data: valueFromConfig2,
|
|
97303
|
+
baseURL: defaultToConfig2,
|
|
97304
|
+
transformRequest: defaultToConfig2,
|
|
97305
|
+
transformResponse: defaultToConfig2,
|
|
97306
|
+
paramsSerializer: defaultToConfig2,
|
|
97307
|
+
timeout: defaultToConfig2,
|
|
97308
|
+
timeoutMessage: defaultToConfig2,
|
|
97309
|
+
withCredentials: defaultToConfig2,
|
|
97310
|
+
withXSRFToken: defaultToConfig2,
|
|
97311
|
+
adapter: defaultToConfig2,
|
|
97312
|
+
responseType: defaultToConfig2,
|
|
97313
|
+
xsrfCookieName: defaultToConfig2,
|
|
97314
|
+
xsrfHeaderName: defaultToConfig2,
|
|
97315
|
+
onUploadProgress: defaultToConfig2,
|
|
97316
|
+
onDownloadProgress: defaultToConfig2,
|
|
97317
|
+
decompress: defaultToConfig2,
|
|
97318
|
+
maxContentLength: defaultToConfig2,
|
|
97319
|
+
maxBodyLength: defaultToConfig2,
|
|
97320
|
+
beforeRedirect: defaultToConfig2,
|
|
97321
|
+
transport: defaultToConfig2,
|
|
97322
|
+
httpAgent: defaultToConfig2,
|
|
97323
|
+
httpsAgent: defaultToConfig2,
|
|
97324
|
+
cancelToken: defaultToConfig2,
|
|
97325
|
+
socketPath: defaultToConfig2,
|
|
97326
|
+
responseEncoding: defaultToConfig2,
|
|
97327
|
+
validateStatus: mergeDirectKeys,
|
|
97328
|
+
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
97329
|
+
};
|
|
97330
|
+
|
|
97331
|
+
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
97332
|
+
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
97333
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
97334
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
97335
|
+
});
|
|
97336
|
+
|
|
97337
|
+
return config;
|
|
97338
|
+
}
|
|
97339
|
+
|
|
97340
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
|
|
97341
|
+
const VERSION = "1.6.8";
|
|
97342
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
|
|
97343
|
+
|
|
97344
|
+
|
|
97345
|
+
|
|
97346
|
+
|
|
97347
|
+
|
|
97348
|
+
const validators = {};
|
|
97349
|
+
|
|
97350
|
+
// eslint-disable-next-line func-names
|
|
97351
|
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
|
|
97352
|
+
validators[type] = function validator(thing) {
|
|
97353
|
+
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
97354
|
+
};
|
|
97355
|
+
});
|
|
97356
|
+
|
|
97357
|
+
const deprecatedWarnings = {};
|
|
97358
|
+
|
|
97359
|
+
/**
|
|
97360
|
+
* Transitional option validator
|
|
97361
|
+
*
|
|
97362
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
97363
|
+
* @param {string?} version - deprecated version / removed since version
|
|
97364
|
+
* @param {string?} message - some message with additional info
|
|
97365
|
+
*
|
|
97366
|
+
* @returns {function}
|
|
97367
|
+
*/
|
|
97368
|
+
validators.transitional = function transitional(validator, version, message) {
|
|
97369
|
+
function formatMessage(opt, desc) {
|
|
97370
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
97371
|
+
}
|
|
97372
|
+
|
|
97373
|
+
// eslint-disable-next-line func-names
|
|
97374
|
+
return (value, opt, opts) => {
|
|
97375
|
+
if (validator === false) {
|
|
97376
|
+
throw new core_AxiosError(
|
|
97377
|
+
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
97378
|
+
core_AxiosError.ERR_DEPRECATED
|
|
97379
|
+
);
|
|
97380
|
+
}
|
|
97381
|
+
|
|
97382
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
97383
|
+
deprecatedWarnings[opt] = true;
|
|
97384
|
+
// eslint-disable-next-line no-console
|
|
97385
|
+
console.warn(
|
|
97386
|
+
formatMessage(
|
|
97387
|
+
opt,
|
|
97388
|
+
' has been deprecated since v' + version + ' and will be removed in the near future'
|
|
97389
|
+
)
|
|
97390
|
+
);
|
|
97391
|
+
}
|
|
97392
|
+
|
|
97393
|
+
return validator ? validator(value, opt, opts) : true;
|
|
97394
|
+
};
|
|
97395
|
+
};
|
|
97396
|
+
|
|
97397
|
+
/**
|
|
97398
|
+
* Assert object's properties type
|
|
97399
|
+
*
|
|
97400
|
+
* @param {object} options
|
|
97401
|
+
* @param {object} schema
|
|
97402
|
+
* @param {boolean?} allowUnknown
|
|
97403
|
+
*
|
|
97404
|
+
* @returns {object}
|
|
97405
|
+
*/
|
|
97406
|
+
|
|
97407
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
97408
|
+
if (typeof options !== 'object') {
|
|
97409
|
+
throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE);
|
|
97410
|
+
}
|
|
97411
|
+
const keys = Object.keys(options);
|
|
97412
|
+
let i = keys.length;
|
|
97413
|
+
while (i-- > 0) {
|
|
97414
|
+
const opt = keys[i];
|
|
97415
|
+
const validator = schema[opt];
|
|
97416
|
+
if (validator) {
|
|
97417
|
+
const value = options[opt];
|
|
97418
|
+
const result = value === undefined || validator(value, opt, options);
|
|
97419
|
+
if (result !== true) {
|
|
97420
|
+
throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE);
|
|
97421
|
+
}
|
|
97422
|
+
continue;
|
|
97423
|
+
}
|
|
97424
|
+
if (allowUnknown !== true) {
|
|
97425
|
+
throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION);
|
|
97426
|
+
}
|
|
97427
|
+
}
|
|
97428
|
+
}
|
|
97429
|
+
|
|
97430
|
+
/* harmony default export */ var validator = ({
|
|
97431
|
+
assertOptions,
|
|
97432
|
+
validators
|
|
97433
|
+
});
|
|
97434
|
+
|
|
97435
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js
|
|
97436
|
+
|
|
97437
|
+
|
|
97438
|
+
|
|
97439
|
+
|
|
97440
|
+
|
|
97441
|
+
|
|
97442
|
+
|
|
97443
|
+
|
|
97444
|
+
|
|
97445
|
+
|
|
97446
|
+
|
|
97447
|
+
const Axios_validators = validator.validators;
|
|
97448
|
+
|
|
97449
|
+
/**
|
|
97450
|
+
* Create a new instance of Axios
|
|
97451
|
+
*
|
|
97452
|
+
* @param {Object} instanceConfig The default config for the instance
|
|
97453
|
+
*
|
|
97454
|
+
* @return {Axios} A new instance of Axios
|
|
97455
|
+
*/
|
|
97456
|
+
class Axios {
|
|
97457
|
+
constructor(instanceConfig) {
|
|
97458
|
+
this.defaults = instanceConfig;
|
|
97459
|
+
this.interceptors = {
|
|
97460
|
+
request: new core_InterceptorManager(),
|
|
97461
|
+
response: new core_InterceptorManager()
|
|
97462
|
+
};
|
|
97463
|
+
}
|
|
97464
|
+
|
|
97465
|
+
/**
|
|
97466
|
+
* Dispatch a request
|
|
97467
|
+
*
|
|
97468
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
97469
|
+
* @param {?Object} config
|
|
97470
|
+
*
|
|
97471
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
97472
|
+
*/
|
|
97473
|
+
async request(configOrUrl, config) {
|
|
97474
|
+
try {
|
|
97475
|
+
return await this._request(configOrUrl, config);
|
|
97476
|
+
} catch (err) {
|
|
97477
|
+
if (err instanceof Error) {
|
|
97478
|
+
let dummy;
|
|
97479
|
+
|
|
97480
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
|
97481
|
+
|
|
97482
|
+
// slice off the Error: ... line
|
|
97483
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
|
97484
|
+
|
|
97485
|
+
if (!err.stack) {
|
|
97486
|
+
err.stack = stack;
|
|
97487
|
+
// match without the 2 top stack lines
|
|
97488
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
|
97489
|
+
err.stack += '\n' + stack
|
|
97490
|
+
}
|
|
97491
|
+
}
|
|
97492
|
+
|
|
97493
|
+
throw err;
|
|
97494
|
+
}
|
|
97495
|
+
}
|
|
97496
|
+
|
|
97497
|
+
_request(configOrUrl, config) {
|
|
97498
|
+
/*eslint no-param-reassign:0*/
|
|
97499
|
+
// Allow for axios('example/url'[, config]) a la fetch API
|
|
97500
|
+
if (typeof configOrUrl === 'string') {
|
|
97501
|
+
config = config || {};
|
|
97502
|
+
config.url = configOrUrl;
|
|
97503
|
+
} else {
|
|
97504
|
+
config = configOrUrl || {};
|
|
97505
|
+
}
|
|
97506
|
+
|
|
97507
|
+
config = mergeConfig(this.defaults, config);
|
|
97508
|
+
|
|
97509
|
+
const {transitional, paramsSerializer, headers} = config;
|
|
97510
|
+
|
|
97511
|
+
if (transitional !== undefined) {
|
|
97512
|
+
validator.assertOptions(transitional, {
|
|
97513
|
+
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
97514
|
+
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
|
|
97515
|
+
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
|
|
97516
|
+
}, false);
|
|
97517
|
+
}
|
|
97518
|
+
|
|
97519
|
+
if (paramsSerializer != null) {
|
|
97520
|
+
if (utils.isFunction(paramsSerializer)) {
|
|
97521
|
+
config.paramsSerializer = {
|
|
97522
|
+
serialize: paramsSerializer
|
|
97523
|
+
}
|
|
97524
|
+
} else {
|
|
97525
|
+
validator.assertOptions(paramsSerializer, {
|
|
97526
|
+
encode: Axios_validators.function,
|
|
97527
|
+
serialize: Axios_validators.function
|
|
97528
|
+
}, true);
|
|
97529
|
+
}
|
|
97530
|
+
}
|
|
97531
|
+
|
|
97532
|
+
// Set config.method
|
|
97533
|
+
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
97534
|
+
|
|
97535
|
+
// Flatten headers
|
|
97536
|
+
let contextHeaders = headers && utils.merge(
|
|
97537
|
+
headers.common,
|
|
97538
|
+
headers[config.method]
|
|
97539
|
+
);
|
|
97540
|
+
|
|
97541
|
+
headers && utils.forEach(
|
|
97542
|
+
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
97543
|
+
(method) => {
|
|
97544
|
+
delete headers[method];
|
|
97545
|
+
}
|
|
97546
|
+
);
|
|
97547
|
+
|
|
97548
|
+
config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
|
|
97549
|
+
|
|
97550
|
+
// filter out skipped interceptors
|
|
97551
|
+
const requestInterceptorChain = [];
|
|
97552
|
+
let synchronousRequestInterceptors = true;
|
|
97553
|
+
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
97554
|
+
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
|
|
97555
|
+
return;
|
|
97556
|
+
}
|
|
97557
|
+
|
|
97558
|
+
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
97559
|
+
|
|
97560
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
97561
|
+
});
|
|
97562
|
+
|
|
97563
|
+
const responseInterceptorChain = [];
|
|
97564
|
+
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
97565
|
+
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
97566
|
+
});
|
|
97567
|
+
|
|
97568
|
+
let promise;
|
|
97569
|
+
let i = 0;
|
|
97570
|
+
let len;
|
|
97571
|
+
|
|
97572
|
+
if (!synchronousRequestInterceptors) {
|
|
97573
|
+
const chain = [dispatchRequest.bind(this), undefined];
|
|
97574
|
+
chain.unshift.apply(chain, requestInterceptorChain);
|
|
97575
|
+
chain.push.apply(chain, responseInterceptorChain);
|
|
97576
|
+
len = chain.length;
|
|
97577
|
+
|
|
97578
|
+
promise = Promise.resolve(config);
|
|
97579
|
+
|
|
97580
|
+
while (i < len) {
|
|
97581
|
+
promise = promise.then(chain[i++], chain[i++]);
|
|
97582
|
+
}
|
|
97583
|
+
|
|
97584
|
+
return promise;
|
|
97585
|
+
}
|
|
97586
|
+
|
|
97587
|
+
len = requestInterceptorChain.length;
|
|
97588
|
+
|
|
97589
|
+
let newConfig = config;
|
|
97590
|
+
|
|
97591
|
+
i = 0;
|
|
97592
|
+
|
|
97593
|
+
while (i < len) {
|
|
97594
|
+
const onFulfilled = requestInterceptorChain[i++];
|
|
97595
|
+
const onRejected = requestInterceptorChain[i++];
|
|
97596
|
+
try {
|
|
97597
|
+
newConfig = onFulfilled(newConfig);
|
|
97598
|
+
} catch (error) {
|
|
97599
|
+
onRejected.call(this, error);
|
|
97600
|
+
break;
|
|
97601
|
+
}
|
|
97602
|
+
}
|
|
97603
|
+
|
|
97604
|
+
try {
|
|
97605
|
+
promise = dispatchRequest.call(this, newConfig);
|
|
97606
|
+
} catch (error) {
|
|
97607
|
+
return Promise.reject(error);
|
|
97608
|
+
}
|
|
97609
|
+
|
|
97610
|
+
i = 0;
|
|
97611
|
+
len = responseInterceptorChain.length;
|
|
97612
|
+
|
|
97613
|
+
while (i < len) {
|
|
97614
|
+
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
97615
|
+
}
|
|
97616
|
+
|
|
97617
|
+
return promise;
|
|
97618
|
+
}
|
|
97619
|
+
|
|
97620
|
+
getUri(config) {
|
|
97621
|
+
config = mergeConfig(this.defaults, config);
|
|
97622
|
+
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
97623
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
97624
|
+
}
|
|
97625
|
+
}
|
|
97626
|
+
|
|
97627
|
+
// Provide aliases for supported request methods
|
|
97628
|
+
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
97629
|
+
/*eslint func-names:0*/
|
|
97630
|
+
Axios.prototype[method] = function(url, config) {
|
|
97631
|
+
return this.request(mergeConfig(config || {}, {
|
|
97632
|
+
method,
|
|
97633
|
+
url,
|
|
97634
|
+
data: (config || {}).data
|
|
97635
|
+
}));
|
|
97636
|
+
};
|
|
97637
|
+
});
|
|
97638
|
+
|
|
97639
|
+
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
97640
|
+
/*eslint func-names:0*/
|
|
97641
|
+
|
|
97642
|
+
function generateHTTPMethod(isForm) {
|
|
97643
|
+
return function httpMethod(url, data, config) {
|
|
97644
|
+
return this.request(mergeConfig(config || {}, {
|
|
97645
|
+
method,
|
|
97646
|
+
headers: isForm ? {
|
|
97647
|
+
'Content-Type': 'multipart/form-data'
|
|
97648
|
+
} : {},
|
|
97649
|
+
url,
|
|
97650
|
+
data
|
|
97651
|
+
}));
|
|
97652
|
+
};
|
|
97653
|
+
}
|
|
97654
|
+
|
|
97655
|
+
Axios.prototype[method] = generateHTTPMethod();
|
|
97656
|
+
|
|
97657
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
97658
|
+
});
|
|
97659
|
+
|
|
97660
|
+
/* harmony default export */ var core_Axios = (Axios);
|
|
97661
|
+
|
|
97662
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js
|
|
97663
|
+
|
|
97664
|
+
|
|
97665
|
+
|
|
97666
|
+
|
|
97667
|
+
/**
|
|
97668
|
+
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
97669
|
+
*
|
|
97670
|
+
* @param {Function} executor The executor function.
|
|
97671
|
+
*
|
|
97672
|
+
* @returns {CancelToken}
|
|
97673
|
+
*/
|
|
97674
|
+
class CancelToken {
|
|
97675
|
+
constructor(executor) {
|
|
97676
|
+
if (typeof executor !== 'function') {
|
|
97677
|
+
throw new TypeError('executor must be a function.');
|
|
97678
|
+
}
|
|
97679
|
+
|
|
97680
|
+
let resolvePromise;
|
|
97681
|
+
|
|
97682
|
+
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
97683
|
+
resolvePromise = resolve;
|
|
97684
|
+
});
|
|
97685
|
+
|
|
97686
|
+
const token = this;
|
|
97687
|
+
|
|
97688
|
+
// eslint-disable-next-line func-names
|
|
97689
|
+
this.promise.then(cancel => {
|
|
97690
|
+
if (!token._listeners) return;
|
|
97691
|
+
|
|
97692
|
+
let i = token._listeners.length;
|
|
97693
|
+
|
|
97694
|
+
while (i-- > 0) {
|
|
97695
|
+
token._listeners[i](cancel);
|
|
97696
|
+
}
|
|
97697
|
+
token._listeners = null;
|
|
97698
|
+
});
|
|
97699
|
+
|
|
97700
|
+
// eslint-disable-next-line func-names
|
|
97701
|
+
this.promise.then = onfulfilled => {
|
|
97702
|
+
let _resolve;
|
|
97703
|
+
// eslint-disable-next-line func-names
|
|
97704
|
+
const promise = new Promise(resolve => {
|
|
97705
|
+
token.subscribe(resolve);
|
|
97706
|
+
_resolve = resolve;
|
|
97707
|
+
}).then(onfulfilled);
|
|
97708
|
+
|
|
97709
|
+
promise.cancel = function reject() {
|
|
97710
|
+
token.unsubscribe(_resolve);
|
|
97711
|
+
};
|
|
97712
|
+
|
|
97713
|
+
return promise;
|
|
97714
|
+
};
|
|
97715
|
+
|
|
97716
|
+
executor(function cancel(message, config, request) {
|
|
97717
|
+
if (token.reason) {
|
|
97718
|
+
// Cancellation has already been requested
|
|
97719
|
+
return;
|
|
97720
|
+
}
|
|
97721
|
+
|
|
97722
|
+
token.reason = new cancel_CanceledError(message, config, request);
|
|
97723
|
+
resolvePromise(token.reason);
|
|
97724
|
+
});
|
|
97725
|
+
}
|
|
97726
|
+
|
|
97727
|
+
/**
|
|
97728
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
97729
|
+
*/
|
|
97730
|
+
throwIfRequested() {
|
|
97731
|
+
if (this.reason) {
|
|
97732
|
+
throw this.reason;
|
|
97733
|
+
}
|
|
97734
|
+
}
|
|
97735
|
+
|
|
97736
|
+
/**
|
|
97737
|
+
* Subscribe to the cancel signal
|
|
97738
|
+
*/
|
|
97739
|
+
|
|
97740
|
+
subscribe(listener) {
|
|
97741
|
+
if (this.reason) {
|
|
97742
|
+
listener(this.reason);
|
|
97743
|
+
return;
|
|
97744
|
+
}
|
|
97745
|
+
|
|
97746
|
+
if (this._listeners) {
|
|
97747
|
+
this._listeners.push(listener);
|
|
97748
|
+
} else {
|
|
97749
|
+
this._listeners = [listener];
|
|
97750
|
+
}
|
|
97751
|
+
}
|
|
97752
|
+
|
|
97753
|
+
/**
|
|
97754
|
+
* Unsubscribe from the cancel signal
|
|
97755
|
+
*/
|
|
97756
|
+
|
|
97757
|
+
unsubscribe(listener) {
|
|
97758
|
+
if (!this._listeners) {
|
|
97759
|
+
return;
|
|
97760
|
+
}
|
|
97761
|
+
const index = this._listeners.indexOf(listener);
|
|
97762
|
+
if (index !== -1) {
|
|
97763
|
+
this._listeners.splice(index, 1);
|
|
97764
|
+
}
|
|
97765
|
+
}
|
|
97766
|
+
|
|
97767
|
+
/**
|
|
97768
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
97769
|
+
* cancels the `CancelToken`.
|
|
97770
|
+
*/
|
|
97771
|
+
static source() {
|
|
97772
|
+
let cancel;
|
|
97773
|
+
const token = new CancelToken(function executor(c) {
|
|
97774
|
+
cancel = c;
|
|
97775
|
+
});
|
|
97776
|
+
return {
|
|
97777
|
+
token,
|
|
97778
|
+
cancel
|
|
97779
|
+
};
|
|
97780
|
+
}
|
|
97781
|
+
}
|
|
97782
|
+
|
|
97783
|
+
/* harmony default export */ var cancel_CancelToken = (CancelToken);
|
|
97784
|
+
|
|
97785
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js
|
|
97786
|
+
|
|
97787
|
+
|
|
97788
|
+
/**
|
|
97789
|
+
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
97790
|
+
*
|
|
97791
|
+
* Common use case would be to use `Function.prototype.apply`.
|
|
97792
|
+
*
|
|
97793
|
+
* ```js
|
|
97794
|
+
* function f(x, y, z) {}
|
|
97795
|
+
* var args = [1, 2, 3];
|
|
97796
|
+
* f.apply(null, args);
|
|
97797
|
+
* ```
|
|
97798
|
+
*
|
|
97799
|
+
* With `spread` this example can be re-written.
|
|
97800
|
+
*
|
|
97801
|
+
* ```js
|
|
97802
|
+
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
97803
|
+
* ```
|
|
97804
|
+
*
|
|
97805
|
+
* @param {Function} callback
|
|
97806
|
+
*
|
|
97807
|
+
* @returns {Function}
|
|
97808
|
+
*/
|
|
97809
|
+
function spread(callback) {
|
|
97810
|
+
return function wrap(arr) {
|
|
97811
|
+
return callback.apply(null, arr);
|
|
97812
|
+
};
|
|
97813
|
+
}
|
|
97814
|
+
|
|
97815
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js
|
|
97816
|
+
|
|
97817
|
+
|
|
97818
|
+
|
|
97819
|
+
|
|
97820
|
+
/**
|
|
97821
|
+
* Determines whether the payload is an error thrown by Axios
|
|
97822
|
+
*
|
|
97823
|
+
* @param {*} payload The value to test
|
|
97824
|
+
*
|
|
97825
|
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
97826
|
+
*/
|
|
97827
|
+
function isAxiosError(payload) {
|
|
97828
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
97829
|
+
}
|
|
97830
|
+
|
|
97831
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
97832
|
+
const HttpStatusCode = {
|
|
97833
|
+
Continue: 100,
|
|
97834
|
+
SwitchingProtocols: 101,
|
|
97835
|
+
Processing: 102,
|
|
97836
|
+
EarlyHints: 103,
|
|
97837
|
+
Ok: 200,
|
|
97838
|
+
Created: 201,
|
|
97839
|
+
Accepted: 202,
|
|
97840
|
+
NonAuthoritativeInformation: 203,
|
|
97841
|
+
NoContent: 204,
|
|
97842
|
+
ResetContent: 205,
|
|
97843
|
+
PartialContent: 206,
|
|
97844
|
+
MultiStatus: 207,
|
|
97845
|
+
AlreadyReported: 208,
|
|
97846
|
+
ImUsed: 226,
|
|
97847
|
+
MultipleChoices: 300,
|
|
97848
|
+
MovedPermanently: 301,
|
|
97849
|
+
Found: 302,
|
|
97850
|
+
SeeOther: 303,
|
|
97851
|
+
NotModified: 304,
|
|
97852
|
+
UseProxy: 305,
|
|
97853
|
+
Unused: 306,
|
|
97854
|
+
TemporaryRedirect: 307,
|
|
97855
|
+
PermanentRedirect: 308,
|
|
97856
|
+
BadRequest: 400,
|
|
97857
|
+
Unauthorized: 401,
|
|
97858
|
+
PaymentRequired: 402,
|
|
97859
|
+
Forbidden: 403,
|
|
97860
|
+
NotFound: 404,
|
|
97861
|
+
MethodNotAllowed: 405,
|
|
97862
|
+
NotAcceptable: 406,
|
|
97863
|
+
ProxyAuthenticationRequired: 407,
|
|
97864
|
+
RequestTimeout: 408,
|
|
97865
|
+
Conflict: 409,
|
|
97866
|
+
Gone: 410,
|
|
97867
|
+
LengthRequired: 411,
|
|
97868
|
+
PreconditionFailed: 412,
|
|
97869
|
+
PayloadTooLarge: 413,
|
|
97870
|
+
UriTooLong: 414,
|
|
97871
|
+
UnsupportedMediaType: 415,
|
|
97872
|
+
RangeNotSatisfiable: 416,
|
|
97873
|
+
ExpectationFailed: 417,
|
|
97874
|
+
ImATeapot: 418,
|
|
97875
|
+
MisdirectedRequest: 421,
|
|
97876
|
+
UnprocessableEntity: 422,
|
|
97877
|
+
Locked: 423,
|
|
97878
|
+
FailedDependency: 424,
|
|
97879
|
+
TooEarly: 425,
|
|
97880
|
+
UpgradeRequired: 426,
|
|
97881
|
+
PreconditionRequired: 428,
|
|
97882
|
+
TooManyRequests: 429,
|
|
97883
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
97884
|
+
UnavailableForLegalReasons: 451,
|
|
97885
|
+
InternalServerError: 500,
|
|
97886
|
+
NotImplemented: 501,
|
|
97887
|
+
BadGateway: 502,
|
|
97888
|
+
ServiceUnavailable: 503,
|
|
97889
|
+
GatewayTimeout: 504,
|
|
97890
|
+
HttpVersionNotSupported: 505,
|
|
97891
|
+
VariantAlsoNegotiates: 506,
|
|
97892
|
+
InsufficientStorage: 507,
|
|
97893
|
+
LoopDetected: 508,
|
|
97894
|
+
NotExtended: 510,
|
|
97895
|
+
NetworkAuthenticationRequired: 511,
|
|
97896
|
+
};
|
|
97897
|
+
|
|
97898
|
+
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
97899
|
+
HttpStatusCode[value] = key;
|
|
97900
|
+
});
|
|
97901
|
+
|
|
97902
|
+
/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
|
|
97903
|
+
|
|
97904
|
+
;// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js
|
|
97905
|
+
|
|
97906
|
+
|
|
97907
|
+
|
|
97908
|
+
|
|
97909
|
+
|
|
97910
|
+
|
|
97911
|
+
|
|
97912
|
+
|
|
97913
|
+
|
|
97914
|
+
|
|
97915
|
+
|
|
97916
|
+
|
|
97917
|
+
|
|
97918
|
+
|
|
97919
|
+
|
|
97920
|
+
|
|
97921
|
+
|
|
97922
|
+
|
|
97923
|
+
|
|
97924
|
+
|
|
97925
|
+
/**
|
|
97926
|
+
* Create an instance of Axios
|
|
97927
|
+
*
|
|
97928
|
+
* @param {Object} defaultConfig The default config for the instance
|
|
97929
|
+
*
|
|
97930
|
+
* @returns {Axios} A new instance of Axios
|
|
97931
|
+
*/
|
|
97932
|
+
function createInstance(defaultConfig) {
|
|
97933
|
+
const context = new core_Axios(defaultConfig);
|
|
97934
|
+
const instance = bind(core_Axios.prototype.request, context);
|
|
97935
|
+
|
|
97936
|
+
// Copy axios.prototype to instance
|
|
97937
|
+
utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
|
|
97938
|
+
|
|
97939
|
+
// Copy context to instance
|
|
97940
|
+
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
97941
|
+
|
|
97942
|
+
// Factory for creating new instances
|
|
97943
|
+
instance.create = function create(instanceConfig) {
|
|
97944
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
97945
|
+
};
|
|
97946
|
+
|
|
97947
|
+
return instance;
|
|
97948
|
+
}
|
|
97949
|
+
|
|
97950
|
+
// Create the default instance to be exported
|
|
97951
|
+
const axios = createInstance(lib_defaults);
|
|
97952
|
+
|
|
97953
|
+
// Expose Axios class to allow class inheritance
|
|
97954
|
+
axios.Axios = core_Axios;
|
|
97955
|
+
|
|
97956
|
+
// Expose Cancel & CancelToken
|
|
97957
|
+
axios.CanceledError = cancel_CanceledError;
|
|
97958
|
+
axios.CancelToken = cancel_CancelToken;
|
|
97959
|
+
axios.isCancel = isCancel;
|
|
97960
|
+
axios.VERSION = VERSION;
|
|
97961
|
+
axios.toFormData = helpers_toFormData;
|
|
97962
|
+
|
|
97963
|
+
// Expose AxiosError class
|
|
97964
|
+
axios.AxiosError = core_AxiosError;
|
|
97965
|
+
|
|
97966
|
+
// alias for CanceledError for backward compatibility
|
|
97967
|
+
axios.Cancel = axios.CanceledError;
|
|
97968
|
+
|
|
97969
|
+
// Expose all/spread
|
|
97970
|
+
axios.all = function all(promises) {
|
|
97971
|
+
return Promise.all(promises);
|
|
94464
97972
|
};
|
|
94465
97973
|
|
|
97974
|
+
axios.spread = spread;
|
|
97975
|
+
|
|
97976
|
+
// Expose isAxiosError
|
|
97977
|
+
axios.isAxiosError = isAxiosError;
|
|
97978
|
+
|
|
97979
|
+
// Expose mergeConfig
|
|
97980
|
+
axios.mergeConfig = mergeConfig;
|
|
97981
|
+
|
|
97982
|
+
axios.AxiosHeaders = core_AxiosHeaders;
|
|
97983
|
+
|
|
97984
|
+
axios.formToJSON = thing => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
97985
|
+
|
|
97986
|
+
axios.getAdapter = adapters.getAdapter;
|
|
97987
|
+
|
|
97988
|
+
axios.HttpStatusCode = helpers_HttpStatusCode;
|
|
97989
|
+
|
|
97990
|
+
axios.default = axios;
|
|
97991
|
+
|
|
97992
|
+
// this module should only have a default export
|
|
97993
|
+
/* harmony default export */ var lib_axios = (axios);
|
|
97994
|
+
|
|
97995
|
+
// EXTERNAL MODULE: ./node_modules/element-ui/lib/element-ui.common.js
|
|
97996
|
+
var element_ui_common = __webpack_require__(8671);
|
|
97997
|
+
// EXTERNAL MODULE: ./packages/common/modules/cookie.js + 1 modules
|
|
97998
|
+
var cookie = __webpack_require__(41591);
|
|
97999
|
+
;// CONCATENATED MODULE: ./packages/common/modules/request.js
|
|
98000
|
+
|
|
98001
|
+
|
|
98002
|
+
|
|
98003
|
+
class Request {
|
|
98004
|
+
constructor(config = {}) {
|
|
98005
|
+
const {
|
|
98006
|
+
options = {},
|
|
98007
|
+
handler = {}
|
|
98008
|
+
} = config;
|
|
98009
|
+
this.request = null;
|
|
98010
|
+
this._errorCode = {
|
|
98011
|
+
'000': '操作太频繁,请勿重复请求',
|
|
98012
|
+
'401': '当前操作没有权限',
|
|
98013
|
+
'403': '当前操作没有权限',
|
|
98014
|
+
'404': '接口不存在',
|
|
98015
|
+
'417': '未绑定登录账号,请使用密码登录后绑定',
|
|
98016
|
+
'423': '演示环境不能操作,如需了解联系我们',
|
|
98017
|
+
'426': '用户名不存在或密码错误',
|
|
98018
|
+
'428': '验证码错误,请重新输入',
|
|
98019
|
+
'429': '请求过频繁',
|
|
98020
|
+
'479': '演示环境,没有权限操作',
|
|
98021
|
+
'default': '系统未知错误,请反馈给管理员'
|
|
98022
|
+
};
|
|
98023
|
+
this._methods = ['get', 'post', 'delete', 'put'];
|
|
98024
|
+
this.handler = Object.assign({}, handler);
|
|
98025
|
+
this.options = Object.assign({}, {
|
|
98026
|
+
baseURL: '/bytserver',
|
|
98027
|
+
responseType: 'json',
|
|
98028
|
+
timeout: 60000,
|
|
98029
|
+
withCredentials: false
|
|
98030
|
+
}, options);
|
|
98031
|
+
// 注册fetch;
|
|
98032
|
+
this.register();
|
|
98033
|
+
}
|
|
98034
|
+
interceptors() {
|
|
98035
|
+
// HTTPrequest拦截
|
|
98036
|
+
this.request.interceptors.request.use(config => {
|
|
98037
|
+
const TENANT_ID = (0,cookie.getCookie)('tenantId');
|
|
98038
|
+
const isToken = (config.headers || {}).isToken === false;
|
|
98039
|
+
const token = (0,cookie.getCookie)('access_token');
|
|
98040
|
+
if (token && !isToken) {
|
|
98041
|
+
config.headers['Authorization'] = `Bearer ${token}`; // token
|
|
98042
|
+
}
|
|
98043
|
+
if (TENANT_ID) {
|
|
98044
|
+
config.headers['TENANT-ID'] = TENANT_ID; // 租户ID
|
|
98045
|
+
}
|
|
98046
|
+
return config;
|
|
98047
|
+
}, error => {
|
|
98048
|
+
return Promise.reject(error);
|
|
98049
|
+
});
|
|
98050
|
+
|
|
98051
|
+
// HTTPresponse拦截
|
|
98052
|
+
this.request.interceptors.response.use(res => {
|
|
98053
|
+
const status = Number(res.status) || 200;
|
|
98054
|
+
const message = res.data.msg || this._errorCode[status] || this._errorCode['default'];
|
|
98055
|
+
switch (status * 1) {
|
|
98056
|
+
case 200:
|
|
98057
|
+
if (res.data.code === 1) {
|
|
98058
|
+
element_ui_common.Message.error(message);
|
|
98059
|
+
this.handler.error && this.handler.error(res.data);
|
|
98060
|
+
return Promise.reject(res.data);
|
|
98061
|
+
}
|
|
98062
|
+
this.handler.success && this.handler.success(res.data);
|
|
98063
|
+
return res.data;
|
|
98064
|
+
case 424:
|
|
98065
|
+
case 428:
|
|
98066
|
+
// 后台定义 424||428 针对令牌过期的特殊响应码
|
|
98067
|
+
this.handler.expire && this.handler.expire(res.data);
|
|
98068
|
+
break;
|
|
98069
|
+
default:
|
|
98070
|
+
element_ui_common.Message.error(message);
|
|
98071
|
+
this.handler.error && this.handler.error(res.data);
|
|
98072
|
+
return Promise.reject(message);
|
|
98073
|
+
}
|
|
98074
|
+
}, error => {
|
|
98075
|
+
if (error.response) {
|
|
98076
|
+
const status = error.response.status;
|
|
98077
|
+
switch (status) {
|
|
98078
|
+
case 404:
|
|
98079
|
+
element_ui_common.Message.error(this._errorCode[status]);
|
|
98080
|
+
break;
|
|
98081
|
+
case 503:
|
|
98082
|
+
element_ui_common.Message.error(error.response.data.msg);
|
|
98083
|
+
break;
|
|
98084
|
+
}
|
|
98085
|
+
this.error && this.error(error.response);
|
|
98086
|
+
}
|
|
98087
|
+
return Promise.reject(new Error(error));
|
|
98088
|
+
});
|
|
98089
|
+
}
|
|
98090
|
+
setMethods() {
|
|
98091
|
+
this._methods.forEach(v => {
|
|
98092
|
+
this.request[v] = ({
|
|
98093
|
+
url,
|
|
98094
|
+
data = {},
|
|
98095
|
+
params = {},
|
|
98096
|
+
responseType = 'json',
|
|
98097
|
+
headers = {},
|
|
98098
|
+
retry = 0
|
|
98099
|
+
}) => {
|
|
98100
|
+
return new Promise((resolve, reject) => {
|
|
98101
|
+
this.request({
|
|
98102
|
+
url,
|
|
98103
|
+
method: v.toUpperCase(),
|
|
98104
|
+
data,
|
|
98105
|
+
params,
|
|
98106
|
+
responseType,
|
|
98107
|
+
headers
|
|
98108
|
+
}).then(res => {
|
|
98109
|
+
if (!res.code || res.code === 0 || responseType == 'arraybuffer' || responseType == 'blob') {
|
|
98110
|
+
resolve(res);
|
|
98111
|
+
} else {
|
|
98112
|
+
element_ui_common.Message.error(res.msg);
|
|
98113
|
+
reject(res);
|
|
98114
|
+
}
|
|
98115
|
+
}).catch(err => {
|
|
98116
|
+
// 重试请求
|
|
98117
|
+
reject(err);
|
|
98118
|
+
if (retry > 0) {
|
|
98119
|
+
this.request[v]({
|
|
98120
|
+
url,
|
|
98121
|
+
data,
|
|
98122
|
+
params,
|
|
98123
|
+
responseType,
|
|
98124
|
+
headers,
|
|
98125
|
+
retry: retry - 1
|
|
98126
|
+
});
|
|
98127
|
+
}
|
|
98128
|
+
});
|
|
98129
|
+
});
|
|
98130
|
+
};
|
|
98131
|
+
});
|
|
98132
|
+
}
|
|
98133
|
+
register() {
|
|
98134
|
+
this.request = lib_axios.create(this.options);
|
|
98135
|
+
|
|
98136
|
+
// 添加拦截器
|
|
98137
|
+
this.interceptors();
|
|
98138
|
+
|
|
98139
|
+
// 覆盖自定义方法
|
|
98140
|
+
this.setMethods();
|
|
98141
|
+
}
|
|
98142
|
+
}
|
|
98143
|
+
const {
|
|
98144
|
+
request
|
|
98145
|
+
} = new Request();
|
|
98146
|
+
/* harmony default export */ var modules_request = ({
|
|
98147
|
+
install(Vue, options = {}) {
|
|
98148
|
+
const {
|
|
98149
|
+
request
|
|
98150
|
+
} = new Request(Object.assign({}, options));
|
|
98151
|
+
Vue.prototype.$http = request;
|
|
98152
|
+
}
|
|
98153
|
+
});
|
|
98154
|
+
|
|
94466
98155
|
/***/ }),
|
|
94467
98156
|
|
|
94468
98157
|
/***/ 66080:
|
|
@@ -97660,7 +101349,7 @@ function generatePropagationContext() {
|
|
|
97660
101349
|
//# sourceMappingURL=scope.js.map
|
|
97661
101350
|
|
|
97662
101351
|
;// CONCATENATED MODULE: ./node_modules/@sentry/core/esm/version.js
|
|
97663
|
-
const SDK_VERSION = '7.
|
|
101352
|
+
const SDK_VERSION = '7.111.0';
|
|
97664
101353
|
|
|
97665
101354
|
|
|
97666
101355
|
//# sourceMappingURL=version.js.map
|
|
@@ -102544,7 +106233,9 @@ const common_debug_build_DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined'
|
|
|
102544
106233
|
;// CONCATENATED MODULE: ./node_modules/@sentry-internal/tracing/esm/browser/types.js
|
|
102545
106234
|
|
|
102546
106235
|
|
|
102547
|
-
const types_WINDOW = GLOBAL_OBJ
|
|
106236
|
+
const types_WINDOW = GLOBAL_OBJ
|
|
106237
|
+
|
|
106238
|
+
;
|
|
102548
106239
|
|
|
102549
106240
|
|
|
102550
106241
|
//# sourceMappingURL=types.js.map
|
|
@@ -102560,7 +106251,7 @@ const types_WINDOW = GLOBAL_OBJ ;
|
|
|
102560
106251
|
* document is hidden.
|
|
102561
106252
|
*/
|
|
102562
106253
|
function registerBackgroundTabDetection() {
|
|
102563
|
-
if (types_WINDOW
|
|
106254
|
+
if (types_WINDOW.document) {
|
|
102564
106255
|
types_WINDOW.document.addEventListener('visibilitychange', () => {
|
|
102565
106256
|
// eslint-disable-next-line deprecation/deprecation
|
|
102566
106257
|
const activeTransaction = getActiveTransaction() ;
|
|
@@ -102758,7 +106449,7 @@ const initMetric = (name, value) => {
|
|
|
102758
106449
|
let navigationType = 'navigate';
|
|
102759
106450
|
|
|
102760
106451
|
if (navEntry) {
|
|
102761
|
-
if (types_WINDOW.document.prerendering || getActivationStart() > 0) {
|
|
106452
|
+
if ((types_WINDOW.document && types_WINDOW.document.prerendering) || getActivationStart() > 0) {
|
|
102762
106453
|
navigationType = 'prerender';
|
|
102763
106454
|
} else {
|
|
102764
106455
|
navigationType = navEntry.type.replace(/_/g, '-') ;
|
|
@@ -102847,10 +106538,13 @@ const onHidden = (cb, once) => {
|
|
|
102847
106538
|
}
|
|
102848
106539
|
}
|
|
102849
106540
|
};
|
|
102850
|
-
|
|
102851
|
-
|
|
102852
|
-
|
|
102853
|
-
|
|
106541
|
+
|
|
106542
|
+
if (types_WINDOW.document) {
|
|
106543
|
+
addEventListener('visibilitychange', onHiddenOrPageHide, true);
|
|
106544
|
+
// Some browsers have buggy implementations of visibilitychange,
|
|
106545
|
+
// so we use pagehide in addition, just to be safe.
|
|
106546
|
+
addEventListener('pagehide', onHiddenOrPageHide, true);
|
|
106547
|
+
}
|
|
102854
106548
|
};
|
|
102855
106549
|
|
|
102856
106550
|
|
|
@@ -102988,7 +106682,9 @@ let firstHiddenTime = -1;
|
|
|
102988
106682
|
const initHiddenTime = () => {
|
|
102989
106683
|
// If the document is hidden and not prerendering, assume it was always
|
|
102990
106684
|
// hidden and the page was loaded in the background.
|
|
102991
|
-
|
|
106685
|
+
if (types_WINDOW.document && types_WINDOW.document.visibilityState) {
|
|
106686
|
+
firstHiddenTime = types_WINDOW.document.visibilityState === 'hidden' && !types_WINDOW.document.prerendering ? 0 : Infinity;
|
|
106687
|
+
}
|
|
102992
106688
|
};
|
|
102993
106689
|
|
|
102994
106690
|
const trackChanges = () => {
|
|
@@ -103006,7 +106702,7 @@ const getVisibilityWatcher = (
|
|
|
103006
106702
|
// since navigation start. This isn't a perfect heuristic, but it's the
|
|
103007
106703
|
// best we can do until an API is available to support querying past
|
|
103008
106704
|
// visibilityState.
|
|
103009
|
-
|
|
106705
|
+
initHiddenTime();
|
|
103010
106706
|
trackChanges();
|
|
103011
106707
|
}
|
|
103012
106708
|
return {
|
|
@@ -103348,6 +107044,7 @@ const onINP = (onReport, opts) => {
|
|
|
103348
107044
|
|
|
103349
107045
|
|
|
103350
107046
|
|
|
107047
|
+
|
|
103351
107048
|
/*
|
|
103352
107049
|
* Copyright 2020 Google LLC
|
|
103353
107050
|
*
|
|
@@ -103413,7 +107110,9 @@ const onLCP = (onReport) => {
|
|
|
103413
107110
|
// stop LCP observation, it's unreliable since it can be programmatically
|
|
103414
107111
|
// generated. See: https://github.com/GoogleChrome/web-vitals/issues/75
|
|
103415
107112
|
['keydown', 'click'].forEach(type => {
|
|
103416
|
-
|
|
107113
|
+
if (types_WINDOW.document) {
|
|
107114
|
+
addEventListener(type, stopListening, { once: true, capture: true });
|
|
107115
|
+
}
|
|
103417
107116
|
});
|
|
103418
107117
|
|
|
103419
107118
|
onHidden(stopListening, true);
|
|
@@ -105460,23 +109159,7 @@ function instrumentFetchRequest(
|
|
|
105460
109159
|
|
|
105461
109160
|
const span = spans[spanId];
|
|
105462
109161
|
if (span) {
|
|
105463
|
-
|
|
105464
|
-
setHttpStatus(span, handlerData.response.status);
|
|
105465
|
-
|
|
105466
|
-
const contentLength =
|
|
105467
|
-
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');
|
|
105468
|
-
|
|
105469
|
-
if (contentLength) {
|
|
105470
|
-
const contentLengthNum = parseInt(contentLength);
|
|
105471
|
-
if (contentLengthNum > 0) {
|
|
105472
|
-
span.setAttribute('http.response_content_length', contentLengthNum);
|
|
105473
|
-
}
|
|
105474
|
-
}
|
|
105475
|
-
} else if (handlerData.error) {
|
|
105476
|
-
span.setStatus('internal_error');
|
|
105477
|
-
}
|
|
105478
|
-
span.end();
|
|
105479
|
-
|
|
109162
|
+
endSpan(span, handlerData);
|
|
105480
109163
|
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
105481
109164
|
delete spans[spanId];
|
|
105482
109165
|
}
|
|
@@ -105488,6 +109171,9 @@ function instrumentFetchRequest(
|
|
|
105488
109171
|
|
|
105489
109172
|
const { method, url } = handlerData.fetchData;
|
|
105490
109173
|
|
|
109174
|
+
const fullUrl = getFullURL(url);
|
|
109175
|
+
const host = fullUrl ? parseUrl(fullUrl).host : undefined;
|
|
109176
|
+
|
|
105491
109177
|
const span = shouldCreateSpanResult
|
|
105492
109178
|
? startInactiveSpan({
|
|
105493
109179
|
name: `${method} ${url}`,
|
|
@@ -105496,6 +109182,8 @@ function instrumentFetchRequest(
|
|
|
105496
109182
|
url,
|
|
105497
109183
|
type: 'fetch',
|
|
105498
109184
|
'http.method': method,
|
|
109185
|
+
'http.url': fullUrl,
|
|
109186
|
+
'server.address': host,
|
|
105499
109187
|
[semanticAttributes_SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,
|
|
105500
109188
|
},
|
|
105501
109189
|
op: 'http.client',
|
|
@@ -105602,6 +109290,34 @@ function addTracingHeadersToFetchRequest(
|
|
|
105602
109290
|
}
|
|
105603
109291
|
}
|
|
105604
109292
|
|
|
109293
|
+
function getFullURL(url) {
|
|
109294
|
+
try {
|
|
109295
|
+
const parsed = new URL(url);
|
|
109296
|
+
return parsed.href;
|
|
109297
|
+
} catch (e) {
|
|
109298
|
+
return undefined;
|
|
109299
|
+
}
|
|
109300
|
+
}
|
|
109301
|
+
|
|
109302
|
+
function endSpan(span, handlerData) {
|
|
109303
|
+
if (handlerData.response) {
|
|
109304
|
+
setHttpStatus(span, handlerData.response.status);
|
|
109305
|
+
|
|
109306
|
+
const contentLength =
|
|
109307
|
+
handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');
|
|
109308
|
+
|
|
109309
|
+
if (contentLength) {
|
|
109310
|
+
const contentLengthNum = parseInt(contentLength);
|
|
109311
|
+
if (contentLengthNum > 0) {
|
|
109312
|
+
span.setAttribute('http.response_content_length', contentLengthNum);
|
|
109313
|
+
}
|
|
109314
|
+
}
|
|
109315
|
+
} else if (handlerData.error) {
|
|
109316
|
+
span.setStatus('internal_error');
|
|
109317
|
+
}
|
|
109318
|
+
span.end();
|
|
109319
|
+
}
|
|
109320
|
+
|
|
105605
109321
|
|
|
105606
109322
|
//# sourceMappingURL=fetch.js.map
|
|
105607
109323
|
|
|
@@ -105611,6 +109327,7 @@ function addTracingHeadersToFetchRequest(
|
|
|
105611
109327
|
|
|
105612
109328
|
|
|
105613
109329
|
|
|
109330
|
+
|
|
105614
109331
|
/* eslint-disable max-lines */
|
|
105615
109332
|
|
|
105616
109333
|
const DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\/(?!\/)/];
|
|
@@ -105657,6 +109374,18 @@ function instrumentOutgoingRequests(_options) {
|
|
|
105657
109374
|
if (traceFetch) {
|
|
105658
109375
|
addFetchInstrumentationHandler(handlerData => {
|
|
105659
109376
|
const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);
|
|
109377
|
+
// We cannot use `window.location` in the generic fetch instrumentation,
|
|
109378
|
+
// but we need it for reliable `server.address` attribute.
|
|
109379
|
+
// so we extend this in here
|
|
109380
|
+
if (createdSpan) {
|
|
109381
|
+
const fullUrl = request_getFullURL(handlerData.fetchData.url);
|
|
109382
|
+
const host = fullUrl ? parseUrl(fullUrl).host : undefined;
|
|
109383
|
+
createdSpan.setAttributes({
|
|
109384
|
+
'http.url': fullUrl,
|
|
109385
|
+
'server.address': host,
|
|
109386
|
+
});
|
|
109387
|
+
}
|
|
109388
|
+
|
|
105660
109389
|
if (enableHTTPTimings && createdSpan) {
|
|
105661
109390
|
addHTTPTimings(createdSpan);
|
|
105662
109391
|
}
|
|
@@ -105817,6 +109546,9 @@ function xhrCallback(
|
|
|
105817
109546
|
const scope = exports_getCurrentScope();
|
|
105818
109547
|
const isolationScope = hub_getIsolationScope();
|
|
105819
109548
|
|
|
109549
|
+
const fullUrl = request_getFullURL(sentryXhrData.url);
|
|
109550
|
+
const host = fullUrl ? parseUrl(fullUrl).host : undefined;
|
|
109551
|
+
|
|
105820
109552
|
const span = shouldCreateSpanResult
|
|
105821
109553
|
? startInactiveSpan({
|
|
105822
109554
|
name: `${sentryXhrData.method} ${sentryXhrData.url}`,
|
|
@@ -105824,7 +109556,9 @@ function xhrCallback(
|
|
|
105824
109556
|
attributes: {
|
|
105825
109557
|
type: 'xhr',
|
|
105826
109558
|
'http.method': sentryXhrData.method,
|
|
109559
|
+
'http.url': fullUrl,
|
|
105827
109560
|
url: sentryXhrData.url,
|
|
109561
|
+
'server.address': host,
|
|
105828
109562
|
[semanticAttributes_SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',
|
|
105829
109563
|
},
|
|
105830
109564
|
op: 'http.client',
|
|
@@ -105877,6 +109611,17 @@ function setHeaderOnXhr(
|
|
|
105877
109611
|
}
|
|
105878
109612
|
}
|
|
105879
109613
|
|
|
109614
|
+
function request_getFullURL(url) {
|
|
109615
|
+
try {
|
|
109616
|
+
// By adding a base URL to new URL(), this will also work for relative urls
|
|
109617
|
+
// If `url` is a full URL, the base URL is ignored anyhow
|
|
109618
|
+
const parsed = new URL(url, types_WINDOW.location.origin);
|
|
109619
|
+
return parsed.href;
|
|
109620
|
+
} catch (e) {
|
|
109621
|
+
return undefined;
|
|
109622
|
+
}
|
|
109623
|
+
}
|
|
109624
|
+
|
|
105880
109625
|
|
|
105881
109626
|
//# sourceMappingURL=request.js.map
|
|
105882
109627
|
|
|
@@ -106274,7 +110019,9 @@ function registerInteractionListener(
|
|
|
106274
110019
|
};
|
|
106275
110020
|
|
|
106276
110021
|
['click'].forEach(type => {
|
|
106277
|
-
|
|
110022
|
+
if (types_WINDOW.document) {
|
|
110023
|
+
addEventListener(type, registerInteractionTransaction, { once: false, capture: true });
|
|
110024
|
+
}
|
|
106278
110025
|
});
|
|
106279
110026
|
}
|
|
106280
110027
|
|
|
@@ -158243,7 +161990,7 @@ var staticWindow = __webpack_require__(90662)
|
|
|
158243
161990
|
* @return {Boolean}
|
|
158244
161991
|
*/
|
|
158245
161992
|
function isWindow (obj) {
|
|
158246
|
-
return staticWindow && !!(obj && obj === obj.window)
|
|
161993
|
+
return !!(staticWindow && !!(obj && obj === obj.window))
|
|
158247
161994
|
}
|
|
158248
161995
|
|
|
158249
161996
|
module.exports = isWindow
|
|
@@ -161091,6 +164838,7 @@ module.exports = zipObject
|
|
|
161091
164838
|
|
|
161092
164839
|
var map = {
|
|
161093
164840
|
"./cookie.js": 41591,
|
|
164841
|
+
"./request.js": 68873,
|
|
161094
164842
|
"./sentry.js": 66080,
|
|
161095
164843
|
"./store.js": 5438,
|
|
161096
164844
|
"./validate.js": 74917,
|
|
@@ -164233,7 +167981,7 @@ const components = [basic_view, form_view, message_push_target, MessageOne];
|
|
|
164233
167981
|
* @Description:
|
|
164234
167982
|
* @Author: 王国火
|
|
164235
167983
|
* @Date: 2022-09-19 10:17:14
|
|
164236
|
-
* @LastEditTime: 2024-04-
|
|
167984
|
+
* @LastEditTime: 2024-04-22 12:56:46
|
|
164237
167985
|
* @LastEditors: 王国火
|
|
164238
167986
|
*/
|
|
164239
167987
|
// 动态引入
|
|
@@ -164242,11 +167990,16 @@ const requireContext = __webpack_require__(79513);
|
|
|
164242
167990
|
requireContext.keys().map(key => {
|
|
164243
167991
|
const reg = /\w+/;
|
|
164244
167992
|
const k = key.match(reg)[0];
|
|
164245
|
-
|
|
164246
|
-
|
|
164247
|
-
|
|
164248
|
-
|
|
167993
|
+
const cnt = requireContext(key);
|
|
167994
|
+
if (!cnt) return;
|
|
167995
|
+
const conf = {
|
|
167996
|
+
...cnt
|
|
167997
|
+
};
|
|
167998
|
+
if (conf.default) {
|
|
167999
|
+
conmmon[k] = conf.default;
|
|
168000
|
+
delete conf.default;
|
|
164249
168001
|
}
|
|
168002
|
+
conmmon = Object.assign(conmmon, cnt);
|
|
164250
168003
|
});
|
|
164251
168004
|
/* harmony default export */ var common = (conmmon);
|
|
164252
168005
|
// EXTERNAL MODULE: ./node_modules/xe-utils/index.js
|