ion-widget-phone
Version:
Enhance Your Business Communication Productivity and Efficiency with Our Softphone and PBX Service
1,705 lines • 58.6 kB
JavaScript
var Xe = Object.defineProperty;
var Ge = (t, e, n) => e in t ? Xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var O = (t, e, n) => (Ge(t, typeof e != "symbol" ? e + "" : e, n), n);
function Ae(t, e) {
return function() {
return t.apply(e, arguments);
};
}
const { toString: Qe } = Object.prototype, { getPrototypeOf: ie } = Object, z = /* @__PURE__ */ ((t) => (e) => {
const n = Qe.call(e);
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), N = (t) => (t = t.toLowerCase(), (e) => z(e) === t), J = (t) => (e) => typeof e === t, { isArray: _ } = Array, I = J("undefined");
function Ye(t) {
return t !== null && !I(t) && t.constructor !== null && !I(t.constructor) && T(t.constructor.isBuffer) && t.constructor.isBuffer(t);
}
const Ne = N("ArrayBuffer");
function Ze(t) {
let e;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Ne(t.buffer), e;
}
const et = J("string"), T = J("function"), Pe = J("number"), V = (t) => t !== null && typeof t == "object", tt = (t) => t === !0 || t === !1, j = (t) => {
if (z(t) !== "object")
return !1;
const e = ie(t);
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
}, nt = N("Date"), rt = N("File"), st = N("Blob"), ot = N("FileList"), it = (t) => V(t) && T(t.pipe), at = (t) => {
let e;
return t && (typeof FormData == "function" && t instanceof FormData || T(t.append) && ((e = z(t)) === "formdata" || // detect form-data instance
e === "object" && T(t.toString) && t.toString() === "[object FormData]"));
}, ct = N("URLSearchParams"), [lt, ut, ft, dt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), ht = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function q(t, e, { allOwnKeys: n = !1 } = {}) {
if (t === null || typeof t > "u")
return;
let r, s;
if (typeof t != "object" && (t = [t]), _(t))
for (r = 0, s = t.length; r < s; r++)
e.call(null, t[r], r, t);
else {
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
let c;
for (r = 0; r < i; r++)
c = o[r], e.call(null, t[c], c, t);
}
}
function xe(t, e) {
e = e.toLowerCase();
const n = Object.keys(t);
let r = n.length, s;
for (; r-- > 0; )
if (s = n[r], e === s.toLowerCase())
return s;
return null;
}
const Ce = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Le = (t) => !I(t) && t !== Ce;
function Z() {
const { caseless: t } = Le(this) && this || {}, e = {}, n = (r, s) => {
const o = t && xe(e, s) || s;
j(e[o]) && j(r) ? e[o] = Z(e[o], r) : j(r) ? e[o] = Z({}, r) : _(r) ? e[o] = r.slice() : e[o] = r;
};
for (let r = 0, s = arguments.length; r < s; r++)
arguments[r] && q(arguments[r], n);
return e;
}
const pt = (t, e, n, { allOwnKeys: r } = {}) => (q(e, (s, o) => {
n && T(s) ? t[o] = Ae(s, n) : t[o] = s;
}, { allOwnKeys: r }), t), mt = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), yt = (t, e, n, r) => {
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
value: e.prototype
}), n && Object.assign(t.prototype, n);
}, gt = (t, e, n, r) => {
let s, o, i;
const c = {};
if (e = e || {}, t == null)
return e;
do {
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
i = s[o], (!r || r(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
t = n !== !1 && ie(t);
} while (t && (!n || n(t, e)) && t !== Object.prototype);
return e;
}, wt = (t, e, n) => {
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
const r = t.indexOf(e, n);
return r !== -1 && r === n;
}, bt = (t) => {
if (!t)
return null;
if (_(t))
return t;
let e = t.length;
if (!Pe(e))
return null;
const n = new Array(e);
for (; e-- > 0; )
n[e] = t[e];
return n;
}, Et = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && ie(Uint8Array)), St = (t, e) => {
const r = (t && t[Symbol.iterator]).call(t);
let s;
for (; (s = r.next()) && !s.done; ) {
const o = s.value;
e.call(t, o[0], o[1]);
}
}, Ot = (t, e) => {
let n;
const r = [];
for (; (n = t.exec(e)) !== null; )
r.push(n);
return r;
}, Rt = N("HTMLFormElement"), Tt = (t) => t.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(n, r, s) {
return r.toUpperCase() + s;
}
), de = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), At = N("RegExp"), De = (t, e) => {
const n = Object.getOwnPropertyDescriptors(t), r = {};
q(n, (s, o) => {
let i;
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
}), Object.defineProperties(t, r);
}, Nt = (t) => {
De(t, (e, n) => {
if (T(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = t[n];
if (T(r)) {
if (e.enumerable = !1, "writable" in e) {
e.writable = !1;
return;
}
e.set || (e.set = () => {
throw Error("Can not rewrite read-only method '" + n + "'");
});
}
});
}, Pt = (t, e) => {
const n = {}, r = (s) => {
s.forEach((o) => {
n[o] = !0;
});
};
return _(t) ? r(t) : r(String(t).split(e)), n;
}, xt = () => {
}, Ct = (t, e) => t != null && Number.isFinite(t = +t) ? t : e, X = "abcdefghijklmnopqrstuvwxyz", he = "0123456789", Fe = {
DIGIT: he,
ALPHA: X,
ALPHA_DIGIT: X + X.toUpperCase() + he
}, Lt = (t = 16, e = Fe.ALPHA_DIGIT) => {
let n = "";
const { length: r } = e;
for (; t--; )
n += e[Math.random() * r | 0];
return n;
};
function Dt(t) {
return !!(t && T(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
}
const Ft = (t) => {
const e = new Array(10), n = (r, s) => {
if (V(r)) {
if (e.indexOf(r) >= 0)
return;
if (!("toJSON" in r)) {
e[s] = r;
const o = _(r) ? [] : {};
return q(r, (i, c) => {
const f = n(i, s + 1);
!I(f) && (o[c] = f);
}), e[s] = void 0, o;
}
}
return r;
};
return n(t, 0);
}, _t = N("AsyncFunction"), Bt = (t) => t && (V(t) || T(t)) && T(t.then) && T(t.catch), a = {
isArray: _,
isArrayBuffer: Ne,
isBuffer: Ye,
isFormData: at,
isArrayBufferView: Ze,
isString: et,
isNumber: Pe,
isBoolean: tt,
isObject: V,
isPlainObject: j,
isReadableStream: lt,
isRequest: ut,
isResponse: ft,
isHeaders: dt,
isUndefined: I,
isDate: nt,
isFile: rt,
isBlob: st,
isRegExp: At,
isFunction: T,
isStream: it,
isURLSearchParams: ct,
isTypedArray: Et,
isFileList: ot,
forEach: q,
merge: Z,
extend: pt,
trim: ht,
stripBOM: mt,
inherits: yt,
toFlatObject: gt,
kindOf: z,
kindOfTest: N,
endsWith: wt,
toArray: bt,
forEachEntry: St,
matchAll: Ot,
isHTMLForm: Rt,
hasOwnProperty: de,
hasOwnProp: de,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: De,
freezeMethods: Nt,
toObjectSet: Pt,
toCamelCase: Tt,
noop: xt,
toFiniteNumber: Ct,
findKey: xe,
global: Ce,
isContextDefined: Le,
ALPHABET: Fe,
generateString: Lt,
isSpecCompliantForm: Dt,
toJSONObject: Ft,
isAsyncFn: _t,
isThenable: Bt
};
function p(t, e, n, r, s) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s);
}
a.inherits(p, 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.response && this.response.status ? this.response.status : null
};
}
});
const _e = p.prototype, Be = {};
[
"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((t) => {
Be[t] = { value: t };
});
Object.defineProperties(p, Be);
Object.defineProperty(_e, "isAxiosError", { value: !0 });
p.from = (t, e, n, r, s, o) => {
const i = Object.create(_e);
return a.toFlatObject(t, i, function(f) {
return f !== Error.prototype;
}, (c) => c !== "isAxiosError"), p.call(i, t.message, e, n, r, s), i.cause = t, i.name = t.name, o && Object.assign(i, o), i;
};
const Ut = null;
function ee(t) {
return a.isPlainObject(t) || a.isArray(t);
}
function Ue(t) {
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
}
function pe(t, e, n) {
return t ? t.concat(e).map(function(s, o) {
return s = Ue(s), !n && o ? "[" + s + "]" : s;
}).join(n ? "." : "") : e;
}
function kt(t) {
return a.isArray(t) && !t.some(ee);
}
const It = a.toFlatObject(a, {}, null, function(e) {
return /^is[A-Z]/.test(e);
});
function v(t, e, n) {
if (!a.isObject(t))
throw new TypeError("target must be an object");
e = e || new FormData(), n = a.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(m, E) {
return !a.isUndefined(E[m]);
});
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
if (!a.isFunction(s))
throw new TypeError("visitor must be a function");
function u(h) {
if (h === null)
return "";
if (a.isDate(h))
return h.toISOString();
if (!f && a.isBlob(h))
throw new p("Blob is not supported. Use a Buffer instead.");
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
}
function l(h, m, E) {
let S = h;
if (h && !E && typeof h == "object") {
if (a.endsWith(m, "{}"))
m = r ? m : m.slice(0, -2), h = JSON.stringify(h);
else if (a.isArray(h) && kt(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (S = a.toArray(h)))
return m = Ue(m), S.forEach(function(w, U) {
!(a.isUndefined(w) || w === null) && e.append(
// eslint-disable-next-line no-nested-ternary
i === !0 ? pe([m], U, o) : i === null ? m : m + "[]",
u(w)
);
}), !1;
}
return ee(h) ? !0 : (e.append(pe(E, m, o), u(h)), !1);
}
const d = [], g = Object.assign(It, {
defaultVisitor: l,
convertValue: u,
isVisitable: ee
});
function y(h, m) {
if (!a.isUndefined(h)) {
if (d.indexOf(h) !== -1)
throw Error("Circular reference detected in " + m.join("."));
d.push(h), a.forEach(h, function(S, P) {
(!(a.isUndefined(S) || S === null) && s.call(
e,
S,
a.isString(P) ? P.trim() : P,
m,
g
)) === !0 && y(S, m ? m.concat(P) : [P]);
}), d.pop();
}
}
if (!a.isObject(t))
throw new TypeError("data must be an object");
return y(t), e;
}
function me(t) {
const e = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
return e[r];
});
}
function ae(t, e) {
this._pairs = [], t && v(t, this, e);
}
const ke = ae.prototype;
ke.append = function(e, n) {
this._pairs.push([e, n]);
};
ke.toString = function(e) {
const n = e ? function(r) {
return e.call(this, r, me);
} : me;
return this._pairs.map(function(s) {
return n(s[0]) + "=" + n(s[1]);
}, "").join("&");
};
function qt(t) {
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function Ie(t, e, n) {
if (!e)
return t;
const r = n && n.encode || qt, s = n && n.serialize;
let o;
if (s ? o = s(e, n) : o = a.isURLSearchParams(e) ? e.toString() : new ae(e, n).toString(r), o) {
const i = t.indexOf("#");
i !== -1 && (t = t.slice(0, i)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
}
return t;
}
class ye {
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(e, n, r) {
return this.handlers.push({
fulfilled: e,
rejected: n,
synchronous: r ? r.synchronous : !1,
runWhen: r ? r.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(e) {
this.handlers[e] && (this.handlers[e] = 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(e) {
a.forEach(this.handlers, function(r) {
r !== null && e(r);
});
}
}
const qe = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, Ht = typeof URLSearchParams < "u" ? URLSearchParams : ae, jt = typeof FormData < "u" ? FormData : null, Mt = typeof Blob < "u" ? Blob : null, Wt = {
isBrowser: !0,
classes: {
URLSearchParams: Ht,
FormData: jt,
Blob: Mt
},
protocols: ["http", "https", "file", "blob", "url", "data"]
}, ce = typeof window < "u" && typeof document < "u", $t = ((t) => ce && ["ReactNative", "NativeScript", "NS"].indexOf(t) < 0)(typeof navigator < "u" && navigator.product), zt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jt = ce && window.location.href || "http://localhost", Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
hasBrowserEnv: ce,
hasStandardBrowserEnv: $t,
hasStandardBrowserWebWorkerEnv: zt,
origin: Jt
}, Symbol.toStringTag, { value: "Module" })), A = {
...Vt,
...Wt
};
function vt(t, e) {
return v(t, new A.classes.URLSearchParams(), Object.assign({
visitor: function(n, r, s, o) {
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
}
}, e));
}
function Kt(t) {
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
}
function Xt(t) {
const e = {}, n = Object.keys(t);
let r;
const s = n.length;
let o;
for (r = 0; r < s; r++)
o = n[r], e[o] = t[o];
return e;
}
function He(t) {
function e(n, r, s, o) {
let i = n[o++];
if (i === "__proto__")
return !0;
const c = Number.isFinite(+i), f = o >= n.length;
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Xt(s[i])), !c);
}
if (a.isFormData(t) && a.isFunction(t.entries)) {
const n = {};
return a.forEachEntry(t, (r, s) => {
e(Kt(r), s, n, 0);
}), n;
}
return null;
}
function Gt(t, e, n) {
if (a.isString(t))
try {
return (e || JSON.parse)(t), a.trim(t);
} catch (r) {
if (r.name !== "SyntaxError")
throw r;
}
return (n || JSON.stringify)(t);
}
const H = {
transitional: qe,
adapter: ["xhr", "http", "fetch"],
transformRequest: [function(e, n) {
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
return s ? JSON.stringify(He(e)) : e;
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
return e;
if (a.isArrayBufferView(e))
return e.buffer;
if (a.isURLSearchParams(e))
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
let c;
if (o) {
if (r.indexOf("application/x-www-form-urlencoded") > -1)
return vt(e, this.formSerializer).toString();
if ((c = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
const f = this.env && this.env.FormData;
return v(
c ? { "files[]": e } : e,
f && new f(),
this.formSerializer
);
}
}
return o || s ? (n.setContentType("application/json", !1), Gt(e)) : e;
}],
transformResponse: [function(e) {
const n = this.transitional || H.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
if (a.isResponse(e) || a.isReadableStream(e))
return e;
if (e && a.isString(e) && (r && !this.responseType || s)) {
const i = !(n && n.silentJSONParsing) && s;
try {
return JSON.parse(e);
} catch (c) {
if (i)
throw c.name === "SyntaxError" ? p.from(c, p.ERR_BAD_RESPONSE, this, null, this.response) : c;
}
}
return e;
}],
/**
* 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: A.classes.FormData,
Blob: A.classes.Blob
},
validateStatus: function(e) {
return e >= 200 && e < 300;
},
headers: {
common: {
Accept: "application/json, text/plain, */*",
"Content-Type": void 0
}
}
};
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
H.headers[t] = {};
});
const Qt = 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"
]), Yt = (t) => {
const e = {};
let n, r, s;
return t && t.split(`
`).forEach(function(i) {
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && Qt[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
}), e;
}, ge = Symbol("internals");
function k(t) {
return t && String(t).trim().toLowerCase();
}
function M(t) {
return t === !1 || t == null ? t : a.isArray(t) ? t.map(M) : String(t);
}
function Zt(t) {
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let r;
for (; r = n.exec(t); )
e[r[1]] = r[2];
return e;
}
const en = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
function G(t, e, n, r, s) {
if (a.isFunction(r))
return r.call(this, e, n);
if (s && (e = n), !!a.isString(e)) {
if (a.isString(r))
return e.indexOf(r) !== -1;
if (a.isRegExp(r))
return r.test(e);
}
}
function tn(t) {
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
}
function nn(t, e) {
const n = a.toCamelCase(" " + e);
["get", "set", "has"].forEach((r) => {
Object.defineProperty(t, r + n, {
value: function(s, o, i) {
return this[r].call(this, e, s, o, i);
},
configurable: !0
});
});
}
class R {
constructor(e) {
e && this.set(e);
}
set(e, n, r) {
const s = this;
function o(c, f, u) {
const l = k(f);
if (!l)
throw new Error("header name must be a non-empty string");
const d = a.findKey(s, l);
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = M(c));
}
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
if (a.isPlainObject(e) || e instanceof this.constructor)
i(e, n);
else if (a.isString(e) && (e = e.trim()) && !en(e))
i(Yt(e), n);
else if (a.isHeaders(e))
for (const [c, f] of e.entries())
o(f, c, r);
else
e != null && o(n, e, r);
return this;
}
get(e, n) {
if (e = k(e), e) {
const r = a.findKey(this, e);
if (r) {
const s = this[r];
if (!n)
return s;
if (n === !0)
return Zt(s);
if (a.isFunction(n))
return n.call(this, s, r);
if (a.isRegExp(n))
return n.exec(s);
throw new TypeError("parser must be boolean|regexp|function");
}
}
}
has(e, n) {
if (e = k(e), e) {
const r = a.findKey(this, e);
return !!(r && this[r] !== void 0 && (!n || G(this, this[r], r, n)));
}
return !1;
}
delete(e, n) {
const r = this;
let s = !1;
function o(i) {
if (i = k(i), i) {
const c = a.findKey(r, i);
c && (!n || G(r, r[c], c, n)) && (delete r[c], s = !0);
}
}
return a.isArray(e) ? e.forEach(o) : o(e), s;
}
clear(e) {
const n = Object.keys(this);
let r = n.length, s = !1;
for (; r--; ) {
const o = n[r];
(!e || G(this, this[o], o, e, !0)) && (delete this[o], s = !0);
}
return s;
}
normalize(e) {
const n = this, r = {};
return a.forEach(this, (s, o) => {
const i = a.findKey(r, o);
if (i) {
n[i] = M(s), delete n[o];
return;
}
const c = e ? tn(o) : String(o).trim();
c !== o && delete n[o], n[c] = M(s), r[c] = !0;
}), this;
}
concat(...e) {
return this.constructor.concat(this, ...e);
}
toJSON(e) {
const n = /* @__PURE__ */ Object.create(null);
return a.forEach(this, (r, s) => {
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
}), n;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
`);
}
get [Symbol.toStringTag]() {
return "AxiosHeaders";
}
static from(e) {
return e instanceof this ? e : new this(e);
}
static concat(e, ...n) {
const r = new this(e);
return n.forEach((s) => r.set(s)), r;
}
static accessor(e) {
const r = (this[ge] = this[ge] = {
accessors: {}
}).accessors, s = this.prototype;
function o(i) {
const c = k(i);
r[c] || (nn(s, i), r[c] = !0);
}
return a.isArray(e) ? e.forEach(o) : o(e), this;
}
}
R.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
a.reduceDescriptors(R.prototype, ({ value: t }, e) => {
let n = e[0].toUpperCase() + e.slice(1);
return {
get: () => t,
set(r) {
this[n] = r;
}
};
});
a.freezeMethods(R);
function Q(t, e) {
const n = this || H, r = e || n, s = R.from(r.headers);
let o = r.data;
return a.forEach(t, function(c) {
o = c.call(n, o, s.normalize(), e ? e.status : void 0);
}), s.normalize(), o;
}
function je(t) {
return !!(t && t.__CANCEL__);
}
function B(t, e, n) {
p.call(this, t ?? "canceled", p.ERR_CANCELED, e, n), this.name = "CanceledError";
}
a.inherits(B, p, {
__CANCEL__: !0
});
function Me(t, e, n) {
const r = n.config.validateStatus;
!n.status || !r || r(n.status) ? t(n) : e(new p(
"Request failed with status code " + n.status,
[p.ERR_BAD_REQUEST, p.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
n.config,
n.request,
n
));
}
function rn(t) {
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
return e && e[1] || "";
}
function sn(t, e) {
t = t || 10;
const n = new Array(t), r = new Array(t);
let s = 0, o = 0, i;
return e = e !== void 0 ? e : 1e3, function(f) {
const u = Date.now(), l = r[o];
i || (i = u), n[s] = f, r[s] = u;
let d = o, g = 0;
for (; d !== s; )
g += n[d++], d = d % t;
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
return;
const y = l && u - l;
return y ? Math.round(g * 1e3 / y) : void 0;
};
}
function on(t, e) {
let n = 0;
const r = 1e3 / e;
let s = null;
return function() {
const i = this === !0, c = Date.now();
if (i || c - n > r)
return s && (clearTimeout(s), s = null), n = c, t.apply(null, arguments);
s || (s = setTimeout(() => (s = null, n = Date.now(), t.apply(null, arguments)), r - (c - n)));
};
}
const W = (t, e, n = 3) => {
let r = 0;
const s = sn(50, 250);
return on((o) => {
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
r = i;
const d = {
loaded: i,
total: c,
progress: c ? i / c : void 0,
bytes: f,
rate: u || void 0,
estimated: u && c && l ? (c - i) / u : void 0,
event: o,
lengthComputable: c != null
};
d[e ? "download" : "upload"] = !0, t(d);
}, n);
}, an = A.hasStandardBrowserEnv ? (
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
function() {
const e = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
let r;
function s(o) {
let i = o;
return e && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
href: n.href,
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
host: n.host,
search: n.search ? n.search.replace(/^\?/, "") : "",
hash: n.hash ? n.hash.replace(/^#/, "") : "",
hostname: n.hostname,
port: n.port,
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
};
}
return r = s(window.location.href), function(i) {
const c = a.isString(i) ? s(i) : i;
return c.protocol === r.protocol && c.host === r.host;
};
}()
) : (
// Non standard browser envs (web workers, react-native) lack needed support.
/* @__PURE__ */ function() {
return function() {
return !0;
};
}()
), cn = A.hasStandardBrowserEnv ? (
// Standard browser envs support document.cookie
{
write(t, e, n, r, s, o) {
const i = [t + "=" + encodeURIComponent(e)];
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
},
read(t) {
const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
return e ? decodeURIComponent(e[3]) : null;
},
remove(t) {
this.write(t, "", Date.now() - 864e5);
}
}
) : (
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {
},
read() {
return null;
},
remove() {
}
}
);
function ln(t) {
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
}
function un(t, e) {
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
}
function We(t, e) {
return t && !ln(e) ? un(t, e) : e;
}
const we = (t) => t instanceof R ? { ...t } : t;
function D(t, e) {
e = e || {};
const n = {};
function r(u, l, d) {
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: d }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
}
function s(u, l, d) {
if (a.isUndefined(l)) {
if (!a.isUndefined(u))
return r(void 0, u, d);
} else
return r(u, l, d);
}
function o(u, l) {
if (!a.isUndefined(l))
return r(void 0, l);
}
function i(u, l) {
if (a.isUndefined(l)) {
if (!a.isUndefined(u))
return r(void 0, u);
} else
return r(void 0, l);
}
function c(u, l, d) {
if (d in e)
return r(u, l);
if (d in t)
return r(void 0, u);
}
const f = {
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: c,
headers: (u, l) => s(we(u), we(l), !0)
};
return a.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
const d = f[l] || s, g = d(t[l], e[l], l);
a.isUndefined(g) && d !== c || (n[l] = g);
}), n;
}
const $e = (t) => {
const e = D({}, t);
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = e;
e.headers = i = R.from(i), e.url = Ie(We(e.baseURL, e.url), t.params, t.paramsSerializer), c && i.set(
"Authorization",
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
);
let f;
if (a.isFormData(n)) {
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
i.setContentType(void 0);
else if ((f = i.getContentType()) !== !1) {
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
i.setContentType([u || "multipart/form-data", ...l].join("; "));
}
}
if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(e)), r || r !== !1 && an(e.url))) {
const u = s && o && cn.read(o);
u && i.set(s, u);
}
return e;
}, fn = typeof XMLHttpRequest < "u", dn = fn && function(t) {
return new Promise(function(n, r) {
const s = $e(t);
let o = s.data;
const i = R.from(s.headers).normalize();
let { responseType: c } = s, f;
function u() {
s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
}
let l = new XMLHttpRequest();
l.open(s.method.toUpperCase(), s.url, !0), l.timeout = s.timeout;
function d() {
if (!l)
return;
const y = R.from(
"getAllResponseHeaders" in l && l.getAllResponseHeaders()
), m = {
data: !c || c === "text" || c === "json" ? l.responseText : l.response,
status: l.status,
statusText: l.statusText,
headers: y,
config: t,
request: l
};
Me(function(S) {
n(S), u();
}, function(S) {
r(S), u();
}, m), l = null;
}
"onloadend" in l ? l.onloadend = d : l.onreadystatechange = function() {
!l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(d);
}, l.onabort = function() {
l && (r(new p("Request aborted", p.ECONNABORTED, s, l)), l = null);
}, l.onerror = function() {
r(new p("Network Error", p.ERR_NETWORK, s, l)), l = null;
}, l.ontimeout = function() {
let h = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
const m = s.transitional || qe;
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), r(new p(
h,
m.clarifyTimeoutError ? p.ETIMEDOUT : p.ECONNABORTED,
s,
l
)), l = null;
}, o === void 0 && i.setContentType(null), "setRequestHeader" in l && a.forEach(i.toJSON(), function(h, m) {
l.setRequestHeader(m, h);
}), a.isUndefined(s.withCredentials) || (l.withCredentials = !!s.withCredentials), c && c !== "json" && (l.responseType = s.responseType), typeof s.onDownloadProgress == "function" && l.addEventListener("progress", W(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", W(s.onUploadProgress)), (s.cancelToken || s.signal) && (f = (y) => {
l && (r(!y || y.type ? new B(null, t, l) : y), l.abort(), l = null);
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
const g = rn(s.url);
if (g && A.protocols.indexOf(g) === -1) {
r(new p("Unsupported protocol " + g + ":", p.ERR_BAD_REQUEST, t));
return;
}
l.send(o || null);
});
}, hn = (t, e) => {
let n = new AbortController(), r;
const s = function(f) {
if (!r) {
r = !0, i();
const u = f instanceof Error ? f : this.reason;
n.abort(u instanceof p ? u : new B(u instanceof Error ? u.message : u));
}
};
let o = e && setTimeout(() => {
s(new p(`timeout ${e} of ms exceeded`, p.ETIMEDOUT));
}, e);
const i = () => {
t && (o && clearTimeout(o), o = null, t.forEach((f) => {
f && (f.removeEventListener ? f.removeEventListener("abort", s) : f.unsubscribe(s));
}), t = null);
};
t.forEach((f) => f && f.addEventListener && f.addEventListener("abort", s));
const { signal: c } = n;
return c.unsubscribe = i, [c, () => {
o && clearTimeout(o), o = null;
}];
}, pn = function* (t, e) {
let n = t.byteLength;
if (!e || n < e) {
yield t;
return;
}
let r = 0, s;
for (; r < n; )
s = r + e, yield t.slice(r, s), r = s;
}, mn = async function* (t, e, n) {
for await (const r of t)
yield* pn(ArrayBuffer.isView(r) ? r : await n(String(r)), e);
}, be = (t, e, n, r, s) => {
const o = mn(t, e, s);
let i = 0;
return new ReadableStream({
type: "bytes",
async pull(c) {
const { done: f, value: u } = await o.next();
if (f) {
c.close(), r();
return;
}
let l = u.byteLength;
n && n(i += l), c.enqueue(new Uint8Array(u));
},
cancel(c) {
return r(c), o.return();
}
}, {
highWaterMark: 2
});
}, Ee = (t, e) => {
const n = t != null;
return (r) => setTimeout(() => e({
lengthComputable: n,
total: t,
loaded: r
}));
}, K = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ze = K && typeof ReadableStream == "function", te = K && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), yn = ze && (() => {
let t = !1;
const e = new Request(A.origin, {
body: new ReadableStream(),
method: "POST",
get duplex() {
return t = !0, "half";
}
}).headers.has("Content-Type");
return t && !e;
})(), Se = 64 * 1024, ne = ze && !!(() => {
try {
return a.isReadableStream(new Response("").body);
} catch {
}
})(), $ = {
stream: ne && ((t) => t.body)
};
K && ((t) => {
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
!$[e] && ($[e] = a.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
throw new p(`Response type '${e}' is not supported`, p.ERR_NOT_SUPPORT, r);
});
});
})(new Response());
const gn = async (t) => {
if (t == null)
return 0;
if (a.isBlob(t))
return t.size;
if (a.isSpecCompliantForm(t))
return (await new Request(t).arrayBuffer()).byteLength;
if (a.isArrayBufferView(t))
return t.byteLength;
if (a.isURLSearchParams(t) && (t = t + ""), a.isString(t))
return (await te(t)).byteLength;
}, wn = async (t, e) => {
const n = a.toFiniteNumber(t.getContentLength());
return n ?? gn(e);
}, bn = K && (async (t) => {
let {
url: e,
method: n,
data: r,
signal: s,
cancelToken: o,
timeout: i,
onDownloadProgress: c,
onUploadProgress: f,
responseType: u,
headers: l,
withCredentials: d = "same-origin",
fetchOptions: g
} = $e(t);
u = u ? (u + "").toLowerCase() : "text";
let [y, h] = s || o || i ? hn([s, o], i) : [], m, E;
const S = () => {
!m && setTimeout(() => {
y && y.unsubscribe();
}), m = !0;
};
let P;
try {
if (f && yn && n !== "get" && n !== "head" && (P = await wn(l, r)) !== 0) {
let x = new Request(e, {
method: "POST",
body: r,
duplex: "half"
}), F;
a.isFormData(r) && (F = x.headers.get("content-type")) && l.setContentType(F), x.body && (r = be(x.body, Se, Ee(
P,
W(f)
), null, te));
}
a.isString(d) || (d = d ? "cors" : "omit"), E = new Request(e, {
...g,
signal: y,
method: n.toUpperCase(),
headers: l.normalize().toJSON(),
body: r,
duplex: "half",
withCredentials: d
});
let w = await fetch(E);
const U = ne && (u === "stream" || u === "response");
if (ne && (c || U)) {
const x = {};
["status", "statusText", "headers"].forEach((fe) => {
x[fe] = w[fe];
});
const F = a.toFiniteNumber(w.headers.get("content-length"));
w = new Response(
be(w.body, Se, c && Ee(
F,
W(c, !0)
), U && S, te),
x
);
}
u = u || "text";
let Ke = await $[a.findKey($, u) || "text"](w, t);
return !U && S(), h && h(), await new Promise((x, F) => {
Me(x, F, {
data: Ke,
headers: R.from(w.headers),
status: w.status,
statusText: w.statusText,
config: t,
request: E
});
});
} catch (w) {
throw S(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
new p("Network Error", p.ERR_NETWORK, t, E),
{
cause: w.cause || w
}
) : p.from(w, w && w.code, t, E);
}
}), re = {
http: Ut,
xhr: dn,
fetch: bn
};
a.forEach(re, (t, e) => {
if (t) {
try {
Object.defineProperty(t, "name", { value: e });
} catch {
}
Object.defineProperty(t, "adapterName", { value: e });
}
});
const Oe = (t) => `- ${t}`, En = (t) => a.isFunction(t) || t === null || t === !1, Je = {
getAdapter: (t) => {
t = a.isArray(t) ? t : [t];
const { length: e } = t;
let n, r;
const s = {};
for (let o = 0; o < e; o++) {
n = t[o];
let i;
if (r = n, !En(n) && (r = re[(i = String(n)).toLowerCase()], r === void 0))
throw new p(`Unknown adapter '${i}'`);
if (r)
break;
s[i || "#" + o] = r;
}
if (!r) {
const o = Object.entries(s).map(
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
);
let i = e ? o.length > 1 ? `since :
` + o.map(Oe).join(`
`) : " " + Oe(o[0]) : "as no adapter specified";
throw new p(
"There is no suitable adapter to dispatch the request " + i,
"ERR_NOT_SUPPORT"
);
}
return r;
},
adapters: re
};
function Y(t) {
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
throw new B(null, t);
}
function Re(t) {
return Y(t), t.headers = R.from(t.headers), t.data = Q.call(
t,
t.transformRequest
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Je.getAdapter(t.adapter || H.adapter)(t).then(function(r) {
return Y(t), r.data = Q.call(
t,
t.transformResponse,
r
), r.headers = R.from(r.headers), r;
}, function(r) {
return je(r) || (Y(t), r && r.response && (r.response.data = Q.call(
t,
t.transformResponse,
r.response
), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
});
}
const Ve = "1.7.2", le = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
le[t] = function(r) {
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
};
});
const Te = {};
le.transitional = function(e, n, r) {
function s(o, i) {
return "[Axios v" + Ve + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
}
return (o, i, c) => {
if (e === !1)
throw new p(
s(i, " has been removed" + (n ? " in " + n : "")),
p.ERR_DEPRECATED
);
return n && !Te[i] && (Te[i] = !0, console.warn(
s(
i,
" has been deprecated since v" + n + " and will be removed in the near future"
)
)), e ? e(o, i, c) : !0;
};
};
function Sn(t, e, n) {
if (typeof t != "object")
throw new p("options must be an object", p.ERR_BAD_OPTION_VALUE);
const r = Object.keys(t);
let s = r.length;
for (; s-- > 0; ) {
const o = r[s], i = e[o];
if (i) {
const c = t[o], f = c === void 0 || i(c, o, t);
if (f !== !0)
throw new p("option " + o + " must be " + f, p.ERR_BAD_OPTION_VALUE);
continue;
}
if (n !== !0)
throw new p("Unknown option " + o, p.ERR_BAD_OPTION);
}
}
const se = {
assertOptions: Sn,
validators: le
}, C = se.validators;
class L {
constructor(e) {
this.defaults = e, this.interceptors = {
request: new ye(),
response: new ye()
};
}
/**
* 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(e, n) {
try {
return await this._request(e, n);
} catch (r) {
if (r instanceof Error) {
let s;
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
try {
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
` + o) : r.stack = o;
} catch {
}
}
throw r;
}
}
_request(e, n) {
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = D(this.defaults, n);
const { transitional: r, paramsSerializer: s, headers: o } = n;
r !== void 0 && se.assertOptions(r, {
silentJSONParsing: C.transitional(C.boolean),
forcedJSONParsing: C.transitional(C.boolean),
clarifyTimeoutError: C.transitional(C.boolean)
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
serialize: s
} : se.assertOptions(s, {
encode: C.function,
serialize: C.function
}, !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"],
(h) => {
delete o[h];
}
), n.headers = R.concat(i, o);
const c = [];
let f = !0;
this.interceptors.request.forEach(function(m) {
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
});
const u = [];
this.interceptors.response.forEach(function(m) {
u.push(m.fulfilled, m.rejected);
});
let l, d = 0, g;
if (!f) {
const h = [Re.bind(this), void 0];
for (h.unshift.apply(h, c), h.push.apply(h, u), g = h.length, l = Promise.resolve(n); d < g; )
l = l.then(h[d++], h[d++]);
return l;
}
g = c.length;
let y = n;
for (d = 0; d < g; ) {
const h = c[d++], m = c[d++];
try {
y = h(y);
} catch (E) {
m.call(this, E);
break;
}
}
try {
l = Re.call(this, y);
} catch (h) {
return Promise.reject(h);
}
for (d = 0, g = u.length; d < g; )
l = l.then(u[d++], u[d++]);
return l;
}
getUri(e) {
e = D(this.defaults, e);
const n = We(e.baseURL, e.url);
return Ie(n, e.params, e.paramsSerializer);
}
}
a.forEach(["delete", "get", "head", "options"], function(e) {
L.prototype[e] = function(n, r) {
return this.request(D(r || {}, {
method: e,
url: n,
data: (r || {}).data
}));
};
});
a.forEach(["post", "put", "patch"], function(e) {
function n(r) {
return function(o, i, c) {
return this.request(D(c || {}, {
method: e,
headers: r ? {
"Content-Type": "multipart/form-data"
} : {},
url: o,
data: i
}));
};
}
L.prototype[e] = n(), L.prototype[e + "Form"] = n(!0);
});
class ue {
constructor(e) {
if (typeof e != "function")
throw new TypeError("executor must be a function.");
let n;
this.promise = new Promise(function(o) {
n = o;
});
const r = this;
this.promise.then((s) => {
if (!r._listeners)
return;
let o = r._listeners.length;
for (; o-- > 0; )
r._listeners[o](s);
r._listeners = null;
}), this.promise.then = (s) => {
let o;
const i = new Promise((c) => {
r.subscribe(c), o = c;
}).then(s);
return i.cancel = function() {
r.unsubscribe(o);
}, i;
}, e(function(o, i, c) {
r.reason || (r.reason = new B(o, i, c), n(r.reason));
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason)
throw this.reason;
}
/**
* Subscribe to the cancel signal
*/
subscribe(e) {
if (this.reason) {
e(this.reason);
return;
}
this._listeners ? this._listeners.push(e) : this._listeners = [e];
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(e) {
if (!this._listeners)
return;
const n = this._listeners.indexOf(e);
n !== -1 && this._listeners.splice(n, 1);
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let e;
return {
token: new ue(function(s) {
e = s;
}),
cancel: e
};
}
}
function On(t) {
return function(n) {
return t.apply(null, n);
};
}
function Rn(t) {
return a.isObject(t) && t.isAxiosError === !0;
}
const oe = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511
};
Object.entries(oe).forEach(([t, e]) => {
oe[e] = t;
});
function ve(t) {
const e = new L(t), n = Ae(L.prototype.request, e);
return a.extend(n, L.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
return ve(D(t, s));
}, n;
}
const b = ve(H);
b.Axios = L;
b.CanceledError = B;
b.CancelToken = ue;
b.isCancel = je;
b.VERSION = Ve;
b.toFormData = v;
b.AxiosError = p;
b.Cancel = b.CanceledError;
b.all = function(e) {
return Promise.all(e);
};
b.spread = On;
b.isAxiosError = Rn;
b.mergeConfig = D;
b.AxiosHeaders = R;
b.formToJSON = (t) => He(a.isHTMLForm(t) ? new FormData(t) : t);
b.getAdapter = Je.getAdapter;
b.HttpStatusCode = oe;
b.default = b;
async function Tn(t) {
let e = (t == null ? void 0 : t.url) || null, n = (t == null ? void 0 : t.method) || "get", r = (t == null ? void 0 : t.data) || null, s = (t == null ? void 0 : t.auth) || null, o = {
method: n,
url: e,
timeout: 1e3 * 60 * 3,
//wait 3 minute
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${s}`
}
};
return r && (o.data = JSON.stringify(r)), t != null && t.headers && (o.headers = { ...o.headers, ...t.headers }), await b(o).then(function(c) {
return c.data;
}).catch(function(c) {
return c;
});
}
class Nn {
constructor(e) {
O(this, "pos1", 0);
O(this, "pos2", 0);
O(this, "pos3", 0);
O(this, "pos4", 0);
O(this, "host", null);
O(this, "apikey", null);
O(this, "userkey", null);
O(this, "position", "right");
O(this, "width", 250);
O(this, "height", 245);
O(this, "widgetTitle", '<i class="icon-phone-outline"></i> ION Phone');
O(this, "colorHeader", null);
O(this, "settingDom", { embed: null, fit: !0 });
O(this, "callback", {
"connection-status": (e) => e,
"registration-status": (e) => e,
"call-listen": (e) => e,
"call-status": (e) => e,
"dial-established": (e) => e,
unregistered: (e) => e,
"auto-dial": (e) => e,
info: (e) => e,
queue: (e) => e
});
var n, r, s, o, i, c, f, u, l, d, g;
this.host = e.credential.host