import { u as k } from "./index.es235.js";
import { __require as N } from "./index.es315.js";
import { __require as O } from "./index.es316.js";
import { b as A } from "./index.es268.js";
import { __require as S } from "./index.es317.js";
import { __require as B } from "./index.es318.js";
import { __require as M } from "./index.es319.js";
import { __require as X } from "./index.es320.js";
import { t as F } from "./index.es274.js";
import { __require as I } from "./index.es240.js";
var v, f;
function g() {
  if (f)
    return v;
  f = 1;
  var d = k, R = N(), _ = O(), b = A, C = S(), w = B(), L = M(), p = X(), U = F, x = I();
  return v = function(e) {
    return new Promise(function(y, n) {
      var u = e.data, i = e.headers, l = e.responseType, s;
      function h() {
        e.cancelToken && e.cancelToken.unsubscribe(s), e.signal && e.signal.removeEventListener("abort", s);
      }
      d.isFormData(u) && delete i["Content-Type"];
      var r = new XMLHttpRequest();
      if (e.auth) {
        var H = e.auth.username || "", D = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
        i.Authorization = "Basic " + btoa(H + ":" + D);
      }
      var q = C(e.baseURL, e.url);
      r.open(e.method.toUpperCase(), b(q, e.params, e.paramsSerializer), !0), r.timeout = e.timeout;
      function E() {
        if (r) {
          var t = "getAllResponseHeaders" in r ? w(r.getAllResponseHeaders()) : null, o = !l || l === "text" || l === "json" ? r.responseText : r.response, a = {
            data: o,
            status: r.status,
            statusText: r.statusText,
            headers: t,
            config: e,
            request: r
          };
          R(function(m) {
            y(m), h();
          }, function(m) {
            n(m), h();
          }, a), r = null;
        }
      }
      if ("onloadend" in r ? r.onloadend = E : r.onreadystatechange = function() {
        !r || r.readyState !== 4 || r.status === 0 && !(r.responseURL && r.responseURL.indexOf("file:") === 0) || setTimeout(E);
      }, r.onabort = function() {
        r && (n(p("Request aborted", e, "ECONNABORTED", r)), r = null);
      }, r.onerror = function() {
        n(p("Network Error", e, null, r)), r = null;
      }, r.ontimeout = function() {
        var o = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded", a = e.transitional || U;
        e.timeoutErrorMessage && (o = e.timeoutErrorMessage), n(p(
          o,
          e,
          a.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED",
          r
        )), r = null;
      }, d.isStandardBrowserEnv()) {
        var T = (e.withCredentials || L(q)) && e.xsrfCookieName ? _.read(e.xsrfCookieName) : void 0;
        T && (i[e.xsrfHeaderName] = T);
      }
      "setRequestHeader" in r && d.forEach(i, function(o, a) {
        typeof u > "u" && a.toLowerCase() === "content-type" ? delete i[a] : r.setRequestHeader(a, o);
      }), d.isUndefined(e.withCredentials) || (r.withCredentials = !!e.withCredentials), l && l !== "json" && (r.responseType = e.responseType), typeof e.onDownloadProgress == "function" && r.addEventListener("progress", e.onDownloadProgress), typeof e.onUploadProgress == "function" && r.upload && r.upload.addEventListener("progress", e.onUploadProgress), (e.cancelToken || e.signal) && (s = function(t) {
        r && (n(!t || t && t.type ? new x("canceled") : t), r.abort(), r = null);
      }, e.cancelToken && e.cancelToken.subscribe(s), e.signal && (e.signal.aborted ? s() : e.signal.addEventListener("abort", s))), u || (u = null), r.send(u);
    });
  }, v;
}
export {
  g as __require
};
//# sourceMappingURL=index.es275.js.map
