best-unit 1.2.22 → 1.2.23
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/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Fn(){console.log("npm package test!!!")}function On(){console.log("Current time:",new Date().toISOString())}function Ht(e,t){return function(){return e.apply(t,arguments)}}const{toString:Pn}=Object.prototype,{getPrototypeOf:tt}=Object,{iterator:Ce,toStringTag:jt}=Symbol,Re=(e=>t=>{const n=Pn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),z=e=>(e=e.toLowerCase(),t=>Re(t)===e),Me=e=>t=>typeof t===e,{isArray:ne}=Array,le=Me("undefined");function In(e){return e!==null&&!le(e)&&e.constructor!==null&&!le(e.constructor)&&I(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $t=z("ArrayBuffer");function Nn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$t(e.buffer),t}const Dn=Me("string"),I=Me("function"),Wt=Me("number"),Be=e=>e!==null&&typeof e=="object",zn=e=>e===!0||e===!1,be=e=>{if(Re(e)!=="object")return!1;const t=tt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(jt in e)&&!(Ce in e)},Un=z("Date"),Hn=z("File"),jn=z("Blob"),$n=z("FileList"),Wn=e=>Be(e)&&I(e.pipe),qn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||I(e.append)&&((t=Re(e))==="formdata"||t==="object"&&I(e.toString)&&e.toString()==="[object FormData]"))},Jn=z("URLSearchParams"),[Vn,Gn,Kn,Xn]=["ReadableStream","Request","Response","Headers"].map(z),Zn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ne(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{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 qt(e,t){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 K=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!le(e)&&e!==K;function We(){const{caseless:e}=Jt(this)&&this||{},t={},n=(r,o)=>{const s=e&&qt(t,o)||o;be(t[s])&&be(r)?t[s]=We(t[s],r):be(r)?t[s]=We({},r):ne(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&fe(arguments[r],n);return t}const Qn=(e,t,n,{allOwnKeys:r}={})=>(fe(t,(o,s)=>{n&&I(o)?e[s]=Ht(o,n):e[s]=o},{allOwnKeys:r}),e),Yn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),er=(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)},tr=(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&&tt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nr=(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},rr=e=>{if(!e)return null;if(ne(e))return e;let t=e.length;if(!Wt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},or=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tt(Uint8Array)),ir=(e,t)=>{const r=(e&&e[Ce]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},sr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ar=z("HTMLFormElement"),lr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),dt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cr=z("RegExp"),Vt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fe(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},ur=e=>{Vt(e,(t,n)=>{if(I(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(I(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+"'")})}})},dr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return ne(e)?r(e):r(String(e).split(t)),n},fr=()=>{},pr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function hr(e){return!!(e&&I(e.append)&&e[jt]==="FormData"&&e[Ce])}const mr=e=>{const t=new Array(10),n=(r,o)=>{if(Be(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=ne(r)?[]:{};return fe(r,(i,a)=>{const u=n(i,o+1);!le(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},_r=z("AsyncFunction"),gr=e=>e&&(Be(e)||I(e))&&I(e.then)&&I(e.catch),Gt=((e,t)=>e?setImmediate:t?((n,r)=>(K.addEventListener("message",({source:o,data:s})=>{o===K&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),K.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",I(K.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(K):typeof process<"u"&&process.nextTick||Gt,yr=e=>e!=null&&I(e[Ce]),p={isArray:ne,isArrayBuffer:$t,isBuffer:In,isFormData:qn,isArrayBufferView:Nn,isString:Dn,isNumber:Wt,isBoolean:zn,isObject:Be,isPlainObject:be,isReadableStream:Vn,isRequest:Gn,isResponse:Kn,isHeaders:Xn,isUndefined:le,isDate:Un,isFile:Hn,isBlob:jn,isRegExp:cr,isFunction:I,isStream:Wn,isURLSearchParams:Jn,isTypedArray:or,isFileList:$n,forEach:fe,merge:We,extend:Qn,trim:Zn,stripBOM:Yn,inherits:er,toFlatObject:tr,kindOf:Re,kindOfTest:z,endsWith:nr,toArray:rr,forEachEntry:ir,matchAll:sr,isHTMLForm:ar,hasOwnProperty:dt,hasOwnProp:dt,reduceDescriptors:Vt,freezeMethods:ur,toObjectSet:dr,toCamelCase:lr,noop:fr,toFiniteNumber:pr,findKey:qt,global:K,isContextDefined:Jt,isSpecCompliantForm:hr,toJSONObject:mr,isAsyncFn:_r,isThenable:gr,setImmediate:Gt,asap:br,isIterable:yr};function L(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)}p.inherits(L,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:p.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=L.prototype,Xt={};["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=>{Xt[e]={value:e}});Object.defineProperties(L,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});L.from=(e,t,n,r,o,s)=>{const i=Object.create(Kt);return p.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),L.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const xr=null;function qe(e){return p.isPlainObject(e)||p.isArray(e)}function Zt(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function ft(e,t,n){return e?e.concat(t).map(function(o,s){return o=Zt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Sr(e){return p.isArray(e)&&!e.some(qe)}const wr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function Fe(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!p.isUndefined(g[y])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(p.isDate(b))return b.toISOString();if(p.isBoolean(b))return b.toString();if(!u&&p.isBlob(b))throw new L("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(b)||p.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,y,g){let x=b;if(b&&!g&&typeof b=="object"){if(p.endsWith(y,"{}"))y=r?y:y.slice(0,-2),b=JSON.stringify(b);else if(p.isArray(b)&&Sr(b)||(p.isFileList(b)||p.endsWith(y,"[]"))&&(x=p.toArray(b)))return y=Zt(y),x.forEach(function(w,k){!(p.isUndefined(w)||w===null)&&t.append(i===!0?ft([y],k,s):i===null?y:y+"[]",l(w))}),!1}return qe(b)?!0:(t.append(ft(g,y,s),l(b)),!1)}const c=[],_=Object.assign(wr,{defaultVisitor:d,convertValue:l,isVisitable:qe});function h(b,y){if(!p.isUndefined(b)){if(c.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(b),p.forEach(b,function(x,S){(!(p.isUndefined(x)||x===null)&&o.call(t,x,p.isString(S)?S.trim():S,y,_))===!0&&h(x,y?y.concat(S):[S])}),c.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function pt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nt(e,t){this._pairs=[],e&&Fe(e,this,t)}const Qt=nt.prototype;Qt.append=function(t,n){this._pairs.push([t,n])};Qt.toString=function(t){const n=t?function(r){return t.call(this,r,pt)}:pt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yt(e,t,n){if(!t)return e;const r=n&&n.encode||Lr;p.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=p.isURLSearchParams(t)?t.toString():new nt(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ht{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){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const en={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:nt,Er=typeof FormData<"u"?FormData:null,vr=typeof Blob<"u"?Blob:null,kr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:Er,Blob:vr},protocols:["http","https","file","blob","url","data"]},rt=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,Tr=rt&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),Cr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Rr=rt&&window.location.href||"http://localhost",Mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rt,hasStandardBrowserEnv:Tr,hasStandardBrowserWebWorkerEnv:Cr,navigator:Je,origin:Rr},Symbol.toStringTag,{value:"Module"})),B={...Mr,...kr};function Br(e,t){return Fe(e,new B.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return B.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Fr(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Or(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 tn(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,u?(p.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=Or(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(Fr(r),o,n,0)}),n}return null}function Pr(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pe={transitional:en,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(tn(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.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 Br(t,this.formSerializer).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Fe(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Pr(t)):t}],transformResponse:[function(t){const n=this.transitional||pe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.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"?L.from(a,L.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:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],e=>{pe.headers[e]={}});const Ir=p.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"]),Nr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[mt]=this[mt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=se(i);r[a]||(Hr(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(N.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(N);function He(e,t){const n=this||pe,r=t||n,o=N.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function nn(e){return!!(e&&e.__CANCEL__)}function re(e,t,n){L.call(this,e??"canceled",L.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(re,L,{__CANCEL__:!0});function rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function jr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $r(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(u){const l=Date.now(),d=r[s];i||(i=l),n[o]=u,r[o]=l;let c=s,_=0;for(;c!==o;)_+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=d&&l-d;return h?Math.round(_*1e3/h):void 0}}function Wr(e,t){let n=0,r=1e3/t,o,s;const i=(l,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-n;c>=r?i(l,d):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-c)))},()=>o&&i(o)]}const Ae=(e,t,n=3)=>{let r=0;const o=$r(50,250);return Wr(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,u=i-r,l=o(u),d=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},_t=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},gt=e=>(...t)=>p.asap(()=>e(...t)),qr=B.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,B.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Jr=B.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];p.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),p.isString(r)&&i.push("path="+r),p.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 Vr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function on(e,t,n){let r=!Vr(t);return e&&(r||n==!1)?Gr(e,t):t}const bt=e=>e instanceof N?{...e}:e;function Z(e,t){t=t||{};const n={};function r(l,d,c,_){return p.isPlainObject(l)&&p.isPlainObject(d)?p.merge.call({caseless:_},l,d):p.isPlainObject(d)?p.merge({},d):p.isArray(d)?d.slice():d}function o(l,d,c,_){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l,c,_)}else return r(l,d,c,_)}function s(l,d){if(!p.isUndefined(d))return r(void 0,d)}function i(l,d){if(p.isUndefined(d)){if(!p.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function a(l,d,c){if(c in t)return r(l,d);if(c in e)return r(void 0,l)}const u={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,d,c)=>o(bt(l),bt(d),c,!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=u[d]||o,_=c(e[d],t[d],d);p.isUndefined(_)&&c!==a||(n[d]=_)}),n}const sn=e=>{const t=Z({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=N.from(i),t.url=Yt(on(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 u;if(p.isFormData(n)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[l,...d]=u?u.split(";").map(c=>c.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...d].join("; "))}}if(B.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(t)),r||r!==!1&&qr(t.url))){const l=o&&s&&Jr.read(s);l&&i.set(o,l)}return t},Kr=typeof XMLHttpRequest<"u",Xr=Kr&&function(e){return new Promise(function(n,r){const o=sn(e);let s=o.data;const i=N.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,d,c,_,h,b;function y(){h&&h(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function x(){if(!g)return;const w=N.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),M={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};rn(function(U){n(U),y()},function(U){r(U),y()},M),g=null}"onloadend"in g?g.onloadend=x:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(x)},g.onabort=function(){g&&(r(new L("Request aborted",L.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new L("Network Error",L.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||en;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new L(k,M.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,g)),g=null},s===void 0&&i.setContentType(null),"setRequestHeader"in g&&p.forEach(i.toJSON(),function(k,M){g.setRequestHeader(M,k)}),p.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),l&&([_,b]=Ae(l,!0),g.addEventListener("progress",_)),u&&g.upload&&([c,h]=Ae(u),g.upload.addEventListener("progress",c),g.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(d=w=>{g&&(r(!w||w.type?new re(null,e,g):w),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const S=jr(o.url);if(S&&B.protocols.indexOf(S)===-1){r(new L("Unsupported protocol "+S+":",L.ERR_BAD_REQUEST,e));return}g.send(s||null)})},Zr=(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 d=l instanceof Error?l:this.reason;r.abort(d instanceof L?d:new re(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new L(`timeout ${t} of ms exceeded`,L.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:u}=r;return u.unsubscribe=()=>p.asap(a),u}},Qr=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},Yr=async function*(e,t){for await(const n of eo(e))yield*Qr(n,t)},eo=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()}},yt=(e,t,n,r)=>{const o=Yr(e,t);let s=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await o.next();if(l){a(),u.close();return}let c=d.byteLength;if(n){let _=s+=c;n(_)}u.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Oe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",an=Oe&&typeof ReadableStream=="function",to=Oe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},no=an&&ln(()=>{let e=!1;const t=new Request(B.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),xt=64*1024,Ve=an&&ln(()=>p.isReadableStream(new Response("").body)),Ee={stream:Ve&&(e=>e.body)};Oe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ee[t]&&(Ee[t]=p.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new L(`Response type '${t}' is not supported`,L.ERR_NOT_SUPPORT,r)})})})(new Response);const ro=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(B.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(p.isArrayBufferView(e)||p.isArrayBuffer(e))return e.byteLength;if(p.isURLSearchParams(e)&&(e=e+""),p.isString(e))return(await to(e)).byteLength},oo=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??ro(t)},io=Oe&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:d,withCredentials:c="same-origin",fetchOptions:_}=sn(e);l=l?(l+"").toLowerCase():"text";let h=Zr([o,s&&s.toAbortSignal()],i),b;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(u&&no&&n!=="get"&&n!=="head"&&(g=await oo(d,r))!==0){let M=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(p.isFormData(r)&&(O=M.headers.get("content-type"))&&d.setContentType(O),M.body){const[U,W]=_t(g,Ae(gt(u)));r=yt(M.body,xt,U,W)}}p.isString(c)||(c=c?"include":"omit");const x="credentials"in Request.prototype;b=new Request(t,{..._,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:x?c:void 0});let S=await fetch(b,_);const w=Ve&&(l==="stream"||l==="response");if(Ve&&(a||w&&y)){const M={};["status","statusText","headers"].forEach(q=>{M[q]=S[q]});const O=p.toFiniteNumber(S.headers.get("content-length")),[U,W]=a&&_t(O,Ae(gt(a),!0))||[];S=new Response(yt(S.body,xt,U,()=>{W&&W(),y&&y()}),M)}l=l||"text";let k=await Ee[p.findKey(Ee,l)||"text"](S,e);return!w&&y&&y(),await new Promise((M,O)=>{rn(M,O,{data:k,headers:N.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:b})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,e,b),{cause:x.cause||x}):L.from(x,x&&x.code,e,b)}}),Ge={http:xr,xhr:Xr,fetch:io};p.forEach(Ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const St=e=>`- ${e}`,so=e=>p.isFunction(e)||e===null||e===!1,cn={getAdapter:e=>{e=p.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,!so(n)&&(r=Ge[(i=String(n)).toLowerCase()],r===void 0))throw new L(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
4
|
-
`+s.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Z(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&xe.assertOptions(r,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:xe.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),xe.assertOptions(n,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=N.concat(i,s);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let d,c=0,_;if(!u){const b=[wt.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,l),_=b.length,d=Promise.resolve(n);c<_;)d=d.then(b[c++],b[c++]);return d}_=a.length;let h=n;for(c=0;c<_;){const b=a[c++],y=a[c++];try{h=b(h)}catch(g){y.call(this,g);break}}try{d=wt.call(this,h)}catch(b){return Promise.reject(b)}for(c=0,_=l.length;c<_;)d=d.then(l[c++],l[c++]);return d}getUri(t){t=Z(this.defaults,t);const n=on(t.baseURL,t.url,t.allowAbsoluteUrls);return Yt(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){X.prototype[t]=function(n,r){return this.request(Z(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(Z(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}X.prototype[t]=n(),X.prototype[t+"Form"]=n(!0)});let lo=class dn{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 re(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 dn(function(o){t=o}),cancel:t}}};function co(e){return function(n){return e.apply(null,n)}}function uo(e){return p.isObject(e)&&e.isAxiosError===!0}const Ke={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(Ke).forEach(([e,t])=>{Ke[t]=e});function fn(e){const t=new X(e),n=Ht(X.prototype.request,t);return p.extend(n,X.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return fn(Z(e,o))},n}const C=fn(pe);C.Axios=X;C.CanceledError=re;C.CancelToken=lo;C.isCancel=nn;C.VERSION=un;C.toFormData=Fe;C.AxiosError=L;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=co;C.isAxiosError=uo;C.mergeConfig=Z;C.AxiosHeaders=N;C.formToJSON=e=>tn(p.isHTMLForm(e)?new FormData(e):e);C.getAdapter=cn.getAdapter;C.HttpStatusCode=Ke;C.default=C;const{Axios:Li,AxiosError:Ai,CanceledError:Ei,isCancel:vi,CancelToken:ki,VERSION:Ti,all:Ci,Cancel:Ri,isAxiosError:Mi,spread:Bi,toFormData:Fi,AxiosHeaders:Oi,HttpStatusCode:Pi,formToJSON:Ii,getAdapter:Ni,mergeConfig:Di}=C;var he,v,pn,G,At,hn,mn,_n,ot,Xe,Ze,ce={},gn=[],fo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ie=Array.isArray;function $(e,t){for(var n in t)e[n]=t[n];return e}function it(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ee(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?he.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return ae(e,i,r,o,null)}function ae(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++pn,__i:-1,__u:0};return o==null&&v.vnode!=null&&v.vnode(s),s}function Q(e){return e.children}function Se(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?te(e):null}function bn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return bn(e)}}function Et(e){(!e.__d&&(e.__d=!0)&&G.push(e)&&!ve.__r++||At!=v.debounceRendering)&&((At=v.debounceRendering)||hn)(ve)}function ve(){for(var e,t,n,r,o,s,i,a=1;G.length;)G.length>a&&G.sort(mn),e=G.shift(),a=G.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=$({},r)).__v=r.__v+1,v.vnode&&v.vnode(n),st(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??te(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,Sn(s,n,i),n.__e!=o&&bn(n)));ve.__r=0}function yn(e,t,n,r,o,s,i,a,u,l,d){var c,_,h,b,y,g,x=r&&r.__k||gn,S=t.length;for(u=po(n,t,x,u,S),c=0;c<S;c++)(h=n.__k[c])!=null&&(_=h.__i==-1?ce:x[h.__i]||ce,h.__i=c,g=st(e,h,_,o,s,i,a,u,l,d),b=h.__e,h.ref&&_.ref!=h.ref&&(_.ref&&at(_.ref,null,h),d.push(h.ref,h.__c||b,h)),y==null&&b!=null&&(y=b),4&h.__u||_.__k===h.__k?u=xn(h,u,e):typeof h.type=="function"&&g!==void 0?u=g:b&&(u=b.nextSibling),h.__u&=-7);return n.__e=y,u}function po(e,t,n,r,o){var s,i,a,u,l,d=n.length,c=d,_=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+_,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?ae(null,i,null,null,null):Ie(i)?ae(Q,{children:i},null,null,null):i.constructor==null&&i.__b>0?ae(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=ho(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>d?_--:o<d&&_++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?_--:l==u+1?_++:(l>u?_--:_++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<d;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=te(a)),Ln(a,a));return r}function xn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=xn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=te(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ho(e,t,n,r){var o,s,i=e.key,a=e.type,u=t[n];if(u===null&&e.key==null||u&&i==u.key&&a==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((u=t[o])&&(2&u.__u)==0&&i==u.key&&a==u.type)return o;o--}if(s<t.length){if((u=t[s])&&(2&u.__u)==0&&i==u.key&&a==u.type)return s;s++}}return-1}function vt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||fo.test(t)?n:n+"px"}function me(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||vt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||vt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(_n,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=ot,e.addEventListener(t,s?Ze:Xe,s)):e.removeEventListener(t,s?Ze:Xe,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function kt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ot++;else if(t.t<n.u)return;return n(v.event?v.event(t):t)}}}function st(e,t,n,r,o,s,i,a,u,l){var d,c,_,h,b,y,g,x,S,w,k,M,O,U,W,q,ze,H=t.type;if(t.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=v.__b)&&d(t);e:if(typeof H=="function")try{if(x=t.props,S="prototype"in H&&H.prototype.render,w=(d=H.contextType)&&r[d.__c],k=d?w?w.props.value:d.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new H(x,k):(t.__c=c=new Se(x,k),c.constructor=H,c.render=_o),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=k,c.__n=r,_=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&H.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=$({},c.__s)),$(c.__s,H.getDerivedStateFromProps(x,c.__s))),h=c.props,b=c.state,c.__v=t,_)S&&H.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&H.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,k),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,k)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(ie){ie&&(ie.__=t)}),M=0;M<c._sb.length;M++)c.__h.push(c._sb[M]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,k),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,b,y)})}if(c.context=k,c.props=x,c.__P=e,c.__e=!1,O=v.__r,U=0,S){for(c.state=c.__s,c.__d=!1,O&&O(t),d=c.render(c.props,c.state,c.context),W=0;W<c._sb.length;W++)c.__h.push(c._sb[W]);c._sb=[]}else do c.__d=!1,O&&O(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(r=$($({},r),c.getChildContext())),S&&!_&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,b)),q=d,d!=null&&d.type===Q&&d.key==null&&(q=wn(d.props.children)),a=yn(e,Ie(q)?q:[q],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),g&&(c.__E=c.__=null)}catch(ie){if(t.__v=null,u||s!=null)if(ie.then){for(t.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(ze=s.length;ze--;)it(s[ze]);else t.__e=n.__e,t.__k=n.__k;v.__e(ie,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=mo(n.__e,t,n,r,o,s,i,u,l);return(d=v.diffed)&&d(t),128&t.__u?void 0:a}function Sn(e,t,n){for(var r=0;r<n.length;r++)at(n[r],n[++r],n[++r]);v.__c&&v.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){v.__e(s,o.__v)}})}function wn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Ie(e)?e.map(wn):$({},e)}function mo(e,t,n,r,o,s,i,a,u){var l,d,c,_,h,b,y,g=n.props,x=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(x);e=document.createElementNS(o,S,x.is&&x),a&&(v.__m&&v.__m(t,s),a=!1),s=null}if(S==null)g===x||a&&e.data==x||(e.data=x);else{if(s=s&&he.call(e.childNodes),g=n.props||ce,!a&&s!=null)for(g={},l=0;l<e.attributes.length;l++)g[(h=e.attributes[l]).name]=h.value;for(l in g)if(h=g[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=h;else if(!(l in x)){if(l=="value"&&"defaultValue"in x||l=="checked"&&"defaultChecked"in x)continue;me(e,l,null,h,o)}}for(l in x)h=x[l],l=="children"?_=h:l=="dangerouslySetInnerHTML"?d=h:l=="value"?b=h:l=="checked"?y=h:a&&typeof h!="function"||g[l]===h||me(e,l,h,g[l],o);if(d)a||c&&(d.__html==c.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),yn(t.type=="template"?e.content:e,Ie(_)?_:[_],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&te(n,0),a,u),s!=null)for(l=s.length;l--;)it(s[l]);a||(l="value",S=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[l]||S=="progress"&&!b||S=="option"&&b!=g[l])&&me(e,l,b,g[l],o),l="checked",y!=null&&y!=e[l]&&me(e,l,y,g[l],o))}return e}function at(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){v.__e(o,n)}}function Ln(e,t,n){var r,o;if(v.unmount&&v.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||at(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){v.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Ln(r[o],t,n||typeof e.type!="function");n||it(e.__e),e.__c=e.__=e.__e=void 0}function _o(e,t,n){return this.constructor(e,n)}function Ne(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),v.__&&v.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],st(t,e=(!r&&n||t).__k=ee(Q,null,[e]),o||ce,ce,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?he.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Sn(s,e,i)}function An(e,t){Ne(e,t,An)}function En(e,t,n){var r,o,s,i,a=$({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?he.call(arguments,2):n),ae(e.type,a,r||e.key,o||e.ref,null)}he=gn.slice,v={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},pn=0,Se.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$({},this.state),typeof e=="function"&&(e=e($({},n),this.props)),e&&$(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Et(this))},Se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Et(this))},Se.prototype.render=Q,G=[],hn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mn=function(e,t){return e.__v.__b-t.__v.__b},ve.__r=0,_n=/(PointerCapture)$|Capture$/i,ot=0,Xe=kt(!1),Ze=kt(!0);var go=0;function m(e,t,n,r,o,s){t||(t={});var i,a,u=t;if("ref"in u)for(a in u={},t)a=="ref"?i=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--go,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)u[a]===void 0&&(u[a]=i[a]);return v.vnode&&v.vnode(l),l}var ue,T,$e,Tt,ke=0,vn=[],R=v,Ct=R.__b,Rt=R.__r,Mt=R.diffed,Bt=R.__c,Ft=R.unmount,Ot=R.__;function lt(e,t){R.__h&&R.__h(T,e,ke||t),ke=0;var n=T.__H||(T.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function F(e){return ke=1,bo(Tn,e)}function bo(e,t,n){var r=lt(ue++,2);if(r.t=e,!r.__c&&(r.__=[Tn(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,a);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=T,!T.__f)){var o=function(a,u,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(_){return!!_.__c});if(d.every(function(_){return!_.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return d.forEach(function(_){if(_.__N){var h=_.__[0];_.__=_.__N,_.__N=void 0,h!==_.__[0]&&(c=!0)}}),s&&s.call(this,a,u,l)||c};T.__f=!0;var s=T.shouldComponentUpdate,i=T.componentWillUpdate;T.componentWillUpdate=function(a,u,l){if(this.__e){var d=s;s=void 0,o(a,u,l),s=d}i&&i.call(this,a,u,l)},T.shouldComponentUpdate=o}return r.__N||r.__}function de(e,t){var n=lt(ue++,3);!R.__s&&kn(n.__H,t)&&(n.__=e,n.u=t,T.__H.__h.push(n))}function Te(e){return ke=5,yo(function(){return{current:e}},[])}function yo(e,t){var n=lt(ue++,7);return kn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function xo(){for(var e;e=vn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(we),e.__H.__h.forEach(Qe),e.__H.__h=[]}catch(t){e.__H.__h=[],R.__e(t,e.__v)}}R.__b=function(e){T=null,Ct&&Ct(e)},R.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ot&&Ot(e,t)},R.__r=function(e){Rt&&Rt(e),ue=0;var t=(T=e.__c).__H;t&&($e===T?(t.__h=[],T.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(we),t.__h.forEach(Qe),t.__h=[],ue=0)),$e=T},R.diffed=function(e){Mt&&Mt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vn.push(t)!==1&&Tt===R.requestAnimationFrame||((Tt=R.requestAnimationFrame)||So)(xo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),$e=T=null},R.__c=function(e,t){t.some(function(n){try{n.__h.forEach(we),n.__h=n.__h.filter(function(r){return!r.__||Qe(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],R.__e(r,n.__v)}}),Bt&&Bt(e,t)},R.unmount=function(e){Ft&&Ft(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{we(r)}catch(o){t=o}}),n.__H=void 0,t&&R.__e(t,n.__v))};var Pt=typeof requestAnimationFrame=="function";function So(e){var t,n=function(){clearTimeout(r),Pt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Pt&&(t=requestAnimationFrame(n))}function we(e){var t=T,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),T=t}function Qe(e){var t=T;e.__c=e.__(),T=t}function kn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Tn(e,t){return typeof t=="function"?t(e):t}var De=(e=>(e.ZH="zh",e.EN="en",e))(De||{}),D=(e=>(e.WHITE="white",e.DARK="dark",e))(D||{}),Y=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(Y||{}),f=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(f||{});const It={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function wo(){return E("theme")===D.WHITE?It.white:It.dark}class Lo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=wo(),a=document.createElement("div");if(a.style.cssText=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Rn(){console.log("npm package test!!!")}function Mn(){console.log("Current time:",new Date().toISOString())}function Dt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bn}=Object.prototype,{getPrototypeOf:Ye}=Object,{iterator:ve,toStringTag:zt}=Symbol,ke=(e=>t=>{const n=Bn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),z=e=>(e=e.toLowerCase(),t=>ke(t)===e),Te=e=>t=>typeof t===e,{isArray:Q}=Array,ie=Te("undefined");function Fn(e){return e!==null&&!ie(e)&&e.constructor!==null&&!ie(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ut=z("ArrayBuffer");function On(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ut(e.buffer),t}const Pn=Te("string"),P=Te("function"),Ht=Te("number"),Ce=e=>e!==null&&typeof e=="object",In=e=>e===!0||e===!1,me=e=>{if(ke(e)!=="object")return!1;const t=Ye(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zt in e)&&!(ve in e)},Nn=z("Date"),Dn=z("File"),zn=z("Blob"),Un=z("FileList"),Hn=e=>Ce(e)&&P(e.pipe),jn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ke(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},$n=z("URLSearchParams"),[Wn,qn,Jn,Vn]=["ReadableStream","Request","Response","Headers"].map(z),Gn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Q(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{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 jt(e,t){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 J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=e=>!ie(e)&&e!==J;function He(){const{caseless:e}=$t(this)&&this||{},t={},n=(r,o)=>{const s=e&&jt(t,o)||o;me(t[s])&&me(r)?t[s]=He(t[s],r):me(r)?t[s]=He({},r):Q(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ce(arguments[r],n);return t}const Kn=(e,t,n,{allOwnKeys:r}={})=>(ce(t,(o,s)=>{n&&P(o)?e[s]=Dt(o,n):e[s]=o},{allOwnKeys:r}),e),Xn=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zn=(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)},Yn=(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&&Ye(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Qn=(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},er=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!Ht(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ye(Uint8Array)),nr=(e,t)=>{const r=(e&&e[ve]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},rr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},or=z("HTMLFormElement"),ir=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sr=z("RegExp"),Wt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ce(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},ar=e=>{Wt(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(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+"'")})}})},lr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},cr=()=>{},ur=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dr(e){return!!(e&&P(e.append)&&e[zt]==="FormData"&&e[ve])}const fr=e=>{const t=new Array(10),n=(r,o)=>{if(Ce(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Q(r)?[]:{};return ce(r,(i,a)=>{const u=n(i,o+1);!ie(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},pr=z("AsyncFunction"),hr=e=>e&&(Ce(e)||P(e))&&P(e.then)&&P(e.catch),qt=((e,t)=>e?setImmediate:t?((n,r)=>(J.addEventListener("message",({source:o,data:s})=>{o===J&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),J.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(J.postMessage)),mr=typeof queueMicrotask<"u"?queueMicrotask.bind(J):typeof process<"u"&&process.nextTick||qt,_r=e=>e!=null&&P(e[ve]),p={isArray:Q,isArrayBuffer:Ut,isBuffer:Fn,isFormData:jn,isArrayBufferView:On,isString:Pn,isNumber:Ht,isBoolean:In,isObject:Ce,isPlainObject:me,isReadableStream:Wn,isRequest:qn,isResponse:Jn,isHeaders:Vn,isUndefined:ie,isDate:Nn,isFile:Dn,isBlob:zn,isRegExp:sr,isFunction:P,isStream:Hn,isURLSearchParams:$n,isTypedArray:tr,isFileList:Un,forEach:ce,merge:He,extend:Kn,trim:Gn,stripBOM:Xn,inherits:Zn,toFlatObject:Yn,kindOf:ke,kindOfTest:z,endsWith:Qn,toArray:er,forEachEntry:nr,matchAll:rr,isHTMLForm:or,hasOwnProperty:lt,hasOwnProp:lt,reduceDescriptors:Wt,freezeMethods:ar,toObjectSet:lr,toCamelCase:ir,noop:cr,toFiniteNumber:ur,findKey:jt,global:J,isContextDefined:$t,isSpecCompliantForm:dr,toJSONObject:fr,isAsyncFn:pr,isThenable:hr,setImmediate:qt,asap:mr,isIterable:_r};function L(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)}p.inherits(L,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:p.toJSONObject(this.config),code:this.code,status:this.status}}});const Jt=L.prototype,Vt={};["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=>{Vt[e]={value:e}});Object.defineProperties(L,Vt);Object.defineProperty(Jt,"isAxiosError",{value:!0});L.from=(e,t,n,r,o,s)=>{const i=Object.create(Jt);return p.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),L.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const gr=null;function je(e){return p.isPlainObject(e)||p.isArray(e)}function Gt(e){return p.endsWith(e,"[]")?e.slice(0,-2):e}function ct(e,t,n){return e?e.concat(t).map(function(o,s){return o=Gt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function br(e){return p.isArray(e)&&!e.some(je)}const yr=p.toFlatObject(p,{},null,function(t){return/^is[A-Z]/.test(t)});function Re(e,t,n){if(!p.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!p.isUndefined(g[y])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(t);if(!p.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(p.isDate(b))return b.toISOString();if(p.isBoolean(b))return b.toString();if(!u&&p.isBlob(b))throw new L("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(b)||p.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,y,g){let x=b;if(b&&!g&&typeof b=="object"){if(p.endsWith(y,"{}"))y=r?y:y.slice(0,-2),b=JSON.stringify(b);else if(p.isArray(b)&&br(b)||(p.isFileList(b)||p.endsWith(y,"[]"))&&(x=p.toArray(b)))return y=Gt(y),x.forEach(function(v,w){!(p.isUndefined(v)||v===null)&&t.append(i===!0?ct([y],w,s):i===null?y:y+"[]",l(v))}),!1}return je(b)?!0:(t.append(ct(g,y,s),l(b)),!1)}const c=[],_=Object.assign(yr,{defaultVisitor:f,convertValue:l,isVisitable:je});function h(b,y){if(!p.isUndefined(b)){if(c.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(b),p.forEach(b,function(x,S){(!(p.isUndefined(x)||x===null)&&o.call(t,x,p.isString(S)?S.trim():S,y,_))===!0&&h(x,y?y.concat(S):[S])}),c.pop()}}if(!p.isObject(e))throw new TypeError("data must be an object");return h(e),t}function ut(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Qe(e,t){this._pairs=[],e&&Re(e,this,t)}const Kt=Qe.prototype;Kt.append=function(t,n){this._pairs.push([t,n])};Kt.toString=function(t){const n=t?function(r){return t.call(this,r,ut)}:ut;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xt(e,t,n){if(!t)return e;const r=n&&n.encode||xr;p.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=p.isURLSearchParams(t)?t.toString():new Qe(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class dt{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){p.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sr=typeof URLSearchParams<"u"?URLSearchParams:Qe,wr=typeof FormData<"u"?FormData:null,Lr=typeof Blob<"u"?Blob:null,Ar={isBrowser:!0,classes:{URLSearchParams:Sr,FormData:wr,Blob:Lr},protocols:["http","https","file","blob","url","data"]},et=typeof window<"u"&&typeof document<"u",$e=typeof navigator=="object"&&navigator||void 0,Er=et&&(!$e||["ReactNative","NativeScript","NS"].indexOf($e.product)<0),vr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=et&&window.location.href||"http://localhost",Tr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:et,hasStandardBrowserEnv:Er,hasStandardBrowserWebWorkerEnv:vr,navigator:$e,origin:kr},Symbol.toStringTag,{value:"Module"})),F={...Tr,...Ar};function Cr(e,t){return Re(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return F.isNode&&p.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Rr(e){return p.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Mr(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 Yt(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),u=s>=n.length;return i=!i&&p.isArray(o)?o.length:i,u?(p.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!p.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&p.isArray(o[i])&&(o[i]=Mr(o[i])),!a)}if(p.isFormData(e)&&p.isFunction(e.entries)){const n={};return p.forEachEntry(e,(r,o)=>{t(Rr(r),o,n,0)}),n}return null}function Br(e,t,n){if(p.isString(e))try{return(t||JSON.parse)(e),p.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ue={transitional:Zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=p.isObject(t);if(s&&p.isHTMLForm(t)&&(t=new FormData(t)),p.isFormData(t))return o?JSON.stringify(Yt(t)):t;if(p.isArrayBuffer(t)||p.isBuffer(t)||p.isStream(t)||p.isFile(t)||p.isBlob(t)||p.isReadableStream(t))return t;if(p.isArrayBufferView(t))return t.buffer;if(p.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 Cr(t,this.formSerializer).toString();if((a=p.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Re(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Br(t)):t}],transformResponse:[function(t){const n=this.transitional||ue.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(p.isResponse(t)||p.isReadableStream(t))return t;if(t&&p.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"?L.from(a,L.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],e=>{ue.headers[e]={}});const Fr=p.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"]),Or=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&Fr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ft=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function _e(e){return e===!1||e==null?e:p.isArray(e)?e.map(_e):String(e)}function Pr(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ir=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ne(e,t,n,r,o){if(p.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!p.isString(t)){if(p.isString(r))return t.indexOf(r)!==-1;if(p.isRegExp(r))return r.test(t)}}function Nr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Dr(e,t){const n=p.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let I=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,u,l){const f=re(u);if(!f)throw new Error("header name must be a non-empty string");const c=p.findKey(o,f);(!c||o[c]===void 0||l===!0||l===void 0&&o[c]!==!1)&&(o[c||u]=_e(a))}const i=(a,u)=>p.forEach(a,(l,f)=>s(l,f,u));if(p.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(p.isString(t)&&(t=t.trim())&&!Ir(t))i(Or(t),n);else if(p.isObject(t)&&p.isIterable(t)){let a={},u,l;for(const f of t){if(!p.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(u=a[l])?p.isArray(u)?[...u,f[1]]:[u,f[1]]:f[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=re(t),t){const r=p.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Pr(o);if(p.isFunction(n))return n.call(this,o,r);if(p.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=re(t),t){const r=p.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ne(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=re(i),i){const a=p.findKey(r,i);a&&(!n||Ne(r,r[a],a,n))&&(delete r[a],o=!0)}}return p.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ne(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return p.forEach(this,(o,s)=>{const i=p.findKey(r,s);if(i){n[i]=_e(o),delete n[s];return}const a=t?Nr(s):String(s).trim();a!==s&&delete n[s],n[a]=_e(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return p.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&p.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ft]=this[ft]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=re(i);r[a]||(Dr(o,i),r[a]=!0)}return p.isArray(t)?t.forEach(s):s(t),this}};I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);p.reduceDescriptors(I.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});p.freezeMethods(I);function De(e,t){const n=this||ue,r=t||n,o=I.from(r.headers);let s=r.data;return p.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Qt(e){return!!(e&&e.__CANCEL__)}function ee(e,t,n){L.call(this,e??"canceled",L.ERR_CANCELED,t,n),this.name="CanceledError"}p.inherits(ee,L,{__CANCEL__:!0});function en(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ur(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(u){const l=Date.now(),f=r[s];i||(i=l),n[o]=u,r[o]=l;let c=s,_=0;for(;c!==o;)_+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const h=f&&l-f;return h?Math.round(_*1e3/h):void 0}}function Hr(e,t){let n=0,r=1e3/t,o,s;const i=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),c=f-n;c>=r?i(l,f):(o=l,s||(s=setTimeout(()=>{s=null,i(o)},r-c)))},()=>o&&i(o)]}const Se=(e,t,n=3)=>{let r=0;const o=Ur(50,250);return Hr(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,u=i-r,l=o(u),f=i<=a;r=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&f?(a-i)/l:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(c)},n)},pt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ht=e=>(...t)=>p.asap(()=>e(...t)),jr=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,$r=F.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];p.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),p.isString(r)&&i.push("path="+r),p.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 Wr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tn(e,t,n){let r=!Wr(t);return e&&(r||n==!1)?qr(e,t):t}const mt=e=>e instanceof I?{...e}:e;function G(e,t){t=t||{};const n={};function r(l,f,c,_){return p.isPlainObject(l)&&p.isPlainObject(f)?p.merge.call({caseless:_},l,f):p.isPlainObject(f)?p.merge({},f):p.isArray(f)?f.slice():f}function o(l,f,c,_){if(p.isUndefined(f)){if(!p.isUndefined(l))return r(void 0,l,c,_)}else return r(l,f,c,_)}function s(l,f){if(!p.isUndefined(f))return r(void 0,f)}function i(l,f){if(p.isUndefined(f)){if(!p.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,c){if(c in t)return r(l,f);if(c in e)return r(void 0,l)}const u={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,f,c)=>o(mt(l),mt(f),c,!0)};return p.forEach(Object.keys(Object.assign({},e,t)),function(f){const c=u[f]||o,_=c(e[f],t[f],f);p.isUndefined(_)&&c!==a||(n[f]=_)}),n}const nn=e=>{const t=G({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=I.from(i),t.url=Xt(tn(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 u;if(p.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((u=i.getContentType())!==!1){const[l,...f]=u?u.split(";").map(c=>c.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&p.isFunction(r)&&(r=r(t)),r||r!==!1&&jr(t.url))){const l=o&&s&&$r.read(s);l&&i.set(o,l)}return t},Jr=typeof XMLHttpRequest<"u",Vr=Jr&&function(e){return new Promise(function(n,r){const o=nn(e);let s=o.data;const i=I.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,f,c,_,h,b;function y(){h&&h(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function x(){if(!g)return;const v=I.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:v,config:e,request:g};en(function(N){n(N),y()},function(N){r(N),y()},E),g=null}"onloadend"in g?g.onloadend=x:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(x)},g.onabort=function(){g&&(r(new L("Request aborted",L.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new L("Network Error",L.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Zt;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new L(w,E.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,e,g)),g=null},s===void 0&&i.setContentType(null),"setRequestHeader"in g&&p.forEach(i.toJSON(),function(w,E){g.setRequestHeader(E,w)}),p.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),l&&([_,b]=Se(l,!0),g.addEventListener("progress",_)),u&&g.upload&&([c,h]=Se(u),g.upload.addEventListener("progress",c),g.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(f=v=>{g&&(r(!v||v.type?new ee(null,e,g):v),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const S=zr(o.url);if(S&&F.protocols.indexOf(S)===-1){r(new L("Unsupported protocol "+S+":",L.ERR_BAD_REQUEST,e));return}g.send(s||null)})},Gr=(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 f=l instanceof Error?l:this.reason;r.abort(f instanceof L?f:new ee(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new L(`timeout ${t} of ms exceeded`,L.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:u}=r;return u.unsubscribe=()=>p.asap(a),u}},Kr=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},Xr=async function*(e,t){for await(const n of Zr(e))yield*Kr(n,t)},Zr=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()}},_t=(e,t,n,r)=>{const o=Xr(e,t);let s=0,i,a=u=>{i||(i=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:f}=await o.next();if(l){a(),u.close();return}let c=f.byteLength;if(n){let _=s+=c;n(_)}u.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Me=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",rn=Me&&typeof ReadableStream=="function",Yr=Me&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),on=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Qr=rn&&on(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gt=64*1024,We=rn&&on(()=>p.isReadableStream(new Response("").body)),we={stream:We&&(e=>e.body)};Me&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!we[t]&&(we[t]=p.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new L(`Response type '${t}' is not supported`,L.ERR_NOT_SUPPORT,r)})})})(new Response);const eo=async e=>{if(e==null)return 0;if(p.isBlob(e))return e.size;if(p.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(p.isArrayBufferView(e)||p.isArrayBuffer(e))return e.byteLength;if(p.isURLSearchParams(e)&&(e=e+""),p.isString(e))return(await Yr(e)).byteLength},to=async(e,t)=>{const n=p.toFiniteNumber(e.getContentLength());return n??eo(t)},no=Me&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:l,headers:f,withCredentials:c="same-origin",fetchOptions:_}=nn(e);l=l?(l+"").toLowerCase():"text";let h=Gr([o,s&&s.toAbortSignal()],i),b;const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(u&&Qr&&n!=="get"&&n!=="head"&&(g=await to(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(p.isFormData(r)&&(C=E.headers.get("content-type"))&&f.setContentType(C),E.body){const[N,$]=pt(g,Se(ht(u)));r=_t(E.body,gt,N,$)}}p.isString(c)||(c=c?"include":"omit");const x="credentials"in Request.prototype;b=new Request(t,{..._,signal:h,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?c:void 0});let S=await fetch(b,_);const v=We&&(l==="stream"||l==="response");if(We&&(a||v&&y)){const E={};["status","statusText","headers"].forEach(W=>{E[W]=S[W]});const C=p.toFiniteNumber(S.headers.get("content-length")),[N,$]=a&&pt(C,Se(ht(a),!0))||[];S=new Response(_t(S.body,gt,N,()=>{$&&$(),y&&y()}),E)}l=l||"text";let w=await we[p.findKey(we,l)||"text"](S,e);return!v&&y&&y(),await new Promise((E,C)=>{en(E,C,{data:w,headers:I.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:b})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/Load failed|fetch/i.test(x.message)?Object.assign(new L("Network Error",L.ERR_NETWORK,e,b),{cause:x.cause||x}):L.from(x,x&&x.code,e,b)}}),qe={http:gr,xhr:Vr,fetch:no};p.forEach(qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bt=e=>`- ${e}`,ro=e=>p.isFunction(e)||e===null||e===!1,sn={getAdapter:e=>{e=p.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,!ro(n)&&(r=qe[(i=String(n)).toLowerCase()],r===void 0))throw new L(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+s]=r}if(!r){const s=Object.entries(o).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
|
|
4
|
+
`+s.map(bt).join(`
|
|
5
|
+
`):" "+bt(s[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:qe};function ze(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ee(null,e)}function yt(e){return ze(e),e.headers=I.from(e.headers),e.data=De.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sn.getAdapter(e.adapter||ue.adapter)(e).then(function(r){return ze(e),r.data=De.call(e,e.transformResponse,r),r.headers=I.from(r.headers),r},function(r){return Qt(r)||(ze(e),r&&r.response&&(r.response.data=De.call(e,e.transformResponse,r.response),r.response.headers=I.from(r.response.headers))),Promise.reject(r)})}const an="1.10.0",Be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Be[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xt={};Be.transitional=function(t,n,r){function o(s,i){return"[Axios v"+an+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new L(o(i," has been removed"+(n?" in "+n:"")),L.ERR_DEPRECATED);return n&&!xt[i]&&(xt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};Be.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function oo(e,t,n){if(typeof e!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const a=e[s],u=a===void 0||i(a,s,e);if(u!==!0)throw new L("option "+s+" must be "+u,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+s,L.ERR_BAD_OPTION)}}const ge={assertOptions:oo,validators:Be},H=ge.validators;let V=class{constructor(t){this.defaults=t||{},this.interceptors={request:new dt,response:new dt}}async request(t,n){try{return await this._request(t,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+=`
|
|
6
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=G(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&ge.assertOptions(r,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),o!=null&&(p.isFunction(o)?n.paramsSerializer={serialize:o}:ge.assertOptions(o,{encode:H.function,serialize:H.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ge.assertOptions(n,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=I.concat(i,s);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let f,c=0,_;if(!u){const b=[yt.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,l),_=b.length,f=Promise.resolve(n);c<_;)f=f.then(b[c++],b[c++]);return f}_=a.length;let h=n;for(c=0;c<_;){const b=a[c++],y=a[c++];try{h=b(h)}catch(g){y.call(this,g);break}}try{f=yt.call(this,h)}catch(b){return Promise.reject(b)}for(c=0,_=l.length;c<_;)f=f.then(l[c++],l[c++]);return f}getUri(t){t=G(this.defaults,t);const n=tn(t.baseURL,t.url,t.allowAbsoluteUrls);return Xt(n,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(n,r){return this.request(G(r||{},{method:t,url:n,data:(r||{}).data}))}});p.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(G(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}V.prototype[t]=n(),V.prototype[t+"Form"]=n(!0)});let io=class ln{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 ee(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 ln(function(o){t=o}),cancel:t}}};function so(e){return function(n){return e.apply(null,n)}}function ao(e){return p.isObject(e)&&e.isAxiosError===!0}const Je={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Je).forEach(([e,t])=>{Je[t]=e});function cn(e){const t=new V(e),n=Dt(V.prototype.request,t);return p.extend(n,V.prototype,t,{allOwnKeys:!0}),p.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return cn(G(e,o))},n}const M=cn(ue);M.Axios=V;M.CanceledError=ee;M.CancelToken=io;M.isCancel=Qt;M.VERSION=an;M.toFormData=Re;M.AxiosError=L;M.Cancel=M.CanceledError;M.all=function(t){return Promise.all(t)};M.spread=so;M.isAxiosError=ao;M.mergeConfig=G;M.AxiosHeaders=I;M.formToJSON=e=>Yt(p.isHTMLForm(e)?new FormData(e):e);M.getAdapter=sn.getAdapter;M.HttpStatusCode=Je;M.default=M;const{Axios:xi,AxiosError:Si,CanceledError:wi,isCancel:Li,CancelToken:Ai,VERSION:Ei,all:vi,Cancel:ki,isAxiosError:Ti,spread:Ci,toFormData:Ri,AxiosHeaders:Mi,HttpStatusCode:Bi,formToJSON:Fi,getAdapter:Oi,mergeConfig:Pi}=M;var de,T,un,q,St,dn,fn,pn,tt,Ve,Ge,se={},hn=[],lo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function j(e,t){for(var n in t)e[n]=t[n];return e}function nt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Z(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?de.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return oe(e,i,r,o,null)}function oe(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++un,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(s),s}function K(e){return e.children}function be(e,t){this.props=e,this.context=t}function Y(e,t){if(t==null)return e.__?Y(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Y(e):null}function mn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return mn(e)}}function wt(e){(!e.__d&&(e.__d=!0)&&q.push(e)&&!Le.__r++||St!=T.debounceRendering)&&((St=T.debounceRendering)||dn)(Le)}function Le(){for(var e,t,n,r,o,s,i,a=1;q.length;)q.length>a&&q.sort(fn),e=q.shift(),a=q.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=j({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),rt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??Y(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,bn(s,n,i),n.__e!=o&&mn(n)));Le.__r=0}function _n(e,t,n,r,o,s,i,a,u,l,f){var c,_,h,b,y,g,x=r&&r.__k||hn,S=t.length;for(u=co(n,t,x,u,S),c=0;c<S;c++)(h=n.__k[c])!=null&&(_=h.__i==-1?se:x[h.__i]||se,h.__i=c,g=rt(e,h,_,o,s,i,a,u,l,f),b=h.__e,h.ref&&_.ref!=h.ref&&(_.ref&&ot(_.ref,null,h),f.push(h.ref,h.__c||b,h)),y==null&&b!=null&&(y=b),4&h.__u||_.__k===h.__k?u=gn(h,u,e):typeof h.type=="function"&&g!==void 0?u=g:b&&(u=b.nextSibling),h.__u&=-7);return n.__e=y,u}function co(e,t,n,r,o){var s,i,a,u,l,f=n.length,c=f,_=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+_,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?oe(null,i,null,null,null):Fe(i)?oe(K,{children:i},null,null,null):i.constructor==null&&i.__b>0?oe(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,a=null,(l=i.__i=uo(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>f?_--:o<f&&_++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?_--:l==u+1?_++:(l>u?_--:_++,i.__u|=4))):e.__k[s]=null;if(c)for(s=0;s<f;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=Y(a)),xn(a,a));return r}function gn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=gn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Y(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function uo(e,t,n,r){var o,s,i=e.key,a=e.type,u=t[n];if(u===null&&e.key==null||u&&i==u.key&&a==u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(o=n-1,s=n+1;o>=0||s<t.length;){if(o>=0){if((u=t[o])&&(2&u.__u)==0&&i==u.key&&a==u.type)return o;o--}if(s<t.length){if((u=t[s])&&(2&u.__u)==0&&i==u.key&&a==u.type)return s;s++}}return-1}function Lt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||lo.test(t)?n:n+"px"}function fe(e,t,n,r,o){var s,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Lt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(pn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=tt,e.addEventListener(t,s?Ge:Ve,s)):e.removeEventListener(t,s?Ge:Ve,s);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function At(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=tt++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function rt(e,t,n,r,o,s,i,a,u,l){var f,c,_,h,b,y,g,x,S,v,w,E,C,N,$,W,Ie,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof U=="function")try{if(x=t.props,S="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],w=f?v?v.props.value:f.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:(S?t.__c=c=new U(x,w):(t.__c=c=new be(x,w),c.constructor=U,c.render=po),v&&v.sub(c),c.props=x,c.state||(c.state={}),c.context=w,c.__n=r,_=c.__d=!0,c.__h=[],c._sb=[]),S&&c.__s==null&&(c.__s=c.state),S&&U.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=j({},c.__s)),j(c.__s,U.getDerivedStateFromProps(x,c.__s))),h=c.props,b=c.state,c.__v=t,_)S&&U.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),S&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(S&&U.getDerivedStateFromProps==null&&x!==h&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,w),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,w)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(ne){ne&&(ne.__=t)}),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,w),S&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(h,b,y)})}if(c.context=w,c.props=x,c.__P=e,c.__e=!1,C=T.__r,N=0,S){for(c.state=c.__s,c.__d=!1,C&&C(t),f=c.render(c.props,c.state,c.context),$=0;$<c._sb.length;$++)c.__h.push(c._sb[$]);c._sb=[]}else do c.__d=!1,C&&C(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(r=j(j({},r),c.getChildContext())),S&&!_&&c.getSnapshotBeforeUpdate!=null&&(y=c.getSnapshotBeforeUpdate(h,b)),W=f,f!=null&&f.type===K&&f.key==null&&(W=yn(f.props.children)),a=_n(e,Fe(W)?W:[W],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),g&&(c.__E=c.__=null)}catch(ne){if(t.__v=null,u||s!=null)if(ne.then){for(t.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,t.__e=a}else for(Ie=s.length;Ie--;)nt(s[Ie]);else t.__e=n.__e,t.__k=n.__k;T.__e(ne,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=fo(n.__e,t,n,r,o,s,i,u,l);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function bn(e,t,n){for(var r=0;r<n.length;r++)ot(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){T.__e(s,o.__v)}})}function yn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Fe(e)?e.map(yn):j({},e)}function fo(e,t,n,r,o,s,i,a,u){var l,f,c,_,h,b,y,g=n.props,x=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(x);e=document.createElementNS(o,S,x.is&&x),a&&(T.__m&&T.__m(t,s),a=!1),s=null}if(S==null)g===x||a&&e.data==x||(e.data=x);else{if(s=s&&de.call(e.childNodes),g=n.props||se,!a&&s!=null)for(g={},l=0;l<e.attributes.length;l++)g[(h=e.attributes[l]).name]=h.value;for(l in g)if(h=g[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=h;else if(!(l in x)){if(l=="value"&&"defaultValue"in x||l=="checked"&&"defaultChecked"in x)continue;fe(e,l,null,h,o)}}for(l in x)h=x[l],l=="children"?_=h:l=="dangerouslySetInnerHTML"?f=h:l=="value"?b=h:l=="checked"?y=h:a&&typeof h!="function"||g[l]===h||fe(e,l,h,g[l],o);if(f)a||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),_n(t.type=="template"?e.content:e,Fe(_)?_:[_],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Y(n,0),a,u),s!=null)for(l=s.length;l--;)nt(s[l]);a||(l="value",S=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[l]||S=="progress"&&!b||S=="option"&&b!=g[l])&&fe(e,l,b,g[l],o),l="checked",y!=null&&y!=e[l]&&fe(e,l,y,g[l],o))}return e}function ot(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function xn(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ot(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){T.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&xn(r[o],t,n||typeof e.type!="function");n||nt(e.__e),e.__c=e.__=e.__e=void 0}function po(e,t,n){return this.constructor(e,n)}function Oe(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],rt(t,e=(!r&&n||t).__k=Z(K,null,[e]),o||se,se,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?de.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),bn(s,e,i)}function Sn(e,t){Oe(e,t,Sn)}function wn(e,t,n){var r,o,s,i,a=j({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?r=t[s]:s=="ref"?o=t[s]:a[s]=t[s]===void 0&&i!=null?i[s]:t[s];return arguments.length>2&&(a.children=arguments.length>3?de.call(arguments,2):n),oe(e.type,a,r||e.key,o||e.ref,null)}de=hn.slice,T={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},un=0,be.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=j({},this.state),typeof e=="function"&&(e=e(j({},n),this.props)),e&&j(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wt(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wt(this))},be.prototype.render=K,q=[],dn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fn=function(e,t){return e.__v.__b-t.__v.__b},Le.__r=0,pn=/(PointerCapture)$|Capture$/i,tt=0,Ve=At(!1),Ge=At(!0);var ho=0;function m(e,t,n,r,o,s){t||(t={});var i,a,u=t;if("ref"in u)for(a in u={},t)a=="ref"?i=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ho,__i:-1,__u:0,__source:o,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(a in i)u[a]===void 0&&(u[a]=i[a]);return T.vnode&&T.vnode(l),l}var ae,R,Ue,Et,Ae=0,Ln=[],B=T,vt=B.__b,kt=B.__r,Tt=B.diffed,Ct=B.__c,Rt=B.unmount,Mt=B.__;function it(e,t){B.__h&&B.__h(R,e,Ae||t),Ae=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function O(e){return Ae=1,mo(En,e)}function mo(e,t,n){var r=it(ae++,2);if(r.t=e,!r.__c&&(r.__=[En(void 0,t),function(a){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,a);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,u,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(_){return!!_.__c});if(f.every(function(_){return!_.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return f.forEach(function(_){if(_.__N){var h=_.__[0];_.__=_.__N,_.__N=void 0,h!==_.__[0]&&(c=!0)}}),s&&s.call(this,a,u,l)||c};R.__f=!0;var s=R.shouldComponentUpdate,i=R.componentWillUpdate;R.componentWillUpdate=function(a,u,l){if(this.__e){var f=s;s=void 0,o(a,u,l),s=f}i&&i.call(this,a,u,l)},R.shouldComponentUpdate=o}return r.__N||r.__}function le(e,t){var n=it(ae++,3);!B.__s&&An(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function Ee(e){return Ae=5,_o(function(){return{current:e}},[])}function _o(e,t){var n=it(ae++,7);return An(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function go(){for(var e;e=Ln.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ye),e.__H.__h.forEach(Ke),e.__H.__h=[]}catch(t){e.__H.__h=[],B.__e(t,e.__v)}}B.__b=function(e){R=null,vt&&vt(e)},B.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Mt&&Mt(e,t)},B.__r=function(e){kt&&kt(e),ae=0;var t=(R=e.__c).__H;t&&(Ue===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ye),t.__h.forEach(Ke),t.__h=[],ae=0)),Ue=R},B.diffed=function(e){Tt&&Tt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ln.push(t)!==1&&Et===B.requestAnimationFrame||((Et=B.requestAnimationFrame)||bo)(go)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ue=R=null},B.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ye),n.__h=n.__h.filter(function(r){return!r.__||Ke(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],B.__e(r,n.__v)}}),Ct&&Ct(e,t)},B.unmount=function(e){Rt&&Rt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ye(r)}catch(o){t=o}}),n.__H=void 0,t&&B.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function bo(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function ye(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function Ke(e){var t=R;e.__c=e.__(),R=t}function An(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function En(e,t){return typeof t=="function"?t(e):t}var Pe=(e=>(e.ZH="zh",e.EN="en",e))(Pe||{}),D=(e=>(e.WHITE="white",e.DARK="dark",e))(D||{}),X=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(X||{}),d=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(d||{});const Ft={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function yo(){return k("theme")===D.WHITE?Ft.white:Ft.dark}class xo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=yo(),a=document.createElement("div");if(a.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: ${i.closeColor};
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,l.onclick=()=>{document.body.removeChild(a)},a.appendChild(l)}document.body.appendChild(a),o!==0&&setTimeout(()=>{document.body.contains(a)&&document.body.removeChild(a)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const
|
|
45
|
+
`,l.onclick=()=>{document.body.removeChild(a)},a.appendChild(l)}document.body.appendChild(a),o!==0&&setTimeout(()=>{document.body.contains(a)&&document.body.removeChild(a)},o||3e3)}success(t){this.show("success",t)}error(t){this.show("error",t)}warning(t){this.show("warning",t)}info(t){this.show("info",t)}}const Xe=new xo;function So(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case X.DEV:case X.DEVELOPMENT:r="/api";break;case X.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case X.PROD:case X.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:s=1e4,onError:i}=e,a=M.create({baseURL:o,timeout:s});return a.interceptors.request.use(u=>{const{token:l,locale:f}=t;return u.headers={...u.headers,Authorization:l,"x-locale":f===Pe.ZH?"zh-CN":"en-US"},u}),a.interceptors.response.use(u=>{if(u.data&&u.data.code===0)return u.data;const l=u.data?.msg||u.data?.message||"未知错误";return Xe.error(l),i&&i(l,u),Promise.reject(u.data||{message:"未知错误"})},u=>{const l=u.response?.data?.msg||u.response?.data?.message||u.message||"网络请求失败";return Xe.error(l),i&&i(l,u),Promise.reject(u)}),a}let xe=null;function te(){return xe||(xe=So()),xe}function wo(){xe=null}function vn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return te().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r})}const Lo=async()=>te().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Ao=async(e,t)=>te().post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),Eo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return te().post("/offline/recharge/create",n,{})},vo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return te().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},ko=async e=>te().get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);async function To(){let e=JSON.parse(sessionStorage.getItem("balanceData")||"{}");return e&&Object.keys(e).length>0||(e=await vn()),e}function Co(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:s=D.WHITE,locale:i=Pe.ZH,env:a,size:u,themeConfig:l}=e;console.log(e,"InitParams1111");const f="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:f,theme:s,locale:i,env:a,size:u,themeConfig:l})),wo(),Lo(),{token:f,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:s,locale:i,env:a,size:u}}function k(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function kn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});document.dispatchEvent(e)}const Ro={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function Mo(){const e=k("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===d.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===d.SMALL?12:16,fontWeight:600}}}function Bo(e){const t=k("theme"),n=k("themeConfig"),r=t===D.WHITE,o=Mo();let s=e;return!s&&n&&(s=(r?n.white:n.dark)?.color),r?{...o.white,background:s||o.white.background}:{...o.dark,background:s||o.dark.background}}function Tn({onClick:e,color:t,children:n}){const r=Bo(t);return m("button",{style:r,onClick:e,type:"button",children:n})}const Fo={确定:"确定",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Oo(e){return Fo[e]||e}const Po={确定:"Confirm",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function Io(e){return Po[e]||e}function No(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Pe.ZH}function A(e){return No()==="zh"?Oo(e):Io(e)}const Ot={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function Do(){const e=k("theme"),t=k("themeConfig"),n=e===D.WHITE,r=n?Ot.white:Ot.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(s,i,a)=>({...r.option(s,i,a),color:i?r.option(s,i,a).color:s?o.color:r.option(s,i,a).color})}}return r}const Ze=({value:e,onChange:t,options:n,placeholder:r,style:o,error:s,disabled:i,dropdownStyle:a,className:u,dropdownClassName:l,children:f})=>{const[c,_]=O(!1),h=Ee(null),[b,y]=O(null),g=Do(),x=k("size");le(()=>{if(!c)return;const w=E=>{h.current&&!h.current.contains(E.target)&&_(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[c]);const S=n.find(w=>w.value===e),v=()=>s?g.triggerError:i?g.triggerDisabled:g.trigger;return m("div",{ref:h,className:u,style:{position:"relative",...o},children:[m("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: ${g.scrollbarThumb} ${g.scrollbarTrack};
|
|
49
49
|
}
|
|
50
50
|
.custom-select-dropdown::-webkit-scrollbar {
|
|
51
|
-
width: ${
|
|
51
|
+
width: ${x===d.SMALL?6:8}px;
|
|
52
52
|
}
|
|
53
53
|
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
54
54
|
border-radius: 4px;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
58
|
background: ${g.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),m("div",{onClick:()=>!i&&_(w=>!w),style:{minHeight:P===f.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:P===f.SMALL?"0 10px":"0 12px",fontSize:P===f.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...S(),...o},tabIndex:0,children:[m("span",{style:{flex:1},children:x?x.label:m("span",{style:g.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:P===f.SMALL?16:20,height:P===f.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&m("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:P===f.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:g.boxShadow,maxHeight:P===f.SMALL?160:220,overflowY:"auto",...g.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:P===f.SMALL?80:120,width:"100%",userSelect:"none"},children:[m("svg",{width:P===f.SMALL?48:64,height:P===f.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:A("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:P===f.SMALL?12:15},children:A("暂无数据")})]}),n.map((w,k)=>m("div",{onClick:()=>{w.disabled||(_(!1),t?.(w.value))},onMouseEnter:()=>y(k),onMouseLeave:()=>y(null),style:{padding:P===f.SMALL?"6px 10px":"10px 16px",fontSize:P===f.SMALL?12:15,cursor:w.disabled?"not-allowed":"pointer",fontWeight:e===w.value?600:400,opacity:w.disabled?.6:1,...g.option(e===w.value,!!w.disabled,b===k)},children:w.label},w.value))]}),d]})};function jo(){const e=E("size");return{white:{label:{marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===f.SMALL?"6px 16px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 16px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===f.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===f.SMALL?12:14,color:"#52c41a"}},dark:{label:{marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 16px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 16px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===f.SMALL?16:24,padding:e===f.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===f.SMALL?12:14,color:"#52c41a"}}}}function $o(){const e=E("theme"),t=E("themeConfig"),n=e===D.WHITE,r=jo(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}function Wo(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function qo(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const Jo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(_=>_.payment_support)||[],[a,u]=F(""),[l,d]=F(!1),c=$o();return de(()=>{e.currency&&e.amount&&e.rechargeChannel?Ro({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(_=>{u(_),d(!0)}).catch(_=>{console.error("计算支付金额失败:",_),d(!1)}):d(!1)},[e.currency,e.amount,e.rechargeChannel]),m(Q,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值币种")]}),m(et,{value:e.currency,onChange:_=>{t(h=>({...h,currency:_}))},options:s?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值金额")]}),m("input",{type:"text",placeholder:A("请输入充值金额"),value:e.amount,onInput:_=>{let h=_.target.value;h=Wo(h);let b="";if(h&&!h.endsWith(".")){let y=parseFloat(h);if(!isNaN(y)&&(y<1&&(y=1),y>999999.99&&(y=999999.99),h=y.toString(),/\./.test(_.target.value))){const g=_.target.value.split(".")[1];g!==void 0&&g.length>0&&(h=y.toFixed(Math.min(g.length,2)))}}t(y=>({...y,amount:h,amountError:b}))},onBlur:_=>{let h=_.target.value;h=qo(h),t(b=>({...b,amount:h,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("支付平台")]}),m(et,{value:e.rechargeChannel,onChange:_=>{t(h=>({...h,rechargeChannel:_,rechargeChannelError:_?"":h.rechargeChannelError}))},options:i?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&m("div",{style:c.feeTip,children:[i.find(_=>_.value===e.rechargeChannel)?.label||e.rechargeChannel,A("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:A(r?"提交中...":"去支付")})]})]})};function Vo(){const e=E("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 10px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===f.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 10px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"}}}}function Go(){const t=E("theme")===D.WHITE,n=Vo();return t?n.white:n.dark}const J=E("size"),Ko=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=Te(null),[a,u]=F(!1),[l,d]=F(0),c=Go(),_=async b=>{const y=Array.from(b.target.files).slice(0,n);if(!y.length)return;u(!0);const g=[];for(let x=0;x<y.length;x++){d(0);const S=new FormData;S.append("file",y[x]);try{const w=await ko(S,k=>d(k));w&&g.push(w)}catch{}}u(!1),d(0),t?.([...e,...g]),i.current&&(i.current.value="")},h=b=>{const y=e.filter((g,x)=>x!==b);t?.(y)};return m("div",{children:[m("div",{style:{...c.container,cursor:s?"not-allowed":c.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[m("div",{style:{fontSize:J===f.SMALL?32:48,marginBottom:J===f.SMALL?8:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:J===f.SMALL?12:15,marginBottom:J===f.SMALL?4:8},children:A("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:J===f.SMALL?12:13},children:[A("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",A("个文件")]}),m("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:_,disabled:s}),a&&m("div",{style:{marginTop:J===f.SMALL?8:12,color:"#1677ff"},children:[A("正在上传...")," ",l,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:J===f.SMALL?8:12},children:e.map((b,y)=>m("div",{style:c.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:b.split("/").pop()})}),m("button",{type:"button",onClick:g=>{g.stopPropagation(),h(y)},style:c.removeBtn,disabled:s,children:A("移除")})]},b))})]})};function Xo(){const e=E("size");return{white:{label:{marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"}},dark:{label:{marginBottom:e===f.SMALL?4:8,fontSize:e===f.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===f.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===f.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===f.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===f.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===f.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===f.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===f.SMALL?"8px 10px":"12px 16px",marginBottom:e===f.SMALL?6:8,fontSize:e===f.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",fontSize:e===f.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"8px 24px",fontSize:e===f.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===f.SMALL?"6px 18px":"4px 14px",fontSize:e===f.SMALL?12:15,marginLeft:e===f.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===f.SMALL?12:13,marginTop:e===f.SMALL?2:4,textAlign:"left"}}}}function Zo(){const e=E("theme"),t=E("themeConfig"),n=e===D.WHITE,r=Xo(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}const Qo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],i=Zo();return m("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(d=>({...d,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(d=>({...d,platformError:A("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(d=>({...d,transactionIdError:A("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(d=>({...d,filesError:A("请上传转账凭证")})),l=!1),l&&(await To({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ye.success(A("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("第三方支付平台")]}),m(et,{value:e.platform,onChange:u=>{t(l=>({...l,platform:u,platformError:u?"":l.platformError}))},options:[...s?.map(u=>({value:u.value,label:u.label}))],placeholder:A("请选择支付平台")}),e.platformError&&m("div",{style:i.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("交易ID")]}),m("input",{type:"text",placeholder:A("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let l=u.target.value;l.length>200&&(l=l.slice(0,200)),t(d=>({...d,transactionId:l,transactionIdError:l?"":d.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&m("div",{style:i.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("上传文件")]}),m(Ko,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:i.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:i.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:A("确定")})]})]})};function Yo(){const e=E("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===f.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===f.SMALL?16:24,height:e===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===f.SMALL?16:18,fontWeight:"600",marginBottom:e===f.SMALL?16:24,color:"#222"},tabBtn:(t,n)=>({flex:1,padding:e===f.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===f.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===f.SMALL?"12px":"16px",right:e===f.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===f.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===f.SMALL?16:24,height:e===f.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===f.SMALL?16:18,fontWeight:"600",marginBottom:e===f.SMALL?16:24,color:"#F5F6FA"},tabBtn:(t,n)=>({flex:1,padding:e===f.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===f.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function ei(){const t=E("theme")===D.WHITE,n=Yo();return t?n.white:n.dark}const _e=E("size");function ti({visible:e,onClose:t,title:n,children:r,width:o=_e===f.SMALL?300:400,maxWidth:s=_e===f.SMALL?300:400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=F(!1),d=ei(),c=h=>{h.target===h.currentTarget?l(!0):l(!1)},_=h=>{h.target===h.currentTarget&&u&&a&&t(),l(!1)};return e?m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:d.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:c,onMouseUp:_,children:m("div",{style:{background:d.modalBg,padding:_e===f.SMALL?24:32,borderRadius:_e===f.SMALL?8:12,minWidth:o,maxWidth:s,color:d.modalColor,boxShadow:d.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[i&&m("button",{type:"button",onClick:t,style:d.closeBtn,"aria-label":"关闭",children:"×"}),n&&m("div",{style:d.title,children:n}),r]})}):null}function ni(){const e=E("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===f.SMALL?12:16,height:e===f.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===f.SMALL?12:16,height:e===f.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function ri(){const e=E("theme"),t=E("themeConfig"),n=e===D.WHITE,r=ni(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,tabBtn:(i,a)=>({...o.tabBtn(i,a),color:i?s.color:o.tabBtn(i,a).color})}}return o}const oi=E("size");function ii({visible:e,onClose:t,onSubmit:n}){const[r,o]=F({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=F({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,u]=F("online"),l=ri();de(()=>{e||(u("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const d=async c=>{c.preventDefault();let _=!0;if(o(h=>({...h,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(h=>({...h,amountError:A("请输入充值金额")})),_=!1),r.rechargeChannel||(o(h=>({...h,rechargeChannelError:A("请选择支付平台")})),_=!1),!!_){o(h=>({...h,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(h=>({...h,error:A("提交失败,请重试")}))}finally{o(h=>({...h,loading:!1}))}}};return m(ti,{visible:e,onClose:t,title:A("充值 / 转账"),children:[m("div",{style:{display:"flex",marginBottom:oi===f.SMALL?16:28},children:[m("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:A("在线充值")}),m("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:A("线下转账")})]}),a==="online"?m("form",{onSubmit:d,children:m(Jo,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):m(Qo,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function ct(){return(ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var si=["context","children"];function ai(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},u=Object.keys(r);for(i=0;i<u.length;i++)o.indexOf(s=u[i])>=0||(a[s]=r[s]);return a}(e,si);return En(t,n)}function li(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ee(ai,ct({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,u=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[Bn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),d=u[i].slot;d?s[d]=ee(Dt,{name:d},l):o[i]=l}var c=r?ee(Dt,null,o):o;return ee(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?An:Ne)(this._vdom,this._root)}function Bn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function ci(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Bn(e)]=n,this._vdom=En(this._vdom,r),Ne(this._vdom,this._root)}}function ui(){Ne(this._vdom=null,this._root)}function Dt(e,t){var n=this;return ee("slot",ct({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function ut(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=li,o.prototype.attributeChangedCallback=ci,o.prototype.disconnectedCallback=ui,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function di(){const[e,t]=F(!1),n=async r=>{const o=await Co({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(Mn,{onClick:()=>t(!0),children:A("充值/转账")}),m(ii,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}ut(di,"best-recharge",["theme"],{shadow:!1});const zt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function fi(){return E("theme")===D.WHITE?zt.white:zt.dark}const V=E("size"),pi=({popover:e,children:t,popoverWidth:n=V===f.SMALL?200:300,popoverMinWidth:r=V===f.SMALL?150:200,offsetY:o=V===f.SMALL?8:16,offsetX:s=V===f.SMALL?8:16,popoverPosition:i="top"})=>{const[a,u]=F(!1),[l,d]=F(i),c=Te(null),_=Te(null),h=fi(),b=()=>{if(_.current&&(clearTimeout(_.current),_.current=null),i==="top"||i==="bottom")if(c.current){const S=c.current.getBoundingClientRect();i==="top"&&S.top<100?d("bottom"):i==="bottom"&&window.innerHeight-S.bottom<100?d("top"):d(i)}else d(i);else d(i);u(!0)},y=()=>{_.current=window.setTimeout(()=>{u(!1)},120)};let g={position:"absolute",zIndex:999,borderRadius:6,fontSize:V===f.SMALL?12:15,minWidth:r,width:n,padding:V===f.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...h.popover},x={position:"absolute",zIndex:11,width:0,height:0};return l==="top"?(g={...g,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${h.arrow.top}`}):l==="bottom"?(g={...g,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${h.arrow.bottom}`}):l==="leftTop"?(g={...g,right:"100%",top:0,marginRight:s,transform:"none"},x={...x,right:-8,top:V===f.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${h.arrow.left}`}):l==="rightTop"&&(g={...g,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${h.arrow.right}`}),m("div",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:b,onMouseLeave:y,children:[t,a&&m("div",{style:g,onMouseEnter:b,onMouseLeave:y,children:[e,m("div",{style:x})]})]})};function hi(){const e=E("size");return{white:{popoverTitle:{fontSize:e===f.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===f.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===f.SMALL?6:8,height:e===f.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===f.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===f.SMALL?12:15}),main:{fontSize:e===f.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===f.SMALL?16:18,color:"#6b7280",marginLeft:e===f.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===f.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===f.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===f.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===f.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===f.SMALL?6:8,height:e===f.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===f.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===f.SMALL?12:15}),main:{fontSize:e===f.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===f.SMALL?16:18,color:"#B5B8BE",marginLeft:e===f.SMALL?6:8,fontWeight:600}}}}function mi(){const t=E("theme")===D.WHITE,n=hi();return t?n.white:n.dark}function Ut(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function _i(e){const[t,n]=F({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await Cn(),a=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],u={available:i.availableAmount,currency:"USD",symbol:"$",details:a};n(u)}catch(i){console.error("获取余额失败:",i)}};de(()=>{r()},[]),de(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=mi(),s=[{label:A("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:A("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:A("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:A("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:A("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return m(pi,{popover:m(Q,{children:[m("div",{style:o.popoverTitle,children:A("余额详情")}),s.map(i=>m("div",{style:o.detailRow,children:[m("span",{style:o.detailLabel,children:[m("span",{style:o.detailDot(i.dot)}),i.label]}),m("span",{style:o.detailValue(i.color),children:[t.symbol,Ut(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:o.main,children:[t.symbol,Ut(t.available),m("span",{style:o.currency,children:t.currency})]})})}ut(_i,"best-statistical-balance");const ge={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function gi(e){return E("theme")===D.WHITE?{...ge.white,background:e||ge.white.background}:{...ge.dark,background:e||ge.dark.background}}function bi(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function yi({color:e,size:t="medium",children:n}){const[r,o]=F(!1),s=gi(e),i=bi(t),a={...s,...i,display:"flex",alignItems:"center"};return m(Q,{children:[m("style",{children:`
|
|
60
|
+
`}),m("div",{onClick:()=>!i&&_(w=>!w),style:{minHeight:x===d.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:x===d.SMALL?"0 10px":"0 12px",fontSize:x===d.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...v(),...o},tabIndex:0,children:[m("span",{style:{flex:1},children:S?S.label:m("span",{style:g.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:x===d.SMALL?16:20,height:x===d.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&m("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:x===d.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:g.boxShadow,maxHeight:x===d.SMALL?160:220,overflowY:"auto",...g.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:x===d.SMALL?80:120,width:"100%",userSelect:"none"},children:[m("svg",{width:x===d.SMALL?48:64,height:x===d.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:A("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:x===d.SMALL?12:15},children:A("暂无数据")})]}),n.map((w,E)=>m("div",{onClick:()=>{w.disabled||(_(!1),t?.(w.value))},onMouseEnter:()=>y(E),onMouseLeave:()=>y(null),style:{padding:x===d.SMALL?"6px 10px":"10px 16px",fontSize:x===d.SMALL?12:15,cursor:w.disabled?"not-allowed":"pointer",fontWeight:e===w.value?600:400,opacity:w.disabled?.6:1,...g.option(e===w.value,!!w.disabled,b===E)},children:w.label},w.value))]}),f]})};function zo(){const e=k("size");return{white:{label:{marginBottom:e===d.SMALL?6:8,fontSize:e===d.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===d.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===d.SMALL?12:13,marginTop:e===d.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===d.SMALL?"6px 16px":"8px 24px",fontSize:e===d.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 16px":"8px 24px",fontSize:e===d.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===d.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===d.SMALL?12:14,color:"#52c41a"}},dark:{label:{marginBottom:e===d.SMALL?6:8,fontSize:e===d.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===d.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===d.SMALL?12:13,marginTop:e===d.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 16px":"8px 24px",fontSize:e===d.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 16px":"8px 24px",fontSize:e===d.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===d.SMALL?16:24,padding:e===d.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===d.SMALL?12:14,color:"#52c41a"}}}}function Uo(){const e=k("theme"),t=k("themeConfig"),n=e===D.WHITE,r=zo(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}function Ho(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function jo(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const $o=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=o?.currency||[],i=o?.channel?.filter(_=>_.payment_support)||[],[a,u]=O(""),[l,f]=O(!1),c=Uo();return le(()=>{e.currency&&e.amount&&e.rechargeChannel?ko({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(_=>{u(_),f(!0)}).catch(_=>{console.error("计算支付金额失败:",_),f(!1)}):f(!1)},[e.currency,e.amount,e.rechargeChannel]),m(K,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值币种")]}),m(Ze,{value:e.currency,onChange:_=>{t(h=>({...h,currency:_}))},options:s?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("充值金额")]}),m("input",{type:"text",placeholder:A("请输入充值金额"),value:e.amount,onInput:_=>{let h=_.target.value;h=Ho(h);let b="";if(h&&!h.endsWith(".")){let y=parseFloat(h);if(!isNaN(y)&&(y<1&&(y=1),y>999999.99&&(y=999999.99),h=y.toString(),/\./.test(_.target.value))){const g=_.target.value.split(".")[1];g!==void 0&&g.length>0&&(h=y.toFixed(Math.min(g.length,2)))}}t(y=>({...y,amount:h,amountError:b}))},onBlur:_=>{let h=_.target.value;h=jo(h),t(b=>({...b,amount:h,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&m("div",{style:c.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("支付平台")]}),m(Ze,{value:e.rechargeChannel,onChange:_=>{t(h=>({...h,rechargeChannel:_,rechargeChannelError:_?"":h.rechargeChannelError}))},options:i?.map(_=>({value:_.value,label:_.label})),placeholder:A("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&m("div",{style:c.feeTip,children:[i.find(_=>_.value===e.rechargeChannel)?.label||e.rechargeChannel,A("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:A(r?"提交中...":"去支付")})]})]})};function Wo(){const e=k("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===d.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===d.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===d.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===d.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===d.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 10px":"4px 14px",fontSize:e===d.SMALL?12:15,marginLeft:e===d.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===d.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===d.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===d.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===d.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===d.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 10px":"4px 14px",fontSize:e===d.SMALL?12:15,marginLeft:e===d.SMALL?8:16,cursor:"pointer"}}}}function qo(){const t=k("theme")===D.WHITE,n=Wo();return t?n.white:n.dark}const Jo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=k("size"),a=Ee(null),[u,l]=O(!1),[f,c]=O(0),_=qo(),h=async y=>{const g=Array.from(y.target.files).slice(0,n);if(!g.length)return;l(!0);const x=[];for(let S=0;S<g.length;S++){c(0);const v=new FormData;v.append("file",g[S]);try{const w=await Ao(v,E=>c(E));w&&x.push(w)}catch{}}l(!1),c(0),t?.([...e,...x]),a.current&&(a.current.value="")},b=y=>{const g=e.filter((x,S)=>S!==y);t?.(g)};return m("div",{children:[m("div",{style:{..._.container,cursor:s?"not-allowed":_.container.cursor,opacity:s?.6:1},onClick:()=>!s&&a.current?.click(),children:[m("div",{style:{fontSize:i===d.SMALL?32:48,marginBottom:i===d.SMALL?8:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:i===d.SMALL?12:15,marginBottom:i===d.SMALL?4:8},children:A("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:i===d.SMALL?12:13},children:[A("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",A("个文件")]}),m("input",{ref:a,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:h,disabled:s}),u&&m("div",{style:{marginTop:i===d.SMALL?8:12,color:"#1677ff"},children:[A("正在上传...")," ",f,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:i===d.SMALL?8:12},children:e.map((y,g)=>m("div",{style:_.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()})}),m("button",{type:"button",onClick:x=>{x.stopPropagation(),b(g)},style:_.removeBtn,disabled:s,children:A("移除")})]},y))})]})};function Vo(){const e=k("size");return{white:{label:{marginBottom:e===d.SMALL?6:8,fontSize:e===d.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===d.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===d.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===d.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===d.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===d.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===d.SMALL?"8px 10px":"12px 16px",marginBottom:e===d.SMALL?6:8,fontSize:e===d.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===d.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 18px":"4px 14px",fontSize:e===d.SMALL?12:15,marginLeft:e===d.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===d.SMALL?12:13,marginTop:e===d.SMALL?2:4,textAlign:"left"}},dark:{label:{marginBottom:e===d.SMALL?4:8,fontSize:e===d.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===d.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===d.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===d.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===d.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===d.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===d.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===d.SMALL?"8px 10px":"12px 16px",marginBottom:e===d.SMALL?6:8,fontSize:e===d.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 18px":"8px 24px",fontSize:e===d.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 18px":"8px 24px",fontSize:e===d.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===d.SMALL?"6px 18px":"4px 14px",fontSize:e===d.SMALL?12:15,marginLeft:e===d.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===d.SMALL?12:13,marginTop:e===d.SMALL?2:4,textAlign:"left"}}}}function Go(){const e=k("theme"),t=k("themeConfig"),n=e===D.WHITE,r=Vo(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const s=n?t.white:t.dark;if(s?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:s.color}}}return o}const Ko=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const s=o?.channel||[],i=Go();return m("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(f=>({...f,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(f=>({...f,platformError:A("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(f=>({...f,transactionIdError:A("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(f=>({...f,filesError:A("请上传转账凭证")})),l=!1),l&&(await Eo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Xe.success(A("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("第三方支付平台")]}),m(Ze,{value:e.platform,onChange:u=>{t(l=>({...l,platform:u,platformError:u?"":l.platformError}))},options:[...s?.map(u=>({value:u.value,label:u.label}))],placeholder:A("请选择支付平台")}),e.platformError&&m("div",{style:i.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("交易ID")]}),m("input",{type:"text",placeholder:A("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let l=u.target.value;l.length>200&&(l=l.slice(0,200)),t(f=>({...f,transactionId:l,transactionIdError:l?"":f.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&m("div",{style:i.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:i.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",A("上传文件")]}),m(Jo,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:i.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:i.buttonCancel,children:A("取消")}),m("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:A("确定")})]})]})};function Xo(){const e=k("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===d.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===d.SMALL?16:24,height:e===d.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===d.SMALL?16:18,fontWeight:"600",marginBottom:e===d.SMALL?16:24,color:"#222"},tabBtn:(t,n)=>({flex:1,padding:e===d.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===d.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===d.SMALL?"12px":"16px",right:e===d.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===d.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===d.SMALL?16:24,height:e===d.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===d.SMALL?16:18,fontWeight:"600",marginBottom:e===d.SMALL?16:24,color:"#F5F6FA"},tabBtn:(t,n)=>({flex:1,padding:e===d.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===d.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function Zo(){const t=k("theme")===D.WHITE,n=Xo();return t?n.white:n.dark}const pe=k("size");function Yo({visible:e,onClose:t,title:n,children:r,width:o=pe===d.SMALL?300:400,maxWidth:s=pe===d.SMALL?300:400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=O(!1),f=Zo(),c=h=>{h.target===h.currentTarget?l(!0):l(!1)},_=h=>{h.target===h.currentTarget&&u&&a&&t(),l(!1)};return e?m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:f.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:c,onMouseUp:_,children:m("div",{style:{background:f.modalBg,padding:pe===d.SMALL?24:32,borderRadius:pe===d.SMALL?8:12,minWidth:o,maxWidth:s,color:f.modalColor,boxShadow:f.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[i&&m("button",{type:"button",onClick:t,style:f.closeBtn,"aria-label":"关闭",children:"×"}),n&&m("div",{style:f.title,children:n}),r]})}):null}function Qo(){const e=k("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===d.SMALL?12:16,height:e===d.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===d.SMALL?12:16,height:e===d.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function ei(){const e=k("theme"),t=k("themeConfig"),n=e===D.WHITE,r=Qo(),o=n?r.white:r.dark;if(t){const s=n?t.white:t.dark;if(s?.color)return{...o,tabBtn:(i,a)=>({...o.tabBtn(i,a),color:i?s.color:o.tabBtn(i,a).color})}}return o}const ti=k("size");function ni({visible:e,onClose:t,onSubmit:n}){const[r,o]=O({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=O({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,u]=O("online"),l=ei();le(()=>{e||(u("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const f=async c=>{c.preventDefault();let _=!0;if(o(h=>({...h,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(h=>({...h,amountError:A("请输入充值金额")})),_=!1),r.rechargeChannel||(o(h=>({...h,rechargeChannelError:A("请选择支付平台")})),_=!1),!!_){o(h=>({...h,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(h=>({...h,error:A("提交失败,请重试")}))}finally{o(h=>({...h,loading:!1}))}}};return m(Yo,{visible:e,onClose:t,title:A("充值 / 转账"),children:[m("div",{style:{display:"flex",marginBottom:ti===d.SMALL?16:28},children:[m("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:A("在线充值")}),m("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:A("线下转账")})]}),a==="online"?m("form",{onSubmit:f,children:m($o,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):m(Ko,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function st(){return(st=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ri=["context","children"];function oi(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var s,i,a={},u=Object.keys(r);for(i=0;i<u.length;i++)o.indexOf(s=u[i])>=0||(a[s]=r[s]);return a}(e,ri);return wn(t,n)}function ii(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=Z(oi,st({},this._props,{context:e.detail.context}),function t(n,r){if(n.nodeType===3)return n.data;if(n.nodeType!==1)return null;var o=[],s={},i=0,a=n.attributes,u=n.childNodes;for(i=a.length;i--;)a[i].name!=="slot"&&(s[a[i].name]=a[i].value,s[Cn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),f=u[i].slot;f?s[f]=Z(Pt,{name:f},l):o[i]=l}var c=r?Z(Pt,null,o):o;return Z(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Sn:Oe)(this._vdom,this._root)}function Cn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function si(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Cn(e)]=n,this._vdom=wn(this._vdom,r),Oe(this._vdom,this._root)}}function ai(){Oe(this._vdom=null,this._root)}function Pt(e,t){var n=this;return Z("slot",st({},e,{ref:function(r){r?(n.ref=r,n._listener||(n._listener=function(o){o.stopPropagation(),o.detail.context=t},r.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function at(e,t,n,r){function o(){var s=Reflect.construct(HTMLElement,[],o);return s._vdomComponent=e,s._root=r&&r.shadow?s.attachShadow({mode:r.mode||"open"}):s,s}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=ii,o.prototype.attributeChangedCallback=si,o.prototype.disconnectedCallback=ai,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(s){Object.defineProperty(o.prototype,s,{get:function(){return this._vdom.props[s]},set:function(i){this._vdom?this.attributeChangedCallback(s,null,i):(this._props||(this._props={}),this._props[s]=i,this.connectedCallback());var a=typeof i;i!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function li(){const[e,t]=O(!1),n=async r=>{const o=await vo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(Tn,{onClick:()=>t(!0),children:A("充值/转账")}),m(ni,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}at(li,"best-recharge",["theme"],{shadow:!1});const It={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function ci(){return k("theme")===D.WHITE?It.white:It.dark}const ui=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:s,popoverPosition:i="top"})=>{const a=k("size"),u=n??(a===d.SMALL?200:300),l=r??(a===d.SMALL?150:200),f=o??(a===d.SMALL?8:16),c=s??(a===d.SMALL?8:16),[_,h]=O(!1),[b,y]=O(i),g=Ee(null),x=Ee(null),S=ci(),v=()=>{if(x.current&&(clearTimeout(x.current),x.current=null),i==="top"||i==="bottom")if(g.current){const N=g.current.getBoundingClientRect();i==="top"&&N.top<100?y("bottom"):i==="bottom"&&window.innerHeight-N.bottom<100?y("top"):y(i)}else y(i);else y(i);h(!0)},w=()=>{x.current=window.setTimeout(()=>{h(!1)},120)};let E={position:"absolute",zIndex:999,borderRadius:6,fontSize:a===d.SMALL?12:15,minWidth:l,width:u,padding:a===d.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...S.popover},C={position:"absolute",zIndex:11,width:0,height:0};return b==="top"?(E={...E,left:"50%",top:-48,transform:"translateX(-50%)"},C={...C,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${S.arrow.top}`}):b==="bottom"?(E={...E,left:"50%",top:"100%",marginTop:f,transform:"translateX(-50%)"},C={...C,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${S.arrow.bottom}`}):b==="leftTop"?(E={...E,right:"100%",top:0,marginRight:c,transform:"none"},C={...C,right:-8,top:a===d.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${S.arrow.left}`}):b==="rightTop"&&(E={...E,left:"100%",top:0,marginLeft:c,transform:"translateY(0)"},C={...C,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${S.arrow.right}`}),m("div",{ref:g,style:{position:"relative",display:"inline-block"},onMouseEnter:v,onMouseLeave:w,children:[t,_&&m("div",{style:E,onMouseEnter:v,onMouseLeave:w,children:[e,m("div",{style:C})]})]})};function di(){const e=k("size");return{white:{popoverTitle:{fontSize:e===d.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===d.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===d.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===d.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===d.SMALL?6:8,height:e===d.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===d.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===d.SMALL?12:15}),main:{fontSize:e===d.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===d.SMALL?16:18,color:"#6b7280",marginLeft:e===d.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===d.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===d.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===d.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===d.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===d.SMALL?6:8,height:e===d.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===d.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===d.SMALL?12:15}),main:{fontSize:e===d.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===d.SMALL?16:18,color:"#B5B8BE",marginLeft:e===d.SMALL?6:8,fontWeight:600}}}}function fi(){const t=k("theme")===D.WHITE,n=di();return t?n.white:n.dark}function Nt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function pi(e){const[t,n]=O({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await vn(),a=[{label:"",value:i.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:i.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...i.isCredit?[{label:"",value:i.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:i.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:i.availableAmount,color:"#1890ff",dot:"#15b36b"}],u={available:i.availableAmount,currency:"USD",symbol:"$",details:a};n(u)}catch(i){console.error("获取余额失败:",i)}};le(()=>{r()},[]),le(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=fi(),s=[{label:A("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:A("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:A("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:A("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:A("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return m(ui,{popover:m(K,{children:[m("div",{style:o.popoverTitle,children:A("余额详情")}),s.map(i=>m("div",{style:o.detailRow,children:[m("span",{style:o.detailLabel,children:[m("span",{style:o.detailDot(i.dot)}),i.label]}),m("span",{style:o.detailValue(i.color),children:[t.symbol,Nt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:o.main,children:[t.symbol,Nt(t.available),m("span",{style:o.currency,children:t.currency})]})})}at(pi,"best-statistical-balance");const he={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function hi(e){return k("theme")===D.WHITE?{...he.white,background:e||he.white.background}:{...he.dark,background:e||he.dark.background}}function mi(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function _i({color:e,size:t="medium",children:n}){const[r,o]=O(!1),s=hi(e),i=mi(t),a={...s,...i,display:"flex",alignItems:"center"};return m(K,{children:[m("style",{children:`
|
|
61
61
|
@keyframes spin {
|
|
62
62
|
from {
|
|
63
63
|
transform: rotate(0deg);
|
|
@@ -76,4 +76,4 @@
|
|
|
76
76
|
:host {
|
|
77
77
|
display: inline-block;
|
|
78
78
|
}
|
|
79
|
-
`}),m(
|
|
79
|
+
`}),m(Tn,{onClick:async()=>{o(!0);try{kn(),await new Promise(f=>setTimeout(f,300))}finally{o(!1)}},color:e,children:m("div",{style:a,children:[m("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[m("path",{d:"M21 2v6h-6"}),m("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),m("path",{d:"M3 22v-6h6"}),m("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&m("span",{children:n})]})})]})}at(_i,"best-refresh-button",[],{shadow:!0});const gi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=gi;exports.getBalanceData=To;exports.initFundUnit=Co;exports.npmTest=Rn;exports.printCurrentTime=Mn;exports.refreshBalance=kn;exports.viteProxy=Ro;
|