@geelato/gl-runtime-core 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gl-runtime-core.js +439 -2485
- package/dist/gl-runtime-core.js.gz +0 -0
- package/dist/gl-runtime-core.umd.cjs +4 -4
- package/dist/types/actions/fns/math.d.ts +14 -2
- package/package.json +19 -2
- package/src/main.ts +0 -498
package/dist/gl-runtime-core.js
CHANGED
|
@@ -4,10 +4,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
var _a2;
|
|
5
5
|
import { createApp, defineComponent, getCurrentInstance, computed, ref, watch, inject, resolveComponent, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode as createVNode$1, mergeProps, onMounted, onBeforeUnmount, withDirectives, resolveDynamicComponent, toHandlers, unref, createSlots, withCtx, Fragment, renderList, normalizeProps, normalizeStyle as normalizeStyle$1, createTextVNode, toDisplayString, vShow, nextTick, onUnmounted, normalizeClass, createElementVNode, createStaticVNode, vModelText, withModifiers, h, cloneVNode, isVNode, renderSlot, reactive, compile } from "vue";
|
|
6
6
|
import { defineStore } from "pinia";
|
|
7
|
+
import axios from "axios";
|
|
7
8
|
import { ComponentInstance } from "@geelato/gl-ui-schema";
|
|
8
9
|
import { createI18n } from "vue-i18n";
|
|
9
10
|
import { useStorage } from "@vueuse/core";
|
|
10
|
-
import dayjs from "dayjs";
|
|
11
11
|
var DP = 20, RM = 1, MAX_DP = 1e6, MAX_POWER = 1e6, NE = -7, PE = 21, STRICT = false, NAME = "[big.js] ", INVALID = NAME + "Invalid ", INVALID_DP = INVALID + "decimal places", INVALID_RM = INVALID + "rounding mode", DIV_BY_ZERO = NAME + "Division by zero", P = {}, UNDEFINED$1 = void 0, NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
|
|
12
12
|
function _Big_() {
|
|
13
13
|
function Big2(n) {
|
|
@@ -2251,17 +2251,17 @@ function requireLuxon() {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
function digitRegex({
|
|
2253
2253
|
numberingSystem
|
|
2254
|
-
},
|
|
2254
|
+
}, append = "") {
|
|
2255
2255
|
const ns = numberingSystem || "latn";
|
|
2256
2256
|
let appendCache = digitRegexCache.get(ns);
|
|
2257
2257
|
if (appendCache === void 0) {
|
|
2258
2258
|
appendCache = /* @__PURE__ */ new Map();
|
|
2259
2259
|
digitRegexCache.set(ns, appendCache);
|
|
2260
2260
|
}
|
|
2261
|
-
let regex = appendCache.get(
|
|
2261
|
+
let regex = appendCache.get(append);
|
|
2262
2262
|
if (regex === void 0) {
|
|
2263
|
-
regex = new RegExp(`${numberingSystems[ns]}${
|
|
2264
|
-
appendCache.set(
|
|
2263
|
+
regex = new RegExp(`${numberingSystems[ns]}${append}`);
|
|
2264
|
+
appendCache.set(append, regex);
|
|
2265
2265
|
}
|
|
2266
2266
|
return regex;
|
|
2267
2267
|
}
|
|
@@ -2648,7 +2648,7 @@ function requireLuxon() {
|
|
|
2648
2648
|
return a;
|
|
2649
2649
|
}, {});
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function hasOwnProperty(obj, prop) {
|
|
2652
2652
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
2653
2653
|
}
|
|
2654
2654
|
function validateWeekSettings(settings) {
|
|
@@ -2793,7 +2793,7 @@ function requireLuxon() {
|
|
|
2793
2793
|
function normalizeObject(obj, normalizer) {
|
|
2794
2794
|
const normalized = {};
|
|
2795
2795
|
for (const u in obj) {
|
|
2796
|
-
if (
|
|
2796
|
+
if (hasOwnProperty(obj, u)) {
|
|
2797
2797
|
const v = obj[u];
|
|
2798
2798
|
if (v === void 0 || v === null) continue;
|
|
2799
2799
|
normalized[normalizer(u)] = asNumber(v);
|
|
@@ -4006,7 +4006,7 @@ function requireLuxon() {
|
|
|
4006
4006
|
if (!this.isValid) return this;
|
|
4007
4007
|
const dur = Duration2.fromDurationLike(duration), result = {};
|
|
4008
4008
|
for (const k2 of orderedUnits$1) {
|
|
4009
|
-
if (
|
|
4009
|
+
if (hasOwnProperty(dur.values, k2) || hasOwnProperty(this.values, k2)) {
|
|
4010
4010
|
result[k2] = dur.get(k2) + this.get(k2);
|
|
4011
4011
|
}
|
|
4012
4012
|
}
|
|
@@ -5411,18 +5411,18 @@ function requireLuxon() {
|
|
|
5411
5411
|
function match(input, regex, handlers2) {
|
|
5412
5412
|
const matches = input.match(regex);
|
|
5413
5413
|
if (matches) {
|
|
5414
|
-
const
|
|
5414
|
+
const all2 = {};
|
|
5415
5415
|
let matchIndex = 1;
|
|
5416
5416
|
for (const i2 in handlers2) {
|
|
5417
|
-
if (
|
|
5417
|
+
if (hasOwnProperty(handlers2, i2)) {
|
|
5418
5418
|
const h2 = handlers2[i2], groups = h2.groups ? h2.groups + 1 : 1;
|
|
5419
5419
|
if (!h2.literal && h2.token) {
|
|
5420
|
-
|
|
5420
|
+
all2[h2.token.val[0]] = h2.deser(matches.slice(matchIndex, matchIndex + groups));
|
|
5421
5421
|
}
|
|
5422
5422
|
matchIndex += groups;
|
|
5423
5423
|
}
|
|
5424
5424
|
}
|
|
5425
|
-
return [matches,
|
|
5425
|
+
return [matches, all2];
|
|
5426
5426
|
} else {
|
|
5427
5427
|
return [matches, {}];
|
|
5428
5428
|
}
|
|
@@ -5540,7 +5540,7 @@ function requireLuxon() {
|
|
|
5540
5540
|
};
|
|
5541
5541
|
} else {
|
|
5542
5542
|
const [rawMatches, matches] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0];
|
|
5543
|
-
if (
|
|
5543
|
+
if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
|
|
5544
5544
|
throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");
|
|
5545
5545
|
}
|
|
5546
5546
|
return {
|
|
@@ -7737,7 +7737,7 @@ function requireLuxon() {
|
|
|
7737
7737
|
throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);
|
|
7738
7738
|
}
|
|
7739
7739
|
}
|
|
7740
|
-
const
|
|
7740
|
+
const VERSION = "3.7.1";
|
|
7741
7741
|
luxon.DateTime = DateTime;
|
|
7742
7742
|
luxon.Duration = Duration2;
|
|
7743
7743
|
luxon.FixedOffsetZone = FixedOffsetZone;
|
|
@@ -7747,7 +7747,7 @@ function requireLuxon() {
|
|
|
7747
7747
|
luxon.InvalidZone = InvalidZone;
|
|
7748
7748
|
luxon.Settings = Settings;
|
|
7749
7749
|
luxon.SystemZone = SystemZone;
|
|
7750
|
-
luxon.VERSION =
|
|
7750
|
+
luxon.VERSION = VERSION;
|
|
7751
7751
|
luxon.Zone = Zone;
|
|
7752
7752
|
return luxon;
|
|
7753
7753
|
}
|
|
@@ -9128,7 +9128,7 @@ class ConvertUtil {
|
|
|
9128
9128
|
return String(str2).replace(new RegExp(`[${separators.join("")}]+`, "g"), separator).replace(new RegExp(`\\${separator}+`, "g"), separator).replace(new RegExp(`^\\${separator}|\\${separator}$`, "g"), "").split(separator).map((s) => s.trim()).filter(Boolean).join(separator);
|
|
9129
9129
|
}
|
|
9130
9130
|
}
|
|
9131
|
-
function trim$
|
|
9131
|
+
function trim$2(str2) {
|
|
9132
9132
|
return str2.replace(/(^\s*)|(\s*$)/g, "");
|
|
9133
9133
|
}
|
|
9134
9134
|
function stripLeadingCommentsAndWhitespace(input) {
|
|
@@ -9162,7 +9162,7 @@ function stripLeadingCommentsAndWhitespace(input) {
|
|
|
9162
9162
|
return input.slice(i2).replace(/^\s+/, "");
|
|
9163
9163
|
}
|
|
9164
9164
|
function isParenthesizedCallExpression(code) {
|
|
9165
|
-
const str2 = stripLeadingCommentsAndWhitespace(trim$
|
|
9165
|
+
const str2 = stripLeadingCommentsAndWhitespace(trim$2(code)).replace(/^;+/, "");
|
|
9166
9166
|
if (!str2.startsWith("(")) return false;
|
|
9167
9167
|
if (!/\)\s*\(/.test(str2)) return false;
|
|
9168
9168
|
if (!/\)\s*;?$/.test(str2)) return false;
|
|
@@ -9373,7 +9373,7 @@ class MixUtil {
|
|
|
9373
9373
|
return expression2;
|
|
9374
9374
|
}
|
|
9375
9375
|
const raw = expression2;
|
|
9376
|
-
const trimmedRaw = trim$
|
|
9376
|
+
const trimmedRaw = trim$2(raw);
|
|
9377
9377
|
if (trimmedRaw === "") {
|
|
9378
9378
|
return raw;
|
|
9379
9379
|
}
|
|
@@ -9430,10 +9430,10 @@ class MixUtil {
|
|
|
9430
9430
|
*/
|
|
9431
9431
|
static evalFn(fnBody, $gl, glName = "$gl", async) {
|
|
9432
9432
|
try {
|
|
9433
|
-
let bodyScript = stripLeadingCommentsAndWhitespace(trim$
|
|
9433
|
+
let bodyScript = stripLeadingCommentsAndWhitespace(trim$2(fnBody));
|
|
9434
9434
|
bodyScript = bodyScript.replace(/^;+|;+$/g, "");
|
|
9435
9435
|
if (!bodyScript.toLowerCase().startsWith("return ") && isParenthesizedCallExpression(bodyScript)) {
|
|
9436
|
-
bodyScript = "return " + stripLeadingCommentsAndWhitespace(trim$
|
|
9436
|
+
bodyScript = "return " + stripLeadingCommentsAndWhitespace(trim$2(bodyScript));
|
|
9437
9437
|
}
|
|
9438
9438
|
if (!bodyScript.match(/[\r\n;]/g) && !bodyScript.toLowerCase().startsWith("return ")) {
|
|
9439
9439
|
if (bodyScript.toLowerCase().startsWith(";if(") || bodyScript.toLowerCase().startsWith("if(")) {
|
|
@@ -9747,2377 +9747,6 @@ class StringUtil {
|
|
|
9747
9747
|
}
|
|
9748
9748
|
}
|
|
9749
9749
|
const stringUtil = new StringUtil();
|
|
9750
|
-
function bind$2(fn, thisArg) {
|
|
9751
|
-
return function wrap() {
|
|
9752
|
-
return fn.apply(thisArg, arguments);
|
|
9753
|
-
};
|
|
9754
|
-
}
|
|
9755
|
-
const { toString: toString$1 } = Object.prototype;
|
|
9756
|
-
const { getPrototypeOf } = Object;
|
|
9757
|
-
const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
9758
|
-
const str2 = toString$1.call(thing);
|
|
9759
|
-
return cache[str2] || (cache[str2] = str2.slice(8, -1).toLowerCase());
|
|
9760
|
-
})(/* @__PURE__ */ Object.create(null));
|
|
9761
|
-
const kindOfTest = (type) => {
|
|
9762
|
-
type = type.toLowerCase();
|
|
9763
|
-
return (thing) => kindOf(thing) === type;
|
|
9764
|
-
};
|
|
9765
|
-
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
9766
|
-
const { isArray: isArray$4 } = Array;
|
|
9767
|
-
const isUndefined$1 = typeOfTest("undefined");
|
|
9768
|
-
function isBuffer(val) {
|
|
9769
|
-
return val !== null && !isUndefined$1(val) && val.constructor !== null && !isUndefined$1(val.constructor) && isFunction$3(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
9770
|
-
}
|
|
9771
|
-
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
9772
|
-
function isArrayBufferView(val) {
|
|
9773
|
-
let result;
|
|
9774
|
-
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
9775
|
-
result = ArrayBuffer.isView(val);
|
|
9776
|
-
} else {
|
|
9777
|
-
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
9778
|
-
}
|
|
9779
|
-
return result;
|
|
9780
|
-
}
|
|
9781
|
-
const isString$3 = typeOfTest("string");
|
|
9782
|
-
const isFunction$3 = typeOfTest("function");
|
|
9783
|
-
const isNumber$4 = typeOfTest("number");
|
|
9784
|
-
const isObject$6 = (thing) => thing !== null && typeof thing === "object";
|
|
9785
|
-
const isBoolean$1 = (thing) => thing === true || thing === false;
|
|
9786
|
-
const isPlainObject = (val) => {
|
|
9787
|
-
if (kindOf(val) !== "object") {
|
|
9788
|
-
return false;
|
|
9789
|
-
}
|
|
9790
|
-
const prototype2 = getPrototypeOf(val);
|
|
9791
|
-
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
9792
|
-
};
|
|
9793
|
-
const isDate$1 = kindOfTest("Date");
|
|
9794
|
-
const isFile = kindOfTest("File");
|
|
9795
|
-
const isBlob = kindOfTest("Blob");
|
|
9796
|
-
const isFileList = kindOfTest("FileList");
|
|
9797
|
-
const isStream = (val) => isObject$6(val) && isFunction$3(val.pipe);
|
|
9798
|
-
const isFormData = (thing) => {
|
|
9799
|
-
let kind;
|
|
9800
|
-
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$3(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
9801
|
-
kind === "object" && isFunction$3(thing.toString) && thing.toString() === "[object FormData]"));
|
|
9802
|
-
};
|
|
9803
|
-
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
9804
|
-
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
9805
|
-
const trim$2 = (str2) => str2.trim ? str2.trim() : str2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
9806
|
-
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
9807
|
-
if (obj === null || typeof obj === "undefined") {
|
|
9808
|
-
return;
|
|
9809
|
-
}
|
|
9810
|
-
let i2;
|
|
9811
|
-
let l;
|
|
9812
|
-
if (typeof obj !== "object") {
|
|
9813
|
-
obj = [obj];
|
|
9814
|
-
}
|
|
9815
|
-
if (isArray$4(obj)) {
|
|
9816
|
-
for (i2 = 0, l = obj.length; i2 < l; i2++) {
|
|
9817
|
-
fn.call(null, obj[i2], i2, obj);
|
|
9818
|
-
}
|
|
9819
|
-
} else {
|
|
9820
|
-
const keys2 = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
9821
|
-
const len2 = keys2.length;
|
|
9822
|
-
let key;
|
|
9823
|
-
for (i2 = 0; i2 < len2; i2++) {
|
|
9824
|
-
key = keys2[i2];
|
|
9825
|
-
fn.call(null, obj[key], key, obj);
|
|
9826
|
-
}
|
|
9827
|
-
}
|
|
9828
|
-
}
|
|
9829
|
-
function findKey(obj, key) {
|
|
9830
|
-
key = key.toLowerCase();
|
|
9831
|
-
const keys2 = Object.keys(obj);
|
|
9832
|
-
let i2 = keys2.length;
|
|
9833
|
-
let _key;
|
|
9834
|
-
while (i2-- > 0) {
|
|
9835
|
-
_key = keys2[i2];
|
|
9836
|
-
if (key === _key.toLowerCase()) {
|
|
9837
|
-
return _key;
|
|
9838
|
-
}
|
|
9839
|
-
}
|
|
9840
|
-
return null;
|
|
9841
|
-
}
|
|
9842
|
-
const _global = (() => {
|
|
9843
|
-
if (typeof globalThis !== "undefined") return globalThis;
|
|
9844
|
-
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
9845
|
-
})();
|
|
9846
|
-
const isContextDefined = (context) => !isUndefined$1(context) && context !== _global;
|
|
9847
|
-
function merge$1() {
|
|
9848
|
-
const { caseless } = isContextDefined(this) && this || {};
|
|
9849
|
-
const result = {};
|
|
9850
|
-
const assignValue = (val, key) => {
|
|
9851
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
9852
|
-
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
9853
|
-
result[targetKey] = merge$1(result[targetKey], val);
|
|
9854
|
-
} else if (isPlainObject(val)) {
|
|
9855
|
-
result[targetKey] = merge$1({}, val);
|
|
9856
|
-
} else if (isArray$4(val)) {
|
|
9857
|
-
result[targetKey] = val.slice();
|
|
9858
|
-
} else {
|
|
9859
|
-
result[targetKey] = val;
|
|
9860
|
-
}
|
|
9861
|
-
};
|
|
9862
|
-
for (let i2 = 0, l = arguments.length; i2 < l; i2++) {
|
|
9863
|
-
arguments[i2] && forEach(arguments[i2], assignValue);
|
|
9864
|
-
}
|
|
9865
|
-
return result;
|
|
9866
|
-
}
|
|
9867
|
-
const extend$2 = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
9868
|
-
forEach(b, (val, key) => {
|
|
9869
|
-
if (thisArg && isFunction$3(val)) {
|
|
9870
|
-
a[key] = bind$2(val, thisArg);
|
|
9871
|
-
} else {
|
|
9872
|
-
a[key] = val;
|
|
9873
|
-
}
|
|
9874
|
-
}, { allOwnKeys });
|
|
9875
|
-
return a;
|
|
9876
|
-
};
|
|
9877
|
-
const stripBOM = (content) => {
|
|
9878
|
-
if (content.charCodeAt(0) === 65279) {
|
|
9879
|
-
content = content.slice(1);
|
|
9880
|
-
}
|
|
9881
|
-
return content;
|
|
9882
|
-
};
|
|
9883
|
-
const inherits$1 = (constructor, superConstructor, props2, descriptors2) => {
|
|
9884
|
-
constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
|
|
9885
|
-
constructor.prototype.constructor = constructor;
|
|
9886
|
-
Object.defineProperty(constructor, "super", {
|
|
9887
|
-
value: superConstructor.prototype
|
|
9888
|
-
});
|
|
9889
|
-
props2 && Object.assign(constructor.prototype, props2);
|
|
9890
|
-
};
|
|
9891
|
-
const toFlatObject = (sourceObj, destObj, filter3, propFilter) => {
|
|
9892
|
-
let props2;
|
|
9893
|
-
let i2;
|
|
9894
|
-
let prop;
|
|
9895
|
-
const merged = {};
|
|
9896
|
-
destObj = destObj || {};
|
|
9897
|
-
if (sourceObj == null) return destObj;
|
|
9898
|
-
do {
|
|
9899
|
-
props2 = Object.getOwnPropertyNames(sourceObj);
|
|
9900
|
-
i2 = props2.length;
|
|
9901
|
-
while (i2-- > 0) {
|
|
9902
|
-
prop = props2[i2];
|
|
9903
|
-
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
9904
|
-
destObj[prop] = sourceObj[prop];
|
|
9905
|
-
merged[prop] = true;
|
|
9906
|
-
}
|
|
9907
|
-
}
|
|
9908
|
-
sourceObj = filter3 !== false && getPrototypeOf(sourceObj);
|
|
9909
|
-
} while (sourceObj && (!filter3 || filter3(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
9910
|
-
return destObj;
|
|
9911
|
-
};
|
|
9912
|
-
const endsWith = (str2, searchString, position2) => {
|
|
9913
|
-
str2 = String(str2);
|
|
9914
|
-
if (position2 === void 0 || position2 > str2.length) {
|
|
9915
|
-
position2 = str2.length;
|
|
9916
|
-
}
|
|
9917
|
-
position2 -= searchString.length;
|
|
9918
|
-
const lastIndex = str2.indexOf(searchString, position2);
|
|
9919
|
-
return lastIndex !== -1 && lastIndex === position2;
|
|
9920
|
-
};
|
|
9921
|
-
const toArray$1 = (thing) => {
|
|
9922
|
-
if (!thing) return null;
|
|
9923
|
-
if (isArray$4(thing)) return thing;
|
|
9924
|
-
let i2 = thing.length;
|
|
9925
|
-
if (!isNumber$4(i2)) return null;
|
|
9926
|
-
const arr = new Array(i2);
|
|
9927
|
-
while (i2-- > 0) {
|
|
9928
|
-
arr[i2] = thing[i2];
|
|
9929
|
-
}
|
|
9930
|
-
return arr;
|
|
9931
|
-
};
|
|
9932
|
-
const isTypedArray$1 = /* @__PURE__ */ ((TypedArray) => {
|
|
9933
|
-
return (thing) => {
|
|
9934
|
-
return TypedArray && thing instanceof TypedArray;
|
|
9935
|
-
};
|
|
9936
|
-
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
9937
|
-
const forEachEntry = (obj, fn) => {
|
|
9938
|
-
const generator = obj && obj[Symbol.iterator];
|
|
9939
|
-
const iterator2 = generator.call(obj);
|
|
9940
|
-
let result;
|
|
9941
|
-
while ((result = iterator2.next()) && !result.done) {
|
|
9942
|
-
const pair = result.value;
|
|
9943
|
-
fn.call(obj, pair[0], pair[1]);
|
|
9944
|
-
}
|
|
9945
|
-
};
|
|
9946
|
-
const matchAll = (regExp, str2) => {
|
|
9947
|
-
let matches;
|
|
9948
|
-
const arr = [];
|
|
9949
|
-
while ((matches = regExp.exec(str2)) !== null) {
|
|
9950
|
-
arr.push(matches);
|
|
9951
|
-
}
|
|
9952
|
-
return arr;
|
|
9953
|
-
};
|
|
9954
|
-
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
9955
|
-
const toCamelCase$1 = (str2) => {
|
|
9956
|
-
return str2.toLowerCase().replace(
|
|
9957
|
-
/[-_\s]([a-z\d])(\w*)/g,
|
|
9958
|
-
function replacer(m2, p1, p2) {
|
|
9959
|
-
return p1.toUpperCase() + p2;
|
|
9960
|
-
}
|
|
9961
|
-
);
|
|
9962
|
-
};
|
|
9963
|
-
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
9964
|
-
const isRegExp$1 = kindOfTest("RegExp");
|
|
9965
|
-
const reduceDescriptors = (obj, reducer) => {
|
|
9966
|
-
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
9967
|
-
const reducedDescriptors = {};
|
|
9968
|
-
forEach(descriptors2, (descriptor, name2) => {
|
|
9969
|
-
let ret;
|
|
9970
|
-
if ((ret = reducer(descriptor, name2, obj)) !== false) {
|
|
9971
|
-
reducedDescriptors[name2] = ret || descriptor;
|
|
9972
|
-
}
|
|
9973
|
-
});
|
|
9974
|
-
Object.defineProperties(obj, reducedDescriptors);
|
|
9975
|
-
};
|
|
9976
|
-
const freezeMethods = (obj) => {
|
|
9977
|
-
reduceDescriptors(obj, (descriptor, name2) => {
|
|
9978
|
-
if (isFunction$3(obj) && ["arguments", "caller", "callee"].indexOf(name2) !== -1) {
|
|
9979
|
-
return false;
|
|
9980
|
-
}
|
|
9981
|
-
const value = obj[name2];
|
|
9982
|
-
if (!isFunction$3(value)) return;
|
|
9983
|
-
descriptor.enumerable = false;
|
|
9984
|
-
if ("writable" in descriptor) {
|
|
9985
|
-
descriptor.writable = false;
|
|
9986
|
-
return;
|
|
9987
|
-
}
|
|
9988
|
-
if (!descriptor.set) {
|
|
9989
|
-
descriptor.set = () => {
|
|
9990
|
-
throw Error("Can not rewrite read-only method '" + name2 + "'");
|
|
9991
|
-
};
|
|
9992
|
-
}
|
|
9993
|
-
});
|
|
9994
|
-
};
|
|
9995
|
-
const toObjectSet = (arrayOrString, delimiter) => {
|
|
9996
|
-
const obj = {};
|
|
9997
|
-
const define = (arr) => {
|
|
9998
|
-
arr.forEach((value) => {
|
|
9999
|
-
obj[value] = true;
|
|
10000
|
-
});
|
|
10001
|
-
};
|
|
10002
|
-
isArray$4(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
10003
|
-
return obj;
|
|
10004
|
-
};
|
|
10005
|
-
const noop$1 = () => {
|
|
10006
|
-
};
|
|
10007
|
-
const toFiniteNumber = (value, defaultValue) => {
|
|
10008
|
-
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
10009
|
-
};
|
|
10010
|
-
function isSpecCompliantForm(thing) {
|
|
10011
|
-
return !!(thing && isFunction$3(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
10012
|
-
}
|
|
10013
|
-
const toJSONObject = (obj) => {
|
|
10014
|
-
const stack = new Array(10);
|
|
10015
|
-
const visit = (source, i2) => {
|
|
10016
|
-
if (isObject$6(source)) {
|
|
10017
|
-
if (stack.indexOf(source) >= 0) {
|
|
10018
|
-
return;
|
|
10019
|
-
}
|
|
10020
|
-
if (!("toJSON" in source)) {
|
|
10021
|
-
stack[i2] = source;
|
|
10022
|
-
const target = isArray$4(source) ? [] : {};
|
|
10023
|
-
forEach(source, (value, key) => {
|
|
10024
|
-
const reducedValue = visit(value, i2 + 1);
|
|
10025
|
-
!isUndefined$1(reducedValue) && (target[key] = reducedValue);
|
|
10026
|
-
});
|
|
10027
|
-
stack[i2] = void 0;
|
|
10028
|
-
return target;
|
|
10029
|
-
}
|
|
10030
|
-
}
|
|
10031
|
-
return source;
|
|
10032
|
-
};
|
|
10033
|
-
return visit(obj, 0);
|
|
10034
|
-
};
|
|
10035
|
-
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
10036
|
-
const isThenable = (thing) => thing && (isObject$6(thing) || isFunction$3(thing)) && isFunction$3(thing.then) && isFunction$3(thing.catch);
|
|
10037
|
-
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
10038
|
-
if (setImmediateSupported) {
|
|
10039
|
-
return setImmediate;
|
|
10040
|
-
}
|
|
10041
|
-
return postMessageSupported ? ((token2, callbacks) => {
|
|
10042
|
-
_global.addEventListener("message", ({ source, data }) => {
|
|
10043
|
-
if (source === _global && data === token2) {
|
|
10044
|
-
callbacks.length && callbacks.shift()();
|
|
10045
|
-
}
|
|
10046
|
-
}, false);
|
|
10047
|
-
return (cb) => {
|
|
10048
|
-
callbacks.push(cb);
|
|
10049
|
-
_global.postMessage(token2, "*");
|
|
10050
|
-
};
|
|
10051
|
-
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
10052
|
-
})(
|
|
10053
|
-
typeof setImmediate === "function",
|
|
10054
|
-
isFunction$3(_global.postMessage)
|
|
10055
|
-
);
|
|
10056
|
-
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
10057
|
-
const utils$2 = {
|
|
10058
|
-
isArray: isArray$4,
|
|
10059
|
-
isArrayBuffer,
|
|
10060
|
-
isBuffer,
|
|
10061
|
-
isFormData,
|
|
10062
|
-
isArrayBufferView,
|
|
10063
|
-
isString: isString$3,
|
|
10064
|
-
isNumber: isNumber$4,
|
|
10065
|
-
isBoolean: isBoolean$1,
|
|
10066
|
-
isObject: isObject$6,
|
|
10067
|
-
isPlainObject,
|
|
10068
|
-
isReadableStream,
|
|
10069
|
-
isRequest,
|
|
10070
|
-
isResponse,
|
|
10071
|
-
isHeaders,
|
|
10072
|
-
isUndefined: isUndefined$1,
|
|
10073
|
-
isDate: isDate$1,
|
|
10074
|
-
isFile,
|
|
10075
|
-
isBlob,
|
|
10076
|
-
isRegExp: isRegExp$1,
|
|
10077
|
-
isFunction: isFunction$3,
|
|
10078
|
-
isStream,
|
|
10079
|
-
isURLSearchParams,
|
|
10080
|
-
isTypedArray: isTypedArray$1,
|
|
10081
|
-
isFileList,
|
|
10082
|
-
forEach,
|
|
10083
|
-
merge: merge$1,
|
|
10084
|
-
extend: extend$2,
|
|
10085
|
-
trim: trim$2,
|
|
10086
|
-
stripBOM,
|
|
10087
|
-
inherits: inherits$1,
|
|
10088
|
-
toFlatObject,
|
|
10089
|
-
kindOf,
|
|
10090
|
-
kindOfTest,
|
|
10091
|
-
endsWith,
|
|
10092
|
-
toArray: toArray$1,
|
|
10093
|
-
forEachEntry,
|
|
10094
|
-
matchAll,
|
|
10095
|
-
isHTMLForm,
|
|
10096
|
-
hasOwnProperty,
|
|
10097
|
-
hasOwnProp: hasOwnProperty,
|
|
10098
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
10099
|
-
reduceDescriptors,
|
|
10100
|
-
freezeMethods,
|
|
10101
|
-
toObjectSet,
|
|
10102
|
-
toCamelCase: toCamelCase$1,
|
|
10103
|
-
noop: noop$1,
|
|
10104
|
-
toFiniteNumber,
|
|
10105
|
-
findKey,
|
|
10106
|
-
global: _global,
|
|
10107
|
-
isContextDefined,
|
|
10108
|
-
isSpecCompliantForm,
|
|
10109
|
-
toJSONObject,
|
|
10110
|
-
isAsyncFn,
|
|
10111
|
-
isThenable,
|
|
10112
|
-
setImmediate: _setImmediate,
|
|
10113
|
-
asap
|
|
10114
|
-
};
|
|
10115
|
-
function AxiosError$1(message, code, config, request, response) {
|
|
10116
|
-
Error.call(this);
|
|
10117
|
-
if (Error.captureStackTrace) {
|
|
10118
|
-
Error.captureStackTrace(this, this.constructor);
|
|
10119
|
-
} else {
|
|
10120
|
-
this.stack = new Error().stack;
|
|
10121
|
-
}
|
|
10122
|
-
this.message = message;
|
|
10123
|
-
this.name = "AxiosError";
|
|
10124
|
-
code && (this.code = code);
|
|
10125
|
-
config && (this.config = config);
|
|
10126
|
-
request && (this.request = request);
|
|
10127
|
-
if (response) {
|
|
10128
|
-
this.response = response;
|
|
10129
|
-
this.status = response.status ? response.status : null;
|
|
10130
|
-
}
|
|
10131
|
-
}
|
|
10132
|
-
utils$2.inherits(AxiosError$1, Error, {
|
|
10133
|
-
toJSON: function toJSON2() {
|
|
10134
|
-
return {
|
|
10135
|
-
// Standard
|
|
10136
|
-
message: this.message,
|
|
10137
|
-
name: this.name,
|
|
10138
|
-
// Microsoft
|
|
10139
|
-
description: this.description,
|
|
10140
|
-
number: this.number,
|
|
10141
|
-
// Mozilla
|
|
10142
|
-
fileName: this.fileName,
|
|
10143
|
-
lineNumber: this.lineNumber,
|
|
10144
|
-
columnNumber: this.columnNumber,
|
|
10145
|
-
stack: this.stack,
|
|
10146
|
-
// Axios
|
|
10147
|
-
config: utils$2.toJSONObject(this.config),
|
|
10148
|
-
code: this.code,
|
|
10149
|
-
status: this.status
|
|
10150
|
-
};
|
|
10151
|
-
}
|
|
10152
|
-
});
|
|
10153
|
-
const prototype$1 = AxiosError$1.prototype;
|
|
10154
|
-
const descriptors = {};
|
|
10155
|
-
[
|
|
10156
|
-
"ERR_BAD_OPTION_VALUE",
|
|
10157
|
-
"ERR_BAD_OPTION",
|
|
10158
|
-
"ECONNABORTED",
|
|
10159
|
-
"ETIMEDOUT",
|
|
10160
|
-
"ERR_NETWORK",
|
|
10161
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
10162
|
-
"ERR_DEPRECATED",
|
|
10163
|
-
"ERR_BAD_RESPONSE",
|
|
10164
|
-
"ERR_BAD_REQUEST",
|
|
10165
|
-
"ERR_CANCELED",
|
|
10166
|
-
"ERR_NOT_SUPPORT",
|
|
10167
|
-
"ERR_INVALID_URL"
|
|
10168
|
-
// eslint-disable-next-line func-names
|
|
10169
|
-
].forEach((code) => {
|
|
10170
|
-
descriptors[code] = { value: code };
|
|
10171
|
-
});
|
|
10172
|
-
Object.defineProperties(AxiosError$1, descriptors);
|
|
10173
|
-
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
|
|
10174
|
-
AxiosError$1.from = (error2, code, config, request, response, customProps) => {
|
|
10175
|
-
const axiosError = Object.create(prototype$1);
|
|
10176
|
-
utils$2.toFlatObject(error2, axiosError, function filter3(obj) {
|
|
10177
|
-
return obj !== Error.prototype;
|
|
10178
|
-
}, (prop) => {
|
|
10179
|
-
return prop !== "isAxiosError";
|
|
10180
|
-
});
|
|
10181
|
-
AxiosError$1.call(axiosError, error2.message, code, config, request, response);
|
|
10182
|
-
axiosError.cause = error2;
|
|
10183
|
-
axiosError.name = error2.name;
|
|
10184
|
-
customProps && Object.assign(axiosError, customProps);
|
|
10185
|
-
return axiosError;
|
|
10186
|
-
};
|
|
10187
|
-
const httpAdapter = null;
|
|
10188
|
-
function isVisitable(thing) {
|
|
10189
|
-
return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
|
|
10190
|
-
}
|
|
10191
|
-
function removeBrackets(key) {
|
|
10192
|
-
return utils$2.endsWith(key, "[]") ? key.slice(0, -2) : key;
|
|
10193
|
-
}
|
|
10194
|
-
function renderKey(path, key, dots) {
|
|
10195
|
-
if (!path) return key;
|
|
10196
|
-
return path.concat(key).map(function each2(token2, i2) {
|
|
10197
|
-
token2 = removeBrackets(token2);
|
|
10198
|
-
return !dots && i2 ? "[" + token2 + "]" : token2;
|
|
10199
|
-
}).join(dots ? "." : "");
|
|
10200
|
-
}
|
|
10201
|
-
function isFlatArray(arr) {
|
|
10202
|
-
return utils$2.isArray(arr) && !arr.some(isVisitable);
|
|
10203
|
-
}
|
|
10204
|
-
const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter2(prop) {
|
|
10205
|
-
return /^is[A-Z]/.test(prop);
|
|
10206
|
-
});
|
|
10207
|
-
function toFormData$1(obj, formData, options) {
|
|
10208
|
-
if (!utils$2.isObject(obj)) {
|
|
10209
|
-
throw new TypeError("target must be an object");
|
|
10210
|
-
}
|
|
10211
|
-
formData = formData || new FormData();
|
|
10212
|
-
options = utils$2.toFlatObject(options, {
|
|
10213
|
-
metaTokens: true,
|
|
10214
|
-
dots: false,
|
|
10215
|
-
indexes: false
|
|
10216
|
-
}, false, function defined(option, source) {
|
|
10217
|
-
return !utils$2.isUndefined(source[option]);
|
|
10218
|
-
});
|
|
10219
|
-
const metaTokens = options.metaTokens;
|
|
10220
|
-
const visitor = options.visitor || defaultVisitor;
|
|
10221
|
-
const dots = options.dots;
|
|
10222
|
-
const indexes = options.indexes;
|
|
10223
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
10224
|
-
const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
|
|
10225
|
-
if (!utils$2.isFunction(visitor)) {
|
|
10226
|
-
throw new TypeError("visitor must be a function");
|
|
10227
|
-
}
|
|
10228
|
-
function convertValue(value) {
|
|
10229
|
-
if (value === null) return "";
|
|
10230
|
-
if (utils$2.isDate(value)) {
|
|
10231
|
-
return value.toISOString();
|
|
10232
|
-
}
|
|
10233
|
-
if (!useBlob && utils$2.isBlob(value)) {
|
|
10234
|
-
throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
10235
|
-
}
|
|
10236
|
-
if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
|
|
10237
|
-
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
10238
|
-
}
|
|
10239
|
-
return value;
|
|
10240
|
-
}
|
|
10241
|
-
function defaultVisitor(value, key, path) {
|
|
10242
|
-
let arr = value;
|
|
10243
|
-
if (value && !path && typeof value === "object") {
|
|
10244
|
-
if (utils$2.endsWith(key, "{}")) {
|
|
10245
|
-
key = metaTokens ? key : key.slice(0, -2);
|
|
10246
|
-
value = JSON.stringify(value);
|
|
10247
|
-
} else if (utils$2.isArray(value) && isFlatArray(value) || (utils$2.isFileList(value) || utils$2.endsWith(key, "[]")) && (arr = utils$2.toArray(value))) {
|
|
10248
|
-
key = removeBrackets(key);
|
|
10249
|
-
arr.forEach(function each2(el, index) {
|
|
10250
|
-
!(utils$2.isUndefined(el) || el === null) && formData.append(
|
|
10251
|
-
// eslint-disable-next-line no-nested-ternary
|
|
10252
|
-
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
10253
|
-
convertValue(el)
|
|
10254
|
-
);
|
|
10255
|
-
});
|
|
10256
|
-
return false;
|
|
10257
|
-
}
|
|
10258
|
-
}
|
|
10259
|
-
if (isVisitable(value)) {
|
|
10260
|
-
return true;
|
|
10261
|
-
}
|
|
10262
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
10263
|
-
return false;
|
|
10264
|
-
}
|
|
10265
|
-
const stack = [];
|
|
10266
|
-
const exposedHelpers = Object.assign(predicates, {
|
|
10267
|
-
defaultVisitor,
|
|
10268
|
-
convertValue,
|
|
10269
|
-
isVisitable
|
|
10270
|
-
});
|
|
10271
|
-
function build(value, path) {
|
|
10272
|
-
if (utils$2.isUndefined(value)) return;
|
|
10273
|
-
if (stack.indexOf(value) !== -1) {
|
|
10274
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
10275
|
-
}
|
|
10276
|
-
stack.push(value);
|
|
10277
|
-
utils$2.forEach(value, function each2(el, key) {
|
|
10278
|
-
const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
|
|
10279
|
-
formData,
|
|
10280
|
-
el,
|
|
10281
|
-
utils$2.isString(key) ? key.trim() : key,
|
|
10282
|
-
path,
|
|
10283
|
-
exposedHelpers
|
|
10284
|
-
);
|
|
10285
|
-
if (result === true) {
|
|
10286
|
-
build(el, path ? path.concat(key) : [key]);
|
|
10287
|
-
}
|
|
10288
|
-
});
|
|
10289
|
-
stack.pop();
|
|
10290
|
-
}
|
|
10291
|
-
if (!utils$2.isObject(obj)) {
|
|
10292
|
-
throw new TypeError("data must be an object");
|
|
10293
|
-
}
|
|
10294
|
-
build(obj);
|
|
10295
|
-
return formData;
|
|
10296
|
-
}
|
|
10297
|
-
function encode$1(str2) {
|
|
10298
|
-
const charMap = {
|
|
10299
|
-
"!": "%21",
|
|
10300
|
-
"'": "%27",
|
|
10301
|
-
"(": "%28",
|
|
10302
|
-
")": "%29",
|
|
10303
|
-
"~": "%7E",
|
|
10304
|
-
"%20": "+",
|
|
10305
|
-
"%00": "\0"
|
|
10306
|
-
};
|
|
10307
|
-
return encodeURIComponent(str2).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
10308
|
-
return charMap[match];
|
|
10309
|
-
});
|
|
10310
|
-
}
|
|
10311
|
-
function AxiosURLSearchParams(params, options) {
|
|
10312
|
-
this._pairs = [];
|
|
10313
|
-
params && toFormData$1(params, this, options);
|
|
10314
|
-
}
|
|
10315
|
-
const prototype = AxiosURLSearchParams.prototype;
|
|
10316
|
-
prototype.append = function append(name2, value) {
|
|
10317
|
-
this._pairs.push([name2, value]);
|
|
10318
|
-
};
|
|
10319
|
-
prototype.toString = function toString2(encoder) {
|
|
10320
|
-
const _encode = encoder ? function(value) {
|
|
10321
|
-
return encoder.call(this, value, encode$1);
|
|
10322
|
-
} : encode$1;
|
|
10323
|
-
return this._pairs.map(function each2(pair) {
|
|
10324
|
-
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
10325
|
-
}, "").join("&");
|
|
10326
|
-
};
|
|
10327
|
-
function encode(val) {
|
|
10328
|
-
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
10329
|
-
}
|
|
10330
|
-
function buildURL(url, params, options) {
|
|
10331
|
-
if (!params) {
|
|
10332
|
-
return url;
|
|
10333
|
-
}
|
|
10334
|
-
const _encode = options && options.encode || encode;
|
|
10335
|
-
if (utils$2.isFunction(options)) {
|
|
10336
|
-
options = {
|
|
10337
|
-
serialize: options
|
|
10338
|
-
};
|
|
10339
|
-
}
|
|
10340
|
-
const serializeFn = options && options.serialize;
|
|
10341
|
-
let serializedParams;
|
|
10342
|
-
if (serializeFn) {
|
|
10343
|
-
serializedParams = serializeFn(params, options);
|
|
10344
|
-
} else {
|
|
10345
|
-
serializedParams = utils$2.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
|
|
10346
|
-
}
|
|
10347
|
-
if (serializedParams) {
|
|
10348
|
-
const hashmarkIndex = url.indexOf("#");
|
|
10349
|
-
if (hashmarkIndex !== -1) {
|
|
10350
|
-
url = url.slice(0, hashmarkIndex);
|
|
10351
|
-
}
|
|
10352
|
-
url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
|
|
10353
|
-
}
|
|
10354
|
-
return url;
|
|
10355
|
-
}
|
|
10356
|
-
class InterceptorManager {
|
|
10357
|
-
constructor() {
|
|
10358
|
-
this.handlers = [];
|
|
10359
|
-
}
|
|
10360
|
-
/**
|
|
10361
|
-
* Add a new interceptor to the stack
|
|
10362
|
-
*
|
|
10363
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
10364
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
10365
|
-
*
|
|
10366
|
-
* @return {Number} An ID used to remove interceptor later
|
|
10367
|
-
*/
|
|
10368
|
-
use(fulfilled, rejected, options) {
|
|
10369
|
-
this.handlers.push({
|
|
10370
|
-
fulfilled,
|
|
10371
|
-
rejected,
|
|
10372
|
-
synchronous: options ? options.synchronous : false,
|
|
10373
|
-
runWhen: options ? options.runWhen : null
|
|
10374
|
-
});
|
|
10375
|
-
return this.handlers.length - 1;
|
|
10376
|
-
}
|
|
10377
|
-
/**
|
|
10378
|
-
* Remove an interceptor from the stack
|
|
10379
|
-
*
|
|
10380
|
-
* @param {Number} id The ID that was returned by `use`
|
|
10381
|
-
*
|
|
10382
|
-
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
10383
|
-
*/
|
|
10384
|
-
eject(id2) {
|
|
10385
|
-
if (this.handlers[id2]) {
|
|
10386
|
-
this.handlers[id2] = null;
|
|
10387
|
-
}
|
|
10388
|
-
}
|
|
10389
|
-
/**
|
|
10390
|
-
* Clear all interceptors from the stack
|
|
10391
|
-
*
|
|
10392
|
-
* @returns {void}
|
|
10393
|
-
*/
|
|
10394
|
-
clear() {
|
|
10395
|
-
if (this.handlers) {
|
|
10396
|
-
this.handlers = [];
|
|
10397
|
-
}
|
|
10398
|
-
}
|
|
10399
|
-
/**
|
|
10400
|
-
* Iterate over all the registered interceptors
|
|
10401
|
-
*
|
|
10402
|
-
* This method is particularly useful for skipping over any
|
|
10403
|
-
* interceptors that may have become `null` calling `eject`.
|
|
10404
|
-
*
|
|
10405
|
-
* @param {Function} fn The function to call for each interceptor
|
|
10406
|
-
*
|
|
10407
|
-
* @returns {void}
|
|
10408
|
-
*/
|
|
10409
|
-
forEach(fn) {
|
|
10410
|
-
utils$2.forEach(this.handlers, function forEachHandler(h2) {
|
|
10411
|
-
if (h2 !== null) {
|
|
10412
|
-
fn(h2);
|
|
10413
|
-
}
|
|
10414
|
-
});
|
|
10415
|
-
}
|
|
10416
|
-
}
|
|
10417
|
-
const transitionalDefaults = {
|
|
10418
|
-
silentJSONParsing: true,
|
|
10419
|
-
forcedJSONParsing: true,
|
|
10420
|
-
clarifyTimeoutError: false
|
|
10421
|
-
};
|
|
10422
|
-
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
|
|
10423
|
-
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
|
|
10424
|
-
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
|
|
10425
|
-
const platform$2 = {
|
|
10426
|
-
isBrowser: true,
|
|
10427
|
-
classes: {
|
|
10428
|
-
URLSearchParams: URLSearchParams$1,
|
|
10429
|
-
FormData: FormData$1,
|
|
10430
|
-
Blob: Blob$1
|
|
10431
|
-
},
|
|
10432
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
10433
|
-
};
|
|
10434
|
-
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
10435
|
-
const _navigator = typeof navigator === "object" && navigator || void 0;
|
|
10436
|
-
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
|
|
10437
|
-
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
10438
|
-
return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
|
|
10439
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
10440
|
-
})();
|
|
10441
|
-
const origin = hasBrowserEnv && window.location.href || "http://localhost";
|
|
10442
|
-
const utils$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
10443
|
-
__proto__: null,
|
|
10444
|
-
hasBrowserEnv,
|
|
10445
|
-
hasStandardBrowserEnv,
|
|
10446
|
-
hasStandardBrowserWebWorkerEnv,
|
|
10447
|
-
navigator: _navigator,
|
|
10448
|
-
origin
|
|
10449
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
10450
|
-
const platform$1 = {
|
|
10451
|
-
...utils$1,
|
|
10452
|
-
...platform$2
|
|
10453
|
-
};
|
|
10454
|
-
function toURLEncodedForm(data, options) {
|
|
10455
|
-
return toFormData$1(data, new platform$1.classes.URLSearchParams(), Object.assign({
|
|
10456
|
-
visitor: function(value, key, path, helpers) {
|
|
10457
|
-
if (platform$1.isNode && utils$2.isBuffer(value)) {
|
|
10458
|
-
this.append(key, value.toString("base64"));
|
|
10459
|
-
return false;
|
|
10460
|
-
}
|
|
10461
|
-
return helpers.defaultVisitor.apply(this, arguments);
|
|
10462
|
-
}
|
|
10463
|
-
}, options));
|
|
10464
|
-
}
|
|
10465
|
-
function parsePropPath(name2) {
|
|
10466
|
-
return utils$2.matchAll(/\w+|\[(\w*)]/g, name2).map((match) => {
|
|
10467
|
-
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
10468
|
-
});
|
|
10469
|
-
}
|
|
10470
|
-
function arrayToObject(arr) {
|
|
10471
|
-
const obj = {};
|
|
10472
|
-
const keys2 = Object.keys(arr);
|
|
10473
|
-
let i2;
|
|
10474
|
-
const len2 = keys2.length;
|
|
10475
|
-
let key;
|
|
10476
|
-
for (i2 = 0; i2 < len2; i2++) {
|
|
10477
|
-
key = keys2[i2];
|
|
10478
|
-
obj[key] = arr[key];
|
|
10479
|
-
}
|
|
10480
|
-
return obj;
|
|
10481
|
-
}
|
|
10482
|
-
function formDataToJSON(formData) {
|
|
10483
|
-
function buildPath2(path, value, target, index) {
|
|
10484
|
-
let name2 = path[index++];
|
|
10485
|
-
if (name2 === "__proto__") return true;
|
|
10486
|
-
const isNumericKey = Number.isFinite(+name2);
|
|
10487
|
-
const isLast = index >= path.length;
|
|
10488
|
-
name2 = !name2 && utils$2.isArray(target) ? target.length : name2;
|
|
10489
|
-
if (isLast) {
|
|
10490
|
-
if (utils$2.hasOwnProp(target, name2)) {
|
|
10491
|
-
target[name2] = [target[name2], value];
|
|
10492
|
-
} else {
|
|
10493
|
-
target[name2] = value;
|
|
10494
|
-
}
|
|
10495
|
-
return !isNumericKey;
|
|
10496
|
-
}
|
|
10497
|
-
if (!target[name2] || !utils$2.isObject(target[name2])) {
|
|
10498
|
-
target[name2] = [];
|
|
10499
|
-
}
|
|
10500
|
-
const result = buildPath2(path, value, target[name2], index);
|
|
10501
|
-
if (result && utils$2.isArray(target[name2])) {
|
|
10502
|
-
target[name2] = arrayToObject(target[name2]);
|
|
10503
|
-
}
|
|
10504
|
-
return !isNumericKey;
|
|
10505
|
-
}
|
|
10506
|
-
if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
|
|
10507
|
-
const obj = {};
|
|
10508
|
-
utils$2.forEachEntry(formData, (name2, value) => {
|
|
10509
|
-
buildPath2(parsePropPath(name2), value, obj, 0);
|
|
10510
|
-
});
|
|
10511
|
-
return obj;
|
|
10512
|
-
}
|
|
10513
|
-
return null;
|
|
10514
|
-
}
|
|
10515
|
-
function stringifySafely(rawValue, parser2, encoder) {
|
|
10516
|
-
if (utils$2.isString(rawValue)) {
|
|
10517
|
-
try {
|
|
10518
|
-
(parser2 || JSON.parse)(rawValue);
|
|
10519
|
-
return utils$2.trim(rawValue);
|
|
10520
|
-
} catch (e2) {
|
|
10521
|
-
if (e2.name !== "SyntaxError") {
|
|
10522
|
-
throw e2;
|
|
10523
|
-
}
|
|
10524
|
-
}
|
|
10525
|
-
}
|
|
10526
|
-
return (encoder || JSON.stringify)(rawValue);
|
|
10527
|
-
}
|
|
10528
|
-
const defaults$2 = {
|
|
10529
|
-
transitional: transitionalDefaults,
|
|
10530
|
-
adapter: ["xhr", "http", "fetch"],
|
|
10531
|
-
transformRequest: [function transformRequest(data, headers) {
|
|
10532
|
-
const contentType = headers.getContentType() || "";
|
|
10533
|
-
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
10534
|
-
const isObjectPayload = utils$2.isObject(data);
|
|
10535
|
-
if (isObjectPayload && utils$2.isHTMLForm(data)) {
|
|
10536
|
-
data = new FormData(data);
|
|
10537
|
-
}
|
|
10538
|
-
const isFormData2 = utils$2.isFormData(data);
|
|
10539
|
-
if (isFormData2) {
|
|
10540
|
-
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
10541
|
-
}
|
|
10542
|
-
if (utils$2.isArrayBuffer(data) || utils$2.isBuffer(data) || utils$2.isStream(data) || utils$2.isFile(data) || utils$2.isBlob(data) || utils$2.isReadableStream(data)) {
|
|
10543
|
-
return data;
|
|
10544
|
-
}
|
|
10545
|
-
if (utils$2.isArrayBufferView(data)) {
|
|
10546
|
-
return data.buffer;
|
|
10547
|
-
}
|
|
10548
|
-
if (utils$2.isURLSearchParams(data)) {
|
|
10549
|
-
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
10550
|
-
return data.toString();
|
|
10551
|
-
}
|
|
10552
|
-
let isFileList2;
|
|
10553
|
-
if (isObjectPayload) {
|
|
10554
|
-
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
10555
|
-
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
10556
|
-
}
|
|
10557
|
-
if ((isFileList2 = utils$2.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
10558
|
-
const _FormData = this.env && this.env.FormData;
|
|
10559
|
-
return toFormData$1(
|
|
10560
|
-
isFileList2 ? { "files[]": data } : data,
|
|
10561
|
-
_FormData && new _FormData(),
|
|
10562
|
-
this.formSerializer
|
|
10563
|
-
);
|
|
10564
|
-
}
|
|
10565
|
-
}
|
|
10566
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
10567
|
-
headers.setContentType("application/json", false);
|
|
10568
|
-
return stringifySafely(data);
|
|
10569
|
-
}
|
|
10570
|
-
return data;
|
|
10571
|
-
}],
|
|
10572
|
-
transformResponse: [function transformResponse(data) {
|
|
10573
|
-
const transitional2 = this.transitional || defaults$2.transitional;
|
|
10574
|
-
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
10575
|
-
const JSONRequested = this.responseType === "json";
|
|
10576
|
-
if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
|
|
10577
|
-
return data;
|
|
10578
|
-
}
|
|
10579
|
-
if (data && utils$2.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
10580
|
-
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
10581
|
-
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
10582
|
-
try {
|
|
10583
|
-
return JSON.parse(data);
|
|
10584
|
-
} catch (e2) {
|
|
10585
|
-
if (strictJSONParsing) {
|
|
10586
|
-
if (e2.name === "SyntaxError") {
|
|
10587
|
-
throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
10588
|
-
}
|
|
10589
|
-
throw e2;
|
|
10590
|
-
}
|
|
10591
|
-
}
|
|
10592
|
-
}
|
|
10593
|
-
return data;
|
|
10594
|
-
}],
|
|
10595
|
-
/**
|
|
10596
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
10597
|
-
* timeout is not created.
|
|
10598
|
-
*/
|
|
10599
|
-
timeout: 0,
|
|
10600
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
10601
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
10602
|
-
maxContentLength: -1,
|
|
10603
|
-
maxBodyLength: -1,
|
|
10604
|
-
env: {
|
|
10605
|
-
FormData: platform$1.classes.FormData,
|
|
10606
|
-
Blob: platform$1.classes.Blob
|
|
10607
|
-
},
|
|
10608
|
-
validateStatus: function validateStatus(status) {
|
|
10609
|
-
return status >= 200 && status < 300;
|
|
10610
|
-
},
|
|
10611
|
-
headers: {
|
|
10612
|
-
common: {
|
|
10613
|
-
"Accept": "application/json, text/plain, */*",
|
|
10614
|
-
"Content-Type": void 0
|
|
10615
|
-
}
|
|
10616
|
-
}
|
|
10617
|
-
};
|
|
10618
|
-
utils$2.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
10619
|
-
defaults$2.headers[method] = {};
|
|
10620
|
-
});
|
|
10621
|
-
const ignoreDuplicateOf = utils$2.toObjectSet([
|
|
10622
|
-
"age",
|
|
10623
|
-
"authorization",
|
|
10624
|
-
"content-length",
|
|
10625
|
-
"content-type",
|
|
10626
|
-
"etag",
|
|
10627
|
-
"expires",
|
|
10628
|
-
"from",
|
|
10629
|
-
"host",
|
|
10630
|
-
"if-modified-since",
|
|
10631
|
-
"if-unmodified-since",
|
|
10632
|
-
"last-modified",
|
|
10633
|
-
"location",
|
|
10634
|
-
"max-forwards",
|
|
10635
|
-
"proxy-authorization",
|
|
10636
|
-
"referer",
|
|
10637
|
-
"retry-after",
|
|
10638
|
-
"user-agent"
|
|
10639
|
-
]);
|
|
10640
|
-
const parseHeaders = (rawHeaders) => {
|
|
10641
|
-
const parsed = {};
|
|
10642
|
-
let key;
|
|
10643
|
-
let val;
|
|
10644
|
-
let i2;
|
|
10645
|
-
rawHeaders && rawHeaders.split("\n").forEach(function parser2(line) {
|
|
10646
|
-
i2 = line.indexOf(":");
|
|
10647
|
-
key = line.substring(0, i2).trim().toLowerCase();
|
|
10648
|
-
val = line.substring(i2 + 1).trim();
|
|
10649
|
-
if (!key || parsed[key] && ignoreDuplicateOf[key]) {
|
|
10650
|
-
return;
|
|
10651
|
-
}
|
|
10652
|
-
if (key === "set-cookie") {
|
|
10653
|
-
if (parsed[key]) {
|
|
10654
|
-
parsed[key].push(val);
|
|
10655
|
-
} else {
|
|
10656
|
-
parsed[key] = [val];
|
|
10657
|
-
}
|
|
10658
|
-
} else {
|
|
10659
|
-
parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
|
|
10660
|
-
}
|
|
10661
|
-
});
|
|
10662
|
-
return parsed;
|
|
10663
|
-
};
|
|
10664
|
-
const $internals = Symbol("internals");
|
|
10665
|
-
function normalizeHeader(header) {
|
|
10666
|
-
return header && String(header).trim().toLowerCase();
|
|
10667
|
-
}
|
|
10668
|
-
function normalizeValue(value) {
|
|
10669
|
-
if (value === false || value == null) {
|
|
10670
|
-
return value;
|
|
10671
|
-
}
|
|
10672
|
-
return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
10673
|
-
}
|
|
10674
|
-
function parseTokens(str2) {
|
|
10675
|
-
const tokens2 = /* @__PURE__ */ Object.create(null);
|
|
10676
|
-
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
10677
|
-
let match;
|
|
10678
|
-
while (match = tokensRE.exec(str2)) {
|
|
10679
|
-
tokens2[match[1]] = match[2];
|
|
10680
|
-
}
|
|
10681
|
-
return tokens2;
|
|
10682
|
-
}
|
|
10683
|
-
const isValidHeaderName = (str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim());
|
|
10684
|
-
function matchHeaderValue(context, value, header, filter3, isHeaderNameFilter) {
|
|
10685
|
-
if (utils$2.isFunction(filter3)) {
|
|
10686
|
-
return filter3.call(this, value, header);
|
|
10687
|
-
}
|
|
10688
|
-
if (isHeaderNameFilter) {
|
|
10689
|
-
value = header;
|
|
10690
|
-
}
|
|
10691
|
-
if (!utils$2.isString(value)) return;
|
|
10692
|
-
if (utils$2.isString(filter3)) {
|
|
10693
|
-
return value.indexOf(filter3) !== -1;
|
|
10694
|
-
}
|
|
10695
|
-
if (utils$2.isRegExp(filter3)) {
|
|
10696
|
-
return filter3.test(value);
|
|
10697
|
-
}
|
|
10698
|
-
}
|
|
10699
|
-
function formatHeader(header) {
|
|
10700
|
-
return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str2) => {
|
|
10701
|
-
return char.toUpperCase() + str2;
|
|
10702
|
-
});
|
|
10703
|
-
}
|
|
10704
|
-
function buildAccessors(obj, header) {
|
|
10705
|
-
const accessorName = utils$2.toCamelCase(" " + header);
|
|
10706
|
-
["get", "set", "has"].forEach((methodName) => {
|
|
10707
|
-
Object.defineProperty(obj, methodName + accessorName, {
|
|
10708
|
-
value: function(arg1, arg2, arg3) {
|
|
10709
|
-
return this[methodName].call(this, header, arg1, arg2, arg3);
|
|
10710
|
-
},
|
|
10711
|
-
configurable: true
|
|
10712
|
-
});
|
|
10713
|
-
});
|
|
10714
|
-
}
|
|
10715
|
-
let AxiosHeaders$1 = class AxiosHeaders2 {
|
|
10716
|
-
constructor(headers) {
|
|
10717
|
-
headers && this.set(headers);
|
|
10718
|
-
}
|
|
10719
|
-
set(header, valueOrRewrite, rewrite) {
|
|
10720
|
-
const self2 = this;
|
|
10721
|
-
function setHeader(_value, _header, _rewrite) {
|
|
10722
|
-
const lHeader = normalizeHeader(_header);
|
|
10723
|
-
if (!lHeader) {
|
|
10724
|
-
throw new Error("header name must be a non-empty string");
|
|
10725
|
-
}
|
|
10726
|
-
const key = utils$2.findKey(self2, lHeader);
|
|
10727
|
-
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
10728
|
-
self2[key || _header] = normalizeValue(_value);
|
|
10729
|
-
}
|
|
10730
|
-
}
|
|
10731
|
-
const setHeaders = (headers, _rewrite) => utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
10732
|
-
if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
|
|
10733
|
-
setHeaders(header, valueOrRewrite);
|
|
10734
|
-
} else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
10735
|
-
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
10736
|
-
} else if (utils$2.isHeaders(header)) {
|
|
10737
|
-
for (const [key, value] of header.entries()) {
|
|
10738
|
-
setHeader(value, key, rewrite);
|
|
10739
|
-
}
|
|
10740
|
-
} else {
|
|
10741
|
-
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
10742
|
-
}
|
|
10743
|
-
return this;
|
|
10744
|
-
}
|
|
10745
|
-
get(header, parser2) {
|
|
10746
|
-
header = normalizeHeader(header);
|
|
10747
|
-
if (header) {
|
|
10748
|
-
const key = utils$2.findKey(this, header);
|
|
10749
|
-
if (key) {
|
|
10750
|
-
const value = this[key];
|
|
10751
|
-
if (!parser2) {
|
|
10752
|
-
return value;
|
|
10753
|
-
}
|
|
10754
|
-
if (parser2 === true) {
|
|
10755
|
-
return parseTokens(value);
|
|
10756
|
-
}
|
|
10757
|
-
if (utils$2.isFunction(parser2)) {
|
|
10758
|
-
return parser2.call(this, value, key);
|
|
10759
|
-
}
|
|
10760
|
-
if (utils$2.isRegExp(parser2)) {
|
|
10761
|
-
return parser2.exec(value);
|
|
10762
|
-
}
|
|
10763
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
10764
|
-
}
|
|
10765
|
-
}
|
|
10766
|
-
}
|
|
10767
|
-
has(header, matcher) {
|
|
10768
|
-
header = normalizeHeader(header);
|
|
10769
|
-
if (header) {
|
|
10770
|
-
const key = utils$2.findKey(this, header);
|
|
10771
|
-
return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
10772
|
-
}
|
|
10773
|
-
return false;
|
|
10774
|
-
}
|
|
10775
|
-
delete(header, matcher) {
|
|
10776
|
-
const self2 = this;
|
|
10777
|
-
let deleted = false;
|
|
10778
|
-
function deleteHeader(_header) {
|
|
10779
|
-
_header = normalizeHeader(_header);
|
|
10780
|
-
if (_header) {
|
|
10781
|
-
const key = utils$2.findKey(self2, _header);
|
|
10782
|
-
if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
|
|
10783
|
-
delete self2[key];
|
|
10784
|
-
deleted = true;
|
|
10785
|
-
}
|
|
10786
|
-
}
|
|
10787
|
-
}
|
|
10788
|
-
if (utils$2.isArray(header)) {
|
|
10789
|
-
header.forEach(deleteHeader);
|
|
10790
|
-
} else {
|
|
10791
|
-
deleteHeader(header);
|
|
10792
|
-
}
|
|
10793
|
-
return deleted;
|
|
10794
|
-
}
|
|
10795
|
-
clear(matcher) {
|
|
10796
|
-
const keys2 = Object.keys(this);
|
|
10797
|
-
let i2 = keys2.length;
|
|
10798
|
-
let deleted = false;
|
|
10799
|
-
while (i2--) {
|
|
10800
|
-
const key = keys2[i2];
|
|
10801
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
|
10802
|
-
delete this[key];
|
|
10803
|
-
deleted = true;
|
|
10804
|
-
}
|
|
10805
|
-
}
|
|
10806
|
-
return deleted;
|
|
10807
|
-
}
|
|
10808
|
-
normalize(format2) {
|
|
10809
|
-
const self2 = this;
|
|
10810
|
-
const headers = {};
|
|
10811
|
-
utils$2.forEach(this, (value, header) => {
|
|
10812
|
-
const key = utils$2.findKey(headers, header);
|
|
10813
|
-
if (key) {
|
|
10814
|
-
self2[key] = normalizeValue(value);
|
|
10815
|
-
delete self2[header];
|
|
10816
|
-
return;
|
|
10817
|
-
}
|
|
10818
|
-
const normalized = format2 ? formatHeader(header) : String(header).trim();
|
|
10819
|
-
if (normalized !== header) {
|
|
10820
|
-
delete self2[header];
|
|
10821
|
-
}
|
|
10822
|
-
self2[normalized] = normalizeValue(value);
|
|
10823
|
-
headers[normalized] = true;
|
|
10824
|
-
});
|
|
10825
|
-
return this;
|
|
10826
|
-
}
|
|
10827
|
-
concat(...targets) {
|
|
10828
|
-
return this.constructor.concat(this, ...targets);
|
|
10829
|
-
}
|
|
10830
|
-
toJSON(asStrings) {
|
|
10831
|
-
const obj = /* @__PURE__ */ Object.create(null);
|
|
10832
|
-
utils$2.forEach(this, (value, header) => {
|
|
10833
|
-
value != null && value !== false && (obj[header] = asStrings && utils$2.isArray(value) ? value.join(", ") : value);
|
|
10834
|
-
});
|
|
10835
|
-
return obj;
|
|
10836
|
-
}
|
|
10837
|
-
[Symbol.iterator]() {
|
|
10838
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
10839
|
-
}
|
|
10840
|
-
toString() {
|
|
10841
|
-
return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
|
|
10842
|
-
}
|
|
10843
|
-
get [Symbol.toStringTag]() {
|
|
10844
|
-
return "AxiosHeaders";
|
|
10845
|
-
}
|
|
10846
|
-
static from(thing) {
|
|
10847
|
-
return thing instanceof this ? thing : new this(thing);
|
|
10848
|
-
}
|
|
10849
|
-
static concat(first, ...targets) {
|
|
10850
|
-
const computed2 = new this(first);
|
|
10851
|
-
targets.forEach((target) => computed2.set(target));
|
|
10852
|
-
return computed2;
|
|
10853
|
-
}
|
|
10854
|
-
static accessor(header) {
|
|
10855
|
-
const internals = this[$internals] = this[$internals] = {
|
|
10856
|
-
accessors: {}
|
|
10857
|
-
};
|
|
10858
|
-
const accessors = internals.accessors;
|
|
10859
|
-
const prototype2 = this.prototype;
|
|
10860
|
-
function defineAccessor(_header) {
|
|
10861
|
-
const lHeader = normalizeHeader(_header);
|
|
10862
|
-
if (!accessors[lHeader]) {
|
|
10863
|
-
buildAccessors(prototype2, _header);
|
|
10864
|
-
accessors[lHeader] = true;
|
|
10865
|
-
}
|
|
10866
|
-
}
|
|
10867
|
-
utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
10868
|
-
return this;
|
|
10869
|
-
}
|
|
10870
|
-
};
|
|
10871
|
-
AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
10872
|
-
utils$2.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
|
|
10873
|
-
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
10874
|
-
return {
|
|
10875
|
-
get: () => value,
|
|
10876
|
-
set(headerValue) {
|
|
10877
|
-
this[mapped] = headerValue;
|
|
10878
|
-
}
|
|
10879
|
-
};
|
|
10880
|
-
});
|
|
10881
|
-
utils$2.freezeMethods(AxiosHeaders$1);
|
|
10882
|
-
function transformData(fns, response) {
|
|
10883
|
-
const config = this || defaults$2;
|
|
10884
|
-
const context = response || config;
|
|
10885
|
-
const headers = AxiosHeaders$1.from(context.headers);
|
|
10886
|
-
let data = context.data;
|
|
10887
|
-
utils$2.forEach(fns, function transform2(fn) {
|
|
10888
|
-
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
10889
|
-
});
|
|
10890
|
-
headers.normalize();
|
|
10891
|
-
return data;
|
|
10892
|
-
}
|
|
10893
|
-
function isCancel$1(value) {
|
|
10894
|
-
return !!(value && value.__CANCEL__);
|
|
10895
|
-
}
|
|
10896
|
-
function CanceledError$1(message, config, request) {
|
|
10897
|
-
AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
|
|
10898
|
-
this.name = "CanceledError";
|
|
10899
|
-
}
|
|
10900
|
-
utils$2.inherits(CanceledError$1, AxiosError$1, {
|
|
10901
|
-
__CANCEL__: true
|
|
10902
|
-
});
|
|
10903
|
-
function settle(resolve, reject, response) {
|
|
10904
|
-
const validateStatus2 = response.config.validateStatus;
|
|
10905
|
-
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
10906
|
-
resolve(response);
|
|
10907
|
-
} else {
|
|
10908
|
-
reject(new AxiosError$1(
|
|
10909
|
-
"Request failed with status code " + response.status,
|
|
10910
|
-
[AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
10911
|
-
response.config,
|
|
10912
|
-
response.request,
|
|
10913
|
-
response
|
|
10914
|
-
));
|
|
10915
|
-
}
|
|
10916
|
-
}
|
|
10917
|
-
function parseProtocol(url) {
|
|
10918
|
-
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
10919
|
-
return match && match[1] || "";
|
|
10920
|
-
}
|
|
10921
|
-
function speedometer(samplesCount, min3) {
|
|
10922
|
-
samplesCount = samplesCount || 10;
|
|
10923
|
-
const bytes = new Array(samplesCount);
|
|
10924
|
-
const timestamps = new Array(samplesCount);
|
|
10925
|
-
let head = 0;
|
|
10926
|
-
let tail = 0;
|
|
10927
|
-
let firstSampleTS;
|
|
10928
|
-
min3 = min3 !== void 0 ? min3 : 1e3;
|
|
10929
|
-
return function push2(chunkLength) {
|
|
10930
|
-
const now2 = Date.now();
|
|
10931
|
-
const startedAt = timestamps[tail];
|
|
10932
|
-
if (!firstSampleTS) {
|
|
10933
|
-
firstSampleTS = now2;
|
|
10934
|
-
}
|
|
10935
|
-
bytes[head] = chunkLength;
|
|
10936
|
-
timestamps[head] = now2;
|
|
10937
|
-
let i2 = tail;
|
|
10938
|
-
let bytesCount = 0;
|
|
10939
|
-
while (i2 !== head) {
|
|
10940
|
-
bytesCount += bytes[i2++];
|
|
10941
|
-
i2 = i2 % samplesCount;
|
|
10942
|
-
}
|
|
10943
|
-
head = (head + 1) % samplesCount;
|
|
10944
|
-
if (head === tail) {
|
|
10945
|
-
tail = (tail + 1) % samplesCount;
|
|
10946
|
-
}
|
|
10947
|
-
if (now2 - firstSampleTS < min3) {
|
|
10948
|
-
return;
|
|
10949
|
-
}
|
|
10950
|
-
const passed = startedAt && now2 - startedAt;
|
|
10951
|
-
return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
|
|
10952
|
-
};
|
|
10953
|
-
}
|
|
10954
|
-
function throttle$1(fn, freq) {
|
|
10955
|
-
let timestamp = 0;
|
|
10956
|
-
let threshold = 1e3 / freq;
|
|
10957
|
-
let lastArgs;
|
|
10958
|
-
let timer;
|
|
10959
|
-
const invoke = (args, now2 = Date.now()) => {
|
|
10960
|
-
timestamp = now2;
|
|
10961
|
-
lastArgs = null;
|
|
10962
|
-
if (timer) {
|
|
10963
|
-
clearTimeout(timer);
|
|
10964
|
-
timer = null;
|
|
10965
|
-
}
|
|
10966
|
-
fn.apply(null, args);
|
|
10967
|
-
};
|
|
10968
|
-
const throttled = (...args) => {
|
|
10969
|
-
const now2 = Date.now();
|
|
10970
|
-
const passed = now2 - timestamp;
|
|
10971
|
-
if (passed >= threshold) {
|
|
10972
|
-
invoke(args, now2);
|
|
10973
|
-
} else {
|
|
10974
|
-
lastArgs = args;
|
|
10975
|
-
if (!timer) {
|
|
10976
|
-
timer = setTimeout(() => {
|
|
10977
|
-
timer = null;
|
|
10978
|
-
invoke(lastArgs);
|
|
10979
|
-
}, threshold - passed);
|
|
10980
|
-
}
|
|
10981
|
-
}
|
|
10982
|
-
};
|
|
10983
|
-
const flush = () => lastArgs && invoke(lastArgs);
|
|
10984
|
-
return [throttled, flush];
|
|
10985
|
-
}
|
|
10986
|
-
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
10987
|
-
let bytesNotified = 0;
|
|
10988
|
-
const _speedometer = speedometer(50, 250);
|
|
10989
|
-
return throttle$1((e2) => {
|
|
10990
|
-
const loaded = e2.loaded;
|
|
10991
|
-
const total = e2.lengthComputable ? e2.total : void 0;
|
|
10992
|
-
const progressBytes = loaded - bytesNotified;
|
|
10993
|
-
const rate = _speedometer(progressBytes);
|
|
10994
|
-
const inRange = loaded <= total;
|
|
10995
|
-
bytesNotified = loaded;
|
|
10996
|
-
const data = {
|
|
10997
|
-
loaded,
|
|
10998
|
-
total,
|
|
10999
|
-
progress: total ? loaded / total : void 0,
|
|
11000
|
-
bytes: progressBytes,
|
|
11001
|
-
rate: rate ? rate : void 0,
|
|
11002
|
-
estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
|
|
11003
|
-
event: e2,
|
|
11004
|
-
lengthComputable: total != null,
|
|
11005
|
-
[isDownloadStream ? "download" : "upload"]: true
|
|
11006
|
-
};
|
|
11007
|
-
listener(data);
|
|
11008
|
-
}, freq);
|
|
11009
|
-
};
|
|
11010
|
-
const progressEventDecorator = (total, throttled) => {
|
|
11011
|
-
const lengthComputable = total != null;
|
|
11012
|
-
return [(loaded) => throttled[0]({
|
|
11013
|
-
lengthComputable,
|
|
11014
|
-
total,
|
|
11015
|
-
loaded
|
|
11016
|
-
}), throttled[1]];
|
|
11017
|
-
};
|
|
11018
|
-
const asyncDecorator = (fn) => (...args) => utils$2.asap(() => fn(...args));
|
|
11019
|
-
const isURLSameOrigin = platform$1.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
|
|
11020
|
-
url = new URL(url, platform$1.origin);
|
|
11021
|
-
return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
|
|
11022
|
-
})(
|
|
11023
|
-
new URL(platform$1.origin),
|
|
11024
|
-
platform$1.navigator && /(msie|trident)/i.test(platform$1.navigator.userAgent)
|
|
11025
|
-
) : () => true;
|
|
11026
|
-
const cookies = platform$1.hasStandardBrowserEnv ? (
|
|
11027
|
-
// Standard browser envs support document.cookie
|
|
11028
|
-
{
|
|
11029
|
-
write(name2, value, expires, path, domain, secure) {
|
|
11030
|
-
const cookie = [name2 + "=" + encodeURIComponent(value)];
|
|
11031
|
-
utils$2.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
11032
|
-
utils$2.isString(path) && cookie.push("path=" + path);
|
|
11033
|
-
utils$2.isString(domain) && cookie.push("domain=" + domain);
|
|
11034
|
-
secure === true && cookie.push("secure");
|
|
11035
|
-
document.cookie = cookie.join("; ");
|
|
11036
|
-
},
|
|
11037
|
-
read(name2) {
|
|
11038
|
-
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)"));
|
|
11039
|
-
return match ? decodeURIComponent(match[3]) : null;
|
|
11040
|
-
},
|
|
11041
|
-
remove(name2) {
|
|
11042
|
-
this.write(name2, "", Date.now() - 864e5);
|
|
11043
|
-
}
|
|
11044
|
-
}
|
|
11045
|
-
) : (
|
|
11046
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
11047
|
-
{
|
|
11048
|
-
write() {
|
|
11049
|
-
},
|
|
11050
|
-
read() {
|
|
11051
|
-
return null;
|
|
11052
|
-
},
|
|
11053
|
-
remove() {
|
|
11054
|
-
}
|
|
11055
|
-
}
|
|
11056
|
-
);
|
|
11057
|
-
function isAbsoluteURL(url) {
|
|
11058
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
11059
|
-
}
|
|
11060
|
-
function combineURLs(baseURL, relativeURL) {
|
|
11061
|
-
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
11062
|
-
}
|
|
11063
|
-
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
11064
|
-
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
11065
|
-
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
|
11066
|
-
return combineURLs(baseURL, requestedURL);
|
|
11067
|
-
}
|
|
11068
|
-
return requestedURL;
|
|
11069
|
-
}
|
|
11070
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
|
|
11071
|
-
function mergeConfig$1(config1, config2) {
|
|
11072
|
-
config2 = config2 || {};
|
|
11073
|
-
const config = {};
|
|
11074
|
-
function getMergedValue(target, source, prop, caseless) {
|
|
11075
|
-
if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
|
|
11076
|
-
return utils$2.merge.call({ caseless }, target, source);
|
|
11077
|
-
} else if (utils$2.isPlainObject(source)) {
|
|
11078
|
-
return utils$2.merge({}, source);
|
|
11079
|
-
} else if (utils$2.isArray(source)) {
|
|
11080
|
-
return source.slice();
|
|
11081
|
-
}
|
|
11082
|
-
return source;
|
|
11083
|
-
}
|
|
11084
|
-
function mergeDeepProperties(a, b, prop, caseless) {
|
|
11085
|
-
if (!utils$2.isUndefined(b)) {
|
|
11086
|
-
return getMergedValue(a, b, prop, caseless);
|
|
11087
|
-
} else if (!utils$2.isUndefined(a)) {
|
|
11088
|
-
return getMergedValue(void 0, a, prop, caseless);
|
|
11089
|
-
}
|
|
11090
|
-
}
|
|
11091
|
-
function valueFromConfig2(a, b) {
|
|
11092
|
-
if (!utils$2.isUndefined(b)) {
|
|
11093
|
-
return getMergedValue(void 0, b);
|
|
11094
|
-
}
|
|
11095
|
-
}
|
|
11096
|
-
function defaultToConfig2(a, b) {
|
|
11097
|
-
if (!utils$2.isUndefined(b)) {
|
|
11098
|
-
return getMergedValue(void 0, b);
|
|
11099
|
-
} else if (!utils$2.isUndefined(a)) {
|
|
11100
|
-
return getMergedValue(void 0, a);
|
|
11101
|
-
}
|
|
11102
|
-
}
|
|
11103
|
-
function mergeDirectKeys(a, b, prop) {
|
|
11104
|
-
if (prop in config2) {
|
|
11105
|
-
return getMergedValue(a, b);
|
|
11106
|
-
} else if (prop in config1) {
|
|
11107
|
-
return getMergedValue(void 0, a);
|
|
11108
|
-
}
|
|
11109
|
-
}
|
|
11110
|
-
const mergeMap = {
|
|
11111
|
-
url: valueFromConfig2,
|
|
11112
|
-
method: valueFromConfig2,
|
|
11113
|
-
data: valueFromConfig2,
|
|
11114
|
-
baseURL: defaultToConfig2,
|
|
11115
|
-
transformRequest: defaultToConfig2,
|
|
11116
|
-
transformResponse: defaultToConfig2,
|
|
11117
|
-
paramsSerializer: defaultToConfig2,
|
|
11118
|
-
timeout: defaultToConfig2,
|
|
11119
|
-
timeoutMessage: defaultToConfig2,
|
|
11120
|
-
withCredentials: defaultToConfig2,
|
|
11121
|
-
withXSRFToken: defaultToConfig2,
|
|
11122
|
-
adapter: defaultToConfig2,
|
|
11123
|
-
responseType: defaultToConfig2,
|
|
11124
|
-
xsrfCookieName: defaultToConfig2,
|
|
11125
|
-
xsrfHeaderName: defaultToConfig2,
|
|
11126
|
-
onUploadProgress: defaultToConfig2,
|
|
11127
|
-
onDownloadProgress: defaultToConfig2,
|
|
11128
|
-
decompress: defaultToConfig2,
|
|
11129
|
-
maxContentLength: defaultToConfig2,
|
|
11130
|
-
maxBodyLength: defaultToConfig2,
|
|
11131
|
-
beforeRedirect: defaultToConfig2,
|
|
11132
|
-
transport: defaultToConfig2,
|
|
11133
|
-
httpAgent: defaultToConfig2,
|
|
11134
|
-
httpsAgent: defaultToConfig2,
|
|
11135
|
-
cancelToken: defaultToConfig2,
|
|
11136
|
-
socketPath: defaultToConfig2,
|
|
11137
|
-
responseEncoding: defaultToConfig2,
|
|
11138
|
-
validateStatus: mergeDirectKeys,
|
|
11139
|
-
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
11140
|
-
};
|
|
11141
|
-
utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
11142
|
-
const merge2 = mergeMap[prop] || mergeDeepProperties;
|
|
11143
|
-
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
11144
|
-
utils$2.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
11145
|
-
});
|
|
11146
|
-
return config;
|
|
11147
|
-
}
|
|
11148
|
-
const resolveConfig = (config) => {
|
|
11149
|
-
const newConfig = mergeConfig$1({}, config);
|
|
11150
|
-
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
11151
|
-
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
|
11152
|
-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
|
11153
|
-
if (auth) {
|
|
11154
|
-
headers.set(
|
|
11155
|
-
"Authorization",
|
|
11156
|
-
"Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
|
|
11157
|
-
);
|
|
11158
|
-
}
|
|
11159
|
-
let contentType;
|
|
11160
|
-
if (utils$2.isFormData(data)) {
|
|
11161
|
-
if (platform$1.hasStandardBrowserEnv || platform$1.hasStandardBrowserWebWorkerEnv) {
|
|
11162
|
-
headers.setContentType(void 0);
|
|
11163
|
-
} else if ((contentType = headers.getContentType()) !== false) {
|
|
11164
|
-
const [type, ...tokens2] = contentType ? contentType.split(";").map((token2) => token2.trim()).filter(Boolean) : [];
|
|
11165
|
-
headers.setContentType([type || "multipart/form-data", ...tokens2].join("; "));
|
|
11166
|
-
}
|
|
11167
|
-
}
|
|
11168
|
-
if (platform$1.hasStandardBrowserEnv) {
|
|
11169
|
-
withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
11170
|
-
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
|
|
11171
|
-
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
|
|
11172
|
-
if (xsrfValue) {
|
|
11173
|
-
headers.set(xsrfHeaderName, xsrfValue);
|
|
11174
|
-
}
|
|
11175
|
-
}
|
|
11176
|
-
}
|
|
11177
|
-
return newConfig;
|
|
11178
|
-
};
|
|
11179
|
-
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
11180
|
-
const xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
11181
|
-
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
11182
|
-
const _config = resolveConfig(config);
|
|
11183
|
-
let requestData = _config.data;
|
|
11184
|
-
const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
|
|
11185
|
-
let { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
11186
|
-
let onCanceled;
|
|
11187
|
-
let uploadThrottled, downloadThrottled;
|
|
11188
|
-
let flushUpload, flushDownload;
|
|
11189
|
-
function done() {
|
|
11190
|
-
flushUpload && flushUpload();
|
|
11191
|
-
flushDownload && flushDownload();
|
|
11192
|
-
_config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
|
|
11193
|
-
_config.signal && _config.signal.removeEventListener("abort", onCanceled);
|
|
11194
|
-
}
|
|
11195
|
-
let request = new XMLHttpRequest();
|
|
11196
|
-
request.open(_config.method.toUpperCase(), _config.url, true);
|
|
11197
|
-
request.timeout = _config.timeout;
|
|
11198
|
-
function onloadend() {
|
|
11199
|
-
if (!request) {
|
|
11200
|
-
return;
|
|
11201
|
-
}
|
|
11202
|
-
const responseHeaders = AxiosHeaders$1.from(
|
|
11203
|
-
"getAllResponseHeaders" in request && request.getAllResponseHeaders()
|
|
11204
|
-
);
|
|
11205
|
-
const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
|
|
11206
|
-
const response = {
|
|
11207
|
-
data: responseData,
|
|
11208
|
-
status: request.status,
|
|
11209
|
-
statusText: request.statusText,
|
|
11210
|
-
headers: responseHeaders,
|
|
11211
|
-
config,
|
|
11212
|
-
request
|
|
11213
|
-
};
|
|
11214
|
-
settle(function _resolve(value) {
|
|
11215
|
-
resolve(value);
|
|
11216
|
-
done();
|
|
11217
|
-
}, function _reject(err) {
|
|
11218
|
-
reject(err);
|
|
11219
|
-
done();
|
|
11220
|
-
}, response);
|
|
11221
|
-
request = null;
|
|
11222
|
-
}
|
|
11223
|
-
if ("onloadend" in request) {
|
|
11224
|
-
request.onloadend = onloadend;
|
|
11225
|
-
} else {
|
|
11226
|
-
request.onreadystatechange = function handleLoad() {
|
|
11227
|
-
if (!request || request.readyState !== 4) {
|
|
11228
|
-
return;
|
|
11229
|
-
}
|
|
11230
|
-
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
|
|
11231
|
-
return;
|
|
11232
|
-
}
|
|
11233
|
-
setTimeout(onloadend);
|
|
11234
|
-
};
|
|
11235
|
-
}
|
|
11236
|
-
request.onabort = function handleAbort() {
|
|
11237
|
-
if (!request) {
|
|
11238
|
-
return;
|
|
11239
|
-
}
|
|
11240
|
-
reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
|
|
11241
|
-
request = null;
|
|
11242
|
-
};
|
|
11243
|
-
request.onerror = function handleError() {
|
|
11244
|
-
reject(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request));
|
|
11245
|
-
request = null;
|
|
11246
|
-
};
|
|
11247
|
-
request.ontimeout = function handleTimeout() {
|
|
11248
|
-
let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
|
|
11249
|
-
const transitional2 = _config.transitional || transitionalDefaults;
|
|
11250
|
-
if (_config.timeoutErrorMessage) {
|
|
11251
|
-
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
11252
|
-
}
|
|
11253
|
-
reject(new AxiosError$1(
|
|
11254
|
-
timeoutErrorMessage,
|
|
11255
|
-
transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
|
|
11256
|
-
config,
|
|
11257
|
-
request
|
|
11258
|
-
));
|
|
11259
|
-
request = null;
|
|
11260
|
-
};
|
|
11261
|
-
requestData === void 0 && requestHeaders.setContentType(null);
|
|
11262
|
-
if ("setRequestHeader" in request) {
|
|
11263
|
-
utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
11264
|
-
request.setRequestHeader(key, val);
|
|
11265
|
-
});
|
|
11266
|
-
}
|
|
11267
|
-
if (!utils$2.isUndefined(_config.withCredentials)) {
|
|
11268
|
-
request.withCredentials = !!_config.withCredentials;
|
|
11269
|
-
}
|
|
11270
|
-
if (responseType && responseType !== "json") {
|
|
11271
|
-
request.responseType = _config.responseType;
|
|
11272
|
-
}
|
|
11273
|
-
if (onDownloadProgress) {
|
|
11274
|
-
[downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
|
|
11275
|
-
request.addEventListener("progress", downloadThrottled);
|
|
11276
|
-
}
|
|
11277
|
-
if (onUploadProgress && request.upload) {
|
|
11278
|
-
[uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
|
|
11279
|
-
request.upload.addEventListener("progress", uploadThrottled);
|
|
11280
|
-
request.upload.addEventListener("loadend", flushUpload);
|
|
11281
|
-
}
|
|
11282
|
-
if (_config.cancelToken || _config.signal) {
|
|
11283
|
-
onCanceled = (cancel) => {
|
|
11284
|
-
if (!request) {
|
|
11285
|
-
return;
|
|
11286
|
-
}
|
|
11287
|
-
reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
|
|
11288
|
-
request.abort();
|
|
11289
|
-
request = null;
|
|
11290
|
-
};
|
|
11291
|
-
_config.cancelToken && _config.cancelToken.subscribe(onCanceled);
|
|
11292
|
-
if (_config.signal) {
|
|
11293
|
-
_config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
|
|
11294
|
-
}
|
|
11295
|
-
}
|
|
11296
|
-
const protocol = parseProtocol(_config.url);
|
|
11297
|
-
if (protocol && platform$1.protocols.indexOf(protocol) === -1) {
|
|
11298
|
-
reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
|
|
11299
|
-
return;
|
|
11300
|
-
}
|
|
11301
|
-
request.send(requestData || null);
|
|
11302
|
-
});
|
|
11303
|
-
};
|
|
11304
|
-
const composeSignals = (signals, timeout) => {
|
|
11305
|
-
const { length } = signals = signals ? signals.filter(Boolean) : [];
|
|
11306
|
-
if (timeout || length) {
|
|
11307
|
-
let controller = new AbortController();
|
|
11308
|
-
let aborted;
|
|
11309
|
-
const onabort = function(reason) {
|
|
11310
|
-
if (!aborted) {
|
|
11311
|
-
aborted = true;
|
|
11312
|
-
unsubscribe();
|
|
11313
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
11314
|
-
controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
|
|
11315
|
-
}
|
|
11316
|
-
};
|
|
11317
|
-
let timer = timeout && setTimeout(() => {
|
|
11318
|
-
timer = null;
|
|
11319
|
-
onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
11320
|
-
}, timeout);
|
|
11321
|
-
const unsubscribe = () => {
|
|
11322
|
-
if (signals) {
|
|
11323
|
-
timer && clearTimeout(timer);
|
|
11324
|
-
timer = null;
|
|
11325
|
-
signals.forEach((signal2) => {
|
|
11326
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
11327
|
-
});
|
|
11328
|
-
signals = null;
|
|
11329
|
-
}
|
|
11330
|
-
};
|
|
11331
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
11332
|
-
const { signal } = controller;
|
|
11333
|
-
signal.unsubscribe = () => utils$2.asap(unsubscribe);
|
|
11334
|
-
return signal;
|
|
11335
|
-
}
|
|
11336
|
-
};
|
|
11337
|
-
const streamChunk = function* (chunk, chunkSize) {
|
|
11338
|
-
let len2 = chunk.byteLength;
|
|
11339
|
-
if (len2 < chunkSize) {
|
|
11340
|
-
yield chunk;
|
|
11341
|
-
return;
|
|
11342
|
-
}
|
|
11343
|
-
let pos = 0;
|
|
11344
|
-
let end2;
|
|
11345
|
-
while (pos < len2) {
|
|
11346
|
-
end2 = pos + chunkSize;
|
|
11347
|
-
yield chunk.slice(pos, end2);
|
|
11348
|
-
pos = end2;
|
|
11349
|
-
}
|
|
11350
|
-
};
|
|
11351
|
-
const readBytes = async function* (iterable, chunkSize) {
|
|
11352
|
-
for await (const chunk of readStream(iterable)) {
|
|
11353
|
-
yield* streamChunk(chunk, chunkSize);
|
|
11354
|
-
}
|
|
11355
|
-
};
|
|
11356
|
-
const readStream = async function* (stream) {
|
|
11357
|
-
if (stream[Symbol.asyncIterator]) {
|
|
11358
|
-
yield* stream;
|
|
11359
|
-
return;
|
|
11360
|
-
}
|
|
11361
|
-
const reader = stream.getReader();
|
|
11362
|
-
try {
|
|
11363
|
-
for (; ; ) {
|
|
11364
|
-
const { done, value } = await reader.read();
|
|
11365
|
-
if (done) {
|
|
11366
|
-
break;
|
|
11367
|
-
}
|
|
11368
|
-
yield value;
|
|
11369
|
-
}
|
|
11370
|
-
} finally {
|
|
11371
|
-
await reader.cancel();
|
|
11372
|
-
}
|
|
11373
|
-
};
|
|
11374
|
-
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
11375
|
-
const iterator2 = readBytes(stream, chunkSize);
|
|
11376
|
-
let bytes = 0;
|
|
11377
|
-
let done;
|
|
11378
|
-
let _onFinish = (e2) => {
|
|
11379
|
-
if (!done) {
|
|
11380
|
-
done = true;
|
|
11381
|
-
onFinish && onFinish(e2);
|
|
11382
|
-
}
|
|
11383
|
-
};
|
|
11384
|
-
return new ReadableStream({
|
|
11385
|
-
async pull(controller) {
|
|
11386
|
-
try {
|
|
11387
|
-
const { done: done2, value } = await iterator2.next();
|
|
11388
|
-
if (done2) {
|
|
11389
|
-
_onFinish();
|
|
11390
|
-
controller.close();
|
|
11391
|
-
return;
|
|
11392
|
-
}
|
|
11393
|
-
let len2 = value.byteLength;
|
|
11394
|
-
if (onProgress) {
|
|
11395
|
-
let loadedBytes = bytes += len2;
|
|
11396
|
-
onProgress(loadedBytes);
|
|
11397
|
-
}
|
|
11398
|
-
controller.enqueue(new Uint8Array(value));
|
|
11399
|
-
} catch (err) {
|
|
11400
|
-
_onFinish(err);
|
|
11401
|
-
throw err;
|
|
11402
|
-
}
|
|
11403
|
-
},
|
|
11404
|
-
cancel(reason) {
|
|
11405
|
-
_onFinish(reason);
|
|
11406
|
-
return iterator2.return();
|
|
11407
|
-
}
|
|
11408
|
-
}, {
|
|
11409
|
-
highWaterMark: 2
|
|
11410
|
-
});
|
|
11411
|
-
};
|
|
11412
|
-
const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
11413
|
-
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
11414
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str2) => encoder.encode(str2))(new TextEncoder()) : async (str2) => new Uint8Array(await new Response(str2).arrayBuffer()));
|
|
11415
|
-
const test = (fn, ...args) => {
|
|
11416
|
-
try {
|
|
11417
|
-
return !!fn(...args);
|
|
11418
|
-
} catch (e2) {
|
|
11419
|
-
return false;
|
|
11420
|
-
}
|
|
11421
|
-
};
|
|
11422
|
-
const supportsRequestStream = isReadableStreamSupported && test(() => {
|
|
11423
|
-
let duplexAccessed = false;
|
|
11424
|
-
const hasContentType = new Request(platform$1.origin, {
|
|
11425
|
-
body: new ReadableStream(),
|
|
11426
|
-
method: "POST",
|
|
11427
|
-
get duplex() {
|
|
11428
|
-
duplexAccessed = true;
|
|
11429
|
-
return "half";
|
|
11430
|
-
}
|
|
11431
|
-
}).headers.has("Content-Type");
|
|
11432
|
-
return duplexAccessed && !hasContentType;
|
|
11433
|
-
});
|
|
11434
|
-
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
|
11435
|
-
const supportsResponseStream = isReadableStreamSupported && test(() => utils$2.isReadableStream(new Response("").body));
|
|
11436
|
-
const resolvers = {
|
|
11437
|
-
stream: supportsResponseStream && ((res) => res.body)
|
|
11438
|
-
};
|
|
11439
|
-
isFetchSupported && ((res) => {
|
|
11440
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => {
|
|
11441
|
-
!resolvers[type] && (resolvers[type] = utils$2.isFunction(res[type]) ? (res2) => res2[type]() : (_, config) => {
|
|
11442
|
-
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
|
11443
|
-
});
|
|
11444
|
-
});
|
|
11445
|
-
})(new Response());
|
|
11446
|
-
const getBodyLength = async (body) => {
|
|
11447
|
-
if (body == null) {
|
|
11448
|
-
return 0;
|
|
11449
|
-
}
|
|
11450
|
-
if (utils$2.isBlob(body)) {
|
|
11451
|
-
return body.size;
|
|
11452
|
-
}
|
|
11453
|
-
if (utils$2.isSpecCompliantForm(body)) {
|
|
11454
|
-
const _request = new Request(platform$1.origin, {
|
|
11455
|
-
method: "POST",
|
|
11456
|
-
body
|
|
11457
|
-
});
|
|
11458
|
-
return (await _request.arrayBuffer()).byteLength;
|
|
11459
|
-
}
|
|
11460
|
-
if (utils$2.isArrayBufferView(body) || utils$2.isArrayBuffer(body)) {
|
|
11461
|
-
return body.byteLength;
|
|
11462
|
-
}
|
|
11463
|
-
if (utils$2.isURLSearchParams(body)) {
|
|
11464
|
-
body = body + "";
|
|
11465
|
-
}
|
|
11466
|
-
if (utils$2.isString(body)) {
|
|
11467
|
-
return (await encodeText(body)).byteLength;
|
|
11468
|
-
}
|
|
11469
|
-
};
|
|
11470
|
-
const resolveBodyLength = async (headers, body) => {
|
|
11471
|
-
const length = utils$2.toFiniteNumber(headers.getContentLength());
|
|
11472
|
-
return length == null ? getBodyLength(body) : length;
|
|
11473
|
-
};
|
|
11474
|
-
const fetchAdapter = isFetchSupported && (async (config) => {
|
|
11475
|
-
let {
|
|
11476
|
-
url,
|
|
11477
|
-
method,
|
|
11478
|
-
data,
|
|
11479
|
-
signal,
|
|
11480
|
-
cancelToken,
|
|
11481
|
-
timeout,
|
|
11482
|
-
onDownloadProgress,
|
|
11483
|
-
onUploadProgress,
|
|
11484
|
-
responseType,
|
|
11485
|
-
headers,
|
|
11486
|
-
withCredentials = "same-origin",
|
|
11487
|
-
fetchOptions
|
|
11488
|
-
} = resolveConfig(config);
|
|
11489
|
-
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
11490
|
-
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
11491
|
-
let request;
|
|
11492
|
-
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
11493
|
-
composedSignal.unsubscribe();
|
|
11494
|
-
});
|
|
11495
|
-
let requestContentLength;
|
|
11496
|
-
try {
|
|
11497
|
-
if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
|
|
11498
|
-
let _request = new Request(url, {
|
|
11499
|
-
method: "POST",
|
|
11500
|
-
body: data,
|
|
11501
|
-
duplex: "half"
|
|
11502
|
-
});
|
|
11503
|
-
let contentTypeHeader;
|
|
11504
|
-
if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
11505
|
-
headers.setContentType(contentTypeHeader);
|
|
11506
|
-
}
|
|
11507
|
-
if (_request.body) {
|
|
11508
|
-
const [onProgress, flush] = progressEventDecorator(
|
|
11509
|
-
requestContentLength,
|
|
11510
|
-
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
11511
|
-
);
|
|
11512
|
-
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
11513
|
-
}
|
|
11514
|
-
}
|
|
11515
|
-
if (!utils$2.isString(withCredentials)) {
|
|
11516
|
-
withCredentials = withCredentials ? "include" : "omit";
|
|
11517
|
-
}
|
|
11518
|
-
const isCredentialsSupported = "credentials" in Request.prototype;
|
|
11519
|
-
request = new Request(url, {
|
|
11520
|
-
...fetchOptions,
|
|
11521
|
-
signal: composedSignal,
|
|
11522
|
-
method: method.toUpperCase(),
|
|
11523
|
-
headers: headers.normalize().toJSON(),
|
|
11524
|
-
body: data,
|
|
11525
|
-
duplex: "half",
|
|
11526
|
-
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
11527
|
-
});
|
|
11528
|
-
let response = await fetch(request);
|
|
11529
|
-
const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
|
|
11530
|
-
if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
|
|
11531
|
-
const options = {};
|
|
11532
|
-
["status", "statusText", "headers"].forEach((prop) => {
|
|
11533
|
-
options[prop] = response[prop];
|
|
11534
|
-
});
|
|
11535
|
-
const responseContentLength = utils$2.toFiniteNumber(response.headers.get("content-length"));
|
|
11536
|
-
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
11537
|
-
responseContentLength,
|
|
11538
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
11539
|
-
) || [];
|
|
11540
|
-
response = new Response(
|
|
11541
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
11542
|
-
flush && flush();
|
|
11543
|
-
unsubscribe && unsubscribe();
|
|
11544
|
-
}),
|
|
11545
|
-
options
|
|
11546
|
-
);
|
|
11547
|
-
}
|
|
11548
|
-
responseType = responseType || "text";
|
|
11549
|
-
let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || "text"](response, config);
|
|
11550
|
-
!isStreamResponse && unsubscribe && unsubscribe();
|
|
11551
|
-
return await new Promise((resolve, reject) => {
|
|
11552
|
-
settle(resolve, reject, {
|
|
11553
|
-
data: responseData,
|
|
11554
|
-
headers: AxiosHeaders$1.from(response.headers),
|
|
11555
|
-
status: response.status,
|
|
11556
|
-
statusText: response.statusText,
|
|
11557
|
-
config,
|
|
11558
|
-
request
|
|
11559
|
-
});
|
|
11560
|
-
});
|
|
11561
|
-
} catch (err) {
|
|
11562
|
-
unsubscribe && unsubscribe();
|
|
11563
|
-
if (err && err.name === "TypeError" && /fetch/i.test(err.message)) {
|
|
11564
|
-
throw Object.assign(
|
|
11565
|
-
new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request),
|
|
11566
|
-
{
|
|
11567
|
-
cause: err.cause || err
|
|
11568
|
-
}
|
|
11569
|
-
);
|
|
11570
|
-
}
|
|
11571
|
-
throw AxiosError$1.from(err, err && err.code, config, request);
|
|
11572
|
-
}
|
|
11573
|
-
});
|
|
11574
|
-
const knownAdapters = {
|
|
11575
|
-
http: httpAdapter,
|
|
11576
|
-
xhr: xhrAdapter,
|
|
11577
|
-
fetch: fetchAdapter
|
|
11578
|
-
};
|
|
11579
|
-
utils$2.forEach(knownAdapters, (fn, value) => {
|
|
11580
|
-
if (fn) {
|
|
11581
|
-
try {
|
|
11582
|
-
Object.defineProperty(fn, "name", { value });
|
|
11583
|
-
} catch (e2) {
|
|
11584
|
-
}
|
|
11585
|
-
Object.defineProperty(fn, "adapterName", { value });
|
|
11586
|
-
}
|
|
11587
|
-
});
|
|
11588
|
-
const renderReason = (reason) => `- ${reason}`;
|
|
11589
|
-
const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
|
|
11590
|
-
const adapters = {
|
|
11591
|
-
getAdapter: (adapters2) => {
|
|
11592
|
-
adapters2 = utils$2.isArray(adapters2) ? adapters2 : [adapters2];
|
|
11593
|
-
const { length } = adapters2;
|
|
11594
|
-
let nameOrAdapter;
|
|
11595
|
-
let adapter;
|
|
11596
|
-
const rejectedReasons = {};
|
|
11597
|
-
for (let i2 = 0; i2 < length; i2++) {
|
|
11598
|
-
nameOrAdapter = adapters2[i2];
|
|
11599
|
-
let id2;
|
|
11600
|
-
adapter = nameOrAdapter;
|
|
11601
|
-
if (!isResolvedHandle(nameOrAdapter)) {
|
|
11602
|
-
adapter = knownAdapters[(id2 = String(nameOrAdapter)).toLowerCase()];
|
|
11603
|
-
if (adapter === void 0) {
|
|
11604
|
-
throw new AxiosError$1(`Unknown adapter '${id2}'`);
|
|
11605
|
-
}
|
|
11606
|
-
}
|
|
11607
|
-
if (adapter) {
|
|
11608
|
-
break;
|
|
11609
|
-
}
|
|
11610
|
-
rejectedReasons[id2 || "#" + i2] = adapter;
|
|
11611
|
-
}
|
|
11612
|
-
if (!adapter) {
|
|
11613
|
-
const reasons = Object.entries(rejectedReasons).map(
|
|
11614
|
-
([id2, state]) => `adapter ${id2} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
|
|
11615
|
-
);
|
|
11616
|
-
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
11617
|
-
throw new AxiosError$1(
|
|
11618
|
-
`There is no suitable adapter to dispatch the request ` + s,
|
|
11619
|
-
"ERR_NOT_SUPPORT"
|
|
11620
|
-
);
|
|
11621
|
-
}
|
|
11622
|
-
return adapter;
|
|
11623
|
-
},
|
|
11624
|
-
adapters: knownAdapters
|
|
11625
|
-
};
|
|
11626
|
-
function throwIfCancellationRequested(config) {
|
|
11627
|
-
if (config.cancelToken) {
|
|
11628
|
-
config.cancelToken.throwIfRequested();
|
|
11629
|
-
}
|
|
11630
|
-
if (config.signal && config.signal.aborted) {
|
|
11631
|
-
throw new CanceledError$1(null, config);
|
|
11632
|
-
}
|
|
11633
|
-
}
|
|
11634
|
-
function dispatchRequest(config) {
|
|
11635
|
-
throwIfCancellationRequested(config);
|
|
11636
|
-
config.headers = AxiosHeaders$1.from(config.headers);
|
|
11637
|
-
config.data = transformData.call(
|
|
11638
|
-
config,
|
|
11639
|
-
config.transformRequest
|
|
11640
|
-
);
|
|
11641
|
-
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
11642
|
-
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
11643
|
-
}
|
|
11644
|
-
const adapter = adapters.getAdapter(config.adapter || defaults$2.adapter);
|
|
11645
|
-
return adapter(config).then(function onAdapterResolution(response) {
|
|
11646
|
-
throwIfCancellationRequested(config);
|
|
11647
|
-
response.data = transformData.call(
|
|
11648
|
-
config,
|
|
11649
|
-
config.transformResponse,
|
|
11650
|
-
response
|
|
11651
|
-
);
|
|
11652
|
-
response.headers = AxiosHeaders$1.from(response.headers);
|
|
11653
|
-
return response;
|
|
11654
|
-
}, function onAdapterRejection(reason) {
|
|
11655
|
-
if (!isCancel$1(reason)) {
|
|
11656
|
-
throwIfCancellationRequested(config);
|
|
11657
|
-
if (reason && reason.response) {
|
|
11658
|
-
reason.response.data = transformData.call(
|
|
11659
|
-
config,
|
|
11660
|
-
config.transformResponse,
|
|
11661
|
-
reason.response
|
|
11662
|
-
);
|
|
11663
|
-
reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
|
|
11664
|
-
}
|
|
11665
|
-
}
|
|
11666
|
-
return Promise.reject(reason);
|
|
11667
|
-
});
|
|
11668
|
-
}
|
|
11669
|
-
const VERSION$1 = "1.8.3";
|
|
11670
|
-
const validators$1 = {};
|
|
11671
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i2) => {
|
|
11672
|
-
validators$1[type] = function validator2(thing) {
|
|
11673
|
-
return typeof thing === type || "a" + (i2 < 1 ? "n " : " ") + type;
|
|
11674
|
-
};
|
|
11675
|
-
});
|
|
11676
|
-
const deprecatedWarnings = {};
|
|
11677
|
-
validators$1.transitional = function transitional(validator2, version, message) {
|
|
11678
|
-
function formatMessage(opt2, desc) {
|
|
11679
|
-
return "[Axios v" + VERSION$1 + "] Transitional option '" + opt2 + "'" + desc + (message ? ". " + message : "");
|
|
11680
|
-
}
|
|
11681
|
-
return (value, opt2, opts) => {
|
|
11682
|
-
if (validator2 === false) {
|
|
11683
|
-
throw new AxiosError$1(
|
|
11684
|
-
formatMessage(opt2, " has been removed" + (version ? " in " + version : "")),
|
|
11685
|
-
AxiosError$1.ERR_DEPRECATED
|
|
11686
|
-
);
|
|
11687
|
-
}
|
|
11688
|
-
if (version && !deprecatedWarnings[opt2]) {
|
|
11689
|
-
deprecatedWarnings[opt2] = true;
|
|
11690
|
-
console.warn(
|
|
11691
|
-
formatMessage(
|
|
11692
|
-
opt2,
|
|
11693
|
-
" has been deprecated since v" + version + " and will be removed in the near future"
|
|
11694
|
-
)
|
|
11695
|
-
);
|
|
11696
|
-
}
|
|
11697
|
-
return validator2 ? validator2(value, opt2, opts) : true;
|
|
11698
|
-
};
|
|
11699
|
-
};
|
|
11700
|
-
validators$1.spelling = function spelling(correctSpelling) {
|
|
11701
|
-
return (value, opt2) => {
|
|
11702
|
-
console.warn(`${opt2} is likely a misspelling of ${correctSpelling}`);
|
|
11703
|
-
return true;
|
|
11704
|
-
};
|
|
11705
|
-
};
|
|
11706
|
-
function assertOptions(options, schema, allowUnknown) {
|
|
11707
|
-
if (typeof options !== "object") {
|
|
11708
|
-
throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
11709
|
-
}
|
|
11710
|
-
const keys2 = Object.keys(options);
|
|
11711
|
-
let i2 = keys2.length;
|
|
11712
|
-
while (i2-- > 0) {
|
|
11713
|
-
const opt2 = keys2[i2];
|
|
11714
|
-
const validator2 = schema[opt2];
|
|
11715
|
-
if (validator2) {
|
|
11716
|
-
const value = options[opt2];
|
|
11717
|
-
const result = value === void 0 || validator2(value, opt2, options);
|
|
11718
|
-
if (result !== true) {
|
|
11719
|
-
throw new AxiosError$1("option " + opt2 + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
11720
|
-
}
|
|
11721
|
-
continue;
|
|
11722
|
-
}
|
|
11723
|
-
if (allowUnknown !== true) {
|
|
11724
|
-
throw new AxiosError$1("Unknown option " + opt2, AxiosError$1.ERR_BAD_OPTION);
|
|
11725
|
-
}
|
|
11726
|
-
}
|
|
11727
|
-
}
|
|
11728
|
-
const validator = {
|
|
11729
|
-
assertOptions,
|
|
11730
|
-
validators: validators$1
|
|
11731
|
-
};
|
|
11732
|
-
const validators = validator.validators;
|
|
11733
|
-
let Axios$1 = class Axios2 {
|
|
11734
|
-
constructor(instanceConfig) {
|
|
11735
|
-
this.defaults = instanceConfig;
|
|
11736
|
-
this.interceptors = {
|
|
11737
|
-
request: new InterceptorManager(),
|
|
11738
|
-
response: new InterceptorManager()
|
|
11739
|
-
};
|
|
11740
|
-
}
|
|
11741
|
-
/**
|
|
11742
|
-
* Dispatch a request
|
|
11743
|
-
*
|
|
11744
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
11745
|
-
* @param {?Object} config
|
|
11746
|
-
*
|
|
11747
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
11748
|
-
*/
|
|
11749
|
-
async request(configOrUrl, config) {
|
|
11750
|
-
try {
|
|
11751
|
-
return await this._request(configOrUrl, config);
|
|
11752
|
-
} catch (err) {
|
|
11753
|
-
if (err instanceof Error) {
|
|
11754
|
-
let dummy = {};
|
|
11755
|
-
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
11756
|
-
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
|
|
11757
|
-
try {
|
|
11758
|
-
if (!err.stack) {
|
|
11759
|
-
err.stack = stack;
|
|
11760
|
-
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
|
|
11761
|
-
err.stack += "\n" + stack;
|
|
11762
|
-
}
|
|
11763
|
-
} catch (e2) {
|
|
11764
|
-
}
|
|
11765
|
-
}
|
|
11766
|
-
throw err;
|
|
11767
|
-
}
|
|
11768
|
-
}
|
|
11769
|
-
_request(configOrUrl, config) {
|
|
11770
|
-
if (typeof configOrUrl === "string") {
|
|
11771
|
-
config = config || {};
|
|
11772
|
-
config.url = configOrUrl;
|
|
11773
|
-
} else {
|
|
11774
|
-
config = configOrUrl || {};
|
|
11775
|
-
}
|
|
11776
|
-
config = mergeConfig$1(this.defaults, config);
|
|
11777
|
-
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
11778
|
-
if (transitional2 !== void 0) {
|
|
11779
|
-
validator.assertOptions(transitional2, {
|
|
11780
|
-
silentJSONParsing: validators.transitional(validators.boolean),
|
|
11781
|
-
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
11782
|
-
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
11783
|
-
}, false);
|
|
11784
|
-
}
|
|
11785
|
-
if (paramsSerializer != null) {
|
|
11786
|
-
if (utils$2.isFunction(paramsSerializer)) {
|
|
11787
|
-
config.paramsSerializer = {
|
|
11788
|
-
serialize: paramsSerializer
|
|
11789
|
-
};
|
|
11790
|
-
} else {
|
|
11791
|
-
validator.assertOptions(paramsSerializer, {
|
|
11792
|
-
encode: validators.function,
|
|
11793
|
-
serialize: validators.function
|
|
11794
|
-
}, true);
|
|
11795
|
-
}
|
|
11796
|
-
}
|
|
11797
|
-
if (config.allowAbsoluteUrls !== void 0) ;
|
|
11798
|
-
else if (this.defaults.allowAbsoluteUrls !== void 0) {
|
|
11799
|
-
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
|
11800
|
-
} else {
|
|
11801
|
-
config.allowAbsoluteUrls = true;
|
|
11802
|
-
}
|
|
11803
|
-
validator.assertOptions(config, {
|
|
11804
|
-
baseUrl: validators.spelling("baseURL"),
|
|
11805
|
-
withXsrfToken: validators.spelling("withXSRFToken")
|
|
11806
|
-
}, true);
|
|
11807
|
-
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
11808
|
-
let contextHeaders = headers && utils$2.merge(
|
|
11809
|
-
headers.common,
|
|
11810
|
-
headers[config.method]
|
|
11811
|
-
);
|
|
11812
|
-
headers && utils$2.forEach(
|
|
11813
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
11814
|
-
(method) => {
|
|
11815
|
-
delete headers[method];
|
|
11816
|
-
}
|
|
11817
|
-
);
|
|
11818
|
-
config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
|
|
11819
|
-
const requestInterceptorChain = [];
|
|
11820
|
-
let synchronousRequestInterceptors = true;
|
|
11821
|
-
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
|
11822
|
-
if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) {
|
|
11823
|
-
return;
|
|
11824
|
-
}
|
|
11825
|
-
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
11826
|
-
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
11827
|
-
});
|
|
11828
|
-
const responseInterceptorChain = [];
|
|
11829
|
-
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
11830
|
-
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
11831
|
-
});
|
|
11832
|
-
let promise;
|
|
11833
|
-
let i2 = 0;
|
|
11834
|
-
let len2;
|
|
11835
|
-
if (!synchronousRequestInterceptors) {
|
|
11836
|
-
const chain = [dispatchRequest.bind(this), void 0];
|
|
11837
|
-
chain.unshift.apply(chain, requestInterceptorChain);
|
|
11838
|
-
chain.push.apply(chain, responseInterceptorChain);
|
|
11839
|
-
len2 = chain.length;
|
|
11840
|
-
promise = Promise.resolve(config);
|
|
11841
|
-
while (i2 < len2) {
|
|
11842
|
-
promise = promise.then(chain[i2++], chain[i2++]);
|
|
11843
|
-
}
|
|
11844
|
-
return promise;
|
|
11845
|
-
}
|
|
11846
|
-
len2 = requestInterceptorChain.length;
|
|
11847
|
-
let newConfig = config;
|
|
11848
|
-
i2 = 0;
|
|
11849
|
-
while (i2 < len2) {
|
|
11850
|
-
const onFulfilled = requestInterceptorChain[i2++];
|
|
11851
|
-
const onRejected = requestInterceptorChain[i2++];
|
|
11852
|
-
try {
|
|
11853
|
-
newConfig = onFulfilled(newConfig);
|
|
11854
|
-
} catch (error2) {
|
|
11855
|
-
onRejected.call(this, error2);
|
|
11856
|
-
break;
|
|
11857
|
-
}
|
|
11858
|
-
}
|
|
11859
|
-
try {
|
|
11860
|
-
promise = dispatchRequest.call(this, newConfig);
|
|
11861
|
-
} catch (error2) {
|
|
11862
|
-
return Promise.reject(error2);
|
|
11863
|
-
}
|
|
11864
|
-
i2 = 0;
|
|
11865
|
-
len2 = responseInterceptorChain.length;
|
|
11866
|
-
while (i2 < len2) {
|
|
11867
|
-
promise = promise.then(responseInterceptorChain[i2++], responseInterceptorChain[i2++]);
|
|
11868
|
-
}
|
|
11869
|
-
return promise;
|
|
11870
|
-
}
|
|
11871
|
-
getUri(config) {
|
|
11872
|
-
config = mergeConfig$1(this.defaults, config);
|
|
11873
|
-
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
11874
|
-
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
11875
|
-
}
|
|
11876
|
-
};
|
|
11877
|
-
utils$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
11878
|
-
Axios$1.prototype[method] = function(url, config) {
|
|
11879
|
-
return this.request(mergeConfig$1(config || {}, {
|
|
11880
|
-
method,
|
|
11881
|
-
url,
|
|
11882
|
-
data: (config || {}).data
|
|
11883
|
-
}));
|
|
11884
|
-
};
|
|
11885
|
-
});
|
|
11886
|
-
utils$2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
11887
|
-
function generateHTTPMethod(isForm) {
|
|
11888
|
-
return function httpMethod(url, data, config) {
|
|
11889
|
-
return this.request(mergeConfig$1(config || {}, {
|
|
11890
|
-
method,
|
|
11891
|
-
headers: isForm ? {
|
|
11892
|
-
"Content-Type": "multipart/form-data"
|
|
11893
|
-
} : {},
|
|
11894
|
-
url,
|
|
11895
|
-
data
|
|
11896
|
-
}));
|
|
11897
|
-
};
|
|
11898
|
-
}
|
|
11899
|
-
Axios$1.prototype[method] = generateHTTPMethod();
|
|
11900
|
-
Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
|
|
11901
|
-
});
|
|
11902
|
-
let CancelToken$1 = class CancelToken2 {
|
|
11903
|
-
constructor(executor) {
|
|
11904
|
-
if (typeof executor !== "function") {
|
|
11905
|
-
throw new TypeError("executor must be a function.");
|
|
11906
|
-
}
|
|
11907
|
-
let resolvePromise;
|
|
11908
|
-
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
11909
|
-
resolvePromise = resolve;
|
|
11910
|
-
});
|
|
11911
|
-
const token2 = this;
|
|
11912
|
-
this.promise.then((cancel) => {
|
|
11913
|
-
if (!token2._listeners) return;
|
|
11914
|
-
let i2 = token2._listeners.length;
|
|
11915
|
-
while (i2-- > 0) {
|
|
11916
|
-
token2._listeners[i2](cancel);
|
|
11917
|
-
}
|
|
11918
|
-
token2._listeners = null;
|
|
11919
|
-
});
|
|
11920
|
-
this.promise.then = (onfulfilled) => {
|
|
11921
|
-
let _resolve;
|
|
11922
|
-
const promise = new Promise((resolve) => {
|
|
11923
|
-
token2.subscribe(resolve);
|
|
11924
|
-
_resolve = resolve;
|
|
11925
|
-
}).then(onfulfilled);
|
|
11926
|
-
promise.cancel = function reject() {
|
|
11927
|
-
token2.unsubscribe(_resolve);
|
|
11928
|
-
};
|
|
11929
|
-
return promise;
|
|
11930
|
-
};
|
|
11931
|
-
executor(function cancel(message, config, request) {
|
|
11932
|
-
if (token2.reason) {
|
|
11933
|
-
return;
|
|
11934
|
-
}
|
|
11935
|
-
token2.reason = new CanceledError$1(message, config, request);
|
|
11936
|
-
resolvePromise(token2.reason);
|
|
11937
|
-
});
|
|
11938
|
-
}
|
|
11939
|
-
/**
|
|
11940
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
11941
|
-
*/
|
|
11942
|
-
throwIfRequested() {
|
|
11943
|
-
if (this.reason) {
|
|
11944
|
-
throw this.reason;
|
|
11945
|
-
}
|
|
11946
|
-
}
|
|
11947
|
-
/**
|
|
11948
|
-
* Subscribe to the cancel signal
|
|
11949
|
-
*/
|
|
11950
|
-
subscribe(listener) {
|
|
11951
|
-
if (this.reason) {
|
|
11952
|
-
listener(this.reason);
|
|
11953
|
-
return;
|
|
11954
|
-
}
|
|
11955
|
-
if (this._listeners) {
|
|
11956
|
-
this._listeners.push(listener);
|
|
11957
|
-
} else {
|
|
11958
|
-
this._listeners = [listener];
|
|
11959
|
-
}
|
|
11960
|
-
}
|
|
11961
|
-
/**
|
|
11962
|
-
* Unsubscribe from the cancel signal
|
|
11963
|
-
*/
|
|
11964
|
-
unsubscribe(listener) {
|
|
11965
|
-
if (!this._listeners) {
|
|
11966
|
-
return;
|
|
11967
|
-
}
|
|
11968
|
-
const index = this._listeners.indexOf(listener);
|
|
11969
|
-
if (index !== -1) {
|
|
11970
|
-
this._listeners.splice(index, 1);
|
|
11971
|
-
}
|
|
11972
|
-
}
|
|
11973
|
-
toAbortSignal() {
|
|
11974
|
-
const controller = new AbortController();
|
|
11975
|
-
const abort = (err) => {
|
|
11976
|
-
controller.abort(err);
|
|
11977
|
-
};
|
|
11978
|
-
this.subscribe(abort);
|
|
11979
|
-
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
|
11980
|
-
return controller.signal;
|
|
11981
|
-
}
|
|
11982
|
-
/**
|
|
11983
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
11984
|
-
* cancels the `CancelToken`.
|
|
11985
|
-
*/
|
|
11986
|
-
static source() {
|
|
11987
|
-
let cancel;
|
|
11988
|
-
const token2 = new CancelToken2(function executor(c) {
|
|
11989
|
-
cancel = c;
|
|
11990
|
-
});
|
|
11991
|
-
return {
|
|
11992
|
-
token: token2,
|
|
11993
|
-
cancel
|
|
11994
|
-
};
|
|
11995
|
-
}
|
|
11996
|
-
};
|
|
11997
|
-
function spread$1(callback) {
|
|
11998
|
-
return function wrap(arr) {
|
|
11999
|
-
return callback.apply(null, arr);
|
|
12000
|
-
};
|
|
12001
|
-
}
|
|
12002
|
-
function isAxiosError$1(payload) {
|
|
12003
|
-
return utils$2.isObject(payload) && payload.isAxiosError === true;
|
|
12004
|
-
}
|
|
12005
|
-
const HttpStatusCode$1 = {
|
|
12006
|
-
Continue: 100,
|
|
12007
|
-
SwitchingProtocols: 101,
|
|
12008
|
-
Processing: 102,
|
|
12009
|
-
EarlyHints: 103,
|
|
12010
|
-
Ok: 200,
|
|
12011
|
-
Created: 201,
|
|
12012
|
-
Accepted: 202,
|
|
12013
|
-
NonAuthoritativeInformation: 203,
|
|
12014
|
-
NoContent: 204,
|
|
12015
|
-
ResetContent: 205,
|
|
12016
|
-
PartialContent: 206,
|
|
12017
|
-
MultiStatus: 207,
|
|
12018
|
-
AlreadyReported: 208,
|
|
12019
|
-
ImUsed: 226,
|
|
12020
|
-
MultipleChoices: 300,
|
|
12021
|
-
MovedPermanently: 301,
|
|
12022
|
-
Found: 302,
|
|
12023
|
-
SeeOther: 303,
|
|
12024
|
-
NotModified: 304,
|
|
12025
|
-
UseProxy: 305,
|
|
12026
|
-
Unused: 306,
|
|
12027
|
-
TemporaryRedirect: 307,
|
|
12028
|
-
PermanentRedirect: 308,
|
|
12029
|
-
BadRequest: 400,
|
|
12030
|
-
Unauthorized: 401,
|
|
12031
|
-
PaymentRequired: 402,
|
|
12032
|
-
Forbidden: 403,
|
|
12033
|
-
NotFound: 404,
|
|
12034
|
-
MethodNotAllowed: 405,
|
|
12035
|
-
NotAcceptable: 406,
|
|
12036
|
-
ProxyAuthenticationRequired: 407,
|
|
12037
|
-
RequestTimeout: 408,
|
|
12038
|
-
Conflict: 409,
|
|
12039
|
-
Gone: 410,
|
|
12040
|
-
LengthRequired: 411,
|
|
12041
|
-
PreconditionFailed: 412,
|
|
12042
|
-
PayloadTooLarge: 413,
|
|
12043
|
-
UriTooLong: 414,
|
|
12044
|
-
UnsupportedMediaType: 415,
|
|
12045
|
-
RangeNotSatisfiable: 416,
|
|
12046
|
-
ExpectationFailed: 417,
|
|
12047
|
-
ImATeapot: 418,
|
|
12048
|
-
MisdirectedRequest: 421,
|
|
12049
|
-
UnprocessableEntity: 422,
|
|
12050
|
-
Locked: 423,
|
|
12051
|
-
FailedDependency: 424,
|
|
12052
|
-
TooEarly: 425,
|
|
12053
|
-
UpgradeRequired: 426,
|
|
12054
|
-
PreconditionRequired: 428,
|
|
12055
|
-
TooManyRequests: 429,
|
|
12056
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
12057
|
-
UnavailableForLegalReasons: 451,
|
|
12058
|
-
InternalServerError: 500,
|
|
12059
|
-
NotImplemented: 501,
|
|
12060
|
-
BadGateway: 502,
|
|
12061
|
-
ServiceUnavailable: 503,
|
|
12062
|
-
GatewayTimeout: 504,
|
|
12063
|
-
HttpVersionNotSupported: 505,
|
|
12064
|
-
VariantAlsoNegotiates: 506,
|
|
12065
|
-
InsufficientStorage: 507,
|
|
12066
|
-
LoopDetected: 508,
|
|
12067
|
-
NotExtended: 510,
|
|
12068
|
-
NetworkAuthenticationRequired: 511
|
|
12069
|
-
};
|
|
12070
|
-
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
|
|
12071
|
-
HttpStatusCode$1[value] = key;
|
|
12072
|
-
});
|
|
12073
|
-
function createInstance(defaultConfig) {
|
|
12074
|
-
const context = new Axios$1(defaultConfig);
|
|
12075
|
-
const instance = bind$2(Axios$1.prototype.request, context);
|
|
12076
|
-
utils$2.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
|
|
12077
|
-
utils$2.extend(instance, context, null, { allOwnKeys: true });
|
|
12078
|
-
instance.create = function create2(instanceConfig) {
|
|
12079
|
-
return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
|
|
12080
|
-
};
|
|
12081
|
-
return instance;
|
|
12082
|
-
}
|
|
12083
|
-
const axios = createInstance(defaults$2);
|
|
12084
|
-
axios.Axios = Axios$1;
|
|
12085
|
-
axios.CanceledError = CanceledError$1;
|
|
12086
|
-
axios.CancelToken = CancelToken$1;
|
|
12087
|
-
axios.isCancel = isCancel$1;
|
|
12088
|
-
axios.VERSION = VERSION$1;
|
|
12089
|
-
axios.toFormData = toFormData$1;
|
|
12090
|
-
axios.AxiosError = AxiosError$1;
|
|
12091
|
-
axios.Cancel = axios.CanceledError;
|
|
12092
|
-
axios.all = function all2(promises) {
|
|
12093
|
-
return Promise.all(promises);
|
|
12094
|
-
};
|
|
12095
|
-
axios.spread = spread$1;
|
|
12096
|
-
axios.isAxiosError = isAxiosError$1;
|
|
12097
|
-
axios.mergeConfig = mergeConfig$1;
|
|
12098
|
-
axios.AxiosHeaders = AxiosHeaders$1;
|
|
12099
|
-
axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
12100
|
-
axios.getAdapter = adapters.getAdapter;
|
|
12101
|
-
axios.HttpStatusCode = HttpStatusCode$1;
|
|
12102
|
-
axios.default = axios;
|
|
12103
|
-
const {
|
|
12104
|
-
Axios,
|
|
12105
|
-
AxiosError,
|
|
12106
|
-
CanceledError,
|
|
12107
|
-
isCancel,
|
|
12108
|
-
CancelToken,
|
|
12109
|
-
VERSION,
|
|
12110
|
-
all: all$1,
|
|
12111
|
-
Cancel,
|
|
12112
|
-
isAxiosError,
|
|
12113
|
-
spread,
|
|
12114
|
-
toFormData,
|
|
12115
|
-
AxiosHeaders,
|
|
12116
|
-
HttpStatusCode,
|
|
12117
|
-
formToJSON,
|
|
12118
|
-
getAdapter,
|
|
12119
|
-
mergeConfig
|
|
12120
|
-
} = axios;
|
|
12121
9750
|
function useGlobal() {
|
|
12122
9751
|
const { appContext } = getCurrentInstance();
|
|
12123
9752
|
return appContext.config.globalProperties;
|
|
@@ -16756,12 +14385,12 @@ function requireCookieStorage() {
|
|
|
16756
14385
|
return unescape(doc.cookie.replace(new RegExp(regexpStr), "$1"));
|
|
16757
14386
|
}
|
|
16758
14387
|
function each2(callback) {
|
|
16759
|
-
var
|
|
16760
|
-
for (var i2 =
|
|
16761
|
-
if (!trim2(
|
|
14388
|
+
var cookies = doc.cookie.split(/; ?/g);
|
|
14389
|
+
for (var i2 = cookies.length - 1; i2 >= 0; i2--) {
|
|
14390
|
+
if (!trim2(cookies[i2])) {
|
|
16762
14391
|
continue;
|
|
16763
14392
|
}
|
|
16764
|
-
var kvp =
|
|
14393
|
+
var kvp = cookies[i2].split("=");
|
|
16765
14394
|
var key = unescape(kvp[0]);
|
|
16766
14395
|
var val = unescape(kvp[1]);
|
|
16767
14396
|
callback(val, key);
|
|
@@ -17324,9 +14953,9 @@ i18n.setI18nLanguage = setI18nLanguage;
|
|
|
17324
14953
|
function mergeLocaleMessages(lang2, messages22) {
|
|
17325
14954
|
i18n.global.mergeLocaleMessage(lang2, messages22);
|
|
17326
14955
|
}
|
|
17327
|
-
function mergeMessages(
|
|
17328
|
-
Object.keys(
|
|
17329
|
-
i18n.global.mergeLocaleMessage(l,
|
|
14956
|
+
function mergeMessages(all2) {
|
|
14957
|
+
Object.keys(all2).forEach((l) => {
|
|
14958
|
+
i18n.global.mergeLocaleMessage(l, all2[l]);
|
|
17330
14959
|
});
|
|
17331
14960
|
}
|
|
17332
14961
|
window.$i18n = i18n;
|
|
@@ -21416,7 +19045,7 @@ function requireCpexcel() {
|
|
|
21416
19045
|
var BM = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
21417
19046
|
var SetD = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?";
|
|
21418
19047
|
var last_enc = null_enc, last_cp = 0;
|
|
21419
|
-
var
|
|
19048
|
+
var encode = function encode2(cp, data, ofmt) {
|
|
21420
19049
|
if (cp === last_cp && last_enc) {
|
|
21421
19050
|
return last_enc(data, ofmt);
|
|
21422
19051
|
}
|
|
@@ -21533,7 +19162,7 @@ function requireCpexcel() {
|
|
|
21533
19162
|
out2[j2++] = c.charCodeAt(0);
|
|
21534
19163
|
continue;
|
|
21535
19164
|
}
|
|
21536
|
-
var tt =
|
|
19165
|
+
var tt = encode2(1201, c);
|
|
21537
19166
|
out2[j2++] = 43;
|
|
21538
19167
|
out2[j2++] = BM.charCodeAt(tt[0] >> 2);
|
|
21539
19168
|
out2[j2++] = BM.charCodeAt(((tt[0] & 3) << 4) + ((tt[1] || 0) >> 4));
|
|
@@ -21703,7 +19332,7 @@ function requireCpexcel() {
|
|
|
21703
19332
|
var hascp = function hascp2(cp) {
|
|
21704
19333
|
return !!(cpt[cp] || magic[cp]);
|
|
21705
19334
|
};
|
|
21706
|
-
cpt.utils = { decode: decode2, encode
|
|
19335
|
+
cpt.utils = { decode: decode2, encode, hascp, magic, cache };
|
|
21707
19336
|
return cpt;
|
|
21708
19337
|
});
|
|
21709
19338
|
})(cpexcel$1);
|
|
@@ -33241,12 +30870,12 @@ function exportExcelFromHtml(html, fileName) {
|
|
|
33241
30870
|
const cells = tr.querySelectorAll("td, th");
|
|
33242
30871
|
cells.forEach((cell) => {
|
|
33243
30872
|
const el = cell;
|
|
33244
|
-
const
|
|
33245
|
-
if (!
|
|
30873
|
+
const origin = cellOrigin.get(el);
|
|
30874
|
+
if (!origin || origin.r !== r) return;
|
|
33246
30875
|
const totalPx = getElementHeightPx(el);
|
|
33247
30876
|
if (totalPx == null) return;
|
|
33248
|
-
const perRow = totalPx / Math.max(1,
|
|
33249
|
-
for (let i2 = 0; i2 <
|
|
30877
|
+
const perRow = totalPx / Math.max(1, origin.rowspan);
|
|
30878
|
+
for (let i2 = 0; i2 < origin.rowspan; i2++) {
|
|
33250
30879
|
const idx = r + i2;
|
|
33251
30880
|
if (idx >= rowHeightPx.length) break;
|
|
33252
30881
|
const cur = rowHeightPx[idx] ?? 0;
|
|
@@ -33345,8 +30974,8 @@ function exportExcelFromHtml(html, fileName) {
|
|
|
33345
30974
|
const cell = sheet[addr];
|
|
33346
30975
|
const el = cellMap[`${r},${c}`];
|
|
33347
30976
|
if (el) {
|
|
33348
|
-
const
|
|
33349
|
-
if (
|
|
30977
|
+
const origin = cellOrigin.get(el);
|
|
30978
|
+
if (origin && (origin.r !== r || origin.c !== c)) {
|
|
33350
30979
|
continue;
|
|
33351
30980
|
}
|
|
33352
30981
|
const xlsxType = (_c2 = el == null ? void 0 : el.dataset) == null ? void 0 : _c2.xlsxType;
|
|
@@ -33880,6 +31509,291 @@ const SecurityApi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
33880
31509
|
validateRoleCode,
|
|
33881
31510
|
validateUserParams
|
|
33882
31511
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
31512
|
+
var dayjs_min$1 = { exports: {} };
|
|
31513
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
31514
|
+
var hasRequiredDayjs_min;
|
|
31515
|
+
function requireDayjs_min() {
|
|
31516
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
31517
|
+
hasRequiredDayjs_min = 1;
|
|
31518
|
+
(function(module2, exports) {
|
|
31519
|
+
!function(t, e2) {
|
|
31520
|
+
module2.exports = e2();
|
|
31521
|
+
}(dayjs_min, function() {
|
|
31522
|
+
var t = 1e3, e2 = 6e4, n = 36e5, r = "millisecond", i2 = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f2 = "quarter", h2 = "year", d = "date", l = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
31523
|
+
var e3 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
31524
|
+
return "[" + t2 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]";
|
|
31525
|
+
} }, m2 = function(t2, e3, n2) {
|
|
31526
|
+
var r2 = String(t2);
|
|
31527
|
+
return !r2 || r2.length >= e3 ? t2 : "" + Array(e3 + 1 - r2.length).join(n2) + t2;
|
|
31528
|
+
}, v = { s: m2, z: function(t2) {
|
|
31529
|
+
var e3 = -t2.utcOffset(), n2 = Math.abs(e3), r2 = Math.floor(n2 / 60), i3 = n2 % 60;
|
|
31530
|
+
return (e3 <= 0 ? "+" : "-") + m2(r2, 2, "0") + ":" + m2(i3, 2, "0");
|
|
31531
|
+
}, m: function t2(e3, n2) {
|
|
31532
|
+
if (e3.date() < n2.date()) return -t2(n2, e3);
|
|
31533
|
+
var r2 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i3 = e3.clone().add(r2, c), s2 = n2 - i3 < 0, u2 = e3.clone().add(r2 + (s2 ? -1 : 1), c);
|
|
31534
|
+
return +(-(r2 + (n2 - i3) / (s2 ? i3 - u2 : u2 - i3)) || 0);
|
|
31535
|
+
}, a: function(t2) {
|
|
31536
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
31537
|
+
}, p: function(t2) {
|
|
31538
|
+
return { M: c, y: h2, w: o, d: a, D: d, h: u, m: s, s: i2, ms: r, Q: f2 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
31539
|
+
}, u: function(t2) {
|
|
31540
|
+
return void 0 === t2;
|
|
31541
|
+
} }, g = "en", D = {};
|
|
31542
|
+
D[g] = M;
|
|
31543
|
+
var p = "$isDayjsObject", S = function(t2) {
|
|
31544
|
+
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
31545
|
+
}, w = function t2(e3, n2, r2) {
|
|
31546
|
+
var i3;
|
|
31547
|
+
if (!e3) return g;
|
|
31548
|
+
if ("string" == typeof e3) {
|
|
31549
|
+
var s2 = e3.toLowerCase();
|
|
31550
|
+
D[s2] && (i3 = s2), n2 && (D[s2] = n2, i3 = s2);
|
|
31551
|
+
var u2 = e3.split("-");
|
|
31552
|
+
if (!i3 && u2.length > 1) return t2(u2[0]);
|
|
31553
|
+
} else {
|
|
31554
|
+
var a2 = e3.name;
|
|
31555
|
+
D[a2] = e3, i3 = a2;
|
|
31556
|
+
}
|
|
31557
|
+
return !r2 && i3 && (g = i3), i3 || !r2 && g;
|
|
31558
|
+
}, O = function(t2, e3) {
|
|
31559
|
+
if (S(t2)) return t2.clone();
|
|
31560
|
+
var n2 = "object" == typeof e3 ? e3 : {};
|
|
31561
|
+
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
31562
|
+
}, b = v;
|
|
31563
|
+
b.l = w, b.i = S, b.w = function(t2, e3) {
|
|
31564
|
+
return O(t2, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
|
|
31565
|
+
};
|
|
31566
|
+
var _ = function() {
|
|
31567
|
+
function M2(t2) {
|
|
31568
|
+
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
31569
|
+
}
|
|
31570
|
+
var m3 = M2.prototype;
|
|
31571
|
+
return m3.parse = function(t2) {
|
|
31572
|
+
this.$d = function(t3) {
|
|
31573
|
+
var e3 = t3.date, n2 = t3.utc;
|
|
31574
|
+
if (null === e3) return /* @__PURE__ */ new Date(NaN);
|
|
31575
|
+
if (b.u(e3)) return /* @__PURE__ */ new Date();
|
|
31576
|
+
if (e3 instanceof Date) return new Date(e3);
|
|
31577
|
+
if ("string" == typeof e3 && !/Z$/i.test(e3)) {
|
|
31578
|
+
var r2 = e3.match($2);
|
|
31579
|
+
if (r2) {
|
|
31580
|
+
var i3 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
31581
|
+
return n2 ? new Date(Date.UTC(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i3, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
31582
|
+
}
|
|
31583
|
+
}
|
|
31584
|
+
return new Date(e3);
|
|
31585
|
+
}(t2), this.init();
|
|
31586
|
+
}, m3.init = function() {
|
|
31587
|
+
var t2 = this.$d;
|
|
31588
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
31589
|
+
}, m3.$utils = function() {
|
|
31590
|
+
return b;
|
|
31591
|
+
}, m3.isValid = function() {
|
|
31592
|
+
return !(this.$d.toString() === l);
|
|
31593
|
+
}, m3.isSame = function(t2, e3) {
|
|
31594
|
+
var n2 = O(t2);
|
|
31595
|
+
return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
|
|
31596
|
+
}, m3.isAfter = function(t2, e3) {
|
|
31597
|
+
return O(t2) < this.startOf(e3);
|
|
31598
|
+
}, m3.isBefore = function(t2, e3) {
|
|
31599
|
+
return this.endOf(e3) < O(t2);
|
|
31600
|
+
}, m3.$g = function(t2, e3, n2) {
|
|
31601
|
+
return b.u(t2) ? this[e3] : this.set(n2, t2);
|
|
31602
|
+
}, m3.unix = function() {
|
|
31603
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
31604
|
+
}, m3.valueOf = function() {
|
|
31605
|
+
return this.$d.getTime();
|
|
31606
|
+
}, m3.startOf = function(t2, e3) {
|
|
31607
|
+
var n2 = this, r2 = !!b.u(e3) || e3, f3 = b.p(t2), l2 = function(t3, e4) {
|
|
31608
|
+
var i3 = b.w(n2.$u ? Date.UTC(n2.$y, e4, t3) : new Date(n2.$y, e4, t3), n2);
|
|
31609
|
+
return r2 ? i3 : i3.endOf(a);
|
|
31610
|
+
}, $3 = function(t3, e4) {
|
|
31611
|
+
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
|
|
31612
|
+
}, y2 = this.$W, M3 = this.$M, m4 = this.$D, v4 = "set" + (this.$u ? "UTC" : "");
|
|
31613
|
+
switch (f3) {
|
|
31614
|
+
case h2:
|
|
31615
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
31616
|
+
case c:
|
|
31617
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
31618
|
+
case o:
|
|
31619
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
31620
|
+
return l2(r2 ? m4 - D2 : m4 + (6 - D2), M3);
|
|
31621
|
+
case a:
|
|
31622
|
+
case d:
|
|
31623
|
+
return $3(v4 + "Hours", 0);
|
|
31624
|
+
case u:
|
|
31625
|
+
return $3(v4 + "Minutes", 1);
|
|
31626
|
+
case s:
|
|
31627
|
+
return $3(v4 + "Seconds", 2);
|
|
31628
|
+
case i2:
|
|
31629
|
+
return $3(v4 + "Milliseconds", 3);
|
|
31630
|
+
default:
|
|
31631
|
+
return this.clone();
|
|
31632
|
+
}
|
|
31633
|
+
}, m3.endOf = function(t2) {
|
|
31634
|
+
return this.startOf(t2, false);
|
|
31635
|
+
}, m3.$set = function(t2, e3) {
|
|
31636
|
+
var n2, o2 = b.p(t2), f3 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f3 + "Date", n2[d] = f3 + "Date", n2[c] = f3 + "Month", n2[h2] = f3 + "FullYear", n2[u] = f3 + "Hours", n2[s] = f3 + "Minutes", n2[i2] = f3 + "Seconds", n2[r] = f3 + "Milliseconds", n2)[o2], $3 = o2 === a ? this.$D + (e3 - this.$W) : e3;
|
|
31637
|
+
if (o2 === c || o2 === h2) {
|
|
31638
|
+
var y2 = this.clone().set(d, 1);
|
|
31639
|
+
y2.$d[l2]($3), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
31640
|
+
} else l2 && this.$d[l2]($3);
|
|
31641
|
+
return this.init(), this;
|
|
31642
|
+
}, m3.set = function(t2, e3) {
|
|
31643
|
+
return this.clone().$set(t2, e3);
|
|
31644
|
+
}, m3.get = function(t2) {
|
|
31645
|
+
return this[b.p(t2)]();
|
|
31646
|
+
}, m3.add = function(r2, f3) {
|
|
31647
|
+
var d2, l2 = this;
|
|
31648
|
+
r2 = Number(r2);
|
|
31649
|
+
var $3 = b.p(f3), y2 = function(t2) {
|
|
31650
|
+
var e3 = O(l2);
|
|
31651
|
+
return b.w(e3.date(e3.date() + Math.round(t2 * r2)), l2);
|
|
31652
|
+
};
|
|
31653
|
+
if ($3 === c) return this.set(c, this.$M + r2);
|
|
31654
|
+
if ($3 === h2) return this.set(h2, this.$y + r2);
|
|
31655
|
+
if ($3 === a) return y2(1);
|
|
31656
|
+
if ($3 === o) return y2(7);
|
|
31657
|
+
var M3 = (d2 = {}, d2[s] = e2, d2[u] = n, d2[i2] = t, d2)[$3] || 1, m4 = this.$d.getTime() + r2 * M3;
|
|
31658
|
+
return b.w(m4, this);
|
|
31659
|
+
}, m3.subtract = function(t2, e3) {
|
|
31660
|
+
return this.add(-1 * t2, e3);
|
|
31661
|
+
}, m3.format = function(t2) {
|
|
31662
|
+
var e3 = this, n2 = this.$locale();
|
|
31663
|
+
if (!this.isValid()) return n2.invalidDate || l;
|
|
31664
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i3 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f3 = n2.meridiem, h3 = function(t3, n3, i4, s3) {
|
|
31665
|
+
return t3 && (t3[n3] || t3(e3, r2)) || i4[n3].slice(0, s3);
|
|
31666
|
+
}, d2 = function(t3) {
|
|
31667
|
+
return b.s(s2 % 12 || 12, t3, "0");
|
|
31668
|
+
}, $3 = f3 || function(t3, e4, n3) {
|
|
31669
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
31670
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
31671
|
+
};
|
|
31672
|
+
return r2.replace(y, function(t3, r3) {
|
|
31673
|
+
return r3 || function(t4) {
|
|
31674
|
+
switch (t4) {
|
|
31675
|
+
case "YY":
|
|
31676
|
+
return String(e3.$y).slice(-2);
|
|
31677
|
+
case "YYYY":
|
|
31678
|
+
return b.s(e3.$y, 4, "0");
|
|
31679
|
+
case "M":
|
|
31680
|
+
return a2 + 1;
|
|
31681
|
+
case "MM":
|
|
31682
|
+
return b.s(a2 + 1, 2, "0");
|
|
31683
|
+
case "MMM":
|
|
31684
|
+
return h3(n2.monthsShort, a2, c2, 3);
|
|
31685
|
+
case "MMMM":
|
|
31686
|
+
return h3(c2, a2);
|
|
31687
|
+
case "D":
|
|
31688
|
+
return e3.$D;
|
|
31689
|
+
case "DD":
|
|
31690
|
+
return b.s(e3.$D, 2, "0");
|
|
31691
|
+
case "d":
|
|
31692
|
+
return String(e3.$W);
|
|
31693
|
+
case "dd":
|
|
31694
|
+
return h3(n2.weekdaysMin, e3.$W, o2, 2);
|
|
31695
|
+
case "ddd":
|
|
31696
|
+
return h3(n2.weekdaysShort, e3.$W, o2, 3);
|
|
31697
|
+
case "dddd":
|
|
31698
|
+
return o2[e3.$W];
|
|
31699
|
+
case "H":
|
|
31700
|
+
return String(s2);
|
|
31701
|
+
case "HH":
|
|
31702
|
+
return b.s(s2, 2, "0");
|
|
31703
|
+
case "h":
|
|
31704
|
+
return d2(1);
|
|
31705
|
+
case "hh":
|
|
31706
|
+
return d2(2);
|
|
31707
|
+
case "a":
|
|
31708
|
+
return $3(s2, u2, true);
|
|
31709
|
+
case "A":
|
|
31710
|
+
return $3(s2, u2, false);
|
|
31711
|
+
case "m":
|
|
31712
|
+
return String(u2);
|
|
31713
|
+
case "mm":
|
|
31714
|
+
return b.s(u2, 2, "0");
|
|
31715
|
+
case "s":
|
|
31716
|
+
return String(e3.$s);
|
|
31717
|
+
case "ss":
|
|
31718
|
+
return b.s(e3.$s, 2, "0");
|
|
31719
|
+
case "SSS":
|
|
31720
|
+
return b.s(e3.$ms, 3, "0");
|
|
31721
|
+
case "Z":
|
|
31722
|
+
return i3;
|
|
31723
|
+
}
|
|
31724
|
+
return null;
|
|
31725
|
+
}(t3) || i3.replace(":", "");
|
|
31726
|
+
});
|
|
31727
|
+
}, m3.utcOffset = function() {
|
|
31728
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
31729
|
+
}, m3.diff = function(r2, d2, l2) {
|
|
31730
|
+
var $3, y2 = this, M3 = b.p(d2), m4 = O(r2), v4 = (m4.utcOffset() - this.utcOffset()) * e2, g2 = this - m4, D2 = function() {
|
|
31731
|
+
return b.m(y2, m4);
|
|
31732
|
+
};
|
|
31733
|
+
switch (M3) {
|
|
31734
|
+
case h2:
|
|
31735
|
+
$3 = D2() / 12;
|
|
31736
|
+
break;
|
|
31737
|
+
case c:
|
|
31738
|
+
$3 = D2();
|
|
31739
|
+
break;
|
|
31740
|
+
case f2:
|
|
31741
|
+
$3 = D2() / 3;
|
|
31742
|
+
break;
|
|
31743
|
+
case o:
|
|
31744
|
+
$3 = (g2 - v4) / 6048e5;
|
|
31745
|
+
break;
|
|
31746
|
+
case a:
|
|
31747
|
+
$3 = (g2 - v4) / 864e5;
|
|
31748
|
+
break;
|
|
31749
|
+
case u:
|
|
31750
|
+
$3 = g2 / n;
|
|
31751
|
+
break;
|
|
31752
|
+
case s:
|
|
31753
|
+
$3 = g2 / e2;
|
|
31754
|
+
break;
|
|
31755
|
+
case i2:
|
|
31756
|
+
$3 = g2 / t;
|
|
31757
|
+
break;
|
|
31758
|
+
default:
|
|
31759
|
+
$3 = g2;
|
|
31760
|
+
}
|
|
31761
|
+
return l2 ? $3 : b.a($3);
|
|
31762
|
+
}, m3.daysInMonth = function() {
|
|
31763
|
+
return this.endOf(c).$D;
|
|
31764
|
+
}, m3.$locale = function() {
|
|
31765
|
+
return D[this.$L];
|
|
31766
|
+
}, m3.locale = function(t2, e3) {
|
|
31767
|
+
if (!t2) return this.$L;
|
|
31768
|
+
var n2 = this.clone(), r2 = w(t2, e3, true);
|
|
31769
|
+
return r2 && (n2.$L = r2), n2;
|
|
31770
|
+
}, m3.clone = function() {
|
|
31771
|
+
return b.w(this.$d, this);
|
|
31772
|
+
}, m3.toDate = function() {
|
|
31773
|
+
return new Date(this.valueOf());
|
|
31774
|
+
}, m3.toJSON = function() {
|
|
31775
|
+
return this.isValid() ? this.toISOString() : null;
|
|
31776
|
+
}, m3.toISOString = function() {
|
|
31777
|
+
return this.$d.toISOString();
|
|
31778
|
+
}, m3.toString = function() {
|
|
31779
|
+
return this.$d.toUTCString();
|
|
31780
|
+
}, M2;
|
|
31781
|
+
}(), k2 = _.prototype;
|
|
31782
|
+
return O.prototype = k2, [["$ms", r], ["$s", i2], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h2], ["$D", d]].forEach(function(t2) {
|
|
31783
|
+
k2[t2[1]] = function(e3) {
|
|
31784
|
+
return this.$g(e3, t2[0], t2[1]);
|
|
31785
|
+
};
|
|
31786
|
+
}), O.extend = function(t2, e3) {
|
|
31787
|
+
return t2.$i || (t2(e3, _, O), t2.$i = true), O;
|
|
31788
|
+
}, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
|
|
31789
|
+
return O(1e3 * t2);
|
|
31790
|
+
}, O.en = D[g], O.Ls = D, O.p = {}, O;
|
|
31791
|
+
});
|
|
31792
|
+
})(dayjs_min$1);
|
|
31793
|
+
return dayjs_min$1.exports;
|
|
31794
|
+
}
|
|
31795
|
+
var dayjs_minExports = requireDayjs_min();
|
|
31796
|
+
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
33883
31797
|
const isInvalidDate = (d) => {
|
|
33884
31798
|
if (d == null || d === "" || d === true || d === false || ["null", "undefined", "NaN"].includes(String(d))) return true;
|
|
33885
31799
|
try {
|
|
@@ -34005,6 +31919,46 @@ const useMathFns = () => {
|
|
|
34005
31919
|
toFixedAsNumber(dp, rm) {
|
|
34006
31920
|
return new Big(new Big(dp).toFixed(rm)).toNumber();
|
|
34007
31921
|
},
|
|
31922
|
+
/**
|
|
31923
|
+
* 将计算结果四舍五入保留指定小数位并转为数字
|
|
31924
|
+
* 解决 JavaScript 浮点数精度问题
|
|
31925
|
+
* @param values 参与计算的数值(字符串或数字),如 ['7870', '6.9025']
|
|
31926
|
+
* @param operation 运算类型:'+' | '-' | '*' | '/' 或 'plus' | 'minus' | 'times' | 'div'
|
|
31927
|
+
* @param decimalPlaces 保留小数位数
|
|
31928
|
+
* @returns 四舍五入后的数字
|
|
31929
|
+
* @example
|
|
31930
|
+
* toFixedAsNumberSafe(['7870', '6.9025'], '*', 2) // 54322.68
|
|
31931
|
+
* toFixedAsNumberSafe(['0.1', '0.2'], '+', 1) // 0.3
|
|
31932
|
+
*/
|
|
31933
|
+
toFixedAsNumberSafe(values, operation, decimalPlaces) {
|
|
31934
|
+
if (values.length === 0) return 0;
|
|
31935
|
+
if (values.length === 1) {
|
|
31936
|
+
return new Big(new Big(values[0]).toFixed(decimalPlaces)).toNumber();
|
|
31937
|
+
}
|
|
31938
|
+
let result = new Big(values[0]);
|
|
31939
|
+
for (let i2 = 1; i2 < values.length; i2++) {
|
|
31940
|
+
const val = new Big(values[i2]);
|
|
31941
|
+
switch (operation) {
|
|
31942
|
+
case "+":
|
|
31943
|
+
case "plus":
|
|
31944
|
+
result = result.plus(val);
|
|
31945
|
+
break;
|
|
31946
|
+
case "-":
|
|
31947
|
+
case "minus":
|
|
31948
|
+
result = result.minus(val);
|
|
31949
|
+
break;
|
|
31950
|
+
case "*":
|
|
31951
|
+
case "times":
|
|
31952
|
+
result = result.times(val);
|
|
31953
|
+
break;
|
|
31954
|
+
case "/":
|
|
31955
|
+
case "div":
|
|
31956
|
+
result = result.div(val);
|
|
31957
|
+
break;
|
|
31958
|
+
}
|
|
31959
|
+
}
|
|
31960
|
+
return new Big(result.toFixed(decimalPlaces)).toNumber();
|
|
31961
|
+
},
|
|
34008
31962
|
toPrecision(sd, rm) {
|
|
34009
31963
|
return new Big(sd).toPrecision(rm);
|
|
34010
31964
|
},
|
|
@@ -34019,9 +31973,9 @@ const useMathFns = () => {
|
|
|
34019
31973
|
}
|
|
34020
31974
|
};
|
|
34021
31975
|
};
|
|
34022
|
-
function fixProto(target,
|
|
31976
|
+
function fixProto(target, prototype) {
|
|
34023
31977
|
var setPrototypeOf = Object.setPrototypeOf;
|
|
34024
|
-
setPrototypeOf ? setPrototypeOf(target,
|
|
31978
|
+
setPrototypeOf ? setPrototypeOf(target, prototype) : target.__proto__ = prototype;
|
|
34025
31979
|
}
|
|
34026
31980
|
function fixStack(target, fn) {
|
|
34027
31981
|
if (fn === void 0) {
|
|
@@ -35236,7 +33190,7 @@ var StringUtils = (
|
|
|
35236
33190
|
}
|
|
35237
33191
|
return StringUtils2.PLATFORM_DEFAULT_ENCODING;
|
|
35238
33192
|
};
|
|
35239
|
-
StringUtils2.format = function(
|
|
33193
|
+
StringUtils2.format = function(append) {
|
|
35240
33194
|
var args = [];
|
|
35241
33195
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
35242
33196
|
args[_i - 1] = arguments[_i];
|
|
@@ -35281,7 +33235,7 @@ var StringUtils = (
|
|
|
35281
33235
|
return val;
|
|
35282
33236
|
}
|
|
35283
33237
|
var regex = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
|
|
35284
|
-
return
|
|
33238
|
+
return append.replace(regex, callback);
|
|
35285
33239
|
};
|
|
35286
33240
|
StringUtils2.getBytes = function(str2, encoding) {
|
|
35287
33241
|
return StringEncoding.encode(str2, encoding);
|
|
@@ -47557,23 +45511,23 @@ var DecodedBitStreamParser$1 = (
|
|
|
47557
45511
|
if (8 * count2 > bits.available()) {
|
|
47558
45512
|
throw new FormatException();
|
|
47559
45513
|
}
|
|
47560
|
-
var
|
|
45514
|
+
var readBytes = new Uint8Array(count2);
|
|
47561
45515
|
for (var i2 = 0; i2 < count2; i2++) {
|
|
47562
|
-
|
|
45516
|
+
readBytes[i2] = /*(byte) */
|
|
47563
45517
|
bits.readBits(8);
|
|
47564
45518
|
}
|
|
47565
45519
|
var encoding;
|
|
47566
45520
|
if (currentCharacterSetECI === null) {
|
|
47567
|
-
encoding = StringUtils.guessEncoding(
|
|
45521
|
+
encoding = StringUtils.guessEncoding(readBytes, hints);
|
|
47568
45522
|
} else {
|
|
47569
45523
|
encoding = currentCharacterSetECI.getName();
|
|
47570
45524
|
}
|
|
47571
45525
|
try {
|
|
47572
|
-
result.append(StringEncoding.decode(
|
|
45526
|
+
result.append(StringEncoding.decode(readBytes, encoding));
|
|
47573
45527
|
} catch (ignored) {
|
|
47574
45528
|
throw new FormatException(ignored);
|
|
47575
45529
|
}
|
|
47576
|
-
byteSegments.push(
|
|
45530
|
+
byteSegments.push(readBytes);
|
|
47577
45531
|
};
|
|
47578
45532
|
DecodedBitStreamParser2.toAlphaNumericChar = function(value) {
|
|
47579
45533
|
if (value >= DecodedBitStreamParser2.ALPHANUMERIC_CHARS.length) {
|
|
@@ -55523,12 +53477,12 @@ var Formatter = (
|
|
|
55523
53477
|
var regex = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
|
|
55524
53478
|
return str2.replace(regex, callback);
|
|
55525
53479
|
};
|
|
55526
|
-
Formatter2.prototype.format = function(
|
|
53480
|
+
Formatter2.prototype.format = function(append) {
|
|
55527
53481
|
var args = [];
|
|
55528
53482
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
55529
53483
|
args[_i - 1] = arguments[_i];
|
|
55530
53484
|
}
|
|
55531
|
-
this.buffer += Formatter2.form(
|
|
53485
|
+
this.buffer += Formatter2.form(append, args);
|
|
55532
53486
|
};
|
|
55533
53487
|
Formatter2.prototype.toString = function() {
|
|
55534
53488
|
return this.buffer;
|
|
@@ -59744,9 +57698,9 @@ var C40Encoder = (
|
|
|
59744
57698
|
};
|
|
59745
57699
|
C40Encoder2.prototype.backtrackOneCharacter = function(context, buffer, removed, lastCharSize) {
|
|
59746
57700
|
var count2 = buffer.length();
|
|
59747
|
-
var
|
|
57701
|
+
var test = buffer.toString().substring(0, count2 - lastCharSize);
|
|
59748
57702
|
buffer.setLengthToZero();
|
|
59749
|
-
buffer.append(
|
|
57703
|
+
buffer.append(test);
|
|
59750
57704
|
context.pos--;
|
|
59751
57705
|
var c = context.getCurrentChar();
|
|
59752
57706
|
lastCharSize = this.encodeChar(c, removed);
|
|
@@ -59755,9 +57709,9 @@ var C40Encoder = (
|
|
|
59755
57709
|
};
|
|
59756
57710
|
C40Encoder2.prototype.writeNextTriplet = function(context, buffer) {
|
|
59757
57711
|
context.writeCodewords(this.encodeToCodewords(buffer.toString()));
|
|
59758
|
-
var
|
|
57712
|
+
var test = buffer.toString().substring(3);
|
|
59759
57713
|
buffer.setLengthToZero();
|
|
59760
|
-
buffer.append(
|
|
57714
|
+
buffer.append(test);
|
|
59761
57715
|
};
|
|
59762
57716
|
C40Encoder2.prototype.handleEOD = function(context, buffer) {
|
|
59763
57717
|
var unwritten = Math.floor(buffer.length() / 3 * 2);
|
|
@@ -63397,7 +61351,7 @@ class JsScriptExecutor {
|
|
|
63397
61351
|
const hasMinWidth = Object.prototype.hasOwnProperty.call(options, "minWidth");
|
|
63398
61352
|
const hasMaxWidth = Object.prototype.hasOwnProperty.call(options, "maxWidth");
|
|
63399
61353
|
const hasClassName = Object.prototype.hasOwnProperty.call(options, "className");
|
|
63400
|
-
const
|
|
61354
|
+
const toFiniteNumber = (v) => {
|
|
63401
61355
|
if (typeof v === "number") return Number.isFinite(v) ? v : void 0;
|
|
63402
61356
|
if (typeof v === "string") {
|
|
63403
61357
|
const n2 = Number(v);
|
|
@@ -63409,9 +61363,9 @@ class JsScriptExecutor {
|
|
|
63409
61363
|
};
|
|
63410
61364
|
const placementValue = String((hasPlacement ? rawPlacement : void 0) || "bottom");
|
|
63411
61365
|
const offsetValue = hasOffset ? typeof rawOffset === "number" ? rawOffset : Number(rawOffset) || 8 : 8;
|
|
63412
|
-
const widthValue = hasWidth ?
|
|
63413
|
-
const minWidthValue = hasMinWidth ?
|
|
63414
|
-
const maxWidthValue = hasMaxWidth ?
|
|
61366
|
+
const widthValue = hasWidth ? toFiniteNumber(width) : void 0;
|
|
61367
|
+
const minWidthValue = hasMinWidth ? toFiniteNumber(rawMinWidth) ?? 200 : void 0;
|
|
61368
|
+
const maxWidthValue = hasMaxWidth ? toFiniteNumber(rawMaxWidth) ?? 600 : void 0;
|
|
63415
61369
|
const classNameValue = typeof rawClassName === "string" ? rawClassName : "";
|
|
63416
61370
|
const emitVisibleChange = (visible) => {
|
|
63417
61371
|
if (typeof onVisibleChange === "function") onVisibleChange(visible);
|
|
@@ -67044,13 +64998,13 @@ class Utils {
|
|
|
67044
64998
|
* @param filter 过滤器
|
|
67045
64999
|
* @param operator 过滤类型
|
|
67046
65000
|
*/
|
|
67047
|
-
filterOperator(
|
|
65001
|
+
filterOperator(filter2, operator) {
|
|
67048
65002
|
const fop = {};
|
|
67049
|
-
for (const key in
|
|
65003
|
+
for (const key in filter2) {
|
|
67050
65004
|
if (Object.prototype.hasOwnProperty.call(operator, key) && operator[key]) {
|
|
67051
|
-
fop[`${key}|${operator[key]}`] =
|
|
65005
|
+
fop[`${key}|${operator[key]}`] = filter2[key];
|
|
67052
65006
|
} else {
|
|
67053
|
-
fop[key] =
|
|
65007
|
+
fop[key] = filter2[key];
|
|
67054
65008
|
}
|
|
67055
65009
|
}
|
|
67056
65010
|
return fop;
|
|
@@ -92528,10 +90482,10 @@ var CustomValidator = /* @__PURE__ */ function(Base3) {
|
|
|
92528
90482
|
var prototypeAccessors2 = { validate: { configurable: true } };
|
|
92529
90483
|
prototypeAccessors2.validate.get = function() {
|
|
92530
90484
|
var _this = this;
|
|
92531
|
-
return function(
|
|
90485
|
+
return function(validator, callback) {
|
|
92532
90486
|
var ret;
|
|
92533
|
-
if (
|
|
92534
|
-
ret =
|
|
90487
|
+
if (validator) {
|
|
90488
|
+
ret = validator(_this.obj, _this.addError.bind(_this));
|
|
92535
90489
|
if (ret && ret.then) {
|
|
92536
90490
|
if (callback) {
|
|
92537
90491
|
ret.then(function() {
|
|
@@ -92609,11 +90563,11 @@ Schema.prototype.validate = function validate2(values, callback) {
|
|
|
92609
90563
|
if ("strict" in rule) {
|
|
92610
90564
|
_options.strict = rule.strict;
|
|
92611
90565
|
}
|
|
92612
|
-
var
|
|
92613
|
-
var bv =
|
|
90566
|
+
var validator = new Validate(values[key], _options);
|
|
90567
|
+
var bv = validator.type[type] || null;
|
|
92614
90568
|
if (!bv) {
|
|
92615
90569
|
if (rule.validator) {
|
|
92616
|
-
bv =
|
|
90570
|
+
bv = validator.custom.validate(rule.validator);
|
|
92617
90571
|
if (Object.prototype.toString.call(bv) === "[object Array]" && bv[0].then) {
|
|
92618
90572
|
promises.push({
|
|
92619
90573
|
function: bv[0],
|
|
@@ -92625,7 +90579,7 @@ Schema.prototype.validate = function validate2(values, callback) {
|
|
|
92625
90579
|
}
|
|
92626
90580
|
return;
|
|
92627
90581
|
} else {
|
|
92628
|
-
bv =
|
|
90582
|
+
bv = validator[type];
|
|
92629
90583
|
}
|
|
92630
90584
|
}
|
|
92631
90585
|
Object.keys(rule).forEach(function(r) {
|
|
@@ -101828,7 +99782,7 @@ function linearMap$2(val, domain, range, clamp2) {
|
|
|
101828
99782
|
}
|
|
101829
99783
|
return (val - d0) / subDomain * subRange + r0;
|
|
101830
99784
|
}
|
|
101831
|
-
function parsePercent(percent,
|
|
99785
|
+
function parsePercent(percent, all2) {
|
|
101832
99786
|
switch (percent) {
|
|
101833
99787
|
case "center":
|
|
101834
99788
|
case "middle":
|
|
@@ -101845,7 +99799,7 @@ function parsePercent(percent, all3) {
|
|
|
101845
99799
|
}
|
|
101846
99800
|
if (isString(percent)) {
|
|
101847
99801
|
if (_trim(percent).match(/%$/)) {
|
|
101848
|
-
return parseFloat(percent) / 100 *
|
|
99802
|
+
return parseFloat(percent) / 100 * all2;
|
|
101849
99803
|
}
|
|
101850
99804
|
return parseFloat(percent);
|
|
101851
99805
|
}
|
|
@@ -107748,12 +105702,12 @@ var OrientedBoundingRect = function() {
|
|
|
107748
105702
|
};
|
|
107749
105703
|
OrientedBoundingRect2.prototype._getProjMinMaxOnAxis = function(dim, corners, out2) {
|
|
107750
105704
|
var axis = this._axes[dim];
|
|
107751
|
-
var
|
|
107752
|
-
var proj = corners[0].dot(axis) +
|
|
105705
|
+
var origin = this._origin;
|
|
105706
|
+
var proj = corners[0].dot(axis) + origin[dim];
|
|
107753
105707
|
var min3 = proj;
|
|
107754
105708
|
var max3 = proj;
|
|
107755
105709
|
for (var i2 = 1; i2 < corners.length; i2++) {
|
|
107756
|
-
var proj_1 = corners[i2].dot(axis) +
|
|
105710
|
+
var proj_1 = corners[i2].dot(axis) + origin[dim];
|
|
107757
105711
|
min3 = Math.min(proj_1, min3);
|
|
107758
105712
|
max3 = Math.max(proj_1, max3);
|
|
107759
105713
|
}
|
|
@@ -109529,7 +107483,7 @@ var TPL_VAR_ALIAS = ["a", "b", "c", "d", "e", "f", "g"];
|
|
|
109529
107483
|
var wrapVar = function(varName, seriesIdx) {
|
|
109530
107484
|
return "{" + varName + (seriesIdx == null ? "" : seriesIdx) + "}";
|
|
109531
107485
|
};
|
|
109532
|
-
function formatTpl(tpl, paramsList,
|
|
107486
|
+
function formatTpl(tpl, paramsList, encode) {
|
|
109533
107487
|
if (!isArray$1(paramsList)) {
|
|
109534
107488
|
paramsList = [paramsList];
|
|
109535
107489
|
}
|
|
@@ -109545,12 +107499,12 @@ function formatTpl(tpl, paramsList, encode2) {
|
|
|
109545
107499
|
for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) {
|
|
109546
107500
|
for (var k2 = 0; k2 < $vars.length; k2++) {
|
|
109547
107501
|
var val = paramsList[seriesIdx][$vars[k2]];
|
|
109548
|
-
tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k2], seriesIdx),
|
|
107502
|
+
tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k2], seriesIdx), encode ? encodeHTML(val) : val);
|
|
109549
107503
|
}
|
|
109550
107504
|
}
|
|
109551
107505
|
return tpl;
|
|
109552
107506
|
}
|
|
109553
|
-
function formatTplSimple(tpl, param,
|
|
107507
|
+
function formatTplSimple(tpl, param, encode) {
|
|
109554
107508
|
each$f(param, function(value, key) {
|
|
109555
107509
|
tpl = tpl.replace("{" + key + "}", value);
|
|
109556
107510
|
});
|
|
@@ -110069,10 +108023,10 @@ function resetSourceDefaulter(ecModel) {
|
|
|
110069
108023
|
innerGlobalModel(ecModel).datasetMap = createHashMap();
|
|
110070
108024
|
}
|
|
110071
108025
|
function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {
|
|
110072
|
-
var
|
|
108026
|
+
var encode = {};
|
|
110073
108027
|
var datasetModel = querySeriesUpstreamDatasetModel(seriesModel);
|
|
110074
108028
|
if (!datasetModel || !coordDimensions) {
|
|
110075
|
-
return
|
|
108029
|
+
return encode;
|
|
110076
108030
|
}
|
|
110077
108031
|
var encodeItemName = [];
|
|
110078
108032
|
var encodeSeriesName = [];
|
|
@@ -110090,7 +108044,7 @@ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {
|
|
|
110090
108044
|
baseCategoryDimIndex = coordDimIdx;
|
|
110091
108045
|
categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo);
|
|
110092
108046
|
}
|
|
110093
|
-
|
|
108047
|
+
encode[coordDimInfo.name] = [];
|
|
110094
108048
|
});
|
|
110095
108049
|
var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {
|
|
110096
108050
|
categoryWayDim: categoryWayValueDimStart,
|
|
@@ -110101,15 +108055,15 @@ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {
|
|
|
110101
108055
|
var count2 = getDataDimCountOnCoordDim(coordDimInfo);
|
|
110102
108056
|
if (baseCategoryDimIndex == null) {
|
|
110103
108057
|
var start2 = datasetRecord.valueWayDim;
|
|
110104
|
-
pushDim(
|
|
108058
|
+
pushDim(encode[coordDimName], start2, count2);
|
|
110105
108059
|
pushDim(encodeSeriesName, start2, count2);
|
|
110106
108060
|
datasetRecord.valueWayDim += count2;
|
|
110107
108061
|
} else if (baseCategoryDimIndex === coordDimIdx) {
|
|
110108
|
-
pushDim(
|
|
108062
|
+
pushDim(encode[coordDimName], 0, count2);
|
|
110109
108063
|
pushDim(encodeItemName, 0, count2);
|
|
110110
108064
|
} else {
|
|
110111
108065
|
var start2 = datasetRecord.categoryWayDim;
|
|
110112
|
-
pushDim(
|
|
108066
|
+
pushDim(encode[coordDimName], start2, count2);
|
|
110113
108067
|
pushDim(encodeSeriesName, start2, count2);
|
|
110114
108068
|
datasetRecord.categoryWayDim += count2;
|
|
110115
108069
|
}
|
|
@@ -110123,15 +108077,15 @@ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {
|
|
|
110123
108077
|
var dimsDef = coordDimInfo.dimsDef;
|
|
110124
108078
|
return dimsDef ? dimsDef.length : 1;
|
|
110125
108079
|
}
|
|
110126
|
-
encodeItemName.length && (
|
|
110127
|
-
encodeSeriesName.length && (
|
|
110128
|
-
return
|
|
108080
|
+
encodeItemName.length && (encode.itemName = encodeItemName);
|
|
108081
|
+
encodeSeriesName.length && (encode.seriesName = encodeSeriesName);
|
|
108082
|
+
return encode;
|
|
110129
108083
|
}
|
|
110130
108084
|
function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {
|
|
110131
|
-
var
|
|
108085
|
+
var encode = {};
|
|
110132
108086
|
var datasetModel = querySeriesUpstreamDatasetModel(seriesModel);
|
|
110133
108087
|
if (!datasetModel) {
|
|
110134
|
-
return
|
|
108088
|
+
return encode;
|
|
110135
108089
|
}
|
|
110136
108090
|
var sourceFormat = source.sourceFormat;
|
|
110137
108091
|
var dimensionsDefine = source.dimensionsDefine;
|
|
@@ -110175,12 +108129,12 @@ function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {
|
|
|
110175
108129
|
return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null;
|
|
110176
108130
|
}();
|
|
110177
108131
|
if (idxResult) {
|
|
110178
|
-
|
|
108132
|
+
encode.value = [idxResult.v];
|
|
110179
108133
|
var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n;
|
|
110180
|
-
|
|
110181
|
-
|
|
108134
|
+
encode.itemName = [nameDimIndex];
|
|
108135
|
+
encode.seriesName = [nameDimIndex];
|
|
110182
108136
|
}
|
|
110183
|
-
return
|
|
108137
|
+
return encode;
|
|
110184
108138
|
}
|
|
110185
108139
|
function querySeriesUpstreamDatasetModel(seriesModel) {
|
|
110186
108140
|
var thisData = seriesModel.get("data", true);
|
|
@@ -112209,7 +110163,7 @@ var DataFormatMixin = (
|
|
|
112209
110163
|
return formatter(params);
|
|
112210
110164
|
} else if (isString(formatter)) {
|
|
112211
110165
|
var str2 = formatTpl(formatter, params);
|
|
112212
|
-
return str2.replace(DIMENSION_LABEL_REG, function(
|
|
110166
|
+
return str2.replace(DIMENSION_LABEL_REG, function(origin, dimStr) {
|
|
112213
110167
|
var len2 = dimStr.length;
|
|
112214
110168
|
var dimLoose = dimStr;
|
|
112215
110169
|
if (dimLoose.charAt(0) === "[" && dimLoose.charAt(len2 - 1) === "]") {
|
|
@@ -112865,9 +110819,9 @@ function cloneChunk(originalChunk) {
|
|
|
112865
110819
|
var Ctor = originalChunk.constructor;
|
|
112866
110820
|
return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);
|
|
112867
110821
|
}
|
|
112868
|
-
function prepareStore(store, dimIdx, dimType, end2,
|
|
110822
|
+
function prepareStore(store, dimIdx, dimType, end2, append) {
|
|
112869
110823
|
var DataCtor = dataCtors[dimType || "float"];
|
|
112870
|
-
if (
|
|
110824
|
+
if (append) {
|
|
112871
110825
|
var oldStore = store[dimIdx];
|
|
112872
110826
|
var oldLen = oldStore && oldStore.length;
|
|
112873
110827
|
if (!(oldLen === end2)) {
|
|
@@ -113019,7 +110973,7 @@ var DataStore = (
|
|
|
113019
110973
|
end: end2
|
|
113020
110974
|
};
|
|
113021
110975
|
};
|
|
113022
|
-
DataStore2.prototype._initDataFromProvider = function(start2, end2,
|
|
110976
|
+
DataStore2.prototype._initDataFromProvider = function(start2, end2, append) {
|
|
113023
110977
|
var provider = this._provider;
|
|
113024
110978
|
var chunks = this._chunks;
|
|
113025
110979
|
var dimensions = this._dimensions;
|
|
@@ -113033,7 +110987,7 @@ var DataStore = (
|
|
|
113033
110987
|
if (!rawExtent[i2]) {
|
|
113034
110988
|
rawExtent[i2] = getInitialExtent();
|
|
113035
110989
|
}
|
|
113036
|
-
prepareStore(chunks, i2, dim.type, end2,
|
|
110990
|
+
prepareStore(chunks, i2, dim.type, end2, append);
|
|
113037
110991
|
}
|
|
113038
110992
|
if (provider.fillStorage) {
|
|
113039
110993
|
provider.fillStorage(start2, end2, chunks, rawExtent);
|
|
@@ -114332,9 +112286,9 @@ var SeriesModel = (
|
|
|
114332
112286
|
inner$k(this).data = data;
|
|
114333
112287
|
};
|
|
114334
112288
|
SeriesModel2.prototype.getEncode = function() {
|
|
114335
|
-
var
|
|
114336
|
-
if (
|
|
114337
|
-
return createHashMap(
|
|
112289
|
+
var encode = this.get("encode", true);
|
|
112290
|
+
if (encode) {
|
|
112291
|
+
return createHashMap(encode);
|
|
114338
112292
|
}
|
|
114339
112293
|
};
|
|
114340
112294
|
SeriesModel2.prototype.getSourceManager = function() {
|
|
@@ -119060,8 +117014,8 @@ var DataDiffer = (
|
|
|
119060
117014
|
var DimensionUserOuput = (
|
|
119061
117015
|
/** @class */
|
|
119062
117016
|
function() {
|
|
119063
|
-
function DimensionUserOuput2(
|
|
119064
|
-
this._encode =
|
|
117017
|
+
function DimensionUserOuput2(encode, dimRequest) {
|
|
117018
|
+
this._encode = encode;
|
|
119065
117019
|
this._schema = dimRequest;
|
|
119066
117020
|
}
|
|
119067
117021
|
DimensionUserOuput2.prototype.get = function() {
|
|
@@ -119082,7 +117036,7 @@ var DimensionUserOuput = (
|
|
|
119082
117036
|
);
|
|
119083
117037
|
function summarizeDimensions(data, schema) {
|
|
119084
117038
|
var summary = {};
|
|
119085
|
-
var
|
|
117039
|
+
var encode = summary.encode = {};
|
|
119086
117040
|
var notExtraCoordDimMap = createHashMap();
|
|
119087
117041
|
var defaultedLabel = [];
|
|
119088
117042
|
var defaultedTooltip = [];
|
|
@@ -119095,7 +117049,7 @@ function summarizeDimensions(data, schema) {
|
|
|
119095
117049
|
assert(VISUAL_DIMENSIONS.get(coordDim) == null);
|
|
119096
117050
|
}
|
|
119097
117051
|
var coordDimIndex = dimItem.coordDimIndex;
|
|
119098
|
-
getOrCreateEncodeArr(
|
|
117052
|
+
getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;
|
|
119099
117053
|
if (!dimItem.isExtraCoord) {
|
|
119100
117054
|
notExtraCoordDimMap.set(coordDim, 1);
|
|
119101
117055
|
if (mayLabelDimType(dimItem.type)) {
|
|
@@ -119108,7 +117062,7 @@ function summarizeDimensions(data, schema) {
|
|
|
119108
117062
|
}
|
|
119109
117063
|
}
|
|
119110
117064
|
VISUAL_DIMENSIONS.each(function(v, otherDim) {
|
|
119111
|
-
var encodeArr = getOrCreateEncodeArr(
|
|
117065
|
+
var encodeArr = getOrCreateEncodeArr(encode, otherDim);
|
|
119112
117066
|
var dimIndex = dimItem.otherDims[otherDim];
|
|
119113
117067
|
if (dimIndex != null && dimIndex !== false) {
|
|
119114
117068
|
encodeArr[dimIndex] = dimItem.name;
|
|
@@ -119118,7 +117072,7 @@ function summarizeDimensions(data, schema) {
|
|
|
119118
117072
|
var dataDimsOnCoord = [];
|
|
119119
117073
|
var encodeFirstDimNotExtra = {};
|
|
119120
117074
|
notExtraCoordDimMap.each(function(v, coordDim) {
|
|
119121
|
-
var dimArr =
|
|
117075
|
+
var dimArr = encode[coordDim];
|
|
119122
117076
|
encodeFirstDimNotExtra[coordDim] = dimArr[0];
|
|
119123
117077
|
dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);
|
|
119124
117078
|
});
|
|
@@ -119127,26 +117081,26 @@ function summarizeDimensions(data, schema) {
|
|
|
119127
117081
|
return data.getDimensionInfo(dimName).storeDimIndex;
|
|
119128
117082
|
});
|
|
119129
117083
|
summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;
|
|
119130
|
-
var encodeLabel =
|
|
117084
|
+
var encodeLabel = encode.label;
|
|
119131
117085
|
if (encodeLabel && encodeLabel.length) {
|
|
119132
117086
|
defaultedLabel = encodeLabel.slice();
|
|
119133
117087
|
}
|
|
119134
|
-
var encodeTooltip =
|
|
117088
|
+
var encodeTooltip = encode.tooltip;
|
|
119135
117089
|
if (encodeTooltip && encodeTooltip.length) {
|
|
119136
117090
|
defaultedTooltip = encodeTooltip.slice();
|
|
119137
117091
|
} else if (!defaultedTooltip.length) {
|
|
119138
117092
|
defaultedTooltip = defaultedLabel.slice();
|
|
119139
117093
|
}
|
|
119140
|
-
|
|
119141
|
-
|
|
117094
|
+
encode.defaultedLabel = defaultedLabel;
|
|
117095
|
+
encode.defaultedTooltip = defaultedTooltip;
|
|
119142
117096
|
summary.userOutput = new DimensionUserOuput(userOutputEncode, schema);
|
|
119143
117097
|
return summary;
|
|
119144
117098
|
}
|
|
119145
|
-
function getOrCreateEncodeArr(
|
|
119146
|
-
if (!
|
|
119147
|
-
|
|
117099
|
+
function getOrCreateEncodeArr(encode, dim) {
|
|
117100
|
+
if (!encode.hasOwnProperty(dim)) {
|
|
117101
|
+
encode[dim] = [];
|
|
119148
117102
|
}
|
|
119149
|
-
return
|
|
117103
|
+
return encode[dim];
|
|
119150
117104
|
}
|
|
119151
117105
|
function getDimensionTypeByAxis(axisType) {
|
|
119152
117106
|
return axisType === "category" ? "ordinal" : axisType === "time" ? "time" : "float";
|
|
@@ -158040,15 +155994,15 @@ function assembleTransition(duration, onlyFade) {
|
|
|
158040
155994
|
}
|
|
158041
155995
|
return CSS_TRANSITION_VENDOR + ":" + transitionText;
|
|
158042
155996
|
}
|
|
158043
|
-
function assembleTransform(x, y,
|
|
155997
|
+
function assembleTransform(x, y, toString2) {
|
|
158044
155998
|
var x0 = x.toFixed(0) + "px";
|
|
158045
155999
|
var y0 = y.toFixed(0) + "px";
|
|
158046
156000
|
if (!env.transformSupported) {
|
|
158047
|
-
return
|
|
156001
|
+
return toString2 ? "top:" + y0 + ";left:" + x0 + ";" : [["top", y0], ["left", x0]];
|
|
158048
156002
|
}
|
|
158049
156003
|
var is3d = env.transform3dSupported;
|
|
158050
156004
|
var translate2 = "translate" + (is3d ? "3d" : "") + "(" + x0 + "," + y0 + (is3d ? ",0" : "") + ")";
|
|
158051
|
-
return
|
|
156005
|
+
return toString2 ? "top:0;left:0;" + CSS_TRANSFORM_VENDOR + ":" + translate2 + ";" : [["top", 0], ["left", 0], [TRANSFORM_VENDOR, translate2]];
|
|
158052
156006
|
}
|
|
158053
156007
|
function assembleFont(textStyleModel) {
|
|
158054
156008
|
var cssText = [];
|