+38
| # AGENTS.md | ||
| ## Setup | ||
| - Use npm here; `package-lock.json` is committed and CI installs with `npm ci --ignore-scripts`. | ||
| - `mise.toml` pins local Node 20, but CI runs Node 12, 14, 16, 18, 20, 22, and 24; keep `lib/` source compatible with old CommonJS-era syntax and runtime assumptions. | ||
| - CI order is `npm ci --ignore-scripts`, `npm run build`, then `npm test`. | ||
| ## Commands | ||
| - `npm run build`: runs `grunt build`, which cleans `dist/` and uses Rollup from `lib/axios.js` to create `dist/axios*.js` and `dist/esm/axios*.js`. | ||
| - `npm test`: runs JS tests and declaration tests through `bin/ssl_hotfix.js`; use this full command on Node >16 so old tooling gets `NODE_OPTIONS=--openssl-legacy-provider`. | ||
| - `node bin/ssl_hotfix.js ./node_modules/.bin/grunt test`: JS-only verification, running ESLint on `lib/**/*.js`, Mocha on `test/unit/**/*.js`, and Karma on `test/specs/**/*.spec.js`. | ||
| - `./node_modules/.bin/mocha --timeout 30000 test/unit/<path>.js`: run one Node/Mocha unit test file without Karma or dtslint. | ||
| - `node bin/ssl_hotfix.js ./node_modules/.bin/grunt karma:single`: run the browser suite only. | ||
| - `node bin/ssl_hotfix.js ./node_modules/.bin/dtslint --localTs node_modules/typescript/lib`: run the declaration tests in `test/typescript/axios.ts`. | ||
| - `npm run fix`: ESLint autofix for `lib/**/*.js` only. | ||
| ## Structure | ||
| - Package entry is `index.js` -> `lib/axios.js`; the TypeScript surface is the root `index.d.ts`. | ||
| - `lib/defaults/index.js` chooses the runtime adapter: `lib/adapters/xhr.js` for browsers and `lib/adapters/http.js` for Node. | ||
| - Browser bundlers also rely on `package.json` `browser` mappings from `./lib/adapters/http.js` to `./lib/adapters/xhr.js` and from `./lib/platform/node/index.js` to `./lib/platform/browser/index.js`. | ||
| - `lib/env/data.js` stores the package version and is generated by `grunt version` or `npm run preversion`; do not edit it except as part of a version bump. | ||
| - `grunt build` uses `rollup.config.js`; `webpack.config.js` is not the package build path, while Karma has its own webpack config inside `karma.conf.js`. | ||
| ## Tests | ||
| - Node tests live in `test/unit/**/*.js` and use Mocha plus Node `assert`. | ||
| - Browser tests live in `test/specs/**/*.spec.js` and use Jasmine/Jasmine-Ajax; globals such as `axios` and `getAjaxRequest` come from `test/specs/__helpers.js`. | ||
| - Karma defaults to `FirefoxHeadless` and `ChromeHeadless` whenever `process.env.GITHUB_ACTIONS !== 'false'`, including when the variable is unset; set `GITHUB_ACTIONS=false` only if you need non-headless local browsers. | ||
| - There is no committed single-browser-spec target; do not leave `fdescribe`, `fit`, or `.only` in tests. | ||
| - Declaration changes should update both `index.d.ts` and `test/typescript/axios.ts`, then run the dtslint command above. | ||
| ## Source Conventions | ||
| - `lib/` is CommonJS with `'use strict'`, `var`, semicolons, 2-space indentation, and no trailing commas; ESLint only checks `lib/**/*.js`. | ||
| - Public API behavior usually needs README docs, TypeScript declarations, and declaration tests updated together. | ||
| - Adapter or platform changes usually need both Node and browser paths considered, including Mocha coverage for `http.js` behavior and Karma coverage for `xhr.js` behavior. | ||
| ## Node 12+ Compatibility | ||
| - All shipped code AND test code must run on Node 12 through Node 24. CI runs the full matrix, so a test that only works on Node 16+ will break the build. Avoid `??`, `?.`, top-level `await`, private class fields, `Array.prototype.at`, `structuredClone`, etc. in both `lib/` and `test/`. | ||
| - Be wary of `Object.prototype` pollution tests on Node 12/14: setting `Object.prototype.get` (or `set`) before any code that calls `Object.defineProperty` with a value-only descriptor will throw `TypeError: Getter must be a function`, because the descriptor inherits the polluted property. Construct servers/clients first, pre-load any lazy-required Node internals (e.g. `require('dns')`), then apply the pollution. |
| @AGENTS.md |
| 'use strict'; | ||
| module.exports = ['authorization', 'proxy-authorization', 'cookie', 'set-cookie', 'x-api-key', 'password']; |
+10
-0
| # Changelog | ||
| ## Unreleased | ||
| ### Notable behavior changes | ||
| - `utils.merge` (used internally by `mergeConfig` and to merge request headers) now returns objects with a `null` prototype to harden against prototype-pollution gadgets. As a result, `error.config`, `error.config.headers`, and any merged header bucket no longer inherit from `Object.prototype`. Two consequences: | ||
| - `obj.hasOwnProperty(key)` on a merged config or header object throws `TypeError: obj.hasOwnProperty is not a function`. Use `Object.prototype.hasOwnProperty.call(obj, key)` or `key in obj` instead. | ||
| - Implicit string coercion (e.g. `String(obj)`, `'' + obj`, or any path that calls `ToPrimitive`) throws `TypeError: Cannot convert object to primitive value` because there is no inherited `toString`. Coerce explicitly via `JSON.stringify(obj)` or by reading individual properties. | ||
| Property access (`obj[key]`), enumeration, and `JSON.stringify` are unaffected. | ||
| ## [0.30.0](https://github.com/axios/axios/compare/v0.29.0...v0.30.0) (2025-03-26) | ||
@@ -4,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";var e,t=function(e,t){return function(){return e.apply(t,arguments)}},r=Object.prototype.toString,n=(e=Object.create(null),function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())});function o(e){return e=e.toLowerCase(),function(t){return n(t)===e}}function i(e){return Array.isArray(e)}function a(e){return void 0===e}var s=o("ArrayBuffer");function u(e){return"number"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var l=o("Date"),p=o("File"),d=o("Blob"),h=o("FileList");function m(e){return"[object Function]"===r.call(e)}var y=o("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var E,b=(E="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return E&&e instanceof E});var g,w=o("HTMLFormElement"),O=(g=Object.prototype.hasOwnProperty,function(e,t){return g.call(e,t)}),R={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";if(!e)return!1;if("function"==typeof FormData&&e instanceof FormData)return!0;if(!c(e))return!1;var n=Object.getPrototypeOf(e);return!(!n||n===Object.prototype)&&(!!m(e.append)&&(r.call(e)===t||m(e.toString)&&e.toString()===t))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:u,isObject:c,isPlainObject:f,isEmptyObject:function(e){if(!f(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isUndefined:a,isDate:l,isFile:p,isBlob:d,isFunction:m,isStream:function(e){return c(e)&&m(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t={};function r(r,n){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r)}for(var n=0,o=arguments.length;n<o;n++)v(arguments[n],r);return t},extend:function(e,r,n){return v(r,(function(r,o){e[o]=n&&"function"==typeof r?t(r,n):r})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:o,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(i(e))return e;var t=e.length;if(!u(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:b,isFileList:h,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:w,hasOwnProperty:O};function S(e,t,r,n,o){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),o&&(this.response=o)}R.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var A=S.prototype,T={};["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","ERR_FORM_DATA_DEPTH_EXCEEDED"].forEach((function(e){T[e]={value:e}})),Object.defineProperties(S,T),Object.defineProperty(A,"isAxiosError",{value:!0}),S.from=function(e,t,r,n,o,i){var a=Object.create(A);return R.toFlatObject(e,a,(function(e){return e!==Error.prototype})),S.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var _=S,j="object"==typeof self?self.FormData:window.FormData;function x(e){return R.isPlainObject(e)||R.isArray(e)}function P(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function D(e,t,r){return e?e.concat(t).map((function(e,t){return e=P(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var N=R.toFlatObject(R,{},null,(function(e){return/^is[A-Z]/.test(e)}));var F=function(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new(j||FormData);var n,o=(r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!R.isUndefined(t[e])}))).metaTokens,i=r.visitor||p,a=r.dots,s=r.indexes,u=r.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===r.maxDepth?100:r.maxDepth,f=u&&((n=t)&&R.isFunction(n.append)&&"FormData"===n[Symbol.toStringTag]&&n[Symbol.iterator]);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(R.isDate(e))return e.toISOString();if(!f&&R.isBlob(e))throw new _("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(e)||R.isTypedArray(e)?f&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function p(e,r,n){var i=e;if(e&&!n&&"object"==typeof e)if(R.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&function(e){return R.isArray(e)&&!e.some(x)}(e)||R.isFileList(e)||R.endsWith(r,"[]")&&(i=R.toArray(e)))return r=P(r),i.forEach((function(e,n){!R.isUndefined(e)&&null!==e&&t.append(!0===s?D([r],n,a):null===s?r:r+"[]",l(e))})),!1;return!!x(e)||(t.append(D(n,r,a),l(e)),!1)}var d=[],h=Object.assign(N,{defaultVisitor:p,convertValue:l,isVisitable:x});if(!R.isObject(e))throw new TypeError("data must be an object");return function e(r,n,o){if(!R.isUndefined(r)){if((o=o||0)>c)throw new _("Maximum object depth of "+c+" exceeded (got "+o+" levels)",_.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),R.forEach(r,(function(r,a){!0===(!(R.isUndefined(r)||null===r)&&i.call(t,r,R.isString(a)?a.trim():a,n,h))&&e(r,n?n.concat(a):[a],o+1)})),d.pop()}}(e,null,0),t};function C(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20/g,(function(e){return t[e]}))}function U(e,t){this._pairs=[],e&&F(e,this,t)}var B=U.prototype;B.append=function(e,t){this._pairs.push([e,t])},B.toString=function(e){var t=e?function(t){return e.call(this,t,C)}:C;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var L=U;function k(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var q=function(e,t,r){if(!t)return e;var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n));var o,i=r&&r.encode||k,a=r&&r.serialize;return(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new L(t,r).toString(i))&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e};function I(){this.handlers=[]}I.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},I.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},I.prototype.clear=function(){this.handlers&&(this.handlers=[])},I.prototype.forEach=function(e){R.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var M=I,H=function(e,t){R.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},J={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:L,FormData:FormData,Blob:Blob},protocols:["http","https","file","blob","url","data"]};var V=function(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&R.isArray(n)?n.length:i,s?(R.hasOwnProperty(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&R.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&R.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){var r={};return R.forEachEntry(e,(function(e,n){t(function(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),n,r,0)})),r}return null},W=R.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),R.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),R.isString(n)&&a.push("path="+n),R.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},X=function(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1===r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},$=["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"],K=R.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=R.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Q(e,t,r){_.call(this,null==e?"canceled":e,_.ERR_CANCELED,t,r),this.name="CanceledError"}R.inherits(Q,_,{__CANCEL__:!0});var G=Q,Y=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType,s=R.hasOwnProperty(e,"withXSRFToken")?e.withXSRFToken:void 0;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}R.isFormData(o)&&R.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(f+":"+l)}var p=X(e.baseURL,e.url,e.allowAbsoluteUrls);function d(){if(c){var n,o,i,s,f,l="getAllResponseHeaders"in c?(n=c.getAllResponseHeaders(),f={},n?(R.forEach(n.split("\n"),(function(e){if(s=e.indexOf(":"),o=R.trim(e.slice(0,s)).toLowerCase(),i=R.trim(e.slice(s+1)),o){if(f[o]&&$.indexOf(o)>=0)return;f[o]="set-cookie"===o?(f[o]?f[o]:[]).concat([i]):f[o]?f[o]+", "+i:i}})),f):f):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new _("Request failed with status code "+r.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:l,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),q(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(r(new _("Request aborted",_.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new _("Network Error",_.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new _(t,n.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,c)),c=null},R.isStandardBrowserEnv()&&(R.isFunction(s)&&(s=s(e)),!0===s||!1!==s&&K(p))){var h=e.xsrfHeaderName&&e.xsrfCookieName&&W.read(e.xsrfCookieName);h&&(i[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&R.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),R.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(t){c&&(r(!t||t.type?new G(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||!1===o||0===o||""===o||(o=null);var m,y=(m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p))&&m[1]||"";y&&-1===J.protocols.indexOf(y)?r(new _("Unsupported protocol "+y+":",_.ERR_BAD_REQUEST,e)):c.send(o)}))},Z={"Content-Type":"application/x-www-form-urlencoded"};function ee(e,t){!R.isUndefined(e)&&R.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var te,re={transitional:z,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(te=Y),te),transformRequest:[function(e,t){H(t,"Accept"),H(t,"Content-Type");var r,n=t&&t["Content-Type"]||"",o=n.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return o?JSON.stringify(V(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return ee(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(i){var a=R.hasOwnProperty(this,"formSerializer")?this.formSerializer:void 0,s=R.hasOwnProperty(this,"env")?this.env:void 0;if(-1!==n.indexOf("application/x-www-form-urlencoded"))return function(e,t){return F(e,new J.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return J.isNode&&R.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((r=R.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=s&&s.FormData;return F(r?{"files[]":e}:e,u&&new u,a)}}return i||o?(ee(t,"application/json"),function(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||re.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&R.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw _.from(e,_.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),R.forEach(["post","put","patch"],(function(e){re.headers[e]=R.merge(Z)}));var ne=re,oe=function(e,t,r,n){var o=this||ne;return R.forEach(n,(function(n){e=n.call(o,e,t,r)})),e},ie=function(e){return!(!e||!e.__CANCEL__)},ae=/[^\x09\x20-\x7E\x80-\xFF]/g,se=/^[\x09\x20]+|[\x09\x20]+$/g;var ue=function e(t){return!1===t||null==t?t:R.isArray(t)?t.map(e):String(t).replace(ae,"").replace(se,"")};function ce(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new G}var fe=function(e){return ce(e),e.headers=e.headers||{},e.data=oe.call(e,e.data,e.headers,null,e.transformRequest),H(e.headers,"Accept"),H(e.headers,"Content-Type"),e.headers=R.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),R.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),R.forEach(e.headers,(function(t,r){e.headers[r]=ue(t)})),(e.adapter||ne.adapter)(e).then((function(t){return ce(e),t.data=oe.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return ie(t)||(ce(e),t&&t.response&&(t.response.data=oe.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))},le=function(e,t){t=t||{};var r=Object.create(null);function n(e,t){return R.hasOwnProperty(e,t)?e[t]:void 0}function o(e,t){return R.hasOwnProperty(e,t)}function i(e,t){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge(e,t):R.isEmptyObject(t)?R.merge({},e):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function a(r){return o(t,r)&&!R.isUndefined(t[r])?i(n(e,r),t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function s(e){if(o(t,e)&&!R.isUndefined(t[e]))return i(void 0,t[e])}function u(r){return o(t,r)&&!R.isUndefined(t[r])?i(void 0,t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function c(r){return o(t,r)?i(n(e,r),t[r]):o(e,r)?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return R.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var t=R.hasOwnProperty(f,e)?f[e]:a,n=t(e);R.isUndefined(n)&&t!==c||(r[e]=n)}})),r},pe="0.31.1",de=pe,he={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){he[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var me={};he.transitional=function(e,t,r){function n(e,t){return"[Axios v"+de+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new _(n(o," has been removed"+(t?" in "+t:"")),_.ERR_DEPRECATED);return t&&!me[o]&&(me[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var ye={assertOptions:function(e,t,r){if("object"!=typeof e)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new _("option "+i+" must be "+u,_.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}},validators:he},ve=ye.validators;function Ee(e){this.defaults=e,this.interceptors={request:new M,response:new M}}Ee.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=le(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&ye.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1);var n=t.paramsSerializer;null!=n&&(R.isFunction(n)?t.paramsSerializer={serialize:n}:ye.assertOptions(n,{encode:ve.function,serialize:ve.function},!0));var o=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var a,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var u=[fe,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),a=Promise.resolve(t);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=t;o.length;){var f=o.shift(),l=o.shift();try{c=f(c)}catch(e){l(e);break}}try{a=fe(c)}catch(e){return Promise.reject(e)}for(;s.length;)a=a.then(s.shift(),s.shift());return a},Ee.prototype.getUri=function(e){e=le(this.defaults,e);var t=X(e.baseURL,e.url,e.allowAbsoluteUrls);return q(t,e.params,e.paramsSerializer)},R.forEach(["delete","get","head","options"],(function(e){Ee.prototype[e]=function(t,r){return this.request(le(r||{},{method:e,url:t,data:(r||{}).data}))}})),R.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(le(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ee.prototype[e]=t(),Ee.prototype[e+"Form"]=t(!0)}));var be=Ee;function ge(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new G(e,n,o),t(r.reason))}))}ge.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ge.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},ge.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},ge.source=function(){var e;return{token:new ge((function(t){e=t})),cancel:e}};var we=ge;var Oe=function e(r){var n=new be(r),o=t(be.prototype.request,n);return R.extend(o,be.prototype,n),R.extend(o,n),o.create=function(t){return e(le(r,t))},o}(ne);Oe.Axios=be,Oe.CanceledError=G,Oe.CancelToken=we,Oe.isCancel=ie,Oe.VERSION=pe,Oe.toFormData=F,Oe.AxiosError=_,Oe.Cancel=Oe.CanceledError,Oe.all=function(e){return Promise.all(e)},Oe.spread=function(e){return function(t){return e.apply(null,t)}},Oe.isAxiosError=function(e){return R.isObject(e)&&!0===e.isAxiosError},Oe.formToJSON=function(e){return V(R.isHTMLForm(e)?new FormData(e):e)};var Re=Oe,Se=Oe;return Re.default=Se,Re})); | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";var e,t=function(e,t){return function(){return e.apply(t,arguments)}},r=Object.prototype.toString,n=(e=Object.create(null),function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())});function o(e){return e=e.toLowerCase(),function(t){return n(t)===e}}function i(e){return Array.isArray(e)}function a(e){return void 0===e}var s=o("ArrayBuffer");function u(e){return"number"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var l=o("Date"),p=o("File"),d=o("Blob"),h=o("FileList");function m(e){return"[object Function]"===r.call(e)}var y=o("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var E,b=(E="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return E&&e instanceof E});var g,O=o("HTMLFormElement"),w=(g=Object.prototype.hasOwnProperty,function(e,t){return g.call(e,t)}),R={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";if(!e)return!1;if("function"==typeof FormData&&e instanceof FormData)return!0;if(!c(e))return!1;var n=Object.getPrototypeOf(e);return!(!n||n===Object.prototype)&&(!!m(e.append)&&(r.call(e)===t||m(e.toString)&&e.toString()===t))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:u,isObject:c,isPlainObject:f,isEmptyObject:function(e){if(!f(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isUndefined:a,isDate:l,isFile:p,isBlob:d,isFunction:m,isStream:function(e){return c(e)&&m(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t=Object.create(null);function r(r,n){var o;"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(f(o=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0)&&f(r)?t[n]=e(o,r):f(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r)}for(var n=0,o=arguments.length;n<o;n++)v(arguments[n],r);return t},extend:function(e,r,n){return v(r,(function(r,o){e[o]=n&&"function"==typeof r?t(r,n):r})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:o,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(i(e))return e;var t=e.length;if(!u(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:b,isFileList:h,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:w},S=["authorization","proxy-authorization","cookie","set-cookie","x-api-key","password"];function A(e){var t=Object.create(null);return t.value=e,t}var T="[Circular]";function j(e,t,r,n){var o;return function(e,t){return"string"==typeof e&&t[e.toLowerCase()]}(r,t)?"[REDACTED ****]":R.isArray(e)?-1!==n.indexOf(e)?T:(n.push(e),o=[],R.forEach(e,(function(e,r){o[r]=j(e,t,r,n)})),n.pop(),o):R.isPlainObject(e)?-1!==n.indexOf(e)?T:(n.push(e),o={},R.forEach(e,(function(e,r){o[r]=j(e,t,r,n)})),n.pop(),o):e}function _(e){return e?j(e,function(e){var t=(e&&R.isArray(e.redact)&&e.redact.length?e.redact:null)||S,r={};return R.forEach(t,(function(e){"string"==typeof e&&(r[e.toLowerCase()]=!0)})),r}(e),void 0,[]):e}function x(e,t,r,n,o){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),o&&(this.response=o)}R.inherits(x,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var P=x.prototype,D=Object.create(null);["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","ERR_FORM_DATA_DEPTH_EXCEEDED"].forEach((function(e){D[e]=A(e)})),Object.defineProperties(x,D),Object.defineProperty(P,"isAxiosError",A(!0)),x.from=function(e,t,r,n,o,i){var a=Object.create(P);return R.toFlatObject(e,a,(function(e){return e!==Error.prototype})),x.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var N=x,C="object"==typeof self?self.FormData:window.FormData;function F(e){return R.isPlainObject(e)||R.isArray(e)}function U(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function B(e,t,r){return e?e.concat(t).map((function(e,t){return e=U(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var L=R.toFlatObject(R,{},null,(function(e){return/^is[A-Z]/.test(e)}));var k=function(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new(C||FormData);var n,o=(r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!R.isUndefined(t[e])}))).metaTokens,i=r.visitor||p,a=r.dots,s=r.indexes,u=r.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===r.maxDepth?100:r.maxDepth,f=u&&((n=t)&&R.isFunction(n.append)&&"FormData"===n[Symbol.toStringTag]&&n[Symbol.iterator]);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(R.isDate(e))return e.toISOString();if(!f&&R.isBlob(e))throw new N("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(e)||R.isTypedArray(e)?f&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function p(e,r,n){var i=e;if(e&&!n&&"object"==typeof e)if(R.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&function(e){return R.isArray(e)&&!e.some(F)}(e)||R.isFileList(e)||R.endsWith(r,"[]")&&(i=R.toArray(e)))return r=U(r),i.forEach((function(e,n){!R.isUndefined(e)&&null!==e&&t.append(!0===s?B([r],n,a):null===s?r:r+"[]",l(e))})),!1;return!!F(e)||(t.append(B(n,r,a),l(e)),!1)}var d=[],h=Object.assign(L,{defaultVisitor:p,convertValue:l,isVisitable:F});if(!R.isObject(e))throw new TypeError("data must be an object");return function e(r,n,o){if(!R.isUndefined(r)){if((o=o||0)>c)throw new N("Maximum object depth of "+c+" exceeded (got "+o+" levels)",N.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),R.forEach(r,(function(r,a){!0===(!(R.isUndefined(r)||null===r)&&i.call(t,r,R.isString(a)?a.trim():a,n,h))&&e(r,n?n.concat(a):[a],o+1)})),d.pop()}}(e,null,0),t};function q(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20/g,(function(e){return t[e]}))}function I(e,t){this._pairs=[],e&&k(e,this,t)}var M=I.prototype;M.append=function(e,t){this._pairs.push([e,t])},M.toString=function(e){var t=e?function(t){return e.call(this,t,q)}:q;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var z=I;function H(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var J=function(e,t,r){if(!t)return e;var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n));var o,i=r&&r.encode||H,a=r&&r.serialize;return(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new z(t,r).toString(i))&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e};function V(){this.handlers=[]}V.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},V.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},V.prototype.clear=function(){this.handlers&&(this.handlers=[])},V.prototype.forEach=function(e){R.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var W=V,X=function(e,t){R.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},K={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:FormData,Blob:Blob},protocols:["http","https","file","blob","url","data"]};var Q=function(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&R.isArray(n)?n.length:i,s?(R.hasOwnProperty(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&R.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&R.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){var r={};return R.forEachEntry(e,(function(e,n){t(function(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),n,r,0)})),r}return null},G=R.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),R.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),R.isString(n)&&a.push("path="+n),R.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){for(var t,r=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(t=n[o];" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(r))return decodeURIComponent(t.substring(r.length))}return null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Y=function(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1===r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},Z=["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"],ee=R.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=R.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function te(e,t,r){N.call(this,null==e?"canceled":e,N.ERR_CANCELED,t,r),this.name="CanceledError"}R.inherits(te,N,{__CANCEL__:!0});var re=te,ne=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType,s=R.hasOwnProperty(e,"withXSRFToken")?e.withXSRFToken:void 0;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}R.isFormData(o)&&R.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(f+":"+l)}var p=Y(e.baseURL,e.url,e.allowAbsoluteUrls);function d(){if(c){var n,o,i,s,f,l="getAllResponseHeaders"in c?(n=c.getAllResponseHeaders(),f={},n?(R.forEach(n.split("\n"),(function(e){if(s=e.indexOf(":"),o=R.trim(e.slice(0,s)).toLowerCase(),i=R.trim(e.slice(s+1)),o){if(f[o]&&Z.indexOf(o)>=0)return;f[o]="set-cookie"===o?(f[o]?f[o]:[]).concat([i]):f[o]?f[o]+", "+i:i}})),f):f):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:l,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),J(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(r(new N("Request aborted",N.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new N("Network Error",N.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new N(t,n.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,c)),c=null},R.isStandardBrowserEnv()&&(R.isFunction(s)&&(s=s(e)),!0===s||!1!==s&&ee(p))){var h=e.xsrfHeaderName&&e.xsrfCookieName&&G.read(e.xsrfCookieName);h&&(i[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&R.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),R.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(t){c&&(r(!t||t.type?new re(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||!1===o||0===o||""===o||(o=null);var m,y=(m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p))&&m[1]||"";y&&-1===K.protocols.indexOf(y)?r(new N("Unsupported protocol "+y+":",N.ERR_BAD_REQUEST,e)):c.send(o)}))},oe={"Content-Type":"application/x-www-form-urlencoded"};function ie(e,t){!R.isUndefined(e)&&R.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var ae,se={transitional:$,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(ae=ne),ae),transformRequest:[function(e,t){X(t,"Accept"),X(t,"Content-Type");var r,n=t&&t["Content-Type"]||"",o=n.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return o?JSON.stringify(Q(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return ie(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(i){var a=R.hasOwnProperty(this,"formSerializer")?this.formSerializer:void 0,s=R.hasOwnProperty(this,"env")?this.env:void 0;if(-1!==n.indexOf("application/x-www-form-urlencoded"))return function(e,t){return k(e,new K.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return K.isNode&&R.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((r=R.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=s&&s.FormData;return k(r?{"files[]":e}:e,u&&new u,a)}}return i||o?(ie(t,"application/json"),function(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||se.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&R.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw N.from(e,N.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,redact:S.slice(),env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(e){se.headers[e]={}})),R.forEach(["post","put","patch"],(function(e){se.headers[e]=R.merge(oe)}));var ue=se,ce=function(e,t,r,n){var o=this||ue;return R.forEach(n,(function(n){e=n.call(o,e,t,r)})),e},fe=function(e){return!(!e||!e.__CANCEL__)},le=/[^\x09\x20-\x7E\x80-\xFF]/g,pe=/^[\x09\x20]+|[\x09\x20]+$/g;var de=function e(t){return!1===t||null==t?t:R.isArray(t)?t.map(e):String(t).replace(le,"").replace(pe,"")};function he(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new re}var me=function(e){he(e),e.headers=e.headers||{},e.data=ce.call(e,e.data,e.headers,null,e.transformRequest),X(e.headers,"Accept"),X(e.headers,"Content-Type");var t=R.hasOwnProperty(e.headers,"common")&&e.headers.common?e.headers.common:{},r=e.method&&R.hasOwnProperty(e.headers,e.method)&&e.headers[e.method]?e.headers[e.method]:{};return e.headers=R.merge(t,r,e.headers),R.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),R.forEach(e.headers,(function(t,r){e.headers[r]=de(t)})),(e.adapter||ue.adapter)(e).then((function(t){return he(e),t.data=ce.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return fe(t)||(he(e),t&&t.response&&(t.response.data=ce.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))},ye=function(e,t){t=t||{};var r=Object.create(null);function n(e,t){return R.hasOwnProperty(e,t)?e[t]:void 0}function o(e,t){return R.hasOwnProperty(e,t)}function i(e,t){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge(e,t):R.isEmptyObject(t)?R.merge({},e):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function a(r){return o(t,r)&&!R.isUndefined(t[r])?i(n(e,r),t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function s(e){if(o(t,e)&&!R.isUndefined(t[e]))return i(void 0,t[e])}function u(r){return o(t,r)&&!R.isUndefined(t[r])?i(void 0,t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function c(r){return o(t,r)?i(n(e,r),t[r]):o(e,r)?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c};return R.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var t=R.hasOwnProperty(f,e)?f[e]:a,n=t(e);R.isUndefined(n)&&t!==c||(r[e]=n)}})),r},ve="0.32.0",Ee=ve,be={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var ge={};be.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Ee+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new N(n(o," has been removed"+(t?" in "+t:"")),N.ERR_DEPRECATED);return t&&!ge[o]&&(ge[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Oe={assertOptions:function(e,t,r){if("object"!=typeof e)throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new N("option "+i+" must be "+u,N.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}},validators:be},we=Oe.validators;function Re(e){this.defaults=e,this.interceptors={request:new W,response:new W}}Re.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ye(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Oe.assertOptions(r,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1);var n=t.paramsSerializer;null!=n&&(R.isFunction(n)?t.paramsSerializer={serialize:n}:Oe.assertOptions(n,{encode:we.function,serialize:we.function},!0));var o=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var a,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var u=[me,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),a=Promise.resolve(t);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=t;o.length;){var f=o.shift(),l=o.shift();try{c=f(c)}catch(e){l(e);break}}try{a=me(c)}catch(e){return Promise.reject(e)}for(;s.length;)a=a.then(s.shift(),s.shift());return a},Re.prototype.getUri=function(e){e=ye(this.defaults,e);var t=Y(e.baseURL,e.url,e.allowAbsoluteUrls);return J(t,e.params,e.paramsSerializer)},R.forEach(["delete","get","head","options"],(function(e){Re.prototype[e]=function(t,r){return this.request(ye(r||{},{method:e,url:t,data:(r||{}).data}))}})),R.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(ye(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Re.prototype[e]=t(),Re.prototype[e+"Form"]=t(!0)}));var Se=Re;function Ae(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new re(e,n,o),t(r.reason))}))}Ae.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Ae.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Ae.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Ae.source=function(){var e;return{token:new Ae((function(t){e=t})),cancel:e}};var Te=Ae;var je=function e(r){var n=new Se(r),o=t(Se.prototype.request,n);return R.extend(o,Se.prototype,n),R.extend(o,n),o.create=function(t){return e(ye(r,t))},o}(ue);je.Axios=Se,je.CanceledError=re,je.CancelToken=Te,je.isCancel=fe,je.VERSION=ve,je.toFormData=k,je.AxiosError=N,je.Cancel=je.CanceledError,je.all=function(e){return Promise.all(e)},je.spread=function(e){return function(t){return e.apply(null,t)}},je.isAxiosError=function(e){return R.isObject(e)&&!0===e.isAxiosError},je.formToJSON=function(e){return Q(R.isHTMLForm(e)?new FormData(e):e)};var _e=je,xe=je;return _e.default=xe,_e})); | ||
| //# sourceMappingURL=axios.min.js.map |
@@ -1,2 +0,2 @@ | ||
| var e,t=function(e,t){return function(){return e.apply(t,arguments)}},r=Object.prototype.toString,n=(e=Object.create(null),function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())});function o(e){return e=e.toLowerCase(),function(t){return n(t)===e}}function i(e){return Array.isArray(e)}function a(e){return void 0===e}var s=o("ArrayBuffer");function u(e){return"number"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var l=o("Date"),p=o("File"),d=o("Blob"),h=o("FileList");function m(e){return"[object Function]"===r.call(e)}var y=o("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var E,b=(E="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return E&&e instanceof E});var g,w=o("HTMLFormElement"),O=(g=Object.prototype.hasOwnProperty,function(e,t){return g.call(e,t)}),R={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";if(!e)return!1;if("function"==typeof FormData&&e instanceof FormData)return!0;if(!c(e))return!1;var n=Object.getPrototypeOf(e);return!(!n||n===Object.prototype)&&(!!m(e.append)&&(r.call(e)===t||m(e.toString)&&e.toString()===t))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:u,isObject:c,isPlainObject:f,isEmptyObject:function(e){if(!f(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isUndefined:a,isDate:l,isFile:p,isBlob:d,isFunction:m,isStream:function(e){return c(e)&&m(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t={};function r(r,n){"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r)}for(var n=0,o=arguments.length;n<o;n++)v(arguments[n],r);return t},extend:function(e,r,n){return v(r,(function(r,o){e[o]=n&&"function"==typeof r?t(r,n):r})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:o,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(i(e))return e;var t=e.length;if(!u(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:b,isFileList:h,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:w,hasOwnProperty:O};function S(e,t,r,n,o){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),o&&(this.response=o)}R.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var A=S.prototype,T={};["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","ERR_FORM_DATA_DEPTH_EXCEEDED"].forEach((function(e){T[e]={value:e}})),Object.defineProperties(S,T),Object.defineProperty(A,"isAxiosError",{value:!0}),S.from=function(e,t,r,n,o,i){var a=Object.create(A);return R.toFlatObject(e,a,(function(e){return e!==Error.prototype})),S.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var _=S,j="object"==typeof self?self.FormData:window.FormData;function x(e){return R.isPlainObject(e)||R.isArray(e)}function P(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function D(e,t,r){return e?e.concat(t).map((function(e,t){return e=P(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var N=R.toFlatObject(R,{},null,(function(e){return/^is[A-Z]/.test(e)}));var F=function(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new(j||FormData);var n,o=(r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!R.isUndefined(t[e])}))).metaTokens,i=r.visitor||p,a=r.dots,s=r.indexes,u=r.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===r.maxDepth?100:r.maxDepth,f=u&&((n=t)&&R.isFunction(n.append)&&"FormData"===n[Symbol.toStringTag]&&n[Symbol.iterator]);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(R.isDate(e))return e.toISOString();if(!f&&R.isBlob(e))throw new _("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(e)||R.isTypedArray(e)?f&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function p(e,r,n){var i=e;if(e&&!n&&"object"==typeof e)if(R.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&function(e){return R.isArray(e)&&!e.some(x)}(e)||R.isFileList(e)||R.endsWith(r,"[]")&&(i=R.toArray(e)))return r=P(r),i.forEach((function(e,n){!R.isUndefined(e)&&null!==e&&t.append(!0===s?D([r],n,a):null===s?r:r+"[]",l(e))})),!1;return!!x(e)||(t.append(D(n,r,a),l(e)),!1)}var d=[],h=Object.assign(N,{defaultVisitor:p,convertValue:l,isVisitable:x});if(!R.isObject(e))throw new TypeError("data must be an object");return function e(r,n,o){if(!R.isUndefined(r)){if((o=o||0)>c)throw new _("Maximum object depth of "+c+" exceeded (got "+o+" levels)",_.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),R.forEach(r,(function(r,a){!0===(!(R.isUndefined(r)||null===r)&&i.call(t,r,R.isString(a)?a.trim():a,n,h))&&e(r,n?n.concat(a):[a],o+1)})),d.pop()}}(e,null,0),t};function C(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20/g,(function(e){return t[e]}))}function U(e,t){this._pairs=[],e&&F(e,this,t)}var B=U.prototype;B.append=function(e,t){this._pairs.push([e,t])},B.toString=function(e){var t=e?function(t){return e.call(this,t,C)}:C;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var L=U;function k(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var q=function(e,t,r){if(!t)return e;var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n));var o,i=r&&r.encode||k,a=r&&r.serialize;return(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new L(t,r).toString(i))&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e};function I(){this.handlers=[]}I.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},I.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},I.prototype.clear=function(){this.handlers&&(this.handlers=[])},I.prototype.forEach=function(e){R.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var M=I,H=function(e,t){R.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},J={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:L,FormData:FormData,Blob:Blob},protocols:["http","https","file","blob","url","data"]};var V=function(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&R.isArray(n)?n.length:i,s?(R.hasOwnProperty(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&R.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&R.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){var r={};return R.forEachEntry(e,(function(e,n){t(function(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),n,r,0)})),r}return null},W=R.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),R.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),R.isString(n)&&a.push("path="+n),R.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},X=function(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1===r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},$=["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"],K=R.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=R.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Q(e,t,r){_.call(this,null==e?"canceled":e,_.ERR_CANCELED,t,r),this.name="CanceledError"}R.inherits(Q,_,{__CANCEL__:!0});var G=Q,Y=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType,s=R.hasOwnProperty(e,"withXSRFToken")?e.withXSRFToken:void 0;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}R.isFormData(o)&&R.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(f+":"+l)}var p=X(e.baseURL,e.url,e.allowAbsoluteUrls);function d(){if(c){var n,o,i,s,f,l="getAllResponseHeaders"in c?(n=c.getAllResponseHeaders(),f={},n?(R.forEach(n.split("\n"),(function(e){if(s=e.indexOf(":"),o=R.trim(e.slice(0,s)).toLowerCase(),i=R.trim(e.slice(s+1)),o){if(f[o]&&$.indexOf(o)>=0)return;f[o]="set-cookie"===o?(f[o]?f[o]:[]).concat([i]):f[o]?f[o]+", "+i:i}})),f):f):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new _("Request failed with status code "+r.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:l,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),q(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(r(new _("Request aborted",_.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new _("Network Error",_.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new _(t,n.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,c)),c=null},R.isStandardBrowserEnv()&&(R.isFunction(s)&&(s=s(e)),!0===s||!1!==s&&K(p))){var h=e.xsrfHeaderName&&e.xsrfCookieName&&W.read(e.xsrfCookieName);h&&(i[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&R.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),R.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(t){c&&(r(!t||t.type?new G(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||!1===o||0===o||""===o||(o=null);var m,y=(m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p))&&m[1]||"";y&&-1===J.protocols.indexOf(y)?r(new _("Unsupported protocol "+y+":",_.ERR_BAD_REQUEST,e)):c.send(o)}))},Z={"Content-Type":"application/x-www-form-urlencoded"};function ee(e,t){!R.isUndefined(e)&&R.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var te,re={transitional:z,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(te=Y),te),transformRequest:[function(e,t){H(t,"Accept"),H(t,"Content-Type");var r,n=t&&t["Content-Type"]||"",o=n.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return o?JSON.stringify(V(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return ee(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(i){var a=R.hasOwnProperty(this,"formSerializer")?this.formSerializer:void 0,s=R.hasOwnProperty(this,"env")?this.env:void 0;if(-1!==n.indexOf("application/x-www-form-urlencoded"))return function(e,t){return F(e,new J.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return J.isNode&&R.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((r=R.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=s&&s.FormData;return F(r?{"files[]":e}:e,u&&new u,a)}}return i||o?(ee(t,"application/json"),function(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||re.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&R.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw _.from(e,_.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:J.classes.FormData,Blob:J.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(e){re.headers[e]={}})),R.forEach(["post","put","patch"],(function(e){re.headers[e]=R.merge(Z)}));var ne=re,oe=function(e,t,r,n){var o=this||ne;return R.forEach(n,(function(n){e=n.call(o,e,t,r)})),e},ie=function(e){return!(!e||!e.__CANCEL__)},ae=/[^\x09\x20-\x7E\x80-\xFF]/g,se=/^[\x09\x20]+|[\x09\x20]+$/g;var ue=function e(t){return!1===t||null==t?t:R.isArray(t)?t.map(e):String(t).replace(ae,"").replace(se,"")};function ce(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new G}var fe=function(e){return ce(e),e.headers=e.headers||{},e.data=oe.call(e,e.data,e.headers,null,e.transformRequest),H(e.headers,"Accept"),H(e.headers,"Content-Type"),e.headers=R.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),R.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),R.forEach(e.headers,(function(t,r){e.headers[r]=ue(t)})),(e.adapter||ne.adapter)(e).then((function(t){return ce(e),t.data=oe.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return ie(t)||(ce(e),t&&t.response&&(t.response.data=oe.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))},le=function(e,t){t=t||{};var r=Object.create(null);function n(e,t){return R.hasOwnProperty(e,t)?e[t]:void 0}function o(e,t){return R.hasOwnProperty(e,t)}function i(e,t){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge(e,t):R.isEmptyObject(t)?R.merge({},e):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function a(r){return o(t,r)&&!R.isUndefined(t[r])?i(n(e,r),t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function s(e){if(o(t,e)&&!R.isUndefined(t[e]))return i(void 0,t[e])}function u(r){return o(t,r)&&!R.isUndefined(t[r])?i(void 0,t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function c(r){return o(t,r)?i(n(e,r),t[r]):o(e,r)?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c};return R.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var t=R.hasOwnProperty(f,e)?f[e]:a,n=t(e);R.isUndefined(n)&&t!==c||(r[e]=n)}})),r},pe="0.31.1",de=pe,he={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){he[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var me={};he.transitional=function(e,t,r){function n(e,t){return"[Axios v"+de+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new _(n(o," has been removed"+(t?" in "+t:"")),_.ERR_DEPRECATED);return t&&!me[o]&&(me[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var ye={assertOptions:function(e,t,r){if("object"!=typeof e)throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new _("option "+i+" must be "+u,_.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}},validators:he},ve=ye.validators;function Ee(e){this.defaults=e,this.interceptors={request:new M,response:new M}}Ee.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=le(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&ye.assertOptions(r,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1);var n=t.paramsSerializer;null!=n&&(R.isFunction(n)?t.paramsSerializer={serialize:n}:ye.assertOptions(n,{encode:ve.function,serialize:ve.function},!0));var o=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var a,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var u=[fe,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),a=Promise.resolve(t);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=t;o.length;){var f=o.shift(),l=o.shift();try{c=f(c)}catch(e){l(e);break}}try{a=fe(c)}catch(e){return Promise.reject(e)}for(;s.length;)a=a.then(s.shift(),s.shift());return a},Ee.prototype.getUri=function(e){e=le(this.defaults,e);var t=X(e.baseURL,e.url,e.allowAbsoluteUrls);return q(t,e.params,e.paramsSerializer)},R.forEach(["delete","get","head","options"],(function(e){Ee.prototype[e]=function(t,r){return this.request(le(r||{},{method:e,url:t,data:(r||{}).data}))}})),R.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(le(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ee.prototype[e]=t(),Ee.prototype[e+"Form"]=t(!0)}));var be=Ee;function ge(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new G(e,n,o),t(r.reason))}))}ge.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},ge.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},ge.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},ge.source=function(){var e;return{token:new ge((function(t){e=t})),cancel:e}};var we=ge;var Oe=function e(r){var n=new be(r),o=t(be.prototype.request,n);return R.extend(o,be.prototype,n),R.extend(o,n),o.create=function(t){return e(le(r,t))},o}(ne);Oe.Axios=be,Oe.CanceledError=G,Oe.CancelToken=we,Oe.isCancel=ie,Oe.VERSION=pe,Oe.toFormData=F,Oe.AxiosError=_,Oe.Cancel=Oe.CanceledError,Oe.all=function(e){return Promise.all(e)},Oe.spread=function(e){return function(t){return e.apply(null,t)}},Oe.isAxiosError=function(e){return R.isObject(e)&&!0===e.isAxiosError},Oe.formToJSON=function(e){return V(R.isHTMLForm(e)?new FormData(e):e)};var Re=Oe,Se=Oe;Re.default=Se;export{Re as default}; | ||
| var e,t=function(e,t){return function(){return e.apply(t,arguments)}},r=Object.prototype.toString,n=(e=Object.create(null),function(t){var n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())});function o(e){return e=e.toLowerCase(),function(t){return n(t)===e}}function i(e){return Array.isArray(e)}function a(e){return void 0===e}var s=o("ArrayBuffer");function u(e){return"number"==typeof e}function c(e){return null!==e&&"object"==typeof e}function f(e){if("object"!==n(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var l=o("Date"),p=o("File"),d=o("Blob"),h=o("FileList");function m(e){return"[object Function]"===r.call(e)}var y=o("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var E,b=(E="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return E&&e instanceof E});var g,O=o("HTMLFormElement"),w=(g=Object.prototype.hasOwnProperty,function(e,t){return g.call(e,t)}),R={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";if(!e)return!1;if("function"==typeof FormData&&e instanceof FormData)return!0;if(!c(e))return!1;var n=Object.getPrototypeOf(e);return!(!n||n===Object.prototype)&&(!!m(e.append)&&(r.call(e)===t||m(e.toString)&&e.toString()===t))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:u,isObject:c,isPlainObject:f,isEmptyObject:function(e){if(!f(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isUndefined:a,isDate:l,isFile:p,isBlob:d,isFunction:m,isStream:function(e){return c(e)&&m(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t=Object.create(null);function r(r,n){var o;"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(f(o=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0)&&f(r)?t[n]=e(o,r):f(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r)}for(var n=0,o=arguments.length;n<o;n++)v(arguments[n],r);return t},extend:function(e,r,n){return v(r,(function(r,o){e[o]=n&&"function"==typeof r?t(r,n):r})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:o,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(i(e))return e;var t=e.length;if(!u(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:b,isFileList:h,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:w},S=["authorization","proxy-authorization","cookie","set-cookie","x-api-key","password"];function A(e){var t=Object.create(null);return t.value=e,t}function T(e,t,r,n){var o;return function(e,t){return"string"==typeof e&&t[e.toLowerCase()]}(r,t)?"[REDACTED ****]":R.isArray(e)?-1!==n.indexOf(e)?"[Circular]":(n.push(e),o=[],R.forEach(e,(function(e,r){o[r]=T(e,t,r,n)})),n.pop(),o):R.isPlainObject(e)?-1!==n.indexOf(e)?"[Circular]":(n.push(e),o={},R.forEach(e,(function(e,r){o[r]=T(e,t,r,n)})),n.pop(),o):e}function _(e){return e?T(e,function(e){var t=(e&&R.isArray(e.redact)&&e.redact.length?e.redact:null)||S,r={};return R.forEach(t,(function(e){"string"==typeof e&&(r[e.toLowerCase()]=!0)})),r}(e),void 0,[]):e}function j(e,t,r,n,o){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),o&&(this.response=o)}R.inherits(j,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var x=j.prototype,P=Object.create(null);["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","ERR_FORM_DATA_DEPTH_EXCEEDED"].forEach((function(e){P[e]=A(e)})),Object.defineProperties(j,P),Object.defineProperty(x,"isAxiosError",A(!0)),j.from=function(e,t,r,n,o,i){var a=Object.create(x);return R.toFlatObject(e,a,(function(e){return e!==Error.prototype})),j.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var D=j,C="object"==typeof self?self.FormData:window.FormData;function N(e){return R.isPlainObject(e)||R.isArray(e)}function F(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function U(e,t,r){return e?e.concat(t).map((function(e,t){return e=F(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var B=R.toFlatObject(R,{},null,(function(e){return/^is[A-Z]/.test(e)}));var L=function(e,t,r){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new(C||FormData);var n,o=(r=R.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!R.isUndefined(t[e])}))).metaTokens,i=r.visitor||p,a=r.dots,s=r.indexes,u=r.Blob||"undefined"!=typeof Blob&&Blob,c=void 0===r.maxDepth?100:r.maxDepth,f=u&&((n=t)&&R.isFunction(n.append)&&"FormData"===n[Symbol.toStringTag]&&n[Symbol.iterator]);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(R.isDate(e))return e.toISOString();if(!f&&R.isBlob(e))throw new D("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(e)||R.isTypedArray(e)?f&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function p(e,r,n){var i=e;if(e&&!n&&"object"==typeof e)if(R.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(R.isArray(e)&&function(e){return R.isArray(e)&&!e.some(N)}(e)||R.isFileList(e)||R.endsWith(r,"[]")&&(i=R.toArray(e)))return r=F(r),i.forEach((function(e,n){!R.isUndefined(e)&&null!==e&&t.append(!0===s?U([r],n,a):null===s?r:r+"[]",l(e))})),!1;return!!N(e)||(t.append(U(n,r,a),l(e)),!1)}var d=[],h=Object.assign(B,{defaultVisitor:p,convertValue:l,isVisitable:N});if(!R.isObject(e))throw new TypeError("data must be an object");return function e(r,n,o){if(!R.isUndefined(r)){if((o=o||0)>c)throw new D("Maximum object depth of "+c+" exceeded (got "+o+" levels)",D.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==d.indexOf(r))throw Error("Circular reference detected in "+n.join("."));d.push(r),R.forEach(r,(function(r,a){!0===(!(R.isUndefined(r)||null===r)&&i.call(t,r,R.isString(a)?a.trim():a,n,h))&&e(r,n?n.concat(a):[a],o+1)})),d.pop()}}(e,null,0),t};function k(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20/g,(function(e){return t[e]}))}function q(e,t){this._pairs=[],e&&L(e,this,t)}var I=q.prototype;I.append=function(e,t){this._pairs.push([e,t])},I.toString=function(e){var t=e?function(t){return e.call(this,t,k)}:k;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var M=q;function z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var H=function(e,t,r){if(!t)return e;var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n));var o,i=r&&r.encode||z,a=r&&r.serialize;return(o=a?a(t,r):R.isURLSearchParams(t)?t.toString():new M(t,r).toString(i))&&(e+=(-1===e.indexOf("?")?"?":"&")+o),e};function J(){this.handlers=[]}J.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},J.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},J.prototype.clear=function(){this.handlers&&(this.handlers=[])},J.prototype.forEach=function(e){R.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var V=J,W=function(e,t){R.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},X={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:M,FormData:FormData,Blob:Blob},protocols:["http","https","file","blob","url","data"]};var K=function(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&R.isArray(n)?n.length:i,s?(R.hasOwnProperty(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&R.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&R.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){var r={};return R.forEachEntry(e,(function(e,n){t(function(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),n,r,0)})),r}return null},Q=R.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),R.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),R.isString(n)&&a.push("path="+n),R.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){for(var t,r=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(t=n[o];" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(r))return decodeURIComponent(t.substring(r.length))}return null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},G=function(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1===r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},Y=["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"],Z=R.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=R.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function ee(e,t,r){D.call(this,null==e?"canceled":e,D.ERR_CANCELED,t,r),this.name="CanceledError"}R.inherits(ee,D,{__CANCEL__:!0});var te=ee,re=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType,s=R.hasOwnProperty(e,"withXSRFToken")?e.withXSRFToken:void 0;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}R.isFormData(o)&&R.isStandardBrowserEnv()&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(f+":"+l)}var p=G(e.baseURL,e.url,e.allowAbsoluteUrls);function d(){if(c){var n,o,i,s,f,l="getAllResponseHeaders"in c?(n=c.getAllResponseHeaders(),f={},n?(R.forEach(n.split("\n"),(function(e){if(s=e.indexOf(":"),o=R.trim(e.slice(0,s)).toLowerCase(),i=R.trim(e.slice(s+1)),o){if(f[o]&&Y.indexOf(o)>=0)return;f[o]="set-cookie"===o?(f[o]?f[o]:[]).concat([i]):f[o]?f[o]+", "+i:i}})),f):f):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new D("Request failed with status code "+r.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),u()}),(function(e){r(e),u()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:l,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),H(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(r(new D("Request aborted",D.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||X;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new D(t,n.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,c)),c=null},R.isStandardBrowserEnv()&&(R.isFunction(s)&&(s=s(e)),!0===s||!1!==s&&Z(p))){var h=e.xsrfHeaderName&&e.xsrfCookieName&&Q.read(e.xsrfCookieName);h&&(i[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&R.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),R.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(t){c&&(r(!t||t.type?new te(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||!1===o||0===o||""===o||(o=null);var m,y=(m=/^([-+\w]{1,25})(:?\/\/|:)/.exec(p))&&m[1]||"";y&&-1===$.protocols.indexOf(y)?r(new D("Unsupported protocol "+y+":",D.ERR_BAD_REQUEST,e)):c.send(o)}))},ne={"Content-Type":"application/x-www-form-urlencoded"};function oe(e,t){!R.isUndefined(e)&&R.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var ie,ae={transitional:X,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(ie=re),ie),transformRequest:[function(e,t){W(t,"Accept"),W(t,"Content-Type");var r,n=t&&t["Content-Type"]||"",o=n.indexOf("application/json")>-1,i=R.isObject(e);if(i&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return o?JSON.stringify(K(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return oe(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(i){var a=R.hasOwnProperty(this,"formSerializer")?this.formSerializer:void 0,s=R.hasOwnProperty(this,"env")?this.env:void 0;if(-1!==n.indexOf("application/x-www-form-urlencoded"))return function(e,t){return L(e,new $.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return $.isNode&&R.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((r=R.isFileList(e))||n.indexOf("multipart/form-data")>-1){var u=s&&s.FormData;return L(r?{"files[]":e}:e,u&&new u,a)}}return i||o?(oe(t,"application/json"),function(e,t,r){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||ae.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&R.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw D.from(e,D.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,redact:S.slice(),env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],(function(e){ae.headers[e]={}})),R.forEach(["post","put","patch"],(function(e){ae.headers[e]=R.merge(ne)}));var se=ae,ue=function(e,t,r,n){var o=this||se;return R.forEach(n,(function(n){e=n.call(o,e,t,r)})),e},ce=function(e){return!(!e||!e.__CANCEL__)},fe=/[^\x09\x20-\x7E\x80-\xFF]/g,le=/^[\x09\x20]+|[\x09\x20]+$/g;var pe=function e(t){return!1===t||null==t?t:R.isArray(t)?t.map(e):String(t).replace(fe,"").replace(le,"")};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new te}var he=function(e){de(e),e.headers=e.headers||{},e.data=ue.call(e,e.data,e.headers,null,e.transformRequest),W(e.headers,"Accept"),W(e.headers,"Content-Type");var t=R.hasOwnProperty(e.headers,"common")&&e.headers.common?e.headers.common:{},r=e.method&&R.hasOwnProperty(e.headers,e.method)&&e.headers[e.method]?e.headers[e.method]:{};return e.headers=R.merge(t,r,e.headers),R.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),R.forEach(e.headers,(function(t,r){e.headers[r]=pe(t)})),(e.adapter||se.adapter)(e).then((function(t){return de(e),t.data=ue.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return ce(t)||(de(e),t&&t.response&&(t.response.data=ue.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))},me=function(e,t){t=t||{};var r=Object.create(null);function n(e,t){return R.hasOwnProperty(e,t)?e[t]:void 0}function o(e,t){return R.hasOwnProperty(e,t)}function i(e,t){return R.isPlainObject(e)&&R.isPlainObject(t)?R.merge(e,t):R.isEmptyObject(t)?R.merge({},e):R.isPlainObject(t)?R.merge({},t):R.isArray(t)?t.slice():t}function a(r){return o(t,r)&&!R.isUndefined(t[r])?i(n(e,r),t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function s(e){if(o(t,e)&&!R.isUndefined(t[e]))return i(void 0,t[e])}function u(r){return o(t,r)&&!R.isUndefined(t[r])?i(void 0,t[r]):o(e,r)&&!R.isUndefined(e[r])?i(void 0,e[r]):void 0}function c(r){return o(t,r)?i(n(e,r),t[r]):o(e,r)?i(void 0,e[r]):void 0}var f={url:s,method:s,data:s,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:c};return R.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var t=R.hasOwnProperty(f,e)?f[e]:a,n=t(e);R.isUndefined(n)&&t!==c||(r[e]=n)}})),r},ye="0.32.0",ve=ye,Ee={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ee[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var be={};Ee.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ve+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new D(n(o," has been removed"+(t?" in "+t:"")),D.ERR_DEPRECATED);return t&&!be[o]&&(be[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var ge={assertOptions:function(e,t,r){if("object"!=typeof e)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new D("option "+i+" must be "+u,D.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}},validators:Ee},Oe=ge.validators;function we(e){this.defaults=e,this.interceptors={request:new V,response:new V}}we.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=me(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&ge.assertOptions(r,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1);var n=t.paramsSerializer;null!=n&&(R.isFunction(n)?t.paramsSerializer={serialize:n}:ge.assertOptions(n,{encode:Oe.function,serialize:Oe.function},!0));var o=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var a,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!i){var u=[he,void 0];for(Array.prototype.unshift.apply(u,o),u=u.concat(s),a=Promise.resolve(t);u.length;)a=a.then(u.shift(),u.shift());return a}for(var c=t;o.length;){var f=o.shift(),l=o.shift();try{c=f(c)}catch(e){l(e);break}}try{a=he(c)}catch(e){return Promise.reject(e)}for(;s.length;)a=a.then(s.shift(),s.shift());return a},we.prototype.getUri=function(e){e=me(this.defaults,e);var t=G(e.baseURL,e.url,e.allowAbsoluteUrls);return H(t,e.params,e.paramsSerializer)},R.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,r){return this.request(me(r||{},{method:e,url:t,data:(r||{}).data}))}})),R.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(me(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}we.prototype[e]=t(),we.prototype[e+"Form"]=t(!0)}));var Re=we;function Se(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new te(e,n,o),t(r.reason))}))}Se.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Se.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Se.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Se.source=function(){var e;return{token:new Se((function(t){e=t})),cancel:e}};var Ae=Se;var Te=function e(r){var n=new Re(r),o=t(Re.prototype.request,n);return R.extend(o,Re.prototype,n),R.extend(o,n),o.create=function(t){return e(me(r,t))},o}(se);Te.Axios=Re,Te.CanceledError=te,Te.CancelToken=Ae,Te.isCancel=ce,Te.VERSION=ye,Te.toFormData=L,Te.AxiosError=D,Te.Cancel=Te.CanceledError,Te.all=function(e){return Promise.all(e)},Te.spread=function(e){return function(t){return e.apply(null,t)}},Te.isAxiosError=function(e){return R.isObject(e)&&!0===e.isAxiosError},Te.formToJSON=function(e){return K(R.isHTMLForm(e)?new FormData(e):e)};var _e=Te,je=Te;_e.default=je;export{_e as default}; | ||
| //# sourceMappingURL=axios.min.js.map |
+3
-0
@@ -157,2 +157,4 @@ // TypeScript Version: 4.1 | ||
| maxContentLength?: number; | ||
| formDataHeaderPolicy?: 'legacy' | 'content-only'; | ||
| redact?: string[]; | ||
| validateStatus?: ((status: number) => boolean) | null; | ||
@@ -163,2 +165,3 @@ maxBodyLength?: number; | ||
| socketPath?: string | null; | ||
| allowedSocketPaths?: string | string[] | null; | ||
| httpAgent?: any; | ||
@@ -165,0 +168,0 @@ httpsAgent?: any; |
+291
-82
@@ -13,2 +13,3 @@ 'use strict'; | ||
| var url = require('url'); | ||
| var path = require('path'); | ||
| var zlib = require('zlib'); | ||
@@ -40,2 +41,90 @@ var VERSION = require('./../env/data').version; | ||
| function removeProxyAuthorization(headers) { | ||
| Object.keys(headers).forEach(function removeHeader(header) { | ||
| if (header.toLowerCase() === 'proxy-authorization') { | ||
| delete headers[header]; | ||
| } | ||
| }); | ||
| } | ||
| function normalizeSocketPath(socketPath) { | ||
| if (/^\\\\[.?]\\pipe\\/i.test(socketPath)) { | ||
| return socketPath; | ||
| } | ||
| return path.resolve(socketPath); | ||
| } | ||
| function getAllowedSocketPaths(config) { | ||
| var allowedSocketPaths = config.allowedSocketPaths; | ||
| if ( | ||
| allowedSocketPaths === null || | ||
| typeof allowedSocketPaths === 'undefined' | ||
| ) { | ||
| return null; | ||
| } | ||
| if (utils.isString(allowedSocketPaths)) { | ||
| return [allowedSocketPaths]; | ||
| } | ||
| if (utils.isArray(allowedSocketPaths)) { | ||
| for (var i = 0; i < allowedSocketPaths.length; i++) { | ||
| if (!utils.isString(allowedSocketPaths[i])) { | ||
| return false; | ||
| } | ||
| } | ||
| return allowedSocketPaths; | ||
| } | ||
| return false; | ||
| } | ||
| function checkSocketPath(config) { | ||
| var socketPath = config.socketPath; | ||
| if (!socketPath) { | ||
| return null; | ||
| } | ||
| if (!utils.isString(socketPath)) { | ||
| return new AxiosError( | ||
| 'config.socketPath must be a string', | ||
| AxiosError.ERR_BAD_OPTION_VALUE, | ||
| config | ||
| ); | ||
| } | ||
| var allowedSocketPaths = getAllowedSocketPaths(config); | ||
| if (allowedSocketPaths === false) { | ||
| return new AxiosError( | ||
| 'config.allowedSocketPaths must be a string, an array of strings, or null', | ||
| AxiosError.ERR_BAD_OPTION_VALUE, | ||
| config | ||
| ); | ||
| } | ||
| if (allowedSocketPaths) { | ||
| var normalizedSocketPath = normalizeSocketPath(socketPath); | ||
| var allowed = allowedSocketPaths.some( | ||
| function isAllowed(allowedSocketPath) { | ||
| return normalizeSocketPath(allowedSocketPath) === normalizedSocketPath; | ||
| } | ||
| ); | ||
| if (!allowed) { | ||
| return new AxiosError( | ||
| 'config.socketPath is not allowed by config.allowedSocketPaths', | ||
| AxiosError.ERR_BAD_OPTION_VALUE, | ||
| config | ||
| ); | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
| /** | ||
@@ -59,16 +148,33 @@ * | ||
| } | ||
| if (!proxy) { | ||
| removeProxyAuthorization(options.headers); | ||
| } | ||
| if (proxy) { | ||
| // Basic proxy authorization | ||
| if (proxy.auth) { | ||
| var proxyAuth = utils.hasOwnProperty(proxy, 'auth') | ||
| ? proxy.auth | ||
| : undefined; | ||
| if (proxyAuth) { | ||
| // Support proxy auth object form | ||
| if (proxy.auth.username || proxy.auth.password) { | ||
| proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); | ||
| if (utils.isObject(proxyAuth)) { | ||
| var proxyUsername = utils.hasOwnProperty(proxyAuth, 'username') | ||
| ? proxyAuth.username | ||
| : ''; | ||
| var proxyPassword = utils.hasOwnProperty(proxyAuth, 'password') | ||
| ? proxyAuth.password | ||
| : ''; | ||
| proxyAuth = | ||
| proxyUsername || proxyPassword | ||
| ? proxyUsername + ':' + proxyPassword | ||
| : undefined; | ||
| } | ||
| var base64 = Buffer | ||
| .from(proxy.auth, 'utf8') | ||
| .toString('base64'); | ||
| options.headers['Proxy-Authorization'] = 'Basic ' + base64; | ||
| if (proxyAuth) { | ||
| var base64 = Buffer.from(proxyAuth, 'utf8').toString('base64'); | ||
| removeProxyAuthorization(options.headers); | ||
| options.headers['Proxy-Authorization'] = 'Basic ' + base64; | ||
| } | ||
| } | ||
| options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); | ||
| options.headers.host = | ||
| options.hostname + (options.port ? ':' + options.port : ''); | ||
| options.hostname = proxy.host; | ||
@@ -92,3 +198,6 @@ options.host = proxy.host; | ||
| module.exports = function httpAdapter(config) { | ||
| return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { | ||
| return new Promise(function dispatchHttpRequest( | ||
| resolvePromise, | ||
| rejectPromise | ||
| ) { | ||
| var onCanceled; | ||
@@ -120,3 +229,7 @@ function done() { | ||
| // Parse url | ||
| var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); | ||
| var fullPath = buildFullPath( | ||
| config.baseURL, | ||
| config.url, | ||
| config.allowAbsoluteUrls | ||
| ); | ||
| var parsed = url.parse(fullPath); | ||
@@ -133,7 +246,11 @@ var protocol = parsed.protocol || supportedProtocols[0]; | ||
| if (estimated > config.maxContentLength) { | ||
| return reject(new AxiosError( | ||
| 'maxContentLength size of ' + config.maxContentLength + ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, | ||
| config | ||
| )); | ||
| return reject( | ||
| new AxiosError( | ||
| 'maxContentLength size of ' + | ||
| config.maxContentLength + | ||
| ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, | ||
| config | ||
| ) | ||
| ); | ||
| } | ||
@@ -154,3 +271,5 @@ } | ||
| try { | ||
| var envOption = utils.hasOwnProperty(config, 'env') ? config.env : undefined; | ||
| var envOption = utils.hasOwnProperty(config, 'env') | ||
| ? config.env | ||
| : undefined; | ||
| convertedData = fromDataURI(config.url, responseType === 'blob', { | ||
@@ -183,7 +302,9 @@ Blob: envOption && envOption.Blob | ||
| if (supportedProtocols.indexOf(protocol) === -1) { | ||
| return reject(new AxiosError( | ||
| 'Unsupported protocol ' + protocol, | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| )); | ||
| return reject( | ||
| new AxiosError( | ||
| 'Unsupported protocol ' + protocol, | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| ) | ||
| ); | ||
| } | ||
@@ -212,5 +333,18 @@ | ||
| // support for https://www.npmjs.com/package/form-data api | ||
| if (utils.isFormData(data) && utils.isFunction(data.getHeaders) && | ||
| data.getHeaders !== Object.prototype.getHeaders) { | ||
| Object.assign(headers, data.getHeaders()); | ||
| if ( | ||
| utils.isFormData(data) && | ||
| utils.isFunction(data.getHeaders) && | ||
| data.getHeaders !== Object.prototype.getHeaders | ||
| ) { | ||
| var formHeaders = data.getHeaders(); | ||
| if (config.formDataHeaderPolicy === 'content-only') { | ||
| Object.keys(formHeaders).forEach(function copyContentHeader(name) { | ||
| var lowerName = name.toLowerCase(); | ||
| if (lowerName === 'content-type' || lowerName === 'content-length') { | ||
| headers[name] = formHeaders[name]; | ||
| } | ||
| }); | ||
| } else { | ||
| Object.assign(headers, formHeaders); | ||
| } | ||
| } else if (data && !utils.isStream(data)) { | ||
@@ -224,15 +358,19 @@ if (Buffer.isBuffer(data)) { | ||
| } else { | ||
| return reject(new AxiosError( | ||
| 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| )); | ||
| return reject( | ||
| new AxiosError( | ||
| 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| ) | ||
| ); | ||
| } | ||
| if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { | ||
| return reject(new AxiosError( | ||
| 'Request body larger than maxBodyLength limit', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| )); | ||
| return reject( | ||
| new AxiosError( | ||
| 'Request body larger than maxBodyLength limit', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| ) | ||
| ); | ||
| } | ||
@@ -266,3 +404,6 @@ | ||
| try { | ||
| buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''); | ||
| buildURL(parsed.path, config.params, config.paramsSerializer).replace( | ||
| /^\?/, | ||
| '' | ||
| ); | ||
| } catch (err) { | ||
@@ -277,3 +418,7 @@ var customErr = new Error(err.message); | ||
| var options = { | ||
| path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), | ||
| path: buildURL( | ||
| parsed.path, | ||
| config.params, | ||
| config.paramsSerializer | ||
| ).replace(/^\?/, ''), | ||
| method: method, | ||
@@ -288,2 +433,7 @@ headers: headers, | ||
| var socketPathError = checkSocketPath(config); | ||
| if (socketPathError) { | ||
| return reject(socketPathError); | ||
| } | ||
| if (config.socketPath) { | ||
@@ -294,3 +444,7 @@ options.socketPath = config.socketPath; | ||
| options.port = parsed.port; | ||
| setProxy(options, config.proxy, protocol + '//' + parsed.host + options.path); | ||
| setProxy( | ||
| options, | ||
| config.proxy, | ||
| protocol + '//' + parsed.host + options.path | ||
| ); | ||
| } | ||
@@ -367,3 +521,3 @@ | ||
| if (responseType === 'stream') { | ||
| // Enforce maxContentLength on streamed responses too (GHSA-vf2m-468p-8v99). | ||
| // Enforce maxContentLength on streamed responses too. | ||
| // Previously the stream path bypassed the size guard because the check only | ||
@@ -378,8 +532,12 @@ // ran on the buffering branch. | ||
| if (streamedBytes > maxContentLength) { | ||
| callback(new AxiosError( | ||
| 'maxContentLength size of ' + maxContentLength + ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, | ||
| config, | ||
| lastRequest | ||
| )); | ||
| callback( | ||
| new AxiosError( | ||
| 'maxContentLength size of ' + | ||
| maxContentLength + | ||
| ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, | ||
| config, | ||
| lastRequest | ||
| ) | ||
| ); | ||
| return; | ||
@@ -418,8 +576,19 @@ } | ||
| // make sure the content length is not over the maxContentLength if specified | ||
| if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { | ||
| if ( | ||
| config.maxContentLength > -1 && | ||
| totalResponseBytes > config.maxContentLength | ||
| ) { | ||
| // stream.destroy() emit aborted event before calling reject() on Node.js v16 | ||
| rejected = true; | ||
| responseStream.destroy(); | ||
| reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); | ||
| reject( | ||
| new AxiosError( | ||
| 'maxContentLength size of ' + | ||
| config.maxContentLength + | ||
| ' exceeded', | ||
| AxiosError.ERR_BAD_RESPONSE, | ||
| config, | ||
| lastRequest | ||
| ) | ||
| ); | ||
| } | ||
@@ -433,8 +602,10 @@ }); | ||
| responseStream.destroy(); | ||
| reject(new AxiosError( | ||
| 'response stream aborted', | ||
| AxiosError.ECONNABORTED, | ||
| config, | ||
| lastRequest | ||
| )); | ||
| reject( | ||
| new AxiosError( | ||
| 'response stream aborted', | ||
| AxiosError.ECONNABORTED, | ||
| config, | ||
| lastRequest | ||
| ) | ||
| ); | ||
| }); | ||
@@ -449,3 +620,6 @@ | ||
| try { | ||
| var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); | ||
| var responseData = | ||
| responseBuffer.length === 1 | ||
| ? responseBuffer[0] | ||
| : Buffer.concat(responseBuffer); | ||
| if (responseType !== 'arraybuffer') { | ||
@@ -459,3 +633,5 @@ responseData = responseData.toString(responseEncoding); | ||
| } catch (err) { | ||
| reject(AxiosError.from(err, null, config, response.request, response)); | ||
| reject( | ||
| AxiosError.from(err, null, config, response.request, response) | ||
| ); | ||
| } | ||
@@ -482,12 +658,24 @@ settle(resolve, reject, response); | ||
| if (config.timeout) { | ||
| // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. | ||
| var timeout = parseInt(config.timeout, 10); | ||
| // Force an int timeout so the `req` interface gets a clean number. | ||
| // The try/catch is required: merged config values have a null prototype, | ||
| // and parseInt on a null-prototype object throws "Cannot convert object | ||
| // to primitive value" because there is no inherited toString. Treating | ||
| // that as NaN routes to the same ERR_BAD_OPTION_VALUE rejection as any | ||
| // other unparsable value. | ||
| var timeout; | ||
| try { | ||
| timeout = parseInt(config.timeout, 10); | ||
| } catch (err) { | ||
| timeout = NaN; | ||
| } | ||
| if (isNaN(timeout)) { | ||
| reject(new AxiosError( | ||
| 'error trying to parse `config.timeout` to int', | ||
| AxiosError.ERR_BAD_OPTION_VALUE, | ||
| config, | ||
| req | ||
| )); | ||
| reject( | ||
| new AxiosError( | ||
| 'error trying to parse `config.timeout` to int', | ||
| AxiosError.ERR_BAD_OPTION_VALUE, | ||
| config, | ||
| req | ||
| ) | ||
| ); | ||
@@ -504,3 +692,5 @@ return; | ||
| req.abort(); | ||
| var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; | ||
| var timeoutErrorMessage = config.timeout | ||
| ? 'timeout of ' + config.timeout + 'ms exceeded' | ||
| : 'timeout exceeded'; | ||
| var transitional = config.transitional || transitionalDefaults; | ||
@@ -510,8 +700,12 @@ if (config.timeoutErrorMessage) { | ||
| } | ||
| reject(new AxiosError( | ||
| timeoutErrorMessage, | ||
| transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, | ||
| config, | ||
| req | ||
| )); | ||
| reject( | ||
| new AxiosError( | ||
| timeoutErrorMessage, | ||
| transitional.clarifyTimeoutError | ||
| ? AxiosError.ETIMEDOUT | ||
| : AxiosError.ECONNABORTED, | ||
| config, | ||
| req | ||
| ) | ||
| ); | ||
| }); | ||
@@ -527,3 +721,7 @@ } | ||
| req.abort(); | ||
| reject(!cancel || cancel.type ? new CanceledError(null, config, req) : cancel); | ||
| reject( | ||
| !cancel || cancel.type | ||
| ? new CanceledError(null, config, req) | ||
| : cancel | ||
| ); | ||
| }; | ||
@@ -533,7 +731,8 @@ | ||
| if (config.signal) { | ||
| config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); | ||
| config.signal.aborted | ||
| ? onCanceled() | ||
| : config.signal.addEventListener('abort', onCanceled); | ||
| } | ||
| } | ||
| // Send the request | ||
@@ -547,3 +746,3 @@ if (utils.isStream(data)) { | ||
| // native http/https transport (used when maxRedirects === 0) does not. | ||
| // Count bytes ourselves so the limit is always honored (GHSA-5c9x-8gcm-mpgx). | ||
| // Count bytes ourselves so the limit is always honored. | ||
| var nativeTransport = transport === http || transport === https; | ||
@@ -557,8 +756,10 @@ if (nativeTransport && config.maxBodyLength > -1) { | ||
| if (uploadedBytes > maxBodyLength) { | ||
| callback(new AxiosError( | ||
| 'Request body larger than maxBodyLength limit', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config, | ||
| req | ||
| )); | ||
| callback( | ||
| new AxiosError( | ||
| 'Request body larger than maxBodyLength limit', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config, | ||
| req | ||
| ) | ||
| ); | ||
| return; | ||
@@ -572,4 +773,12 @@ } | ||
| rejected = true; | ||
| try { data.unpipe(bodyLimiter); } catch (e) { /* noop */ } | ||
| try { bodyLimiter.unpipe(req); } catch (e) { /* noop */ } | ||
| try { | ||
| data.unpipe(bodyLimiter); | ||
| } catch (e) { | ||
| /* noop */ | ||
| } | ||
| try { | ||
| bodyLimiter.unpipe(req); | ||
| } catch (e) { | ||
| /* noop */ | ||
| } | ||
| req.destroy(); | ||
@@ -576,0 +785,0 @@ reject(err); |
+103
-33
@@ -21,4 +21,6 @@ 'use strict'; | ||
| var responseType = config.responseType; | ||
| // Guard against prototype pollution (GHSA-xx6v-rp6x-q39c): only honor own properties. | ||
| var withXSRFToken = utils.hasOwnProperty(config, 'withXSRFToken') ? config.withXSRFToken : undefined; | ||
| // Guard against prototype pollution: only honor own properties. | ||
| var withXSRFToken = utils.hasOwnProperty(config, 'withXSRFToken') | ||
| ? config.withXSRFToken | ||
| : undefined; | ||
| var onCanceled; | ||
@@ -44,9 +46,19 @@ function done() { | ||
| var username = config.auth.username || ''; | ||
| var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; | ||
| var password = config.auth.password | ||
| ? unescape(encodeURIComponent(config.auth.password)) | ||
| : ''; | ||
| requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); | ||
| } | ||
| var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); | ||
| var fullPath = buildFullPath( | ||
| config.baseURL, | ||
| config.url, | ||
| config.allowAbsoluteUrls | ||
| ); | ||
| request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); | ||
| request.open( | ||
| config.method.toUpperCase(), | ||
| buildURL(fullPath, config.params, config.paramsSerializer), | ||
| true | ||
| ); | ||
@@ -61,5 +73,10 @@ // Set the request timeout in MS | ||
| // Prepare the response | ||
| var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; | ||
| var responseData = !responseType || responseType === 'text' || responseType === 'json' ? | ||
| request.responseText : request.response; | ||
| var responseHeaders = | ||
| 'getAllResponseHeaders' in request | ||
| ? parseHeaders(request.getAllResponseHeaders()) | ||
| : null; | ||
| var responseData = | ||
| !responseType || responseType === 'text' || responseType === 'json' | ||
| ? request.responseText | ||
| : request.response; | ||
| var response = { | ||
@@ -74,9 +91,13 @@ data: responseData, | ||
| settle(function _resolve(value) { | ||
| resolve(value); | ||
| done(); | ||
| }, function _reject(err) { | ||
| reject(err); | ||
| done(); | ||
| }, response); | ||
| settle( | ||
| function _resolve(value) { | ||
| resolve(value); | ||
| done(); | ||
| }, | ||
| function _reject(err) { | ||
| reject(err); | ||
| done(); | ||
| }, | ||
| response | ||
| ); | ||
@@ -101,3 +122,6 @@ // Clean up request | ||
| // will return status as 0 even though it's a successful request | ||
| if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { | ||
| if ( | ||
| request.status === 0 && | ||
| !(request.responseURL && request.responseURL.indexOf('file:') === 0) | ||
| ) { | ||
| return; | ||
@@ -117,3 +141,10 @@ } | ||
| reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); | ||
| reject( | ||
| new AxiosError( | ||
| 'Request aborted', | ||
| AxiosError.ECONNABORTED, | ||
| config, | ||
| request | ||
| ) | ||
| ); | ||
@@ -128,3 +159,10 @@ // Clean up request | ||
| // onerror should only fire if it's a network error | ||
| reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request)); | ||
| reject( | ||
| new AxiosError( | ||
| 'Network Error', | ||
| AxiosError.ERR_NETWORK, | ||
| config, | ||
| request | ||
| ) | ||
| ); | ||
@@ -137,3 +175,5 @@ // Clean up request | ||
| request.ontimeout = function handleTimeout() { | ||
| var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; | ||
| var timeoutErrorMessage = config.timeout | ||
| ? 'timeout of ' + config.timeout + 'ms exceeded' | ||
| : 'timeout exceeded'; | ||
| var transitional = config.transitional || transitionalDefaults; | ||
@@ -143,7 +183,12 @@ if (config.timeoutErrorMessage) { | ||
| } | ||
| reject(new AxiosError( | ||
| timeoutErrorMessage, | ||
| transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, | ||
| config, | ||
| request)); | ||
| reject( | ||
| new AxiosError( | ||
| timeoutErrorMessage, | ||
| transitional.clarifyTimeoutError | ||
| ? AxiosError.ETIMEDOUT | ||
| : AxiosError.ECONNABORTED, | ||
| config, | ||
| request | ||
| ) | ||
| ); | ||
@@ -162,6 +207,12 @@ // Clean up request | ||
| } | ||
| // Strict boolean check (GHSA-xx6v-rp6x-q39c): only `true` short-circuits the same-origin guard. | ||
| if (withXSRFToken === true || (withXSRFToken !== false && isURLSameOrigin(fullPath))) { | ||
| // Strict boolean check: only `true` short-circuits the same-origin guard. | ||
| if ( | ||
| withXSRFToken === true || | ||
| (withXSRFToken !== false && isURLSameOrigin(fullPath)) | ||
| ) { | ||
| // Add xsrf header | ||
| var xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName); | ||
| var xsrfValue = | ||
| config.xsrfHeaderName && | ||
| config.xsrfCookieName && | ||
| cookies.read(config.xsrfCookieName); | ||
| if (xsrfValue) { | ||
@@ -176,3 +227,6 @@ requestHeaders[config.xsrfHeaderName] = xsrfValue; | ||
| utils.forEach(requestHeaders, function setRequestHeader(val, key) { | ||
| if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { | ||
| if ( | ||
| typeof requestData === 'undefined' && | ||
| key.toLowerCase() === 'content-type' | ||
| ) { | ||
| // Remove Content-Type if data is undefined | ||
@@ -214,3 +268,7 @@ delete requestHeaders[key]; | ||
| } | ||
| reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); | ||
| reject( | ||
| !cancel || cancel.type | ||
| ? new CanceledError(null, config, request) | ||
| : cancel | ||
| ); | ||
| request.abort(); | ||
@@ -222,3 +280,5 @@ request = null; | ||
| if (config.signal) { | ||
| config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); | ||
| config.signal.aborted | ||
| ? onCanceled() | ||
| : config.signal.addEventListener('abort', onCanceled); | ||
| } | ||
@@ -228,3 +288,8 @@ } | ||
| // false, 0 (zero number), and '' (empty string) are valid JSON values | ||
| if (!requestData && requestData !== false && requestData !== 0 && requestData !== '') { | ||
| if ( | ||
| !requestData && | ||
| requestData !== false && | ||
| requestData !== 0 && | ||
| requestData !== '' | ||
| ) { | ||
| requestData = null; | ||
@@ -236,7 +301,12 @@ } | ||
| if (protocol && platform.protocols.indexOf(protocol) === -1) { | ||
| reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); | ||
| reject( | ||
| new AxiosError( | ||
| 'Unsupported protocol ' + protocol + ':', | ||
| AxiosError.ERR_BAD_REQUEST, | ||
| config | ||
| ) | ||
| ); | ||
| return; | ||
| } | ||
| // Send the request | ||
@@ -243,0 +313,0 @@ request.send(requestData); |
| 'use strict'; | ||
| var utils = require('../utils'); | ||
| var DEFAULT_REDACT_KEYS = require('../helpers/defaultRedactKeys'); | ||
| var REDACTED_VALUE = '[REDACTED ****]'; | ||
| function makeValueDescriptor(value) { | ||
| var descriptor = Object.create(null); | ||
| descriptor.value = value; | ||
| return descriptor; | ||
| } | ||
| function getRedactKeys(config) { | ||
| // An empty array is treated as "no override" so an upstream `redact: []` cannot | ||
| // silently disable redaction. To opt out, pass non-string values or unset keys. | ||
| var override = config && utils.isArray(config.redact) && config.redact.length ? config.redact : null; | ||
| var redact = override || DEFAULT_REDACT_KEYS; | ||
| var keys = {}; | ||
| utils.forEach(redact, function eachRedactKey(key) { | ||
| if (typeof key === 'string') { | ||
| keys[key.toLowerCase()] = true; | ||
| } | ||
| }); | ||
| return keys; | ||
| } | ||
| function shouldRedact(key, keys) { | ||
| return typeof key === 'string' && keys[key.toLowerCase()]; | ||
| } | ||
| var CIRCULAR_VALUE = '[Circular]'; | ||
| function serializeConfigValue(value, keys, key, seen) { | ||
| var result; | ||
| if (shouldRedact(key, keys)) { | ||
| return REDACTED_VALUE; | ||
| } | ||
| if (utils.isArray(value)) { | ||
| if (seen.indexOf(value) !== -1) { | ||
| return CIRCULAR_VALUE; | ||
| } | ||
| seen.push(value); | ||
| result = []; | ||
| utils.forEach(value, function eachArrayValue(item, index) { | ||
| result[index] = serializeConfigValue(item, keys, index, seen); | ||
| }); | ||
| seen.pop(); | ||
| return result; | ||
| } | ||
| if (utils.isPlainObject(value)) { | ||
| if (seen.indexOf(value) !== -1) { | ||
| return CIRCULAR_VALUE; | ||
| } | ||
| seen.push(value); | ||
| result = {}; | ||
| utils.forEach(value, function eachObjectValue(item, itemKey) { | ||
| result[itemKey] = serializeConfigValue(item, keys, itemKey, seen); | ||
| }); | ||
| seen.pop(); | ||
| return result; | ||
| } | ||
| return value; | ||
| } | ||
| function serializeConfig(config) { | ||
| if (!config) { | ||
| return config; | ||
| } | ||
| return serializeConfigValue(config, getRedactKeys(config), undefined, []); | ||
| } | ||
| /** | ||
@@ -47,3 +122,3 @@ * Create an Error with the specified message, config, error code, request and response. | ||
| // Axios | ||
| config: this.config, | ||
| config: serializeConfig(this.config), | ||
| code: this.code, | ||
@@ -56,3 +131,3 @@ status: this.response && this.response.status ? this.response.status : null | ||
| var prototype = AxiosError.prototype; | ||
| var descriptors = {}; | ||
| var descriptors = Object.create(null); | ||
@@ -75,7 +150,7 @@ [ | ||
| ].forEach(function(code) { | ||
| descriptors[code] = {value: code}; | ||
| descriptors[code] = makeValueDescriptor(code); | ||
| }); | ||
| Object.defineProperties(AxiosError, descriptors); | ||
| Object.defineProperty(prototype, 'isAxiosError', {value: true}); | ||
| Object.defineProperty(prototype, 'isAxiosError', makeValueDescriptor(true)); | ||
@@ -82,0 +157,0 @@ // eslint-disable-next-line func-names |
@@ -49,8 +49,13 @@ 'use strict'; | ||
| // Flatten headers | ||
| config.headers = utils.merge( | ||
| config.headers.common || {}, | ||
| config.headers[config.method] || {}, | ||
| config.headers | ||
| ); | ||
| var commonHeaders = utils.hasOwnProperty(config.headers, 'common') && config.headers.common | ||
| ? config.headers.common | ||
| : {}; | ||
| var methodHeaders = config.method && | ||
| utils.hasOwnProperty(config.headers, config.method) && | ||
| config.headers[config.method] | ||
| ? config.headers[config.method] | ||
| : {}; | ||
| config.headers = utils.merge(commonHeaders, methodHeaders, config.headers); | ||
| utils.forEach( | ||
@@ -57,0 +62,0 @@ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], |
@@ -102,2 +102,3 @@ 'use strict'; | ||
| 'socketPath': defaultToConfig2, | ||
| 'allowedSocketPaths': defaultToConfig2, | ||
| 'responseEncoding': defaultToConfig2, | ||
@@ -104,0 +105,0 @@ 'validateStatus': mergeDirectKeys |
@@ -11,2 +11,3 @@ 'use strict'; | ||
| var formDataToJSON = require('../helpers/formDataToJSON'); | ||
| var defaultRedactKeys = require('../helpers/defaultRedactKeys'); | ||
@@ -155,2 +156,4 @@ var DEFAULT_CONTENT_TYPE = { | ||
| redact: defaultRedactKeys.slice(), | ||
| env: { | ||
@@ -157,0 +160,0 @@ FormData: platform.classes.FormData, |
+1
-1
| module.exports = { | ||
| "version": "0.31.1" | ||
| "version": "0.32.0" | ||
| }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
| function encode(str) { | ||
| // Do not map `%00` back to a raw null byte (GHSA-xhjh-pmcv-23jw): that reversed | ||
| // Do not map `%00` back to a raw null byte: that reversed | ||
| // the safe percent-encoding from encodeURIComponent and enabled null byte injection. | ||
@@ -17,5 +17,8 @@ var charMap = { | ||
| }; | ||
| return encodeURIComponent(str).replace(/[!'\(\)~]|%20/g, function replacer(match) { | ||
| return charMap[match]; | ||
| }); | ||
| return encodeURIComponent(str).replace( | ||
| /[!'\(\)~]|%20/g, | ||
| function replacer(match) { | ||
| return charMap[match]; | ||
| } | ||
| ); | ||
| } | ||
@@ -36,11 +39,15 @@ | ||
| prototype.toString = function toString(encoder) { | ||
| var _encode = encoder ? function(value) { | ||
| return encoder.call(this, value, encode); | ||
| } : encode; | ||
| var _encode = encoder | ||
| ? function(value) { | ||
| return encoder.call(this, value, encode); | ||
| } | ||
| : encode; | ||
| return this._pairs.map(function each(pair) { | ||
| return _encode(pair[0]) + '=' + _encode(pair[1]); | ||
| }, '').join('&'); | ||
| return this._pairs | ||
| .map(function each(pair) { | ||
| return _encode(pair[0]) + '=' + _encode(pair[1]); | ||
| }, '') | ||
| .join('&'); | ||
| }; | ||
| module.exports = AxiosURLSearchParams; |
@@ -35,4 +35,17 @@ 'use strict'; | ||
| read: function read(name) { | ||
| var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); | ||
| return (match ? decodeURIComponent(match[3]) : null); | ||
| var nameEQ = name + '='; | ||
| var cookies = document.cookie.split(';'); | ||
| var cookie; | ||
| for (var i = 0; i < cookies.length; i++) { | ||
| cookie = cookies[i]; | ||
| while (cookie.charAt(0) === ' ') { | ||
| cookie = cookie.substring(1); | ||
| } | ||
| if (cookie.indexOf(nameEQ) === 0) { | ||
| return decodeURIComponent(cookie.substring(nameEQ.length)); | ||
| } | ||
| } | ||
| return null; | ||
| }, | ||
@@ -39,0 +52,0 @@ |
@@ -43,2 +43,54 @@ 'use strict'; | ||
| function parseIPv4Octets(hostname) { | ||
| var octets = hostname.split('.'); | ||
| if (octets.length !== 4) { | ||
| return null; | ||
| } | ||
| for (var i = 0; i < octets.length; i++) { | ||
| if (!/^\d+$/.test(octets[i]) || Number(octets[i]) > 255) { | ||
| return null; | ||
| } | ||
| } | ||
| return octets; | ||
| } | ||
| // Recognises the canonical IPv4-mapped IPv6 forms the Node URL parser produces: | ||
| // ::ffff:127.0.0.1 (dotted-quad tail) | ||
| // ::ffff:7f00:1 (compressed two-group hex tail) | ||
| // Fully-expanded forms like 0:0:0:0:0:ffff:7f00:1 or single-group tails like | ||
| // ::ffff:1 are not normalised here. URL inputs are canonicalised by the parser | ||
| // before reaching this helper, but hand-crafted no_proxy entries in those | ||
| // shapes will not match an IPv4 listing. | ||
| function normalizeIPv4MappedIPv6(hostname) { | ||
| // Match against the lowercased form so a hand-crafted no_proxy entry like | ||
| // `[::FFFF:7F00:1]` still resolves to its IPv4 alias. Callers that route via | ||
| // URL parsing already lowercase, but the helper stays robust on its own. | ||
| var lower = hostname.toLowerCase(); | ||
| var dottedMatch = /^::ffff:(\d+\.\d+\.\d+\.\d+)$/.exec(lower); | ||
| if (dottedMatch) { | ||
| var octets = parseIPv4Octets(dottedMatch[1]); | ||
| return octets ? octets.join('.') : hostname; | ||
| } | ||
| var hexMatch = /^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/.exec(lower); | ||
| if (hexMatch) { | ||
| var high = parseInt(hexMatch[1], 16); | ||
| var low = parseInt(hexMatch[2], 16); | ||
| return [ | ||
| (high >> 8) & 0xff, | ||
| high & 0xff, | ||
| (low >> 8) & 0xff, | ||
| low & 0xff | ||
| ].join('.'); | ||
| } | ||
| return hostname; | ||
| } | ||
| function normalizeNoProxyHost(hostname) { | ||
@@ -53,3 +105,5 @@ if (!hostname) { | ||
| return hostname.replace(/\.+$/, ''); | ||
| hostname = hostname.replace(/\.+$/, ''); | ||
| return normalizeIPv4MappedIPv6(hostname); | ||
| } | ||
@@ -56,0 +110,0 @@ |
+46
-21
@@ -52,4 +52,10 @@ 'use strict'; | ||
| function isBuffer(val) { | ||
| return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) | ||
| && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); | ||
| return ( | ||
| val !== null && | ||
| !isUndefined(val) && | ||
| val.constructor !== null && | ||
| !isUndefined(val.constructor) && | ||
| typeof val.constructor.isBuffer === 'function' && | ||
| val.constructor.isBuffer(val) | ||
| ); | ||
| } | ||
@@ -66,3 +72,2 @@ | ||
| /** | ||
@@ -76,6 +81,6 @@ * Determine if a value is a view on an ArrayBuffer | ||
| var result; | ||
| if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { | ||
| if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { | ||
| result = ArrayBuffer.isView(val); | ||
| } else { | ||
| result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); | ||
| result = val && val.buffer && isArrayBuffer(val.buffer); | ||
| } | ||
@@ -217,8 +222,10 @@ return result; | ||
| if (!isObject(thing)) return false; | ||
| // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9). | ||
| // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. | ||
| var proto = Object.getPrototypeOf(thing); | ||
| if (!proto || proto === Object.prototype) return false; | ||
| if (!isFunction(thing.append)) return false; | ||
| return toString.call(thing) === pattern || | ||
| (isFunction(thing.toString) && thing.toString() === pattern); | ||
| return ( | ||
| toString.call(thing) === pattern || | ||
| (isFunction(thing.toString) && thing.toString() === pattern) | ||
| ); | ||
| } | ||
@@ -241,3 +248,5 @@ | ||
| function trim(str) { | ||
| return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | ||
| return str.trim | ||
| ? str.trim() | ||
| : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | ||
| } | ||
@@ -262,6 +271,7 @@ | ||
| var product; | ||
| if (typeof navigator !== 'undefined' && ( | ||
| (product = navigator.product) === 'ReactNative' || | ||
| product === 'NativeScript' || | ||
| product === 'NS') | ||
| if ( | ||
| typeof navigator !== 'undefined' && | ||
| ((product = navigator.product) === 'ReactNative' || | ||
| product === 'NativeScript' || | ||
| product === 'NS') | ||
| ) { | ||
@@ -331,4 +341,6 @@ return false; | ||
| function merge(/* obj1, obj2, obj3, ... */) { | ||
| var result = {}; | ||
| var result = Object.create(null); | ||
| function assignValue(val, key) { | ||
| var target; | ||
| if (key === '__proto__' || key === 'constructor' || key === 'prototype') { | ||
@@ -338,4 +350,8 @@ return; | ||
| if (isPlainObject(result[key]) && isPlainObject(val)) { | ||
| result[key] = merge(result[key], val); | ||
| target = Object.prototype.hasOwnProperty.call(result, key) | ||
| ? result[key] | ||
| : undefined; | ||
| if (isPlainObject(target) && isPlainObject(val)) { | ||
| result[key] = merge(target, val); | ||
| } else if (isPlainObject(val)) { | ||
@@ -382,3 +398,3 @@ result[key] = merge({}, val); | ||
| function stripBOM(content) { | ||
| if (content.charCodeAt(0) === 0xFEFF) { | ||
| if (content.charCodeAt(0) === 0xfeff) { | ||
| content = content.slice(1); | ||
@@ -398,3 +414,6 @@ } | ||
| function inherits(constructor, superConstructor, props, descriptors) { | ||
| constructor.prototype = Object.create(superConstructor.prototype, descriptors); | ||
| constructor.prototype = Object.create( | ||
| superConstructor.prototype, | ||
| descriptors | ||
| ); | ||
| constructor.prototype.constructor = constructor; | ||
@@ -428,3 +447,6 @@ props && Object.assign(constructor.prototype, props); | ||
| prop = props[i]; | ||
| if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { | ||
| if ( | ||
| (!propFilter || propFilter(prop, sourceObj, destObj)) && | ||
| !merged[prop] | ||
| ) { | ||
| destObj[prop] = sourceObj[prop]; | ||
@@ -435,3 +457,7 @@ merged[prop] = true; | ||
| sourceObj = filter !== false && Object.getPrototypeOf(sourceObj); | ||
| } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); | ||
| } while ( | ||
| sourceObj && | ||
| (!filter || filter(sourceObj, destObj)) && | ||
| sourceObj !== Object.prototype | ||
| ); | ||
@@ -458,3 +484,2 @@ return destObj; | ||
| /** | ||
@@ -461,0 +486,0 @@ * Returns new array from array like object or null if failed |
+1
-1
| { | ||
| "name": "axios", | ||
| "version": "0.31.1", | ||
| "version": "0.32.0", | ||
| "description": "Promise based HTTP client for the browser and node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+24
-4
@@ -334,3 +334,3 @@ # axios | ||
| // Null bytes in param values stay percent-encoded as `%00` in the resulting query string | ||
| // (GHSA-xhjh-pmcv-23jw) โ Axios does not reverse `encodeURIComponent` output for `%00`, | ||
| // Axios does not reverse `encodeURIComponent` output for `%00`, | ||
| // so null-byte injection cannot be smuggled through the serializer. | ||
@@ -342,3 +342,3 @@ params: { | ||
| // `paramsSerializer` is an optional config in charge of serializing `params` | ||
| // Nested objects are walked with a bounded recursion depth (GHSA-62hf-57xw-28j9): | ||
| // Nested objects are walked with a bounded recursion depth: | ||
| // once `maxDepth` is exceeded the serializer throws `ERR_FORM_DATA_DEPTH_EXCEEDED` | ||
@@ -409,3 +409,3 @@ // instead of overflowing the call stack. The same cap applies to `toFormData` when | ||
| // cross-origin requests. Values inherited from `Object.prototype` are ignored | ||
| // (GHSA-xx6v-rp6x-q39c), so a polluted prototype cannot silently enable the token. | ||
| // so a polluted prototype cannot silently enable the token. | ||
| withXSRFToken: boolean | undefined | ((config: AxiosRequestConfig) => boolean | undefined), | ||
@@ -427,3 +427,3 @@ | ||
| // Also enforced on streamed responses (`responseType: 'stream'`): bytes are counted as they | ||
| // arrive and the stream is aborted with an error once the cap is exceeded (GHSA-vf2m-468p-8v99). | ||
| // arrive and the stream is aborted with an error once the cap is exceeded. | ||
| maxContentLength: 2000, | ||
@@ -436,2 +436,14 @@ | ||
| // `formDataHeaderPolicy` controls which headers the Node adapter copies from | ||
| // FormData `getHeaders()`. | ||
| // 'legacy' (default) copies all returned headers for v1 compatibility. | ||
| // 'content-only' copies only Content-Type and Content-Length. | ||
| formDataHeaderPolicy: 'legacy', | ||
| // `redact` masks matching config keys when AxiosError#toJSON() is called. | ||
| // Matching is case-insensitive and recursive. It does not change the request. | ||
| // An empty array is treated as "no override" and falls back to the defaults so | ||
| // an accidental `redact: []` cannot silently disable redaction. | ||
| redact: ['authorization', 'password'], | ||
| // `validateStatus` defines whether to resolve or reject the promise for a given | ||
@@ -462,2 +474,4 @@ // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` | ||
| // e.g. '/var/run/docker.sock' to send requests to the docker daemon. | ||
| // Avoid passing user-controlled values because socket paths bypass host, | ||
| // port, DNS, and proxy controls. | ||
| // Only either `socketPath` or `proxy` can be specified. | ||
@@ -467,2 +481,8 @@ // If both are specified, `socketPath` is used. | ||
| // `allowedSocketPaths` constrains `socketPath` to known-safe Unix sockets. | ||
| // Use this when config can include partially user-controlled input. | ||
| // Set to a string or array of strings. An empty array denies all socket paths. | ||
| // Set to `null` on a request to clear an instance-level allowlist. | ||
| allowedSocketPaths: null, // default | ||
| // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http | ||
@@ -469,0 +489,0 @@ // and https requests, respectively, in node.js. This allows options to be added like |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
963808
5.63%77
4.05%8460
10.33%1222
1.66%