tenghui-ui 2.4.47 → 2.4.48
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/tenghui-ui.es.js +57 -1974
- package/dist/tenghui-ui.es.js.map +1 -1
- package/dist/tenghui-ui.umd.js +39 -43
- package/dist/tenghui-ui.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/tenghui-ui.es.js
CHANGED
|
@@ -19,1877 +19,6 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import Vue from "vue";
|
|
21
21
|
var index$1 = "";
|
|
22
|
-
function bind$2(fn, thisArg) {
|
|
23
|
-
return function wrap() {
|
|
24
|
-
return fn.apply(thisArg, arguments);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const { toString } = Object.prototype;
|
|
28
|
-
const { getPrototypeOf } = Object;
|
|
29
|
-
const kindOf = ((cache) => (thing) => {
|
|
30
|
-
const str = toString.call(thing);
|
|
31
|
-
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
32
|
-
})(Object.create(null));
|
|
33
|
-
const kindOfTest = (type) => {
|
|
34
|
-
type = type.toLowerCase();
|
|
35
|
-
return (thing) => kindOf(thing) === type;
|
|
36
|
-
};
|
|
37
|
-
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
38
|
-
const { isArray: isArray$4 } = Array;
|
|
39
|
-
const isUndefined = typeOfTest("undefined");
|
|
40
|
-
function isBuffer$1(val) {
|
|
41
|
-
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
42
|
-
}
|
|
43
|
-
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
44
|
-
function isArrayBufferView(val) {
|
|
45
|
-
let result;
|
|
46
|
-
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
47
|
-
result = ArrayBuffer.isView(val);
|
|
48
|
-
} else {
|
|
49
|
-
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
const isString$1 = typeOfTest("string");
|
|
54
|
-
const isFunction = typeOfTest("function");
|
|
55
|
-
const isNumber$1 = typeOfTest("number");
|
|
56
|
-
const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
57
|
-
const isBoolean$1 = (thing) => thing === true || thing === false;
|
|
58
|
-
const isPlainObject = (val) => {
|
|
59
|
-
if (kindOf(val) !== "object") {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
const prototype2 = getPrototypeOf(val);
|
|
63
|
-
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
64
|
-
};
|
|
65
|
-
const isDate$1 = kindOfTest("Date");
|
|
66
|
-
const isFile = kindOfTest("File");
|
|
67
|
-
const isBlob = kindOfTest("Blob");
|
|
68
|
-
const isFileList = kindOfTest("FileList");
|
|
69
|
-
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
70
|
-
const isFormData = (thing) => {
|
|
71
|
-
let kind;
|
|
72
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
73
|
-
};
|
|
74
|
-
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
75
|
-
const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
76
|
-
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
77
|
-
if (obj === null || typeof obj === "undefined") {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
let i;
|
|
81
|
-
let l;
|
|
82
|
-
if (typeof obj !== "object") {
|
|
83
|
-
obj = [obj];
|
|
84
|
-
}
|
|
85
|
-
if (isArray$4(obj)) {
|
|
86
|
-
for (i = 0, l = obj.length; i < l; i++) {
|
|
87
|
-
fn.call(null, obj[i], i, obj);
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
91
|
-
const len = keys.length;
|
|
92
|
-
let key;
|
|
93
|
-
for (i = 0; i < len; i++) {
|
|
94
|
-
key = keys[i];
|
|
95
|
-
fn.call(null, obj[key], key, obj);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function findKey(obj, key) {
|
|
100
|
-
key = key.toLowerCase();
|
|
101
|
-
const keys = Object.keys(obj);
|
|
102
|
-
let i = keys.length;
|
|
103
|
-
let _key;
|
|
104
|
-
while (i-- > 0) {
|
|
105
|
-
_key = keys[i];
|
|
106
|
-
if (key === _key.toLowerCase()) {
|
|
107
|
-
return _key;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
const _global = (() => {
|
|
113
|
-
if (typeof globalThis !== "undefined")
|
|
114
|
-
return globalThis;
|
|
115
|
-
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
116
|
-
})();
|
|
117
|
-
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
118
|
-
function merge$1() {
|
|
119
|
-
const { caseless } = isContextDefined(this) && this || {};
|
|
120
|
-
const result = {};
|
|
121
|
-
const assignValue = (val, key) => {
|
|
122
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
123
|
-
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
124
|
-
result[targetKey] = merge$1(result[targetKey], val);
|
|
125
|
-
} else if (isPlainObject(val)) {
|
|
126
|
-
result[targetKey] = merge$1({}, val);
|
|
127
|
-
} else if (isArray$4(val)) {
|
|
128
|
-
result[targetKey] = val.slice();
|
|
129
|
-
} else {
|
|
130
|
-
result[targetKey] = val;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
134
|
-
arguments[i] && forEach(arguments[i], assignValue);
|
|
135
|
-
}
|
|
136
|
-
return result;
|
|
137
|
-
}
|
|
138
|
-
const extend$1 = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
139
|
-
forEach(b, (val, key) => {
|
|
140
|
-
if (thisArg && isFunction(val)) {
|
|
141
|
-
a[key] = bind$2(val, thisArg);
|
|
142
|
-
} else {
|
|
143
|
-
a[key] = val;
|
|
144
|
-
}
|
|
145
|
-
}, { allOwnKeys });
|
|
146
|
-
return a;
|
|
147
|
-
};
|
|
148
|
-
const stripBOM = (content) => {
|
|
149
|
-
if (content.charCodeAt(0) === 65279) {
|
|
150
|
-
content = content.slice(1);
|
|
151
|
-
}
|
|
152
|
-
return content;
|
|
153
|
-
};
|
|
154
|
-
const inherits = (constructor, superConstructor, props, descriptors2) => {
|
|
155
|
-
constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
|
|
156
|
-
constructor.prototype.constructor = constructor;
|
|
157
|
-
Object.defineProperty(constructor, "super", {
|
|
158
|
-
value: superConstructor.prototype
|
|
159
|
-
});
|
|
160
|
-
props && Object.assign(constructor.prototype, props);
|
|
161
|
-
};
|
|
162
|
-
const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
|
|
163
|
-
let props;
|
|
164
|
-
let i;
|
|
165
|
-
let prop;
|
|
166
|
-
const merged = {};
|
|
167
|
-
destObj = destObj || {};
|
|
168
|
-
if (sourceObj == null)
|
|
169
|
-
return destObj;
|
|
170
|
-
do {
|
|
171
|
-
props = Object.getOwnPropertyNames(sourceObj);
|
|
172
|
-
i = props.length;
|
|
173
|
-
while (i-- > 0) {
|
|
174
|
-
prop = props[i];
|
|
175
|
-
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
176
|
-
destObj[prop] = sourceObj[prop];
|
|
177
|
-
merged[prop] = true;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
|
|
181
|
-
} while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
182
|
-
return destObj;
|
|
183
|
-
};
|
|
184
|
-
const endsWith = (str, searchString, position) => {
|
|
185
|
-
str = String(str);
|
|
186
|
-
if (position === void 0 || position > str.length) {
|
|
187
|
-
position = str.length;
|
|
188
|
-
}
|
|
189
|
-
position -= searchString.length;
|
|
190
|
-
const lastIndex = str.indexOf(searchString, position);
|
|
191
|
-
return lastIndex !== -1 && lastIndex === position;
|
|
192
|
-
};
|
|
193
|
-
const toArray = (thing) => {
|
|
194
|
-
if (!thing)
|
|
195
|
-
return null;
|
|
196
|
-
if (isArray$4(thing))
|
|
197
|
-
return thing;
|
|
198
|
-
let i = thing.length;
|
|
199
|
-
if (!isNumber$1(i))
|
|
200
|
-
return null;
|
|
201
|
-
const arr = new Array(i);
|
|
202
|
-
while (i-- > 0) {
|
|
203
|
-
arr[i] = thing[i];
|
|
204
|
-
}
|
|
205
|
-
return arr;
|
|
206
|
-
};
|
|
207
|
-
const isTypedArray = ((TypedArray2) => {
|
|
208
|
-
return (thing) => {
|
|
209
|
-
return TypedArray2 && thing instanceof TypedArray2;
|
|
210
|
-
};
|
|
211
|
-
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
212
|
-
const forEachEntry = (obj, fn) => {
|
|
213
|
-
const generator = obj && obj[Symbol.iterator];
|
|
214
|
-
const iterator = generator.call(obj);
|
|
215
|
-
let result;
|
|
216
|
-
while ((result = iterator.next()) && !result.done) {
|
|
217
|
-
const pair = result.value;
|
|
218
|
-
fn.call(obj, pair[0], pair[1]);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
const matchAll = (regExp, str) => {
|
|
222
|
-
let matches2;
|
|
223
|
-
const arr = [];
|
|
224
|
-
while ((matches2 = regExp.exec(str)) !== null) {
|
|
225
|
-
arr.push(matches2);
|
|
226
|
-
}
|
|
227
|
-
return arr;
|
|
228
|
-
};
|
|
229
|
-
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
230
|
-
const toCamelCase = (str) => {
|
|
231
|
-
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
|
|
232
|
-
return p1.toUpperCase() + p2;
|
|
233
|
-
});
|
|
234
|
-
};
|
|
235
|
-
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
236
|
-
const isRegExp$2 = kindOfTest("RegExp");
|
|
237
|
-
const reduceDescriptors = (obj, reducer) => {
|
|
238
|
-
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
239
|
-
const reducedDescriptors = {};
|
|
240
|
-
forEach(descriptors2, (descriptor, name) => {
|
|
241
|
-
let ret;
|
|
242
|
-
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
243
|
-
reducedDescriptors[name] = ret || descriptor;
|
|
244
|
-
}
|
|
245
|
-
});
|
|
246
|
-
Object.defineProperties(obj, reducedDescriptors);
|
|
247
|
-
};
|
|
248
|
-
const freezeMethods = (obj) => {
|
|
249
|
-
reduceDescriptors(obj, (descriptor, name) => {
|
|
250
|
-
if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
const value = obj[name];
|
|
254
|
-
if (!isFunction(value))
|
|
255
|
-
return;
|
|
256
|
-
descriptor.enumerable = false;
|
|
257
|
-
if ("writable" in descriptor) {
|
|
258
|
-
descriptor.writable = false;
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
if (!descriptor.set) {
|
|
262
|
-
descriptor.set = () => {
|
|
263
|
-
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
};
|
|
268
|
-
const toObjectSet = (arrayOrString, delimiter) => {
|
|
269
|
-
const obj = {};
|
|
270
|
-
const define = (arr) => {
|
|
271
|
-
arr.forEach((value) => {
|
|
272
|
-
obj[value] = true;
|
|
273
|
-
});
|
|
274
|
-
};
|
|
275
|
-
isArray$4(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
276
|
-
return obj;
|
|
277
|
-
};
|
|
278
|
-
const noop = () => {
|
|
279
|
-
};
|
|
280
|
-
const toFiniteNumber = (value, defaultValue) => {
|
|
281
|
-
value = +value;
|
|
282
|
-
return Number.isFinite(value) ? value : defaultValue;
|
|
283
|
-
};
|
|
284
|
-
const ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
285
|
-
const DIGIT = "0123456789";
|
|
286
|
-
const ALPHABET = {
|
|
287
|
-
DIGIT,
|
|
288
|
-
ALPHA,
|
|
289
|
-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
290
|
-
};
|
|
291
|
-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
292
|
-
let str = "";
|
|
293
|
-
const { length } = alphabet;
|
|
294
|
-
while (size--) {
|
|
295
|
-
str += alphabet[Math.random() * length | 0];
|
|
296
|
-
}
|
|
297
|
-
return str;
|
|
298
|
-
};
|
|
299
|
-
function isSpecCompliantForm(thing) {
|
|
300
|
-
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
301
|
-
}
|
|
302
|
-
const toJSONObject = (obj) => {
|
|
303
|
-
const stack = new Array(10);
|
|
304
|
-
const visit = (source, i) => {
|
|
305
|
-
if (isObject(source)) {
|
|
306
|
-
if (stack.indexOf(source) >= 0) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
if (!("toJSON" in source)) {
|
|
310
|
-
stack[i] = source;
|
|
311
|
-
const target = isArray$4(source) ? [] : {};
|
|
312
|
-
forEach(source, (value, key) => {
|
|
313
|
-
const reducedValue = visit(value, i + 1);
|
|
314
|
-
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
315
|
-
});
|
|
316
|
-
stack[i] = void 0;
|
|
317
|
-
return target;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
return source;
|
|
321
|
-
};
|
|
322
|
-
return visit(obj, 0);
|
|
323
|
-
};
|
|
324
|
-
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
325
|
-
const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
326
|
-
var utils$4 = {
|
|
327
|
-
isArray: isArray$4,
|
|
328
|
-
isArrayBuffer,
|
|
329
|
-
isBuffer: isBuffer$1,
|
|
330
|
-
isFormData,
|
|
331
|
-
isArrayBufferView,
|
|
332
|
-
isString: isString$1,
|
|
333
|
-
isNumber: isNumber$1,
|
|
334
|
-
isBoolean: isBoolean$1,
|
|
335
|
-
isObject,
|
|
336
|
-
isPlainObject,
|
|
337
|
-
isUndefined,
|
|
338
|
-
isDate: isDate$1,
|
|
339
|
-
isFile,
|
|
340
|
-
isBlob,
|
|
341
|
-
isRegExp: isRegExp$2,
|
|
342
|
-
isFunction,
|
|
343
|
-
isStream,
|
|
344
|
-
isURLSearchParams,
|
|
345
|
-
isTypedArray,
|
|
346
|
-
isFileList,
|
|
347
|
-
forEach,
|
|
348
|
-
merge: merge$1,
|
|
349
|
-
extend: extend$1,
|
|
350
|
-
trim,
|
|
351
|
-
stripBOM,
|
|
352
|
-
inherits,
|
|
353
|
-
toFlatObject,
|
|
354
|
-
kindOf,
|
|
355
|
-
kindOfTest,
|
|
356
|
-
endsWith,
|
|
357
|
-
toArray,
|
|
358
|
-
forEachEntry,
|
|
359
|
-
matchAll,
|
|
360
|
-
isHTMLForm,
|
|
361
|
-
hasOwnProperty,
|
|
362
|
-
hasOwnProp: hasOwnProperty,
|
|
363
|
-
reduceDescriptors,
|
|
364
|
-
freezeMethods,
|
|
365
|
-
toObjectSet,
|
|
366
|
-
toCamelCase,
|
|
367
|
-
noop,
|
|
368
|
-
toFiniteNumber,
|
|
369
|
-
findKey,
|
|
370
|
-
global: _global,
|
|
371
|
-
isContextDefined,
|
|
372
|
-
ALPHABET,
|
|
373
|
-
generateString,
|
|
374
|
-
isSpecCompliantForm,
|
|
375
|
-
toJSONObject,
|
|
376
|
-
isAsyncFn,
|
|
377
|
-
isThenable
|
|
378
|
-
};
|
|
379
|
-
function AxiosError(message, code, config, request, response) {
|
|
380
|
-
Error.call(this);
|
|
381
|
-
if (Error.captureStackTrace) {
|
|
382
|
-
Error.captureStackTrace(this, this.constructor);
|
|
383
|
-
} else {
|
|
384
|
-
this.stack = new Error().stack;
|
|
385
|
-
}
|
|
386
|
-
this.message = message;
|
|
387
|
-
this.name = "AxiosError";
|
|
388
|
-
code && (this.code = code);
|
|
389
|
-
config && (this.config = config);
|
|
390
|
-
request && (this.request = request);
|
|
391
|
-
response && (this.response = response);
|
|
392
|
-
}
|
|
393
|
-
utils$4.inherits(AxiosError, Error, {
|
|
394
|
-
toJSON: function toJSON() {
|
|
395
|
-
return {
|
|
396
|
-
message: this.message,
|
|
397
|
-
name: this.name,
|
|
398
|
-
description: this.description,
|
|
399
|
-
number: this.number,
|
|
400
|
-
fileName: this.fileName,
|
|
401
|
-
lineNumber: this.lineNumber,
|
|
402
|
-
columnNumber: this.columnNumber,
|
|
403
|
-
stack: this.stack,
|
|
404
|
-
config: utils$4.toJSONObject(this.config),
|
|
405
|
-
code: this.code,
|
|
406
|
-
status: this.response && this.response.status ? this.response.status : null
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
const prototype$1 = AxiosError.prototype;
|
|
411
|
-
const descriptors = {};
|
|
412
|
-
[
|
|
413
|
-
"ERR_BAD_OPTION_VALUE",
|
|
414
|
-
"ERR_BAD_OPTION",
|
|
415
|
-
"ECONNABORTED",
|
|
416
|
-
"ETIMEDOUT",
|
|
417
|
-
"ERR_NETWORK",
|
|
418
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
419
|
-
"ERR_DEPRECATED",
|
|
420
|
-
"ERR_BAD_RESPONSE",
|
|
421
|
-
"ERR_BAD_REQUEST",
|
|
422
|
-
"ERR_CANCELED",
|
|
423
|
-
"ERR_NOT_SUPPORT",
|
|
424
|
-
"ERR_INVALID_URL"
|
|
425
|
-
].forEach((code) => {
|
|
426
|
-
descriptors[code] = { value: code };
|
|
427
|
-
});
|
|
428
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
429
|
-
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
430
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
431
|
-
const axiosError = Object.create(prototype$1);
|
|
432
|
-
utils$4.toFlatObject(error, axiosError, function filter2(obj) {
|
|
433
|
-
return obj !== Error.prototype;
|
|
434
|
-
}, (prop) => {
|
|
435
|
-
return prop !== "isAxiosError";
|
|
436
|
-
});
|
|
437
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
438
|
-
axiosError.cause = error;
|
|
439
|
-
axiosError.name = error.name;
|
|
440
|
-
customProps && Object.assign(axiosError, customProps);
|
|
441
|
-
return axiosError;
|
|
442
|
-
};
|
|
443
|
-
var httpAdapter = null;
|
|
444
|
-
function isVisitable(thing) {
|
|
445
|
-
return utils$4.isPlainObject(thing) || utils$4.isArray(thing);
|
|
446
|
-
}
|
|
447
|
-
function removeBrackets(key) {
|
|
448
|
-
return utils$4.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
449
|
-
}
|
|
450
|
-
function renderKey(path, key, dots) {
|
|
451
|
-
if (!path)
|
|
452
|
-
return key;
|
|
453
|
-
return path.concat(key).map(function each(token, i) {
|
|
454
|
-
token = removeBrackets(token);
|
|
455
|
-
return !dots && i ? "[" + token + "]" : token;
|
|
456
|
-
}).join(dots ? "." : "");
|
|
457
|
-
}
|
|
458
|
-
function isFlatArray(arr) {
|
|
459
|
-
return utils$4.isArray(arr) && !arr.some(isVisitable);
|
|
460
|
-
}
|
|
461
|
-
const predicates = utils$4.toFlatObject(utils$4, {}, null, function filter(prop) {
|
|
462
|
-
return /^is[A-Z]/.test(prop);
|
|
463
|
-
});
|
|
464
|
-
function toFormData(obj, formData, options) {
|
|
465
|
-
if (!utils$4.isObject(obj)) {
|
|
466
|
-
throw new TypeError("target must be an object");
|
|
467
|
-
}
|
|
468
|
-
formData = formData || new FormData();
|
|
469
|
-
options = utils$4.toFlatObject(options, {
|
|
470
|
-
metaTokens: true,
|
|
471
|
-
dots: false,
|
|
472
|
-
indexes: false
|
|
473
|
-
}, false, function defined(option2, source) {
|
|
474
|
-
return !utils$4.isUndefined(source[option2]);
|
|
475
|
-
});
|
|
476
|
-
const metaTokens = options.metaTokens;
|
|
477
|
-
const visitor = options.visitor || defaultVisitor;
|
|
478
|
-
const dots = options.dots;
|
|
479
|
-
const indexes = options.indexes;
|
|
480
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
481
|
-
const useBlob = _Blob && utils$4.isSpecCompliantForm(formData);
|
|
482
|
-
if (!utils$4.isFunction(visitor)) {
|
|
483
|
-
throw new TypeError("visitor must be a function");
|
|
484
|
-
}
|
|
485
|
-
function convertValue(value) {
|
|
486
|
-
if (value === null)
|
|
487
|
-
return "";
|
|
488
|
-
if (utils$4.isDate(value)) {
|
|
489
|
-
return value.toISOString();
|
|
490
|
-
}
|
|
491
|
-
if (!useBlob && utils$4.isBlob(value)) {
|
|
492
|
-
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
493
|
-
}
|
|
494
|
-
if (utils$4.isArrayBuffer(value) || utils$4.isTypedArray(value)) {
|
|
495
|
-
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
496
|
-
}
|
|
497
|
-
return value;
|
|
498
|
-
}
|
|
499
|
-
function defaultVisitor(value, key, path) {
|
|
500
|
-
let arr = value;
|
|
501
|
-
if (value && !path && typeof value === "object") {
|
|
502
|
-
if (utils$4.endsWith(key, "{}")) {
|
|
503
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
504
|
-
value = JSON.stringify(value);
|
|
505
|
-
} else if (utils$4.isArray(value) && isFlatArray(value) || (utils$4.isFileList(value) || utils$4.endsWith(key, "[]")) && (arr = utils$4.toArray(value))) {
|
|
506
|
-
key = removeBrackets(key);
|
|
507
|
-
arr.forEach(function each(el, index2) {
|
|
508
|
-
!(utils$4.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]", convertValue(el));
|
|
509
|
-
});
|
|
510
|
-
return false;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
if (isVisitable(value)) {
|
|
514
|
-
return true;
|
|
515
|
-
}
|
|
516
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
517
|
-
return false;
|
|
518
|
-
}
|
|
519
|
-
const stack = [];
|
|
520
|
-
const exposedHelpers = Object.assign(predicates, {
|
|
521
|
-
defaultVisitor,
|
|
522
|
-
convertValue,
|
|
523
|
-
isVisitable
|
|
524
|
-
});
|
|
525
|
-
function build(value, path) {
|
|
526
|
-
if (utils$4.isUndefined(value))
|
|
527
|
-
return;
|
|
528
|
-
if (stack.indexOf(value) !== -1) {
|
|
529
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
530
|
-
}
|
|
531
|
-
stack.push(value);
|
|
532
|
-
utils$4.forEach(value, function each(el, key) {
|
|
533
|
-
const result = !(utils$4.isUndefined(el) || el === null) && visitor.call(formData, el, utils$4.isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
534
|
-
if (result === true) {
|
|
535
|
-
build(el, path ? path.concat(key) : [key]);
|
|
536
|
-
}
|
|
537
|
-
});
|
|
538
|
-
stack.pop();
|
|
539
|
-
}
|
|
540
|
-
if (!utils$4.isObject(obj)) {
|
|
541
|
-
throw new TypeError("data must be an object");
|
|
542
|
-
}
|
|
543
|
-
build(obj);
|
|
544
|
-
return formData;
|
|
545
|
-
}
|
|
546
|
-
function encode$2(str) {
|
|
547
|
-
const charMap = {
|
|
548
|
-
"!": "%21",
|
|
549
|
-
"'": "%27",
|
|
550
|
-
"(": "%28",
|
|
551
|
-
")": "%29",
|
|
552
|
-
"~": "%7E",
|
|
553
|
-
"%20": "+",
|
|
554
|
-
"%00": "\0"
|
|
555
|
-
};
|
|
556
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
557
|
-
return charMap[match];
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
function AxiosURLSearchParams(params, options) {
|
|
561
|
-
this._pairs = [];
|
|
562
|
-
params && toFormData(params, this, options);
|
|
563
|
-
}
|
|
564
|
-
const prototype = AxiosURLSearchParams.prototype;
|
|
565
|
-
prototype.append = function append(name, value) {
|
|
566
|
-
this._pairs.push([name, value]);
|
|
567
|
-
};
|
|
568
|
-
prototype.toString = function toString2(encoder) {
|
|
569
|
-
const _encode = encoder ? function(value) {
|
|
570
|
-
return encoder.call(this, value, encode$2);
|
|
571
|
-
} : encode$2;
|
|
572
|
-
return this._pairs.map(function each(pair) {
|
|
573
|
-
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
574
|
-
}, "").join("&");
|
|
575
|
-
};
|
|
576
|
-
function encode$1(val) {
|
|
577
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
578
|
-
}
|
|
579
|
-
function buildURL(url, params, options) {
|
|
580
|
-
if (!params) {
|
|
581
|
-
return url;
|
|
582
|
-
}
|
|
583
|
-
const _encode = options && options.encode || encode$1;
|
|
584
|
-
const serializeFn = options && options.serialize;
|
|
585
|
-
let serializedParams;
|
|
586
|
-
if (serializeFn) {
|
|
587
|
-
serializedParams = serializeFn(params, options);
|
|
588
|
-
} else {
|
|
589
|
-
serializedParams = utils$4.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
590
|
-
}
|
|
591
|
-
if (serializedParams) {
|
|
592
|
-
const hashmarkIndex = url.indexOf("#");
|
|
593
|
-
if (hashmarkIndex !== -1) {
|
|
594
|
-
url = url.slice(0, hashmarkIndex);
|
|
595
|
-
}
|
|
596
|
-
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
597
|
-
}
|
|
598
|
-
return url;
|
|
599
|
-
}
|
|
600
|
-
class InterceptorManager {
|
|
601
|
-
constructor() {
|
|
602
|
-
this.handlers = [];
|
|
603
|
-
}
|
|
604
|
-
use(fulfilled, rejected, options) {
|
|
605
|
-
this.handlers.push({
|
|
606
|
-
fulfilled,
|
|
607
|
-
rejected,
|
|
608
|
-
synchronous: options ? options.synchronous : false,
|
|
609
|
-
runWhen: options ? options.runWhen : null
|
|
610
|
-
});
|
|
611
|
-
return this.handlers.length - 1;
|
|
612
|
-
}
|
|
613
|
-
eject(id) {
|
|
614
|
-
if (this.handlers[id]) {
|
|
615
|
-
this.handlers[id] = null;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
clear() {
|
|
619
|
-
if (this.handlers) {
|
|
620
|
-
this.handlers = [];
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
forEach(fn) {
|
|
624
|
-
utils$4.forEach(this.handlers, function forEachHandler(h) {
|
|
625
|
-
if (h !== null) {
|
|
626
|
-
fn(h);
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
var InterceptorManager$1 = InterceptorManager;
|
|
632
|
-
var transitionalDefaults = {
|
|
633
|
-
silentJSONParsing: true,
|
|
634
|
-
forcedJSONParsing: true,
|
|
635
|
-
clarifyTimeoutError: false
|
|
636
|
-
};
|
|
637
|
-
var URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
638
|
-
var FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
639
|
-
var Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
640
|
-
var platform$1 = {
|
|
641
|
-
isBrowser: true,
|
|
642
|
-
classes: {
|
|
643
|
-
URLSearchParams: URLSearchParams$1,
|
|
644
|
-
FormData: FormData$1,
|
|
645
|
-
Blob: Blob$1
|
|
646
|
-
},
|
|
647
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
648
|
-
};
|
|
649
|
-
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
650
|
-
const hasStandardBrowserEnv = ((product) => {
|
|
651
|
-
return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
|
|
652
|
-
})(typeof navigator !== "undefined" && navigator.product);
|
|
653
|
-
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
654
|
-
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
655
|
-
})();
|
|
656
|
-
var utils$3 = /* @__PURE__ */ Object.freeze({
|
|
657
|
-
__proto__: null,
|
|
658
|
-
[Symbol.toStringTag]: "Module",
|
|
659
|
-
hasBrowserEnv,
|
|
660
|
-
hasStandardBrowserWebWorkerEnv,
|
|
661
|
-
hasStandardBrowserEnv
|
|
662
|
-
});
|
|
663
|
-
var platform = __spreadValues(__spreadValues({}, utils$3), platform$1);
|
|
664
|
-
function toURLEncodedForm(data, options) {
|
|
665
|
-
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
666
|
-
visitor: function(value, key, path, helpers) {
|
|
667
|
-
if (platform.isNode && utils$4.isBuffer(value)) {
|
|
668
|
-
this.append(key, value.toString("base64"));
|
|
669
|
-
return false;
|
|
670
|
-
}
|
|
671
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
672
|
-
}
|
|
673
|
-
}, options));
|
|
674
|
-
}
|
|
675
|
-
function parsePropPath(name) {
|
|
676
|
-
return utils$4.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
677
|
-
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
function arrayToObject$1(arr) {
|
|
681
|
-
const obj = {};
|
|
682
|
-
const keys = Object.keys(arr);
|
|
683
|
-
let i;
|
|
684
|
-
const len = keys.length;
|
|
685
|
-
let key;
|
|
686
|
-
for (i = 0; i < len; i++) {
|
|
687
|
-
key = keys[i];
|
|
688
|
-
obj[key] = arr[key];
|
|
689
|
-
}
|
|
690
|
-
return obj;
|
|
691
|
-
}
|
|
692
|
-
function formDataToJSON(formData) {
|
|
693
|
-
function buildPath(path, value, target, index2) {
|
|
694
|
-
let name = path[index2++];
|
|
695
|
-
const isNumericKey = Number.isFinite(+name);
|
|
696
|
-
const isLast = index2 >= path.length;
|
|
697
|
-
name = !name && utils$4.isArray(target) ? target.length : name;
|
|
698
|
-
if (isLast) {
|
|
699
|
-
if (utils$4.hasOwnProp(target, name)) {
|
|
700
|
-
target[name] = [target[name], value];
|
|
701
|
-
} else {
|
|
702
|
-
target[name] = value;
|
|
703
|
-
}
|
|
704
|
-
return !isNumericKey;
|
|
705
|
-
}
|
|
706
|
-
if (!target[name] || !utils$4.isObject(target[name])) {
|
|
707
|
-
target[name] = [];
|
|
708
|
-
}
|
|
709
|
-
const result = buildPath(path, value, target[name], index2);
|
|
710
|
-
if (result && utils$4.isArray(target[name])) {
|
|
711
|
-
target[name] = arrayToObject$1(target[name]);
|
|
712
|
-
}
|
|
713
|
-
return !isNumericKey;
|
|
714
|
-
}
|
|
715
|
-
if (utils$4.isFormData(formData) && utils$4.isFunction(formData.entries)) {
|
|
716
|
-
const obj = {};
|
|
717
|
-
utils$4.forEachEntry(formData, (name, value) => {
|
|
718
|
-
buildPath(parsePropPath(name), value, obj, 0);
|
|
719
|
-
});
|
|
720
|
-
return obj;
|
|
721
|
-
}
|
|
722
|
-
return null;
|
|
723
|
-
}
|
|
724
|
-
function stringifySafely(rawValue, parser, encoder) {
|
|
725
|
-
if (utils$4.isString(rawValue)) {
|
|
726
|
-
try {
|
|
727
|
-
(parser || JSON.parse)(rawValue);
|
|
728
|
-
return utils$4.trim(rawValue);
|
|
729
|
-
} catch (e) {
|
|
730
|
-
if (e.name !== "SyntaxError") {
|
|
731
|
-
throw e;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
736
|
-
}
|
|
737
|
-
const defaults$4 = {
|
|
738
|
-
transitional: transitionalDefaults,
|
|
739
|
-
adapter: ["xhr", "http"],
|
|
740
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
741
|
-
const contentType = headers.getContentType() || "";
|
|
742
|
-
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
743
|
-
const isObjectPayload = utils$4.isObject(data);
|
|
744
|
-
if (isObjectPayload && utils$4.isHTMLForm(data)) {
|
|
745
|
-
data = new FormData(data);
|
|
746
|
-
}
|
|
747
|
-
const isFormData2 = utils$4.isFormData(data);
|
|
748
|
-
if (isFormData2) {
|
|
749
|
-
if (!hasJSONContentType) {
|
|
750
|
-
return data;
|
|
751
|
-
}
|
|
752
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
753
|
-
}
|
|
754
|
-
if (utils$4.isArrayBuffer(data) || utils$4.isBuffer(data) || utils$4.isStream(data) || utils$4.isFile(data) || utils$4.isBlob(data)) {
|
|
755
|
-
return data;
|
|
756
|
-
}
|
|
757
|
-
if (utils$4.isArrayBufferView(data)) {
|
|
758
|
-
return data.buffer;
|
|
759
|
-
}
|
|
760
|
-
if (utils$4.isURLSearchParams(data)) {
|
|
761
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
762
|
-
return data.toString();
|
|
763
|
-
}
|
|
764
|
-
let isFileList2;
|
|
765
|
-
if (isObjectPayload) {
|
|
766
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
767
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
768
|
-
}
|
|
769
|
-
if ((isFileList2 = utils$4.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
770
|
-
const _FormData = this.env && this.env.FormData;
|
|
771
|
-
return toFormData(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData(), this.formSerializer);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
775
|
-
headers.setContentType("application/json", false);
|
|
776
|
-
return stringifySafely(data);
|
|
777
|
-
}
|
|
778
|
-
return data;
|
|
779
|
-
}],
|
|
780
|
-
transformResponse: [function transformResponse(data) {
|
|
781
|
-
const transitional2 = this.transitional || defaults$4.transitional;
|
|
782
|
-
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
783
|
-
const JSONRequested = this.responseType === "json";
|
|
784
|
-
if (data && utils$4.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
785
|
-
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
786
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
787
|
-
try {
|
|
788
|
-
return JSON.parse(data);
|
|
789
|
-
} catch (e) {
|
|
790
|
-
if (strictJSONParsing) {
|
|
791
|
-
if (e.name === "SyntaxError") {
|
|
792
|
-
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
793
|
-
}
|
|
794
|
-
throw e;
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
return data;
|
|
799
|
-
}],
|
|
800
|
-
timeout: 0,
|
|
801
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
802
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
803
|
-
maxContentLength: -1,
|
|
804
|
-
maxBodyLength: -1,
|
|
805
|
-
env: {
|
|
806
|
-
FormData: platform.classes.FormData,
|
|
807
|
-
Blob: platform.classes.Blob
|
|
808
|
-
},
|
|
809
|
-
validateStatus: function validateStatus(status) {
|
|
810
|
-
return status >= 200 && status < 300;
|
|
811
|
-
},
|
|
812
|
-
headers: {
|
|
813
|
-
common: {
|
|
814
|
-
"Accept": "application/json, text/plain, */*",
|
|
815
|
-
"Content-Type": void 0
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
utils$4.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
820
|
-
defaults$4.headers[method] = {};
|
|
821
|
-
});
|
|
822
|
-
var defaults$5 = defaults$4;
|
|
823
|
-
const ignoreDuplicateOf = utils$4.toObjectSet([
|
|
824
|
-
"age",
|
|
825
|
-
"authorization",
|
|
826
|
-
"content-length",
|
|
827
|
-
"content-type",
|
|
828
|
-
"etag",
|
|
829
|
-
"expires",
|
|
830
|
-
"from",
|
|
831
|
-
"host",
|
|
832
|
-
"if-modified-since",
|
|
833
|
-
"if-unmodified-since",
|
|
834
|
-
"last-modified",
|
|
835
|
-
"location",
|
|
836
|
-
"max-forwards",
|
|
837
|
-
"proxy-authorization",
|
|
838
|
-
"referer",
|
|
839
|
-
"retry-after",
|
|
840
|
-
"user-agent"
|
|
841
|
-
]);
|
|
842
|
-
var parseHeaders = (rawHeaders) => {
|
|
843
|
-
const parsed = {};
|
|
844
|
-
let key;
|
|
845
|
-
let val;
|
|
846
|
-
let i;
|
|
847
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
|
|
848
|
-
i = line.indexOf(":");
|
|
849
|
-
key = line.substring(0, i).trim().toLowerCase();
|
|
850
|
-
val = line.substring(i + 1).trim();
|
|
851
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
852
|
-
return;
|
|
853
|
-
}
|
|
854
|
-
if (key === "set-cookie") {
|
|
855
|
-
if (parsed[key]) {
|
|
856
|
-
parsed[key].push(val);
|
|
857
|
-
} else {
|
|
858
|
-
parsed[key] = [val];
|
|
859
|
-
}
|
|
860
|
-
} else {
|
|
861
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
return parsed;
|
|
865
|
-
};
|
|
866
|
-
const $internals = Symbol("internals");
|
|
867
|
-
function normalizeHeader(header) {
|
|
868
|
-
return header && String(header).trim().toLowerCase();
|
|
869
|
-
}
|
|
870
|
-
function normalizeValue(value) {
|
|
871
|
-
if (value === false || value == null) {
|
|
872
|
-
return value;
|
|
873
|
-
}
|
|
874
|
-
return utils$4.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
875
|
-
}
|
|
876
|
-
function parseTokens(str) {
|
|
877
|
-
const tokens = Object.create(null);
|
|
878
|
-
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
879
|
-
let match;
|
|
880
|
-
while (match = tokensRE.exec(str)) {
|
|
881
|
-
tokens[match[1]] = match[2];
|
|
882
|
-
}
|
|
883
|
-
return tokens;
|
|
884
|
-
}
|
|
885
|
-
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
886
|
-
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
|
|
887
|
-
if (utils$4.isFunction(filter2)) {
|
|
888
|
-
return filter2.call(this, value, header);
|
|
889
|
-
}
|
|
890
|
-
if (isHeaderNameFilter) {
|
|
891
|
-
value = header;
|
|
892
|
-
}
|
|
893
|
-
if (!utils$4.isString(value))
|
|
894
|
-
return;
|
|
895
|
-
if (utils$4.isString(filter2)) {
|
|
896
|
-
return value.indexOf(filter2) !== -1;
|
|
897
|
-
}
|
|
898
|
-
if (utils$4.isRegExp(filter2)) {
|
|
899
|
-
return filter2.test(value);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
function formatHeader(header) {
|
|
903
|
-
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
|
|
904
|
-
return char.toUpperCase() + str;
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
function buildAccessors(obj, header) {
|
|
908
|
-
const accessorName = utils$4.toCamelCase(" " + header);
|
|
909
|
-
["get", "set", "has"].forEach((methodName) => {
|
|
910
|
-
Object.defineProperty(obj, methodName + accessorName, {
|
|
911
|
-
value: function(arg1, arg2, arg3) {
|
|
912
|
-
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
913
|
-
},
|
|
914
|
-
configurable: true
|
|
915
|
-
});
|
|
916
|
-
});
|
|
917
|
-
}
|
|
918
|
-
class AxiosHeaders {
|
|
919
|
-
constructor(headers) {
|
|
920
|
-
headers && this.set(headers);
|
|
921
|
-
}
|
|
922
|
-
set(header, valueOrRewrite, rewrite) {
|
|
923
|
-
const self2 = this;
|
|
924
|
-
function setHeader(_value, _header, _rewrite) {
|
|
925
|
-
const lHeader = normalizeHeader(_header);
|
|
926
|
-
if (!lHeader) {
|
|
927
|
-
throw new Error("header name must be a non-empty string");
|
|
928
|
-
}
|
|
929
|
-
const key = utils$4.findKey(self2, lHeader);
|
|
930
|
-
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
931
|
-
self2[key || _header] = normalizeValue(_value);
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
const setHeaders = (headers, _rewrite) => utils$4.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
935
|
-
if (utils$4.isPlainObject(header) || header instanceof this.constructor) {
|
|
936
|
-
setHeaders(header, valueOrRewrite);
|
|
937
|
-
} else if (utils$4.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
938
|
-
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
939
|
-
} else {
|
|
940
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
941
|
-
}
|
|
942
|
-
return this;
|
|
943
|
-
}
|
|
944
|
-
get(header, parser) {
|
|
945
|
-
header = normalizeHeader(header);
|
|
946
|
-
if (header) {
|
|
947
|
-
const key = utils$4.findKey(this, header);
|
|
948
|
-
if (key) {
|
|
949
|
-
const value = this[key];
|
|
950
|
-
if (!parser) {
|
|
951
|
-
return value;
|
|
952
|
-
}
|
|
953
|
-
if (parser === true) {
|
|
954
|
-
return parseTokens(value);
|
|
955
|
-
}
|
|
956
|
-
if (utils$4.isFunction(parser)) {
|
|
957
|
-
return parser.call(this, value, key);
|
|
958
|
-
}
|
|
959
|
-
if (utils$4.isRegExp(parser)) {
|
|
960
|
-
return parser.exec(value);
|
|
961
|
-
}
|
|
962
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
has(header, matcher) {
|
|
967
|
-
header = normalizeHeader(header);
|
|
968
|
-
if (header) {
|
|
969
|
-
const key = utils$4.findKey(this, header);
|
|
970
|
-
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
971
|
-
}
|
|
972
|
-
return false;
|
|
973
|
-
}
|
|
974
|
-
delete(header, matcher) {
|
|
975
|
-
const self2 = this;
|
|
976
|
-
let deleted = false;
|
|
977
|
-
function deleteHeader(_header) {
|
|
978
|
-
_header = normalizeHeader(_header);
|
|
979
|
-
if (_header) {
|
|
980
|
-
const key = utils$4.findKey(self2, _header);
|
|
981
|
-
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
982
|
-
delete self2[key];
|
|
983
|
-
deleted = true;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
if (utils$4.isArray(header)) {
|
|
988
|
-
header.forEach(deleteHeader);
|
|
989
|
-
} else {
|
|
990
|
-
deleteHeader(header);
|
|
991
|
-
}
|
|
992
|
-
return deleted;
|
|
993
|
-
}
|
|
994
|
-
clear(matcher) {
|
|
995
|
-
const keys = Object.keys(this);
|
|
996
|
-
let i = keys.length;
|
|
997
|
-
let deleted = false;
|
|
998
|
-
while (i--) {
|
|
999
|
-
const key = keys[i];
|
|
1000
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
1001
|
-
delete this[key];
|
|
1002
|
-
deleted = true;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
return deleted;
|
|
1006
|
-
}
|
|
1007
|
-
normalize(format) {
|
|
1008
|
-
const self2 = this;
|
|
1009
|
-
const headers = {};
|
|
1010
|
-
utils$4.forEach(this, (value, header) => {
|
|
1011
|
-
const key = utils$4.findKey(headers, header);
|
|
1012
|
-
if (key) {
|
|
1013
|
-
self2[key] = normalizeValue(value);
|
|
1014
|
-
delete self2[header];
|
|
1015
|
-
return;
|
|
1016
|
-
}
|
|
1017
|
-
const normalized = format ? formatHeader(header) : String(header).trim();
|
|
1018
|
-
if (normalized !== header) {
|
|
1019
|
-
delete self2[header];
|
|
1020
|
-
}
|
|
1021
|
-
self2[normalized] = normalizeValue(value);
|
|
1022
|
-
headers[normalized] = true;
|
|
1023
|
-
});
|
|
1024
|
-
return this;
|
|
1025
|
-
}
|
|
1026
|
-
concat(...targets) {
|
|
1027
|
-
return this.constructor.concat(this, ...targets);
|
|
1028
|
-
}
|
|
1029
|
-
toJSON(asStrings) {
|
|
1030
|
-
const obj = Object.create(null);
|
|
1031
|
-
utils$4.forEach(this, (value, header) => {
|
|
1032
|
-
value != null && value !== false && (obj[header] = asStrings && utils$4.isArray(value) ? value.join(", ") : value);
|
|
1033
|
-
});
|
|
1034
|
-
return obj;
|
|
1035
|
-
}
|
|
1036
|
-
[Symbol.iterator]() {
|
|
1037
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1038
|
-
}
|
|
1039
|
-
toString() {
|
|
1040
|
-
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
1041
|
-
}
|
|
1042
|
-
get [Symbol.toStringTag]() {
|
|
1043
|
-
return "AxiosHeaders";
|
|
1044
|
-
}
|
|
1045
|
-
static from(thing) {
|
|
1046
|
-
return thing instanceof this ? thing : new this(thing);
|
|
1047
|
-
}
|
|
1048
|
-
static concat(first, ...targets) {
|
|
1049
|
-
const computed = new this(first);
|
|
1050
|
-
targets.forEach((target) => computed.set(target));
|
|
1051
|
-
return computed;
|
|
1052
|
-
}
|
|
1053
|
-
static accessor(header) {
|
|
1054
|
-
const internals = this[$internals] = this[$internals] = {
|
|
1055
|
-
accessors: {}
|
|
1056
|
-
};
|
|
1057
|
-
const accessors = internals.accessors;
|
|
1058
|
-
const prototype2 = this.prototype;
|
|
1059
|
-
function defineAccessor(_header) {
|
|
1060
|
-
const lHeader = normalizeHeader(_header);
|
|
1061
|
-
if (!accessors[lHeader]) {
|
|
1062
|
-
buildAccessors(prototype2, _header);
|
|
1063
|
-
accessors[lHeader] = true;
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
utils$4.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1067
|
-
return this;
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1071
|
-
utils$4.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
1072
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
1073
|
-
return {
|
|
1074
|
-
get: () => value,
|
|
1075
|
-
set(headerValue) {
|
|
1076
|
-
this[mapped] = headerValue;
|
|
1077
|
-
}
|
|
1078
|
-
};
|
|
1079
|
-
});
|
|
1080
|
-
utils$4.freezeMethods(AxiosHeaders);
|
|
1081
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
1082
|
-
function transformData(fns, response) {
|
|
1083
|
-
const config = this || defaults$5;
|
|
1084
|
-
const context = response || config;
|
|
1085
|
-
const headers = AxiosHeaders$1.from(context.headers);
|
|
1086
|
-
let data = context.data;
|
|
1087
|
-
utils$4.forEach(fns, function transform(fn) {
|
|
1088
|
-
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
1089
|
-
});
|
|
1090
|
-
headers.normalize();
|
|
1091
|
-
return data;
|
|
1092
|
-
}
|
|
1093
|
-
function isCancel(value) {
|
|
1094
|
-
return !!(value && value.__CANCEL__);
|
|
1095
|
-
}
|
|
1096
|
-
function CanceledError(message, config, request) {
|
|
1097
|
-
AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
|
|
1098
|
-
this.name = "CanceledError";
|
|
1099
|
-
}
|
|
1100
|
-
utils$4.inherits(CanceledError, AxiosError, {
|
|
1101
|
-
__CANCEL__: true
|
|
1102
|
-
});
|
|
1103
|
-
function settle(resolve, reject, response) {
|
|
1104
|
-
const validateStatus2 = response.config.validateStatus;
|
|
1105
|
-
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
1106
|
-
resolve(response);
|
|
1107
|
-
} else {
|
|
1108
|
-
reject(new AxiosError("Request failed with status code " + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
var cookies = platform.hasStandardBrowserEnv ? {
|
|
1112
|
-
write(name, value, expires, path, domain, secure) {
|
|
1113
|
-
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
1114
|
-
utils$4.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
1115
|
-
utils$4.isString(path) && cookie.push("path=" + path);
|
|
1116
|
-
utils$4.isString(domain) && cookie.push("domain=" + domain);
|
|
1117
|
-
secure === true && cookie.push("secure");
|
|
1118
|
-
document.cookie = cookie.join("; ");
|
|
1119
|
-
},
|
|
1120
|
-
read(name) {
|
|
1121
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
1122
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
1123
|
-
},
|
|
1124
|
-
remove(name) {
|
|
1125
|
-
this.write(name, "", Date.now() - 864e5);
|
|
1126
|
-
}
|
|
1127
|
-
} : {
|
|
1128
|
-
write() {
|
|
1129
|
-
},
|
|
1130
|
-
read() {
|
|
1131
|
-
return null;
|
|
1132
|
-
},
|
|
1133
|
-
remove() {
|
|
1134
|
-
}
|
|
1135
|
-
};
|
|
1136
|
-
function isAbsoluteURL(url) {
|
|
1137
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
1138
|
-
}
|
|
1139
|
-
function combineURLs(baseURL, relativeURL) {
|
|
1140
|
-
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
1141
|
-
}
|
|
1142
|
-
function buildFullPath(baseURL, requestedURL) {
|
|
1143
|
-
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
1144
|
-
return combineURLs(baseURL, requestedURL);
|
|
1145
|
-
}
|
|
1146
|
-
return requestedURL;
|
|
1147
|
-
}
|
|
1148
|
-
var isURLSameOrigin = platform.hasStandardBrowserEnv ? function standardBrowserEnv() {
|
|
1149
|
-
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
1150
|
-
const urlParsingNode = document.createElement("a");
|
|
1151
|
-
let originURL;
|
|
1152
|
-
function resolveURL(url) {
|
|
1153
|
-
let href = url;
|
|
1154
|
-
if (msie) {
|
|
1155
|
-
urlParsingNode.setAttribute("href", href);
|
|
1156
|
-
href = urlParsingNode.href;
|
|
1157
|
-
}
|
|
1158
|
-
urlParsingNode.setAttribute("href", href);
|
|
1159
|
-
return {
|
|
1160
|
-
href: urlParsingNode.href,
|
|
1161
|
-
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "",
|
|
1162
|
-
host: urlParsingNode.host,
|
|
1163
|
-
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "",
|
|
1164
|
-
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "",
|
|
1165
|
-
hostname: urlParsingNode.hostname,
|
|
1166
|
-
port: urlParsingNode.port,
|
|
1167
|
-
pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname
|
|
1168
|
-
};
|
|
1169
|
-
}
|
|
1170
|
-
originURL = resolveURL(window.location.href);
|
|
1171
|
-
return function isURLSameOrigin2(requestURL) {
|
|
1172
|
-
const parsed = utils$4.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
1173
|
-
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
1174
|
-
};
|
|
1175
|
-
}() : function nonStandardBrowserEnv() {
|
|
1176
|
-
return function isURLSameOrigin2() {
|
|
1177
|
-
return true;
|
|
1178
|
-
};
|
|
1179
|
-
}();
|
|
1180
|
-
function parseProtocol(url) {
|
|
1181
|
-
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
1182
|
-
return match && match[1] || "";
|
|
1183
|
-
}
|
|
1184
|
-
function speedometer(samplesCount, min) {
|
|
1185
|
-
samplesCount = samplesCount || 10;
|
|
1186
|
-
const bytes = new Array(samplesCount);
|
|
1187
|
-
const timestamps = new Array(samplesCount);
|
|
1188
|
-
let head = 0;
|
|
1189
|
-
let tail = 0;
|
|
1190
|
-
let firstSampleTS;
|
|
1191
|
-
min = min !== void 0 ? min : 1e3;
|
|
1192
|
-
return function push2(chunkLength) {
|
|
1193
|
-
const now = Date.now();
|
|
1194
|
-
const startedAt = timestamps[tail];
|
|
1195
|
-
if (!firstSampleTS) {
|
|
1196
|
-
firstSampleTS = now;
|
|
1197
|
-
}
|
|
1198
|
-
bytes[head] = chunkLength;
|
|
1199
|
-
timestamps[head] = now;
|
|
1200
|
-
let i = tail;
|
|
1201
|
-
let bytesCount = 0;
|
|
1202
|
-
while (i !== head) {
|
|
1203
|
-
bytesCount += bytes[i++];
|
|
1204
|
-
i = i % samplesCount;
|
|
1205
|
-
}
|
|
1206
|
-
head = (head + 1) % samplesCount;
|
|
1207
|
-
if (head === tail) {
|
|
1208
|
-
tail = (tail + 1) % samplesCount;
|
|
1209
|
-
}
|
|
1210
|
-
if (now - firstSampleTS < min) {
|
|
1211
|
-
return;
|
|
1212
|
-
}
|
|
1213
|
-
const passed = startedAt && now - startedAt;
|
|
1214
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
1215
|
-
};
|
|
1216
|
-
}
|
|
1217
|
-
function progressEventReducer(listener, isDownloadStream) {
|
|
1218
|
-
let bytesNotified = 0;
|
|
1219
|
-
const _speedometer = speedometer(50, 250);
|
|
1220
|
-
return (e) => {
|
|
1221
|
-
const loaded = e.loaded;
|
|
1222
|
-
const total = e.lengthComputable ? e.total : void 0;
|
|
1223
|
-
const progressBytes = loaded - bytesNotified;
|
|
1224
|
-
const rate = _speedometer(progressBytes);
|
|
1225
|
-
const inRange = loaded <= total;
|
|
1226
|
-
bytesNotified = loaded;
|
|
1227
|
-
const data = {
|
|
1228
|
-
loaded,
|
|
1229
|
-
total,
|
|
1230
|
-
progress: total ? loaded / total : void 0,
|
|
1231
|
-
bytes: progressBytes,
|
|
1232
|
-
rate: rate ? rate : void 0,
|
|
1233
|
-
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
1234
|
-
event: e
|
|
1235
|
-
};
|
|
1236
|
-
data[isDownloadStream ? "download" : "upload"] = true;
|
|
1237
|
-
listener(data);
|
|
1238
|
-
};
|
|
1239
|
-
}
|
|
1240
|
-
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
1241
|
-
var xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
1242
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
1243
|
-
let requestData = config.data;
|
|
1244
|
-
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
1245
|
-
let { responseType, withXSRFToken } = config;
|
|
1246
|
-
let onCanceled;
|
|
1247
|
-
function done() {
|
|
1248
|
-
if (config.cancelToken) {
|
|
1249
|
-
config.cancelToken.unsubscribe(onCanceled);
|
|
1250
|
-
}
|
|
1251
|
-
if (config.signal) {
|
|
1252
|
-
config.signal.removeEventListener("abort", onCanceled);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
let contentType;
|
|
1256
|
-
if (utils$4.isFormData(requestData)) {
|
|
1257
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
1258
|
-
requestHeaders.setContentType(false);
|
|
1259
|
-
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
1260
|
-
const [type, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
1261
|
-
requestHeaders.setContentType([type || "multipart/form-data", ...tokens].join("; "));
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
let request = new XMLHttpRequest();
|
|
1265
|
-
if (config.auth) {
|
|
1266
|
-
const username = config.auth.username || "";
|
|
1267
|
-
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : "";
|
|
1268
|
-
requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password));
|
|
1269
|
-
}
|
|
1270
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
1271
|
-
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
1272
|
-
request.timeout = config.timeout;
|
|
1273
|
-
function onloadend() {
|
|
1274
|
-
if (!request) {
|
|
1275
|
-
return;
|
|
1276
|
-
}
|
|
1277
|
-
const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
|
|
1278
|
-
const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
|
|
1279
|
-
const response = {
|
|
1280
|
-
data: responseData,
|
|
1281
|
-
status: request.status,
|
|
1282
|
-
statusText: request.statusText,
|
|
1283
|
-
headers: responseHeaders,
|
|
1284
|
-
config,
|
|
1285
|
-
request
|
|
1286
|
-
};
|
|
1287
|
-
settle(function _resolve(value) {
|
|
1288
|
-
resolve(value);
|
|
1289
|
-
done();
|
|
1290
|
-
}, function _reject(err) {
|
|
1291
|
-
reject(err);
|
|
1292
|
-
done();
|
|
1293
|
-
}, response);
|
|
1294
|
-
request = null;
|
|
1295
|
-
}
|
|
1296
|
-
if ("onloadend" in request) {
|
|
1297
|
-
request.onloadend = onloadend;
|
|
1298
|
-
} else {
|
|
1299
|
-
request.onreadystatechange = function handleLoad() {
|
|
1300
|
-
if (!request || request.readyState !== 4) {
|
|
1301
|
-
return;
|
|
1302
|
-
}
|
|
1303
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
|
|
1304
|
-
return;
|
|
1305
|
-
}
|
|
1306
|
-
setTimeout(onloadend);
|
|
1307
|
-
};
|
|
1308
|
-
}
|
|
1309
|
-
request.onabort = function handleAbort() {
|
|
1310
|
-
if (!request) {
|
|
1311
|
-
return;
|
|
1312
|
-
}
|
|
1313
|
-
reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
|
|
1314
|
-
request = null;
|
|
1315
|
-
};
|
|
1316
|
-
request.onerror = function handleError() {
|
|
1317
|
-
reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request));
|
|
1318
|
-
request = null;
|
|
1319
|
-
};
|
|
1320
|
-
request.ontimeout = function handleTimeout() {
|
|
1321
|
-
let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
|
|
1322
|
-
const transitional2 = config.transitional || transitionalDefaults;
|
|
1323
|
-
if (config.timeoutErrorMessage) {
|
|
1324
|
-
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
1325
|
-
}
|
|
1326
|
-
reject(new AxiosError(timeoutErrorMessage, transitional2.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
|
|
1327
|
-
request = null;
|
|
1328
|
-
};
|
|
1329
|
-
if (platform.hasStandardBrowserEnv) {
|
|
1330
|
-
withXSRFToken && utils$4.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
1331
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
|
|
1332
|
-
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
1333
|
-
if (xsrfValue) {
|
|
1334
|
-
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
}
|
|
1338
|
-
requestData === void 0 && requestHeaders.setContentType(null);
|
|
1339
|
-
if ("setRequestHeader" in request) {
|
|
1340
|
-
utils$4.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
1341
|
-
request.setRequestHeader(key, val);
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1344
|
-
if (!utils$4.isUndefined(config.withCredentials)) {
|
|
1345
|
-
request.withCredentials = !!config.withCredentials;
|
|
1346
|
-
}
|
|
1347
|
-
if (responseType && responseType !== "json") {
|
|
1348
|
-
request.responseType = config.responseType;
|
|
1349
|
-
}
|
|
1350
|
-
if (typeof config.onDownloadProgress === "function") {
|
|
1351
|
-
request.addEventListener("progress", progressEventReducer(config.onDownloadProgress, true));
|
|
1352
|
-
}
|
|
1353
|
-
if (typeof config.onUploadProgress === "function" && request.upload) {
|
|
1354
|
-
request.upload.addEventListener("progress", progressEventReducer(config.onUploadProgress));
|
|
1355
|
-
}
|
|
1356
|
-
if (config.cancelToken || config.signal) {
|
|
1357
|
-
onCanceled = (cancel) => {
|
|
1358
|
-
if (!request) {
|
|
1359
|
-
return;
|
|
1360
|
-
}
|
|
1361
|
-
reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
|
|
1362
|
-
request.abort();
|
|
1363
|
-
request = null;
|
|
1364
|
-
};
|
|
1365
|
-
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
1366
|
-
if (config.signal) {
|
|
1367
|
-
config.signal.aborted ? onCanceled() : config.signal.addEventListener("abort", onCanceled);
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
const protocol = parseProtocol(fullPath);
|
|
1371
|
-
if (protocol && platform.protocols.indexOf(protocol) === -1) {
|
|
1372
|
-
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
1373
|
-
return;
|
|
1374
|
-
}
|
|
1375
|
-
request.send(requestData || null);
|
|
1376
|
-
});
|
|
1377
|
-
};
|
|
1378
|
-
const knownAdapters = {
|
|
1379
|
-
http: httpAdapter,
|
|
1380
|
-
xhr: xhrAdapter
|
|
1381
|
-
};
|
|
1382
|
-
utils$4.forEach(knownAdapters, (fn, value) => {
|
|
1383
|
-
if (fn) {
|
|
1384
|
-
try {
|
|
1385
|
-
Object.defineProperty(fn, "name", { value });
|
|
1386
|
-
} catch (e) {
|
|
1387
|
-
}
|
|
1388
|
-
Object.defineProperty(fn, "adapterName", { value });
|
|
1389
|
-
}
|
|
1390
|
-
});
|
|
1391
|
-
const renderReason = (reason) => `- ${reason}`;
|
|
1392
|
-
const isResolvedHandle = (adapter) => utils$4.isFunction(adapter) || adapter === null || adapter === false;
|
|
1393
|
-
var adapters = {
|
|
1394
|
-
getAdapter: (adapters2) => {
|
|
1395
|
-
adapters2 = utils$4.isArray(adapters2) ? adapters2 : [adapters2];
|
|
1396
|
-
const { length } = adapters2;
|
|
1397
|
-
let nameOrAdapter;
|
|
1398
|
-
let adapter;
|
|
1399
|
-
const rejectedReasons = {};
|
|
1400
|
-
for (let i = 0; i < length; i++) {
|
|
1401
|
-
nameOrAdapter = adapters2[i];
|
|
1402
|
-
let id;
|
|
1403
|
-
adapter = nameOrAdapter;
|
|
1404
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
1405
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
1406
|
-
if (adapter === void 0) {
|
|
1407
|
-
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
if (adapter) {
|
|
1411
|
-
break;
|
|
1412
|
-
}
|
|
1413
|
-
rejectedReasons[id || "#" + i] = adapter;
|
|
1414
|
-
}
|
|
1415
|
-
if (!adapter) {
|
|
1416
|
-
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
1417
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
1418
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
|
|
1419
|
-
}
|
|
1420
|
-
return adapter;
|
|
1421
|
-
},
|
|
1422
|
-
adapters: knownAdapters
|
|
1423
|
-
};
|
|
1424
|
-
function throwIfCancellationRequested(config) {
|
|
1425
|
-
if (config.cancelToken) {
|
|
1426
|
-
config.cancelToken.throwIfRequested();
|
|
1427
|
-
}
|
|
1428
|
-
if (config.signal && config.signal.aborted) {
|
|
1429
|
-
throw new CanceledError(null, config);
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
function dispatchRequest(config) {
|
|
1433
|
-
throwIfCancellationRequested(config);
|
|
1434
|
-
config.headers = AxiosHeaders$1.from(config.headers);
|
|
1435
|
-
config.data = transformData.call(config, config.transformRequest);
|
|
1436
|
-
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
1437
|
-
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
1438
|
-
}
|
|
1439
|
-
const adapter = adapters.getAdapter(config.adapter || defaults$5.adapter);
|
|
1440
|
-
return adapter(config).then(function onAdapterResolution(response) {
|
|
1441
|
-
throwIfCancellationRequested(config);
|
|
1442
|
-
response.data = transformData.call(config, config.transformResponse, response);
|
|
1443
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
1444
|
-
return response;
|
|
1445
|
-
}, function onAdapterRejection(reason) {
|
|
1446
|
-
if (!isCancel(reason)) {
|
|
1447
|
-
throwIfCancellationRequested(config);
|
|
1448
|
-
if (reason && reason.response) {
|
|
1449
|
-
reason.response.data = transformData.call(config, config.transformResponse, reason.response);
|
|
1450
|
-
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
return Promise.reject(reason);
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
|
|
1457
|
-
function mergeConfig(config1, config2) {
|
|
1458
|
-
config2 = config2 || {};
|
|
1459
|
-
const config = {};
|
|
1460
|
-
function getMergedValue(target, source, caseless) {
|
|
1461
|
-
if (utils$4.isPlainObject(target) && utils$4.isPlainObject(source)) {
|
|
1462
|
-
return utils$4.merge.call({ caseless }, target, source);
|
|
1463
|
-
} else if (utils$4.isPlainObject(source)) {
|
|
1464
|
-
return utils$4.merge({}, source);
|
|
1465
|
-
} else if (utils$4.isArray(source)) {
|
|
1466
|
-
return source.slice();
|
|
1467
|
-
}
|
|
1468
|
-
return source;
|
|
1469
|
-
}
|
|
1470
|
-
function mergeDeepProperties(a, b, caseless) {
|
|
1471
|
-
if (!utils$4.isUndefined(b)) {
|
|
1472
|
-
return getMergedValue(a, b, caseless);
|
|
1473
|
-
} else if (!utils$4.isUndefined(a)) {
|
|
1474
|
-
return getMergedValue(void 0, a, caseless);
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
function valueFromConfig2(a, b) {
|
|
1478
|
-
if (!utils$4.isUndefined(b)) {
|
|
1479
|
-
return getMergedValue(void 0, b);
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
function defaultToConfig2(a, b) {
|
|
1483
|
-
if (!utils$4.isUndefined(b)) {
|
|
1484
|
-
return getMergedValue(void 0, b);
|
|
1485
|
-
} else if (!utils$4.isUndefined(a)) {
|
|
1486
|
-
return getMergedValue(void 0, a);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
function mergeDirectKeys(a, b, prop) {
|
|
1490
|
-
if (prop in config2) {
|
|
1491
|
-
return getMergedValue(a, b);
|
|
1492
|
-
} else if (prop in config1) {
|
|
1493
|
-
return getMergedValue(void 0, a);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
const mergeMap = {
|
|
1497
|
-
url: valueFromConfig2,
|
|
1498
|
-
method: valueFromConfig2,
|
|
1499
|
-
data: valueFromConfig2,
|
|
1500
|
-
baseURL: defaultToConfig2,
|
|
1501
|
-
transformRequest: defaultToConfig2,
|
|
1502
|
-
transformResponse: defaultToConfig2,
|
|
1503
|
-
paramsSerializer: defaultToConfig2,
|
|
1504
|
-
timeout: defaultToConfig2,
|
|
1505
|
-
timeoutMessage: defaultToConfig2,
|
|
1506
|
-
withCredentials: defaultToConfig2,
|
|
1507
|
-
withXSRFToken: defaultToConfig2,
|
|
1508
|
-
adapter: defaultToConfig2,
|
|
1509
|
-
responseType: defaultToConfig2,
|
|
1510
|
-
xsrfCookieName: defaultToConfig2,
|
|
1511
|
-
xsrfHeaderName: defaultToConfig2,
|
|
1512
|
-
onUploadProgress: defaultToConfig2,
|
|
1513
|
-
onDownloadProgress: defaultToConfig2,
|
|
1514
|
-
decompress: defaultToConfig2,
|
|
1515
|
-
maxContentLength: defaultToConfig2,
|
|
1516
|
-
maxBodyLength: defaultToConfig2,
|
|
1517
|
-
beforeRedirect: defaultToConfig2,
|
|
1518
|
-
transport: defaultToConfig2,
|
|
1519
|
-
httpAgent: defaultToConfig2,
|
|
1520
|
-
httpsAgent: defaultToConfig2,
|
|
1521
|
-
cancelToken: defaultToConfig2,
|
|
1522
|
-
socketPath: defaultToConfig2,
|
|
1523
|
-
responseEncoding: defaultToConfig2,
|
|
1524
|
-
validateStatus: mergeDirectKeys,
|
|
1525
|
-
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
1526
|
-
};
|
|
1527
|
-
utils$4.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
1528
|
-
const merge3 = mergeMap[prop] || mergeDeepProperties;
|
|
1529
|
-
const configValue = merge3(config1[prop], config2[prop], prop);
|
|
1530
|
-
utils$4.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config[prop] = configValue);
|
|
1531
|
-
});
|
|
1532
|
-
return config;
|
|
1533
|
-
}
|
|
1534
|
-
const VERSION = "1.6.2";
|
|
1535
|
-
const validators$1 = {};
|
|
1536
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
1537
|
-
validators$1[type] = function validator2(thing) {
|
|
1538
|
-
return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type;
|
|
1539
|
-
};
|
|
1540
|
-
});
|
|
1541
|
-
const deprecatedWarnings = {};
|
|
1542
|
-
validators$1.transitional = function transitional(validator2, version2, message) {
|
|
1543
|
-
function formatMessage(opt, desc) {
|
|
1544
|
-
return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
1545
|
-
}
|
|
1546
|
-
return (value, opt, opts) => {
|
|
1547
|
-
if (validator2 === false) {
|
|
1548
|
-
throw new AxiosError(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), AxiosError.ERR_DEPRECATED);
|
|
1549
|
-
}
|
|
1550
|
-
if (version2 && !deprecatedWarnings[opt]) {
|
|
1551
|
-
deprecatedWarnings[opt] = true;
|
|
1552
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
|
|
1553
|
-
}
|
|
1554
|
-
return validator2 ? validator2(value, opt, opts) : true;
|
|
1555
|
-
};
|
|
1556
|
-
};
|
|
1557
|
-
function assertOptions(options, schema, allowUnknown) {
|
|
1558
|
-
if (typeof options !== "object") {
|
|
1559
|
-
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
1560
|
-
}
|
|
1561
|
-
const keys = Object.keys(options);
|
|
1562
|
-
let i = keys.length;
|
|
1563
|
-
while (i-- > 0) {
|
|
1564
|
-
const opt = keys[i];
|
|
1565
|
-
const validator2 = schema[opt];
|
|
1566
|
-
if (validator2) {
|
|
1567
|
-
const value = options[opt];
|
|
1568
|
-
const result = value === void 0 || validator2(value, opt, options);
|
|
1569
|
-
if (result !== true) {
|
|
1570
|
-
throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
1571
|
-
}
|
|
1572
|
-
continue;
|
|
1573
|
-
}
|
|
1574
|
-
if (allowUnknown !== true) {
|
|
1575
|
-
throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
var validator = {
|
|
1580
|
-
assertOptions,
|
|
1581
|
-
validators: validators$1
|
|
1582
|
-
};
|
|
1583
|
-
const validators = validator.validators;
|
|
1584
|
-
class Axios {
|
|
1585
|
-
constructor(instanceConfig) {
|
|
1586
|
-
this.defaults = instanceConfig;
|
|
1587
|
-
this.interceptors = {
|
|
1588
|
-
request: new InterceptorManager$1(),
|
|
1589
|
-
response: new InterceptorManager$1()
|
|
1590
|
-
};
|
|
1591
|
-
}
|
|
1592
|
-
request(configOrUrl, config) {
|
|
1593
|
-
if (typeof configOrUrl === "string") {
|
|
1594
|
-
config = config || {};
|
|
1595
|
-
config.url = configOrUrl;
|
|
1596
|
-
} else {
|
|
1597
|
-
config = configOrUrl || {};
|
|
1598
|
-
}
|
|
1599
|
-
config = mergeConfig(this.defaults, config);
|
|
1600
|
-
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
1601
|
-
if (transitional2 !== void 0) {
|
|
1602
|
-
validator.assertOptions(transitional2, {
|
|
1603
|
-
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1604
|
-
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1605
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
1606
|
-
}, false);
|
|
1607
|
-
}
|
|
1608
|
-
if (paramsSerializer != null) {
|
|
1609
|
-
if (utils$4.isFunction(paramsSerializer)) {
|
|
1610
|
-
config.paramsSerializer = {
|
|
1611
|
-
serialize: paramsSerializer
|
|
1612
|
-
};
|
|
1613
|
-
} else {
|
|
1614
|
-
validator.assertOptions(paramsSerializer, {
|
|
1615
|
-
encode: validators.function,
|
|
1616
|
-
serialize: validators.function
|
|
1617
|
-
}, true);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
1621
|
-
let contextHeaders = headers && utils$4.merge(headers.common, headers[config.method]);
|
|
1622
|
-
headers && utils$4.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
|
|
1623
|
-
delete headers[method];
|
|
1624
|
-
});
|
|
1625
|
-
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
1626
|
-
const requestInterceptorChain = [];
|
|
1627
|
-
let synchronousRequestInterceptors = true;
|
|
1628
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
1629
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
|
|
1630
|
-
return;
|
|
1631
|
-
}
|
|
1632
|
-
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
1633
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
1634
|
-
});
|
|
1635
|
-
const responseInterceptorChain = [];
|
|
1636
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
1637
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
1638
|
-
});
|
|
1639
|
-
let promise;
|
|
1640
|
-
let i = 0;
|
|
1641
|
-
let len;
|
|
1642
|
-
if (!synchronousRequestInterceptors) {
|
|
1643
|
-
const chain = [dispatchRequest.bind(this), void 0];
|
|
1644
|
-
chain.unshift.apply(chain, requestInterceptorChain);
|
|
1645
|
-
chain.push.apply(chain, responseInterceptorChain);
|
|
1646
|
-
len = chain.length;
|
|
1647
|
-
promise = Promise.resolve(config);
|
|
1648
|
-
while (i < len) {
|
|
1649
|
-
promise = promise.then(chain[i++], chain[i++]);
|
|
1650
|
-
}
|
|
1651
|
-
return promise;
|
|
1652
|
-
}
|
|
1653
|
-
len = requestInterceptorChain.length;
|
|
1654
|
-
let newConfig = config;
|
|
1655
|
-
i = 0;
|
|
1656
|
-
while (i < len) {
|
|
1657
|
-
const onFulfilled = requestInterceptorChain[i++];
|
|
1658
|
-
const onRejected = requestInterceptorChain[i++];
|
|
1659
|
-
try {
|
|
1660
|
-
newConfig = onFulfilled(newConfig);
|
|
1661
|
-
} catch (error) {
|
|
1662
|
-
onRejected.call(this, error);
|
|
1663
|
-
break;
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
try {
|
|
1667
|
-
promise = dispatchRequest.call(this, newConfig);
|
|
1668
|
-
} catch (error) {
|
|
1669
|
-
return Promise.reject(error);
|
|
1670
|
-
}
|
|
1671
|
-
i = 0;
|
|
1672
|
-
len = responseInterceptorChain.length;
|
|
1673
|
-
while (i < len) {
|
|
1674
|
-
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
|
|
1675
|
-
}
|
|
1676
|
-
return promise;
|
|
1677
|
-
}
|
|
1678
|
-
getUri(config) {
|
|
1679
|
-
config = mergeConfig(this.defaults, config);
|
|
1680
|
-
const fullPath = buildFullPath(config.baseURL, config.url);
|
|
1681
|
-
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
1682
|
-
}
|
|
1683
|
-
}
|
|
1684
|
-
utils$4.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
1685
|
-
Axios.prototype[method] = function(url, config) {
|
|
1686
|
-
return this.request(mergeConfig(config || {}, {
|
|
1687
|
-
method,
|
|
1688
|
-
url,
|
|
1689
|
-
data: (config || {}).data
|
|
1690
|
-
}));
|
|
1691
|
-
};
|
|
1692
|
-
});
|
|
1693
|
-
utils$4.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
1694
|
-
function generateHTTPMethod(isForm) {
|
|
1695
|
-
return function httpMethod(url, data, config) {
|
|
1696
|
-
return this.request(mergeConfig(config || {}, {
|
|
1697
|
-
method,
|
|
1698
|
-
headers: isForm ? {
|
|
1699
|
-
"Content-Type": "multipart/form-data"
|
|
1700
|
-
} : {},
|
|
1701
|
-
url,
|
|
1702
|
-
data
|
|
1703
|
-
}));
|
|
1704
|
-
};
|
|
1705
|
-
}
|
|
1706
|
-
Axios.prototype[method] = generateHTTPMethod();
|
|
1707
|
-
Axios.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
1708
|
-
});
|
|
1709
|
-
var Axios$1 = Axios;
|
|
1710
|
-
class CancelToken {
|
|
1711
|
-
constructor(executor) {
|
|
1712
|
-
if (typeof executor !== "function") {
|
|
1713
|
-
throw new TypeError("executor must be a function.");
|
|
1714
|
-
}
|
|
1715
|
-
let resolvePromise;
|
|
1716
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
1717
|
-
resolvePromise = resolve;
|
|
1718
|
-
});
|
|
1719
|
-
const token = this;
|
|
1720
|
-
this.promise.then((cancel) => {
|
|
1721
|
-
if (!token._listeners)
|
|
1722
|
-
return;
|
|
1723
|
-
let i = token._listeners.length;
|
|
1724
|
-
while (i-- > 0) {
|
|
1725
|
-
token._listeners[i](cancel);
|
|
1726
|
-
}
|
|
1727
|
-
token._listeners = null;
|
|
1728
|
-
});
|
|
1729
|
-
this.promise.then = (onfulfilled) => {
|
|
1730
|
-
let _resolve;
|
|
1731
|
-
const promise = new Promise((resolve) => {
|
|
1732
|
-
token.subscribe(resolve);
|
|
1733
|
-
_resolve = resolve;
|
|
1734
|
-
}).then(onfulfilled);
|
|
1735
|
-
promise.cancel = function reject() {
|
|
1736
|
-
token.unsubscribe(_resolve);
|
|
1737
|
-
};
|
|
1738
|
-
return promise;
|
|
1739
|
-
};
|
|
1740
|
-
executor(function cancel(message, config, request) {
|
|
1741
|
-
if (token.reason) {
|
|
1742
|
-
return;
|
|
1743
|
-
}
|
|
1744
|
-
token.reason = new CanceledError(message, config, request);
|
|
1745
|
-
resolvePromise(token.reason);
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
throwIfRequested() {
|
|
1749
|
-
if (this.reason) {
|
|
1750
|
-
throw this.reason;
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
subscribe(listener) {
|
|
1754
|
-
if (this.reason) {
|
|
1755
|
-
listener(this.reason);
|
|
1756
|
-
return;
|
|
1757
|
-
}
|
|
1758
|
-
if (this._listeners) {
|
|
1759
|
-
this._listeners.push(listener);
|
|
1760
|
-
} else {
|
|
1761
|
-
this._listeners = [listener];
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
unsubscribe(listener) {
|
|
1765
|
-
if (!this._listeners) {
|
|
1766
|
-
return;
|
|
1767
|
-
}
|
|
1768
|
-
const index2 = this._listeners.indexOf(listener);
|
|
1769
|
-
if (index2 !== -1) {
|
|
1770
|
-
this._listeners.splice(index2, 1);
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
static source() {
|
|
1774
|
-
let cancel;
|
|
1775
|
-
const token = new CancelToken(function executor(c) {
|
|
1776
|
-
cancel = c;
|
|
1777
|
-
});
|
|
1778
|
-
return {
|
|
1779
|
-
token,
|
|
1780
|
-
cancel
|
|
1781
|
-
};
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
var CancelToken$1 = CancelToken;
|
|
1785
|
-
function spread(callback) {
|
|
1786
|
-
return function wrap(arr) {
|
|
1787
|
-
return callback.apply(null, arr);
|
|
1788
|
-
};
|
|
1789
|
-
}
|
|
1790
|
-
function isAxiosError(payload) {
|
|
1791
|
-
return utils$4.isObject(payload) && payload.isAxiosError === true;
|
|
1792
|
-
}
|
|
1793
|
-
const HttpStatusCode = {
|
|
1794
|
-
Continue: 100,
|
|
1795
|
-
SwitchingProtocols: 101,
|
|
1796
|
-
Processing: 102,
|
|
1797
|
-
EarlyHints: 103,
|
|
1798
|
-
Ok: 200,
|
|
1799
|
-
Created: 201,
|
|
1800
|
-
Accepted: 202,
|
|
1801
|
-
NonAuthoritativeInformation: 203,
|
|
1802
|
-
NoContent: 204,
|
|
1803
|
-
ResetContent: 205,
|
|
1804
|
-
PartialContent: 206,
|
|
1805
|
-
MultiStatus: 207,
|
|
1806
|
-
AlreadyReported: 208,
|
|
1807
|
-
ImUsed: 226,
|
|
1808
|
-
MultipleChoices: 300,
|
|
1809
|
-
MovedPermanently: 301,
|
|
1810
|
-
Found: 302,
|
|
1811
|
-
SeeOther: 303,
|
|
1812
|
-
NotModified: 304,
|
|
1813
|
-
UseProxy: 305,
|
|
1814
|
-
Unused: 306,
|
|
1815
|
-
TemporaryRedirect: 307,
|
|
1816
|
-
PermanentRedirect: 308,
|
|
1817
|
-
BadRequest: 400,
|
|
1818
|
-
Unauthorized: 401,
|
|
1819
|
-
PaymentRequired: 402,
|
|
1820
|
-
Forbidden: 403,
|
|
1821
|
-
NotFound: 404,
|
|
1822
|
-
MethodNotAllowed: 405,
|
|
1823
|
-
NotAcceptable: 406,
|
|
1824
|
-
ProxyAuthenticationRequired: 407,
|
|
1825
|
-
RequestTimeout: 408,
|
|
1826
|
-
Conflict: 409,
|
|
1827
|
-
Gone: 410,
|
|
1828
|
-
LengthRequired: 411,
|
|
1829
|
-
PreconditionFailed: 412,
|
|
1830
|
-
PayloadTooLarge: 413,
|
|
1831
|
-
UriTooLong: 414,
|
|
1832
|
-
UnsupportedMediaType: 415,
|
|
1833
|
-
RangeNotSatisfiable: 416,
|
|
1834
|
-
ExpectationFailed: 417,
|
|
1835
|
-
ImATeapot: 418,
|
|
1836
|
-
MisdirectedRequest: 421,
|
|
1837
|
-
UnprocessableEntity: 422,
|
|
1838
|
-
Locked: 423,
|
|
1839
|
-
FailedDependency: 424,
|
|
1840
|
-
TooEarly: 425,
|
|
1841
|
-
UpgradeRequired: 426,
|
|
1842
|
-
PreconditionRequired: 428,
|
|
1843
|
-
TooManyRequests: 429,
|
|
1844
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1845
|
-
UnavailableForLegalReasons: 451,
|
|
1846
|
-
InternalServerError: 500,
|
|
1847
|
-
NotImplemented: 501,
|
|
1848
|
-
BadGateway: 502,
|
|
1849
|
-
ServiceUnavailable: 503,
|
|
1850
|
-
GatewayTimeout: 504,
|
|
1851
|
-
HttpVersionNotSupported: 505,
|
|
1852
|
-
VariantAlsoNegotiates: 506,
|
|
1853
|
-
InsufficientStorage: 507,
|
|
1854
|
-
LoopDetected: 508,
|
|
1855
|
-
NotExtended: 510,
|
|
1856
|
-
NetworkAuthenticationRequired: 511
|
|
1857
|
-
};
|
|
1858
|
-
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
1859
|
-
HttpStatusCode[value] = key;
|
|
1860
|
-
});
|
|
1861
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
1862
|
-
function createInstance(defaultConfig2) {
|
|
1863
|
-
const context = new Axios$1(defaultConfig2);
|
|
1864
|
-
const instance2 = bind$2(Axios$1.prototype.request, context);
|
|
1865
|
-
utils$4.extend(instance2, Axios$1.prototype, context, { allOwnKeys: true });
|
|
1866
|
-
utils$4.extend(instance2, context, null, { allOwnKeys: true });
|
|
1867
|
-
instance2.create = function create(instanceConfig) {
|
|
1868
|
-
return createInstance(mergeConfig(defaultConfig2, instanceConfig));
|
|
1869
|
-
};
|
|
1870
|
-
return instance2;
|
|
1871
|
-
}
|
|
1872
|
-
const axios = createInstance(defaults$5);
|
|
1873
|
-
axios.Axios = Axios$1;
|
|
1874
|
-
axios.CanceledError = CanceledError;
|
|
1875
|
-
axios.CancelToken = CancelToken$1;
|
|
1876
|
-
axios.isCancel = isCancel;
|
|
1877
|
-
axios.VERSION = VERSION;
|
|
1878
|
-
axios.toFormData = toFormData;
|
|
1879
|
-
axios.AxiosError = AxiosError;
|
|
1880
|
-
axios.Cancel = axios.CanceledError;
|
|
1881
|
-
axios.all = function all(promises) {
|
|
1882
|
-
return Promise.all(promises);
|
|
1883
|
-
};
|
|
1884
|
-
axios.spread = spread;
|
|
1885
|
-
axios.isAxiosError = isAxiosError;
|
|
1886
|
-
axios.mergeConfig = mergeConfig;
|
|
1887
|
-
axios.AxiosHeaders = AxiosHeaders$1;
|
|
1888
|
-
axios.formToJSON = (thing) => formDataToJSON(utils$4.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
1889
|
-
axios.getAdapter = adapters.getAdapter;
|
|
1890
|
-
axios.HttpStatusCode = HttpStatusCode$1;
|
|
1891
|
-
axios.default = axios;
|
|
1892
|
-
var axios$1 = axios;
|
|
1893
22
|
var render$i = function() {
|
|
1894
23
|
var _vm = this;
|
|
1895
24
|
var _h = _vm.$createElement;
|
|
@@ -2589,7 +718,7 @@ var evEmitter = { exports: {} };
|
|
|
2589
718
|
window2.Draggabilly = factory(window2, window2.getSize, window2.Unidragger);
|
|
2590
719
|
}
|
|
2591
720
|
})(typeof window != "undefined" ? window : commonjsGlobal, function factory(window2, getSize2, Unidragger) {
|
|
2592
|
-
function
|
|
721
|
+
function noop() {
|
|
2593
722
|
}
|
|
2594
723
|
let jQuery = window2.jQuery;
|
|
2595
724
|
function Draggabilly2(element, options) {
|
|
@@ -2832,7 +961,7 @@ var evEmitter = { exports: {} };
|
|
|
2832
961
|
if (this.$element)
|
|
2833
962
|
this.$element.removeData("draggabilly");
|
|
2834
963
|
};
|
|
2835
|
-
proto._init =
|
|
964
|
+
proto._init = noop;
|
|
2836
965
|
if (jQuery && jQuery.bridget) {
|
|
2837
966
|
jQuery.bridget("draggabilly", Draggabilly2);
|
|
2838
967
|
}
|
|
@@ -4612,7 +2741,7 @@ Sortable.prototype = {
|
|
|
4612
2741
|
_onTapStart: function _onTapStart(evt) {
|
|
4613
2742
|
if (!evt.cancelable)
|
|
4614
2743
|
return;
|
|
4615
|
-
var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
|
|
2744
|
+
var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;
|
|
4616
2745
|
_saveInputCheckedState(el);
|
|
4617
2746
|
if (dragEl) {
|
|
4618
2747
|
return;
|
|
@@ -4632,8 +2761,8 @@ Sortable.prototype = {
|
|
|
4632
2761
|
}
|
|
4633
2762
|
oldIndex = index(target);
|
|
4634
2763
|
oldDraggableIndex = index(target, options.draggable);
|
|
4635
|
-
if (typeof
|
|
4636
|
-
if (
|
|
2764
|
+
if (typeof filter === "function") {
|
|
2765
|
+
if (filter.call(this, evt, target, this)) {
|
|
4637
2766
|
_dispatchEvent({
|
|
4638
2767
|
sortable: _this,
|
|
4639
2768
|
rootEl: originalTarget,
|
|
@@ -4648,8 +2777,8 @@ Sortable.prototype = {
|
|
|
4648
2777
|
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
4649
2778
|
return;
|
|
4650
2779
|
}
|
|
4651
|
-
} else if (
|
|
4652
|
-
|
|
2780
|
+
} else if (filter) {
|
|
2781
|
+
filter = filter.split(",").some(function(criteria) {
|
|
4653
2782
|
criteria = closest(originalTarget, criteria.trim(), el, false);
|
|
4654
2783
|
if (criteria) {
|
|
4655
2784
|
_dispatchEvent({
|
|
@@ -4666,7 +2795,7 @@ Sortable.prototype = {
|
|
|
4666
2795
|
return true;
|
|
4667
2796
|
}
|
|
4668
2797
|
});
|
|
4669
|
-
if (
|
|
2798
|
+
if (filter) {
|
|
4670
2799
|
preventOnFilter && evt.cancelable && evt.preventDefault();
|
|
4671
2800
|
return;
|
|
4672
2801
|
}
|
|
@@ -5333,7 +3462,7 @@ Sortable.prototype = {
|
|
|
5333
3462
|
break;
|
|
5334
3463
|
}
|
|
5335
3464
|
},
|
|
5336
|
-
toArray: function
|
|
3465
|
+
toArray: function toArray() {
|
|
5337
3466
|
var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options;
|
|
5338
3467
|
for (; i < n; i++) {
|
|
5339
3468
|
el = children[i];
|
|
@@ -6443,7 +4572,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6443
4572
|
var Iterators = __webpack_require__("84f2");
|
|
6444
4573
|
var $iterCreate = __webpack_require__("41a0");
|
|
6445
4574
|
var setToStringTag = __webpack_require__("7f20");
|
|
6446
|
-
var
|
|
4575
|
+
var getPrototypeOf = __webpack_require__("38fd");
|
|
6447
4576
|
var ITERATOR = __webpack_require__("2b4c")("iterator");
|
|
6448
4577
|
var BUGGY = !([].keys && "next" in [].keys());
|
|
6449
4578
|
var FF_ITERATOR = "@@iterator";
|
|
@@ -6481,7 +4610,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6481
4610
|
var $anyNative = NAME == "Array" ? proto.entries || $native : $native;
|
|
6482
4611
|
var methods, key, IteratorPrototype;
|
|
6483
4612
|
if ($anyNative) {
|
|
6484
|
-
IteratorPrototype =
|
|
4613
|
+
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
|
6485
4614
|
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
|
6486
4615
|
setToStringTag(IteratorPrototype, TAG, true);
|
|
6487
4616
|
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != "function")
|
|
@@ -6653,9 +4782,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6653
4782
|
};
|
|
6654
4783
|
},
|
|
6655
4784
|
"230e": function(module2, exports2, __webpack_require__) {
|
|
6656
|
-
var
|
|
4785
|
+
var isObject = __webpack_require__("d3f4");
|
|
6657
4786
|
var document2 = __webpack_require__("7726").document;
|
|
6658
|
-
var is2 =
|
|
4787
|
+
var is2 = isObject(document2) && isObject(document2.createElement);
|
|
6659
4788
|
module2.exports = function(it) {
|
|
6660
4789
|
return is2 ? document2.createElement(it) : {};
|
|
6661
4790
|
};
|
|
@@ -6692,12 +4821,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6692
4821
|
return $toString.call(it);
|
|
6693
4822
|
};
|
|
6694
4823
|
(module2.exports = function(O, key, val, safe) {
|
|
6695
|
-
var
|
|
6696
|
-
if (
|
|
4824
|
+
var isFunction = typeof val == "function";
|
|
4825
|
+
if (isFunction)
|
|
6697
4826
|
has2(val, "name") || hide(val, "name", key);
|
|
6698
4827
|
if (O[key] === val)
|
|
6699
4828
|
return;
|
|
6700
|
-
if (
|
|
4829
|
+
if (isFunction)
|
|
6701
4830
|
has2(val, SRC) || hide(val, SRC, O[key] ? "" + O[key] : TPL.join(String(key)));
|
|
6702
4831
|
if (O === global2) {
|
|
6703
4832
|
O[key] = val;
|
|
@@ -6709,7 +4838,7 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6709
4838
|
} else {
|
|
6710
4839
|
hide(O, key, val);
|
|
6711
4840
|
}
|
|
6712
|
-
})(Function.prototype, TO_STRING, function
|
|
4841
|
+
})(Function.prototype, TO_STRING, function toString() {
|
|
6713
4842
|
return typeof this == "function" && this[SRC] || $toString.call(this);
|
|
6714
4843
|
});
|
|
6715
4844
|
},
|
|
@@ -6765,9 +4894,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
6765
4894
|
module2.exports = false;
|
|
6766
4895
|
},
|
|
6767
4896
|
"2d95": function(module2, exports2) {
|
|
6768
|
-
var
|
|
4897
|
+
var toString = {}.toString;
|
|
6769
4898
|
module2.exports = function(it) {
|
|
6770
|
-
return
|
|
4899
|
+
return toString.call(it).slice(8, -1);
|
|
6771
4900
|
};
|
|
6772
4901
|
},
|
|
6773
4902
|
"2fdb": function(module2, exports2, __webpack_require__) {
|
|
@@ -7026,22 +5155,22 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
7026
5155
|
};
|
|
7027
5156
|
},
|
|
7028
5157
|
"69a8": function(module2, exports2) {
|
|
7029
|
-
var
|
|
5158
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
7030
5159
|
module2.exports = function(it, key) {
|
|
7031
|
-
return
|
|
5160
|
+
return hasOwnProperty.call(it, key);
|
|
7032
5161
|
};
|
|
7033
5162
|
},
|
|
7034
5163
|
"6a99": function(module2, exports2, __webpack_require__) {
|
|
7035
|
-
var
|
|
5164
|
+
var isObject = __webpack_require__("d3f4");
|
|
7036
5165
|
module2.exports = function(it, S) {
|
|
7037
|
-
if (!
|
|
5166
|
+
if (!isObject(it))
|
|
7038
5167
|
return it;
|
|
7039
5168
|
var fn, val;
|
|
7040
|
-
if (S && typeof (fn = it.toString) == "function" && !
|
|
5169
|
+
if (S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
|
|
7041
5170
|
return val;
|
|
7042
|
-
if (typeof (fn = it.valueOf) == "function" && !
|
|
5171
|
+
if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it)))
|
|
7043
5172
|
return val;
|
|
7044
|
-
if (!S && typeof (fn = it.toString) == "function" && !
|
|
5173
|
+
if (!S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it)))
|
|
7045
5174
|
return val;
|
|
7046
5175
|
throw TypeError("Can't convert object to primitive value");
|
|
7047
5176
|
};
|
|
@@ -7310,12 +5439,12 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
7310
5439
|
});
|
|
7311
5440
|
},
|
|
7312
5441
|
"aae3": function(module2, exports2, __webpack_require__) {
|
|
7313
|
-
var
|
|
5442
|
+
var isObject = __webpack_require__("d3f4");
|
|
7314
5443
|
var cof = __webpack_require__("2d95");
|
|
7315
5444
|
var MATCH = __webpack_require__("2b4c")("match");
|
|
7316
5445
|
module2.exports = function(it) {
|
|
7317
5446
|
var isRegExp3;
|
|
7318
|
-
return
|
|
5447
|
+
return isObject(it) && ((isRegExp3 = it[MATCH]) !== void 0 ? !!isRegExp3 : cof(it) == "RegExp");
|
|
7319
5448
|
};
|
|
7320
5449
|
},
|
|
7321
5450
|
"ac6a": function(module2, exports2, __webpack_require__) {
|
|
@@ -7527,9 +5656,9 @@ var require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(sortable_esm);
|
|
|
7527
5656
|
addToUnscopables("entries");
|
|
7528
5657
|
},
|
|
7529
5658
|
"cb7c": function(module2, exports2, __webpack_require__) {
|
|
7530
|
-
var
|
|
5659
|
+
var isObject = __webpack_require__("d3f4");
|
|
7531
5660
|
module2.exports = function(it) {
|
|
7532
|
-
if (!
|
|
5661
|
+
if (!isObject(it))
|
|
7533
5662
|
throw TypeError(it + " is not an object!");
|
|
7534
5663
|
return it;
|
|
7535
5664
|
};
|
|
@@ -8370,7 +6499,7 @@ const __vue2_script$9 = {
|
|
|
8370
6499
|
render(h) {
|
|
8371
6500
|
const vnode = this._props.vnode;
|
|
8372
6501
|
const prepend = vnode.$slots.prepend;
|
|
8373
|
-
const
|
|
6502
|
+
const append = vnode.$slots.append;
|
|
8374
6503
|
const label = vnode.$slots.label;
|
|
8375
6504
|
return h(this._props.vnode.constructor, {
|
|
8376
6505
|
on: vnode.$listeners,
|
|
@@ -8380,7 +6509,7 @@ const __vue2_script$9 = {
|
|
|
8380
6509
|
ref: vnode.ref
|
|
8381
6510
|
}, [
|
|
8382
6511
|
prepend ? [h("div", { slot: "prepend" }, prepend)] : [],
|
|
8383
|
-
|
|
6512
|
+
append ? [h("div", { slot: "append" }, append)] : [],
|
|
8384
6513
|
label ? [h("div", { slot: "label", class: "ui-item__label" }, label)] : []
|
|
8385
6514
|
]);
|
|
8386
6515
|
}
|
|
@@ -9555,10 +7684,10 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
9555
7684
|
}
|
|
9556
7685
|
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
9557
7686
|
var ys = arrObjKeys(obj, inspect2);
|
|
9558
|
-
var
|
|
7687
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
9559
7688
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
9560
|
-
var stringTag = !
|
|
9561
|
-
var constructorTag =
|
|
7689
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
7690
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
9562
7691
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
9563
7692
|
if (ys.length === 0) {
|
|
9564
7693
|
return tag + "{}";
|
|
@@ -10203,7 +8332,7 @@ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
|
|
|
10203
8332
|
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
10204
8333
|
};
|
|
10205
8334
|
var sentinel = {};
|
|
10206
|
-
var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder,
|
|
8335
|
+
var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
|
|
10207
8336
|
var obj = object;
|
|
10208
8337
|
var tmpSc = sideChannel2;
|
|
10209
8338
|
var step = 0;
|
|
@@ -10222,8 +8351,8 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
10222
8351
|
step = 0;
|
|
10223
8352
|
}
|
|
10224
8353
|
}
|
|
10225
|
-
if (typeof
|
|
10226
|
-
obj =
|
|
8354
|
+
if (typeof filter === "function") {
|
|
8355
|
+
obj = filter(prefix, obj);
|
|
10227
8356
|
} else if (obj instanceof Date) {
|
|
10228
8357
|
obj = serializeDate2(obj);
|
|
10229
8358
|
} else if (generateArrayPrefix === "comma" && isArray$1(obj)) {
|
|
@@ -10262,8 +8391,8 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
10262
8391
|
var objKeys;
|
|
10263
8392
|
if (generateArrayPrefix === "comma" && isArray$1(obj)) {
|
|
10264
8393
|
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
10265
|
-
} else if (isArray$1(
|
|
10266
|
-
objKeys =
|
|
8394
|
+
} else if (isArray$1(filter)) {
|
|
8395
|
+
objKeys = filter;
|
|
10267
8396
|
} else {
|
|
10268
8397
|
var keys = Object.keys(obj);
|
|
10269
8398
|
objKeys = sort2 ? keys.sort(sort2) : keys;
|
|
@@ -10279,7 +8408,7 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
10279
8408
|
sideChannel2.set(object, step);
|
|
10280
8409
|
var valueSideChannel = getSideChannel2();
|
|
10281
8410
|
valueSideChannel.set(sentinel, sideChannel2);
|
|
10282
|
-
pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder,
|
|
8411
|
+
pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter, sort2, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, valueSideChannel));
|
|
10283
8412
|
}
|
|
10284
8413
|
return values;
|
|
10285
8414
|
};
|
|
@@ -10302,9 +8431,9 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
|
10302
8431
|
format = opts.format;
|
|
10303
8432
|
}
|
|
10304
8433
|
var formatter = formats$1.formatters[format];
|
|
10305
|
-
var
|
|
8434
|
+
var filter = defaults$2.filter;
|
|
10306
8435
|
if (typeof opts.filter === "function" || isArray$1(opts.filter)) {
|
|
10307
|
-
|
|
8436
|
+
filter = opts.filter;
|
|
10308
8437
|
}
|
|
10309
8438
|
return {
|
|
10310
8439
|
addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults$2.addQueryPrefix,
|
|
@@ -10315,7 +8444,7 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
|
10315
8444
|
encode: typeof opts.encode === "boolean" ? opts.encode : defaults$2.encode,
|
|
10316
8445
|
encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$2.encoder,
|
|
10317
8446
|
encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$2.encodeValuesOnly,
|
|
10318
|
-
filter
|
|
8447
|
+
filter,
|
|
10319
8448
|
format,
|
|
10320
8449
|
formatter,
|
|
10321
8450
|
serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults$2.serializeDate,
|
|
@@ -10328,13 +8457,13 @@ var stringify_1 = function(object, opts) {
|
|
|
10328
8457
|
var obj = object;
|
|
10329
8458
|
var options = normalizeStringifyOptions(opts);
|
|
10330
8459
|
var objKeys;
|
|
10331
|
-
var
|
|
8460
|
+
var filter;
|
|
10332
8461
|
if (typeof options.filter === "function") {
|
|
10333
|
-
|
|
10334
|
-
obj =
|
|
8462
|
+
filter = options.filter;
|
|
8463
|
+
obj = filter("", obj);
|
|
10335
8464
|
} else if (isArray$1(options.filter)) {
|
|
10336
|
-
|
|
10337
|
-
objKeys =
|
|
8465
|
+
filter = options.filter;
|
|
8466
|
+
objKeys = filter;
|
|
10338
8467
|
}
|
|
10339
8468
|
var keys = [];
|
|
10340
8469
|
if (typeof obj !== "object" || obj === null) {
|
|
@@ -11937,7 +10066,7 @@ var quill = { exports: {} };
|
|
|
11937
10066
|
}
|
|
11938
10067
|
return toStr2.call(arr) === "[object Array]";
|
|
11939
10068
|
};
|
|
11940
|
-
var
|
|
10069
|
+
var isPlainObject = function isPlainObject2(obj) {
|
|
11941
10070
|
if (!obj || toStr2.call(obj) !== "[object Object]") {
|
|
11942
10071
|
return false;
|
|
11943
10072
|
}
|
|
@@ -11994,12 +10123,12 @@ var quill = { exports: {} };
|
|
|
11994
10123
|
src2 = getProperty(target, name);
|
|
11995
10124
|
copy = getProperty(options, name);
|
|
11996
10125
|
if (target !== copy) {
|
|
11997
|
-
if (deep && copy && (
|
|
10126
|
+
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray2(copy)))) {
|
|
11998
10127
|
if (copyIsArray) {
|
|
11999
10128
|
copyIsArray = false;
|
|
12000
10129
|
clone2 = src2 && isArray2(src2) ? src2 : [];
|
|
12001
10130
|
} else {
|
|
12002
|
-
clone2 = src2 &&
|
|
10131
|
+
clone2 = src2 && isPlainObject(src2) ? src2 : {};
|
|
12003
10132
|
}
|
|
12004
10133
|
setProperty(target, { name, newValue: extend2(deep, clone2, copy) });
|
|
12005
10134
|
} else if (typeof copy !== "undefined") {
|
|
@@ -15239,10 +13368,10 @@ var quill = { exports: {} };
|
|
|
15239
13368
|
nativePromise = function() {
|
|
15240
13369
|
};
|
|
15241
13370
|
}
|
|
15242
|
-
function clone3(parent, circular, depth,
|
|
13371
|
+
function clone3(parent, circular, depth, prototype, includeNonEnumerable) {
|
|
15243
13372
|
if (typeof circular === "object") {
|
|
15244
13373
|
depth = circular.depth;
|
|
15245
|
-
|
|
13374
|
+
prototype = circular.prototype;
|
|
15246
13375
|
includeNonEnumerable = circular.includeNonEnumerable;
|
|
15247
13376
|
circular = circular.circular;
|
|
15248
13377
|
}
|
|
@@ -15294,12 +13423,12 @@ var quill = { exports: {} };
|
|
|
15294
13423
|
} else if (_instanceof(parent2, Error)) {
|
|
15295
13424
|
child = Object.create(parent2);
|
|
15296
13425
|
} else {
|
|
15297
|
-
if (typeof
|
|
13426
|
+
if (typeof prototype == "undefined") {
|
|
15298
13427
|
proto = Object.getPrototypeOf(parent2);
|
|
15299
13428
|
child = Object.create(proto);
|
|
15300
13429
|
} else {
|
|
15301
|
-
child = Object.create(
|
|
15302
|
-
proto =
|
|
13430
|
+
child = Object.create(prototype);
|
|
13431
|
+
proto = prototype;
|
|
15303
13432
|
}
|
|
15304
13433
|
}
|
|
15305
13434
|
if (circular) {
|
|
@@ -23036,18 +21165,6 @@ const components = [
|
|
|
23036
21165
|
];
|
|
23037
21166
|
const install = (Vue2, ops = { config: {} }) => {
|
|
23038
21167
|
components.forEach((component) => Vue2.component(component.name, component));
|
|
23039
|
-
const Http = axios$1.create({
|
|
23040
|
-
headers: {
|
|
23041
|
-
["Login-Token"]: ops.config.token,
|
|
23042
|
-
["Admintoken"]: "3d0014a9262245af7a9775b7663a5f56",
|
|
23043
|
-
["Adminadminid"]: "4073"
|
|
23044
|
-
}
|
|
23045
|
-
});
|
|
23046
|
-
Http.interceptors.response.use((response) => {
|
|
23047
|
-
return response.data;
|
|
23048
|
-
}, (error) => {
|
|
23049
|
-
return error;
|
|
23050
|
-
});
|
|
23051
21168
|
const UIDefaultConfig = {
|
|
23052
21169
|
tablePreset: {
|
|
23053
21170
|
separator: "@",
|
|
@@ -23083,39 +21200,6 @@ const install = (Vue2, ops = { config: {} }) => {
|
|
|
23083
21200
|
input: {
|
|
23084
21201
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
23085
21202
|
}
|
|
23086
|
-
},
|
|
23087
|
-
collectApi: {
|
|
23088
|
-
async list() {
|
|
23089
|
-
return await Http.get("http://192.168.10.100:8008/toolkit/collect/getList");
|
|
23090
|
-
},
|
|
23091
|
-
async on(params) {
|
|
23092
|
-
return await Http.post("http://192.168.10.100:8008/toolkit/collect/on", lib.stringify(params), {
|
|
23093
|
-
headers: {
|
|
23094
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
23095
|
-
}
|
|
23096
|
-
});
|
|
23097
|
-
},
|
|
23098
|
-
async off(params) {
|
|
23099
|
-
return await Http.post("http://192.168.10.100:8008/toolkit/collect/off", lib.stringify(params), {
|
|
23100
|
-
headers: {
|
|
23101
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
23102
|
-
}
|
|
23103
|
-
});
|
|
23104
|
-
},
|
|
23105
|
-
async delete(params) {
|
|
23106
|
-
return await Http.post("http://192.168.10.100:8008/toolkit/collect/remove", lib.stringify(params), {
|
|
23107
|
-
headers: {
|
|
23108
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
23109
|
-
}
|
|
23110
|
-
});
|
|
23111
|
-
},
|
|
23112
|
-
async add(params) {
|
|
23113
|
-
return await Http.post("http://192.168.10.100:8008/toolkit/collect/add", lib.stringify(params), {
|
|
23114
|
-
headers: {
|
|
23115
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
23116
|
-
}
|
|
23117
|
-
});
|
|
23118
|
-
}
|
|
23119
21203
|
}
|
|
23120
21204
|
};
|
|
23121
21205
|
Vue2.prototype.$UICONFIG = __spreadValues(__spreadValues({}, UIDefaultConfig), ops.config);
|
|
@@ -23128,7 +21212,6 @@ const install = (Vue2, ops = { config: {} }) => {
|
|
|
23128
21212
|
};
|
|
23129
21213
|
const busVue = new Vue2();
|
|
23130
21214
|
Vue2.prototype.$toChildren = busVue;
|
|
23131
|
-
Vue2.prototype.$http = Http;
|
|
23132
21215
|
};
|
|
23133
21216
|
const defaultConfig = {
|
|
23134
21217
|
version: "dev",
|