1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"btse@5f19a485"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="18262bb9-9e53-4007-83ce-0e22132574be",e._sentryDebugIdIdentifier="sentry-dbid-18262bb9-9e53-4007-83ce-0e22132574be")}catch(a){}}();import{bC as e,bD as t,aS as a,aY as s,a5 as i,a6 as n,ak as r,a9 as o,am as l,aK as d,aa as u,as as c,ag as h,ab as m,ae as p,af as v,a7 as y,ap as w,aM as f,a8 as A,aN as C,aZ as k,ad as g,aU as b,al as S,r as E,a_ as I,B as x,cg as T,an as N,aP as L,ar as _,bd as P,i as W,aE as R,ai as B,bi as F,aL as M,ac as D,aq as O,aT as $,aX as H,bJ as U}from"./PmfENnFs.js";import{p as q,u as j,cL as K,q as Y,o as G,W as V,ba as Q,aO as z,dC as Z,dD as J,rH as X,E as ee,i as te,G as ae,d0 as se,qk as ie,iZ as ne,qW as re,F as oe,h as le,b1 as de,cN as ue,cM as ce,cP as he,cO as me,rI as pe,w as ve,ct as ye,rv as we,rw as fe,aj as Ae,bG as Ce,q$ as ke,q_ as ge,qi as be,bj as Se,cV as Ee,rC as Ie,iY as xe,pR as Te,rJ as Ne,af as Le,nG as _e,rx as Pe,ry as We,_ as Re,fl as Be,rK as Fe,rL as Me,pS as De,pU as Oe,pM as $e,rD as He,pT as Ue,db as qe,t as je,q0 as Ke,fo as Ye,X as Ge,rM as Ve,rE as Qe,rF as ze,i5 as Ze,j as Je,aI as Xe,N as et,U as tt,l as at,rN as st,pe as it,R as nt,rO as rt,rP as ot,eD as lt,eE as dt,dd as ut,cJ as ct,n as ht,dR as mt,fw as pt,aN as vt,mi as yt,bz as wt,aC as ft,fq as At,ru as Ct,rQ as kt,nn as gt,rR as bt,rS as St,pw as Et,px as It,rT as xt,rU as Tt,$ as Nt,fI as Lt,rG as _t,fQ as Pt,eu as Wt,a9 as Rt,oj as Bt}from"./BhKTELSe.js";import{L as Ft,v as Mt,N as Dt,M as Ot,u as $t,H as Ht,h as Ut,g as qt}from"./tad1MRrM.js";import{_ as jt}from"./CRPzHAml.js";import{P as Kt,A as Yt,a as Gt,b as Vt,c as Qt,I as zt,W as Zt}from"./Br_cPND0.js";import{V as Jt,_ as Xt,W as ea,u as ta}from"./D1RytiIi.js";import{a3 as aa,bs as sa,b3 as ia,b6 as na}from"../../app.DuROpXuw.js";import{v as ra}from"./BLBkQ53j.js";import{H as oa}from"./BrsoK5sW.js";import{W as la,D as da,E as ua}from"./CasCcixO.js";import{A as ca}from"./DTvt6p8J.js";import{u as ha,w as ma,l as pa,W as va}from"./xcw4LDtS.js";import{a as ya,b as wa,I as fa,_ as Aa}from"./CzqTRDnX.js";import{f as Ca}from"./Brv0FlzG.js";import{S as ka}from"./CDkBWAG-.js";import{a as ga}from"./CHfSbCJU.js";import"./DzIKp7QL.js";import"./ByGuns7q.js";import"./chunk-lottie.zeumoeGY.js";import"./CXr9G-CP.js";import"./chunk-web3.7EmC4Up1.js";import"./chunk-web3-onboard-utils.D-9VMiP0.js";import"./chunk-sentry.q36DUBwH.js";import"./cvxruSMo.js";import"./chunk-echarts.AHWYl6Ef.js";import"./ByOB-9wo.js";import"./Bam2FmDF.js";import"./B9Yq6Vz0.js";import"./CjHUvruO.js";import"./B7TQbCQK.js";import"./CRkpGd-d.js";import"./C2-AFtvo.js";import"./3JYsLZg7.js";import"./chunk-solana.AamhlJHN.js";import"./D-FrGiex.js";import"./DbKBa4Od.js";const ba={class:"content flex-box"},Sa=jt({__name:"WalletWithdrawCurrencyList",props:e({isShowKycHint:{type:Boolean,required:!0},isBlockedAction:{type:Boolean,required:!0}},{currentFilterKey:{type:String,required:!0},currentFilterKeyModifiers:{}}),emits:e(["onSelect"],["update:currentFilterKey"]),setup(e,{emit:y}){const{walletWithdrawCurrencyListFn:w,enableInfoDepositAndWithdrawalFees:f,enableSeparateWithdrawFiatTurnaroundTime:A}=q,C=t(e,"currentFilterKey"),k=y,g=a(),{t:b}=s(),S=j(),{lang:E,getAllowedCurrencyList:I}=i(S),x=K(),{isSupportedWithdrawalCrypto:T,isSupportedWithdrawalFiat:N,isSupportedCrypto:L}=i(x),_=n((()=>C.value===Y.FIAT?b("t.selectFiatCurrency"):b("t.selectCryptoCurrency"))),P=n((()=>f?g.resolve({name:"depositWithdrawalFees",params:{lang:E.value}}).href:G(E.value,"DEPOSIT_WITHDRAW_FEE"))),W=n((()=>[{title:b("t.faq"),listStyle:Ft.DOT,descriptions:w({lang:E.value,generateSupportUrl:G,isSupportedWithdrawalCrypto:T.value,isSupportedWithdrawalFiat:N.value,isSupportedCrypto:L.value,enableSeparateWithdrawFiatTurnaroundTime:A,payload:{depositWithdrawalFeesLink:P.value}}).filter(Boolean)}])),R=n((()=>{if(N.value)return!0;return I.value({currencyType:Q.CRYPTO,walletAction:V.WITHDRAWAL}).length>8})),B=e=>{k("onSelect",e)};return(t,a)=>(o(),r(Ot,{class:"list-wrapper"},{default:l((()=>[d(Mt,{title:c(b)("t.withdraw")},null,8,["title"]),u("div",ba,[d(z,{class:h(["select-currency-field",t.isNotDesktop?"flex-6":"flex-1"]),title:_.value,titleFontSize:c(J).S_18,titleBoldSize:c(Z).W_700},{default:l((()=>[d(X,{currentFilterKey:C.value,"onUpdate:currentFilterKey":a[0]||(a[0]=e=>C.value=e),class:"currency-list",walletAction:c(V).WITHDRAWAL,selectedCurrency:"",maxRow:8,isListInactive:e.isBlockedAction,isShowKycHint:e.isShowKycHint,isListMixed:!R.value,isFilterShown:R.value,sortingStrategy:c(ee).BALANCE_DESC,defaultBalanceFormat:"max8",iconSize:"24",showBalance:"",isAloneStyle:"",isDisableFilterAll:"",onOnSelect:B},null,8,["currentFilterKey","walletAction","isListInactive","isShowKycHint","isListMixed","is
1FilterShown","sortingStrategy"])])),_:1},8,["class","title","titleFontSize","titleBoldSize"]),d(Dt,{class:h(["notes",t.isNotDesktop?"flex-5":"flex-1"]),notes:W.value},{default:l((()=>[e.isBlockedAction?(o(),r(te,{key:0,genre:c(ae).ERROR},{default:l((()=>[p(v(c(b)("wallets.verification.functionNotAllow")),1)])),_:1},8,["genre"])):m("",!0)])),_:1},8,["class","notes"])])])),_:1}))}},[["__scopeId","data-v-09b405db"]]),Ea={class:"wallet-withdraw-fiat-select-payment"},Ia={class:"paragraph"},xa=jt({__name:"WalletWithdrawFiatSelectPayment",props:{paymentList:{type:Array,required:!0},withdrawNote:{type:Array,default:()=>[]},withdrawNotice:{type:Object,default:()=>({})},isNoteLoading:{type:Boolean,default:!1},isContentLoading:{type:Boolean,default:!1},isKycPassed:{type:Boolean,default:!1},selectedPayment:{type:Object,default:()=>({})}},emits:["onPrevious","handleSelectedPayment","proceedToEnterAmount"],setup(e,{emit:t}){const i=e,h=t,m=y(),p=a(),E=w(),{t:I}=s(),{$openDialog:x}=se(),T=ie(),{checkExtendedKycByLicenseEntity:N,openExtendedKycFlow:L}=T,_=n((()=>m.state.lang)),P=n((()=>m.state.accountInfo)),W=n((()=>{var e;return(null==(e=i.selectedPayment)?void 0:e.provider)||""})),R=n((()=>{var e;return(null==(e=i.selectedPayment)?void 0:e.method)||""})),B=n((()=>i.isKycPassed?I("t.next"):I("t.verify"))),F=n((()=>{var e,t;return(null==(t=null==(e=i.selectedPayment)?void 0:e.info)?void 0:t.id)||""})),M=n((()=>W.value===ne.ANSPACEPAY)),D=n((()=>W.value===ne.OPENPAYD)),O=n((()=>W.value===ne.BANKFRICK)),$=n((()=>Boolean(W.value)&&Boolean(R.value))),H=n((()=>!$.value)),U=n((()=>E.query.currency)),q=async()=>{var e,t,a,s,n,r;if((null==(e=P.value)?void 0:e.kycNotice)===oe.limited)return void x(aa,{visible:!0});if(!i.isKycPassed){const e=p.resolve({name:le.VERIFICATION,params:{lang:_.value},query:{showUnsupportedPopup:!0}});return void window.open(e.href,"_blank")}N(null==(t=i.selectedPayment)?void 0:t.licensedEntity)?L({licensedEntity:null==(a=i.selectedPayment)?void 0:a.licensedEntity,entry:"withdraw",currency:U.value,provider:W.value,method:R.value}):!M.value||(null==(n=null==(s=i.selectedPayment)?void 0:s.userInfo)?void 0:n.status)?!D.value&&!O.value||(null==(r=i.selectedPayment)?void 0:r.userInfo)?h("proceedToEnterAmount"):await x(Jt,{currency:U.value,provider:W.value,method:R.value}):(async()=>{const{isConfirmed:e}=await x(Vt,{infoData:i.selectedPayment.userInfo||{}});e&&h("proceedToEnterAmount")})()};return(t,a)=>{const s=f("loading");return o(),A("div",Ea,[C((o(),r(c(Gt),null,k({paymentCard:l((()=>[u("p",Ia,v(t.$t("wallets.withdraw.select.method")),1),(o(!0),A(g,null,b(e.paymentList,(e=>(o(),r(c(Kt),{key:e.info.id,cardId:e.info.id,title:e.info.title,subtitle:e.info.subtitle,selectedId:F.value,hint:e.info.hint,labelName:e.info.labelName,actionType:e.info.id===F.value.value?c(Yt).CHECK:"",isShowActionIcon:$.value,hasHover:$.value,onHandleClick:t=>{h("handleSelectedPayment",e)}},{icon:l((()=>[(o(),r(S(e.info.icon)))])),_:2},1032,["cardId","title","subtitle","selectedId","hint","labelName","actionType","isShowActionIcon","hasHover","onHandleClick"])))),128))])),buttonGroup:l((()=>[d(c(re),{buttonTitle:B.value,isDisabled:H.value,onOnPrevious:a[0]||(a[0]=e=>h("onPrevious")),onOnMainButtonClick:q},null,8,["buttonTitle","isDisabled"])])),_:2},[$.value?{name:"paymentDetail",fn:l((()=>[d(c(Dt),{notes:e.withdrawNote,notice:e.withdrawNotice,isLoading:e.isNoteLoading},null,8,["notes","notice","isLoading"])])),key:"0"}:void 0]),1024)),[[s,e.isContentLoading]])])}}},[["__scopeId","data-v-f3d4c9d6"]]),Ta={class:"flex-box items-center"},Na={class:"sub"},La={key:0},_a=["maxlength"],Pa={class:"remark-available-length"},Wa=jt({__name:"WalletWithdrawFiatRemark",props:{remark:{type:String,default:""}},emits:["update:remark"],setup(e,{emit:t}){const a=e,s=t,i=n({get:()=>a.remark,set(e){s("update:remark",e)}}),r=E(!1),l=E(140),c=n((()=>l.value-i.value.length));function h(){r.value=!r.value}return(e,t)=>(o(),A(g,null,[u("div",{class:"remark-description flex-box relative",onClick:h},[u("div",Ta,[d(de,{class:"icon-add"})]),u("div",null,v(e.$t("wallets.withdraw.paymentRemark")),1),u("div",Na,"("+v(e.$t("t.optional"))+")",1)]),r.value?(o(),A("div",La,[C(u("textarea",{"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e),class:"remark",maxlength:l.value},null,8,_a),[[I,i.value]]),u("div",Pa,v(e.$t("t.available.length",{number:c.value})),1)])):m("",!0)],64))}},[["__scopeId","data-v-4d789a3a"]]),Ra={class:"wallet-withdraw-fiat-auth"},Ba=jt({__name:"WalletWithdrawFiatAuth",props:{withdrawRequestData:{type:Object,required:!0},currency:{type:String,required:!0},selectedPayment:{type:Object,default:()=>({})}},emits:["update:step","update:errorCode"],setup(e,{emit:t}){const{enableWithdrawThreeFactorAuthenticator:a}=q,n=e,r=t,{t:l}=s(),{$openDialog:u}=se(),h=j(),{isApp:m}=i(h),p=ue.WITHDRAW_FIAT,v=E(null),y=E(!1),w=E(!1),f=async({emailCode:e,smsCode:t,twoFACode:a})=>{var s,i;const o={...n.withdrawRequestData,emailCode:e,smsCode:t,twoFACode:a};try{y.value=!0,w.value=!1,await ve.requestWithdrawFiat(o),m.value&&ye({event:"PAYMENT_PROCESSING",action:ca.WITHDRAW,currency:n.currency,provider:null==(s=n.selectedPayment)?void 0:s.provider,method:null==(i=n.selectedPayment)?void 0:i.method}),r("update:step",pe.PROCESSING)}catch(l){if(we(null==l?void 0:l.code))return void(w.value=!0);if(fe.includes(l))return await u(Xt),void C();h.updateAccountInfo(),v.value=l;[Ae.EMAIL_OTP_ERROR,Ae.PAYMENT_EMAIL_OTP_ERROR,...Ce].includes(l)||(r("update:errorCode",l),r("update:step",pe.FAILURE))}finally{y.value=!1}},C=()=>{r("update:step",pe.ENTER_AMOUNT)},k=()=>{me({title:l("account.account.update-pass.verificationSent")})},g=()=>{he({title:l("trade.marginCall.errorText")})};return(e,t)=>(o(),A("div",Ra,[d(ce,{errorCode:v.value,"onUpdate:errorCode":t[0]||(t[0]=e=>v.value=e),class:"auth",isEnableThreeFactor:c(a),verification:f,sendEmailType:c(p),isLoading:y.value,onPrevious:C,autoSendEmail:"",isPaymentEmailOtp:"",showPreviousButton:"",isNetworkError:w.value,onHandleSendCodeSuccessfully:k,onHandleSendCodeFail:g},null,8,["errorCode","isEnableThreeFactor","sendEmailType","isLoading","isNetworkError"])]))}},[["__scopeId","data-v-129c299c"]]);function Fa(e,t){const a=(null==t?void 0:t.formatKey)||"max2",s=(null==t?void 0:t.currency)||"";return Le(e,{formatKey:a,currency:s})}function Ma(e={},t,a){const{provider:s,method:i,withdrawFees:n,limitSetting:r={},fiatWithdrawLimit:o}=e;if(!s&&!i)return[];const l=[];o&&l.push(ke(o)),l.push(ge(r,a)),l.push(function(e={},t,a,s){const{feeRate:i=0,feeMin:n=0,originFeeMin:r=0,feeMinCurrency:o,extraRate:l=0,extraAmount:d=0}=e,u=[],c=[],h=o&&s!==o,m=x(i),p=x(n);m.gt(0)&&p.gt(0)?u.push({textPath:Ee(h?"wallets.notes.fees.withdraw.feeRateMinimumFeeDiffCurrency":"wallets.notes.fees.withdraw.feeRateMinimumFee"),slots:[{slotName:"feeRate",text:`${m.times(100)}%`},{slotName:"currency",text:s},{slotName:"feeMin",text:Fa(n,{currency:s})},{slotName:"originFeeMin",text:Fa(r,{currency:o})},{slotName:"feeMinCurrency",text:o}]}):m.gt(0)?u.push({textPath:Ee("wallets.notes.fees.withdraw.onlyFeeRate"),slots:[{slotName:"feeRate",text:`${m.times(100)}%`}]}):p.gt(0)&&u.push({textPath:Ee(h?"wallets.notes.fees.withdraw.onlyMinimumFeeDiffCurrency":"wallets.notes.fees.withdraw.onlyMinimumFee"),slots:[{slotName:"feeMin",text:Fa(n,{currency:s})},{slotName:"currency",text:s},{slotName:"originFeeMin",text:Fa(r,{currency:o})},{slotName:"feeMinCurrency",text:o}]});const v=Ie({extraRate:l,extraAmount:d,currency:s}),y=[...u,...v];0==y.length?c.push({textPath:Ee("wallets.notes.fees.withdraw.zeroFee")}):c.push(...y);switch(t){case ne.OPENPAYD:c.push({textPath:Ee("wallets.withdraw.bank.openpayd.c
1ommon.note.2")}),c.push({textPath:Ee("wallets.withdraw.bank.openpayd.common.note.3"),slots:[{slotName:"brandName",text:Se.t("brand.name")}]}),a===xe.SEPA&&(c.push({textPath:Ee("wallets.withdraw.bank.openpayd.sepa.note1")}),c.push({textPath:Ee("wallets.withdraw.bank.openpayd.sepa.note2"),slots:[{slotName:"amount",text:Fa(1e5,{currency:s})},{slotName:"currency",text:s}]}));break;case ne.EQUALS:(a===xe.SWIFT||a===xe.SEPA)&&c.push({textPath:"wallets.withdraw.bank.openpayd.common.note.2"}),c.push({textPath:"wallets.withdraw.bank.equals.note.1"}),c.push({textPath:"wallet.importantNotes.bankCharges"});break;case ne.BANKFRICK:c.push({textPath:Ee("wallet.importantNotes.bankCharges")}),c.push({textPath:Ee("wallets.withdraw.bankFrick.importantNotes.1"),slots:[{slotName:"days",text:Da[a]}]}),c.push({textPath:Ee("wallets.withdraw.bankFrick.importantNotes.2"),slots:[{slotName:"brandName",text:Se.t("brand.name")}]}),c.push({textPath:Ee("wallets.withdraw.bankFrick.importantNotes.3"),slots:[{slotName:"brandName",text:Se.t("brand.name")}]});break;case ne.HTPAY:["VND","KRW","IDR","INR","THB"].includes(s)&&c.push({textPath:Ee("wallet.importantNotes.bankCharges")}),c.push({textPath:Ee("wallets.withdraw.fee.note.bankAccountIsValid")});break;case ne.XENDIT:case ne.DUITKU:c.push({textPath:Ee("wallet.importantNotes.bankCharges")}),c.push({textPath:Ee("wallet.importantNotes.withdrawWithVerifyAccount")});break;case ne.SELF:a===xe.IMPS_NEFT&&c.push({textPath:"wallet.importantNotes.bankCharges"})}return{title:Se.t("t.importantNotes"),listStyle:"dot",descriptions:c}}(n,s,i,a));const d=`${s}_${i}`;return l.push(function(e,t,a){var s,i,n;return{title:Se.t("t.faq"),listStyle:"dot",descriptions:[{textPath:Ee("wallets.how.withdrawMethod"),link:G(e,(null==(s=Oa[a])?void 0:s.urlKey)||"WITHDRAW_FIAT"),slots:[{slotName:"method",text:(null==(i=Oa[a])?void 0:i.name)||t,link:G(e,(null==(n=Oa[a])?void 0:n.urlKey)||"WITHDRAW_FIAT")}]}]}}(t,i,d)),l}const Da={[xe.SWIFT]:"2-5",[xe.SIC]:"1",[xe.SEPA]:"1-2"};const Oa={[_e.SELF_LOCAL_BANK_TRANSFER]:{name:Se.t("payment.localBankTransfer.name"),urlKey:"PIX_FAQ"},[_e.HTPAY_NET_BANKING]:{name:Se.t("wallets.payment.internetBanking"),urlKey:"WITHDRAW_INTERNET_BANKING"},[_e.SELF_IMPS_NEFT]:{name:Se.t("wallets.paymentWay.IMPS_NEFT"),urlKey:"WITHDRAW_FIAT"}};function $a({limitSetting:e={},fiatWithdrawLimit:t}){const{txnLimit:a,amountLimit:s}=e,i=be({txnLimit:a,amountLimit:s}),n=null==t?void 0:t.reachLimit;if(i||n)return{genre:ae.ERROR,text:Se.t("payment.transactionLimit.noticeMessage.withoutTime")}}const Ha={key:0,class:"wallet-withdraw-fiat-detail"},Ua={class:"wrapper"},qa={class:"subtitle"},ja={class:"balance inline-flex"},Ka={class:"amount-input-wrapper"},Ya={class:"currency flex-box items-center"},Ga={key:0,class:"error-message"},Va={class:"subtitle block"},Qa="fiat_withdraw",za=jt({__name:"WalletWithdrawFiatEnterAmount",props:{step:{type:String,required:!0},currency:{type:String,required:!0},selectedPayment:{type:Object,required:!0},paymentInfoData:{type:Object,required:!0},withdrawNote:{type:Array,default:()=>[]},withdrawNotice:{type:Object,default:()=>({})},isNoteLoading:{type:Boolean,default:!0}},emits:["updateFeeInfo","update:step","update:errorCode","previous"],setup(e,{emit:t}){const{enableRepeatFee:a,enableTasksAndRewards:w}=q,g=e,b=t,I=y(),{t:W}=s(),{$openDialog:R}=se(),B=n((()=>I.state.lang)),F=n((()=>I.state.currencyMap)),M=n((()=>I.state.accountInfo)),{paymentInfoData:D}=T(g),{isTransactionLimit:O}=ha(D),$=$t(),{holdAmountMap:H}=i($),{setHoldCurrency:U,startHoldPolling:j,stopHoldPolling:K}=$,Y=E(!1),V=E(""),Q=E(""),X=E(""),ee=E(!1),ie=E(!1),le=E({}),de=E([]),ue=E({}),ce=E(!1),he=E({}),me=n((()=>g.selectedPayment.provider||"")),ye=n((()=>g.selectedPayment.method||"")),we=n((()=>me.value===ne.SELF?ye.value:`${me.value}_${ye.value}`)),{defaultVerification:fe}=Pe({paymentProvider:me,paymentMethod:ye}),{verifyBankAccount:Ae}=We({paymentProvider:me,paymentMethod:ye,currency:n((()=>g.currency)),onSuccess:()=>St()}),Ce=n((()=>me.value===ne.XENDIT)),ke=n((()=>me.value===ne.DUITKU)),ge=n((()=>me.value===ne.ANSPACEPAY)),be=n((()=>me.value===ne.OPENPAYD)),Ie=n((()=>me.value===ne.EQUALS)),_e=n((()=>me.value===ne.HTPAY)),Ge=n((()=>me.value===ne.SELF&&ye.value===xe.IMPS_NEFT)),Ve=n((()=>{var e,t;return _e.value?((null==(t=null==(e=D.value)?void 0:e.ext)?void 0:t.bankList)||[]).map((({bankName:e,bankCode:t})=>({name:e,code:t}))):[]})),Qe=n((()=>!_e.value||ce.value)),ze=n((()=>!ge.value&&!_e.value)),Ze=n((()=>F.value[g.currency]||{})),Je=n((()=>Ze.value.multiplier)),Xe=n((()=>Re(D.value.currencyScale)?D.value.currencyScale:Re(Ze.value.scale)?Ze.value.scale:Be)),et=n((()=>x(Ze.value.available||0).dp(Xe.value,x.ROUND_DOWN).toFixed())),tt=n((()=>H.value[g.currency]||0)),at=n((()=>
1{if(!w)return et.value;const e=x(et.value).minus(tt.value);return e.gt(0)?e.toString():"0"})),st=n((()=>x(at.value).lte(0))),it=n((()=>be.value||Ce.value||ke.value)),nt=n((()=>{const{title:e="",icon:t,subtitle:a}=g.selectedPayment.info||{};return{id:e,title:e,icon:t,subtitle:a,isDisabled:!0}})),rt=n((()=>{var e;const t=(null==(e=g.selectedPayment.info)?void 0:e.title)||"";return ft.value?ht.value:{title:t,subtitle:W("wallets.subtitle.addBankAccount"),icon:ra,id:t,class:"icon-colored"}})),ot=n((()=>{var e;if(!le.value.status){const t=(null==(e=g.selectedPayment.info)?void 0:e.title)||"";return{id:t,title:t,icon:ra,class:"icon-colored"}}return ht.value})),lt=n((()=>{if(0===de.value.length){const{title:e="",icon:t}=g.selectedPayment.info||{};return{id:e,title:e,icon:t,tailBtnTitle:W("t.verify"),isShowActionIcon:!1}}return ht.value})),dt=n((()=>{if(0===de.value.length){const{title:e="",icon:t}=g.selectedPayment.info||{};return{id:e,title:e,icon:t,tailBtnTitle:W("t.verify"),isShowActionIcon:!1}}return ht.value})),ut=n((()=>{if(0===de.value.length){const e=W("wallets.paymentWay.XENDIT_XENDIT");return{id:e,title:e,subtitle:W("wallets.instant"),tailBtnTitle:W("t.verify"),onTailBtnClick:Pt,isDisabled:!0,icon:Fe,class:"icon-colored"}}return ht.value})),ct=n((()=>{if(0===de.value.length){const e=W("wallets.paymentWay.DUITKU_DUITKU");return{id:e,title:e,subtitle:W("wallets.instant"),tailBtnTitle:W("t.verify"),onTailBtnClick:Pt,isDisabled:!0,icon:Me,class:"icon-colored"}}return ht.value})),ht=n((()=>{var e,t,a,s;const{fid:i,falias:n,fname:r,beneficiaryName:o,swiftcode:l,status:d}=le.value,u=n||r||o||l||"",c=De(le.value);return{id:i,title:(null==(e=g.selectedPayment.info)?void 0:e.title)||"",subtitle:i?`${u} (${c})`:W("wallets.subtitle.selectOrAdd"),titleStatus:W((null==(t=Oe[d])?void 0:t.title)||""),statusType:(null==(a=Oe[d])?void 0:a.class)||"",icon:null==(s=g.selectedPayment.info)?void 0:s.icon,actionIcon:Yt.ARROW}})),mt=n((()=>{switch(me.value){case ne.ANSPACEPAY:case ne.HTPAY:return nt.value;case ne.OPENPAYD:return ot.value;case ne.EQUALS:return lt.value;case ne.XENDIT:return ut.value;case ne.DUITKU:return ct.value;case ne.SELF:return Ge.value?dt.value:rt.value;default:return rt.value}})),pt=n((()=>{const{feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i}=D.value.withdrawFees||{};return Tt({amount:Q.value,feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i,isExcludeFee:Y.value})})),vt=n((()=>{const e=Number(Q.value)||0,t=Number(x(e).minus(pt.value));return Y.value?e:Math.max(t,0)})),yt=n((()=>x(vt.value).plus(pt.value).toString())),wt=n((()=>{var e;const t=Q.value.replace(/\s/g,""),a=Number(t)||0;if(""===t)return!1;const{singleAmountMin:s,singleAmountMax:i}=(null==(e=D.value)?void 0:e.limitSetting)||{},n=Number(s)||0,r=Number(i);return/^(\d+)\.?(\d+)?$/.test(t)?/^\d+(\.\d{0,2})?$/.test(t)?a<n?W("wallets.fiat-withdraw.validator-min",{amount:n,currency:g.currency}):a>r?W("wallets.deposit.amount.tip",{min:n,max:r}):x(yt.value).gt(at.value)?W("rules.low"):"PHP"===g.currency&&a>5e5&&W("wallets.fiat-withdraw.validator-php-max"):W("wallets.fiat-withdraw.validator-decimal",{i:"2"}):W("rules.errorAmount")})),ft=n((()=>!(!ge.value&&!_e.value)||de.value.length>0)),At=n((()=>{var e;switch(me.value){case ne.EQUALS:case ne.XENDIT:case ne.DUITKU:case ne.OPENPAYD:return(null==(e=le.value)?void 0:e.status)===Te.VERIFIED;default:return!0}})),Ct=n((()=>{const e=""===Q.value;return Boolean(wt.value)||e||ie.value||!g.currency||!ft.value||!At.value||O.value||!Qe.value})),kt=n((()=>{const{singleAmountMin:e,singleAmountMax:t}=D.value.limitSetting||{},a=Number(e||0),s=Number(t||0);return a||s?a&&s?`${a} - ${s}`:a?W("t.min_dot_amount",{amount:a}):s?W("t.max_dot_amount",{amount:s}):"":W("t.amount")})),gt=n((()=>{var e;if(Ce.value&&(null==(e=M.value)?void 0:e.mobileNumber)){const[e,t]=M.value.mobileNumber.split("-");return`${e} ${t}`}return""})),bt=n((()=>be.value?function(e,t={},a="EN"){switch(null==t?void 0:t.status){case Te.PENDING:return{genre:ae.WARNING,text:Se.t("wallets.withdraw.bank.openpayd.pending.notice")};case Te.REJECTED:case Te.FAILED:return{genre:ae.ERROR,textData:{textPath:Ee("wallets.deposit.bank.openpayd.notice.error"),slots:[{slotName:"customerLink",link:G(a,"NEW_TICKET"),color:"primary",text:Se.t("support.contact.note")}]}};default:return $a(e)}}(D.value,le.value,B.value):Ie.value?function(e,t){return(null==t?void 0:t.status)===Ne.PENDING?{genre:ae.WARNING,text:Se.t("wallets.withdraw.bank.equals.status.pending")}:$a(e)}(D.value,le.value):Ce.value||ke.value?function(e,t={}){const{status:a}=t;return a===Te.PENDING?{genre:ae.WARNING,text:Se.t("wallet.bankReviewIsOnGoing")}:$a(e)}(D.value,le.value):g.withdrawNotice));N(de,(e=>{var t;be.value?le.value=[Te.VERIFIED,Te.PENDING].includes(null==(t=e[0])?void 0:t.status)?e[0]:{}:le.value=e[0]||{}})),N(X,(e=>{e===da.ADD&&(Ce.value||ke.value||Ie.value||Ge.value)&&(Pt(),ee.value=!1)}));const St=async()=>{ge.value||await Et()},Et=async()=>{try{ie.value=!0;const e={method:ye.value,provider:me.value,isWallet:!0,transactionType:$e.WITHDRAW,currency:g.currency},t=await ve.getUserFinance(e),{Bank:a=[]}=(null==t?void 0:t.userFinances)||{};de.value=a.map((e=>He(e))),be.value&&It()}catch(e){return Promise.reject(e)}finally{ie.value=!1}},It=()=>{const e={[Te.VERIFIED]:1,[Te.PENDING]:2,[Te.REJECTED]:3,[Te.FAILED]:4};de.value.sort(((t,a)=>{const s=e[null==t?void 0:t.status],i=e[null==a?void 0:a.status];return void 0===s||void 0===i?0:s-i}))},xt=e=>{Q.value=Re(e)?e:""},Tt=({amount:e=0,feeMin:t=0,feeMax:s=0,feeRate:i=0,extraRate:n=0,extraAmount:r=0,isExcludeFee:o=!1})=>ma({amount:e,feeMin:t,feeMax:s,feeRate:i,extraRate:n,extraAmount:r,isExcludeFee:a&&o}),Nt=()=>
1{const{singleAmountMax:e=0}=D.value.limitSetting||{},{feeMin:t,feeMax:a,feeRate:s,extraRate:i,extraAmount:n}=D.value.withdrawFees||{};let r=x(at.value);Y.value&&(r=pa({eligibleBalance:at.value,feeMin:t,feeMax:a,feeRate:s,extraRate:i,extraAmount:n})),r.eq(0)?Q.value=at.value:e&&r.gt(e)?Q.value=Ye(Le(e)):Q.value=r.dp(Xe.value,x.ROUND_DOWN).toFixed()},Lt=()=>{St()},_t=async()=>{var e,t;if((null==(e=M.value)?void 0:e.kycNotice)===oe.limited)return void R(aa,{visible:!0});const a={method:ye.value,provider:me.value,amount:Q.value,settlementCurrency:g.currency,isFeeExclusive:Y.value,notes:V.value};(null==(t=le.value)?void 0:t.fid)&&(a.userTransferInfoId=le.value.fid),_e.value&&(a.ext={...ue.value}),he.value=a,b("update:step",pe.SUBMIT_STATUS),window.scrollTo(0,0)},Pt=()=>{fe.value&&Ae(fe.value)};return L((()=>{K()})),(async()=>{U(g.currency),j(),await St(),b("updateFeeInfo")})(),(t,a)=>{const s=_("BrandButton"),i=_("BrandInput"),n=_("BaseButton"),y=f("loading");return e.step===c(pe).ENTER_AMOUNT?(o(),A("div",Ha,[C((o(),A("div",Ua,[d(Gt,null,{paymentCard:l((()=>{var t;return[d(z,{titleFontSize:c(J).S_18,titleBoldSize:c(Z).W_700,isTitleBlockWrap:""},{title:l((()=>[u("div",qa,v(c(W)("wallets.enterAmount")),1)])),tail:l((()=>[u("div",ja,[u("div",null,v(c(w)?c(W)("t.eligibleBalance"):c(W)("wallets.availableBalance")),1),u("div",null,v(c(qe)(at.value)),1),u("div",null,v(e.currency),1),c(w)?(o(),r(Ht,{key:0,holdAmount:tt.value,holdCurrency:e.currency},null,8,["holdAmount","holdCurrency"])):m("",!0)])])),_:1},8,["titleFontSize","titleBoldSize"]),u("div",Ka,[d(i,{id:c(je)("input_amount",Qa),name:"amount",placeholder:kt.value,isError:Boolean(wt.value),value:Q.value,integerMultiplier:Je.value,decimalLimit:Xe.value,class:"amount-input",textAlign:"right",hasInnerGap:"",isBrandNewStyle:"",isPrice:"",onInput:xt},{suffix:l((()=>[d(s,{id:c(je)("btn_max",Qa),disabled:st.value,type:"text",size:"fit",onClick:Nt},{default:l((()=>[p(v(c(W)("t.max.uppercase")),1)])),_:1},8,["id","disabled"]),u("div",Ya,v(e.currency),1)])),_:1},8,["id","placeholder","isError","value","integerMultiplier","decimalLimit"]),wt.value?(o(),A("div",Ga,v(wt.value),1)):m("",!0)]),u("div",Va,v(c(W)("wallets.withdrawVia")),1),d(Kt,{class:h(["card",{"cursor-pointer":!mt.value.isDisabled}]),title:mt.value.title,subtitle:mt.value.subtitle,actionType:mt.value.actionIcon,titleStatus:mt.value.titleStatus,statusType:mt.value.statusType,hasHover:!1,noBorder:mt.value.isDisabled,errorMessage:c(Ue)(le.value)?`*${c(W)("account.payment.bankAccount.error.update")}`:"",isShowActionIcon:mt.value.isShowActionIcon,onHandleClick:a[0]||(a[0]=e=>{mt.value.isDisabled||(!(be.value||Ie.value||Ge.value)||ft.value?(X.value=ft.value?da.LIST:da.ADD,ee.value=!0):Pt())})},k({icon:l((()=>[(o(),r(S(P(mt.value.icon)),{class:h(["icon",[mt.value.class]])},null,8,["class"]))])),_:2},[mt.value.tailBtnTitle?{name:"tail",fn:l((()=>[d(n,{class:"primary",onClick:mt.value.onTailBtnClick},{default:l((()=>[p(v(mt.value.tailBtnTitle),1)])),_:1},8,["onClick"])])),key:"0"}:void 0]),1032,["class","title","subtitle","actionType","titleStatus","statusType","noBorder","errorMessage","isShowActionIcon"]),ze.value?(o(),r(Wa,{key:0,remark:V.value,"onUpdate:remark":a[1]||(a[1]=e=>V.value=e)},null,8,["remark"])):m("",!0),_e.value?(o(),r(oa,{key:1,currency:e.currency,selectedPayment:e.selectedPayment,bankList:Ve.value,onOnBankFormChange:a[2]||(a[2]=e=>ue.value=e),onOnValidChange:a[3]||(a[3]=e=>ce.value=e)},null,8,["currency","selectedPayment","bankList"])):m("",!0),d(Qt,{isExcludeFee:Y.value,"onUpdate:isExcludeFee":a[4]||(a[4]=e=>Y.value=e),action:c(Ke).WITHDRAW_FIAT,currencyDisplayName:e.currency,mobileNumber:gt.value,amount:c(Le)(vt.value),totalAmount:c(Le)(yt.value),fee:c(Le)(pt.value),supportFeeMethod:null==(t=c(D))?void 0:t.supportFeeMethod,isShowFeeTooltip:!ge.value&&!_e.value},null,8,["isExcludeFee","action","currencyDisplayName","mobileNumber","amount","totalAmount","fee","supportFeeMethod","isShowFeeTooltip"])]})),paymentDetail:l((()=>[d(Dt,{notes:e.withdrawNote,notice:bt.value,isLoading:e.isNoteLoading},{default:l((()=>[c(Ue)(le.value)?(o(),r(te,{key:0,genre:c(ae).ERROR},{default:l((()=>[p(v(c(W)("account.payment.bankAccount.error.missing",{action:c(W)("t.withdrawal")})),1)])),_:1},8,["genre"])):m("",!0)])),_:1},8,["notes","notice","isLoading"])])),buttonGroup:l((()=>[d(re,{buttonTitle:c(W)("t.withdraw"),isDisabled:Ct.value,onOnPrevious:a[5]||(a[5]=e=>b("previous")),onOnMainButtonClick:_t},null,8,["buttonTitle","isDisabled"])])),_:1})])),[[y,ie.value]]),ee.value?(o(),r(la,{key:0,action:X.value,"onUpdate:action":a[6]||(a[6]=e=>X.value=e),isShowDialog:ee.value,"onUpdate:isShowDialog":a[7]||(a[7]=e=>ee.value=e),selectedBankAccount:le.value,"onUpdate:selectedBankAccount":a[8]||(a[8]=e=>le.value=e),currency:e.currency,bankAccounts:de.value,paymentWay:we.value,isGroupBank:it.value,onOnActionSuccess:Lt},null,8,["action","isShowDialog","selectedBankAccount","currency","bankAccounts","paymentWay","isGroupBank"])):m("",!0)])):e.step===c(pe).SUBMIT_STATUS?(o(),r(Ba,{key:1,currency:e.currency,selectedPayment:e.selectedPayment,
1withdrawRequestData:he.value,"onUpdate:errorCode":a[9]||(a[9]=e=>t.$emit("update:errorCode",e)),"onUpdate:step":a[10]||(a[10]=e=>t.$emit("update:step",e))},null,8,["currency","selectedPayment","withdrawRequestData"])):m("",!0)}}},[["__scopeId","data-v-36cd9817"]]),Za={key:0,class:"break-spaces"},Ja={key:1},Xa=["href"],es=jt({__name:"WalletWithdrawResult",props:{currency:{type:String,default:""},step:{type:String,required:!0},errorCode:{type:String,default:""}},setup(e){const t=y(),a=s(),i=e,c={[pe.PROCESSING]:Ut.PROCESSING,[pe.FAILURE]:Ut.FAIL},h=n((()=>c[i.step])),p=n((()=>({[pe.PROCESSING]:a.t("t.processing"),[pe.FAILURE]:a.t("t.unsuccessful")}[i.step]))),w=n((()=>i.step===pe.PROCESSING)),f=n((()=>i.step===pe.FAILURE)),C=n((()=>i.errorCode?`response-code.${i.errorCode}`:"")),k=n((()=>C.value&&Ge(C.value))),g=n((()=>k.value?a.t(C.value,{code:i.errorCode}):a.t("t.errorSubmitMsg"))),b=n((()=>i.step!==pe.FAILURE?"":i.errorCode?`${a.t("t.errorCode")}: ${i.errorCode}`:"")),S=n((()=>G(t.state.lang)));return(e,t)=>{const a=_("i18n-t");return o(),r(qt,{iconType:h.value,title:p.value,isShowViewHistory:w.value,currency:i.currency,note:b.value},{content:l((()=>[w.value?(o(),A("p",Za,v(e.$t("wallets.withdraw.processing.requestReceived")),1)):m("",!0),f.value?(o(),A("div",Ja,[u("p",null,v(g.value),1),d(a,{keypath:"t.errorTryAgain",tag:"div"},{customerSupport:l((()=>[u("a",{class:"link",href:S.value,target:"_blank",rel:"noreferrer noopener"},v(e.$t("t.customerSupport")),9,Xa)])),_:1})])):m("",!0)])),_:1},8,["iconType","title","isShowViewHistory","currency","note"])}}},[["__scopeId","data-v-5e15ab82"]]),ts={class:"wallet-withdraw-fiat"},as=jt({__name:"WalletWithdrawFiat",props:{currency:{type:String,default:""}},emits:["previous"],setup(e,{emit:t}){const s=w(),d=a(),c=e,h=t,p=j(),{lang:v}=i(p),y=ie(),{checkExtendedKycByLicenseEntity:f}=y,A=E(!1),C=E(!1),k=E(!1),g=E(pe.SELECT_PAYMENT_METHOD),b=E(""),S=W([]),I=E({}),x=E({}),T=n((()=>{var e;return 0===(null==(e=S.value)?void 0:e.length)})),N=n((()=>{var e;const t=null==(e=S.value)?void 0:e.length;if(T.value)return[{info:Ve()}];return S.value.map(((e,a)=>({...e,info:Qe({method:e.method,provider:e.provider,label:ze({size:t,index:a}),kycInfo:(null==e?void 0:e.kycInfo)||{},userInfo:null==e?void 0:e.userInfo})})))})),L=n((()=>{var e,t;return null==(t=null==(e=I.value)?void 0:e.kycInfo)?void 0:t.allow})),_=n((()=>{if(T.value)return[];const{provider:e,method:t}=I.value,{withdrawFees:a,limitSetting:s={},fiatWithdrawLimit:i}=x.value;return Ma({provider:e,method:t,withdrawFees:a,limitSetting:s,fiatWithdrawLimit:i},v.value,c.currency)})),P=n((()=>{const{limitSetting:e,fiatWithdrawLimit:t}=x.value;return $a({limitSetting:e,fiatWithdrawLimit:t})})),B=n((()=>g.value===pe.SELECT_PAYMENT_METHOD)),F=n((()=>g.value===pe.ENTER_AMOUNT||g.value===pe.SUBMIT_STATUS)),M=n((()=>g.value===pe.PROCESSING||g.value===pe.FAILURE)),D=n((()=>!M.value)),O=n((()=>!M.value)),$=e=>{const t=N.value.find((t=>t.provider===e.provider&&t.method===e.method));t&&(I.value=t,e.provider!==ne.EXPRESSBUY_ENTRY&&H())},H=async()=>{const{provider:e,method:t}=I.value;if(e&&t){C.value=!0;try{const a=await ve.getWithdrawFiatTxnLimitation(c.currency,e,t);x.value=a}catch(a){return Promise.reject(a)}finally{C.value=!1}}},U=()=>{const e=Ze(s.query,["method","provider"]);d.replace({query:e})},q=async()=>{const{method:e,provider:t}=s.query;if(e&&t&&(I.value=N.value.find((a=>a.method===e&&a.provider===t)),I.value)){if(!f(I.value.licensedEntity)&&L.value)return void(g.value=pe.ENTER_AMOUNT)}U(),I.value=N.value[0]||{},(()=>{const{method:e,provider:t}=I.value;k.value=!e||!t})()},K=async()=>{A.value=!0;try{await(async()=>{try{const{data:e}=await ve.getFiatWithdrawList(c.currency);S.value=e||[]}catch(e){return Promise.reject(e)}})(),await q(),await H()}catch{}finally{A.value=!1}},Y=()=>{U(),g.value=pe.SELECT_PAYMENT_METHOD},G=()=>{d.replace({query:{...s.query,method:I.value.method,provider:I.value.provider}}),g.value=pe.ENTER_AMOUNT},V=()=>{d.push({name:"walletSpot",params:{lang:v.value}})};return R((()=>{K()})),(t,a)=>(o(),r(Ot,{isShowGoBack:D.value},{default:l((()=>[u("div",ts,[O.value?(o(),r(Mt,{key:0,class:"title",title:t.$t("t.withdraw"),coinName:e.currency},null,8,["title","coinName"])):m("",!0),B.value?(o(),r(xa,{key:1,paymentList:N.value,withdrawNote:_.value,withdrawNotice:P.value,isNoteLoading:C.value,isContentLoading:A.value,isKycPassed:L.value,selectedPayment:I.value,onHandleSelectedPayment:$,onOnPrevious:a[0]||(a[0]=e=>h("previous")),onProceedToEnterAmount:G},null,8,["paymentList","withdrawNote","withdrawNotice","isNoteLoading","isContentLoading","isKycPassed","selectedPayment"])):F.value?(o(),r(za,{key:2,step:g.value,"onUpdate:step":a[1]||(a[1]=e=>g.value=e),currency:e.currency,selectedPayment:I.value,paymentInfoData:x.value,withdrawNote:_.value,withdrawNotice:P.value,isNoteLoading:C.value,onPrevious:Y,onUpdateFeeInfo:H,"onUpdate:errorCode":a[2]||(a[2]=e=>b.value=e)},null,8,["step","currency","selectedPayment","paymentInfoData","withdrawNote","withdrawNotice","isNoteLoading"])):M.value?(o(),r(es,{key:3,currency:e.currency,step:g.value,errorCode:b.value},null,8,["currency","step","errorCode"])):m("",!0),k.value?(o(),r(va,{key:4,buttonText:t.$t("wallets.backToWallet"),onOnClose:a[3]||(a[3]=e=>k.value=!1),onOnClick:V},null,8,["buttonText"])):m("",!0)])])),_:1},8,["isShowGoBack"]))}},[["__scopeId","data-v-3390fa50"]]),ss={__name:"IconCryptoExpressSell",setup:e=>(e,t)=>
1(o(),r(Je,{width:"36",height:"37",fill:"none","fill-rule":"evenodd","aria-label":"Crypto Express Sell Icon"},{default:l((()=>t[0]||(t[0]=[u("path",{d:"M12.75 7.25C12.8315 7.25 12.9105 7.26089 12.9863 7.2793C13.0059 7.26966 13.0253 7.25953 13.0449 7.25C13.4343 7.25004 13.75 7.56569 13.75 7.95508V13C13.75 13.4142 13.4142 13.75 13 13.75C12.5858 13.75 12.25 13.4142 12.25 13V10.0625C9.67141 11.9757 8 15.0425 8 18.5C8 24.299 12.701 29 18.5 29C19.6343 29 20.7267 28.8201 21.75 28.4873V30.5732C20.7137 30.8515 19.6242 31 18.5 31C11.5964 31 6 25.4036 6 18.5C6 14.5566 7.82706 11.041 10.6797 8.75H8C7.58579 8.75 7.25 8.41421 7.25 8C7.25 7.58579 7.58579 7.25 8 7.25H12.75ZM18.5 6C25.4036 6 31 11.5964 31 18.5C31 21.9073 29.6357 24.9952 27.4248 27.25H29.5C29.9142 27.25 30.25 27.5858 30.25 28C30.25 28.4142 29.9142 28.75 29.5 28.75H24.75C24.2323 28.75 23.8062 28.3567 23.7549 27.8525C23.7515 27.8188 23.75 27.7846 23.75 27.75V23C23.75 22.5858 24.0858 22.25 24.5 22.25C24.9142 22.25 25.25 22.5858 25.25 23V26.541C27.5421 24.6149 29 21.7282 29 18.5C29 12.701 24.299 8 18.5 8C17.3657 8 16.2733 8.17991 15.25 8.5127V6.42676C16.2863 6.14848 17.3758 6 18.5 6Z",fill:"#015FE5"},null,-1),u("circle",{cx:"10",cy:"26.2002",r:"8",fill:"white"},null,-1),u("path",{d:"M17.224 27.0856C17.224 30.5791 14.3921 33.411 10.8986 33.411C7.40522 33.411 4.57324 30.5791 4.57324 27.0856C4.57324 23.5922 7.40522 20.7603 10.8986 20.7603C14.3921 20.7603 17.224 23.5922 17.224 27.0856Z",fill:"#E3EAF0"},null,-1),u("path",{d:"M10.5752 30.1929L10.3564 29.3762C9.88665 29.454 9.47187 29.4497 9.12344 29.3699C8.76362 29.2835 8.43906 29.1492 8.14736 28.9581L8.7579 28.0057C8.97652 28.1395 9.20347 28.2326 9.44116 28.294C9.68782 28.3529 9.93384 28.3736 10.1948 28.3421L9.76189 26.7266C9.05029 26.7634 8.50793 26.6779 8.1348 26.47C7.76825 26.2508 7.51707 25.9237 7.40164 25.4929C7.27419 25.0173 7.32335 24.5905 7.54914 24.2125C7.77252 23.8256 8.1642 23.5283 8.73073 23.3091L8.50468 22.4655L9.52782 22.1913L9.75388 23.035C10.1225 22.9747 10.4607 22.9803 10.766 23.0428C11.0713 23.1052 11.3527 23.2222 11.6127 23.4026L10.9932 24.3574C10.8518 24.2606 10.6884 24.189 10.5207 24.1377C10.3417 24.0799 10.1429 24.0562 9.91552 24.069L10.3147 25.5589C10.9814 25.5341 11.5034 25.6155 11.8807 25.803C12.258 25.9905 12.5068 26.3086 12.6318 26.7753C12.7497 27.2151 12.7095 27.6395 12.5137 28.0575C12.3155 28.4665 11.9334 28.7997 11.3675 29.0572L11.5984 29.9188L10.5752 30.1929ZM8.63954 25.1228C8.68523 25.2933 8.76618 25.4159 8.90033 25.4858C9.03207 25.5466 9.21527 25.5841 9.46785 25.5934L9.11194 24.2651C8.89062 24.3725 8.75071 24.4966 8.67427 24.6421C8.59784 24.7876 8.59144 24.9433 8.63954 25.1228ZM11.4198 27.2059C11.3837 27.0713 11.3051 26.9576 11.1997 26.8512C11.0852 26.7472 10.8883 26.6942 10.6177 26.6897L10.9977 28.1078C11.1873 27.9896 11.3134 27.85 11.3874 27.6955C11.4525 27.5434 11.4655 27.3764 11.4198 27.2059Z",fill:"#015FE5"},null,-1),u("circle",{cx:"10",cy:"26.2002",r:"8",stroke:"#CBD6E1","stroke-width":"2"},null,-1),u("circle",{cx:"26",cy:"11.2002",r:"8",fill:"white"},null,-1),u("path",{d:"M33.2242 12.0856C33.2242 15.5791 30.3922 18.411 26.8988 18.411C23.4054 18.411 20.5734 15.5791 20.5734 12.0856C20.5734 8.59223 23.4054 5.76025 26.8988 5.76025C30.3922 5.76025 33.2242 8.59223 33.2242 12.0856Z",fill:"#E3EAF0"},null,-1),u("circle",{cx:"26",cy:"11.2002",r:"8",stroke:"#CBD6E1","stroke-width":"2"},null,-1),u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M29.214 10.6043C29.3528 9.67788 28.6469 9.17976 27.6825 8.84739L27.9954 7.59216L27.2317 7.40211L26.9267 8.62419C26.7302 8.57485 26.5286 8.5289 26.3274 8.48302L26.3146 8.4801L26.6217 7.25007L25.858 7.05957L25.5451 8.31436L25.5117 8.30673L25.5117 8.30673C25.357 8.27136 25.2047 8.23656 25.0571 8.19945L25.058 8.19547L24.0043 7.93249L23.801 8.74839C23.801 8.74839 24.3681 8.87833 24.3561 8.88629C24.6655 8.96363 24.7212 9.16827 24.7119 9.33092L24.3557 10.7607C24.3769 10.766 24.4043 10.774 24.4353 10.7859L24.3544 10.766L23.8549 12.7691C23.8169 12.8628 23.721 13.0038 23.5044 12.9503C23.5124 12.9614 22.9493 12.812 22.9493 12.812L22.5701 13.6862L23.5645 13.9342C23.6714 13.961 23.777 13.9886 23.8815 14.0159L23.8816 14.0159C23.9579 14.0358 24.0335 14.0555 24.1086 14.0747L23.7926 15.3441L24.5559 15.5342L24.8688 14.2789C25.0775 14.3351 25.2799 14.3872 25.4779 14.4367L25.1659 15.6866L25.9296 15.8767L26.2456 14.61C27.5486 14.8566 28.528 14.7572 28.9404 13.5788C29.2728 12.6303 28.924
112.0827 28.2385 11.726C28.738 11.6111 29.1136 11.2827 29.214 10.6043ZM27.468 13.0517C27.2519 13.9222 25.8895 13.5623 25.2659 13.3976C25.2097 13.3828 25.1595 13.3695 25.1167 13.3589L25.5365 11.6771C25.5888 11.6902 25.6526 11.7045 25.7249 11.7208C26.37 11.8657 27.6902 12.1623 27.468 13.0517ZM25.8537 10.9403C26.3733 11.079 27.5064 11.3816 27.7037 10.5905C27.9055 9.78138 26.804 9.53771 26.2659 9.41868C26.2053 9.40527 26.1518 9.39343 26.1081 9.38255L25.728 10.9074C25.764 10.9164 25.8063 10.9277 25.8537 10.9403Z",fill:"#015FE5"},null,-1)]))),_:1,__:[0]}))},is={class:"flex-box items-center justify-between inner-ml-8 w-100"},ns={class:"addressName"},rs={class:"flex-box items-center inner-ml-8"},os={key:0,class:"universal"},ls={class:"network"},ds={class:"address"},us=jt({__name:"AddressBookSelectItem",props:{info:{type:Object,default:()=>({})}},emits:["onSelect"],setup(e){const{t:t}=s();return(a,s)=>(o(),A("div",{class:"address-book-select-item",onClick:s[0]||(s[0]=t=>a.$emit("onSelect",e.info))},[u("div",is,[u("div",ns,v(e.info.addressName||"--"),1),u("div",rs,[e.info.isUniversalAddress?(o(),A("div",os,v(c(t)("t.universal")),1)):m("",!0),u("div",ls,v(e.info.network),1)])]),u("div",ds,v(e.info.address),1)]))}},[["__scopeId","data-v-8e7994f0"]]),cs={class:"flex-box items-center inner-ml-8"},hs={key:1},ms={class:"not-found-title"},ps={class:"not-found-description"},vs={key:1,class:"list-block"},ys=jt(Object.assign({name:"AddressBookSelectDialog"},{__name:"AddressBookSelectDialog",props:{currency:{type:String,default:""},appliedAddressBookList:{type:Array,default:null}},emits:["onSelect","onClose"],setup(e){const t=e,h=j(),m=a(),{t:y}=s(),w=Xe(),f=E([]),{currencyMap:C,lang:k}=i(h),S=n((()=>C.value[t.currency]||"")),I=n((()=>0===f.value.length)),x=n((()=>w.isMobile));function T(){m.push({name:le.ADDRESS_BOOK,params:{lang:k.value}})}return R((()=>{t.appliedAddressBookList?f.value=t.appliedAddressBookList:ve.getAddressBookListByCurrency(t.currency).then((e=>{f.value=e}))})),(t,a)=>{const s=_("BaseButton");return o(),r(c(at),{class:"address-book-select-dialog",width:"560px",fullStyle:x.value,isBrandNewStyle:"",onClosed:a[1]||(a[1]=e=>t.$emit("onClose"))},{header:l((()=>[u("div",cs,[S.value?(o(),r(c(tt),{key:0,displayName:S.value.displayName,type:S.value.isFiat?"fiat":"icon",name:S.value.shortName,showName:!1,size:"24"},null,8,["displayName","type","name"])):(o(),A("div",hs,v(e.currency),1)),u("div",null,v(c(y)("wallets.addressBook.select")),1)])])),body:l((()=>[I.value?(o(),r(et,{key:0,class:"no-data-available"},{"empty-text":l((()=>[u("div",ms,v(c(y)("wallets.addressBook.notFound")),1),u("div",ps,v(c(y)("wallets.addressBook.manageDescription")),1)])),"extra-behavior":l((()=>[d(s,{class:"primary block",size:"large",onClick:T},{default:l((()=>[p(v(c(y)("wallets.addressBook.manage")),1)])),_:1})])),_:1})):(o(),A("div",vs,[(o(!0),A(g,null,b(f.value,((e,s)=>(o(),r(c(us),{key:s,info:e,onOnSelect:a[0]||(a[0]=e=>t.$emit("onSelect",e))},null,8,["info"])))),128))]))])),_:1},8,["fullStyle"])}}}),[["__scopeId","data-v-70e81214"]]),ws={class:"withdraw-maintenance-card"},fs={class:"content-wrapper"},As={class:"content"},Cs={class:"title"},ks={class:"subtitle"},gs={class:"subtitle"},bs=jt(B({__name:"WithdrawMaintenanceCard",setup:e=>(e,t)=>(o(),A("div",ws,[u("div",fs,[d(st,{class:"ban-icon"}),u("div",As,[u("div",Cs,v(e.$t("payment.maintenance.scheduledMaintenance")),1),u("div",ks,v(e.$t("payment.maintenance.featurePaused",{feature:e.$t("t.withdrawals")})),1),u("div",gs,v(e.$t("payment.maintenance.fundsAreSafe")),1)])])]))}),[["__scopeId","data-v-367e9026"]]),{enableAddressBook:Ss,enableExpressSell:Es}=q,Is={[it.MetaMask]:{name:Ee("t.metaMask"),icon:Aa},[it.TrustWallet]:{name:Ee("t.trustWallet"),icon:fa},[it.Rabby]:{name:Ee("t.rabbyWallet"),icon:wa},[it.Phantom]:{name:Ee("t.phantom"),icon:ya}},xs={name:"WalletWithdrawCryptoMethod",components:{PaymentButtonGroup:re,WithdrawMaintenanceCard:bs,IconCryptoAddress:zt,IconCryptoExpressSell:ss,IconAddressBook:sa,Notes:Dt,PaymentCard:Kt,AddressBookSelectDialog:ys},props:{currency:{type:String,default:""},withdrawMethod:{type:String,required:!0},blockChainList:{type:Array,default:()=>[]},blockChain:{type:String,required:!0},onPrevious:{type:Function,default:()=>{}},isLoading:{type:Boolean,default:!1},isNetworkErr:{type:Boolean,default:!1},notes:{type:Array,default:()=>[]},notice:{type:Object,default:()=>({})}},emits:["update:withdrawMethod","update:blockChain","onChangeStep"],data:()=>({CRYPTO_PAYMENT_TYPE:it,isShowAddressBookSelectDialog:!1}),computed:{...M(["lang","accountInfo"]),...F(ia,["expressSellCoinPairs"]),isExpressSell(){return Boolean(this.expressSellCoinPairs[this.currency])},isChainEmpty(){return 0===this.blockChainList.length},isShowChainFilter(){return this.blockChainList.length>1}
1,blockChainLabelList(){return this.blockChainList.map((({method:e,fullMethodName:t})=>({id:e,name:t})))},isNextDisabled(){return this.isLoading||!this.blockChain||this.isNetworkErr},paymentMethods(){const e=[{cardId:it.WalletAddress,title:this.$t("wallets.address.receivableAddress"),icon:zt}];Es&&this.isExpressSell&&e.push({cardId:it.ExpressSell,title:this.$t("display.expressSell"),icon:ss});for(const t of Ca(this.blockChain)){const a=Is[t];a&&e.push({cardId:t,title:this.$t(a.name),icon:a.icon})}return e},isShowAddressBookButton(){return Ss&&!this.isChainEmpty}},methods:{setWithdrawMethod(e){this.$emit("update:withdrawMethod",e)},setBlockChain(e){this.$emit("update:blockChain",e),this.$emit("update:withdrawMethod",it.WalletAddress)},onNext({withdrawAddress:e,addressExtension:t}={}){this.withdrawMethod!==it.ExpressSell?this.accountInfo.kycNotice!==oe.limited?(this.$emit("onChangeStep",rt.FORM,{withdrawAddress:e,addressExtension:t}),this.$router.replace({query:{...this.$route.query,method:this.withdrawMethod,network:this.blockChain}}).catch((()=>{}))):this.$openDialog(aa,{visible:!0}):this.$router.push({name:nt.EXPRESS_SELL,params:{lang:this.lang},query:{sellCurrency:this.currency}})},actionType:e=>e?Yt.CHECK:"",openAddressBookSelectDialog(){this.isShowAddressBookSelectDialog=!0},closeAddressBookSelectDialog(){this.isShowAddressBookSelectDialog=!1},onSelectAddressBook(e){if(this.isChainEmpty||!e.network)return void this.closeAddressBookSelectDialog();this.blockChainList.some((({method:t})=>t===e.network))?(this.setWithdrawMethod(it.WalletAddress),this.setBlockChain(e.network),this.$nextTick((()=>{this.onNext({withdrawAddress:e.address,addressExtension:e.addressExtension})}))):this.closeAddressBookSelectDialog()}}},Ts={class:"wallet-withdraw-crypto-method"},Ns={class:"container justify-between"},Ls={class:"secondary-title-block flex-box items-center justify-between"},_s={class:"secondary-title"},Ps={class:"method-block w-100"},Ws={class:"title"},Rs={class:"title payment-title"};const Bs=jt(xs,[["render",function(e,t,a,s,i,n){const c=_("IconAddressBook"),p=_("BrandFilter"),y=_("WithdrawMaintenanceCard"),w=_("PaymentCard"),k=_("Notes"),E=_("PaymentButtonGroup"),I=_("AddressBookSelectDialog"),x=f("loading");return o(),A("div",Ts,[u("div",Ns,[u("div",Ls,[u("div",_s,v(e.$t("wallets.withdraw.select.method")),1),n.isShowAddressBookButton?(o(),A("div",{key:0,class:"address-book-button flex-box items-center inner-ml-4",onClick:t[0]||(t[0]=(...e)=>n.openAddressBookSelectDialog&&n.openAddressBookSelectDialog(...e))},[d(c),u("div",null,v(e.$t("wallets.addressBook.choose")),1)])):m("",!0)]),u("div",Ps,[u("div",Ws,v(e.$t("t.network")),1),n.isShowChainFilter?C((o(),r(p,{key:0,class:h(["network-list",{"is-loading":a.isLoading}]),modelValue:a.blockChain,itemList:n.blockChainLabelList,haveHoverStyle:!1,variant:"outlined2","onUpdate:modelValue":n.setBlockChain},null,8,["class","modelValue","itemList","onUpdate:modelValue"])),[[x,a.isLoading]]):m("",!0),u("div",Rs,v(e.$t("wallets.withdraw.method")),1),0!==a.blockChainList.length||a.isLoading?(o(!0),A(g,{key:2},b(n.paymentMethods,(e=>C((o(),r(w,{key:e.cardId,class:h(["payment-card",{"is-loading":a.isLoading}]),title:e.title,cardId:e.cardId,selectedId:a.withdrawMethod,actionType:n.actionType(a.withdrawMethod===e.cardId),onHandleClick:t=>n.setWithdrawMethod(e.cardId)},{icon:l((()=>[(o(),r(S(e.icon),{class:"method-icon"}))])),_:2},1032,["class","title","cardId","selectedId","actionType","onHandleClick"])),[[x,a.isLoading]]))),128)):(o(),r(y,{key:1})),e.isMobile?(o(),r(k,{key:3,class:"notes-block",notice:a.notice,notes:a.notes},null,8,["notice","notes"])):m("",!0),d(E,{buttonTitle:e.$t("t.next"),isDisabled:n.isNextDisabled,onOnPrevious:a.onPrevious,onOnMainButtonClick:n.onNext},null,8,["buttonTitle","isDisabled","onOnPrevious","onOnMainButtonClick"])]),e.isMobile?m("",!0):(o(),r(k,{key:0,class:"notes-block desktop-notes-block w-100",notice:a.notice,notes:a.notes},null,8,["notice","notes"]))]),i.isShowAddressBookSelectDialog?(o(),r(I,{key:0,currency:a.currency,onOnSelect:n.onSelectAddressBook,onOnClose:n.closeAddressBookSelectDialog},null,8,["currency","onOnSelect","onOnClose"])):m("",!0)])}],["__scopeId","data-v-11cadcc9"]]);const Fs=jt({name:"FormFieldTextareaV2",components:{Textarea:ot},props:{rules:{type:[String,Object],default:""},value:{type:String,default:""},name:{type:String,default:""},rows:{type:String,default:"1"},isJumpingError:{type:Boolean,default:!1},jumpingError:{type:String,default:""}},emits:["input"],data:()=>({isFocus:!1,textareaHeight:"auto"}),computed:{innerValue:{get(){return this.value},set(e){this.$emit("input",e),this.textareaHeight="auto",this.$nextTick(this.setTextareaHeight)}}},watch:{value(e){e||(this.textareaHeight="auto")}},methods:{setTextareaHeight(){var e;const{scrollHeight:t}=(null==(e=this.$refs.textarea)?void 0:e.$el)||{};this.textareaHeight=`${t}px`},onFocus(){this.isFocus=!0},onBlur(){this.isFocus=!1}}},[["render",function(e,t,a,s,i,n){const c=_("Textarea"),m=_("ValidationField");return o(),r(m,{modelValue:n.innerValue,"onUpdate:modelValue":t[0]||(t[0]=e=>n.innerValue=e),as:"div",name:a.name,rules:a.rules,class:"form-field-textarea-v2"},{default:l((({meta:t,errors:s,field:r})=>[u("div",{class:h(["textarea-wrapper",{"is-focus":i.isFocus,"is-invalid":a.isJumpingError||!t.valid&&t.validated}])},[d(c,O(r,{ref:"textarea",class:"wallet-textarea",rows:a.rows,style:{height:i.textareaHeight},onFocus:n.onFocus,onBlur:n.onBlur}
1),null,16,["rows","style","onFocus","onBlur"]),D(e.$slots,"suffix",{},void 0,!0)],2),C(u("div",{class:"error-message"},v(a.jumpingError||s[0]),513),[[$,a.isJumpingError||!t.valid&&t.validated]])])),_:3},8,["modelValue","name","rules"])}],["__scopeId","data-v-40d3aeee"]]),Ms={class:"container"},Ds=jt({__name:"WalletWithdrawCryptoAuth",props:e({currency:{type:String,required:!0},withdrawInfo:{type:Object,required:!0}},{errorCode:{type:[String,Number],default:null},errorCodeModifiers:{}}),emits:e(["update:step"],["update:errorCode"]),setup(e,{emit:a}){const{enableWithdrawThreeFactorAuthenticator:n}=q,r=e,l=a,u=t(e,"errorCode"),{t:h}=s(),m=j(),p=w(),{isApp:v}=i(m),{$openDialog:y}=se(),{$sendEvent:f}=lt(),C=E(!1),k=E(!1),g=async({emailCode:e,smsCode:t,twoFACode:a})=>{var s;try{C.value=!0,k.value=!1;const i={...r.withdrawInfo,emailCode:e,smsCode:t,twoFACode:a};await ve.requestWithdrawCrypto(i),f(dt.EVENT_WEB_WITHDRAWAL_CRYPTO_SUBMITTED,{route:p,submitSuccess:!0}),v.value&&ye({event:"PAYMENT_PROCESSING",action:ca.WITHDRAW,currency:r.currency,network:null==(s=r.withdrawInfo)?void 0:s.method}),l("update:step",rt.PROCESSING)}catch(i){if(f(dt.EVENT_WEB_WITHDRAWAL_CRYPTO_SUBMITTED,{route:p,submitSuccess:!1}),we(null==i?void 0:i.code))return void(k.value=!0);if(fe.includes(i))return await y(Xt),void b();m.updateAccountInfo(),u.value=i;[Ae.EMAIL_OTP_ERROR,Ae.PAYMENT_EMAIL_OTP_ERROR,...Ce].includes(i)||l("update:step",rt.FAILURE)}finally{C.value=!1}},b=()=>{l("update:step",rt.FORM)},S=()=>{me({title:h("account.account.update-pass.verificationSent")})},I=()=>{he({title:h("trade.marginCall.errorText")})};return(e,t)=>(o(),A("div",Ms,[d(ce,{errorCode:u.value,"onUpdate:errorCode":t[0]||(t[0]=e=>u.value=e),isEnableThreeFactor:c(n),verification:g,sendEmailType:c(ue).WITHDRAW_CRYPTO,isLoading:C.value,onPrevious:b,autoSendEmail:"",showPreviousButton:"",isPaymentEmailOtp:"",isNetworkError:k.value,onHandleSendCodeSuccessfully:S,onHandleSendCodeFail:I},null,8,["errorCode","isEnableThreeFactor","sendEmailType","isLoading","isNetworkError"])]))}},[["__scopeId","data-v-bf8970f9"]]),{enableAddressBook:Os}=q,$s={name:"WalletWithdrawProcessing",components:{IconProcessing2:ct,IconHistory:ut,IconAddressBook:sa},props:{currency:{type:String,required:!0},isAddAddressBookAvailable:{type:Boolean,default:!1},method:{type:String,default:""},address:{type:String,default:""},addressExtension:{type:String,default:""}},emits:["closed"],data:()=>({enableAddressBook:Os}),computed:{...M(["lang"]),defaultAddAddressBookForm(){return{currency:this.currency,network:this.method,address:this.address,addressExtension:this.addressExtension}},addressBookButtonTitle(){return this.isAddAddressBookAvailable?this.$t("wallets.addressBook.add"):this.$t("wallets.addressBook.manage")}},methods:{goHistory(){this.$router.push({name:nt.WALLET_SPOT_HISTORY,params:{lang:this.lang}})},goAddressBook(){const e={lang:this.lang},t={};this.isAddAddressBookAvailable&&(t.defaultAddAddressBookForm=this.defaultAddAddressBookForm),this.$router.push({name:le.ADDRESS_BOOK,params:e,state:t})}}},Hs={class:"result-container"},Us={class:"wallet-withdraw-processing"},qs={class:"title-text"},js={class:"des-text"},Ks={class:"action-block flex-center-center inner-ml-32"};const Ys=jt($s,[["render",function(e,t,a,s,i,n){const r=_("IconProcessing2"),c=_("IconHistory"),h=_("IconAddressBook"),y=_("BaseButton");return o(),A("div",Hs,[u("div",Us,[d(r,{class:"dialog-success-icon"}),u("p",qs,v(e.$t("t.processing")),1),u("p",js,v(e.$t("wallets.withdraw.processing.requestReceived")),1),u("div",Ks,[u("div",{class:"action-button flex-center-center inner-ml-4",onClick:t[0]||(t[0]=(...e)=>n.goHistory&&n.goHistory(...e))},[d(c,{class:"action-icon"}),u("div",null,v(e.$t("t.viewHistory")),1)]),i.enableAddressBook?(o(),A("div",{key:0,class:"action-button flex-center-center inner-ml-4",onClick:t[1]||(t[1]=(...e)=>n.goAddressBook&&n.goAddressBook(...e))},[d(h,{class:"action-icon"}),u("div",null,v(n.addressBookButtonTitle),1)])):m("",!0)]),d(y,{class:"primary block",size:"large",onClick:t[2]||(t[2]=t=>e.$emit("closed"))},{default:l((()=>[p(v(e.$t("wallets.backToWallet")),1)])),_:1})])])}],["__scopeId","data-v-d8438a63"]]),Gs={name:"WalletWithdrawFail",components:{IconFlashFail:ht},props:{currency:{type:String,required:!0},errorCode:{type:Number,required:!0}},emits:["closed","back"],computed:{...M(["lang"]),supportUrl(){return G(this.lang,"NEW_TICKET")},errorI18nKey(){return`response-code.${this.errorCode}`},isTargetErrorMessage(){return Ge(this.errorI18nKey)},errorMessage(){return this.isTargetErrorMessage?this.$t(this.errorI18nKey,{code:this.errorCode}):this.$t("wallets.withdraw.failed")}}},Vs={class:"result-container"},Qs={class:"wallet-withdraw-processing"},zs={class:"title-text"}
1,Zs={key:0,class:"error-code"},Js={class:"des-text"},Xs=["href"];const ei=jt(Gs,[["render",function(e,t,a,s,i,n){const r=_("IconFlashFail"),c=_("i18n-t"),h=_("BaseButton");return o(),A("div",Vs,[u("div",Qs,[d(r,{class:"dialog-fail-icon"}),u("p",zs,v(e.$t("t.unsuccessful")),1),n.isTargetErrorMessage?m("",!0):(o(),A("span",Zs,v(e.$t("t.errorCode"))+" "+v(a.errorCode),1)),u("div",Js,[u("p",null,v(n.errorMessage),1),d(c,{tag:"p",keypath:"t.tryOrContact"},{tryAgain:l((()=>[u("span",{class:"link",onClick:t[0]||(t[0]=t=>e.$emit("back"))},v(e.$t("t.try_again").toLowerCase()),1)])),customerSupport:l((()=>[u("a",{class:"link",href:n.supportUrl,target:"_blank",rel:"noopener nofollow"},v(e.$t("t.customerSupport")),9,Xs)])),_:1})]),d(h,{class:"primary block",size:"large",onClick:t[1]||(t[1]=t=>e.$emit("closed"))},{default:l((()=>[p(v(e.$t("t.ok")),1)])),_:1})])])}],["__scopeId","data-v-d4815064"]]),ti={class:"subtitle"},ai={class:"receive-amount"},si={class:"info-row horizontal-divider"},ii={class:"info-name"},ni={class:"info-value"},ri={class:"total-amount"},oi={class:"fee-amount"},li={class:"info-row"},di={class:"info-name"},ui={class:"info-value"},ci={key:0,class:"info-row"},hi={class:"info-name"},mi={class:"info-value"},pi={class:"info-row"},vi={class:"info-name"},yi={class:"info-value"},wi={key:1,class:"info-row"},fi={class:"info-name"},Ai={class:"info-value highlight-text"},Ci={class:"term"},ki=jt({__name:"WithdrawConfirmationDialog",props:{currency:{type:String,default:""},amount:{type:String,default:"0"},fee:{type:String,default:"0"},totalAmount:{type:String,default:"0"},destinationAddress:{type:String,default:""},addressExtensionName:{type:String,default:""},addressExtension:{type:String,default:""},network:{type:String,default:""},endingIn:{type:String,default:""}},emits:["dialog:closed"],setup(e,{emit:t}){const a=t;return(t,s)=>{const i=_("RouterLink"),n=_("BaseButton");return o(),r(c(at),{width:"560px",isBrandNewStyle:"",onClosed:s[2]||(s[2]=e=>a("dialog:closed",{confirm:!1}))},{header:l((()=>[p(v(t.$t("wallets.withdraw.confirmation.title")),1)])),body:l((()=>[u("div",ti,v(t.$t("wallets.withdraw.confirmation.subtitle")),1),u("div",ai,[d(tt,{class:"icon",type:c(mt).COIN,name:e.currency,size:"24"},null,8,["type","name"]),p(" "+v(e.amount)+" "+v(e.currency),1)]),u("div",si,[u("div",ii,v(t.$t("wallets.withdraw.crypto.withdrawalAmount")),1),u("div",ni,[u("div",ri,v(e.totalAmount)+" "+v(e.currency),1),u("div",oi,v(t.$t("t.fees"))+": "+v(e.fee)+" "+v(e.currency),1)])]),u("div",li,[u("div",di,v(t.$t("wallets.withdraw.confirmation.destinationAddress")),1),u("div",ui,v(e.destinationAddress),1)]),e.addressExtensionName&&e.addressExtension?(o(),A("div",ci,[u("div",hi,v(e.addressExtensionName),1),u("div",mi,v(e.addressExtension),1)])):m("",!0),u("div",pi,[u("div",vi,v(t.$t("t.network")),1),u("div",yi,v(e.network),1)]),e.endingIn?(o(),A("div",wi,[u("div",fi,v(t.$t("wallets.withdraw.confirmation.endingIn")),1),u("div",Ai,v(e.endingIn),1)])):m("",!0),u("div",Ci,[p(v(t.$t("wallets.withdraw.confirmation.term"))+" ",1),d(i,{class:"highlight-text",to:{name:c(nt).LEGAL_TRANSFER_SERVICE},target:"_blank",rel:"noopener noreferrer"},{default:l((()=>[p(v(t.$t("wallets.withdraw.confirmation.serviceInformation")),1)])),_:1},8,["to"])]),d(n,{class:"primary w-100",size:"large",onClick:s[0]||(s[0]=e=>a("dialog:closed",{confirm:!0}))},{default:l((()=>[p(v(t.$t("t.confirm")),1)])),_:1}),d(n,{class:"cancel-btn w-100",size:"large",onClick:s[1]||(s[1]=e=>a("dialog:closed",{confirm:!1}))},{default:l((()=>[p(v(t.$t("t.cancel")),1)])),_:1})])),_:1})}}},[["__scopeId","data-v-1bd4dc60"]]),{enableAddressBook:gi,enableTasksAndRewards:bi,enableEntityConfirmationDialog:Si}=q,Ei={name:"WalletWithdrawCryptoForm",components:{IconQRScan:At,IconAddressBook:sa,IconPlus:ft,IconDelete2:wt,IconInfoOutline:yt,PaymentButtonGroup:re,AmountSummaryPanel:Qt,HoldAmountTooltip:Ht,FormFieldInput:vt,Notes:Dt,QRCodeScanner:pt,EvmWallet:ua,SolanaWallet:ka,FormField:z,AddressBookSelectDialog:ys,FormFieldTextareaV2:Fs,WalletWithdrawCryptoAuth:Ds,WalletWithdrawProcessing:Ys,WalletWithdrawFail:ei},props:{currency:{type:String,required:!0},blockChainList:{type:Array,default:()=>[]},blockChain:{type:String,required:!0},step:{type:String,required:!0},withdrawMethod:{type:String,required:!0},blockChainInfo:{type:Object,default:()=>({})},withdrawAddress:{type:String,default:""},addressExtension:{type:String,default:""},feeInfo:{type:Object,default:()=>({})},notes:{type:Array,default:()=>[]},notice:{type:Object,default:()=>({})},isReachLimit:{type:Boolean,default:!1}},emits:["updateFeeInfo","update:step","update:withdrawAddress","update:addressExtension"],setup(e){const t=$t(),{holdAmountMap:a}=i(t),{setHoldCurrency:s,startHoldPolling:r,stopHoldPolling:o}=t,{isUseSumsubTravelRule:l,checkTravelRuleLimit:d,getWithdrawSumsubTravelRule:u}=na(),{$openDialog:c}=se(),{getInputAmountErrorMessage:h}=ta();return{isUseSumsubTravelRule:l,checkTravelRuleLimit:d,getWithdrawSumsubTravelRule:u,openDialog:c,holdAmountMap:a,setHoldCurrency:s,startHoldPolling:r,stopHoldPolling:o,getInputAmountErrorMessage:h,isEvmChain:n((()=>Et(e.blockChain))),isSolana:n((()=>It(e.blockChain)))}},data:()=>({WITHDRAW_CRYPTO_STEP:rt,CRYPTO_PAYMENT_TYPE:St,WEB3_WALLET_TYPE_MAP:bt,TITLE_FONT_SIZE:J,TITLE_BOLD_SIZE:Z,TextAlign:gt,WalletFeatureAction:Ke,enableAddressBook:gi,enableTasksAndRewards:bi,amount:"",addressErrorCode:null,web3Address:"",isWeb3WidgetError:!1,isExcludeFee:!1,isS
1howQRCodeScanner:!1,isLoading:!1,addressBookList:[],isShowAddressBookSelectDialog:!1,withdrawInfo:{},errorCode:null}),computed:{...M(["currencyMap","accountInfo","lang","isApp"]),...H(["getCurrencyScale"]),innerWithdrawAddress:{get(){return this.withdrawAddress},set(e){this.$emit("update:withdrawAddress",e)}},innerAddressExtension:{get(){return this.addressExtension},set(e){this.$emit("update:addressExtension",e)}},currencyInfo(){return this.currencyMap[this.currency]||{}},currencyScale(){return this.getCurrencyScale(this.currency)},currencyDisplayName(){return this.currencyInfo.displayName||this.currencyInfo.symbol||""},currencyMultiplier(){return this.currencyInfo.multiplier},availableBalance(){return this.getCurrencyAmount(this.currencyInfo.available||0)},holdAmount(){return this.holdAmountMap[this.currency]||0},eligibleBalance(){if(!bi)return this.availableBalance.toString();const e=x(this.availableBalance).minus(this.holdAmount);return e.gt(0)?e.toString():"0"},formattedEligibleBalance(){return this.$filters.commaNumber(this.eligibleBalance)},isMaxDisable(){return x(this.eligibleBalance).lte(0)},minimumAmount(){var e;const t=x(this.fee||0),a=x((null==(e=this.blockChainInfo)?void 0:e.singleAmountMin)||0),s=t.gt(a)?t:a;return this.getCurrencyAmount(s,x.ROUND_UP)},formattedMinimumAmount(){return this.$filters.commaNumber(this.minimumAmount)},amountInputPlaceholder(){return this.minimumAmount?this.$t("t.min_dot_amount",{amount:this.formattedMinimumAmount}):this.$t("t.amount")},fee(){const{feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i}=this.blockChainInfo,n=ma({amount:this.amount,feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i,isExcludeFee:this.isExcludeFee});return this.getCurrencyAmount(n,x.ROUND_UP)},netAmount(){const e=this.isExcludeFee?x(this.amount||0):x(this.amount||0).minus(this.fee);return e.gte(0)?e.toString():0},total(){return x(this.netAmount).plus(this.fee).toString()},inputAmountErrorMessage(){return this.getInputAmountErrorMessage({currency:this.currency,amount:this.amount,availableBalance:this.eligibleBalance,minimumAmount:this.minimumAmount,formattedMinimumAmount:this.formattedMinimumAmount,total:this.total,netAmount:this.netAmount})},isWithdrawDisabled(){return""===this.amount.replace(/\s/g,"")||Boolean(this.inputAmountErrorMessage)||Boolean(this.addressErrMsg)||!this.showWeb3Address&&this.withdrawAddressEmpty||this.showWeb3Address&&(!this.web3Address||this.isWeb3WidgetError)||this.isLoading||this.isReachLimit},withdrawAddressEmpty(){return""===this.innerWithdrawAddress.trim()},showWeb3Address(){return kt.includes(this.withdrawMethod)},currentAddress(){return this.showWeb3Address?this.web3Address:this.innerWithdrawAddress},isSupportedAddressExtension(){return this.blockChainInfo.isSupportedAddressExtension},addressExtensionName(){const{addressExtensionTypeName:e}=this.blockChainInfo;return this.$te(`t.${e}`)?this.$t(`t.${e}`):e},hasMultipleChain(){return this.blockChainList.length>1},addressErrMsg(){return this.addressErrorCode?this.$t("wallets.withdraw.address.invalid",{code:this.addressErrorCode}):""},isAddAddressBookAvailable(){if(!gi||this.withdrawAddressEmpty)return!1;return!this.addressBookList.some((e=>{const t=e.address===this.innerWithdrawAddress;if(!this.isSupportedAddressExtension)return t;const a=e.addressExtension===this.innerAddressExtension;return t&&a}))},defaultAddAddressBookForm(){return{currency:this.currency,address:this.innerWithdrawAddress,network:this.blockChain,addressExtension:this.innerAddressExtension}},travelRulePayload(){return{toAddress:this.currentAddress,toAddressExt:this.innerAddressExtension||null,currency:this.currency,network:this.blockChain,amount:this.getCurrencyAmount(this.amount),isFeeExclusive:this.isExcludeFee}}},watch:{innerWithdrawAddress(){this.addressErrorCode=null}},async created(){this.getAddressBookList(),this.setHoldCurrency(this.currency),this.startHoldPolling()},unmounted(){this.stopHoldPolling(),this.innerWithdrawAddress="",this.innerAddressExtension=""},methods:{getAddressBookList(){gi&&ve.getAddressBookListByCurrency(this.currency,[this.blockChain]).then((e=>{this.addressBookList=e}))},onAmountChange(e){this.amount=e},onMaxClick(){const{feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i}=this.blockChainInfo||{};let n=x(this.eligibleBalance);this.isExcludeFee&&(n=pa({eligibleBalance:this.eligibleBalance,feeMin:e,feeMax:t,feeRate:a,extraRate:s,extraAmount:i})),n.eq(0)?this.amount=this.getCurrencyAmount(this.eligibleBalance):this.amount=this.getCurrencyAmount(n)},clearWithdrawAddress(){this.innerWithdrawAddress=""},onPrevious(){this.$emit("update:step",rt.SELECT_PAYMENT);const e=Ze(this.$route.query,["method","network"]);this.$router.replace({query:e}).catch((()=>{}))},async onWithdraw(){var e;if(this.accountInfo.kycNotice!==oe.limited){if(Si){const{confirm:t}=await this.openDialog(ki,{currency:this.currency,amount:this.formatNumber(this.netAmount),fee:this.formatNumber(this.fee),totalAmount:this.formatNumber(this.total),destinationAddress:this.innerWithdrawAddress,addressExtensionName:this.addressExtensionName,addressExtension:this.innerAddressExtension,network:this.blockChain,endingIn:null==(e=this.blockChainInfo.smartContractAddress)?void 0:e.slice(-7)});if(!t)return}this.isLoading=!0;try{const e={settlementCurrency:this.currency,method:this.blockChain,address:this.currentAddress,addressExtension:this.innerAddressExtension||null};this.showWeb3Address||await ve.validateWithdrawCryptoAddress(e);const t={...e,provider:this.blockChainInfo.provider||"",isFeeExclusive:this.isExcludeFee,amount:this.getCurrencyAmount(this.amount)};if(this.isUseSumsubTravelRule){const{sdkRequired:e,auditId:a,token:s}=await this.getWithdrawSumsubTravelRule(this.travelRulePayload);if(e){const{isTravelRuleConfirmed:e,activeAuditId:i}=await this.handleSumsubTravelRule(s,a);if(!e)return;t.auditId=i}}else{if(this.checkTravelRuleLimit({currency:this.currency,total:this.total})){const{isTravelRuleConfirmed:e,travelRuleData:a}=await this.handleDefaultTravelRule(this.currentAddress);if(!e)return;t.travelRuleData=a}}this.withdrawInfo=t,this.$emit("update:step",rt.AUTH)}catch(t){this.addressErrorCode=t}finally{this.isLoading=!1}}else this.$openDialog(aa,{visible:!0})},onScanQRCode(e){this.innerWithdrawAddress=e,this.isShowQRCodeScanner=!1},hideQRCodeScanner(){this.isShowQRCodeScanner=!1},showQRCodeScanner(){this.isShowQRCodeScanner=!0},openAddressBookSelectDialog(){this.isShowAddressBookSelectDialog=!0},async openAddressBookAddFlow(){await this.$openDialog(Ct,{defaultForm:this.defaultAddAddressBookForm})&&this.getAddressBookList()},closeAddressBook(){this.isShowAddressBookSelectDialog=!1},async handleDefaultTravelRule(e){const t={cryptoAddress:e},{isTravelRuleConfirmed:a,travelRuleData:s}=await this.openDialog(ea,t)||{};return{travelRuleData:s,isTravelRuleConfirmed:a}},async handleSumsubTravelRule(e,t){const a={token:e,auditId:t,refreshToken:()=>this.getWithdrawSumsubTravelRule(this.travelRulePayload)},{isTravelRuleConfirmed:s,activeAuditId:i}=await this.openDialog(ga,a)||{};return{isTravelRuleConfirmed:s,activeAuditId:i}},onSelectAddressBook(e){e.network===this.blockChain&&(this.innerWithdrawAddress=e.address,this.innerAddressExtension=e.addressExtension),this.closeAddressBook()},setWeb3Address(e){this.web3Address=e},onWeb3DisabledChange(e){this.isWeb3WidgetError=e},handleAddressInput(e){this.innerWithdrawAddress=e},getCurrencyAmount(e,t=x.ROUND_DOWN){return x(e).dp(this.currencyScale,t).toString()},formatNumber(e){const t=this.getCurrencyAmount(e||0);return this.$filters.commaNumber(t)},onClosed(){this.$router.push({name:"walletSpot",params:{lang:this.lang}})},onBack(){this.$emit("updateFeeInfo"),this.$emit("update:step",rt.FORM)}}},Ii={key:0,class:"container flex-box justify-between"},xi={class:"left flex-1"},Ti={class:"tail flex-box"},Ni={class:"currency"},Li={class:"currency"},_i={class:"title withdraw-title"},Pi={class:"warning-block"},Wi={class:"warning-text"};const Ri=jt(Ei,[["render",function(e,t,a,s,i,n){var c;const h=_("QRCodeScanner"),y=_("HoldAmountTooltip"),w=_("BrandButton"),f=_("FormFieldInput"),C=_("FormField"),b=_("IconQRScan"),S=_("IconAddressBook"),E=_("IconDelete2"),I=_("FormFieldTextareaV2"),x=_("IconPlus"),T=_("Brand
1Input"),N=_("IconInfoOutline"),L=_("EvmWallet"),P=_("SolanaWallet"),W=_("AmountSummaryPanel"),R=_("Notes"),B=_("PaymentButtonGroup"),F=_("AddressBookSelectDialog"),M=_("WalletWithdrawCryptoAuth"),D=_("WalletWithdrawProcessing"),O=_("WalletWithdrawFail");return a.step===i.WITHDRAW_CRYPTO_STEP.FORM?(o(),A("div",Ii,[u("div",xi,[i.isShowQRCodeScanner?(o(),r(h,{key:0,onScan:n.onScanQRCode,onClosed:n.hideQRCodeScanner},null,8,["onScan","onClosed"])):m("",!0),d(C,{title:e.$t("wallets.sendToInputAmountPlaceHolder"),titleFontSize:i.TITLE_FONT_SIZE.S_18,titleBoldSize:i.TITLE_BOLD_SIZE.W_700,isTitleBlockWrap:""},{tail:l((()=>[u("div",Ti,[u("div",null,v(i.enableTasksAndRewards?e.$t("t.eligibleBalance"):e.$t("wallets.availableBalance")),1),u("div",{class:"balance",onClick:t[0]||(t[0]=(...e)=>n.onMaxClick&&n.onMaxClick(...e))},v(n.formattedEligibleBalance),1),u("div",Ni,v(n.currencyDisplayName),1),i.enableTasksAndRewards?(o(),r(y,{key:0,holdAmount:n.holdAmount,holdCurrency:a.currency},null,8,["holdAmount","holdCurrency"])):m("",!0)])])),default:l((()=>[d(f,{value:i.amount,"onUpdate:value":t[1]||(t[1]=e=>i.amount=e),name:"amount",class:"amount-input",type:"number",rules:"required|decimal",jumpingError:n.inputAmountErrorMessage,isJumpingError:!!n.inputAmountErrorMessage,placeholder:n.amountInputPlaceholder,inputTextAlign:i.TextAlign.right,integerMultiplier:n.currencyMultiplier,isPrice:"",isNumberSpinDisabled:"",onInput:n.onAmountChange},{suffix:l((()=>[d(w,{class:"max-button",type:"text",size:"fit",disabled:n.isMaxDisable,onClick:n.onMaxClick},{default:l((()=>[p(v(e.$t("t.max.uppercase")),1)])),_:1},8,["disabled","onClick"]),u("div",Li,v(a.currency),1)])),_:1},8,["value","jumpingError","isJumpingError","placeholder","inputTextAlign","integerMultiplier","onInput"])])),_:1},8,["title","titleFontSize","titleBoldSize"]),u("div",_i,v(e.$t("wallets.withdrawVia")),1),a.withdrawMethod===i.CRYPTO_PAYMENT_TYPE.WalletAddress?(o(),A(g,{key:1},[d(C,{title:e.$t("wallets.digiccy-withdraw.withdrawAddr")},k({default:l((()=>[d(I,{class:"form-textarea",name:"withdrawAddress",value:n.innerWithdrawAddress,jumpingError:n.addressErrMsg,isJumpingError:!!n.addressErrMsg,onInput:n.handleAddressInput},{suffix:l((()=>[n.withdrawAddressEmpty?(o(),A(g,{key:0},[u("div",{class:"input-icon",onClick:t[2]||(t[2]=(...e)=>n.showQRCodeScanner&&n.showQRCodeScanner(...e))},[d(b)]),i.enableAddressBook?(o(),A("div",{key:0,class:"input-icon",onClick:t[3]||(t[3]=(...e)=>n.openAddressBookSelectDialog&&n.openAddressBookSelectDialog(...e))},[d(S)])):m("",!0)],64)):(o(),A("div",{key:1,class:"input-icon",onClick:t[4]||(t[4]=(...e)=>n.clearWithdrawAddress&&n.clearWithdrawAddress(...e))},[d(E)]))])),_:1},8,["value","jumpingError","isJumpingError","onInput"])])),_:2},[n.isAddAddressBookAvailable?{name:"tail",fn:l((()=>[u("div",{class:"add-address-book-button flex-center-center inner-ml-4",onClick:t[5]||(t[5]=(...e)=>n.openAddressBookAddFlow&&n.openAddressBookAddFlow(...e))},[d(x,{class:"plus-icon"}),u("div",null,v(e.$t("wallets.addressBook.add")),1)])])),key:"0"}:void 0]),1032,["title"]),n.isSupportedAddressExtension?(o(),r(C,{key:0,class:"tag-field",title:n.addressExtensionName},{default:l((()=>[d(T,{value:n.innerAddressExtension,"onUpdate:value":t[6]||(t[6]=e=>n.innerAddressExtension=e),class:"field-input",isBrandNewStyle:"",maxlength:"100",placeholder:n.addressExtensionName,clearable:""},null,8,["value","placeholder"]),u("div",Pi,[d(N,{class:"warning-icon"}),u("div",Wi,v(e.$t("payment.withdraw.crypto.transactionTagWarning",{tagName:n.addressExtensionName})),1)])])),_:1},8,["title"])):m("",!0)],64)):m("",!0),n.showWeb3Address?(o(),A(g,{key:2},[s.isEvmChain?(o(),r(L,{key:0,isLoading:i.isLoading,"onUpdate:isLoading":t[7]||(t[7]=e=>i.isLoading=e),walletType:a.withdrawMethod,connectOnly:"",blockChain:a.blockChainInfo.method,onOnReady:n.setWeb3Address,onOnWeb3DisabledChange:n.onWeb3DisabledChange},null,8,["isLoading","walletType","blockChain","onOnReady","onOnWeb3DisabledChange"])):s.isSolana?(o(),r(P,{key:1,isLoading:i.isLoading,"onUpdate:isLoading":t[8]||(t[8]=e=>i.isLoading=e),walletType:a.withdrawMethod,currency:a.currency,connectOnly:"",onOnReady:n.setWeb3Address,onOnWeb3DisabledChange:n.onWeb3DisabledChange},null,8,["isLoading","walletType","currency","onOnReady","onOnWeb3DisabledChange"])):m("",!0)],64)):m("",!0),d(W,{isExcludeFee:i.isExcludeFee,"onUpdate:isExcludeFee":t[9]||(t[9]=e=>i.isExcludeFee=e),class:"summary",action:i.WalletFeatureAction.WITHDRAW_CRYPTO,currencyDisplayName:a.currency,amount:n.formatNumber(n.netAmount),fee:n.formatNumber(n.fee),totalAmount:n.formatNumber(n.total),supportFeeMethod:null==(c=a.feeInfo)?void 0:c.supportFeeMethod,isShowFeeTooltip:""},null,8,["isExcludeFee","action","currencyDisplayName","amount","fee","totalAmount","supportFeeMethod"]),e.isMobile?(o(),r(R,{key:3,class:"notes",notice:a.notice,notes:a.notes},null,8,["notice","notes"])):m("",!0),d(B,{buttonTitle:e.$t("t.withdraw"),isDisabled:n.isWithdrawDisabled,isLoading:i.isLoading,onOnPrevious:n.onPrevious,onOnMainButtonClick:n.onWithdraw},null,8,["buttonTitle","isDisabled","isLoading","onOnPrevious","onOnMainButtonClick"])]),e.isMobile?m("",!0):(o(),r(R,{key:0,class:"notes flex-1",notice:a.notice,notes:a.notes}
1,null,8,["notice","notes"])),i.isShowAddressBookSelectDialog?(o(),r(F,{key:1,currency:a.currency,appliedAddressBookList:i.addressBookList,onOnSelect:n.onSelectAddressBook,onOnClose:n.closeAddressBook},null,8,["currency","appliedAddressBookList","onOnSelect","onOnClose"])):m("",!0)])):a.step===i.WITHDRAW_CRYPTO_STEP.AUTH?(o(),r(M,{key:1,errorCode:i.errorCode,"onUpdate:errorCode":t[10]||(t[10]=e=>i.errorCode=e),currency:a.currency,withdrawInfo:i.withdrawInfo,"onUpdate:step":t[11]||(t[11]=t=>e.$emit("update:step",t))},null,8,["errorCode","currency","withdrawInfo"])):a.step===i.WITHDRAW_CRYPTO_STEP.PROCESSING?(o(),r(D,{key:2,currency:a.currency,isAddAddressBookAvailable:n.isAddAddressBookAvailable,method:a.blockChain,address:n.currentAddress,addressExtension:n.innerAddressExtension,onClosed:n.onClosed},null,8,["currency","isAddAddressBookAvailable","method","address","addressExtension","onClosed"])):a.step===i.WITHDRAW_CRYPTO_STEP.FAILURE?(o(),r(O,{key:3,currency:a.currency,errorCode:i.errorCode,onClosed:n.onClosed,onBack:n.onBack},null,8,["currency","errorCode","onClosed","onBack"])):m("",!0)}],["__scopeId","data-v-6468c4ba"]]),{enableInfoDepositAndWithdrawalFees:Bi,enableSeparateWithdrawFiatTurnaroundTime:Fi}=q,Mi={name:"WalletWithdrawCrypto",components:{WalletWithdrawCryptoMethod:Bs,WalletWithdrawCryptoForm:Ri,MainPanel:Ot,Title:Mt},props:{currency:{type:String,required:!0}},emits:["previous"],data:()=>({WITHDRAW_CRYPTO_STEP:rt,step:rt.SELECT_PAYMENT,withdrawMethod:St.WalletAddress,blockChain:"",blockConfirmHeight:"-",blockChainList:[],networksInfo:[],withdrawAddress:"",addressExtension:"",feeInfo:{},limitSetting:{},cryptoWithdrawLimit:null,isLoading:!1,isNetworkErr:!1,isReachLimit:!1}),computed:{...M(["lang","currencyMap"]),...H(["getCurrencyScale"]),currencyScale(){return this.getCurrencyScale(this.currency)},networksInfoMap(){return this.blockChainList.reduce(((e,t)=>(e[t.method]=t,e)),{})},blockChainInfo(){return{...this.networksInfoMap[this.blockChain],...this.feeInfo}},blockChainName(){return this.blockChainInfo.fullMethodName||""},tokenContractAddress(){const e=this.blockChainInfo.smartContractAddress||"";return"null"!==e?e:""},notesKYCLevelLimit(){return this.cryptoWithdrawLimit?ke(this.cryptoWithdrawLimit):null},notesTransactionLimit(){return ge(this.limitSetting,this.currency)},notesExpectedTiming(){var e;const t={title:this.$t("wallets.withdraw.expected.timing"),descriptions:[]},a=null==(e=this.networksInfo.find((e=>e.method===this.blockChain)))?void 0:e.blockConfirmHeight,s=[{textPath:Ee("wallets.withdraw.expected.arrival"),slots:[{slotName:"val",text:a||"-"}]},{textPath:Ee("wallets.withdraw.expected.unlock"),slots:[{slotName:"val",text:a||"-"}]}];switch(this.blockChain){case Nt.ZKSYNC:t.descriptions.push({textPath:Ee("wallets.transaction.validatedTimeSlot"),slots:[{slotName:"time",text:"24"}]});break;case Nt.ZANO:t.descriptions.push(...s),t.descriptions.push({textPath:Ee("wallets.notes.ZANO.1")});break;default:t.descriptions.push(...s)}return t},notesContractAddress(){return this.tokenContractAddress?{title:this.$t("t.contractAddress"),content:this.$t("wallet.contractAddress.note",{addressPostfix:Tt(this.tokenContractAddress)}),tooltip:this.tokenContractAddress}:null}
1,notesImportantNotes(){if(!this.blockChainInfo.method)return null;const{providerFeeRate:e=0,networkFeeOnchain:t=!1}=this.feeInfo,a=x(e||0),s=[{textPath:Ee("wallets.withdraw.ensure.network"),slots:[{slotName:"blockChain",text:this.blockChainInfo.fullMethodName}],enabled:!0},{textPath:Ee("payment.withdraw.crypto.networkFeeOnChain"),slots:[{slotName:"providerFeeRate",text:a.times(100).toString()}],enabled:t&&a.gt(0)},{textPath:Ee("payment.withdraw.crypto.networkFeeOnWithdrawalAmount"),slots:[{slotName:"providerFeeRate",text:a.times(100).toString()}],enabled:!t&&a.gt(0)},{textPath:Ee("wallets.inputWholeNumbers"),enabled:x(this.currencyScale).eq(0)}].filter((e=>e.enabled));return{title:this.$t("t.importantNotes"),listStyle:"dot",descriptions:s}},notesFaq(){const e=[];switch(this.withdrawMethod){case St.WalletAddress:e.push({textPath:Ee("wallet.how.withdrawCrypto"),link:G(this.lang,"WITHDRAW_CRYPTO")});break;case bt.MetaMask:e.push({textPath:Ee("wallets.withdraw.crypto.faq.metaMask"),link:G(this.lang,"METAMASK")})}return e.push({textPath:Ee("wallets.withdraw.crypto.faq.fee"),link:this.depositWithdrawalFeesLink}),Fi||e.push({textPath:Ee("wallet.how.turnAroundTime"),link:G(this.lang,"TURNAROUND_TIME")}),{title:this.$t("t.faq"),listStyle:"dot",descriptions:e}},notes(){return this.withdrawMethod===St.ExpressSell?[{title:this.$t("t.importantNotes"),listStyle:"dot",descriptions:[{textPath:Ee("payment.important.noAdditionalFee")},{textPath:Ee("wallet.importantNotes.bankCharges")},{textPath:Ee("payment.important.bankAccountValid")}]},{title:this.$t("t.faq"),listStyle:"dot",descriptions:[{textPath:Ee("wallet.expressSell.faq.whatExpressSell"),link:G(this.lang,"EXPRESS_SELL_FAQ")}]}]:[this.notesKYCLevelLimit,this.notesTransactionLimit,this.notesExpectedTiming,this.notesContractAddress,this.notesImportantNotes,this.notesFaq].filter((e=>e))},depositWithdrawalFeesLink(){return Bi?this.$router.resolve({name:"depositWithdrawalFees",params:{lang:this.lang}}).href:G(this.lang,"DEPOSIT_WITHDRAW_FEE")},notice(){return this.isReachLimit?{genre:ae.ERROR,text:this.$t("payment.transactionLimit.noticeMessage.withoutTime")}:{}},isSolana(){return It(this.blockChain)},isEvmChain(){return Et(this.blockChain)},supportMethods(){return this.isEvmChain?xt.EVM:this.isSolana?xt.SOLANA:[St.WalletAddress]}},watch:{blockChain(){1!==this.blockChainList.length||this.isEvmChain||this.isSolana||(this.step=rt.FORM),this.updateFeeInfo()}},created(){this.loadPreWithdraw(),this.getExpressSellCoinList()},methods:{...U(ia,["getExpressSellCoinList"]),async updateFeeInfo(){try{this.feeInfo={};const e=await ve.getWithdrawCryptoTxnLimitation(this.currency,this.blockChainInfo.provider,this.blockChain),t=null==e?void 0:e.cryptoWithdrawLimit;this.feeInfo=e.withdrawFees,this.feeInfo.singleAmountMin=e.limitSetting.initialSingleAmountLimit.singleAmountMin,this.feeInfo.supportFeeMethod=null==e?void 0:e.supportFeeMethod,this.isNetworkErr=!1,this.isReachLimit=null==t?void 0:t.reachLimit,this.cryptoWithdrawLimit=t,this.limitSetting=e.limitSetting}catch(e){this.isNetworkErr=!0}},checkStep(){const{method:e,network:t}=this.$route.query;if(e&&t){if(this.networksInfo.find((e=>e.method===t))){this.blockChain=t;const a=this.supportMethods.find((t=>t===e));a?(this.step=rt.FORM,this.withdrawMethod=a):(this.clearQuery(),this.getDefaultBlockChain())}else this.clearQuery()}},loadPreWithdraw(){this.isLoading=!0,ve.getWithdrawNetworks(this.currency).then((e=>{const{grouping:t=[],methodProviderMap:a={}}
1=e;this.networksInfo=t,this.blockChainList=t.map((({method:e})=>a[e][0])),this.getDefaultBlockChain(),this.checkStep()})).finally((()=>{this.isLoading=!1}))},clearQuery(){const e=Ze(this.$route.query,["method","network"]);this.$router.replace({query:e}).catch((()=>{}))},getDefaultBlockChain(){var e;this.blockChain=(null==(e=this.blockChainList[0])?void 0:e.method)||""},onPrevious(){this.$emit("previous");const e=Ze(this.$route.query,["currency"]);this.$router.replace({query:e}).catch((()=>{}))},formatNumber(e,t="max8"){return this.$filters.formatNumber(e,t)},onChangeStep(e,{withdrawAddress:t,addressExtension:a}={}){this.withdrawAddress=t||"",this.addressExtension=a||"",this.step=e}}},Di={class:"crypto-method"};const Oi=jt(Mi,[["render",function(e,t,a,s,i,n){const c=_("Title"),h=_("WalletWithdrawCryptoMethod"),m=_("WalletWithdrawCryptoForm"),p=_("MainPanel");return o(),r(p,null,{default:l((()=>[u("div",Di,[d(c,{class:"title",title:e.$t("t.withdraw"),coinName:a.currency,network:n.blockChainName},null,8,["title","coinName","network"]),i.step===i.WITHDRAW_CRYPTO_STEP.SELECT_PAYMENT?(o(),r(h,{key:0,blockChain:i.blockChain,"onUpdate:blockChain":t[0]||(t[0]=e=>i.blockChain=e),withdrawMethod:i.withdrawMethod,"onUpdate:withdrawMethod":t[1]||(t[1]=e=>i.withdrawMethod=e),currency:a.currency,blockChainList:i.blockChainList,isLoading:i.isLoading,isNetworkErr:i.isNetworkErr,onPrevious:n.onPrevious,notes:n.notes,notice:n.notice,onOnChangeStep:n.onChangeStep},null,8,["blockChain","withdrawMethod","currency","blockChainList","isLoading","isNetworkErr","onPrevious","notes","notice","onOnChangeStep"])):(o(),r(m,{key:1,step:i.step,"onUpdate:step":t[2]||(t[2]=e=>i.step=e),withdrawAddress:i.withdrawAddress,"onUpdate:withdrawAddress":t[3]||(t[3]=e=>i.withdrawAddress=e),addressExtension:i.addressExtension,"onUpdate:addressExtension":t[4]||(t[4]=e=>i.addressExtension=e),currency:a.currency,blockChain:i.blockChain,blockChainInfo:n.blockChainInfo,blockChainList:i.blockChainList,withdrawMethod:i.withdrawMethod,feeInfo:i.feeInfo,notes:n.notes,notice:n.notice,isReachLimit:i.isReachLimit,onUpdateFeeInfo:n.updateFeeInfo},null,8,["step","withdrawAddress","addressExtension","currency","blockChain","blockChainInfo","blockChainList","withdrawMethod","feeInfo","notes","notice","isReachLimit","onUpdateFeeInfo"]))])])),_:1})}],["__scopeId","data-v-1a5be3ba"]]),$i={class:"wallet-withdraw"},Hi=jt({__name:"WalletWithdraw",setup(e){const t=w(),s=a(),{hasFeature:l,getIsUserFeatureAllow:u}=Lt(),{getIsFeatureNeedKycVerify:h}=_t(),p=j(),{currencyMap:v,accountInfo:y,isAccountInfoLoaded:f,isInitialWalletInfoLoading:C}=i(p),k=E(!0),g=E(t.query.currency||""),b=E(""),S=n((()=>v.value[g.value]||{})),I=n((()=>S.value.isFiat?Q.FIAT:Q.CRYPTO)),x=n((()=>{const e=b.value===Y.FIAT;return h(V.WITHDRAWAL,e)})),T=n((()=>{if(x.value||!b.value)return!1;const e=y.value;switch(null==e?void 0:e.lockType){case Pt.PASSWORD_CHANGED:case Pt.GOOGLE_OTP_CHANGED:case Pt.PIN_CODE_FAIL:case Pt.FIRST_DEPOSIT_LOCK:case Pt.REACHED_WITHDRAW_LIMIT:return!0}if(!Wt(e))return!0;return!(b.value!==Y.FIAT?null==e?void 0:e.allowWithdrawalCrypto:null==e?void 0:e.allowWithdrawal)})),L=e=>{e&&s.replace({query:{...t.query,currency:e.uniqueKey}}).finally((()=>{g.value=e.uniqueKey}))},_=async()=>{await s.replace({query:{}})};return N([f,C],(async e=>{e[0]&&!e[1]&&((()=>{if(g.value){const e=v.value[g.value];if(e){const t=Bt(e);return void(b.value=t)}}if(u(V.WITHDRAWAL,!1))return void(b.value=Y.STABLE_COINS);l(V.WITHDRAWAL,!1)?b.value=Y.STABLE_COINS:b.value=Y.FIAT})(),await(async()=>{var e;g.value&&(!(null==(e=v.value[g.value])?void 0:e.allowWithdraw)||T.value||x.value)&&await _()})(),k.value=!1)}),{immediate:!0}),N((()=>t.query),(e=>{e.currency||(g.value="")}
1)),(e,t)=>(o(),A("div",$i,[d(Rt,{class:"kyc-notification"}),k.value?(o(),r(c(Zt),{key:0})):g.value?I.value===c(Q).FIAT?(o(),r(c(as),{key:2,currency:g.value,onPrevious:_},null,8,["currency"])):I.value===c(Q).CRYPTO?(o(),r(c(Oi),{key:3,currency:g.value,onPrevious:_},null,8,["currency"])):m("",!0):(o(),r(c(Sa),{key:1,currentFilterKey:b.value,"onUpdate:currentFilterKey":t[0]||(t[0]=e=>b.value=e),isShowKycHint:x.value,isBlockedAction:T.value,onOnSelect:L},null,8,["currentFilterKey","isShowKycHint","isBlockedAction"]))]))}},[["__scopeId","data-v-b5489ae7"]]);export{Hi as default}; 2//# sourceMappingURL=BRU4fb_v.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.