UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

1,677 lines 63 kB
var jt = Object.defineProperty; var It = (e, t, n) => t in e ? jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var he = (e, t, n) => It(e, typeof t != "symbol" ? t + "" : t, n); import { ref as A, defineComponent as qt, computed as me, onMounted as Mt, createVNode as g, createTextVNode as Be, resolveComponent as Ht } from "vue"; import Vt from "../input-group/index.esm.js"; import { createI18n as zt, useI18n as Kt } from "vue-i18n"; const Jt = { cancelVisible: { Type: Boolean, default: !0 }, personnelsPrimaryKey: { Type: String, default: "id" }, personnelsDisplayKey: { Type: String, default: "name" }, replyPersonnelsDisplayKey: { Type: String, default: "userName" }, editHeight: { Type: Number, default: 130 }, type: { Type: String, default: "user" }, orgUrl: { Type: String, default: "" }, personSearchUrl: { Type: String, default: "" }, sectionData: { Type: Object, default: [] }, replyUser: { Type: Object, default: { id: {} } }, personnels: { Type: Object, default: [] }, attachFiles: { Type: Object, default: [] } }; var we = /* @__PURE__ */ ((e) => (e[e.Cancel = 0] = "Cancel", e[e.Confirm = 1] = "Confirm", e))(we || {}); function $t(e, t) { const n = A(e.personSearchUrl), s = A(e.personnelsDisplayKey), r = A(!1), o = [], i = A(!1); function l(y) { y && y.stopPropagation && y.stopPropagation(); } function p(y, E, f) { return !y || !E ? !1 : f.findIndex((b) => y === b[E]) !== -1; } function c(y, E) { return n.value && `${n.value}${y}${E}`, new Promise((f, b) => { f(!0); }); } function u(y) { if (y && y[s.value]) { const E = y[s.value]; return E.substring(E.length - 2, E.length); } return ""; } function h() { i.value = !1, r.value = !1; } return { personSearchUrl: n, personnelsDisplayKey: s, /** 搜索人事管理弹窗 */ personModalVisible: i, relativeVisible: r, selectedPersonnels: o, stopBubble: l, _isInArray: p, getSearchData: c, getAvatar: u, setRelativeValue: h }; } const _e = "zh-CHS", Wt = { locale: _e, fallbackLocale: _e, uri: "" }; function Ze(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: Gt } = Object.prototype, { getPrototypeOf: Ae } = Object, { iterator: oe, toStringTag: Ye } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => { const n = Gt.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), _ = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), ae = (e) => (t) => typeof t === e, { isArray: J } = Array, Q = ae("undefined"); function Xt(e) { return e !== null && !Q(e) && e.constructor !== null && !Q(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const et = _("ArrayBuffer"); function Qt(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && et(e.buffer), t; } const Zt = ae("string"), N = ae("function"), tt = ae("number"), le = (e) => e !== null && typeof e == "object", Yt = (e) => e === !0 || e === !1, ee = (e) => { if (ie(e) !== "object") return !1; const t = Ae(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ye in e) && !(oe in e); }, en = _("Date"), tn = _("File"), nn = _("Blob"), sn = _("FileList"), rn = (e) => le(e) && N(e.pipe), on = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || N(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance t === "object" && N(e.toString) && e.toString() === "[object FormData]")); }, an = _("URLSearchParams"), [ln, cn, un, fn] = ["ReadableStream", "Request", "Response", "Headers"].map(_), dn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Z(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let s, r; if (typeof e != "object" && (e = [e]), J(e)) for (s = 0, r = e.length; s < r; s++) t.call(null, e[s], s, e); else { const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length; let l; for (s = 0; s < i; s++) l = o[s], t.call(null, e[l], l, e); } } function nt(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let s = n.length, r; for (; s-- > 0; ) if (r = n[s], t === r.toLowerCase()) return r; return null; } const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !Q(e) && e !== M; function Ee() { const { caseless: e } = st(this) && this || {}, t = {}, n = (s, r) => { const o = e && nt(t, r) || r; ee(t[o]) && ee(s) ? t[o] = Ee(t[o], s) : ee(s) ? t[o] = Ee({}, s) : J(s) ? t[o] = s.slice() : t[o] = s; }; for (let s = 0, r = arguments.length; s < r; s++) arguments[s] && Z(arguments[s], n); return t; } const pn = (e, t, n, { allOwnKeys: s } = {}) => (Z(t, (r, o) => { n && N(r) ? e[o] = Ze(r, n) : e[o] = r; }, { allOwnKeys: s }), e), hn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), mn = (e, t, n, s) => { e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, bn = (e, t, n, s) => { let r, o, i; const l = {}; if (t = t || {}, e == null) return t; do { for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; ) i = r[o], (!s || s(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0); e = n !== !1 && Ae(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, yn = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const s = e.indexOf(t, n); return s !== -1 && s === n; }, gn = (e) => { if (!e) return null; if (J(e)) return e; let t = e.length; if (!tt(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, wn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ae(Uint8Array)), En = (e, t) => { const s = (e && e[oe]).call(e); let r; for (; (r = s.next()) && !r.done; ) { const o = r.value; t.call(e, o[0], o[1]); } }, Rn = (e, t) => { let n; const s = []; for (; (n = e.exec(t)) !== null; ) s.push(n); return s; }, Sn = _("HTMLFormElement"), Tn = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, s, r) { return s.toUpperCase() + r; } ), je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), On = _("RegExp"), rt = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), s = {}; Z(n, (r, o) => { let i; (i = t(r, o, e)) !== !1 && (s[o] = i || r); }), Object.defineProperties(e, s); }, vn = (e) => { rt(e, (t, n) => { if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const s = e[n]; if (N(s)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, An = (e, t) => { const n = {}, s = (r) => { r.forEach((o) => { n[o] = !0; }); }; return J(e) ? s(e) : s(String(e).split(t)), n; }, xn = () => { }, Cn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function Pn(e) { return !!(e && N(e.append) && e[Ye] === "FormData" && e[oe]); } const Ln = (e) => { const t = new Array(10), n = (s, r) => { if (le(s)) { if (t.indexOf(s) >= 0) return; if (!("toJSON" in s)) { t[r] = s; const o = J(s) ? [] : {}; return Z(s, (i, l) => { const p = n(i, r + 1); !Q(p) && (o[l] = p); }), t[r] = void 0, o; } } return s; }; return n(e, 0); }, Fn = _("AsyncFunction"), Nn = (e) => e && (le(e) || N(e)) && N(e.then) && N(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((n, s) => (M.addEventListener("message", ({ source: r, data: o }) => { r === M && o === n && s.length && s.shift()(); }, !1), (r) => { s.push(r), M.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", N(M.postMessage) ), Dn = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || ot, Un = (e) => e != null && N(e[oe]), a = { isArray: J, isArrayBuffer: et, isBuffer: Xt, isFormData: on, isArrayBufferView: Qt, isString: Zt, isNumber: tt, isBoolean: Yt, isObject: le, isPlainObject: ee, isReadableStream: ln, isRequest: cn, isResponse: un, isHeaders: fn, isUndefined: Q, isDate: en, isFile: tn, isBlob: nn, isRegExp: On, isFunction: N, isStream: rn, isURLSearchParams: an, isTypedArray: wn, isFileList: sn, forEach: Z, merge: Ee, extend: pn, trim: dn, stripBOM: hn, inherits: mn, toFlatObject: bn, kindOf: ie, kindOfTest: _, endsWith: yn, toArray: gn, forEachEntry: En, matchAll: Rn, isHTMLForm: Sn, hasOwnProperty: je, hasOwnProp: je, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: rt, freezeMethods: vn, toObjectSet: An, toCamelCase: Tn, noop: xn, toFiniteNumber: Cn, findKey: nt, global: M, isContextDefined: st, isSpecCompliantForm: Pn, toJSONObject: Ln, isAsyncFn: Fn, isThenable: Nn, setImmediate: ot, asap: Dn, isIterable: Un }; function w(e, t, n, s, r) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null); } a.inherits(w, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: a.toJSONObject(this.config), code: this.code, status: this.status }; } }); const it = w.prototype, at = {}; [ "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" // eslint-disable-next-line func-names ].forEach((e) => { at[e] = { value: e }; }); Object.defineProperties(w, at); Object.defineProperty(it, "isAxiosError", { value: !0 }); w.from = (e, t, n, s, r, o) => { const i = Object.create(it); return a.toFlatObject(e, i, function(p) { return p !== Error.prototype; }, (l) => l !== "isAxiosError"), w.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i; }; const kn = null; function Re(e) { return a.isPlainObject(e) || a.isArray(e); } function lt(e) { return a.endsWith(e, "[]") ? e.slice(0, -2) : e; } function Ie(e, t, n) { return e ? e.concat(t).map(function(r, o) { return r = lt(r), !n && o ? "[" + r + "]" : r; }).join(n ? "." : "") : t; } function Bn(e) { return a.isArray(e) && !e.some(Re); } const _n = a.toFlatObject(a, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function ce(e, t, n) { if (!a.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = a.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(b, m) { return !a.isUndefined(m[b]); }); const s = n.metaTokens, r = n.visitor || u, o = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t); if (!a.isFunction(r)) throw new TypeError("visitor must be a function"); function c(f) { if (f === null) return ""; if (a.isDate(f)) return f.toISOString(); if (a.isBoolean(f)) return f.toString(); if (!p && a.isBlob(f)) throw new w("Blob is not supported. Use a Buffer instead."); return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f; } function u(f, b, m) { let R = f; if (f && !m && typeof f == "object") { if (a.endsWith(b, "{}")) b = s ? b : b.slice(0, -2), f = JSON.stringify(f); else if (a.isArray(f) && Bn(f) || (a.isFileList(f) || a.endsWith(b, "[]")) && (R = a.toArray(f))) return b = lt(b), R.forEach(function(x, U) { !(a.isUndefined(x) || x === null) && t.append( // eslint-disable-next-line no-nested-ternary i === !0 ? Ie([b], U, o) : i === null ? b : b + "[]", c(x) ); }), !1; } return Re(f) ? !0 : (t.append(Ie(m, b, o), c(f)), !1); } const h = [], y = Object.assign(_n, { defaultVisitor: u, convertValue: c, isVisitable: Re }); function E(f, b) { if (!a.isUndefined(f)) { if (h.indexOf(f) !== -1) throw Error("Circular reference detected in " + b.join(".")); h.push(f), a.forEach(f, function(R, S) { (!(a.isUndefined(R) || R === null) && r.call( t, R, a.isString(S) ? S.trim() : S, b, y )) === !0 && E(R, b ? b.concat(S) : [S]); }), h.pop(); } } if (!a.isObject(e)) throw new TypeError("data must be an object"); return E(e), t; } function qe(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) { return t[s]; }); } function xe(e, t) { this._pairs = [], e && ce(e, this, t); } const ct = xe.prototype; ct.append = function(t, n) { this._pairs.push([t, n]); }; ct.toString = function(t) { const n = t ? function(s) { return t.call(this, s, qe); } : qe; return this._pairs.map(function(r) { return n(r[0]) + "=" + n(r[1]); }, "").join("&"); }; function jn(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function ut(e, t, n) { if (!t) return e; const s = n && n.encode || jn; a.isFunction(n) && (n = { serialize: n }); const r = n && n.serialize; let o; if (r ? o = r(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(s), o) { const i = e.indexOf("#"); i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o; } return e; } class Me { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, s) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: s ? s.synchronous : !1, runWhen: s ? s.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { a.forEach(this.handlers, function(s) { s !== null && t(s); }); } } const ft = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, In = typeof URLSearchParams < "u" ? URLSearchParams : xe, qn = typeof FormData < "u" ? FormData : null, Mn = typeof Blob < "u" ? Blob : null, Hn = { isBrowser: !0, classes: { URLSearchParams: In, FormData: qn, Blob: Mn }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Ce = typeof window < "u" && typeof document < "u", Se = typeof navigator == "object" && navigator || void 0, Vn = Ce && (!Se || ["ReactNative", "NativeScript", "NS"].indexOf(Se.product) < 0), zn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Kn = Ce && window.location.href || "http://localhost", Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Ce, hasStandardBrowserEnv: Vn, hasStandardBrowserWebWorkerEnv: zn, navigator: Se, origin: Kn }, Symbol.toStringTag, { value: "Module" })), P = { ...Jn, ...Hn }; function $n(e, t) { return ce(e, new P.classes.URLSearchParams(), Object.assign({ visitor: function(n, s, r, o) { return P.isNode && a.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments); } }, t)); } function Wn(e) { return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function Gn(e) { const t = {}, n = Object.keys(e); let s; const r = n.length; let o; for (s = 0; s < r; s++) o = n[s], t[o] = e[o]; return t; } function dt(e) { function t(n, s, r, o) { let i = n[o++]; if (i === "__proto__") return !0; const l = Number.isFinite(+i), p = o >= n.length; return i = !i && a.isArray(r) ? r.length : i, p ? (a.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !l) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && a.isArray(r[i]) && (r[i] = Gn(r[i])), !l); } if (a.isFormData(e) && a.isFunction(e.entries)) { const n = {}; return a.forEachEntry(e, (s, r) => { t(Wn(s), r, n, 0); }), n; } return null; } function Xn(e, t, n) { if (a.isString(e)) try { return (t || JSON.parse)(e), a.trim(e); } catch (s) { if (s.name !== "SyntaxError") throw s; } return (0, JSON.stringify)(e); } const Y = { transitional: ft, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = a.isObject(t); if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t)) return r ? JSON.stringify(dt(t)) : t; if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t)) return t; if (a.isArrayBufferView(t)) return t.buffer; if (a.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let l; if (o) { if (s.indexOf("application/x-www-form-urlencoded") > -1) return $n(t, this.formSerializer).toString(); if ((l = a.isFileList(t)) || s.indexOf("multipart/form-data") > -1) { const p = this.env && this.env.FormData; return ce( l ? { "files[]": t } : t, p && new p(), this.formSerializer ); } } return o || r ? (n.setContentType("application/json", !1), Xn(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || Y.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json"; if (a.isResponse(t) || a.isReadableStream(t)) return t; if (t && a.isString(t) && (s && !this.responseType || r)) { const i = !(n && n.silentJSONParsing) && r; try { return JSON.parse(t); } catch (l) { if (i) throw l.name === "SyntaxError" ? w.from(l, w.ERR_BAD_RESPONSE, this, null, this.response) : l; } } return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: P.classes.FormData, Blob: P.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Y.headers[e] = {}; }); const Qn = a.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" ]), Zn = (e) => { const t = {}; let n, s, r; return e && e.split(` `).forEach(function(i) { r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] && Qn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s); }), t; }, He = Symbol("internals"); function X(e) { return e && String(e).trim().toLowerCase(); } function te(e) { return e === !1 || e == null ? e : a.isArray(e) ? e.map(te) : String(e); } function Yn(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let s; for (; s = n.exec(e); ) t[s[1]] = s[2]; return t; } const es = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function be(e, t, n, s, r) { if (a.isFunction(s)) return s.call(this, t, n); if (r && (t = n), !!a.isString(t)) { if (a.isString(s)) return t.indexOf(s) !== -1; if (a.isRegExp(s)) return s.test(t); } } function ts(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s); } function ns(e, t) { const n = a.toCamelCase(" " + t); ["get", "set", "has"].forEach((s) => { Object.defineProperty(e, s + n, { value: function(r, o, i) { return this[s].call(this, t, r, o, i); }, configurable: !0 }); }); } class D { constructor(t) { t && this.set(t); } set(t, n, s) { const r = this; function o(l, p, c) { const u = X(p); if (!u) throw new Error("header name must be a non-empty string"); const h = a.findKey(r, u); (!h || r[h] === void 0 || c === !0 || c === void 0 && r[h] !== !1) && (r[h || p] = te(l)); } const i = (l, p) => a.forEach(l, (c, u) => o(c, u, p)); if (a.isPlainObject(t) || t instanceof this.constructor) i(t, n); else if (a.isString(t) && (t = t.trim()) && !es(t)) i(Zn(t), n); else if (a.isObject(t) && a.isIterable(t)) { let l = {}, p, c; for (const u of t) { if (!a.isArray(u)) throw TypeError("Object iterator must return a key-value pair"); l[c = u[0]] = (p = l[c]) ? a.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1]; } i(l, n); } else t != null && o(n, t, s); return this; } get(t, n) { if (t = X(t), t) { const s = a.findKey(this, t); if (s) { const r = this[s]; if (!n) return r; if (n === !0) return Yn(r); if (a.isFunction(n)) return n.call(this, r, s); if (a.isRegExp(n)) return n.exec(r); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = X(t), t) { const s = a.findKey(this, t); return !!(s && this[s] !== void 0 && (!n || be(this, this[s], s, n))); } return !1; } delete(t, n) { const s = this; let r = !1; function o(i) { if (i = X(i), i) { const l = a.findKey(s, i); l && (!n || be(s, s[l], l, n)) && (delete s[l], r = !0); } } return a.isArray(t) ? t.forEach(o) : o(t), r; } clear(t) { const n = Object.keys(this); let s = n.length, r = !1; for (; s--; ) { const o = n[s]; (!t || be(this, this[o], o, t, !0)) && (delete this[o], r = !0); } return r; } normalize(t) { const n = this, s = {}; return a.forEach(this, (r, o) => { const i = a.findKey(s, o); if (i) { n[i] = te(r), delete n[o]; return; } const l = t ? ts(o) : String(o).trim(); l !== o && delete n[o], n[l] = te(r), s[l] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return a.forEach(this, (s, r) => { s != null && s !== !1 && (n[r] = t && a.isArray(s) ? s.join(", ") : s); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } getSetCookie() { return this.get("set-cookie") || []; } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const s = new this(t); return n.forEach((r) => s.set(r)), s; } static accessor(t) { const s = (this[He] = this[He] = { accessors: {} }).accessors, r = this.prototype; function o(i) { const l = X(i); s[l] || (ns(r, i), s[l] = !0); } return a.isArray(t) ? t.forEach(o) : o(t), this; } } D.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); a.reduceDescriptors(D.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(s) { this[n] = s; } }; }); a.freezeMethods(D); function ye(e, t) { const n = this || Y, s = t || n, r = D.from(s.headers); let o = s.data; return a.forEach(e, function(l) { o = l.call(n, o, r.normalize(), t ? t.status : void 0); }), r.normalize(), o; } function pt(e) { return !!(e && e.__CANCEL__); } function $(e, t, n) { w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError"; } a.inherits($, w, { __CANCEL__: !0 }); function ht(e, t, n) { const s = n.config.validateStatus; !n.status || !s || s(n.status) ? e(n) : t(new w( "Request failed with status code " + n.status, [w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function ss(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function rs(e, t) { e = e || 10; const n = new Array(e), s = new Array(e); let r = 0, o = 0, i; return t = t !== void 0 ? t : 1e3, function(p) { const c = Date.now(), u = s[o]; i || (i = c), n[r] = p, s[r] = c; let h = o, y = 0; for (; h !== r; ) y += n[h++], h = h % e; if (r = (r + 1) % e, r === o && (o = (o + 1) % e), c - i < t) return; const E = u && c - u; return E ? Math.round(y * 1e3 / E) : void 0; }; } function os(e, t) { let n = 0, s = 1e3 / t, r, o; const i = (c, u = Date.now()) => { n = u, r = null, o && (clearTimeout(o), o = null), e.apply(null, c); }; return [(...c) => { const u = Date.now(), h = u - n; h >= s ? i(c, u) : (r = c, o || (o = setTimeout(() => { o = null, i(r); }, s - h))); }, () => r && i(r)]; } const se = (e, t, n = 3) => { let s = 0; const r = rs(50, 250); return os((o) => { const i = o.loaded, l = o.lengthComputable ? o.total : void 0, p = i - s, c = r(p), u = i <= l; s = i; const h = { loaded: i, total: l, progress: l ? i / l : void 0, bytes: p, rate: c || void 0, estimated: c && l && u ? (l - i) / c : void 0, event: o, lengthComputable: l != null, [t ? "download" : "upload"]: !0 }; e(h); }, n); }, Ve = (e, t) => { const n = e != null; return [(s) => t[0]({ lengthComputable: n, total: e, loaded: s }), t[1]]; }, ze = (e) => (...t) => a.asap(() => e(...t)), is = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, P.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))( new URL(P.origin), P.navigator && /(msie|trident)/i.test(P.navigator.userAgent) ) : () => !0, as = P.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, s, r, o) { const i = [e + "=" + encodeURIComponent(t)]; a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(s) && i.push("path=" + s), a.isString(r) && i.push("domain=" + r), o === !0 && i.push("secure"), document.cookie = i.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function ls(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function cs(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function mt(e, t, n) { let s = !ls(t); return e && (s || n == !1) ? cs(e, t) : t; } const Ke = (e) => e instanceof D ? { ...e } : e; function V(e, t) { t = t || {}; const n = {}; function s(c, u, h, y) { return a.isPlainObject(c) && a.isPlainObject(u) ? a.merge.call({ caseless: y }, c, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u; } function r(c, u, h, y) { if (a.isUndefined(u)) { if (!a.isUndefined(c)) return s(void 0, c, h, y); } else return s(c, u, h, y); } function o(c, u) { if (!a.isUndefined(u)) return s(void 0, u); } function i(c, u) { if (a.isUndefined(u)) { if (!a.isUndefined(c)) return s(void 0, c); } else return s(void 0, u); } function l(c, u, h) { if (h in t) return s(c, u); if (h in e) return s(void 0, c); } const p = { url: o, method: o, data: o, baseURL: i, transformRequest: i, transformResponse: i, paramsSerializer: i, timeout: i, timeoutMessage: i, withCredentials: i, withXSRFToken: i, adapter: i, responseType: i, xsrfCookieName: i, xsrfHeaderName: i, onUploadProgress: i, onDownloadProgress: i, decompress: i, maxContentLength: i, maxBodyLength: i, beforeRedirect: i, transport: i, httpAgent: i, httpsAgent: i, cancelToken: i, socketPath: i, responseEncoding: i, validateStatus: l, headers: (c, u, h) => r(Ke(c), Ke(u), h, !0) }; return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) { const h = p[u] || r, y = h(e[u], t[u], u); a.isUndefined(y) && h !== l || (n[u] = y); }), n; } const bt = (e) => { const t = V({}, e); let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: l } = t; t.headers = i = D.from(i), t.url = ut(mt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set( "Authorization", "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : "")) ); let p; if (a.isFormData(n)) { if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv) i.setContentType(void 0); else if ((p = i.getContentType()) !== !1) { const [c, ...u] = p ? p.split(";").map((h) => h.trim()).filter(Boolean) : []; i.setContentType([c || "multipart/form-data", ...u].join("; ")); } } if (P.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 && is(t.url))) { const c = r && o && as.read(o); c && i.set(r, c); } return t; }, us = typeof XMLHttpRequest < "u", fs = us && function(e) { return new Promise(function(n, s) { const r = bt(e); let o = r.data; const i = D.from(r.headers).normalize(); let { responseType: l, onUploadProgress: p, onDownloadProgress: c } = r, u, h, y, E, f; function b() { E && E(), f && f(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u); } let m = new XMLHttpRequest(); m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout; function R() { if (!m) return; const x = D.from( "getAllResponseHeaders" in m && m.getAllResponseHeaders() ), O = { data: !l || l === "text" || l === "json" ? m.responseText : m.response, status: m.status, statusText: m.statusText, headers: x, config: e, request: m }; ht(function(v) { n(v), b(); }, function(v) { s(v), b(); }, O), m = null; } "onloadend" in m ? m.onloadend = R : m.onreadystatechange = function() { !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(R); }, m.onabort = function() { m && (s(new w("Request aborted", w.ECONNABORTED, e, m)), m = null); }, m.onerror = function() { s(new w("Network Error", w.ERR_NETWORK, e, m)), m = null; }, m.ontimeout = function() { let U = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded"; const O = r.transitional || ft; r.timeoutErrorMessage && (U = r.timeoutErrorMessage), s(new w( U, O.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED, e, m )), m = null; }, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(U, O) { m.setRequestHeader(O, U); }), a.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), l && l !== "json" && (m.responseType = r.responseType), c && ([y, f] = se(c, !0), m.addEventListener("progress", y)), p && m.upload && ([h, E] = se(p), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", E)), (r.cancelToken || r.signal) && (u = (x) => { m && (s(!x || x.type ? new $(null, e, m) : x), m.abort(), m = null); }, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u))); const S = ss(r.url); if (S && P.protocols.indexOf(S) === -1) { s(new w("Unsupported protocol " + S + ":", w.ERR_BAD_REQUEST, e)); return; } m.send(o || null); }); }, ds = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let s = new AbortController(), r; const o = function(c) { if (!r) { r = !0, l(); const u = c instanceof Error ? c : this.reason; s.abort(u instanceof w ? u : new $(u instanceof Error ? u.message : u)); } }; let i = t && setTimeout(() => { i = null, o(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT)); }, t); const l = () => { e && (i && clearTimeout(i), i = null, e.forEach((c) => { c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o); }), e = null); }; e.forEach((c) => c.addEventListener("abort", o)); const { signal: p } = s; return p.unsubscribe = () => a.asap(l), p; } }, ps = function* (e, t) { let n = e.byteLength; if (n < t) { yield e; return; } let s = 0, r; for (; s < n; ) r = s + t, yield e.slice(s, r), s = r; }, hs = async function* (e, t) { for await (const n of ms(e)) yield* ps(n, t); }, ms = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: s } = await t.read(); if (n) break; yield s; } } finally { await t.cancel(); } }, Je = (e, t, n, s) => { const r = hs(e, t); let o = 0, i, l = (p) => { i || (i = !0, s && s(p)); }; return new ReadableStream({ async pull(p) { try { const { done: c, value: u } = await r.next(); if (c) { l(), p.close(); return; } let h = u.byteLength; if (n) { let y = o += h; n(y); } p.enqueue(new Uint8Array(u)); } catch (c) { throw l(c), c; } }, cancel(p) { return l(p), r.return(); } }, { highWaterMark: 2 }); }, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ue && typeof ReadableStream == "function", bs = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, ys = yt && gt(() => { let e = !1; const t = new Request(P.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), $e = 64 * 1024, Te = yt && gt(() => a.isReadableStream(new Response("").body)), re = { stream: Te && ((e) => e.body) }; ue && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !re[t] && (re[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, s) => { throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, s); }); }); })(new Response()); const gs = async (e) => { if (e == null) return 0; if (a.isBlob(e)) return e.size; if (a.isSpecCompliantForm(e)) return (await new Request(P.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (a.isArrayBufferView(e) || a.isArrayBuffer(e)) return e.byteLength; if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e)) return (await bs(e)).byteLength; }, ws = async (e, t) => { const n = a.toFiniteNumber(e.getContentLength()); return n ?? gs(t); }, Es = ue && (async (e) => { let { url: t, method: n, data: s, signal: r, cancelToken: o, timeout: i, onDownloadProgress: l, onUploadProgress: p, responseType: c, headers: u, withCredentials: h = "same-origin", fetchOptions: y } = bt(e); c = c ? (c + "").toLowerCase() : "text"; let E = ds([r, o && o.toAbortSignal()], i), f; const b = E && E.unsubscribe && (() => { E.unsubscribe(); }); let m; try { if (p && ys && n !== "get" && n !== "head" && (m = await ws(u, s)) !== 0) { let O = new Request(t, { method: "POST", body: s, duplex: "half" }), B; if (a.isFormData(s) && (B = O.headers.get("content-type")) && u.setContentType(B), O.body) { const [v, I] = Ve( m, se(ze(p)) ); s = Je(O.body, $e, v, I); } } a.isString(h) || (h = h ? "include" : "omit"); const R = "credentials" in Request.prototype; f = new Request(t, { ...y, signal: E, method: n.toUpperCase(), headers: u.normalize().toJSON(), body: s, duplex: "half", credentials: R ? h : void 0 }); let S = await fetch(f, y); const x = Te && (c === "stream" || c === "response"); if (Te && (l || x && b)) { const O = {}; ["status", "statusText", "headers"].forEach((W) => { O[W] = S[W]; }); const B = a.toFiniteNumber(S.headers.get("content-length")), [v, I] = l && Ve( B, se(ze(l), !0) ) || []; S = new Response( Je(S.body, $e, v, () => { I && I(), b && b(); }), O ); } c = c || "text"; let U = await re[a.findKey(re, c) || "text"](S, e); return !x && b && b(), await new Promise((O, B) => { ht(O, B, { data: U, headers: D.from(S.headers), status: S.status, statusText: S.statusText, config: e, request: f }); }); } catch (R) { throw b && b(), R && R.name === "TypeError" && /Load failed|fetch/i.test(R.message) ? Object.assign( new w("Network Error", w.ERR_NETWORK, e, f), { cause: R.cause || R } ) : w.from(R, R && R.code, e, f); } }), Oe = { http: kn, xhr: fs, fetch: Es }; a.forEach(Oe, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const We = (e) => `- ${e}`, Rs = (e) => a.isFunction(e) || e === null || e === !1, wt = { getAdapter: (e) => { e = a.isArray(e) ? e : [e]; const { length: t } = e; let n, s; const r = {}; for (let o = 0; o < t; o++) { n = e[o]; let i; if (s = n, !Rs(n) && (s = Oe[(i = String(n)).toLowerCase()], s === void 0)) throw new w(`Unknown adapter '${i}'`); if (s) break; r[i || "#" + o] = s; } if (!s) { const o = Object.entries(r).map( ([l, p]) => `adapter ${l} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build") ); let i = t ? o.length > 1 ? `since : ` + o.map(We).join(` `) : " " + We(o[0]) : "as no adapter specified"; throw new w( "There is no suitable adapter to dispatch the request " + i, "ERR_NOT_SUPPORT" ); } return s; }, adapters: Oe }; function ge(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new $(null, e); } function Ge(e) { return ge(e), e.headers = D.from(e.headers), e.data = ye.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(e.adapter || Y.adapter)(e).then(function(s) { return ge(e), s.data = ye.call( e, e.transformResponse, s ), s.headers = D.from(s.headers), s; }, function(s) { return pt(s) || (ge(e), s && s.response && (s.response.data = ye.call( e, e.transformResponse, s.response ), s.response.headers = D.from(s.response.headers))), Promise.reject(s); }); } const Et = "1.10.0", fe = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { fe[e] = function(s) { return typeof s === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const Xe = {}; fe.transitional = function(t, n, s) { function r(o, i) { return "[Axios v" + Et + "] Transitional option '" + o + "'" + i + (s ? ". " + s : ""); } return (o, i, l) => { if (t === !1) throw new w( r(i, " has been removed" + (n ? " in " + n : "")), w.ERR_DEPRECATED ); return n && !Xe[i] && (Xe[i] = !0, console.warn( r( i, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(o, i, l) : !0; }; }; fe.spelling = function(t) { return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0); }; function Ss(e, t, n) { if (typeof e != "object") throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE); const s = Object.keys(e); let r = s.length; for (; r-- > 0; ) { const o = s[r], i = t[o]; if (i) { const l = e[o], p = l === void 0 || i(l, o, e); if (p !== !0) throw new w("option " + o + " must be " + p, w.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new w("Unknown option " + o, w.ERR_BAD_OPTION); } } const ne = { assertOptions: Ss, validators: fe }, j = ne.validators; class H { constructor(t) { this.defaults = t || {}, this.interceptors = { request: new Me(), response: new Me() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (s) { if (s instanceof Error) { let r = {}; Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error(); const o = r.stack ? r.stack.replace(/^.+\n/, "") : ""; try { s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += ` ` + o) : s.stack = o; } catch { } } throw s; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = V(this.defaults, n); const { transitional: s, paramsSerializer: r, headers: o } = n; s !== void 0 && ne.assertOptions(s, { silentJSONParsing: j.transitional(j.boolean), forcedJSONParsing: j.transitional(j.boolean), clarifyTimeoutError: j.transitional(j.boolean) }, !1), r != null && (a.isFunction(r) ? n.paramsSerializer = { serialize: r } : ne.assertOptions(r, { encode: j.function, serialize: j.function }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ne.assertOptions(n, { baseUrl: j.spelling("baseURL"), withXsrfToken: j.spelling("withXSRFToken") }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let i = o && a.merge( o.common, o[n.method] ); o && a.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (f) => { delete o[f]; } ), n.headers = D.concat(i, o); const l = []; let p = !0; this.interceptors.request.forEach(function(b) { typeof b.runWhen == "function" && b.runWhen(n) === !1 || (p = p && b.synchronous, l.unshift(b.fulfilled, b.rejected)); }); const c = []; this.interceptors.response.forEach(function(b) { c.push(b.fulfilled, b.rejected); }); let u, h = 0, y; if (!p) { const f = [Ge.bind(this), void 0]; for (f.unshift.apply(f, l), f.push.apply(f, c), y = f.length, u = Promise.resolve(n); h < y; ) u = u.then(f[h++], f[h++]); return u; } y = l.length; let E = n; for (h = 0; h < y; ) { const f = l[h++], b = l[h++]; try { E = f(E); } catch (m) { b.call(this, m); break; } } try { u = Ge.call(this, E); } catch (f) { return Promise.reject(f); } for (h = 0, y = c.length; h < y; ) u = u.then(c[h++], c[h++]); return u; } getUri(t) { t = V(this.defaults, t); const n = mt(t.baseURL, t.url, t.allowAbsoluteUrls); return ut(n, t.params, t.paramsSerializer); } } a.forEach(["delete", "get", "head", "options"], function(t) { H.prototype[t] = function(n, s) { return this.request(V(s || {}, { method: t, url: n, data: (s || {}).data })); }; }); a.forEach(["post", "put", "patch"], function(t) { function n(s) { return function(o, i, l) { return this.request(V(l || {}, { method: t, headers: s ? { "Content-Type": "multipart/form-data" } : {}, url: o, data: i })); }; } H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0); }); class Pe { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(o) { n = o; }); const s = this; this.promise.then((r) => { if (!s._listeners) return; let o = s._listeners.length; for (; o-- > 0; ) s._listeners[o](r); s._listeners = null; }), this.promise.then = (r) => { let o; const i = new Promise((l) => { s.subscribe(l), o = l; }).then(r); return i.cancel = function() { s.unsubscribe(o); }, i; }, t(function(o, i, l) { s.reason || (s.reason = new $(o, i, l), n(s.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (s) => { t.abort(s); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Pe(function(r) { t = r; }), cancel: t }; } } function Ts(e) { return function(n) { return e.apply(null, n); }; } function Os(e) { return a.isObject(e) && e.isAxiosError === !0; } const ve = { 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