11 lines
42 KiB
JavaScript
11 lines
42 KiB
JavaScript
function Ke(e,t){return function(){return e.apply(t,arguments)}}const{toString:wt}=Object.prototype,{getPrototypeOf:ie}=Object,{iterator:ae,toStringTag:Xe}=Symbol,ce=(e=>t=>{const n=wt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>ce(t)===e),ue=e=>t=>typeof t===e,{isArray:z}=Array,$=ue("undefined");function W(e){return e!==null&&!$(e)&&e.constructor!==null&&!$(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ge=F("ArrayBuffer");function gt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ge(e.buffer),t}const bt=ue("string"),x=ue("function"),Qe=ue("number"),K=e=>e!==null&&typeof e=="object",Et=e=>e===!0||e===!1,ne=e=>{if(ce(e)!=="object")return!1;const t=ie(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Xe in e)&&!(ae in e)},Rt=e=>{if(!K(e)||W(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},St=F("Date"),Ot=F("File"),Tt=e=>!!(e&&typeof e.uri<"u"),At=e=>e&&typeof e.getParts<"u",Ct=F("Blob"),xt=F("FileList"),_t=e=>K(e)&&x(e.pipe);function Pt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const De=Pt(),Fe=typeof De.FormData<"u"?De.FormData:void 0,Nt=e=>{if(!e)return!1;if(Fe&&e instanceof Fe)return!0;const t=ie(e);if(!t||t===Object.prototype||!x(e.append))return!1;const n=ce(e);return n==="formdata"||n==="object"&&x(e.toString)&&e.toString()==="[object FormData]"},Dt=F("URLSearchParams"),[Ft,Ut,Lt,Bt]=["ReadableStream","Request","Response","Headers"].map(F),jt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function X(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),z(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(W(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Ze(e,t){if(W(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 k=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ye=e=>!$(e)&&e!==k;function we(){const{caseless:e,skipUndefined:t}=Ye(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&Ze(n,o)||o;ne(n[i])&&ne(s)?n[i]=we(n[i],s):ne(s)?n[i]=we({},s):z(s)?n[i]=s.slice():(!t||!$(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&X(arguments[s],r);return n}const kt=(e,t,n,{allOwnKeys:r}={})=>(X(t,(s,o)=>{n&&x(s)?Object.defineProperty(e,o,{value:Ke(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),It=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ht=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mt=(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},$t=e=>{if(!e)return null;if(z(e))return e;let t=e.length;if(!Qe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},zt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ie(Uint8Array)),vt=(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])}},Jt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vt=F("HTMLFormElement"),Wt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ue=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kt=F("RegExp"),et=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};X(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Xt=e=>{et(e,(t,n)=>{if(x(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(x(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+"'")})}})},Gt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return z(e)?r(e):r(String(e).split(t)),n},Qt=()=>{},Zt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yt(e){return!!(e&&x(e.append)&&e[Xe]==="FormData"&&e[ae])}const en=e=>{const t=new Array(10),n=(r,s)=>{if(K(r)){if(t.indexOf(r)>=0)return;if(W(r))return r;if(!("toJSON"in r)){t[s]=r;const o=z(r)?[]:{};return X(r,(i,c)=>{const d=n(i,s+1);!$(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},tn=F("AsyncFunction"),nn=e=>e&&(K(e)||x(e))&&x(e.then)&&x(e.catch),tt=((e,t)=>e?setImmediate:t?((n,r)=>(k.addEventListener("message",({source:s,data:o})=>{s===k&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),k.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(k.postMessage)),rn=typeof queueMicrotask<"u"?queueMicrotask.bind(k):typeof process<"u"&&process.nextTick||tt,sn=e=>e!=null&&x(e[ae]),a={isArray:z,isArrayBuffer:Ge,isBuffer:W,isFormData:Nt,isArrayBufferView:gt,isString:bt,isNumber:Qe,isBoolean:Et,isObject:K,isPlainObject:ne,isEmptyObject:Rt,isReadableStream:Ft,isRequest:Ut,isResponse:Lt,isHeaders:Bt,isUndefined:$,isDate:St,isFile:Ot,isReactNativeBlob:Tt,isReactNative:At,isBlob:Ct,isRegExp:Kt,isFunction:x,isStream:_t,isURLSearchParams:Dt,isTypedArray:zt,isFileList:xt,forEach:X,merge:we,extend:kt,trim:jt,stripBOM:It,inherits:qt,toFlatObject:Ht,kindOf:ce,kindOfTest:F,endsWith:Mt,toArray:$t,forEachEntry:vt,matchAll:Jt,isHTMLForm:Vt,hasOwnProperty:Ue,hasOwnProp:Ue,reduceDescriptors:et,freezeMethods:Xt,toObjectSet:Gt,toCamelCase:Wt,noop:Qt,toFiniteNumber:Zt,findKey:Ze,global:k,isContextDefined:Ye,isSpecCompliantForm:Yt,toJSONObject:en,isAsyncFn:tn,isThenable:nn,setImmediate:tt,asap:rn,isIterable:sn};let y=class nt extends Error{static from(t,n,r,s,o,i){const c=new nt(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{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(){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:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const on=null;function ge(e){return a.isPlainObject(e)||a.isArray(e)}function rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function pe(e,t,n){return e?e.concat(t).map(function(s,o){return s=rt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function an(e){return a.isArray(e)&&!e.some(ge)}const cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function le(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,E){return!a.isUndefined(E[f])});const r=n.metaTokens,s=n.visitor||m,o=n.dots,i=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,l=c&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(a.isBoolean(p))return p.toString();if(!l&&a.isBlob(p))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function m(p,f,E){let U=p;if(a.isReactNative(t)&&a.isReactNativeBlob(p))return t.append(pe(E,f,o),u(p)),!1;if(p&&!E&&typeof p=="object"){if(a.endsWith(f,"{}"))f=r?f:f.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&an(p)||(a.isFileList(p)||a.endsWith(f,"[]"))&&(U=a.toArray(p)))return f=rt(f),U.forEach(function(R,A){!(a.isUndefined(R)||R===null)&&t.append(i===!0?pe([f],A,o):i===null?f:f+"[]",u(R))}),!1}return ge(p)?!0:(t.append(pe(E,f,o),u(p)),!1)}const w=[],b=Object.assign(cn,{defaultVisitor:m,convertValue:u,isVisitable:ge});function h(p,f,E=0){if(!a.isUndefined(p)){if(E>d)throw new y("Object is too deeply nested ("+E+" levels). Max depth: "+d,y.ERR_FORM_DATA_DEPTH_EXCEEDED);if(w.indexOf(p)!==-1)throw Error("Circular reference detected in "+f.join("."));w.push(p),a.forEach(p,function(O,R){(!(a.isUndefined(O)||O===null)&&s.call(t,O,a.isString(R)?R.trim():R,f,b))===!0&&h(O,f?f.concat(R):[R],E+1)}),w.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Le(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Re(e,t){this._pairs=[],e&&le(e,this,t)}const st=Re.prototype;st.append=function(t,n){this._pairs.push([t,n])};st.toString=function(t){const n=t?function(r){return t.call(this,r,Le)}:Le;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(e,t,n){if(!t)return e;const r=n&&n.encode||un,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new Re(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Be{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){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ln=typeof URLSearchParams<"u"?URLSearchParams:Re,fn=typeof FormData<"u"?FormData:null,dn=typeof Blob<"u"?Blob:null,pn={isBrowser:!0,classes:{URLSearchParams:ln,FormData:fn,Blob:dn},protocols:["http","https","file","blob","url","data"]},Oe=typeof window<"u"&&typeof document<"u",be=typeof navigator=="object"&&navigator||void 0,hn=Oe&&(!be||["ReactNative","NativeScript","NS"].indexOf(be.product)<0),mn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yn=Oe&&window.location.href||"http://localhost",wn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserEnv:hn,hasStandardBrowserWebWorkerEnv:mn,navigator:be,origin:yn},Symbol.toStringTag,{value:"Module"})),T={...wn,...pn};function gn(e,t){return le(e,new T.classes.URLSearchParams,{visitor:function(n,r,s,o){return T.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function bn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function En(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 it(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const c=Number.isFinite(+i),d=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=En(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(bn(r),s,n,0)}),n}return null}const M=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function Rn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const G={transitional:Se,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(it(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const d=M(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gn(t,d).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=M(this,"env"),u=l&&l.FormData;return le(c?{"files[]":t}:t,u&&new u,d)}}return o||s?(n.setContentType("application/json",!1),Rn(t)):t}],transformResponse:[function(t){const n=M(this,"transitional")||G.transitional,r=n&&n.forcedJSONParsing,s=M(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,M(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?y.from(d,y.ERR_BAD_RESPONSE,this,null,M(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{G.headers[e]={}});const Sn=a.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"]),On=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Sn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},je=Symbol("internals"),Tn=/[^\x09\x20-\x7E\x80-\xFF]/g;function An(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)}function V(e){return e&&String(e).trim().toLowerCase()}function Cn(e){return An(e.replace(Tn,""))}function re(e){return e===!1||e==null?e:a.isArray(e)?e.map(re):Cn(String(e))}function xn(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 _n=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function he(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Pn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let _=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,l){const u=V(d);if(!u)throw new Error("header name must be a non-empty string");const m=a.findKey(s,u);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||d]=re(c))}const i=(c,d)=>a.forEach(c,(l,u)=>o(l,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!_n(t))i(On(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(d=c[l])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=V(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return xn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=V(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||he(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=V(i),i){const c=a.findKey(r,i);c&&(!n||he(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.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||he(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=re(s),delete n[o];return}const c=t?Pn(o):String(o).trim();c!==o&&delete n[o],n[c]=re(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.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[je]=this[je]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=V(i);r[c]||(Nn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(_.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(_);function me(e,t){const n=this||G,r=t||n,s=_.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function at(e){return!!(e&&e.__CANCEL__)}let Q=class extends y{constructor(t,n,r){super(t??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Fn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const l=Date.now(),u=r[o];i||(i=l),n[s]=d,r[s]=l;let m=o,w=0;for(;m!==s;)w+=n[m++],m=m%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const b=u&&l-u;return b?Math.round(w*1e3/b):void 0}}function Un(e,t){let n=0,r=1e3/t,s,o;const i=(l,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const u=Date.now(),m=u-n;m>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const oe=(e,t,n=3)=>{let r=0;const s=Fn(50,250);return Un(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=c!=null?Math.min(i,c):i,l=Math.max(0,d-r),u=s(l);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c?(c-d)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},ke=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ie=e=>(...t)=>a.asap(()=>e(...t)),Ln=T.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,T.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Bn=T.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function jn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ut(e,t,n){let r=!jn(t);return e&&(r||n===!1)?kn(e,t):t}const qe=e=>e instanceof _?{...e}:e;function q(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(l,u,m,w){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:w},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,m,w){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,m,w)}else return r(l,u,m,w)}function o(l,u){if(!a.isUndefined(u))return r(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,m){if(a.hasOwnProp(t,m))return r(l,u);if(a.hasOwnProp(e,m))return r(void 0,l)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(l,u,m)=>s(qe(l),qe(u),m,!0)};return a.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const m=a.hasOwnProp(d,u)?d[u]:s,w=a.hasOwnProp(e,u)?e[u]:void 0,b=a.hasOwnProp(t,u)?t[u]:void 0,h=m(w,b,u);a.isUndefined(h)&&m!==c||(n[u]=h)}),n}const lt=e=>{const t=q({},e),n=w=>a.hasOwnProp(t,w)?t[w]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const d=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=_.from(c),t.url=ot(ut(l,m,u),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),a.isFormData(r)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(a.isFunction(r.getHeaders)){const w=r.getHeaders(),b=["content-type","content-length"];Object.entries(w).forEach(([h,p])=>{b.includes(h.toLowerCase())&&c.set(h,p)})}}if(T.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&Ln(t.url))){const b=o&&i&&Bn.read(i);b&&c.set(o,b)}return t},In=typeof XMLHttpRequest<"u",qn=In&&function(e){return new Promise(function(n,r){const s=lt(e);let o=s.data;const i=_.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:l}=s,u,m,w,b,h;function p(){b&&b(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function E(){if(!f)return;const O=_.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:O,config:e,request:f};ct(function(P){n(P),p()},function(P){r(P),p()},A),f=null}"onloadend"in f?f.onloadend=E:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(E)},f.onabort=function(){f&&(r(new y("Request aborted",y.ECONNABORTED,e,f)),f=null)},f.onerror=function(R){const A=R&&R.message?R.message:"Network Error",B=new y(A,y.ERR_NETWORK,e,f);B.event=R||null,r(B),f=null},f.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const A=s.transitional||Se;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),r(new y(R,A.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,f)),f=null},o===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(R,A){f.setRequestHeader(A,R)}),a.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),c&&c!=="json"&&(f.responseType=s.responseType),l&&([w,h]=oe(l,!0),f.addEventListener("progress",w)),d&&f.upload&&([m,b]=oe(d),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=O=>{f&&(r(!O||O.type?new Q(null,e,f):O),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const U=Dn(s.url);if(U&&T.protocols.indexOf(U)===-1){r(new y("Unsupported protocol "+U+":",y.ERR_BAD_REQUEST,e));return}f.send(o||null)})},Hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof y?u:new Q(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new y(`timeout of ${t}ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Mn=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},$n=async function*(e,t){for await(const n of zn(e))yield*Mn(n,t)},zn=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()}},He=(e,t,n,r)=>{const s=$n(e,t);let o=0,i,c=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){c(),d.close();return}let m=u.byteLength;if(n){let w=o+=m;n(w)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Me=64*1024,{isFunction:te}=a,vn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:$e,TextEncoder:ze}=a.global,ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jn=e=>{e=a.merge.call({skipUndefined:!0},vn,e);const{fetch:t,Request:n,Response:r}=e,s=t?te(t):typeof fetch=="function",o=te(n),i=te(r);if(!s)return!1;const c=s&&te($e),d=s&&(typeof ze=="function"?(h=>p=>h.encode(p))(new ze):async h=>new Uint8Array(await new n(h).arrayBuffer())),l=o&&c&&ve(()=>{let h=!1;const p=new n(T.origin,{body:new $e,method:"POST",get duplex(){return h=!0,"half"}}),f=p.headers.has("Content-Type");return p.body!=null&&p.body.cancel(),h&&!f}),u=i&&c&&ve(()=>a.isReadableStream(new r("").body)),m={stream:u&&(h=>h.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!m[h]&&(m[h]=(p,f)=>{let E=p&&p[h];if(E)return E.call(p);throw new y(`Response type '${h}' is not supported`,y.ERR_NOT_SUPPORT,f)})});const w=async h=>{if(h==null)return 0;if(a.isBlob(h))return h.size;if(a.isSpecCompliantForm(h))return(await new n(T.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(a.isArrayBufferView(h)||a.isArrayBuffer(h))return h.byteLength;if(a.isURLSearchParams(h)&&(h=h+""),a.isString(h))return(await d(h)).byteLength},b=async(h,p)=>{const f=a.toFiniteNumber(h.getContentLength());return f??w(p)};return async h=>{let{url:p,method:f,data:E,signal:U,cancelToken:O,timeout:R,onDownloadProgress:A,onUploadProgress:B,responseType:P,headers:v,withCredentials:Z="same-origin",fetchOptions:Ae}=lt(h),Ce=t||fetch;P=P?(P+"").toLowerCase():"text";let Y=Hn([U,O&&O.toAbortSignal()],R),J=null;const j=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let xe;try{if(B&&l&&f!=="get"&&f!=="head"&&(xe=await b(v,E))!==0){let N=new n(p,{method:"POST",body:E,duplex:"half"}),H;if(a.isFormData(E)&&(H=N.headers.get("content-type"))&&v.setContentType(H),N.body){const[de,ee]=ke(xe,oe(Ie(B)));E=He(N.body,Me,de,ee)}}a.isString(Z)||(Z=Z?"include":"omit");const C=o&&"credentials"in n.prototype;if(a.isFormData(E)){const N=v.getContentType();N&&/^multipart\/form-data/i.test(N)&&!/boundary=/i.test(N)&&v.delete("content-type")}const _e={...Ae,signal:Y,method:f.toUpperCase(),headers:v.normalize().toJSON(),body:E,duplex:"half",credentials:C?Z:void 0};J=o&&new n(p,_e);let L=await(o?Ce(J,Ae):Ce(p,_e));const Pe=u&&(P==="stream"||P==="response");if(u&&(A||Pe&&j)){const N={};["status","statusText","headers"].forEach(Ne=>{N[Ne]=L[Ne]});const H=a.toFiniteNumber(L.headers.get("content-length")),[de,ee]=A&&ke(H,oe(Ie(A),!0))||[];L=new r(He(L.body,Me,de,()=>{ee&&ee(),j&&j()}),N)}P=P||"text";let yt=await m[a.findKey(m,P)||"text"](L,h);return!Pe&&j&&j(),await new Promise((N,H)=>{ct(N,H,{data:yt,headers:_.from(L.headers),status:L.status,statusText:L.statusText,config:h,request:J})})}catch(C){throw j&&j(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,h,J,C&&C.response),{cause:C.cause||C}):y.from(C,C&&C.code,h,J,C&&C.response)}}},Vn=new Map,ft=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,d,l,u=Vn;for(;c--;)d=o[c],l=u.get(d),l===void 0&&u.set(d,l=c?new Map:Jn(t)),u=l;return l};ft();const Te={http:on,xhr:qn,fetch:{get:ft}};a.forEach(Te,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Je=e=>`- ${e}`,Wn=e=>a.isFunction(e)||e===null||e===!1;function Kn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let c;if(s=r,!Wn(r)&&(s=Te[(c=String(r)).toLowerCase()],s===void 0))throw new y(`Unknown adapter '${c}'`);if(s&&(a.isFunction(s)||(s=s.get(t))))break;o[c||"#"+i]=s}if(!s){const i=Object.entries(o).map(([d,l])=>`adapter ${d} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since :
|
|
`+i.map(Je).join(`
|
|
`):" "+Je(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const dt={getAdapter:Kn,adapters:Te};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Q(null,e)}function Ve(e){return ye(e),e.headers=_.from(e.headers),e.data=me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dt.getAdapter(e.adapter||G.adapter,e)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=_.from(r.headers),r},function(r){return at(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=_.from(r.response.headers))),Promise.reject(r)})}const pt="1.15.2",fe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const We={};fe.transitional=function(t,n,r){function s(o,i){return"[Axios v"+pt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!We[i]&&(We[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};fe.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new y("option "+o+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const se={assertOptions:Xn,validators:fe},D=se.validators;let I=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Be,response:new Be}}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 i=s.stack.indexOf(`
|
|
`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(`
|
|
`),c=i===-1?-1:o.indexOf(`
|
|
`,i+1),d=c===-1?"":o.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&se.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean),legacyInterceptorReqResOrdering:D.transitional(D.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:se.assertOptions(s,{encode:D.function,serialize:D.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),se.assertOptions(n,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=_.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;d=d&&p.synchronous;const f=n.transitional||Se;f&&f.legacyInterceptorReqResOrdering?c.unshift(p.fulfilled,p.rejected):c.push(p.fulfilled,p.rejected)});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,m=0,w;if(!d){const h=[Ve.bind(this),void 0];for(h.unshift(...c),h.push(...l),w=h.length,u=Promise.resolve(n);m<w;)u=u.then(h[m++],h[m++]);return u}w=c.length;let b=n;for(;m<w;){const h=c[m++],p=c[m++];try{b=h(b)}catch(f){p.call(this,f);break}}try{u=Ve.call(this,b)}catch(h){return Promise.reject(h)}for(m=0,w=l.length;m<w;)u=u.then(l[m++],l[m++]);return u}getUri(t){t=q(this.defaults,t);const n=ut(t.baseURL,t.url,t.allowAbsoluteUrls);return ot(n,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){I.prototype[t]=function(n,r){return this.request(q(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(q(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}I.prototype[t]=n(),I.prototype[t+"Form"]=n(!0)});let Gn=class ht{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 i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Q(o,i,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 ht(function(s){t=s}),cancel:t}}};function Qn(e){return function(n){return e.apply(null,n)}}function Zn(e){return a.isObject(e)&&e.isAxiosError===!0}const Ee={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(Ee).forEach(([e,t])=>{Ee[t]=e});function mt(e){const t=new I(e),n=Ke(I.prototype.request,t);return a.extend(n,I.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return mt(q(e,s))},n}const S=mt(G);S.Axios=I;S.CanceledError=Q;S.CancelToken=Gn;S.isCancel=at;S.VERSION=pt;S.toFormData=le;S.AxiosError=y;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=Qn;S.isAxiosError=Zn;S.mergeConfig=q;S.AxiosHeaders=_;S.formToJSON=e=>it(a.isHTMLForm(e)?new FormData(e):e);S.getAdapter=dt.getAdapter;S.HttpStatusCode=Ee;S.default=S;const{Axios:nr,AxiosError:rr,CanceledError:sr,isCancel:or,CancelToken:ir,VERSION:ar,all:cr,Cancel:ur,isAxiosError:lr,spread:fr,toFormData:dr,AxiosHeaders:pr,HttpStatusCode:hr,formToJSON:mr,getAdapter:yr,mergeConfig:wr}=S,g=S.create({baseURL:"/api",timeout:3e4});g.interceptors.request.use(e=>{const t=localStorage.getItem("admin_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});g.interceptors.response.use(e=>e,e=>{var t,n,r;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("admin_token"),!window.location.pathname.startsWith("/admin/login")&&!((r=(n=e.config)==null?void 0:n.url)!=null&&r.includes("/admin/login"))&&(window.location.href="/admin/login")),Promise.reject(e)});async function gr(e,t=1){const{data:n}=await g.post("/query",{q:e,page:t});return n}async function br(e,t){var s,o,i;const n=localStorage.getItem("admin_token"),r={"Content-Type":"application/json"};n&&(r.Authorization=`Bearer ${n}`);try{const c=await fetch("/api/query",{method:"POST",headers:r,body:JSON.stringify({q:e})});if(!c.ok)throw new Error(`HTTP ${c.status}`);const d=c.body.getReader(),l=new TextDecoder;let u="";for(;;){const{done:m,value:w}=await d.read();if(m)break;u+=l.decode(w,{stream:!0});const b=u.split(`
|
|
`);u=b.pop()||"";for(const h of b)if(h.trim())try{const p=JSON.parse(h);switch(p.type){case"searching":(s=t.onSearching)==null||s.call(t);break;case"saved":(o=t.onSaved)==null||o.call(t,p);break;case"stats":t.onStats(p);break;case"result":t.onResult(p.id,p.valid,p.message);break;case"complete":t.onComplete(p);break}}catch{}}}catch(c){(i=t.onError)==null||i.call(t,c)}}async function Er(e){const{data:t}=await g.post("/save",e);return t}async function Rr(e){const{data:t}=await g.post("/video/save-to-cloud",e);return t}async function Sr(){const{data:e}=await g.get("/rankings/categorized");return e}async function Or(e,t){const{data:n}=await g.post("/admin/login",{username:e,password:t});return n}async function Tr(){const{data:e}=await g.get("/me");return e}async function Ar(){const{data:e}=await g.get("/admin/cloud-configs");return e}async function Cr(e){const{data:t}=await g.post("/admin/cloud-configs",e);return t}async function xr(e){const{data:t}=await g.put(`/admin/cloud-configs/${e.id}`,e);return t}async function _r(e,t,n){const{data:r}=await g.post(`/admin/cloud-configs/${e}/test`,{cookie:t,id:n});return r}async function Pr(e){await g.delete(`/admin/cloud-configs/${e}`)}async function Nr(e,t){const{data:n}=await g.put(`/admin/cloud-configs/${e}/primary`,{primary:t});return n}async function Dr(e){const t={};e&&(t.days=e);const{data:n}=await g.get("/admin/stats",{params:t});return n}async function Fr(e=1,t=20,n,r,s,o,i){const c={page:e,pageSize:t};n&&(c.startDate=n),r&&(c.endDate=r),s&&(c.status=s),o&&(c.sourceType=o),i&&(c.keyword=i);const{data:d}=await g.get("/admin/save-records",{params:c});return d}async function Ur(){const{data:e}=await g.get("/admin/notify/providers");return e}async function Lr(e,t,n){const{data:r}=await g.post("/admin/notify/test",{channelType:e,configId:t,params:n});return r}async function Br(){const{data:e}=await g.get("/admin/system-configs");return e}async function jr(e){await g.put("/admin/system-configs",{entries:e})}async function kr(){const{data:e}=await g.get("/admin/cloud-types");return e}async function Ir(e,t){await g.put("/admin/cloud-types",{type:e,enabled:t})}async function qr(e,t){const{data:n}=await g.post("/admin/change-password",{oldPassword:e,newPassword:t});return n}async function Hr(e,t){await g.put("/admin/system-configs",{entries:[{key:e,value:t}]})}async function Mr(e){const t=new FormData;t.append("image",e);const{data:n}=await g.post("/admin/upload-logo",t,{headers:{"Content-Type":"multipart/form-data"}});return n}async function $r(){const{data:e}=await g.get("/site-config");return e}async function zr(e){const{data:t}=await g.post("/admin/test-redis",{url:e});return t}async function vr(e){const{data:t}=await g.post("/admin/test-external-service",e);return t}async function Jr(){const{data:e}=await g.get("/admin/db-status");return e}async function Vr(){const{data:e}=await g.post("/admin/cleanup/run");return e}async function Wr(){const{data:e}=await g.post("/admin/cleanup/empty-trash");return e}export{qr as A,Mr as B,Hr as C,Lr as D,$r as a,Tr as b,kr as c,Or as d,Er as e,Rr as f,Sr as g,Ar as h,Dr as i,Fr as j,Br as k,_r as l,Nr as m,Cr as n,Pr as o,jr as p,gr as q,Vr as r,br as s,Ir as t,xr as u,Wr as v,Jr as w,Ur as x,zr as y,vr as z};
|