11 lines
48 KiB
JavaScript
11 lines
48 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CnIbBo4X.js","assets/index-Bv-hKmn9.css"])))=>i.map(i=>d[i]);
|
||
import{E as Kt,_ as Xt}from"./index-CnIbBo4X.js";function Et(e,t){return function(){return e.apply(t,arguments)}}const{toString:Gt}=Object.prototype,{getPrototypeOf:Z}=Object,{iterator:le,toStringTag:Rt}=Symbol,Re=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ce=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Re(n,t))return!0;n=Z(n)}return!1},Qt=(e,t)=>e!=null&&ce(e,t)?e[t]:void 0,qe=(e=>t=>{const n=Gt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),B=e=>(e=e.toLowerCase(),t=>qe(t)===e),_e=e=>t=>typeof t===e,{isArray:K}=Array,ee=_e("undefined");function te(e){return e!==null&&!ee(e)&&e.constructor!==null&&!ee(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gt=B("ArrayBuffer");function Yt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&>(e.buffer),t}const Zt=_e("string"),U=_e("function"),Ot=_e("number"),ne=e=>e!==null&&typeof e=="object",en=e=>e===!0||e===!1,we=e=>{if(!ne(e))return!1;const t=Z(e);return(t===null||t===Object.prototype||Z(t)===null)&&!ce(e,Rt)&&!ce(e,le)},tn=e=>{if(!ne(e)||te(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nn=B("Date"),rn=B("File"),sn=e=>!!(e&&typeof e.uri<"u"),on=e=>e&&typeof e.getParts<"u",an=B("Blob"),cn=B("FileList"),ln=e=>ne(e)&&U(e.pipe);function un(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const et=un(),tt=typeof et.FormData<"u"?et.FormData:void 0,fn=e=>{if(!e)return!1;if(tt&&e instanceof tt)return!0;const t=Z(e);if(!t||t===Object.prototype||!U(e.append))return!1;const n=qe(e);return n==="formdata"||n==="object"&&U(e.toString)&&e.toString()==="[object FormData]"},dn=B("URLSearchParams"),[pn,hn,mn,yn]=["ReadableStream","Request","Response","Headers"].map(B),wn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(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(te(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 St(e,t){if(te(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,_t=e=>!ee(e)&&e!==J;function Be(...e){const{caseless:t,skipUndefined:n}=_t(this)&&this||{},r={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const c=t&&typeof a=="string"&&St(r,a)||a,l=Re(r,c)?r[c]:void 0;we(l)&&we(o)?r[c]=Be(l,o):we(o)?r[c]=Be({},o):K(o)?r[c]=o.slice():(!n||!ee(o))&&(r[c]=o)};for(let o=0,a=e.length;o<a;o++){const c=e[o];if(!c||te(c)||(ue(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];xn.call(c,u)&&s(c[u],u)}}return r}const bn=(e,t,n,{allOwnKeys:r}={})=>(ue(t,(s,o)=>{n&&U(s)?Object.defineProperty(e,o,{__proto__:null,value:Et(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),En=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rn=(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)},gn=(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},On=(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},Sn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ot(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},_n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Z(Uint8Array)),An=(e,t)=>{const r=(e&&e[le]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Tn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pn=B("HTMLFormElement"),Cn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:xn}=Object.prototype,Nn=B("RegExp"),At=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ue(n,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(r[o]=a||s)}),Object.defineProperties(e,r)},Dn=e=>{At(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+"'")})}})},Un=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Ln=()=>{},Fn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Bn(e){return!!(e&&U(e.append)&&e[Rt]==="FormData"&&e[le])}const In=e=>{const t=new WeakSet,n=r=>{if(ne(r)){if(t.has(r))return;if(te(r))return r;if(!("toJSON"in r)){t.add(r);const s=K(r)?[]:{};return ue(r,(o,a)=>{const c=n(o);!ee(c)&&(s[a]=c)}),t.delete(r),s}}return r};return n(e)},kn=B("AsyncFunction"),jn=e=>e&&(ne(e)||U(e))&&U(e.then)&&U(e.catch),Tt=((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)),qn=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||Tt,Pt=e=>e!=null&&U(e[le]),Hn=e=>e!=null&&ce(e,le)&&Pt(e),i={isArray:K,isArrayBuffer:gt,isBuffer:te,isFormData:fn,isArrayBufferView:Yt,isString:Zt,isNumber:Ot,isBoolean:en,isObject:ne,isPlainObject:we,isEmptyObject:tn,isReadableStream:pn,isRequest:hn,isResponse:mn,isHeaders:yn,isUndefined:ee,isDate:nn,isFile:rn,isReactNativeBlob:sn,isReactNative:on,isBlob:an,isRegExp:Nn,isFunction:U,isStream:ln,isURLSearchParams:dn,isTypedArray:_n,isFileList:cn,forEach:ue,merge:Be,extend:bn,trim:wn,stripBOM:En,inherits:Rn,toFlatObject:gn,kindOf:qe,kindOfTest:B,endsWith:On,toArray:Sn,forEachEntry:An,matchAll:Tn,isHTMLForm:Pn,hasOwnProperty:Re,hasOwnProp:Re,hasOwnInPrototypeChain:ce,getSafeProp:Qt,reduceDescriptors:At,freezeMethods:Dn,toObjectSet:Un,toCamelCase:Cn,noop:Ln,toFiniteNumber:Fn,findKey:St,global:J,isContextDefined:_t,isSpecCompliantForm:Bn,toJSONObject:In,isAsyncFn:kn,isThenable:jn,setImmediate:Tt,asap:qn,isIterable:Pt,isSafeIterable:Hn},Mn=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"]),zn=e=>{const t={};let n,r,s;return e&&e.split(`
|
||
`).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||t[n]&&Mn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function $n(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 vn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Vn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function He(e,t){return i.isArray(e)?e.map(n=>He(n,t)):$n(String(e).replace(t,""))}const Jn=e=>He(e,vn),Wn=e=>He(e,Vn);function Ct(e){const t=Object.create(null);return i.forEach(e.toJSON(),(n,r)=>{t[r]=Wn(n)}),t}const nt=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function be(e){return e===!1||e==null?e:i.isArray(e)?e.map(be):Jn(String(e))}function Kn(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 Xn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function De(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 Gn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qn(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=ie(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]=be(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())&&!Xn(t))a(zn(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=ie(t),t){const r=i.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Kn(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=ie(t),t){const r=i.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||De(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(a){if(a=ie(a),a){const c=i.findKey(r,a);c&&(!n||De(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||De(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]=be(s),delete n[o];return}const c=t?Gn(o):String(o).trim();c!==o&&delete n[o],n[c]=be(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(`
|
||
`)}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[nt]=this[nt]={accessors:{}}).accessors,s=this.prototype;function o(a){const c=ie(a);r[c]||(Qn(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 Yn="[REDACTED ****]";function Zn(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 er(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)&&Zn(o))return r.pop(),o;a=Object.create(null);for(const[c,l]of Object.entries(o)){const f=n.has(c.toLowerCase())?Yn:s(l);i.isUndefined(f)||(a[c]=f)}}return r.pop(),a};return s(e)}let h=class xt extends Error{static from(t,n,r,s,o,a){const c=new xt(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?er(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 tr=null,Nt=100;function Ie(e){return i.isPlainObject(e)||i.isArray(e)}function Dt(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function Ue(e,t,n){return e?e.concat(t).map(function(s,o){return s=Dt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function nr(e){return i.isArray(e)&&!e.some(Ie)}const rr=i.toFlatObject(i,{},null,function(t){return/^is[A-Z]/.test(t)});function Ae(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||g,o=n.dots,a=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?Nt: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 g(d,y,E){let S=d;if(i.isReactNative(t)&&i.isReactNativeBlob(d))return t.append(Ue(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)&&nr(d)||(i.isFileList(d)||i.endsWith(y,"[]"))&&(S=i.toArray(d)))return y=Dt(y),S.forEach(function(A,q){!(i.isUndefined(A)||A===null)&&t.append(a===!0?Ue([y],q,o):a===null?y:y+"[]",p(A))}),!1}return Ie(d)?!0:(t.append(Ue(E,y,o),p(d)),!1)}const O=Object.assign(rr,{defaultVisitor:g,convertValue:p,isVisitable:Ie});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,O))===!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 rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Me(e,t){this._pairs=[],e&&Ae(e,this,t)}const Ut=Me.prototype;Ut.append=function(t,n){this._pairs.push([t,n])};Ut.toString=function(t){const n=t?r=>t.call(this,r,rt):rt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function sr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lt(e,t,n){if(!t)return e;e=e||"";const r=i.isFunction(n)?{serialize:n}:n,s=i.getSafeProp(r,"encode")||sr,o=i.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=i.isURLSearchParams(t)?t.toString():new Me(t,r).toString(s),a){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class st{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 ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},or=typeof URLSearchParams<"u"?URLSearchParams:Me,ir=typeof FormData<"u"?FormData:null,ar=typeof Blob<"u"?Blob:null,cr={isBrowser:!0,classes:{URLSearchParams:or,FormData:ir,Blob:ar},protocols:["http","https","file","blob","url","data"]},$e=typeof window<"u"&&typeof document<"u",ke=typeof navigator=="object"&&navigator||void 0,lr=$e&&(!ke||["ReactNative","NativeScript","NS"].indexOf(ke.product)<0),ur=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fr=$e&&window.location.href||"http://localhost",dr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$e,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:ur,navigator:ke,origin:fr},Symbol.toStringTag,{value:"Module"})),C={...dr,...cr};function pr(e,t){return Ae(e,new C.classes.URLSearchParams,{visitor:function(n,r,s,o){return C.isNode&&i.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const ot=Nt;function Ft(e){if(e>ot)throw new h("FormData field is too deeply nested ("+e+" levels). Max depth: "+ot,h.ERR_FORM_DATA_DEPTH_EXCEEDED)}function hr(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)Ft(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function mr(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 Bt(e){function t(n,r,s,o){Ft(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]=mr(s[a])),!c)}if(i.isFormData(e)&&i.isFunction(e.entries)){const n={};return i.forEachEntry(e,(r,s)=>{t(hr(r),s,n,0)}),n}return null}const Q=(e,t)=>e!=null&&i.hasOwnProp(e,t)?e[t]:void 0;function yr(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 fe={transitional:ze,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(Bt(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 pr(t,l).toString();if((c=i.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Q(this,"env"),u=f&&f.FormData;return Ae(c?{"files[]":t}:t,u&&new u,l)}}return o||s?(n.setContentType("application/json",!1),yr(t)):t}],transformResponse:[function(t){const n=Q(this,"transitional")||fe.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:C.classes.FormData,Blob:C.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=>{fe.headers[e]={}});function Le(e,t){const n=this||fe,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 It(e){return!!(e&&e.__CANCEL__)}let de=class extends h{constructor(t,n,r){super(t??"canceled",h.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function kt(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 wr(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function br(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 Er(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 ge=(e,t,n=3)=>{let r=0;const s=br(50,250);return Er(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)},it=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>i.asap(()=>e(...t)),Rr=C.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,C.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,gr=C.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 Or(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Sr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const _r=/^https?:(?!\/\/)/i,Ar=/[\t\n\r]/g;function Tr(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Pr(e){return Tr(e).replace(Ar,"")}function ct(e,t){if(typeof e=="string"&&_r.test(Pr(e)))throw new h('Invalid URL: missing "//" after protocol',h.ERR_INVALID_URL,t)}function jt(e,t,n,r){ct(t,r);let s=!Or(t);return e&&(s||n===!1)?(ct(e,r),Sr(e,t)):t}const lt=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(lt(u),lt(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,g=i.hasOwnProp(t,p)?t[p]:void 0,O=w(b,g,p);i.isUndefined(O)&&w!==l||(n[p]=O)}),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 Cr=["content-type","content-length"];function xr(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{Cr.includes(r.toLowerCase())&&e.set(r,s)})}const Nr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function qt(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=Lt(jt(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?Nr(b):"")))}catch(g){throw h.from(g,h.ERR_BAD_OPTION_VALUE,e)}}if(i.isFormData(r)&&(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv||i.isReactNative(r)?c.setContentType(void 0):i.isFunction(r.getHeaders)&&xr(c,r.getHeaders(),n("formDataHeaderPolicy"))),C.hasStandardBrowserEnv&&(i.isFunction(s)&&(s=s(t)),s===!0||s==null&&Rr(t.url))){const b=o&&a&&gr.read(a);b&&c.set(o,b)}return t}const Dr=typeof XMLHttpRequest<"u",Ur=Dr&&function(e){return new Promise(function(n,r){const s=qt(e);let o=s.data;const a=D.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:f}=s,u,p,w,b,g;function O(){b&&b(),g&&g(),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};kt(function(q){n(q),O()},function(q){r(q),O()},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)),O(),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),O(),m=null},m.ontimeout=function(){let S=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const x=s.transitional||ze;s.timeoutErrorMessage&&(S=s.timeoutErrorMessage),r(new h(S,x.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,e,m)),O(),m=null},o===void 0&&a.setContentType(null),"setRequestHeader"in m&&i.forEach(Ct(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,g]=ge(f,!0),m.addEventListener("progress",w)),l&&m.upload&&([p,b]=ge(l),m.upload.addEventListener("progress",p),m.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=E=>{m&&(r(!E||E.type?new de(null,e,m):E),m.abort(),O(),m=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const y=wr(s.url);if(y&&!C.protocols.includes(y)){r(new h("Unsupported protocol "+y+":",h.ERR_BAD_REQUEST,e)),O();return}m.send(o||null)})},Lr=(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 de(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},Fr=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},Br=async function*(e,t){for await(const n of Ir(e))yield*Fr(n,t)},Ir=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()}},ut=(e,t,n,r)=>{const s=Br(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})},Oe=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,kr=(e,t,n)=>t+2<n&&Oe(e.charCodeAt(t+1))&&Oe(e.charCodeAt(t+2));function jr(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 g=r.charCodeAt(b+1),O=r.charCodeAt(b+2);Oe(g)&&Oe(O)&&(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&&kr(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 ve="1.18.1",ft=64*1024,{isFunction:ye}=i,qr=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),dt=e=>{if(!i.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},pt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hr=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Mr=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?ye(s):typeof fetch=="function",l=ye(o),f=ye(a);if(!c)return!1;const u=c&&ye(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&&pt(()=>{let d=!1;const y=new o(C.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&&pt(()=>i.isReadableStream(new a("").body)),g={stream:b&&(d=>d.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!g[d]&&(g[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 O=async d=>{if(d==null)return 0;if(i.isBlob(d))return d.size;if(i.isSpecCompliantForm(d))return(await new o(C.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??O(y)};return async d=>{let{url:y,method:E,data:S,signal:x,cancelToken:A,timeout:q,onDownloadProgress:Pe,onUploadProgress:Ce,responseType:H,headers:M,withCredentials:pe="same-origin",fetchOptions:We,maxContentLength:I,maxBodyLength:he}=qt(d);const re=i.isNumber(I)&&I>-1,xe=i.isNumber(he)&&he>-1,Vt=_=>i.hasOwnProp(d,_)?d[_]:void 0;let Ke=s||fetch;H=H?(H+"").toLowerCase():"text";let z=Lr([x,A&&A.toAbortSignal()],q),P=null;const v=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let G,se=null;const Xe=()=>new h("Request body larger than maxBodyLength limit",h.ERR_BAD_REQUEST,d,P);try{let _;const F=Vt("auth");if(F){const R=i.getSafeProp(F,"username")||"",L=i.getSafeProp(F,"password")||"";_={username:R,password:L}}if(Hr(y)){const R=new URL(y,C.origin);if(!_&&(R.username||R.password)){const L=dt(R.username),$=dt(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(qr((_.username||"")+":"+(_.password||""))))),re&&typeof y=="string"&&y.startsWith("data:")&&jr(y)>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,P);if(xe&&E!=="get"&&E!=="head"){const R=await O(S);if(typeof R=="number"&&isFinite(R)&&(G=R,R>he))throw Xe()}const me=xe&&(i.isReadableStream(S)||i.isStream(S)),Ge=(R,L,$)=>ut(R,ft,V=>{if(xe&&V>he)throw se=Xe();L&&L(V)},$);if(w&&E!=="get"&&E!=="head"&&(Ce||me)){if(G=G??await m(M,S),G!==0||me){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]=Ce&&it(G,ge(at(Ce)))||[];S=Ge(R.body,$,V)}}}else if(me&&!l&&u&&E!=="get"&&E!=="head")S=Ge(S);else if(me&&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,P);i.isString(pe)||(pe=pe?"include":"omit");const Jt=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/"+ve,!1);const Qe={...We,signal:z,method:E.toUpperCase(),headers:Ct(M.normalize()),body:S,duplex:"half",credentials:Jt?pe:void 0};P=l&&new o(y,Qe);let k=await(l?Ke(P,We):Ke(y,Qe));const Ye=D.from(k.headers);if(re){const R=i.toFiniteNumber(Ye.getContentLength());if(R!=null&&R>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,P)}const Ne=b&&(H==="stream"||H==="response");if(b&&k.body&&(Pe||re||Ne&&v)){const R={};["status","statusText","headers"].forEach(oe=>{R[oe]=k[oe]});const L=i.toFiniteNumber(Ye.getContentLength()),[$,V]=Pe&&it(L,ge(at(Pe),!0))||[];let Ze=0;const Wt=oe=>{if(re&&(Ze=oe,Ze>I))throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,P);$&&$(oe)};k=new a(ut(k.body,ft,Wt,()=>{V&&V(),v&&v()}),R)}H=H||"text";let j=await g[i.findKey(g,H)||"text"](k,d);if(re&&!b&&!Ne){let R;if(j!=null&&(typeof j.byteLength=="number"?R=j.byteLength:typeof j.size=="number"?R=j.size:typeof j=="string"&&(R=typeof r=="function"?new r().encode(j).byteLength:j.length)),typeof R=="number"&&R>I)throw new h("maxContentLength size of "+I+" exceeded",h.ERR_BAD_RESPONSE,d,P)}return!Ne&&v&&v(),await new Promise((R,L)=>{kt(R,L,{data:j,headers:D.from(k.headers),status:k.status,statusText:k.statusText,config:d,request:P})})}catch(_){if(v&&v(),z&&z.aborted&&z.reason instanceof h){const F=z.reason;throw F.config=d,P&&(F.request=P),_!==F&&Object.defineProperty(F,"cause",{__proto__:null,value:_,writable:!0,enumerable:!1,configurable:!0}),F}if(se)throw P&&!se.request&&(se.request=P),se;if(_ instanceof h)throw P&&!_.request&&(_.request=P),_;if(_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)){const F=new h("Network Error",h.ERR_NETWORK,d,P,_&&_.response);throw Object.defineProperty(F,"cause",{__proto__:null,value:_.cause||_,writable:!0,enumerable:!1,configurable:!0}),F}throw h.from(_,_&&_.code,d,P,_&&_.response)}}},zr=new Map,Ht=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=zr;for(;c--;)l=o[c],f=u.get(l),f===void 0&&u.set(l,f=c?new Map:Mr(t)),u=f;return f};Ht();const Ve={http:tr,xhr:Ur,fetch:{get:Ht}};i.forEach(Ve,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const ht=e=>`- ${e}`,$r=e=>i.isFunction(e)||e===null||e===!1;function vr(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,!$r(r)&&(s=Ve[(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 :
|
||
`+a.map(ht).join(`
|
||
`):" "+ht(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 Mt={getAdapter:vr,adapters:Ve};function Fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new de(null,e)}function mt(e){return Fe(e),e.headers=D.from(e.headers),e.data=Le.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Mt.getAdapter(e.adapter||fe.adapter,e)(e).then(function(r){Fe(e),e.response=r;try{r.data=Le.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=D.from(r.headers),r},function(r){if(!It(r)&&(Fe(e),r&&r.response)){e.response=r.response;try{r.response.data=Le.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=D.from(r.response.headers)}return Promise.reject(r)})}const Te={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Te[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yt={};Te.transitional=function(t,n,r){function s(o,a){return"[Axios v"+ve+"] 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&&!yt[a]&&(yt[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}};Te.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Vr(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 Ee={assertOptions:Vr,validators:Te},N=Ee.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new st,response:new st}}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(`
|
||
`);return a===-1?"":s.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
|
||
`),c=a===-1?-1:o.indexOf(`
|
||
`,a+1),l=c===-1?"":o.slice(c+1);String(r.stack).endsWith(l)||(r.stack+=`
|
||
`+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&&Ee.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}:Ee.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),Ee.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"],g=>{delete o[g]}),n.headers=D.concat(a,o);const c=[];let l=!0;this.interceptors.request.forEach(function(O){if(typeof O.runWhen=="function"&&O.runWhen(n)===!1)return;l=l&&O.synchronous;const m=n.transitional||ze;m&&m.legacyInterceptorReqResOrdering?c.unshift(O.fulfilled,O.rejected):c.push(O.fulfilled,O.rejected)});const f=[];this.interceptors.response.forEach(function(O){f.push(O.fulfilled,O.rejected)});let u,p=0,w;if(!l){const g=[mt.bind(this),void 0];for(g.unshift(...c),g.push(...f),w=g.length,u=Promise.resolve(n);p<w;)u=u.then(g[p++],g[p++]);return u}w=c.length;let b=n;for(;p<w;){const g=c[p++],O=c[p++];try{b=g(b)}catch(m){O.call(this,m);break}}try{u=mt.call(this,b)}catch(g){return Promise.reject(g)}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=jt(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Lt(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 zt{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 de(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 zt(function(s){t=s}),cancel:t}}};function Wr(e){return function(n){return e.apply(null,n)}}function Kr(e){return i.isObject(e)&&e.isAxiosError===!0}const je={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(je).forEach(([e,t])=>{je[t]=e});function $t(e){const t=new W(e),n=Et(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 $t(X(e,s))},n}const T=$t(fe);T.Axios=W;T.CanceledError=de;T.CancelToken=Jr;T.isCancel=It;T.VERSION=ve;T.toFormData=Ae;T.AxiosError=h;T.Cancel=T.CanceledError;T.all=function(t){return Promise.all(t)};T.spread=Wr;T.isAxiosError=Kr;T.mergeConfig=X;T.AxiosHeaders=D;T.formToJSON=e=>Bt(i.isHTMLForm(e)?new FormData(e):e);T.getAdapter=Mt.getAdapter;T.HttpStatusCode=je;T.default=T;const{Axios:ts,AxiosError:ns,CanceledError:rs,isCancel:ss,CancelToken:os,VERSION:is,all:as,Cancel:cs,isAxiosError:ls,spread:us,toFormData:fs,AxiosHeaders:ds,HttpStatusCode:ps,formToJSON:hs,getAdapter:ms,mergeConfig:ys,create:ws}=T,Se=(e,t,n)=>{try{n!==void 0||Kt[e](t)}catch(r){console.error("[ElMessage] 消息提示失败(已降级为 console):",t,r)}},vt=T.create({baseURL:"/api",timeout:2e4,headers:{"Content-Type":"application/json"}}),Je="agent_token",Xr="oauth_redirect_count",wt=3;let Y=null,ae=null;async function Gr(){if(ae)return ae;const e=localStorage.getItem(Je);return e?(console.log("[API] 尝试静默刷新 Token..."),ae=(async()=>{try{const t=await T.post("/api/auth/refresh",null,{params:{token:e},timeout:5e3});return t.data.code===0?(console.log("[API] Token 静默刷新成功"),!0):(console.warn("[API] Token 刷新失败:",t.data.message),!1)}catch(t){return console.warn("[API] Token 刷新异常:",t),!1}finally{ae=null}})(),ae):!1}async function bt(e){const t=e==="http401"?"HTTP 401":"业务码 1002";return Y?(console.warn(`[API] ${t} 未授权 — 已有处理进行中,等待完成`),Y):(console.warn(`[API] ${t} 未授权,尝试刷新 Token...`),Y=(async()=>{try{if(await Gr()){console.log("[API] Token 刷新成功,不需要跳转"),Y=null;return}console.warn("[API] Token 刷新失败,清除凭证并跳转登录"),localStorage.removeItem(Je),Se("warning","登录已过期,请重新登录");const r=parseInt(localStorage.getItem(Xr)||"0",10);if(r>=wt){console.error("[API] 登录重定向次数超限,疑似无限循环,停止重定向"),Se("error","登录状态异常,请刷新页面重试");return}console.warn(`[API] 登录重定向计数: ${r}/${wt}`),Xt(()=>import("./index-CnIbBo4X.js").then(s=>s.a7),__vite__mapDeps([0,1])).then(s=>{s.default.push("/login")})}catch(n){console.warn("[API] 401 处理失败:",n)}finally{Y=null}})(),Y)}vt.interceptors.request.use(e=>{const t=localStorage.getItem(Je);return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));vt.interceptors.response.use(e=>{const t=e.data;return t.code!==0?(Se("error",t.message||"请求失败"),t.code===1002&&bt("biz1002"),Promise.reject({code:t.code,message:t.message||"请求失败"})):t.data},async e=>{var r;let t="网络异常,请稍后重试",n=-1;if(e.response)switch(n=e.response.status,e.response.status){case 401:await bt("http401");break;case 403:t="拒绝访问";break;case 404:t="请求的资源不存在";break;case 422:t=((r=e.response.data)==null?void 0:r.detail)||"请求验证失败";break;case 500:t="服务器内部错误";break;default:t=`请求失败 (${e.response.status})`}else e.code==="ECONNABORTED"&&(t="请求超时,请稍后重试");return n!==401&&Se("error",t),Promise.reject({code:n,message:t})});export{vt as a};
|