"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const utils = require("./utils.js");
const bind = require("./helpers/bind.js");
const Axios = require("./core/Axios.js");
const mergeConfig = require("./core/mergeConfig.js");
const index = require("./defaults/index.js");
const formDataToJSON = require("./helpers/formDataToJSON.js");
const CanceledError = require("./cancel/CanceledError.js");
const CancelToken = require("./cancel/CancelToken.js");
const isCancel = require("./cancel/isCancel.js");
const data = require("./env/data.js");
const toFormData = require("./helpers/toFormData.js");
const AxiosError = require("./core/AxiosError.js");
const spread = require("./helpers/spread.js");
const isAxiosError = require("./helpers/isAxiosError.js");
const AxiosHeaders = require("./core/AxiosHeaders.js");
const adapters = require("./adapters/adapters.js");
const HttpStatusCode = require("./helpers/HttpStatusCode.js");
function createInstance(defaultConfig) {
  const context = new Axios.default(defaultConfig);
  const instance = bind.default(Axios.default.prototype.request, context);
  utils.default.extend(instance, Axios.default.prototype, context, { allOwnKeys: true });
  utils.default.extend(instance, context, null, { allOwnKeys: true });
  instance.create = function create(instanceConfig) {
    return createInstance(mergeConfig.default(defaultConfig, instanceConfig));
  };
  return instance;
}
const axios = createInstance(index.default);
axios.Axios = Axios.default;
axios.CanceledError = CanceledError.default;
axios.CancelToken = CancelToken.default;
axios.isCancel = isCancel.default;
axios.VERSION = data.VERSION;
axios.toFormData = toFormData.default;
axios.AxiosError = AxiosError.default;
axios.Cancel = axios.CanceledError;
axios.all = function all(promises) {
  return Promise.all(promises);
};
axios.spread = spread.default;
axios.isAxiosError = isAxiosError.default;
axios.mergeConfig = mergeConfig.default;
axios.AxiosHeaders = AxiosHeaders.default;
axios.formToJSON = (thing) => formDataToJSON.default(utils.default.isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters.default.getAdapter;
axios.HttpStatusCode = HttpStatusCode.default;
axios.default = axios;
exports.default = axios;
