best-unit 0.0.51 → 0.0.53

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.
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function bn(){console.log("npm package test!!!")}function yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,ne=xe("undefined");function xn(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=I("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const Sn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",vn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=I("Date"),Tn=I("File"),kn=I("Blob"),Cn=I("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=I("URLSearchParams"),[Pn,Bn,Nn,Un]=["ReadableStream","Request","Response","Headers"].map(I),In=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(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 Pt(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,Bt=e=>!ne(e)&&e!==q;function Ue(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Pt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ue(t[i],r):ce(r)?t[i]=Ue({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,i)=>{n&&P(o)?e[i]=Ct(o,n):e[i]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hn=(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&&Je(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},Mn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),qn=(e,t)=>{const r=(e&&e[ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jn=I("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=I("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(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+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return ie(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},tr=I("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),Ut=((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)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||Ut,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:Sn,isNumber:Ft,isBoolean:vn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:Un,isUndefined:ne,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:$n,isFileList:Cn,forEach:ie,merge:Ue,extend:Dn,trim:In,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:I,endsWith:jn,toArray:Mn,forEachEntry:qn,matchAll:Wn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:q,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:Ut,asap:rr,isIterable:or};function v(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const It=v.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(v,Dt);Object.defineProperty(It,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,i)=>{const s=Object.create(It);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),v.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const ir=null;function Ie(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,i){return o=Lt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ie)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Se(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(b,p){return!d.isUndefined(p[b])});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 v("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,b,p){let y=h;if(h&&!p&&typeof h=="object"){if(d.endsWith(b,"{}"))b=r?b:b.slice(0,-2),h=JSON.stringify(h);else if(d.isArray(h)&&sr(h)||(d.isFileList(h)||d.endsWith(b,"[]"))&&(y=d.toArray(h)))return b=Lt(b),y.forEach(function(S,x){!(d.isUndefined(S)||S===null)&&t.append(s===!0?nt([b],x,i):s===null?b:b+"[]",u(S))}),!1}return Ie(h)?!0:(t.append(nt(p,b,i),u(h)),!1)}const l=[],g=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ie});function _(h,b){if(!d.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+b.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,b,g))===!0&&_(y,b?b.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return _(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&Se(e,this,t)}const zt=Ve.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;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 Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ot{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 jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:Ve,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,pr=Ge&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mr=Ge&&window.location.href||"http://localhost",_r=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:De,origin:mr},Symbol.toStringTag,{value:"Module"})),F={..._r,...dr};function gr(e,t){return Se(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 yr(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 Mt(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]=yr(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 wr(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 se={transitional:jt,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(Mt(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 gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Se(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||se.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"?v.from(a,v.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{se.headers[e]={}});const xr=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"]),Er=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]&&xr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ee(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 Sr(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 vr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fe(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 Rr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Tr(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=ee(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())&&!vr(t))s(Er(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=ee(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Sr(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=ee(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=ee(s),s){const a=d.findKey(r,s);a&&(!n||Fe(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||Fe(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?Rr(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[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ee(s);r[a]||(Tr(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 Pe(e,t){const n=this||se,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 $t(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,v,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(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,g=0;for(;l!==o;)g+=n[l++],l=l%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s<t)return;const _=f&&u-f;return _?Math.round(g*1e3/_):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 he=(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)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=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,Fr=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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,g){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:g},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,g){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,g)}else return r(u,f,l,g)}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(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,g=l(e[f],t[f],f);d.isUndefined(g)&&l!==a||(n[f]=g)}),n}const Jt=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=Ht(Wt(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&&Or(t.url))){const u=o&&i&&Fr.read(i);u&&s.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ur=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,g,_,h;function b(){_&&_(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function y(){if(!p)return;const S=B.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};qt(function(U){n(U),b()},function(U){r(U),b()},R),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(r(new v("Request aborted",v.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new v(x,R.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&d.forEach(s.toJSON(),function(x,R){p.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),a&&a!=="json"&&(p.responseType=o.responseType),u&&([g,h]=he(u,!0),p.addEventListener("progress",g)),c&&p.upload&&([l,_]=he(c),p.upload.addEventListener("progress",l),p.upload.addEventListener("loadend",_)),(o.cancelToken||o.signal)&&(f=S=>{p&&(r(!S||S.type?new X(null,e,p):S),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=kr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new v("Unsupported protocol "+w+":",v.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Ir=(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 v?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new v(`timeout ${t} of ms exceeded`,v.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},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(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 g=i+=l;n(g)}c.enqueue(new Uint8Array(f))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},ve=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Vt=ve&&typeof ReadableStream=="function",Hr=ve&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{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}),ut=64*1024,Le=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),me={stream:Le&&(e=>e.body)};ve&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!me[t]&&(me[t]=d.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const Mr=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 Hr(e)).byteLength},$r=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Mr(t)},qr=ve&&(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:g}=Jt(e);u=u?(u+"").toLowerCase():"text";let _=Ir([o,i&&i.toAbortSignal()],s),h;const b=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let p;try{if(c&&jr&&n!=="get"&&n!=="head"&&(p=await $r(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[U,j]=st(p,he(at(c)));r=ct(R.body,ut,U,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;h=new Request(t,{...g,signal:_,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(h,g);const S=Le&&(u==="stream"||u==="response");if(Le&&(a||S&&b)){const R={};["status","statusText","headers"].forEach(M=>{R[M]=w[M]});const k=d.toFiniteNumber(w.headers.get("content-length")),[U,j]=a&&st(k,he(at(a),!0))||[];w=new Response(ct(w.body,ut,U,()=>{j&&j(),b&&b()}),R)}u=u||"text";let x=await me[d.findKey(me,u)||"text"](w,e);return!S&&b&&b(),await new Promise((R,k)=>{qt(R,k,{data:x,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(y){throw b&&b(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,h),{cause:y.cause||y}):v.from(y,y&&y.code,e,h)}}),ze={http:ir,xhr:Ur,fetch:qr};d.forEach(ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,Wr=e=>d.isFunction(e)||e===null||e===!1,Kt={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,!Wr(n)&&(r=ze[(s=String(n)).toLowerCase()],r===void 0))throw new v(`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 yn(){console.log("Current time:",new Date().toISOString())}function Ct(e,t){return function(){return e.apply(t,arguments)}}const{toString:wn}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:ye,toStringTag:At}=Symbol,we=(e=>t=>{const n=wn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>we(t)===e),xe=e=>t=>typeof t===e,{isArray:K}=Array,ne=xe("undefined");function xn(e){return e!==null&&!ne(e)&&e.constructor!==null&&!ne(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=U("ArrayBuffer");function En(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const vn=xe("string"),P=xe("function"),Ft=xe("number"),Ee=e=>e!==null&&typeof e=="object",Sn=e=>e===!0||e===!1,ce=e=>{if(we(e)!=="object")return!1;const t=Je(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(At in e)&&!(ye in e)},Rn=U("Date"),Tn=U("File"),kn=U("Blob"),Cn=U("FileList"),An=e=>Ee(e)&&P(e.pipe),On=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=we(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Fn=U("URLSearchParams"),[Pn,Bn,Nn,In]=["ReadableStream","Request","Response","Headers"].map(U),Un=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(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 Pt(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,Bt=e=>!ne(e)&&e!==q;function Ie(){const{caseless:e}=Bt(this)&&this||{},t={},n=(r,o)=>{const i=e&&Pt(t,o)||o;ce(t[i])&&ce(r)?t[i]=Ie(t[i],r):ce(r)?t[i]=Ie({},r):K(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ie(arguments[r],n);return t}const Dn=(e,t,n,{allOwnKeys:r}={})=>(ie(t,(o,i)=>{n&&P(o)?e[i]=Ct(o,n):e[i]=o},{allOwnKeys:r}),e),Ln=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zn=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hn=(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&&Je(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},Mn=e=>{if(!e)return null;if(K(e))return e;let t=e.length;if(!Ft(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$n=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Je(Uint8Array)),qn=(e,t)=>{const r=(e&&e[ye]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Wn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Jn=U("HTMLFormElement"),Vn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),tt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gn=U("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ie(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},Kn=e=>{Nt(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+"'")})}})},Xn=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return K(e)?r(e):r(String(e).split(t)),n},Zn=()=>{},Qn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yn(e){return!!(e&&P(e.append)&&e[At]==="FormData"&&e[ye])}const er=e=>{const t=new Array(10),n=(r,o)=>{if(Ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=K(r)?[]:{};return ie(r,(s,a)=>{const c=n(s,o+1);!ne(c)&&(i[a]=c)}),t[o]=void 0,i}}return r};return n(e,0)},tr=U("AsyncFunction"),nr=e=>e&&(Ee(e)||P(e))&&P(e.then)&&P(e.catch),It=((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)),rr=typeof queueMicrotask<"u"?queueMicrotask.bind(q):typeof process<"u"&&process.nextTick||It,or=e=>e!=null&&P(e[ye]),d={isArray:K,isArrayBuffer:Ot,isBuffer:xn,isFormData:On,isArrayBufferView:En,isString:vn,isNumber:Ft,isBoolean:Sn,isObject:Ee,isPlainObject:ce,isReadableStream:Pn,isRequest:Bn,isResponse:Nn,isHeaders:In,isUndefined:ne,isDate:Rn,isFile:Tn,isBlob:kn,isRegExp:Gn,isFunction:P,isStream:An,isURLSearchParams:Fn,isTypedArray:$n,isFileList:Cn,forEach:ie,merge:Ie,extend:Dn,trim:Un,stripBOM:Ln,inherits:zn,toFlatObject:Hn,kindOf:we,kindOfTest:U,endsWith:jn,toArray:Mn,forEachEntry:qn,matchAll:Wn,isHTMLForm:Jn,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:Nt,freezeMethods:Kn,toObjectSet:Xn,toCamelCase:Vn,noop:Zn,toFiniteNumber:Qn,findKey:Pt,global:q,isContextDefined:Bt,isSpecCompliantForm:Yn,toJSONObject:er,isAsyncFn:tr,isThenable:nr,setImmediate:It,asap:rr,isIterable:or};function S(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ut=S.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(S,Dt);Object.defineProperty(Ut,"isAxiosError",{value:!0});S.from=(e,t,n,r,o,i)=>{const s=Object.create(Ut);return d.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),S.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const ir=null;function Ue(e){return d.isPlainObject(e)||d.isArray(e)}function Lt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,t,n){return e?e.concat(t).map(function(o,i){return o=Lt(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function sr(e){return d.isArray(e)&&!e.some(Ue)}const ar=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function ve(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(b,p){return!d.isUndefined(p[b])});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 S("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,b,p){let y=h;if(h&&!p&&typeof h=="object"){if(d.endsWith(b,"{}"))b=r?b:b.slice(0,-2),h=JSON.stringify(h);else if(d.isArray(h)&&sr(h)||(d.isFileList(h)||d.endsWith(b,"[]"))&&(y=d.toArray(h)))return b=Lt(b),y.forEach(function(v,x){!(d.isUndefined(v)||v===null)&&t.append(s===!0?nt([b],x,i):s===null?b:b+"[]",u(v))}),!1}return Ue(h)?!0:(t.append(nt(p,b,i),u(h)),!1)}const l=[],g=Object.assign(ar,{defaultVisitor:f,convertValue:u,isVisitable:Ue});function m(h,b){if(!d.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+b.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,b,g))===!0&&m(y,b?b.concat(w):[w])}),l.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return m(e),t}function rt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ve(e,t){this._pairs=[],e&&ve(e,this,t)}const zt=Ve.prototype;zt.append=function(t,n){this._pairs.push([t,n])};zt.toString=function(t){const n=t?function(r){return t.call(this,r,rt)}:rt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function lr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ht(e,t,n){if(!t)return e;const r=n&&n.encode||lr;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 Ve(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ot{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 jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:Ve,ur=typeof FormData<"u"?FormData:null,fr=typeof Blob<"u"?Blob:null,dr={isBrowser:!0,classes:{URLSearchParams:cr,FormData:ur,Blob:fr},protocols:["http","https","file","blob","url","data"]},Ge=typeof window<"u"&&typeof document<"u",De=typeof navigator=="object"&&navigator||void 0,pr=Ge&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),hr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_r=Ge&&window.location.href||"http://localhost",mr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ge,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:hr,navigator:De,origin:_r},Symbol.toStringTag,{value:"Module"})),F={...mr,...dr};function gr(e,t){return ve(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 yr(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 Mt(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]=yr(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 wr(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 se={transitional:jt,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(Mt(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 gr(t,this.formSerializer).toString();if((a=d.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ve(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),wr(t)):t}],transformResponse:[function(t){const n=this.transitional||se.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"?S.from(a,S.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{se.headers[e]={}});const xr=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"]),Er=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]&&xr[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ee(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 vr(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 Fe(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 Rr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Tr(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=ee(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(Er(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=ee(t),t){const r=d.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return vr(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=ee(t),t){const r=d.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Fe(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=ee(s),s){const a=d.findKey(r,s);a&&(!n||Fe(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||Fe(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?Rr(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[it]=this[it]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ee(s);r[a]||(Tr(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 Pe(e,t){const n=this||se,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 $t(e){return!!(e&&e.__CANCEL__)}function X(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(X,S,{__CANCEL__:!0});function qt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function kr(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,g=0;for(;l!==o;)g+=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(g*1e3/m):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 he=(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)},st=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},at=e=>(...t)=>d.asap(()=>e(...t)),Or=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,Fr=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 Pr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Wt(e,t,n){let r=!Pr(t);return e&&(r||n==!1)?Br(e,t):t}const lt=e=>e instanceof B?{...e}:e;function J(e,t){t=t||{};const n={};function r(u,f,l,g){return d.isPlainObject(u)&&d.isPlainObject(f)?d.merge.call({caseless:g},u,f):d.isPlainObject(f)?d.merge({},f):d.isArray(f)?f.slice():f}function o(u,f,l,g){if(d.isUndefined(f)){if(!d.isUndefined(u))return r(void 0,u,l,g)}else return r(u,f,l,g)}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(lt(u),lt(f),l,!0)};return d.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=c[f]||o,g=l(e[f],t[f],f);d.isUndefined(g)&&l!==a||(n[f]=g)}),n}const Jt=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=Ht(Wt(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&&Or(t.url))){const u=o&&i&&Fr.read(i);u&&s.set(o,u)}return t},Nr=typeof XMLHttpRequest<"u",Ir=Nr&&function(e){return new Promise(function(n,r){const o=Jt(e);let i=o.data;const s=B.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,f,l,g,m,h;function b(){m&&m(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function y(){if(!p)return;const v=B.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:e,request:p};qt(function(I){n(I),b()},function(I){r(I),b()},R),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){p&&(r(new S("Request aborted",S.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let x=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(x=o.timeoutErrorMessage),r(new S(x,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,p)),p=null},i===void 0&&s.setContentType(null),"setRequestHeader"in p&&d.forEach(s.toJSON(),function(x,R){p.setRequestHeader(R,x)}),d.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),a&&a!=="json"&&(p.responseType=o.responseType),u&&([g,h]=he(u,!0),p.addEventListener("progress",g)),c&&p.upload&&([l,m]=he(c),p.upload.addEventListener("progress",l),p.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=v=>{p&&(r(!v||v.type?new X(null,e,p):v),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=kr(o.url);if(w&&F.protocols.indexOf(w)===-1){r(new S("Unsupported protocol "+w+":",S.ERR_BAD_REQUEST,e));return}p.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 S?f:new X(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,i(new S(`timeout ${t} of ms exceeded`,S.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},Lr=async function*(e,t){for await(const n of zr(e))yield*Dr(n,t)},zr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ct=(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 g=i+=l;n(g)}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",Vt=Se&&typeof ReadableStream=="function",Hr=Se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Gt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jr=Vt&&Gt(()=>{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}),ut=64*1024,Le=Vt&&Gt(()=>d.isReadableStream(new Response("").body)),_e={stream:Le&&(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 S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Mr=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 Hr(e)).byteLength},$r=async(e,t)=>{const n=d.toFiniteNumber(e.getContentLength());return n??Mr(t)},qr=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:g}=Jt(e);u=u?(u+"").toLowerCase():"text";let m=Ur([o,i&&i.toAbortSignal()],s),h;const b=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let p;try{if(c&&jr&&n!=="get"&&n!=="head"&&(p=await $r(f,r))!==0){let R=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(d.isFormData(r)&&(k=R.headers.get("content-type"))&&f.setContentType(k),R.body){const[I,j]=st(p,he(at(c)));r=ct(R.body,ut,I,j)}}d.isString(l)||(l=l?"include":"omit");const y="credentials"in Request.prototype;h=new Request(t,{...g,signal:m,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?l:void 0});let w=await fetch(h,g);const v=Le&&(u==="stream"||u==="response");if(Le&&(a||v&&b)){const R={};["status","statusText","headers"].forEach(M=>{R[M]=w[M]});const k=d.toFiniteNumber(w.headers.get("content-length")),[I,j]=a&&st(k,he(at(a),!0))||[];w=new Response(ct(w.body,ut,I,()=>{j&&j(),b&&b()}),R)}u=u||"text";let x=await _e[d.findKey(_e,u)||"text"](w,e);return!v&&b&&b(),await new Promise((R,k)=>{qt(R,k,{data:x,headers:B.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:h})})}catch(y){throw b&&b(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,h),{cause:y.cause||y}):S.from(y,y&&y.code,e,h)}}),ze={http:ir,xhr:Ir,fetch:qr};d.forEach(ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,Wr=e=>d.isFunction(e)||e===null||e===!1,Kt={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,!Wr(n)&&(r=ze[(s=String(n)).toLowerCase()],r===void 0))throw new S(`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(ft).join(`
5
- `):" "+ft(i[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ze};function Be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function dt(e){return Be(e),e.headers=B.from(e.headers),e.data=Pe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(e.adapter||se.adapter)(e).then(function(r){return Be(e),r.data=Pe.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return $t(r)||(Be(e),r&&r.response&&(r.response.data=Pe.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Xt="1.10.0",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pt={};Re.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Xt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new v(o(s," has been removed"+(n?" in "+n:"")),v.ERR_DEPRECATED);return n&&!pt[s]&&(pt[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}};Re.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jr(e,t,n){if(typeof e!="object")throw new v("options must be an object",v.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 v("option "+i+" must be "+c,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+i,v.ERR_BAD_OPTION)}}const fe={assertOptions:Jr,validators:Re},L=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ot,response:new ot}}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:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.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),fe.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(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let f,l=0,g;if(!c){const h=[dt.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),g=h.length,f=Promise.resolve(n);l<g;)f=f.then(h[l++],h[l++]);return f}g=a.length;let _=n;for(l=0;l<g;){const h=a[l++],b=a[l++];try{_=h(_)}catch(p){b.call(this,p);break}}try{f=dt.call(this,_)}catch(h){return Promise.reject(h)}for(l=0,g=u.length;l<g;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(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 Vr=class Zt{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 Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const He={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(He).forEach(([e,t])=>{He[t]=e});function Qt(e){const t=new W(e),n=Ct(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 Qt(J(e,o))},n}const A=Qt(se);A.Axios=W;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=$t;A.VERSION=Xt;A.toFormData=Se;A.AxiosError=v;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>Mt(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=He;A.default=A;const{Axios:Ho,AxiosError:jo,CanceledError:Mo,isCancel:$o,CancelToken:qo,VERSION:Wo,all:Jo,Cancel:Vo,isAxiosError:Go,spread:Ko,toFormData:Xo,AxiosHeaders:Zo,HttpStatusCode:Qo,formToJSON:Yo,getAdapter:ei,mergeConfig:ti}=A;var ae,T,Yt,$,ht,en,tn,nn,Ke,je,Me,re={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Xe(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?ae.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 te(e,s,r,o,null)}function te(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??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.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 on(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 on(e)}}function mt(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!_e.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(_e)}function _e(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(tn),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ze(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,ln(i,n,s),n.__e!=o&&on(n)));_e.__r=0}function sn(e,t,n,r,o,i,s,a,c,u,f){var l,g,_,h,b,p,y=r&&r.__k||rn,w=t.length;for(c=Zr(n,t,y,c,w),l=0;l<w;l++)(_=n.__k[l])!=null&&(g=_.__i==-1?re:y[_.__i]||re,_.__i=l,p=Ze(e,_,g,o,i,s,a,c,u,f),h=_.__e,_.ref&&g.ref!=_.ref&&(g.ref&&Qe(g.ref,null,_),f.push(_.ref,_.__c||h,_)),b==null&&h!=null&&(b=h),4&_.__u||g.__k===_.__k?c=an(_,c,e):typeof _.type=="function"&&p!==void 0?c=p:h&&(c=h.nextSibling),_.__u&=-7);return n.__e=b,c}function Zr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,g=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+g,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?te(null,s,null,null,null):Te(s)?te(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?te(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=Qr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?g--:o<f&&g++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?g--:u==c+1?g++:(u>c?g--:g++,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)),un(a,a));return r}function an(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=an(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 Qr(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 _t(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.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||_t(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||_t(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(nn,"$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=Ke,e.addEventListener(t,i?Me:je,i)):e.removeEventListener(t,i?Me:je,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 gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ke++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ze(e,t,n,r,o,i,s,a,c,u){var f,l,g,_,h,b,p,y,w,S,x,R,k,U,j,M,Oe,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(y=t.props,w="prototype"in D&&D.prototype.render,S=(f=D.contextType)&&r[f.__c],x=f?S?S.props.value:f.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new D(y,x):(t.__c=l=new de(y,x),l.constructor=D,l.render=eo),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=x,l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(y,l.__s))),_=l.props,h=l.state,l.__v=t,g)w&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&D.getDerivedStateFromProps==null&&y!==_&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,x)===!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(Y){Y&&(Y.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,x),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(_,h,b)})}if(l.context=x,l.props=y,l.__P=e,l.__e=!1,k=T.__r,U=0,w){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++U<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),w&&!g&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(_,h)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=cn(f.props.children)),a=sn(e,Te(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),p&&(l.__E=l.__=null)}catch(Y){if(t.__v=null,c||i!=null)if(Y.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(Oe=i.length;Oe--;)Xe(i[Oe]);else t.__e=n.__e,t.__k=n.__k;T.__e(Y,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,i,s,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Qe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,i,s,a,c){var u,f,l,g,_,h,b,p=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((_=i[u])&&"setAttribute"in _==!!w&&(w?_.localName==w:_.nodeType==3)){e=_,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(T.__m&&T.__m(t,i),a=!1),i=null}if(w==null)p===y||a&&e.data==y||(e.data=y);else{if(i=i&&ae.call(e.childNodes),p=n.props||re,!a&&i!=null)for(p={},u=0;u<e.attributes.length;u++)p[(_=e.attributes[u]).name]=_.value;for(u in p)if(_=p[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=_;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;le(e,u,null,_,o)}}for(u in y)_=y[u],u=="children"?g=_:u=="dangerouslySetInnerHTML"?f=_:u=="value"?h=_:u=="checked"?b=_:a&&typeof _!="function"||p[u]===_||le(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=""),sn(t.type=="template"?e.content:e,Te(g)?g:[g],t,n,r,w=="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--;)Xe(i[u]);a||(u="value",w=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||w=="progress"&&!h||w=="option"&&h!=p[u])&&le(e,u,h,p[u],o),u="checked",b!=null&&b!=e[u]&&le(e,u,b,p[u],o))}return e}function Qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Xe(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ze(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||re,re,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),ln(i,e,s)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,i,s,a=z({},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?ae.call(arguments,2):n),te(e.type,a,r||e.key,o||e.ref,null)}ae=rn.slice,T={__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}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),mt(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mt(this))},de.prototype.render=Z,$=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},_e.__r=0,nn=/(PointerCapture)$|Capture$/i,Ke=0,je=gt(!1),Me=gt(!0);var to=0;function m(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:--to,__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 T.vnode&&T.vnode(u),u}var oe,C,Ne,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,St=O.unmount,vt=O.__;function Ye(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return ge=1,no(mn,e)}function no(e,t,n){var r=Ye(oe++,2);if(r.t=e,!r.__c&&(r.__=[mn(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=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(g){return!!g.__c});if(f.every(function(g){return!g.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(g){if(g.__N){var _=g.__[0];g.__=g.__N,g.__N=void 0,_!==g.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};C.__f=!0;var i=C.shouldComponentUpdate,s=C.componentWillUpdate;C.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)},C.shouldComponentUpdate=o}return r.__N||r.__}function Ce(e,t){var n=Ye(oe++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ye(oe++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach($e),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vt&&vt(e,t)},O.__r=function(e){wt&&wt(e),oe=0;var t=(C=e.__c).__H;t&&(Ne===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach($e),t.__h=[],oe=0)),Ne=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ne=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||$e(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){St&&St(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&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function $e(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function mn(e,t){return typeof t=="function"?t(e):t}class so{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
+ `):" "+ft(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ze};function Be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new X(null,e)}function dt(e){return Be(e),e.headers=B.from(e.headers),e.data=Pe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Kt.getAdapter(e.adapter||se.adapter)(e).then(function(r){return Be(e),r.data=Pe.call(e,e.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return $t(r)||(Be(e),r&&r.response&&(r.response.data=Pe.call(e,e.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const Xt="1.10.0",Re={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Re[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const pt={};Re.transitional=function(t,n,r){function o(i,s){return"[Axios v"+Xt+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new S(o(s," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!pt[s]&&(pt[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}};Re.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Jr(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const 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 S("option "+i+" must be "+c,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const fe={assertOptions:Jr,validators:Re},L=fe.validators;let W=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ot,response:new ot}}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:L.transitional(L.boolean),forcedJSONParsing:L.transitional(L.boolean),clarifyTimeoutError:L.transitional(L.boolean)},!1),o!=null&&(d.isFunction(o)?n.paramsSerializer={serialize:o}:fe.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),fe.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(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(c=c&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const u=[];this.interceptors.response.forEach(function(b){u.push(b.fulfilled,b.rejected)});let f,l=0,g;if(!c){const h=[dt.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),g=h.length,f=Promise.resolve(n);l<g;)f=f.then(h[l++],h[l++]);return f}g=a.length;let m=n;for(l=0;l<g;){const h=a[l++],b=a[l++];try{m=h(m)}catch(p){b.call(this,p);break}}try{f=dt.call(this,m)}catch(h){return Promise.reject(h)}for(l=0,g=u.length;l<g;)f=f.then(u[l++],u[l++]);return f}getUri(t){t=J(this.defaults,t);const n=Wt(t.baseURL,t.url,t.allowAbsoluteUrls);return Ht(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 Vr=class Zt{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 Zt(function(o){t=o}),cancel:t}}};function Gr(e){return function(n){return e.apply(null,n)}}function Kr(e){return d.isObject(e)&&e.isAxiosError===!0}const He={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(He).forEach(([e,t])=>{He[t]=e});function Qt(e){const t=new W(e),n=Ct(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 Qt(J(e,o))},n}const A=Qt(se);A.Axios=W;A.CanceledError=X;A.CancelToken=Vr;A.isCancel=$t;A.VERSION=Xt;A.toFormData=ve;A.AxiosError=S;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=Gr;A.isAxiosError=Kr;A.mergeConfig=J;A.AxiosHeaders=B;A.formToJSON=e=>Mt(d.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Kt.getAdapter;A.HttpStatusCode=He;A.default=A;const{Axios:Ho,AxiosError:jo,CanceledError:Mo,isCancel:$o,CancelToken:qo,VERSION:Wo,all:Jo,Cancel:Vo,isAxiosError:Go,spread:Ko,toFormData:Xo,AxiosHeaders:Zo,HttpStatusCode:Qo,formToJSON:Yo,getAdapter:ei,mergeConfig:ti}=A;var ae,T,Yt,$,ht,en,tn,nn,Ke,je,Me,re={},rn=[],Xr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Te=Array.isArray;function z(e,t){for(var n in t)e[n]=t[n];return e}function Xe(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?ae.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 te(e,s,r,o,null)}function te(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??++Yt,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.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 on(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 on(e)}}function _t(e){(!e.__d&&(e.__d=!0)&&$.push(e)&&!me.__r++||ht!=T.debounceRendering)&&((ht=T.debounceRendering)||en)(me)}function me(){for(var e,t,n,r,o,i,s,a=1;$.length;)$.length>a&&$.sort(tn),e=$.shift(),a=$.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],s=[],t.__P&&((n=z({},r)).__v=r.__v+1,T.vnode&&T.vnode(n),Ze(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,ln(i,n,s),n.__e!=o&&on(n)));me.__r=0}function sn(e,t,n,r,o,i,s,a,c,u,f){var l,g,m,h,b,p,y=r&&r.__k||rn,w=t.length;for(c=Zr(n,t,y,c,w),l=0;l<w;l++)(m=n.__k[l])!=null&&(g=m.__i==-1?re:y[m.__i]||re,m.__i=l,p=Ze(e,m,g,o,i,s,a,c,u,f),h=m.__e,m.ref&&g.ref!=m.ref&&(g.ref&&Qe(g.ref,null,m),f.push(m.ref,m.__c||h,m)),b==null&&h!=null&&(b=h),4&m.__u||g.__k===m.__k?c=an(m,c,e):typeof m.type=="function"&&p!==void 0?c=p:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=b,c}function Zr(e,t,n,r,o){var i,s,a,c,u,f=n.length,l=f,g=0;for(e.__k=new Array(o),i=0;i<o;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=i+g,(s=e.__k[i]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?te(null,s,null,null,null):Te(s)?te(Z,{children:s},null,null,null):s.constructor==null&&s.__b>0?te(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=Qr(s,n,c,l))!=-1&&(l--,(a=n[u])&&(a.__u|=2)),a==null||a.__v==null?(u==-1&&(o>f?g--:o<f&&g++),typeof s.type!="function"&&(s.__u|=4)):u!=c&&(u==c-1?g--:u==c+1?g++:(u>c?g--:g++,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)),un(a,a));return r}function an(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=an(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 Qr(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 mt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xr.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||mt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(nn,"$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=Ke,e.addEventListener(t,i?Me:je,i)):e.removeEventListener(t,i?Me:je,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 gt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Ke++;else if(t.t<n.u)return;return n(T.event?T.event(t):t)}}}function Ze(e,t,n,r,o,i,s,a,c,u){var f,l,g,m,h,b,p,y,w,v,x,R,k,I,j,M,Oe,D=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(f=T.__b)&&f(t);e:if(typeof D=="function")try{if(y=t.props,w="prototype"in D&&D.prototype.render,v=(f=D.contextType)&&r[f.__c],x=f?v?v.props.value:f.__:r,n.__c?p=(l=t.__c=n.__c).__=l.__E:(w?t.__c=l=new D(y,x):(t.__c=l=new de(y,x),l.constructor=D,l.render=eo),v&&v.sub(l),l.props=y,l.state||(l.state={}),l.context=x,l.__n=r,g=l.__d=!0,l.__h=[],l._sb=[]),w&&l.__s==null&&(l.__s=l.state),w&&D.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=z({},l.__s)),z(l.__s,D.getDerivedStateFromProps(y,l.__s))),m=l.props,h=l.state,l.__v=t,g)w&&D.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),w&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w&&D.getDerivedStateFromProps==null&&y!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,x),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,x)===!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(Y){Y&&(Y.__=t)}),R=0;R<l._sb.length;R++)l.__h.push(l._sb[R]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,x),w&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,h,b)})}if(l.context=x,l.props=y,l.__P=e,l.__e=!1,k=T.__r,I=0,w){for(l.state=l.__s,l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,k&&k(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=z(z({},r),l.getChildContext())),w&&!g&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,h)),M=f,f!=null&&f.type===Z&&f.key==null&&(M=cn(f.props.children)),a=sn(e,Te(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),p&&(l.__E=l.__=null)}catch(Y){if(t.__v=null,c||i!=null)if(Y.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(Oe=i.length;Oe--;)Xe(i[Oe]);else t.__e=n.__e,t.__k=n.__k;T.__e(Y,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Yr(n.__e,t,n,r,o,i,s,c,u);return(f=T.diffed)&&f(t),128&t.__u?void 0:a}function ln(e,t,n){for(var r=0;r<n.length;r++)Qe(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Te(e)?e.map(cn):z({},e)}function Yr(e,t,n,r,o,i,s,a,c){var u,f,l,g,m,h,b,p=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((m=i[u])&&"setAttribute"in m==!!w&&(w?m.localName==w:m.nodeType==3)){e=m,i[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(y);e=document.createElementNS(o,w,y.is&&y),a&&(T.__m&&T.__m(t,i),a=!1),i=null}if(w==null)p===y||a&&e.data==y||(e.data=y);else{if(i=i&&ae.call(e.childNodes),p=n.props||re,!a&&i!=null)for(p={},u=0;u<e.attributes.length;u++)p[(m=e.attributes[u]).name]=m.value;for(u in p)if(m=p[u],u!="children"){if(u=="dangerouslySetInnerHTML")l=m;else if(!(u in y)){if(u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y)continue;le(e,u,null,m,o)}}for(u in y)m=y[u],u=="children"?g=m:u=="dangerouslySetInnerHTML"?f=m:u=="value"?h=m:u=="checked"?b=m:a&&typeof m!="function"||p[u]===m||le(e,u,m,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=""),sn(t.type=="template"?e.content:e,Te(g)?g:[g],t,n,r,w=="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--;)Xe(i[u]);a||(u="value",w=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[u]||w=="progress"&&!h||w=="option"&&h!=p[u])&&le(e,u,h,p[u],o),u="checked",b!=null&&b!=e[u]&&le(e,u,b,p[u],o))}return e}function Qe(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(o){T.__e(o,n)}}function un(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Qe(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&un(r[o],t,n||typeof e.type!="function");n||Xe(e.__e),e.__c=e.__=e.__e=void 0}function eo(e,t,n){return this.constructor(e,n)}function ke(e,t,n){var r,o,i,s;t==document&&(t=document.documentElement),T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Ze(t,e=(!r&&n||t).__k=V(Z,null,[e]),o||re,re,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ae.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),ln(i,e,s)}function fn(e,t){ke(e,t,fn)}function dn(e,t,n){var r,o,i,s,a=z({},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?ae.call(arguments,2):n),te(e.type,a,r||e.key,o||e.ref,null)}ae=rn.slice,T={__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}},Yt=0,de.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=z({},this.state),typeof e=="function"&&(e=e(z({},n),this.props)),e&&z(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),_t(this))},de.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_t(this))},de.prototype.render=Z,$=[],en=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tn=function(e,t){return e.__v.__b-t.__v.__b},me.__r=0,nn=/(PointerCapture)$|Capture$/i,Ke=0,je=gt(!1),Me=gt(!0);var to=0;function _(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:--to,__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 T.vnode&&T.vnode(u),u}var oe,C,Ne,bt,ge=0,pn=[],O=T,yt=O.__b,wt=O.__r,xt=O.diffed,Et=O.__c,vt=O.unmount,St=O.__;function Ye(e,t){O.__h&&O.__h(C,e,ge||t),ge=0;var n=C.__H||(C.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return ge=1,no(_n,e)}function no(e,t,n){var r=Ye(oe++,2);if(r.t=e,!r.__c&&(r.__=[_n(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=C,!C.__f)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(g){return!!g.__c});if(f.every(function(g){return!g.__N}))return!i||i.call(this,a,c,u);var l=r.__c.props!==a;return f.forEach(function(g){if(g.__N){var m=g.__[0];g.__=g.__N,g.__N=void 0,m!==g.__[0]&&(l=!0)}}),i&&i.call(this,a,c,u)||l};C.__f=!0;var i=C.shouldComponentUpdate,s=C.componentWillUpdate;C.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)},C.shouldComponentUpdate=o}return r.__N||r.__}function Ce(e,t){var n=Ye(oe++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,C.__H.__h.push(n))}function be(e){return ge=5,ro(function(){return{current:e}},[])}function ro(e,t){var n=Ye(oe++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function oo(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(pe),e.__H.__h.forEach($e),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){C=null,yt&&yt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),St&&St(e,t)},O.__r=function(e){wt&&wt(e),oe=0;var t=(C=e.__c).__H;t&&(Ne===C?(t.__h=[],C.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(pe),t.__h.forEach($e),t.__h=[],oe=0)),Ne=C},O.diffed=function(e){xt&&xt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&bt===O.requestAnimationFrame||((bt=O.requestAnimationFrame)||io)(oo)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ne=C=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(pe),n.__h=n.__h.filter(function(r){return!r.__||$e(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Et&&Et(e,t)},O.unmount=function(e){vt&&vt(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&&O.__e(t,n.__v))};var Rt=typeof requestAnimationFrame=="function";function io(e){var t,n=function(){clearTimeout(r),Rt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Rt&&(t=requestAnimationFrame(n))}function pe(e){var t=C,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),C=t}function $e(e){var t=C;e.__c=e.__(),C=t}function hn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function _n(e,t){return typeof t=="function"?t(e):t}class so{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,7 +42,7 @@
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 qe=new so;var Ae=(e=>(e.ZH="zh",e.EN="en",e))(Ae||{}),H=(e=>(e.WHITE="white",e.DARK="dark",e))(H||{});function ao(e={}){const{baseURL:t="/api",timeout:n=1e4,onError:r}=e,o=A.create({baseURL:t,timeout:n});return o.interceptors.request.use(i=>{const s=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:a,locale:c}=s;return i.headers={...i.headers,Authorization:a,"x-locale":c===Ae.ZH?"zh-CN":"en-US"},i}),o.interceptors.response.use(i=>{if(i.data&&i.data.code===0)return i.data;const s=i.data?.msg||i.data?.message||"未知错误";return qe.error(s),r&&r(s,i),Promise.reject(i.data||{message:"未知错误"})},i=>{const s=i.response?.data?.msg||i.response?.data?.message||i.message||"网络请求失败";return qe.error(s),r&&r(s,i),Promise.reject(i)}),o}const Q=ao();function lo(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return Q.get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}}).then(t=>{const n=t.data;return sessionStorage.setItem("fund_unit_params",JSON.stringify({...e,merchant_id:n.merchant_id,biz_type:n.biz_type})),{totalAmount:n.total_amount||0,availableAmount:n.available_amount||0,frozenAmount:n.frozen_amount||0}})}const co=async()=>Q.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),uo=async(e,t)=>Q.post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,source_operator:String(t.userId),transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return Q.post("/offline/recharge/create",n,{})},po=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 Q.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},ho=async e=>Q.get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);function mo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,theme:o=H.WHITE,locale:i=Ae.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})),co(),{token:s,merchantId:t,bizType:n,fundBalanceId:r,theme:o,locale:i}}const _o={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function go({onClick:e,color:t,children:n}){const i=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{background:t||"#1890ff",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 m("button",{style:i,onClick:e,type:"button",children:n})}const bo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function yo(e){return bo[e]||e}const wo={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function xo(e){return wo[e]||e}function Eo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ae.ZH}function E(e){return Eo()==="zh"?yo(e):xo(e)}const We=({value:e,onChange:t,options:n,placeholder:r,style:o,error:i,disabled:s,dropdownStyle:a,className:c,dropdownClassName:u,children:f})=>{const[l,g]=N(!1),_=be(null),[h,b]=N(null),y=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=y?{trigger:{background:s?"#f5f5f5":"#fff",color:s?"#bfbfbf":e?"#222":"#bfbfbf",border:i?"1px solid #ff4d4f":s?"1px solid #f0f0f0":"1px solid #d9d9d9"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(x,R,k)=>({color:R?"#bfbfbf":x?"#1890ff":"#222",background:x?"#e6f7ff":k&&!R||R?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"}}:{trigger:{background:"#23262F",color:s?"#666":e?"#fff":"#666",border:i?"1px solid #ff4d4f":"1px solid #23262F"},dropdown:{background:"#23262F",border:"1px solid #23262F",color:"#fff"},option:(x,R,k)=>({color:R?"#666":x?"#00E8C6":"#fff",background:x?"#23262F":k&&!R?"#333843":"#23262F"}),placeholder:{color:"#666"}};Ce(()=>{if(!l)return;const x=R=>{_.current&&!_.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l]);const S=n.find(x=>x.value===e);return m("div",{ref:_,className:c,style:{position:"relative",...o},children:[m("style",{children:`
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 qe=new so;var Ae=(e=>(e.ZH="zh",e.EN="en",e))(Ae||{}),H=(e=>(e.WHITE="white",e.DARK="dark",e))(H||{});function ao(e={}){const{baseURL:t="/api",timeout:n=1e4,onError:r}=e,o=A.create({baseURL:t,timeout:n});return o.interceptors.request.use(i=>{const s=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),{token:a,locale:c}=s;return i.headers={...i.headers,Authorization:a,"x-locale":c===Ae.ZH?"zh-CN":"en-US"},i}),o.interceptors.response.use(i=>{if(i.data&&i.data.code===0)return i.data;const s=i.data?.msg||i.data?.message||"未知错误";return qe.error(s),r&&r(s,i),Promise.reject(i.data||{message:"未知错误"})},i=>{const s=i.response?.data?.msg||i.response?.data?.message||i.message||"网络请求失败";return qe.error(s),r&&r(s,i),Promise.reject(i)}),o}const Q=ao();function lo(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return Q.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 co=async()=>Q.get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),uo=async(e,t)=>Q.post("/oss/upload",e,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n=>{if(n.total){const r=Math.round(n.loaded*100/n.total);t&&t(r)}}}).then(n=>n.data?.url||""),fo=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,transfer_no:e.transferNo,transfer_channel:e.transferChannel,voucher_urls:e.voucherUrls};return Q.post("/offline/recharge/create",n,{})},po=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,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href};return Q.post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},ho=async e=>Q.get("/calc-payment-amount",{params:e}).then(t=>t.data.payment_amount);function _o(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:i=H.WHITE,locale:s=Ae.ZH}=e,a="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:a,theme:i,locale:s})),co(),{token:a,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:i,locale:s}}const mo={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function go({onClick:e,color:t,children:n}){const i=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?{background:t||"#1890ff",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 _("button",{style:i,onClick:e,type:"button",children:n})}const bo={余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",总可用:"总可用",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付",取消:"取消",关闭:"关闭",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证",离线充值创建成功:"离线充值创建成功","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function yo(e){return bo[e]||e}const wo={余额详情:"Balance Details",真实金额:"Real Amount",冻结金额:"Frozen Amount",总可用:"Total Available",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay",取消:"Cancel",关闭:"Close",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher",离线充值创建成功:"Offline recharge created successfully","加载中...":"Loading...",错误:"Error",成功:"Success",必填:"Required","充值/转账":"Recharge/Transfer",切换为暗黑主题:"Switch to Dark Theme",切换为白色主题:"Switch to Light Theme",点击或拖拽文件到此处上传:"Click or drag files here to upload","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",个文件:"files can be uploaded","正在上传...":"Uploading...",已上传:"Uploaded",移除:"Remove"};function xo(e){return wo[e]||e}function Eo(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||Ae.ZH}function E(e){return Eo()==="zh"?yo(e):xo(e)}const We=({value:e,onChange:t,options:n,placeholder:r,style:o,error:i,disabled:s,dropdownStyle:a,className:c,dropdownClassName:u,children:f})=>{const[l,g]=N(!1),m=be(null),[h,b]=N(null),y=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=y?{trigger:{background:s?"#f5f5f5":"#fff",color:s?"#bfbfbf":e?"#222":"#bfbfbf",border:i?"1px solid #ff4d4f":s?"1px solid #f0f0f0":"1px solid #d9d9d9"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(x,R,k)=>({color:R?"#bfbfbf":x?"#1890ff":"#222",background:x?"#e6f7ff":k&&!R||R?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"}}:{trigger:{background:"#23262F",color:s?"#666":e?"#fff":"#666",border:i?"1px solid #ff4d4f":"1px solid #23262F"},dropdown:{background:"#23262F",border:"1px solid #23262F",color:"#fff"},option:(x,R,k)=>({color:R?"#666":x?"#00E8C6":"#fff",background:x?"#23262F":k&&!R?"#333843":"#23262F"}),placeholder:{color:"#666"}};Ce(()=>{if(!l)return;const x=R=>{m.current&&!m.current.contains(R.target)&&g(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l]);const v=n.find(x=>x.value===e);return _("div",{ref:m,className:c,style:{position:"relative",...o},children:[_("style",{children:`
46
46
  .custom-select-dropdown {
47
47
  scrollbar-width: thin;
48
48
  scrollbar-color: #bfbfbf #f5f5f5;
@@ -57,4 +57,4 @@
57
57
  .custom-select-dropdown::-webkit-scrollbar-track {
58
58
  background: ${y?"#f5f5f5":"#23262F"};
59
59
  }
60
- `}),m("div",{onClick:()=>!s&&g(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:s?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:s?.6:1,width:"100%",...w.trigger,...o},tabIndex:0,children:[m("span",{style:{flex:1},children:S?S.label:m("span",{style:w.placeholder,children:r||"请选择"})}),m("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:m("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!s&&m("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:y?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...w.dropdown,...a},children:[n.length===0&&m("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[m("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[m("title",{children:E("暂无数据")}),m("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[m("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),m("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[m("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),m("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),m("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:E("暂无数据")})]}),n.map((x,R)=>m("div",{onClick:()=>{x.disabled||(g(!1),t?.(x.value))},onMouseEnter:()=>b(R),onMouseLeave:()=>b(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...w.option(e===x.value,!!x.disabled,h===R)},children:x.label},x.value))]}),f]})},So=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(p=>p.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,[u,f]=N(""),[l,g]=N(!1);Ce(()=>{e.currency&&e.amount&&e.rechargeChannel?ho({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(p=>{f(p),g(!0)}).catch(p=>{console.error("计算支付金额失败:",p),g(!1)}):g(!1)},[e.currency,e.amount,e.rechargeChannel]);const _=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"},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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},h=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"},b=c?{background:"#1890ff",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 m(Z,{children:[m("div",{style:{marginBottom:18},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),m(We,{value:e.currency,onChange:p=>{t(y=>({...y,currency:p}))},options:i?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择充值币种")})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),m("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:p=>{const y=p.target.value;t(w=>({...w,amount:y,amountError:y.trim()?"":w.amountError}))},style:{..._.input,...e.amountError?_.inputError:{}}}),e.amountError&&m("div",{style:_.error,children:e.amountError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:_.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),m(We,{value:e.rechargeChannel,onChange:p=>{t(y=>({...y,rechargeChannel:p,rechargeChannelError:p?"":y.rechargeChannelError}))},options:s?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择支付平台")}),e.rechargeChannelError&&m("div",{style:_.error,children:e.rechargeChannelError})]}),l&&u&&m("div",{style:{marginBottom:24,padding:"12px 16px",background:c?"#f6ffed":"#1a1a1a",border:`1px solid ${c?"#b7eb8f":"#333"}`,borderRadius:6,fontSize:14,color:"#52c41a"},children:[s.find(p=>p.value===e.rechargeChannel)?.label||e.rechargeChannel,E("需要收取手续费,实际支付金额约为:"),"$",u]}),e.error&&m("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:h,children:E("取消")}),m("button",{type:"submit",disabled:r,style:b,children:E(r?"提交中...":"去支付")})]})]})},vo={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"}}},Ro=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=be(null),[a,c]=N(!1),[u,f]=N(0),_=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",h=vo[_],b=async y=>{const w=Array.from(y.target.files).slice(0,n);if(!w.length)return;c(!0);const S=[];for(let x=0;x<w.length;x++){f(0);const R=new FormData;R.append("file",w[x]);try{const k=await uo(R,U=>f(U));k&&S.push(k)}catch{}}c(!1),f(0),t?.([...e,...S]),s.current&&(s.current.value="")},p=y=>{const w=e.filter((S,x)=>x!==y);t?.(w)};return m("div",{children:[m("div",{style:{...h.container,cursor:i?"not-allowed":h.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[m("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),m("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),m("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),m("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:i}),a&&m("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&m("div",{style:{marginTop:12},children:e.map((y,w)=>m("div",{style:h.fileItem,children:[m("div",{style:{display:"flex",alignItems:"center",flex:1},children:[m("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()}),m("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),m("button",{type:"button",onClick:S=>{S.stopPropagation(),p(w)},style:h.removeBtn,disabled:i,children:E("移除")})]},y))})]})},To=({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===H.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"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},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"},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 m("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(g=>({...g,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(g=>({...g,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(g=>({...g,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(g=>({...g,filesError:E("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),qe.success(E("离线充值创建成功")))},children:[m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),m(We,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...i?.map(f=>({value:f.value,label:f.label}))],placeholder:E("请选择支付平台")}),e.platformError&&m("div",{style:c.error,children:e.platformError})]}),m("div",{style:{marginBottom:18},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),m("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(g=>({...g,transactionId:l,transactionIdError:l?"":g.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&m("div",{style:c.error,children:e.transactionIdError})]}),m("div",{style:{marginBottom:24},children:[m("div",{style:c.label,children:[m("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),m(Ro,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&m("div",{style:c.error,children:e.filesError})]}),m("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[m("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),m("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function ko({visible:e,onClose:t,onSubmit:n}){const[r,o]=N({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=N("online"),[a,c]=N({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Ce(()=>{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 h=>{h.preventDefault();let b=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:E("请输入充值金额")})),b=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:E("请选择支付平台")})),b=!1),!!b){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:E("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}},f=h=>{h.target===h.currentTarget&&t()},_=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.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:(h,b)=>({flex:1,background:h?"#fff":"#F7F8FA",color:h?"#1890ff":"#222",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #F0F1F3":void 0,borderLeft:b?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:(h,b)=>({flex:1,background:h?"#23262F":"#181A20",color:h?"#00E8C6":"#fff",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #23262F":void 0,borderLeft:b?void 0:"1px solid #23262F",transition:"all 0.2s"})};return m("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:_.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onClick:f,children:m("form",{onSubmit:u,style:{background:_.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:_.modalColor,boxShadow:_.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[m("button",{type:"button",onClick:t,style:_.closeBtn,"aria-label":E("关闭"),children:"×"}),m("div",{style:_.title,children:E("充值 / 转账")}),m("div",{style:{display:"flex",marginBottom:28},children:[m("button",{type:"button",onClick:()=>s("online"),style:_.tabBtn(i==="online",!0),children:E("在线充值")}),m("button",{type:"button",onClick:()=>s("offline"),style:_.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?m(So,{formState:r,setFormState:o,onClose:t,loading:r.loading}):m(To,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=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 Co=["context","children"];function Ao(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,Co);return dn(t,n)}function Oo(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Ao,et({},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(Tt,{name:f},u):o[s]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function _n(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Fo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[_n(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function Po(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},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 gn(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=Oo,o.prototype.attributeChangedCallback=Fo,o.prototype.disconnectedCallback=Po,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 Bo(){const[e,t]=N(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return m("div",{children:[m(go,{onClick:()=>t(!0),children:E("充值/转账")}),m(ko,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Bo,"best-recharge",["theme"],{shadow:!1});const No=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=N(!1),[u,f]=N(s),l=be(null),g=be(null),_=()=>{if(g.current&&(clearTimeout(g.current),g.current=null),s==="top"||s==="bottom")if(l.current){const R=l.current.getBoundingClientRect();s==="top"&&R.top<100?f("bottom"):s==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},h=()=>{g.current=window.setTimeout(()=>{c(!1)},120)},b={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"}}},y=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=b[y?"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",...w.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(S={...S,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):u==="bottom"?(S={...S,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):u==="leftTop"?(S={...S,right:"100%",top:0,marginRight:i,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):u==="rightTop"&&(S={...S,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),m("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:_,onMouseLeave:h,children:[t,a&&m("div",{style:S,onMouseEnter:_,onMouseLeave:h,children:[e,m("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Uo={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 Io(e){const[t,n]=N({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:"#1890ff",dot:"#15b36b"}]});Ce(()=>{(async()=>{try{const a=await lo(),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:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,i=Uo[o?"white":"dark"];return m(No,{popover:m(Z,{children:[m("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>m("div",{style:i.detailRow,children:[m("span",{style:i.detailLabel,children:[m("span",{style:i.detailDot(s.dot)}),s.label]}),m("span",{style:i.detailValue(s.color),children:[t.symbol,kt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:m("div",{style:i.main,children:[t.symbol,kt(t.available),m("span",{style:i.currency,children:t.currency})]})})}gn(Io,"best-statistical-balance");const Do=["best-recharge","best-statistical-balance"];exports.components=Do;exports.initFundUnit=mo;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=_o;
60
+ `}),_("div",{onClick:()=>!s&&g(x=>!x),style:{minHeight:40,borderRadius:6,display:"flex",alignItems:"center",padding:"0 12px",fontSize:15,cursor:s?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:s?.6:1,width:"100%",...w.trigger,...o},tabIndex:0,children:[_("span",{style:{flex:1},children:v?v.label:_("span",{style:w.placeholder,children:r||"请选择"})}),_("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),l&&!s&&_("div",{className:`custom-select-dropdown${u?" "+u:""}`,style:{position:"absolute",left:0,right:0,top:44,zIndex:10,borderRadius:6,boxShadow:y?"0 2px 8px rgba(0,0,0,0.08)":"0 2px 8px rgba(0,0,0,0.32)",maxHeight:220,overflowY:"auto",...w.dropdown,...a},children:[n.length===0&&_("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:120,width:"100%",userSelect:"none"},children:[_("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[_("title",{children:E("暂无数据")}),_("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[_("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),_("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[_("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),_("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#fafafa"})]})]})]}),_("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:15},children:E("暂无数据")})]}),n.map((x,R)=>_("div",{onClick:()=>{x.disabled||(g(!1),t?.(x.value))},onMouseEnter:()=>b(R),onMouseLeave:()=>b(null),style:{padding:"10px 16px",cursor:x.disabled?"not-allowed":"pointer",fontWeight:e===x.value?600:400,opacity:x.disabled?.6:1,...w.option(e===x.value,!!x.disabled,h===R)},children:x.label},x.value))]}),f]})},vo=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),i=o?.currency||[],s=o?.channel?.filter(p=>p.payment_support)||[],c=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,[u,f]=N(""),[l,g]=N(!1);Ce(()=>{e.currency&&e.amount&&e.rechargeChannel?ho({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(p=>{f(p),g(!0)}).catch(p=>{console.error("计算支付金额失败:",p),g(!1)}):g(!1)},[e.currency,e.amount,e.rechargeChannel]);const m=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"},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"},error:{color:"#ff4d4f",fontSize:13,marginTop:4,textAlign:"left"}},h=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"},b=c?{background:"#1890ff",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 _(Z,{children:[_("div",{style:{marginBottom:18},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值币种")]}),_(We,{value:e.currency,onChange:p=>{t(y=>({...y,currency:p}))},options:i?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择充值币种")})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("充值金额")]}),_("input",{type:"text",placeholder:E("请输入充值金额"),value:e.amount,onInput:p=>{const y=p.target.value;t(w=>({...w,amount:y,amountError:y.trim()?"":w.amountError}))},style:{...m.input,...e.amountError?m.inputError:{}}}),e.amountError&&_("div",{style:m.error,children:e.amountError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:m.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("支付平台")]}),_(We,{value:e.rechargeChannel,onChange:p=>{t(y=>({...y,rechargeChannel:p,rechargeChannelError:p?"":y.rechargeChannelError}))},options:s?.map(p=>({value:p.value,label:p.label})),placeholder:E("请选择支付平台")}),e.rechargeChannelError&&_("div",{style:m.error,children:e.rechargeChannelError})]}),l&&u&&_("div",{style:{marginBottom:24,padding:"12px 16px",background:c?"#f6ffed":"#1a1a1a",border:`1px solid ${c?"#b7eb8f":"#333"}`,borderRadius:6,fontSize:14,color:"#52c41a"},children:[s.find(p=>p.value===e.rechargeChannel)?.label||e.rechargeChannel,E("需要收取手续费,实际支付金额约为:"),"$",u]}),e.error&&_("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:h,children:E("取消")}),_("button",{type:"submit",disabled:r,style:b,children:E(r?"提交中...":"去支付")})]})]})},So={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"}}},Ro=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:i=!1})=>{const s=be(null),[a,c]=N(!1),[u,f]=N(0),m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE?"white":"dark",h=So[m],b=async y=>{const w=Array.from(y.target.files).slice(0,n);if(!w.length)return;c(!0);const v=[];for(let x=0;x<w.length;x++){f(0);const R=new FormData;R.append("file",w[x]);try{const k=await uo(R,I=>f(I));k&&v.push(k)}catch{}}c(!1),f(0),t?.([...e,...v]),s.current&&(s.current.value="")},p=y=>{const w=e.filter((v,x)=>x!==y);t?.(w)};return _("div",{children:[_("div",{style:{...h.container,cursor:i?"not-allowed":h.container.cursor,opacity:i?.6:1},onClick:()=>!i&&s.current?.click(),children:[_("div",{style:{fontSize:48,marginBottom:12},children:"📁"}),_("div",{style:{color:"#222",fontSize:15,marginBottom:4},children:E("点击或拖拽文件到此处上传")}),_("div",{style:{color:"#999",fontSize:13},children:[E("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传")," ",n," ",E("个文件")]}),_("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:i}),a&&_("div",{style:{marginTop:12,color:"#1677ff"},children:[E("正在上传...")," ",u,"%"]})]}),e&&e.length>0&&_("div",{style:{marginTop:12},children:e.map((y,w)=>_("div",{style:h.fileItem,children:[_("div",{style:{display:"flex",alignItems:"center",flex:1},children:[_("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()}),_("span",{style:{color:"#8C8F93",fontSize:13,marginLeft:8},children:["[",E("已上传"),"]"]})]}),_("button",{type:"button",onClick:v=>{v.stopPropagation(),p(w)},style:h.removeBtn,disabled:i,children:E("移除")})]},y))})]})},To=({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===H.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"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:"8px 24px",fontSize:15,cursor:"pointer",fontWeight:600},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"},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 _("form",{onSubmit:async f=>{f.preventDefault();let l=!0;t(g=>({...g,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(g=>({...g,platformError:E("请选择支付平台")})),l=!1),e.transactionId.trim()||(t(g=>({...g,transactionIdError:E("请输入转账交易ID")})),l=!1),(!e.files||e.files.length===0)&&(t(g=>({...g,filesError:E("请上传转账凭证")})),l=!1),l&&(await fo({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),qe.success(E("离线充值创建成功")))},children:[_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("第三方支付平台")]}),_(We,{value:e.platform,onChange:f=>{t(l=>({...l,platform:f,platformError:f?"":l.platformError}))},options:[...i?.map(f=>({value:f.value,label:f.label}))],placeholder:E("请选择支付平台")}),e.platformError&&_("div",{style:c.error,children:e.platformError})]}),_("div",{style:{marginBottom:18},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("交易ID")]}),_("input",{type:"text",placeholder:E("请输入转账交易ID"),value:e.transactionId,onInput:f=>{const l=f.target.value;t(g=>({...g,transactionId:l,transactionIdError:l?"":g.transactionIdError}))},style:{...c.input,...e.transactionIdError?c.inputError:{}}}),e.transactionIdError&&_("div",{style:c.error,children:e.transactionIdError})]}),_("div",{style:{marginBottom:24},children:[_("div",{style:c.label,children:[_("span",{style:{color:"#F53F3F"},children:"*"})," ",E("上传文件")]}),_(Ro,{value:e.files,onChange:f=>t(l=>({...l,files:f,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&_("div",{style:c.error,children:e.filesError})]}),_("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[_("button",{type:"button",onClick:n,style:c.buttonCancel,children:E("取消")}),_("button",{type:"submit",disabled:r,style:c.buttonSubmit,children:E("去支付")})]})]})};function ko({visible:e,onClose:t,onSubmit:n}){const[r,o]=N({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[i,s]=N("online"),[a,c]=N({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1});if(Ce(()=>{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 h=>{h.preventDefault();let b=!0;if(o(p=>({...p,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(p=>({...p,amountError:E("请输入充值金额")})),b=!1),r.rechargeChannel||(o(p=>({...p,rechargeChannelError:E("请选择支付平台")})),b=!1),!!b){o(p=>({...p,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(p=>({...p,error:E("提交失败,请重试")}))}finally{o(p=>({...p,loading:!1}))}}},f=h=>{h.target===h.currentTarget&&t()},m=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.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:(h,b)=>({flex:1,background:h?"#fff":"#F7F8FA",color:h?"#1890ff":"#222",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #F0F1F3":void 0,borderLeft:b?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:(h,b)=>({flex:1,background:h?"#23262F":"#181A20",color:h?"#00E8C6":"#fff",border:"none",borderRadius:b?"8px 0 0 8px":"0 8px 8px 0",fontWeight:h?600:400,fontSize:16,height:48,boxShadow:h?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer",borderRight:b?"1px solid #23262F":void 0,borderLeft:b?void 0:"1px solid #23262F",transition:"all 0.2s"})};return _("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:_("form",{onSubmit:u,style:{background:m.modalBg,padding:32,borderRadius:12,minWidth:400,maxWidth:400,color:m.modalColor,boxShadow:m.modalBoxShadow,position:"relative"},onClick:h=>h.stopPropagation(),children:[_("button",{type:"button",onClick:t,style:m.closeBtn,"aria-label":E("关闭"),children:"×"}),_("div",{style:m.title,children:E("充值 / 转账")}),_("div",{style:{display:"flex",marginBottom:28},children:[_("button",{type:"button",onClick:()=>s("online"),style:m.tabBtn(i==="online",!0),children:E("在线充值")}),_("button",{type:"button",onClick:()=>s("offline"),style:m.tabBtn(i==="offline",!1),children:E("线下转账")})]}),i==="online"?_(vo,{formState:r,setFormState:o,onClose:t,loading:r.loading}):_(To,{formState:a,setFormState:c,onClose:t,loading:a.loading})]})})}function et(){return(et=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 Co=["context","children"];function Ao(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,Co);return dn(t,n)}function Oo(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=V(Ao,et({},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[mn(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(Tt,{name:f},u):o[s]=u}var l=r?V(Tt,null,o):o;return V(r||n.nodeName.toLowerCase(),i,l)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?fn:ke)(this._vdom,this._root)}function mn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Fo(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[mn(e)]=n,this._vdom=dn(this._vdom,r),ke(this._vdom,this._root)}}function Po(){ke(this._vdom=null,this._root)}function Tt(e,t){var n=this;return V("slot",et({},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 gn(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=Oo,o.prototype.attributeChangedCallback=Fo,o.prototype.disconnectedCallback=Po,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 Bo(){const[e,t]=N(!1),n=async r=>{const o=await po({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return _("div",{children:[_(go,{onClick:()=>t(!0),children:E("充值/转账")}),_(ko,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}gn(Bo,"best-recharge",["theme"],{shadow:!1});const No=({popover:e,children:t,popoverWidth:n=300,popoverMinWidth:r=200,offsetY:o=16,offsetX:i=16,popoverPosition:s="top"})=>{const[a,c]=N(!1),[u,f]=N(s),l=be(null),g=be(null),m=()=>{if(g.current&&(clearTimeout(g.current),g.current=null),s==="top"||s==="bottom")if(l.current){const R=l.current.getBoundingClientRect();s==="top"&&R.top<100?f("bottom"):s==="bottom"&&window.innerHeight-R.bottom<100?f("top"):f(s)}else f(s);else f(s);c(!0)},h=()=>{g.current=window.setTimeout(()=>{c(!1)},120)},b={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"}}},y=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,w=b[y?"white":"dark"];let v={position:"absolute",zIndex:999,borderRadius:6,fontSize:15,minWidth:r,width:n,padding:"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...w.popover},x={position:"absolute",zIndex:11,width:0,height:0};return u==="top"?(v={...v,left:"50%",top:-48,transform:"translateX(-50%)"},x={...x,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${w.arrow.top}`}):u==="bottom"?(v={...v,left:"50%",top:"100%",marginTop:o,transform:"translateX(-50%)"},x={...x,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${w.arrow.bottom}`}):u==="leftTop"?(v={...v,right:"100%",top:0,marginRight:i,transform:"none"},x={...x,right:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${w.arrow.left}`}):u==="rightTop"&&(v={...v,left:"100%",top:0,marginLeft:i,transform:"translateY(0)"},x={...x,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${w.arrow.right}`}),_("div",{ref:l,style:{position:"relative",display:"inline-block"},onMouseEnter:m,onMouseLeave:h,children:[t,a&&_("div",{style:v,onMouseEnter:m,onMouseLeave:h,children:[e,_("div",{style:x})]})]})};function kt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}const Io={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 Uo(e){const[t,n]=N({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:"#1890ff",dot:"#15b36b"}]});Ce(()=>{(async()=>{try{const a=await lo(),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:"#1890ff",dot:"#15b36b"}]};n(c)}catch(a){console.error("获取余额失败:",a)}})()},[]);const o=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").theme===H.WHITE,i=Io[o?"white":"dark"];return _(No,{popover:_(Z,{children:[_("div",{style:i.popoverTitle,children:E("余额详情")}),t.details.map(s=>_("div",{style:i.detailRow,children:[_("span",{style:i.detailLabel,children:[_("span",{style:i.detailDot(s.dot)}),s.label]}),_("span",{style:i.detailValue(s.color),children:[t.symbol,kt(s.value)]})]},s.label))]}),popoverPosition:e.popoverPosition||"bottom",children:_("div",{style:i.main,children:[t.symbol,kt(t.available),_("span",{style:i.currency,children:t.currency})]})})}gn(Uo,"best-statistical-balance");const Do=["best-recharge","best-statistical-balance"];exports.components=Do;exports.initFundUnit=_o;exports.npmTest=bn;exports.printCurrentTime=yn;exports.viteProxy=mo;
package/dist/best-unit.js CHANGED
@@ -26,7 +26,7 @@ const xn = xe("string"), P = xe("function"), Ft = xe("number"), Ee = (e) => e !=
26
26
  return !1;
27
27
  const t = Je(e);
28
28
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(At in e) && !(ye in e);
29
- }, Sn = U("Date"), vn = U("File"), Rn = U("Blob"), Tn = U("FileList"), kn = (e) => Ee(e) && P(e.pipe), Cn = (e) => {
29
+ }, vn = U("Date"), Sn = U("File"), Rn = U("Blob"), Tn = U("FileList"), kn = (e) => Ee(e) && P(e.pipe), Cn = (e) => {
30
30
  let t;
31
31
  return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = we(e)) === "formdata" || // detect form-data instance
32
32
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
@@ -184,8 +184,8 @@ const Qn = (e) => {
184
184
  isResponse: Pn,
185
185
  isHeaders: Bn,
186
186
  isUndefined: ne,
187
- isDate: Sn,
188
- isFile: vn,
187
+ isDate: vn,
188
+ isFile: Sn,
189
189
  isBlob: Rn,
190
190
  isRegExp: Jn,
191
191
  isFunction: P,
@@ -227,10 +227,10 @@ const Qn = (e) => {
227
227
  asap: tr,
228
228
  isIterable: nr
229
229
  };
230
- function v(e, t, n, r, o) {
230
+ function S(e, t, n, r, o) {
231
231
  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);
232
232
  }
233
- d.inherits(v, Error, {
233
+ d.inherits(S, Error, {
234
234
  toJSON: function() {
235
235
  return {
236
236
  // Standard
@@ -251,7 +251,7 @@ d.inherits(v, Error, {
251
251
  };
252
252
  }
253
253
  });
254
- const Ut = v.prototype, Dt = {};
254
+ const Ut = S.prototype, Dt = {};
255
255
  [
256
256
  "ERR_BAD_OPTION_VALUE",
257
257
  "ERR_BAD_OPTION",
@@ -269,13 +269,13 @@ const Ut = v.prototype, Dt = {};
269
269
  ].forEach((e) => {
270
270
  Dt[e] = { value: e };
271
271
  });
272
- Object.defineProperties(v, Dt);
272
+ Object.defineProperties(S, Dt);
273
273
  Object.defineProperty(Ut, "isAxiosError", { value: !0 });
274
- v.from = (e, t, n, r, o, i) => {
274
+ S.from = (e, t, n, r, o, i) => {
275
275
  const s = Object.create(Ut);
276
276
  return d.toFlatObject(e, s, function(c) {
277
277
  return c !== Error.prototype;
278
- }, (a) => a !== "isAxiosError"), v.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
278
+ }, (a) => a !== "isAxiosError"), S.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
279
279
  };
280
280
  const rr = null;
281
281
  function Ue(e) {
@@ -295,7 +295,7 @@ function or(e) {
295
295
  const ir = d.toFlatObject(d, {}, null, function(t) {
296
296
  return /^is[A-Z]/.test(t);
297
297
  });
298
- function Se(e, t, n) {
298
+ function ve(e, t, n) {
299
299
  if (!d.isObject(e))
300
300
  throw new TypeError("target must be an object");
301
301
  t = t || new FormData(), n = d.toFlatObject(n, {
@@ -315,7 +315,7 @@ function Se(e, t, n) {
315
315
  if (d.isBoolean(h))
316
316
  return h.toString();
317
317
  if (!c && d.isBlob(h))
318
- throw new v("Blob is not supported. Use a Buffer instead.");
318
+ throw new S("Blob is not supported. Use a Buffer instead.");
319
319
  return d.isArrayBuffer(h) || d.isTypedArray(h) ? c && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
320
320
  }
321
321
  function f(h, b, p) {
@@ -324,11 +324,11 @@ function Se(e, t, n) {
324
324
  if (d.endsWith(b, "{}"))
325
325
  b = r ? b : b.slice(0, -2), h = JSON.stringify(h);
326
326
  else if (d.isArray(h) && or(h) || (d.isFileList(h) || d.endsWith(b, "[]")) && (y = d.toArray(h)))
327
- return b = Lt(b), y.forEach(function(S, x) {
328
- !(d.isUndefined(S) || S === null) && t.append(
327
+ return b = Lt(b), y.forEach(function(v, x) {
328
+ !(d.isUndefined(v) || v === null) && t.append(
329
329
  // eslint-disable-next-line no-nested-ternary
330
330
  s === !0 ? nt([b], x, i) : s === null ? b : b + "[]",
331
- u(S)
331
+ u(v)
332
332
  );
333
333
  }), !1;
334
334
  }
@@ -373,7 +373,7 @@ function rt(e) {
373
373
  });
374
374
  }
375
375
  function Ve(e, t) {
376
- this._pairs = [], e && Se(e, this, t);
376
+ this._pairs = [], e && ve(e, this, t);
377
377
  }
378
378
  const zt = Ve.prototype;
379
379
  zt.append = function(t, n) {
@@ -484,7 +484,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pr
484
484
  ...ur
485
485
  };
486
486
  function _r(e, t) {
487
- return Se(e, new F.classes.URLSearchParams(), Object.assign({
487
+ return ve(e, new F.classes.URLSearchParams(), Object.assign({
488
488
  visitor: function(n, r, o, i) {
489
489
  return F.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
490
490
  }
@@ -546,7 +546,7 @@ const se = {
546
546
  return _r(t, this.formSerializer).toString();
547
547
  if ((a = d.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
548
548
  const c = this.env && this.env.FormData;
549
- return Se(
549
+ return ve(
550
550
  a ? { "files[]": t } : t,
551
551
  c && new c(),
552
552
  this.formSerializer
@@ -565,7 +565,7 @@ const se = {
565
565
  return JSON.parse(t);
566
566
  } catch (a) {
567
567
  if (s)
568
- throw a.name === "SyntaxError" ? v.from(a, v.ERR_BAD_RESPONSE, this, null, this.response) : a;
568
+ throw a.name === "SyntaxError" ? S.from(a, S.ERR_BAD_RESPONSE, this, null, this.response) : a;
569
569
  }
570
570
  }
571
571
  return t;
@@ -646,10 +646,10 @@ function Fe(e, t, n, r, o) {
646
646
  return r.test(t);
647
647
  }
648
648
  }
649
- function Sr(e) {
649
+ function vr(e) {
650
650
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
651
651
  }
652
- function vr(e, t) {
652
+ function Sr(e, t) {
653
653
  const n = d.toCamelCase(" " + t);
654
654
  ["get", "set", "has"].forEach((r) => {
655
655
  Object.defineProperty(e, r + n, {
@@ -742,7 +742,7 @@ let B = class {
742
742
  n[s] = ue(o), delete n[i];
743
743
  return;
744
744
  }
745
- const a = t ? Sr(i) : String(i).trim();
745
+ const a = t ? vr(i) : String(i).trim();
746
746
  a !== i && delete n[i], n[a] = ue(o), r[a] = !0;
747
747
  }), this;
748
748
  }
@@ -781,7 +781,7 @@ let B = class {
781
781
  }).accessors, o = this.prototype;
782
782
  function i(s) {
783
783
  const a = ee(s);
784
- r[a] || (vr(o, s), r[a] = !0);
784
+ r[a] || (Sr(o, s), r[a] = !0);
785
785
  }
786
786
  return d.isArray(t) ? t.forEach(i) : i(t), this;
787
787
  }
@@ -808,16 +808,16 @@ function $t(e) {
808
808
  return !!(e && e.__CANCEL__);
809
809
  }
810
810
  function X(e, t, n) {
811
- v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
811
+ S.call(this, e ?? "canceled", S.ERR_CANCELED, t, n), this.name = "CanceledError";
812
812
  }
813
- d.inherits(X, v, {
813
+ d.inherits(X, S, {
814
814
  __CANCEL__: !0
815
815
  });
816
816
  function qt(e, t, n) {
817
817
  const r = n.config.validateStatus;
818
- !n.status || !r || r(n.status) ? e(n) : t(new v(
818
+ !n.status || !r || r(n.status) ? e(n) : t(new S(
819
819
  "Request failed with status code " + n.status,
820
- [v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
820
+ [S.ERR_BAD_REQUEST, S.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
821
821
  n.config,
822
822
  n.request,
823
823
  n
@@ -1021,13 +1021,13 @@ const Jt = (e) => {
1021
1021
  function y() {
1022
1022
  if (!p)
1023
1023
  return;
1024
- const S = B.from(
1024
+ const v = B.from(
1025
1025
  "getAllResponseHeaders" in p && p.getAllResponseHeaders()
1026
1026
  ), R = {
1027
1027
  data: !a || a === "text" || a === "json" ? p.responseText : p.response,
1028
1028
  status: p.status,
1029
1029
  statusText: p.statusText,
1030
- headers: S,
1030
+ headers: v,
1031
1031
  config: e,
1032
1032
  request: p
1033
1033
  };
@@ -1040,26 +1040,26 @@ const Jt = (e) => {
1040
1040
  "onloadend" in p ? p.onloadend = y : p.onreadystatechange = function() {
1041
1041
  !p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(y);
1042
1042
  }, p.onabort = function() {
1043
- p && (r(new v("Request aborted", v.ECONNABORTED, e, p)), p = null);
1043
+ p && (r(new S("Request aborted", S.ECONNABORTED, e, p)), p = null);
1044
1044
  }, p.onerror = function() {
1045
- r(new v("Network Error", v.ERR_NETWORK, e, p)), p = null;
1045
+ r(new S("Network Error", S.ERR_NETWORK, e, p)), p = null;
1046
1046
  }, p.ontimeout = function() {
1047
1047
  let x = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1048
1048
  const R = o.transitional || jt;
1049
- o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new v(
1049
+ o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new S(
1050
1050
  x,
1051
- R.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
1051
+ R.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
1052
1052
  e,
1053
1053
  p
1054
1054
  )), p = null;
1055
1055
  }, i === void 0 && s.setContentType(null), "setRequestHeader" in p && d.forEach(s.toJSON(), function(x, R) {
1056
1056
  p.setRequestHeader(R, x);
1057
- }), d.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), a && a !== "json" && (p.responseType = o.responseType), u && ([g, h] = he(u, !0), p.addEventListener("progress", g)), c && p.upload && ([l, m] = he(c), p.upload.addEventListener("progress", l), p.upload.addEventListener("loadend", m)), (o.cancelToken || o.signal) && (f = (S) => {
1058
- p && (r(!S || S.type ? new X(null, e, p) : S), p.abort(), p = null);
1057
+ }), d.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), a && a !== "json" && (p.responseType = o.responseType), u && ([g, h] = he(u, !0), p.addEventListener("progress", g)), c && p.upload && ([l, m] = he(c), p.upload.addEventListener("progress", l), p.upload.addEventListener("loadend", m)), (o.cancelToken || o.signal) && (f = (v) => {
1058
+ p && (r(!v || v.type ? new X(null, e, p) : v), p.abort(), p = null);
1059
1059
  }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
1060
1060
  const w = Rr(o.url);
1061
1061
  if (w && F.protocols.indexOf(w) === -1) {
1062
- r(new v("Unsupported protocol " + w + ":", v.ERR_BAD_REQUEST, e));
1062
+ r(new S("Unsupported protocol " + w + ":", S.ERR_BAD_REQUEST, e));
1063
1063
  return;
1064
1064
  }
1065
1065
  p.send(i || null);
@@ -1072,11 +1072,11 @@ const Jt = (e) => {
1072
1072
  if (!o) {
1073
1073
  o = !0, a();
1074
1074
  const f = u instanceof Error ? u : this.reason;
1075
- r.abort(f instanceof v ? f : new X(f instanceof Error ? f.message : f));
1075
+ r.abort(f instanceof S ? f : new X(f instanceof Error ? f.message : f));
1076
1076
  }
1077
1077
  };
1078
1078
  let s = t && setTimeout(() => {
1079
- s = null, i(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
1079
+ s = null, i(new S(`timeout ${t} of ms exceeded`, S.ETIMEDOUT));
1080
1080
  }, t);
1081
1081
  const a = () => {
1082
1082
  e && (s && clearTimeout(s), s = null, e.forEach((u) => {
@@ -1144,7 +1144,7 @@ const Jt = (e) => {
1144
1144
  }, {
1145
1145
  highWaterMark: 2
1146
1146
  });
1147
- }, ve = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Vt = ve && typeof ReadableStream == "function", Lr = ve && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Gt = (e, ...t) => {
1147
+ }, Se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Vt = Se && typeof ReadableStream == "function", Lr = Se && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Gt = (e, ...t) => {
1148
1148
  try {
1149
1149
  return !!e(...t);
1150
1150
  } catch {
@@ -1163,10 +1163,10 @@ const Jt = (e) => {
1163
1163
  }), ut = 64 * 1024, Le = Vt && Gt(() => d.isReadableStream(new Response("").body)), _e = {
1164
1164
  stream: Le && ((e) => e.body)
1165
1165
  };
1166
- ve && ((e) => {
1166
+ Se && ((e) => {
1167
1167
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1168
1168
  !_e[t] && (_e[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1169
- throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
1169
+ throw new S(`Response type '${t}' is not supported`, S.ERR_NOT_SUPPORT, r);
1170
1170
  });
1171
1171
  });
1172
1172
  })(new Response());
@@ -1187,7 +1187,7 @@ const Hr = async (e) => {
1187
1187
  }, jr = async (e, t) => {
1188
1188
  const n = d.toFiniteNumber(e.getContentLength());
1189
1189
  return n ?? Hr(t);
1190
- }, Mr = ve && (async (e) => {
1190
+ }, Mr = Se && (async (e) => {
1191
1191
  let {
1192
1192
  url: t,
1193
1193
  method: n,
@@ -1235,8 +1235,8 @@ const Hr = async (e) => {
1235
1235
  credentials: y ? l : void 0
1236
1236
  });
1237
1237
  let w = await fetch(h, g);
1238
- const S = Le && (u === "stream" || u === "response");
1239
- if (Le && (a || S && b)) {
1238
+ const v = Le && (u === "stream" || u === "response");
1239
+ if (Le && (a || v && b)) {
1240
1240
  const R = {};
1241
1241
  ["status", "statusText", "headers"].forEach((M) => {
1242
1242
  R[M] = w[M];
@@ -1254,7 +1254,7 @@ const Hr = async (e) => {
1254
1254
  }
1255
1255
  u = u || "text";
1256
1256
  let x = await _e[d.findKey(_e, u) || "text"](w, e);
1257
- return !S && b && b(), await new Promise((R, k) => {
1257
+ return !v && b && b(), await new Promise((R, k) => {
1258
1258
  qt(R, k, {
1259
1259
  data: x,
1260
1260
  headers: B.from(w.headers),
@@ -1266,11 +1266,11 @@ const Hr = async (e) => {
1266
1266
  });
1267
1267
  } catch (y) {
1268
1268
  throw b && b(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
1269
- new v("Network Error", v.ERR_NETWORK, e, h),
1269
+ new S("Network Error", S.ERR_NETWORK, e, h),
1270
1270
  {
1271
1271
  cause: y.cause || y
1272
1272
  }
1273
- ) : v.from(y, y && y.code, e, h);
1273
+ ) : S.from(y, y && y.code, e, h);
1274
1274
  }
1275
1275
  }), ze = {
1276
1276
  http: rr,
@@ -1296,7 +1296,7 @@ const ft = (e) => `- ${e}`, $r = (e) => d.isFunction(e) || e === null || e === !
1296
1296
  n = e[i];
1297
1297
  let s;
1298
1298
  if (r = n, !$r(n) && (r = ze[(s = String(n)).toLowerCase()], r === void 0))
1299
- throw new v(`Unknown adapter '${s}'`);
1299
+ throw new S(`Unknown adapter '${s}'`);
1300
1300
  if (r)
1301
1301
  break;
1302
1302
  o[s || "#" + i] = r;
@@ -1308,7 +1308,7 @@ const ft = (e) => `- ${e}`, $r = (e) => d.isFunction(e) || e === null || e === !
1308
1308
  let s = t ? i.length > 1 ? `since :
1309
1309
  ` + i.map(ft).join(`
1310
1310
  `) : " " + ft(i[0]) : "as no adapter specified";
1311
- throw new v(
1311
+ throw new S(
1312
1312
  "There is no suitable adapter to dispatch the request " + s,
1313
1313
  "ERR_NOT_SUPPORT"
1314
1314
  );
@@ -1352,9 +1352,9 @@ Re.transitional = function(t, n, r) {
1352
1352
  }
1353
1353
  return (i, s, a) => {
1354
1354
  if (t === !1)
1355
- throw new v(
1355
+ throw new S(
1356
1356
  o(s, " has been removed" + (n ? " in " + n : "")),
1357
- v.ERR_DEPRECATED
1357
+ S.ERR_DEPRECATED
1358
1358
  );
1359
1359
  return n && !pt[s] && (pt[s] = !0, console.warn(
1360
1360
  o(
@@ -1369,7 +1369,7 @@ Re.spelling = function(t) {
1369
1369
  };
1370
1370
  function qr(e, t, n) {
1371
1371
  if (typeof e != "object")
1372
- throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
1372
+ throw new S("options must be an object", S.ERR_BAD_OPTION_VALUE);
1373
1373
  const r = Object.keys(e);
1374
1374
  let o = r.length;
1375
1375
  for (; o-- > 0; ) {
@@ -1377,11 +1377,11 @@ function qr(e, t, n) {
1377
1377
  if (s) {
1378
1378
  const a = e[i], c = a === void 0 || s(a, i, e);
1379
1379
  if (c !== !0)
1380
- throw new v("option " + i + " must be " + c, v.ERR_BAD_OPTION_VALUE);
1380
+ throw new S("option " + i + " must be " + c, S.ERR_BAD_OPTION_VALUE);
1381
1381
  continue;
1382
1382
  }
1383
1383
  if (n !== !0)
1384
- throw new v("Unknown option " + i, v.ERR_BAD_OPTION);
1384
+ throw new S("Unknown option " + i, S.ERR_BAD_OPTION);
1385
1385
  }
1386
1386
  }
1387
1387
  const fe = {
@@ -1673,8 +1673,8 @@ A.CanceledError = X;
1673
1673
  A.CancelToken = Wr;
1674
1674
  A.isCancel = $t;
1675
1675
  A.VERSION = Xt;
1676
- A.toFormData = Se;
1677
- A.AxiosError = v;
1676
+ A.toFormData = ve;
1677
+ A.AxiosError = S;
1678
1678
  A.Cancel = A.CanceledError;
1679
1679
  A.all = function(t) {
1680
1680
  return Promise.all(t);
@@ -1821,11 +1821,11 @@ function gt(e) {
1821
1821
  };
1822
1822
  }
1823
1823
  function Ze(e, t, n, r, o, i, s, a, c, u) {
1824
- var f, l, g, m, h, b, p, y, w, S, x, R, k, I, j, M, Oe, D = t.type;
1824
+ var f, l, g, m, h, b, p, y, w, v, x, R, k, I, j, M, Oe, D = t.type;
1825
1825
  if (t.constructor != null) return null;
1826
1826
  128 & n.__u && (c = !!(32 & n.__u), i = [a = t.__e = n.__e]), (f = T.__b) && f(t);
1827
1827
  e: if (typeof D == "function") try {
1828
- if (y = t.props, w = "prototype" in D && D.prototype.render, S = (f = D.contextType) && r[f.__c], x = f ? S ? S.props.value : f.__ : r, n.__c ? p = (l = t.__c = n.__c).__ = l.__E : (w ? t.__c = l = new D(y, x) : (t.__c = l = new de(y, x), l.constructor = D, l.render = Qr), S && S.sub(l), l.props = y, l.state || (l.state = {}), l.context = x, l.__n = r, g = l.__d = !0, l.__h = [], l._sb = []), w && l.__s == null && (l.__s = l.state), w && D.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = z({}, l.__s)), z(l.__s, D.getDerivedStateFromProps(y, l.__s))), m = l.props, h = l.state, l.__v = t, g) w && D.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), w && l.componentDidMount != null && l.__h.push(l.componentDidMount);
1828
+ if (y = t.props, w = "prototype" in D && D.prototype.render, v = (f = D.contextType) && r[f.__c], x = f ? v ? v.props.value : f.__ : r, n.__c ? p = (l = t.__c = n.__c).__ = l.__E : (w ? t.__c = l = new D(y, x) : (t.__c = l = new de(y, x), l.constructor = D, l.render = Qr), v && v.sub(l), l.props = y, l.state || (l.state = {}), l.context = x, l.__n = r, g = l.__d = !0, l.__h = [], l._sb = []), w && l.__s == null && (l.__s = l.state), w && D.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = z({}, l.__s)), z(l.__s, D.getDerivedStateFromProps(y, l.__s))), m = l.props, h = l.state, l.__v = t, g) w && D.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), w && l.componentDidMount != null && l.__h.push(l.componentDidMount);
1829
1829
  else {
1830
1830
  if (w && D.getDerivedStateFromProps == null && y !== m && l.componentWillReceiveProps != null && l.componentWillReceiveProps(y, x), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(y, l.__s, x) === !1 || t.__v == n.__v) {
1831
1831
  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(Y) {
@@ -1962,7 +1962,7 @@ function _(e, t, n, r, o, i) {
1962
1962
  if (typeof e == "function" && (s = e.defaultProps)) for (a in s) c[a] === void 0 && (c[a] = s[a]);
1963
1963
  return T.vnode && T.vnode(u), u;
1964
1964
  }
1965
- var oe, C, Ne, bt, ge = 0, pn = [], O = T, yt = O.__b, wt = O.__r, xt = O.diffed, Et = O.__c, St = O.unmount, vt = O.__;
1965
+ var oe, C, Ne, bt, ge = 0, pn = [], O = T, yt = O.__b, wt = O.__r, xt = O.diffed, Et = O.__c, vt = O.unmount, St = O.__;
1966
1966
  function Ye(e, t) {
1967
1967
  O.__h && O.__h(C, e, ge || t), ge = 0;
1968
1968
  var n = C.__H || (C.__H = { __: [], __h: [] });
@@ -2028,7 +2028,7 @@ function no() {
2028
2028
  O.__b = function(e) {
2029
2029
  C = null, yt && yt(e);
2030
2030
  }, O.__ = function(e, t) {
2031
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), vt && vt(e, t);
2031
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), St && St(e, t);
2032
2032
  }, O.__r = function(e) {
2033
2033
  wt && wt(e), oe = 0;
2034
2034
  var t = (C = e.__c).__H;
@@ -2054,7 +2054,7 @@ O.__b = function(e) {
2054
2054
  }
2055
2055
  }), Et && Et(e, t);
2056
2056
  }, O.unmount = function(e) {
2057
- St && St(e);
2057
+ vt && vt(e);
2058
2058
  var t, n = e.__c;
2059
2059
  n && n.__H && (n.__H.__.forEach(function(r) {
2060
2060
  try {
@@ -2223,14 +2223,7 @@ function so() {
2223
2223
  }
2224
2224
  }).then((t) => {
2225
2225
  const n = t.data;
2226
- return sessionStorage.setItem(
2227
- "fund_unit_params",
2228
- JSON.stringify({
2229
- ...e,
2230
- merchant_id: n.merchant_id,
2231
- biz_type: n.biz_type
2232
- })
2233
- ), {
2226
+ return {
2234
2227
  totalAmount: n.total_amount || 0,
2235
2228
  availableAmount: n.available_amount || 0,
2236
2229
  frozenAmount: n.frozen_amount || 0
@@ -2255,7 +2248,8 @@ const ao = async () => Q.get("/all-dicts", {}).then((e) => (sessionStorage.setIt
2255
2248
  ), n = {
2256
2249
  merchant_id: Number(t.merchantId),
2257
2250
  biz_type: t.bizType,
2258
- source_operator: String(t.userId),
2251
+ fund_balance_id: t.fundBalanceId,
2252
+ source_operator: t.userId ? String(t.userId) : void 0,
2259
2253
  transfer_no: e.transferNo,
2260
2254
  transfer_channel: e.transferChannel,
2261
2255
  voucher_urls: e.voucherUrls
@@ -2269,7 +2263,8 @@ const ao = async () => Q.get("/all-dicts", {}).then((e) => (sessionStorage.setIt
2269
2263
  const n = {
2270
2264
  merchant_id: Number(t.merchantId),
2271
2265
  biz_type: t.bizType,
2272
- source_operator: String(t.userId),
2266
+ fund_balance_id: t.fundBalanceId,
2267
+ source_operator: t.userId ? String(t.userId) : void 0,
2273
2268
  amount: e.amount,
2274
2269
  currency: e.currency,
2275
2270
  recharge_channel: e.rechargeChannel,
@@ -2284,26 +2279,29 @@ function Yo(e) {
2284
2279
  merchant_id: t,
2285
2280
  biz_type: n,
2286
2281
  fund_balance_id: r,
2287
- theme: o = H.WHITE,
2288
- locale: i = Ae.ZH
2289
- } = e, s = "Bearer " + e.token;
2282
+ user_id: o,
2283
+ theme: i = H.WHITE,
2284
+ locale: s = Ae.ZH
2285
+ } = e, a = "Bearer " + e.token;
2290
2286
  return sessionStorage.setItem(
2291
2287
  "fund_unit_params",
2292
2288
  JSON.stringify({
2293
2289
  merchantId: t,
2294
2290
  bizType: n,
2295
2291
  fundBalanceId: r,
2296
- token: s,
2297
- theme: o,
2298
- locale: i
2292
+ userId: o,
2293
+ token: a,
2294
+ theme: i,
2295
+ locale: s
2299
2296
  })
2300
2297
  ), ao(), {
2301
- token: s,
2298
+ token: a,
2302
2299
  merchantId: t,
2303
2300
  bizType: n,
2304
2301
  fundBalanceId: r,
2305
- theme: o,
2306
- locale: i
2302
+ userId: o,
2303
+ theme: i,
2304
+ locale: s
2307
2305
  };
2308
2306
  }
2309
2307
  const ei = {
@@ -2503,7 +2501,7 @@ const We = ({
2503
2501
  };
2504
2502
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
2505
2503
  }, [l]);
2506
- const S = n.find((x) => x.value === e);
2504
+ const v = n.find((x) => x.value === e);
2507
2505
  return /* @__PURE__ */ _(
2508
2506
  "div",
2509
2507
  {
@@ -2548,7 +2546,7 @@ const We = ({
2548
2546
  },
2549
2547
  tabIndex: 0,
2550
2548
  children: [
2551
- /* @__PURE__ */ _("span", { style: { flex: 1 }, children: S ? S.label : /* @__PURE__ */ _("span", { style: w.placeholder, children: r || "请选择" }) }),
2549
+ /* @__PURE__ */ _("span", { style: { flex: 1 }, children: v ? v.label : /* @__PURE__ */ _("span", { style: w.placeholder, children: r || "请选择" }) }),
2552
2550
  /* @__PURE__ */ _("span", { style: { marginLeft: 8, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ _(
2553
2551
  "svg",
2554
2552
  {
@@ -2980,7 +2978,7 @@ const We = ({
2980
2978
  );
2981
2979
  if (!w.length) return;
2982
2980
  c(!0);
2983
- const S = [];
2981
+ const v = [];
2984
2982
  for (let x = 0; x < w.length; x++) {
2985
2983
  f(0);
2986
2984
  const R = new FormData();
@@ -2990,13 +2988,13 @@ const We = ({
2990
2988
  R,
2991
2989
  (I) => f(I)
2992
2990
  );
2993
- k && S.push(k);
2991
+ k && v.push(k);
2994
2992
  } catch {
2995
2993
  }
2996
2994
  }
2997
- c(!1), f(0), t?.([...e, ...S]), s.current && (s.current.value = "");
2995
+ c(!1), f(0), t?.([...e, ...v]), s.current && (s.current.value = "");
2998
2996
  }, p = (y) => {
2999
- const w = e.filter((S, x) => x !== y);
2997
+ const w = e.filter((v, x) => x !== y);
3000
2998
  t?.(w);
3001
2999
  };
3002
3000
  return /* @__PURE__ */ _("div", { children: [
@@ -3053,8 +3051,8 @@ const We = ({
3053
3051
  "button",
3054
3052
  {
3055
3053
  type: "button",
3056
- onClick: (S) => {
3057
- S.stopPropagation(), p(w);
3054
+ onClick: (v) => {
3055
+ v.stopPropagation(), p(w);
3058
3056
  },
3059
3057
  style: h.removeBtn,
3060
3058
  disabled: i,
@@ -3272,7 +3270,7 @@ const We = ({
3272
3270
  ] })
3273
3271
  ] });
3274
3272
  };
3275
- function So({ visible: e, onClose: t, onSubmit: n }) {
3273
+ function vo({ visible: e, onClose: t, onSubmit: n }) {
3276
3274
  const [r, o] = N({
3277
3275
  amount: "",
3278
3276
  rechargeChannel: "",
@@ -3513,7 +3511,7 @@ function et() {
3513
3511
  return e;
3514
3512
  }).apply(this, arguments);
3515
3513
  }
3516
- var vo = ["context", "children"];
3514
+ var So = ["context", "children"];
3517
3515
  function Ro(e) {
3518
3516
  this.getChildContext = function() {
3519
3517
  return e.context;
@@ -3523,7 +3521,7 @@ function Ro(e) {
3523
3521
  var i, s, a = {}, c = Object.keys(r);
3524
3522
  for (s = 0; s < c.length; s++) o.indexOf(i = c[s]) >= 0 || (a[i] = r[i]);
3525
3523
  return a;
3526
- }(e, vo);
3524
+ }(e, So);
3527
3525
  return dn(t, n);
3528
3526
  }
3529
3527
  function To() {
@@ -3590,7 +3588,7 @@ function Ao() {
3590
3588
  return /* @__PURE__ */ _("div", { children: [
3591
3589
  /* @__PURE__ */ _(po, { onClick: () => t(!0), children: E("充值/转账") }),
3592
3590
  /* @__PURE__ */ _(
3593
- So,
3591
+ vo,
3594
3592
  {
3595
3593
  visible: e,
3596
3594
  onClose: () => t(!1),
@@ -3655,7 +3653,7 @@ const Oo = ({
3655
3653
  }, y = JSON.parse(
3656
3654
  sessionStorage.getItem("fund_unit_params") || "{}"
3657
3655
  ).theme === H.WHITE, w = b[y ? "white" : "dark"];
3658
- let S = {
3656
+ let v = {
3659
3657
  position: "absolute",
3660
3658
  zIndex: 999,
3661
3659
  borderRadius: 6,
@@ -3673,8 +3671,8 @@ const Oo = ({
3673
3671
  width: 0,
3674
3672
  height: 0
3675
3673
  };
3676
- return u === "top" ? (S = {
3677
- ...S,
3674
+ return u === "top" ? (v = {
3675
+ ...v,
3678
3676
  left: "50%",
3679
3677
  top: -48,
3680
3678
  transform: "translateX(-50%)"
@@ -3686,8 +3684,8 @@ const Oo = ({
3686
3684
  borderLeft: "8px solid transparent",
3687
3685
  borderRight: "8px solid transparent",
3688
3686
  borderTop: `8px solid ${w.arrow.top}`
3689
- }) : u === "bottom" ? (S = {
3690
- ...S,
3687
+ }) : u === "bottom" ? (v = {
3688
+ ...v,
3691
3689
  left: "50%",
3692
3690
  top: "100%",
3693
3691
  marginTop: o,
@@ -3700,8 +3698,8 @@ const Oo = ({
3700
3698
  borderLeft: "8px solid transparent",
3701
3699
  borderRight: "8px solid transparent",
3702
3700
  borderBottom: `8px solid ${w.arrow.bottom}`
3703
- }) : u === "leftTop" ? (S = {
3704
- ...S,
3701
+ }) : u === "leftTop" ? (v = {
3702
+ ...v,
3705
3703
  right: "100%",
3706
3704
  top: 0,
3707
3705
  marginRight: i,
@@ -3713,8 +3711,8 @@ const Oo = ({
3713
3711
  borderTop: "8px solid transparent",
3714
3712
  borderBottom: "8px solid transparent",
3715
3713
  borderLeft: `8px solid ${w.arrow.left}`
3716
- }) : u === "rightTop" && (S = {
3717
- ...S,
3714
+ }) : u === "rightTop" && (v = {
3715
+ ...v,
3718
3716
  left: "100%",
3719
3717
  top: 0,
3720
3718
  marginLeft: i,
@@ -3739,7 +3737,7 @@ const Oo = ({
3739
3737
  a && /* @__PURE__ */ _(
3740
3738
  "div",
3741
3739
  {
3742
- style: S,
3740
+ style: v,
3743
3741
  onMouseEnter: m,
3744
3742
  onMouseLeave: h,
3745
3743
  children: [
@@ -35,6 +35,8 @@ declare global {
35
35
  token: string;
36
36
  merchant_id: string;
37
37
  biz_type: string;
38
+ user_id: string;
39
+ fund_balance_id?: string;
38
40
  locale?: "zh" | "en";
39
41
  }) => void;
40
42
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "best-unit",
3
3
  "private": false,
4
- "version": "0.0.51",
4
+ "version": "0.0.53",
5
5
  "type": "module",
6
6
  "main": "dist/best-unit.cjs",
7
7
  "module": "dist/best-unit.js",
package/src/api/index.ts CHANGED
@@ -15,14 +15,6 @@ export function getBalance() {
15
15
  })
16
16
  .then((res) => {
17
17
  const data = res.data;
18
- sessionStorage.setItem(
19
- "fund_unit_params",
20
- JSON.stringify({
21
- ...fundUnitParams,
22
- merchant_id: data.merchant_id,
23
- biz_type: data.biz_type,
24
- })
25
- );
26
18
  return {
27
19
  totalAmount: data.total_amount || 0,
28
20
  availableAmount: data.available_amount || 0,
@@ -72,7 +64,10 @@ export const createOfflineRecharge = async (data: any) => {
72
64
  const params = {
73
65
  merchant_id: Number(fundUnitParams.merchantId),
74
66
  biz_type: fundUnitParams.bizType,
75
- source_operator: String(fundUnitParams.userId),
67
+ fund_balance_id: fundUnitParams.fundBalanceId,
68
+ source_operator: fundUnitParams.userId
69
+ ? String(fundUnitParams.userId)
70
+ : undefined,
76
71
  transfer_no: data.transferNo,
77
72
  transfer_channel: data.transferChannel,
78
73
  voucher_urls: data.voucherUrls,
@@ -91,7 +86,10 @@ export const createOnlineRecharge = async (data: any) => {
91
86
  const params = {
92
87
  merchant_id: Number(fundUnitParams.merchantId),
93
88
  biz_type: fundUnitParams.bizType,
94
- source_operator: String(fundUnitParams.userId),
89
+ fund_balance_id: fundUnitParams.fundBalanceId,
90
+ source_operator: fundUnitParams.userId
91
+ ? String(fundUnitParams.userId)
92
+ : undefined,
95
93
  amount: data.amount,
96
94
  currency: data.currency,
97
95
  recharge_channel: data.rechargeChannel,
package/src/demo/App.tsx CHANGED
@@ -25,8 +25,10 @@ export default function DemoApp() {
25
25
  console.log("========================");
26
26
 
27
27
  initFundUnit({
28
- token: testToken,
29
- fund_balance_id: "123",
28
+ token:
29
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjaGFudF9pZCI6MTAwMiwidGltZXN0YW1wIjoxNzUzNDMwNjkyLCJleHAiOjE3NTM0MzQyOTJ9.OPYKUxLQ3C36rKiAmCnUwxTkvM9eKgtsnoxrB9Ntrag",
30
+ fund_balance_id: "FB1FNZ5Q55M7QP2C",
31
+ user_id: "19b8a77c-d3fc-45da-9520-4a07463123df",
30
32
  locale: locale as Locale,
31
33
  theme: theme ?? Theme.WHITE,
32
34
  });
@@ -35,6 +35,8 @@ declare global {
35
35
  token: string;
36
36
  merchant_id: string;
37
37
  biz_type: string;
38
+ user_id: string;
39
+ fund_balance_id?: string;
38
40
  locale?: "zh" | "en";
39
41
  }) => void;
40
42
  };
@@ -6,6 +6,7 @@ export function initFundUnit(params: {
6
6
  merchant_id?: string;
7
7
  biz_type?: string;
8
8
  fund_balance_id?: string;
9
+ user_id?: string;
9
10
  theme?: Theme;
10
11
  locale?: Locale;
11
12
  }) {
@@ -13,6 +14,7 @@ export function initFundUnit(params: {
13
14
  merchant_id,
14
15
  biz_type,
15
16
  fund_balance_id,
17
+ user_id,
16
18
  theme = Theme.WHITE,
17
19
  locale = Locale.ZH,
18
20
  } = params;
@@ -23,6 +25,7 @@ export function initFundUnit(params: {
23
25
  merchantId: merchant_id,
24
26
  bizType: biz_type,
25
27
  fundBalanceId: fund_balance_id,
28
+ userId: user_id,
26
29
  token,
27
30
  theme,
28
31
  locale,
@@ -34,6 +37,7 @@ export function initFundUnit(params: {
34
37
  merchantId: merchant_id,
35
38
  bizType: biz_type,
36
39
  fundBalanceId: fund_balance_id,
40
+ userId: user_id,
37
41
  theme,
38
42
  locale,
39
43
  };