function Ie(e, t) {
  return function() {
    return e.apply(t, arguments);
  };
}
const { toString: pt } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: te, toStringTag: qe } = Symbol, re = /* @__PURE__ */ ((e) => (t) => {
  const r = pt.call(t);
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), L = (e) => (e = e.toLowerCase(), (t) => re(t) === e), ne = (e) => (t) => typeof t === e, { isArray: I } = Array, H = ne("undefined");
function J(e) {
  return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const Me = L("ArrayBuffer");
function mt(e) {
  let t;
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Me(e.buffer), t;
}
const bt = ne("string"), _ = ne("function"), He = ne("number"), $ = (e) => e !== null && typeof e == "object", wt = (e) => e === !0 || e === !1, V = (e) => {
  if (re(e) !== "object")
    return !1;
  const t = ye(e);
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(qe in e) && !(te in e);
}, yt = (e) => {
  if (!$(e) || J(e))
    return !1;
  try {
    return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
  } catch {
    return !1;
  }
}, gt = L("Date"), Et = L("File"), St = L("Blob"), Rt = L("FileList"), At = (e) => $(e) && _(e.pipe), Tt = (e) => {
  let t;
  return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = re(e)) === "formdata" || // detect form-data instance
  t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
}, Ot = L("URLSearchParams"), [_t, Ct, xt, Lt] = ["ReadableStream", "Request", "Response", "Headers"].map(L), vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function G(e, t, { allOwnKeys: r = !1 } = {}) {
  if (e === null || typeof e > "u")
    return;
  let n, s;
  if (typeof e != "object" && (e = [e]), I(e))
    for (n = 0, s = e.length; n < s; n++)
      t.call(null, e[n], n, e);
  else {
    if (J(e))
      return;
    const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), a = o.length;
    let i;
    for (n = 0; n < a; n++)
      i = o[n], t.call(null, e[i], i, e);
  }
}
function ze(e, t) {
  if (J(e))
    return null;
  t = t.toLowerCase();
  const r = Object.keys(e);
  let n = r.length, s;
  for (; n-- > 0; )
    if (s = r[n], t === s.toLowerCase())
      return s;
  return null;
}
const k = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Je = (e) => !H(e) && e !== k;
function ue() {
  const { caseless: e } = Je(this) && this || {}, t = {}, r = (n, s) => {
    const o = e && ze(t, s) || s;
    V(t[o]) && V(n) ? t[o] = ue(t[o], n) : V(n) ? t[o] = ue({}, n) : I(n) ? t[o] = n.slice() : t[o] = n;
  };
  for (let n = 0, s = arguments.length; n < s; n++)
    arguments[n] && G(arguments[n], r);
  return t;
}
const Pt = (e, t, r, { allOwnKeys: n } = {}) => (G(t, (s, o) => {
  r && _(s) ? e[o] = Ie(s, r) : e[o] = s;
}, { allOwnKeys: n }), e), jt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ft = (e, t, r, n) => {
  e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
    value: t.prototype
  }), r && Object.assign(e.prototype, r);
}, kt = (e, t, r, n) => {
  let s, o, a;
  const i = {};
  if (t = t || {}, e == null) return t;
  do {
    for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
      a = s[o], (!n || n(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
    e = r !== !1 && ye(e);
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
  return t;
}, Nt = (e, t, r) => {
  e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
  const n = e.indexOf(t, r);
  return n !== -1 && n === r;
}, Ut = (e) => {
  if (!e) return null;
  if (I(e)) return e;
  let t = e.length;
  if (!He(t)) return null;
  const r = new Array(t);
  for (; t-- > 0; )
    r[t] = e[t];
  return r;
}, Dt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Bt = (e, t) => {
  const n = (e && e[te]).call(e);
  let s;
  for (; (s = n.next()) && !s.done; ) {
    const o = s.value;
    t.call(e, o[0], o[1]);
  }
}, It = (e, t) => {
  let r;
  const n = [];
  for (; (r = e.exec(t)) !== null; )
    n.push(r);
  return n;
}, qt = L("HTMLFormElement"), Mt = (e) => e.toLowerCase().replace(
  /[-_\s]([a-z\d])(\w*)/g,
  function(r, n, s) {
    return n.toUpperCase() + s;
  }
), Re = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Ht = L("RegExp"), $e = (e, t) => {
  const r = Object.getOwnPropertyDescriptors(e), n = {};
  G(r, (s, o) => {
    let a;
    (a = t(s, o, e)) !== !1 && (n[o] = a || s);
  }), Object.defineProperties(e, n);
}, zt = (e) => {
  $e(e, (t, r) => {
    if (_(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
      return !1;
    const n = e[r];
    if (_(n)) {
      if (t.enumerable = !1, "writable" in t) {
        t.writable = !1;
        return;
      }
      t.set || (t.set = () => {
        throw Error("Can not rewrite read-only method '" + r + "'");
      });
    }
  });
}, Jt = (e, t) => {
  const r = {}, n = (s) => {
    s.forEach((o) => {
      r[o] = !0;
    });
  };
  return I(e) ? n(e) : n(String(e).split(t)), r;
}, $t = () => {
}, Gt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
function Kt(e) {
  return !!(e && _(e.append) && e[qe] === "FormData" && e[te]);
}
const Wt = (e) => {
  const t = new Array(10), r = (n, s) => {
    if ($(n)) {
      if (t.indexOf(n) >= 0)
        return;
      if (J(n))
        return n;
      if (!("toJSON" in n)) {
        t[s] = n;
        const o = I(n) ? [] : {};
        return G(n, (a, i) => {
          const d = r(a, s + 1);
          !H(d) && (o[i] = d);
        }), t[s] = void 0, o;
      }
    }
    return n;
  };
  return r(e, 0);
}, Vt = L("AsyncFunction"), Xt = (e) => e && ($(e) || _(e)) && _(e.then) && _(e.catch), Ge = ((e, t) => e ? setImmediate : t ? ((r, n) => (k.addEventListener("message", ({ source: s, data: o }) => {
  s === k && o === r && n.length && n.shift()();
}, !1), (s) => {
  n.push(s), k.postMessage(r, "*");
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
  typeof setImmediate == "function",
  _(k.postMessage)
), Yt = typeof queueMicrotask < "u" ? queueMicrotask.bind(k) : typeof process < "u" && process.nextTick || Ge, Qt = (e) => e != null && _(e[te]), c = {
  isArray: I,
  isArrayBuffer: Me,
  isBuffer: J,
  isFormData: Tt,
  isArrayBufferView: mt,
  isString: bt,
  isNumber: He,
  isBoolean: wt,
  isObject: $,
  isPlainObject: V,
  isEmptyObject: yt,
  isReadableStream: _t,
  isRequest: Ct,
  isResponse: xt,
  isHeaders: Lt,
  isUndefined: H,
  isDate: gt,
  isFile: Et,
  isBlob: St,
  isRegExp: Ht,
  isFunction: _,
  isStream: At,
  isURLSearchParams: Ot,
  isTypedArray: Dt,
  isFileList: Rt,
  forEach: G,
  merge: ue,
  extend: Pt,
  trim: vt,
  stripBOM: jt,
  inherits: Ft,
  toFlatObject: kt,
  kindOf: re,
  kindOfTest: L,
  endsWith: Nt,
  toArray: Ut,
  forEachEntry: Bt,
  matchAll: It,
  isHTMLForm: qt,
  hasOwnProperty: Re,
  hasOwnProp: Re,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors: $e,
  freezeMethods: zt,
  toObjectSet: Jt,
  toCamelCase: Mt,
  noop: $t,
  toFiniteNumber: Gt,
  findKey: ze,
  global: k,
  isContextDefined: Je,
  isSpecCompliantForm: Kt,
  toJSONObject: Wt,
  isAsyncFn: Vt,
  isThenable: Xt,
  setImmediate: Ge,
  asap: Yt,
  isIterable: Qt
};
function w(e, t, r, n, s) {
  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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
}
c.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: c.toJSONObject(this.config),
      code: this.code,
      status: this.status
    };
  }
});
const Ke = w.prototype, We = {};
[
  "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) => {
  We[e] = { value: e };
});
Object.defineProperties(w, We);
Object.defineProperty(Ke, "isAxiosError", { value: !0 });
w.from = (e, t, r, n, s, o) => {
  const a = Object.create(Ke);
  return c.toFlatObject(e, a, function(d) {
    return d !== Error.prototype;
  }, (i) => i !== "isAxiosError"), w.call(a, e.message, t, r, n, s), a.cause = e, a.name = e.name, o && Object.assign(a, o), a;
};
const Zt = null;
function de(e) {
  return c.isPlainObject(e) || c.isArray(e);
}
function Ve(e) {
  return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function Ae(e, t, r) {
  return e ? e.concat(t).map(function(s, o) {
    return s = Ve(s), !r && o ? "[" + s + "]" : s;
  }).join(r ? "." : "") : t;
}
function er(e) {
  return c.isArray(e) && !e.some(de);
}
const tr = c.toFlatObject(c, {}, null, function(t) {
  return /^is[A-Z]/.test(t);
});
function se(e, t, r) {
  if (!c.isObject(e))
    throw new TypeError("target must be an object");
  t = t || new FormData(), r = c.toFlatObject(r, {
    metaTokens: !0,
    dots: !1,
    indexes: !1
  }, !1, function(m, b) {
    return !c.isUndefined(b[m]);
  });
  const n = r.metaTokens, s = r.visitor || l, o = r.dots, a = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
  if (!c.isFunction(s))
    throw new TypeError("visitor must be a function");
  function u(f) {
    if (f === null) return "";
    if (c.isDate(f))
      return f.toISOString();
    if (c.isBoolean(f))
      return f.toString();
    if (!d && c.isBlob(f))
      throw new w("Blob is not supported. Use a Buffer instead.");
    return c.isArrayBuffer(f) || c.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
  }
  function l(f, m, b) {
    let g = f;
    if (f && !b && typeof f == "object") {
      if (c.endsWith(m, "{}"))
        m = n ? m : m.slice(0, -2), f = JSON.stringify(f);
      else if (c.isArray(f) && er(f) || (c.isFileList(f) || c.endsWith(m, "[]")) && (g = c.toArray(f)))
        return m = Ve(m), g.forEach(function(E, x) {
          !(c.isUndefined(E) || E === null) && t.append(
            // eslint-disable-next-line no-nested-ternary
            a === !0 ? Ae([m], x, o) : a === null ? m : m + "[]",
            u(E)
          );
        }), !1;
    }
    return de(f) ? !0 : (t.append(Ae(b, m, o), u(f)), !1);
  }
  const h = [], p = Object.assign(tr, {
    defaultVisitor: l,
    convertValue: u,
    isVisitable: de
  });
  function y(f, m) {
    if (!c.isUndefined(f)) {
      if (h.indexOf(f) !== -1)
        throw Error("Circular reference detected in " + m.join("."));
      h.push(f), c.forEach(f, function(g, S) {
        (!(c.isUndefined(g) || g === null) && s.call(
          t,
          g,
          c.isString(S) ? S.trim() : S,
          m,
          p
        )) === !0 && y(g, m ? m.concat(S) : [S]);
      }), h.pop();
    }
  }
  if (!c.isObject(e))
    throw new TypeError("data must be an object");
  return y(e), t;
}
function Te(e) {
  const t = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
    return t[n];
  });
}
function ge(e, t) {
  this._pairs = [], e && se(e, this, t);
}
const Xe = ge.prototype;
Xe.append = function(t, r) {
  this._pairs.push([t, r]);
};
Xe.toString = function(t) {
  const r = t ? function(n) {
    return t.call(this, n, Te);
  } : Te;
  return this._pairs.map(function(s) {
    return r(s[0]) + "=" + r(s[1]);
  }, "").join("&");
};
function rr(e) {
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function Ye(e, t, r) {
  if (!t)
    return e;
  const n = r && r.encode || rr;
  c.isFunction(r) && (r = {
    serialize: r
  });
  const s = r && r.serialize;
  let o;
  if (s ? o = s(t, r) : o = c.isURLSearchParams(t) ? t.toString() : new ge(t, r).toString(n), o) {
    const a = e.indexOf("#");
    a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
  }
  return e;
}
class Oe {
  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, r, n) {
    return this.handlers.push({
      fulfilled: t,
      rejected: r,
      synchronous: n ? n.synchronous : !1,
      runWhen: n ? n.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) {
    c.forEach(this.handlers, function(n) {
      n !== null && t(n);
    });
  }
}
const Qe = {
  silentJSONParsing: !0,
  forcedJSONParsing: !0,
  clarifyTimeoutError: !1
}, nr = typeof URLSearchParams < "u" ? URLSearchParams : ge, sr = typeof FormData < "u" ? FormData : null, ar = typeof Blob < "u" ? Blob : null, or = {
  isBrowser: !0,
  classes: {
    URLSearchParams: nr,
    FormData: sr,
    Blob: ar
  },
  protocols: ["http", "https", "file", "blob", "url", "data"]
}, Ee = typeof window < "u" && typeof document < "u", fe = typeof navigator == "object" && navigator || void 0, ir = Ee && (!fe || ["ReactNative", "NativeScript", "NS"].indexOf(fe.product) < 0), cr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lr = Ee && window.location.href || "http://localhost", ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  hasBrowserEnv: Ee,
  hasStandardBrowserEnv: ir,
  hasStandardBrowserWebWorkerEnv: cr,
  navigator: fe,
  origin: lr
}, Symbol.toStringTag, { value: "Module" })), O = {
  ...ur,
  ...or
};
function dr(e, t) {
  return se(e, new O.classes.URLSearchParams(), {
    visitor: function(r, n, s, o) {
      return O.isNode && c.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
    },
    ...t
  });
}
function fr(e) {
  return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function hr(e) {
  const t = {}, r = Object.keys(e);
  let n;
  const s = r.length;
  let o;
  for (n = 0; n < s; n++)
    o = r[n], t[o] = e[o];
  return t;
}
function Ze(e) {
  function t(r, n, s, o) {
    let a = r[o++];
    if (a === "__proto__") return !0;
    const i = Number.isFinite(+a), d = o >= r.length;
    return a = !a && c.isArray(s) ? s.length : a, d ? (c.hasOwnProp(s, a) ? s[a] = [s[a], n] : s[a] = n, !i) : ((!s[a] || !c.isObject(s[a])) && (s[a] = []), t(r, n, s[a], o) && c.isArray(s[a]) && (s[a] = hr(s[a])), !i);
  }
  if (c.isFormData(e) && c.isFunction(e.entries)) {
    const r = {};
    return c.forEachEntry(e, (n, s) => {
      t(fr(n), s, r, 0);
    }), r;
  }
  return null;
}
function pr(e, t, r) {
  if (c.isString(e))
    try {
      return (t || JSON.parse)(e), c.trim(e);
    } catch (n) {
      if (n.name !== "SyntaxError")
        throw n;
    }
  return (r || JSON.stringify)(e);
}
const K = {
  transitional: Qe,
  adapter: ["xhr", "http", "fetch"],
  transformRequest: [function(t, r) {
    const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = c.isObject(t);
    if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
      return s ? JSON.stringify(Ze(t)) : t;
    if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
      return t;
    if (c.isArrayBufferView(t))
      return t.buffer;
    if (c.isURLSearchParams(t))
      return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
    let i;
    if (o) {
      if (n.indexOf("application/x-www-form-urlencoded") > -1)
        return dr(t, this.formSerializer).toString();
      if ((i = c.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
        const d = this.env && this.env.FormData;
        return se(
          i ? { "files[]": t } : t,
          d && new d(),
          this.formSerializer
        );
      }
    }
    return o || s ? (r.setContentType("application/json", !1), pr(t)) : t;
  }],
  transformResponse: [function(t) {
    const r = this.transitional || K.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
    if (c.isResponse(t) || c.isReadableStream(t))
      return t;
    if (t && c.isString(t) && (n && !this.responseType || s)) {
      const a = !(r && r.silentJSONParsing) && s;
      try {
        return JSON.parse(t);
      } catch (i) {
        if (a)
          throw i.name === "SyntaxError" ? w.from(i, w.ERR_BAD_RESPONSE, this, null, this.response) : i;
      }
    }
    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: O.classes.FormData,
    Blob: O.classes.Blob
  },
  validateStatus: function(t) {
    return t >= 200 && t < 300;
  },
  headers: {
    common: {
      Accept: "application/json, text/plain, */*",
      "Content-Type": void 0
    }
  }
};
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
  K.headers[e] = {};
});
const mr = c.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"
]), br = (e) => {
  const t = {};
  let r, n, s;
  return e && e.split(`
`).forEach(function(a) {
    s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && mr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
  }), t;
}, _e = Symbol("internals");
function M(e) {
  return e && String(e).trim().toLowerCase();
}
function X(e) {
  return e === !1 || e == null ? e : c.isArray(e) ? e.map(X) : String(e);
}
function wr(e) {
  const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let n;
  for (; n = r.exec(e); )
    t[n[1]] = n[2];
  return t;
}
const yr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function ie(e, t, r, n, s) {
  if (c.isFunction(n))
    return n.call(this, t, r);
  if (s && (t = r), !!c.isString(t)) {
    if (c.isString(n))
      return t.indexOf(n) !== -1;
    if (c.isRegExp(n))
      return n.test(t);
  }
}
function gr(e) {
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
}
function Er(e, t) {
  const r = c.toCamelCase(" " + t);
  ["get", "set", "has"].forEach((n) => {
    Object.defineProperty(e, n + r, {
      value: function(s, o, a) {
        return this[n].call(this, t, s, o, a);
      },
      configurable: !0
    });
  });
}
let C = class {
  constructor(t) {
    t && this.set(t);
  }
  set(t, r, n) {
    const s = this;
    function o(i, d, u) {
      const l = M(d);
      if (!l)
        throw new Error("header name must be a non-empty string");
      const h = c.findKey(s, l);
      (!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] = X(i));
    }
    const a = (i, d) => c.forEach(i, (u, l) => o(u, l, d));
    if (c.isPlainObject(t) || t instanceof this.constructor)
      a(t, r);
    else if (c.isString(t) && (t = t.trim()) && !yr(t))
      a(br(t), r);
    else if (c.isObject(t) && c.isIterable(t)) {
      let i = {}, d, u;
      for (const l of t) {
        if (!c.isArray(l))
          throw TypeError("Object iterator must return a key-value pair");
        i[u = l[0]] = (d = i[u]) ? c.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
      }
      a(i, r);
    } else
      t != null && o(r, t, n);
    return this;
  }
  get(t, r) {
    if (t = M(t), t) {
      const n = c.findKey(this, t);
      if (n) {
        const s = this[n];
        if (!r)
          return s;
        if (r === !0)
          return wr(s);
        if (c.isFunction(r))
          return r.call(this, s, n);
        if (c.isRegExp(r))
          return r.exec(s);
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(t, r) {
    if (t = M(t), t) {
      const n = c.findKey(this, t);
      return !!(n && this[n] !== void 0 && (!r || ie(this, this[n], n, r)));
    }
    return !1;
  }
  delete(t, r) {
    const n = this;
    let s = !1;
    function o(a) {
      if (a = M(a), a) {
        const i = c.findKey(n, a);
        i && (!r || ie(n, n[i], i, r)) && (delete n[i], s = !0);
      }
    }
    return c.isArray(t) ? t.forEach(o) : o(t), s;
  }
  clear(t) {
    const r = Object.keys(this);
    let n = r.length, s = !1;
    for (; n--; ) {
      const o = r[n];
      (!t || ie(this, this[o], o, t, !0)) && (delete this[o], s = !0);
    }
    return s;
  }
  normalize(t) {
    const r = this, n = {};
    return c.forEach(this, (s, o) => {
      const a = c.findKey(n, o);
      if (a) {
        r[a] = X(s), delete r[o];
        return;
      }
      const i = t ? gr(o) : String(o).trim();
      i !== o && delete r[o], r[i] = X(s), n[i] = !0;
    }), this;
  }
  concat(...t) {
    return this.constructor.concat(this, ...t);
  }
  toJSON(t) {
    const r = /* @__PURE__ */ Object.create(null);
    return c.forEach(this, (n, s) => {
      n != null && n !== !1 && (r[s] = t && c.isArray(n) ? n.join(", ") : n);
    }), r;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).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, ...r) {
    const n = new this(t);
    return r.forEach((s) => n.set(s)), n;
  }
  static accessor(t) {
    const n = (this[_e] = this[_e] = {
      accessors: {}
    }).accessors, s = this.prototype;
    function o(a) {
      const i = M(a);
      n[i] || (Er(s, a), n[i] = !0);
    }
    return c.isArray(t) ? t.forEach(o) : o(t), this;
  }
};
C.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
c.reduceDescriptors(C.prototype, ({ value: e }, t) => {
  let r = t[0].toUpperCase() + t.slice(1);
  return {
    get: () => e,
    set(n) {
      this[r] = n;
    }
  };
});
c.freezeMethods(C);
function ce(e, t) {
  const r = this || K, n = t || r, s = C.from(n.headers);
  let o = n.data;
  return c.forEach(e, function(i) {
    o = i.call(r, o, s.normalize(), t ? t.status : void 0);
  }), s.normalize(), o;
}
function et(e) {
  return !!(e && e.__CANCEL__);
}
function q(e, t, r) {
  w.call(this, e ?? "canceled", w.ERR_CANCELED, t, r), this.name = "CanceledError";
}
c.inherits(q, w, {
  __CANCEL__: !0
});
function tt(e, t, r) {
  const n = r.config.validateStatus;
  !r.status || !n || n(r.status) ? e(r) : t(new w(
    "Request failed with status code " + r.status,
    [w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
    r.config,
    r.request,
    r
  ));
}
function Sr(e) {
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
  return t && t[1] || "";
}
function Rr(e, t) {
  e = e || 10;
  const r = new Array(e), n = new Array(e);
  let s = 0, o = 0, a;
  return t = t !== void 0 ? t : 1e3, function(d) {
    const u = Date.now(), l = n[o];
    a || (a = u), r[s] = d, n[s] = u;
    let h = o, p = 0;
    for (; h !== s; )
      p += r[h++], h = h % e;
    if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - a < t)
      return;
    const y = l && u - l;
    return y ? Math.round(p * 1e3 / y) : void 0;
  };
}
function Ar(e, t) {
  let r = 0, n = 1e3 / t, s, o;
  const a = (u, l = Date.now()) => {
    r = l, s = null, o && (clearTimeout(o), o = null), e(...u);
  };
  return [(...u) => {
    const l = Date.now(), h = l - r;
    h >= n ? a(u, l) : (s = u, o || (o = setTimeout(() => {
      o = null, a(s);
    }, n - h)));
  }, () => s && a(s)];
}
const Z = (e, t, r = 3) => {
  let n = 0;
  const s = Rr(50, 250);
  return Ar((o) => {
    const a = o.loaded, i = o.lengthComputable ? o.total : void 0, d = a - n, u = s(d), l = a <= i;
    n = a;
    const h = {
      loaded: a,
      total: i,
      progress: i ? a / i : void 0,
      bytes: d,
      rate: u || void 0,
      estimated: u && i && l ? (i - a) / u : void 0,
      event: o,
      lengthComputable: i != null,
      [t ? "download" : "upload"]: !0
    };
    e(h);
  }, r);
}, Ce = (e, t) => {
  const r = e != null;
  return [(n) => t[0]({
    lengthComputable: r,
    total: e,
    loaded: n
  }), t[1]];
}, xe = (e) => (...t) => c.asap(() => e(...t)), Tr = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, O.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
  new URL(O.origin),
  O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
) : () => !0, Or = O.hasStandardBrowserEnv ? (
  // Standard browser envs support document.cookie
  {
    write(e, t, r, n, s, o) {
      const a = [e + "=" + encodeURIComponent(t)];
      c.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), c.isString(n) && a.push("path=" + n), c.isString(s) && a.push("domain=" + s), o === !0 && a.push("secure"), document.cookie = a.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 _r(e) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function Cr(e, t) {
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function rt(e, t, r) {
  let n = !_r(t);
  return e && (n || r == !1) ? Cr(e, t) : t;
}
const Le = (e) => e instanceof C ? { ...e } : e;
function U(e, t) {
  t = t || {};
  const r = {};
  function n(u, l, h, p) {
    return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: p }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
  }
  function s(u, l, h, p) {
    if (c.isUndefined(l)) {
      if (!c.isUndefined(u))
        return n(void 0, u, h, p);
    } else return n(u, l, h, p);
  }
  function o(u, l) {
    if (!c.isUndefined(l))
      return n(void 0, l);
  }
  function a(u, l) {
    if (c.isUndefined(l)) {
      if (!c.isUndefined(u))
        return n(void 0, u);
    } else return n(void 0, l);
  }
  function i(u, l, h) {
    if (h in t)
      return n(u, l);
    if (h in e)
      return n(void 0, u);
  }
  const d = {
    url: o,
    method: o,
    data: o,
    baseURL: a,
    transformRequest: a,
    transformResponse: a,
    paramsSerializer: a,
    timeout: a,
    timeoutMessage: a,
    withCredentials: a,
    withXSRFToken: a,
    adapter: a,
    responseType: a,
    xsrfCookieName: a,
    xsrfHeaderName: a,
    onUploadProgress: a,
    onDownloadProgress: a,
    decompress: a,
    maxContentLength: a,
    maxBodyLength: a,
    beforeRedirect: a,
    transport: a,
    httpAgent: a,
    httpsAgent: a,
    cancelToken: a,
    socketPath: a,
    responseEncoding: a,
    validateStatus: i,
    headers: (u, l, h) => s(Le(u), Le(l), h, !0)
  };
  return c.forEach(Object.keys({ ...e, ...t }), function(l) {
    const h = d[l] || s, p = h(e[l], t[l], l);
    c.isUndefined(p) && h !== i || (r[l] = p);
  }), r;
}
const nt = (e) => {
  const t = U({}, e);
  let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: a, auth: i } = t;
  t.headers = a = C.from(a), t.url = Ye(rt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set(
    "Authorization",
    "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
  );
  let d;
  if (c.isFormData(r)) {
    if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
      a.setContentType(void 0);
    else if ((d = a.getContentType()) !== !1) {
      const [u, ...l] = d ? d.split(";").map((h) => h.trim()).filter(Boolean) : [];
      a.setContentType([u || "multipart/form-data", ...l].join("; "));
    }
  }
  if (O.hasStandardBrowserEnv && (n && c.isFunction(n) && (n = n(t)), n || n !== !1 && Tr(t.url))) {
    const u = s && o && Or.read(o);
    u && a.set(s, u);
  }
  return t;
}, xr = typeof XMLHttpRequest < "u", Lr = xr && function(e) {
  return new Promise(function(r, n) {
    const s = nt(e);
    let o = s.data;
    const a = C.from(s.headers).normalize();
    let { responseType: i, onUploadProgress: d, onDownloadProgress: u } = s, l, h, p, y, f;
    function m() {
      y && y(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
    }
    let b = new XMLHttpRequest();
    b.open(s.method.toUpperCase(), s.url, !0), b.timeout = s.timeout;
    function g() {
      if (!b)
        return;
      const E = C.from(
        "getAllResponseHeaders" in b && b.getAllResponseHeaders()
      ), A = {
        data: !i || i === "text" || i === "json" ? b.responseText : b.response,
        status: b.status,
        statusText: b.statusText,
        headers: E,
        config: e,
        request: b
      };
      tt(function(F) {
        r(F), m();
      }, function(F) {
        n(F), m();
      }, A), b = null;
    }
    "onloadend" in b ? b.onloadend = g : b.onreadystatechange = function() {
      !b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf("file:") === 0) || setTimeout(g);
    }, b.onabort = function() {
      b && (n(new w("Request aborted", w.ECONNABORTED, e, b)), b = null);
    }, b.onerror = function() {
      n(new w("Network Error", w.ERR_NETWORK, e, b)), b = null;
    }, b.ontimeout = function() {
      let x = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
      const A = s.transitional || Qe;
      s.timeoutErrorMessage && (x = s.timeoutErrorMessage), n(new w(
        x,
        A.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
        e,
        b
      )), b = null;
    }, o === void 0 && a.setContentType(null), "setRequestHeader" in b && c.forEach(a.toJSON(), function(x, A) {
      b.setRequestHeader(A, x);
    }), c.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), i && i !== "json" && (b.responseType = s.responseType), u && ([p, f] = Z(u, !0), b.addEventListener("progress", p)), d && b.upload && ([h, y] = Z(d), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (l = (E) => {
      b && (n(!E || E.type ? new q(null, e, b) : E), b.abort(), b = null);
    }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
    const S = Sr(s.url);
    if (S && O.protocols.indexOf(S) === -1) {
      n(new w("Unsupported protocol " + S + ":", w.ERR_BAD_REQUEST, e));
      return;
    }
    b.send(o || null);
  });
}, vr = (e, t) => {
  const { length: r } = e = e ? e.filter(Boolean) : [];
  if (t || r) {
    let n = new AbortController(), s;
    const o = function(u) {
      if (!s) {
        s = !0, i();
        const l = u instanceof Error ? u : this.reason;
        n.abort(l instanceof w ? l : new q(l instanceof Error ? l.message : l));
      }
    };
    let a = t && setTimeout(() => {
      a = null, o(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT));
    }, t);
    const i = () => {
      e && (a && clearTimeout(a), a = null, e.forEach((u) => {
        u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
      }), e = null);
    };
    e.forEach((u) => u.addEventListener("abort", o));
    const { signal: d } = n;
    return d.unsubscribe = () => c.asap(i), d;
  }
}, Pr = function* (e, t) {
  let r = e.byteLength;
  if (r < t) {
    yield e;
    return;
  }
  let n = 0, s;
  for (; n < r; )
    s = n + t, yield e.slice(n, s), n = s;
}, jr = async function* (e, t) {
  for await (const r of Fr(e))
    yield* Pr(r, t);
}, Fr = async function* (e) {
  if (e[Symbol.asyncIterator]) {
    yield* e;
    return;
  }
  const t = e.getReader();
  try {
    for (; ; ) {
      const { done: r, value: n } = await t.read();
      if (r)
        break;
      yield n;
    }
  } finally {
    await t.cancel();
  }
}, ve = (e, t, r, n) => {
  const s = jr(e, t);
  let o = 0, a, i = (d) => {
    a || (a = !0, n && n(d));
  };
  return new ReadableStream({
    async pull(d) {
      try {
        const { done: u, value: l } = await s.next();
        if (u) {
          i(), d.close();
          return;
        }
        let h = l.byteLength;
        if (r) {
          let p = o += h;
          r(p);
        }
        d.enqueue(new Uint8Array(l));
      } catch (u) {
        throw i(u), u;
      }
    },
    cancel(d) {
      return i(d), s.return();
    }
  }, {
    highWaterMark: 2
  });
}, ae = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", st = ae && typeof ReadableStream == "function", kr = ae && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), at = (e, ...t) => {
  try {
    return !!e(...t);
  } catch {
    return !1;
  }
}, Nr = st && at(() => {
  let e = !1;
  const t = new Request(O.origin, {
    body: new ReadableStream(),
    method: "POST",
    get duplex() {
      return e = !0, "half";
    }
  }).headers.has("Content-Type");
  return e && !t;
}), Pe = 64 * 1024, he = st && at(() => c.isReadableStream(new Response("").body)), ee = {
  stream: he && ((e) => e.body)
};
ae && ((e) => {
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
    !ee[t] && (ee[t] = c.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
      throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, n);
    });
  });
})(new Response());
const Ur = async (e) => {
  if (e == null)
    return 0;
  if (c.isBlob(e))
    return e.size;
  if (c.isSpecCompliantForm(e))
    return (await new Request(O.origin, {
      method: "POST",
      body: e
    }).arrayBuffer()).byteLength;
  if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
    return e.byteLength;
  if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
    return (await kr(e)).byteLength;
}, Dr = async (e, t) => {
  const r = c.toFiniteNumber(e.getContentLength());
  return r ?? Ur(t);
}, Br = ae && (async (e) => {
  let {
    url: t,
    method: r,
    data: n,
    signal: s,
    cancelToken: o,
    timeout: a,
    onDownloadProgress: i,
    onUploadProgress: d,
    responseType: u,
    headers: l,
    withCredentials: h = "same-origin",
    fetchOptions: p
  } = nt(e);
  u = u ? (u + "").toLowerCase() : "text";
  let y = vr([s, o && o.toAbortSignal()], a), f;
  const m = y && y.unsubscribe && (() => {
    y.unsubscribe();
  });
  let b;
  try {
    if (d && Nr && r !== "get" && r !== "head" && (b = await Dr(l, n)) !== 0) {
      let A = new Request(t, {
        method: "POST",
        body: n,
        duplex: "half"
      }), j;
      if (c.isFormData(n) && (j = A.headers.get("content-type")) && l.setContentType(j), A.body) {
        const [F, W] = Ce(
          b,
          Z(xe(d))
        );
        n = ve(A.body, Pe, F, W);
      }
    }
    c.isString(h) || (h = h ? "include" : "omit");
    const g = "credentials" in Request.prototype;
    f = new Request(t, {
      ...p,
      signal: y,
      method: r.toUpperCase(),
      headers: l.normalize().toJSON(),
      body: n,
      duplex: "half",
      credentials: g ? h : void 0
    });
    let S = await fetch(f, p);
    const E = he && (u === "stream" || u === "response");
    if (he && (i || E && m)) {
      const A = {};
      ["status", "statusText", "headers"].forEach((Se) => {
        A[Se] = S[Se];
      });
      const j = c.toFiniteNumber(S.headers.get("content-length")), [F, W] = i && Ce(
        j,
        Z(xe(i), !0)
      ) || [];
      S = new Response(
        ve(S.body, Pe, F, () => {
          W && W(), m && m();
        }),
        A
      );
    }
    u = u || "text";
    let x = await ee[c.findKey(ee, u) || "text"](S, e);
    return !E && m && m(), await new Promise((A, j) => {
      tt(A, j, {
        data: x,
        headers: C.from(S.headers),
        status: S.status,
        statusText: S.statusText,
        config: e,
        request: f
      });
    });
  } catch (g) {
    throw m && m(), g && g.name === "TypeError" && /Load failed|fetch/i.test(g.message) ? Object.assign(
      new w("Network Error", w.ERR_NETWORK, e, f),
      {
        cause: g.cause || g
      }
    ) : w.from(g, g && g.code, e, f);
  }
}), pe = {
  http: Zt,
  xhr: Lr,
  fetch: Br
};
c.forEach(pe, (e, t) => {
  if (e) {
    try {
      Object.defineProperty(e, "name", { value: t });
    } catch {
    }
    Object.defineProperty(e, "adapterName", { value: t });
  }
});
const je = (e) => `- ${e}`, Ir = (e) => c.isFunction(e) || e === null || e === !1, ot = {
  getAdapter: (e) => {
    e = c.isArray(e) ? e : [e];
    const { length: t } = e;
    let r, n;
    const s = {};
    for (let o = 0; o < t; o++) {
      r = e[o];
      let a;
      if (n = r, !Ir(r) && (n = pe[(a = String(r)).toLowerCase()], n === void 0))
        throw new w(`Unknown adapter '${a}'`);
      if (n)
        break;
      s[a || "#" + o] = n;
    }
    if (!n) {
      const o = Object.entries(s).map(
        ([i, d]) => `adapter ${i} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
      );
      let a = t ? o.length > 1 ? `since :
` + o.map(je).join(`
`) : " " + je(o[0]) : "as no adapter specified";
      throw new w(
        "There is no suitable adapter to dispatch the request " + a,
        "ERR_NOT_SUPPORT"
      );
    }
    return n;
  },
  adapters: pe
};
function le(e) {
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
    throw new q(null, e);
}
function Fe(e) {
  return le(e), e.headers = C.from(e.headers), e.data = ce.call(
    e,
    e.transformRequest
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ot.getAdapter(e.adapter || K.adapter)(e).then(function(n) {
    return le(e), n.data = ce.call(
      e,
      e.transformResponse,
      n
    ), n.headers = C.from(n.headers), n;
  }, function(n) {
    return et(n) || (le(e), n && n.response && (n.response.data = ce.call(
      e,
      e.transformResponse,
      n.response
    ), n.response.headers = C.from(n.response.headers))), Promise.reject(n);
  });
}
const it = "1.11.0", oe = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
  oe[e] = function(n) {
    return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
  };
});
const ke = {};
oe.transitional = function(t, r, n) {
  function s(o, a) {
    return "[Axios v" + it + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
  }
  return (o, a, i) => {
    if (t === !1)
      throw new w(
        s(a, " has been removed" + (r ? " in " + r : "")),
        w.ERR_DEPRECATED
      );
    return r && !ke[a] && (ke[a] = !0, console.warn(
      s(
        a,
        " has been deprecated since v" + r + " and will be removed in the near future"
      )
    )), t ? t(o, a, i) : !0;
  };
};
oe.spelling = function(t) {
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
};
function qr(e, t, r) {
  if (typeof e != "object")
    throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
  const n = Object.keys(e);
  let s = n.length;
  for (; s-- > 0; ) {
    const o = n[s], a = t[o];
    if (a) {
      const i = e[o], d = i === void 0 || a(i, o, e);
      if (d !== !0)
        throw new w("option " + o + " must be " + d, w.ERR_BAD_OPTION_VALUE);
      continue;
    }
    if (r !== !0)
      throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
  }
}
const Y = {
  assertOptions: qr,
  validators: oe
}, v = Y.validators;
let N = class {
  constructor(t) {
    this.defaults = t || {}, this.interceptors = {
      request: new Oe(),
      response: new Oe()
    };
  }
  /**
   * 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, r) {
    try {
      return await this._request(t, r);
    } catch (n) {
      if (n instanceof Error) {
        let s = {};
        Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
        const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
        try {
          n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
` + o) : n.stack = o;
        } catch {
        }
      }
      throw n;
    }
  }
  _request(t, r) {
    typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = U(this.defaults, r);
    const { transitional: n, paramsSerializer: s, headers: o } = r;
    n !== void 0 && Y.assertOptions(n, {
      silentJSONParsing: v.transitional(v.boolean),
      forcedJSONParsing: v.transitional(v.boolean),
      clarifyTimeoutError: v.transitional(v.boolean)
    }, !1), s != null && (c.isFunction(s) ? r.paramsSerializer = {
      serialize: s
    } : Y.assertOptions(s, {
      encode: v.function,
      serialize: v.function
    }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Y.assertOptions(r, {
      baseUrl: v.spelling("baseURL"),
      withXsrfToken: v.spelling("withXSRFToken")
    }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
    let a = o && c.merge(
      o.common,
      o[r.method]
    );
    o && c.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (f) => {
        delete o[f];
      }
    ), r.headers = C.concat(a, o);
    const i = [];
    let d = !0;
    this.interceptors.request.forEach(function(m) {
      typeof m.runWhen == "function" && m.runWhen(r) === !1 || (d = d && m.synchronous, i.unshift(m.fulfilled, m.rejected));
    });
    const u = [];
    this.interceptors.response.forEach(function(m) {
      u.push(m.fulfilled, m.rejected);
    });
    let l, h = 0, p;
    if (!d) {
      const f = [Fe.bind(this), void 0];
      for (f.unshift(...i), f.push(...u), p = f.length, l = Promise.resolve(r); h < p; )
        l = l.then(f[h++], f[h++]);
      return l;
    }
    p = i.length;
    let y = r;
    for (h = 0; h < p; ) {
      const f = i[h++], m = i[h++];
      try {
        y = f(y);
      } catch (b) {
        m.call(this, b);
        break;
      }
    }
    try {
      l = Fe.call(this, y);
    } catch (f) {
      return Promise.reject(f);
    }
    for (h = 0, p = u.length; h < p; )
      l = l.then(u[h++], u[h++]);
    return l;
  }
  getUri(t) {
    t = U(this.defaults, t);
    const r = rt(t.baseURL, t.url, t.allowAbsoluteUrls);
    return Ye(r, t.params, t.paramsSerializer);
  }
};
c.forEach(["delete", "get", "head", "options"], function(t) {
  N.prototype[t] = function(r, n) {
    return this.request(U(n || {}, {
      method: t,
      url: r,
      data: (n || {}).data
    }));
  };
});
c.forEach(["post", "put", "patch"], function(t) {
  function r(n) {
    return function(o, a, i) {
      return this.request(U(i || {}, {
        method: t,
        headers: n ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url: o,
        data: a
      }));
    };
  }
  N.prototype[t] = r(), N.prototype[t + "Form"] = r(!0);
});
let Mr = class ct {
  constructor(t) {
    if (typeof t != "function")
      throw new TypeError("executor must be a function.");
    let r;
    this.promise = new Promise(function(o) {
      r = o;
    });
    const n = this;
    this.promise.then((s) => {
      if (!n._listeners) return;
      let o = n._listeners.length;
      for (; o-- > 0; )
        n._listeners[o](s);
      n._listeners = null;
    }), this.promise.then = (s) => {
      let o;
      const a = new Promise((i) => {
        n.subscribe(i), o = i;
      }).then(s);
      return a.cancel = function() {
        n.unsubscribe(o);
      }, a;
    }, t(function(o, a, i) {
      n.reason || (n.reason = new q(o, a, i), r(n.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 r = this._listeners.indexOf(t);
    r !== -1 && this._listeners.splice(r, 1);
  }
  toAbortSignal() {
    const t = new AbortController(), r = (n) => {
      t.abort(n);
    };
    return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), 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 ct(function(s) {
        t = s;
      }),
      cancel: t
    };
  }
};
function Hr(e) {
  return function(r) {
    return e.apply(null, r);
  };
}
function zr(e) {
  return c.isObject(e) && e.isAxiosError === !0;
}
const me = {
  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(me).forEach(([e, t]) => {
  me[t] = e;
});
function lt(e) {
  const t = new N(e), r = Ie(N.prototype.request, t);
  return c.extend(r, N.prototype, t, { allOwnKeys: !0 }), c.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
    return lt(U(e, s));
  }, r;
}
const R = lt(K);
R.Axios = N;
R.CanceledError = q;
R.CancelToken = Mr;
R.isCancel = et;
R.VERSION = it;
R.toFormData = se;
R.AxiosError = w;
R.Cancel = R.CanceledError;
R.all = function(t) {
  return Promise.all(t);
};
R.spread = Hr;
R.isAxiosError = zr;
R.mergeConfig = U;
R.AxiosHeaders = C;
R.formToJSON = (e) => Ze(c.isHTMLForm(e) ? new FormData(e) : e);
R.getAdapter = ot.getAdapter;
R.HttpStatusCode = me;
R.default = R;
const {
  Axios: Rn,
  AxiosError: An,
  CanceledError: Tn,
  isCancel: On,
  CancelToken: _n,
  VERSION: Cn,
  all: xn,
  Cancel: Ln,
  isAxiosError: vn,
  spread: Pn,
  toFormData: jn,
  AxiosHeaders: Fn,
  HttpStatusCode: kn,
  formToJSON: Nn,
  getAdapter: Un,
  mergeConfig: Dn
} = R;
var Jr = Symbol("cache-parser");
function Ne(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
  return n;
}
function D(e) {
  return (typeof e == "string" || typeof e == "number") && (e = Number(e)) >= 0 && e < 1 / 0;
}
function P(e) {
  return e === !0 || typeof e == "number" || typeof e == "string" && e !== "false";
}
var B = Number;
function ut(e) {
  var t = Object.defineProperty({}, Jr, { enumerable: !1, value: 1 });
  if (!e || typeof e != "string") return t;
  var r = function(u) {
    for (var l, h = {}, p = function(m, b) {
      var g = typeof Symbol < "u" && m[Symbol.iterator] || m["@@iterator"];
      if (g) return (g = g.call(m)).next.bind(g);
      if (Array.isArray(m) || (g = function(E, x) {
        if (E) {
          if (typeof E == "string") return Ne(E, x);
          var A = Object.prototype.toString.call(E).slice(8, -1);
          return A === "Object" && E.constructor && (A = E.constructor.name), A === "Map" || A === "Set" ? Array.from(E) : A === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A) ? Ne(E, x) : void 0;
        }
      }(m))) {
        g && (m = g);
        var S = 0;
        return function() {
          return S >= m.length ? { done: !0 } : { done: !1, value: m[S++] };
        };
      }
      throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
    }(u.toLowerCase().replace(/\s+/g, "").split(",")); !(l = p()).done; ) {
      var y, f = l.value.split("=", 2);
      h[f[0]] = (y = f[1]) == null || y;
    }
    return h;
  }(e), n = r["max-age"], s = r["max-stale"], o = r["min-fresh"], a = r["s-maxage"], i = r["stale-if-error"], d = r["stale-while-revalidate"];
  return P(r.immutable) && (t.immutable = !0), D(n) && (t.maxAge = B(n)), D(s) && (t.maxStale = B(s)), D(o) && (t.minFresh = B(o)), P(r["must-revalidate"]) && (t.mustRevalidate = !0), P(r["must-understand"]) && (t.mustUnderstand = !0), P(r["no-cache"]) && (t.noCache = !0), P(r["no-store"]) && (t.noStore = !0), P(r["no-transform"]) && (t.noTransform = !0), P(r["only-if-cached"]) && (t.onlyIfCached = !0), P(r.private) && (t.private = !0), P(r["proxy-revalidate"]) && (t.proxyRevalidate = !0), P(r.public) && (t.public = !0), D(a) && (t.sMaxAge = B(a)), D(i) && (t.staleIfError = B(i)), D(d) && (t.staleWhileRevalidate = B(d)), t;
}
var $r = Symbol();
function Gr() {
  var e, t, r = new Promise(function(n, s) {
    e = n, t = s;
  });
  return r.resolve = e, r.reject = t, r[$r] = 1, r;
}
function Kr(e, t) {
  return e > t ? 1 : -1;
}
function Q(e, t) {
  var r = 5381;
  if (typeof e == "object" && e !== null && (e.toString === Object.prototype.toString || e.toString === Array.prototype.toString)) {
    t || (t = /* @__PURE__ */ new WeakSet());
    for (var n = Object.keys(e).sort(Kr), s = 0; s < n.length; s++) {
      var o = n[s], a = e[o];
      if (r = 33 * r ^ Q(o, t), typeof a == "object" && a !== null && (e.toString === Object.prototype.toString || e.toString === Array.prototype.toString)) {
        if (t.has(a)) continue;
        t.add(a);
      }
      r = 33 * r ^ Q(a, t);
    }
    return 33 * r ^ Q(e.constructor, t);
  }
  var i = typeof e;
  try {
    e instanceof Date ? i += e.getTime() : i += String(e);
  } catch {
    i += String(Object.assign({}, e));
  }
  for (var d = 0; d < i.length; d++) r = 33 * r ^ i.charCodeAt(d);
  return r;
}
/*!
 * Axios Cache Interceptor 1.8.0
 * (c) 2021-present Arthur Fiorette & Contributors
 * Released under the MIT License.
 */
const T = Object.freeze({
  /**
   * ```txt
   * If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since
   */
  IfModifiedSince: "if-modified-since",
  /**
   * ```txt
   * Last-Modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
   */
  LastModified: "last-modified",
  /**
   * ```txt
   * If-None-Match: "<etag_value>"
   * If-None-Match: "<etag_value>", "<etag_value>", …
   * If-None-Match: *
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match
   */
  IfNoneMatch: "if-none-match",
  /**
   * ```txt
   * Cache-Control: max-age=604800
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
   */
  CacheControl: "cache-control",
  /**
   * ```txt
   * Pragma: no - cache;
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma
   */
  Pragma: "pragma",
  /**
   * ```txt
   * ETag: W / '<etag_value>';
   * ETag: '<etag_value>';
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
   */
  ETag: "etag",
  /**
   * ```txt
   * Expires: <http-date>
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires
   */
  Expires: "expires",
  /**
   * ```txt
   * Age: <delta-seconds>
   * ```
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Age
   */
  Age: "age",
  /**
   * Used internally as metadata to mark the cache item as revalidatable and enabling
   * stale cache state Contains a string of ASCII characters that can be used as ETag for
   * `If-Match` header Provided by user using `cache.etag` value.
   *
   * ```txt
   * X-Axios-Cache-Etag: "<etag_value>"
   * ```
   */
  XAxiosCacheEtag: "x-axios-cache-etag",
  /**
   * Used internally as metadata to mark the cache item as revalidatable and enabling
   * stale cache state may contain `'use-cache-timestamp'` if `cache.modifiedSince` is
   * `true`, otherwise will contain a date from `cache.modifiedSince`. If a date is
   * provided, it can be used for `If-Modified-Since` header, otherwise the cache
   * timestamp can be used for `If-Modified-Since` header.
   *
   * ```txt
   * X-Axios-Cache-Last-Modified: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
   * X-Axios-Cache-Last-Modified: use-cache-timestamp
   * ```
   */
  XAxiosCacheLastModified: "x-axios-cache-last-modified",
  /**
   * Used internally as metadata to mark the cache item able to be used if the server
   * returns an error. The stale-if-error response directive indicates that the cache can
   * reuse a stale response when any error occurs.
   *
   * ```txt
   * XAxiosCacheStaleIfError: <seconds>
   * ```
   */
  XAxiosCacheStaleIfError: "x-axios-cache-stale-if-error"
}), Wr = (e, t) => {
  if (!e) return "not enough headers";
  const r = e[T.CacheControl];
  if (r) {
    const s = ut(String(r));
    if (
      // Header told that this response should not be cached.
      s.noCache || s.noStore || // Server side handling private data
      t === "server" && s.private
    )
      return "dont cache";
    if (s.immutable)
      return {
        cache: 1e3 * 60 * 60 * 24 * 365
      };
    if (s.maxAge !== void 0) {
      const o = e[T.Age];
      return {
        cache: o ? (
          // If age is present, we must subtract it from maxAge
          (s.maxAge - Number(o)) * 1e3
        ) : s.maxAge * 1e3,
        // Already out of date, must be requested again
        stale: (
          // I couldn't find any documentation about who should be used, as they
          // are not meant to overlap each other. But, as we cannot request in the
          // background, as the stale-while-revalidate says, and we just increase
          // its staleTtl when its present, max-stale is being preferred over
          // stale-while-revalidate.
          s.maxStale !== void 0 ? s.maxStale * 1e3 : s.staleWhileRevalidate !== void 0 ? s.staleWhileRevalidate * 1e3 : void 0
        )
      };
    }
  }
  const n = e[T.Expires];
  if (n) {
    const s = Date.parse(String(n)) - Date.now();
    return s >= 0 ? {
      cache: s
    } : "dont cache";
  }
  return "not enough headers";
};
function z() {
  return z = Object.assign ? Object.assign.bind() : function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var r = arguments[t];
      for (var n in r)
        Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
    }
    return e;
  }, z.apply(this, arguments);
}
async function Vr(e, t) {
  if (typeof t == "function")
    return t(e);
  const {
    statusCheck: r,
    responseMatch: n,
    containsHeaders: s
  } = t;
  if (r && !await r(e.status) || n && !await n(e))
    return !1;
  if (s)
    for (const [a, i] of Object.entries(s)) {
      var o;
      if (!await i(
        // Avoid bugs in case the header is not in lower case
        (o = e.headers[a.toLowerCase()]) != null ? o : e.headers[a]
      ))
        return !1;
    }
  return !0;
}
function Ue(e, t) {
  return e instanceof RegExp ? (e.lastIndex = 0, e.test(t)) : t.includes(e);
}
function Xr(e) {
  return e ? (t) => e(t) || t === 304 : (t) => t >= 200 && t < 300 || t === 304;
}
function be(e = "get", t = []) {
  return e = e.toLowerCase(), t.some((r) => r === e);
}
function Yr(e, t) {
  t.headers || (t.headers = {});
  const {
    etag: r,
    modifiedSince: n
  } = t.cache;
  if (r) {
    var s;
    const o = r === !0 ? (s = e.data) == null ? void 0 : s.headers[T.ETag] : r;
    o && (t.headers[T.IfNoneMatch] = o);
  }
  n && (t.headers[T.IfModifiedSince] = n === !0 ? (
    // If last-modified is not present, use the createdAt timestamp
    e.data.headers[T.LastModified] || new Date(e.createdAt).toUTCString()
  ) : n.toUTCString());
}
function Qr(e, t) {
  return e.status === 304 && t ? (e.cached = !0, e.data = t.data, e.status = t.status, e.statusText = t.statusText, e.headers = z({}, t.headers, e.headers), t) : {
    data: e.data,
    status: e.status,
    statusText: e.statusText,
    headers: e.headers
  };
}
function Zr(e) {
  const t = async (r) => {
    if (r.id = e.generateKey(r), r.cache === !1)
      return r;
    if (r.cache = z({}, e.defaults.cache, r.cache), typeof r.cache.cachePredicate == "object" && r.cache.cachePredicate.ignoreUrls && r.url) {
      for (const m of r.cache.cachePredicate.ignoreUrls)
        if (Ue(m, r.url))
          return r;
    }
    if (typeof r.cache.cachePredicate == "object" && r.cache.cachePredicate.allowUrls && r.url) {
      let m = !1;
      for (const b of r.cache.cachePredicate.allowUrls)
        if (Ue(b, r.url)) {
          m = !0;
          break;
        }
      if (!m)
        return r;
    }
    if (r.cache.cacheTakeover) {
      var n, s, o, a, i, d, u, l, h;
      (o = (n = r.headers)[s = T.CacheControl]) != null || (n[s] = "no-cache"), (d = (a = r.headers)[i = T.Pragma]) != null || (a[i] = "no-cache"), (h = (u = r.headers)[l = T.Expires]) != null || (u[l] = "0");
    }
    if (!be(r.method, r.cache.methods))
      return r;
    let p = await e.storage.get(r.id, r);
    const y = r.cache.override;
    e: if (p.state === "empty" || p.state === "stale" || p.state === "must-revalidate" || y) {
      if (e.waiting.has(r.id) && !y && (p = await e.storage.get(r.id, r), p.state !== "empty" && p.state !== "must-revalidate"))
        break e;
      const m = Gr();
      return e.waiting.set(r.id, m), m.catch(() => {
      }), await e.storage.set(r.id, {
        state: "loading",
        previous: y ? (
          // Simply determine if the request is stale or not
          // based if it had previous data or not
          p.data ? "stale" : "empty"
        ) : (
          // Typescript doesn't know that cache.state here can only be 'empty' or 'stale'
          p.state
        ),
        data: p.data,
        // If the cache is empty and asked to override it, use the current timestamp
        createdAt: y && !p.createdAt ? Date.now() : p.createdAt
      }, r), (p.state === "stale" || p.state === "must-revalidate") && Yr(p, r), r.validateStatus = Xr(r.validateStatus), (p.state === "stale" || p.data && p.state !== "must-revalidate") && await (r.cache.hydrate == null ? void 0 : r.cache.hydrate(p)), r;
    }
    let f;
    if (p.state === "loading") {
      const m = e.waiting.get(r.id);
      if (!m)
        return p.data && await (r.cache.hydrate == null ? void 0 : r.cache.hydrate(p)), r;
      try {
        await m;
        const b = await e.storage.get(r.id, r);
        if (!b.data)
          return t(r);
        f = b.data;
      } catch {
        return p.data && await (r.cache.hydrate == null ? void 0 : r.cache.hydrate(p)), t(r);
      }
    } else
      f = p.data;
    return r.transformResponse = void 0, r.adapter = function() {
      return Promise.resolve({
        config: r,
        data: f.data,
        headers: f.headers,
        status: f.status,
        statusText: f.statusText,
        cached: !0,
        stale: p.previous === "stale",
        id: r.id
      });
    }, r;
  };
  return {
    onFulfilled: t
  };
}
async function en(e, t, r) {
  if (typeof r == "function")
    return r(t);
  for (const [n, s] of Object.entries(r)) {
    if (s === "delete") {
      await e.remove(n, t.config);
      continue;
    }
    const o = await e.get(n, t.config);
    if (o.state === "loading")
      continue;
    const a = await s(o, t);
    if (a === "delete") {
      await e.remove(n, t.config);
      continue;
    }
    a !== "ignore" && await e.set(n, a, t.config);
  }
}
function tn(e) {
  const t = async (s, o, a) => {
    a && await e.storage.remove(s, o);
    const i = e.waiting.get(s);
    i && (i.reject(), e.waiting.delete(s));
  };
  return {
    onFulfilled: async (s) => {
      var o;
      if (!(s != null && s.config))
        throw s;
      s.id = s.config.id, (o = s.cached) != null || (s.cached = !1);
      const a = s.config, i = a.cache;
      if (s.cached)
        return s;
      if (!i)
        return s.cached = !1, s;
      if (i.update && await en(e.storage, s, i.update), !be(a.method, i.methods))
        return s;
      const d = await e.storage.get(s.id, a);
      if (
        // If the request interceptor had a problem or it wasn't cached
        d.state !== "loading"
      )
        return s;
      if (
        // For 'loading' values (previous: stale), this check already ran in the past.
        !d.data && !await Vr(s, i.cachePredicate)
      )
        return await t(s.id, a, !0), s;
      for (const f of Object.keys(s.headers))
        f.startsWith("x-axios-cache") && delete s.headers[f];
      i.etag && i.etag !== !0 && (s.headers[T.XAxiosCacheEtag] = i.etag), i.modifiedSince && (s.headers[T.XAxiosCacheLastModified] = i.modifiedSince === !0 ? "use-cache-timestamp" : i.modifiedSince.toUTCString());
      let u = i.ttl || -1, l;
      if (i.interpretHeader) {
        const f = e.headerInterpreter(s.headers, e.location);
        if (f === "dont cache")
          return await t(s.id, a, !0), s;
        f !== "not enough headers" && (typeof f == "number" ? u = f : (u = f.cache, l = f.stale));
      }
      const h = Qr(s, d.data);
      typeof u == "function" && (u = await u(s)), i.staleIfError && (s.headers[T.XAxiosCacheStaleIfError] = String(u));
      const p = {
        state: "cached",
        ttl: u,
        staleTtl: l,
        createdAt: Date.now(),
        data: h
      };
      await e.storage.set(s.id, p, a);
      const y = e.waiting.get(s.id);
      return y && (y.resolve(), e.waiting.delete(s.id)), s;
    },
    onRejected: async (s) => {
      if (!s.isAxiosError || !s.config)
        throw s;
      const o = s.config, a = o.id, i = o.cache, d = s.response;
      if (!i || !a)
        throw s;
      if (!be(o.method, i.methods))
        throw await t(a, o, !0), s;
      const u = await e.storage.get(a, o);
      if (
        // This will only not be loading if the interceptor broke
        u.state !== "loading" || u.previous !== "stale"
      )
        throw await t(
          a,
          o,
          // Do not clear cache if this request is cached, but the request was cancelled before returning the cached response
          s.code !== "ERR_CANCELED" || s.code === "ERR_CANCELED" && u.state !== "cached"
        ), s;
      if (i.staleIfError) {
        const l = String(d?.headers[T.CacheControl]), h = l && ut(l).staleIfError, p = typeof i.staleIfError == "function" ? await i.staleIfError(d, u, s) : i.staleIfError === !0 && h ? h * 1e3 : i.staleIfError;
        if (p === !0 || // staleIfError is the number of seconds that stale is allowed to be used
        typeof p == "number" && u.createdAt + p > Date.now()) {
          await e.storage.set(a, {
            state: "stale",
            createdAt: Date.now(),
            data: u.data
          }, o);
          const y = e.waiting.get(a);
          return y && (y.resolve(), e.waiting.delete(a)), {
            cached: !0,
            stale: !0,
            config: o,
            id: a,
            data: u.data.data,
            headers: u.data.headers,
            status: u.data.status,
            statusText: u.data.statusText
          };
        }
      }
      throw await t(a, o, !0), s;
    }
  };
}
const rn = (e) => !!e && !!e["is-storage"];
function dt(e) {
  const t = e.data.headers;
  return T.ETag in t || T.LastModified in t || T.XAxiosCacheEtag in t || T.XAxiosCacheLastModified in t;
}
function nn(e) {
  return String(e.data.headers[T.CacheControl]).includes("must-revalidate");
}
function ft(e) {
  return dt(e) ? !0 : e.state === "cached" && e.staleTtl !== void 0 && // Only allow stale values after the ttl is already in the past and the staleTtl is in the future.
  // In cases that just createdAt + ttl > Date.now(), isn't enough because the staleTtl could be <= 0.
  // This logic only returns true when Date.now() is between the (createdAt + ttl) and (createdAt + ttl + staleTtl).
  // Following the example below:
  // |--createdAt--:--ttl--:---staleTtl--->
  // [        past        ][now is in here]
  Math.abs(Date.now() - (e.createdAt + e.ttl)) <= e.staleTtl;
}
function we(e) {
  return e.ttl !== void 0 && e.createdAt + e.ttl <= Date.now();
}
function sn({
  set: e,
  find: t,
  remove: r,
  clear: n
}) {
  return {
    //@ts-expect-error - we don't want to expose this
    "is-storage": 1,
    set: e,
    remove: r,
    clear: n,
    get: async (s, o) => {
      let a = await t(s, o);
      if (!a)
        return {
          state: "empty"
        };
      if (a.state === "empty" || a.state === "loading" || a.state === "must-revalidate")
        return a;
      if (a.state === "cached") {
        if (!we(a))
          return a;
        if (!ft(a))
          return await r(s, o), {
            state: "empty"
          };
        if (a = {
          state: "stale",
          createdAt: a.createdAt,
          data: a.data,
          ttl: a.staleTtl !== void 0 ? a.staleTtl + a.ttl : void 0
        }, await e(s, a, o), nn(a))
          return z({}, a, {
            state: "must-revalidate"
          });
      }
      return !we(a) || dt(a) ? a : (await r(s, o), {
        state: "empty"
      });
    }
  };
}
const De = (
  // https://caniuse.com/mdn-api_structuredclone (10/18/2023 92.51%)
  typeof structuredClone == "function" ? structuredClone : (e) => JSON.parse(JSON.stringify(e))
);
function an(e = !1, t = !1, r = !1) {
  const n = sn({
    set: (s, o) => {
      if (r) {
        let a = Object.keys(n.data);
        if (a.length >= r)
          for (n.cleanup(), a = Object.keys(n.data); a.length >= r; )
            delete n.data[a.shift()];
      }
      n.data[s] = e === "double" ? De(o) : o;
    },
    remove: (s) => {
      delete n.data[s];
    },
    find: (s) => {
      const o = n.data[s];
      return e && o !== void 0 ? De(o) : o;
    },
    clear: () => {
      n.data = /* @__PURE__ */ Object.create(null);
    }
  });
  return n.data = /* @__PURE__ */ Object.create(null), n.cleanup = () => {
    const s = Object.keys(n.data);
    let o = -1, a, i;
    for (; ++o < s.length; ) {
      if (i = s[o], a = n.data[i], a.state === "empty") {
        n.remove(i);
        continue;
      }
      a.state === "cached" && we(a) && !ft(a) && n.remove(i);
    }
  }, t && (n.cleaner = setInterval(n.cleanup, t)), n;
}
const Be = /^\/|\/$/g;
function on(e) {
  return (t) => {
    if (t.id)
      return t.id;
    const r = e(t);
    return typeof r == "string" || typeof r == "number" ? `${r}` : `${Q(r)}`;
  };
}
const cn = on(({
  baseURL: e,
  url: t,
  method: r,
  params: n,
  data: s
}) => (e !== void 0 ? e = e.replace(Be, "") : e = "", t !== void 0 ? t = t.replace(Be, "") : t = "", r !== void 0 ? r = r.toLowerCase() : r = "get", {
  url: e + (e && t ? "/" : "") + t,
  params: n,
  method: r,
  data: s
}));
function ln(e, t = {}) {
  var r, n, s, o, a, i, d, u;
  const l = e;
  if (l.defaults.cache)
    throw new Error("setupCache() should be called only once");
  if (l.location = typeof window > "u" ? "server" : "client", l.storage = t.storage || an(), !rn(l.storage))
    throw new Error("Use buildStorage() function");
  return l.waiting = t.waiting || /* @__PURE__ */ new Map(), l.generateKey = t.generateKey || cn, l.headerInterpreter = t.headerInterpreter || Wr, l.requestInterceptor = t.requestInterceptor || Zr(l), l.responseInterceptor = t.responseInterceptor || tn(l), l.debug = t.debug || function() {
  }, l.defaults.cache = {
    update: t.update || {},
    ttl: (r = t.ttl) != null ? r : 1e3 * 60 * 5,
    // Although RFC 7231 also marks POST as cacheable, most users don't know that
    // and may have problems about why their "create X" route not working.
    methods: t.methods || ["get", "head"],
    cachePredicate: t.cachePredicate || {
      // All cacheable status codes defined in RFC 7231
      statusCheck: (h) => [200, 203, 300, 301, 302, 404, 405, 410, 414, 501].includes(h)
    },
    etag: (n = t.etag) != null ? n : !0,
    // This option is going to be ignored by servers when ETag is enabled
    // Checks strict equality to false to avoid undefined-ish values
    modifiedSince: (s = t.modifiedSince) != null ? s : t.etag === !1,
    interpretHeader: (o = t.interpretHeader) != null ? o : !0,
    cacheTakeover: (a = t.cacheTakeover) != null ? a : !0,
    staleIfError: (i = t.staleIfError) != null ? i : !0,
    override: (d = t.override) != null ? d : !1,
    hydrate: (u = t.hydrate) != null ? u : void 0
  }, l.interceptors.request.use(l.requestInterceptor.onFulfilled, l.requestInterceptor.onRejected), l.interceptors.response.use(l.responseInterceptor.onFulfilled, l.responseInterceptor.onRejected), l;
}
const un = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin, ht = R.create({
  baseURL: un,
  headers: {
    Accept: "application/json, */*"
  },
  timeout: 15e3
});
ht.interceptors.response.use(
  (e) => e,
  (e) => (R.isAxiosError(e) && e.response?.status === 401 && globalThis.dispatchEvent(
    new CustomEvent("cx-unauthorized", {
      bubbles: !0,
      composed: !0,
      detail: {
        status: 401,
        url: e.config?.url ?? ""
      }
    })
  ), Promise.reject(e))
);
const Bn = ln(ht), In = "webapi/extensibility/integrations/gab/assetbrowser/gethierarchy_41e8", qn = "webapi/extensibility/integrations/gab/assetbrowser/AvailableProxies_4ea_v3", Mn = "webapi/extensibility/integrations/gab/assetbrowser/getallformatcodes_428H";
var dn = /* @__PURE__ */ ((e) => (e.GET_PAGES_AND_LINKS = "webapi/objectmanagement/teamspaces/pagesandlinks_412Y_v1", e.GET_SPACE_FONT_FAMILY = "webapi/objectmanagement/teamspaces/getspacefonts_41I6_v1", e.GET_SPACE_LIST = "webapi/objectmanagement/teamspaces/getteamspaces_41I3_v1", e.GET_USER_ROLE = "webapi/objectmanagement/teamspaces/getuserroles_41E7_v1", e))(dn || {}), fn = /* @__PURE__ */ ((e) => (e.GET_CROP_ZONE_SUGGESTION = "webapi/mediafile/assettransformation/getcropzonesuggestion_41UP_v1", e.GET_LARGEST_DOWNLOAD_LINK = "webapi/objectmanagement/share/getlargestdownloadlink_46X_v1", e.GET_TRANSFORM_ASSET_LINK = "webapi/mediafile/assettransformation/transformasset_41E6_v1", e.UPLOAD_AND_GET_RESPONSE = "webapi/mediafile/import/upload/uploadimageandgetlargestdownloadlink_4CM_v1", e.UPLOAD_RESPONSE = "api/UploadMedia/v3.0/UploadNewMedia", e))(fn || {}), hn = /* @__PURE__ */ ((e) => (e.GET_AUTOCOMPLETE_ITEMS_WITH_QUERY = "webapi/ui/autocompletion/executequery_4JD_v1-alpha", e.GET_AUTOCOMPLETE_ITEMS_WITH_SERVICE = "webapi/ui/autocompletion/callservice_41s5_v1-alpha", e))(hn || {}), pn = /* @__PURE__ */ ((e) => (e.GET_DASHBOARD_EMBEDDED_URL = "webapi/extensibility/integrations/businessintelligence/getdashboardembededurl_41JJ_v1", e.GET_DASHBOARD_LIST = "webapi/extensibility/integrations/businessintelligence/getlistdashboards_41JI_v1", e))(pn || {}), mn = /* @__PURE__ */ ((e) => (e.GET_SEARCHABLE_FIELDS = "webapi/objectmanagement/metadata/fields/getallobjectfieldsforcurrentuser_4C2_v2", e))(mn || {}), bn = /* @__PURE__ */ ((e) => (e["4.0"] = "API/Search/v4.0/Search", e))(bn || {}), wn = /* @__PURE__ */ ((e) => (e.CREATE_OR_UPDATE_CHAPTERS = "webapi/mediafile/timebasedasset/createorupdatechapters_4b0_v1", e.GET_CHAPTERS = "webapi/mediafile/timebasedasset/getchapters_41T7_v1", e))(wn || {}), yn = /* @__PURE__ */ ((e) => (e.BLOCK_TEMPLATE = "webapi/cms/cms5/blocktemplate/418g_v1", e.GET_ADHOC_PROPERTIES = "webapi/cms/cms5/blocktemplate/getadhocpropertieslist_419s_v1", e.GET_BLOCK_TEMPLATES = "webapi/cms/cms5/blocktemplate/getblocktemplates_419y_v1", e.GET_BLOCK_TYPES = "webapi/cms/cms5/blocktemplate/getblocktypes_419z_v1", e.GET_CAN_CREATE_BLOCK_TEMPLATE = "webapi/cms/cms5/blocktemplate/cancreatenewblocktemplate_41cs_v1", e.GET_PAGES_FOR_BLOCK_TEMPLATE = "webapi/cms/cms5/blocktemplate/getpagesforblocktemplate_41ig_v1", e.GET_PERMISSION = "webapi/cms/cms5/blocktemplate/getpermission_419r_v1", e.LIST_BLOCK_TEMPLATES = "webapi/cms/cms5/blocktemplate/getlisttemplates_428o_v1", e))(yn || {}), gn = /* @__PURE__ */ ((e) => (e.Album = "Album", e.Audio = "Audio", e.Image = "Image", e.Multimedia = "Multimedia", e.ProjectDocument = "ProjectDocument", e.Story = "Story", e.Video = "Video", e.Widget = "Widget", e))(gn || {});
export {
  fn as A,
  yn as C,
  pn as D,
  In as F,
  gn as M,
  bn as S,
  dn as T,
  Mn as a,
  qn as b,
  An as c,
  hn as d,
  mn as e,
  wn as f,
  Bn as h
};
