@vtj/utils 0.13.34 → 0.13.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.iife.js +16 -16
- package/dist/index.mjs +935 -880
- package/dist/index.umd.js +16 -16
- package/package.json +4 -4
- package/types/request.d.ts +2 -1
- package/types/version.d.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var It=Object.defineProperty;var qt=(t,e,n)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _=(t,e,n)=>qt(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@vtj/base"),me=require("vue");(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,r){typeof r!="boolean"&&(r=r||{},r.passive=!1),t.call(this,e,n,r)}})();/**!
|
|
2
2
|
* Copyright (c) 2025, VTJ.PRO All rights reserved.
|
|
3
3
|
* @name @vtj/utils
|
|
4
4
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
5
|
-
* @version 0.13.
|
|
5
|
+
* @version 0.13.35
|
|
6
6
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
7
|
-
*/const At="0.13.34";function He(e,t){return function(){return e.apply(t,arguments)}}const{toString:xt}=Object.prototype,{getPrototypeOf:Ee}=Object,{iterator:ee,toStringTag:Je}=Symbol,te=(e=>t=>{const n=xt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>te(t)===e),ne=e=>t=>typeof t===e,{isArray:v}=Array,H=ne("undefined");function J(e){return e!==null&&!H(e)&&e.constructor!==null&&!H(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $e=P("ArrayBuffer");function Ct(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$e(e.buffer),t}const _t=ne("string"),x=ne("function"),ze=ne("number"),$=e=>e!==null&&typeof e=="object",Lt=e=>e===!0||e===!1,X=e=>{if(te(e)!=="object")return!1;const t=Ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Je in e)&&!(ee in e)},Pt=e=>{if(!$(e)||J(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jt=P("Date"),Ut=P("File"),kt=P("Blob"),Ft=P("FileList"),Nt=e=>$(e)&&x(e.pipe),Dt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=te(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},Bt=P("URLSearchParams"),[vt,qt,It,Mt]=["ReadableStream","Request","Response","Headers"].map(P),Ht=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function z(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),v(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(J(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function We(e,t){if(J(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const F=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ve=e=>!H(e)&&e!==F;function fe(){const{caseless:e}=Ve(this)&&this||{},t={},n=(r,o)=>{const s=e&&We(t,o)||o;X(t[s])&&X(r)?t[s]=fe(t[s],r):X(r)?t[s]=fe({},r):v(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&z(arguments[r],n);return t}const Jt=(e,t,n,{allOwnKeys:r}={})=>(z(t,(o,s)=>{n&&x(o)?e[s]=He(o,n):e[s]=o},{allOwnKeys:r}),e),$t=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Wt=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Vt=(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},Kt=e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!ze(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ee(Uint8Array)),Gt=(e,t)=>{const r=(e&&e[ee]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Qt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Yt=P("HTMLFormElement"),Zt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),en=P("RegExp"),Ke=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};z(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},tn=e=>{Ke(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+"'")})}})},nn=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return v(e)?r(e):r(String(e).split(t)),n},rn=()=>{},on=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function sn(e){return!!(e&&x(e.append)&&e[Je]==="FormData"&&e[ee])}const an=e=>{const t=new Array(10),n=(r,o)=>{if($(r)){if(t.indexOf(r)>=0)return;if(J(r))return r;if(!("toJSON"in r)){t[o]=r;const s=v(r)?[]:{};return z(r,(i,a)=>{const f=n(i,o+1);!H(f)&&(s[a]=f)}),t[o]=void 0,s}}return r};return n(e,0)},cn=P("AsyncFunction"),ln=e=>e&&($(e)||x(e))&&x(e.then)&&x(e.catch),Xe=((e,t)=>e?setImmediate:t?((n,r)=>(F.addEventListener("message",({source:o,data:s})=>{o===F&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),F.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(F.postMessage)),un=typeof queueMicrotask<"u"?queueMicrotask.bind(F):typeof process<"u"&&process.nextTick||Xe,fn=e=>e!=null&&x(e[ee]),c={isArray:v,isArrayBuffer:$e,isBuffer:J,isFormData:Dt,isArrayBufferView:Ct,isString:_t,isNumber:ze,isBoolean:Lt,isObject:$,isPlainObject:X,isEmptyObject:Pt,isReadableStream:vt,isRequest:qt,isResponse:It,isHeaders:Mt,isUndefined:H,isDate:jt,isFile:Ut,isBlob:kt,isRegExp:en,isFunction:x,isStream:Nt,isURLSearchParams:Bt,isTypedArray:Xt,isFileList:Ft,forEach:z,merge:fe,extend:Jt,trim:Ht,stripBOM:$t,inherits:zt,toFlatObject:Wt,kindOf:te,kindOfTest:P,endsWith:Vt,toArray:Kt,forEachEntry:Gt,matchAll:Qt,isHTMLForm:Yt,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:Ke,freezeMethods:tn,toObjectSet:nn,toCamelCase:Zt,noop:rn,toFiniteNumber:on,findKey:We,global:F,isContextDefined:Ve,isSpecCompliantForm:sn,toJSONObject:an,isAsyncFn:cn,isThenable:ln,setImmediate:Xe,asap:un,isIterable:fn};function g(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}c.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const Ge=g.prototype,Qe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Qe[e]={value:e}});Object.defineProperties(g,Qe);Object.defineProperty(Ge,"isAxiosError",{value:!0});g.from=(e,t,n,r,o,s)=>{const i=Object.create(Ge);return c.toFlatObject(e,i,function(f){return f!==Error.prototype},a=>a!=="isAxiosError"),g.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const dn=null;function de(e){return c.isPlainObject(e)||c.isArray(e)}function Ye(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Ce(e,t,n){return e?e.concat(t).map(function(o,s){return o=Ye(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function pn(e){return c.isArray(e)&&!e.some(de)}const hn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function re(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!c.isUndefined(h[m])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(c.isDate(p))return p.toISOString();if(c.isBoolean(p))return p.toString();if(!f&&c.isBlob(p))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(p)||c.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,h){let w=p;if(p&&!h&&typeof p=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),p=JSON.stringify(p);else if(c.isArray(p)&&pn(p)||(c.isFileList(p)||c.endsWith(m,"[]"))&&(w=c.toArray(p)))return m=Ye(m),w.forEach(function(E,L){!(c.isUndefined(E)||E===null)&&t.append(i===!0?Ce([m],L,s):i===null?m:m+"[]",l(E))}),!1}return de(p)?!0:(t.append(Ce(h,m,s),l(p)),!1)}const d=[],y=Object.assign(hn,{defaultVisitor:u,convertValue:l,isVisitable:de});function b(p,m){if(!c.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),c.forEach(p,function(w,R){(!(c.isUndefined(w)||w===null)&&o.call(t,w,c.isString(R)?R.trim():R,m,y))===!0&&b(w,m?m.concat(R):[R])}),d.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return b(e),t}function _e(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Re(e,t){this._pairs=[],e&&re(e,this,t)}const Ze=Re.prototype;Ze.append=function(t,n){this._pairs.push([t,n])};Ze.toString=function(t){const n=t?function(r){return t.call(this,r,_e)}:_e;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function et(e,t,n){if(!t)return e;const r=n&&n.encode||mn;c.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=c.isURLSearchParams(t)?t.toString():new Re(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Le{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){c.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gn=typeof URLSearchParams<"u"?URLSearchParams:Re,yn=typeof FormData<"u"?FormData:null,wn=typeof Blob<"u"?Blob:null,bn={isBrowser:!0,classes:{URLSearchParams:gn,FormData:yn,Blob:wn},protocols:["http","https","file","blob","url","data"]},Se=typeof window<"u"&&typeof document<"u",pe=typeof navigator=="object"&&navigator||void 0,En=Se&&(!pe||["ReactNative","NativeScript","NS"].indexOf(pe.product)<0),Rn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sn=Se&&window.location.href||"http://localhost",On=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Se,hasStandardBrowserEnv:En,hasStandardBrowserWebWorkerEnv:Rn,navigator:pe,origin:Sn},Symbol.toStringTag,{value:"Module"})),T={...On,...bn};function Tn(e,t){return re(e,new T.classes.URLSearchParams,{visitor:function(n,r,o,s){return T.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function An(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xn(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function nt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=s>=n.length;return i=!i&&c.isArray(o)?o.length:i,f?(c.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!c.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&c.isArray(o[i])&&(o[i]=xn(o[i])),!a)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(r,o)=>{t(An(r),o,n,0)}),n}return null}function Cn(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const W={transitional:tt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=c.isObject(t);if(s&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return o?JSON.stringify(nt(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tn(t,this.formSerializer).toString();if((a=c.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return re(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Cn(t)):t}],transformResponse:[function(t){const n=this.transitional||W.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData: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}}};c.forEach(["delete","get","head","post","put","patch"],e=>{W.headers[e]={}});const _n=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ln=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
8
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||
|
|
9
|
-
`)}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(o=>r.set(o)),r}static accessor(t){const r=(this[Pe]=this[Pe]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=I(i);r[a]||(kn(o,i),r[a]=!0)}return c.isArray(t)?t.forEach(s):s(t),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(C.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});c.freezeMethods(C);function ce(e,t){const n=this||W,r=t||n,o=C.from(r.headers);let s=r.data;return c.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function rt(e){return!!(e&&e.__CANCEL__)}function q(e,t,n){g.call(this,e??"canceled",g.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(q,g,{__CANCEL__:!0});function ot(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Nn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),u=r[s];i||(i=l),n[o]=f,r[o]=l;let d=s,y=0;for(;d!==o;)y+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const b=u&&l-u;return b?Math.round(y*1e3/b):void 0}}function Dn(e,t){let n=0,r=1e3/t,o,s;const i=(l,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?i(l,u):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-d)))},()=>o&&i(o)]}const Y=(e,t,n=3)=>{let r=0;const o=Nn(50,250);return Dn(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,f=i-r,l=o(f),u=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:l||void 0,estimated:l&&a&&u?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},je=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ue=e=>(...t)=>c.asap(()=>e(...t)),Bn=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,vn=T.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(r)&&i.push("path="+r),c.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function In(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function st(e,t,n){let r=!qn(t);return e&&(r||n==!1)?In(e,t):t}const ke=e=>e instanceof C?{...e}:e;function D(e,t){t=t||{};const n={};function r(l,u,d,y){return c.isPlainObject(l)&&c.isPlainObject(u)?c.merge.call({caseless:y},l,u):c.isPlainObject(u)?c.merge({},u):c.isArray(u)?u.slice():u}function o(l,u,d,y){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l,d,y)}else return r(l,u,d,y)}function s(l,u){if(!c.isUndefined(u))return r(void 0,u)}function i(l,u){if(c.isUndefined(u)){if(!c.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const f={url:s,method:s,data:s,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,responseEncoding:i,validateStatus:a,headers:(l,u,d)=>o(ke(l),ke(u),d,!0)};return c.forEach(Object.keys({...e,...t}),function(u){const d=f[u]||o,y=d(e[u],t[u],u);c.isUndefined(y)&&d!==a||(n[u]=y)}),n}const it=e=>{const t=D({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=C.from(i),t.url=et(st(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let f;if(c.isFormData(n)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[l,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if(T.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(t)),r||r!==!1&&Bn(t.url))){const l=o&&s&&vn.read(s);l&&i.set(o,l)}return t},Mn=typeof XMLHttpRequest<"u",Hn=Mn&&function(e){return new Promise(function(n,r){const o=it(e);let s=o.data;const i=C.from(o.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:l}=o,u,d,y,b,p;function m(){b&&b(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function w(){if(!h)return;const E=C.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:e,request:h};ot(function(k){n(k),m()},function(k){r(k),m()},A),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new g("Network Error",g.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let L=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||tt;o.timeoutErrorMessage&&(L=o.timeoutErrorMessage),r(new g(L,A.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},s===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(L,A){h.setRequestHeader(A,L)}),c.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),l&&([y,p]=Y(l,!0),h.addEventListener("progress",y)),f&&h.upload&&([d,b]=Y(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(u=E=>{h&&(r(!E||E.type?new q(null,e,h):E),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const R=Fn(o.url);if(R&&T.protocols.indexOf(R)===-1){r(new g("Unsupported protocol "+R+":",g.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Jn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof g?u:new q(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:f}=r;return f.unsubscribe=()=>c.asap(a),f}},$n=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},zn=async function*(e,t){for await(const n of Wn(e))yield*$n(n,t)},Wn=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()}},Fe=(e,t,n,r)=>{const o=zn(e,t);let s=0,i,a=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await o.next();if(l){a(),f.close();return}let d=u.byteLength;if(n){let y=s+=d;n(y)}f.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(f){return a(f),o.return()}},{highWaterMark:2})},oe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",at=oe&&typeof ReadableStream=="function",Vn=oe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ct=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Kn=at&&ct(()=>{let e=!1;const t=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ne=64*1024,he=at&&ct(()=>c.isReadableStream(new Response("").body)),Z={stream:he&&(e=>e.body)};oe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Z[t]&&(Z[t]=c.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,r)})})})(new Response);const Xn=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(T.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await Vn(e)).byteLength},Gn=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??Xn(t)},Qn=oe&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:f,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:y}=it(e);l=l?(l+"").toLowerCase():"text";let b=Jn([o,s&&s.toAbortSignal()],i),p;const m=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let h;try{if(f&&Kn&&n!=="get"&&n!=="head"&&(h=await Gn(u,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),U;if(c.isFormData(r)&&(U=A.headers.get("content-type"))&&u.setContentType(U),A.body){const[k,V]=je(h,Y(Ue(f)));r=Fe(A.body,Ne,k,V)}}c.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...y,signal:b,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let R=await fetch(p,y);const E=he&&(l==="stream"||l==="response");if(he&&(a||E&&m)){const A={};["status","statusText","headers"].forEach(Ae=>{A[Ae]=R[Ae]});const U=c.toFiniteNumber(R.headers.get("content-length")),[k,V]=a&&je(U,Y(Ue(a),!0))||[];R=new Response(Fe(R.body,Ne,k,()=>{V&&V(),m&&m()}),A)}l=l||"text";let L=await Z[c.findKey(Z,l)||"text"](R,e);return!E&&m&&m(),await new Promise((A,U)=>{ot(A,U,{data:L,headers:C.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:p})})}catch(w){throw m&&m(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,p),{cause:w.cause||w}):g.from(w,w&&w.code,e,p)}}),me={http:dn,xhr:Hn,fetch:Qn};c.forEach(me,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const De=e=>`- ${e}`,Yn=e=>c.isFunction(e)||e===null||e===!1,lt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let i;if(r=n,!Yn(n)&&(r=me[(i=String(n)).toLowerCase()],r===void 0))throw new g(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,f])=>`adapter ${a} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
10
|
-
`+
|
|
11
|
-
`):" "+
|
|
12
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Q.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:Q.assertOptions(o,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Q.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[n.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=C.concat(i,s);const a=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,d=0,y;if(!f){const p=[Be.bind(this),void 0];for(p.unshift(...a),p.push(...l),y=p.length,u=Promise.resolve(n);d<y;)u=u.then(p[d++],p[d++]);return u}y=a.length;let b=n;for(d=0;d<y;){const p=a[d++],m=a[d++];try{b=p(b)}catch(h){m.call(this,h);break}}try{u=Be.call(this,b)}catch(p){return Promise.reject(p)}for(d=0,y=l.length;d<y;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=D(this.defaults,t);const n=st(t.baseURL,t.url,t.allowAbsoluteUrls);return et(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){N.prototype[t]=function(n,r){return this.request(D(r||{},{method:t,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(D(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}N.prototype[t]=n(),N.prototype[t+"Form"]=n(!0)});let er=class ft{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new q(s,i,a),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 ft(function(o){t=o}),cancel:t}}};function tr(e){return function(n){return e.apply(null,n)}}function nr(e){return c.isObject(e)&&e.isAxiosError===!0}const ge={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};Object.entries(ge).forEach(([e,t])=>{ge[t]=e});function dt(e){const t=new N(e),n=He(N.prototype.request,t);return c.extend(n,N.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return dt(D(e,o))},n}const S=dt(W);S.Axios=N;S.CanceledError=q;S.CancelToken=er;S.isCancel=rt;S.VERSION=ut;S.toFormData=re;S.AxiosError=g;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=tr;S.isAxiosError=nr;S.mergeConfig=D;S.AxiosHeaders=C;S.formToJSON=e=>nt(c.isHTMLForm(e)?new FormData(e):e);S.getAdapter=lt.getAdapter;S.HttpStatusCode=ge;S.default=S;const{Axios:zr,AxiosError:Wr,CanceledError:Vr,isCancel:Kr,CancelToken:Xr,VERSION:Gr,all:Qr,Cancel:Yr,isAxiosError:Zr,spread:eo,toFormData:to,AxiosHeaders:no,HttpStatusCode:ro,formToJSON:oo,getAdapter:so,mergeConfig:io}=S,rr={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},or=["put","post","patch"],ye="Local-Request-Id",sr=100,ir=300;let pt=class{constructor(t={}){_(this,"axios");_(this,"settings");_(this,"records",{});_(this,"isLoading",!1);_(this,"stopSkipWarn");_(this,"showLoading");_(this,"showError");this.settings=Object.assign({type:"form"},t.settings||{});const n=O.omit(t,["settings","query"]);this.axios=S.create(O.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:120*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=O.debounce(this.openLoading.bind(this),sr),this.showError=O.throttle(this._showError.bind(this),ir,{leading:!0,trailing:!1})}setConfig(t={}){this.settings=O.merge(this.settings,t.settings||{});const n=O.omit(t,["settings","query"]);this.axios.defaults=O.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(t,n="请求已取消"){if(t){const r=this.records[t];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(t,n,r){const o=n.injectHeaders?typeof n.headers=="function"?n.headers(t,r,n):n.headers||{}:{},s={"Content-Type":rr[n.type||"form"],...r.headers,...o};return n.skipWarn&&(s[ye]=t),s}isJsonType(t){return Object.entries(t).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(t,n="data"){if(t instanceof FormData||t instanceof URLSearchParams)return t;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(t).forEach(([o,s])=>{r.append(o,s)}),r}createSendData(t,n,r,o,s={}){const{type:i,skipWarn:a}=t,{name:f="skipWarn"}=a||{};let{data:l,params:u={},method:d="get"}=n;const y=o?{[f]:!0}:{};return or.includes(d.toLowerCase())?(l=Object.assign(l||{},y),l=i!=="json"||!this.isJsonType(r)?this.toFormData(l,i):l,u={...s}):i==="form"?u={...l||{},...s,...y}:(l&&(i!=="json"||!this.isJsonType(r))&&(l=this.toFormData(l,i)),u={...s,...y}),{data:l,params:u}}createUrl(t){let{url:n,params:r}=t;if(n){let o=O.isUrl(n)?new URL(n).origin:"";const s=o?n.replace(o,""):n;try{const i=O.pathToRegexpCompile(s,{encode:encodeURIComponent});return o+i(r||{})}catch{console.warn("createUrl","pathToRegexpCompile error",n)}}return n}openLoading(t){const{loading:n,showLoading:r}=t;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(t){const{loading:n,hideLoading:r}=t;if(!n)return;this.isLoading=!1;const o=Object.keys(this.records);r&&o.length===0&&(this.isLoading=!1,r())}_showError(t,n){const{failMessage:r,showError:o}=t;if(r&&o){const s=n?.response?.data,i=s?.message||s?.msg||n?.message||n?.msg||"未知错误";o(i,n)}}validResponse(t,n){const{validSuccess:r,validate:o}=t;return r&&o?!!o(n):!0}isSkipWarnResponse(t){return!!t.promise}send(t={},n=!1){const r=O.merge({},this.settings,t.settings||{}),o=t.query||{},s=O.omit(t,["settings","query"]),i=O.uuid(!1),a=S.CancelToken.source();this.records[i]={settings:r,config:s,source:a};const f=this.createUrl(s),l=this.createHeaders(i,r,s),{data:u,params:d}=this.createSendData(r,s,l,n,o);return this.showLoading(r),new Promise((y,b)=>{this.axios({cancelToken:a.token,...s,url:f,headers:l,data:u,params:d}).then(p=>this.isSkipWarnResponse(p)?y(p.promise):this.validResponse(r,p)?y(r.originResponse?p:p.data?.data):(this.showError(r,p.data),b(p.data))).catch(p=>(this.showError(r,p),b(p))).finally(()=>{delete this.records[i],this.closeLoading(r)})})}useResponse(t,n){const{response:r}=this.axios.interceptors,o=r.use(t,n);return()=>r.eject(o)}useRequest(t,n){const{request:r}=this.axios.interceptors,o=r.use(t,n);return()=>r.eject(o)}setupSkipWarn(t){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!t.skipWarn)return;const{code:n,executor:r,callback:o,complete:s}=t.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const f=(i.config.headers||{})[ye],l=this.records[f];if(!l)return i;const{data:u}=i;if(!u||typeof u!="object")return i;if(u?.code===n){o&&o(i);const d=new Promise(r).then(()=>this.send({...l.config,settings:l.settings},!0));d.catch(y=>y).finally(()=>{s&&s()}),i.promise=d}return i})}};function ht(e={}){const t=new pt(e),n=t.send.bind(t),r=t.cancel.bind(t),o=t.setConfig.bind(t),s=t.useRequest.bind(t),i=t.useResponse.bind(t);return Object.assign(n,{...t,instance:t,send:n,cancel:r,setConfig:o,useRequest:s,useResponse:i})}const mt=ht({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function gt(e){const t=typeof e=="string"?{url:e}:e;return(n,r)=>mt.send(O.merge({},t,r||{},{data:n}))}function ar(e){const t={};for(const[n,r]of Object.entries(e))t[n]=gt(r);return t}function cr(e,t){const n=ie.ref(null),r=ie.ref(),o=ie.ref(!0);return e.then(s=>{n.value=t?t(s):s}).catch(s=>{r.value=s}).finally(()=>{o.value=!1}),{data:n,error:r,loading:o}}const B=typeof window<"u",lr=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=o=>{n(o)}});function ur(e){const t={};return e?(e.forEach((n,r)=>{t[r]=typeof n=="string"?decodeURIComponent(n):n}),t):{}}function fr(e){const t=e.split(","),n=t[0].match(/:(.*?);/)?.[1],r=atob(t[1]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function dr(e,t){const n=e;return n.lastModified=Date.now(),n.lastModifiedDate=new Date,n.name=t,n}const pr=e=>B?window.requestAnimationFrame(e):setTimeout(e,16),hr=e=>B?window.cancelAnimationFrame(e):clearTimeout(e);class yt{constructor(t={}){_(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"});_(this,"caches",{});_(this,"types");this.types={local:B?window.localStorage:this.caches,session:B?window.sessionStorage:this.caches,cache:this.caches},this.config(t)}config(t={}){this.options=Object.assign(this.options,t)}save(t,n,r={}){const{type:o,expired:s,prefix:i}={...this.options,...r},a=Date.now(),f=i+t,l=this.types[o]||this.caches,u={value:n,timestamp:a,expired:s};l===this.caches?l[f]=u:l.setItem(f,JSON.stringify(u))}get(t,n={}){const{type:r,prefix:o}={...this.options,...n},s=o+t,i=this.types[r]||this.caches;let a;if(i===this.caches)a=i[s];else{const y=i.getItem(s);if(y)try{a=JSON.parse(y)}catch(b){console.warn("[Storage] JSON.parse",b)}}if(!a)return null;const{value:f,timestamp:l,expired:u}=a;return u>0&&l+u<Date.now()?(this.remove(t,n),null):f}remove(t,n={}){const{type:r,prefix:o}={...this.options,...n},s=this.types[r]||this.caches,i=o+t;s===this.caches?delete s[i]:s.removeItem(i)}clear(t={}){const{type:n}={...this.options,...t},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const mr=new yt;function wt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var M={exports:{}},gr=M.exports,qe;function yr(){return qe||(qe=1,(function(e,t){(function(n,r){r(t,e)})(gr,function(n,r){var o={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(l){try{delete window[l]}catch{window[l]=void 0}}function a(l){var u=document.getElementById(l);u&&document.getElementsByTagName("head")[0].removeChild(u)}function f(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=l,y=u.timeout||o.timeout,b=u.jsonpCallback||o.jsonpCallback,p=void 0;return new Promise(function(m,h){var w=u.jsonpCallbackFunction||s(),R=b+"_"+w;window[w]=function(L){m({ok:!0,json:function(){return Promise.resolve(L)}}),p&&clearTimeout(p),a(R),i(w)},d+=d.indexOf("?")===-1?"?":"&";var E=document.createElement("script");E.setAttribute("src",""+d+b+"="+w),u.charset&&E.setAttribute("charset",u.charset),u.nonce&&E.setAttribute("nonce",u.nonce),u.referrerPolicy&&E.setAttribute("referrerPolicy",u.referrerPolicy),u.crossorigin&&E.setAttribute("crossorigin","true"),E.id=R,document.getElementsByTagName("head")[0].appendChild(E),p=setTimeout(function(){h(new Error("JSONP request to "+l+" timed out")),i(w),a(R),window[w]=function(){i(w)}},y),E.onerror=function(){h(new Error("JSONP request to "+l+" failed")),i(w),a(R),p&&clearTimeout(p)}})}r.exports=f})})(M,M.exports)),M.exports}var wr=yr();const br=wt(wr);function Er(e){if(B){const{protocol:t,host:n,pathname:r}=location;return`${t}//${n}${e?r:""}`}else return null}function Rr(e=""){const t=e.match(O.rURL);return t?t[0]:""}function bt(e){const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push([n,encodeURIComponent(e[n])].join("="));return t.join("&")}function we(e,t,n){const r={};e=(e||location.search).replace(/^[^]*\?/,""),t=t||"&",n=n||"=";let o;const s=new RegExp("(?:^|\\"+t+")([^\\"+n+"\\"+t+"]+)(?:\\"+n+"([^\\"+t+"]*))?","g");for(;(o=s.exec(e))!==null;)o[1]!==e&&(r[decodeURIComponent(o[1])]=decodeURIComponent(o[2]||""));return r}function Et(e,t){t=typeof t=="string"?we(t):t;const n=e.split("?")[0],r=we(e),o=Object.assign({},r,t),s=bt(o);return s?[n,s].join("?"):e}const Sr=Object.freeze(Object.defineProperty({__proto__:null,append:Et,getCurrentHost:Er,getHost:Rr,parse:we,stringify:bt},Symbol.toStringTag,{value:"Module"}));async function Or(e,t={}){const{query:n={}}=t;e.includes("${")&&(e=O.template(e)(n||{}));const r=Et(e,n);return await(await br(r,t)).json()}var ue,Ie;function Tr(){if(Ie)return ue;Ie=1,ue=function(o,s,i){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof s=="function"&&(i=s,s={}),s=s||{},i=i||function(){},f.type=s.type||"text/javascript",f.charset=s.charset||"utf8",f.async="async"in s?!!s.async:!0,f.src=o,s.attrs&&e(f,s.attrs),s.text&&(f.text=""+s.text);var l="onload"in f?t:n;l(f,i),f.onload||t(f,i),a.appendChild(f)};function e(r,o){for(var s in o)r.setAttribute(s,o[s])}function t(r,o){r.onload=function(){this.onerror=this.onload=null,o(null,r)},r.onerror=function(){this.onerror=this.onload=null,o(new Error("Failed to load "+this.src),r)}}function n(r,o){r.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,o(null,r))}}return ue}var Ar=Tr();const xr=wt(Ar);function Cr(e,t={}){return new Promise((n,r)=>{const{library:o}=t;xr(e,t,(s,i)=>{s?r(s):n(o?window[o]:void 0)})})}const Me={debug:-1,log:0,info:0,warn:1,error:2},_r=function(e,t,n,r){return function(...o){if(t&&Me[t]<=Me[e]&&console[e].apply&&(r==="*"||n.startsWith(r)))return console[e].apply(console,Lr(o,n))}};function Lr(e,t){return t!=="*"&&(typeof e[0]=="string"?e[0]=`[${t}] ${e[0]}`:e=["["+t+"]"].concat(e)),e}function Pr(e,t){if(!e)return{targetLevel:t.level,targetBizName:t.bizName};if(~e.indexOf(":")){const n=e.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:e,targetBizName:"*"}}const jr={level:"warn",bizName:"*"};class Rt{constructor(t){_(this,"config");_(this,"options");this.options={...jr,...t};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=Pr(r,t)}_log(t){const{targetLevel:n,targetBizName:r}=this.config,{bizName:o}=this.options;return _r(t,n,o,r)}debug(...t){return this._log("debug")(...t)}log(...t){return this._log("log")(...t)}info(...t){return this._log("info")(...t)}warn(...t){return this._log("warn")(...t)}error(...t){return this._log("error")(...t)}}function St(e){return new Rt(e)}const Ur=St({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var kr={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function be(e,t){function n(o,s,i){if(!(typeof document>"u")){i=K({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var f in i)i[f]&&(a+="; "+f,i[f]!==!0&&(a+="="+i[f].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var f=s[a].split("="),l=f.slice(1).join("=");try{var u=decodeURIComponent(f[0]);if(i[u]=e.read(l,u),o===u)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",K({},s,{expires:-1}))},withAttributes:function(o){return be(this.converter,K({},this.attributes,o))},withConverter:function(o){return be(K({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Oe=be(kr,{path:"/"});function Fr(e,t,n){Oe.set(e,t,n)}function Nr(e){return Oe.get(e)}function Dr(e,t){Oe.remove(e,t)}const Br=Object.freeze(Object.defineProperty({__proto__:null,get:Nr,remove:Dr,set:Fr},Symbol.toStringTag,{value:"Module"}));function vr(e,t=""){const n=document.createElement("a");n.download=t,n.href=e,n.target="_blank",n.click()}function Te(e,t="",n){const r=new Blob([e],{type:n}),o=document.createElement("a");o.download=t,o.style.display="none",o.href=URL.createObjectURL(r),o.click(),URL.revokeObjectURL(o.href)}async function qr(e,t="",n){return fetch(e,{credentials:"include"}).then(async r=>{const o=await r.blob();return Te(o,t,n),o})}function Ir(e,t=""){const n=JSON.stringify(e);Te(n,t,"application/json")}function Mr(){const e=navigator.userAgent;let t="Unknown",n="Unknown",r="Unknown",o="Unknown",s=!1;if(/Windows NT/i.test(e)){t="Windows";const a={"12.0":"12","11.0":"11","10.0":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.2":"XP 64-bit","5.1":"XP"},f=e.match(/Windows NT (\d+\.\d+)/);f&&(n=a[f[1]]||f[1])}else if(/Mac OS X/i.test(e)){t="Mac OS";const a=e.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/(iPhone|iPad|iPod)/i.test(e)){t="iOS";const a=e.match(/OS (\d+[_\.]\d+[_\.]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/Android/i.test(e)){t="Android";const a=e.match(/Android (\d+\.\d+)/);a&&(n=a[1])}else/Linux/i.test(e)&&(t="Linux");const i=e.match(/(Edge|Edg|Edga|EdgA)\/(\d+)/i);if(i)r="Microsoft Edge",o=i[2];else{const a=e.match(/Firefox\/(\d+)/i);if(a)r="Firefox",o=a[1];else{const f=e.match(/(Opera|OPR)\/(\d+)/i);if(f)r="Opera",o=f[2];else{const l=e.match(/Chrome\/(\d+)/i);if(l)r="Chrome",o=l[1];else{const u=e.match(/Version\/(\d+\.\d+)/i);if(u&&/Safari/i.test(e))r="Safari",o=u[1];else{const d=e.match(/(MSIE |Trident.*rv:)(\d+)/i);d&&(r="Internet Explorer",o=d[2])}}}}}return s=/(iPhone|iPod|iPad|Android|Windows Phone|Mobile)/i.test(e)||["iOS","Android"].includes(t),/(iPad|Tablet|Android(?!.*Mobile))/i.test(e)&&(s=!0),{os:t,osVersion:n,browser:r,browserVersion:o,isMobile:s}}exports.LOCAL_REQUEST_ID=ye;exports.Logger=Rt;exports.Request=pt;exports.Storage=yt;exports.VTJ_UTILS_VERSION=At;exports.axios=S;exports.blobToFile=dr;exports.cAF=hr;exports.cookie=Br;exports.createApi=gt;exports.createApis=ar;exports.createRequest=ht;exports.dataURLtoBlob=fr;exports.downloadBlob=Te;exports.downloadJson=Ir;exports.downloadRemoteFile=qr;exports.downloadUrl=vr;exports.fileToBase64=lr;exports.formDataToJson=ur;exports.getClientInfo=Mr;exports.getLogger=St;exports.isClient=B;exports.jsonp=Or;exports.loadScript=Cr;exports.logger=Ur;exports.rAF=pr;exports.request=mt;exports.storage=mr;exports.url=Sr;exports.useApi=cr;Object.keys(O).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>O[e]})});
|
|
7
|
+
*/const Mt="0.13.35";function ot(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ht}=Object.prototype,{getPrototypeOf:Ce}=Object,{iterator:ce,toStringTag:st}=Symbol,le=(t=>e=>{const n=Ht.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=t=>(t=t.toLowerCase(),e=>le(e)===t),ue=t=>e=>typeof e===t,{isArray:$}=Array,H=ue("undefined");function X(t){return t!==null&&!H(t)&&t.constructor!==null&&!H(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const it=F("ArrayBuffer");function Jt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&it(t.buffer),e}const $t=ue("string"),x=ue("function"),at=ue("number"),Q=t=>t!==null&&typeof t=="object",zt=t=>t===!0||t===!1,oe=t=>{if(le(t)!=="object")return!1;const e=Ce(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(st in t)&&!(ce in t)},Wt=t=>{if(!Q(t)||X(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Vt=F("Date"),Kt=F("File"),Xt=F("Blob"),Qt=F("FileList"),Gt=t=>Q(t)&&x(t.pipe),Yt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=le(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Zt=F("URLSearchParams"),[en,tn,nn,rn]=["ReadableStream","Request","Response","Headers"].map(F),on=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),$(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(X(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let a;for(r=0;r<i;r++)a=s[r],e.call(null,t[a],a,t)}}function ct(t,e){if(X(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const v=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lt=t=>!H(t)&&t!==v;function Ee(){const{caseless:t,skipUndefined:e}=lt(this)&&this||{},n={},r=(o,s)=>{const i=t&&ct(n,s)||s;oe(n[i])&&oe(o)?n[i]=Ee(n[i],o):oe(o)?n[i]=Ee({},o):$(o)?n[i]=o.slice():(!e||!H(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&G(arguments[o],r);return n}const sn=(t,e,n,{allOwnKeys:r}={})=>(G(e,(o,s)=>{n&&x(o)?t[s]=ot(o,n):t[s]=o},{allOwnKeys:r}),t),an=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ln=(t,e,n,r)=>{let o,s,i;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&Ce(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},un=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},fn=t=>{if(!t)return null;if($(t))return t;let e=t.length;if(!at(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},dn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ce(Uint8Array)),pn=(t,e)=>{const r=(t&&t[ce]).call(t);let o;for(;(o=r.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},hn=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},mn=F("HTMLFormElement"),gn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ie=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),yn=F("RegExp"),ut=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};G(n,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(r[s]=i||o)}),Object.defineProperties(t,r)},wn=t=>{ut(t,(e,n)=>{if(x(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(x(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bn=(t,e)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return $(t)?r(t):r(String(t).split(e)),n},En=()=>{},Sn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Rn(t){return!!(t&&x(t.append)&&t[st]==="FormData"&&t[ce])}const On=t=>{const e=new Array(10),n=(r,o)=>{if(Q(r)){if(e.indexOf(r)>=0)return;if(X(r))return r;if(!("toJSON"in r)){e[o]=r;const s=$(r)?[]:{};return G(r,(i,a)=>{const f=n(i,o+1);!H(f)&&(s[a]=f)}),e[o]=void 0,s}}return r};return n(t,0)},Tn=F("AsyncFunction"),An=t=>t&&(Q(t)||x(t))&&x(t.then)&&x(t.catch),ft=((t,e)=>t?setImmediate:e?((n,r)=>(v.addEventListener("message",({source:o,data:s})=>{o===v&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),v.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(v.postMessage)),xn=typeof queueMicrotask<"u"?queueMicrotask.bind(v):typeof process<"u"&&process.nextTick||ft,Cn=t=>t!=null&&x(t[ce]),c={isArray:$,isArrayBuffer:it,isBuffer:X,isFormData:Yt,isArrayBufferView:Jt,isString:$t,isNumber:at,isBoolean:zt,isObject:Q,isPlainObject:oe,isEmptyObject:Wt,isReadableStream:en,isRequest:tn,isResponse:nn,isHeaders:rn,isUndefined:H,isDate:Vt,isFile:Kt,isBlob:Xt,isRegExp:yn,isFunction:x,isStream:Gt,isURLSearchParams:Zt,isTypedArray:dn,isFileList:Qt,forEach:G,merge:Ee,extend:sn,trim:on,stripBOM:an,inherits:cn,toFlatObject:ln,kindOf:le,kindOfTest:F,endsWith:un,toArray:fn,forEachEntry:pn,matchAll:hn,isHTMLForm:mn,hasOwnProperty:Ie,hasOwnProp:Ie,reduceDescriptors:ut,freezeMethods:wn,toObjectSet:bn,toCamelCase:gn,noop:En,toFiniteNumber:Sn,findKey:ct,global:v,isContextDefined:lt,isSpecCompliantForm:Rn,toJSONObject:On,isAsyncFn:Tn,isThenable:An,setImmediate:ft,asap:xn,isIterable:Cn};function g(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}c.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const dt=g.prototype,pt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{pt[t]={value:t}});Object.defineProperties(g,pt);Object.defineProperty(dt,"isAxiosError",{value:!0});g.from=(t,e,n,r,o,s)=>{const i=Object.create(dt);c.toFlatObject(t,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",f=e==null&&t?t.code:e;return g.call(i,a,f,n,r,o),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",s&&Object.assign(i,s),i};const _n=null;function Se(t){return c.isPlainObject(t)||c.isArray(t)}function ht(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function qe(t,e,n){return t?t.concat(e).map(function(o,s){return o=ht(o),!n&&s?"["+o+"]":o}).join(n?".":""):e}function Pn(t){return c.isArray(t)&&!t.some(Se)}const Ln=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function fe(t,e,n){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,h){return!c.isUndefined(h[m])});const r=n.metaTokens,o=n.visitor||l,s=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(o))throw new TypeError("visitor must be a function");function u(d){if(d===null)return"";if(c.isDate(d))return d.toISOString();if(c.isBoolean(d))return d.toString();if(!f&&c.isBlob(d))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(d)||c.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,m,h){let w=d;if(d&&!h&&typeof d=="object"){if(c.endsWith(m,"{}"))m=r?m:m.slice(0,-2),d=JSON.stringify(d);else if(c.isArray(d)&&Pn(d)||(c.isFileList(d)||c.endsWith(m,"[]"))&&(w=c.toArray(d)))return m=ht(m),w.forEach(function(b,T){!(c.isUndefined(b)||b===null)&&e.append(i===!0?qe([m],T,s):i===null?m:m+"[]",u(b))}),!1}return Se(d)?!0:(e.append(qe(h,m,s),u(d)),!1)}const p=[],y=Object.assign(Ln,{defaultVisitor:l,convertValue:u,isVisitable:Se});function E(d,m){if(!c.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(d),c.forEach(d,function(w,R){(!(c.isUndefined(w)||w===null)&&o.call(e,w,c.isString(R)?R.trim():R,m,y))===!0&&E(w,m?m.concat(R):[R])}),p.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return E(t),e}function Me(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function _e(t,e){this._pairs=[],t&&fe(t,this,e)}const mt=_e.prototype;mt.append=function(e,n){this._pairs.push([e,n])};mt.toString=function(e){const n=e?function(r){return e.call(this,r,Me)}:Me;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gt(t,e,n){if(!e)return t;const r=n&&n.encode||Fn;c.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(e,n):s=c.isURLSearchParams(e)?e.toString():new _e(e,n).toString(r),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class He{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Un=typeof URLSearchParams<"u"?URLSearchParams:_e,jn=typeof FormData<"u"?FormData:null,kn=typeof Blob<"u"?Blob:null,Nn={isBrowser:!0,classes:{URLSearchParams:Un,FormData:jn,Blob:kn},protocols:["http","https","file","blob","url","data"]},Pe=typeof window<"u"&&typeof document<"u",Re=typeof navigator=="object"&&navigator||void 0,Dn=Pe&&(!Re||["ReactNative","NativeScript","NS"].indexOf(Re.product)<0),Bn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vn=Pe&&window.location.href||"http://localhost",In=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pe,hasStandardBrowserEnv:Dn,hasStandardBrowserWebWorkerEnv:Bn,navigator:Re,origin:vn},Symbol.toStringTag,{value:"Module"})),A={...In,...Nn};function qn(t,e){return fe(t,new A.classes.URLSearchParams,{visitor:function(n,r,o,s){return A.isNode&&c.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function Mn(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hn(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],e[s]=t[s];return e}function wt(t){function e(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),f=s>=n.length;return i=!i&&c.isArray(o)?o.length:i,f?(c.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!c.isObject(o[i]))&&(o[i]=[]),e(n,r,o[i],s)&&c.isArray(o[i])&&(o[i]=Hn(o[i])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const n={};return c.forEachEntry(t,(r,o)=>{e(Mn(r),o,n,0)}),n}return null}function Jn(t,e,n){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Y={transitional:yt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return o?JSON.stringify(wt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qn(e,this.formSerializer).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return fe(a?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Jn(e)):e}],transformResponse:[function(e){const n=this.transitional||Y.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{Y.headers[t]={}});const $n=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zn=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
8
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||e[n]&&$n[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Je=Symbol("internals");function V(t){return t&&String(t).trim().toLowerCase()}function se(t){return t===!1||t==null?t:c.isArray(t)?t.map(se):String(t)}function Wn(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Vn=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ge(t,e,n,r,o){if(c.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Kn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Xn(t,e){const n=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,s,i){return this[r].call(this,e,o,s,i)},configurable:!0})})}let C=class{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function s(a,f,u){const l=V(f);if(!l)throw new Error("header name must be a non-empty string");const p=c.findKey(o,l);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||f]=se(a))}const i=(a,f)=>c.forEach(a,(u,l)=>s(u,l,f));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(c.isString(e)&&(e=e.trim())&&!Vn(e))i(zn(e),n);else if(c.isObject(e)&&c.isIterable(e)){let a={},f,u;for(const l of e){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(f=a[u])?c.isArray(f)?[...f,l[1]]:[f,l[1]]:l[1]}i(a,n)}else e!=null&&s(n,e,r);return this}get(e,n){if(e=V(e),e){const r=c.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return Wn(o);if(c.isFunction(n))return n.call(this,o,r);if(c.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=V(e),e){const r=c.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ge(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function s(i){if(i=V(i),i){const a=c.findKey(r,i);a&&(!n||ge(r,r[a],a,n))&&(delete r[a],o=!0)}}return c.isArray(e)?e.forEach(s):s(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!e||ge(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const n=this,r={};return c.forEach(this,(o,s)=>{const i=c.findKey(r,s);if(i){n[i]=se(o),delete n[s];return}const a=e?Kn(s):String(s).trim();a!==s&&delete n[s],n[a]=se(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return c.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&c.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
9
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Je]=this[Je]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=V(i);r[a]||(Xn(o,i),r[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};C.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(C.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});c.freezeMethods(C);function ye(t,e){const n=this||Y,r=e||n,o=C.from(r.headers);let s=r.data;return c.forEach(t,function(a){s=a.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function bt(t){return!!(t&&t.__CANCEL__)}function z(t,e,n){g.call(this,t??"canceled",g.ERR_CANCELED,e,n),this.name="CanceledError"}c.inherits(z,g,{__CANCEL__:!0});function Et(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Qn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Gn(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(f){const u=Date.now(),l=r[s];i||(i=u),n[o]=f,r[o]=u;let p=s,y=0;for(;p!==o;)y+=n[p++],p=p%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const E=l&&u-l;return E?Math.round(y*1e3/E):void 0}}function Yn(t,e){let n=0,r=1e3/e,o,s;const i=(u,l=Date.now())=>{n=l,o=null,s&&(clearTimeout(s),s=null),t(...u)};return[(...u)=>{const l=Date.now(),p=l-n;p>=r?i(u,l):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},r-p)))},()=>o&&i(o)]}const ae=(t,e,n=3)=>{let r=0;const o=Gn(50,250);return Yn(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,f=i-r,u=o(f),l=i<=a;r=i;const p={loaded:i,total:a,progress:a?i/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(p)},n)},$e=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},ze=t=>(...e)=>c.asap(()=>t(...e)),Zn=A.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,A.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,er=A.hasStandardBrowserEnv?{write(t,e,n,r,o,s,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function tr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function nr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function St(t,e,n){let r=!tr(e);return t&&(r||n==!1)?nr(t,e):e}const We=t=>t instanceof C?{...t}:t;function q(t,e){e=e||{};const n={};function r(u,l,p,y){return c.isPlainObject(u)&&c.isPlainObject(l)?c.merge.call({caseless:y},u,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function o(u,l,p,y){if(c.isUndefined(l)){if(!c.isUndefined(u))return r(void 0,u,p,y)}else return r(u,l,p,y)}function s(u,l){if(!c.isUndefined(l))return r(void 0,l)}function i(u,l){if(c.isUndefined(l)){if(!c.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,p){if(p in e)return r(u,l);if(p in t)return r(void 0,u)}const f={url:s,method:s,data:s,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,responseEncoding:i,validateStatus:a,headers:(u,l,p)=>o(We(u),We(l),p,!0)};return c.forEach(Object.keys({...t,...e}),function(l){const p=f[l]||o,y=p(t[l],e[l],l);c.isUndefined(y)&&p!==a||(n[l]=y)}),n}const Rt=t=>{const e=q({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=e;if(e.headers=i=C.from(i),e.url=gt(St(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(n.getHeaders)){const f=n.getHeaders(),u=["content-type","content-length"];Object.entries(f).forEach(([l,p])=>{u.includes(l.toLowerCase())&&i.set(l,p)})}}if(A.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&Zn(e.url))){const f=o&&s&&er.read(s);f&&i.set(o,f)}return e},rr=typeof XMLHttpRequest<"u",or=rr&&function(t){return new Promise(function(n,r){const o=Rt(t);let s=o.data;const i=C.from(o.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:u}=o,l,p,y,E,d;function m(){E&&E(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function w(){if(!h)return;const b=C.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:b,config:t,request:h};Et(function(L){n(L),m()},function(L){r(L),m()},P),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new g("Request aborted",g.ECONNABORTED,t,h)),h=null)},h.onerror=function(T){const P=T&&T.message?T.message:"Network Error",D=new g(P,g.ERR_NETWORK,t,h);D.event=T||null,r(D),h=null},h.ontimeout=function(){let T=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||yt;o.timeoutErrorMessage&&(T=o.timeoutErrorMessage),r(new g(T,P.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,h)),h=null},s===void 0&&i.setContentType(null),"setRequestHeader"in h&&c.forEach(i.toJSON(),function(T,P){h.setRequestHeader(P,T)}),c.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),u&&([y,d]=ae(u,!0),h.addEventListener("progress",y)),f&&h.upload&&([p,E]=ae(f),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(l=b=>{h&&(r(!b||b.type?new z(null,t,h):b),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const R=Qn(o.url);if(R&&A.protocols.indexOf(R)===-1){r(new g("Unsupported protocol "+R+":",g.ERR_BAD_REQUEST,t));return}h.send(s||null)})},sr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof g?l:new z(l instanceof Error?l.message:l))}};let i=e&&setTimeout(()=>{i=null,s(new g(`timeout ${e} of ms exceeded`,g.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:f}=r;return f.unsubscribe=()=>c.asap(a),f}},ir=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},ar=async function*(t,e){for await(const n of cr(t))yield*ir(n,e)},cr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Ve=(t,e,n,r)=>{const o=ar(t,e);let s=0,i,a=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:u,value:l}=await o.next();if(u){a(),f.close();return}let p=l.byteLength;if(n){let y=s+=p;n(y)}f.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(f){return a(f),o.return()}},{highWaterMark:2})},Ke=64*1024,{isFunction:ne}=c,lr=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:Xe,TextEncoder:Qe}=c.global,Ge=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ur=t=>{t=c.merge.call({skipUndefined:!0},lr,t);const{fetch:e,Request:n,Response:r}=t,o=e?ne(e):typeof fetch=="function",s=ne(n),i=ne(r);if(!o)return!1;const a=o&&ne(Xe),f=o&&(typeof Qe=="function"?(d=>m=>d.encode(m))(new Qe):async d=>new Uint8Array(await new n(d).arrayBuffer())),u=s&&a&&Ge(()=>{let d=!1;const m=new n(A.origin,{body:new Xe,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!m}),l=i&&a&&Ge(()=>c.isReadableStream(new r("").body)),p={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!p[d]&&(p[d]=(m,h)=>{let w=m&&m[d];if(w)return w.call(m);throw new g(`Response type '${d}' is not supported`,g.ERR_NOT_SUPPORT,h)})});const y=async d=>{if(d==null)return 0;if(c.isBlob(d))return d.size;if(c.isSpecCompliantForm(d))return(await new n(A.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(c.isArrayBufferView(d)||c.isArrayBuffer(d))return d.byteLength;if(c.isURLSearchParams(d)&&(d=d+""),c.isString(d))return(await f(d)).byteLength},E=async(d,m)=>{const h=c.toFiniteNumber(d.getContentLength());return h??y(m)};return async d=>{let{url:m,method:h,data:w,signal:R,cancelToken:b,timeout:T,onDownloadProgress:P,onUploadProgress:D,responseType:L,headers:pe,withCredentials:Z="same-origin",fetchOptions:je}=Rt(d),ke=e||fetch;L=L?(L+"").toLowerCase():"text";let ee=sr([R,b&&b.toAbortSignal()],T),W=null;const B=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let Ne;try{if(D&&u&&h!=="get"&&h!=="head"&&(Ne=await E(pe,w))!==0){let N=new n(m,{method:"POST",body:w,duplex:"half"}),M;if(c.isFormData(w)&&(M=N.headers.get("content-type"))&&pe.setContentType(M),N.body){const[he,te]=$e(Ne,ae(ze(D)));w=Ve(N.body,Ke,he,te)}}c.isString(Z)||(Z=Z?"include":"omit");const U=s&&"credentials"in n.prototype,De={...je,signal:ee,method:h.toUpperCase(),headers:pe.normalize().toJSON(),body:w,duplex:"half",credentials:U?Z:void 0};W=s&&new n(m,De);let k=await(s?ke(W,je):ke(m,De));const Be=l&&(L==="stream"||L==="response");if(l&&(P||Be&&B)){const N={};["status","statusText","headers"].forEach(ve=>{N[ve]=k[ve]});const M=c.toFiniteNumber(k.headers.get("content-length")),[he,te]=P&&$e(M,ae(ze(P),!0))||[];k=new r(Ve(k.body,Ke,he,()=>{te&&te(),B&&B()}),N)}L=L||"text";let vt=await p[c.findKey(p,L)||"text"](k,d);return!Be&&B&&B(),await new Promise((N,M)=>{Et(N,M,{data:vt,headers:C.from(k.headers),status:k.status,statusText:k.statusText,config:d,request:W})})}catch(U){throw B&&B(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,d,W),{cause:U.cause||U}):g.from(U,U&&U.code,d,W)}}},fr=new Map,Ot=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:o}=e,s=[r,o,n];let i=s.length,a=i,f,u,l=fr;for(;a--;)f=s[a],u=l.get(f),u===void 0&&l.set(f,u=a?new Map:ur(e)),l=u;return u};Ot();const Le={http:_n,xhr:or,fetch:{get:Ot}};c.forEach(Le,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ye=t=>`- ${t}`,dr=t=>c.isFunction(t)||t===null||t===!1;function pr(t,e){t=c.isArray(t)?t:[t];const{length:n}=t;let r,o;const s={};for(let i=0;i<n;i++){r=t[i];let a;if(o=r,!dr(r)&&(o=Le[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o&&(c.isFunction(o)||(o=o.get(e))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
10
|
+
`+i.map(Ye).join(`
|
|
11
|
+
`):" "+Ye(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const Tt={getAdapter:pr,adapters:Le};function we(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new z(null,t)}function Ze(t){return we(t),t.headers=C.from(t.headers),t.data=ye.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Tt.getAdapter(t.adapter||Y.adapter,t)(t).then(function(r){return we(t),r.data=ye.call(t,t.transformResponse,r),r.headers=C.from(r.headers),r},function(r){return bt(r)||(we(t),r&&r.response&&(r.response.data=ye.call(t,t.transformResponse,r.response),r.response.headers=C.from(r.response.headers))),Promise.reject(r)})}const At="1.13.2",de={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{de[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const et={};de.transitional=function(e,n,r){function o(s,i){return"[Axios v"+At+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(e===!1)throw new g(o(i," has been removed"+(n?" in "+n:"")),g.ERR_DEPRECATED);return n&&!et[i]&&(et[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,i,a):!0}};de.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function hr(t,e,n){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],i=e[s];if(i){const a=t[s],f=a===void 0||i(a,s,t);if(f!==!0)throw new g("option "+s+" must be "+f,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}const ie={assertOptions:hr,validators:de},j=ie.validators;let I=class{constructor(e){this.defaults=e||{},this.interceptors={request:new He,response:new He}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
12
|
+
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ie.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(c.isFunction(o)?n.paramsSerializer={serialize:o}:ie.assertOptions(o,{encode:j.function,serialize:j.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ie.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[n.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],d=>{delete s[d]}),n.headers=C.concat(i,s);const a=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,p=0,y;if(!f){const d=[Ze.bind(this),void 0];for(d.unshift(...a),d.push(...u),y=d.length,l=Promise.resolve(n);p<y;)l=l.then(d[p++],d[p++]);return l}y=a.length;let E=n;for(;p<y;){const d=a[p++],m=a[p++];try{E=d(E)}catch(h){m.call(this,h);break}}try{l=Ze.call(this,E)}catch(d){return Promise.reject(d)}for(p=0,y=u.length;p<y;)l=l.then(u[p++],u[p++]);return l}getUri(e){e=q(this.defaults,e);const n=St(e.baseURL,e.url,e.allowAbsoluteUrls);return gt(n,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(n,r){return this.request(q(r||{},{method:e,url:n,data:(r||{}).data}))}});c.forEach(["post","put","patch"],function(e){function n(r){return function(s,i,a){return this.request(q(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}I.prototype[e]=n(),I.prototype[e+"Form"]=n(!0)});let mr=class xt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},e(function(s,i,a){r.reason||(r.reason=new z(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new xt(function(o){e=o}),cancel:e}}};function gr(t){return function(n){return t.apply(null,n)}}function yr(t){return c.isObject(t)&&t.isAxiosError===!0}const Oe={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(Oe).forEach(([t,e])=>{Oe[e]=t});function Ct(t){const e=new I(t),n=ot(I.prototype.request,e);return c.extend(n,I.prototype,e,{allOwnKeys:!0}),c.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Ct(q(t,o))},n}const S=Ct(Y);S.Axios=I;S.CanceledError=z;S.CancelToken=mr;S.isCancel=bt;S.VERSION=At;S.toFormData=fe;S.AxiosError=g;S.Cancel=S.CanceledError;S.all=function(e){return Promise.all(e)};S.spread=gr;S.isAxiosError=yr;S.mergeConfig=q;S.AxiosHeaders=C;S.formToJSON=t=>wt(c.isHTMLForm(t)?new FormData(t):t);S.getAdapter=Tt.getAdapter;S.HttpStatusCode=Oe;S.default=S;const{Axios:io,AxiosError:ao,CanceledError:co,isCancel:lo,CancelToken:uo,VERSION:fo,all:po,Cancel:ho,isAxiosError:mo,spread:go,toFormData:yo,AxiosHeaders:wo,HttpStatusCode:bo,formToJSON:Eo,getAdapter:So,mergeConfig:Ro}=S,wr={form:"application/x-www-form-urlencoded",json:"application/json",data:"multipart/form-data"},br=["put","post","patch"],Te="Local-Request-Id",Er=100,Sr=300;class _t{constructor(e={}){_(this,"axios");_(this,"settings");_(this,"records",{});_(this,"isLoading",!1);_(this,"stopSkipWarn");_(this,"showLoading");_(this,"showError");this.settings=Object.assign({type:"form"},e.settings||{});const n=O.omit(e,["settings","query"]);this.axios=S.create(O.merge({headers:{"Content-Type":"application/x-www-form-urlencoded"},timeout:120*1e3},n)),this.setupSkipWarn(this.settings),this.showLoading=O.debounce(this.openLoading.bind(this),Er),this.showError=O.throttle(this._showError.bind(this),Sr,{leading:!0,trailing:!1})}setConfig(e={}){this.settings=O.merge(this.settings,e.settings||{});const n=O.omit(e,["settings","query"]);this.axios.defaults=O.merge(this.axios.defaults,n),this.setupSkipWarn(this.settings)}cancel(e,n="请求已取消"){if(e){const r=this.records[e];if(!r)return;r.source.cancel(n)}else for(const r of Object.values(this.records))r.source.cancel(n)}createHeaders(e,n,r){const o=n.injectHeaders?typeof n.headers=="function"?n.headers(e,r,n):n.headers||{}:{},s={"Content-Type":wr[n.type||"form"],...r.headers,...o};return n.skipWarn&&(s[Te]=e),s}isJsonType(e){return Object.entries(e).some(([n,r])=>n.toLowerCase()==="content-type"&&String(r).includes("application/json"))}toFormData(e,n="data"){if(e instanceof FormData||e instanceof URLSearchParams)return e;const r=n==="data"?new FormData:new URLSearchParams;return Object.entries(e).forEach(([o,s])=>{r.append(o,s)}),r}createSendData(e,n,r,o,s={}){const{type:i,skipWarn:a}=e,{name:f="skipWarn"}=a||{};let{data:u,params:l={},method:p="get"}=n;const y=o?{[f]:!0}:{};return br.includes(p.toLowerCase())?(u=Object.assign(u||{},y),u=i!=="json"||!this.isJsonType(r)?this.toFormData(u,i):u,l={...s}):i==="form"?l={...u||{},...s,...y}:(u&&(i!=="json"||!this.isJsonType(r))&&(u=this.toFormData(u,i)),l={...s,...y}),{data:u,params:l}}createUrl(e){let{url:n,params:r}=e;if(n){let o=O.isUrl(n)?new URL(n).origin:"";const s=o?n.replace(o,""):n;try{const i=O.pathToRegexpCompile(s,{encode:encodeURIComponent});return o+i(r||{})}catch{console.warn("createUrl","pathToRegexpCompile error",n)}}return n}openLoading(e){const{loading:n,showLoading:r}=e;n&&r&&Object.keys(this.records).length>0&&(this.isLoading=!0,r())}closeLoading(e){const{loading:n,hideLoading:r}=e;if(!n)return;this.isLoading=!1;const o=Object.keys(this.records);r&&o.length===0&&(this.isLoading=!1,r())}_showError(e,n){const{failMessage:r,showError:o}=e;if(r&&o){const s=n?.response?.data,i=s?.message||s?.msg||n?.message||n?.msg||"未知错误";o(i,n)}}validResponse(e,n){const{validSuccess:r,validate:o}=e;return r&&o?!!o(n):!0}isSkipWarnResponse(e){return!!e.promise}send(e={},n=!1){const r=O.merge({},this.settings,e.settings||{}),o=e.query||{},s=O.omit(e,["settings","query"]),i=O.uuid(!1),a=S.CancelToken.source();this.records[i]={settings:r,config:s,source:a};const f=this.createUrl(s),u=this.createHeaders(i,r,s),{data:l,params:p}=this.createSendData(r,s,u,n,o);return this.showLoading(r),new Promise((y,E)=>{this.axios({cancelToken:a.token,...s,url:f,headers:u,data:l,params:p}).then(d=>this.isSkipWarnResponse(d)?y(d.promise):this.validResponse(r,d)?y(r.originResponse?d:d.data?.data):(this.showError(r,d.data),E(d.data))).catch(d=>(this.showError(r,d),E(d))).finally(()=>{delete this.records[i],this.closeLoading(r)})})}useResponse(e,n){const{response:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}useRequest(e,n){const{request:r}=this.axios.interceptors,o=r.use(e,n);return()=>r.eject(o)}setupSkipWarn(e){if(this.stopSkipWarn&&(this.stopSkipWarn(),this.stopSkipWarn=void 0),!e.skipWarn)return;const{code:n,executor:r,callback:o,complete:s}=e.skipWarn;this.stopSkipWarn=this.useResponse(i=>{const f=(i.config.headers||{})[Te],u=this.records[f];if(!u)return i;const{data:l}=i;if(!l||typeof l!="object")return i;if(l?.code===n){o&&o(i);const p=new Promise(r).then(()=>this.send({...u.config,settings:u.settings},!0));p.catch(y=>y).finally(()=>{s&&s()}),i.promise=p}return i})}}function Pt(t={}){const e=new _t(t),n=e.send.bind(e),r=e.cancel.bind(e),o=e.setConfig.bind(e),s=e.useRequest.bind(e),i=e.useResponse.bind(e);return Object.assign(n,{...e,instance:e,send:n,cancel:r,setConfig:o,useRequest:s,useResponse:i})}const Lt=Pt({settings:{injectHeaders:!0,loading:!0,originResponse:!0}});function Ft(t){const e=typeof t=="string"?{url:t}:t;return(n,r)=>Lt.send(O.merge({},e,r||{},{data:n}))}function Rr(t){const e={};for(const[n,r]of Object.entries(t))e[n]=Ft(r);return e}function Or(t,e){const n=me.ref(null),r=me.ref(),o=me.ref(!0),s=()=>{o.value=!0,r.value=void 0,(typeof t=="function"?t():t).then(a=>{n.value=e?e(a):a}).catch(a=>{r.value=a}).finally(()=>{o.value=!1})};return s(),{data:n,error:r,loading:o,reload:s}}const J=typeof window<"u",Tr=t=>new Promise((e,n)=>{const r=new FileReader;r.readAsDataURL(t),r.onload=()=>{e(r.result)},r.onerror=o=>{n(o)}});function Ar(t){const e={};return t?(t.forEach((n,r)=>{e[r]=typeof n=="string"?decodeURIComponent(n):n}),e):{}}function xr(t){const e=t.split(","),n=e[0].match(/:(.*?);/)?.[1],r=atob(e[1]);let o=r.length;const s=new Uint8Array(o);for(;o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function Cr(t,e){const n=t;return n.lastModified=Date.now(),n.lastModifiedDate=new Date,n.name=e,n}const _r=t=>J?window.requestAnimationFrame(t):setTimeout(t,16),Pr=t=>J?window.cancelAnimationFrame(t):clearTimeout(t);class Ut{constructor(e={}){_(this,"options",{type:"cache",expired:0,prefix:"__VTJ_"});_(this,"caches",{});_(this,"types");this.types={local:J?window.localStorage:this.caches,session:J?window.sessionStorage:this.caches,cache:this.caches},this.config(e)}config(e={}){this.options=Object.assign(this.options,e)}save(e,n,r={}){const{type:o,expired:s,prefix:i}={...this.options,...r},a=Date.now(),f=i+e,u=this.types[o]||this.caches,l={value:n,timestamp:a,expired:s};u===this.caches?u[f]=l:u.setItem(f,JSON.stringify(l))}get(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=o+e,i=this.types[r]||this.caches;let a;if(i===this.caches)a=i[s];else{const y=i.getItem(s);if(y)try{a=JSON.parse(y)}catch(E){console.warn("[Storage] JSON.parse",E)}}if(!a)return null;const{value:f,timestamp:u,expired:l}=a;return l>0&&u+l<Date.now()?(this.remove(e,n),null):f}remove(e,n={}){const{type:r,prefix:o}={...this.options,...n},s=this.types[r]||this.caches,i=o+e;s===this.caches?delete s[i]:s.removeItem(i)}clear(e={}){const{type:n}={...this.options,...e},r=this.types[n]||this.caches;r===this.caches?this.caches={}:r.clear()}}const Lr=new Ut;function jt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var K={exports:{}},Fr=K.exports,tt;function Ur(){return tt||(tt=1,(function(t,e){(function(n,r){r(e,t)})(Fr,function(n,r){var o={timeout:5e3,jsonpCallback:"callback"};function s(){return"jsonp_"+Date.now()+"_"+Math.ceil(Math.random()*1e5)}function i(u){try{delete window[u]}catch{window[u]=void 0}}function a(u){var l=document.getElementById(u);l&&document.getElementsByTagName("head")[0].removeChild(l)}function f(u){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=u,y=l.timeout||o.timeout,E=l.jsonpCallback||o.jsonpCallback,d=void 0;return new Promise(function(m,h){var w=l.jsonpCallbackFunction||s(),R=E+"_"+w;window[w]=function(T){m({ok:!0,json:function(){return Promise.resolve(T)}}),d&&clearTimeout(d),a(R),i(w)},p+=p.indexOf("?")===-1?"?":"&";var b=document.createElement("script");b.setAttribute("src",""+p+E+"="+w),l.charset&&b.setAttribute("charset",l.charset),l.nonce&&b.setAttribute("nonce",l.nonce),l.referrerPolicy&&b.setAttribute("referrerPolicy",l.referrerPolicy),l.crossorigin&&b.setAttribute("crossorigin","true"),b.id=R,document.getElementsByTagName("head")[0].appendChild(b),d=setTimeout(function(){h(new Error("JSONP request to "+u+" timed out")),i(w),a(R),window[w]=function(){i(w)}},y),b.onerror=function(){h(new Error("JSONP request to "+u+" failed")),i(w),a(R),d&&clearTimeout(d)}})}r.exports=f})})(K,K.exports)),K.exports}var jr=Ur();const kr=jt(jr);function Nr(t){if(J){const{protocol:e,host:n,pathname:r}=location;return`${e}//${n}${t?r:""}`}else return null}function Dr(t=""){const e=t.match(O.rURL);return e?e[0]:""}function kt(t){const e=[];for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push([n,encodeURIComponent(t[n])].join("="));return e.join("&")}function Ae(t,e,n){const r={};t=(t||location.search).replace(/^[^]*\?/,""),e=e||"&",n=n||"=";let o;const s=new RegExp("(?:^|\\"+e+")([^\\"+n+"\\"+e+"]+)(?:\\"+n+"([^\\"+e+"]*))?","g");for(;(o=s.exec(t))!==null;)o[1]!==t&&(r[decodeURIComponent(o[1])]=decodeURIComponent(o[2]||""));return r}function Nt(t,e){e=typeof e=="string"?Ae(e):e;const n=t.split("?")[0],r=Ae(t),o=Object.assign({},r,e),s=kt(o);return s?[n,s].join("?"):t}const Br=Object.freeze(Object.defineProperty({__proto__:null,append:Nt,getCurrentHost:Nr,getHost:Dr,parse:Ae,stringify:kt},Symbol.toStringTag,{value:"Module"}));async function vr(t,e={}){const{query:n={}}=e;t.includes("${")&&(t=O.template(t)(n||{}));const r=Nt(t,n);return await(await kr(r,e)).json()}var be,nt;function Ir(){if(nt)return be;nt=1,be=function(o,s,i){var a=document.head||document.getElementsByTagName("head")[0],f=document.createElement("script");typeof s=="function"&&(i=s,s={}),s=s||{},i=i||function(){},f.type=s.type||"text/javascript",f.charset=s.charset||"utf8",f.async="async"in s?!!s.async:!0,f.src=o,s.attrs&&t(f,s.attrs),s.text&&(f.text=""+s.text);var u="onload"in f?e:n;u(f,i),f.onload||e(f,i),a.appendChild(f)};function t(r,o){for(var s in o)r.setAttribute(s,o[s])}function e(r,o){r.onload=function(){this.onerror=this.onload=null,o(null,r)},r.onerror=function(){this.onerror=this.onload=null,o(new Error("Failed to load "+this.src),r)}}function n(r,o){r.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,o(null,r))}}return be}var qr=Ir();const Mr=jt(qr);function Hr(t,e={}){return new Promise((n,r)=>{const{library:o}=e;Mr(t,e,(s,i)=>{s?r(s):n(o?window[o]:void 0)})})}const rt={debug:-1,log:0,info:0,warn:1,error:2},Jr=function(t,e,n,r){return function(...o){if(e&&rt[e]<=rt[t]&&console[t].apply&&(r==="*"||n.startsWith(r)))return console[t].apply(console,$r(o,n))}};function $r(t,e){return e!=="*"&&(typeof t[0]=="string"?t[0]=`[${e}] ${t[0]}`:t=["["+e+"]"].concat(t)),t}function zr(t,e){if(!t)return{targetLevel:e.level,targetBizName:e.bizName};if(~t.indexOf(":")){const n=t.split(":");return{targetLevel:n[0],targetBizName:n[1]}}return{targetLevel:t,targetBizName:"*"}}const Wr={level:"warn",bizName:"*"};class Dt{constructor(e){_(this,"config");_(this,"options");this.options={...Wr,...e};const n=typeof location<"u"?location:{},r=(/__(?:logConf|logLevel)__=([^#/&]*)/.exec(n.href)||[])[1];this.config=zr(r,e)}_log(e){const{targetLevel:n,targetBizName:r}=this.config,{bizName:o}=this.options;return Jr(e,n,o,r)}debug(...e){return this._log("debug")(...e)}log(...e){return this._log("log")(...e)}info(...e){return this._log("info")(...e)}warn(...e){return this._log("warn")(...e)}error(...e){return this._log("error")(...e)}}function Bt(t){return new Dt(t)}const Vr=Bt({level:"log",bizName:"VTJ"});/*! js-cookie v3.0.5 | MIT */function re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Kr={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function xe(t,e){function n(o,s,i){if(!(typeof document>"u")){i=re({},e,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var f in i)i[f]&&(a+="; "+f,i[f]!==!0&&(a+="="+i[f].split(";")[0]));return document.cookie=o+"="+t.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var f=s[a].split("="),u=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(i[l]=t.read(u,l),o===l)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",re({},s,{expires:-1}))},withAttributes:function(o){return xe(this.converter,re({},this.attributes,o))},withConverter:function(o){return xe(re({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Fe=xe(Kr,{path:"/"});function Xr(t,e,n){Fe.set(t,e,n)}function Qr(t){return Fe.get(t)}function Gr(t,e){Fe.remove(t,e)}const Yr=Object.freeze(Object.defineProperty({__proto__:null,get:Qr,remove:Gr,set:Xr},Symbol.toStringTag,{value:"Module"}));function Zr(t,e=""){const n=document.createElement("a");n.download=e,n.href=t,n.target="_blank",n.click()}function Ue(t,e="",n){const r=new Blob([t],{type:n}),o=document.createElement("a");o.download=e,o.style.display="none",o.href=URL.createObjectURL(r),o.click(),URL.revokeObjectURL(o.href)}async function eo(t,e="",n){return fetch(t,{credentials:"include"}).then(async r=>{const o=await r.blob();return Ue(o,e,n),o})}function to(t,e=""){const n=JSON.stringify(t);Ue(n,e,"application/json")}function no(){const t=navigator.userAgent;let e="Unknown",n="Unknown",r="Unknown",o="Unknown",s=!1;if(/Windows NT/i.test(t)){e="Windows";const a={"12.0":"12","11.0":"11","10.0":"10","6.3":"8.1","6.2":"8","6.1":"7","6.0":"Vista","5.2":"XP 64-bit","5.1":"XP"},f=t.match(/Windows NT (\d+\.\d+)/);f&&(n=a[f[1]]||f[1])}else if(/Mac OS X/i.test(t)){e="Mac OS";const a=t.match(/Mac OS X (\d+[._]\d+[._]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/(iPhone|iPad|iPod)/i.test(t)){e="iOS";const a=t.match(/OS (\d+[_\.]\d+[_\.]?\d*)/);a&&(n=a[1].replace(/_/g,"."))}else if(/Android/i.test(t)){e="Android";const a=t.match(/Android (\d+\.\d+)/);a&&(n=a[1])}else/Linux/i.test(t)&&(e="Linux");const i=t.match(/(Edge|Edg|Edga|EdgA)\/(\d+)/i);if(i)r="Microsoft Edge",o=i[2];else{const a=t.match(/Firefox\/(\d+)/i);if(a)r="Firefox",o=a[1];else{const f=t.match(/(Opera|OPR)\/(\d+)/i);if(f)r="Opera",o=f[2];else{const u=t.match(/Chrome\/(\d+)/i);if(u)r="Chrome",o=u[1];else{const l=t.match(/Version\/(\d+\.\d+)/i);if(l&&/Safari/i.test(t))r="Safari",o=l[1];else{const p=t.match(/(MSIE |Trident.*rv:)(\d+)/i);p&&(r="Internet Explorer",o=p[2])}}}}}return s=/(iPhone|iPod|iPad|Android|Windows Phone|Mobile)/i.test(t)||["iOS","Android"].includes(e),/(iPad|Tablet|Android(?!.*Mobile))/i.test(t)&&(s=!0),{os:e,osVersion:n,browser:r,browserVersion:o,isMobile:s}}exports.LOCAL_REQUEST_ID=Te;exports.Logger=Dt;exports.Request=_t;exports.Storage=Ut;exports.VTJ_UTILS_VERSION=Mt;exports.axios=S;exports.blobToFile=Cr;exports.cAF=Pr;exports.cookie=Yr;exports.createApi=Ft;exports.createApis=Rr;exports.createRequest=Pt;exports.dataURLtoBlob=xr;exports.downloadBlob=Ue;exports.downloadJson=to;exports.downloadRemoteFile=eo;exports.downloadUrl=Zr;exports.fileToBase64=Tr;exports.formDataToJson=Ar;exports.getClientInfo=no;exports.getLogger=Bt;exports.isClient=J;exports.jsonp=vr;exports.loadScript=Hr;exports.logger=Vr;exports.rAF=_r;exports.request=Lt;exports.storage=Lr;exports.url=Br;exports.useApi=Or;Object.keys(O).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>O[t]})});
|