@npmxiaowu/h-ui-plus
Version:
Vue3 中基于Element-plus二次封装基础组件文档
1,674 lines • 2.04 MB
JavaScript
import N8, { getCurrentInstance as Zr, inject as Vr, ref as U, computed as Ce, unref as K, getCurrentScope as B8, onScopeDispose as V1, onMounted as en, nextTick as Cn, readonly as j1, shallowRef as bl, watchEffect as H1, watch as xt, isRef as rr, warn as F8, provide as Uf, defineComponent as R, openBlock as E, createElementBlock as k, mergeProps as Be, renderSlot as ke, createElementVNode as M, toRef as yu, onUnmounted as z8, useAttrs as yi, useSlots as _r, normalizeClass as tt, normalizeStyle as Zn, createCommentVNode as fe, Fragment as He, createBlock as ae, withCtx as B, resolveDynamicComponent as Qt, withModifiers as cr, createVNode as V, toDisplayString as be, onBeforeUnmount as es, Transition as lc, withDirectives as jr, createTextVNode as xe, vShow as ui, Text as R8, reactive as bi, h as $8, shallowReactive as V8, isVNode as od, render as bu, markRaw as Uh, toRefs as j8, resolveComponent as J, withKeys as ll, onActivated as H8, normalizeProps as Qn, guardReactiveProps as Dr, renderList as Ze, createSlots as Zt, toHandlers as Eo, onUpdated as U1, resolveDirective as Gf } from "vue";
function Y0(r, e = 500, t, n) {
let o = null, i = !1;
const s = function(...a) {
return new Promise((l, c) => {
if (o && clearTimeout(o), t && !i) {
try {
const u = r.apply(this, a);
n && n(u), l(u);
} catch (u) {
c(u);
}
i = !0;
} else
o = setTimeout(() => {
try {
const u = r.apply(this, a);
n && n(u), l(u);
} catch (u) {
c(u);
}
i = !1, o = null;
}, e);
});
};
return s.cancel = function() {
o && clearTimeout(o), i = !1, o = null;
}, s;
}
function nQ(r, e, t = { leading: !1, trailing: !0 }) {
let n = null, o = 0;
const { leading: i, trailing: s } = t, a = function(...l) {
const c = Date.now();
!o && !i && (o = c);
const u = e - (c - o);
u <= 0 && (n && (clearTimeout(n), n = null), o = c, r.apply(this, l)), s && !n && (n = setTimeout(() => {
o = i ? Date.now() : 0, n = null, r.apply(this, l);
}, u));
};
return a.cancel = function() {
n && clearTimeout(n), n = null, o = 0;
}, a;
}
function U8(r) {
return r.replace(/([A-Z])/g, "_$1").toLowerCase();
}
function rQ(r, e = 2, t = ",", n = ".", o = "", i = "") {
if (Number(r) === 0)
return Number(r).toFixed(e);
if (!r)
return "";
r = Number(r).toFixed(e), r += "";
const s = r.split(".");
let a = s[0];
const l = s.length > 1 ? n + s[1] : "", c = /(\d+)(\d{3})/;
function u(d) {
return Object.prototype.toString.call(d) === "[object Number]";
}
if (t && !u(t))
for (; c.test(a); )
a = a.replace(c, "$1" + t + "$2");
return o + a + l + i;
}
function G8() {
const r = (e) => {
const t = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
return Array.from(
{ length: e },
() => t.charAt(Math.floor(Math.random() * t.length))
).join("");
};
return [
r(8),
r(4),
r(4),
r(4),
r(12)
].join("-");
}
function G1(r, e) {
return function() {
return r.apply(e, arguments);
};
}
const { toString: W8 } = Object.prototype, { getPrototypeOf: Wf } = Object, id = ((r) => (e) => {
const t = W8.call(e);
return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), Io = (r) => (r = r.toLowerCase(), (e) => id(e) === r), sd = (r) => (e) => typeof e === r, { isArray: Va } = Array, Rl = sd("undefined");
function Y8(r) {
return r !== null && !Rl(r) && r.constructor !== null && !Rl(r.constructor) && Jr(r.constructor.isBuffer) && r.constructor.isBuffer(r);
}
const W1 = Io("ArrayBuffer");
function X8(r) {
let e;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(r) : e = r && r.buffer && W1(r.buffer), e;
}
const K8 = sd("string"), Jr = sd("function"), Y1 = sd("number"), ad = (r) => r !== null && typeof r == "object", q8 = (r) => r === !0 || r === !1, eu = (r) => {
if (id(r) !== "object")
return !1;
const e = Wf(r);
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
}, J8 = Io("Date"), Z8 = Io("File"), Q8 = Io("Blob"), ey = Io("FileList"), ty = (r) => ad(r) && Jr(r.pipe), ny = (r) => {
let e;
return r && (typeof FormData == "function" && r instanceof FormData || Jr(r.append) && ((e = id(r)) === "formdata" || e === "object" && Jr(r.toString) && r.toString() === "[object FormData]"));
}, ry = Io("URLSearchParams"), [oy, iy, sy, ay] = ["ReadableStream", "Request", "Response", "Headers"].map(Io), ly = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function cc(r, e, { allOwnKeys: t = !1 } = {}) {
if (r === null || typeof r > "u")
return;
let n, o;
if (typeof r != "object" && (r = [r]), Va(r))
for (n = 0, o = r.length; n < o; n++)
e.call(null, r[n], n, r);
else {
const i = t ? Object.getOwnPropertyNames(r) : Object.keys(r), s = i.length;
let a;
for (n = 0; n < s; n++)
a = i[n], e.call(null, r[a], a, r);
}
}
function X1(r, e) {
e = e.toLowerCase();
const t = Object.keys(r);
let n = t.length, o;
for (; n-- > 0; )
if (o = t[n], e === o.toLowerCase())
return o;
return null;
}
const Cs = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), K1 = (r) => !Rl(r) && r !== Cs;
function Gh() {
const { caseless: r } = K1(this) && this || {}, e = {}, t = (n, o) => {
const i = r && X1(e, o) || o;
eu(e[i]) && eu(n) ? e[i] = Gh(e[i], n) : eu(n) ? e[i] = Gh({}, n) : Va(n) ? e[i] = n.slice() : e[i] = n;
};
for (let n = 0, o = arguments.length; n < o; n++)
arguments[n] && cc(arguments[n], t);
return e;
}
const cy = (r, e, t, { allOwnKeys: n } = {}) => (cc(e, (o, i) => {
t && Jr(o) ? r[i] = G1(o, t) : r[i] = o;
}, { allOwnKeys: n }), r), uy = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), dy = (r, e, t, n) => {
r.prototype = Object.create(e.prototype, n), r.prototype.constructor = r, Object.defineProperty(r, "super", {
value: e.prototype
}), t && Object.assign(r.prototype, t);
}, hy = (r, e, t, n) => {
let o, i, s;
const a = {};
if (e = e || {}, r == null)
return e;
do {
for (o = Object.getOwnPropertyNames(r), i = o.length; i-- > 0; )
s = o[i], (!n || n(s, r, e)) && !a[s] && (e[s] = r[s], a[s] = !0);
r = t !== !1 && Wf(r);
} while (r && (!t || t(r, e)) && r !== Object.prototype);
return e;
}, fy = (r, e, t) => {
r = String(r), (t === void 0 || t > r.length) && (t = r.length), t -= e.length;
const n = r.indexOf(e, t);
return n !== -1 && n === t;
}, py = (r) => {
if (!r)
return null;
if (Va(r))
return r;
let e = r.length;
if (!Y1(e))
return null;
const t = new Array(e);
for (; e-- > 0; )
t[e] = r[e];
return t;
}, gy = ((r) => (e) => r && e instanceof r)(typeof Uint8Array < "u" && Wf(Uint8Array)), my = (r, e) => {
const n = (r && r[Symbol.iterator]).call(r);
let o;
for (; (o = n.next()) && !o.done; ) {
const i = o.value;
e.call(r, i[0], i[1]);
}
}, vy = (r, e) => {
let t;
const n = [];
for (; (t = r.exec(e)) !== null; )
n.push(t);
return n;
}, yy = Io("HTMLFormElement"), by = (r) => r.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(t, n, o) {
return n.toUpperCase() + o;
}
), X0 = (({ hasOwnProperty: r }) => (e, t) => r.call(e, t))(Object.prototype), wy = Io("RegExp"), q1 = (r, e) => {
const t = Object.getOwnPropertyDescriptors(r), n = {};
cc(t, (o, i) => {
let s;
(s = e(o, i, r)) !== !1 && (n[i] = s || o);
}), Object.defineProperties(r, n);
}, Cy = (r) => {
q1(r, (e, t) => {
if (Jr(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
return !1;
const n = r[t];
if (!!Jr(n)) {
if (e.enumerable = !1, "writable" in e) {
e.writable = !1;
return;
}
e.set || (e.set = () => {
throw Error("Can not rewrite read-only method '" + t + "'");
});
}
});
}, xy = (r, e) => {
const t = {}, n = (o) => {
o.forEach((i) => {
t[i] = !0;
});
};
return Va(r) ? n(r) : n(String(r).split(e)), t;
}, _y = () => {
}, Sy = (r, e) => r != null && Number.isFinite(r = +r) ? r : e, oh = "abcdefghijklmnopqrstuvwxyz", K0 = "0123456789", J1 = {
DIGIT: K0,
ALPHA: oh,
ALPHA_DIGIT: oh + oh.toUpperCase() + K0
}, Ay = (r = 16, e = J1.ALPHA_DIGIT) => {
let t = "";
const { length: n } = e;
for (; r--; )
t += e[Math.random() * n | 0];
return t;
};
function Ey(r) {
return !!(r && Jr(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
}
const My = (r) => {
const e = new Array(10), t = (n, o) => {
if (ad(n)) {
if (e.indexOf(n) >= 0)
return;
if (!("toJSON" in n)) {
e[o] = n;
const i = Va(n) ? [] : {};
return cc(n, (s, a) => {
const l = t(s, o + 1);
!Rl(l) && (i[a] = l);
}), e[o] = void 0, i;
}
}
return n;
};
return t(r, 0);
}, Ty = Io("AsyncFunction"), Oy = (r) => r && (ad(r) || Jr(r)) && Jr(r.then) && Jr(r.catch), Z1 = ((r, e) => r ? setImmediate : e ? ((t, n) => (Cs.addEventListener("message", ({ source: o, data: i }) => {
o === Cs && i === t && n.length && n.shift()();
}, !1), (o) => {
n.push(o), Cs.postMessage(t, "*");
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
typeof setImmediate == "function",
Jr(Cs.postMessage)
), Dy = typeof queueMicrotask < "u" ? queueMicrotask.bind(Cs) : typeof process < "u" && process.nextTick || Z1, Se = {
isArray: Va,
isArrayBuffer: W1,
isBuffer: Y8,
isFormData: ny,
isArrayBufferView: X8,
isString: K8,
isNumber: Y1,
isBoolean: q8,
isObject: ad,
isPlainObject: eu,
isReadableStream: oy,
isRequest: iy,
isResponse: sy,
isHeaders: ay,
isUndefined: Rl,
isDate: J8,
isFile: Z8,
isBlob: Q8,
isRegExp: wy,
isFunction: Jr,
isStream: ty,
isURLSearchParams: ry,
isTypedArray: gy,
isFileList: ey,
forEach: cc,
merge: Gh,
extend: cy,
trim: ly,
stripBOM: uy,
inherits: dy,
toFlatObject: hy,
kindOf: id,
kindOfTest: Io,
endsWith: fy,
toArray: py,
forEachEntry: my,
matchAll: vy,
isHTMLForm: yy,
hasOwnProperty: X0,
hasOwnProp: X0,
reduceDescriptors: q1,
freezeMethods: Cy,
toObjectSet: xy,
toCamelCase: by,
noop: _y,
toFiniteNumber: Sy,
findKey: X1,
global: Cs,
isContextDefined: K1,
ALPHABET: J1,
generateString: Ay,
isSpecCompliantForm: Ey,
toJSONObject: My,
isAsyncFn: Ty,
isThenable: Oy,
setImmediate: Z1,
asap: Dy
};
function Et(r, e, t, n, o) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", e && (this.code = e), t && (this.config = t), n && (this.request = n), o && (this.response = o, this.status = o.status ? o.status : null);
}
Se.inherits(Et, Error, {
toJSON: function() {
return {
message: this.message,
name: this.name,
description: this.description,
number: this.number,
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
config: Se.toJSONObject(this.config),
code: this.code,
status: this.status
};
}
});
const Q1 = Et.prototype, em = {};
[
"ERR_BAD_OPTION_VALUE",
"ERR_BAD_OPTION",
"ECONNABORTED",
"ETIMEDOUT",
"ERR_NETWORK",
"ERR_FR_TOO_MANY_REDIRECTS",
"ERR_DEPRECATED",
"ERR_BAD_RESPONSE",
"ERR_BAD_REQUEST",
"ERR_CANCELED",
"ERR_NOT_SUPPORT",
"ERR_INVALID_URL"
].forEach((r) => {
em[r] = { value: r };
});
Object.defineProperties(Et, em);
Object.defineProperty(Q1, "isAxiosError", { value: !0 });
Et.from = (r, e, t, n, o, i) => {
const s = Object.create(Q1);
return Se.toFlatObject(r, s, function(l) {
return l !== Error.prototype;
}, (a) => a !== "isAxiosError"), Et.call(s, r.message, e, t, n, o), s.cause = r, s.name = r.name, i && Object.assign(s, i), s;
};
const Py = null;
function Wh(r) {
return Se.isPlainObject(r) || Se.isArray(r);
}
function tm(r) {
return Se.endsWith(r, "[]") ? r.slice(0, -2) : r;
}
function q0(r, e, t) {
return r ? r.concat(e).map(function(o, i) {
return o = tm(o), !t && i ? "[" + o + "]" : o;
}).join(t ? "." : "") : e;
}
function ky(r) {
return Se.isArray(r) && !r.some(Wh);
}
const Iy = Se.toFlatObject(Se, {}, null, function(e) {
return /^is[A-Z]/.test(e);
});
function ld(r, e, t) {
if (!Se.isObject(r))
throw new TypeError("target must be an object");
e = e || new FormData(), t = Se.toFlatObject(t, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(v, y) {
return !Se.isUndefined(y[v]);
});
const n = t.metaTokens, o = t.visitor || u, i = t.dots, s = t.indexes, l = (t.Blob || typeof Blob < "u" && Blob) && Se.isSpecCompliantForm(e);
if (!Se.isFunction(o))
throw new TypeError("visitor must be a function");
function c(f) {
if (f === null)
return "";
if (Se.isDate(f))
return f.toISOString();
if (!l && Se.isBlob(f))
throw new Et("Blob is not supported. Use a Buffer instead.");
return Se.isArrayBuffer(f) || Se.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
}
function u(f, v, y) {
let b = f;
if (f && !y && typeof f == "object") {
if (Se.endsWith(v, "{}"))
v = n ? v : v.slice(0, -2), f = JSON.stringify(f);
else if (Se.isArray(f) && ky(f) || (Se.isFileList(f) || Se.endsWith(v, "[]")) && (b = Se.toArray(f)))
return v = tm(v), b.forEach(function(C, _) {
!(Se.isUndefined(C) || C === null) && e.append(
s === !0 ? q0([v], _, i) : s === null ? v : v + "[]",
c(C)
);
}), !1;
}
return Wh(f) ? !0 : (e.append(q0(y, v, i), c(f)), !1);
}
const d = [], h = Object.assign(Iy, {
defaultVisitor: u,
convertValue: c,
isVisitable: Wh
});
function p(f, v) {
if (!Se.isUndefined(f)) {
if (d.indexOf(f) !== -1)
throw Error("Circular reference detected in " + v.join("."));
d.push(f), Se.forEach(f, function(b, x) {
(!(Se.isUndefined(b) || b === null) && o.call(
e,
b,
Se.isString(x) ? x.trim() : x,
v,
h
)) === !0 && p(b, v ? v.concat(x) : [x]);
}), d.pop();
}
}
if (!Se.isObject(r))
throw new TypeError("data must be an object");
return p(r), e;
}
function J0(r) {
const e = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(n) {
return e[n];
});
}
function Yf(r, e) {
this._pairs = [], r && ld(r, this, e);
}
const nm = Yf.prototype;
nm.append = function(e, t) {
this._pairs.push([e, t]);
};
nm.toString = function(e) {
const t = e ? function(n) {
return e.call(this, n, J0);
} : J0;
return this._pairs.map(function(o) {
return t(o[0]) + "=" + t(o[1]);
}, "").join("&");
};
function Ly(r) {
return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function rm(r, e, t) {
if (!e)
return r;
const n = t && t.encode || Ly;
Se.isFunction(t) && (t = {
serialize: t
});
const o = t && t.serialize;
let i;
if (o ? i = o(e, t) : i = Se.isURLSearchParams(e) ? e.toString() : new Yf(e, t).toString(n), i) {
const s = r.indexOf("#");
s !== -1 && (r = r.slice(0, s)), r += (r.indexOf("?") === -1 ? "?" : "&") + i;
}
return r;
}
class Ny {
constructor() {
this.handlers = [];
}
use(e, t, n) {
return this.handlers.push({
fulfilled: e,
rejected: t,
synchronous: n ? n.synchronous : !1,
runWhen: n ? n.runWhen : null
}), this.handlers.length - 1;
}
eject(e) {
this.handlers[e] && (this.handlers[e] = null);
}
clear() {
this.handlers && (this.handlers = []);
}
forEach(e) {
Se.forEach(this.handlers, function(n) {
n !== null && e(n);
});
}
}
const Z0 = Ny, om = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, By = typeof URLSearchParams < "u" ? URLSearchParams : Yf, Fy = typeof FormData < "u" ? FormData : null, zy = typeof Blob < "u" ? Blob : null, Ry = {
isBrowser: !0,
classes: {
URLSearchParams: By,
FormData: Fy,
Blob: zy
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, Xf = typeof window < "u" && typeof document < "u", Yh = typeof navigator == "object" && navigator || void 0, $y = Xf && (!Yh || ["ReactNative", "NativeScript", "NS"].indexOf(Yh.product) < 0), Vy = (() => typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), jy = Xf && window.location.href || "http://localhost", Hy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: Xf,
hasStandardBrowserWebWorkerEnv: Vy,
hasStandardBrowserEnv: $y,
navigator: Yh,
origin: jy
}, Symbol.toStringTag, { value: "Module" })), vr = {
...Hy,
...Ry
};
function Uy(r, e) {
return ld(r, new vr.classes.URLSearchParams(), Object.assign({
visitor: function(t, n, o, i) {
return vr.isNode && Se.isBuffer(t) ? (this.append(n, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
}
}, e));
}
function Gy(r) {
return Se.matchAll(/\w+|\[(\w*)]/g, r).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
}
function Wy(r) {
const e = {}, t = Object.keys(r);
let n;
const o = t.length;
let i;
for (n = 0; n < o; n++)
i = t[n], e[i] = r[i];
return e;
}
function im(r) {
function e(t, n, o, i) {
let s = t[i++];
if (s === "__proto__")
return !0;
const a = Number.isFinite(+s), l = i >= t.length;
return s = !s && Se.isArray(o) ? o.length : s, l ? (Se.hasOwnProp(o, s) ? o[s] = [o[s], n] : o[s] = n, !a) : ((!o[s] || !Se.isObject(o[s])) && (o[s] = []), e(t, n, o[s], i) && Se.isArray(o[s]) && (o[s] = Wy(o[s])), !a);
}
if (Se.isFormData(r) && Se.isFunction(r.entries)) {
const t = {};
return Se.forEachEntry(r, (n, o) => {
e(Gy(n), o, t, 0);
}), t;
}
return null;
}
function Yy(r, e, t) {
if (Se.isString(r))
try {
return (e || JSON.parse)(r), Se.trim(r);
} catch (n) {
if (n.name !== "SyntaxError")
throw n;
}
return (t || JSON.stringify)(r);
}
const Kf = {
transitional: om,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(e, t) {
const n = t.getContentType() || "", o = n.indexOf("application/json") > -1, i = Se.isObject(e);
if (i && Se.isHTMLForm(e) && (e = new FormData(e)), Se.isFormData(e))
return o ? JSON.stringify(im(e)) : e;
if (Se.isArrayBuffer(e) || Se.isBuffer(e) || Se.isStream(e) || Se.isFile(e) || Se.isBlob(e) || Se.isReadableStream(e))
return e;
if (Se.isArrayBufferView(e))
return e.buffer;
if (Se.isURLSearchParams(e))
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
let a;
if (i) {
if (n.indexOf("application/x-www-form-urlencoded") > -1)
return Uy(e, this.formSerializer).toString();
if ((a = Se.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
const l = this.env && this.env.FormData;
return ld(
a ? { "files[]": e } : e,
l && new l(),
this.formSerializer
);
}
}
return i || o ? (t.setContentType("application/json", !1), Yy(e)) : e;
}],
transformResponse: [function(e) {
const t = this.transitional || Kf.transitional, n = t && t.forcedJSONParsing, o = this.responseType === "json";
if (Se.isResponse(e) || Se.isReadableStream(e))
return e;
if (e && Se.isString(e) && (n && !this.responseType || o)) {
const s = !(t && t.silentJSONParsing) && o;
try {
return JSON.parse(e);
} catch (a) {
if (s)
throw a.name === "SyntaxError" ? Et.from(a, Et.ERR_BAD_RESPONSE, this, null, this.response) : a;
}
}
return e;
}],
timeout: 0,
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: vr.classes.FormData,
Blob: vr.classes.Blob
},
validateStatus: function(e) {
return e >= 200 && e < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
Se.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
Kf.headers[r] = {};
});
const qf = Kf, Xy = Se.toObjectSet([
"age",
"authorization",
"content-length",
"content-type",
"etag",
"expires",
"from",
"host",
"if-modified-since",
"if-unmodified-since",
"last-modified",
"location",
"max-forwards",
"proxy-authorization",
"referer",
"retry-after",
"user-agent"
]), Ky = (r) => {
const e = {};
let t, n, o;
return r && r.split(`
`).forEach(function(s) {
o = s.indexOf(":"), t = s.substring(0, o).trim().toLowerCase(), n = s.substring(o + 1).trim(), !(!t || e[t] && Xy[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
}), e;
}, Q0 = Symbol("internals");
function rl(r) {
return r && String(r).trim().toLowerCase();
}
function tu(r) {
return r === !1 || r == null ? r : Se.isArray(r) ? r.map(tu) : String(r);
}
function qy(r) {
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let n;
for (; n = t.exec(r); )
e[n[1]] = n[2];
return e;
}
const Jy = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
function ih(r, e, t, n, o) {
if (Se.isFunction(n))
return n.call(this, e, t);
if (o && (e = t), !!Se.isString(e)) {
if (Se.isString(n))
return e.indexOf(n) !== -1;
if (Se.isRegExp(n))
return n.test(e);
}
}
function Zy(r) {
return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
}
function Qy(r, e) {
const t = Se.toCamelCase(" " + e);
["get", "set", "has"].forEach((n) => {
Object.defineProperty(r, n + t, {
value: function(o, i, s) {
return this[n].call(this, e, o, i, s);
},
configurable: !0
});
});
}
class cd {
constructor(e) {
e && this.set(e);
}
set(e, t, n) {
const o = this;
function i(a, l, c) {
const u = rl(l);
if (!u)
throw new Error("header name must be a non-empty string");
const d = Se.findKey(o, u);
(!d || o[d] === void 0 || c === !0 || c === void 0 && o[d] !== !1) && (o[d || l] = tu(a));
}
const s = (a, l) => Se.forEach(a, (c, u) => i(c, u, l));
if (Se.isPlainObject(e) || e instanceof this.constructor)
s(e, t);
else if (Se.isString(e) && (e = e.trim()) && !Jy(e))
s(Ky(e), t);
else if (Se.isHeaders(e))
for (const [a, l] of e.entries())
i(l, a, n);
else
e != null && i(t, e, n);
return this;
}
get(e, t) {
if (e = rl(e), e) {
const n = Se.findKey(this, e);
if (n) {
const o = this[n];
if (!t)
return o;
if (t === !0)
return qy(o);
if (Se.isFunction(t))
return t.call(this, o, n);
if (Se.isRegExp(t))
return t.exec(o);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(e, t) {
if (e = rl(e), e) {
const n = Se.findKey(this, e);
return !!(n && this[n] !== void 0 && (!t || ih(this, this[n], n, t)));
}
return !1;
}
delete(e, t) {
const n = this;
let o = !1;
function i(s) {
if (s = rl(s), s) {
const a = Se.findKey(n, s);
a && (!t || ih(n, n[a], a, t)) && (delete n[a], o = !0);
}
}
return Se.isArray(e) ? e.forEach(i) : i(e), o;
}
clear(e) {
const t = Object.keys(this);
let n = t.length, o = !1;
for (; n--; ) {
const i = t[n];
(!e || ih(this, this[i], i, e, !0)) && (delete this[i], o = !0);
}
return o;
}
normalize(e) {
const t = this, n = {};
return Se.forEach(this, (o, i) => {
const s = Se.findKey(n, i);
if (s) {
t[s] = tu(o), delete t[i];
return;
}
const a = e ? Zy(i) : String(i).trim();
a !== i && delete t[i], t[a] = tu(o), n[a] = !0;
}), this;
}
concat(...e) {
return this.constructor.concat(this, ...e);
}
toJSON(e) {
const t = /* @__PURE__ */ Object.create(null);
return Se.forEach(this, (n, o) => {
n != null && n !== !1 && (t[o] = e && Se.isArray(n) ? n.join(", ") : n);
}), t;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([e, t]) => e + ": " + t).join(`
`);
}
get [Symbol.toStringTag]() {
return "AxiosHeaders";
}
static from(e) {
return e instanceof this ? e : new this(e);
}
static concat(e, ...t) {
const n = new this(e);
return t.forEach((o) => n.set(o)), n;
}
static accessor(e) {
const n = (this[Q0] = this[Q0] = {
accessors: {}
}).accessors, o = this.prototype;
function i(s) {
const a = rl(s);
n[a] || (Qy(o, s), n[a] = !0);
}
return Se.isArray(e) ? e.forEach(i) : i(e), this;
}
}
cd.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
Se.reduceDescriptors(cd.prototype, ({ value: r }, e) => {
let t = e[0].toUpperCase() + e.slice(1);
return {
get: () => r,
set(n) {
this[t] = n;
}
};
});
Se.freezeMethods(cd);
const Mo = cd;
function sh(r, e) {
const t = this || qf, n = e || t, o = Mo.from(n.headers);
let i = n.data;
return Se.forEach(r, function(a) {
i = a.call(t, i, o.normalize(), e ? e.status : void 0);
}), o.normalize(), i;
}
function sm(r) {
return !!(r && r.__CANCEL__);
}
function ja(r, e, t) {
Et.call(this, r == null ? "canceled" : r, Et.ERR_CANCELED, e, t), this.name = "CanceledError";
}
Se.inherits(ja, Et, {
__CANCEL__: !0
});
function am(r, e, t) {
const n = t.config.validateStatus;
!t.status || !n || n(t.status) ? r(t) : e(new Et(
"Request failed with status code " + t.status,
[Et.ERR_BAD_REQUEST, Et.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
t.config,
t.request,
t
));
}
function eb(r) {
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
return e && e[1] || "";
}
function tb(r, e) {
r = r || 10;
const t = new Array(r), n = new Array(r);
let o = 0, i = 0, s;
return e = e !== void 0 ? e : 1e3, function(l) {
const c = Date.now(), u = n[i];
s || (s = c), t[o] = l, n[o] = c;
let d = i, h = 0;
for (; d !== o; )
h += t[d++], d = d % r;
if (o = (o + 1) % r, o === i && (i = (i + 1) % r), c - s < e)
return;
const p = u && c - u;
return p ? Math.round(h * 1e3 / p) : void 0;
};
}
function nb(r, e) {
let t = 0, n = 1e3 / e, o, i;
const s = (c, u = Date.now()) => {
t = u, o = null, i && (clearTimeout(i), i = null), r.apply(null, c);
};
return [(...c) => {
const u = Date.now(), d = u - t;
d >= n ? s(c, u) : (o = c, i || (i = setTimeout(() => {
i = null, s(o);
}, n - d)));
}, () => o && s(o)];
}
const wu = (r, e, t = 3) => {
let n = 0;
const o = tb(50, 250);
return nb((i) => {
const s = i.loaded, a = i.lengthComputable ? i.total : void 0, l = s - n, c = o(l), u = s <= a;
n = s;
const d = {
loaded: s,
total: a,
progress: a ? s / a : void 0,
bytes: l,
rate: c || void 0,
estimated: c && a && u ? (a - s) / c : void 0,
event: i,
lengthComputable: a != null,
[e ? "download" : "upload"]: !0
};
r(d);
}, t);
}, ep = (r, e) => {
const t = r != null;
return [(n) => e[0]({
lengthComputable: t,
total: r,
loaded: n
}), e[1]];
}, tp = (r) => (...e) => Se.asap(() => r(...e)), rb = vr.hasStandardBrowserEnv ? ((r, e) => (t) => (t = new URL(t, vr.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
new URL(vr.origin),
vr.navigator && /(msie|trident)/i.test(vr.navigator.userAgent)
) : () => !0, ob = vr.hasStandardBrowserEnv ? {
write(r, e, t, n, o, i) {
const s = [r + "=" + encodeURIComponent(e)];
Se.isNumber(t) && s.push("expires=" + new Date(t).toGMTString()), Se.isString(n) && s.push("path=" + n), Se.isString(o) && s.push("domain=" + o), i === !0 && s.push("secure"), document.cookie = s.join("; ");
},
read(r) {
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
return e ? decodeURIComponent(e[3]) : null;
},
remove(r) {
this.write(r, "", Date.now() - 864e5);
}
} : {
write() {
},
read() {
return null;
},
remove() {
}
};
function ib(r) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
}
function sb(r, e) {
return e ? r.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : r;
}
function lm(r, e) {
return r && !ib(e) ? sb(r, e) : e;
}
const np = (r) => r instanceof Mo ? { ...r } : r;
function Os(r, e) {
e = e || {};
const t = {};
function n(c, u, d, h) {
return Se.isPlainObject(c) && Se.isPlainObject(u) ? Se.merge.call({ caseless: h }, c, u) : Se.isPlainObject(u) ? Se.merge({}, u) : Se.isArray(u) ? u.slice() : u;
}
function o(c, u, d, h) {
if (Se.isUndefined(u)) {
if (!Se.isUndefined(c))
return n(void 0, c, d, h);
} else
return n(c, u, d, h);
}
function i(c, u) {
if (!Se.isUndefined(u))
return n(void 0, u);
}
function s(c, u) {
if (Se.isUndefined(u)) {
if (!Se.isUndefined(c))
return n(void 0, c);
} else
return n(void 0, u);
}
function a(c, u, d) {
if (d in e)
return n(c, u);
if (d in r)
return n(void 0, c);
}
const l = {
url: i,
method: i,
data: i,
baseURL: s,
transformRequest: s,
transformResponse: s,
paramsSerializer: s,
timeout: s,
timeoutMessage: s,
withCredentials: s,
withXSRFToken: s,
adapter: s,
responseType: s,
xsrfCookieName: s,
xsrfHeaderName: s,
onUploadProgress: s,
onDownloadProgress: s,
decompress: s,
maxContentLength: s,
maxBodyLength: s,
beforeRedirect: s,
transport: s,
httpAgent: s,
httpsAgent: s,
cancelToken: s,
socketPath: s,
responseEncoding: s,
validateStatus: a,
headers: (c, u, d) => o(np(c), np(u), d, !0)
};
return Se.forEach(Object.keys(Object.assign({}, r, e)), function(u) {
const d = l[u] || o, h = d(r[u], e[u], u);
Se.isUndefined(h) && d !== a || (t[u] = h);
}), t;
}
const cm = (r) => {
const e = Os({}, r);
let { data: t, withXSRFToken: n, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: a } = e;
e.headers = s = Mo.from(s), e.url = rm(lm(e.baseURL, e.url), r.params, r.paramsSerializer), a && s.set(
"Authorization",
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
);
let l;
if (Se.isFormData(t)) {
if (vr.hasStandardBrowserEnv || vr.hasStandardBrowserWebWorkerEnv)
s.setContentType(void 0);
else if ((l = s.getContentType()) !== !1) {
const [c, ...u] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : [];
s.setContentType([c || "multipart/form-data", ...u].join("; "));
}
}
if (vr.hasStandardBrowserEnv && (n && Se.isFunction(n) && (n = n(e)), n || n !== !1 && rb(e.url))) {
const c = o && i && ob.read(i);
c && s.set(o, c);
}
return e;
}, ab = typeof XMLHttpRequest < "u", lb = ab && function(r) {
return new Promise(function(t, n) {
const o = cm(r);
let i = o.data;
const s = Mo.from(o.headers).normalize();
let { responseType: a, onUploadProgress: l, onDownloadProgress: c } = o, u, d, h, p, f;
function v() {
p && p(), f && f(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
}
let y = new XMLHttpRequest();
y.open(o.method.toUpperCase(), o.url, !0), y.timeout = o.timeout;
function b() {
if (!y)
return;
const C = Mo.from(
"getAllResponseHeaders" in y && y.getAllResponseHeaders()
), S = {
data: !a || a === "text" || a === "json" ? y.responseText : y.response,
status: y.status,
statusText: y.statusText,
headers: C,
config: r,
request: y
};
am(function(g) {
t(g), v();
}, function(g) {
n(g), v();
}, S), y = null;
}
"onloadend" in y ? y.onloadend = b : y.onreadystatechange = function() {
!y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(b);
}, y.onabort = function() {
!y || (n(new Et("Request aborted", Et.ECONNABORTED, r, y)), y = null);
}, y.onerror = function() {
n(new Et("Network Error", Et.ERR_NETWORK, r, y)), y = null;
}, y.ontimeout = function() {
let _ = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
const S = o.transitional || om;
o.timeoutErrorMessage && (_ = o.timeoutErrorMessage), n(new Et(
_,
S.clarifyTimeoutError ? Et.ETIMEDOUT : Et.ECONNABORTED,
r,
y
)), y = null;
}, i === void 0 && s.setContentType(null), "setRequestHeader" in y && Se.forEach(s.toJSON(), function(_, S) {
y.setRequestHeader(S, _);
}), Se.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), a && a !== "json" && (y.responseType = o.responseType), c && ([h, f] = wu(c, !0), y.addEventListener("progress", h)), l && y.upload && ([d, p] = wu(l), y.upload.addEventListener("progress", d), y.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (u = (C) => {
!y || (n(!C || C.type ? new ja(null, r, y) : C), y.abort(), y = null);
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
const x = eb(o.url);
if (x && vr.protocols.indexOf(x) === -1) {
n(new Et("Unsupported protocol " + x + ":", Et.ERR_BAD_REQUEST, r));
return;
}
y.send(i || null);
});
}, cb = (r, e) => {
const { length: t } = r = r ? r.filter(Boolean) : [];
if (e || t) {
let n = new AbortController(), o;
const i = function(c) {
if (!o) {
o = !0, a();
const u = c instanceof Error ? c : this.reason;
n.abort(u instanceof Et ? u : new ja(u instanceof Error ? u.message : u));
}
};
let s = e && setTimeout(() => {
s = null, i(new Et(`timeout ${e} of ms exceeded`, Et.ETIMEDOUT));
}, e);
const a = () => {
r && (s && clearTimeout(s), s = null, r.forEach((c) => {
c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
}), r = null);
};
r.forEach((c) => c.addEventListener("abort", i));
const { signal: l } = n;
return l.unsubscribe = () => Se.asap(a), l;
}
}, ub = cb, db = function* (r, e) {
let t = r.byteLength;
if (!e || t < e) {
yield r;
return;
}
let n = 0, o;
for (; n < t; )
o = n + e, yield r.slice(n, o), n = o;
}, hb = async function* (r, e) {
for await (const t of fb(r))
yield* db(t, e);
}, fb = async function* (r) {
if (r[Symbol.asyncIterator]) {
yield* r;
return;
}
const e = r.getReader();
try {
for (; ; ) {
const { done: t, value: n } = await e.read();
if (t)
break;
yield n;
}
} finally {
await e.cancel();
}
}, rp = (r, e, t, n) => {
const o = hb(r, e);
let i = 0, s, a = (l) => {
s || (s = !0, n && n(l));
};
return new ReadableStream({
async pull(l) {
try {
const { done: c, value: u } = await o.next();
if (c) {
a(), l.close();
return;
}
let d = u.byteLength;
if (t) {
let h = i += d;
t(h);
}
l.enqueue(new Uint8Array(u));
} catch (c) {
throw a(c), c;
}
},
cancel(l) {
return a(l), o.return();
}
}, {
highWaterMark: 2
});
}, ud = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", um = ud && typeof ReadableStream == "function", pb = ud && (typeof TextEncoder == "function" ? ((r) => (e) => r.encode(e))(new TextEncoder()) : async (r) => new Uint8Array(await new Response(r).arrayBuffer())), dm = (r, ...e) => {
try {
return !!r(...e);
} catch {
return !1;
}
}, gb = um && dm(() => {
let r = !1;
const e = new Request(vr.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return r = !0, "half";
}
}).headers.has("Content-Type");
return r && !e;
}), op = 64 * 1024, Xh = um && dm(() => Se.isReadableStream(new Response("").body)), Cu = {
stream: Xh && ((r) => r.body)
};
ud && ((r) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
!Cu[e] && (Cu[e] = Se.isFunction(r[e]) ? (t) => t[e]() : (t, n) => {
throw new Et(`Response type '${e}' is not supported`, Et.ERR_NOT_SUPPORT, n);
});
});
})(new Response());
const mb = async (r) => {
if (r == null)
return 0;
if (Se.isBlob(r))
return r.size;
if (Se.isSpecCompliantForm(r))
return (await new Request(vr.origin, {
method: "POST",
body: r
}).arrayBuffer()).byteLength;
if (Se.isArrayBufferView(r) || Se.isArrayBuffer(r))
return r.byteLength;
if (Se.isURLSearchParams(r) && (r = r + ""), Se.isString(r))
return (await pb(r)).byteLength;
}, vb = async (r, e) => {
const t = Se.toFiniteNumber(r.getContentLength());
return t == null ? mb(e) : t;
}, yb = ud && (async (r) => {
let {
url: e,
method: t,
data: n,
signal: o,
cancelToken: i,
timeout: s,
onDownloadProgress: a,
onUploadProgress: l,
responseType: c,
headers: u,
withCredentials: d = "same-origin",
fetchOptions: h
} = cm(r);
c = c ? (c + "").toLowerCase() : "text";
let p = ub([o, i && i.toAbortSignal()], s), f;
const v = p && p.unsubscribe && (() => {
p.unsubscribe();
});
let y;
try {
if (l && gb && t !== "get" && t !== "head" && (y = await vb(u, n)) !== 0) {
let S = new Request(e, {
method: "POST",
body: n,
duplex: "half"
}), T;
if (Se.isFormData(n) && (T = S.headers.get("content-type")) && u.setContentType(T), S.body) {
const [g, D] = ep(
y,
wu(tp(l))
);
n = rp(S.body, op, g, D);
}
}
Se.isString(d) || (d = d ? "include" : "omit");
const b = "credentials" in Request.prototype;
f = new Request(e, {
...h,
signal: p,
method: t.toUpperCase(),
headers: u.normalize().toJSON(),
body: n,
duplex: "half",
credentials: b ? d : void 0
});
let x = await fetch(f);
const C = Xh && (c === "stream" || c === "response");
if (Xh && (a || C && v)) {
const S = {};
["status", "statusText", "headers"].forEach((P) => {
S[P] = x[P];
});
const T = Se.toFiniteNumber(x.headers.get("content-length")), [g, D] = a && ep(
T,
wu(tp(a), !0)
) || [];
x = new Response(
rp(x.body, op, g, () => {
D && D(), v && v();
}),
S
);
}
c = c || "text";
let _ = await Cu[Se.findKey(Cu, c) || "text"](x, r);
return !C && v && v(), await new Promise((S, T) => {
am(S, T, {
data: _,
headers: Mo.from(x.headers),
status: x.status,
statusText: x.statusText,
config: r,
request: f
});
});
} catch (b) {
throw v && v(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
new Et("Network Error", Et.ERR_NETWORK, r, f),
{
cause: b.cause || b
}
) : Et.from(b, b && b.code, r, f);
}
}), Kh = {
http: Py,
xhr: lb,
fetch: yb
};
Se.forEach(Kh, (r, e) => {
if (r) {
try {
Object.defineProperty(r, "name", { value: e });
} catch {
}
Object.defineProperty(r, "adapterName", { value: e });
}
});
const ip = (r) => `- ${r}`, bb = (r) => Se.isFunction(r) || r === null || r === !1, hm = {
getAdapter: (r) => {
r = Se.isArray(r) ? r : [r];
const { length: e } = r;
let t, n;
const o = {};
for (let i = 0; i < e; i++) {
t = r[i];
let s;
if (n = t, !bb(t) && (n = Kh[(s = String(t)).toLowerCase()], n === void 0))
throw new Et(`Unknown adapter '${s}'`);
if (n)
break;
o[s || "#" + i] = n;
}
if (!n) {
const i = Object.entries(o).map(
([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
);
let s = e ? i.length > 1 ? `since :
` + i.map(ip).join(`
`) : " " + ip(i[0]) : "as no adapter specified";
throw new Et(
"There is no suitable adapter to dispatch the request " + s,
"ERR_NOT_SUPPORT"
);
}
return n;
},
adapters: Kh
};
function ah(r) {
if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
throw new ja(null, r);
}
function sp(r) {
return ah(r), r.headers = Mo.from(r.headers), r.data = sh.call(
r,
r.transformRequest
), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), hm.getAdapter(r.adapter || qf.adapter)(r).then(function(n) {
return ah(r), n.data = sh.call(
r,
r.transformResponse,
n
), n.headers = Mo.from(n.headers), n;
}, function(n) {
return sm(n) || (ah(r), n && n.response && (n.response.data = sh.call(
r,
r.transformResponse,
n.response
), n.response.headers = Mo.from(n.response.headers))), Promise.reject(n);
});
}
const fm = "1.7.9", dd = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((r, e) => {
dd[r] = function(n) {
return typeof n === r || "a" + (e < 1 ? "n " : " ") + r;
};
});
const ap = {};
dd.transitional = function(e, t, n) {
function o(i, s) {
return "[Axios v" + fm + "] Transitional option '" + i + "'" + s + (n ? ". " + n : "");
}
return (i, s, a) => {
if (e === !1)
throw new Et(
o(s, " has been removed" + (t ? " in " + t : "")),
Et.ERR_DEPRECATED
);
return t && !ap[s] && (ap[s] = !0, console.warn(
o(
s,
" has been deprecated since v" + t + " and will be removed in the near future"
)
)), e ? e(i, s, a) : !0;
};
};
dd.spelling = function(e) {
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
};
function wb(r, e, t) {
if (typeof r != "object")
throw new Et("options must be an object", Et.ERR_BAD_OPTION_VALUE);
const n = Object.keys(r);
let o = n.length;
for (; o-- > 0; ) {
const i = n[o], s = e[i];
if (s) {
const a = r[i], l = a === void 0 || s(a, i, r);
if (l !== !0)
throw new Et("option " + i + " must be " + l, Et.ERR_BAD_OPTION_VALUE);
continue;
}
if (t !== !0)
throw new Et("Unknown option " + i, Et.ERR_BAD_OPTION);
}
}
const nu = {
assertOptions: wb,
validators: dd
}, Ho = nu.validators;
class xu {
constructor(e) {
this.defaults = e, this.interceptors = {
request: new Z0(),
response: new Z0()
};
}
async request(e, t) {
try {
return await this._request(e, t);
} catch (n) {
if (n instanceof Error) {
let o = {};
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
try {
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
` + i) : n.stack = i;
} catch {
}
}
throw n;
}
}
_request(e, t) {
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = Os(this.defaults, t);
const { transitional: n, paramsSerializer: o, headers: i } = t;
n !== void 0 && nu.assertOptions(n, {
silentJSONParsing: Ho.transitional(Ho.boolean),
forcedJSONParsing: Ho.transitional(Ho.boolean),
clarifyTimeoutError: Ho.transitional(Ho.boolean)
}, !1), o != null && (Se.isFunction(o) ? t.paramsSerializer = {
serialize: o
} : nu.assertOptions(o, {
encode: Ho.function,
serialize: Ho.function
}, !0)), nu.assertOptions(t, {
baseUrl: Ho.spelling("baseURL"),
withXsrfToken: Ho.spelling("withXSRFToken")
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
let s = i && Se.merge(
i.common,
i[t.method]
);
i && Se.forEach(
["delete", "get", "head", "post", "put", "patch", "common"],
(f) => {
delete i[f];
}
), t.headers = Mo.concat(s, i);
const a = [];
let l = !0;
this.interceptors.request.forEach(function(v) {
typeof v.runWhen == "function" && v.runWhen(t) === !1 || (l = l && v.synchronous, a.unshift(v.fulfilled, v.rejected));
});
const c = [];
this.interceptors.response.forEach(function(v) {
c.push(v.fulfilled, v.rejected);
});
let u, d = 0, h;
if (!l) {
const f = [sp.bind(this), void 0];
for (f.unshift.apply(f, a), f.push.apply(f, c), h = f.length, u = Promise.resolve(t); d < h; )
u = u.then(f[d++], f[d++]);
return u;
}
h = a.length;
let p = t;
for (d = 0; d < h; ) {
const f = a[d++], v = a[d++];
try {
p = f(p);
} catch (y) {
v.call(this, y);
break;
}
}
try {
u = sp.call(this, p);
} catch (f) {
return Promise.reject(f);
}
for (d = 0, h = c.length; d < h; )
u = u.then(c[d++], c[d++]);
return u;
}
getUri(e) {
e = Os(this.defaults, e);
const t = lm(e.baseURL, e.url);
return rm(t, e.params, e.paramsSerializer);
}
}
Se.forEach(["delete", "get", "head", "options"], function(e) {
xu.prototype[e] = function(t, n) {
return this.request(Os(n || {}, {
method: e,
url: t,
data: (n || {}).data
}));
};
});
Se.forEach(["post", "put", "patch"], function(e) {
function t(n) {
return function(i, s, a) {
return this.request(Os(a || {}, {
method: e,
headers: n ? {
"Content-Type": "multipart/form-data"
} : {},
url: i,
data: s
}));
};
}
xu.prototype[e] = t(), xu.prototype[e + "Form"] = t(!0);
});
const ru = xu;
class Jf {
constructor(e) {
if (typeof e != "function")
throw new TypeError("executor must be a function.");
let t;
this.promise = new Promise(function(i) {
t = i;
});
const n = this;
this.promise.then((o) => {
if (!n._listeners)
return;
let i = n._listeners.length;
for (; i-- > 0; )
n._listeners[i](o);
n._listeners = null;
}), this.promise.then = (o) => {
let i;
const s = new Promise((a) => {
n.subscribe(a), i = a;
}).then(o);
return s.cancel = function() {
n.unsubscribe(i);
}, s;
}, e(function(i, s, a) {
n.reason || (n.reason = new ja(i, s, a), t(n.reason));
});
}
throwIfRequested() {
if (this.reason)
throw this.reason;
}
subscribe(e) {
if (this.reason) {
e(this.reason);
return;
}
this._listeners ? this._listeners.push(e) : this._listeners = [e];
}
unsubscribe(e) {
if (!this._listeners)
return;
const t = this._listeners.indexOf(e);
t !== -1 && this._listeners.splice(t, 1);
}
toAbortSignal() {
const e = new AbortController(), t = (n) => {
e.abort(n);
};
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
}
static source() {
let e;
return {
token: new Jf(function(o) {
e = o;
}),
cancel: e
};
}
}
const Cb = Jf;
function xb(r) {
return function(t) {
return r.apply(null, t);
};
}
function _b(r) {
return Se.isObject(r) && r.isAxiosError === !0;
}
const qh = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthen