best-unit 2.1.9 → 2.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/best-unit.cjs +14 -14
- package/dist/best-unit.js +854 -834
- package/package.json +1 -1
- package/src/components/business/payment-sdk/offline-payment/fund-allocation.tsx +50 -11
- package/src/demo/App.tsx +2 -1
- package/src/local/en.ts +1 -0
- package/src/local/zh.ts +1 -0
package/dist/best-unit.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ye,I,Qt,Q,Lt,en,tn,nn,at,Ke,Xe,me={},rn=[],rr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,De=Array.isArray;function K(e,t){for(var n in t)e[n]=t[n];return e}function st(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ye.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return he(e,i,r,o,null)}function he(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Qt,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(a),a}function Z(e){return e.children}function ke(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(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"?ae(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 wt(e){(!e.__d&&(e.__d=!0)&&Q.push(e)&&!Me.__r++||Lt!=I.debounceRendering)&&((Lt=I.debounceRendering)||en)(Me)}function Me(){for(var e,t,n,r,o,a,i,s=1;Q.length;)Q.length>s&&Q.sort(tn),e=Q.shift(),s=Q.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=K({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),lt(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,ln(a,n,i),n.__e!=o&&on(n)));Me.__r=0}function an(e,t,n,r,o,a,i,s,f,d,p){var u,y,b,h,x,m,L=r&&r.__k||rn,S=t.length;for(f=or(n,t,L,f,S),u=0;u<S;u++)(b=n.__k[u])!=null&&(y=b.__i==-1?me:L[b.__i]||me,b.__i=u,m=lt(e,b,y,o,a,i,s,f,d,p),h=b.__e,b.ref&&y.ref!=b.ref&&(y.ref&&ct(y.ref,null,b),p.push(b.ref,b.__c||h,b)),x==null&&h!=null&&(x=h),4&b.__u||y.__k===b.__k?f=sn(b,f,e):typeof b.type=="function"&&m!==void 0?f=m:h&&(f=h.nextSibling),b.__u&=-7);return n.__e=x,f}function or(e,t,n,r,o){var a,i,s,f,d,p=n.length,u=p,y=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(f=a+y,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?he(null,i,null,null,null):De(i)?he(Z,{children:i},null,null,null):i.constructor==null&&i.__b>0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(d=i.__i=ir(i,n,f,u))!=-1&&(u--,(s=n[d])&&(s.__u|=2)),s==null||s.__v==null?(d==-1&&(o>p?y--:o<p&&y++),typeof i.type!="function"&&(i.__u|=4)):d!=f&&(d==f-1?y--:d==f+1?y++:(d>f?y--:y++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<p;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),dn(s,s));return r}function sn(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=sn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ir(e,t,n,r){var o,a,i=e.key,s=e.type,f=t[n];if(f===null&&e.key==null||f&&i==f.key&&s==f.type&&(2&f.__u)==0)return n;if(r>(f!=null&&(2&f.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((f=t[o])&&(2&f.__u)==0&&i==f.key&&s==f.type)return o;o--}if(a<t.length){if((f=t[a])&&(2&f.__u)==0&&i==f.key&&s==f.type)return a;a++}}return-1}function At(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rr.test(t)?n:n+"px"}function we(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||At(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||At(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(nn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=at,e.addEventListener(t,a?Xe:Ke,a)):e.removeEventListener(t,a?Xe:Ke,a);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function kt(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=at++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function lt(e,t,n,r,o,a,i,s,f,d){var p,u,y,b,h,x,m,L,S,k,E,A,v,P,w,F,U,W=t.type;if(t.constructor!=null)return null;128&n.__u&&(f=!!(32&n.__u),a=[s=t.__e=n.__e]),(p=I.__b)&&p(t);e:if(typeof W=="function")try{if(L=t.props,S="prototype"in W&&W.prototype.render,k=(p=W.contextType)&&r[p.__c],E=p?k?k.props.value:p.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:(S?t.__c=u=new W(L,E):(t.__c=u=new ke(L,E),u.constructor=W,u.render=sr),k&&k.sub(u),u.props=L,u.state||(u.state={}),u.context=E,u.__n=r,y=u.__d=!0,u.__h=[],u._sb=[]),S&&u.__s==null&&(u.__s=u.state),S&&W.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=K({},u.__s)),K(u.__s,W.getDerivedStateFromProps(L,u.__s))),b=u.props,h=u.state,u.__v=t,y)S&&W.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&W.getDerivedStateFromProps==null&&L!==b&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(L,E),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(L,u.__s,E)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=L,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(V){V&&(V.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(L,u.__s,E),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(b,h,x)})}if(u.context=E,u.props=L,u.__P=e,u.__e=!1,v=I.__r,P=0,S){for(u.state=u.__s,u.__d=!1,v&&v(t),p=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do u.__d=!1,v&&v(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++P<25);u.state=u.__s,u.getChildContext!=null&&(r=K(K({},r),u.getChildContext())),S&&!y&&u.getSnapshotBeforeUpdate!=null&&(x=u.getSnapshotBeforeUpdate(b,h)),F=p,p!=null&&p.type===Z&&p.key==null&&(F=cn(p.props.children)),s=an(e,De(F)?F:[F],t,n,r,o,a,i,s,f,d),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),m&&(u.__E=u.__=null)}catch(V){if(t.__v=null,f||a!=null)if(V.then){for(t.__u|=f?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(U=a.length;U--;)st(a[U]);else t.__e=n.__e,t.__k=n.__k;I.__e(V,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=ar(n.__e,t,n,r,o,a,i,f,d);return(p=I.diffed)&&p(t),128&t.__u?void 0:s}function ln(e,t,n){for(var r=0;r<n.length;r++)ct(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){I.__e(a,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:De(e)?e.map(cn):K({},e)}function ar(e,t,n,r,o,a,i,s,f){var d,p,u,y,b,h,x,m=n.props,L=t.props,S=t.type;if(S=="svg"?o="http://www.w3.org/2000/svg":S=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(d=0;d<a.length;d++)if((b=a[d])&&"setAttribute"in b==!!S&&(S?b.localName==S:b.nodeType==3)){e=b,a[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(L);e=document.createElementNS(o,S,L.is&&L),s&&(I.__m&&I.__m(t,a),s=!1),a=null}if(S==null)m===L||s&&e.data==L||(e.data=L);else{if(a=a&&ye.call(e.childNodes),m=n.props||me,!s&&a!=null)for(m={},d=0;d<e.attributes.length;d++)m[(b=e.attributes[d]).name]=b.value;for(d in m)if(b=m[d],d!="children"){if(d=="dangerouslySetInnerHTML")u=b;else if(!(d in L)){if(d=="value"&&"defaultValue"in L||d=="checked"&&"defaultChecked"in L)continue;we(e,d,null,b,o)}}for(d in L)b=L[d],d=="children"?y=b:d=="dangerouslySetInnerHTML"?p=b:d=="value"?h=b:d=="checked"?x=b:s&&typeof b!="function"||m[d]===b||we(e,d,b,m[d],o);if(p)s||u&&(p.__html==u.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),an(t.type=="template"?e.content:e,De(y)?y:[y],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,f),a!=null)for(d=a.length;d--;)st(a[d]);s||(d="value",S=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[d]||S=="progress"&&!h||S=="option"&&h!=m[d])&&we(e,d,h,m[d],o),d="checked",x!=null&&x!=e[d]&&we(e,d,x,m[d],o))}return e}function ct(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){I.__e(o,n)}}function dn(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ct(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){I.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&dn(r[o],t,n||typeof e.type!="function");n||st(e.__e),e.__c=e.__=e.__e=void 0}function sr(e,t,n){return this.constructor(e,n)}function Oe(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],lt(t,e=(!r&&n||t).__k=ie(Z,null,[e]),o||me,me,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ye.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),ln(a,e,i)}function un(e,t){Oe(e,t,un)}function fn(e,t,n){var r,o,a,i,s=K({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),he(e.type,s,r||e.key,o||e.ref,null)}ye=rn.slice,I={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Qt=0,ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),wt(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),wt(this))},ke.prototype.render=Z,Q=[],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,at=0,Ke=kt(!1),Xe=kt(!0);var lr=0;function c(e,t,n,r,o,a){t||(t={});var i,s,f=t;if("ref"in f)for(s in f={},t)s=="ref"?i=t[s]:f[s]=t[s];var d={type:e,props:f,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--lr,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)f[s]===void 0&&(f[s]=i[s]);return I.vnode&&I.vnode(d),d}var ge,z,Je,Et,Re=0,pn=[],O=I,vt=O.__b,Ct=O.__r,Bt=O.diffed,Tt=O.__c,Mt=O.unmount,Rt=O.__;function dt(e,t){O.__h&&O.__h(z,e,Re||t),Re=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function R(e){return Re=1,cr(mn,e)}function cr(e,t,n){var r=dt(ge++,2);if(r.t=e,!r.__c&&(r.__=[mn(void 0,t),function(s){var f=r.__N?r.__N[0]:r.__[0],d=r.t(f,s);f!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.__f)){var o=function(s,f,d){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(y){return!!y.__c});if(p.every(function(y){return!y.__N}))return!a||a.call(this,s,f,d);var u=r.__c.props!==s;return p.forEach(function(y){if(y.__N){var b=y.__[0];y.__=y.__N,y.__N=void 0,b!==y.__[0]&&(u=!0)}}),a&&a.call(this,s,f,d)||u};z.__f=!0;var a=z.shouldComponentUpdate,i=z.componentWillUpdate;z.componentWillUpdate=function(s,f,d){if(this.__e){var p=a;a=void 0,o(s,f,d),a=p}i&&i.call(this,s,f,d)},z.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=dt(ge++,3);!O.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,z.__H.__h.push(n))}function se(e){return Re=5,dr(function(){return{current:e}},[])}function dr(e,t){var n=dt(ge++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ur(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ee),e.__H.__h.forEach(Ze),e.__H.__h=[]}catch(t){e.__H.__h=[],O.__e(t,e.__v)}}O.__b=function(e){z=null,vt&&vt(e)},O.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rt&&Rt(e,t)},O.__r=function(e){Ct&&Ct(e),ge=0;var t=(z=e.__c).__H;t&&(Je===z?(t.__h=[],z.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Ee),t.__h.forEach(Ze),t.__h=[],ge=0)),Je=z},O.diffed=function(e){Bt&&Bt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&Et===O.requestAnimationFrame||((Et=O.requestAnimationFrame)||fr)(ur)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Je=z=null},O.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ee),n.__h=n.__h.filter(function(r){return!r.__||Ze(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],O.__e(r,n.__v)}}),Tt&&Tt(e,t)},O.unmount=function(e){Mt&&Mt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ee(r)}catch(o){t=o}}),n.__H=void 0,t&&O.__e(t,n.__v))};var Ft=typeof requestAnimationFrame=="function";function fr(e){var t,n=function(){clearTimeout(r),Ft&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ft&&(t=requestAnimationFrame(n))}function Ee(e){var t=z,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),z=t}function Ze(e){var t=z;e.__c=e.__(),z=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}var xe=(e=>(e.ZH="zh",e.EN="en",e))(xe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function gn(e,t){return function(){return e.apply(t,arguments)}}const{toString:pr}=Object.prototype,{getPrototypeOf:ut}=Object,{iterator:Pe,toStringTag:bn}=Symbol,Ne=(e=>t=>{const n=pr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ue=e=>t=>typeof t===e,{isArray:le}=Array,be=Ue("undefined");function hr(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yn=Y("ArrayBuffer");function mr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yn(e.buffer),t}const gr=Ue("string"),q=Ue("function"),xn=Ue("number"),We=e=>e!==null&&typeof e=="object",br=e=>e===!0||e===!1,ve=e=>{if(Ne(e)!=="object")return!1;const t=ut(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bn in e)&&!(Pe in e)},yr=Y("Date"),xr=Y("File"),_r=Y("Blob"),Sr=Y("FileList"),Lr=e=>We(e)&&q(e.pipe),wr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Ar=Y("URLSearchParams"),[kr,Er,vr,Cr]=["ReadableStream","Request","Response","Headers"].map(Y),Br=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),le(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function _n(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 ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sn=e=>!be(e)&&e!==ee;function Qe(){const{caseless:e}=Sn(this)&&this||{},t={},n=(r,o)=>{const a=e&&_n(t,o)||o;ve(t[a])&&ve(r)?t[a]=Qe(t[a],r):ve(r)?t[a]=Qe({},r):le(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&_e(arguments[r],n);return t}const Tr=(e,t,n,{allOwnKeys:r}={})=>(_e(t,(o,a)=>{n&&q(o)?e[a]=gn(o,n):e[a]=o},{allOwnKeys:r}),e),Mr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rr=(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)},Fr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ut(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ir=(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},zr=e=>{if(!e)return null;if(le(e))return e;let t=e.length;if(!xn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ut(Uint8Array)),Or=(e,t)=>{const r=(e&&e[Pe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Pr=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nr=Y("HTMLFormElement"),Ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),It=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Wr=Y("RegExp"),Ln=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_e(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},$r=e=>{Ln(e,(t,n)=>{if(q(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(q(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+"'")})}})},Hr=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return le(e)?r(e):r(String(e).split(t)),n},jr=()=>{},qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Jr(e){return!!(e&&q(e.append)&&e[bn]==="FormData"&&e[Pe])}const Vr=e=>{const t=new Array(10),n=(r,o)=>{if(We(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=le(r)?[]:{};return _e(r,(i,s)=>{const f=n(i,o+1);!be(f)&&(a[s]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Yr=Y("AsyncFunction"),Gr=e=>e&&(We(e)||q(e))&&q(e.then)&&q(e.catch),wn=((e,t)=>e?setImmediate:t?((n,r)=>(ee.addEventListener("message",({source:o,data:a})=>{o===ee&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ee.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(ee.postMessage)),Kr=typeof queueMicrotask<"u"?queueMicrotask.bind(ee):typeof process<"u"&&process.nextTick||wn,Xr=e=>e!=null&&q(e[Pe]),g={isArray:le,isArrayBuffer:yn,isBuffer:hr,isFormData:wr,isArrayBufferView:mr,isString:gr,isNumber:xn,isBoolean:br,isObject:We,isPlainObject:ve,isReadableStream:kr,isRequest:Er,isResponse:vr,isHeaders:Cr,isUndefined:be,isDate:yr,isFile:xr,isBlob:_r,isRegExp:Wr,isFunction:q,isStream:Lr,isURLSearchParams:Ar,isTypedArray:Dr,isFileList:Sr,forEach:_e,merge:Qe,extend:Tr,trim:Br,stripBOM:Mr,inherits:Rr,toFlatObject:Fr,kindOf:Ne,kindOfTest:Y,endsWith:Ir,toArray:zr,forEachEntry:Or,matchAll:Pr,isHTMLForm:Nr,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:Ln,freezeMethods:$r,toObjectSet:Hr,toCamelCase:Ur,noop:jr,toFiniteNumber:qr,findKey:_n,global:ee,isContextDefined:Sn,isSpecCompliantForm:Jr,toJSONObject:Vr,isAsyncFn:Yr,isThenable:Gr,setImmediate:wn,asap:Kr,isIterable:Xr};function T(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)}g.inherits(T,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:g.toJSONObject(this.config),code:this.code,status:this.status}}});const An=T.prototype,kn={};["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=>{kn[e]={value:e}});Object.defineProperties(T,kn);Object.defineProperty(An,"isAxiosError",{value:!0});T.from=(e,t,n,r,o,a)=>{const i=Object.create(An);return g.toFlatObject(e,i,function(f){return f!==Error.prototype},s=>s!=="isAxiosError"),T.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Zr=null;function et(e){return g.isPlainObject(e)||g.isArray(e)}function En(e){return g.endsWith(e,"[]")?e.slice(0,-2):e}function zt(e,t,n){return e?e.concat(t).map(function(o,a){return o=En(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Qr(e){return g.isArray(e)&&!e.some(et)}const eo=g.toFlatObject(g,{},null,function(t){return/^is[A-Z]/.test(t)});function $e(e,t,n){if(!g.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=g.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,m){return!g.isUndefined(m[x])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(t);if(!g.isFunction(o))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(g.isDate(h))return h.toISOString();if(g.isBoolean(h))return h.toString();if(!f&&g.isBlob(h))throw new T("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(h)||g.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function p(h,x,m){let L=h;if(h&&!m&&typeof h=="object"){if(g.endsWith(x,"{}"))x=r?x:x.slice(0,-2),h=JSON.stringify(h);else if(g.isArray(h)&&Qr(h)||(g.isFileList(h)||g.endsWith(x,"[]"))&&(L=g.toArray(h)))return x=En(x),L.forEach(function(k,E){!(g.isUndefined(k)||k===null)&&t.append(i===!0?zt([x],E,a):i===null?x:x+"[]",d(k))}),!1}return et(h)?!0:(t.append(zt(m,x,a),d(h)),!1)}const u=[],y=Object.assign(eo,{defaultVisitor:p,convertValue:d,isVisitable:et});function b(h,x){if(!g.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(h),g.forEach(h,function(L,S){(!(g.isUndefined(L)||L===null)&&o.call(t,L,g.isString(S)?S.trim():S,x,y))===!0&&b(L,x?x.concat(S):[S])}),u.pop()}}if(!g.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Dt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ft(e,t){this._pairs=[],e&&$e(e,this,t)}const vn=ft.prototype;vn.append=function(t,n){this._pairs.push([t,n])};vn.toString=function(t){const n=t?function(r){return t.call(this,r,Dt)}:Dt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function to(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||to;g.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=g.isURLSearchParams(t)?t.toString():new ft(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}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){g.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Bn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},no=typeof URLSearchParams<"u"?URLSearchParams:ft,ro=typeof FormData<"u"?FormData:null,oo=typeof Blob<"u"?Blob:null,io={isBrowser:!0,classes:{URLSearchParams:no,FormData:ro,Blob:oo},protocols:["http","https","file","blob","url","data"]},pt=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,ao=pt&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),so=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lo=pt&&window.location.href||"http://localhost",co=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pt,hasStandardBrowserEnv:ao,hasStandardBrowserWebWorkerEnv:so,navigator:tt,origin:lo},Symbol.toStringTag,{value:"Module"})),$={...co,...io};function uo(e,t){return $e(e,new $.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return $.isNode&&g.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function fo(e){return g.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function po(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Tn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),f=a>=n.length;return i=!i&&g.isArray(o)?o.length:i,f?(g.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!g.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&g.isArray(o[i])&&(o[i]=po(o[i])),!s)}if(g.isFormData(e)&&g.isFunction(e.entries)){const n={};return g.forEachEntry(e,(r,o)=>{t(fo(r),o,n,0)}),n}return null}function ho(e,t,n){if(g.isString(e))try{return(t||JSON.parse)(e),g.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Se={transitional:Bn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=g.isObject(t);if(a&&g.isHTMLForm(t)&&(t=new FormData(t)),g.isFormData(t))return o?JSON.stringify(Tn(t)):t;if(g.isArrayBuffer(t)||g.isBuffer(t)||g.isStream(t)||g.isFile(t)||g.isBlob(t)||g.isReadableStream(t))return t;if(g.isArrayBufferView(t))return t.buffer;if(g.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return uo(t,this.formSerializer).toString();if((s=g.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return $e(s?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),ho(t)):t}],transformResponse:[function(t){const n=this.transitional||Se.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(g.isResponse(t)||g.isReadableStream(t))return t;if(t&&g.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?T.from(s,T.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],e=>{Se.headers[e]={}});const mo=g.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"]),go=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&mo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},
|
|
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[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=pe(i);r[s]||(_o(o,i),r[s]=!0)}return g.isArray(t)?t.forEach(a):a(t),this}};J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});g.freezeMethods(J);function Ye(e,t){const n=this||Se,r=t||n,o=J.from(r.headers);let a=r.data;return g.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Mn(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){T.call(this,e??"canceled",T.ERR_CANCELED,t,n),this.name="CanceledError"}g.inherits(ce,T,{__CANCEL__:!0});function Rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function So(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),p=r[a];i||(i=d),n[o]=f,r[o]=d;let u=a,y=0;for(;u!==o;)y+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const b=p&&d-p;return b?Math.round(y*1e3/b):void 0}}function wo(e,t){let n=0,r=1e3/t,o,a;const i=(d,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),u=p-n;u>=r?i(d,p):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Fe=(e,t,n=3)=>{let r=0;const o=Lo(50,250);return wo(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,f=i-r,d=o(f),p=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:f,rate:d||void 0,estimated:d&&s&&p?(s-i)/d:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},Nt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ut=e=>(...t)=>g.asap(()=>e(...t)),Ao=$.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0,ko=$.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];g.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),g.isString(r)&&i.push("path="+r),g.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Eo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fn(e,t,n){let r=!Eo(t);return e&&(r||n==!1)?vo(e,t):t}const Wt=e=>e instanceof J?{...e}:e;function ne(e,t){t=t||{};const n={};function r(d,p,u,y){return g.isPlainObject(d)&&g.isPlainObject(p)?g.merge.call({caseless:y},d,p):g.isPlainObject(p)?g.merge({},p):g.isArray(p)?p.slice():p}function o(d,p,u,y){if(g.isUndefined(p)){if(!g.isUndefined(d))return r(void 0,d,u,y)}else return r(d,p,u,y)}function a(d,p){if(!g.isUndefined(p))return r(void 0,p)}function i(d,p){if(g.isUndefined(p)){if(!g.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function s(d,p,u){if(u in t)return r(d,p);if(u in e)return r(void 0,d)}const f={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(d,p,u)=>o(Wt(d),Wt(p),u,!0)};return g.forEach(Object.keys(Object.assign({},e,t)),function(p){const u=f[p]||o,y=u(e[p],t[p],p);g.isUndefined(y)&&u!==s||(n[p]=y)}),n}const In=e=>{const t=ne({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=J.from(i),t.url=Cn(Fn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let f;if(g.isFormData(n)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...p]=f?f.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...p].join("; "))}}if($.hasStandardBrowserEnv&&(r&&g.isFunction(r)&&(r=r(t)),r||r!==!1&&Ao(t.url))){const d=o&&a&&ko.read(a);d&&i.set(o,d)}return t},Co=typeof XMLHttpRequest<"u",Bo=Co&&function(e){return new Promise(function(n,r){const o=In(e);let a=o.data;const i=J.from(o.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=o,p,u,y,b,h;function x(){b&&b(),h&&h(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function L(){if(!m)return;const k=J.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:k,config:e,request:m};Rn(function(P){n(P),x()},function(P){r(P),x()},A),m=null}"onloadend"in m?m.onloadend=L:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(L)},m.onabort=function(){m&&(r(new T("Request aborted",T.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new T("Network Error",T.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||Bn;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new T(E,A.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,e,m)),m=null},a===void 0&&i.setContentType(null),"setRequestHeader"in m&&g.forEach(i.toJSON(),function(E,A){m.setRequestHeader(A,E)}),g.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),s&&s!=="json"&&(m.responseType=o.responseType),d&&([y,h]=Fe(d,!0),m.addEventListener("progress",y)),f&&m.upload&&([u,b]=Fe(f),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=k=>{m&&(r(!k||k.type?new ce(null,e,m):k),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const S=So(o.url);if(S&&$.protocols.indexOf(S)===-1){r(new T("Unsupported protocol "+S+":",T.ERR_BAD_REQUEST,e));return}m.send(a||null)})},To=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,s();const p=d instanceof Error?d:this.reason;r.abort(p instanceof T?p:new ce(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,a(new T(`timeout ${t} of ms exceeded`,T.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>g.asap(s),f}},Mo=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},Ro=async function*(e,t){for await(const n of Fo(e))yield*Mo(n,t)},Fo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},$t=(e,t,n,r)=>{const o=Ro(e,t);let a=0,i,s=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:p}=await o.next();if(d){s(),f.close();return}let u=p.byteLength;if(n){let y=a+=u;n(y)}f.enqueue(new Uint8Array(p))}catch(d){throw s(d),d}},cancel(f){return s(f),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zn=He&&typeof ReadableStream=="function",Io=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zo=zn&&Dn(()=>{let e=!1;const t=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ht=64*1024,nt=zn&&Dn(()=>g.isReadableStream(new Response("").body)),Ie={stream:nt&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ie[t]&&(Ie[t]=g.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new T(`Response type '${t}' is not supported`,T.ERR_NOT_SUPPORT,r)})})})(new Response);const Do=async e=>{if(e==null)return 0;if(g.isBlob(e))return e.size;if(g.isSpecCompliantForm(e))return(await new Request($.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(g.isArrayBufferView(e)||g.isArrayBuffer(e))return e.byteLength;if(g.isURLSearchParams(e)&&(e=e+""),g.isString(e))return(await Io(e)).byteLength},Oo=async(e,t)=>{const n=g.toFiniteNumber(e.getContentLength());return n??Do(t)},Po=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:f,responseType:d,headers:p,withCredentials:u="same-origin",fetchOptions:y}=In(e);d=d?(d+"").toLowerCase():"text";let b=To([o,a&&a.toAbortSignal()],i),h;const x=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let m;try{if(f&&zo&&n!=="get"&&n!=="head"&&(m=await Oo(p,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),v;if(g.isFormData(r)&&(v=A.headers.get("content-type"))&&p.setContentType(v),A.body){const[P,w]=Nt(m,Fe(Ut(f)));r=$t(A.body,Ht,P,w)}}g.isString(u)||(u=u?"include":"omit");const L="credentials"in Request.prototype;h=new Request(t,{...y,signal:b,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:L?u:void 0});let S=await fetch(h,y);const k=nt&&(d==="stream"||d==="response");if(nt&&(s||k&&x)){const A={};["status","statusText","headers"].forEach(F=>{A[F]=S[F]});const v=g.toFiniteNumber(S.headers.get("content-length")),[P,w]=s&&Nt(v,Fe(Ut(s),!0))||[];S=new Response($t(S.body,Ht,P,()=>{w&&w(),x&&x()}),A)}d=d||"text";let E=await Ie[g.findKey(Ie,d)||"text"](S,e);return!k&&x&&x(),await new Promise((A,v)=>{Rn(A,v,{data:E,headers:J.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:h})})}catch(L){throw x&&x(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,e,h),{cause:L.cause||L}):T.from(L,L&&L.code,e,h)}}),rt={http:Zr,xhr:Bo,fetch:Po};g.forEach(rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jt=e=>`- ${e}`,No=e=>g.isFunction(e)||e===null||e===!1,On={getAdapter:e=>{e=g.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!No(n)&&(r=rt[(i=String(n)).toLowerCase()],r===void 0))throw new T(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
-
`+a.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ne(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Be.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(g.isFunction(o)?n.paramsSerializer={serialize:o}:Be.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&g.merge(a.common,a[n.method]);a&&g.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=J.concat(i,a);const s=[];let f=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(f=f&&x.synchronous,s.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let p,u=0,y;if(!f){const h=[qt.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,d),y=h.length,p=Promise.resolve(n);u<y;)p=p.then(h[u++],h[u++]);return p}y=s.length;let b=n;for(u=0;u<y;){const h=s[u++],x=s[u++];try{b=h(b)}catch(m){x.call(this,m);break}}try{p=qt.call(this,b)}catch(h){return Promise.reject(h)}for(u=0,y=d.length;u<y;)p=p.then(d[u++],d[u++]);return p}getUri(t){t=ne(this.defaults,t);const n=Fn(t.baseURL,t.url,t.allowAbsoluteUrls);return Cn(n,t.params,t.paramsSerializer)}};g.forEach(["delete","get","head","options"],function(t){te.prototype[t]=function(n,r){return this.request(ne(r||{},{method:t,url:n,data:(r||{}).data}))}});g.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(ne(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}te.prototype[t]=n(),te.prototype[t+"Form"]=n(!0)});let Wo=class Nn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new ce(a,i,s),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 Nn(function(o){t=o}),cancel:t}}};function $o(e){return function(n){return e.apply(null,n)}}function Ho(e){return g.isObject(e)&&e.isAxiosError===!0}const ot={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(ot).forEach(([e,t])=>{ot[t]=e});function Un(e){const t=new te(e),n=gn(te.prototype.request,t);return g.extend(n,te.prototype,t,{allOwnKeys:!0}),g.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Un(ne(e,o))},n}const D=Un(Se);D.Axios=te;D.CanceledError=ce;D.CancelToken=Wo;D.isCancel=Mn;D.VERSION=Pn;D.toFormData=$e;D.AxiosError=T;D.Cancel=D.CanceledError;D.all=function(t){return Promise.all(t)};D.spread=$o;D.isAxiosError=Ho;D.mergeConfig=ne;D.AxiosHeaders=J;D.formToJSON=e=>Tn(g.isHTMLForm(e)?new FormData(e):e);D.getAdapter=On.getAdapter;D.HttpStatusCode=ot;D.default=D;const{Axios:pa,AxiosError:ha,CanceledError:ma,isCancel:ga,CancelToken:ba,VERSION:ya,all:xa,Cancel:_a,isAxiosError:Sa,spread:La,toFormData:wa,AxiosHeaders:Aa,HttpStatusCode:ka,formToJSON:Ea,getAdapter:va,mergeConfig:Ca}=D;function jo(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=D.create({baseURL:o,timeout:a});return s.interceptors.request.use(f=>{const{token:d,locale:p}=t;return f.headers={...f.headers,Authorization:d,"x-locale":p===xe.ZH?"zh-CN":"en-US"},f}),s.interceptors.response.use(f=>{if(f.data&&f.data.code===0)return f.data;const d=f.data?.msg||f.data?.message||"未知错误";return ze.error(d),i&&i(d,f),Promise.reject(f.data||{message:"未知错误"})},f=>{const d=f.response?.data?.msg||f.response?.data?.message||f.message||"网络请求失败";return ze.error(d),i&&i(d,f),Promise.reject(f)}),s}let Te=null;function X(){return Te||(Te=jo()),Te}function qo(){Te=null}async function Wn(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n=(await X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}})).data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at,merchantBalances:(Array.isArray(n.merchant_balances)?n.merchant_balances:[]).map(o=>({fundBalanceId:o.fund_balance_id,merchantId:o.merchant_id,bizType:o.biz_type}))};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r}const Jo=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Vo=async()=>{const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/currency",{params:{biz_type:e.bizType}}).then(t=>t.data.currency.map(n=>({value:n.value,label:n.label}))||[])},Yo=async(e,t)=>X().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||""),$n=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_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,submit_amount:e.submitAmount,submit_currency:e.submitCurrency,voucher_urls:e.voucherUrls,use_fund_allocation:!!e.useFundAllocation,allocation_ratios:e.useFundAllocation?(e.allocationRatios||[]).map(r=>({fund_balance_id:r.fundBalanceId,biz_type:r.bizType,ratio:String(r.ratio)})):[],metadata:t.bizType==="ad"?{transaction_reason:"OfflineRecharge"}:void 0};return X().post("/offline/recharge/create",n,{})},Hn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href,metadata:t.bizType==="ad"?{transaction_reason:"OnlineRecharge"}:void 0};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},jn=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),qn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},Go=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))},Ko=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().post("/business_exchange_rate/calculate",{fund_balance_id:t.fundBalanceId,merchant_id:t.merchantId,biz_type:t.bizType,amount:e.amount,payment_currency:e.currency}).then(n=>({amount:n.data.amount,exchangeRate:n.data.exchange_rate,currency:n.data.currency,consistent:n.data.consistent}))};async function Jn(){return await Wn()}function Xo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=N.WHITE,locale:i=xe.ZH,env:s,size:f,theme_config:d}=e;console.log(e,"InitParams1111");const p="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:p,theme:a,locale:i,env:s,size:f,themeConfig:d})),qo(),Jo(),{token:p,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:f}}function B(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function Vn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Vt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Zo(){return B("theme")===N.WHITE?Vt.white:Vt.dark}class Qo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Zo(),s=document.createElement("div");if(s.style.cssText=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ye,I,Qt,Q,wt,en,tn,nn,st,Ke,Xe,me={},rn=[],rr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,De=Array.isArray;function K(e,t){for(var n in t)e[n]=t[n];return e}function lt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ie(e,t,n){var r,o,a,i={};for(a in t)a=="key"?r=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ye.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return he(e,i,r,o,null)}function he(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Qt,__i:-1,__u:0};return o==null&&I.vnode!=null&&I.vnode(a),a}function Z(e){return e.children}function ke(e,t){this.props=e,this.context=t}function ae(e,t){if(t==null)return e.__?ae(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"?ae(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 At(e){(!e.__d&&(e.__d=!0)&&Q.push(e)&&!Me.__r++||wt!=I.debounceRendering)&&((wt=I.debounceRendering)||en)(Me)}function Me(){for(var e,t,n,r,o,a,i,s=1;Q.length;)Q.length>s&&Q.sort(tn),e=Q.shift(),s=Q.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,a=[],i=[],t.__P&&((n=K({},r)).__v=r.__v+1,I.vnode&&I.vnode(n),ct(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,a,o??ae(r),!!(32&r.__u),i),n.__v=r.__v,n.__.__k[n.__i]=n,ln(a,n,i),n.__e!=o&&on(n)));Me.__r=0}function an(e,t,n,r,o,a,i,s,f,d,p){var u,x,g,m,y,h,S=r&&r.__k||rn,L=t.length;for(f=or(n,t,S,f,L),u=0;u<L;u++)(g=n.__k[u])!=null&&(x=g.__i==-1?me:S[g.__i]||me,g.__i=u,h=ct(e,g,x,o,a,i,s,f,d,p),m=g.__e,g.ref&&x.ref!=g.ref&&(x.ref&&dt(x.ref,null,g),p.push(g.ref,g.__c||m,g)),y==null&&m!=null&&(y=m),4&g.__u||x.__k===g.__k?f=sn(g,f,e):typeof g.type=="function"&&h!==void 0?f=h:m&&(f=m.nextSibling),g.__u&=-7);return n.__e=y,f}function or(e,t,n,r,o){var a,i,s,f,d,p=n.length,u=p,x=0;for(e.__k=new Array(o),a=0;a<o;a++)(i=t[a])!=null&&typeof i!="boolean"&&typeof i!="function"?(f=a+x,(i=e.__k[a]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?he(null,i,null,null,null):De(i)?he(Z,{children:i},null,null,null):i.constructor==null&&i.__b>0?he(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,s=null,(d=i.__i=ir(i,n,f,u))!=-1&&(u--,(s=n[d])&&(s.__u|=2)),s==null||s.__v==null?(d==-1&&(o>p?x--:o<p&&x++),typeof i.type!="function"&&(i.__u|=4)):d!=f&&(d==f-1?x--:d==f+1?x++:(d>f?x--:x++,i.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<p;a++)(s=n[a])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=ae(s)),dn(s,s));return r}function sn(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=sn(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=ae(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ir(e,t,n,r){var o,a,i=e.key,s=e.type,f=t[n];if(f===null&&e.key==null||f&&i==f.key&&s==f.type&&(2&f.__u)==0)return n;if(r>(f!=null&&(2&f.__u)==0?1:0))for(o=n-1,a=n+1;o>=0||a<t.length;){if(o>=0){if((f=t[o])&&(2&f.__u)==0&&i==f.key&&s==f.type)return o;o--}if(a<t.length){if((f=t[a])&&(2&f.__u)==0&&i==f.key&&s==f.type)return a;a++}}return-1}function kt(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||rr.test(t)?n:n+"px"}function we(e,t,n,r,o){var a,i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||kt(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||kt(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(nn,"$1")),i=t.toLowerCase(),t=i in e||t=="onFocusOut"||t=="onFocusIn"?i.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=st,e.addEventListener(t,a?Xe:Ke,a)):e.removeEventListener(t,a?Xe:Ke,a);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 Et(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=st++;else if(t.t<n.u)return;return n(I.event?I.event(t):t)}}}function ct(e,t,n,r,o,a,i,s,f,d){var p,u,x,g,m,y,h,S,L,k,E,A,v,O,w,F,U,$=t.type;if(t.constructor!=null)return null;128&n.__u&&(f=!!(32&n.__u),a=[s=t.__e=n.__e]),(p=I.__b)&&p(t);e:if(typeof $=="function")try{if(S=t.props,L="prototype"in $&&$.prototype.render,k=(p=$.contextType)&&r[p.__c],E=p?k?k.props.value:p.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(L?t.__c=u=new $(S,E):(t.__c=u=new ke(S,E),u.constructor=$,u.render=sr),k&&k.sub(u),u.props=S,u.state||(u.state={}),u.context=E,u.__n=r,x=u.__d=!0,u.__h=[],u._sb=[]),L&&u.__s==null&&(u.__s=u.state),L&&$.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=K({},u.__s)),K(u.__s,$.getDerivedStateFromProps(S,u.__s))),g=u.props,m=u.state,u.__v=t,x)L&&$.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),L&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(L&&$.getDerivedStateFromProps==null&&S!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(S,E),!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(S,u.__s,E)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=S,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(J){J&&(J.__=t)}),A=0;A<u._sb.length;A++)u.__h.push(u._sb[A]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(S,u.__s,E),L&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,m,y)})}if(u.context=E,u.props=S,u.__P=e,u.__e=!1,v=I.__r,O=0,L){for(u.state=u.__s,u.__d=!1,v&&v(t),p=u.render(u.props,u.state,u.context),w=0;w<u._sb.length;w++)u.__h.push(u._sb[w]);u._sb=[]}else do u.__d=!1,v&&v(t),p=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++O<25);u.state=u.__s,u.getChildContext!=null&&(r=K(K({},r),u.getChildContext())),L&&!x&&u.getSnapshotBeforeUpdate!=null&&(y=u.getSnapshotBeforeUpdate(g,m)),F=p,p!=null&&p.type===Z&&p.key==null&&(F=cn(p.props.children)),s=an(e,De(F)?F:[F],t,n,r,o,a,i,s,f,d),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),h&&(u.__E=u.__=null)}catch(J){if(t.__v=null,f||a!=null)if(J.then){for(t.__u|=f?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__e=s}else for(U=a.length;U--;)lt(a[U]);else t.__e=n.__e,t.__k=n.__k;I.__e(J,t,n)}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=ar(n.__e,t,n,r,o,a,i,f,d);return(p=I.diffed)&&p(t),128&t.__u?void 0:s}function ln(e,t,n){for(var r=0;r<n.length;r++)dt(n[r],n[++r],n[++r]);I.__c&&I.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){I.__e(a,o.__v)}})}function cn(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:De(e)?e.map(cn):K({},e)}function ar(e,t,n,r,o,a,i,s,f){var d,p,u,x,g,m,y,h=n.props,S=t.props,L=t.type;if(L=="svg"?o="http://www.w3.org/2000/svg":L=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(d=0;d<a.length;d++)if((g=a[d])&&"setAttribute"in g==!!L&&(L?g.localName==L:g.nodeType==3)){e=g,a[d]=null;break}}if(e==null){if(L==null)return document.createTextNode(S);e=document.createElementNS(o,L,S.is&&S),s&&(I.__m&&I.__m(t,a),s=!1),a=null}if(L==null)h===S||s&&e.data==S||(e.data=S);else{if(a=a&&ye.call(e.childNodes),h=n.props||me,!s&&a!=null)for(h={},d=0;d<e.attributes.length;d++)h[(g=e.attributes[d]).name]=g.value;for(d in h)if(g=h[d],d!="children"){if(d=="dangerouslySetInnerHTML")u=g;else if(!(d in S)){if(d=="value"&&"defaultValue"in S||d=="checked"&&"defaultChecked"in S)continue;we(e,d,null,g,o)}}for(d in S)g=S[d],d=="children"?x=g:d=="dangerouslySetInnerHTML"?p=g:d=="value"?m=g:d=="checked"?y=g:s&&typeof g!="function"||h[d]===g||we(e,d,g,h[d],o);if(p)s||u&&(p.__html==u.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(u&&(e.innerHTML=""),an(t.type=="template"?e.content:e,De(x)?x:[x],t,n,r,L=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:n.__k&&ae(n,0),s,f),a!=null)for(d=a.length;d--;)lt(a[d]);s||(d="value",L=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[d]||L=="progress"&&!m||L=="option"&&m!=h[d])&&we(e,d,m,h[d],o),d="checked",y!=null&&y!=e[d]&&we(e,d,y,h[d],o))}return e}function dt(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){I.__e(o,n)}}function dn(e,t,n){var r,o;if(I.unmount&&I.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||dt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(a){I.__e(a,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&dn(r[o],t,n||typeof e.type!="function");n||lt(e.__e),e.__c=e.__=e.__e=void 0}function sr(e,t,n){return this.constructor(e,n)}function Pe(e,t,n){var r,o,a,i;t==document&&(t=document.documentElement),I.__&&I.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,a=[],i=[],ct(t,e=(!r&&n||t).__k=ie(Z,null,[e]),o||me,me,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?ye.call(t.childNodes):null,a,!r&&n?n:o?o.__e:t.firstChild,r,i),ln(a,e,i)}function un(e,t){Pe(e,t,un)}function fn(e,t,n){var r,o,a,i,s=K({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?r=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!=null?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):n),he(e.type,s,r||e.key,o||e.ref,null)}ye=rn.slice,I={__e:function(e,t,n,r){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Qt=0,ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=K({},this.state),typeof e=="function"&&(e=e(K({},n),this.props)),e&&K(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),At(this))},ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),At(this))},ke.prototype.render=Z,Q=[],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,st=0,Ke=Et(!1),Xe=Et(!0);var lr=0;function c(e,t,n,r,o,a){t||(t={});var i,s,f=t;if("ref"in f)for(s in f={},t)s=="ref"?i=t[s]:f[s]=t[s];var d={type:e,props:f,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--lr,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)f[s]===void 0&&(f[s]=i[s]);return I.vnode&&I.vnode(d),d}var ge,z,Ve,vt,Re=0,pn=[],P=I,Ct=P.__b,Bt=P.__r,Tt=P.diffed,Mt=P.__c,Rt=P.unmount,Ft=P.__;function ut(e,t){P.__h&&P.__h(z,e,Re||t),Re=0;var n=z.__H||(z.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function R(e){return Re=1,cr(mn,e)}function cr(e,t,n){var r=ut(ge++,2);if(r.t=e,!r.__c&&(r.__=[mn(void 0,t),function(s){var f=r.__N?r.__N[0]:r.__[0],d=r.t(f,s);f!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=z,!z.__f)){var o=function(s,f,d){if(!r.__c.__H)return!0;var p=r.__c.__H.__.filter(function(x){return!!x.__c});if(p.every(function(x){return!x.__N}))return!a||a.call(this,s,f,d);var u=r.__c.props!==s;return p.forEach(function(x){if(x.__N){var g=x.__[0];x.__=x.__N,x.__N=void 0,g!==x.__[0]&&(u=!0)}}),a&&a.call(this,s,f,d)||u};z.__f=!0;var a=z.shouldComponentUpdate,i=z.componentWillUpdate;z.componentWillUpdate=function(s,f,d){if(this.__e){var p=a;a=void 0,o(s,f,d),a=p}i&&i.call(this,s,f,d)},z.shouldComponentUpdate=o}return r.__N||r.__}function H(e,t){var n=ut(ge++,3);!P.__s&&hn(n.__H,t)&&(n.__=e,n.u=t,z.__H.__h.push(n))}function se(e){return Re=5,dr(function(){return{current:e}},[])}function dr(e,t){var n=ut(ge++,7);return hn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ur(){for(var e;e=pn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ee),e.__H.__h.forEach(Ze),e.__H.__h=[]}catch(t){e.__H.__h=[],P.__e(t,e.__v)}}P.__b=function(e){z=null,Ct&&Ct(e)},P.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ft&&Ft(e,t)},P.__r=function(e){Bt&&Bt(e),ge=0;var t=(z=e.__c).__H;t&&(Ve===z?(t.__h=[],z.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Ee),t.__h.forEach(Ze),t.__h=[],ge=0)),Ve=z},P.diffed=function(e){Tt&&Tt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pn.push(t)!==1&&vt===P.requestAnimationFrame||((vt=P.requestAnimationFrame)||fr)(ur)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ve=z=null},P.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ee),n.__h=n.__h.filter(function(r){return!r.__||Ze(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],P.__e(r,n.__v)}}),Mt&&Mt(e,t)},P.unmount=function(e){Rt&&Rt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ee(r)}catch(o){t=o}}),n.__H=void 0,t&&P.__e(t,n.__v))};var It=typeof requestAnimationFrame=="function";function fr(e){var t,n=function(){clearTimeout(r),It&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);It&&(t=requestAnimationFrame(n))}function Ee(e){var t=z,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),z=t}function Ze(e){var t=z;e.__c=e.__(),z=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}var xe=(e=>(e.ZH="zh",e.EN="en",e))(xe||{}),N=(e=>(e.WHITE="white",e.DARK="dark",e))(N||{}),oe=(e=>(e.DEV="dev",e.DEVELOPMENT="development",e.TEST="test",e.PROD="prod",e.PRODUCTION="production",e))(oe||{}),l=(e=>(e.SMALL="small",e.MEDIUM="medium",e))(l||{});function gn(e,t){return function(){return e.apply(t,arguments)}}const{toString:pr}=Object.prototype,{getPrototypeOf:ft}=Object,{iterator:Oe,toStringTag:bn}=Symbol,Ne=(e=>t=>{const n=pr.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Y=e=>(e=e.toLowerCase(),t=>Ne(t)===e),Ue=e=>t=>typeof t===e,{isArray:le}=Array,be=Ue("undefined");function hr(e){return e!==null&&!be(e)&&e.constructor!==null&&!be(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const yn=Y("ArrayBuffer");function mr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&yn(e.buffer),t}const gr=Ue("string"),q=Ue("function"),xn=Ue("number"),$e=e=>e!==null&&typeof e=="object",br=e=>e===!0||e===!1,ve=e=>{if(Ne(e)!=="object")return!1;const t=ft(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bn in e)&&!(Oe in e)},yr=Y("Date"),xr=Y("File"),_r=Y("Blob"),Sr=Y("FileList"),Lr=e=>$e(e)&&q(e.pipe),wr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=Ne(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Ar=Y("URLSearchParams"),[kr,Er,vr,Cr]=["ReadableStream","Request","Response","Headers"].map(Y),Br=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),le(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(r=0;r<i;r++)s=a[r],t.call(null,e[s],s,e)}}function _n(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 ee=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sn=e=>!be(e)&&e!==ee;function Qe(){const{caseless:e}=Sn(this)&&this||{},t={},n=(r,o)=>{const a=e&&_n(t,o)||o;ve(t[a])&&ve(r)?t[a]=Qe(t[a],r):ve(r)?t[a]=Qe({},r):le(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&_e(arguments[r],n);return t}const Tr=(e,t,n,{allOwnKeys:r}={})=>(_e(t,(o,a)=>{n&&q(o)?e[a]=gn(o,n):e[a]=o},{allOwnKeys:r}),e),Mr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rr=(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)},Fr=(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ft(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ir=(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},zr=e=>{if(!e)return null;if(le(e))return e;let t=e.length;if(!xn(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Dr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ft(Uint8Array)),Pr=(e,t)=>{const r=(e&&e[Oe]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},Or=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Nr=Y("HTMLFormElement"),Ur=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),zt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$r=Y("RegExp"),Ln=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_e(n,(o,a)=>{let i;(i=t(o,a,e))!==!1&&(r[a]=i||o)}),Object.defineProperties(e,r)},Wr=e=>{Ln(e,(t,n)=>{if(q(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(q(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+"'")})}})},Hr=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return le(e)?r(e):r(String(e).split(t)),n},jr=()=>{},qr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Vr(e){return!!(e&&q(e.append)&&e[bn]==="FormData"&&e[Oe])}const Jr=e=>{const t=new Array(10),n=(r,o)=>{if($e(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=le(r)?[]:{};return _e(r,(i,s)=>{const f=n(i,o+1);!be(f)&&(a[s]=f)}),t[o]=void 0,a}}return r};return n(e,0)},Yr=Y("AsyncFunction"),Gr=e=>e&&($e(e)||q(e))&&q(e.then)&&q(e.catch),wn=((e,t)=>e?setImmediate:t?((n,r)=>(ee.addEventListener("message",({source:o,data:a})=>{o===ee&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ee.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",q(ee.postMessage)),Kr=typeof queueMicrotask<"u"?queueMicrotask.bind(ee):typeof process<"u"&&process.nextTick||wn,Xr=e=>e!=null&&q(e[Oe]),b={isArray:le,isArrayBuffer:yn,isBuffer:hr,isFormData:wr,isArrayBufferView:mr,isString:gr,isNumber:xn,isBoolean:br,isObject:$e,isPlainObject:ve,isReadableStream:kr,isRequest:Er,isResponse:vr,isHeaders:Cr,isUndefined:be,isDate:yr,isFile:xr,isBlob:_r,isRegExp:$r,isFunction:q,isStream:Lr,isURLSearchParams:Ar,isTypedArray:Dr,isFileList:Sr,forEach:_e,merge:Qe,extend:Tr,trim:Br,stripBOM:Mr,inherits:Rr,toFlatObject:Fr,kindOf:Ne,kindOfTest:Y,endsWith:Ir,toArray:zr,forEachEntry:Pr,matchAll:Or,isHTMLForm:Nr,hasOwnProperty:zt,hasOwnProp:zt,reduceDescriptors:Ln,freezeMethods:Wr,toObjectSet:Hr,toCamelCase:Ur,noop:jr,toFiniteNumber:qr,findKey:_n,global:ee,isContextDefined:Sn,isSpecCompliantForm:Vr,toJSONObject:Jr,isAsyncFn:Yr,isThenable:Gr,setImmediate:wn,asap:Kr,isIterable:Xr};function T(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)}b.inherits(T,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:b.toJSONObject(this.config),code:this.code,status:this.status}}});const An=T.prototype,kn={};["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=>{kn[e]={value:e}});Object.defineProperties(T,kn);Object.defineProperty(An,"isAxiosError",{value:!0});T.from=(e,t,n,r,o,a)=>{const i=Object.create(An);return b.toFlatObject(e,i,function(f){return f!==Error.prototype},s=>s!=="isAxiosError"),T.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const Zr=null;function et(e){return b.isPlainObject(e)||b.isArray(e)}function En(e){return b.endsWith(e,"[]")?e.slice(0,-2):e}function Dt(e,t,n){return e?e.concat(t).map(function(o,a){return o=En(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Qr(e){return b.isArray(e)&&!e.some(et)}const eo=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function We(e,t,n){if(!b.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!b.isUndefined(h[y])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(t);if(!b.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(b.isDate(m))return m.toISOString();if(b.isBoolean(m))return m.toString();if(!f&&b.isBlob(m))throw new T("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(m)||b.isTypedArray(m)?f&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,y,h){let S=m;if(m&&!h&&typeof m=="object"){if(b.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(b.isArray(m)&&Qr(m)||(b.isFileList(m)||b.endsWith(y,"[]"))&&(S=b.toArray(m)))return y=En(y),S.forEach(function(k,E){!(b.isUndefined(k)||k===null)&&t.append(i===!0?Dt([y],E,a):i===null?y:y+"[]",d(k))}),!1}return et(m)?!0:(t.append(Dt(h,y,a),d(m)),!1)}const u=[],x=Object.assign(eo,{defaultVisitor:p,convertValue:d,isVisitable:et});function g(m,y){if(!b.isUndefined(m)){if(u.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));u.push(m),b.forEach(m,function(S,L){(!(b.isUndefined(S)||S===null)&&o.call(t,S,b.isString(L)?L.trim():L,y,x))===!0&&g(S,y?y.concat(L):[L])}),u.pop()}}if(!b.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Pt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function pt(e,t){this._pairs=[],e&&We(e,this,t)}const vn=pt.prototype;vn.append=function(t,n){this._pairs.push([t,n])};vn.toString=function(t){const n=t?function(r){return t.call(this,r,Pt)}:Pt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function to(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Cn(e,t,n){if(!t)return e;const r=n&&n.encode||to;b.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=b.isURLSearchParams(t)?t.toString():new pt(t,n).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}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){b.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Bn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},no=typeof URLSearchParams<"u"?URLSearchParams:pt,ro=typeof FormData<"u"?FormData:null,oo=typeof Blob<"u"?Blob:null,io={isBrowser:!0,classes:{URLSearchParams:no,FormData:ro,Blob:oo},protocols:["http","https","file","blob","url","data"]},ht=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,ao=ht&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),so=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lo=ht&&window.location.href||"http://localhost",co=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ht,hasStandardBrowserEnv:ao,hasStandardBrowserWebWorkerEnv:so,navigator:tt,origin:lo},Symbol.toStringTag,{value:"Module"})),W={...co,...io};function uo(e,t){return We(e,new W.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return W.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function fo(e){return b.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function po(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Tn(e){function t(n,r,o,a){let i=n[a++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),f=a>=n.length;return i=!i&&b.isArray(o)?o.length:i,f?(b.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!s):((!o[i]||!b.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],a)&&b.isArray(o[i])&&(o[i]=po(o[i])),!s)}if(b.isFormData(e)&&b.isFunction(e.entries)){const n={};return b.forEachEntry(e,(r,o)=>{t(fo(r),o,n,0)}),n}return null}function ho(e,t,n){if(b.isString(e))try{return(t||JSON.parse)(e),b.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Se={transitional:Bn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=b.isObject(t);if(a&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return o?JSON.stringify(Tn(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return uo(t,this.formSerializer).toString();if((s=b.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return We(s?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),ho(t)):t}],transformResponse:[function(t){const n=this.transitional||Se.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?T.from(s,T.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],e=>{Se.headers[e]={}});const mo=b.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"]),go=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&mo[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Nt=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return e===!1||e==null?e:b.isArray(e)?e.map(Ce):String(e)}function bo(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 yo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Je(e,t,n,r,o){if(b.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!b.isString(t)){if(b.isString(r))return t.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(t)}}function xo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function _o(e,t){const n=b.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,i){return this[r].call(this,t,o,a,i)},configurable:!0})})}let V=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(s,f,d){const p=pe(f);if(!p)throw new Error("header name must be a non-empty string");const u=b.findKey(o,p);(!u||o[u]===void 0||d===!0||d===void 0&&o[u]!==!1)&&(o[u||f]=Ce(s))}const i=(s,f)=>b.forEach(s,(d,p)=>a(d,p,f));if(b.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(b.isString(t)&&(t=t.trim())&&!yo(t))i(go(t),n);else if(b.isObject(t)&&b.isIterable(t)){let s={},f,d;for(const p of t){if(!b.isArray(p))throw TypeError("Object iterator must return a key-value pair");s[d=p[0]]=(f=s[d])?b.isArray(f)?[...f,p[1]]:[f,p[1]]:p[1]}i(s,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=pe(t),t){const r=b.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return bo(o);if(b.isFunction(n))return n.call(this,o,r);if(b.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=pe(t),t){const r=b.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Je(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(i){if(i=pe(i),i){const s=b.findKey(r,i);s&&(!n||Je(r,r[s],s,n))&&(delete r[s],o=!0)}}return b.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Je(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return b.forEach(this,(o,a)=>{const i=b.findKey(r,a);if(i){n[i]=Ce(o),delete n[a];return}const s=t?xo(a):String(a).trim();s!==a&&delete n[a],n[s]=Ce(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return b.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&b.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[Nt]=this[Nt]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=pe(i);r[s]||(_o(o,i),r[s]=!0)}return b.isArray(t)?t.forEach(a):a(t),this}};V.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(V.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});b.freezeMethods(V);function Ye(e,t){const n=this||Se,r=t||n,o=V.from(r.headers);let a=r.data;return b.forEach(e,function(s){a=s.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Mn(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){T.call(this,e??"canceled",T.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(ce,T,{__CANCEL__:!0});function Rn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new T("Request failed with status code "+n.status,[T.ERR_BAD_REQUEST,T.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function So(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lo(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),p=r[a];i||(i=d),n[o]=f,r[o]=d;let u=a,x=0;for(;u!==o;)x+=n[u++],u=u%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),d-i<t)return;const g=p&&d-p;return g?Math.round(x*1e3/g):void 0}}function wo(e,t){let n=0,r=1e3/t,o,a;const i=(d,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),u=p-n;u>=r?i(d,p):(o=d,a||(a=setTimeout(()=>{a=null,i(o)},r-u)))},()=>o&&i(o)]}const Fe=(e,t,n=3)=>{let r=0;const o=Lo(50,250);return wo(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,f=i-r,d=o(f),p=i<=s;r=i;const u={loaded:i,total:s,progress:s?i/s:void 0,bytes:f,rate:d||void 0,estimated:d&&s&&p?(s-i)/d:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(u)},n)},Ut=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$t=e=>(...t)=>b.asap(()=>e(...t)),Ao=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,ko=W.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];b.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),b.isString(r)&&i.push("path="+r),b.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Eo(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fn(e,t,n){let r=!Eo(t);return e&&(r||n==!1)?vo(e,t):t}const Wt=e=>e instanceof V?{...e}:e;function ne(e,t){t=t||{};const n={};function r(d,p,u,x){return b.isPlainObject(d)&&b.isPlainObject(p)?b.merge.call({caseless:x},d,p):b.isPlainObject(p)?b.merge({},p):b.isArray(p)?p.slice():p}function o(d,p,u,x){if(b.isUndefined(p)){if(!b.isUndefined(d))return r(void 0,d,u,x)}else return r(d,p,u,x)}function a(d,p){if(!b.isUndefined(p))return r(void 0,p)}function i(d,p){if(b.isUndefined(p)){if(!b.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function s(d,p,u){if(u in t)return r(d,p);if(u in e)return r(void 0,d)}const f={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(d,p,u)=>o(Wt(d),Wt(p),u,!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(p){const u=f[p]||o,x=u(e[p],t[p],p);b.isUndefined(x)&&u!==s||(n[p]=x)}),n}const In=e=>{const t=ne({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;t.headers=i=V.from(i),t.url=Cn(Fn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let f;if(b.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[d,...p]=f?f.split(";").map(u=>u.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...p].join("; "))}}if(W.hasStandardBrowserEnv&&(r&&b.isFunction(r)&&(r=r(t)),r||r!==!1&&Ao(t.url))){const d=o&&a&&ko.read(a);d&&i.set(o,d)}return t},Co=typeof XMLHttpRequest<"u",Bo=Co&&function(e){return new Promise(function(n,r){const o=In(e);let a=o.data;const i=V.from(o.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=o,p,u,x,g,m;function y(){g&&g(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function S(){if(!h)return;const k=V.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:k,config:e,request:h};Rn(function(O){n(O),y()},function(O){r(O),y()},A),h=null}"onloadend"in h?h.onloadend=S:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(S)},h.onabort=function(){h&&(r(new T("Request aborted",T.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new T("Network Error",T.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||Bn;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new T(E,A.clarifyTimeoutError?T.ETIMEDOUT:T.ECONNABORTED,e,h)),h=null},a===void 0&&i.setContentType(null),"setRequestHeader"in h&&b.forEach(i.toJSON(),function(E,A){h.setRequestHeader(A,E)}),b.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),s&&s!=="json"&&(h.responseType=o.responseType),d&&([x,m]=Fe(d,!0),h.addEventListener("progress",x)),f&&h.upload&&([u,g]=Fe(f),h.upload.addEventListener("progress",u),h.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(p=k=>{h&&(r(!k||k.type?new ce(null,e,h):k),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const L=So(o.url);if(L&&W.protocols.indexOf(L)===-1){r(new T("Unsupported protocol "+L+":",T.ERR_BAD_REQUEST,e));return}h.send(a||null)})},To=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(d){if(!o){o=!0,s();const p=d instanceof Error?d:this.reason;r.abort(p instanceof T?p:new ce(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{i=null,a(new T(`timeout ${t} of ms exceeded`,T.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(a):d.removeEventListener("abort",a)}),e=null)};e.forEach(d=>d.addEventListener("abort",a));const{signal:f}=r;return f.unsubscribe=()=>b.asap(s),f}},Mo=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},Ro=async function*(e,t){for await(const n of Fo(e))yield*Mo(n,t)},Fo=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()}},Ht=(e,t,n,r)=>{const o=Ro(e,t);let a=0,i,s=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:p}=await o.next();if(d){s(),f.close();return}let u=p.byteLength;if(n){let x=a+=u;n(x)}f.enqueue(new Uint8Array(p))}catch(d){throw s(d),d}},cancel(f){return s(f),o.return()}},{highWaterMark:2})},He=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",zn=He&&typeof ReadableStream=="function",Io=He&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Dn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},zo=zn&&Dn(()=>{let e=!1;const t=new Request(W.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),jt=64*1024,nt=zn&&Dn(()=>b.isReadableStream(new Response("").body)),Ie={stream:nt&&(e=>e.body)};He&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ie[t]&&(Ie[t]=b.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new T(`Response type '${t}' is not supported`,T.ERR_NOT_SUPPORT,r)})})})(new Response);const Do=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(W.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(b.isArrayBufferView(e)||b.isArrayBuffer(e))return e.byteLength;if(b.isURLSearchParams(e)&&(e=e+""),b.isString(e))return(await Io(e)).byteLength},Po=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??Do(t)},Oo=He&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:i,onDownloadProgress:s,onUploadProgress:f,responseType:d,headers:p,withCredentials:u="same-origin",fetchOptions:x}=In(e);d=d?(d+"").toLowerCase():"text";let g=To([o,a&&a.toAbortSignal()],i),m;const y=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let h;try{if(f&&zo&&n!=="get"&&n!=="head"&&(h=await Po(p,r))!==0){let A=new Request(t,{method:"POST",body:r,duplex:"half"}),v;if(b.isFormData(r)&&(v=A.headers.get("content-type"))&&p.setContentType(v),A.body){const[O,w]=Ut(h,Fe($t(f)));r=Ht(A.body,jt,O,w)}}b.isString(u)||(u=u?"include":"omit");const S="credentials"in Request.prototype;m=new Request(t,{...x,signal:g,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:S?u:void 0});let L=await fetch(m,x);const k=nt&&(d==="stream"||d==="response");if(nt&&(s||k&&y)){const A={};["status","statusText","headers"].forEach(F=>{A[F]=L[F]});const v=b.toFiniteNumber(L.headers.get("content-length")),[O,w]=s&&Ut(v,Fe($t(s),!0))||[];L=new Response(Ht(L.body,jt,O,()=>{w&&w(),y&&y()}),A)}d=d||"text";let E=await Ie[b.findKey(Ie,d)||"text"](L,e);return!k&&y&&y(),await new Promise((A,v)=>{Rn(A,v,{data:E,headers:V.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:m})})}catch(S){throw y&&y(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new T("Network Error",T.ERR_NETWORK,e,m),{cause:S.cause||S}):T.from(S,S&&S.code,e,m)}}),rt={http:Zr,xhr:Bo,fetch:Oo};b.forEach(rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qt=e=>`- ${e}`,No=e=>b.isFunction(e)||e===null||e===!1,Pn={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let i;if(r=n,!No(n)&&(r=rt[(i=String(n)).toLowerCase()],r===void 0))throw new T(`Unknown adapter '${i}'`);if(r)break;o[i||"#"+a]=r}if(!r){const a=Object.entries(o).map(([s,f])=>`adapter ${s} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
+
`+a.map(qt).join(`
|
|
5
|
+
`):" "+qt(a[0]):"as no adapter specified";throw new T("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:rt};function Ge(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce(null,e)}function Vt(e){return Ge(e),e.headers=V.from(e.headers),e.data=Ye.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pn.getAdapter(e.adapter||Se.adapter)(e).then(function(r){return Ge(e),r.data=Ye.call(e,e.transformResponse,r),r.headers=V.from(r.headers),r},function(r){return Mn(r)||(Ge(e),r&&r.response&&(r.response.data=Ye.call(e,e.transformResponse,r.response),r.response.headers=V.from(r.response.headers))),Promise.reject(r)})}const On="1.10.0",je={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{je[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Jt={};je.transitional=function(t,n,r){function o(a,i){return"[Axios v"+On+"] Transitional option '"+a+"'"+i+(r?". "+r:"")}return(a,i,s)=>{if(t===!1)throw new T(o(i," has been removed"+(n?" in "+n:"")),T.ERR_DEPRECATED);return n&&!Jt[i]&&(Jt[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,i,s):!0}};je.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Uo(e,t,n){if(typeof e!="object")throw new T("options must be an object",T.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const s=e[a],f=s===void 0||i(s,a,e);if(f!==!0)throw new T("option "+a+" must be "+f,T.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new T("Unknown option "+a,T.ERR_BAD_OPTION)}}const Be={assertOptions:Uo,validators:je},G=Be.validators;let te=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 a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ne(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Be.assertOptions(r,{silentJSONParsing:G.transitional(G.boolean),forcedJSONParsing:G.transitional(G.boolean),clarifyTimeoutError:G.transitional(G.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:Be.assertOptions(o,{encode:G.function,serialize:G.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:G.spelling("baseURL"),withXsrfToken:G.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=a&&b.merge(a.common,a[n.method]);a&&b.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),n.headers=V.concat(i,a);const s=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(f=f&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let p,u=0,x;if(!f){const m=[Vt.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,d),x=m.length,p=Promise.resolve(n);u<x;)p=p.then(m[u++],m[u++]);return p}x=s.length;let g=n;for(u=0;u<x;){const m=s[u++],y=s[u++];try{g=m(g)}catch(h){y.call(this,h);break}}try{p=Vt.call(this,g)}catch(m){return Promise.reject(m)}for(u=0,x=d.length;u<x;)p=p.then(d[u++],d[u++]);return p}getUri(t){t=ne(this.defaults,t);const n=Fn(t.baseURL,t.url,t.allowAbsoluteUrls);return Cn(n,t.params,t.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(t){te.prototype[t]=function(n,r){return this.request(ne(r||{},{method:t,url:n,data:(r||{}).data}))}});b.forEach(["post","put","patch"],function(t){function n(r){return function(a,i,s){return this.request(ne(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}te.prototype[t]=n(),te.prototype[t+"Form"]=n(!0)});let $o=class Nn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{r.subscribe(s),a=s}).then(o);return i.cancel=function(){r.unsubscribe(a)},i},t(function(a,i,s){r.reason||(r.reason=new ce(a,i,s),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 Nn(function(o){t=o}),cancel:t}}};function Wo(e){return function(n){return e.apply(null,n)}}function Ho(e){return b.isObject(e)&&e.isAxiosError===!0}const ot={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(ot).forEach(([e,t])=>{ot[t]=e});function Un(e){const t=new te(e),n=gn(te.prototype.request,t);return b.extend(n,te.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Un(ne(e,o))},n}const D=Un(Se);D.Axios=te;D.CanceledError=ce;D.CancelToken=$o;D.isCancel=Mn;D.VERSION=On;D.toFormData=We;D.AxiosError=T;D.Cancel=D.CanceledError;D.all=function(t){return Promise.all(t)};D.spread=Wo;D.isAxiosError=Ho;D.mergeConfig=ne;D.AxiosHeaders=V;D.formToJSON=e=>Tn(b.isHTMLForm(e)?new FormData(e):e);D.getAdapter=Pn.getAdapter;D.HttpStatusCode=ot;D.default=D;const{Axios:ga,AxiosError:ba,CanceledError:ya,isCancel:xa,CancelToken:_a,VERSION:Sa,all:La,Cancel:wa,isAxiosError:Aa,spread:ka,toFormData:Ea,AxiosHeaders:va,HttpStatusCode:Ca,formToJSON:Ba,getAdapter:Ta,mergeConfig:Ma}=D;function jo(e={}){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");console.log("fundUnitParams",t);const{env:n}=t;let r;switch(n){case oe.DEV:case oe.DEVELOPMENT:r="/api";break;case oe.TEST:r="https://fund.bestfulfill.tech/api/sdk";break;case oe.PROD:case oe.PRODUCTION:default:r="https://fund.bestfulfill.com/api/sdk";break}const{baseURL:o=r,timeout:a=1e4,onError:i}=e,s=D.create({baseURL:o,timeout:a});return s.interceptors.request.use(f=>{const{token:d,locale:p}=t;return f.headers={...f.headers,Authorization:d,"x-locale":p===xe.ZH?"zh-CN":"en-US"},f}),s.interceptors.response.use(f=>{if(f.data&&f.data.code===0)return f.data;const d=f.data?.msg||f.data?.message||"未知错误";return ze.error(d),i&&i(d,f),Promise.reject(f.data||{message:"未知错误"})},f=>{const d=f.response?.data?.msg||f.response?.data?.message||f.message||"网络请求失败";return ze.error(d),i&&i(d,f),Promise.reject(f)}),s}let Te=null;function X(){return Te||(Te=jo()),Te}function qo(){Te=null}async function $n(){const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n=(await X().get("/balance",{params:{merchant_id:e.merchantId,biz_type:e.bizType,fund_balance_id:e.fundBalanceId}})).data,r={fundBalanceId:n.fund_balance_id,merchantId:n.merchant_id,bizType:n.biz_type,currency:n.currency,totalAmount:n.total_amount,frozenAmount:n.frozen_amount,creditLimit:n.credit_config?.credit_limit,creditUsed:n.credit_used,isCredit:!!n.credit_config,availableAmount:n.available_amount,currBalance:n.curr_balance,pendingAmount:n.pending_amount,status:n.status,createdAt:n.created_at,merchantBalances:(Array.isArray(n.merchant_balances)?n.merchant_balances:[]).map(o=>({fundBalanceId:o.fund_balance_id,merchantId:o.merchant_id,bizType:o.biz_type}))};return sessionStorage.setItem("balanceData",JSON.stringify(r)),r}const Vo=async()=>X().get("/all-dicts",{}).then(e=>(sessionStorage.setItem("all_dicts",JSON.stringify(e.data)),e.data||{})),Jo=async()=>{const e=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/currency",{params:{biz_type:e.bizType}}).then(t=>t.data.currency.map(n=>({value:n.value,label:n.label}))||[])},Yo=async(e,t)=>X().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||""),Wn=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_date:e.transferDate,transfer_channel:e.transferChannel,payer_name:e.payerName,submit_amount:e.submitAmount,submit_currency:e.submitCurrency,voucher_urls:e.voucherUrls,use_fund_allocation:!!e.useFundAllocation,allocation_ratios:e.useFundAllocation?(e.allocationRatios||[]).map(r=>({fund_balance_id:r.fundBalanceId,biz_type:r.bizType,ratio:String(r.ratio)})):[],metadata:t.bizType==="ad"?{transaction_reason:"OfflineRecharge"}:void 0};return X().post("/offline/recharge/create",n,{})},Hn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}"),n={merchant_id:Number(t.merchantId),biz_type:t.bizType,fund_balance_id:t.fundBalanceId,source_operator:t.userId?String(t.userId):void 0,amount:e.amount,currency:e.currency,recharge_channel:e.rechargeChannel,return_url:window.location.href,metadata:t.bizType==="ad"?{transaction_reason:"OnlineRecharge"}:void 0};return X().post("/online/recharge/create",n,{}).then(r=>r.data.redirect_url)},jn=async e=>X().get("/calc-payment-amount",{params:e}).then(t=>{const n=t.data;return{paymentAmount:n.payment_amount,fee:n.fee,currency:n.currency}}),qn=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/channel/info",{params:{code:e.code,biz_type:t.bizType}}).then(n=>n.data?.detail||[])},Go=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().get("/offline/channel/map",{params:{currency:e.currency,biz_type:t.bizType}}).then(n=>({onlineChannel:n.data?.online_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[],offlineChannel:n.data?.offline_channels.map(r=>({value:r.value,label:r.label,icon:r.icon}))||[]}))},Ko=async e=>{const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");return X().post("/business_exchange_rate/calculate",{fund_balance_id:t.fundBalanceId,merchant_id:t.merchantId,biz_type:t.bizType,amount:e.amount,payment_currency:e.currency}).then(n=>({amount:n.data.amount,exchangeRate:n.data.exchange_rate,currency:n.data.currency,consistent:n.data.consistent}))};async function Vn(){return await $n()}function Xo(e){const{merchant_id:t,biz_type:n,fund_balance_id:r,user_id:o,theme:a=N.WHITE,locale:i=xe.ZH,env:s,size:f,theme_config:d}=e;console.log(e,"InitParams1111");const p="Bearer "+e.token;return sessionStorage.setItem("fund_unit_params",JSON.stringify({merchantId:t,bizType:n,fundBalanceId:r,userId:o,token:p,theme:a,locale:i,env:s,size:f,themeConfig:d})),qo(),Vo(),{token:p,merchantId:t,bizType:n,fundBalanceId:r,userId:o,theme:a,locale:i,env:s,size:f}}function B(e){const t=JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}");if(!e)return t;if(Array.isArray(e)){const n={};return e.forEach(r=>{n[r]=t[r]}),n}return t[e]}function Jn(){const e=new CustomEvent("refresh-balance",{detail:{},bubbles:!0,composed:!0});window.dispatchEvent(e)}const Yt={white:{background:"#fff",border:"#d9d9d9",color:"#222",boxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeColor:"#999"},dark:{background:"#23262F",border:"#444C5C",color:"#F5F6FA",boxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeColor:"#B5B8BE"}};function Zo(){return B("theme")===N.WHITE?Yt.white:Yt.dark}class Qo{parseArg(t){return typeof t=="string"?{content:t}:t}show(t,n){const{content:r,duration:o,closable:a}=this.parseArg(n),i=Zo(),s=document.createElement("div");if(s.style.cssText=`
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 20px;
|
|
9
9
|
left: 50%;
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
padding: 4px;
|
|
43
43
|
color: ${i.closeColor};
|
|
44
44
|
font-size: 12px;
|
|
45
|
-
`,d.onclick=()=>{document.body.removeChild(s)},s.appendChild(d)}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 ze=new Qo;function ei(){console.log("npm package test!!!")}function ti(){console.log("Current time:",new Date().toISOString())}const ni={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function ri(){const e=B("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function oi(e){const t=B("theme"),n=B("themeConfig"),r=t===N.WHITE,o=ri();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function ht({onClick:e,color:t,children:n}){const r=oi(t);return c("button",{style:r,onClick:e,type:"button",children:n})}const ii={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:","预计支付金额约为:":"预计支付金额约为:","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"注:地区/币种/卡类型可能影响手续费,最终以平台为准。",确定:"确定",提交成功:"提交成功",年:"年",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付","您的支付币种与默认币种不一致,将转换为默认币种入账:":"您的支付币种与默认币种不一致,将转换为默认币种入账","目前汇率为:":"目前汇率为:",钱包预计增加:"钱包预计增加",请输入付款人名称:"请输入付款人名称",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示","我们强烈建议,转账时在备注中输入您的ID:":"我们强烈建议,转账时在备注中输入您的ID:","。这可以":"。这可以",加速资金审核:"加速资金审核","创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码":"创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码","请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。":"请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。","请上传交易凭证,否则无法核验并及时添加余额。":"请上传交易凭证,否则无法核验并及时添加余额。","提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。":"提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。","通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。":"通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。","广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。":"广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。","如有问题,请联系客服。":"如有问题,请联系客服。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",是否使用资金分配:"是否使用资金分配",是:"是",否:"否",请输入子业务占比:"请输入子业务占比","子业务占比总和必须为100%":"子业务占比总和必须为100%","must total 100%":"总和必须为100%",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ai(e){return ii[e]||e}const si={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ","预计支付金额约为:":"Estimated payment amount is approximately: ","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"Note: Region/currency/card type may affect handling fees, subject to the platform.",确定:"Confirm",提交成功:"Submit Success",年:"Year",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay","您的支付币种与默认币种不一致,将转换为默认币种入账:":"Your payment currency is different from the default currency and will be converted to the default currency for deposit","目前汇率为:":"Current exchange rate:",钱包预计增加:"Wallet is expected to increase",请输入付款人名称:"Please enter the payer name",取消:"Cancel",关闭:"Close",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"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",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder","我们强烈建议,转账时在备注中输入您的ID:":"We strongly recommend that you enter your ID: ","。这可以":" in the payment memo when transferring. This will ",加速资金审核:"speed up the fund verification process","创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码":"Do not include sensitive notes when creating a payment (e.g., “topup ads”, “order”). We recommend using a numeric code instead.","请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。":"Enter the correct amount, currency, and payment time. Please do not submit the same transaction more than once.","请上传交易凭证,否则无法核验并及时添加余额。":"Upload the payment proof/receipt. Without it, we can’t verify the transfer or credit your balance in time.","提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。":"After submission, your balance will be credited based on the actual received amount. Transfers submitted during business hours are processed the same day; those submitted outside business hours will be processed on the next business day.","通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。":"For platform-to-platform transfers (e.g., Payoneer → Payoneer), there may be a ~10-minute delay. Please wait patiently.","广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。":"For advertising funds: if the received currency is non-USD, an additional 0.6% fee applies. PayPal payments incur an additional 2.5% fee. ","如有问题,请联系客服。":"If you have any questions, please contact Customer Support.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",是否使用资金分配:"Use fund allocation",是:"Yes",否:"No",请输入子业务占比:"Please enter the sub-business percentage","子业务占比总和必须为100%":"The total sub-business percentage must equal 100%","must total 100%":"must total 100%",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function li(e){return si[e]||e}function Yn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||xe.ZH}function _(e){return Yn()==="zh"?ai(e):li(e)}const Yt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function ci(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=n?Yt.white:Yt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const it=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:f,dropdownClassName:d,children:p})=>{const[u,y]=R(!1),b=se(null),[h,x]=R(null),m=ci(),L=B("size");H(()=>{if(!u)return;const E=A=>{b.current&&!b.current.contains(A.target)&&y(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[u]);const S=n.find(E=>E.value===e),k=()=>a?m.triggerError:i?m.triggerDisabled:m.trigger;return c("div",{ref:b,className:f,style:{position:"relative",...o},children:[c("style",{children:`
|
|
45
|
+
`,d.onclick=()=>{document.body.removeChild(s)},s.appendChild(d)}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 ze=new Qo;function ei(){console.log("npm package test!!!")}function ti(){console.log("Current time:",new Date().toISOString())}const ni={"/api":{target:"https://fund.bestfulfill.tech/api/sdk",changeOrigin:!0,rewrite:e=>e.replace(/^\/api/,""),secure:!1}};function ri(){const e=B("size");return{white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"8px 16px",cursor:"pointer",fontSize:e===l.SMALL?12:16,fontWeight:600}}}function oi(e){const t=B("theme"),n=B("themeConfig"),r=t===N.WHITE,o=ri();let a=e;return!a&&n&&(a=(r?n.white:n.dark)?.color),r?{...o.white,background:a||o.white.background}:{...o.dark,background:a||o.dark.background}}function mt({onClick:e,color:t,children:n}){const r=oi(t);return c("button",{style:r,onClick:e,type:"button",children:n})}const ii={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。","手续费约为:":"手续费约为:","预计支付金额约为:":"预计支付金额约为:","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"注:地区/币种/卡类型可能影响手续费,最终以平台为准。",确定:"确定",提交成功:"提交成功",年:"年",余额详情:"余额详情",真实金额:"真实金额",冻结金额:"冻结金额",信用额度:"信用额度",已用额度:"已用额度",可用余额:"可用余额",暂无数据:"暂无数据","金额需在1到999999.99之间":"金额需在1到999999.99之间","充值 / 转账":"充值 / 转账",在线充值:"在线充值",线下转账:"线下转账",充值币种:"充值币种",充值金额:"充值金额",支付平台:"支付平台",请选择充值币种:"请选择充值币种",请输入充值金额:"请输入充值金额",请选择支付平台:"请选择支付平台","需要收取手续费,实际支付金额约为:":"需要收取手续费,实际支付金额约为:","提交失败,请重试":"提交失败,请重试","提交中...":"提交中...",去支付:"去支付","您的支付币种与默认币种不一致,将转换为默认币种入账:":"您的支付币种与默认币种不一致,将转换为默认币种入账","目前汇率为:":"目前汇率为:",钱包预计增加:"钱包预计增加",请输入付款人名称:"请输入付款人名称",取消:"取消",关闭:"关闭",在线支付:"在线支付",选择支付方式:"选择支付方式",支付方式:"支付方式",付款人名称:"付款人名称",支付币种:"支付币种",支付金额:"支付金额",线上支付:"线上支付",立即支付:"立即支付","请在转账后提交银行回单,否则可能无法及时核验":"请在转账后提交银行回单,否则可能无法及时核验","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"支付金额须与申请金额一致,请勿多付、少付或分批提交。","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"请妥善保存回单并提供准确的支付时间,否则可能无法核验。","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。","如有问题,请联系平台客服。":"如有问题,请联系平台客服。","预付充值将收取平台服务费,具体以官方为准。":"预付充值将收取平台服务费,具体以官方为准。",银行转账:"银行转账",银行名称:"银行名称",账户持有人:"账户持有人",账户号码:"账户号码","SWIFT/BIC代码":"SWIFT/BIC代码",银行代码:"银行代码",银行地址:"银行地址",复制:"复制",复制成功:"复制成功",确认转账详情:"确认转账详情",转账后提交银行回单提示:"请在转账后提交银行回单,否则可能无法及时核验",温馨提示:"温馨提示","我们强烈建议,转账时在备注中输入您的ID:":"我们强烈建议,转账时在备注中输入您的ID:","。这可以":"。这可以",加速资金审核:"加速资金审核","创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码":"创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码","请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。":"请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。","请上传交易凭证,否则无法核验并及时添加余额。":"请上传交易凭证,否则无法核验并及时添加余额。","提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。":"提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。","通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。":"通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。","广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。":"广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。","如有问题,请联系客服。":"如有问题,请联系客服。",返回账户信息:"返回账户信息",请上传银行转账回单:"请上传银行转账回单",点击或拖拽文件到此区域上传:"点击或拖拽文件到此区域上传",转账时间:"转账时间",转账金额:"转账金额",请输入实际转账金额:"请输入实际转账金额",提交审核:"提交审核",请选择转账时间:"请选择转账时间",请输入转账金额:"请输入转账金额",请输入:"请输入",是否使用资金分配:"是否使用资金分配",是:"是",否:"否",请输入子业务占比:"请输入子业务占比","子业务占比总和必须为100%":"子业务占比总和必须为100%","must total 100%":"总和必须为100%",请选择日期:"请选择日期",一月:"一月",二月:"二月",三月:"三月",四月:"四月",五月:"五月",六月:"六月",七月:"七月",八月:"八月",九月:"九月",十月:"十月",十一月:"十一月",十二月:"十二月",日:"日",一:"一",二:"二",三:"三",四:"四",五:"五",六:"六",第三方支付平台:"第三方支付平台",交易ID:"交易ID",请输入转账交易ID:"请输入转账交易ID",上传文件:"上传文件",请上传转账凭证:"请上传转账凭证","加载中...":"加载中...",错误:"错误",成功:"成功",必填:"必填","充值/转账":"充值/转账",切换为暗黑主题:"切换为暗黑主题",切换为白色主题:"切换为白色主题",点击或拖拽文件到此处上传:"点击或拖拽文件到此处上传","支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传":"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",个文件:"个文件","正在上传...":"正在上传...",已上传:"已上传",移除:"移除"};function ai(e){return ii[e]||e}const si={"额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。":"Additional note: Your region, currency, and card type may affect the processing fee; the final fee is determined by the provider.","手续费约为:":"Fee approximately: ","预计支付金额约为:":"Estimated payment amount is approximately: ","注:地区/币种/卡类型可能影响手续费,最终以平台为准。":"Note: Region/currency/card type may affect handling fees, subject to the platform.",确定:"Confirm",提交成功:"Submit Success",年:"Year",余额详情:"Balance Details",真实金额:"Real Balance",冻结金额:"Frozen Amount",信用额度:"Credit Limit",已用额度:"Credit Used",可用余额:"Available Balance",暂无数据:"No Data","金额需在1到999999.99之间":"Amount must be between 1 and 999999.99","充值 / 转账":"Recharge / Transfer",在线充值:"Online Recharge",线下转账:"Offline Transfer",充值币种:"Recharge Currency",充值金额:"Recharge Amount",支付平台:"Payment Platform",请选择充值币种:"Please select recharge currency",请输入充值金额:"Please enter recharge amount",请选择支付平台:"Please select payment platform","需要收取手续费,实际支付金额约为:":"requires a handling fee, the actual payment amount is approximately: ","提交失败,请重试":"Submit failed, please try again","提交中...":"Submitting...",去支付:"Go to Pay","您的支付币种与默认币种不一致,将转换为默认币种入账:":"Your payment currency is different from the default currency and will be converted to the default currency for deposit","目前汇率为:":"Current exchange rate:",钱包预计增加:"Wallet is expected to increase",请输入付款人名称:"Please enter the payer name",取消:"Cancel",关闭:"Close",在线支付:"Online Payment",选择支付方式:"Select Payment Method",支付方式:"Payment Method",付款人名称:"Payer Name",支付币种:"Payment Currency",支付金额:"Payment Amount",线上支付:"Online Payment",立即支付:"Pay Now","请在转账后提交银行回单,否则可能无法及时核验":"Please submit the bank receipt after the transfer, otherwise verification may be delayed","支付金额须与申请金额一致,请勿多付、少付或分批提交。":"The payment amount must match the requested amount exactly. Do not overpay, underpay, or split.","请妥善保存回单并提供准确的支付时间,否则可能无法核验。":"Please keep the receipt and provide the exact payment time; otherwise, verification may fail.","工作时间提交4小时内审核,非工作时间将顺延至下一个工作日。":"Submissions during business hours are reviewed within 4 hours; off-hours will be processed next business day.","如有问题,请联系平台客服。":"If you have any questions, please contact customer service.","预付充值将收取平台服务费,具体以官方为准。":"Prepaid top-ups are subject to a platform service fee; please refer to the official policy.",第三方支付平台:"Third-party Payment Platform",交易ID:"Transaction ID",请输入转账交易ID:"Please enter transfer transaction ID",上传文件:"Upload Files",请上传转账凭证:"Please upload transfer voucher","加载中...":"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",银行转账:"Transfer to Account",银行名称:"Bank Name",账户持有人:"Account Holder Name",账户号码:"Account Number","SWIFT/BIC代码":"SWIFT/BIC Code",银行代码:"Bank Code",银行地址:"Bank Address",复制:"Copy",复制成功:"Copied successfully",确认转账详情:"Confirm Transfer Details",转账后提交银行回单提示:"Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",温馨提示:"Friendly Reminder","我们强烈建议,转账时在备注中输入您的ID:":"We strongly recommend that you enter your ID: ","。这可以":" in the payment memo when transferring. This will ",加速资金审核:"speed up the fund verification process","创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码":"Do not include sensitive notes when creating a payment (e.g., “topup ads”, “order”). We recommend using a numeric code instead.","请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。":"Enter the correct amount, currency, and payment time. Please do not submit the same transaction more than once.","请上传交易凭证,否则无法核验并及时添加余额。":"Upload the payment proof/receipt. Without it, we can’t verify the transfer or credit your balance in time.","提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。":"After submission, your balance will be credited based on the actual received amount. Transfers submitted during business hours are processed the same day; those submitted outside business hours will be processed on the next business day.","通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。":"For platform-to-platform transfers (e.g., Payoneer → Payoneer), there may be a ~10-minute delay. Please wait patiently.","广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。":"For advertising funds: if the received currency is non-USD, an additional 0.6% fee applies. PayPal payments incur an additional 2.5% fee. ","如有问题,请联系客服。":"If you have any questions, please contact Customer Support.",返回账户信息:"Return to Account Information",请上传银行转账回单:"Please upload the bank transfer receipt",点击或拖拽文件到此区域上传:"Click or drag file to this area to upload",转账时间:"Transfer Time",转账金额:"Transfer Amount",请输入实际转账金额:"Please enter the actual transfer amount",提交审核:"Submit for Review",请选择转账时间:"Please select transfer time",请输入转账金额:"Please enter transfer amount",请输入:"Please enter",是否使用资金分配:"Use fund allocation",是:"Yes",否:"No",请输入子业务占比:"Please enter the sub-business percentage","子业务占比总和必须为100%":"The total sub-business percentage must equal 100%","must total 100%":"must total 100%",请选择日期:"Please select date",一月:"January",二月:"February",三月:"March",四月:"April",五月:"May",六月:"June",七月:"July",八月:"August",九月:"September",十月:"October",十一月:"November",十二月:"December",日:"Sun",一:"Mon",二:"Tue",三:"Wed",四:"Thu",五:"Fri",六:"Sat"};function li(e){return si[e]||e}function Yn(){return JSON.parse(sessionStorage.getItem("fund_unit_params")||"{}").locale||xe.ZH}function _(e){return Yn()==="zh"?ai(e):li(e)}const Gt={white:{trigger:{background:"#fff",color:"#222",border:"1px solid #d9d9d9"},triggerDisabled:{background:"#f5f5f5",color:"#bfbfbf",border:"1px solid #f0f0f0"},triggerError:{background:"#fff",color:"#222",border:"1px solid #ff4d4f"},dropdown:{background:"#fff",border:"1px solid #d9d9d9",color:"#222"},option:(e,t,n)=>({color:t?"#bfbfbf":e?"#1890ff":"#222",background:e?"#e6f7ff":n&&!t||t?"#f5f5f5":"#fff"}),placeholder:{color:"#bfbfbf"},scrollbarThumb:"#e5e5e5",scrollbarTrack:"#f5f5f5",boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},dark:{trigger:{background:"#23262F",color:"#fff",border:"1px solid #374151"},triggerDisabled:{background:"#23262F",color:"#666",border:"1px solid #374151"},triggerError:{background:"#23262F",color:"#fff",border:"1px solid #ff4d4f"},dropdown:{background:"#23262F",border:"1px solid #374151",color:"#fff"},option:(e,t,n)=>({color:t?"#666":e?"#00E8C6":"#fff",background:e?"#23262F":n&&!t?"#333843":"#23262F"}),placeholder:{color:"#666"},scrollbarThumb:"#444C5C",scrollbarTrack:"#23262F",boxShadow:"0 2px 8px rgba(0,0,0,0.32)"}};function ci(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=n?Gt.white:Gt.dark;if(t){const o=n?t.white:t.dark;if(o?.color)return{...r,option:(a,i,s)=>({...r.option(a,i,s),color:i?r.option(a,i,s).color:a?o.color:r.option(a,i,s).color})}}return r}const it=({value:e,onChange:t,options:n,placeholder:r,style:o,error:a,disabled:i,dropdownStyle:s,className:f,dropdownClassName:d,children:p})=>{const[u,x]=R(!1),g=se(null),[m,y]=R(null),h=ci(),S=B("size");H(()=>{if(!u)return;const E=A=>{g.current&&!g.current.contains(A.target)&&x(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[u]);const L=n.find(E=>E.value===e),k=()=>a?h.triggerError:i?h.triggerDisabled:h.trigger;return c("div",{ref:g,className:f,style:{position:"relative",...o},children:[c("style",{children:`
|
|
46
46
|
.custom-select-dropdown {
|
|
47
47
|
scrollbar-width: thin;
|
|
48
|
-
scrollbar-color: ${
|
|
48
|
+
scrollbar-color: ${h.scrollbarThumb} ${h.scrollbarTrack};
|
|
49
49
|
}
|
|
50
50
|
.custom-select-dropdown::-webkit-scrollbar {
|
|
51
|
-
width: ${
|
|
51
|
+
width: ${S===l.SMALL?6:8}px;
|
|
52
52
|
}
|
|
53
53
|
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
54
54
|
border-radius: 4px;
|
|
55
|
-
background: ${
|
|
55
|
+
background: ${h.scrollbarThumb};
|
|
56
56
|
}
|
|
57
57
|
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
58
|
-
background: ${
|
|
58
|
+
background: ${h.scrollbarTrack};
|
|
59
59
|
}
|
|
60
|
-
`}),c("div",{onClick:()=>!i&&y(E=>!E),style:{minHeight:L===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:L===l.SMALL?"0 10px":"0 12px",fontSize:L===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...k(),...o},tabIndex:0,children:[c("span",{style:{flex:1},children:S?S.label:c("span",{style:m.placeholder,children:r||"请选择"})}),c("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:c("svg",{width:L===l.SMALL?16:20,height:L===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&c("div",{className:`custom-select-dropdown${d?" "+d:""}`,style:{position:"absolute",left:0,right:0,top:L===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:m.boxShadow,maxHeight:L===l.SMALL?160:220,overflowY:"auto",...m.dropdown,...s},children:[n.length===0&&c("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:L===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[c("svg",{width:L===l.SMALL?48:64,height:L===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[c("title",{children:_("暂无数据")}),c("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[c("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),c("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[c("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"}),c("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"})]})]})]}),c("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:L===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((E,A)=>c("div",{onClick:()=>{E.disabled||(y(!1),t?.(E.value))},onMouseEnter:()=>x(A),onMouseLeave:()=>x(null),style:{padding:L===l.SMALL?"6px 10px":"10px 16px",fontSize:L===l.SMALL?12:15,cursor:E.disabled?"not-allowed":"pointer",fontWeight:e===E.value?600:400,opacity:E.disabled?.6:1,...m.option(e===E.value,!!E.disabled,h===A)},children:E.label},E.value))]}),p]})};function di(){const e=B("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function ui(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function fi(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function pi(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const hi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(h=>h.payment_support)||[],[s,f]=R(""),[d,p]=R(""),[u,y]=R(!1),b=ui();return H(()=>{e.currency&&e.amount&&e.rechargeChannel?jn({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(h=>{f(h.paymentAmount),p(h.fee),y(!0)}).catch(h=>{console.error("计算支付金额失败:",h),y(!1)}):y(!1)},[e.currency,e.amount,e.rechargeChannel]),c(Z,{children:[c("div",{style:{marginBottom:18},children:[c("div",{style:b.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),c(it,{value:e.currency,onChange:h=>{t(x=>({...x,currency:h}))},options:a?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择充值币种")})]}),c("div",{style:{marginBottom:18},children:[c("div",{style:b.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),c("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:h=>{let x=h.target.value;x=fi(x);let m="";if(x&&!x.endsWith(".")){let L=parseFloat(x);if(!isNaN(L)&&(L<1&&(L=1),L>999999.99&&(L=999999.99),x=L.toString(),/\./.test(h.target.value))){const S=h.target.value.split(".")[1];S!==void 0&&S.length>0&&(x=L.toFixed(Math.min(S.length,2)))}}t(L=>({...L,amount:x,amountError:m}))},onBlur:h=>{let x=h.target.value;x=pi(x),t(m=>({...m,amount:x,amountError:""}))},style:{...b.input,...e.amountError?b.inputError:{}}}),e.amountError&&c("div",{style:b.error,children:e.amountError})]}),c("div",{style:{marginBottom:24},children:[c("div",{style:b.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),c(it,{value:e.rechargeChannel,onChange:h=>{t(x=>({...x,rechargeChannel:h,rechargeChannelError:h?"":x.rechargeChannelError}))},options:i?.map(h=>({value:h.value,label:h.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&c("div",{style:b.error,children:e.rechargeChannelError})]}),u&&s&&c("div",{style:b.feeTip,children:[i.find(h=>h.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&c("div",{style:b.feeDetailBox,children:[c("div",{style:b.feeDetailTitle,children:[_("手续费约为:"),c("span",{style:b.feeAmount,children:["$",d]})]}),c("div",{style:b.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&c("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),c("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[c("button",{type:"button",onClick:n,style:b.buttonCancel,children:_("取消")}),c("button",{type:"submit",disabled:r,style:b.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function mi(){const e=B("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function gi(){const t=B("theme")===N.WHITE,n=mi();return t?n.white:n.dark}const bi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084964886'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7145'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M519.224889%20451.498667a9.102222%209.102222%200%200%200-14.421333%200l-128%20161.962666a9.102222%209.102222%200%200%200%207.224888%2014.734223h84.451556v277.048888c0%205.006222%204.096%209.102222%209.130667%209.102223h68.551111a9.159111%209.159111%200%200%200%209.159111-9.102223v-276.935111H640a9.102222%209.102222%200%200%200%207.224889-14.734222l-128-162.076444z'%20p-id='7146'%20fill='%231677ff'%3e%3c/path%3e%3cpath%20d='M854.186667%20345.742222C801.848889%20207.644444%20668.444444%20109.511111%20512.227556%20109.511111S222.634667%20207.559111%20170.296889%20345.6A228.693333%20228.693333%200%200%200%200%20566.670222a228.494222%20228.494222%200%200%200%20228.465778%20228.579556h45.795555a9.159111%209.159111%200%200%200%209.159111-9.159111v-68.551111a9.159111%209.159111%200%200%200-9.130666-9.159112H228.465778a140.885333%20140.885333%200%200%201-101.717334-43.064888%20141.653333%20141.653333%200%200%201-39.879111-103.537778%20140.600889%20140.600889%200%200%201%2029.923556-82.403556%20143.217778%20143.217778%200%200%201%2075.548444-49.948444l43.320889-11.320889%2015.872-41.813333a280.632889%20280.632889%200%200%201%20100.693334-129.479112%20276.707556%20276.707556%200%200%201%20160-50.545777c57.742222%200%20113.038222%2017.493333%20160%2050.517333a280.832%20280.832%200%200%201%20100.693333%20129.479111l15.758222%2041.728%2043.207111%2011.434667a142.364444%20142.364444%200%200%201%20105.244445%20137.244444c0%2037.831111-14.734222%2073.500444-41.472%20100.238222a140.572444%20140.572444%200%200%201-100.124445%2041.472h-45.795555a9.159111%209.159111%200%200%200-9.159111%209.159112v68.551111c0%205.034667%204.096%209.159111%209.130666%209.159111h45.824A228.494222%20228.494222%200%200%200%201024%20566.641778a228.608%20228.608%200%200%200-169.813333-220.899556z'%20p-id='7147'%20fill='%231677ff'%3e%3c/path%3e%3c/svg%3e",Gn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=B("size"),s=se(null),[f,d]=R(!1),[p,u]=R(0),y=gi(),b=async x=>{const m=Array.from(x.target.files).slice(0,n);if(!m.length)return;d(!0);const L=[];for(let S=0;S<m.length;S++){u(0);const k=new FormData;k.append("file",m[S]);try{const E=await Yo(k,A=>u(A));E&&L.push(E)}catch{}}d(!1),u(0),t?.([...e,...L]),s.current&&(s.current.value="")},h=x=>{const m=e.filter((L,S)=>S!==x);t?.(m)};return c("div",{children:[c("div",{style:{...y.container,cursor:a?"not-allowed":y.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[c("img",{src:bi,alt:"upload",style:{width:i===l.SMALL?40:48,height:i===l.SMALL?40:48,marginBottom:i===l.SMALL?8:12}}),c("div",{style:{color:"#222",fontSize:i===l.SMALL?13:16,marginBottom:i===l.SMALL?4:8},children:_("Please upload the bank transfer receipt")}),c("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:_("Click or drag file to this area to upload")}),c("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:b,disabled:a}),f&&c("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",p,"%"]})]}),e&&e.length>0&&c("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((x,m)=>c("div",{style:y.fileItem,children:[c("div",{style:{display:"flex",alignItems:"center",flex:1},children:c("span",{style:{fontWeight:500,wordBreak:"break-all"},children:x.split("/").pop()})}),c("button",{type:"button",onClick:L=>{L.stopPropagation(),h(m)},style:y.removeBtn,disabled:a,children:_("移除")})]},x))})]})};function yi(){const e=B("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function xi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=yi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const _i=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=xi(),[s,f]=R([]),d=async u=>{u.preventDefault();let y=!0;t(b=>({...b,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(b=>({...b,platformError:_("请选择支付平台")})),y=!1),e.transactionId.trim()||(t(b=>({...b,transactionIdError:_("请输入转账交易ID")})),y=!1),(!e.files||e.files.length===0)&&(t(b=>({...b,filesError:_("请上传转账凭证")})),y=!1),y&&(await $n({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),ze.success(_("提交成功")))};function p(u){t(y=>({...y,platform:u,platformError:u?"":y.platformError})),qn({code:u}).then(y=>{f(Array.isArray(y)?y:y?[String(y)]:[])})}return c("form",{onSubmit:d,children:[c("div",{style:{marginBottom:18},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),c(it,{value:e.platform,onChange:u=>{p(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&c("div",{style:i.error,children:e.platformError}),s.length>0&&c("div",{style:i.channelInfoBox,children:s.map((u,y)=>c("div",{style:i.channelInfoItem,children:u},y))})]}),c("div",{style:{marginBottom:18},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),c("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let y=u.target.value;y.length>200&&(y=y.slice(0,200)),t(b=>({...b,transactionId:y,transactionIdError:y?"":b.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&c("div",{style:i.error,children:e.transactionIdError})]}),c("div",{style:{marginBottom:24},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),c(Gn,{value:e.files,onChange:u=>t(y=>({...y,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&c("div",{style:i.error,children:e.filesError})]}),c("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[c("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),c("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function Si(){const e=B("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function Li(){const t=B("theme")===N.WHITE,n=Si();return t?n.white:n.dark}const re=B("size");function wi(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
60
|
+
`}),c("div",{onClick:()=>!i&&x(E=>!E),style:{minHeight:S===l.SMALL?32:40,borderRadius:6,display:"flex",alignItems:"center",padding:S===l.SMALL?"0 10px":"0 12px",fontSize:S===l.SMALL?12:15,cursor:i?"not-allowed":"pointer",boxSizing:"border-box",transition:"border 0.2s",opacity:i?.6:1,width:"100%",...k(),...o},tabIndex:0,children:[c("span",{style:{flex:1},children:L?L.label:c("span",{style:h.placeholder,children:r||"请选择"})}),c("span",{style:{marginLeft:8,display:"flex",alignItems:"center"},children:c("svg",{width:S===l.SMALL?16:20,height:S===l.SMALL?16:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M6 8L10 12L14 8",stroke:"#bfbfbf","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),u&&!i&&c("div",{className:`custom-select-dropdown${d?" "+d:""}`,style:{position:"absolute",left:0,right:0,top:S===l.SMALL?32:44,zIndex:10,borderRadius:6,boxShadow:h.boxShadow,maxHeight:S===l.SMALL?160:220,overflowY:"auto",...h.dropdown,...s},children:[n.length===0&&c("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:S===l.SMALL?80:120,width:"100%",userSelect:"none"},children:[c("svg",{width:S===l.SMALL?48:64,height:S===l.SMALL?32:41,viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:[c("title",{children:_("暂无数据")}),c("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[c("ellipse",{fill:"#f5f5f5",cx:"32",cy:"33",rx:"32",ry:"7"}),c("g",{fillRule:"nonzero",stroke:"#d9d9d9",children:[c("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"}),c("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"})]})]})]}),c("div",{style:{marginTop:8,color:"#bfbfbf",fontSize:S===l.SMALL?12:15},children:_("暂无数据")})]}),n.map((E,A)=>c("div",{onClick:()=>{E.disabled||(x(!1),t?.(E.value))},onMouseEnter:()=>y(A),onMouseLeave:()=>y(null),style:{padding:S===l.SMALL?"6px 10px":"10px 16px",fontSize:S===l.SMALL?12:15,cursor:E.disabled?"not-allowed":"pointer",fontWeight:e===E.value?600:400,opacity:E.disabled?.6:1,...h.option(e===E.value,!!E.disabled,m===A)},children:E.label},E.value))]}),p]})};function di(){const e=B("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#f6ffed",border:"1px solid #b7eb8f",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#fff",border:"1px solid #E5E6EB",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#222",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#F53F3F",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#6b7280",lineHeight:1.5}},dark:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},selectError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 16px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer",fontWeight:600},feeTip:{marginBottom:e===l.SMALL?16:24,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#1a1a1a",border:"1px solid #333",borderRadius:6,fontSize:e===l.SMALL?12:14,color:"#52c41a"},feeDetailBox:{marginTop:e===l.SMALL?8:10,marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"8px 10px":"12px 16px",background:"#23262F",border:"1px solid #374151",borderRadius:6},feeDetailTitle:{fontSize:e===l.SMALL?12:14,color:"#fff",fontWeight:600,marginBottom:e===l.SMALL?6:8},feeAmount:{color:"#FF6B6B",marginLeft:4},feeDetailDesc:{fontSize:e===l.SMALL?12:13,color:"#B5B8BE",lineHeight:1.5}}}}function ui(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}function fi(e){return e=e.replace(/[^\d.]/g,""),e=e.replace(/\.(?=.*\.)/g,""),e=e.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),e=e.replace(/^0+(\d)/,"$1"),e.startsWith(".")&&(e="0"+e),e}function pi(e){if(!e)return"";const t=parseFloat(e);return isNaN(t)?"":t.toFixed(2)}const hi=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}"),a=o?.currency||[],i=o?.channel?.filter(m=>m.payment_support)||[],[s,f]=R(""),[d,p]=R(""),[u,x]=R(!1),g=ui();return H(()=>{e.currency&&e.amount&&e.rechargeChannel?jn({channel:e.rechargeChannel,amount:e.amount,currency:e.currency}).then(m=>{f(m.paymentAmount),p(m.fee),x(!0)}).catch(m=>{console.error("计算支付金额失败:",m),x(!1)}):x(!1)},[e.currency,e.amount,e.rechargeChannel]),c(Z,{children:[c("div",{style:{marginBottom:18},children:[c("div",{style:g.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值币种")]}),c(it,{value:e.currency,onChange:m=>{t(y=>({...y,currency:m}))},options:a?.map(m=>({value:m.value,label:m.label})),placeholder:_("请选择充值币种")})]}),c("div",{style:{marginBottom:18},children:[c("div",{style:g.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("充值金额")]}),c("input",{type:"text",placeholder:_("请输入充值金额"),value:e.amount,onInput:m=>{let y=m.target.value;y=fi(y);let h="";if(y&&!y.endsWith(".")){let S=parseFloat(y);if(!isNaN(S)&&(S<1&&(S=1),S>999999.99&&(S=999999.99),y=S.toString(),/\./.test(m.target.value))){const L=m.target.value.split(".")[1];L!==void 0&&L.length>0&&(y=S.toFixed(Math.min(L.length,2)))}}t(S=>({...S,amount:y,amountError:h}))},onBlur:m=>{let y=m.target.value;y=pi(y),t(h=>({...h,amount:y,amountError:""}))},style:{...g.input,...e.amountError?g.inputError:{}}}),e.amountError&&c("div",{style:g.error,children:e.amountError})]}),c("div",{style:{marginBottom:24},children:[c("div",{style:g.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("支付平台")]}),c(it,{value:e.rechargeChannel,onChange:m=>{t(y=>({...y,rechargeChannel:m,rechargeChannelError:m?"":y.rechargeChannelError}))},options:i?.map(m=>({value:m.value,label:m.label})),placeholder:_("请选择支付平台")}),e.rechargeChannelError&&c("div",{style:g.error,children:e.rechargeChannelError})]}),u&&s&&c("div",{style:g.feeTip,children:[i.find(m=>m.value===e.rechargeChannel)?.label||e.rechargeChannel,_("需要收取手续费,实际支付金额约为:"),"$",s]}),u&&s&&c("div",{style:g.feeDetailBox,children:[c("div",{style:g.feeDetailTitle,children:[_("手续费约为:"),c("span",{style:g.feeAmount,children:["$",d]})]}),c("div",{style:g.feeDetailDesc,children:_("额外费用说明:您的地区、币种、支付卡类型等因素可能会导致手续费的变动,最终手续费以官方为准。")})]}),e.error&&c("div",{style:{color:"#ff4d4f",marginBottom:12},children:e.error}),c("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[c("button",{type:"button",onClick:n,style:g.buttonCancel,children:_("取消")}),c("button",{type:"submit",disabled:r,style:g.buttonSubmit,children:_(r?"提交中...":"去支付")})]})]})};function mi(){const e=B("size");return{white:{container:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}},dark:{container:{border:"1.5px dashed #444C5C",borderRadius:8,background:"#181A20",padding:e===l.SMALL?16:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?80:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 10px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"}}}}function gi(){const t=B("theme")===N.WHITE,n=mi();return t?n.white:n.dark}const bi="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084964886'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7145'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M519.224889%20451.498667a9.102222%209.102222%200%200%200-14.421333%200l-128%20161.962666a9.102222%209.102222%200%200%200%207.224888%2014.734223h84.451556v277.048888c0%205.006222%204.096%209.102222%209.130667%209.102223h68.551111a9.159111%209.159111%200%200%200%209.159111-9.102223v-276.935111H640a9.102222%209.102222%200%200%200%207.224889-14.734222l-128-162.076444z'%20p-id='7146'%20fill='%231677ff'%3e%3c/path%3e%3cpath%20d='M854.186667%20345.742222C801.848889%20207.644444%20668.444444%20109.511111%20512.227556%20109.511111S222.634667%20207.559111%20170.296889%20345.6A228.693333%20228.693333%200%200%200%200%20566.670222a228.494222%20228.494222%200%200%200%20228.465778%20228.579556h45.795555a9.159111%209.159111%200%200%200%209.159111-9.159111v-68.551111a9.159111%209.159111%200%200%200-9.130666-9.159112H228.465778a140.885333%20140.885333%200%200%201-101.717334-43.064888%20141.653333%20141.653333%200%200%201-39.879111-103.537778%20140.600889%20140.600889%200%200%201%2029.923556-82.403556%20143.217778%20143.217778%200%200%201%2075.548444-49.948444l43.320889-11.320889%2015.872-41.813333a280.632889%20280.632889%200%200%201%20100.693334-129.479112%20276.707556%20276.707556%200%200%201%20160-50.545777c57.742222%200%20113.038222%2017.493333%20160%2050.517333a280.832%20280.832%200%200%201%20100.693333%20129.479111l15.758222%2041.728%2043.207111%2011.434667a142.364444%20142.364444%200%200%201%20105.244445%20137.244444c0%2037.831111-14.734222%2073.500444-41.472%20100.238222a140.572444%20140.572444%200%200%201-100.124445%2041.472h-45.795555a9.159111%209.159111%200%200%200-9.159111%209.159112v68.551111c0%205.034667%204.096%209.159111%209.130666%209.159111h45.824A228.494222%20228.494222%200%200%200%201024%20566.641778a228.608%20228.608%200%200%200-169.813333-220.899556z'%20p-id='7147'%20fill='%231677ff'%3e%3c/path%3e%3c/svg%3e",Gn=({value:e=[],onChange:t,maxCount:n=10,accept:r=".jpg,.jpeg,.png,.pdf",multiple:o=!0,disabled:a=!1})=>{const i=B("size"),s=se(null),[f,d]=R(!1),[p,u]=R(0),x=gi(),g=async y=>{const h=Array.from(y.target.files).slice(0,n);if(!h.length)return;d(!0);const S=[];for(let L=0;L<h.length;L++){u(0);const k=new FormData;k.append("file",h[L]);try{const E=await Yo(k,A=>u(A));E&&S.push(E)}catch{}}d(!1),u(0),t?.([...e,...S]),s.current&&(s.current.value="")},m=y=>{const h=e.filter((S,L)=>L!==y);t?.(h)};return c("div",{children:[c("div",{style:{...x.container,cursor:a?"not-allowed":x.container.cursor,opacity:a?.6:1},onClick:()=>!a&&s.current?.click(),children:[c("img",{src:bi,alt:"upload",style:{width:i===l.SMALL?40:48,height:i===l.SMALL?40:48,marginBottom:i===l.SMALL?8:12}}),c("div",{style:{color:"#222",fontSize:i===l.SMALL?13:16,marginBottom:i===l.SMALL?4:8},children:_("Please upload the bank transfer receipt")}),c("div",{style:{color:"#999",fontSize:i===l.SMALL?12:13},children:_("Click or drag file to this area to upload")}),c("input",{ref:s,type:"file",multiple:o,accept:r,style:{display:"none"},onChange:g,disabled:a}),f&&c("div",{style:{marginTop:i===l.SMALL?8:12,color:"#1677ff"},children:[_("正在上传...")," ",p,"%"]})]}),e&&e.length>0&&c("div",{style:{marginTop:i===l.SMALL?8:12},children:e.map((y,h)=>c("div",{style:x.fileItem,children:[c("div",{style:{display:"flex",alignItems:"center",flex:1},children:c("span",{style:{fontWeight:500,wordBreak:"break-all"},children:y.split("/").pop()})}),c("button",{type:"button",onClick:S=>{S.stopPropagation(),m(h)},style:x.removeBtn,disabled:a,children:_("移除")})]},y))})]})};function yi(){const e=B("size");return{white:{label:{marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:14,color:"#222",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #E5E6EB",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #E5E6EB",borderRadius:8,background:"#FCFCFD",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:15},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#F7F8FA",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#222",justifyContent:"space-between"},buttonCancel:{background:"#fff",color:"#222",border:"1px solid #E5E6EB",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer"},buttonSubmit:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#F7F8FA",border:"1px solid #E5E6EB"},channelInfoItem:{color:"#222",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}},dark:{label:{marginBottom:e===l.SMALL?4:8,fontSize:e===l.SMALL?12:14,color:"#fff",textAlign:"left",display:"block"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,boxSizing:"border-box",border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none",marginBottom:0},inputError:{border:"1px solid #ff4d4f"},select:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #374151",background:"#23262F",color:"#fff",fontSize:e===l.SMALL?12:15,outline:"none"},selectError:{border:"1px solid #ff4d4f"},upload:{border:"1px dashed #374151",borderRadius:8,background:"#181A20",padding:e===l.SMALL?12:24,textAlign:"center",cursor:"pointer",minHeight:e===l.SMALL?100:120,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"#999",fontSize:e===l.SMALL?12:14},uploadError:{border:"1px dashed #ff4d4f"},fileItem:{display:"flex",alignItems:"center",background:"#23262F",borderRadius:8,padding:e===l.SMALL?"8px 10px":"12px 16px",marginBottom:e===l.SMALL?6:8,fontSize:e===l.SMALL?12:15,color:"#fff",justifyContent:"space-between"},buttonCancel:{background:"#23262F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:15,cursor:"pointer"},buttonSubmit:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"8px 24px",fontSize:e===l.SMALL?12:14,cursor:"pointer",fontWeight:600},removeBtn:{background:"#FF4D4F",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"6px 18px":"4px 14px",fontSize:e===l.SMALL?12:15,marginLeft:e===l.SMALL?8:16,cursor:"pointer"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:e===l.SMALL?2:4,textAlign:"left"},channelInfoBox:{marginTop:e===l.SMALL?8:10,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#23262F",border:"1px solid #374151"},channelInfoItem:{color:"#fff",fontSize:e===l.SMALL?12:13,lineHeight:1.6,wordBreak:"break-all"}}}}function xi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=yi(),o=n?r.white:r.dark;if(console.log(t,"themeConfig"),t){const a=n?t.white:t.dark;if(a?.color)return{...o,buttonSubmit:{...o.buttonSubmit,background:a.color}}}return o}const _i=({formState:e,setFormState:t,onClose:n,loading:r})=>{const o=JSON.parse(sessionStorage.getItem("all_dicts")||"{}");console.log(o,"allDicts");const a=o?.channel||[],i=xi(),[s,f]=R([]),d=async u=>{u.preventDefault();let x=!0;t(g=>({...g,platformError:"",transactionIdError:"",filesError:""})),e.platform||(t(g=>({...g,platformError:_("请选择支付平台")})),x=!1),e.transactionId.trim()||(t(g=>({...g,transactionIdError:_("请输入转账交易ID")})),x=!1),(!e.files||e.files.length===0)&&(t(g=>({...g,filesError:_("请上传转账凭证")})),x=!1),x&&(await Wn({transferChannel:e.platform,transferNo:e.transactionId,voucherUrls:e.files}),n(),ze.success(_("提交成功")))};function p(u){t(x=>({...x,platform:u,platformError:u?"":x.platformError})),qn({code:u}).then(x=>{f(Array.isArray(x)?x:x?[String(x)]:[])})}return c("form",{onSubmit:d,children:[c("div",{style:{marginBottom:18},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("第三方支付平台")]}),c(it,{value:e.platform,onChange:u=>{p(u)},options:[...a?.map(u=>({value:u.value,label:u.label}))],placeholder:_("请选择支付平台")}),e.platformError&&c("div",{style:i.error,children:e.platformError}),s.length>0&&c("div",{style:i.channelInfoBox,children:s.map((u,x)=>c("div",{style:i.channelInfoItem,children:u},x))})]}),c("div",{style:{marginBottom:18},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("交易ID")]}),c("input",{type:"text",placeholder:_("请输入转账交易ID"),value:e.transactionId,maxLength:200,onInput:u=>{let x=u.target.value;x.length>200&&(x=x.slice(0,200)),t(g=>({...g,transactionId:x,transactionIdError:x?"":g.transactionIdError}))},style:{...i.input,...e.transactionIdError?i.inputError:{}}}),e.transactionIdError&&c("div",{style:i.error,children:e.transactionIdError})]}),c("div",{style:{marginBottom:24},children:[c("div",{style:i.label,children:[c("span",{style:{color:"#F53F3F"},children:"*"})," ",_("上传文件")]}),c(Gn,{value:e.files,onChange:u=>t(x=>({...x,files:u,filesError:""})),maxCount:10,accept:".jpg,.jpeg,.png,.pdf",multiple:!0}),e.filesError&&c("div",{style:i.error,children:e.filesError})]}),c("div",{style:{display:"flex",justifyContent:"flex-end",gap:12},children:[c("button",{type:"button",onClick:n,style:i.buttonCancel,children:_("取消")}),c("button",{type:"submit",disabled:r,style:i.buttonSubmit,children:_("确定")})]})]})};function Si(){const e=B("size");return{white:{mask:"rgba(0, 0, 0, 0.45)",modalBg:"#fff",modalColor:"#222",modalBoxShadow:"0 6px 16px rgba(0, 0, 0, 0.12)",closeBtn:{position:"absolute",top:"16px",right:"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#999",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#222"},headerBorder:"#f0f0f0",scrollbarClass:"light-scrollbar",scrollbarThumbColor:"#d1d5db",scrollbarThumbHoverColor:"#9ca3af",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#1890ff":"transparent",color:t?"#fff":"#666",border:"1px solid #d9d9d9",borderRight:n?"none":"1px solid #d9d9d9",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})},dark:{mask:"rgba(0, 0, 0, 0.65)",modalBg:"#23262F",modalColor:"#F5F6FA",modalBoxShadow:"0 6px 16px rgba(0,0,0,0.32)",closeBtn:{position:"absolute",top:e===l.SMALL?"12px":"16px",right:e===l.SMALL?"12px":"16px",background:"none",border:"none",fontSize:e===l.SMALL?16:24,cursor:"pointer",color:"#B5B8BE",padding:"0",width:e===l.SMALL?16:24,height:e===l.SMALL?16:24,display:"flex",alignItems:"center",justifyContent:"center"},title:{fontSize:e===l.SMALL?16:18,fontWeight:"600",marginBottom:e===l.SMALL?16:24,color:"#F5F6FA"},headerBorder:"#374151",scrollbarClass:"dark-scrollbar",scrollbarThumbColor:"#4B5563",scrollbarThumbHoverColor:"#6B7280",tabBtn:(t,n)=>({flex:1,padding:e===l.SMALL?"8px 10px":"12px 16px",background:t?"#00E8C6":"transparent",color:t?"#fff":"#B5B8BE",border:"1px solid #444C5C",borderRight:n?"none":"1px solid #444C5C",cursor:"pointer",fontSize:e===l.SMALL?12:14,fontWeight:t?"600":"400",borderRadius:n?"6px 0 0 6px":"0 6px 6px 0"})}}}function Li(){const t=B("theme")===N.WHITE,n=Si();return t?n.white:n.dark}const re=B("size");function wi(e){const t=`modal-scrollbar-${e.scrollbarClass}`;if(document.getElementById(t))return t;const n=document.createElement("style");return n.id=t,n.textContent=`
|
|
61
61
|
.${e.scrollbarClass} {
|
|
62
62
|
scrollbar-width: thin;
|
|
63
63
|
scrollbar-color: ${e.scrollbarThumbColor} transparent;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
.${e.scrollbarClass}::-webkit-scrollbar-thumb:hover {
|
|
76
76
|
background: ${e.scrollbarThumbHoverColor};
|
|
77
77
|
}
|
|
78
|
-
`,document.head.appendChild(n),t}function Kn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[f,d]=R(!1),p=Li();H(()=>{wi(p)},[p]);const u=b=>{b.target===b.currentTarget?d(!0):d(!1)},y=b=>{b.target===b.currentTarget&&f&&s&&t(),d(!1)};return e?c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:p.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:y,children:c("div",{style:{background:p.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:p.modalColor,boxShadow:p.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:b=>b.stopPropagation(),children:[c("div",{style:{position:"sticky",top:0,background:p.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${p.headerBorder}`},children:[i&&c("button",{type:"button",onClick:t,style:p.closeBtn,"aria-label":"关闭",children:"×"}),n&&c("div",{style:p.title,children:n})]}),c("div",{className:`modal-content ${p.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function Ai(){const e=B("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function ki(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ai(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Ei=B("size");function vi({visible:e,onClose:t,onSubmit:n}){const[r,o]=R({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=R({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,f]=R("online"),d=ki();H(()=>{e||(f("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const p=async u=>{u.preventDefault();let y=!0;if(o(b=>({...b,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(b=>({...b,amountError:_("请输入充值金额")})),y=!1),r.rechargeChannel||(o(b=>({...b,rechargeChannelError:_("请选择支付平台")})),y=!1),!!y){o(b=>({...b,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(b=>({...b,error:_("提交失败,请重试")}))}finally{o(b=>({...b,loading:!1}))}}};return c(Kn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[c("div",{style:{display:"flex",marginBottom:Ei===l.SMALL?16:28},children:[c("button",{type:"button",onClick:()=>f("online"),style:d.tabBtn(s==="online",!0),children:_("在线充值")}),c("button",{type:"button",onClick:()=>f("offline"),style:d.tabBtn(s==="offline",!1),children:_("线下转账")})]}),c("div",{style:{display:s==="online"?"block":"none"},children:c("form",{onSubmit:p,children:c(hi,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),c("div",{style:{display:s==="offline"?"block":"none"},children:c(_i,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function mt(){return(mt=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 Ci=["context","children"];function Bi(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},f=Object.keys(r);for(i=0;i<f.length;i++)o.indexOf(a=f[i])>=0||(s[a]=r[a]);return s}(e,Ci);return fn(t,n)}function Ti(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(Bi,mt({},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=[],a={},i=0,s=n.attributes,f=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Xn(s[i].name)]=s[i].value);for(i=f.length;i--;){var d=t(f[i],null),p=f[i].slot;p?a[p]=ie(Gt,{name:p},d):o[i]=d}var u=r?ie(Gt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?un:Oe)(this._vdom,this._root)}function Xn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Mi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Xn(e)]=n,this._vdom=fn(this._vdom,r),Oe(this._vdom,this._root)}}function Ri(){Oe(this._vdom=null,this._root)}function Gt(e,t){var n=this;return ie("slot",mt({},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 qe(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ti,o.prototype.attributeChangedCallback=Mi,o.prototype.disconnectedCallback=Ri,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Fi(){const[e,t]=R(!1),n=async r=>{const o=await Hn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return c("div",{children:[c(ht,{onClick:()=>t(!0),children:_("充值/转账")}),c(vi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Fi,"best-recharge",["theme"],{shadow:!1});function Ii(){const e=B("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function zi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ii(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Di(){const e=B("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},bizRateBox:{marginTop:6,color:"#666",fontSize:e===l.SMALL?12:13,textAlign:"left",lineHeight:1.6},bizRateStrong:{color:"#111",fontWeight:600},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},bizRateBox:{...t.bizRateBox,color:"#B5B8BE"},bizRateStrong:{color:"#ff4d4f",fontWeight:600},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44})}}}function Oi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Pi({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Oi(),[f,d]=R([]),[p,u]=R([]),[y,b]=R([]),[h,x]=R({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""}),[m,L]=R(null),S=se(null),k=(w,F)=>{const U=w!==void 0?w:h.amount,W=F!==void 0?F:h.currency;if(!U||Number(U)<=0){L(null);return}S.current&&clearTimeout(S.current),S.current=window.setTimeout(()=>{Ko({currency:W,amount:U}).then(V=>L(V)).catch(()=>L(null))},300)};H(()=>{Vo().then(w=>{d(w||[])})},[]),H(()=>{Go({currency:h.currency}).then(w=>{const F=w.onlineChannel||[],U=w.offlineChannel||[];u(F),b(U);const W=F.length>0,V=U?.[0]?.value||"",Le=F?.[0]?.value||"",de=W?a:"bank",C=de==="online"?Le:V;x(M=>({...M,onlineChannel:Le,bankChannel:V,paymentType:de})),C&&e(C,de)})},[h.currency]);function E(w){return w=w.replace(/[^\d.]/g,""),w=w.replace(/\.(?=.*\.)/g,""),w=w.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),w=w.replace(/^0+(\d)/,"$1"),w.startsWith(".")&&(w="0"+w),w}const A=w=>{x(F=>({...F,currency:w})),n(w),k(void 0,w)},v=w=>{const F=E(w);x(U=>({...U,amount:F,amountError:""})),t(F),k(F)},P=(w,F)=>{x(U=>({...U,[F==="online"?"onlineChannel":"bankChannel"]:w,paymentType:F})),e(w,F),k()};return c("div",{style:s.left,children:[c("div",{style:s.blockTitle,children:[c("span",{style:s.titleBar}),_("选择支付方式")]}),c("div",{style:s.fieldLabel,children:_("支付币种")}),c("div",{style:s.currencyRow,children:(f||[]).slice(0,4).map(w=>c("button",{type:"button",onClick:()=>A(w.value),style:s.currencyItem(h.currency===w.value),children:w.label}))}),c("div",{style:{height:12}}),c("div",{style:s.fieldLabel,children:[c("span",{style:s.required,children:"*"}),_("支付金额")]}),c("div",{style:s.inputWrapper,children:[c("input",{type:"text",placeholder:_("请输入充值金额"),value:h.amount,onInput:w=>{v(w.target.value)},style:{...s.input,...i?s.inputError:{}}}),c("div",{style:s.inputSuffixAbs,children:h.currency})]}),i&&c("div",{style:s.error,children:i}),m&&m.consistent===!1&&c("div",{style:s.bizRateBox,children:[c("div",{children:_("您的支付币种与默认币种不一致,将转换为默认币种入账")}),c("div",{children:[_("目前汇率为:")," ",h.currency,_(`→${m.currency} = `),c("span",{style:s.bizRateStrong,children:m.exchangeRate})]}),c("div",{children:[_("钱包预计增加"),c("span",{style:s.bizRateStrong,children:[m.currency," ",m.amount]})]})]}),c("div",{style:{height:20}}),c("div",{style:s.fieldLabel,children:_("支付方式")}),p.length>0&&c("div",{children:[c("div",{style:s.subTitle,children:_("线上支付")}),c("div",{style:s.methodList,children:p.map(w=>c("button",{type:"button",onClick:()=>P(w.value,"online"),style:s.methodItem(h.onlineChannel===w.value&&h.paymentType==="online"),children:[w.icon&&c("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]}),c("div",{style:s.subTitle,children:_("银行转账")}),c("div",{style:s.bankList,children:y.map(w=>c("button",{type:"button",onClick:()=>P(w.value,"bank"),style:s.bankItem(h.bankChannel===w.value&&h.paymentType==="bank"),children:[w.icon&&c("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]})}function Ni(){const e=B("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},calcBox:{...t.calcBox,color:"#B5B8BE"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Ui(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ni(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function Wi({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Ui(),f=s.right.background==="#181A20",[d,p]=R({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,y]=R(null);H(()=>{p(x=>({...x,amount:t,currency:n,channel:r,loading:o,error:a}));const h=setTimeout(()=>{t&&r&&n?jn({channel:r,amount:t,currency:n}).then(x=>y(x)).catch(()=>y(null)):y(null)},300);return()=>clearTimeout(h)},[t,n,r,o,a]);const b=async h=>{h&&h.preventDefault();let x=!0;if(t.trim()||(x=!1,i?.(_("请输入充值金额"))),r||(x=!1,p(m=>({...m,error:_("请选择支付平台")}))),!!x){p(m=>({...m,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{p(m=>({...m,loading:!1}))}}};return c("div",{style:s.right,children:[c("div",{style:s.blockTitle,children:[c("span",{style:s.titleBar}),_("在线支付")]}),c("form",{onSubmit:b,children:[c("div",{style:s.inputWrapper,children:[c("input",{type:"text",placeholder:_("支付金额"),value:d.amount,readOnly:!0,disabled:!0,style:{...s.input,...f?s.disabledDark:s.disabled,width:"100%"}}),c("div",{style:s.inputSuffixAbs,children:d.currency})]}),c("button",{type:"submit",disabled:d.loading,style:s.payButton,children:d.loading?_("提交中..."):_("立即支付")})]}),u&&c("div",{style:s.calcBox,children:[c("div",{style:s.calcLine,children:[_("预计支付金额约为:"),c("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),c("div",{style:s.calcLine,children:[_("手续费约为:"),c("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),c("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),c("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),c("div",{style:s.reminderTitle,children:_("温馨提示")}),c("ul",{style:s.reminderList,children:[c("li",{children:_("创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码")}),c("li",{children:_("请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。")}),c("li",{children:_("请上传交易凭证,否则无法核验并及时添加余额。")}),c("li",{children:_("提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。")}),c("li",{children:_("通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。")}),c("li",{children:_("广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。")}),c("li",{children:_("如有问题,请联系客服。")})]}),d.error&&c("div",{style:s.error,children:d.error})]})}function $i(){const e=B("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?14:16,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?16:20},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?13:14,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?18:24},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"30px 16px":"40px 20px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?40:52,marginBottom:e===l.SMALL?10:12},uploadTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?6:10},uploadHint:{fontSize:e===l.SMALL?12:13,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?10:12},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"6px 10px":"8px 12px",background:"#F5F5F5",borderRadius:6,marginBottom:6},fileName:{fontSize:e===l.SMALL?12:13,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?12:16},radioGroup:{display:"flex",alignItems:"center",gap:e===l.SMALL?16:20,flexWrap:"wrap"},radioOption:{display:"inline-flex",alignItems:"center",gap:6,color:"#222",fontSize:e===l.SMALL?13:14,cursor:"pointer"},subBizGrid:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e===l.SMALL?10:12,width:"100%","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}},subBizField:{minWidth:0},subBizHint:{marginTop:8,color:"#666",fontSize:e===l.SMALL?12:13},fieldLabel:{display:"block",fontSize:e===l.SMALL?13:14,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?6:10},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:14,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?8:10,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?10:12,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?10:12,marginTop:e===l.SMALL?24:32,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:14,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?12:14,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},radioOption:{...t.radioOption,color:"#fff"},subBizHint:{...t.subBizHint,color:"#B5B8BE"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function Hi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=$i(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}const ji="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084950168'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6759'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M932.579556%20137.272889h-192V64.142222a9.159111%209.159111%200%200%200-9.130667-9.159111h-64a9.159111%209.159111%200%200%200-9.159111%209.159111v73.130667H365.738667V64.142222a9.159111%209.159111%200%200%200-9.159111-9.159111h-64a9.159111%209.159111%200%200%200-9.130667%209.159111v73.130667h-192c-20.224%200-36.579556%2016.355556-36.579556%2036.579555v758.869334c0%2020.195556%2016.355556%2036.551111%2036.579556%2036.551111h841.130667c20.252444%200%2036.579556-16.327111%2036.579555-36.551111V173.852444c0-20.224-16.355556-36.579556-36.579555-36.579555zM886.897778%20887.011556H137.159111V452.693333H886.897778v434.261334z%20m-749.710222-512V219.534222h146.289777v54.869334c0%205.034667%204.124444%209.130667%209.130667%209.130666h64a9.159111%209.159111%200%200%200%209.159111-9.130666V219.562667h292.551111v54.869333c0%205.034667%204.124444%209.130667%209.159111%209.130667h64a9.159111%209.159111%200%200%200%209.130667-9.130667V219.562667h146.289778v155.448889H137.159111z'%20p-id='6760'%3e%3c/path%3e%3c/svg%3e";function qi(){const e=B("theme"),t=B("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px",width:16,height:16,objectFit:"contain",display:"inline-block"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function Ji(){return qi()}function Vi({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:f={}}){const d=Ji(),[p,u]=R(!1),[y,b]=R(e),[h,x]=R(new Date),[m,L]=R(!1),S=se(null),k=C=>{if(!C)return"";const M=new Date(C);return`${M.getFullYear()}-${String(M.getMonth()+1).padStart(2,"0")}-${String(M.getDate()).padStart(2,"0")}`},E=(C,M)=>new Date(C,M+1,0).getDate(),A=(C,M)=>new Date(C,M,1).getDay(),v=()=>{const C=h.getFullYear(),M=h.getMonth(),ue=E(C,M),Zn=A(C,M),fe=[],gt=M===0?11:M-1,bt=M===0?C-1:C,yt=E(bt,gt);for(let j=Zn-1;j>=0;j--)fe.push({date:yt-j,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${bt}-${String(gt+1).padStart(2,"0")}-${String(yt-j).padStart(2,"0")}`});const Qn=new Date,xt=y?new Date(y):null;for(let j=1;j<=ue;j++){const _t=`${C}-${String(M+1).padStart(2,"0")}-${String(j).padStart(2,"0")}`,St=new Date(_t);fe.push({date:j,isCurrentMonth:!0,isToday:St.toDateString()===Qn.toDateString(),isSelected:xt&&St.toDateString()===xt.toDateString(),fullDate:_t})}const er=M===11?0:M+1,tr=M===11?C+1:C,nr=42-fe.length;for(let j=1;j<=nr;j++)fe.push({date:j,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${tr}-${String(er+1).padStart(2,"0")}-${String(j).padStart(2,"0")}`});return fe},P=C=>{b(C),u(!1),o?.(C)},w=C=>{const M=new Date(h);C==="prev"?M.setMonth(M.getMonth()-1):M.setMonth(M.getMonth()+1),x(M)},F=C=>{const M=new Date(h);C==="prev"?M.setFullYear(M.getFullYear()-1):M.setFullYear(M.getFullYear()+1),x(M)},U=C=>{const M=new Date(h);M.setFullYear(C),x(M),L(!1)},W=()=>{const C=new Date().getFullYear(),M=[];for(let ue=C-50;ue<=C+50;ue++)M.push(ue);return M};H(()=>{const C=M=>{S.current&&!S.current.contains(M.target)&&u(!1)};if(p)return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[p]);const V=v(),Le=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],de=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return c("div",{ref:S,className:`date-picker-container ${s}`,style:{...d.container,...f},children:[c("div",{style:{...d.input,...d[r],...n?d.disabled:{}},onClick:()=>!n&&u(!p),onFocus:a,onBlur:i,children:[c("span",{style:d.inputText,children:y?k(y):t}),c("img",{src:ji,alt:"calendar",style:d.calendarIcon})]}),p&&c("div",{style:d.panel,children:[c("div",{style:d.header,children:[c("button",{type:"button",style:d.navButton,onClick:()=>F("prev"),children:"‹‹"}),c("button",{type:"button",style:d.navButton,onClick:()=>w("prev"),children:"‹"}),c("span",{style:d.monthYear,onClick:()=>L(!m),children:[h.getFullYear()," ",_("年")," ",Le[h.getMonth()]]}),c("button",{type:"button",style:d.navButton,onClick:()=>w("next"),children:"›"}),c("button",{type:"button",style:d.navButton,onClick:()=>F("next"),children:"››"})]}),m&&c("div",{style:d.yearPicker,children:c("div",{style:d.yearGrid,children:W().map(C=>c("button",{type:"button",style:{...d.yearButton,...C===h.getFullYear()?d.yearSelected:{}},onClick:()=>U(C),children:C},C))})}),c("div",{style:d.weekHeader,children:de.map(C=>c("div",{style:d.weekDay,children:C},C))}),c("div",{style:d.calendarGrid,children:V.map((C,M)=>c("button",{type:"button",style:{...d.dayButton,...C.isCurrentMonth?d.dayCurrentMonth:d.dayOtherMonth,...C.isToday?d.dayToday:{},...C.isSelected?d.daySelected:{}},onClick:()=>P(C.fullDate),disabled:n,children:C.date},M))})]})]})}function Kt(e){return e==="ad"?"Advertising":e==="fulfill"?"Fulfillment":e==="chargewipe"?"ChargeWipe":e}function Yi(){const[e,t]=R([]),[n,r]=R(!1),[o,a]=R({}),[i,s]=R("");return H(()=>{let y=!0;const b=m=>{y&&(t(m),a(L=>m.reduce((S,k)=>({...S,[k.bizType]:L[k.bizType]||""}),{})))},h=JSON.parse(sessionStorage.getItem("balanceData")||"{}"),x=Array.isArray(h?.merchantBalances)?h.merchantBalances:[];return x.length>0&&b(x),Jn().then(m=>{b(Array.isArray(m?.merchantBalances)?m.merchantBalances:[])}).catch(()=>{x.length===0&&b([])}),()=>{y=!1}},[]),H(()=>{e.length<=1&&(r(!1),s(""))},[e.length]),{subBusinesses:e,useFundAllocation:n,subBizPercentages:o,subBizError:i,setUseFundAllocation:y=>{r(y),s("")},setSubBizPercentage:(y,b)=>{a(h=>({...h,[y]:b})),s("")},validateFundAllocation:()=>{if(!n||e.length<=1)return!0;const y=e.some(x=>!o[x.bizType]?.trim()),b=e.some(x=>{const m=Number(o[x.bizType]);return Number.isNaN(m)||m<0||m>100}),h=e.reduce((x,m)=>x+Number(o[m.bizType]||0),0);return y?(s(_("请输入子业务占比")),!1):b||Math.abs(h-100)>1e-4?(s(_("子业务占比总和必须为100%")),!1):(s(""),!0)},buildAllocationRatios:()=>!n||e.length<=1?[]:e.map(y=>({fundBalanceId:y.fundBalanceId,bizType:y.bizType,ratio:String(o[y.bizType]||"")}))}}function Gi({theme:e,useFundAllocation:t,subBusinesses:n,subBizPercentages:r,subBizError:o,onUseFundAllocationChange:a,onPercentageChange:i}){return n.length<=1?null:c(Z,{children:[c("div",{style:e.fieldSection,children:[c("label",{style:e.fieldLabel,children:_("是否使用资金分配")}),c("div",{style:e.radioGroup,children:[c("label",{style:e.radioOption,children:[c("input",{type:"radio",name:"useFundAllocation",checked:t,onChange:()=>a(!0)}),c("span",{children:_("是")})]}),c("label",{style:e.radioOption,children:[c("input",{type:"radio",name:"useFundAllocation",checked:!t,onChange:()=>a(!1)}),c("span",{children:_("否")})]})]})]}),t&&n.length>0&&c("div",{style:e.fieldSection,children:[c("div",{style:e.subBizGrid,children:n.map(s=>c("div",{style:e.subBizField,children:[c("label",{style:e.fieldLabel,children:[Kt(s.bizType)," (%)"]}),c("input",{type:"number",min:"0",max:"100",step:"0.01",placeholder:"0",value:r[s.bizType]||"",onChange:f=>{i(s.bizType,f.target.value)},style:{...e.input,...o?e.inputError:{}}})]},s.fundBalanceId||s.bizType))}),c("div",{style:e.subBizHint,children:`${n.map(s=>Kt(s.bizType)).join(" + ")} ${_("must total 100%")}`}),o&&c("div",{style:e.error,children:o})]})]})}function Ki({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=Hi(),s=i.container.background==="#181A20",{subBusinesses:f,useFundAllocation:d,subBizPercentages:p,subBizError:u,setUseFundAllocation:y,setSubBizPercentage:b,validateFundAllocation:h,buildAllocationRatios:x}=Yi(),m=new Date,L=`${m.getFullYear()}-${String(m.getMonth()+1).padStart(2,"0")}-${String(m.getDate()).padStart(2,"0")}`,[S,k]=R({urls:[],transferTime:L,transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});H(()=>{k(A=>({...A,transferAmount:r}))},[r]);const E=async()=>{let A=!0;if(S.urls.length===0&&(A=!1,k(v=>({...v,filesError:_("请上传银行转账回单")}))),S.transferTime||(A=!1,k(v=>({...v,timeError:_("请选择转账时间")}))),r.trim()||(A=!1,a?.(_("请输入充值金额"))),S.transactionId.trim()||(A=!1,k(v=>({...v,transactionIdError:_("请输入转账交易ID")}))),S.payerName.trim()||(A=!1,k(v=>({...v,payerNameError:_("请输入付款人名称")}))),h()||(A=!1),!!A)try{await $n({transferDate:S.transferTime,transferNo:S.transactionId,transferChannel:o,voucherUrls:S.urls,payerName:S.payerName,submitAmount:r,submitCurrency:n,useFundAllocation:d,allocationRatios:x()}),ze.success(_("提交成功")),t()}finally{k(v=>({...v,loading:!1}))}};return c("div",{style:i.container,children:[c("div",{style:i.header,children:c("button",{type:"button",onClick:e,style:i.backButton,children:[c("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),c("div",{style:i.uploadSection,children:[c(Gn,{value:S.urls,onChange:A=>{k(v=>({...v,urls:A,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),S.filesError&&c("div",{style:i.error,children:S.filesError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("转账时间")]}),c(Vi,{value:S.transferTime,placeholder:_("请选择转账时间"),onChange:A=>{k(v=>({...v,transferTime:A,timeError:""}))},style:{width:"100%"}}),S.timeError&&c("div",{style:i.error,children:S.timeError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:_("转账金额")}),c("div",{style:i.inputWrapper,children:[c("input",{type:"text",placeholder:_("请输入实际转账金额"),value:S.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),c("span",{style:i.currencySuffix,children:n})]})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("交易ID")]}),c("input",{type:"text",placeholder:_("请输入转账交易ID"),value:S.transactionId,onChange:A=>{k(v=>({...v,transactionId:A.target.value,transactionIdError:""}))},style:{...i.input,...S.transactionIdError?i.inputError:{}}}),S.transactionIdError&&c("div",{style:i.error,children:S.transactionIdError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("付款人名称")]}),c("input",{type:"text",placeholder:_("请输入付款人名称"),value:S.payerName,onChange:A=>{k(v=>({...v,payerName:A.target.value,payerNameError:""}))},style:{...i.input,...S.payerNameError?i.inputError:{}}}),S.payerNameError&&c("div",{style:i.error,children:S.payerNameError})]}),c(Gi,{theme:i,useFundAllocation:d,subBusinesses:f,subBizPercentages:p,subBizError:u,onUseFundAllocationChange:y,onPercentageChange:b}),c("div",{style:i.buttonSection,children:[c("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),c("button",{type:"button",onClick:E,style:i.submitButton,children:_("提交审核")})]})]})}function Xi(){const e=B("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"10px 12px":"12px 16px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?13:14},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13,listStyleType:"disc",listStylePosition:"outside"},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},detailCard:{...t.detailCard,border:"1px solid #374151",background:"#23262F"},row:{...t.row,borderBottom:"1px solid #374151",background:"#23262F"},rowAlt:{...t.rowAlt,borderBottom:"1px solid #374151",background:"#23262F"},rowLast:{...t.rowLast,background:"#23262F"},labelMuted:{...t.labelMuted,color:"#B5B8BE"},valueStrong:{...t.valueStrong,color:"#fff"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function Zi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Xi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function Qi({onConfirm:e,channelCode:t}){const n=Zi(),[r,o]=R([]),a=B("merchantId"),i={color:"#ff4d4f",fontWeight:600};return H(()=>{if(!t)return;let s=!0;return qn({code:t}).then(f=>{if(s){if(Array.isArray(f)){o(f.map(d=>String(d)));return}if(f&&typeof f=="object"){const d=[];Object.keys(f).forEach(p=>{const u=f[p];d.push(`${p}: ${u}`)}),o(d);return}o(f?[String(f)]:[])}}).catch(()=>o([])),()=>{s=!1}},[t]),c("div",{style:n.container,children:[c("div",{style:n.header,children:[c("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&c("div",{style:n.detailCard,children:r.map((s,f)=>{const d=String(s).split(":"),p=d.shift()?.trim()||"",u=d.join(":").trim();return c("div",{style:{...n.row,...f===r.length-1?n.rowLast:{},...f%2===1?n.rowAlt:{}},children:[c("div",{style:n.labelMuted,children:p}),c("div",{style:n.valueStrong,children:u||"-"})]},f)})}),c("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),c("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),c("div",{style:n.reminderTitle,children:_("温馨提示")}),c("ul",{style:n.reminderList,children:[c("li",{children:[_("我们强烈建议,转账时在备注中输入您的ID:"),c("span",{style:i,children:a}),_("。这可以"),c("span",{style:i,children:_("加速资金审核")}),Yn()===xe.ZH?"。":"."]}),c("li",{children:_("创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码")}),c("li",{children:_("请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。")}),c("li",{children:_("请上传交易凭证,否则无法核验并及时添加余额。")}),c("li",{children:_("提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。")}),c("li",{children:_("通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。")}),c("li",{children:_("广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。")}),c("li",{children:_("如有问题,请联系客服。")})]})]})}function ea({visible:e,onClose:t,onSubmit:n}){const r=zi(),[o,a]=R(!1),[i,s]=R({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});H(()=>{const x=()=>{a(window.innerWidth<=1020)};return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]),H(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const f=(x,m)=>{s(L=>({...L,channel:x,paymentType:m,channelError:""}))},d=x=>{s(m=>({...m,amount:x,amountError:""}))},p=x=>{s(m=>({...m,amountError:x}))},u=x=>{s(m=>({...m,currency:x}))},y=async x=>{s(m=>({...m,loading:!0,error:""}));try{await n(x),t()}catch{s(m=>({...m,error:_("提交失败,请重试")}))}finally{s(m=>({...m,loading:!1}))}},b=()=>{console.log("用户确认银行转账详情"),s(x=>({...x,showOfflineUpload:!0}))},h=()=>{s(x=>({...x,showOfflineUpload:!1}))};return c(Kn,{visible:e,onClose:t,title:_("充值/转账"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:c("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[c(Pi,{onChannelChange:f,onAmountChange:d,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?c(Wi,{onSubmit:y,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:p}):i.showOfflineUpload?c(Ki,{onBack:h,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:p}):c(Qi,{onConfirm:b,channelCode:i.channel})]})})}function ta(){const[e,t]=R(!1),n=async r=>{const o=await Hn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return c("div",{children:[c(ht,{onClick:()=>t(!0),children:_("充值/转账")}),c(ea,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(ta,"best-payment",["theme"],{shadow:!1});const Xt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function na(){return B("theme")===N.WHITE?Xt.white:Xt.dark}const ra=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=B("size"),f=n??(s===l.SMALL?200:300),d=r??(s===l.SMALL?150:200),p=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[y,b]=R(!1),[h,x]=R(i),m=se(null),L=se(null),S=na(),k=()=>{if(L.current&&(clearTimeout(L.current),L.current=null),i==="top"||i==="bottom")if(m.current){const P=m.current.getBoundingClientRect();i==="top"&&P.top<100?x("bottom"):i==="bottom"&&window.innerHeight-P.bottom<100?x("top"):x(i)}else x(i);else x(i);b(!0)},E=()=>{L.current=window.setTimeout(()=>{b(!1)},120)};let A={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:d,width:f,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...S.popover},v={position:"absolute",zIndex:11,width:0,height:0};return h==="top"?(A={...A,left:"50%",top:-48,transform:"translateX(-50%)"},v={...v,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${S.arrow.top}`}):h==="bottom"?(A={...A,left:"50%",top:"100%",marginTop:p,transform:"translateX(-50%)"},v={...v,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${S.arrow.bottom}`}):h==="leftTop"?(A={...A,right:"100%",top:0,marginRight:u,transform:"none"},v={...v,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${S.arrow.left}`}):h==="rightTop"&&(A={...A,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},v={...v,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${S.arrow.right}`}),c("div",{ref:m,style:{position:"relative",display:"inline-block"},onMouseEnter:k,onMouseLeave:E,children:[t,y&&c("div",{style:A,onMouseEnter:k,onMouseLeave:E,children:[e,c("div",{style:v})]})]})};function oa(){const e=B("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function ia(){const t=B("theme")===N.WHITE,n=oa();return t?n.white:n.dark}function Zt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function aa(e){const[t,n]=R({currBalance:0,currency:"USD",details:[]}),[r,o]=R(!0),a=async()=>{try{const f=await Wn(),d=[{label:"",value:f.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:f.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...f.isCredit?[{label:"",value:f.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:f.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:f.availableAmount,color:"#1890ff",dot:"#15b36b"}],p={currBalance:f.currBalance,currency:f.currency,details:d};n(p),o(!1)}catch(f){console.error("获取余额失败:",f),o(!1)}};H(()=>{a()},[]),H(()=>{const f=()=>{a()};return window.addEventListener("refresh-balance",f),()=>{window.removeEventListener("refresh-balance",f)}},[]);const i=ia(),s=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return r?null:c(ra,{popover:c(Z,{children:[c("div",{style:i.popoverTitle,children:_("余额详情")}),s.map(f=>c("div",{style:i.detailRow,children:[c("span",{style:i.detailLabel,children:[c("span",{style:i.detailDot(f.dot)}),f.label]}),c("span",{style:i.detailValue(f.color),children:Zt(f.value)})]},f.label))]}),popoverPosition:e.popoverPosition||"bottom",children:c("div",{style:i.main,children:[Zt(t.currBalance),c("span",{style:i.currency,children:t.currency})]})})}qe(aa,"best-statistical-balance");const Ae={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function sa(e){return B("theme")===N.WHITE?{...Ae.white,background:e||Ae.white.background}:{...Ae.dark,background:e||Ae.dark.background}}function la(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function ca({color:e,size:t="medium",children:n}){const[r,o]=R(!1),a=sa(e),i=la(t),s={...a,...i,display:"flex",alignItems:"center"};return c(Z,{children:[c("style",{children:`
|
|
78
|
+
`,document.head.appendChild(n),t}function Kn({visible:e,onClose:t,title:n,children:r,width:o=re===l.SMALL?300:400,maxWidth:a=re===l.SMALL?300:400,showClose:i=!0,maskClosable:s=!0}){const[f,d]=R(!1),p=Li();H(()=>{wi(p)},[p]);const u=g=>{g.target===g.currentTarget?d(!0):d(!1)},x=g=>{g.target===g.currentTarget&&f&&s&&t(),d(!1)};return e?c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:p.mask,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999},onMouseDown:u,onMouseUp:x,children:c("div",{style:{background:p.modalBg,borderRadius:re===l.SMALL?8:12,minWidth:o,maxWidth:a,color:p.modalColor,boxShadow:p.modalBoxShadow,position:"relative",width:typeof o=="string"?o:`${o}px`,maxHeight:"90vh",display:"flex",flexDirection:"column"},onClick:g=>g.stopPropagation(),children:[c("div",{style:{position:"sticky",top:0,background:p.modalBg,borderRadius:re===l.SMALL?"8px 8px 0 0":"12px 12px 0 0",padding:re===l.SMALL?"24px 24px 0 24px":"32px 32px 0 32px",zIndex:1,borderBottom:`1px solid ${p.headerBorder}`},children:[i&&c("button",{type:"button",onClick:t,style:p.closeBtn,"aria-label":"关闭",children:"×"}),n&&c("div",{style:p.title,children:n})]}),c("div",{className:`modal-content ${p.scrollbarClass}`,style:{flex:1,overflowY:"auto",padding:re===l.SMALL?"16px 24px 24px 24px":"20px 32px 32px 32px"},children:r})]})}):null}function Ai(){const e=B("size");return{white:{tabBtn:(t,n)=>({flex:1,background:t?"#fff":"#F7F8FA",color:t?"#1890ff":"#222",border:"1px solid #F0F1F3",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.04)":"none",outline:"none",cursor:"pointer"})},dark:{tabBtn:(t,n)=>({flex:1,background:t?"#23262F":"#181A20",color:t?"#00E8C6":"#fff",border:"1px solid #444C5C",borderRadius:n?"8px 0 0 8px":"0 8px 8px 0",fontWeight:500,fontSize:e===l.SMALL?12:16,height:e===l.SMALL?32:48,boxShadow:t?"0 2px 8px 0 rgba(20,20,20,0.10)":"none",outline:"none",cursor:"pointer"})}}}function ki(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ai(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,tabBtn:(i,s)=>({...o.tabBtn(i,s),color:i?a.color:o.tabBtn(i,s).color})}}return o}const Ei=B("size");function vi({visible:e,onClose:t,onSubmit:n}){const[r,o]=R({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),[a,i]=R({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}),[s,f]=R("online"),d=ki();H(()=>{e||(f("online"),o({amount:"",rechargeChannel:"",currency:"USD",loading:!1,error:"",amountError:"",rechargeChannelError:"",currencyError:""}),i({platform:"",transactionId:"",files:[],platformError:"",transactionIdError:"",filesError:"",loading:!1}))},[e]);const p=async u=>{u.preventDefault();let x=!0;if(o(g=>({...g,amountError:"",rechargeChannelError:""})),r.amount.trim()||(o(g=>({...g,amountError:_("请输入充值金额")})),x=!1),r.rechargeChannel||(o(g=>({...g,rechargeChannelError:_("请选择支付平台")})),x=!1),!!x){o(g=>({...g,loading:!0,error:""}));try{await n({amount:r.amount,rechargeChannel:r.rechargeChannel,currency:r.currency}),t()}catch{o(g=>({...g,error:_("提交失败,请重试")}))}finally{o(g=>({...g,loading:!1}))}}};return c(Kn,{visible:e,onClose:t,title:_("充值 / 转账"),children:[c("div",{style:{display:"flex",marginBottom:Ei===l.SMALL?16:28},children:[c("button",{type:"button",onClick:()=>f("online"),style:d.tabBtn(s==="online",!0),children:_("在线充值")}),c("button",{type:"button",onClick:()=>f("offline"),style:d.tabBtn(s==="offline",!1),children:_("线下转账")})]}),c("div",{style:{display:s==="online"?"block":"none"},children:c("form",{onSubmit:p,children:c(hi,{formState:r,setFormState:o,onClose:t,loading:r.loading})})}),c("div",{style:{display:s==="offline"?"block":"none"},children:c(_i,{formState:a,setFormState:i,onClose:t,loading:a.loading})})]})}function gt(){return(gt=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 Ci=["context","children"];function Bi(e){this.getChildContext=function(){return e.context};var t=e.children,n=function(r,o){if(r==null)return{};var a,i,s={},f=Object.keys(r);for(i=0;i<f.length;i++)o.indexOf(a=f[i])>=0||(s[a]=r[a]);return s}(e,Ci);return fn(t,n)}function Ti(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=ie(Bi,gt({},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=[],a={},i=0,s=n.attributes,f=n.childNodes;for(i=s.length;i--;)s[i].name!=="slot"&&(a[s[i].name]=s[i].value,a[Xn(s[i].name)]=s[i].value);for(i=f.length;i--;){var d=t(f[i],null),p=f[i].slot;p?a[p]=ie(Kt,{name:p},d):o[i]=d}var u=r?ie(Kt,null,o):o;return ie(r||n.nodeName.toLowerCase(),a,u)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?un:Pe)(this._vdom,this._root)}function Xn(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function Mi(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[Xn(e)]=n,this._vdom=fn(this._vdom,r),Pe(this._vdom,this._root)}}function Ri(){Pe(this._vdom=null,this._root)}function Kt(e,t){var n=this;return ie("slot",gt({},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 qe(e,t,n,r){function o(){var a=Reflect.construct(HTMLElement,[],o);return a._vdomComponent=e,a._root=r&&r.shadow?a.attachShadow({mode:r.mode||"open"}):a,a}return(o.prototype=Object.create(HTMLElement.prototype)).constructor=o,o.prototype.connectedCallback=Ti,o.prototype.attributeChangedCallback=Mi,o.prototype.disconnectedCallback=Ri,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),o.observedAttributes=n,n.forEach(function(a){Object.defineProperty(o.prototype,a,{get:function(){return this._vdom.props[a]},set:function(i){this._vdom?this.attributeChangedCallback(a,null,i):(this._props||(this._props={}),this._props[a]=i,this.connectedCallback());var s=typeof i;i!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(a,i)}})}),customElements.define(t||e.tagName||e.displayName||e.name,o)}function Fi(){const[e,t]=R(!1),n=async r=>{const o=await Hn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return c("div",{children:[c(mt,{onClick:()=>t(!0),children:_("充值/转账")}),c(vi,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(Fi,"best-recharge",["theme"],{shadow:!1});function Ii(){const e=B("size"),t={wrapper:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:e===l.SMALL?12:20,alignItems:"start",minWidth:880,"@media (max-width: 1020px)":{gridTemplateColumns:"1fr",gap:16,minWidth:"auto",width:"100%"}},fieldLabel:{fontSize:e===l.SMALL?12:13,marginBottom:6,fontWeight:500,textAlign:"left"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13},inputWrapper:{position:"relative"},inputSuffix:{padding:"0 8px",fontSize:e===l.SMALL?12:13,opacity:.8},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},subTitle:{marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,fontWeight:600,textAlign:"left"},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}}};return{white:{...t,left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},right:{background:"#fff",borderRadius:8,padding:16},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #F0F1F3",background:"#F7F8FA",textAlign:"left"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 480px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#00E8C6",color:"#111",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:700,cursor:"pointer"},methodItem:n=>({padding:"10px 12px",textAlign:"left",borderRadius:8,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer"}),bankItem:{padding:"10px 12px",borderRadius:8,border:"1px solid #374151",background:"#23262F",textAlign:"left",color:"#fff"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1",fontSize:e===l.SMALL?12:13},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left",color:"#fff"},reminderList:{margin:0,paddingLeft:18,color:"#B5B8BE",lineHeight:1.6,textAlign:"left"}}}}function zi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ii(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Di(){const e=B("size"),t={left:{background:"#fff",borderRadius:8,padding:16,border:"1px solid #E5E6EB"},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},fieldLabel:{fontSize:e===l.SMALL?14:16,marginBottom:6,fontWeight:500,textAlign:"left"},required:{color:"#ff4d4f",marginRight:4},currencyRow:{display:"flex",gap:10,flexWrap:"wrap","@media (max-width: 600px)":{gap:8}},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#1890ff":"#E5E6EB"}`,color:n?"#1890ff":"#222",background:n?"#EEF7FF":"#fff",cursor:"pointer"}),inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},bizRateBox:{marginTop:6,color:"#666",fontSize:e===l.SMALL?12:13,textAlign:"left",lineHeight:1.6},bizRateStrong:{color:"#111",fontWeight:600},subTitle:{fontSize:e===l.SMALL?12:14,marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?8:10,textAlign:"left"},methodList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),channelIcon:{width:22,height:22,objectFit:"contain",marginRight:8,display:"inline-block"},bankList:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:10,"@media (max-width: 600px)":{gridTemplateColumns:"1fr",gap:8}},bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#1890ff":"#F0F1F3"}`,background:n?"#EEF7FF":"#F7F8FA",textAlign:"left",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,left:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},currencyItem:n=>({padding:"6px 12px",borderRadius:6,border:`1px solid ${n?"#00E8C6":"#374151"}`,color:n?"#00E8C6":"#fff",background:n?"#0F2824":"#23262F",cursor:"pointer"}),input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},bizRateBox:{...t.bizRateBox,color:"#B5B8BE"},bizRateStrong:{color:"#ff4d4f",fontWeight:600},methodItem:n=>({padding:"12px 16px",textAlign:"left",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44}),bankItem:n=>({padding:"12px 16px",borderRadius:10,border:`1px solid ${n?"#00E8C6":"#374151"}`,background:n?"#0F2824":"#23262F",textAlign:"left",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",gap:8,minHeight:44})}}}function Pi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Di(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},currencyItem:i=>({...o.currencyItem(i),border:`1px solid ${i?a.color:n?"#E5E6EB":"#374151"}`,color:i?a.color:n?"#222":"#fff"}),methodItem:i=>({...o.methodItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`}),bankItem:i=>({...o.bankItem(i),border:`1px solid ${i?a.color:n?"#F0F1F3":"#374151"}`})}}return o}function Oi({onChannelChange:e,onAmountChange:t,onCurrencyChange:n,initialAmount:r="",initialCurrency:o="USD",initialPaymentType:a="online",amountError:i=""}){const s=Pi(),[f,d]=R([]),[p,u]=R([]),[x,g]=R([]),[m,y]=R({currency:o,amount:r,onlineChannel:"",bankChannel:"",paymentType:a,amountError:""}),[h,S]=R(null),L=se(null),k=(w,F)=>{const U=w!==void 0?w:m.amount,$=F!==void 0?F:m.currency;if(!U||Number(U)<=0){S(null);return}L.current&&clearTimeout(L.current),L.current=window.setTimeout(()=>{Ko({currency:$,amount:U}).then(J=>S(J)).catch(()=>S(null))},300)};H(()=>{Jo().then(w=>{d(w||[])})},[]),H(()=>{Go({currency:m.currency}).then(w=>{const F=w.onlineChannel||[],U=w.offlineChannel||[];u(F),g(U);const $=F.length>0,J=U?.[0]?.value||"",Le=F?.[0]?.value||"",de=$?a:"bank",C=de==="online"?Le:J;y(M=>({...M,onlineChannel:Le,bankChannel:J,paymentType:de})),C&&e(C,de)})},[m.currency]);function E(w){return w=w.replace(/[^\d.]/g,""),w=w.replace(/\.(?=.*\.)/g,""),w=w.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),w=w.replace(/^0+(\d)/,"$1"),w.startsWith(".")&&(w="0"+w),w}const A=w=>{y(F=>({...F,currency:w})),n(w),k(void 0,w)},v=w=>{const F=E(w);y(U=>({...U,amount:F,amountError:""})),t(F),k(F)},O=(w,F)=>{y(U=>({...U,[F==="online"?"onlineChannel":"bankChannel"]:w,paymentType:F})),e(w,F),k()};return c("div",{style:s.left,children:[c("div",{style:s.blockTitle,children:[c("span",{style:s.titleBar}),_("选择支付方式")]}),c("div",{style:s.fieldLabel,children:_("支付币种")}),c("div",{style:s.currencyRow,children:(f||[]).slice(0,4).map(w=>c("button",{type:"button",onClick:()=>A(w.value),style:s.currencyItem(m.currency===w.value),children:w.label}))}),c("div",{style:{height:12}}),c("div",{style:s.fieldLabel,children:[c("span",{style:s.required,children:"*"}),_("支付金额")]}),c("div",{style:s.inputWrapper,children:[c("input",{type:"text",placeholder:_("请输入充值金额"),value:m.amount,onInput:w=>{v(w.target.value)},style:{...s.input,...i?s.inputError:{}}}),c("div",{style:s.inputSuffixAbs,children:m.currency})]}),i&&c("div",{style:s.error,children:i}),h&&h.consistent===!1&&c("div",{style:s.bizRateBox,children:[c("div",{children:_("您的支付币种与默认币种不一致,将转换为默认币种入账")}),c("div",{children:[_("目前汇率为:")," ",m.currency,_(`→${h.currency} = `),c("span",{style:s.bizRateStrong,children:h.exchangeRate})]}),c("div",{children:[_("钱包预计增加"),c("span",{style:s.bizRateStrong,children:[h.currency," ",h.amount]})]})]}),c("div",{style:{height:20}}),c("div",{style:s.fieldLabel,children:_("支付方式")}),p.length>0&&c("div",{children:[c("div",{style:s.subTitle,children:_("线上支付")}),c("div",{style:s.methodList,children:p.map(w=>c("button",{type:"button",onClick:()=>O(w.value,"online"),style:s.methodItem(m.onlineChannel===w.value&&m.paymentType==="online"),children:[w.icon&&c("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]}),c("div",{style:s.subTitle,children:_("银行转账")}),c("div",{style:s.bankList,children:x.map(w=>c("button",{type:"button",onClick:()=>O(w.value,"bank"),style:s.bankItem(m.bankChannel===w.value&&m.paymentType==="bank"),children:[w.icon&&c("img",{src:w.icon,alt:w.label,style:s.channelIcon}),w.label]}))})]})}function Ni(){const e=B("size"),t={right:{background:"#fff",borderRadius:8,padding:16},blockTitle:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?12:16,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,outline:"none",border:"1px solid",boxSizing:"border-box",paddingRight:e===l.SMALL?48:64},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},inputSuffixAbs:{position:"absolute",top:0,right:e===l.SMALL?10:12,height:"100%",display:"flex",alignItems:"center",color:"#999",pointerEvents:"none",fontSize:e===l.SMALL?12:13},payButton:{width:"100%",marginTop:e===l.SMALL?10:14,marginBottom:e===l.SMALL?12:16,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"8px 12px":"12px 16px",fontWeight:600,cursor:"pointer"},noticeBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?12:16,padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13},calcBox:{marginTop:e===l.SMALL?8:12,marginBottom:e===l.SMALL?8:12,color:"#666",textAlign:"left",lineHeight:1.6,fontSize:e===l.SMALL?12:13},calcLine:{marginBottom:4},calcAmount:{color:"#ff4d4f",fontWeight:700,margin:"0 4px"},reminderTitle:{fontWeight:600,margin:"6px 0",textAlign:"left"},reminderList:{margin:0,paddingLeft:18,color:"#6b7280",lineHeight:1.6,textAlign:"left",listStyleType:"disc",listStylePosition:"outside"},listItem:{listStyleType:"disc",listStylePosition:"outside"},error:{color:"#ff4d4f",marginTop:6,fontSize:e===l.SMALL?12:13}};return{white:{...t,input:{...t.input,border:"1px solid #E5E6EB",background:"#fff",color:"#222"}},dark:{...t,right:{background:"#181A20",borderRadius:8,padding:16,border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},payButton:{...t.payButton,background:"#00E8C6",color:"#111",fontWeight:700},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},calcBox:{...t.calcBox,color:"#B5B8BE"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"}}}}function Ui(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Ni(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,payButton:{...o.payButton,background:a.color},titleBar:{...o.titleBar,background:a.color}}}return o}function $i({onSubmit:e,amount:t,currency:n,channel:r,loading:o=!1,error:a="",onAmountError:i}){const s=Ui(),f=s.right.background==="#181A20",[d,p]=R({amount:t,currency:n,channel:r,loading:o,error:a,amountError:""}),[u,x]=R(null);H(()=>{p(y=>({...y,amount:t,currency:n,channel:r,loading:o,error:a}));const m=setTimeout(()=>{t&&r&&n?jn({channel:r,amount:t,currency:n}).then(y=>x(y)).catch(()=>x(null)):x(null)},300);return()=>clearTimeout(m)},[t,n,r,o,a]);const g=async m=>{m&&m.preventDefault();let y=!0;if(t.trim()||(y=!1,i?.(_("请输入充值金额"))),r||(y=!1,p(h=>({...h,error:_("请选择支付平台")}))),!!y){p(h=>({...h,loading:!0,error:""}));try{await e({amount:t,currency:n,rechargeChannel:r})}finally{p(h=>({...h,loading:!1}))}}};return c("div",{style:s.right,children:[c("div",{style:s.blockTitle,children:[c("span",{style:s.titleBar}),_("在线支付")]}),c("form",{onSubmit:g,children:[c("div",{style:s.inputWrapper,children:[c("input",{type:"text",placeholder:_("支付金额"),value:d.amount,readOnly:!0,disabled:!0,style:{...s.input,...f?s.disabledDark:s.disabled,width:"100%"}}),c("div",{style:s.inputSuffixAbs,children:d.currency})]}),c("button",{type:"submit",disabled:d.loading,style:s.payButton,children:d.loading?_("提交中..."):_("立即支付")})]}),u&&c("div",{style:s.calcBox,children:[c("div",{style:s.calcLine,children:[_("预计支付金额约为:"),c("span",{style:s.calcAmount,children:`$${u.paymentAmount}`}),u.currency]}),c("div",{style:s.calcLine,children:[_("手续费约为:"),c("span",{style:s.calcAmount,children:`$${u.fee}`}),u.currency]}),c("div",{children:_("注:地区/币种/卡类型可能影响手续费,最终以平台为准。")})]}),c("div",{style:s.noticeBox,children:_("请在转账后提交银行回单,否则可能无法及时核验")}),c("div",{style:s.reminderTitle,children:_("温馨提示")}),c("ul",{style:s.reminderList,children:[c("li",{children:_("创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码")}),c("li",{children:_("请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。")}),c("li",{children:_("请上传交易凭证,否则无法核验并及时添加余额。")}),c("li",{children:_("提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。")}),c("li",{children:_("通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。")}),c("li",{children:_("广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。")}),c("li",{children:_("如有问题,请联系客服。")})]}),d.error&&c("div",{style:s.error,children:d.error})]})}function Wi(){const e=B("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?14:16,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{padding:e===l.SMALL?12:16}},header:{marginBottom:e===l.SMALL?16:20},backButton:{display:"flex",alignItems:"center",gap:8,background:"none",border:"none",color:"#1890ff",cursor:"pointer",fontSize:e===l.SMALL?13:14,fontWeight:500},backIcon:{fontSize:e===l.SMALL?16:18},uploadSection:{marginBottom:e===l.SMALL?18:24},uploadArea:{border:"2px dashed #D9D9D9",borderRadius:8,padding:e===l.SMALL?"30px 16px":"40px 20px",textAlign:"center",cursor:"pointer",background:"#FAFAFA",transition:"all 0.3s ease",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{padding:e===l.SMALL?"30px 15px":"40px 20px"}},uploadIcon:{fontSize:e===l.SMALL?40:52,marginBottom:e===l.SMALL?10:12},uploadTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?6:10},uploadHint:{fontSize:e===l.SMALL?12:13,color:"#999"},hiddenInput:{display:"none"},fileList:{marginTop:e===l.SMALL?10:12},fileItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:e===l.SMALL?"6px 10px":"8px 12px",background:"#F5F5F5",borderRadius:6,marginBottom:6},fileName:{fontSize:e===l.SMALL?12:13,color:"#222"},removeButton:{background:"#ff4d4f",color:"#fff",border:"none",borderRadius:"50%",width:20,height:20,cursor:"pointer",fontSize:12,display:"flex",alignItems:"center",justifyContent:"center"},fieldSection:{marginBottom:e===l.SMALL?12:16},radioGroup:{display:"flex",alignItems:"center",gap:e===l.SMALL?16:20,flexWrap:"wrap"},radioOption:{display:"inline-flex",alignItems:"center",gap:6,color:"#222",fontSize:e===l.SMALL?13:14,cursor:"pointer"},subBizGrid:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:e===l.SMALL?10:12,width:"100%","@media (max-width: 600px)":{gridTemplateColumns:"1fr"}},subBizField:{minWidth:0},subBizHint:{marginTop:8,color:"#666",fontSize:e===l.SMALL?12:13},fieldLabel:{display:"block",fontSize:e===l.SMALL?13:14,fontWeight:500,color:"#222",marginBottom:e===l.SMALL?6:10},required:{color:"#ff4d4f",marginRight:4},inputWrapper:{position:"relative"},input:{width:"100%",padding:e===l.SMALL?"8px 10px":"10px 12px",borderRadius:6,border:"1px solid #D9D9D9",outline:"none",fontSize:14,boxSizing:"border-box"},inputError:{border:"1px solid #ff4d4f"},disabled:{backgroundColor:"#f5f5f5",color:"#999",cursor:"not-allowed"},disabledDark:{backgroundColor:"#1A1D23",color:"#6B7280",cursor:"not-allowed",border:"1px solid #374151"},calendarIcon:{position:"absolute",right:e===l.SMALL?8:10,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,pointerEvents:"none"},currencySuffix:{position:"absolute",right:e===l.SMALL?10:12,top:"50%",transform:"translateY(-50%)",fontSize:e===l.SMALL?12:14,color:"#999",pointerEvents:"none"},buttonSection:{display:"flex",gap:e===l.SMALL?10:12,marginTop:e===l.SMALL?24:32,width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",gap:e===l.SMALL?8:12}},cancelButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"1px solid #D9D9D9",background:"#fff",color:"#222",fontSize:e===l.SMALL?12:14,fontWeight:500,cursor:"pointer",minWidth:0,boxSizing:"border-box"},submitButton:{flex:1,padding:e===l.SMALL?"8px 12px":"10px 16px",borderRadius:6,border:"none",background:"#1890ff",color:"#fff",fontSize:e===l.SMALL?12:14,fontWeight:600,cursor:"pointer",minWidth:0,boxSizing:"border-box"},error:{color:"#ff4d4f",fontSize:e===l.SMALL?12:13,marginTop:6}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},backButton:{...t.backButton,color:"#00E8C6"},uploadArea:{...t.uploadArea,border:"2px dashed #374151",background:"#23262F"},uploadTitle:{...t.uploadTitle,color:"#fff"},uploadHint:{...t.uploadHint,color:"#B5B8BE"},fileItem:{...t.fileItem,background:"#2B2E38"},fileName:{...t.fileName,color:"#fff"},fieldLabel:{...t.fieldLabel,color:"#fff"},radioOption:{...t.radioOption,color:"#fff"},subBizHint:{...t.subBizHint,color:"#B5B8BE"},input:{...t.input,border:"1px solid #374151",background:"#23262F",color:"#fff"},calendarIcon:{...t.calendarIcon,color:"#B5B8BE"},currencySuffix:{...t.currencySuffix,color:"#B5B8BE"},cancelButton:{...t.cancelButton,border:"1px solid #374151",background:"#23262F",color:"#fff"},submitButton:{...t.submitButton,background:"#00E8C6",color:"#111"}}}}function Hi(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=Wi(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,backButton:{...o.backButton,color:a.color},submitButton:{...o.submitButton,background:a.color}}}return o}const ji="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1760084950168'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6759'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M932.579556%20137.272889h-192V64.142222a9.159111%209.159111%200%200%200-9.130667-9.159111h-64a9.159111%209.159111%200%200%200-9.159111%209.159111v73.130667H365.738667V64.142222a9.159111%209.159111%200%200%200-9.159111-9.159111h-64a9.159111%209.159111%200%200%200-9.130667%209.159111v73.130667h-192c-20.224%200-36.579556%2016.355556-36.579556%2036.579555v758.869334c0%2020.195556%2016.355556%2036.551111%2036.579556%2036.551111h841.130667c20.252444%200%2036.579556-16.327111%2036.579555-36.551111V173.852444c0-20.224-16.355556-36.579556-36.579555-36.579555zM886.897778%20887.011556H137.159111V452.693333H886.897778v434.261334z%20m-749.710222-512V219.534222h146.289777v54.869334c0%205.034667%204.124444%209.130667%209.130667%209.130666h64a9.159111%209.159111%200%200%200%209.159111-9.130666V219.562667h292.551111v54.869333c0%205.034667%204.124444%209.130667%209.159111%209.130667h64a9.159111%209.159111%200%200%200%209.130667-9.130667V219.562667h146.289778v155.448889H137.159111z'%20p-id='6760'%3e%3c/path%3e%3c/svg%3e";function qi(){const e=B("theme"),t=B("themeConfig"),n={container:{position:"relative",display:"inline-block"},input:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",backgroundColor:"#fff",cursor:"pointer",transition:"all 0.3s",outline:"none",fontSize:"14px",lineHeight:"1.5715",color:"rgba(0, 0, 0, 0.85)"},inputText:{flex:1,textAlign:"left",color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",marginLeft:"8px",width:16,height:16,objectFit:"contain",display:"inline-block"},disabled:{backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)",cursor:"not-allowed"},panel:{position:"absolute",top:"100%",left:0,zIndex:1050,backgroundColor:"#fff",border:"1px solid #d9d9d9",borderRadius:"6px",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",padding:"8px",minWidth:"280px",marginTop:"4px"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",marginBottom:"8px"},navButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"16px",color:"rgba(0, 0, 0, 0.45)",transition:"all 0.3s"},monthYear:{fontSize:"16px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},weekHeader:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px",marginBottom:"8px"},weekDay:{display:"flex",alignItems:"center",justifyContent:"center",height:"32px",fontSize:"14px",fontWeight:500,color:"rgba(0, 0, 0, 0.85)"},calendarGrid:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:"4px"},dayButton:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{color:"rgba(0, 0, 0, 0.25)"},dayToday:{fontWeight:600,color:"#1890ff"},daySelected:{backgroundColor:"#1890ff",color:"#fff"},yearPicker:{maxHeight:"200px",overflowY:"auto",marginBottom:"8px",border:"1px solid #f0f0f0",borderRadius:"4px",padding:"8px"},yearGrid:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"4px"},yearButton:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",border:"none",backgroundColor:"transparent",cursor:"pointer",borderRadius:"4px",fontSize:"14px",transition:"all 0.3s",color:"rgba(0, 0, 0, 0.85)"},yearSelected:{backgroundColor:"#1890ff",color:"#fff"},small:{padding:"4px 8px",fontSize:"12px"},middle:{padding:"8px 12px",fontSize:"14px"},large:{padding:"12px 16px",fontSize:"16px"}},r={white:{...n,input:{...n.input,border:"1px solid #d9d9d9",backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.85)"},inputText:{...n.inputText,color:"rgba(0, 0, 0, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(0, 0, 0, 0.45)"},disabled:{...n.disabled,backgroundColor:"#f5f5f5",color:"rgba(0, 0, 0, 0.25)"},panel:{...n.panel,backgroundColor:"#fff",border:"1px solid #d9d9d9"},navButton:{...n.navButton,color:"rgba(0, 0, 0, 0.45)"},monthYear:{...n.monthYear,color:"rgba(0, 0, 0, 0.85)"},weekDay:{...n.weekDay,color:"rgba(0, 0, 0, 0.85)"},dayButton:{...n.dayButton,color:"rgba(0, 0, 0, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(0, 0, 0, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(0, 0, 0, 0.25)"},dayToday:{...n.dayToday,color:"#1890ff"},daySelected:{...n.daySelected,backgroundColor:"#1890ff",color:"#fff"},yearPicker:{...n.yearPicker,border:"1px solid #f0f0f0"},yearButton:{...n.yearButton,color:"rgba(0, 0, 0, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#1890ff",color:"#fff"}},dark:{...n,input:{...n.input,border:"1px solid #434343",backgroundColor:"#141414",color:"rgba(255, 255, 255, 0.85)"},inputText:{...n.inputText,color:"rgba(255, 255, 255, 0.85)"},calendarIcon:{...n.calendarIcon,color:"rgba(255, 255, 255, 0.45)"},disabled:{...n.disabled,backgroundColor:"#262626",color:"rgba(255, 255, 255, 0.25)"},panel:{...n.panel,backgroundColor:"#141414",border:"1px solid #434343"},navButton:{...n.navButton,color:"rgba(255, 255, 255, 0.45)"},monthYear:{...n.monthYear,color:"rgba(255, 255, 255, 0.85)"},weekDay:{...n.weekDay,color:"rgba(255, 255, 255, 0.85)"},dayButton:{...n.dayButton,color:"rgba(255, 255, 255, 0.85)"},dayCurrentMonth:{...n.dayCurrentMonth,color:"rgba(255, 255, 255, 0.85)"},dayOtherMonth:{...n.dayOtherMonth,color:"rgba(255, 255, 255, 0.25)"},dayToday:{...n.dayToday,color:"#00E8C6"},daySelected:{...n.daySelected,backgroundColor:"#00E8C6",color:"#111"},yearPicker:{...n.yearPicker,border:"1px solid #434343"},yearButton:{...n.yearButton,color:"rgba(255, 255, 255, 0.85)"},yearSelected:{...n.yearSelected,backgroundColor:"#00E8C6",color:"#111"}}},o=r[e]||r.white,a=t?.[e]?.color;return a&&(o.dayToday.color=a,o.daySelected.backgroundColor=a,o.yearSelected.backgroundColor=a,e==="dark"&&(o.daySelected.color="#111",o.yearSelected.color="#111")),o}function Vi(){return qi()}function Ji({value:e="",placeholder:t=_("请选择日期"),disabled:n=!1,size:r="middle",onChange:o,onFocus:a,onBlur:i,className:s="",style:f={}}){const d=Vi(),[p,u]=R(!1),[x,g]=R(e),[m,y]=R(new Date),[h,S]=R(!1),L=se(null),k=C=>{if(!C)return"";const M=new Date(C);return`${M.getFullYear()}-${String(M.getMonth()+1).padStart(2,"0")}-${String(M.getDate()).padStart(2,"0")}`},E=(C,M)=>new Date(C,M+1,0).getDate(),A=(C,M)=>new Date(C,M,1).getDay(),v=()=>{const C=m.getFullYear(),M=m.getMonth(),ue=E(C,M),Zn=A(C,M),fe=[],bt=M===0?11:M-1,yt=M===0?C-1:C,xt=E(yt,bt);for(let j=Zn-1;j>=0;j--)fe.push({date:xt-j,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${yt}-${String(bt+1).padStart(2,"0")}-${String(xt-j).padStart(2,"0")}`});const Qn=new Date,_t=x?new Date(x):null;for(let j=1;j<=ue;j++){const St=`${C}-${String(M+1).padStart(2,"0")}-${String(j).padStart(2,"0")}`,Lt=new Date(St);fe.push({date:j,isCurrentMonth:!0,isToday:Lt.toDateString()===Qn.toDateString(),isSelected:_t&&Lt.toDateString()===_t.toDateString(),fullDate:St})}const er=M===11?0:M+1,tr=M===11?C+1:C,nr=42-fe.length;for(let j=1;j<=nr;j++)fe.push({date:j,isCurrentMonth:!1,isToday:!1,isSelected:!1,fullDate:`${tr}-${String(er+1).padStart(2,"0")}-${String(j).padStart(2,"0")}`});return fe},O=C=>{g(C),u(!1),o?.(C)},w=C=>{const M=new Date(m);C==="prev"?M.setMonth(M.getMonth()-1):M.setMonth(M.getMonth()+1),y(M)},F=C=>{const M=new Date(m);C==="prev"?M.setFullYear(M.getFullYear()-1):M.setFullYear(M.getFullYear()+1),y(M)},U=C=>{const M=new Date(m);M.setFullYear(C),y(M),S(!1)},$=()=>{const C=new Date().getFullYear(),M=[];for(let ue=C-50;ue<=C+50;ue++)M.push(ue);return M};H(()=>{const C=M=>{L.current&&!L.current.contains(M.target)&&u(!1)};if(p)return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[p]);const J=v(),Le=[_("一月"),_("二月"),_("三月"),_("四月"),_("五月"),_("六月"),_("七月"),_("八月"),_("九月"),_("十月"),_("十一月"),_("十二月")],de=[_("日"),_("一"),_("二"),_("三"),_("四"),_("五"),_("六")];return c("div",{ref:L,className:`date-picker-container ${s}`,style:{...d.container,...f},children:[c("div",{style:{...d.input,...d[r],...n?d.disabled:{}},onClick:()=>!n&&u(!p),onFocus:a,onBlur:i,children:[c("span",{style:d.inputText,children:x?k(x):t}),c("img",{src:ji,alt:"calendar",style:d.calendarIcon})]}),p&&c("div",{style:d.panel,children:[c("div",{style:d.header,children:[c("button",{type:"button",style:d.navButton,onClick:()=>F("prev"),children:"‹‹"}),c("button",{type:"button",style:d.navButton,onClick:()=>w("prev"),children:"‹"}),c("span",{style:d.monthYear,onClick:()=>S(!h),children:[m.getFullYear()," ",_("年")," ",Le[m.getMonth()]]}),c("button",{type:"button",style:d.navButton,onClick:()=>w("next"),children:"›"}),c("button",{type:"button",style:d.navButton,onClick:()=>F("next"),children:"››"})]}),h&&c("div",{style:d.yearPicker,children:c("div",{style:d.yearGrid,children:$().map(C=>c("button",{type:"button",style:{...d.yearButton,...C===m.getFullYear()?d.yearSelected:{}},onClick:()=>U(C),children:C},C))})}),c("div",{style:d.weekHeader,children:de.map(C=>c("div",{style:d.weekDay,children:C},C))}),c("div",{style:d.calendarGrid,children:J.map((C,M)=>c("button",{type:"button",style:{...d.dayButton,...C.isCurrentMonth?d.dayCurrentMonth:d.dayOtherMonth,...C.isToday?d.dayToday:{},...C.isSelected?d.daySelected:{}},onClick:()=>O(C.fullDate),disabled:n,children:C.date},M))})]})]})}function at(e){return e==="ad"?"Advertising":e==="fulfill"?"Fulfillment":e==="chargewipe"?"ChargeWipe":e}function Yi(e){const t=_("请输入"),n=at(e);return/[A-Za-z]$/.test(t)?`${t} ${n}`:`${t}${n}`}function Gi(e){let t=e.replace(/[^\d.]/g,"");return t=t.replace(/\.(?=.*\.)/g,""),t=t.replace(/^(\d+)(\.\d{0,2})?.*$/,"$1$2"),t=t.replace(/^0+(\d)/,"$1"),t.startsWith(".")&&(t=`0${t}`),t}function Ki(e){return e.toFixed(2).replace(/\.?0+$/,"")}function Xi(){const[e,t]=R([]),[n,r]=R(!1),[o,a]=R({}),[i,s]=R("");return H(()=>{let x=!0;const g=h=>{x&&(t(h),a(S=>h.reduce((L,k)=>({...L,[k.bizType]:S[k.bizType]||""}),{})))},m=JSON.parse(sessionStorage.getItem("balanceData")||"{}"),y=Array.isArray(m?.merchantBalances)?m.merchantBalances:[];return y.length>0&&g(y),Vn().then(h=>{g(Array.isArray(h?.merchantBalances)?h.merchantBalances:[])}).catch(()=>{y.length===0&&g([])}),()=>{x=!1}},[]),H(()=>{e.length<=1&&(r(!1),s(""))},[e.length]),{subBusinesses:e,useFundAllocation:n,subBizPercentages:o,subBizError:i,setUseFundAllocation:x=>{r(x),s("")},setSubBizPercentage:(x,g)=>{a(m=>{const y={...m,[x]:g};if(e.length===2){const h=e.find(L=>L.bizType!==x),S=Number(g);h&&(y[h.bizType]=g.trim()&&!Number.isNaN(S)&&S>=0&&S<=100?Ki(100-S):"")}return y}),s("")},validateFundAllocation:()=>{if(!n||e.length<=1)return!0;const x=e.some(y=>!o[y.bizType]?.trim()),g=e.some(y=>{const h=Number(o[y.bizType]);return Number.isNaN(h)||h<0||h>100}),m=e.reduce((y,h)=>y+Number(o[h.bizType]||0),0);return x?(s(_("请输入子业务占比")),!1):g||Math.abs(m-100)>1e-4?(s(_("子业务占比总和必须为100%")),!1):(s(""),!0)},buildAllocationRatios:()=>!n||e.length<=1?[]:e.map(x=>({fundBalanceId:x.fundBalanceId,bizType:x.bizType,ratio:String(o[x.bizType]||"")}))}}function Zi({theme:e,useFundAllocation:t,subBusinesses:n,subBizPercentages:r,subBizError:o,onUseFundAllocationChange:a,onPercentageChange:i}){return n.length<=1?null:c(Z,{children:[c("div",{style:e.fieldSection,children:[c("label",{style:e.fieldLabel,children:_("是否使用资金分配")}),c("div",{style:e.radioGroup,children:[c("label",{style:e.radioOption,children:[c("input",{type:"radio",name:"useFundAllocation",checked:t,onChange:()=>a(!0)}),c("span",{children:_("是")})]}),c("label",{style:e.radioOption,children:[c("input",{type:"radio",name:"useFundAllocation",checked:!t,onChange:()=>a(!1)}),c("span",{children:_("否")})]})]})]}),t&&n.length>0&&c("div",{style:e.fieldSection,children:[c("div",{style:e.subBizGrid,children:n.map(s=>c("div",{style:e.subBizField,children:[c("label",{style:e.fieldLabel,children:[at(s.bizType)," (%)"]}),c("input",{type:"text",inputMode:"decimal",placeholder:Yi(s.bizType),value:r[s.bizType]||"",onInput:f=>{i(s.bizType,Gi(f.target.value))},style:{...e.input,...o?e.inputError:{}}})]},s.fundBalanceId||s.bizType))}),c("div",{style:e.subBizHint,children:`${n.map(s=>at(s.bizType)).join(" + ")} ${_("must total 100%")}`}),o&&c("div",{style:e.error,children:o})]})]})}function Qi({onBack:e,onCancel:t,currency:n="USD",amount:r="",channel:o="",onAmountError:a}){const i=Hi(),s=i.container.background==="#181A20",{subBusinesses:f,useFundAllocation:d,subBizPercentages:p,subBizError:u,setUseFundAllocation:x,setSubBizPercentage:g,validateFundAllocation:m,buildAllocationRatios:y}=Xi(),h=new Date,S=`${h.getFullYear()}-${String(h.getMonth()+1).padStart(2,"0")}-${String(h.getDate()).padStart(2,"0")}`,[L,k]=R({urls:[],transferTime:S,transferAmount:r,transactionId:"",payerName:"",filesError:"",timeError:"",amountError:"",transactionIdError:"",payerNameError:""});H(()=>{k(A=>({...A,transferAmount:r}))},[r]);const E=async()=>{let A=!0;if(L.urls.length===0&&(A=!1,k(v=>({...v,filesError:_("请上传银行转账回单")}))),L.transferTime||(A=!1,k(v=>({...v,timeError:_("请选择转账时间")}))),r.trim()||(A=!1,a?.(_("请输入充值金额"))),L.transactionId.trim()||(A=!1,k(v=>({...v,transactionIdError:_("请输入转账交易ID")}))),L.payerName.trim()||(A=!1,k(v=>({...v,payerNameError:_("请输入付款人名称")}))),m()||(A=!1),!!A)try{await Wn({transferDate:L.transferTime,transferNo:L.transactionId,transferChannel:o,voucherUrls:L.urls,payerName:L.payerName,submitAmount:r,submitCurrency:n,useFundAllocation:d,allocationRatios:y()}),ze.success(_("提交成功")),t()}finally{k(v=>({...v,loading:!1}))}};return c("div",{style:i.container,children:[c("div",{style:i.header,children:c("button",{type:"button",onClick:e,style:i.backButton,children:[c("span",{style:i.backIcon,children:"←"}),_("返回账户信息")]})}),c("div",{style:i.uploadSection,children:[c(Gn,{value:L.urls,onChange:A=>{k(v=>({...v,urls:A,filesError:""}))},maxCount:10,accept:"image/*,.pdf",multiple:!0}),L.filesError&&c("div",{style:i.error,children:L.filesError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("转账时间")]}),c(Ji,{value:L.transferTime,placeholder:_("请选择转账时间"),onChange:A=>{k(v=>({...v,transferTime:A,timeError:""}))},style:{width:"100%"}}),L.timeError&&c("div",{style:i.error,children:L.timeError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:_("转账金额")}),c("div",{style:i.inputWrapper,children:[c("input",{type:"text",placeholder:_("请输入实际转账金额"),value:L.transferAmount,readOnly:!0,disabled:!0,style:{...i.input,...s?i.disabledDark:i.disabled}}),c("span",{style:i.currencySuffix,children:n})]})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("交易ID")]}),c("input",{type:"text",placeholder:_("请输入转账交易ID"),value:L.transactionId,onChange:A=>{k(v=>({...v,transactionId:A.target.value,transactionIdError:""}))},style:{...i.input,...L.transactionIdError?i.inputError:{}}}),L.transactionIdError&&c("div",{style:i.error,children:L.transactionIdError})]}),c("div",{style:i.fieldSection,children:[c("label",{style:i.fieldLabel,children:[c("span",{style:i.required,children:"*"}),_("付款人名称")]}),c("input",{type:"text",placeholder:_("请输入付款人名称"),value:L.payerName,onChange:A=>{k(v=>({...v,payerName:A.target.value,payerNameError:""}))},style:{...i.input,...L.payerNameError?i.inputError:{}}}),L.payerNameError&&c("div",{style:i.error,children:L.payerNameError})]}),c(Zi,{theme:i,useFundAllocation:d,subBusinesses:f,subBizPercentages:p,subBizError:u,onUseFundAllocationChange:x,onPercentageChange:g}),c("div",{style:i.buttonSection,children:[c("button",{type:"button",onClick:t,style:i.cancelButton,children:_("取消")}),c("button",{type:"button",onClick:E,style:i.submitButton,children:_("提交审核")})]})]})}function ea(){const e=B("size"),t={container:{background:"#fff",borderRadius:8,padding:e===l.SMALL?16:20,width:"100%",maxWidth:"100%",boxSizing:"border-box","@media (max-width: 1020px)":{maxWidth:"100%",margin:0,padding:e===l.SMALL?12:16},"@media (min-width: 1021px)":{maxWidth:600,margin:"0 auto"}},header:{fontSize:e===l.SMALL?16:18,fontWeight:700,marginBottom:e===l.SMALL?16:20,textAlign:"left",display:"flex",alignItems:"center",gap:8},titleBar:{width:3,height:e===l.SMALL?16:20,background:"#1890ff",borderRadius:2},bankDetails:{marginBottom:e===l.SMALL?20:24},detailCard:{marginTop:12,marginBottom:12,border:"1px solid #f0f0f0",borderRadius:8,background:"#fafafa",overflow:"hidden"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"8px 0":"10px 0",borderBottom:"1px solid #f0f0f0",width:"100%",boxSizing:"border-box","@media (max-width: 600px)":{flexDirection:"column",alignItems:"flex-start",gap:4}},label:{fontSize:e===l.SMALL?13:14,color:"#666",fontWeight:500,minWidth:120,"@media (max-width: 600px)":{minWidth:"auto",marginBottom:2}},value:{fontSize:e===l.SMALL?13:14,color:"#222",fontWeight:500,textAlign:"right",flex:1,"@media (max-width: 600px)":{textAlign:"left",flex:"none",width:"100%"}},valueWithCopy:{display:"flex",alignItems:"center",gap:8,flex:1,justifyContent:"flex-end",minWidth:0,"@media (max-width: 600px)":{flex:"none",width:"100%",justifyContent:"flex-start"}},row:{display:"flex",alignItems:"center",padding:"10px 12px",borderBottom:"1px solid #ededed"},rowLast:{borderBottom:"none"},rowAlt:{background:"#fafafa"},labelMuted:{fontSize:e===l.SMALL?13:14,color:"#8c8c8c",fontWeight:500,flex:.4},valueStrong:{fontSize:e===l.SMALL?13:14,color:"#111",textAlign:"right",flex:.6,wordBreak:"break-all"},copyButton:{padding:e===l.SMALL?"4px 8px":"6px 12px",fontSize:e===l.SMALL?11:12,background:"#1890ff",color:"#fff",border:"none",borderRadius:4,cursor:"pointer",fontWeight:500,flexShrink:0,whiteSpace:"nowrap"},confirmButton:{width:"100%",marginBottom:e===l.SMALL?16:20,background:"#1890ff",color:"#fff",border:"none",borderRadius:6,padding:e===l.SMALL?"10px 12px":"12px 16px",fontWeight:600,cursor:"pointer",fontSize:e===l.SMALL?13:14},noticeBox:{marginBottom:e===l.SMALL?16:20,padding:e===l.SMALL?"10px 12px":"12px 16px",borderRadius:6,background:"#FFF7E6",border:"1px solid #FFE7BA",color:"#AD6800",fontSize:e===l.SMALL?12:13,lineHeight:1.5},reminderTitle:{fontWeight:600,marginBottom:e===l.SMALL?8:12,textAlign:"left",fontSize:e===l.SMALL?14:16},reminderList:{margin:0,paddingLeft:18,color:"#666",lineHeight:1.6,textAlign:"left",fontSize:e===l.SMALL?12:13,listStyleType:"disc",listStylePosition:"outside"},link:{color:"#1890ff",textDecoration:"none",fontWeight:500}};return{white:{...t},dark:{...t,container:{...t.container,background:"#181A20",border:"1px solid #2B2E38"},titleBar:{...t.titleBar,background:"#00E8C6"},detailCard:{...t.detailCard,border:"1px solid #374151",background:"#23262F"},row:{...t.row,borderBottom:"1px solid #374151",background:"#23262F"},rowAlt:{...t.rowAlt,borderBottom:"1px solid #374151",background:"#23262F"},rowLast:{...t.rowLast,background:"#23262F"},labelMuted:{...t.labelMuted,color:"#B5B8BE"},valueStrong:{...t.valueStrong,color:"#fff"},label:{...t.label,color:"#B5B8BE"},value:{...t.value,color:"#fff"},copyButton:{...t.copyButton,background:"#00E8C6",color:"#111"},confirmButton:{...t.confirmButton,background:"#00E8C6",color:"#111"},noticeBox:{...t.noticeBox,background:"#2A1F0F",border:"1px solid #5C3E12",color:"#F4E3C1"},reminderTitle:{...t.reminderTitle,color:"#fff"},reminderList:{...t.reminderList,color:"#B5B8BE"},link:{...t.link,color:"#00E8C6"}}}}function ta(){const e=B("theme"),t=B("themeConfig"),n=e===N.WHITE,r=ea(),o=n?r.white:r.dark;if(t){const a=n?t.white:t.dark;if(a?.color)return{...o,titleBar:{...o.titleBar,background:a.color},copyButton:{...o.copyButton,background:a.color},confirmButton:{...o.confirmButton,background:a.color},link:{...o.link,color:a.color}}}return o}function na({onConfirm:e,channelCode:t}){const n=ta(),[r,o]=R([]),a=B("merchantId"),i={color:"#ff4d4f",fontWeight:600};return H(()=>{if(!t)return;let s=!0;return qn({code:t}).then(f=>{if(s){if(Array.isArray(f)){o(f.map(d=>String(d)));return}if(f&&typeof f=="object"){const d=[];Object.keys(f).forEach(p=>{const u=f[p];d.push(`${p}: ${u}`)}),o(d);return}o(f?[String(f)]:[])}}).catch(()=>o([])),()=>{s=!1}},[t]),c("div",{style:n.container,children:[c("div",{style:n.header,children:[c("span",{style:n.titleBar}),_("银行转账")]}),r.length>0&&c("div",{style:n.detailCard,children:r.map((s,f)=>{const d=String(s).split(":"),p=d.shift()?.trim()||"",u=d.join(":").trim();return c("div",{style:{...n.row,...f===r.length-1?n.rowLast:{},...f%2===1?n.rowAlt:{}},children:[c("div",{style:n.labelMuted,children:p}),c("div",{style:n.valueStrong,children:u||"-"})]},f)})}),c("button",{type:"button",onClick:e,style:n.confirmButton,children:_("确认转账详情")}),c("div",{style:n.noticeBox,children:_("转账后提交银行回单提示")}),c("div",{style:n.reminderTitle,children:_("温馨提示")}),c("ul",{style:n.reminderList,children:[c("li",{children:[_("我们强烈建议,转账时在备注中输入您的ID:"),c("span",{style:i,children:a}),_("。这可以"),c("span",{style:i,children:_("加速资金审核")}),Yn()===xe.ZH?"。":"."]}),c("li",{children:_("创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码")}),c("li",{children:_("请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。")}),c("li",{children:_("请上传交易凭证,否则无法核验并及时添加余额。")}),c("li",{children:_("提交成功后根据实际到账金额添加余额。工作时间提交的转账当日处理,非工作时间提交的转账将在下一个工作日处理。")}),c("li",{children:_("通过平台互转(例如payoneer转payoneer)付款方式可能会有10分钟延迟,请耐心等待。")}),c("li",{children:_("广告款项若入账金额为美金外其他币种额外扣除0.6%手续费,其中PayPal支付方式额外扣除2.5%手续费。")}),c("li",{children:_("如有问题,请联系客服。")})]})]})}function ra({visible:e,onClose:t,onSubmit:n}){const r=zi(),[o,a]=R(!1),[i,s]=R({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1});H(()=>{const y=()=>{a(window.innerWidth<=1020)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),H(()=>{e||s({currency:"USD",amount:"",channel:"",paymentType:"online",loading:!1,error:"",amountError:"",channelError:"",showOfflineUpload:!1})},[e]);const f=(y,h)=>{s(S=>({...S,channel:y,paymentType:h,channelError:""}))},d=y=>{s(h=>({...h,amount:y,amountError:""}))},p=y=>{s(h=>({...h,amountError:y}))},u=y=>{s(h=>({...h,currency:y}))},x=async y=>{s(h=>({...h,loading:!0,error:""}));try{await n(y),t()}catch{s(h=>({...h,error:_("提交失败,请重试")}))}finally{s(h=>({...h,loading:!1}))}},g=()=>{console.log("用户确认银行转账详情"),s(y=>({...y,showOfflineUpload:!0}))},m=()=>{s(y=>({...y,showOfflineUpload:!1}))};return c(Kn,{visible:e,onClose:t,title:_("充值/转账"),width:o?"95%":960,maxWidth:o?"95%":1e3,children:c("div",{style:{...r.wrapper,...o?{gridTemplateColumns:"1fr",gap:16,minWidth:"auto"}:{}},children:[c(Oi,{onChannelChange:f,onAmountChange:d,onCurrencyChange:u,initialAmount:i.amount,initialCurrency:i.currency,initialPaymentType:i.paymentType,amountError:i.amountError}),i.paymentType==="online"?c($i,{onSubmit:x,amount:i.amount,currency:i.currency,channel:i.channel,loading:i.loading,error:i.error,onAmountError:p}):i.showOfflineUpload?c(Qi,{onBack:m,onCancel:t,currency:i.currency,amount:i.amount,channel:i.channel,onAmountError:p}):c(na,{onConfirm:g,channelCode:i.channel})]})})}function oa(){const[e,t]=R(!1),n=async r=>{const o=await Hn({amount:r.amount,currency:r.currency,rechargeChannel:r.rechargeChannel});window.open(o,"_blank")};return c("div",{children:[c(mt,{onClick:()=>t(!0),children:_("充值/转账")}),c(ra,{visible:e,onClose:()=>t(!1),onSubmit:n})]})}qe(oa,"best-payment",["theme"],{shadow:!1});const Xt={white:{popover:{background:"#fff",color:"#222",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",border:"none"},arrow:{top:"#fff",bottom:"#fff",left:"#fff",right:"#fff"}},dark:{popover:{background:"#23262F",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.32)",border:"1px solid #444C5C"},arrow:{top:"#23262F",bottom:"#23262F",left:"#23262F",right:"#23262F"}}};function ia(){return B("theme")===N.WHITE?Xt.white:Xt.dark}const aa=({popover:e,children:t,popoverWidth:n,popoverMinWidth:r,offsetY:o,offsetX:a,popoverPosition:i="top"})=>{const s=B("size"),f=n??(s===l.SMALL?200:300),d=r??(s===l.SMALL?150:200),p=o??(s===l.SMALL?8:16),u=a??(s===l.SMALL?8:16),[x,g]=R(!1),[m,y]=R(i),h=se(null),S=se(null),L=ia(),k=()=>{if(S.current&&(clearTimeout(S.current),S.current=null),i==="top"||i==="bottom")if(h.current){const O=h.current.getBoundingClientRect();i==="top"&&O.top<100?y("bottom"):i==="bottom"&&window.innerHeight-O.bottom<100?y("top"):y(i)}else y(i);else y(i);g(!0)},E=()=>{S.current=window.setTimeout(()=>{g(!1)},120)};let A={position:"absolute",zIndex:999,borderRadius:6,fontSize:s===l.SMALL?12:15,minWidth:d,width:f,padding:s===l.SMALL?"6px 12px":"8px 14px",pointerEvents:"auto",textAlign:"center",animation:"fadeInUp 0.3s",...L.popover},v={position:"absolute",zIndex:11,width:0,height:0};return m==="top"?(A={...A,left:"50%",top:-48,transform:"translateX(-50%)"},v={...v,left:"50%",bottom:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:`8px solid ${L.arrow.top}`}):m==="bottom"?(A={...A,left:"50%",top:"100%",marginTop:p,transform:"translateX(-50%)"},v={...v,left:"50%",top:-8,transform:"translateX(-50%)",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:`8px solid ${L.arrow.bottom}`}):m==="leftTop"?(A={...A,right:"100%",top:0,marginRight:u,transform:"none"},v={...v,right:-8,top:s===l.SMALL?8:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderLeft:`8px solid ${L.arrow.left}`}):m==="rightTop"&&(A={...A,left:"100%",top:0,marginLeft:u,transform:"translateY(0)"},v={...v,left:-8,top:12,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`8px solid ${L.arrow.right}`}),c("div",{ref:h,style:{position:"relative",display:"inline-block"},onMouseEnter:k,onMouseLeave:E,children:[t,x&&c("div",{style:A,onMouseEnter:k,onMouseLeave:E,children:[e,c("div",{style:v})]})]})};function sa(){const e=B("size");return{white:{popoverTitle:{fontSize:e===l.SMALL?12:16,fontWeight:600,color:"#222",marginBottom:e===l.SMALL?12:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #e5e7eb",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#6b7280",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#111827",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#6b7280",marginLeft:e===l.SMALL?6:8,fontWeight:600}},dark:{popoverTitle:{fontSize:e===l.SMALL?14:16,fontWeight:600,color:"#fff",marginBottom:e===l.SMALL?14:16,textAlign:"center"},detailRow:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:e===l.SMALL?"6px 0":"8px 0",borderBottom:"1px solid #374151",fontSize:e===l.SMALL?12:15},detailLabel:{display:"flex",alignItems:"center",color:"#B5B8BE",fontWeight:500},detailDot:t=>({display:"inline-block",width:e===l.SMALL?6:8,height:e===l.SMALL?6:8,borderRadius:"50%",background:t,marginRight:e===l.SMALL?6:8}),detailValue:t=>({color:t,fontWeight:600,fontSize:e===l.SMALL?12:15}),main:{fontSize:e===l.SMALL?18:24,fontWeight:800,color:"#fff",display:"inline-block"},currency:{fontSize:e===l.SMALL?16:18,color:"#B5B8BE",marginLeft:e===l.SMALL?6:8,fontWeight:600}}}}function la(){const t=B("theme")===N.WHITE,n=sa();return t?n.white:n.dark}function Zt(e){return e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}function ca(e){const[t,n]=R({currBalance:0,currency:"USD",details:[]}),[r,o]=R(!0),a=async()=>{try{const f=await $n(),d=[{label:"",value:f.totalAmount,color:"#15b36b",dot:"#15b36b"},{label:"",value:f.frozenAmount,color:"#f59e0b",dot:"#f59e0b"},...f.isCredit?[{label:"",value:f.creditLimit,color:"#1890ff",dot:"#1890ff"},{label:"",value:f.creditUsed,color:"#ff0000",dot:"#ff0000"}]:[],{label:"",value:f.availableAmount,color:"#1890ff",dot:"#15b36b"}],p={currBalance:f.currBalance,currency:f.currency,details:d};n(p),o(!1)}catch(f){console.error("获取余额失败:",f),o(!1)}};H(()=>{a()},[]),H(()=>{const f=()=>{a()};return window.addEventListener("refresh-balance",f),()=>{window.removeEventListener("refresh-balance",f)}},[]);const i=la(),s=[{label:_("真实金额"),value:t.details[0]?.value||0,color:"#15b36b",dot:"#15b36b"},{label:_("冻结金额"),value:t.details[1]?.value||0,color:"#f59e0b",dot:"#f59e0b"},...t.details.length>4?[{label:_("信用额度"),value:t.details[2]?.value||0,color:"#1890ff",dot:"#1890ff"},{label:_("已用额度"),value:t.details[3]?.value||0,color:"#ff0000",dot:"#ff0000"}]:[],{label:_("可用余额"),value:t.details[4]?.value||0,color:"#1890ff",dot:"#15b36b"}];return r?null:c(aa,{popover:c(Z,{children:[c("div",{style:i.popoverTitle,children:_("余额详情")}),s.map(f=>c("div",{style:i.detailRow,children:[c("span",{style:i.detailLabel,children:[c("span",{style:i.detailDot(f.dot)}),f.label]}),c("span",{style:i.detailValue(f.color),children:Zt(f.value)})]},f.label))]}),popoverPosition:e.popoverPosition||"bottom",children:c("div",{style:i.main,children:[Zt(t.currBalance),c("span",{style:i.currency,children:t.currency})]})})}qe(ca,"best-statistical-balance");const Ae={white:{background:"#1890ff",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"},dark:{background:"#00E8C6",color:"#fff",border:"none",borderRadius:6,cursor:"pointer",fontWeight:600,transition:"all 0.2s ease"}};function da(e){return B("theme")===N.WHITE?{...Ae.white,background:e||Ae.white.background}:{...Ae.dark,background:e||Ae.dark.background}}function ua(e){switch(e){case"small":return{fontSize:"12px",gap:"2px"};case"large":return{fontSize:"18px",gap:"6px"};default:return{fontSize:"14px",gap:"4px"}}}function fa({color:e,size:t="medium",children:n}){const[r,o]=R(!1),a=da(e),i=ua(t),s={...a,...i,display:"flex",alignItems:"center"};return c(Z,{children:[c("style",{children:`
|
|
79
79
|
@keyframes spin {
|
|
80
80
|
from {
|
|
81
81
|
transform: rotate(0deg);
|
|
@@ -94,4 +94,4 @@
|
|
|
94
94
|
:host {
|
|
95
95
|
display: inline-block;
|
|
96
96
|
}
|
|
97
|
-
`}),c(
|
|
97
|
+
`}),c(mt,{onClick:async()=>{o(!0);try{Jn(),await new Promise(p=>setTimeout(p,300))}finally{o(!1)}},color:e,children:c("div",{style:s,children:[c("svg",{className:"refresh-icon",width:t==="small"?"14":t==="large"?"24":"18",height:t==="small"?"14":t==="large"?"24":"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:r?"spin 0.6s linear infinite":"none",transition:"all 0.2s ease"},children:[c("path",{d:"M21 2v6h-6"}),c("path",{d:"M3 12a9 9 0 0 1 15-6.7L21 8"}),c("path",{d:"M3 22v-6h6"}),c("path",{d:"M21 12a9 9 0 0 1-15 6.7L3 16"})]}),n&&c("span",{children:n})]})})]})}qe(fa,"best-refresh-button",[],{shadow:!0});const pa=["best-recharge","best-payment","best-statistical-balance","best-refresh-button"];exports.components=pa;exports.getBalanceData=Vn;exports.initFundUnit=Xo;exports.npmTest=ei;exports.printCurrentTime=ti;exports.refreshBalance=Jn;exports.viteProxy=ni;
|