best-unit 1.2.3 → 1.2.5
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 +8 -8
- package/dist/best-unit.js +267 -213
- package/dist/types/global.d.ts +2 -0
- package/dist/types/index.ts +10 -0
- package/package.json +1 -1
- package/src/components/business/recharge-sdk/components/offline-transfer-form/theme.tsx +22 -5
- package/src/components/business/recharge-sdk/components/online-recharge-form/theme.tsx +19 -3
- package/src/components/business/recharge-sdk/components/recharge/theme.tsx +20 -2
- package/src/components/business/recharge-sdk/index.tsx +1 -3
- package/src/components/common/button/theme.tsx +12 -3
- package/src/components/common/select/theme.tsx +26 -5
- package/src/demo/App.tsx +8 -0
- package/src/demo/theme-config-example.tsx +1 -0
- package/src/types/global.d.ts +2 -0
- package/src/types/index.ts +10 -0
- package/src/utils/business/index.ts +12 -0
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Nn(){console.log("npm package test!!!")}function In(){console.log("Current time:",new Date().toISOString())}function $t(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ln}=Object.prototype,{getPrototypeOf:Ze}=Object,{iterator:ke,toStringTag:Wt}=Symbol,Te=(e=>t=>{const n=Ln.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>Te(t)===e),Re=e=>t=>typeof t===e,{isArray:Q}=Array,oe=Re("undefined");function Un(e){return e!==null&&!oe(e)&&e.constructor!==null&&!oe(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qt=I("ArrayBuffer");function zn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qt(e.buffer),t}const Hn=Re("string"),P=Re("function"),Jt=Re("number"),Ce=e=>e!==null&&typeof e=="object",Mn=e=>e===!0||e===!1,he=e=>{if(Te(e)!=="object")return!1;const t=Ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Wt in e)&&!(ke in e)},jn=I("Date"),$n=I("File"),Wn=I("Blob"),qn=I("FileList"),Jn=e=>Ce(e)&&P(e.pipe),Vn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=Te(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Gn=I("URLSearchParams"),[Kn,Xn,Zn,Qn]=["ReadableStream","Request","Response","Headers"].map(I),Yn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function le(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 Vt(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 q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gt=e=>!oe(e)&&e!==q;function He(){const{caseless:e}=Gt(this)&&this||{},t={},n=(r,o)=>{const s=e&&Vt(t,o)||o;he(t[s])&&he(r)?t[s]=He(t[s],r):he(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]&&le(arguments[r],n);return t}const er=(e,t,n,{allOwnKeys:r}={})=>(le(t,(o,s)=>{n&&P(o)?e[s]=$t(o,n):e[s]=o},{allOwnKeys:r}),e),tr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nr=(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)},rr=(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&&Ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},or=(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},ir=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!Jt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ze(Uint8Array)),ar=(e,t)=>{const r=(e&&e[ke]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},lr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cr=I("HTMLFormElement"),ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),at=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dr=I("RegExp"),Kt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};le(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},fr=e=>{Kt(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+"'")})}})},pr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},hr=()=>{},mr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&P(e.append)&&e[Wt]==="FormData"&&e[ke])}const br=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 le(r,(i,a)=>{const u=n(i,o+1);!oe(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},gr=I("AsyncFunction"),yr=e=>e&&(Ce(e)||P(e))&&P(e.then)&&P(e.catch),Xt=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:s})=>{o===q&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(q.postMessage)),wr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Xt,xr=e=>e!=null&&P(e[ke]),f={isArray:Q,isArrayBuffer:qt,isBuffer:Un,isFormData:Vn,isArrayBufferView:zn,isString:Hn,isNumber:Jt,isBoolean:Mn,isObject:Ce,isPlainObject:he,isReadableStream:Kn,isRequest:Xn,isResponse:Zn,isHeaders:Qn,isUndefined:oe,isDate:jn,isFile:$n,isBlob:Wn,isRegExp:dr,isFunction:P,isStream:Jn,isURLSearchParams:Gn,isTypedArray:sr,isFileList:qn,forEach:le,merge:He,extend:er,trim:Yn,stripBOM:tr,inherits:nr,toFlatObject:rr,kindOf:Te,kindOfTest:I,endsWith:or,toArray:ir,forEachEntry:ar,matchAll:lr,isHTMLForm:cr,hasOwnProperty:at,hasOwnProp:at,reduceDescriptors:Kt,freezeMethods:fr,toObjectSet:pr,toCamelCase:ur,noop:hr,toFiniteNumber:mr,findKey:Vt,global:q,isContextDefined:Gt,isSpecCompliantForm:_r,toJSONObject:br,isAsyncFn:gr,isThenable:yr,setImmediate:Xt,asap:wr,isIterable:xr};function v(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)}f.inherits(v,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:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Zt=v.prototype,Qt={};["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=>{Qt[e]={value:e}});Object.defineProperties(v,Qt);Object.defineProperty(Zt,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,s)=>{const i=Object.create(Zt);return f.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),v.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Er=null;function Me(e){return f.isPlainObject(e)||f.isArray(e)}function Yt(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Yt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function vr(e){return f.isArray(e)&&!e.some(Me)}const Sr=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Ae(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!f.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(f.isDate(b))return b.toISOString();if(f.isBoolean(b))return b.toString();if(!u&&f.isBlob(b))throw new v("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(b)||f.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,g,_){let y=b;if(b&&!_&&typeof b=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),b=JSON.stringify(b);else if(f.isArray(b)&&vr(b)||(f.isFileList(b)||f.endsWith(g,"[]"))&&(y=f.toArray(b)))return g=Yt(g),y.forEach(function(x,k){!(f.isUndefined(x)||x===null)&&t.append(i===!0?lt([g],k,s):i===null?g:g+"[]",l(x))}),!1}return Me(b)?!0:(t.append(lt(_,g,s),l(b)),!1)}const c=[],m=Object.assign(Sr,{defaultVisitor:d,convertValue:l,isVisitable:Me});function p(b,g){if(!f.isUndefined(b)){if(c.indexOf(b)!==-1)throw Error("Circular reference detected in "+g.join("."));c.push(b),f.forEach(b,function(y,w){(!(f.isUndefined(y)||y===null)&&o.call(t,y,f.isString(w)?w.trim():w,g,m))===!0&&p(y,g?g.concat(w):[w])}),c.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return p(e),t}function ct(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&&Ae(e,this,t)}const en=Qe.prototype;en.append=function(t,n){this._pairs.push([t,n])};en.toString=function(t){const n=t?function(r){return t.call(this,r,ct)}:ct;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function kr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tn(e,t,n){if(!t)return e;const r=n&&n.encode||kr;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=f.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 ut{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){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tr=typeof URLSearchParams<"u"?URLSearchParams:Qe,Rr=typeof FormData<"u"?FormData:null,Cr=typeof Blob<"u"?Blob:null,Ar={isBrowser:!0,classes:{URLSearchParams:Tr,FormData:Rr,Blob:Cr},protocols:["http","https","file","blob","url","data"]},Ye=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,Fr=Ye&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),Br=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Or=Ye&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ye,hasStandardBrowserEnv:Fr,hasStandardBrowserWebWorkerEnv:Br,navigator:je,origin:Or},Symbol.toStringTag,{value:"Module"})),F={...Pr,...Ar};function Dr(e,t){return Ae(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return F.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Nr(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ir(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 rn(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&&f.isArray(o)?o.length:i,u?(f.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!f.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&f.isArray(o[i])&&(o[i]=Ir(o[i])),!a)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Nr(r),o,n,0)}),n}return null}function Lr(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ce={transitional:nn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=f.isObject(t);if(s&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(rn(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.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 Dr(t,this.formSerializer).toString();if((a=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ae(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Lr(t)):t}],transformResponse:[function(t){const n=this.transitional||ce.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.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"?v.from(a,v.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}}};f.forEach(["delete","get","head","post","put","patch"],e=>{ce.headers[e]={}});const Ur=f.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"]),zr=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]&&Ur[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},dt=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function me(e){return e===!1||e==null?e:f.isArray(e)?e.map(me):String(e)}function Hr(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 Mr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function
|
|
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[dt]=this[dt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ne(i);r[a]||($r(o,i),r[a]=!0)}return f.isArray(t)?t.forEach(s):s(t),this}};D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(D.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(D);function Le(e,t){const n=this||ce,r=t||n,o=D.from(r.headers);let s=r.data;return f.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function on(e){return!!(e&&e.__CANCEL__)}function Y(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Y,v,{__CANCEL__:!0});function sn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qr(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,m=0;for(;c!==o;)m+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const p=d&&l-d;return p?Math.round(m*1e3/p):void 0}}function Jr(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 we=(e,t,n=3)=>{let r=0;const o=qr(50,250);return Jr(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)},ft=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},pt=e=>(...t)=>f.asap(()=>e(...t)),Vr=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,Gr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),f.isString(r)&&i.push("path="+r),f.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 Kr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function an(e,t,n){let r=!Kr(t);return e&&(r||n==!1)?Xr(e,t):t}const ht=e=>e instanceof D?{...e}:e;function V(e,t){t=t||{};const n={};function r(l,d,c,m){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:m},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function o(l,d,c,m){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,c,m)}else return r(l,d,c,m)}function s(l,d){if(!f.isUndefined(d))return r(void 0,d)}function i(l,d){if(f.isUndefined(d)){if(!f.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(ht(l),ht(d),c,!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=u[d]||o,m=c(e[d],t[d],d);f.isUndefined(m)&&c!==a||(n[d]=m)}),n}const ln=e=>{const t=V({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=D.from(i),t.url=tn(an(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(f.isFormData(n)){if(F.hasStandardBrowserEnv||F.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(F.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&Vr(t.url))){const l=o&&s&&Gr.read(s);l&&i.set(o,l)}return t},Zr=typeof XMLHttpRequest<"u",Qr=Zr&&function(e){return new Promise(function(n,r){const o=ln(e);let s=o.data;const i=D.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,d,c,m,p,b;function g(){p&&p(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const x=D.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:x,config:e,request:_};sn(function(U){n(U),g()},function(U){r(U),g()},A),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new v("Request aborted",v.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||nn;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new v(k,A.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,_)),_=null},s===void 0&&i.setContentType(null),"setRequestHeader"in _&&f.forEach(i.toJSON(),function(k,A){_.setRequestHeader(A,k)}),f.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),l&&([m,b]=we(l,!0),_.addEventListener("progress",m)),u&&_.upload&&([c,p]=we(u),_.upload.addEventListener("progress",c),_.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(d=x=>{_&&(r(!x||x.type?new Y(null,e,_):x),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=Wr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new v("Unsupported protocol "+w+":",v.ERR_BAD_REQUEST,e));return}_.send(s||null)})},Yr=(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 v?d:new Y(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new v(`timeout ${t} of ms exceeded`,v.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=()=>f.asap(a),u}},eo=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},to=async function*(e,t){for await(const n of no(e))yield*eo(n,t)},no=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()}},mt=(e,t,n,r)=>{const o=to(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 m=s+=c;n(m)}u.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Fe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cn=Fe&&typeof ReadableStream=="function",ro=Fe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),un=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oo=cn&&un(()=>{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}),_t=64*1024,$e=cn&&un(()=>f.isReadableStream(new Response("").body)),xe={stream:$e&&(e=>e.body)};Fe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xe[t]&&(xe[t]=f.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const io=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await ro(e)).byteLength},so=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??io(t)},ao=Fe&&(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:m}=ln(e);l=l?(l+"").toLowerCase():"text";let p=Yr([o,s&&s.toAbortSignal()],i),b;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let _;try{if(u&&oo&&n!=="get"&&n!=="head"&&(_=await so(d,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(f.isFormData(r)&&(O=A.headers.get("content-type"))&&d.setContentType(O),A.body){const[U,j]=ft(_,we(pt(u)));r=mt(A.body,_t,U,j)}}f.isString(c)||(c=c?"include":"omit");const y="credentials"in Request.prototype;b=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:y?c:void 0});let w=await fetch(b,m);const x=$e&&(l==="stream"||l==="response");if($e&&(a||x&&g)){const A={};["status","statusText","headers"].forEach($=>{A[$]=w[$]});const O=f.toFiniteNumber(w.headers.get("content-length")),[U,j]=a&&ft(O,we(pt(a),!0))||[];w=new Response(mt(w.body,_t,U,()=>{j&&j(),g&&g()}),A)}l=l||"text";let k=await xe[f.findKey(xe,l)||"text"](w,e);return!x&&g&&g(),await new Promise((A,O)=>{sn(A,O,{data:k,headers:D.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:b})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,b),{cause:y.cause||y}):v.from(y,y&&y.code,e,b)}}),We={http:Er,xhr:Qr,fetch:ao};f.forEach(We,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bt=e=>`- ${e}`,lo=e=>f.isFunction(e)||e===null||e===!1,dn={getAdapter:e=>{e=f.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,!lo(n)&&(r=We[(i=String(n)).toLowerCase()],r===void 0))throw new v(`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 :
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function In(){console.log("npm package test!!!")}function Dn(){console.log("Current time:",new Date().toISOString())}function $t(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ln}=Object.prototype,{getPrototypeOf:Ze}=Object,{iterator:ke,toStringTag:Wt}=Symbol,Te=(e=>t=>{const n=Ln.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),L=e=>(e=e.toLowerCase(),t=>Te(t)===e),Ce=e=>t=>typeof t===e,{isArray:Q}=Array,oe=Ce("undefined");function Un(e){return e!==null&&!oe(e)&&e.constructor!==null&&!oe(e.constructor)&&N(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qt=L("ArrayBuffer");function zn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qt(e.buffer),t}const Hn=Ce("string"),N=Ce("function"),Jt=Ce("number"),Re=e=>e!==null&&typeof e=="object",Mn=e=>e===!0||e===!1,he=e=>{if(Te(e)!=="object")return!1;const t=Ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Wt in e)&&!(ke in e)},jn=L("Date"),$n=L("File"),Wn=L("Blob"),qn=L("FileList"),Jn=e=>Re(e)&&N(e.pipe),Vn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||N(e.append)&&((t=Te(e))==="formdata"||t==="object"&&N(e.toString)&&e.toString()==="[object FormData]"))},Gn=L("URLSearchParams"),[Kn,Xn,Zn,Qn]=["ReadableStream","Request","Response","Headers"].map(L),Yn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function le(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 Vt(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 q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Gt=e=>!oe(e)&&e!==q;function He(){const{caseless:e}=Gt(this)&&this||{},t={},n=(r,o)=>{const s=e&&Vt(t,o)||o;he(t[s])&&he(r)?t[s]=He(t[s],r):he(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]&&le(arguments[r],n);return t}const er=(e,t,n,{allOwnKeys:r}={})=>(le(t,(o,s)=>{n&&N(o)?e[s]=$t(o,n):e[s]=o},{allOwnKeys:r}),e),tr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nr=(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)},rr=(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&&Ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},or=(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},ir=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!Jt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},sr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ze(Uint8Array)),ar=(e,t)=>{const r=(e&&e[ke]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},lr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},cr=L("HTMLFormElement"),ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),at=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dr=L("RegExp"),Kt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};le(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},fr=e=>{Kt(e,(t,n)=>{if(N(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(N(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+"'")})}})},pr=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},hr=()=>{},mr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _r(e){return!!(e&&N(e.append)&&e[Wt]==="FormData"&&e[ke])}const br=e=>{const t=new Array(10),n=(r,o)=>{if(Re(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Q(r)?[]:{};return le(r,(i,a)=>{const u=n(i,o+1);!oe(u)&&(s[a]=u)}),t[o]=void 0,s}}return r};return n(e,0)},gr=L("AsyncFunction"),yr=e=>e&&(Re(e)||N(e))&&N(e.then)&&N(e.catch),Xt=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:s})=>{o===q&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),q.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",N(q.postMessage)),wr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Xt,xr=e=>e!=null&&N(e[ke]),f={isArray:Q,isArrayBuffer:qt,isBuffer:Un,isFormData:Vn,isArrayBufferView:zn,isString:Hn,isNumber:Jt,isBoolean:Mn,isObject:Re,isPlainObject:he,isReadableStream:Kn,isRequest:Xn,isResponse:Zn,isHeaders:Qn,isUndefined:oe,isDate:jn,isFile:$n,isBlob:Wn,isRegExp:dr,isFunction:N,isStream:Jn,isURLSearchParams:Gn,isTypedArray:sr,isFileList:qn,forEach:le,merge:He,extend:er,trim:Yn,stripBOM:tr,inherits:nr,toFlatObject:rr,kindOf:Te,kindOfTest:L,endsWith:or,toArray:ir,forEachEntry:ar,matchAll:lr,isHTMLForm:cr,hasOwnProperty:at,hasOwnProp:at,reduceDescriptors:Kt,freezeMethods:fr,toObjectSet:pr,toCamelCase:ur,noop:hr,toFiniteNumber:mr,findKey:Vt,global:q,isContextDefined:Gt,isSpecCompliantForm:_r,toJSONObject:br,isAsyncFn:gr,isThenable:yr,setImmediate:Xt,asap:wr,isIterable:xr};function S(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)}f.inherits(S,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:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Zt=S.prototype,Qt={};["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=>{Qt[e]={value:e}});Object.defineProperties(S,Qt);Object.defineProperty(Zt,"isAxiosError",{value:!0});S.from=(e,t,n,r,o,s)=>{const i=Object.create(Zt);return f.toFlatObject(e,i,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),S.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Er=null;function Me(e){return f.isPlainObject(e)||f.isArray(e)}function Yt(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function lt(e,t,n){return e?e.concat(t).map(function(o,s){return o=Yt(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Sr(e){return f.isArray(e)&&!e.some(Me)}const vr=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Ae(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!f.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(f.isDate(b))return b.toISOString();if(f.isBoolean(b))return b.toString();if(!u&&f.isBlob(b))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(b)||f.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function d(b,g,_){let y=b;if(b&&!_&&typeof b=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),b=JSON.stringify(b);else if(f.isArray(b)&&Sr(b)||(f.isFileList(b)||f.endsWith(g,"[]"))&&(y=f.toArray(b)))return g=Yt(g),y.forEach(function(x,k){!(f.isUndefined(x)||x===null)&&t.append(i===!0?lt([g],k,s):i===null?g:g+"[]",l(x))}),!1}return Me(b)?!0:(t.append(lt(_,g,s),l(b)),!1)}const c=[],m=Object.assign(vr,{defaultVisitor:d,convertValue:l,isVisitable:Me});function p(b,g){if(!f.isUndefined(b)){if(c.indexOf(b)!==-1)throw Error("Circular reference detected in "+g.join("."));c.push(b),f.forEach(b,function(y,w){(!(f.isUndefined(y)||y===null)&&o.call(t,y,f.isString(w)?w.trim():w,g,m))===!0&&p(y,g?g.concat(w):[w])}),c.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return p(e),t}function ct(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&&Ae(e,this,t)}const en=Qe.prototype;en.append=function(t,n){this._pairs.push([t,n])};en.toString=function(t){const n=t?function(r){return t.call(this,r,ct)}:ct;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function kr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function tn(e,t,n){if(!t)return e;const r=n&&n.encode||kr;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=f.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 ut{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){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tr=typeof URLSearchParams<"u"?URLSearchParams:Qe,Cr=typeof FormData<"u"?FormData:null,Rr=typeof Blob<"u"?Blob:null,Ar={isBrowser:!0,classes:{URLSearchParams:Tr,FormData:Cr,Blob:Rr},protocols:["http","https","file","blob","url","data"]},Ye=typeof window<"u"&&typeof document<"u",je=typeof navigator=="object"&&navigator||void 0,Fr=Ye&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),Br=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Or=Ye&&window.location.href||"http://localhost",Pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ye,hasStandardBrowserEnv:Fr,hasStandardBrowserWebWorkerEnv:Br,navigator:je,origin:Or},Symbol.toStringTag,{value:"Module"})),F={...Pr,...Ar};function Nr(e,t){return Ae(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return F.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Ir(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dr(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 rn(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&&f.isArray(o)?o.length:i,u?(f.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!f.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&f.isArray(o[i])&&(o[i]=Dr(o[i])),!a)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Ir(r),o,n,0)}),n}return null}function Lr(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ce={transitional:nn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=f.isObject(t);if(s&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(rn(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.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 Nr(t,this.formSerializer).toString();if((a=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Ae(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Lr(t)):t}],transformResponse:[function(t){const n=this.transitional||ce.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.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"?S.from(a,S.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}}};f.forEach(["delete","get","head","post","put","patch"],e=>{ce.headers[e]={}});const Ur=f.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"]),zr=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]&&Ur[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},dt=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function me(e){return e===!1||e==null?e:f.isArray(e)?e.map(me):String(e)}function Hr(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 Mr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function De(e,t,n,r,o){if(f.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!f.isString(t)){if(f.isString(r))return t.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(t)}}function jr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function $r(e,t){const n=f.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 d=ne(u);if(!d)throw new Error("header name must be a non-empty string");const c=f.findKey(o,d);(!c||o[c]===void 0||l===!0||l===void 0&&o[c]!==!1)&&(o[c||u]=me(a))}const i=(a,u)=>f.forEach(a,(l,d)=>s(l,d,u));if(f.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(f.isString(t)&&(t=t.trim())&&!Mr(t))i(zr(t),n);else if(f.isObject(t)&&f.isIterable(t)){let a={},u,l;for(const d of t){if(!f.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(u=a[l])?f.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ne(t),t){const r=f.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Hr(o);if(f.isFunction(n))return n.call(this,o,r);if(f.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ne(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||De(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ne(i),i){const a=f.findKey(r,i);a&&(!n||De(r,r[a],a,n))&&(delete r[a],o=!0)}}return f.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||De(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return f.forEach(this,(o,s)=>{const i=f.findKey(r,s);if(i){n[i]=me(o),delete n[s];return}const a=t?jr(s):String(s).trim();a!==s&&delete n[s],n[a]=me(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return f.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&f.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[dt]=this[dt]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ne(i);r[a]||($r(o,i),r[a]=!0)}return f.isArray(t)?t.forEach(s):s(t),this}};I.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(I.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(I);function Le(e,t){const n=this||ce,r=t||n,o=I.from(r.headers);let s=r.data;return f.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function on(e){return!!(e&&e.__CANCEL__)}function Y(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Y,S,{__CANCEL__:!0});function sn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qr(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,m=0;for(;c!==o;)m+=n[c++],c=c%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-i<t)return;const p=d&&l-d;return p?Math.round(m*1e3/p):void 0}}function Jr(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 we=(e,t,n=3)=>{let r=0;const o=qr(50,250);return Jr(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)},ft=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},pt=e=>(...t)=>f.asap(()=>e(...t)),Vr=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,Gr=F.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),f.isString(r)&&i.push("path="+r),f.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 Kr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function an(e,t,n){let r=!Kr(t);return e&&(r||n==!1)?Xr(e,t):t}const ht=e=>e instanceof I?{...e}:e;function V(e,t){t=t||{};const n={};function r(l,d,c,m){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:m},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function o(l,d,c,m){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,c,m)}else return r(l,d,c,m)}function s(l,d){if(!f.isUndefined(d))return r(void 0,d)}function i(l,d){if(f.isUndefined(d)){if(!f.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(ht(l),ht(d),c,!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=u[d]||o,m=c(e[d],t[d],d);f.isUndefined(m)&&c!==a||(n[d]=m)}),n}const ln=e=>{const t=V({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=I.from(i),t.url=tn(an(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(f.isFormData(n)){if(F.hasStandardBrowserEnv||F.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(F.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&Vr(t.url))){const l=o&&s&&Gr.read(s);l&&i.set(o,l)}return t},Zr=typeof XMLHttpRequest<"u",Qr=Zr&&function(e){return new Promise(function(n,r){const o=ln(e);let s=o.data;const i=I.from(o.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=o,d,c,m,p,b;function g(){p&&p(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const x=I.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:x,config:e,request:_};sn(function(U){n(U),g()},function(U){r(U),g()},A),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new S("Request aborted",S.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||nn;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new S(k,A.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,_)),_=null},s===void 0&&i.setContentType(null),"setRequestHeader"in _&&f.forEach(i.toJSON(),function(k,A){_.setRequestHeader(A,k)}),f.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),l&&([m,b]=we(l,!0),_.addEventListener("progress",m)),u&&_.upload&&([c,p]=we(u),_.upload.addEventListener("progress",c),_.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(d=x=>{_&&(r(!x||x.type?new Y(null,e,_):x),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const w=Wr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}_.send(s||null)})},Yr=(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 S?d:new Y(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,s(new S(`timeout ${t} of ms exceeded`,S.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=()=>f.asap(a),u}},eo=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},to=async function*(e,t){for await(const n of no(e))yield*eo(n,t)},no=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()}},mt=(e,t,n,r)=>{const o=to(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 m=s+=c;n(m)}u.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(u){return a(u),o.return()}},{highWaterMark:2})},Fe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",cn=Fe&&typeof ReadableStream=="function",ro=Fe&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),un=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oo=cn&&un(()=>{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}),_t=64*1024,$e=cn&&un(()=>f.isReadableStream(new Response("").body)),xe={stream:$e&&(e=>e.body)};Fe&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xe[t]&&(xe[t]=f.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const io=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await ro(e)).byteLength},so=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??io(t)},ao=Fe&&(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:m}=ln(e);l=l?(l+"").toLowerCase():"text";let p=Yr([o,s&&s.toAbortSignal()],i),b;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let _;try{if(u&&oo&&n!=="get"&&n!=="head"&&(_=await so(d,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(f.isFormData(r)&&(P=A.headers.get("content-type"))&&d.setContentType(P),A.body){const[U,j]=ft(_,we(pt(u)));r=mt(A.body,_t,U,j)}}f.isString(c)||(c=c?"include":"omit");const y="credentials"in Request.prototype;b=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:y?c:void 0});let w=await fetch(b,m);const x=$e&&(l==="stream"||l==="response");if($e&&(a||x&&g)){const A={};["status","statusText","headers"].forEach($=>{A[$]=w[$]});const P=f.toFiniteNumber(w.headers.get("content-length")),[U,j]=a&&ft(P,we(pt(a),!0))||[];w=new Response(mt(w.body,_t,U,()=>{j&&j(),g&&g()}),A)}l=l||"text";let k=await xe[f.findKey(xe,l)||"text"](w,e);return!x&&g&&g(),await new Promise((A,P)=>{sn(A,P,{data:k,headers:I.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:b})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,b),{cause:y.cause||y}):S.from(y,y&&y.code,e,b)}}),We={http:Er,xhr:Qr,fetch:ao};f.forEach(We,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bt=e=>`- ${e}`,lo=e=>f.isFunction(e)||e===null||e===!1,dn={getAdapter:e=>{e=f.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,!lo(n)&&(r=We[(i=String(n)).toLowerCase()],r===void 0))throw new S(`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
4
|
`+s.map(bt).join(`
|
|
5
|
-
`):" "+bt(s[0]):"as no adapter specified";throw new
|
|
6
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=V(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&_e.assertOptions(r,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:_e.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),_e.assertOptions(n,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&f.merge(s.common,s[n.method]);s&&f.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=D.concat(i,s);const a=[];let u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,c=0,m;if(!u){const b=[gt.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,l),m=b.length,d=Promise.resolve(n);c<m;)d=d.then(b[c++],b[c++]);return d}m=a.length;let p=n;for(c=0;c<m;){const b=a[c++],g=a[c++];try{p=b(p)}catch(_){g.call(this,_);break}}try{d=gt.call(this,p)}catch(b){return Promise.reject(b)}for(c=0,m=l.length;c<m;)d=d.then(l[c++],l[c++]);return d}getUri(t){t=V(this.defaults,t);const n=an(t.baseURL,t.url,t.allowAbsoluteUrls);return tn(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){J.prototype[t]=function(n,r){return this.request(V(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(V(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}J.prototype[t]=n(),J.prototype[t+"Form"]=n(!0)});let uo=class pn{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 Y(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 pn(function(o){t=o}),cancel:t}}};function fo(e){return function(n){return e.apply(null,n)}}function po(e){return f.isObject(e)&&e.isAxiosError===!0}const qe={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(qe).forEach(([e,t])=>{qe[t]=e});function hn(e){const t=new J(e),n=$t(J.prototype.request,t);return f.extend(n,J.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return hn(V(e,o))},n}const R=hn(ce);R.Axios=J;R.CanceledError=Y;R.CancelToken=uo;R.isCancel=on;R.VERSION=fn;R.toFormData=Ae;R.AxiosError=v;R.Cancel=R.CanceledError;R.all=function(t){return Promise.all(t)};R.spread=fo;R.isAxiosError=po;R.mergeConfig=V;R.AxiosHeaders=D;R.formToJSON=e=>rn(f.isHTMLForm(e)?new FormData(e):e);R.getAdapter=dn.getAdapter;R.HttpStatusCode=qe;R.default=R;const{Axios:bi,AxiosError:gi,CanceledError:yi,isCancel:wi,CancelToken:xi,VERSION:Ei,all:vi,Cancel:Si,isAxiosError:ki,spread:Ti,toFormData:Ri,AxiosHeaders:Ci,HttpStatusCode:Ai,formToJSON:Fi,getAdapter:Bi,mergeConfig:Oi}=R;var ue,S,mn,W,wt,_n,bn,gn,et,Je,Ve,ie={},yn=[],ho=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Oe=Array.isArray;function M(e,t){for(var n in t)e[n]=t[n];return e}function tt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function X(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?ue.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 re(e,i,r,o,null)}function re(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??++mn,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(s),s}function G(e){return e.children}function be(e,t){this.props=e,this.context=t}function Z(e,t){if(t==null)return e.__?Z(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"?Z(e):null}function wn(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 wn(e)}}function xt(e){(!e.__d&&(e.__d=!0)&&W.push(e)&&!Ee.__r++||wt!=S.debounceRendering)&&((wt=S.debounceRendering)||_n)(Ee)}function Ee(){for(var e,t,n,r,o,s,i,a=1;W.length;)W.length>a&&W.sort(bn),e=W.shift(),a=W.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=M({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),nt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??Z(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,vn(s,n,i),n.__e!=o&&wn(n)));Ee.__r=0}function xn(e,t,n,r,o,s,i,a,u,l,d){var c,m,p,b,g,_,y=r&&r.__k||yn,w=t.length;for(u=mo(n,t,y,u,w),c=0;c<w;c++)(p=n.__k[c])!=null&&(m=p.__i==-1?ie:y[p.__i]||ie,p.__i=c,_=nt(e,p,m,o,s,i,a,u,l,d),b=p.__e,p.ref&&m.ref!=p.ref&&(m.ref&&rt(m.ref,null,p),d.push(p.ref,p.__c||b,p)),g==null&&b!=null&&(g=b),4&p.__u||m.__k===p.__k?u=En(p,u,e):typeof p.type=="function"&&_!==void 0?u=_:b&&(u=b.nextSibling),p.__u&=-7);return n.__e=g,u}function mo(e,t,n,r,o){var s,i,a,u,l,d=n.length,c=d,m=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+m,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?re(null,i,null,null,null):Oe(i)?re(G,{children:i},null,null,null):i.constructor==null&&i.__b>0?re(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=_o(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>d?m--:o<d&&m++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?m--:l==u+1?m++:(l>u?m--:m++,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=Z(a)),kn(a,a));return r}function En(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=En(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Z(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function _o(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 Et(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||ho.test(t)?n:n+"px"}function de(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||Et(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Et(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(gn,"$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=et,e.addEventListener(t,s?Ve:Je,s)):e.removeEventListener(t,s?Ve:Je,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 vt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=et++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function nt(e,t,n,r,o,s,i,a,u,l){var d,c,m,p,b,g,_,y,w,x,k,A,O,U,j,$,Ne,z=t.type;if(t.constructor!=null)return null;128&n.__u&&(u=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=S.__b)&&d(t);e:if(typeof z=="function")try{if(y=t.props,w="prototype"in z&&z.prototype.render,x=(d=z.contextType)&&r[d.__c],k=d?x?x.props.value:d.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:(w?t.__c=c=new z(y,k):(t.__c=c=new be(y,k),c.constructor=z,c.render=go),x&&x.sub(c),c.props=y,c.state||(c.state={}),c.context=k,c.__n=r,m=c.__d=!0,c.__h=[],c._sb=[]),w&&c.__s==null&&(c.__s=c.state),w&&z.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=M({},c.__s)),M(c.__s,z.getDerivedStateFromProps(y,c.__s))),p=c.props,b=c.state,c.__v=t,m)w&&z.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),w&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(w&&z.getDerivedStateFromProps==null&&y!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(y,k),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(y,c.__s,k)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=y,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(te){te&&(te.__=t)}),A=0;A<c._sb.length;A++)c.__h.push(c._sb[A]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(y,c.__s,k),w&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,b,g)})}if(c.context=k,c.props=y,c.__P=e,c.__e=!1,O=S.__r,U=0,w){for(c.state=c.__s,c.__d=!1,O&&O(t),d=c.render(c.props,c.state,c.context),j=0;j<c._sb.length;j++)c.__h.push(c._sb[j]);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=M(M({},r),c.getChildContext())),w&&!m&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,b)),$=d,d!=null&&d.type===G&&d.key==null&&($=Sn(d.props.children)),a=xn(e,Oe($)?$:[$],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),_&&(c.__E=c.__=null)}catch(te){if(t.__v=null,u||s!=null)if(te.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(Ne=s.length;Ne--;)tt(s[Ne]);else t.__e=n.__e,t.__k=n.__k;S.__e(te,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=bo(n.__e,t,n,r,o,s,i,u,l);return(d=S.diffed)&&d(t),128&t.__u?void 0:a}function vn(e,t,n){for(var r=0;r<n.length;r++)rt(n[r],n[++r],n[++r]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){S.__e(s,o.__v)}})}function Sn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Oe(e)?e.map(Sn):M({},e)}function bo(e,t,n,r,o,s,i,a,u){var l,d,c,m,p,b,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="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((p=s[l])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,s[l]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(S.__m&&S.__m(t,s),a=!1),s=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(s=s&&ue.call(e.childNodes),_=n.props||ie,!a&&s!=null)for(_={},l=0;l<e.attributes.length;l++)_[(p=e.attributes[l]).name]=p.value;for(l in _)if(p=_[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in y)){if(l=="value"&&"defaultValue"in y||l=="checked"&&"defaultChecked"in y)continue;de(e,l,null,p,o)}}for(l in y)p=y[l],l=="children"?m=p:l=="dangerouslySetInnerHTML"?d=p:l=="value"?b=p:l=="checked"?g=p:a&&typeof p!="function"||_[l]===p||de(e,l,p,_[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=""),xn(t.type=="template"?e.content:e,Oe(m)?m:[m],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Z(n,0),a,u),s!=null)for(l=s.length;l--;)tt(s[l]);a||(l="value",w=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[l]||w=="progress"&&!b||w=="option"&&b!=_[l])&&de(e,l,b,_[l],o),l="checked",g!=null&&g!=e[l]&&de(e,l,g,_[l],o))}return e}function rt(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){S.__e(o,n)}}function kn(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||rt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){S.__e(s,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&kn(r[o],t,n||typeof e.type!="function");n||tt(e.__e),e.__c=e.__=e.__e=void 0}function go(e,t,n){return this.constructor(e,n)}function Pe(e,t,n){var r,o,s,i;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,s=[],i=[],nt(t,e=(!r&&n||t).__k=X(G,null,[e]),o||ie,ie,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ue.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),vn(s,e,i)}function Tn(e,t){Pe(e,t,Tn)}function Rn(e,t,n){var r,o,s,i,a=M({},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?ue.call(arguments,2):n),re(e.type,a,r||e.key,o||e.ref,null)}ue=yn.slice,S={__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}},mn=0,be.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=M({},this.state),typeof e=="function"&&(e=e(M({},n),this.props)),e&&M(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),xt(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xt(this))},be.prototype.render=G,W=[],_n=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bn=function(e,t){return e.__v.__b-t.__v.__b},Ee.__r=0,gn=/(PointerCapture)$|Capture$/i,et=0,Je=vt(!1),Ve=vt(!0);var yo=0;function h(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:--yo,__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 S.vnode&&S.vnode(l),l}var se,T,ze,St,ve=0,Cn=[],C=S,kt=C.__b,Tt=C.__r,Rt=C.diffed,Ct=C.__c,At=C.unmount,Ft=C.__;function ot(e,t){C.__h&&C.__h(T,e,ve||t),ve=0;var n=T.__H||(T.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return ve=1,wo(Fn,e)}function wo(e,t,n){var r=ot(se++,2);if(r.t=e,!r.__c&&(r.__=[Fn(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(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return d.forEach(function(m){if(m.__N){var p=m.__[0];m.__=m.__N,m.__N=void 0,p!==m.__[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 ae(e,t){var n=ot(se++,3);!C.__s&&An(n.__H,t)&&(n.__=e,n.u=t,T.__H.__h.push(n))}function Se(e){return ve=5,xo(function(){return{current:e}},[])}function xo(e,t){var n=ot(se++,7);return An(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Eo(){for(var e;e=Cn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ge),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],C.__e(t,e.__v)}}C.__b=function(e){T=null,kt&&kt(e)},C.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ft&&Ft(e,t)},C.__r=function(e){Tt&&Tt(e),se=0;var t=(T=e.__c).__H;t&&(ze===T?(t.__h=[],T.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ge),t.__h.forEach(Ge),t.__h=[],se=0)),ze=T},C.diffed=function(e){Rt&&Rt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Cn.push(t)!==1&&St===C.requestAnimationFrame||((St=C.requestAnimationFrame)||vo)(Eo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),ze=T=null},C.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ge),n.__h=n.__h.filter(function(r){return!r.__||Ge(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],C.__e(r,n.__v)}}),Ct&&Ct(e,t)},C.unmount=function(e){At&&At(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ge(r)}catch(o){t=o}}),n.__H=void 0,t&&C.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function vo(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function ge(e){var t=T,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),T=t}function Ge(e){var t=T;e.__c=e.__(),T=t}function An(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Fn(e,t){return typeof t=="function"?t(e):t}var De=(e=>(e.ZH="zh",e.EN="en",e))(De||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),K=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(K||{});const Ot={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 So(){return L("theme")===N.WHITE?Ot.white:Ot.dark}class ko{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=So(),a=document.createElement("div");if(a.style.cssText=`
|
|
5
|
+
`):" "+bt(s[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:We};function Ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Y(null,e)}function gt(e){return Ue(e),e.headers=I.from(e.headers),e.data=Le.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dn.getAdapter(e.adapter||ce.adapter)(e).then(function(r){return Ue(e),r.data=Le.call(e,e.transformResponse,r),r.headers=I.from(r.headers),r},function(r){return on(r)||(Ue(e),r&&r.response&&(r.response.data=Le.call(e,e.transformResponse,r.response),r.response.headers=I.from(r.response.headers))),Promise.reject(r)})}const fn="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 yt={};Be.transitional=function(t,n,r){function o(s,i){return"[Axios v"+fn+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new S(o(i," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!yt[i]&&(yt[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 co(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.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 S("option "+s+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+s,S.ERR_BAD_OPTION)}}const _e={assertOptions:co,validators:Be},H=_e.validators;let J=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ut,response:new ut}}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=V(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&_e.assertOptions(r,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:_e.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),_e.assertOptions(n,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&f.merge(s.common,s[n.method]);s&&f.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(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,c=0,m;if(!u){const b=[gt.bind(this),void 0];for(b.unshift.apply(b,a),b.push.apply(b,l),m=b.length,d=Promise.resolve(n);c<m;)d=d.then(b[c++],b[c++]);return d}m=a.length;let p=n;for(c=0;c<m;){const b=a[c++],g=a[c++];try{p=b(p)}catch(_){g.call(this,_);break}}try{d=gt.call(this,p)}catch(b){return Promise.reject(b)}for(c=0,m=l.length;c<m;)d=d.then(l[c++],l[c++]);return d}getUri(t){t=V(this.defaults,t);const n=an(t.baseURL,t.url,t.allowAbsoluteUrls);return tn(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){J.prototype[t]=function(n,r){return this.request(V(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(V(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}J.prototype[t]=n(),J.prototype[t+"Form"]=n(!0)});let uo=class pn{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 Y(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 pn(function(o){t=o}),cancel:t}}};function fo(e){return function(n){return e.apply(null,n)}}function po(e){return f.isObject(e)&&e.isAxiosError===!0}const qe={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(qe).forEach(([e,t])=>{qe[t]=e});function hn(e){const t=new J(e),n=$t(J.prototype.request,t);return f.extend(n,J.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return hn(V(e,o))},n}const C=hn(ce);C.Axios=J;C.CanceledError=Y;C.CancelToken=uo;C.isCancel=on;C.VERSION=fn;C.toFormData=Ae;C.AxiosError=S;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=fo;C.isAxiosError=po;C.mergeConfig=V;C.AxiosHeaders=I;C.formToJSON=e=>rn(f.isHTMLForm(e)?new FormData(e):e);C.getAdapter=dn.getAdapter;C.HttpStatusCode=qe;C.default=C;const{Axios:bi,AxiosError:gi,CanceledError:yi,isCancel:wi,CancelToken:xi,VERSION:Ei,all:Si,Cancel:vi,isAxiosError:ki,spread:Ti,toFormData:Ci,AxiosHeaders:Ri,HttpStatusCode:Ai,formToJSON:Fi,getAdapter:Bi,mergeConfig:Oi}=C;var ue,v,mn,W,wt,_n,bn,gn,et,Je,Ve,ie={},yn=[],ho=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Oe=Array.isArray;function M(e,t){for(var n in t)e[n]=t[n];return e}function tt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function X(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?ue.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 re(e,i,r,o,null)}function re(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??++mn,__i:-1,__u:0};return o==null&&v.vnode!=null&&v.vnode(s),s}function G(e){return e.children}function be(e,t){this.props=e,this.context=t}function Z(e,t){if(t==null)return e.__?Z(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"?Z(e):null}function wn(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 wn(e)}}function xt(e){(!e.__d&&(e.__d=!0)&&W.push(e)&&!Ee.__r++||wt!=v.debounceRendering)&&((wt=v.debounceRendering)||_n)(Ee)}function Ee(){for(var e,t,n,r,o,s,i,a=1;W.length;)W.length>a&&W.sort(bn),e=W.shift(),a=W.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,s=[],i=[],t.__P&&((n=M({},r)).__v=r.__v+1,v.vnode&&v.vnode(n),nt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,s,o??Z(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,Sn(s,n,i),n.__e!=o&&wn(n)));Ee.__r=0}function xn(e,t,n,r,o,s,i,a,u,l,d){var c,m,p,b,g,_,y=r&&r.__k||yn,w=t.length;for(u=mo(n,t,y,u,w),c=0;c<w;c++)(p=n.__k[c])!=null&&(m=p.__i==-1?ie:y[p.__i]||ie,p.__i=c,_=nt(e,p,m,o,s,i,a,u,l,d),b=p.__e,p.ref&&m.ref!=p.ref&&(m.ref&&rt(m.ref,null,p),d.push(p.ref,p.__c||b,p)),g==null&&b!=null&&(g=b),4&p.__u||m.__k===p.__k?u=En(p,u,e):typeof p.type=="function"&&_!==void 0?u=_:b&&(u=b.nextSibling),p.__u&=-7);return n.__e=g,u}function mo(e,t,n,r,o){var s,i,a,u,l,d=n.length,c=d,m=0;for(e.__k=new Array(o),s=0;s<o;s++)(i=t[s])!=null&&typeof i!="boolean"&&typeof i!="function"?(u=s+m,(i=e.__k[s]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?re(null,i,null,null,null):Oe(i)?re(G,{children:i},null,null,null):i.constructor==null&&i.__b>0?re(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=_o(i,n,u,c))!=-1&&(c--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>d?m--:o<d&&m++),typeof i.type!="function"&&(i.__u|=4)):l!=u&&(l==u-1?m--:l==u+1?m++:(l>u?m--:m++,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=Z(a)),kn(a,a));return r}function En(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=En(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Z(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function _o(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 Et(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||ho.test(t)?n:n+"px"}function de(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||Et(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Et(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")s=t!=(t=t.replace(gn,"$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=et,e.addEventListener(t,s?Ve:Je,s)):e.removeEventListener(t,s?Ve:Je,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 St(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=et++;else if(t.t<n.u)return;return n(v.event?v.event(t):t)}}}function nt(e,t,n,r,o,s,i,a,u,l){var d,c,m,p,b,g,_,y,w,x,k,A,P,U,j,$,Ie,z=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 z=="function")try{if(y=t.props,w="prototype"in z&&z.prototype.render,x=(d=z.contextType)&&r[d.__c],k=d?x?x.props.value:d.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:(w?t.__c=c=new z(y,k):(t.__c=c=new be(y,k),c.constructor=z,c.render=go),x&&x.sub(c),c.props=y,c.state||(c.state={}),c.context=k,c.__n=r,m=c.__d=!0,c.__h=[],c._sb=[]),w&&c.__s==null&&(c.__s=c.state),w&&z.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=M({},c.__s)),M(c.__s,z.getDerivedStateFromProps(y,c.__s))),p=c.props,b=c.state,c.__v=t,m)w&&z.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),w&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(w&&z.getDerivedStateFromProps==null&&y!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(y,k),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(y,c.__s,k)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(c.props=y,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(te){te&&(te.__=t)}),A=0;A<c._sb.length;A++)c.__h.push(c._sb[A]);c._sb=[],c.__h.length&&i.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(y,c.__s,k),w&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,b,g)})}if(c.context=k,c.props=y,c.__P=e,c.__e=!1,P=v.__r,U=0,w){for(c.state=c.__s,c.__d=!1,P&&P(t),d=c.render(c.props,c.state,c.context),j=0;j<c._sb.length;j++)c.__h.push(c._sb[j]);c._sb=[]}else do c.__d=!1,P&&P(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=M(M({},r),c.getChildContext())),w&&!m&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,b)),$=d,d!=null&&d.type===G&&d.key==null&&($=vn(d.props.children)),a=xn(e,Oe($)?$:[$],t,n,r,o,s,i,a,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&i.push(c),_&&(c.__E=c.__=null)}catch(te){if(t.__v=null,u||s!=null)if(te.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--;)tt(s[Ie]);else t.__e=n.__e,t.__k=n.__k;v.__e(te,t,n)}else s==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=bo(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++)rt(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 vn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Oe(e)?e.map(vn):M({},e)}function bo(e,t,n,r,o,s,i,a,u){var l,d,c,m,p,b,g,_=n.props,y=t.props,w=t.type;if(w=="svg"?o="http://www.w3.org/2000/svg":w=="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((p=s[l])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,s[l]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(v.__m&&v.__m(t,s),a=!1),s=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(s=s&&ue.call(e.childNodes),_=n.props||ie,!a&&s!=null)for(_={},l=0;l<e.attributes.length;l++)_[(p=e.attributes[l]).name]=p.value;for(l in _)if(p=_[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in y)){if(l=="value"&&"defaultValue"in y||l=="checked"&&"defaultChecked"in y)continue;de(e,l,null,p,o)}}for(l in y)p=y[l],l=="children"?m=p:l=="dangerouslySetInnerHTML"?d=p:l=="value"?b=p:l=="checked"?g=p:a&&typeof p!="function"||_[l]===p||de(e,l,p,_[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=""),xn(t.type=="template"?e.content:e,Oe(m)?m:[m],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,s,i,s?s[0]:n.__k&&Z(n,0),a,u),s!=null)for(l=s.length;l--;)tt(s[l]);a||(l="value",w=="progress"&&b==null?e.removeAttribute("value"):b!=null&&(b!==e[l]||w=="progress"&&!b||w=="option"&&b!=_[l])&&de(e,l,b,_[l],o),l="checked",g!=null&&g!=e[l]&&de(e,l,g,_[l],o))}return e}function rt(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 kn(e,t,n){var r,o;if(v.unmount&&v.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||rt(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]&&kn(r[o],t,n||typeof e.type!="function");n||tt(e.__e),e.__c=e.__=e.__e=void 0}function go(e,t,n){return this.constructor(e,n)}function Pe(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=[],nt(t,e=(!r&&n||t).__k=X(G,null,[e]),o||ie,ie,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ue.call(t.childNodes):null,s,!r&&n?n:o?o.__e:t.firstChild,r,i),Sn(s,e,i)}function Tn(e,t){Pe(e,t,Tn)}function Cn(e,t,n){var r,o,s,i,a=M({},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?ue.call(arguments,2):n),re(e.type,a,r||e.key,o||e.ref,null)}ue=yn.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}},mn=0,be.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=M({},this.state),typeof e=="function"&&(e=e(M({},n),this.props)),e&&M(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),xt(this))},be.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xt(this))},be.prototype.render=G,W=[],_n=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bn=function(e,t){return e.__v.__b-t.__v.__b},Ee.__r=0,gn=/(PointerCapture)$|Capture$/i,et=0,Je=St(!1),Ve=St(!0);var yo=0;function h(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:--yo,__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 se,T,ze,vt,Se=0,Rn=[],R=v,kt=R.__b,Tt=R.__r,Ct=R.diffed,Rt=R.__c,At=R.unmount,Ft=R.__;function ot(e,t){R.__h&&R.__h(T,e,Se||t),Se=0;var n=T.__H||(T.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function O(e){return Se=1,wo(Fn,e)}function wo(e,t,n){var r=ot(se++,2);if(r.t=e,!r.__c&&(r.__=[Fn(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(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!s||s.call(this,a,u,l);var c=r.__c.props!==a;return d.forEach(function(m){if(m.__N){var p=m.__[0];m.__=m.__N,m.__N=void 0,p!==m.__[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 ae(e,t){var n=ot(se++,3);!R.__s&&An(n.__H,t)&&(n.__=e,n.u=t,T.__H.__h.push(n))}function ve(e){return Se=5,xo(function(){return{current:e}},[])}function xo(e,t){var n=ot(se++,7);return An(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Eo(){for(var e;e=Rn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ge),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],R.__e(t,e.__v)}}R.__b=function(e){T=null,kt&&kt(e)},R.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ft&&Ft(e,t)},R.__r=function(e){Tt&&Tt(e),se=0;var t=(T=e.__c).__H;t&&(ze===T?(t.__h=[],T.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ge),t.__h.forEach(Ge),t.__h=[],se=0)),ze=T},R.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Rn.push(t)!==1&&vt===R.requestAnimationFrame||((vt=R.requestAnimationFrame)||So)(Eo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),ze=T=null},R.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ge),n.__h=n.__h.filter(function(r){return!r.__||Ge(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],R.__e(r,n.__v)}}),Rt&&Rt(e,t)},R.unmount=function(e){At&&At(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ge(r)}catch(o){t=o}}),n.__H=void 0,t&&R.__e(t,n.__v))};var Bt=typeof requestAnimationFrame=="function";function So(e){var t,n=function(){clearTimeout(r),Bt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Bt&&(t=requestAnimationFrame(n))}function ge(e){var t=T,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),T=t}function Ge(e){var t=T;e.__c=e.__(),T=t}function An(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Fn(e,t){return typeof t=="function"?t(e):t}var Ne=(e=>(e.ZH="zh",e.EN="en",e))(Ne||{}),D=(e=>(e.WHITE="white",e.DARK="dark",e))(D||{}),K=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(K||{});const Ot={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 vo(){return B("theme")===D.WHITE?Ot.white:Ot.dark}class ko{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:s}=this.parseArg(n),i=vo(),a=document.createElement("div");if(a.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,7 +42,7 @@
|
|
|
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 Ke=new ko;function To(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case K.DEV:case K.DEVELOPMENT:r="/api";break;case K.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case K.PROD:case K.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:s=1e4,onError:i}=e,a=
|
|
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 Ke=new ko;function To(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case K.DEV:case K.DEVELOPMENT:r="/api";break;case K.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case K.PROD:case K.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:s=1e4,onError:i}=e,a=C.create({baseURL:o,timeout:s});return a.interceptors.request.use(u=>{const{token:l,locale:d}=t;return u.headers={...u.headers,Authorization:l,"x-locale":d===Ne.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 Ke.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 Ke.error(l),i&&i(l,u),Promise.reject(u)}),a}let ye=null;function ee(){return ye||(ye=To()),ye}function Co(){ye=null}function Bn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return ee().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 Ro=async()=>ee().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Ao=async(e,t)=>ee().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||""),Fo=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 ee().post("/offline/recharge/create",n,{})},Bo=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 ee().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},Oo=async e=>ee().get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);async function Po(){let e=JSON.parse(sessionStorage.getItem("balanceData")||"{}");return e&&Object.keys(e).length>0||(e=await Bn()),e}function No(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:s=D.WHITE,locale:i=Ne.ZH,env:a,themeConfig:u}=e,l="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:l,theme:s,locale:i,env:a,themeConfig:u})),Co(),Ro(),{token:l,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:s,locale:i,env:a}}function B(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 On(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});document.dispatchEvent(e)}const Io={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}},fe={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600}};function Do(e){const t=B("theme"),n=B("themeConfig"),r=t===D.WHITE;let o=e;return!o&&n&&(o=(r?n.white:n.dark)?.color),r?{...fe.white,background:o||fe.white.background}:{...fe.dark,background:o||fe.dark.background}}function Pn({onClick:e,color:t,children:n}){const r=Do(t);return h("button",{style:r,onClick:e,type:"button",children:n})}const Lo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function Uo(e){return Lo[e]||e}const zo={余额详情:"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 Ho(e){return zo[e]||e}function Mo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ne.ZH}function E(e){return Mo()==="zh"?Uo(e):Ho(e)}const Pt={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 jo(){const e=B("theme"),t=B("themeConfig"),n=e===D.WHITE,r=n?Pt.white:Pt.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 Xe=({value:e,onChange:t,options:n,placeholder:r,style:o,error:s,disabled:i,dropdownStyle:a,className:u,dropdownClassName:l,children:d})=>{const[c,m]=O(!1),p=ve(null),[b,g]=O(null),_=jo();ae(()=>{if(!c)return;const x=k=>{p.current&&!p.current.contains(k.target)&&m(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[c]);const y=n.find(x=>x.value===e),w=()=>s?_.triggerError:i?_.triggerDisabled:_.trigger;return h("div",{ref:p,className:u,style:{position:"relative",...o},children:[h("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
48
|
scrollbar-color: ${_.scrollbarThumb} ${_.scrollbarTrack};
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
58
|
background: ${_.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),h("div",{onClick:()=>!i&&m(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...w(),...o},tabIndex:0,children:[h("span",{style:{flex:1},children:y?y.label:h("span",{style:_.placeholder,children:r||"请选择"})}),h("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&h("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:_.boxShadow,maxHeight:220,overflowY:"auto",..._.dropdown,...a},children:[n.length===0&&h("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[h("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[h("title",{children:E("暂无数据")}),h("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[h("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),h("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[h("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"}),h("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"})]})]})]}),h("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:E("暂无数据")})]}),n.map((x,k)=>h("div",{onClick:()=>{x.disabled||(m(!1),t?.(x.value))},onMouseEnter:()=>g(k),onMouseLeave:()=>g(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,..._.option(e===x.value,!!x.disabled,b===k)},children:x.label},x.value))]}),d]})},Dt={white:{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:14,color:"#52c41a"}},dark:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:14,color:"#52c41a"}}};function $o(){return L("theme")===N.WHITE?Dt.white:Dt.dark}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(m=>m.payment_support)||[],[a,u]=B(""),[l,d]=B(!1),c=$o();return ae(()=>{e.currency&&e.amount&&e.rechargeChannel?Oo({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(m=>{u(m),d(!0)}).catch(m=>{console.error("计算支付金额失败:",m),d(!1)}):d(!1)},[e.currency,e.amount,e.rechargeChannel]),h(G,{children:[h("div",{style:{marginBottom:18},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),h(Xe,{value:e.currency,onChange:m=>{t(p=>({...p,currency:m}))},options:s?.map(m=>({value:m.value,label:m.label})),placeholder:E("请选择充值币种")})]}),h("div",{style:{marginBottom:18},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),h("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:m=>{let p=m.target.value;p=Wo(p);let b="";if(p&&!p.endsWith(".")){let g=parseFloat(p);if(!isNaN(g)&&(g<1&&(g=1),g>999999.99&&(g=999999.99),p=g.toString(),/\./.test(m.target.value))){const _=m.target.value.split(".")[1];_!==void 0&&_.length>0&&(p=g.toFixed(Math.min(_.length,2)))}}t(g=>({...g,amount:p,amountError:b}))},onBlur:m=>{let p=m.target.value;p=qo(p),t(b=>({...b,amount:p,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&h("div",{style:c.error,children:e.amountError})]}),h("div",{style:{marginBottom:24},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),h(Xe,{value:e.rechargeChannel,onChange:m=>{t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},options:i?.map(m=>({value:m.value,label:m.label})),placeholder:E("请选择支付平台")}),e.rechargeChannelError&&h("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&h("div",{style:c.feeTip,children:[i.find(m=>m.value===e.rechargeChannel)?.label||e.rechargeChannel,E("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&h("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),h("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[h("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),h("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E(r?"提交中...":"去支付")})]})]})},Nt={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}}};function Vo(){return L("theme")===N.WHITE?Nt.white:Nt.dark}const Go=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=Se(null),[a,u]=B(!1),[l,d]=B(0),c=Vo(),m=async b=>{const g=Array.from(b.target.files).slice(0,n);if(!g.length)return;u(!0);const _=[];for(let y=0;y<g.length;y++){d(0);const w=new FormData;w.append("file",g[y]);try{const x=await Ao(w,k=>d(k));x&&_.push(x)}catch{}}u(!1),d(0),t?.([...e,..._]),i.current&&(i.current.value="")},p=b=>{const g=e.filter((_,y)=>y!==b);t?.(g)};return h("div",{children:[h("div",{style:{...c.container,cursor:s?"not-allowed":c.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[h("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),h("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),h("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),h("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:m,disabled:s}),a&&h("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",l,"%"]})]}),e&&e.length>0&&h("div",{style:{marginTop:12},children:e.map((b,g)=>h("div",{style:c.fileItem,children:[h("div",{style:{display:"flex",alignItems:"center",flex:1},children:[h("span",{style:{fontWeight:500,wordBreak:"break-all"},children:b.split("/").pop()}),h("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),h("button",{type:"button",onClick:_=>{_.stopPropagation(),p(g)},style:c.removeBtn,disabled:s,children:E("移除")})]},b))})]})},It={white:{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},dark:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #23262F",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #23262F",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}};function Ko(){return L("theme")===N.WHITE?It.white:It.dark}const Xo=({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=Ko();return h("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(d=>({...d,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(d=>({...d,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(d=>({...d,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(d=>({...d,filesError:E("请上传转账凭证")})),l=!1),l&&(await Fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ke.success(E("离线充值创建成功")))},children:[h("div",{style:{marginBottom:18},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),h(Xe,{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:E("请选择支付平台")}),e.platformError&&h("div",{style:i.error,children:e.platformError})]}),h("div",{style:{marginBottom:18},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),h("input",{type:"text",placeholder:E("请输入转账交易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&&h("div",{style:i.error,children:e.transactionIdError})]}),h("div",{style:{marginBottom:24},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),h(Go,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&h("div",{style:i.error,children:e.filesError})]}),h("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[h("button",{type:"button",onClick:n,style:i.buttonCancel,children:E("取消")}),h("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:E("去支付")})]})]})},Lt={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:"24px",cursor:"pointer",color:"#999",padding:"0",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:"18px",fontWeight:"600",marginBottom:"24px",color:"#222"},tabBtn:(e,t)=>({flex:1,padding:"12px 16px",background:e?"#1890ff":"transparent",color:e?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:t?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:"14px",fontWeight:e?"600":"400",borderRadius:t?"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:"16px",right:"16px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#B5B8BE",padding:"0",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:"18px",fontWeight:"600",marginBottom:"24px",color:"#F5F6FA"},tabBtn:(e,t)=>({flex:1,padding:"12px 16px",background:e?"#00E8C6":"transparent",color:e?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:t?"none":"1px solid #444C5C",cursor:"pointer",fontSize:"14px",fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})}};function Zo(){return L("theme")===N.WHITE?Lt.white:Lt.dark}function Qo({visible:e,onClose:t,title:n,children:r,width:o=400,maxWidth:s=400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=B(!1),d=Zo(),c=p=>{p.target===p.currentTarget?l(!0):l(!1)},m=p=>{p.target===p.currentTarget&&u&&a&&t(),l(!1)};return e?h("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:m,children:h("div",{style:{background:d.modalBg,padding:32,borderRadius:12,minWidth:o,maxWidth:s,color:d.modalColor,boxShadow:d.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[i&&h("button",{type:"button",onClick:t,style:d.closeBtn,"aria-label":"关闭",children:"×"}),n&&h("div",{style:d.title,children:n}),r]})}):null}const Ut={white:{tabBtn:(e,t)=>({flex:1,background:e?"#fff":"#F7F8FA",color:e?"#1890ff":"#222",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:16,height:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #F0F1F3":void 0,borderLeft:t?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})},dark:{tabBtn:(e,t)=>({flex:1,background:e?"#23262F":"#181A20",color:e?"#00E8C6":"#fff",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:16,height:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #23262F":void 0,borderLeft:t?void 0:"1px solid #23262F",transition:"all 0.2s"})}};function Yo(){return L("theme")===N.WHITE?Ut.white:Ut.dark}function ei({visible:e,onClose:t,onSubmit:n}){const[r,o]=B({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,i]=B({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[a,u]=B("online"),l=Yo();ae(()=>{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 m=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:E("请输入充值金额")})),m=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:E("请选择支付平台")})),m=!1),!!m){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:E("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}};return h(Qo,{visible:e,onClose:t,title:E("充值 / 转账"),children:[h("div",{style:{display:"flex",marginBottom:28},children:[h("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:E("在线充值")}),h("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:E("线下转账")})]}),a==="online"?h("form",{onSubmit:d,children:h(Jo,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):h(Xo,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function it(){return(it=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 ti=["context","children"];function ni(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,ti);return Rn(t,n)}function ri(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=X(ni,it({},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[Dn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),d=u[i].slot;d?s[d]=X(zt,{name:d},l):o[i]=l}var c=r?X(zt,null,o):o;return X(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Tn:Pe)(this._vdom,this._root)}function Dn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function oi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Dn(e)]=n,this._vdom=Rn(this._vdom,r),Pe(this._vdom,this._root)}}function ii(){Pe(this._vdom=null,this._root)}function zt(e,t){var n=this;return X("slot",it({},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 st(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=ri,o.prototype.attributeChangedCallback=oi,o.prototype.disconnectedCallback=ii,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 si(){const[e,t]=B(!1),n=async r=>{const o=await Bo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return h("div",{children:[h(Pn,{onClick:()=>t(!0),children:E("充值/转账")}),h(ei,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}st(si,"best-recharge",["theme"],{shadow:!1});const Ht={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 ai(){return L("theme")===N.WHITE?Ht.white:Ht.dark}const li=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,u]=B(!1),[l,d]=B(i),c=Se(null),m=Se(null),p=ai(),b=()=>{if(m.current&&(clearTimeout(m.current),m.current=null),i==="top"||i==="bottom")if(c.current){const w=c.current.getBoundingClientRect();i==="top"&&w.top<100?d("bottom"):i==="bottom"&&window.innerHeight-w.bottom<100?d("top"):d(i)}else d(i);else d(i);u(!0)},g=()=>{m.current=window.setTimeout(()=>{u(!1)},120)};let _={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...p.popover},y={position:"absolute",zIndex:11,width:0,height:0};return l==="top"?(_={..._,left:"50%",top:-48,transform:"translateX(-50%)"},y={...y,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${p.arrow.top}`}):l==="bottom"?(_={..._,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},y={...y,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${p.arrow.bottom}`}):l==="leftTop"?(_={..._,right:"100%",top:0,marginRight:s,transform:"none"},y={...y,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${p.arrow.left}`}):l==="rightTop"&&(_={..._,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},y={...y,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${p.arrow.right}`}),h("div",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:b,onMouseLeave:g,children:[t,a&&h("div",{style:_,onMouseEnter:b,onMouseLeave:g,children:[e,h("div",{style:y})]})]})},Mt={white:{popoverTitle:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600}},dark:{popoverTitle:{fontSize:16,fontWeight:600,color:"#fff",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #374151",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:18,color:"#B5B8BE",marginLeft:8,fontWeight:600}}};function ci(){return L("theme")===N.WHITE?Mt.white:Mt.dark}function jt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function ui(e){const[t,n]=B({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await Bn(),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)}};ae(()=>{r()},[]),ae(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=ci(),s=[{label:E("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:E("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:E("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:E("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return h(li,{popover:h(G,{children:[h("div",{style:o.popoverTitle,children:E("余额详情")}),s.map(i=>h("div",{style:o.detailRow,children:[h("span",{style:o.detailLabel,children:[h("span",{style:o.detailDot(i.dot)}),i.label]}),h("span",{style:o.detailValue(i.color),children:[t.symbol,jt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:h("div",{style:o.main,children:[t.symbol,jt(t.available),h("span",{style:o.currency,children:t.currency})]})})}st(ui,"best-statistical-balance");const pe={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 di(e){return L("theme")===N.WHITE?{...pe.white,background:e||pe.white.background}:{...pe.dark,background:e||pe.dark.background}}function fi(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function pi({color:e,size:t="medium",children:n}){const[r,o]=B(!1),s=di(e),i=fi(t),a={...s,...i,display:"flex",alignItems:"center"};return h(G,{children:[h("style",{children:`
|
|
60
|
+
`}),h("div",{onClick:()=>!i&&m(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...w(),...o},tabIndex:0,children:[h("span",{style:{flex:1},children:y?y.label:h("span",{style:_.placeholder,children:r||"请选择"})}),h("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:h("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),c&&!i&&h("div",{className:`custom-select-dropdown${l?" "+l:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:_.boxShadow,maxHeight:220,overflowY:"auto",..._.dropdown,...a},children:[n.length===0&&h("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[h("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[h("title",{children:E("暂无数据")}),h("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[h("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),h("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[h("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"}),h("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"})]})]})]}),h("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:E("暂无数据")})]}),n.map((x,k)=>h("div",{onClick:()=>{x.disabled||(m(!1),t?.(x.value))},onMouseEnter:()=>g(k),onMouseLeave:()=>g(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,..._.option(e===x.value,!!x.disabled,b===k)},children:x.label},x.value))]}),d]})},Nt={white:{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:14,color:"#52c41a"}},dark:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:14,color:"#52c41a"}}};function $o(){const e=B("theme"),t=B("themeConfig"),n=e===D.WHITE,r=n?Nt.white:Nt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,buttonSubmit:{...r.buttonSubmit,background:o.color}}}return r}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(m=>m.payment_support)||[],[a,u]=O(""),[l,d]=O(!1),c=$o();return ae(()=>{e.currency&&e.amount&&e.rechargeChannel?Oo({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(m=>{u(m),d(!0)}).catch(m=>{console.error("计算支付金额失败:",m),d(!1)}):d(!1)},[e.currency,e.amount,e.rechargeChannel]),h(G,{children:[h("div",{style:{marginBottom:18},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),h(Xe,{value:e.currency,onChange:m=>{t(p=>({...p,currency:m}))},options:s?.map(m=>({value:m.value,label:m.label})),placeholder:E("请选择充值币种")})]}),h("div",{style:{marginBottom:18},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),h("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:m=>{let p=m.target.value;p=Wo(p);let b="";if(p&&!p.endsWith(".")){let g=parseFloat(p);if(!isNaN(g)&&(g<1&&(g=1),g>999999.99&&(g=999999.99),p=g.toString(),/\./.test(m.target.value))){const _=m.target.value.split(".")[1];_!==void 0&&_.length>0&&(p=g.toFixed(Math.min(_.length,2)))}}t(g=>({...g,amount:p,amountError:b}))},onBlur:m=>{let p=m.target.value;p=qo(p),t(b=>({...b,amount:p,amountError:""}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&h("div",{style:c.error,children:e.amountError})]}),h("div",{style:{marginBottom:24},children:[h("div",{style:c.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),h(Xe,{value:e.rechargeChannel,onChange:m=>{t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},options:i?.map(m=>({value:m.value,label:m.label})),placeholder:E("请选择支付平台")}),e.rechargeChannelError&&h("div",{style:c.error,children:e.rechargeChannelError})]}),l&&a&&h("div",{style:c.feeTip,children:[i.find(m=>m.value===e.rechargeChannel)?.label||e.rechargeChannel,E("需要收取手续费,实际支付金额约为:"),"$",a]}),e.error&&h("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),h("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[h("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),h("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E(r?"提交中...":"去支付")})]})]})},It={white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"}}};function Vo(){return B("theme")===D.WHITE?It.white:It.dark}const Go=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:s=!1})=>{const i=ve(null),[a,u]=O(!1),[l,d]=O(0),c=Vo(),m=async b=>{const g=Array.from(b.target.files).slice(0,n);if(!g.length)return;u(!0);const _=[];for(let y=0;y<g.length;y++){d(0);const w=new FormData;w.append("file",g[y]);try{const x=await Ao(w,k=>d(k));x&&_.push(x)}catch{}}u(!1),d(0),t?.([...e,..._]),i.current&&(i.current.value="")},p=b=>{const g=e.filter((_,y)=>y!==b);t?.(g)};return h("div",{children:[h("div",{style:{...c.container,cursor:s?"not-allowed":c.container.cursor,opacity:s?.6:1},onClick:()=>!s&&i.current?.click(),children:[h("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),h("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),h("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),h("input",{ref:i,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:m,disabled:s}),a&&h("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",l,"%"]})]}),e&&e.length>0&&h("div",{style:{marginTop:12},children:e.map((b,g)=>h("div",{style:c.fileItem,children:[h("div",{style:{display:"flex",alignItems:"center",flex:1},children:[h("span",{style:{fontWeight:500,wordBreak:"break-all"},children:b.split("/").pop()}),h("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),h("button",{type:"button",onClick:_=>{_.stopPropagation(),p(g)},style:c.removeBtn,disabled:s,children:E("移除")})]},b))})]})},Dt={white:{label:{marginBottom:8,fontSize:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},dark:{label:{marginBottom:8,fontSize:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:24,textAlign:"center",cursor:"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}};function Ko(){const e=B("theme"),t=B("themeConfig"),n=e===D.WHITE,r=n?Dt.white:Dt.dark;if(console.log(t,"themeConfig"),t){const o=n?t.white:t.dark;if(o?.color)return{...r,buttonSubmit:{...r.buttonSubmit,background:o.color}}}return r}const Xo=({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=Ko();return h("form",{onSubmit:async u=>{u.preventDefault();let l=!0;t(d=>({...d,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(d=>({...d,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(d=>({...d,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(d=>({...d,filesError:E("请上传转账凭证")})),l=!1),l&&(await Fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Ke.success(E("离线充值创建成功")))},children:[h("div",{style:{marginBottom:18},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),h(Xe,{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:E("请选择支付平台")}),e.platformError&&h("div",{style:i.error,children:e.platformError})]}),h("div",{style:{marginBottom:18},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),h("input",{type:"text",placeholder:E("请输入转账交易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&&h("div",{style:i.error,children:e.transactionIdError})]}),h("div",{style:{marginBottom:24},children:[h("div",{style:i.label,children:[h("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),h(Go,{value:e.files,onChange:u=>t(l=>({...l,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&h("div",{style:i.error,children:e.filesError})]}),h("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[h("button",{type:"button",onClick:n,style:i.buttonCancel,children:E("取消")}),h("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:E("去支付")})]})]})},Lt={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:"24px",cursor:"pointer",color:"#999",padding:"0",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:"18px",fontWeight:"600",marginBottom:"24px",color:"#222"},tabBtn:(e,t)=>({flex:1,padding:"12px 16px",background:e?"#1890ff":"transparent",color:e?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:t?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:"14px",fontWeight:e?"600":"400",borderRadius:t?"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:"16px",right:"16px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#B5B8BE",padding:"0",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:"18px",fontWeight:"600",marginBottom:"24px",color:"#F5F6FA"},tabBtn:(e,t)=>({flex:1,padding:"12px 16px",background:e?"#00E8C6":"transparent",color:e?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:t?"none":"1px solid #444C5C",cursor:"pointer",fontSize:"14px",fontWeight:e?"600":"400",borderRadius:t?"6px 0 0 6px":"0 6px 6px 0"})}};function Zo(){return B("theme")===D.WHITE?Lt.white:Lt.dark}function Qo({visible:e,onClose:t,title:n,children:r,width:o=400,maxWidth:s=400,showClose:i=!0,maskClosable:a=!0}){const[u,l]=O(!1),d=Zo(),c=p=>{p.target===p.currentTarget?l(!0):l(!1)},m=p=>{p.target===p.currentTarget&&u&&a&&t(),l(!1)};return e?h("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:m,children:h("div",{style:{background:d.modalBg,padding:32,borderRadius:12,minWidth:o,maxWidth:s,color:d.modalColor,boxShadow:d.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[i&&h("button",{type:"button",onClick:t,style:d.closeBtn,"aria-label":"关闭",children:"×"}),n&&h("div",{style:d.title,children:n}),r]})}):null}const Ut={white:{tabBtn:(e,t)=>({flex:1,background:e?"#fff":"#F7F8FA",color:e?"#1890ff":"#222",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:16,height:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #F0F1F3":void 0,borderLeft:t?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})},dark:{tabBtn:(e,t)=>({flex:1,background:e?"#23262F":"#181A20",color:e?"#00E8C6":"#fff",border:"none",borderRadius:t?"8px 0 0 8px":"0 8px 8px 0",fontWeight:e?600:400,fontSize:16,height:48,boxShadow:e?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:t?"1px solid #23262F":void 0,borderLeft:t?void 0:"1px solid #23262F",transition:"all 0.2s"})}};function Yo(){const e=B("theme"),t=B("themeConfig"),n=e===D.WHITE,r=n?Ut.white:Ut.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,tabBtn:(s,i)=>({...r.tabBtn(s,i),color:s?o.color:r.tabBtn(s,i).color})}}return r}function ei({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=Yo();ae(()=>{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 m=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:E("请输入充值金额")})),m=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:E("请选择支付平台")})),m=!1),!!m){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:E("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}};return h(Qo,{visible:e,onClose:t,title:E("充值 / 转账"),children:[h("div",{style:{display:"flex",marginBottom:28},children:[h("button",{type:"button",onClick:()=>u("online"),style:l.tabBtn(a==="online",!0),children:E("在线充值")}),h("button",{type:"button",onClick:()=>u("offline"),style:l.tabBtn(a==="offline",!1),children:E("线下转账")})]}),a==="online"?h("form",{onSubmit:d,children:h(Jo,{formState:r,setFormState:o,onClose:t,loading:r.loading})}):h(Xo,{formState:s,setFormState:i,onClose:t,loading:s.loading})]})}function it(){return(it=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 ti=["context","children"];function ni(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,ti);return Cn(t,n)}function ri(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=X(ni,it({},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[Nn(a[i].name)]=a[i].value);for(i=u.length;i--;){var l=t(u[i],null),d=u[i].slot;d?s[d]=X(zt,{name:d},l):o[i]=l}var c=r?X(zt,null,o):o;return X(r||n.nodeName.toLowerCase(),s,c)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Tn:Pe)(this._vdom,this._root)}function Nn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function oi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Nn(e)]=n,this._vdom=Cn(this._vdom,r),Pe(this._vdom,this._root)}}function ii(){Pe(this._vdom=null,this._root)}function zt(e,t){var n=this;return X("slot",it({},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 st(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=ri,o.prototype.attributeChangedCallback=oi,o.prototype.disconnectedCallback=ii,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 si(){const[e,t]=O(!1),n=async r=>{const o=await Bo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return h("div",{children:[h(Pn,{onClick:()=>t(!0),children:E("充值/转账")}),h(ei,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}st(si,"best-recharge",["theme"],{shadow:!1});const Ht={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 ai(){return B("theme")===D.WHITE?Ht.white:Ht.dark}const li=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:s=16,popoverPosition:i="top"})=>{const[a,u]=O(!1),[l,d]=O(i),c=ve(null),m=ve(null),p=ai(),b=()=>{if(m.current&&(clearTimeout(m.current),m.current=null),i==="top"||i==="bottom")if(c.current){const w=c.current.getBoundingClientRect();i==="top"&&w.top<100?d("bottom"):i==="bottom"&&window.innerHeight-w.bottom<100?d("top"):d(i)}else d(i);else d(i);u(!0)},g=()=>{m.current=window.setTimeout(()=>{u(!1)},120)};let _={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...p.popover},y={position:"absolute",zIndex:11,width:0,height:0};return l==="top"?(_={..._,left:"50%",top:-48,transform:"translateX(-50%)"},y={...y,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${p.arrow.top}`}):l==="bottom"?(_={..._,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},y={...y,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${p.arrow.bottom}`}):l==="leftTop"?(_={..._,right:"100%",top:0,marginRight:s,transform:"none"},y={...y,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${p.arrow.left}`}):l==="rightTop"&&(_={..._,left:"100%",top:0,marginLeft:s,transform:"translateY(0)"},y={...y,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${p.arrow.right}`}),h("div",{ref:c,style:{position:"relative",display:"inline-block"},onMouseEnter:b,onMouseLeave:g,children:[t,a&&h("div",{style:_,onMouseEnter:b,onMouseLeave:g,children:[e,h("div",{style:y})]})]})},Mt={white:{popoverTitle:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600}},dark:{popoverTitle:{fontSize:16,fontWeight:600,color:"#fff",marginBottom:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #374151",fontSize:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:e=>({display:"inline-block",width:8,height:8,borderRadius:"50%",background:e,marginRight:8}),detailValue:e=>({color:e,fontWeight:600,fontSize:15}),main:{fontSize:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:18,color:"#B5B8BE",marginLeft:8,fontWeight:600}}};function ci(){return B("theme")===D.WHITE?Mt.white:Mt.dark}function jt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function ui(e){const[t,n]=O({available:0,currency:"USD",symbol:"$",details:[]}),r=async()=>{try{const i=await Bn(),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)}};ae(()=>{r()},[]),ae(()=>{const i=()=>{r()};return document.addEventListener("refresh-balance",i),()=>{document.removeEventListener("refresh-balance",i)}},[]);const o=ci(),s=[{label:E("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:E("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:E("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:E("可用余额"),value:t.details[t.details.length-1]?.value||0,color:"#1890ff",dot:"#15b36b"}];return h(li,{popover:h(G,{children:[h("div",{style:o.popoverTitle,children:E("余额详情")}),s.map(i=>h("div",{style:o.detailRow,children:[h("span",{style:o.detailLabel,children:[h("span",{style:o.detailDot(i.dot)}),i.label]}),h("span",{style:o.detailValue(i.color),children:[t.symbol,jt(i.value)]})]},i.label))]}),popoverPosition:e.popoverPosition||"bottom",children:h("div",{style:o.main,children:[t.symbol,jt(t.available),h("span",{style:o.currency,children:t.currency})]})})}st(ui,"best-statistical-balance");const pe={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 di(e){return B("theme")===D.WHITE?{...pe.white,background:e||pe.white.background}:{...pe.dark,background:e||pe.dark.background}}function fi(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function pi({color:e,size:t="medium",children:n}){const[r,o]=O(!1),s=di(e),i=fi(t),a={...s,...i,display:"flex",alignItems:"center"};return h(G,{children:[h("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
|
-
`}),h(Pn,{onClick:async()=>{o(!0);try{On(),await new Promise(d=>setTimeout(d,300))}finally{o(!1)}},color:e,children:h("div",{style:a,children:[h("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:[h("path",{d:"M21 2v6h-6"}),h("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),h("path",{d:"M3 22v-6h6"}),h("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&h("span",{children:n})]})})]})}st(pi,"best-refresh-button",[],{shadow:!0});const hi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=hi;exports.getBalanceData=Po;exports.initFundUnit=
|
|
79
|
+
`}),h(Pn,{onClick:async()=>{o(!0);try{On(),await new Promise(d=>setTimeout(d,300))}finally{o(!1)}},color:e,children:h("div",{style:a,children:[h("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:[h("path",{d:"M21 2v6h-6"}),h("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),h("path",{d:"M3 22v-6h6"}),h("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&h("span",{children:n})]})})]})}st(pi,"best-refresh-button",[],{shadow:!0});const hi=["best-recharge","best-statistical-balance","best-refresh-button"];exports.components=hi;exports.getBalanceData=Po;exports.initFundUnit=No;exports.npmTest=In;exports.printCurrentTime=Dn;exports.refreshBalance=On;exports.viteProxy=Io;
|