best-unit 0.0.38 → 0.0.40
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 +6 -6
- package/dist/best-unit.js +968 -871
- package/package.json +1 -1
- package/src/components/business/recharge-sdk/components/Button.tsx +24 -9
- package/src/components/business/recharge-sdk/components/OfflineTransferForm.tsx +6 -3
- package/src/components/business/recharge-sdk/components/OnlineRechargeForm.tsx +6 -2
- package/src/components/business/recharge-sdk/components/Recharge.tsx +7 -8
- package/src/components/business/recharge-sdk/index.tsx +0 -5
- package/src/components/business/statistical-balance/index.tsx +113 -61
- package/src/components/common/HoverPopover.tsx +43 -8
- package/src/components/common/Upload.tsx +90 -37
- package/src/demo/App.tsx +182 -25
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function gn(){console.log("Current time:",new Date().toISOString())}function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:yn}=Object.prototype,{getPrototypeOf:Me}=Object,{iterator:be,toStringTag:Ct}=Symbol,ge=(e=>t=>{const n=yn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),N=e=>(e=e.toLowerCase(),t=>ge(t)===e),ye=e=>t=>typeof t===e,{isArray:G}=Array,ee=ye("undefined");function wn(e){return e!==null&&!ee(e)&&e.constructor!==null&&!ee(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const At=N("ArrayBuffer");function xn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&At(e.buffer),t}const En=ye("string"),P=ye("function"),kt=ye("number"),we=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,le=e=>{if(ge(e)!=="object")return!1;const t=Me(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ct in e)&&!(be in e)},vn=N("Date"),Rn=N("File"),Tn=N("Blob"),Cn=N("FileList"),An=e=>we(e)&&P(e.pipe),kn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ge(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},On=N("URLSearchParams"),[Fn,Pn,Bn,Nn]=["ReadableStream","Request","Response","Headers"].map(N),Dn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function re(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),G(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Ot(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 $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ft=e=>!ee(e)&&e!==$;function Fe(){const{caseless:e}=Ft(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ot(t,o)||o;le(t[i])&&le(r)?t[i]=Fe(t[i],r):le(r)?t[i]=Fe({},r):G(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&re(arguments[r],n);return t}const Un=(e,t,n,{allOwnKeys:r}={})=>(re(t,(o,i)=>{n&&P(o)?e[i]=Tt(o,n):e[i]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),In=(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)},zn=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Me(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},jn=(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},Hn=e=>{if(!e)return null;if(G(e))return e;let t=e.length;if(!kt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Me(Uint8Array)),$n=(e,t)=>{const r=(e&&e[be]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wn=N("HTMLFormElement"),Jn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vn=N("RegExp"),Pt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};re(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Gn=e=>{Pt(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+"'")})}})},Kn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return G(e)?r(e):r(String(e).split(t)),n},Xn=()=>{},Zn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qn(e){return!!(e&&P(e.append)&&e[Ct]==="FormData"&&e[be])}const Yn=e=>{const t=new Array(10),n=(r,o)=>{if(we(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=G(r)?[]:{};return re(r,(s,a)=>{const c=n(s,o+1);!ee(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},er=N("AsyncFunction"),tr=e=>e&&(we(e)||P(e))&&P(e.then)&&P(e.catch),Bt=((e,t)=>e?setImmediate:t?((n,r)=>($.addEventListener("message",({source:o,data:i})=>{o===$&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P($.postMessage)),nr=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Bt,rr=e=>e!=null&&P(e[be]),d={isArray:G,isArrayBuffer:At,isBuffer:wn,isFormData:kn,isArrayBufferView:xn,isString:En,isNumber:kt,isBoolean:Sn,isObject:we,isPlainObject:le,isReadableStream:Fn,isRequest:Pn,isResponse:Bn,isHeaders:Nn,isUndefined:ee,isDate:vn,isFile:Rn,isBlob:Tn,isRegExp:Vn,isFunction:P,isStream:An,isURLSearchParams:On,isTypedArray:Mn,isFileList:Cn,forEach:re,merge:Fe,extend:Un,trim:Dn,stripBOM:Ln,inherits:In,toFlatObject:zn,kindOf:ge,kindOfTest:N,endsWith:jn,toArray:Hn,forEachEntry:$n,matchAll:qn,isHTMLForm:Wn,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Pt,freezeMethods:Gn,toObjectSet:Kn,toCamelCase:Jn,noop:Xn,toFiniteNumber:Zn,findKey:Ot,global:$,isContextDefined:Ft,isSpecCompliantForm:Qn,toJSONObject:Yn,isAsyncFn:er,isThenable:tr,setImmediate:Bt,asap:nr,isIterable:rr};function x(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)}d.inherits(x,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Nt=x.prototype,Dt={};["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=>{Dt[e]={value:e}});Object.defineProperties(x,Dt);Object.defineProperty(Nt,"isAxiosError",{value:!0});x.from=(e,t,n,r,o,i)=>{const s=Object.create(Nt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),x.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const or=null;function Pe(e){return d.isPlainObject(e)||d.isArray(e)}function Ut(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,n){return e?e.concat(t).map(function(o,i){return o=Ut(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ir(e){return d.isArray(e)&&!e.some(Pe)}const sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function xe(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(d.isDate(h))return h.toISOString();if(d.isBoolean(h))return h.toString();if(!c&&d.isBlob(h))throw new x("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(h)||d.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,g,_){let y=h;if(h&&!_&&typeof h=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),h=JSON.stringify(h);else if(d.isArray(h)&&ir(h)||(d.isFileList(h)||d.endsWith(g,"[]"))&&(y=d.toArray(h)))return g=Ut(g),y.forEach(function(v,k){!(d.isUndefined(v)||v===null)&&t.append(s===!0?et([g],k,i):s===null?g:g+"[]",u(v))}),!1}return Pe(h)?!0:(t.append(et(_,g,i),u(h)),!1)}const l=[],m=Object.assign(sr,{defaultVisitor:f,convertValue:u,isVisitable:Pe});function p(h,g){if(!d.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(h),d.forEach(h,function(y,w){(!(d.isUndefined(y)||y===null)&&o.call(t,y,d.isString(w)?w.trim():w,g,m))===!0&&p(y,g?g.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return p(e),t}function tt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function $e(e,t){this._pairs=[],e&&xe(e,this,t)}const Lt=$e.prototype;Lt.append=function(t,n){this._pairs.push([t,n])};Lt.toString=function(t){const n=t?function(r){return t.call(this,r,tt)}:tt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ar(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function It(e,t,n){if(!t)return e;const r=n&&n.encode||ar;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new $e(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nt{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){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lr=typeof URLSearchParams<"u"?URLSearchParams:$e,cr=typeof FormData<"u"?FormData:null,ur=typeof Blob<"u"?Blob:null,fr={isBrowser:!0,classes:{URLSearchParams:lr,FormData:cr,Blob:ur},protocols:["http","https","file","blob","url","data"]},qe=typeof window<"u"&&typeof document<"u",Be=typeof navigator=="object"&&navigator||void 0,dr=qe&&(!Be||["ReactNative","NativeScript","NS"].indexOf(Be.product)<0),pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hr=qe&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qe,hasStandardBrowserEnv:dr,hasStandardBrowserWebWorkerEnv:pr,navigator:Be,origin:hr},Symbol.toStringTag,{value:"Module"})),O={..._r,...fr};function mr(e,t){return xe(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function jt(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=gr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(br(r),o,n,0)}),n}return null}function yr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const oe={transitional:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(jt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return xe(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),yr(t)):t}],transformResponse:[function(t){const n=this.transitional||oe.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?x.from(a,x.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:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{oe.headers[e]={}});const wr=d.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"]),xr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&wr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rt=Symbol("internals");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[rt]=this[rt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Q(s);r[a]||(Rr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Ae(e,t){const n=this||oe,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ht(e){return!!(e&&e.__CANCEL__)}function K(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(K,x,{__CANCEL__:!0});function Mt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,m=0;for(;l!==o;)m+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const p=f&&u-f;return p?Math.round(m*1e3/p):void 0}}function Ar(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const pe=(e,t,n=3)=>{let r=0;const o=Cr(50,250);return Ar(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},ot=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},it=e=>(...t)=>d.asap(()=>e(...t)),kr=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Or=O.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Fr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Fr(t);return e&&(r||n==!1)?Pr(e,t):t}const st=e=>e instanceof B?{...e}:e;function W(e,t){t=t||{};const n={};function r(u,f,l,m){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:m},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,m){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,m)}else return r(u,f,l,m)}function i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(st(u),st(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,m=l(e[f],t[f],f);d.isUndefined(m)&&l!==a||(n[f]=m)}),n}const qt=e=>{const t=W({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=It($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&kr(t.url))){const u=o&&i&&Or.read(i);u&&s.set(o,u)}return t},Br=typeof XMLHttpRequest<"u",Nr=Br&&function(e){return new Promise(function(n,r){const o=qt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,m,p,h;function g(){p&&p(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function y(){if(!_)return;const v=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:v,config:e,request:_};Mt(function(D){n(D),g()},function(D){r(D),g()},A),_=null}"onloadend"in _?_.onloadend=y:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(y)},_.onabort=function(){_&&(r(new x("Request aborted",x.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new x("Network Error",x.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||zt;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new x(k,A.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(k,A){_.setRequestHeader(A,k)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([m,h]=pe(u,!0),_.addEventListener("progress",m)),c&&_.upload&&([l,p]=pe(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(f=v=>{_&&(r(!v||v.type?new K(null,e,_):v),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=Tr(o.url);if(w&&O.protocols.indexOf(w)===-1){r(new x("Unsupported protocol "+w+":",x.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Dr=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof x?f:new K(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Ur=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},Lr=async function*(e,t){for await(const n of Ir(e))yield*Ur(n,t)},Ir=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},at=(e,t,n,r)=>{const o=Lr(e,t);let i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let m=i+=l;n(m)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Ee=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wt=Ee&&typeof ReadableStream=="function",zr=Ee&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Wt&&Jt(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),lt=64*1024,Ne=Wt&&Jt(()=>d.isReadableStream(new Response("").body)),he={stream:Ne&&(e=>e.body)};Ee&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!he[t]&&(he[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,r)})})})(new Response);const Hr=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await zr(e)).byteLength},Mr=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Hr(t)},$r=Ee&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:m}=qt(e);u=u?(u+"").toLowerCase():"text";let p=Dr([o,i&&i.toAbortSignal()],s),h;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let _;try{if(c&&jr&&n!=="get"&&n!=="head"&&(_=await Mr(f,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),F;if(d.isFormData(r)&&(F=A.headers.get("content-type"))&&f.setContentType(F),A.body){const[D,z]=ot(_,pe(it(c)));r=at(A.body,lt,D,z)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;h=new Request(t,{...m,signal:p,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(h,m);const v=Ne&&(u==="stream"||u==="response");if(Ne&&(a||v&&g)){const A={};["status","statusText","headers"].forEach(H=>{A[H]=w[H]});const F=d.toFiniteNumber(w.headers.get("content-length")),[D,z]=a&&ot(F,pe(it(a),!0))||[];w=new Response(at(w.body,lt,D,()=>{z&&z(),g&&g()}),A)}u=u||"text";let k=await he[d.findKey(he,u)||"text"](w,e);return!v&&g&&g(),await new Promise((A,F)=>{Mt(A,F,{data:k,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,e,h),{cause:y.cause||y}):x.from(y,y&&y.code,e,h)}}),De={http:or,xhr:Nr,fetch:$r};d.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,qr=e=>d.isFunction(e)||e===null||e===!1,Vt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!qr(n)&&(r=De[(s=String(n)).toLowerCase()],r===void 0))throw new x(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function gn(){console.log("Current time:",new Date().toISOString())}function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:yn}=Object.prototype,{getPrototypeOf:$e}=Object,{iterator:ge,toStringTag:kt}=Symbol,ye=(e=>t=>{const n=yn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>ye(t)===e),we=e=>t=>typeof t===e,{isArray:K}=Array,te=we("undefined");function wn(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ct=U("ArrayBuffer");function xn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ct(e.buffer),t}const En=we("string"),P=we("function"),At=we("number"),xe=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,ce=e=>{if(ye(e)!=="object")return!1;const t=$e(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(kt in e)&&!(ge in e)},vn=U("Date"),Rn=U("File"),Tn=U("Blob"),kn=U("FileList"),Cn=e=>xe(e)&&P(e.pipe),An=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ye(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},On=U("URLSearchParams"),[Fn,Pn,Bn,Nn]=["ReadableStream","Request","Response","Headers"].map(U),Un=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oe(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),K(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(r=0;r<s;r++)a=i[r],t.call(null,e[a],a,e)}}function Ot(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,Ft=e=>!te(e)&&e!==q;function Pe(){const{caseless:e}=Ft(this)&&this||{},t={},n=(r,o)=>{const i=e&&Ot(t,o)||o;ce(t[i])&&ce(r)?t[i]=Pe(t[i],r):ce(r)?t[i]=Pe({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&oe(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(oe(t,(o,i)=>{n&&P(o)?e[i]=Tt(o,n):e[i]=o},{allOwnKeys:r}),e),In=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ln=(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)},zn=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&$e(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Hn=(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},jn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!At(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$e(Uint8Array)),$n=(e,t)=>{const r=(e&&e[ge]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Wn=U("HTMLFormElement"),Jn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ye=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vn=U("RegExp"),Pt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Gn=e=>{Pt(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+"'")})}})},Kn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Xn=()=>{},Zn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Qn(e){return!!(e&&P(e.append)&&e[kt]==="FormData"&&e[ge])}const Yn=e=>{const t=new Array(10),n=(r,o)=>{if(xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return oe(r,(s,a)=>{const c=n(s,o+1);!te(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},er=U("AsyncFunction"),tr=e=>e&&(xe(e)||P(e))&&P(e.then)&&P(e.catch),Bt=((e,t)=>e?setImmediate:t?((n,r)=>(q.addEventListener("message",({source:o,data:i})=>{o===q&&i===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)),nr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Bt,rr=e=>e!=null&&P(e[ge]),d={isArray:K,isArrayBuffer:Ct,isBuffer:wn,isFormData:An,isArrayBufferView:xn,isString:En,isNumber:At,isBoolean:Sn,isObject:xe,isPlainObject:ce,isReadableStream:Fn,isRequest:Pn,isResponse:Bn,isHeaders:Nn,isUndefined:te,isDate:vn,isFile:Rn,isBlob:Tn,isRegExp:Vn,isFunction:P,isStream:Cn,isURLSearchParams:On,isTypedArray:Mn,isFileList:kn,forEach:oe,merge:Pe,extend:Dn,trim:Un,stripBOM:In,inherits:Ln,toFlatObject:zn,kindOf:ye,kindOfTest:U,endsWith:Hn,toArray:jn,forEachEntry:$n,matchAll:qn,isHTMLForm:Wn,hasOwnProperty:Ye,hasOwnProp:Ye,reduceDescriptors:Pt,freezeMethods:Gn,toObjectSet:Kn,toCamelCase:Jn,noop:Xn,toFiniteNumber:Zn,findKey:Ot,global:q,isContextDefined:Ft,isSpecCompliantForm:Qn,toJSONObject:Yn,isAsyncFn:er,isThenable:tr,setImmediate:Bt,asap:nr,isIterable:rr};function x(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)}d.inherits(x,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Nt=x.prototype,Ut={};["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=>{Ut[e]={value:e}});Object.defineProperties(x,Ut);Object.defineProperty(Nt,"isAxiosError",{value:!0});x.from=(e,t,n,r,o,i)=>{const s=Object.create(Nt);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),x.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const or=null;function Be(e){return d.isPlainObject(e)||d.isArray(e)}function Dt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function et(e,t,n){return e?e.concat(t).map(function(o,i){return o=Dt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function ir(e){return d.isArray(e)&&!e.some(Be)}const sr=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Ee(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,_){return!d.isUndefined(_[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new x("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,g,_){let w=p;if(p&&!_&&typeof p=="object"){if(d.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&ir(p)||(d.isFileList(p)||d.endsWith(g,"[]"))&&(w=d.toArray(p)))return g=Dt(g),w.forEach(function(S,v){!(d.isUndefined(S)||S===null)&&t.append(s===!0?et([g],v,i):s===null?g:g+"[]",u(S))}),!1}return Be(p)?!0:(t.append(et(_,g,i),u(p)),!1)}const l=[],h=Object.assign(sr,{defaultVisitor:f,convertValue:u,isVisitable:Be});function m(p,g){if(!d.isUndefined(p)){if(l.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));l.push(p),d.forEach(p,function(w,y){(!(d.isUndefined(w)||w===null)&&o.call(t,w,d.isString(y)?y.trim():y,g,h))===!0&&m(w,g?g.concat(y):[y])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function tt(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&&Ee(e,this,t)}const It=qe.prototype;It.append=function(t,n){this._pairs.push([t,n])};It.toString=function(t){const n=t?function(r){return t.call(this,r,tt)}:tt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ar(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lt(e,t,n){if(!t)return e;const r=n&&n.encode||ar;d.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(t,n):i=d.isURLSearchParams(t)?t.toString():new qe(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class nt{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){d.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lr=typeof URLSearchParams<"u"?URLSearchParams:qe,cr=typeof FormData<"u"?FormData:null,ur=typeof Blob<"u"?Blob:null,fr={isBrowser:!0,classes:{URLSearchParams:lr,FormData:cr,Blob:ur},protocols:["http","https","file","blob","url","data"]},We=typeof window<"u"&&typeof document<"u",Ne=typeof navigator=="object"&&navigator||void 0,dr=We&&(!Ne||["ReactNative","NativeScript","NS"].indexOf(Ne.product)<0),pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hr=We&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:We,hasStandardBrowserEnv:dr,hasStandardBrowserWebWorkerEnv:pr,navigator:Ne,origin:hr},Symbol.toStringTag,{value:"Module"})),F={..._r,...fr};function mr(e,t){return Ee(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return F.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function br(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gr(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Ht(e){function t(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=n.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&d.isArray(o[s])&&(o[s]=gr(o[s])),!a)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(r,o)=>{t(br(r),o,n,0)}),n}return null}function yr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ie={transitional:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(Ht(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ee(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),yr(t)):t}],transformResponse:[function(t){const n=this.transitional||ie.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?x.from(a,x.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}}};d.forEach(["delete","get","head","post","put","patch"],e=>{ie.headers[e]={}});const wr=d.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"]),xr=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&wr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rt=Symbol("internals");function Y(e){return e&&String(e).trim().toLowerCase()}function ue(e){return e===!1||e==null?e:d.isArray(e)?e.map(ue):String(e)}function Er(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 Sr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ce(e,t,n,r,o){if(d.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!d.isString(t)){if(d.isString(r))return t.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(t)}}function vr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Rr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}let B=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,c,u){const f=Y(c);if(!f)throw new Error("header name must be a non-empty string");const l=d.findKey(o,f);(!l||o[l]===void 0||u===!0||u===void 0&&o[l]!==!1)&&(o[l||c]=ue(a))}const s=(a,c)=>d.forEach(a,(u,f)=>i(u,f,c));if(d.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(d.isString(t)&&(t=t.trim())&&!Sr(t))s(xr(t),n);else if(d.isObject(t)&&d.isIterable(t)){let a={},c,u;for(const f of t){if(!d.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[u=f[0]]=(c=a[u])?d.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Y(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Er(o);if(d.isFunction(n))return n.call(this,o,r);if(d.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Y(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ce(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=Y(s),s){const a=d.findKey(r,s);a&&(!n||Ce(r,r[a],a,n))&&(delete r[a],o=!0)}}return d.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Ce(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return d.forEach(this,(o,i)=>{const s=d.findKey(r,i);if(s){n[s]=ue(o),delete n[i];return}const a=t?vr(i):String(i).trim();a!==i&&delete n[i],n[a]=ue(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&d.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[rt]=this[rt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Y(s);r[a]||(Rr(o,s),r[a]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(B.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});d.freezeMethods(B);function Ae(e,t){const n=this||ie,r=t||n,o=B.from(r.headers);let i=r.data;return d.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function jt(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){x.call(this,e??"canceled",x.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,x,{__CANCEL__:!0});function Mt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new x("Request failed with status code "+n.status,[x.ERR_BAD_REQUEST,x.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kr(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let l=i,h=0;for(;l!==o;)h+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Cr(e,t){let n=0,r=1e3/t,o,i;const s=(u,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const f=Date.now(),l=f-n;l>=r?s(u,f):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-l)))},()=>o&&s(o)]}const he=(e,t,n=3)=>{let r=0;const o=kr(50,250);return Cr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-r,u=o(c),f=s<=a;r=s;const l={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&f?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(l)},n)},ot=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},it=e=>(...t)=>d.asap(()=>e(...t)),Ar=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,Or=F.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),d.isString(r)&&s.push("path="+r),d.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Fr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $t(e,t,n){let r=!Fr(t);return e&&(r||n==!1)?Pr(e,t):t}const st=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,h){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:h},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,h){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,h)}else return r(u,f,l,h)}function i(u,f){if(!d.isUndefined(f))return r(void 0,f)}function s(u,f){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function a(u,f,l){if(l in t)return r(u,f);if(l in e)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,f,l)=>o(st(u),st(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,h=l(e[f],t[f],f);d.isUndefined(h)&&l!==a||(n[f]=h)}),n}const qt=e=>{const t=J({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=B.from(s),t.url=Lt($t(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let c;if(d.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...f]=c?c.split(";").map(l=>l.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...f].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(t)),r||r!==!1&&Ar(t.url))){const u=o&&i&&Or.read(i);u&&s.set(o,u)}return t},Br=typeof XMLHttpRequest<"u",Nr=Br&&function(e){return new Promise(function(n,r){const o=qt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,h,m,p;function g(){m&&m(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function w(){if(!_)return;const S=B.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:S,config:e,request:_};Mt(function(N){n(N),g()},function(N){r(N),g()},T),_=null}"onloadend"in _?_.onloadend=w:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(w)},_.onabort=function(){_&&(r(new x("Request aborted",x.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new x("Network Error",x.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){let v=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||zt;o.timeoutErrorMessage&&(v=o.timeoutErrorMessage),r(new x(v,T.clarifyTimeoutError?x.ETIMEDOUT:x.ECONNABORTED,e,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&d.forEach(s.toJSON(),function(v,T){_.setRequestHeader(T,v)}),d.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),a&&a!=="json"&&(_.responseType=o.responseType),u&&([h,p]=he(u,!0),_.addEventListener("progress",h)),c&&_.upload&&([l,m]=he(c),_.upload.addEventListener("progress",l),_.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=S=>{_&&(r(!S||S.type?new X(null,e,_):S),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const y=Tr(o.url);if(y&&F.protocols.indexOf(y)===-1){r(new x("Unsupported protocol "+y+":",x.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Ur=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const f=u instanceof Error?u:this.reason;r.abort(f instanceof x?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new x(`timeout ${t} of ms exceeded`,x.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Dr=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},Ir=async function*(e,t){for await(const n of Lr(e))yield*Dr(n,t)},Lr=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()}},at=(e,t,n,r)=>{const o=Ir(e,t);let i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await o.next();if(u){a(),c.close();return}let l=f.byteLength;if(n){let h=i+=l;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Wt=Se&&typeof ReadableStream=="function",zr=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hr=Wt&&Jt(()=>{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}),lt=64*1024,Ue=Wt&&Jt(()=>d.isReadableStream(new Response("").body)),_e={stream:Ue&&(e=>e.body)};Se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_e[t]&&(_e[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new x(`Response type '${t}' is not supported`,x.ERR_NOT_SUPPORT,r)})})})(new Response);const jr=async e=>{if(e==null)return 0;if(d.isBlob(e))return e.size;if(d.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(d.isArrayBufferView(e)||d.isArrayBuffer(e))return e.byteLength;if(d.isURLSearchParams(e)&&(e=e+""),d.isString(e))return(await zr(e)).byteLength},Mr=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??jr(t)},$r=Se&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:f,withCredentials:l="same-origin",fetchOptions:h}=qt(e);u=u?(u+"").toLowerCase():"text";let m=Ur([o,i&&i.toAbortSignal()],s),p;const g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let _;try{if(c&&Hr&&n!=="get"&&n!=="head"&&(_=await Mr(f,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(d.isFormData(r)&&(O=T.headers.get("content-type"))&&f.setContentType(O),T.body){const[N,z]=ot(_,he(it(c)));r=at(T.body,lt,N,z)}}d.isString(l)||(l=l?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...h,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:w?l:void 0});let y=await fetch(p,h);const S=Ue&&(u==="stream"||u==="response");if(Ue&&(a||S&&g)){const T={};["status","statusText","headers"].forEach(M=>{T[M]=y[M]});const O=d.toFiniteNumber(y.headers.get("content-length")),[N,z]=a&&ot(O,he(it(a),!0))||[];y=new Response(at(y.body,lt,N,()=>{z&&z(),g&&g()}),T)}u=u||"text";let v=await _e[d.findKey(_e,u)||"text"](y,e);return!S&&g&&g(),await new Promise((T,O)=>{Mt(T,O,{data:v,headers:B.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new x("Network Error",x.ERR_NETWORK,e,p),{cause:w.cause||w}):x.from(w,w&&w.code,e,p)}}),De={http:or,xhr:Nr,fetch:$r};d.forEach(De,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,qr=e=>d.isFunction(e)||e===null||e===!1,Vt={getAdapter:e=>{e=d.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let s;if(r=n,!qr(n)&&(r=De[(s=String(n)).toLowerCase()],r===void 0))throw new x(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since :
|
|
4
4
|
`+i.map(ct).join(`
|
|
5
|
-
`):" "+ct(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:De};function
|
|
6
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=W(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ue.assertOptions(r,{silentJSONParsing:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:ue.assertOptions(o,{encode:L.function,serialize:L.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ue.assertOptions(n,{baseUrl:L.spelling("baseURL"),withXsrfToken:L.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,m;if(!c){const h=[ut.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),m=h.length,f=Promise.resolve(n);l<m;)f=f.then(h[l++],h[l++]);return f}m=a.length;let p=n;for(l=0;l<m;){const h=a[l++],g=a[l++];try{p=h(p)}catch(_){g.call(this,_);break}}try{f=ut.call(this,p)}catch(h){return Promise.reject(h)}for(l=0,m=u.length;l<m;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=W(this.defaults,t);const n=$t(t.baseURL,t.url,t.allowAbsoluteUrls);return It(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){q.prototype[t]=function(n,r){return this.request(W(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,a){return this.request(W(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}q.prototype[t]=n(),q.prototype[t+"Form"]=n(!0)});let Jr=class Kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new K(i,s,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 Kt(function(o){t=o}),cancel:t}}};function Vr(e){return function(n){return e.apply(null,n)}}function Gr(e){return d.isObject(e)&&e.isAxiosError===!0}const Ue={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(Ue).forEach(([e,t])=>{Ue[t]=e});function Xt(e){const t=new q(e),n=Tt(q.prototype.request,t);return d.extend(n,q.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Xt(W(e,o))},n}const T=Xt(oe);T.Axios=q;T.CanceledError=K;T.CancelToken=Jr;T.isCancel=Ht;T.VERSION=Gt;T.toFormData=xe;T.AxiosError=x;T.Cancel=T.CanceledError;T.all=function(t){return Promise.all(t)};T.spread=Vr;T.isAxiosError=Gr;T.mergeConfig=W;T.AxiosHeaders=B;T.formToJSON=e=>jt(d.isHTMLForm(e)?new FormData(e):e);T.getAdapter=Vt.getAdapter;T.HttpStatusCode=Ue;T.default=T;const{Axios:Uo,AxiosError:Lo,CanceledError:Io,isCancel:zo,CancelToken:jo,VERSION:Ho,all:Mo,Cancel:$o,isAxiosError:qo,spread:Wo,toFormData:Jo,AxiosHeaders:Vo,HttpStatusCode:Go,formToJSON:Ko,getAdapter:Xo,mergeConfig:Zo}=T;var ie,S,Zt,M,dt,Qt,Yt,en,We,Le,Ie,te={},tn=[],Kr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ve=Array.isArray;function I(e,t){for(var n in t)e[n]=t[n];return e}function Je(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function J(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ie.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Y(e,s,r,o,null)}function Y(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&S.vnode!=null&&S.vnode(i),i}function X(e){return e.children}function fe(e,t){this.props=e,this.context=t}function V(e,t){if(t==null)return e.__?V(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"?V(e):null}function nn(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 nn(e)}}function pt(e){(!e.__d&&(e.__d=!0)&&M.push(e)&&!_e.__r++||dt!=S.debounceRendering)&&((dt=S.debounceRendering)||Qt)(_e)}function _e(){for(var e,t,n,r,o,i,s,a=1;M.length;)M.length>a&&M.sort(Yt),e=M.shift(),a=M.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=I({},r)).__v=r.__v+1,S.vnode&&S.vnode(n),Ve(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??V(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,sn(i,n,s),n.__e!=o&&nn(n)));_e.__r=0}function rn(e,t,n,r,o,i,s,a,c,u,f){var l,m,p,h,g,_,y=r&&r.__k||tn,w=t.length;for(c=Xr(n,t,y,c,w),l=0;l<w;l++)(p=n.__k[l])!=null&&(m=p.__i==-1?te:y[p.__i]||te,p.__i=l,_=Ve(e,p,m,o,i,s,a,c,u,f),h=p.__e,p.ref&&m.ref!=p.ref&&(m.ref&&Ge(m.ref,null,p),f.push(p.ref,p.__c||h,p)),g==null&&h!=null&&(g=h),4&p.__u||m.__k===p.__k?c=on(p,c,e):typeof p.type=="function"&&_!==void 0?c=_:h&&(c=h.nextSibling),p.__u&=-7);return n.__e=g,c}function Xr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,m=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+m,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Y(null,s,null,null,null):ve(s)?Y(X,{children:s},null,null,null):s.constructor==null&&s.__b>0?Y(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=Zr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?m--:o<f&&m++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?m--:u==c+1?m++:(u>c?m--:m++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=V(a)),ln(a,a));return r}function on(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=on(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=V(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Zr(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function ht(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kr.test(t)?n:n+"px"}function ae(e,t,n,r,o){var i,s;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||ht(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ht(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(en,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=We,e.addEventListener(t,i?Ie:Le,i)):e.removeEventListener(t,i?Ie:Le,i);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 _t(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=We++;else if(t.t<n.u)return;return n(S.event?S.event(t):t)}}}function Ve(e,t,n,r,o,i,s,a,c,u){var f,l,m,p,h,g,_,y,w,v,k,A,F,D,z,H,Te,U=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=S.__b)&&f(t);e:if(typeof U=="function")try{if(y=t.props,w="prototype"in U&&U.prototype.render,v=(f=U.contextType)&&r[f.__c],k=f?v?v.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new U(y,k):(t.__c=l=new fe(y,k),l.constructor=U,l.render=Yr),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=k,l.__n=r,m=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&U.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=I({},l.__s)),I(l.__s,U.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,m)w&&U.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&U.getDerivedStateFromProps==null&&y!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,k),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,k)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Z){Z&&(Z.__=t)}),A=0;A<l._sb.length;A++)l.__h.push(l._sb[A]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,k),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,g)})}if(l.context=k,l.props=y,l.__P=e,l.__e=!1,F=S.__r,D=0,w){for(l.state=l.__s,l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),z=0;z<l._sb.length;z++)l.__h.push(l._sb[z]);l._sb=[]}else do l.__d=!1,F&&F(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++D<25);l.state=l.__s,l.getChildContext!=null&&(r=I(I({},r),l.getChildContext())),w&&!m&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(p,h)),H=f,f!=null&&f.type===X&&f.key==null&&(H=an(f.props.children)),a=rn(e,ve(H)?H:[H],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Z){if(t.__v=null,c||i!=null)if(Z.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(Te=i.length;Te--;)Je(i[Te]);else t.__e=n.__e,t.__k=n.__k;S.__e(Z,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Qr(n.__e,t,n,r,o,i,s,c,u);return(f=S.diffed)&&f(t),128&t.__u?void 0:a}function sn(e,t,n){for(var r=0;r<n.length;r++)Ge(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(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:ve(e)?e.map(an):I({},e)}function Qr(e,t,n,r,o,i,s,a,c){var u,f,l,m,p,h,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"),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!w&&(w?p.localName==w:p.nodeType==3)){e=p,i[u]=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,i),a=!1),i=null}if(w==null)_===y||a&&e.data==y||(e.data=y);else{if(i=i&&ie.call(e.childNodes),_=n.props||te,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(p=e.attributes[u]).name]=p.value;for(u in _)if(p=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=p;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;ae(e,u,null,p,o)}}for(u in y)p=y[u],u=="children"?m=p:u=="dangerouslySetInnerHTML"?f=p:u=="value"?h=p:u=="checked"?g=p:a&&typeof p!="function"||_[u]===p||ae(e,u,p,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),rn(t.type=="template"?e.content:e,ve(m)?m:[m],t,n,r,w=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&V(n,0),a,c),i!=null)for(u=i.length;u--;)Je(i[u]);a||(u="value",w=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||w=="progress"&&!h||w=="option"&&h!=_[u])&&ae(e,u,h,_[u],o),u="checked",g!=null&&g!=e[u]&&ae(e,u,g,_[u],o))}return e}function Ge(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 ln(e,t,n){var r,o;if(S.unmount&&S.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ge(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){S.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ln(r[o],t,n||typeof e.type!="function");n||Je(e.__e),e.__c=e.__=e.__e=void 0}function Yr(e,t,n){return this.constructor(e,n)}function Re(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),S.__&&S.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ve(t,e=(!r&&n||t).__k=J(X,null,[e]),o||te,te,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ie.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),sn(i,e,s)}function cn(e,t){Re(e,t,cn)}function un(e,t,n){var r,o,i,s,a=I({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?ie.call(arguments,2):n),Y(e.type,a,r||e.key,o||e.ref,null)}ie=tn.slice,S={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zt=0,fe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=I({},this.state),typeof e=="function"&&(e=e(I({},n),this.props)),e&&I(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pt(this))},fe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pt(this))},fe.prototype.render=X,M=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yt=function(e,t){return e.__v.__b-t.__v.__b},_e.__r=0,en=/(PointerCapture)$|Capture$/i,We=0,Le=_t(!1),Ie=_t(!0);var eo=0;function b(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return S.vnode&&S.vnode(u),u}var ne,R,Oe,mt,me=0,fn=[],C=S,bt=C.__b,gt=C.__r,yt=C.diffed,wt=C.__c,xt=C.unmount,Et=C.__;function Ke(e,t){C.__h&&C.__h(R,e,me||t),me=0;var n=R.__H||(R.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function j(e){return me=1,to(hn,e)}function to(e,t,n){var r=Ke(ne++,2);if(r.t=e,!r.__c&&(r.__=[hn(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=R,!R.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(m){return!!m.__c});if(f.every(function(m){return!m.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(m){if(m.__N){var p=m.__[0];m.__=m.__N,m.__N=void 0,p!==m.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};R.__f=!0;var i=R.shouldComponentUpdate,s=R.componentWillUpdate;R.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},R.shouldComponentUpdate=o}return r.__N||r.__}function dn(e,t){var n=Ke(ne++,3);!C.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,R.__H.__h.push(n))}function ze(e){return me=5,no(function(){return{current:e}},[])}function no(e,t){var n=Ke(ne++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ro(){for(var e;e=fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(de),e.__H.__h.forEach(je),e.__H.__h=[]}catch(t){e.__H.__h=[],C.__e(t,e.__v)}}C.__b=function(e){R=null,bt&&bt(e)},C.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Et&&Et(e,t)},C.__r=function(e){gt&>(e),ne=0;var t=(R=e.__c).__H;t&&(Oe===R?(t.__h=[],R.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(de),t.__h.forEach(je),t.__h=[],ne=0)),Oe=R},C.diffed=function(e){yt&&yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&mt===C.requestAnimationFrame||((mt=C.requestAnimationFrame)||oo)(ro)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Oe=R=null},C.__c=function(e,t){t.some(function(n){try{n.__h.forEach(de),n.__h=n.__h.filter(function(r){return!r.__||je(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],C.__e(r,n.__v)}}),wt&&wt(e,t)},C.unmount=function(e){xt&&xt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{de(r)}catch(o){t=o}}),n.__H=void 0,t&&C.__e(t,n.__v))};var St=typeof requestAnimationFrame=="function";function oo(e){var t,n=function(){clearTimeout(r),St&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);St&&(t=requestAnimationFrame(n))}function de(e){var t=R,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),R=t}function je(e){var t=R;e.__c=e.__(),R=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}class io{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
|
|
5
|
+
`):" "+ct(i[0]):"as no adapter specified";throw new x("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:De};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function ut(e){return Oe(e),e.headers=B.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vt.getAdapter(e.adapter||ie.adapter)(e).then(function(r){return Oe(e),r.data=Ae.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return jt(r)||(Oe(e),r&&r.response&&(r.response.data=Ae.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Gt="1.10.0",ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ve[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ft={};ve.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Gt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new x(o(s," has been removed"+(n?" in "+n:"")),x.ERR_DEPRECATED);return n&&!ft[s]&&(ft[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};ve.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Wr(e,t,n){if(typeof e!="object")throw new x("options must be an object",x.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],c=a===void 0||s(a,i,e);if(c!==!0)throw new x("option "+i+" must be "+c,x.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new x("Unknown option "+i,x.ERR_BAD_OPTION)}}const fe={assertOptions:Wr,validators:ve},I=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new nt,response:new nt}}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 i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=J(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.assertOptions(o,{encode:I.function,serialize:I.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fe.assertOptions(n,{baseUrl:I.spelling("baseURL"),withXsrfToken:I.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=B.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let f,l=0,h;if(!c){const p=[ut.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),h=p.length,f=Promise.resolve(n);l<h;)f=f.then(p[l++],p[l++]);return f}h=a.length;let m=n;for(l=0;l<h;){const p=a[l++],g=a[l++];try{m=p(m)}catch(_){g.call(this,_);break}}try{f=ut.call(this,m)}catch(p){return Promise.reject(p)}for(l=0,h=u.length;l<h;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=$t(t.baseURL,t.url,t.allowAbsoluteUrls);return Lt(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){W.prototype[t]=function(n,r){return this.request(J(r||{},{method:t,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(t){function n(r){return function(i,s,a){return this.request(J(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}W.prototype[t]=n(),W.prototype[t+"Form"]=n(!0)});let Jr=class Kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new X(i,s,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 Kt(function(o){t=o}),cancel:t}}};function Vr(e){return function(n){return e.apply(null,n)}}function Gr(e){return d.isObject(e)&&e.isAxiosError===!0}const Ie={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(Ie).forEach(([e,t])=>{Ie[t]=e});function Xt(e){const t=new W(e),n=Tt(W.prototype.request,t);return d.extend(n,W.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Xt(J(e,o))},n}const C=Xt(ie);C.Axios=W;C.CanceledError=X;C.CancelToken=Jr;C.isCancel=jt;C.VERSION=Gt;C.toFormData=Ee;C.AxiosError=x;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=Vr;C.isAxiosError=Gr;C.mergeConfig=J;C.AxiosHeaders=B;C.formToJSON=e=>Ht(d.isHTMLForm(e)?new FormData(e):e);C.getAdapter=Vt.getAdapter;C.HttpStatusCode=Ie;C.default=C;const{Axios:Lo,AxiosError:zo,CanceledError:Ho,isCancel:jo,CancelToken:Mo,VERSION:$o,all:qo,Cancel:Wo,isAxiosError:Jo,spread:Vo,toFormData:Go,AxiosHeaders:Ko,HttpStatusCode:Xo,formToJSON:Zo,getAdapter:Qo,mergeConfig:Yo}=C;var se,R,Zt,$,dt,Qt,Yt,en,Je,Le,ze,ne={},tn=[],Kr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Re=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function Ve(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?se.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return ee(e,s,r,o,null)}function ee(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Zt,__i:-1,__u:0};return o==null&&R.vnode!=null&&R.vnode(i),i}function Z(e){return e.children}function de(e,t){this.props=e,this.context=t}function G(e,t){if(t==null)return e.__?G(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"?G(e):null}function nn(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 nn(e)}}function pt(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||dt!=R.debounceRendering)&&((dt=R.debounceRendering)||Qt)(me)}function me(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(Yt),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=L({},r)).__v=r.__v+1,R.vnode&&R.vnode(n),Ge(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,o??G(r),!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,sn(i,n,s),n.__e!=o&&nn(n)));me.__r=0}function rn(e,t,n,r,o,i,s,a,c,u,f){var l,h,m,p,g,_,w=r&&r.__k||tn,y=t.length;for(c=Xr(n,t,w,c,y),l=0;l<y;l++)(m=n.__k[l])!=null&&(h=m.__i==-1?ne:w[m.__i]||ne,m.__i=l,_=Ge(e,m,h,o,i,s,a,c,u,f),p=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&Ke(h.ref,null,m),f.push(m.ref,m.__c||p,m)),g==null&&p!=null&&(g=p),4&m.__u||h.__k===m.__k?c=on(m,c,e):typeof m.type=="function"&&_!==void 0?c=_:p&&(c=p.nextSibling),m.__u&=-7);return n.__e=g,c}function Xr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,h=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+h,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?ee(null,s,null,null,null):Re(s)?ee(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?ee(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=e,s.__b=e.__b+1,a=null,(u=s.__i=Zr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?h--:o<f&&h++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,s.__u|=4))):e.__k[i]=null;if(l)for(i=0;i<f;i++)(a=n[i])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=G(a)),ln(a,a));return r}function on(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=on(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=G(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Zr(e,t,n,r){var o,i,s=e.key,a=e.type,c=t[n];if(c===null&&e.key==null||c&&s==c.key&&a==c.type&&(2&c.__u)==0)return n;if(r>(c!=null&&(2&c.__u)==0?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((c=t[o])&&(2&c.__u)==0&&s==c.key&&a==c.type)return o;o--}if(i<t.length){if((c=t[i])&&(2&c.__u)==0&&s==c.key&&a==c.type)return i;i++}}return-1}function ht(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kr.test(t)?n:n+"px"}function le(e,t,n,r,o){var i,s;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||ht(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||ht(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(en,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Je,e.addEventListener(t,i?ze:Le,i)):e.removeEventListener(t,i?ze:Le,i);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 _t(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Je++;else if(t.t<n.u)return;return n(R.event?R.event(t):t)}}}function Ge(e,t,n,r,o,i,s,a,c,u){var f,l,h,m,p,g,_,w,y,S,v,T,O,N,z,M,ke,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=R.__b)&&f(t);e:if(typeof D=="function")try{if(w=t.props,y="prototype"in D&&D.prototype.render,S=(f=D.contextType)&&r[f.__c],v=f?S?S.props.value:f.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:(y?t.__c=l=new D(w,v):(t.__c=l=new de(w,v),l.constructor=D,l.render=Yr),S&&S.sub(l),l.props=w,l.state||(l.state={}),l.context=v,l.__n=r,h=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=L({},l.__s)),L(l.__s,D.getDerivedStateFromProps(w,l.__s))),m=l.props,p=l.state,l.__v=t,h)y&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&D.getDerivedStateFromProps==null&&w!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,v),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,v)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(Q){Q&&(Q.__=t)}),T=0;T<l._sb.length;T++)l.__h.push(l._sb[T]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,v),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,p,g)})}if(l.context=v,l.props=w,l.__P=e,l.__e=!1,O=R.__r,N=0,y){for(l.state=l.__s,l.__d=!1,O&&O(t),f=l.render(l.props,l.state,l.context),z=0;z<l._sb.length;z++)l.__h.push(l._sb[z]);l._sb=[]}else do l.__d=!1,O&&O(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=L(L({},r),l.getChildContext())),y&&!h&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(m,p)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=an(f.props.children)),a=rn(e,Re(M)?M:[M],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),_&&(l.__E=l.__=null)}catch(Q){if(t.__v=null,c||i!=null)if(Q.then){for(t.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;i[i.indexOf(a)]=null,t.__e=a}else for(ke=i.length;ke--;)Ve(i[ke]);else t.__e=n.__e,t.__k=n.__k;R.__e(Q,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Qr(n.__e,t,n,r,o,i,s,c,u);return(f=R.diffed)&&f(t),128&t.__u?void 0:a}function sn(e,t,n){for(var r=0;r<n.length;r++)Ke(n[r],n[++r],n[++r]);R.__c&&R.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){R.__e(i,o.__v)}})}function an(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Re(e)?e.map(an):L({},e)}function Qr(e,t,n,r,o,i,s,a,c){var u,f,l,h,m,p,g,_=n.props,w=t.props,y=t.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!y&&(y?m.localName==y:m.nodeType==3)){e=m,i[u]=null;break}}if(e==null){if(y==null)return document.createTextNode(w);e=document.createElementNS(o,y,w.is&&w),a&&(R.__m&&R.__m(t,i),a=!1),i=null}if(y==null)_===w||a&&e.data==w||(e.data=w);else{if(i=i&&se.call(e.childNodes),_=n.props||ne,!a&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(m=e.attributes[u]).name]=m.value;for(u in _)if(m=_[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=m;else if(!(u in w)){if(u=="value"&&"defaultValue"in w||u=="checked"&&"defaultChecked"in w)continue;le(e,u,null,m,o)}}for(u in w)m=w[u],u=="children"?h=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?p=m:u=="checked"?g=m:a&&typeof m!="function"||_[u]===m||le(e,u,m,_[u],o);if(f)a||l&&(f.__html==l.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),rn(t.type=="template"?e.content:e,Re(h)?h:[h],t,n,r,y=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&G(n,0),a,c),i!=null)for(u=i.length;u--;)Ve(i[u]);a||(u="value",y=="progress"&&p==null?e.removeAttribute("value"):p!=null&&(p!==e[u]||y=="progress"&&!p||y=="option"&&p!=_[u])&&le(e,u,p,_[u],o),u="checked",g!=null&&g!=e[u]&&le(e,u,g,_[u],o))}return e}function Ke(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){R.__e(o,n)}}function ln(e,t,n){var r,o;if(R.unmount&&R.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Ke(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){R.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&ln(r[o],t,n||typeof e.type!="function");n||Ve(e.__e),e.__c=e.__=e.__e=void 0}function Yr(e,t,n){return this.constructor(e,n)}function Te(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),R.__&&R.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ge(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||ne,ne,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?se.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),sn(i,e,s)}function cn(e,t){Te(e,t,cn)}function un(e,t,n){var r,o,i,s,a=L({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i]===void 0&&s!=null?s[i]:t[i];return arguments.length>2&&(a.children=arguments.length>3?se.call(arguments,2):n),ee(e.type,a,r||e.key,o||e.ref,null)}se=tn.slice,R={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=L({},this.state),typeof e=="function"&&(e=e(L({},n),this.props)),e&&L(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pt(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pt(this))},de.prototype.render=Z,$=[],Qt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yt=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,en=/(PointerCapture)$|Capture$/i,Je=0,Le=_t(!1),ze=_t(!0);var eo=0;function b(e,t,n,r,o,i){t||(t={});var s,a,c=t;if("ref"in c)for(a in c={},t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--eo,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return R.vnode&&R.vnode(u),u}var re,k,Fe,mt,be=0,fn=[],A=R,bt=A.__b,gt=A.__r,yt=A.diffed,wt=A.__c,xt=A.unmount,Et=A.__;function Xe(e,t){A.__h&&A.__h(k,e,be||t),be=0;var n=k.__H||(k.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function H(e){return be=1,to(hn,e)}function to(e,t,n){var r=Xe(re++,2);if(r.t=e,!r.__c&&(r.__=[hn(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=k,!k.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(h){return!!h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};k.__f=!0;var i=k.shouldComponentUpdate,s=k.componentWillUpdate;k.componentWillUpdate=function(a,c,u){if(this.__e){var f=i;i=void 0,o(a,c,u),i=f}s&&s.call(this,a,c,u)},k.shouldComponentUpdate=o}return r.__N||r.__}function dn(e,t){var n=Xe(re++,3);!A.__s&&pn(n.__H,t)&&(n.__=e,n.u=t,k.__H.__h.push(n))}function He(e){return be=5,no(function(){return{current:e}},[])}function no(e,t){var n=Xe(re++,7);return pn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ro(){for(var e;e=fn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach(je),e.__H.__h=[]}catch(t){e.__H.__h=[],A.__e(t,e.__v)}}A.__b=function(e){k=null,bt&&bt(e)},A.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Et&&Et(e,t)},A.__r=function(e){gt&>(e),re=0;var t=(k=e.__c).__H;t&&(Fe===k?(t.__h=[],k.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach(je),t.__h=[],re=0)),Fe=k},A.diffed=function(e){yt&&yt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fn.push(t)!==1&&mt===A.requestAnimationFrame||((mt=A.requestAnimationFrame)||oo)(ro)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Fe=k=null},A.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||je(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],A.__e(r,n.__v)}}),wt&&wt(e,t)},A.unmount=function(e){xt&&xt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{pe(r)}catch(o){t=o}}),n.__H=void 0,t&&A.__e(t,n.__v))};var St=typeof requestAnimationFrame=="function";function oo(e){var t,n=function(){clearTimeout(r),St&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);St&&(t=requestAnimationFrame(n))}function pe(e){var t=k,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),k=t}function je(e){var t=k;e.__c=e.__(),k=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function hn(e,t){return typeof t=="function"?t(e):t}class io{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:i}=this.parseArg(n),s=document.createElement("div");if(s.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: #999;
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},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 He=new io;function so(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=T.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return He.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return He.error(a),o&&o(a,s),Promise.reject(s)}),i}const se=so();function ao(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return se.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const lo=async()=>se.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),co=async(e,t)=>se.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||""),uo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return se.post("/offline/recharge/create",n,{})},fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return se.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)};var Xe=(e=>(e.ZH="zh",e.EN="en",e))(Xe||{}),Ze=(e=>(e.WHITE="white",e.DARK="dark",e))(Ze||{});function po(e){lo();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=Ze.WHITE,locale:i=Xe.ZH}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:s,theme:o,locale:i})),{token:s,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:i}}const ho={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function _o({onClick:e,color:t,children:n}){return b("button",{style:{background:t||"#1890ff",color:"#fff",border:"none",borderRadius:4,padding:"8px 16px",cursor:"pointer",fontSize:16},onClick:e,children:n})}const mo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return mo[e]||e}const go={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"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 yo(e){return go[e]||e}function wo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Xe.ZH}function E(e){return wo()==="zh"?bo(e):yo(e)}const xo=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),s=i?.currency||[],a=i?.channel?.filter(l=>l.payment_support)||[],c=o?{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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},u=o?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},f=o?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return b(X,{children:[b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),b("select",{style:{...c.select},value:e.currency,onInput:l=>{const m=l.target.value;t(p=>({...p,currency:m}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择充值币种")}),s?.map(l=>b("option",{value:l.value,children:l.label}))]})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),b("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:l=>{const m=l.target.value;t(p=>({...p,amount:m,amountError:m.trim()?"":p.amountError}))},style:{...c.input,...e.amountError?c.inputError:{}}}),e.amountError&&b("div",{style:c.error,children:e.amountError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),b("select",{style:{...c.select,...e.rechargeChannelError?c.selectError:{}},value:e.rechargeChannel,onInput:l=>{const m=l.target.value;t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),a?.map(l=>b("option",{value:l.value,children:l.label}))]}),e.rechargeChannelError&&b("div",{style:c.error,children:e.rechargeChannelError})]}),e.error&&b("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:u,children:E("取消")}),b("button",{type:"submit",disabled:r,style:f,children:E(r?"提交中...":"去支付")})]})]})},Eo=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=ze(null),[a,c]=j(!1),[u,f]=j(0),l=async p=>{const h=Array.from(p.target.files).slice(0,n);if(!h.length)return;c(!0);const g=[];for(let _=0;_<h.length;_++){f(0);const y=new FormData;y.append("file",h[_]);try{const w=await co(y,v=>f(v));w&&g.push(w)}catch{}}c(!1),f(0),t?.([...e,...g]),s.current&&(s.current.value="")},m=p=>{const h=e.filter((g,_)=>_!==p);t?.(h)};return b("div",{children:[b("div",{style:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:24,textAlign:"center",cursor:i?"not-allowed":"pointer",minHeight:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:15,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[b("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),b("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),b("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),b("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:l,disabled:i}),a&&b("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&b("div",{style:{marginTop:12},children:e.map((p,h)=>b("div",{style:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:"12px 16px",marginBottom:8,fontSize:15,color:"#222",justifyContent:"space-between"},children:[b("div",{style:{display:"flex",alignItems:"center",flex:1},children:[b("span",{style:{fontWeight:500,wordBreak:"break-all"},children:p.split("/").pop()}),b("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),b("button",{type:"button",onClick:g=>{g.stopPropagation(),m(h)},style:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:"4px 14px",fontSize:15,marginLeft:16,cursor:"pointer"},disabled:i,children:E("移除")})]},p))})]})},So=({formState:e,setFormState:t,onClose:n,loading:r,whiteTheme:o=!1})=>{const i=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(i,"allDicts");const s=i?.channel||[],a=o?{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"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{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"},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},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return b("form",{onSubmit:async u=>{u.preventDefault();let f=!0;t(l=>({...l,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(l=>({...l,platformError:E("请选择支付平台")})),f=!1),e.transactionId.trim()||(t(l=>({...l,transactionIdError:E("请输入转账交易ID")})),f=!1),(!e.files||e.files.length===0)&&(t(l=>({...l,filesError:E("请上传转账凭证")})),f=!1),f&&(await uo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),He.success(E("离线充值创建成功")))},children:[b("div",{style:{marginBottom:18},children:[b("div",{style:a.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),b("select",{style:{...a.select,...e.platformError?a.selectError:{}},value:e.platform,onInput:u=>{const f=u.target.value;t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),s?.map(u=>b("option",{value:u.value,children:u.label}))]}),e.platformError&&b("div",{style:a.error,children:e.platformError})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:a.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),b("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:u=>{const f=u.target.value;t(l=>({...l,transactionId:f,transactionIdError:f?"":l.transactionIdError}))},style:{...a.input,...e.transactionIdError?a.inputError:{}}}),e.transactionIdError&&b("div",{style:a.error,children:e.transactionIdError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:a.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),b(Eo,{value:e.files,onChange:u=>t(f=>({...f,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&b("div",{style:a.error,children:e.filesError})]}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:a.buttonCancel,children:E("取消")}),b("button",{type:"submit",disabled:r,style:a.buttonSubmit,children:E("去支付")})]})]})};function vo({visible:e,onClose:t,onSubmit:n,whiteTheme:r=!0}){const[o,i]=j({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[s,a]=j("online"),[c,u]=j({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(dn(()=>{e||(a("online"),i({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),u({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const f=async p=>{p.preventDefault();let h=!0;if(i(g=>({...g,amountError:"",rechargeChannelError:""})),o.amount.trim()||(i(g=>({...g,amountError:E("请输入充值金额")})),h=!1),o.rechargeChannel||(i(g=>({...g,rechargeChannelError:E("请选择支付平台")})),h=!1),!!h){i(g=>({...g,loading:!0,error:""}));try{await n({amount:o.amount,rechargeChannel:o.rechargeChannel,currency:o.currency}),t()}catch{i(g=>({...g,error:E("提交失败,请重试")}))}finally{i(g=>({...g,loading:!1}))}}},l=p=>{p.target===p.currentTarget&&t()},m=r?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,h)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#155EEF":"#222",border:"none",borderRadius:h?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:h?"1px solid #F0F1F3":void 0,borderLeft:h?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,h)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:h?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:h?"1px solid #23262F":void 0,borderLeft:h?void 0:"1px solid #23262F",transition:"all 0.2s"})};return b("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:m.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:l,children:b("form",{onSubmit:f,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[b("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),b("div",{style:m.title,children:E("充值 / 转账")}),b("div",{style:{display:"flex",marginBottom:28},children:[b("button",{type:"button",onClick:()=>a("online"),style:m.tabBtn(s==="online",!0),children:E("在线充值")}),b("button",{type:"button",onClick:()=>a("offline"),style:m.tabBtn(s==="offline",!1),children:E("线下转账")})]}),s==="online"?b(xo,{formState:o,setFormState:i,onClose:t,loading:o.loading,whiteTheme:r}):b(So,{formState:c,setFormState:u,onClose:t,loading:c.loading,whiteTheme:r})]})})}function Qe(){return(Qe=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 Ro=["context","children"];function To(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,Ro);return un(t,n)}function Co(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=J(To,Qe({},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=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[_n(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=J(vt,{name:f},u):o[s]=u}var l=r?J(vt,null,o):o;return J(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?cn:Re)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ao(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=un(this._vdom,r),Re(this._vdom,this._root)}}function ko(){Re(this._vdom=null,this._root)}function vt(e,t){var n=this;return J("slot",Qe({},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 mn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Co,o.prototype.attributeChangedCallback=Ao,o.prototype.disconnectedCallback=ko,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Oo(){const[e,t]=j(!1),n=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),r=async o=>{const i=await fo({amount:o.amount,currency:o.currency,rechargeChannel:o.rechargeChannel});window.open(i,"_blank")};return b("div",{children:[b(_o,{onClick:()=>t(!0),children:E("充值/转账")}),b(vo,{visible:e,onClose:()=>t(!1),onSubmit:r,whiteTheme:n.theme===Ze.WHITE})]})}mn(Oo,"best-recharge",["theme"],{shadow:!1});const Fo=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=j(!1),[u,f]=j(s),l=ze(null),m=ze(null),p=()=>{if(m.current&&(clearTimeout(m.current),m.current=null),s==="top"||s==="bottom")if(l.current){const y=l.current.getBoundingClientRect();s==="top"&&y.top<100?f("bottom"):s==="bottom"&&window.innerHeight-y.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},h=()=>{m.current=window.setTimeout(()=>{c(!1)},120)};let g={position:"absolute",zIndex:999,background:"#fff",color:"#222",borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",pointerEvents:"auto",textAlign:"center",border:"none",animation:"fadeInUp 0.3s"},_={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(g={...g,left:"50%",top:-48,transform:"translateX(-50%)"},_={..._,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:"8px solid #fff"}):u==="bottom"?(g={...g,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},_={..._,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:"8px solid #fff"}):u==="leftTop"?(g={...g,right:"100%",top:0,marginRight:i,transform:"none"},_={..._,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:"8px solid #fff"}):u==="rightTop"&&(g={...g,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},_={..._,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:"8px solid #fff"}),b("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:p,onMouseLeave:h,children:[t,a&&b("div",{style:g,onMouseEnter:p,onMouseLeave:h,children:[e,b("div",{style:_})]})]})};function Rt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function Po(e){const[t,n]=j({available:0,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:0,color:"#155EEF",dot:"#15b36b"}]});return dn(()=>{(async()=>{try{const o=await ao(),i={available:o.availableAmount,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:o.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:o.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:o.availableAmount,color:"#155EEF",dot:"#15b36b"}]};n(i)}catch(o){console.error("获取余额失败:",o)}})()},[]),b(Fo,{popover:b(X,{children:[b("div",{style:{fontSize:16,fontWeight:600,color:"#222",marginBottom:16,textAlign:"center"},children:E("余额详情")}),t.details.map(r=>b("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:15},children:[b("span",{style:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},children:[b("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:r.dot,marginRight:8}}),r.label]}),b("span",{style:{color:r.color,fontWeight:600,fontSize:15},children:[t.symbol,Rt(r.value)]})]},r.label))]}),popoverPosition:e.popoverPosition||"bottom",children:b("div",{style:{fontSize:24,fontWeight:800,color:"#111827",display:"inline-block"},children:[t.symbol,Rt(t.available),b("span",{style:{fontSize:18,color:"#6b7280",marginLeft:8,fontWeight:600},children:t.currency})]})})}mn(Po,"best-statistical-balance");const Bo=["best-recharge","best-statistical-balance"];exports.components=Bo;exports.initFundUnit=po;exports.npmTest=bn;exports.printCurrentTime=gn;exports.viteProxy=ho;
|
|
45
|
+
`,c.onclick=()=>{document.body.removeChild(s)},s.appendChild(c)}document.body.appendChild(s),o!==0&&setTimeout(()=>{document.body.contains(s)&&document.body.removeChild(s)},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 Me=new io;function so(e={}){const{baseURL:t="/api",timeout:n=1e4,getLocale:r,onError:o}=e,i=C.create({baseURL:t,timeout:n});return i.interceptors.request.use(s=>{const a=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:c}=a;if(s.headers={...s.headers,Authorization:c},r){const u=r();u&&(s.headers={...s.headers,"Accept-Language":u})}return s}),i.interceptors.response.use(s=>{if(s.data&&s.data.code===0)return s.data;const a=s.data?.msg||s.data?.message||"未知错误";return Me.error(a),o&&o(a,s),Promise.reject(s.data||{message:"未知错误"})},s=>{const a=s.response?.data?.msg||s.response?.data?.message||s.message||"网络请求失败";return Me.error(a),o&&o(a,s),Promise.reject(s)}),i}const ae=so();function ao(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return ae.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const lo=async()=>ae.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),co=async(e,t)=>ae.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||""),uo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return ae.post("/offline/recharge/create",n,{})},fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log(t,"fundUnitParams");const n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return ae.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)};var Ze=(e=>(e.ZH="zh",e.EN="en",e))(Ze||{}),j=(e=>(e.WHITE="white",e.DARK="dark",e))(j||{});function po(e){lo();const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=j.WHITE,locale:i=Ze.ZH}=e,s="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,token:s,theme:o,locale:i})),{token:s,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:i}}const ho={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function _o({onClick:e,color:t,children:n}){const i=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE?{background:t||"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600}:{background:t||"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 16px",cursor:"pointer",fontSize:16,fontWeight:600};return b("button",{style:i,onClick:e,type:"button",children:n})}const mo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function bo(e){return mo[e]||e}const go={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","提交失败,请重试":"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 yo(e){return go[e]||e}function wo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ze.ZH}function E(e){return wo()==="zh"?bo(e):yo(e)}const xo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(h=>h.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE,u=c?{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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},f=c?{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"}:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},l=c?{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600}:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600};return b(Z,{children:[b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),b("select",{style:{...u.select},value:e.currency,onInput:h=>{const m=h.target.value;t(p=>({...p,currency:m}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择充值币种")}),i?.map(h=>b("option",{value:h.value,children:h.label}))]})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),b("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:h=>{const m=h.target.value;t(p=>({...p,amount:m,amountError:m.trim()?"":p.amountError}))},style:{...u.input,...e.amountError?u.inputError:{}}}),e.amountError&&b("div",{style:u.error,children:e.amountError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:u.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),b("select",{style:{...u.select,...e.rechargeChannelError?u.selectError:{}},value:e.rechargeChannel,onInput:h=>{const m=h.target.value;t(p=>({...p,rechargeChannel:m,rechargeChannelError:m?"":p.rechargeChannelError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),s?.map(h=>b("option",{value:h.value,children:h.label}))]}),e.rechargeChannelError&&b("div",{style:u.error,children:e.rechargeChannelError})]}),e.error&&b("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:f,children:E("取消")}),b("button",{type:"submit",disabled:r,style:l,children:E(r?"提交中...":"去支付")})]})]})},Eo={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"}}},So=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=He(null),[a,c]=H(!1),[u,f]=H(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE?"white":"dark",p=Eo[m],g=async w=>{const y=Array.from(w.target.files).slice(0,n);if(!y.length)return;c(!0);const S=[];for(let v=0;v<y.length;v++){f(0);const T=new FormData;T.append("file",y[v]);try{const O=await co(T,N=>f(N));O&&S.push(O)}catch{}}c(!1),f(0),t?.([...e,...S]),s.current&&(s.current.value="")},_=w=>{const y=e.filter((S,v)=>v!==w);t?.(y)};return b("div",{children:[b("div",{style:{...p.container,cursor:i?"not-allowed":p.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[b("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),b("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),b("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),b("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:g,disabled:i}),a&&b("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&b("div",{style:{marginTop:12},children:e.map((w,y)=>b("div",{style:p.fileItem,children:[b("div",{style:{display:"flex",alignItems:"center",flex:1},children:[b("span",{style:{fontWeight:500,wordBreak:"break-all"},children:w.split("/").pop()}),b("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),b("button",{type:"button",onClick:S=>{S.stopPropagation(),_(y)},style:p.removeBtn,disabled:i,children:E("移除")})]},w))})]})},vo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const i=o?.channel||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.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"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#155EEF",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}}:{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"},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},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}};return b("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(h=>({...h,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(h=>({...h,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(h=>({...h,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(h=>({...h,filesError:E("请上传转账凭证")})),l=!1),l&&(await uo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),Me.success(E("离线充值创建成功")))},children:[b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),b("select",{style:{...c.select,...e.platformError?c.selectError:{}},value:e.platform,onInput:f=>{const l=f.target.value;t(h=>({...h,platform:l,platformError:l?"":h.platformError}))},children:[b("option",{value:"",disabled:!0,hidden:!0,children:E("请选择支付平台")}),i?.map(f=>b("option",{value:f.value,children:f.label}))]}),e.platformError&&b("div",{style:c.error,children:e.platformError})]}),b("div",{style:{marginBottom:18},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),b("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(h=>({...h,transactionId:l,transactionIdError:l?"":h.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&b("div",{style:c.error,children:e.transactionIdError})]}),b("div",{style:{marginBottom:24},children:[b("div",{style:c.label,children:[b("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),b(So,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&b("div",{style:c.error,children:e.filesError})]}),b("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[b("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),b("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function Ro({visible:e,onClose:t,onSubmit:n}){const[r,o]=H({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=H("online"),[a,c]=H({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(dn(()=>{e||(s("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),c({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]),!e)return null;const u=async p=>{p.preventDefault();let g=!0;if(o(_=>({..._,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(_=>({..._,amountError:E("请输入充值金额")})),g=!1),r.rechargeChannel||(o(_=>({..._,rechargeChannelError:E("请选择支付平台")})),g=!1),!!g){o(_=>({..._,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(_=>({..._,error:E("提交失败,请重试")}))}finally{o(_=>({..._,loading:!1}))}}},f=p=>{p.target===p.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE?{modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.08)",mask:"rgba(0,0,0,0.3)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#222"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#222",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#fff":"#F7F8FA",color:p?"#155EEF":"#222",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #F0F1F3":void 0,borderLeft:g?void 0:"1px solid #F0F1F3",transition:"all 0.2s"})}:{modalBg:"#181A20",modalColor:"#fff",modalBoxShadow:"0 4px 24px rgba(0,0,0,0.5)",mask:"rgba(0,0,0,0.7)",title:{fontWeight:600,fontSize:20,marginBottom:24,textAlign:"left",color:"#fff"},closeBtn:{position:"absolute",right:16,top:16,background:"none",border:"none",color:"#fff",fontSize:22,cursor:"pointer",lineHeight:1},tabBtn:(p,g)=>({flex:1,background:p?"#23262F":"#181A20",color:p?"#00E8C6":"#fff",border:"none",borderRadius:g?"8px 0 0 8px":"0 8px 8px 0",fontWeight:p?600:400,fontSize:16,height:48,boxShadow:p?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:g?"1px solid #23262F":void 0,borderLeft:g?void 0:"1px solid #23262F",transition:"all 0.2s"})};return b("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:m.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:b("form",{onSubmit:u,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:p=>p.stopPropagation(),children:[b("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),b("div",{style:m.title,children:E("充值 / 转账")}),b("div",{style:{display:"flex",marginBottom:28},children:[b("button",{type:"button",onClick:()=>s("online"),style:m.tabBtn(i==="online",!0),children:E("在线充值")}),b("button",{type:"button",onClick:()=>s("offline"),style:m.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?b(xo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):b(vo,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function Qe(){return(Qe=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 To=["context","children"];function ko(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var i,s,a={},c=Object.keys(r);for(s=0;s<c.length;s++)o.indexOf(i=c[s])>=0||(a[i]=r[i]);return a}(e,To);return un(t,n)}function Co(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(ko,Qe({},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=[],i={},s=0,a=n.attributes,c=n.childNodes;for(s=a.length;s--;)a[s].name!=="slot"&&(i[a[s].name]=a[s].value,i[_n(a[s].name)]=a[s].value);for(s=c.length;s--;){var u=t(c[s],null),f=c[s].slot;f?i[f]=V(vt,{name:f},u):o[s]=u}var l=r?V(vt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?cn:Te)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Ao(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=un(this._vdom,r),Te(this._vdom,this._root)}}function Oo(){Te(this._vdom=null,this._root)}function vt(e,t){var n=this;return V("slot",Qe({},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 mn(e,t,n,r){function o(){var i=Reflect.construct(HTMLElement,[],o);return i._vdomComponent=e,i._root=r&&r.shadow?i.attachShadow({mode:r.mode||"open"}):i,i}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Co,o.prototype.attributeChangedCallback=Ao,o.prototype.disconnectedCallback=Oo,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(i){Object.defineProperty(o.prototype,i,{get:function(){return this._vdom.props[i]},set:function(s){this._vdom?this.attributeChangedCallback(i,null,s):(this._props||(this._props={}),this._props[i]=s,this.connectedCallback());var a=typeof s;s!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(i,s)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Fo(){const[e,t]=H(!1),n=async r=>{const o=await fo({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return b("div",{children:[b(_o,{onClick:()=>t(!0),children:E("充值/转账")}),b(Ro,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}mn(Fo,"best-recharge",["theme"],{shadow:!1});const Po=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=H(!1),[u,f]=H(s),l=He(null),h=He(null),m=()=>{if(h.current&&(clearTimeout(h.current),h.current=null),s==="top"||s==="bottom")if(l.current){const T=l.current.getBoundingClientRect();s==="top"&&T.top<100?f("bottom"):s==="bottom"&&window.innerHeight-T.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},p=()=>{h.current=window.setTimeout(()=>{c(!1)},120)},g={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"}}},w=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE,y=g[w?"white":"dark"];let S={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...y.popover},v={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(S={...S,left:"50%",top:-48,transform:"translateX(-50%)"},v={...v,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${y.arrow.top}`}):u==="bottom"?(S={...S,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},v={...v,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${y.arrow.bottom}`}):u==="leftTop"?(S={...S,right:"100%",top:0,marginRight:i,transform:"none"},v={...v,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${y.arrow.left}`}):u==="rightTop"&&(S={...S,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},v={...v,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${y.arrow.right}`}),b("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:p,children:[t,a&&b("div",{style:S,onMouseEnter:m,onMouseLeave:p,children:[e,b("div",{style:v})]})]})};function Rt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Bo={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 #23262F",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 No(e){const[t,n]=H({available:0,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:0,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:0,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:0,color:"#155EEF",dot:"#15b36b"}]});dn(()=>{(async()=>{try{const a=await ao(),c={available:a.availableAmount,currency:"USD",symbol:"$",details:[{label:E("真实金额"),value:a.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:E("冻结金额"),value:a.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},{label:E("总可用"),value:a.availableAmount,color:"#155EEF",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===j.WHITE,i=Bo[o?"white":"dark"];return b(Po,{popover:b(Z,{children:[b("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>b("div",{style:i.detailRow,children:[b("span",{style:i.detailLabel,children:[b("span",{style:i.detailDot(s.dot)}),s.label]}),b("span",{style:i.detailValue(s.color),children:[t.symbol,Rt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:b("div",{style:i.main,children:[t.symbol,Rt(t.available),b("span",{style:i.currency,children:t.currency})]})})}mn(No,"best-statistical-balance");const Uo=["best-recharge","best-statistical-balance"];exports.components=Uo;exports.initFundUnit=po;exports.npmTest=bn;exports.printCurrentTime=gn;exports.viteProxy=ho;
|