oauth0-js-lib 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var vn = Object.defineProperty;
|
|
|
2
2
|
var xn = (e, t, r) => t in e ? vn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var F = (e, t, r) => xn(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
const Fn = {
|
|
5
|
-
baseUrl:
|
|
5
|
+
baseUrl: window.location.origin,
|
|
6
6
|
createEndpoint: "/api/oauth0/create",
|
|
7
7
|
authEventEndpoint: "/api/oauth0/auth-events",
|
|
8
8
|
authConfirmEndpoint: "/api/oauth0/auth-confirm"
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(v,q){typeof exports=="object"&&typeof module<"u"?q(exports):typeof define=="function"&&define.amd?define(["exports"],q):(v=typeof globalThis<"u"?globalThis:v||self,q(v["oauth0-js-lib"]={}))})(this,(function(v){"use strict";var Do=Object.defineProperty;var qo=(v,q,re)=>q in v?Do(v,q,{enumerable:!0,configurable:!0,writable:!0,value:re}):v[q]=re;var D=(v,q,re)=>qo(v,typeof q!="symbol"?q+"":q,re);const q={baseUrl:"",createEndpoint:"/api/oauth0/create",authEventEndpoint:"/api/oauth0/auth-events",authConfirmEndpoint:"/api/oauth0/auth-confirm"},re=typeof __OAUTH_LIB_CONFIG__<"u"?__OAUTH_LIB_CONFIG__:void 0,qn=typeof globalThis<"u"&&globalThis.OAUTH_LIB_CONFIG?globalThis.OAUTH_LIB_CONFIG:void 0;let _e={...q,...re,...qn};function jn(e){_e={..._e,...e}}function mt(){return _e}function yt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hn}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:be,toStringTag:wt}=Symbol,Ee=(e=>t=>{const r=Hn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>Ee(t)===e),Ce=e=>t=>typeof t===e,{isArray:oe}=Array,ie=Ce("undefined");function fe(e){return e!==null&&!ie(e)&&e.constructor!==null&&!ie(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bt=H("ArrayBuffer");function zn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}const $n=Ce("string"),x=Ce("function"),Et=Ce("number"),de=e=>e!==null&&typeof e=="object",Vn=e=>e===!0||e===!1,Se=e=>{if(Ee(e)!=="object")return!1;const t=Ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wt in e)&&!(be in e)},Jn=e=>{if(!de(e)||fe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Kn=H("Date"),Qn=H("File"),Wn=H("Blob"),Gn=H("FileList"),Yn=e=>de(e)&&x(e.pipe),Xn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=Ee(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},Zn=H("URLSearchParams"),[er,tr,nr,rr]=["ReadableStream","Request","Response","Headers"].map(H),or=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function he(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),oe(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(fe(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Ct(e,t){if(fe(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,St=e=>!ie(e)&&e!==Y;function ve(){const{caseless:e,skipUndefined:t}=St(this)&&this||{},r={},n=(o,i)=>{const s=e&&Ct(r,i)||i;Se(r[s])&&Se(o)?r[s]=ve(r[s],o):Se(o)?r[s]=ve({},o):oe(o)?r[s]=o.slice():(!t||!ie(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&he(arguments[o],n);return r}const ir=(e,t,r,{allOwnKeys:n}={})=>(he(t,(o,i)=>{r&&x(o)?e[i]=yt(o,r):e[i]=o},{allOwnKeys:n}),e),sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ar=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},ur=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ue(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},cr=e=>{if(!e)return null;if(oe(e))return e;let t=e.length;if(!Et(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ue(Uint8Array)),dr=(e,t)=>{const n=(e&&e[be]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},hr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pr=H("HTMLFormElement"),gr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Rt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mr=H("RegExp"),Tt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};he(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},yr=e=>{Tt(e,(t,r)=>{if(x(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(x(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},wr=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return oe(e)?n(e):n(String(e).split(t)),r},br=()=>{},Er=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Cr(e){return!!(e&&x(e.append)&&e[wt]==="FormData"&&e[be])}const Sr=e=>{const t=new Array(10),r=(n,o)=>{if(de(n)){if(t.indexOf(n)>=0)return;if(fe(n))return n;if(!("toJSON"in n)){t[o]=n;const i=oe(n)?[]:{};return he(n,(s,a)=>{const u=r(s,o+1);!ie(u)&&(i[a]=u)}),t[o]=void 0,i}}return n};return r(e,0)},Rr=H("AsyncFunction"),Tr=e=>e&&(de(e)||x(e))&&x(e.then)&&x(e.catch),At=((e,t)=>e?setImmediate:t?((r,n)=>(Y.addEventListener("message",({source:o,data:i})=>{o===Y&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Y.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x(Y.postMessage)),Ar=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||At,c={isArray:oe,isArrayBuffer:bt,isBuffer:fe,isFormData:Xn,isArrayBufferView:zn,isString:$n,isNumber:Et,isBoolean:Vn,isObject:de,isPlainObject:Se,isEmptyObject:Jn,isReadableStream:er,isRequest:tr,isResponse:nr,isHeaders:rr,isUndefined:ie,isDate:Kn,isFile:Qn,isBlob:Wn,isRegExp:mr,isFunction:x,isStream:Yn,isURLSearchParams:Zn,isTypedArray:fr,isFileList:Gn,forEach:he,merge:ve,extend:ir,trim:or,stripBOM:sr,inherits:ar,toFlatObject:ur,kindOf:Ee,kindOfTest:H,endsWith:lr,toArray:cr,forEachEntry:dr,matchAll:hr,isHTMLForm:pr,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:Tt,freezeMethods:yr,toObjectSet:wr,toCamelCase:gr,noop:br,toFiniteNumber:Er,findKey:Ct,global:Y,isContextDefined:St,isSpecCompliantForm:Cr,toJSONObject:Sr,isAsyncFn:Rr,isThenable:Tr,setImmediate:At,asap:Ar,isIterable:e=>e!=null&&x(e[be])};function I(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,this.status=o.status?o.status:null)}c.inherits(I,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Bt=I.prototype,Nt={};["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"].forEach(e=>{Nt[e]={value:e}}),Object.defineProperties(I,Nt),Object.defineProperty(Bt,"isAxiosError",{value:!0}),I.from=(e,t,r,n,o,i)=>{const s=Object.create(Bt);c.toFlatObject(e,s,function(f){return f!==Error.prototype},l=>l!=="isAxiosError");const a=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return I.call(s,a,u,r,n,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const Br=null;function Fe(e){return c.isPlainObject(e)||c.isArray(e)}function Pt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ot(e,t,r){return e?e.concat(t).map(function(o,i){return o=Pt(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Nr(e){return c.isArray(e)&&!e.some(Fe)}const Pr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(e,t,r){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!c.isUndefined(g[p])});const n=r.metaTokens,o=r.visitor||f,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!u&&c.isBlob(d))throw new I("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,p,g){let w=d;if(d&&!g&&typeof d=="object"){if(c.endsWith(p,"{}"))p=n?p:p.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Nr(d)||(c.isFileList(d)||c.endsWith(p,"[]"))&&(w=c.toArray(d)))return p=Pt(p),w.forEach(function(E,R){!(c.isUndefined(E)||E===null)&&t.append(s===!0?Ot([p],R,i):s===null?p:p+"[]",l(E))}),!1}return Fe(d)?!0:(t.append(Ot(g,p,i),l(d)),!1)}const h=[],m=Object.assign(Pr,{defaultVisitor:f,convertValue:l,isVisitable:Fe});function y(d,p){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(d),c.forEach(d,function(w,P){(!(c.isUndefined(w)||w===null)&&o.call(t,w,c.isString(P)?P.trim():P,p,m))===!0&&y(w,p?p.concat(P):[P])}),h.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Lt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Me(e,t){this._pairs=[],e&&Re(e,this,t)}const It=Me.prototype;It.append=function(t,r){this._pairs.push([t,r])},It.toString=function(t){const r=t?function(n){return t.call(this,n,Lt)}:Lt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Or(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _t(e,t,r){if(!t)return e;const n=r&&r.encode||Or;c.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=c.isURLSearchParams(t)?t.toString():new Me(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ut{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(n){n!==null&&t(n)})}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},xe=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,Ir=xe&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),_r=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ur=xe&&window.location.href||"http://localhost",F={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xe,hasStandardBrowserEnv:Ir,hasStandardBrowserWebWorkerEnv:_r,navigator:ke,origin:Ur},Symbol.toStringTag,{value:"Module"})),...Lr};function vr(e,t){return Re(e,new F.classes.URLSearchParams,{visitor:function(r,n,o,i){return F.isNode&&c.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Fr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Mr(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Ft(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=i>=r.length;return s=!s&&c.isArray(o)?o.length:s,u?(c.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!c.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&c.isArray(o[s])&&(o[s]=Mr(o[s])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const r={};return c.forEachEntry(e,(n,o)=>{t(Fr(n),o,r,0)}),r}return null}function xr(e,t,r){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const pe={transitional:vt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return o?JSON.stringify(Ft(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return vr(t,this.formSerializer).toString();if((a=c.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Re(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),xr(t)):t}],transformResponse:[function(t){const r=this.transitional||pe.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?I.from(a,I.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{pe.headers[e]={}});const kr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dr=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
1
|
+
(function(v,q){typeof exports=="object"&&typeof module<"u"?q(exports):typeof define=="function"&&define.amd?define(["exports"],q):(v=typeof globalThis<"u"?globalThis:v||self,q(v["oauth0-js-lib"]={}))})(this,(function(v){"use strict";var Do=Object.defineProperty;var qo=(v,q,re)=>q in v?Do(v,q,{enumerable:!0,configurable:!0,writable:!0,value:re}):v[q]=re;var D=(v,q,re)=>qo(v,typeof q!="symbol"?q+"":q,re);const q={baseUrl:window.location.origin,createEndpoint:"/api/oauth0/create",authEventEndpoint:"/api/oauth0/auth-events",authConfirmEndpoint:"/api/oauth0/auth-confirm"},re=typeof __OAUTH_LIB_CONFIG__<"u"?__OAUTH_LIB_CONFIG__:void 0,qn=typeof globalThis<"u"&&globalThis.OAUTH_LIB_CONFIG?globalThis.OAUTH_LIB_CONFIG:void 0;let _e={...q,...re,...qn};function jn(e){_e={..._e,...e}}function mt(){return _e}function yt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Hn}=Object.prototype,{getPrototypeOf:Ue}=Object,{iterator:be,toStringTag:wt}=Symbol,Ee=(e=>t=>{const r=Hn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),t=>Ee(t)===e),Ce=e=>t=>typeof t===e,{isArray:oe}=Array,ie=Ce("undefined");function fe(e){return e!==null&&!ie(e)&&e.constructor!==null&&!ie(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bt=H("ArrayBuffer");function zn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}const $n=Ce("string"),x=Ce("function"),Et=Ce("number"),de=e=>e!==null&&typeof e=="object",Vn=e=>e===!0||e===!1,Se=e=>{if(Ee(e)!=="object")return!1;const t=Ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(wt in e)&&!(be in e)},Jn=e=>{if(!de(e)||fe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Kn=H("Date"),Qn=H("File"),Wn=H("Blob"),Gn=H("FileList"),Yn=e=>de(e)&&x(e.pipe),Xn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=Ee(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},Zn=H("URLSearchParams"),[er,tr,nr,rr]=["ReadableStream","Request","Response","Headers"].map(H),or=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function he(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),oe(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(fe(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Ct(e,t){if(fe(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Y=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,St=e=>!ie(e)&&e!==Y;function ve(){const{caseless:e,skipUndefined:t}=St(this)&&this||{},r={},n=(o,i)=>{const s=e&&Ct(r,i)||i;Se(r[s])&&Se(o)?r[s]=ve(r[s],o):Se(o)?r[s]=ve({},o):oe(o)?r[s]=o.slice():(!t||!ie(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&he(arguments[o],n);return r}const ir=(e,t,r,{allOwnKeys:n}={})=>(he(t,(o,i)=>{r&&x(o)?e[i]=yt(o,r):e[i]=o},{allOwnKeys:n}),e),sr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ar=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},ur=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&Ue(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},cr=e=>{if(!e)return null;if(oe(e))return e;let t=e.length;if(!Et(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},fr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ue(Uint8Array)),dr=(e,t)=>{const n=(e&&e[be]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},hr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pr=H("HTMLFormElement"),gr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),Rt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mr=H("RegExp"),Tt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};he(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},yr=e=>{Tt(e,(t,r)=>{if(x(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(x(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},wr=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return oe(e)?n(e):n(String(e).split(t)),r},br=()=>{},Er=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Cr(e){return!!(e&&x(e.append)&&e[wt]==="FormData"&&e[be])}const Sr=e=>{const t=new Array(10),r=(n,o)=>{if(de(n)){if(t.indexOf(n)>=0)return;if(fe(n))return n;if(!("toJSON"in n)){t[o]=n;const i=oe(n)?[]:{};return he(n,(s,a)=>{const u=r(s,o+1);!ie(u)&&(i[a]=u)}),t[o]=void 0,i}}return n};return r(e,0)},Rr=H("AsyncFunction"),Tr=e=>e&&(de(e)||x(e))&&x(e.then)&&x(e.catch),At=((e,t)=>e?setImmediate:t?((r,n)=>(Y.addEventListener("message",({source:o,data:i})=>{o===Y&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),Y.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x(Y.postMessage)),Ar=typeof queueMicrotask<"u"?queueMicrotask.bind(Y):typeof process<"u"&&process.nextTick||At,c={isArray:oe,isArrayBuffer:bt,isBuffer:fe,isFormData:Xn,isArrayBufferView:zn,isString:$n,isNumber:Et,isBoolean:Vn,isObject:de,isPlainObject:Se,isEmptyObject:Jn,isReadableStream:er,isRequest:tr,isResponse:nr,isHeaders:rr,isUndefined:ie,isDate:Kn,isFile:Qn,isBlob:Wn,isRegExp:mr,isFunction:x,isStream:Yn,isURLSearchParams:Zn,isTypedArray:fr,isFileList:Gn,forEach:he,merge:ve,extend:ir,trim:or,stripBOM:sr,inherits:ar,toFlatObject:ur,kindOf:Ee,kindOfTest:H,endsWith:lr,toArray:cr,forEachEntry:dr,matchAll:hr,isHTMLForm:pr,hasOwnProperty:Rt,hasOwnProp:Rt,reduceDescriptors:Tt,freezeMethods:yr,toObjectSet:wr,toCamelCase:gr,noop:br,toFiniteNumber:Er,findKey:Ct,global:Y,isContextDefined:St,isSpecCompliantForm:Cr,toJSONObject:Sr,isAsyncFn:Rr,isThenable:Tr,setImmediate:At,asap:Ar,isIterable:e=>e!=null&&x(e[be])};function I(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,this.status=o.status?o.status:null)}c.inherits(I,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Bt=I.prototype,Nt={};["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"].forEach(e=>{Nt[e]={value:e}}),Object.defineProperties(I,Nt),Object.defineProperty(Bt,"isAxiosError",{value:!0}),I.from=(e,t,r,n,o,i)=>{const s=Object.create(Bt);c.toFlatObject(e,s,function(f){return f!==Error.prototype},l=>l!=="isAxiosError");const a=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return I.call(s,a,u,r,n,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const Br=null;function Fe(e){return c.isPlainObject(e)||c.isArray(e)}function Pt(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ot(e,t,r){return e?e.concat(t).map(function(o,i){return o=Pt(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Nr(e){return c.isArray(e)&&!e.some(Fe)}const Pr=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(e,t,r){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!c.isUndefined(g[p])});const n=r.metaTokens,o=r.visitor||f,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function l(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!u&&c.isBlob(d))throw new I("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,p,g){let w=d;if(d&&!g&&typeof d=="object"){if(c.endsWith(p,"{}"))p=n?p:p.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Nr(d)||(c.isFileList(d)||c.endsWith(p,"[]"))&&(w=c.toArray(d)))return p=Pt(p),w.forEach(function(E,R){!(c.isUndefined(E)||E===null)&&t.append(s===!0?Ot([p],R,i):s===null?p:p+"[]",l(E))}),!1}return Fe(d)?!0:(t.append(Ot(g,p,i),l(d)),!1)}const h=[],m=Object.assign(Pr,{defaultVisitor:f,convertValue:l,isVisitable:Fe});function y(d,p){if(!c.isUndefined(d)){if(h.indexOf(d)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(d),c.forEach(d,function(w,P){(!(c.isUndefined(w)||w===null)&&o.call(t,w,c.isString(P)?P.trim():P,p,m))===!0&&y(w,p?p.concat(P):[P])}),h.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Lt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Me(e,t){this._pairs=[],e&&Re(e,this,t)}const It=Me.prototype;It.append=function(t,r){this._pairs.push([t,r])},It.toString=function(t){const r=t?function(n){return t.call(this,n,Lt)}:Lt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Or(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _t(e,t,r){if(!t)return e;const n=r&&r.encode||Or;c.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=c.isURLSearchParams(t)?t.toString():new Me(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ut{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(n){n!==null&&t(n)})}}const vt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lr={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},xe=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,Ir=xe&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),_r=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ur=xe&&window.location.href||"http://localhost",F={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xe,hasStandardBrowserEnv:Ir,hasStandardBrowserWebWorkerEnv:_r,navigator:ke,origin:Ur},Symbol.toStringTag,{value:"Module"})),...Lr};function vr(e,t){return Re(e,new F.classes.URLSearchParams,{visitor:function(r,n,o,i){return F.isNode&&c.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Fr(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Mr(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function Ft(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=i>=r.length;return s=!s&&c.isArray(o)?o.length:s,u?(c.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!c.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&c.isArray(o[s])&&(o[s]=Mr(o[s])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const r={};return c.forEachEntry(e,(n,o)=>{t(Fr(n),o,r,0)}),r}return null}function xr(e,t,r){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const pe={transitional:vt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return o?JSON.stringify(Ft(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return vr(t,this.formSerializer).toString();if((a=c.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Re(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),xr(t)):t}],transformResponse:[function(t){const r=this.transitional||pe.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?I.from(a,I.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{pe.headers[e]={}});const kr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dr=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
2
2
|
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&kr[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Mt=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function Te(e){return e===!1||e==null?e:c.isArray(e)?e.map(Te):String(e)}function qr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const jr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function De(e,t,r,n,o){if(c.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!c.isString(t)){if(c.isString(n))return t.indexOf(n)!==-1;if(c.isRegExp(n))return n.test(t)}}function Hr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function zr(e,t){const r=c.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}let k=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,u,l){const f=ge(u);if(!f)throw new Error("header name must be a non-empty string");const h=c.findKey(o,f);(!h||o[h]===void 0||l===!0||l===void 0&&o[h]!==!1)&&(o[h||u]=Te(a))}const s=(a,u)=>c.forEach(a,(l,f)=>i(l,f,u));if(c.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(c.isString(t)&&(t=t.trim())&&!jr(t))s(Dr(t),r);else if(c.isObject(t)&&c.isIterable(t)){let a={},u,l;for(const f of t){if(!c.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(u=a[l])?c.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}s(a,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=ge(t),t){const n=c.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return qr(o);if(c.isFunction(r))return r.call(this,o,n);if(c.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ge(t),t){const n=c.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||De(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=ge(s),s){const a=c.findKey(n,s);a&&(!r||De(n,n[a],a,r))&&(delete n[a],o=!0)}}return c.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||De(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return c.forEach(this,(o,i)=>{const s=c.findKey(n,i);if(s){r[s]=Te(o),delete r[i];return}const a=t?Hr(i):String(i).trim();a!==i&&delete r[i],r[a]=Te(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return c.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&c.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[Mt]=this[Mt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ge(s);n[a]||(zr(o,s),n[a]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(k.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),c.freezeMethods(k);function qe(e,t){const r=this||pe,n=t||r,o=k.from(n.headers);let i=n.data;return c.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function xt(e){return!!(e&&e.__CANCEL__)}function se(e,t,r){I.call(this,e??"canceled",I.ERR_CANCELED,t,r),this.name="CanceledError"}c.inherits(se,I,{__CANCEL__:!0});function kt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new I("Request failed with status code "+r.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $r(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vr(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),f=n[i];s||(s=l),r[o]=u,n[o]=l;let h=i,m=0;for(;h!==o;)m+=r[h++],h=h%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-s<t)return;const y=f&&l-f;return y?Math.round(m*1e3/y):void 0}}function Jr(e,t){let r=0,n=1e3/t,o,i;const s=(l,f=Date.now())=>{r=f,o=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const f=Date.now(),h=f-r;h>=n?s(l,f):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},n-h)))},()=>o&&s(o)]}const Ae=(e,t,r=3)=>{let n=0;const o=Vr(50,250);return Jr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,u=s-n,l=o(u),f=s<=a;n=s;const h={loaded:s,total:a,progress:a?s/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&f?(a-s)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(h)},r)},Dt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},qt=e=>(...t)=>c.asap(()=>e(...t)),Kr=F.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,F.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Qr=F.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];c.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),c.isString(n)&&a.push(`path=${n}`),c.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),c.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Wr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function jt(e,t,r){let n=!Wr(t);return e&&(n||r==!1)?Gr(e,t):t}const Ht=e=>e instanceof k?{...e}:e;function X(e,t){t=t||{};const r={};function n(l,f,h,m){return c.isPlainObject(l)&&c.isPlainObject(f)?c.merge.call({caseless:m},l,f):c.isPlainObject(f)?c.merge({},f):c.isArray(f)?f.slice():f}function o(l,f,h,m){if(c.isUndefined(f)){if(!c.isUndefined(l))return n(void 0,l,h,m)}else return n(l,f,h,m)}function i(l,f){if(!c.isUndefined(f))return n(void 0,f)}function s(l,f){if(c.isUndefined(f)){if(!c.isUndefined(l))return n(void 0,l)}else return n(void 0,f)}function a(l,f,h){if(h in t)return n(l,f);if(h in e)return n(void 0,l)}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(l,f,h)=>o(Ht(l),Ht(f),h,!0)};return c.forEach(Object.keys({...e,...t}),function(f){const h=u[f]||o,m=h(e[f],t[f],f);c.isUndefined(m)&&h!==a||(r[f]=m)}),r}const zt=e=>{const t=X({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=k.from(s),t.url=_t(jt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(r)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(c.isFunction(r.getHeaders)){const u=r.getHeaders(),l=["content-type","content-length"];Object.entries(u).forEach(([f,h])=>{l.includes(f.toLowerCase())&&s.set(f,h)})}}if(F.hasStandardBrowserEnv&&(n&&c.isFunction(n)&&(n=n(t)),n||n!==!1&&Kr(t.url))){const u=o&&i&&Qr.read(i);u&&s.set(o,u)}return t},Yr=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=zt(e);let i=o.data;const s=k.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,f,h,m,y,d;function p(){y&&y(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function w(){if(!g)return;const E=k.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:E,config:e,request:g};kt(function(S){r(S),p()},function(S){n(S),p()},_),g=null}"onloadend"in g?g.onloadend=w:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(w)},g.onabort=function(){g&&(n(new I("Request aborted",I.ECONNABORTED,e,g)),g=null)},g.onerror=function(R){const _=R&&R.message?R.message:"Network Error",b=new I(_,I.ERR_NETWORK,e,g);b.event=R||null,n(b),g=null},g.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const _=o.transitional||vt;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),n(new I(R,_.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,g)),g=null},i===void 0&&s.setContentType(null),"setRequestHeader"in g&&c.forEach(s.toJSON(),function(R,_){g.setRequestHeader(_,R)}),c.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),l&&([m,d]=Ae(l,!0),g.addEventListener("progress",m)),u&&g.upload&&([h,y]=Ae(u),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(f=E=>{g&&(n(!E||E.type?new se(null,e,g):E),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const P=$r(o.url);if(P&&F.protocols.indexOf(P)===-1){n(new I("Unsupported protocol "+P+":",I.ERR_BAD_REQUEST,e));return}g.send(i||null)})},Xr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(l){if(!o){o=!0,a();const f=l instanceof Error?l:this.reason;n.abort(f instanceof I?f:new se(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new I(`timeout ${t} of ms exceeded`,I.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:u}=n;return u.unsubscribe=()=>c.asap(a),u}},Zr=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},eo=async function*(e,t){for await(const r of to(e))yield*Zr(r,t)},to=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},$t=(e,t,r,n)=>{const o=eo(e,t);let i=0,s,a=u=>{s||(s=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await o.next();if(l){a(),u.close();return}let h=f.byteLength;if(r){let m=i+=h;r(m)}u.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Vt=64*1024,{isFunction:Be}=c,no=(({Request:e,Response:t})=>({Request:e,Response:t}))(c.global),{ReadableStream:Jt,TextEncoder:Kt}=c.global,Qt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ro=e=>{e=c.merge.call({skipUndefined:!0},no,e);const{fetch:t,Request:r,Response:n}=e,o=t?Be(t):typeof fetch=="function",i=Be(r),s=Be(n);if(!o)return!1;const a=o&&Be(Jt),u=o&&(typeof Kt=="function"?(d=>p=>d.encode(p))(new Kt):async d=>new Uint8Array(await new r(d).arrayBuffer())),l=i&&a&&Qt(()=>{let d=!1;const p=new r(F.origin,{body:new Jt,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!p}),f=s&&a&&Qt(()=>c.isReadableStream(new n("").body)),h={stream:f&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!h[d]&&(h[d]=(p,g)=>{let w=p&&p[d];if(w)return w.call(p);throw new I(`Response type '${d}' is not supported`,I.ERR_NOT_SUPPORT,g)})});const m=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new r(F.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await u(d)).byteLength},y=async(d,p)=>{const g=c.toFiniteNumber(d.getContentLength());return g??m(p)};return async d=>{let{url:p,method:g,data:w,signal:P,cancelToken:E,timeout:R,onDownloadProgress:_,onUploadProgress:b,responseType:S,headers:A,withCredentials:C="same-origin",fetchOptions:L}=zt(d),B=t||fetch;S=S?(S+"").toLowerCase():"text";let N=Xr([P,E&&E.toAbortSignal()],R),T=null;const O=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let z;try{if(b&&l&&g!=="get"&&g!=="head"&&(z=await y(A,w))!==0){let j=new r(p,{method:"POST",body:w,duplex:"half"}),K;if(c.isFormData(w)&&(K=j.headers.get("content-type"))&&A.setContentType(K),j.body){const[ne,ue]=Dt(z,Ae(qt(b)));w=$t(j.body,Vt,ne,ue)}}c.isString(C)||(C=C?"include":"omit");const M=i&&"credentials"in r.prototype,Le={...L,signal:N,method:g.toUpperCase(),headers:A.normalize().toJSON(),body:w,duplex:"half",credentials:M?C:void 0};T=i&&new r(p,Le);let $=await(i?B(T,L):B(p,Le));const Ie=f&&(S==="stream"||S==="response");if(f&&(_||Ie&&O)){const j={};["status","statusText","headers"].forEach(le=>{j[le]=$[le]});const K=c.toFiniteNumber($.headers.get("content-length")),[ne,ue]=_&&Dt(K,Ae(qt(_),!0))||[];$=new n($t($.body,Vt,ne,()=>{ue&&ue(),O&&O()}),j)}S=S||"text";let we=await h[c.findKey(h,S)||"text"]($,d);return!Ie&&O&&O(),await new Promise((j,K)=>{kt(j,K,{data:we,headers:k.from($.headers),status:$.status,statusText:$.statusText,config:d,request:T})})}catch(M){throw O&&O(),M&&M.name==="TypeError"&&/Load failed|fetch/i.test(M.message)?Object.assign(new I("Network Error",I.ERR_NETWORK,d,T),{cause:M.cause||M}):I.from(M,M&&M.code,d,T)}}},oo=new Map,Wt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s=i.length,a=s,u,l,f=oo;for(;a--;)u=i[a],l=f.get(u),l===void 0&&f.set(u,l=a?new Map:ro(t)),f=l;return l};Wt();const je={http:Br,xhr:Yr,fetch:{get:Wt}};c.forEach(je,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Gt=e=>`- ${e}`,io=e=>c.isFunction(e)||e===null||e===!1;function so(e,t){e=c.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){n=e[s];let a;if(o=n,!io(n)&&(o=je[(a=String(n)).toLowerCase()],o===void 0))throw new I(`Unknown adapter '${a}'`);if(o&&(c.isFunction(o)||(o=o.get(t))))break;i[a||"#"+s]=o}if(!o){const s=Object.entries(i).map(([u,l])=>`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=r?s.length>1?`since :
|
|
4
4
|
`+s.map(Gt).join(`
|