@impui/imp 1.0.16-beta.0 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axios/index.es.js +1 -143
- package/dist/config/index.es.js +1 -127
- package/dist/core/index.es.js +1 -34
- package/dist/gotool/go2/index.es.js +1 -510
- package/dist/gotool/index/index.es.js +1 -164
- package/dist/imph5/index.es.js +1 -324
- package/dist/index.es.js +1 -49
- package/dist/login/index.es.js +1 -711
- package/dist/node_modules/axios/index/index.es.js +1 -38
- package/dist/node_modules/axios/lib/adapters/adapters/index.es.js +1 -71
- package/dist/node_modules/axios/lib/adapters/fetch/index.es.js +1 -219
- package/dist/node_modules/axios/lib/adapters/xhr/index.es.js +1 -141
- package/dist/node_modules/axios/lib/axios/index.es.js +1 -50
- package/dist/node_modules/axios/lib/cancel/CancelToken/index.es.js +1 -99
- package/dist/node_modules/axios/lib/cancel/CanceledError/index.es.js +1 -12
- package/dist/node_modules/axios/lib/cancel/isCancel/index.es.js +1 -6
- package/dist/node_modules/axios/lib/core/Axios/index.es.js +1 -180
- package/dist/node_modules/axios/lib/core/AxiosError/index.es.js +1 -80
- package/dist/node_modules/axios/lib/core/AxiosHeaders/index.es.js +1 -231
- package/dist/node_modules/axios/lib/core/InterceptorManager/index.es.js +1 -65
- package/dist/node_modules/axios/lib/core/buildFullPath/index.es.js +1 -12
- package/dist/node_modules/axios/lib/core/dispatchRequest/index.es.js +1 -52
- package/dist/node_modules/axios/lib/core/mergeConfig/index.es.js +1 -83
- package/dist/node_modules/axios/lib/core/settle/index.es.js +1 -18
- package/dist/node_modules/axios/lib/core/transformData/index.es.js +1 -17
- package/dist/node_modules/axios/lib/defaults/index/index.es.js +1 -116
- package/dist/node_modules/axios/lib/defaults/transitional/index.es.js +1 -8
- package/dist/node_modules/axios/lib/env/data/index.es.js +1 -4
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams/index.es.js +1 -34
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode/index.es.js +1 -77
- package/dist/node_modules/axios/lib/helpers/bind/index.es.js +1 -8
- package/dist/node_modules/axios/lib/helpers/buildURL/index.es.js +1 -34
- package/dist/node_modules/axios/lib/helpers/combineURLs/index.es.js +1 -6
- package/dist/node_modules/axios/lib/helpers/composeSignals/index.es.js +1 -39
- package/dist/node_modules/axios/lib/helpers/cookies/index.es.js +1 -49
- package/dist/node_modules/axios/lib/helpers/formDataToJSON/index.es.js +1 -54
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL/index.es.js +1 -6
- package/dist/node_modules/axios/lib/helpers/isAxiosError/index.es.js +1 -7
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin/index.es.js +1 -11
- package/dist/node_modules/axios/lib/helpers/null/index.es.js +1 -4
- package/dist/node_modules/axios/lib/helpers/parseHeaders/index.es.js +1 -47
- package/dist/node_modules/axios/lib/helpers/parseProtocol/index.es.js +1 -7
- package/dist/node_modules/axios/lib/helpers/progressEventReducer/index.es.js +1 -41
- package/dist/node_modules/axios/lib/helpers/resolveConfig/index.es.js +1 -46
- package/dist/node_modules/axios/lib/helpers/speedometer/index.es.js +1 -36
- package/dist/node_modules/axios/lib/helpers/spread/index.es.js +1 -8
- package/dist/node_modules/axios/lib/helpers/throttle/index.es.js +1 -35
- package/dist/node_modules/axios/lib/helpers/toFormData/index.es.js +1 -117
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm/index.es.js +1 -18
- package/dist/node_modules/axios/lib/helpers/trackStream/index.es.js +1 -80
- package/dist/node_modules/axios/lib/helpers/validator/index.es.js +1 -67
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob/index.es.js +1 -4
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData/index.es.js +1 -4
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams/index.es.js +1 -5
- package/dist/node_modules/axios/lib/platform/browser/index/index.es.js +1 -15
- package/dist/node_modules/axios/lib/platform/common/utils/index.es.js +1 -15
- package/dist/node_modules/axios/lib/platform/index/index.es.js +1 -9
- package/dist/node_modules/axios/lib/utils/index.es.js +1 -387
- package/dist/packages/com/dist/cache/index.es/index.es.js +1 -145
- package/dist/packages/com/dist/core/index.es/index.es.js +1 -154
- package/dist/packages/com/dist/data/index.es/index.es.js +1 -26
- package/dist/packages/com/dist/date/index.es/index.es.js +2 -194
- package/dist/packages/com/dist/log/index.es/index.es.js +1 -110
- package/dist/packages/com/dist/message/index.es/index.es.js +1 -90
- package/dist/packages/com/dist/req/index.es/index.es.js +1 -35
- package/dist/packages/com/dist/str/index.es/index.es.js +1 -25
- package/dist/packages/com/dist/typetool/index.es/index.es.js +1 -53
- package/dist/packages/com/dist/url/index.es/index.es.js +1 -238
- package/dist/restool/index/index.es.js +1 -266
- package/dist/restool/index.css/index.es.js +1 -4
- package/package.json +5 -1
|
@@ -1,83 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import AxiosHeaders from "../AxiosHeaders/index.es.js";
|
|
3
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
4
|
-
function mergeConfig(config1, config2) {
|
|
5
|
-
config2 = config2 || {};
|
|
6
|
-
const config = {};
|
|
7
|
-
function getMergedValue(target, source, prop, caseless) {
|
|
8
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
9
|
-
return utils.merge.call({ caseless }, target, source);
|
|
10
|
-
} else if (utils.isPlainObject(source)) {
|
|
11
|
-
return utils.merge({}, source);
|
|
12
|
-
} else if (utils.isArray(source)) {
|
|
13
|
-
return source.slice();
|
|
14
|
-
}
|
|
15
|
-
return source;
|
|
16
|
-
}
|
|
17
|
-
function mergeDeepProperties(a, b, prop, caseless) {
|
|
18
|
-
if (!utils.isUndefined(b)) {
|
|
19
|
-
return getMergedValue(a, b, prop, caseless);
|
|
20
|
-
} else if (!utils.isUndefined(a)) {
|
|
21
|
-
return getMergedValue(void 0, a, prop, caseless);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function valueFromConfig2(a, b) {
|
|
25
|
-
if (!utils.isUndefined(b)) {
|
|
26
|
-
return getMergedValue(void 0, b);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function defaultToConfig2(a, b) {
|
|
30
|
-
if (!utils.isUndefined(b)) {
|
|
31
|
-
return getMergedValue(void 0, b);
|
|
32
|
-
} else if (!utils.isUndefined(a)) {
|
|
33
|
-
return getMergedValue(void 0, a);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function mergeDirectKeys(a, b, prop) {
|
|
37
|
-
if (prop in config2) {
|
|
38
|
-
return getMergedValue(a, b);
|
|
39
|
-
} else if (prop in config1) {
|
|
40
|
-
return getMergedValue(void 0, a);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
const mergeMap = {
|
|
44
|
-
url: valueFromConfig2,
|
|
45
|
-
method: valueFromConfig2,
|
|
46
|
-
data: valueFromConfig2,
|
|
47
|
-
baseURL: defaultToConfig2,
|
|
48
|
-
transformRequest: defaultToConfig2,
|
|
49
|
-
transformResponse: defaultToConfig2,
|
|
50
|
-
paramsSerializer: defaultToConfig2,
|
|
51
|
-
timeout: defaultToConfig2,
|
|
52
|
-
timeoutMessage: defaultToConfig2,
|
|
53
|
-
withCredentials: defaultToConfig2,
|
|
54
|
-
withXSRFToken: defaultToConfig2,
|
|
55
|
-
adapter: defaultToConfig2,
|
|
56
|
-
responseType: defaultToConfig2,
|
|
57
|
-
xsrfCookieName: defaultToConfig2,
|
|
58
|
-
xsrfHeaderName: defaultToConfig2,
|
|
59
|
-
onUploadProgress: defaultToConfig2,
|
|
60
|
-
onDownloadProgress: defaultToConfig2,
|
|
61
|
-
decompress: defaultToConfig2,
|
|
62
|
-
maxContentLength: defaultToConfig2,
|
|
63
|
-
maxBodyLength: defaultToConfig2,
|
|
64
|
-
beforeRedirect: defaultToConfig2,
|
|
65
|
-
transport: defaultToConfig2,
|
|
66
|
-
httpAgent: defaultToConfig2,
|
|
67
|
-
httpsAgent: defaultToConfig2,
|
|
68
|
-
cancelToken: defaultToConfig2,
|
|
69
|
-
socketPath: defaultToConfig2,
|
|
70
|
-
responseEncoding: defaultToConfig2,
|
|
71
|
-
validateStatus: mergeDirectKeys,
|
|
72
|
-
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
73
|
-
};
|
|
74
|
-
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
75
|
-
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
76
|
-
const configValue = merge(config1[prop], config2[prop], prop);
|
|
77
|
-
utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
|
78
|
-
});
|
|
79
|
-
return config;
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
mergeConfig as default
|
|
83
|
-
};
|
|
1
|
+
import e from"../../utils/index.es.js";import n from"../AxiosHeaders/index.es.js";const t=e=>e instanceof n?{...e}:e;function i(n,i){i=i||{};const s={};function o(n,t,i,s){return e.isPlainObject(n)&&e.isPlainObject(t)?e.merge.call({caseless:s},n,t):e.isPlainObject(t)?e.merge({},t):e.isArray(t)?t.slice():t}function r(n,t,i,s){return e.isUndefined(t)?e.isUndefined(n)?void 0:o(void 0,n,0,s):o(n,t,0,s)}function a(n,t){if(!e.isUndefined(t))return o(void 0,t)}function d(n,t){return e.isUndefined(t)?e.isUndefined(n)?void 0:o(void 0,n):o(void 0,t)}function c(e,t,s){return s in i?o(e,t):s in n?o(void 0,e):void 0}const f={url:a,method:a,data:a,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:c,headers:(e,n,i)=>r(t(e),t(n),0,!0)};return e.forEach(Object.keys({...n,...i}),function(t){const o=f[t]||r,a=o(n[t],i[t],t);e.isUndefined(a)&&o!==c||(s[t]=a)}),s}export{i as default};
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
function settle(resolve, reject, response) {
|
|
3
|
-
const validateStatus = response.config.validateStatus;
|
|
4
|
-
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
5
|
-
resolve(response);
|
|
6
|
-
} else {
|
|
7
|
-
reject(new AxiosError(
|
|
8
|
-
"Request failed with status code " + response.status,
|
|
9
|
-
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
10
|
-
response.config,
|
|
11
|
-
response.request,
|
|
12
|
-
response
|
|
13
|
-
));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
settle as default
|
|
18
|
-
};
|
|
1
|
+
import t from"../AxiosError/index.es.js";function s(s,a,e){const o=e.config.validateStatus;e.status&&o&&!o(e.status)?a(new t("Request failed with status code "+e.status,[t.ERR_BAD_REQUEST,t.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e)):s(e)}export{s as default};
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import defaults from "../../defaults/index/index.es.js";
|
|
3
|
-
import AxiosHeaders from "../AxiosHeaders/index.es.js";
|
|
4
|
-
function transformData(fns, response) {
|
|
5
|
-
const config = this || defaults;
|
|
6
|
-
const context = response || config;
|
|
7
|
-
const headers = AxiosHeaders.from(context.headers);
|
|
8
|
-
let data = context.data;
|
|
9
|
-
utils.forEach(fns, function transform(fn) {
|
|
10
|
-
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
11
|
-
});
|
|
12
|
-
headers.normalize();
|
|
13
|
-
return data;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
transformData as default
|
|
17
|
-
};
|
|
1
|
+
import e from"../../utils/index.es.js";import o from"../../defaults/index/index.es.js";import s from"../AxiosHeaders/index.es.js";function t(t,i){const r=this||o,a=i||r,n=s.from(a.headers);let d=a.data;return e.forEach(t,function(e){d=e.call(r,d,n.normalize(),i?i.status:void 0)}),n.normalize(),d}export{t as default};
|
|
@@ -1,116 +1 @@
|
|
|
1
|
-
import utils from "../../
|
|
2
|
-
import AxiosError from "../../core/AxiosError/index.es.js";
|
|
3
|
-
import transitionalDefaults from "../transitional/index.es.js";
|
|
4
|
-
import toFormData from "../../helpers/toFormData/index.es.js";
|
|
5
|
-
import toURLEncodedForm from "../../helpers/toURLEncodedForm/index.es.js";
|
|
6
|
-
import platform from "../../platform/index/index.es.js";
|
|
7
|
-
import formDataToJSON from "../../helpers/formDataToJSON/index.es.js";
|
|
8
|
-
function stringifySafely(rawValue, parser, encoder) {
|
|
9
|
-
if (utils.isString(rawValue)) {
|
|
10
|
-
try {
|
|
11
|
-
(parser || JSON.parse)(rawValue);
|
|
12
|
-
return utils.trim(rawValue);
|
|
13
|
-
} catch (e) {
|
|
14
|
-
if (e.name !== "SyntaxError") {
|
|
15
|
-
throw e;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
20
|
-
}
|
|
21
|
-
const defaults = {
|
|
22
|
-
transitional: transitionalDefaults,
|
|
23
|
-
adapter: ["xhr", "http", "fetch"],
|
|
24
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
25
|
-
const contentType = headers.getContentType() || "";
|
|
26
|
-
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
27
|
-
const isObjectPayload = utils.isObject(data);
|
|
28
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
29
|
-
data = new FormData(data);
|
|
30
|
-
}
|
|
31
|
-
const isFormData = utils.isFormData(data);
|
|
32
|
-
if (isFormData) {
|
|
33
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
34
|
-
}
|
|
35
|
-
if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) || utils.isReadableStream(data)) {
|
|
36
|
-
return data;
|
|
37
|
-
}
|
|
38
|
-
if (utils.isArrayBufferView(data)) {
|
|
39
|
-
return data.buffer;
|
|
40
|
-
}
|
|
41
|
-
if (utils.isURLSearchParams(data)) {
|
|
42
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
43
|
-
return data.toString();
|
|
44
|
-
}
|
|
45
|
-
let isFileList;
|
|
46
|
-
if (isObjectPayload) {
|
|
47
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
48
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
49
|
-
}
|
|
50
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
51
|
-
const _FormData = this.env && this.env.FormData;
|
|
52
|
-
return toFormData(
|
|
53
|
-
isFileList ? { "files[]": data } : data,
|
|
54
|
-
_FormData && new _FormData(),
|
|
55
|
-
this.formSerializer
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
60
|
-
headers.setContentType("application/json", false);
|
|
61
|
-
return stringifySafely(data);
|
|
62
|
-
}
|
|
63
|
-
return data;
|
|
64
|
-
}],
|
|
65
|
-
transformResponse: [function transformResponse(data) {
|
|
66
|
-
const transitional = this.transitional || defaults.transitional;
|
|
67
|
-
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
68
|
-
const JSONRequested = this.responseType === "json";
|
|
69
|
-
if (utils.isResponse(data) || utils.isReadableStream(data)) {
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
if (data && utils.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
73
|
-
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
74
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
75
|
-
try {
|
|
76
|
-
return JSON.parse(data, this.parseReviver);
|
|
77
|
-
} catch (e) {
|
|
78
|
-
if (strictJSONParsing) {
|
|
79
|
-
if (e.name === "SyntaxError") {
|
|
80
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
81
|
-
}
|
|
82
|
-
throw e;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return data;
|
|
87
|
-
}],
|
|
88
|
-
/**
|
|
89
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
90
|
-
* timeout is not created.
|
|
91
|
-
*/
|
|
92
|
-
timeout: 0,
|
|
93
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
94
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
95
|
-
maxContentLength: -1,
|
|
96
|
-
maxBodyLength: -1,
|
|
97
|
-
env: {
|
|
98
|
-
FormData: platform.classes.FormData,
|
|
99
|
-
Blob: platform.classes.Blob
|
|
100
|
-
},
|
|
101
|
-
validateStatus: function validateStatus(status) {
|
|
102
|
-
return status >= 200 && status < 300;
|
|
103
|
-
},
|
|
104
|
-
headers: {
|
|
105
|
-
common: {
|
|
106
|
-
"Accept": "application/json, text/plain, */*",
|
|
107
|
-
"Content-Type": void 0
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
utils.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
112
|
-
defaults.headers[method] = {};
|
|
113
|
-
});
|
|
114
|
-
export {
|
|
115
|
-
defaults as default
|
|
116
|
-
};
|
|
1
|
+
import e from"../../utils/index.es.js";import t from"../../core/AxiosError/index.es.js";import r from"../transitional/index.es.js";import i from"../../helpers/toFormData/index.es.js";import s from"../../helpers/toURLEncodedForm/index.es.js";import n from"../../platform/index/index.es.js";import o from"../../helpers/formDataToJSON/index.es.js";const a={transitional:r,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,f=e.isObject(t);f&&e.isHTMLForm(t)&&(t=new FormData(t));if(e.isFormData(t))return a?JSON.stringify(o(t)):t;if(e.isArrayBuffer(t)||e.isBuffer(t)||e.isStream(t)||e.isFile(t)||e.isBlob(t)||e.isReadableStream(t))return t;if(e.isArrayBufferView(t))return t.buffer;if(e.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let m;if(f){if(n.indexOf("application/x-www-form-urlencoded")>-1)return s(t,this.formSerializer).toString();if((m=e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return i(m?{"files[]":t}:t,e&&new e,this.formSerializer)}}return f||a?(r.setContentType("application/json",!1),function(t,r,i){if(e.isString(t))try{return(r||JSON.parse)(t),e.trim(t)}catch(s){if("SyntaxError"!==s.name)throw s}return(i||JSON.stringify)(t)}(t)):t}],transformResponse:[function(r){const i=this.transitional||a.transitional,s=i&&i.forcedJSONParsing,n="json"===this.responseType;if(e.isResponse(r)||e.isReadableStream(r))return r;if(r&&e.isString(r)&&(s&&!this.responseType||n)){const e=!(i&&i.silentJSONParsing)&&n;try{return JSON.parse(r,this.parseReviver)}catch(o){if(e){if("SyntaxError"===o.name)throw t.from(o,t.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n.classes.FormData,Blob:n.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};e.forEach(["delete","get","head","post","put","patch"],e=>{a.headers[e]={}});export{a as default};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
silentJSONParsing: true,
|
|
3
|
-
forcedJSONParsing: true,
|
|
4
|
-
clarifyTimeoutError: false
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
transitionalDefaults as default
|
|
8
|
-
};
|
|
1
|
+
const r={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};export{r as default};
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
function encode(str) {
|
|
3
|
-
const charMap = {
|
|
4
|
-
"!": "%21",
|
|
5
|
-
"'": "%27",
|
|
6
|
-
"(": "%28",
|
|
7
|
-
")": "%29",
|
|
8
|
-
"~": "%7E",
|
|
9
|
-
"%20": "+",
|
|
10
|
-
"%00": "\0"
|
|
11
|
-
};
|
|
12
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
13
|
-
return charMap[match];
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function AxiosURLSearchParams(params, options) {
|
|
17
|
-
this._pairs = [];
|
|
18
|
-
params && toFormData(params, this, options);
|
|
19
|
-
}
|
|
20
|
-
const prototype = AxiosURLSearchParams.prototype;
|
|
21
|
-
prototype.append = function append(name, value) {
|
|
22
|
-
this._pairs.push([name, value]);
|
|
23
|
-
};
|
|
24
|
-
prototype.toString = function toString(encoder) {
|
|
25
|
-
const _encode = encoder ? function(value) {
|
|
26
|
-
return encoder.call(this, value, encode);
|
|
27
|
-
} : encode;
|
|
28
|
-
return this._pairs.map(function each(pair) {
|
|
29
|
-
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
30
|
-
}, "").join("&");
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
AxiosURLSearchParams as default
|
|
34
|
-
};
|
|
1
|
+
import t from"../toFormData/index.es.js";function n(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return n[t]})}function o(n,o){this._pairs=[],n&&t(n,this,o)}const r=o.prototype;r.append=function(t,n){this._pairs.push([t,n])},r.toString=function(t){const o=t?function(o){return t.call(this,o,n)}:n;return this._pairs.map(function(t){return o(t[0])+"="+o(t[1])},"").join("&")};export{o as default};
|
|
@@ -1,77 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
Continue: 100,
|
|
3
|
-
SwitchingProtocols: 101,
|
|
4
|
-
Processing: 102,
|
|
5
|
-
EarlyHints: 103,
|
|
6
|
-
Ok: 200,
|
|
7
|
-
Created: 201,
|
|
8
|
-
Accepted: 202,
|
|
9
|
-
NonAuthoritativeInformation: 203,
|
|
10
|
-
NoContent: 204,
|
|
11
|
-
ResetContent: 205,
|
|
12
|
-
PartialContent: 206,
|
|
13
|
-
MultiStatus: 207,
|
|
14
|
-
AlreadyReported: 208,
|
|
15
|
-
ImUsed: 226,
|
|
16
|
-
MultipleChoices: 300,
|
|
17
|
-
MovedPermanently: 301,
|
|
18
|
-
Found: 302,
|
|
19
|
-
SeeOther: 303,
|
|
20
|
-
NotModified: 304,
|
|
21
|
-
UseProxy: 305,
|
|
22
|
-
Unused: 306,
|
|
23
|
-
TemporaryRedirect: 307,
|
|
24
|
-
PermanentRedirect: 308,
|
|
25
|
-
BadRequest: 400,
|
|
26
|
-
Unauthorized: 401,
|
|
27
|
-
PaymentRequired: 402,
|
|
28
|
-
Forbidden: 403,
|
|
29
|
-
NotFound: 404,
|
|
30
|
-
MethodNotAllowed: 405,
|
|
31
|
-
NotAcceptable: 406,
|
|
32
|
-
ProxyAuthenticationRequired: 407,
|
|
33
|
-
RequestTimeout: 408,
|
|
34
|
-
Conflict: 409,
|
|
35
|
-
Gone: 410,
|
|
36
|
-
LengthRequired: 411,
|
|
37
|
-
PreconditionFailed: 412,
|
|
38
|
-
PayloadTooLarge: 413,
|
|
39
|
-
UriTooLong: 414,
|
|
40
|
-
UnsupportedMediaType: 415,
|
|
41
|
-
RangeNotSatisfiable: 416,
|
|
42
|
-
ExpectationFailed: 417,
|
|
43
|
-
ImATeapot: 418,
|
|
44
|
-
MisdirectedRequest: 421,
|
|
45
|
-
UnprocessableEntity: 422,
|
|
46
|
-
Locked: 423,
|
|
47
|
-
FailedDependency: 424,
|
|
48
|
-
TooEarly: 425,
|
|
49
|
-
UpgradeRequired: 426,
|
|
50
|
-
PreconditionRequired: 428,
|
|
51
|
-
TooManyRequests: 429,
|
|
52
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
53
|
-
UnavailableForLegalReasons: 451,
|
|
54
|
-
InternalServerError: 500,
|
|
55
|
-
NotImplemented: 501,
|
|
56
|
-
BadGateway: 502,
|
|
57
|
-
ServiceUnavailable: 503,
|
|
58
|
-
GatewayTimeout: 504,
|
|
59
|
-
HttpVersionNotSupported: 505,
|
|
60
|
-
VariantAlsoNegotiates: 506,
|
|
61
|
-
InsufficientStorage: 507,
|
|
62
|
-
LoopDetected: 508,
|
|
63
|
-
NotExtended: 510,
|
|
64
|
-
NetworkAuthenticationRequired: 511,
|
|
65
|
-
WebServerIsDown: 521,
|
|
66
|
-
ConnectionTimedOut: 522,
|
|
67
|
-
OriginIsUnreachable: 523,
|
|
68
|
-
TimeoutOccurred: 524,
|
|
69
|
-
SslHandshakeFailed: 525,
|
|
70
|
-
InvalidSslCertificate: 526
|
|
71
|
-
};
|
|
72
|
-
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
73
|
-
HttpStatusCode[value] = key;
|
|
74
|
-
});
|
|
75
|
-
export {
|
|
76
|
-
HttpStatusCode as default
|
|
77
|
-
};
|
|
1
|
+
const e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e).forEach(([t,o])=>{e[o]=t});export{e as default};
|
|
@@ -1,34 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import AxiosURLSearchParams from "../AxiosURLSearchParams/index.es.js";
|
|
3
|
-
function encode(val) {
|
|
4
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
5
|
-
}
|
|
6
|
-
function buildURL(url, params, options) {
|
|
7
|
-
if (!params) {
|
|
8
|
-
return url;
|
|
9
|
-
}
|
|
10
|
-
const _encode = options && options.encode || encode;
|
|
11
|
-
if (utils.isFunction(options)) {
|
|
12
|
-
options = {
|
|
13
|
-
serialize: options
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
const serializeFn = options && options.serialize;
|
|
17
|
-
let serializedParams;
|
|
18
|
-
if (serializeFn) {
|
|
19
|
-
serializedParams = serializeFn(params, options);
|
|
20
|
-
} else {
|
|
21
|
-
serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
22
|
-
}
|
|
23
|
-
if (serializedParams) {
|
|
24
|
-
const hashmarkIndex = url.indexOf("#");
|
|
25
|
-
if (hashmarkIndex !== -1) {
|
|
26
|
-
url = url.slice(0, hashmarkIndex);
|
|
27
|
-
}
|
|
28
|
-
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
29
|
-
}
|
|
30
|
-
return url;
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
buildURL as default
|
|
34
|
-
};
|
|
1
|
+
import e from"../../utils/index.es.js";import i from"../AxiosURLSearchParams/index.es.js";function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function r(r,t,o){if(!t)return r;const s=o&&o.encode||n;e.isFunction(o)&&(o={serialize:o});const c=o&&o.serialize;let a;if(a=c?c(t,o):e.isURLSearchParams(t)?t.toString():new i(t,o).toString(s),a){const e=r.indexOf("#");-1!==e&&(r=r.slice(0,e)),r+=(-1===r.indexOf("?")?"?":"&")+a}return r}export{r as default};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
function
|
|
2
|
-
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
3
|
-
}
|
|
4
|
-
export {
|
|
5
|
-
combineURLs as default
|
|
6
|
-
};
|
|
1
|
+
function e(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}export{e as default};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import AxiosError from "../../core/AxiosError/index.es.js";
|
|
3
|
-
import utils from "../../utils/index.es.js";
|
|
4
|
-
const composeSignals = (signals, timeout) => {
|
|
5
|
-
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
6
|
-
if (timeout || length) {
|
|
7
|
-
let controller = new AbortController();
|
|
8
|
-
let aborted;
|
|
9
|
-
const onabort = function(reason) {
|
|
10
|
-
if (!aborted) {
|
|
11
|
-
aborted = true;
|
|
12
|
-
unsubscribe();
|
|
13
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
14
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
let timer = timeout && setTimeout(() => {
|
|
18
|
-
timer = null;
|
|
19
|
-
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
20
|
-
}, timeout);
|
|
21
|
-
const unsubscribe = () => {
|
|
22
|
-
if (signals) {
|
|
23
|
-
timer && clearTimeout(timer);
|
|
24
|
-
timer = null;
|
|
25
|
-
signals.forEach((signal2) => {
|
|
26
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
27
|
-
});
|
|
28
|
-
signals = null;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
32
|
-
const { signal } = controller;
|
|
33
|
-
signal.unsubscribe = () => utils.asap(unsubscribe);
|
|
34
|
-
return signal;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
composeSignals as default
|
|
39
|
-
};
|
|
1
|
+
import e from"../../cancel/CanceledError/index.es.js";import o from"../../core/AxiosError/index.es.js";import r from"../../utils/index.es.js";const n=(n,t)=>{const{length:s}=n=n?n.filter(Boolean):[];if(t||s){let s,i=new AbortController;const c=function(r){if(!s){s=!0,l();const n=r instanceof Error?r:this.reason;i.abort(n instanceof o?n:new e(n instanceof Error?n.message:n))}};let a=t&&setTimeout(()=>{a=null,c(new o(`timeout ${t} of ms exceeded`,o.ETIMEDOUT))},t);const l=()=>{n&&(a&&clearTimeout(a),a=null,n.forEach(e=>{e.unsubscribe?e.unsubscribe(c):e.removeEventListener("abort",c)}),n=null)};n.forEach(e=>e.addEventListener("abort",c));const{signal:u}=i;return u.unsubscribe=()=>r.asap(l),u}};export{n as default};
|
|
@@ -1,49 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import platform from "../../platform/index/index.es.js";
|
|
3
|
-
const cookies = platform.hasStandardBrowserEnv ? (
|
|
4
|
-
// Standard browser envs support document.cookie
|
|
5
|
-
{
|
|
6
|
-
write(name, value, expires, path, domain, secure, sameSite) {
|
|
7
|
-
if (typeof document === "undefined") return;
|
|
8
|
-
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
9
|
-
if (utils.isNumber(expires)) {
|
|
10
|
-
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
11
|
-
}
|
|
12
|
-
if (utils.isString(path)) {
|
|
13
|
-
cookie.push(`path=${path}`);
|
|
14
|
-
}
|
|
15
|
-
if (utils.isString(domain)) {
|
|
16
|
-
cookie.push(`domain=${domain}`);
|
|
17
|
-
}
|
|
18
|
-
if (secure === true) {
|
|
19
|
-
cookie.push("secure");
|
|
20
|
-
}
|
|
21
|
-
if (utils.isString(sameSite)) {
|
|
22
|
-
cookie.push(`SameSite=${sameSite}`);
|
|
23
|
-
}
|
|
24
|
-
document.cookie = cookie.join("; ");
|
|
25
|
-
},
|
|
26
|
-
read(name) {
|
|
27
|
-
if (typeof document === "undefined") return null;
|
|
28
|
-
const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
|
|
29
|
-
return match ? decodeURIComponent(match[1]) : null;
|
|
30
|
-
},
|
|
31
|
-
remove(name) {
|
|
32
|
-
this.write(name, "", Date.now() - 864e5, "/");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
) : (
|
|
36
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
37
|
-
{
|
|
38
|
-
write() {
|
|
39
|
-
},
|
|
40
|
-
read() {
|
|
41
|
-
return null;
|
|
42
|
-
},
|
|
43
|
-
remove() {
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
export {
|
|
48
|
-
cookies as default
|
|
49
|
-
};
|
|
1
|
+
import e from"../../utils/index.es.js";import n from"../../platform/index/index.es.js";const t=n.hasStandardBrowserEnv?{write(n,t,o,r,i,s,u){if("undefined"==typeof document)return;const d=[`${n}=${encodeURIComponent(t)}`];e.isNumber(o)&&d.push(`expires=${new Date(o).toUTCString()}`),e.isString(r)&&d.push(`path=${r}`),e.isString(i)&&d.push(`domain=${i}`),!0===s&&d.push("secure"),e.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(e){if("undefined"==typeof document)return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};export{t as default};
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
function parsePropPath(name) {
|
|
3
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
4
|
-
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
function arrayToObject(arr) {
|
|
8
|
-
const obj = {};
|
|
9
|
-
const keys = Object.keys(arr);
|
|
10
|
-
let i;
|
|
11
|
-
const len = keys.length;
|
|
12
|
-
let key;
|
|
13
|
-
for (i = 0; i < len; i++) {
|
|
14
|
-
key = keys[i];
|
|
15
|
-
obj[key] = arr[key];
|
|
16
|
-
}
|
|
17
|
-
return obj;
|
|
18
|
-
}
|
|
19
|
-
function formDataToJSON(formData) {
|
|
20
|
-
function buildPath(path, value, target, index) {
|
|
21
|
-
let name = path[index++];
|
|
22
|
-
if (name === "__proto__") return true;
|
|
23
|
-
const isNumericKey = Number.isFinite(+name);
|
|
24
|
-
const isLast = index >= path.length;
|
|
25
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
|
26
|
-
if (isLast) {
|
|
27
|
-
if (utils.hasOwnProp(target, name)) {
|
|
28
|
-
target[name] = [target[name], value];
|
|
29
|
-
} else {
|
|
30
|
-
target[name] = value;
|
|
31
|
-
}
|
|
32
|
-
return !isNumericKey;
|
|
33
|
-
}
|
|
34
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
|
35
|
-
target[name] = [];
|
|
36
|
-
}
|
|
37
|
-
const result = buildPath(path, value, target[name], index);
|
|
38
|
-
if (result && utils.isArray(target[name])) {
|
|
39
|
-
target[name] = arrayToObject(target[name]);
|
|
40
|
-
}
|
|
41
|
-
return !isNumericKey;
|
|
42
|
-
}
|
|
43
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
44
|
-
const obj = {};
|
|
45
|
-
utils.forEachEntry(formData, (name, value) => {
|
|
46
|
-
buildPath(parsePropPath(name), value, obj, 0);
|
|
47
|
-
});
|
|
48
|
-
return obj;
|
|
49
|
-
}
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
export {
|
|
53
|
-
formDataToJSON as default
|
|
54
|
-
};
|
|
1
|
+
import t from"../../utils/index.es.js";function n(n){function r(n,e,i,o){let s=n[o++];if("__proto__"===s)return!0;const u=Number.isFinite(+s),c=o>=n.length;if(s=!s&&t.isArray(i)?i.length:s,c)return t.hasOwnProp(i,s)?i[s]=[i[s],e]:i[s]=e,!u;i[s]&&t.isObject(i[s])||(i[s]=[]);return r(n,e,i[s],o)&&t.isArray(i[s])&&(i[s]=function(t){const n={},r=Object.keys(t);let e;const i=r.length;let o;for(e=0;e<i;e++)o=r[e],n[o]=t[o];return n}(i[s])),!u}if(t.isFormData(n)&&t.isFunction(n.entries)){const e={};return t.forEachEntry(n,(n,i)=>{r(function(n){return t.matchAll(/\w+|\[(\w*)]/g,n).map(t=>"[]"===t[0]?"":t[1]||t[0])}(n),i,e,0)}),e}return null}export{n as default};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
function isAxiosError(payload) {
|
|
3
|
-
return utils.isObject(payload) && payload.isAxiosError === true;
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
isAxiosError as default
|
|
7
|
-
};
|
|
1
|
+
import r from"../../utils/index.es.js";function i(i){return r.isObject(i)&&!0===i.isAxiosError}export{i as default};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin, isMSIE) => (url) => {
|
|
3
|
-
url = new URL(url, platform.origin);
|
|
4
|
-
return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
|
|
5
|
-
})(
|
|
6
|
-
new URL(platform.origin),
|
|
7
|
-
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
8
|
-
) : () => true;
|
|
9
|
-
export {
|
|
10
|
-
isURLSameOrigin as default
|
|
11
|
-
};
|
|
1
|
+
import o from"../../platform/index/index.es.js";const t=o.hasStandardBrowserEnv?/* @__PURE__ */((t,r)=>e=>(e=new URL(e,o.origin),t.protocol===e.protocol&&t.host===e.host&&(r||t.port===e.port)))(new URL(o.origin),o.navigator&&/(msie|trident)/i.test(o.navigator.userAgent)):()=>!0;export{t as default};
|