@peerbit/server 8.0.9 → 8.0.10
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.
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
function pt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Mt}=Object.prototype,{getPrototypeOf:Z}=Object,{iterator:ae,toStringTag:ht}=Symbol,be=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ie=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),be(n,t))return!0;n=Z(n)}return!1},zt=(e,t)=>e!=null&&ie(e,t)?e[t]:void 0,Ie=(e=>t=>{const n=Mt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),B=e=>(e=e.toLowerCase(),t=>Ie(t)===e),Oe=e=>t=>typeof t===e,{isArray:K}=Array,Y=Oe("undefined");function ee(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mt=B("ArrayBuffer");function $t(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mt(e.buffer),t}const vt=Oe("string"),U=Oe("function"),yt=Oe("number"),te=e=>e!==null&&typeof e=="object",Vt=e=>e===!0||e===!1,me=e=>{if(!te(e))return!1;const t=Z(e);return(t===null||t===Object.prototype||Z(t)===null)&&!ie(e,ht)&&!ie(e,ae)},Jt=e=>{if(!te(e)||ee(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Wt=B("Date"),Kt=B("File"),Xt=e=>!!(e&&typeof e.uri<"u"),Gt=e=>e&&typeof e.getParts<"u",Qt=B("Blob"),Zt=B("FileList"),Yt=e=>te(e)&&U(e.pipe);function en(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Ge=en(),Qe=typeof Ge.FormData<"u"?Ge.FormData:void 0,tn=e=>{if(!e)return!1;if(Qe&&e instanceof Qe)return!0;const t=Z(e);if(!t||t===Object.prototype||!U(e.append))return!1;const n=Ie(e);return n==="formdata"||n==="object"&&U(e.toString)&&e.toString()==="[object FormData]"},nn=B("URLSearchParams"),[rn,sn,on,an]=["ReadableStream","Request","Response","Headers"].map(B),cn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(ee(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let c;for(r=0;r<a;r++)c=o[r],t.call(null,e[c],c,e)}}function wt(e,t){if(ee(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,bt=e=>!Y(e)&&e!==J;function Ue(...e){const{caseless:t,skipUndefined:n}=bt(this)&&this||{},r={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&wt(r,a)||a,l=be(r,c)?r[c]:void 0;me(l)&&me(o)?r[c]=Ue(l,o):me(o)?r[c]=Ue({},o):K(o)?r[c]=o.slice():(!n||!Y(o))&&(r[c]=o)};for(let o=0,a=e.length;o<a;o++){const c=e[o];if(!c||ee(c)||(ce(c,s),typeof c!="object"||K(c)))continue;const l=Object.getOwnPropertySymbols(c);for(let f=0;f<l.length;f++){const u=l[f];Rn.call(c,u)&&s(c[u],u)}}return r}const ln=(e,t,n,{allOwnKeys:r}={})=>(ce(t,(s,o)=>{n&&U(s)?Object.defineProperty(e,o,{__proto__:null,value:pt(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),un=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},dn=(e,t,n,r)=>{let s,o,a;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],(!r||r(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&Z(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},hn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!yt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Z(Uint8Array)),yn=(e,t)=>{const r=(e&&e[ae]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bn=B("HTMLFormElement"),En=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:Rn}=Object.prototype,On=B("RegExp"),Et=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ce(n,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(r[o]=a||s)}),Object.defineProperties(e,r)},gn=e=>{Et(e,(t,n)=>{if(U(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(U(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Sn=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return K(e)?r(e):r(String(e).split(t)),n},_n=()=>{},An=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Tn(e){return!!(e&&U(e.append)&&e[ht]==="FormData"&&e[ae])}const Cn=e=>{const t=new WeakSet,n=r=>{if(te(r)){if(t.has(r))return;if(ee(r))return r;if(!("toJSON"in r)){t.add(r);const s=K(r)?[]:{};return ce(r,(o,a)=>{const c=n(o);!Y(c)&&(s[a]=c)}),t.delete(r),s}}return r};return n(e)},Pn=B("AsyncFunction"),xn=e=>e&&(te(e)||U(e))&&U(e.then)&&U(e.catch),Rt=((e,t)=>e?setImmediate:t?((n,r)=>(J.addEventListener("message",({source:s,data:o})=>{s===J&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",U(J.postMessage)),Nn=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||Rt,Ot=e=>e!=null&&U(e[ae]),Dn=e=>e!=null&&ie(e,ae)&&Ot(e),i={isArray:K,isArrayBuffer:mt,isBuffer:ee,isFormData:tn,isArrayBufferView:$t,isString:vt,isNumber:yt,isBoolean:Vt,isObject:te,isPlainObject:me,isEmptyObject:Jt,isReadableStream:rn,isRequest:sn,isResponse:on,isHeaders:an,isUndefined:Y,isDate:Wt,isFile:Kt,isReactNativeBlob:Xt,isReactNative:Gt,isBlob:Qt,isRegExp:On,isFunction:U,isStream:Yt,isURLSearchParams:nn,isTypedArray:mn,isFileList:Zt,forEach:ce,merge:Ue,extend:ln,trim:cn,stripBOM:un,inherits:fn,toFlatObject:dn,kindOf:Ie,kindOfTest:B,endsWith:pn,toArray:hn,forEachEntry:yn,matchAll:wn,isHTMLForm:bn,hasOwnProperty:be,hasOwnProp:be,hasOwnInPrototypeChain:ie,getSafeProp:zt,reduceDescriptors:Et,freezeMethods:gn,toObjectSet:Sn,toCamelCase:En,noop:_n,toFiniteNumber:An,findKey:wt,global:J,isContextDefined:bt,isSpecCompliantForm:Tn,toJSONObject:Cn,isAsyncFn:Pn,isThenable:xn,setImmediate:Rt,asap:Nn,isIterable:Ot,isSafeIterable:Dn},Un=i.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"]),Ln=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||t[n]&&Un[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function Fn(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Bn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),In=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function je(e,t){return i.isArray(e)?e.map(n=>je(n,t)):Fn(String(e).replace(t,""))}const jn=e=>je(e,Bn),kn=e=>je(e,In);function gt(e){const t=Object.create(null);return i.forEach(e.toJSON(),(n,r)=>{t[r]=kn(n)}),t}const Ze=Symbol("internals");function oe(e){return e&&String(e).trim().toLowerCase()}function ye(e){return e===!1||e==null?e:i.isArray(e)?e.map(ye):jn(String(e))}function qn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Hn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pe(e,t,n,r,s){if(i.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!i.isString(t)){if(i.isString(r))return t.indexOf(r)!==-1;if(i.isRegExp(r))return r.test(t)}}function Mn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zn(e,t){const n=i.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,o,a){return this[r].call(this,t,s,o,a)},configurable:!0})})}let D=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,l,f){const u=oe(l);if(!u)return;const p=i.findKey(s,u);(!p||s[p]===void 0||f===!0||f===void 0&&s[p]!==!1)&&(s[p||l]=ye(c))}const a=(c,l)=>i.forEach(c,(f,u)=>o(f,u,l));if(i.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(i.isString(t)&&(t=t.trim())&&!Hn(t))a(Ln(t),n);else if(i.isObject(t)&&i.isSafeIterable(t)){let c=Object.create(null),l,f;for(const u of t){if(!i.isArray(u))throw new TypeError("Object iterator must return a key-value pair");f=u[0],i.hasOwnProp(c,f)?(l=c[f],c[f]=i.isArray(l)?[...l,u[1]]:[l,u[1]]):c[f]=u[1]}a(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=oe(t),t){const r=i.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return qn(s);if(i.isFunction(n))return n.call(this,s,r);if(i.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oe(t),t){const r=i.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Pe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(a){if(a=oe(a),a){const c=i.findKey(r,a);c&&(!n||Pe(r,r[c],c,n))&&(delete r[c],s=!0)}}return i.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Pe(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return i.forEach(this,(s,o)=>{const a=i.findKey(r,o);if(a){n[a]=ye(s),delete n[o];return}const c=t?Mn(o):String(o).trim();c!==o&&delete n[o],n[c]=ye(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return i.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&i.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
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,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ze]=this[Ze]={accessors:{}}).accessors,s=this.prototype;function o(a){const c=oe(a);r[c]||(zn(s,a),r[c]=!0)}return i.isArray(t)?t.forEach(o):o(t),this}};D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);i.reduceDescriptors(D.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});i.freezeMethods(D);const $n="[REDACTED ****]";function vn(e){if(i.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(i.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Vn(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],s=o=>{if(o===null||typeof o!="object"||i.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof D&&(o=o.toJSON()),r.push(o);let a;if(i.isArray(o))a=[],o.forEach((c,l)=>{const f=s(c);i.isUndefined(f)||(a[l]=f)});else{if(!i.isPlainObject(o)&&vn(o))return r.pop(),o;a=Object.create(null);for(const[c,l]of Object.entries(o)){const f=n.has(c.toLowerCase())?$n:s(l);i.isUndefined(f)||(a[c]=f)}}return r.pop(),a};return s(e)}let h=class St extends Error{static from(t,n,r,s,o,a){const c=new St(t.message,n||t.code,r,s,o);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&i.hasOwnProp(t,"redact")?t.redact:void 0,r=i.isArray(n)&&n.length>0?Vn(t,n):i.toJSONObject(t);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:r,code:this.code,status:this.status}}};h.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";h.ERR_BAD_OPTION="ERR_BAD_OPTION";h.ECONNABORTED="ECONNABORTED";h.ETIMEDOUT="ETIMEDOUT";h.ECONNREFUSED="ECONNREFUSED";h.ERR_NETWORK="ERR_NETWORK";h.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";h.ERR_DEPRECATED="ERR_DEPRECATED";h.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";h.ERR_BAD_REQUEST="ERR_BAD_REQUEST";h.ERR_CANCELED="ERR_CANCELED";h.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";h.ERR_INVALID_URL="ERR_INVALID_URL";h.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Jn=null,_t=100;function Le(e){return i.isPlainObject(e)||i.isArray(e)}function At(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function xe(e,t,n){return e?e.concat(t).map(function(s,o){return s=At(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Wn(e){return i.isArray(e)&&!e.some(Le)}const Kn=i.toFlatObject(i,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,n){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=i.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,E){return!i.isUndefined(E[y])});const r=n.metaTokens,s=n.visitor||O,o=n.dots,a=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?_t:n.maxDepth,f=c&&i.isSpecCompliantForm(t),u=[];if(!i.isFunction(s))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(i.isDate(d))return d.toISOString();if(i.isBoolean(d))return d.toString();if(!f&&i.isBlob(d))throw new h("Blob is not supported. Use a Buffer instead.");if(i.isArrayBuffer(d)||i.isTypedArray(d)){if(f&&typeof c=="function")return new c([d]);if(typeof Buffer<"u")return Buffer.from(d);throw new h("Blob is not supported. Use a Buffer instead.",h.ERR_NOT_SUPPORT)}return d}function w(d){if(d>l)throw new h("Object is too deeply nested ("+d+" levels). Max depth: "+l,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(d,y){if(l===1/0)return JSON.stringify(d);const E=[];return JSON.stringify(d,function(x,A){if(!i.isObject(A))return A;for(;E.length&&E[E.length-1]!==this;)E.pop();return E.push(A),w(y+E.length-1),A})}function O(d,y,E){let S=d;if(i.isReactNative(t)&&i.isReactNativeBlob(d))return t.append(xe(E,y,o),p(d)),!1;if(d&&!E&&typeof d=="object"){if(i.endsWith(y,"{}"))y=r?y:y.slice(0,-2),d=b(d,1);else if(i.isArray(d)&&Wn(d)||(i.isFileList(d)||i.endsWith(y,"[]"))&&(S=i.toArray(d)))return y=At(y),S.forEach(function(A,q){!(i.isUndefined(A)||A===null)&&t.append(a===!0?xe([y],q,o):a===null?y:y+"[]",p(A))}),!1}return Le(d)?!0:(t.append(xe(E,y,o),p(d)),!1)}const g=Object.assign(Kn,{defaultVisitor:O,convertValue:p,isVisitable:Le});function m(d,y,E=0){if(!i.isUndefined(d)){if(w(E),u.indexOf(d)!==-1)throw new Error("Circular reference detected in "+y.join("."));u.push(d),i.forEach(d,function(x,A){(!(i.isUndefined(x)||x===null)&&s.call(t,x,i.isString(A)?A.trim():A,y,g))===!0&&m(x,y?y.concat(A):[A],E+1)}),u.pop()}}if(!i.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Ye(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function ke(e,t){this._pairs=[],e&&ge(e,this,t)}const Tt=ke.prototype;Tt.append=function(t,n){this._pairs.push([t,n])};Tt.toString=function(t){const n=t?r=>t.call(this,r,Ye):Ye;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Xn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ct(e,t,n){if(!t)return e;e=e||"";const r=i.isFunction(n)?{serialize:n}:n,s=i.getSafeProp(r,"encode")||Xn,o=i.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=i.isURLSearchParams(t)?t.toString():new ke(t,r).toString(s),a){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class et{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){i.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Gn=typeof URLSearchParams<"u"?URLSearchParams:ke,Qn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Gn,FormData:Qn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},He=typeof window<"u"&&typeof document<"u",Fe=typeof navigator=="object"&&navigator||void 0,er=He&&(!Fe||["ReactNative","NativeScript","NS"].indexOf(Fe.product)<0),tr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nr=He&&window.location.href||"http://localhost",rr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:He,hasStandardBrowserEnv:er,hasStandardBrowserWebWorkerEnv:tr,navigator:Fe,origin:nr},Symbol.toStringTag,{value:"Module"})),P={...rr,...Yn};function sr(e,t){return ge(e,new P.classes.URLSearchParams,{visitor:function(n,r,s,o){return P.isNode&&i.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const tt=_t;function Pt(e){if(e>tt)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+tt,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function or(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Pt(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function ir(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function xt(e){function t(n,r,s,o){Pt(o);let a=n[o++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=o>=n.length;return a=!a&&i.isArray(s)?s.length:a,l?(i.hasOwnProp(s,a)?s[a]=i.isArray(s[a])?s[a].concat(r):[s[a],r]:s[a]=r,!c):((!i.hasOwnProp(s,a)||!i.isObject(s[a]))&&(s[a]=[]),t(n,r,s[a],o)&&i.isArray(s[a])&&(s[a]=ir(s[a])),!c)}if(i.isFormData(e)&&i.isFunction(e.entries)){const n={};return i.forEachEntry(e,(r,s)=>{t(or(r),s,n,0)}),n}return null}const Q=(e,t)=>e!=null&&i.hasOwnProp(e,t)?e[t]:void 0;function ar(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const le={transitional:qe,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=i.isObject(t);if(o&&i.isHTMLForm(t)&&(t=new FormData(t)),i.isFormData(t))return s?JSON.stringify(xt(t)):t;if(i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)||i.isReadableStream(t))return t;if(i.isArrayBufferView(t))return t.buffer;if(i.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const l=Q(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return sr(t,l).toString();if((c=i.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Q(this,"env"),u=f&&f.FormData;return ge(c?{"files[]":t}:t,u&&new u,l)}}return o||s?(n.setContentType("application/json",!1),ar(t)):t}],transformResponse:[function(t){const n=Q(this,"transitional")||le.transitional,r=n&&n.forcedJSONParsing,s=Q(this,"responseType"),o=s==="json";if(i.isResponse(t)||i.isReadableStream(t))return t;if(t&&i.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Q(this,"parseReviver"))}catch(l){if(c)throw l.name==="SyntaxError"?h.from(l,h.ERR_BAD_RESPONSE,this,null,Q(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};i.forEach(["delete","get","head","post","put","patch","query"],e=>{le.headers[e]={}});function Ne(e,t){const n=this||le,r=t||n,s=D.from(r.headers);let o=r.data;return i.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Nt(e){return!!(e&&e.__CANCEL__)}let ue=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Dt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new h("Request failed with status code "+n.status,n.status>=400&&n.status<500?h.ERR_BAD_REQUEST:h.ERR_BAD_RESPONSE,n.config,n.request,n))}function cr(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function lr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const f=Date.now(),u=r[o];a||(a=f),n[s]=l,r[s]=f;let p=o,w=0;for(;p!==s;)w+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),f-a<t)return;const b=u&&f-u;return b?Math.round(w*1e3/b):void 0}}function ur(e,t){let n=0,r=1e3/t,s,o;const a=(f,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const u=Date.now(),p=u-n;p>=r?a(f,u):(s=f,o||(o=setTimeout(()=>{o=null,a(s)},r-p)))},()=>s&&a(s)]}const Ee=(e,t,n=3)=>{let r=0;const s=lr(50,250);return ur(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,c=o.lengthComputable?o.total:void 0,l=c!=null?Math.min(a,c):a,f=Math.max(0,l-r),u=s(f);r=Math.max(r,l);const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c?(c-l)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rt=e=>(...t)=>i.asap(()=>e(...t)),fr=P.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,P.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(P.origin),P.navigator&&/(msie|trident)/i.test(P.navigator.userAgent)):()=>!0,dr=P.hasStandardBrowserEnv?{write(e,t,n,r,s,o,a){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];i.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),i.isString(r)&&c.push(`path=${r}`),i.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),i.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch{return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pr(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const mr=/^https?:(?!\/\/)/i,yr=/[\t\n\r]/g;function wr(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function br(e){return wr(e).replace(yr,"")}function st(e,t){if(typeof e=="string"&&mr.test(br(e)))throw new h('Invalid URL: missing "//" after protocol',h.ERR_INVALID_URL,t)}function Ut(e,t,n,r){st(t,r);let s=!pr(t);return e&&(s||n===!1)?(st(e,r),hr(e,t)):t}const ot=e=>e instanceof D?{...e}:e;function X(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,p,w,b){return i.isPlainObject(u)&&i.isPlainObject(p)?i.merge.call({caseless:b},u,p):i.isPlainObject(p)?i.merge({},p):i.isArray(p)?p.slice():p}function s(u,p,w,b){if(i.isUndefined(p)){if(!i.isUndefined(u))return r(void 0,u,w,b)}else return r(u,p,w,b)}function o(u,p){if(!i.isUndefined(p))return r(void 0,p)}function a(u,p){if(i.isUndefined(p)){if(!i.isUndefined(u))return r(void 0,u)}else return r(void 0,p)}function c(u){const p=i.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!i.isUndefined(p))if(i.isPlainObject(p)){if(i.hasOwnProp(p,u))return p[u]}else return;const w=i.hasOwnProp(e,"transitional")?e.transitional:void 0;if(i.isPlainObject(w)&&i.hasOwnProp(w,u))return w[u]}function l(u,p,w){if(i.hasOwnProp(t,w))return r(u,p);if(i.hasOwnProp(e,w))return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(u,p,w)=>s(ot(u),ot(p),w,!0)};return i.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const w=i.hasOwnProp(f,p)?f[p]:s,b=i.hasOwnProp(e,p)?e[p]:void 0,O=i.hasOwnProp(t,p)?t[p]:void 0,g=w(b,O,p);i.isUndefined(g)&&w!==l||(n[p]=g)}),i.hasOwnProp(t,"validateStatus")&&i.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(i.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const Er=["content-type","content-length"];function Rr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Er.includes(r.toLowerCase())&&e.set(r,s)})}const Or=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Lt(e){const t=X({},e),n=w=>i.hasOwnProp(t,w)?t[w]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let c=n("headers");const l=n("auth"),f=n("baseURL"),u=n("allowAbsoluteUrls"),p=n("url");if(t.headers=c=D.from(c),t.url=Ct(Ut(f,p,u,t),n("params"),n("paramsSerializer")),l){const w=i.getSafeProp(l,"username")||"",b=i.getSafeProp(l,"password")||"";try{c.set("Authorization","Basic "+btoa(w+":"+(b?Or(b):"")))}catch(O){throw h.from(O,h.ERR_BAD_OPTION_VALUE,e)}}if(i.isFormData(r)&&(P.hasStandardBrowserEnv||P.hasStandardBrowserWebWorkerEnv||i.isReactNative(r)?c.setContentType(void 0):i.isFunction(r.getHeaders)&&Rr(c,r.getHeaders(),n("formDataHeaderPolicy"))),P.hasStandardBrowserEnv&&(i.isFunction(s)&&(s=s(t)),s===!0||s==null&&fr(t.url))){const b=o&&a&&dr.read(a);b&&c.set(o,b)}return t}const gr=typeof XMLHttpRequest<"u",Sr=gr&&function(e){return new Promise(function(n,r){const s=Lt(e);let o=s.data;const a=D.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=s,u,p,w,b,O;function g(){b&&b(),O&&O(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function d(){if(!m)return;const E=D.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:e,request:m};Dt(function(q){n(q),g()},function(q){r(q),g()},x),m=null}"onloadend"in m?m.onloadend=d:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(d)},m.onabort=function(){m&&(r(new h("Request aborted",h.ECONNABORTED,e,m)),g(),m=null)},m.onerror=function(S){const x=S&&S.message?S.message:"Network Error",A=new h(x,h.ERR_NETWORK,e,m);A.event=S||null,r(A),g(),m=null},m.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const x=s.transitional||qe;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new h(S,x.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,m)),g(),m=null},o===void 0&&a.setContentType(null),"setRequestHeader"in m&&i.forEach(gt(a),function(S,x){m.setRequestHeader(x,S)}),i.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),f&&([w,O]=Ee(f,!0),m.addEventListener("progress",w)),l&&m.upload&&([p,b]=Ee(l),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=E=>{m&&(r(!E||E.type?new ue(null,e,m):E),m.abort(),g(),m=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const y=cr(s.url);if(y&&!P.protocols.includes(y)){r(new h("Unsupported protocol "+y+":",h.ERR_BAD_REQUEST,e)),g();return}m.send(o||null)})},_r=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,a();const f=l instanceof Error?l:this.reason;n.abort(f instanceof h?f:new ue(f instanceof Error?f.message:f))}};let o=t&&setTimeout(()=>{o=null,s(new h(`timeout of ${t}ms exceeded`,h.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>i.asap(a),c},Ar=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Tr=async function*(e,t){for await(const n of Cr(e))yield*Ar(n,t)},Cr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},it=(e,t,n,r)=>{const s=Tr(e,t);let o=0,a,c=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:f,value:u}=await s.next();if(f){c(),l.close();return}let p=u.byteLength;if(n){let w=o+=p;n(w)}l.enqueue(new Uint8Array(u))}catch(f){throw c(f),f}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},Re=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Pr=(e,t,n)=>t+2<n&&Re(e.charCodeAt(t+1))&&Re(e.charCodeAt(t+2));function xr(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let a=r.length;const c=r.length;for(let b=0;b<c;b++)if(r.charCodeAt(b)===37&&b+2<c){const O=r.charCodeAt(b+1),g=r.charCodeAt(b+2);Re(O)&&Re(g)&&(a-=2,b+=2)}let l=0,f=c-1;const u=b=>b>=2&&r.charCodeAt(b-2)===37&&r.charCodeAt(b-1)===51&&(r.charCodeAt(b)===68||r.charCodeAt(b)===100);f>=0&&(r.charCodeAt(f)===61?(l++,f--):u(f)&&(l++,f-=3)),l===1&&f>=0&&(r.charCodeAt(f)===61||u(f))&&l++;const w=Math.floor(a/4)*3-(l||0);return w>0?w:0}let o=0;for(let a=0,c=r.length;a<c;a++){const l=r.charCodeAt(a);if(l===37&&Pr(r,a,c))o+=1,a+=2;else if(l<128)o+=1;else if(l<2048)o+=2;else if(l>=55296&&l<=56319&&a+1<c){const f=r.charCodeAt(a+1);f>=56320&&f<=57343?(o+=4,a++):o+=3}else o+=3}return o}const Me="1.18.1",at=64*1024,{isFunction:he}=i,Nr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),ct=e=>{if(!i.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},lt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Dr=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Ur=e=>{const t=i.global!==void 0&&i.global!==null?i.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=i.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,c=s?he(s):typeof fetch=="function",l=he(o),f=he(a);if(!c)return!1;const u=c&&he(n),p=c&&(typeof r=="function"?(d=>y=>d.encode(y))(new r):async d=>new Uint8Array(await new o(d).arrayBuffer())),w=l&&u&<(()=>{let d=!1;const y=new o(P.origin,{body:new n,method:"POST",get duplex(){return d=!0,"half"}}),E=y.headers.has("Content-Type");return y.body!=null&&y.body.cancel(),d&&!E}),b=f&&u&<(()=>i.isReadableStream(new a("").body)),O={stream:b&&(d=>d.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!O[d]&&(O[d]=(y,E)=>{let S=y&&y[d];if(S)return S.call(y);throw new h(`Response type '${d}' is not supported`,h.ERR_NOT_SUPPORT,E)})});const g=async d=>{if(d==null)return 0;if(i.isBlob(d))return d.size;if(i.isSpecCompliantForm(d))return(await new o(P.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(i.isArrayBufferView(d)||i.isArrayBuffer(d))return d.byteLength;if(i.isURLSearchParams(d)&&(d=d+""),i.isString(d))return(await p(d)).byteLength},m=async(d,y)=>{const E=i.toFiniteNumber(d.getContentLength());return E??g(y)};return async d=>{let{url:y,method:E,data:S,signal:x,cancelToken:A,timeout:q,onDownloadProgress:_e,onUploadProgress:Ae,responseType:H,headers:M,withCredentials:fe="same-origin",fetchOptions:$e,maxContentLength:I,maxBodyLength:de}=Lt(d);const ne=i.isNumber(I)&&I>-1,Te=i.isNumber(de)&&de>-1,kt=_=>i.hasOwnProp(d,_)?d[_]:void 0;let ve=s||fetch;H=H?(H+"").toLowerCase():"text";let z=_r([x,A&&A.toAbortSignal()],q),C=null;const v=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let G,re=null;const Ve=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,d,C);try{let _;const F=kt("auth");if(F){const R=i.getSafeProp(F,"username")||"",L=i.getSafeProp(F,"password")||"";_={username:R,password:L}}if(Dr(y)){const R=new URL(y,P.origin);if(!_&&(R.username||R.password)){const L=ct(R.username),$=ct(R.password);_={username:L,password:$}}(R.username||R.password)&&(R.username="",R.password="",y=R.href)}if(_&&(M.delete("authorization"),M.set("Authorization","Basic "+btoa(Nr((_.username||"")+":"+(_.password||""))))),ne&&typeof y=="string"&&y.startsWith("data:")&&xr(y)>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,C);if(Te&&E!=="get"&&E!=="head"){const R=await g(S);if(typeof R=="number"&&isFinite(R)&&(G=R,R>de))throw Ve()}const pe=Te&&(i.isReadableStream(S)||i.isStream(S)),Je=(R,L,$)=>it(R,at,V=>{if(Te&&V>de)throw re=Ve();L&&L(V)},$);if(w&&E!=="get"&&E!=="head"&&(Ae||pe)){if(G=G??await m(M,S),G!==0||pe){let R=new o(y,{method:"POST",body:S,duplex:"half"}),L;if(i.isFormData(S)&&(L=R.headers.get("content-type"))&&M.setContentType(L),R.body){const[$,V]=Ae&&nt(G,Ee(rt(Ae)))||[];S=Je(R.body,$,V)}}}else if(pe&&!l&&u&&E!=="get"&&E!=="head")S=Je(S);else if(pe&&l&&!w&&E!=="get"&&E!=="head")throw new h("Stream request bodies are not supported by the current fetch implementation",h.ERR_NOT_SUPPORT,d,C);i.isString(fe)||(fe=fe?"include":"omit");const qt=l&&"credentials"in o.prototype;if(i.isFormData(S)){const R=M.getContentType();R&&/^multipart\/form-data/i.test(R)&&!/boundary=/i.test(R)&&M.delete("content-type")}M.set("User-Agent","axios/"+Me,!1);const We={...$e,signal:z,method:E.toUpperCase(),headers:gt(M.normalize()),body:S,duplex:"half",credentials:qt?fe:void 0};C=l&&new o(y,We);let j=await(l?ve(C,$e):ve(y,We));const Ke=D.from(j.headers);if(ne){const R=i.toFiniteNumber(Ke.getContentLength());if(R!=null&&R>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,C)}const Ce=b&&(H==="stream"||H==="response");if(b&&j.body&&(_e||ne||Ce&&v)){const R={};["status","statusText","headers"].forEach(se=>{R[se]=j[se]});const L=i.toFiniteNumber(Ke.getContentLength()),[$,V]=_e&&nt(L,Ee(rt(_e),!0))||[];let Xe=0;const Ht=se=>{if(ne&&(Xe=se,Xe>I))throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,C);$&&$(se)};j=new a(it(j.body,at,Ht,()=>{V&&V(),v&&v()}),R)}H=H||"text";let k=await O[i.findKey(O,H)||"text"](j,d);if(ne&&!b&&!Ce){let R;if(k!=null&&(typeof k.byteLength=="number"?R=k.byteLength:typeof k.size=="number"?R=k.size:typeof k=="string"&&(R=typeof r=="function"?new r().encode(k).byteLength:k.length)),typeof R=="number"&&R>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,C)}return!Ce&&v&&v(),await new Promise((R,L)=>{Dt(R,L,{data:k,headers:D.from(j.headers),status:j.status,statusText:j.statusText,config:d,request:C})})}catch(_){if(v&&v(),z&&z.aborted&&z.reason instanceof h){const F=z.reason;throw F.config=d,C&&(F.request=C),_!==F&&Object.defineProperty(F,"cause",{__proto__:null,value:_,writable:!0,enumerable:!1,configurable:!0}),F}if(re)throw C&&!re.request&&(re.request=C),re;if(_ instanceof h)throw C&&!_.request&&(_.request=C),_;if(_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)){const F=new h("Network Error",h.ERR_NETWORK,d,C,_&&_.response);throw Object.defineProperty(F,"cause",{__proto__:null,value:_.cause||_,writable:!0,enumerable:!1,configurable:!0}),F}throw h.from(_,_&&_.code,d,C,_&&_.response)}}},Lr=new Map,Ft=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let a=o.length,c=a,l,f,u=Lr;for(;c--;)l=o[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:Ur(t)),u=f;return f};Ft();const ze={http:Jn,xhr:Sr,fetch:{get:Ft}};i.forEach(ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ut=e=>`- ${e}`,Fr=e=>i.isFunction(e)||e===null||e===!1;function Br(e,t){e=i.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let a=0;a<n;a++){r=e[a];let c;if(s=r,!Fr(r)&&(s=ze[(c=String(r)).toLowerCase()],s===void 0))throw new h(`Unknown adapter '${c}'`);if(s&&(i.isFunction(s)||(s=s.get(t))))break;o[c||"#"+a]=s}if(!s){const a=Object.entries(o).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?a.length>1?`since :
|
|
4
|
-
`+a.map(ut).join(`
|
|
5
|
-
`):" "+ut(a[0]):"as no adapter specified";throw new h("There is no suitable adapter to dispatch the request "+c,h.ERR_NOT_SUPPORT)}return s}const Bt={getAdapter:Br,adapters:ze};function De(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue(null,e)}function ft(e){return De(e),e.headers=D.from(e.headers),e.data=Ne.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bt.getAdapter(e.adapter||le.adapter,e)(e).then(function(r){De(e),e.response=r;try{r.data=Ne.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=D.from(r.headers),r},function(r){if(!Nt(r)&&(De(e),r&&r.response)){e.response=r.response;try{r.response.data=Ne.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=D.from(r.response.headers)}return Promise.reject(r)})}const Se={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Se[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dt={};Se.transitional=function(t,n,r){function s(o,a){return"[Axios v"+Me+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,c)=>{if(t===!1)throw new h(s(a," has been removed"+(n?" in "+n:"")),h.ERR_DEPRECATED);return n&&!dt[a]&&(dt[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,c):!0}};Se.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ir(e,t,n){if(typeof e!="object"||e===null)throw new h("options must be an object",h.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const c=e[o],l=c===void 0||a(c,o,e);if(l!==!0)throw new h("option "+o+" must be "+l,h.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new h("Unknown option "+o,h.ERR_BAD_OPTION)}}const we={assertOptions:Ir,validators:Se},N=we.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new et,response:new et}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const a=s.stack.indexOf(`
|
|
6
|
-
`);return a===-1?"":s.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
|
|
7
|
-
`),c=a===-1?-1:o.indexOf(`
|
|
8
|
-
`,a+1),l=c===-1?"":o.slice(c+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
9
|
-
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=X(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&we.assertOptions(r,{silentJSONParsing:N.transitional(N.boolean),forcedJSONParsing:N.transitional(N.boolean),clarifyTimeoutError:N.transitional(N.boolean),legacyInterceptorReqResOrdering:N.transitional(N.boolean),advertiseZstdAcceptEncoding:N.transitional(N.boolean),validateStatusUndefinedResolves:N.transitional(N.boolean)},!1),s!=null&&(i.isFunction(s)?n.paramsSerializer={serialize:s}:we.assertOptions(s,{encode:N.function,serialize:N.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),we.assertOptions(n,{baseUrl:N.spelling("baseURL"),withXsrfToken:N.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&i.merge(o.common,o[n.method]);o&&i.forEach(["delete","get","head","post","put","patch","query","common"],O=>{delete o[O]}),n.headers=D.concat(a,o);const c=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const m=n.transitional||qe;m&&m.legacyInterceptorReqResOrdering?c.unshift(g.fulfilled,g.rejected):c.push(g.fulfilled,g.rejected)});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let u,p=0,w;if(!l){const O=[ft.bind(this),void 0];for(O.unshift(...c),O.push(...f),w=O.length,u=Promise.resolve(n);p<w;)u=u.then(O[p++],O[p++]);return u}w=c.length;let b=n;for(;p<w;){const O=c[p++],g=c[p++];try{b=O(b)}catch(m){g.call(this,m);break}}try{u=ft.call(this,b)}catch(O){return Promise.reject(O)}for(p=0,w=f.length;p<w;)u=u.then(f[p++],f[p++]);return u}getUri(t){t=X(this.defaults,t);const n=Ut(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ct(n,t.params,t.paramsSerializer)}};i.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(n,r){return this.request(X(r||{},{method:t,url:n,data:r&&i.hasOwnProp(r,"data")?r.data:void 0}))}});i.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,c){return this.request(X(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}W.prototype[t]=n(),t!=="query"&&(W.prototype[t+"Form"]=n(!0))});let jr=class It{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(c=>{r.subscribe(c),o=c}).then(s);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,c){r.reason||(r.reason=new ue(o,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new It(function(s){t=s}),cancel:t}}};function kr(e){return function(n){return e.apply(null,n)}}function qr(e){return i.isObject(e)&&e.isAxiosError===!0}const Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Be).forEach(([e,t])=>{Be[t]=e});function jt(e){const t=new W(e),n=pt(W.prototype.request,t);return i.extend(n,W.prototype,t,{allOwnKeys:!0}),i.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return jt(X(e,s))},n}const T=jt(le);T.Axios=W;T.CanceledError=ue;T.CancelToken=jr;T.isCancel=Nt;T.VERSION=Me;T.toFormData=ge;T.AxiosError=h;T.Cancel=T.CanceledError;T.all=function(t){return Promise.all(t)};T.spread=kr;T.isAxiosError=qr;T.mergeConfig=X;T.AxiosHeaders=D;T.formToJSON=e=>xt(i.isHTMLForm(e)?new FormData(e):e);T.getAdapter=Bt.getAdapter;T.HttpStatusCode=Be;T.default=T;const{Axios:$r,AxiosError:vr,CanceledError:Vr,isCancel:Jr,CancelToken:Wr,VERSION:Kr,all:Xr,Cancel:Gr,isAxiosError:Qr,spread:Zr,toFormData:Yr,AxiosHeaders:es,HttpStatusCode:ts,formToJSON:ns,getAdapter:rs,mergeConfig:ss,create:os}=T;export{$r as Axios,vr as AxiosError,es as AxiosHeaders,Gr as Cancel,Wr as CancelToken,Vr as CanceledError,ts as HttpStatusCode,Kr as VERSION,Xr as all,os as create,T as default,ns as formToJSON,rs as getAdapter,Qr as isAxiosError,Jr as isCancel,ss as mergeConfig,Zr as spread,Yr as toFormData};
|