PageSourceSearch

https://www.btse.com/static/js/ByOB-9wo.js

js btse.com collected 2026-09-25 18:40:22 UTC 377,115 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/css/DWVam8h-.css","static/css/C5LPjqBs.css","static/css/CM_OROii.css","static/css/C2n2TNVr.css","static/css/BY08xot2.css","static/css/DqsJLoyF.css","static/css/CjcsllVq.css","static/css/CunPIi_W.css","static/css/BTQfTw5q.css","static/css/CtZtI-zf.css","static/css/DHfKnqI5.css","static/css/CMkWe6LU.css","static/css/ChrGmU62.css","static/css/CEzmP6IF.css"])))=>i.map(i=>d[i]);
2var e;!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]="bc602c32-2594-4d42-8c8d-0e8c9eb4234d",e._sentryDebugIdIdentifier="sentry-dbid-bc602c32-2594-4d42-8c8d-0e8c9eb4234d")}catch(i){}}();import{aL as t,ar as i,a8 as n,a9 as a,aa as s,aN as o,ae as r,aK as l,af as c,aT as d,ad as u,aU as m,ag as p,ak as h,ab as y,am as C,ap as g,aS as f,a7 as b,aY as v,r as k,a6 as S,bM as A,an as M,al as I,ac as w,b6 as T,aW as _,aX as D,aM as P,ai as L,ah as E,p as x,aq as N,aZ as R,B,b1 as O,as as F,h as U,aG as $}from"./PmfENnFs.js";import{aC as q,e as V,aD as H,p as j,R as G,aE as z,aF as K,c as Y,aG as W,aH as Z,aI as X,aJ as Q,l as J,aK as ee,o as te,a2 as ie,aA as ne,az as ae,j as se,aL as oe,aM as re,aN as le,aO as ce,h as de,aP as ue,aQ as me,aR as pe,aj as he,aS as ye,aT as Ce,aq as ge,aU as fe,aV as be,aW as ve,aX as ke,aY as Se,aZ as Ae,a_ as Me,a$ as Ie,b0 as we,b1 as Te,af as _e,b2 as De,b3 as Pe,b4 as Le,b5 as Ee,al as xe,C as Ne,b6 as Re,k as Be,b7 as Oe,U as Fe,b8 as Ue,b9 as $e,t as qe,ba as Ve,bb as He,bc as je,S as Ge,bd as ze,be as Ke,N as Ye,i as We,G as Ze,bf as Xe,bg as Qe,P as Je,bh as et,aw as tt,K as it,av as nt,ay as at,bi as st,H as ot,bj as rt,a5 as lt,bk as ct,bl as dt,bm as ut,bn as mt,bo as pt,O as ht,bp as yt,M as Ct,bq as gt,br as ft,bs as bt,a0 as vt,bt as kt,bu as St,bv as At,bw as Mt,bx as It,by as wt,bz as Tt,bA as _t,bB as Dt,bC as Pt,bD as Lt,bE as Et,bF as xt,bG as Nt,bH as Rt,bI as Bt,bJ as Ot}from"./BhKTELSe.js";import{_ as Ft}from"./CRPzHAml.js";import{_ as Ut}from"./ByGuns7q.js";import{I as $t}from"./DTvt6p8J.js";const qt={name:"SwitchTabsMobile",components:{IconChevronDown:V,IconPlus:q},props:{tabList:{type:Array,required:!0},selectTab:{type:Number,default:0},onSelected:{type:Function,default:null}},emits:["onSubSelected"],data:()=>({open:!1,openSubmenuMaps:{}}),computed:{...t(["lang"]),curRoute(){return this.tabList[this.selectTab]}},watch:{$route(){this.handleClose()}},methods:{handleOpen(){this.open=!0,H(!0)},handleClose(){this.open=!1,H(!1)},handleToggle(e){this.openSubmenuMaps[e]?this.openSubmenuMaps[e]=!1:this.openSubmenuMaps[e]=!0},onToggleSelected(e,t=""){this.onSelected(e,t),this.handleClose()},onSubSelected(e,t){const i={name:e,query:{anchor:t},state:{noScrollTop:!0}};this.$route.name===e?this.$router.replace(i):this.$router.push(i).then((()=>{this.$nextTick((()=>{setTimeout((()=>{this.$emit("onSubSelected",t)}),500)}))}))}}},Vt={class:"flex-box flex-column nav"},Ht={class:"flex-box items-center justify-end close-box"},jt={class:"flex-1 nav-scroll"},Gt={class:"nav-ul"},zt=["onClick"],Kt=["onClick"],Yt=["onClick"],Wt=["onClick"];const Zt=Ft(qt,[["render",function(e,t,g,f,b,v){const k=i("IconChevronDown"),S=i("IconPlus"),A=i("RouterLink");return a(),n("div",{class:p(["navigation-mobile",{"navigation-mobile-index":b.open}])},[s("div",{class:"flex-box items-center justify-between cur-route",onClick:t[0]||(t[0]=(...e)=>v.handleOpen&&v.handleOpen(...e))},[r(c(v.curRoute.label)+" ",1),l(k,{class:"icon"})]),o(s("div",Vt,[s("div",Ht,[l(S,{class:"close",onClick:v.handleClose},null,8,["onClick"])]),s("div",jt,[s("ul",Gt,[(a(!0),n(u,null,m(g.tabList,(({routeName:t,label:i,list:f},S)=>(a(),n("li",{key:t,class:"nav-li"},[s("div",{class:p(["flex-box navigation-title",{cur:g.selectTab===S}])},[g.onSelected?(a(),n("div",{key:0,class:"tab",onClick:e=>v.onToggleSelected(t)},c(i),9,zt)):(a(),h(A,{key:1,to:{name:t,params:{lang:e.lang}}},{default:C((()=>[r(c(i),1)])),_:2},1032,["to"])),f?(a(),n("div",{key:2,class:"flex-1 flex-box items-center justify-end icon-box",onClick:e=>v.handleToggle(t)},[l(k,{class:p(["icon",{"icon-overturn":b.openSubmenuMaps[t]}])},null,8,["class"])],8,Kt)):y("",!0)],2),o(s("div",null,[(a(!0),n(u,null,m(f,((i,s)=>(a(),n("div",{key:s,class:p(["navigation-title-sub",{cur:g.selectTab===S&&e.$route.query.anchor===s}])},[g.onSelected?(a(),n("div",{key:0,class:"tab",onClick:e=>v.onToggleSelected(t,s)},c(i),9,Yt)):(a(),n("div",{key:1,onClick:e=>v.onSubSelected(t,s)},c(i),9,Wt))],2)))),128))],512),[[d,f&&b.openSubmenuMaps[t]]])])))),128))])])],512),[[d,b.open]])],2)}],["__scopeId","data-v-e2f166be"]]),Xt={privacyPolicyList:()=>({personalInformation:"Personal Information We Collect",usageOfInformation:"How We Use Your Personal Information",sharingInformation:"Whom Do We Share Your Information With and Why",retentionPeriod:"How Long We Retain Your Personal Information",childrenInformation:"Children's Personal Information",internationalTransfers:"International Transfers (Specific to EU, EEA & UK)",dataSecurity:"Data Security Measures",privacyRights:"Your Privacy Rights and Choices",policyChanges:"Changes to This Privacy Policy",contactUs:"How to Contact Us"}),cookiePolicyList:e=>({cookieUsageStatement:`${e("brand.name")} Cookie Usage Statement`,introduction:"Introduction",whatAreCookies:"What Are Cookies?",differentTypesOfCookies:"What Are the Different Types of Cookies?",cookiesWeUse:"What Cookies Do We Use?",chooseCookiePreferences:"How Can I Choose My Cookies Preferences?",policyChanges:"Changes to This Policy",contactUs:"How to Contact Us?"}),referralProgrammeList:()=>({1:"General",2:"Program Participation",3:"Eligibility for Referral Rewards",4:"Referral Rewards"})},Qt={...Xt,privacyPolicyList:()=>({...Xt.privacyPolicyList(),internationalTransfers:"International Transfers"})},{enableLegalReferral:Jt,enableLegalReferralSubpath:ei,enableLegalAffiliate:ti,enableC2C:ii,enableTradingBot:ni,enableLegalTermsAndConditions:ai,enableLegalDigitalAssetService:si,enableLegalEarnProducts:oi,enableLegalPrivacyPolicy:ri,enableLegalCookiePolicy:li,enableLegalKycAmlPolicy:ci,enableLegalDisclaimers:di,enableProvisionOfService:ui,enableLegalPrivacyPolicySubpath:mi,enableLegalCookiePolicySubpath:pi,enableDerivativeTermsAndConditions:hi,enableLegalTransferService:yi,enableLegalSpotMarket:Ci,enableLegalFutures:gi,enableLegalOtc:fi,enableLegalFuturesRiskDisclosureStatement:bi,genLegalTabsReduceFn:vi}=j,{genLegalTabsReduceFn:ki}=z,{privacyPolicyList:Si,cookiePolicyList:Ai,referralProgrammeList:Mi}=Qt,Ii=["provisionOfService"];class wi{constructor(e,t){this.observer=new IntersectionObserver(e,t),this.observedElements=new Set}observe(e){this.observer.observe(e),this.observedElements.add(e)}unobserve(e){this.observer.unobserve(e),this.observedElements.delete(e)}disconnect(){this.observer.disconnect(),this.observedElements.clear()}
2unobserveAllElements(){Array.from(this.observedElements).forEach((e=>{this.observer.unobserve(e)})),this.observedElements.clear()}getObservedElements(){return Array.from(this.observedElements)}pauseObserve(){this.observer.disconnect()}resumeObserve(){Array.from(this.observedElements).forEach((e=>{this.observer.observe(e)}))}}const{enableDebitCard:Ti}=j,_i=Number((null==(e=Z.componentStyle["--app--theme--desktop-header-height"])?void 0:e.replace("px",""))??0)+4,Di={[G.LEGAL_TERMS_AND_CONDITIONS]:A((()=>Ut((()=>import("./BzcqJ9Lm.js")),__vite__mapDeps([0])))),[G.LEGAL_DIGITAL_ASSET_SERVICE]:A((()=>Ut((()=>import("./BENtK9Pn.js")),__vite__mapDeps([1])))),[G.LEGAL_EARN_PRODUCTS]:A((()=>Ut((()=>import("./CaT8IR7U.js")),__vite__mapDeps([2])))),[G.LEGAL_P2P_TRADING_SERVICES]:A((()=>Ut((()=>import("./CUTEgQIE.js")),__vite__mapDeps([3])))),[G.LEGAL_PRIVACY]:A((()=>Ut((()=>import("./DxwHFM2V.js")),__vite__mapDeps([4,5])))),[G.LEGAL_COOKIE_POLICY]:A((()=>Ut((()=>import("./DKooved2.js")),__vite__mapDeps([4,6])))),[G.LEGAL_KYC_AML_POLICY]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_REFERRAL_PROGRAM]:A((()=>Ut((()=>import("./ZKyB61wL.js")),__vite__mapDeps([7])))),[G.LEGAL_AFFILIATE_PROGRAM]:A((()=>Ut((()=>import("./BCwnJyHI.js")),__vite__mapDeps([4,8])))),[G.LEGAL_DISCLAIMER]:A((()=>Ut((()=>import("./BG_Wf64N.js")),__vite__mapDeps([9])))),[G.LEGAL_TRADING_BOT_TERMS]:A((()=>Ut((()=>import("./BF2E8xec.js")),__vite__mapDeps([10])))),[G.LEGAL_PROVISION_OF_SERVICE]:A((()=>Ut((()=>import("./CENv7zGG.js")),__vite__mapDeps([11])))),[G.LEGAL_DEBIT_CARD]:A((()=>Ut((()=>import("./CXRkU3gd.js")),__vite__mapDeps([4,12])))),[G.LEGAL_DERIVATIVE_TERMS_AND_CONDITIONS]:A((()=>Ut((()=>import("./BsEy-rPh.js")),__vite__mapDeps([13])))),[G.LEGAL_SPOT_MARKET]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_FUTURES]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_OTC]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_FUTURES_RISK_DISCLOSURE_STATEMENT]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_HUB_TERMS_AND_CONDITION]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_QUIZ_SHOW_TERMS_AND_CONDITIONS]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[]))),[G.LEGAL_TRANSFER_SERVICE]:A((()=>Ut((()=>import("./CXr9G-CP.js")),[])))};function Pi(e={}){const{defaultTabName:t=G.LEGAL_TERMS_AND_CONDITIONS}=e,i=g(),n=f(),a=b(),{t:s}=v(),o=X(),r=k([]),l=k(t),c=k([]),d=k(null),u=S((()=>a.getters.isDebitCardAllowed)),m=S((()=>a.getters.isSubAccount)),p=S((()=>Ii.includes(l.value)?(({t:e=e=>e})=>[{routeName:G.LEGAL_PROVISION_OF_SERVICE,label:e("nav.provisionOfServices"),enabled:ui}].filter((e=>e.enabled)))({t:s}):(({isSupportDebitCard:e,t:t=e=>e})=>{let i=vi(t);return"function"!=typeof i&&(i=ki),[{routeName:G.LEGAL_TERMS_AND_CONDITIONS,label:t("footer.termsAndConditions"),enabled:ai},{routeName:G.LEGAL_SPOT_MARKET,label:t("nav.legalSpotMarket"),enabled:Ci},{routeName:G.LEGAL_FUTURES,label:t("nav.legalFutures"),enabled:gi},{routeName:G.LEGAL_OTC,label:t("nav.legalOtc"),enabled:fi},{routeName:G.LEGAL_FUTURES_RISK_DISCLOSURE_STATEMENT,label:t("nav.legalFuturesRiskDisclosureStatement"),enabled:bi},{routeName:G.LEGAL_DIGITAL_ASSET_SERVICE,label:t("footer.digitalAssetService"),enabled:si},{routeName:G.LEGAL_EARN_PRODUCTS,label:t("footer.earnProducts"),enabled:oi},{routeName:G.LEGAL_P2P_TRADING_SERVICES,label:t("footer.p2pTradingServices"),enabled:ii},{routeName:G.LEGAL_TRADING_BOT_TERMS,label:t("nav.tradingBot"),enabled:ni},{routeName:G.LEGAL_PRIVACY,label:t("footer.privacyPolicy"),enabled:ri,list:mi&&Si(t)},{routeName:G.LEGAL_COOKIE_POLICY,label:t("footer.cookiePolicy"),enabled:li,list:pi&&Ai(t)},{routeName:G.LEGAL_KYC_AML_POLICY,label:t("t.kycAmlPolicy"),enabled:ci},{routeName:G.LEGAL_REFERRAL_PROGRAM,label:t("footer.referralProgramme"),enabled:Jt,list:ei&&Mi(t)},{routeName:G.LEGAL_AFFILIATE_PROGRAM,label:t("legal.tab.affiliateProgram"),enabled:ti},{routeName:G.LEGAL_DEBIT_CARD,label:t("nav.brandCard"),enabled:e},{routeName:G.LEGAL_DISCLAIMER,label:t("footer.disclaimers"),enabled:di},{routeName:G.LEGAL_DERIVATIVE_TERMS_AND_CONDITIONS,label:t("nav.derivativeTermsAndConditions"),enabled:hi}
2,{routeName:G.LEGAL_TRANSFER_SERVICE,label:t("t.transferService"),enabled:yi}].filter((e=>e.enabled)).reduce(i,[])})({isSupportDebitCard:h.value,t:s}))),h=S((()=>!!Ti&&(!m.value&&r.value.some((e=>[K.VISA,K.MASTER].includes(e)))))),y=S((()=>Di[l.value]||null));M(u,(e=>{e&&async function(){try{r.value=await Q.getTncControl()||[]}catch(e){}}()}),{immediate:!0});const C=new wi((e=>{e.forEach((e=>{const t=e.target.id.replace("anchor-","");c.value[t]={tag:t,isIntersecting:e.isIntersecting}}));const t=Object.values(c.value).find((e=>e.isIntersecting));t&&i.query.anchor!==t.tag&&n.replace({path:i.path,query:{...i.query,anchor:t.tag},state:{noScrollTop:!0}})}),{rootMargin:`-${_i}px 0px 0px 0px`,threshold:0});const A=Y(((e,t)=>{Math.abs(window.scrollY-e)<1||W()?t():d.value=window.requestAnimationFrame((()=>{A(e,(()=>{t()}))}))}));return{tabList:p,currentComponent:y,goAnchor:function(e,t="smooth"){const i=document.querySelector(e);if(!i)return;C.pauseObserve();const n=i.getBoundingClientRect().top+window.scrollY-_i+1;window.scrollTo({top:n,behavior:t}),d.value=window.requestAnimationFrame((()=>{A(n,(()=>{cancelAnimationFrame(d.value),C.resumeObserve()}))}))},selectTabName:l,resetScrollObserver:()=>{o.isMobile||(c.value=[],C.unobserveAllElements(),setTimeout((()=>{document.querySelectorAll('[id^="anchor-"]').forEach((e=>{C.observe(e)}))}),1e3))}}}const Li=Ft({name:"LegalDialog",components:{BrandDialog:J,NavigationMobile:Zt},props:{defaultTabName:{type:String,default:""}},emits:["update:isShow"],setup(e){const{tabList:t,currentComponent:i,goAnchor:n,selectTabName:a}=Pi({defaultTabName:e.defaultTabName});return{tabList:t,currentComponent:i,goAnchor:n,selectTabName:a}},computed:{selectTab(){return this.tabList.findIndex((e=>e.routeName===this.selectTabName))}},methods:{onClose(){this.$emit("update:isShow",!1)},onSelected(e,t){this.selectTabName=e,t&&this.goAnchor(`#anchor-${t}`)}}},[["render",function(e,t,n,s,o,r){const c=i("NavigationMobile"),d=i("BrandDialog");return a(),h(d,{class:"create-ads-pre-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"legal_dialog",onClosed:r.onClose},{body:C((()=>[l(c,{tabList:s.tabList,selectTab:r.selectTab,onSelected:r.onSelected},null,8,["tabList","selectTab","onSelected"]),(a(),h(I(s.currentComponent)))])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-29cd945c"]]);const Ei=Ft({name:"BottomFixedPanel",props:{contentRef:{type:Object,default:()=>({})},isInDialog:{type:Boolean,default:!1}},mounted(){this.init()},beforeUnmount(){document.getElementById("c2c")&&!document.getElementById("c2c-bottom-panel")&&(document.getElementById("c2c").style.paddingBottom="0px")},methods:{init(){this.isInDialog||this.$nextTick((()=>{var e,t;if(document.getElementById("c2c")){const i=null==(t=null==(e=this.$refs)?void 0:e.panel)?void 0:t.clientHeight;document.getElementById("c2c").style.paddingBottom=`${i}px`}}))}}},[["render",function(e,t,i,s,o,r){return a(),n("div",{id:"c2c-bottom-panel",ref:"panel",class:p(["bottom-fixed-panel",{"is-in-dialog":i.isInDialog}])},[w(e.$slots,"default",{},void 0,!0)],2)}],["__scopeId","data-v-31c6a646"]]);const xi=Ft({name:"ConsentTermsText",inject:["context"],props:{isForceWindowOpen:{type:Boolean,default:!1}},computed:{...t(["lang"])},methods:{goTerms(e){if(!this.isForceWindowOpen&&this.isMobile)return this.context.defaultLegalRouteName=e,void(this.context.isShowLegalDialog=!0);const t={name:e,params:{lang:this.lang}};window.open(this.$router.resolve(t).href,"_blank")},onC2CTermsClick(){this.goTerms(G.LEGAL_P2P_TRADING_SERVICES)},onBrandTermsClick(){this.goTerms(G.LEGAL_PRIVACY)}}},[["render",function(e,t,n,o,l,d){const u=i("i18n-t");return a(),h(u,{keypath:"c2c.agreeTermsText",tag:"div"},{termsAndConditions:C((()=>[s("span",{class:"link",onClick:t[0]||(t[0]=T(((...e)=>d.onC2CTermsClick&&d.onC2CTermsClick(...e)),["stop","prevent"]))},c(e.$t("c2c.termsAndConditions")),1)])),termsAndPolicies:C((()=>[s("span",{class:"link",onClick:t[1]||(t[1]=T(((...e)=>d.onBrandTermsClick&&d.onBrandTermsClick(...e)),["stop","prevent"]))},c(e.$t("c2c.termsAndPolicies")),1)])),brandName:C((()=>[r(c(e.$t("brand.name")),1)])),_:1})}],["__scopeId","data-v-db08df60"]]),Ni={MARKET:"market",MY_ADS:"my_ads",ORDERS:"orders",PROFILE:"profile",HELP_CENTER:"help_center"},Ri="create_ads",Bi={CREATED:"CREATED",ACCEPTED:"ACCEPTED",RELEASED:"RELEASED",PAY_PENDING:"PAY_PENDING",PAID:"PAID",CANCELED:"CANCELED",DISPUTED:"DISPUTED",RELEASE_
2EXPIRED:"RELEASE_EXPIRED",TERMINATED:"TERMINATED"},Oi="ENABLE",Fi="DISABLE",Ui="ABA_BANK",$i={INPUT:"INPUT",TEXTAREA:"TEXTAREA",IMAGE:"IMAGE",SELECT:"SELECT",PHONE_NUMBER:"PHONE_NUMBER"},qi={name:"CreateAdsPreModal",components:{BrandDialog:J,IconNotificationHollow:ee,BottomFixedPanel:Ei,ConsentTermsText:xi},inject:["context"],emits:["update:isShow"],data:()=>({isAgreeSimplifyTerms:!1,isAgreeFullyTerms:!1}),computed:{...t(["lang"]),isDisabled(){return!this.isAgreeSimplifyTerms||!this.isAgreeFullyTerms}},methods:{onOk(){this.context.pageName=Ri,this.onClose()},onClose(){this.$emit("update:isShow",!1)},onClickSupportUrl(){const e=te(this.lang,"C2C_CREATE_ADS_TERMS_SUPPORT");window.open(e,"_noopener")}}},Vi={class:"create-ads-pre-modal__body"},Hi={class:"body__title"},ji={class:"body__content"},Gi={class:"content__list"};const zi=Ft(qi,[["render",function(e,t,n,o,d,u){const m=i("IconNotificationHollow"),p=i("BaseButton"),y=i("i18n-t"),g=i("Checkbox"),f=i("ConsentTermsText"),b=i("BottomFixedPanel"),v=i("BrandDialog");return a(),h(v,{class:"create-ads-pre-modal",width:"560px",idPrefix:"p2p_create_ads_pre_dialog",isBrandNewStyle:"",fullStyle:e.isMobile,onClosed:u.onClose},{body:C((()=>[s("div",Vi,[l(m,{class:"body__icon"}),s("p",Hi,c(e.$t("t.important")),1),s("div",ji,[s("p",null,c(e.$t("terms.read.title")),1),s("ul",Gi,[s("li",null,c(e.$t("c2c.createAds.preAlert.list.1",{termsAndConditions:e.$t("c2c.termsAndConditions")})),1),s("li",null,c(e.$t("c2c.createAds.preAlert.list.2",{termsAndConditions:e.$t("c2c.termsAndConditions")})),1),s("li",null,c(e.$t("c2c.createAds.preAlert.list.3",{termsAndConditions:e.$t("c2c.termsAndConditions")})),1),l(y,{keypath:"c2c.createAds.preAlert.list.4.v2",tag:"li"},{termsAndConditions:C((()=>[r(c(e.$t("c2c.termsAndConditions")),1)])),customerSupport:C((()=>[l(p,{as:"a",size:"small",onClick:u.onClickSupportUrl},{default:C((()=>[r(c(e.$t("c2c.createAds.preAlert.list.4.v2.customerSupport").toLowerCase()),1)])),_:1},8,["onClick"])])),_:1})])])]),l(b,{class:"bottom-fixed-panel",isInDialog:""},{default:C((()=>[s("div",null,[l(g,{value:d.isAgreeSimplifyTerms,"onUpdate:value":t[0]||(t[0]=e=>d.isAgreeSimplifyTerms=e),class:"item__agree-terms",isBrandNewStyle:""},{default:C((()=>[r(c(e.$t("c2c.createAds.preAlert.agreeTermsText")),1)])),_:1},8,["value"]),l(g,{value:d.isAgreeFullyTerms,"onUpdate:value":t[1]||(t[1]=e=>d.isAgreeFullyTerms=e),class:"item__agree-terms",isBrandNewStyle:""},{default:C((()=>[l(f,{isForceWindowOpen:""})])),_:1},8,["value"]),l(p,{class:"primary content__button",size:"large",disabled:u.isDisabled,onClick:u.onOk},{default:C((()=>[r(c(e.$t("t.ok")),1)])),_:1},8,["disabled","onClick"])])])),_:1})])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-b82858eb"]]),Ki={name:"AccountSettingItem",components:{IconChevronRight:ae,IconNotificationCheck:ne,IconProcessing:ie},props:{title:{type:String,default:""},unverifiedText:{type:String,default:""},verifiedText:{type:String,default:""},isVerified:{type:Boolean,default:!1},isProcessing:{type:Boolean,default:!1}},emits:["click"],computed:{isClickable(){return!this.isVerified&&!this.isProcessing}},methods:{handleClick(){this.isClickable&&this.$emit("click")}}},Yi={class:"account-setting-item flex-box justify-between"},Wi={class:"title-block flex-box items-center"};const Zi=Ft(Ki,[["render",function(e,t,o,r,d,m){const h=i("IconNotificationCheck"),y=i("IconProcessing"),C=i("IconChevronRight");return a(),n("div",Yi,[s("div",Wi,[w(e.$slots,"icon",{},void 0,!0),s("div",null,c(o.title),1)]),s("div",{class:p(["action-block flex-box items-center",{"is-clickable":m.isClickable}]),onClick:t[0]||(t[0]=(...e)=>m.handleClick&&m.handleClick(...e))},[o.isVerified?(a(),n(u,{key:0},[l(h,{class:"status-icon color-green"}),s("div",null,c(o.verifiedText),1)],64)):o.isProcessing?(a(),n(u,{key:1},[l(y,{class:"status-icon color-yellow"}),s("div",null,c(e.$t("t.processing")),1)],64)):(a(),n(u,{key:2},[s("div",null,c(o.unverifiedText),1),l(C)],64))],2)])}],["__scopeId","data-v-65b8c94c"]]),Xi=["id"];const Qi=Ft({name:"IconGoogleAuth",components:{Icon:se},computed:{randomId:()=>oe()}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Google Auth Icon",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none"},{default:C((()=>[t[1]||(t[1]=s("g",{"clip-path":"url(#clip0)"},[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.2871 4.37802V7.38402C14.2507 10.0431 12.9712 12.5425 10.8105 14.1556L10.8022 14.1618L8.78711 15.7325L6.77202 14.1618L6.7637 14.1556C4.60307 12.5425 3.32356 10.0431 3.28711 7.38403V4.37802L8.63548 1.82359C8.63534 1.82365 8.63562 1.82352 8.63548 1.82359C8.73064 1.77844 8.84326 1.77829 8.93826 1.82339C8.93815 1.82334 8.93838 1.82345 8.93826 1.82339L14.2871 4.37802ZM15.2871 4.13119C15.2855 3.89351 15.1459 3.6777 14.9278 3.57584L9.36845 0.920655C9.00127 0.745849 8.57295 0.745849 8.2057 0.920655L2.64637 3.57584C2.42835 3.67774 2.28873 3.89351 2.28711 4.13119V7.3907C2.3257 10.3667 3.75685 13.1587 6.16544 14.9569L8.30699 16.6262C8.58886 16.844 8.98536 16.844 9.26723 16.6262L11.4088 14.9569C13.8174 13.1587 15.2485 10.3667 15.2871 7.3907V4.13119Z",fill:"#C3D5E9"}),s("path",{opacity:"0.4",d:"M14.3864 5.38802C14.5677 5.47092 14.6839 5.64655 14.6852 5.83999V8.49278C14.6531 10.9148 13.4627 13.1871 11.4592 14.6507L9.67788 16.0092C9.44342 16.1865 9.11362 16.1865 8.87916 16.0092L7.09782 14.6507C5.09436 13.1871 3.90393 10.9148 3.87183 8.49278V5.83999C3.87318 5.64655 3.98931 5.47095 4.17066 5.38802L8.7949 3.22706C9.10038 3.08479 9.45666 3.08479 9.76208 3.22706L14.3864 5.38802Z",fill:"#C3D5E9"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.78711 6.96346C9.2269 6.96348 9.63087 7.11976 9.9464 7.3797C9.98046 7.40776 10.0213 7.42265 10.0624 7.42456C10.069 7.42487 10.0756 7.42484 10.0821 7.42448C10.1283 7.42197 10.1736 7.40303 10.2088 7.36789L10.7627 6.81395C10.843
26 6.73304 10.8378 6.60061 10.7514 6.52563C10.2227 6.06696 9.53485 5.78955 8.78711 5.78955C8.78709 5.78955 8.78707 5.78955 8.78705 5.78955C7.67775 5.78955 6.70798 6.39373 6.1903 7.29094L6.19035 7.29097C5.93361 7.73191 5.78711 8.24398 5.78711 8.78955C5.78711 9.33512 5.93361 9.84719 6.19035 10.2881L6.1903 10.2882C6.70798 11.1854 7.67775 11.7896 8.78705 11.7896L8.78711 11.7896C9.33129 11.7896 9.84479 11.643 10.2871 11.3877V11.3863L10.2871 11.3863C11.2298 10.8411 11.7871 9.88451 11.7871 8.81368C11.7871 8.66121 11.7758 8.55221 11.7534 8.42948C11.7363 8.33623 11.6553 8.26794 11.5605 8.26794L9.11318 8.26782C9.00511 8.26782 8.91752 8.3554 8.91752 8.46348V9.24529C8.91752 9.35334 9.00511 9.44095 9.11317 9.44095H10.4914C10.3405 9.8326 10.0588 10.1606 9.69941 10.369L9.69942 10.369L9.6994 10.369L9.69938 10.369C9.43058 10.5249 9.11952 10.6156 8.78705 10.6156C8.11259 10.6156 7.5238 10.2471 7.20757 9.70184L7.20762 9.70182C7.05175 9.43302 6.96102 9.122 6.96102 8.78955C6.96102 8.4571 7.05175 8.14607 7.20762 7.87728L7.20757 7.87725C7.52381 7.33196 8.1126 6.96346 8.78705 6.96346C8.78707 6.96346 8.78709 6.96346 8.78711 6.96346Z",fill:"currentColor"})],-1)),s("defs",null,[s("clipPath",{id:l.randomId},t[0]||(t[0]=[s("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.310303 0.789551)"},null,-1)]),8,Xi)])])),_:1,__:[1]})}]]),Ji=["id"];const en=Ft({name:"IconPasscode",components:{Icon:se},computed:{randomId:()=>oe()}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Passcode Icon",width:"17",height:"17",viewBox:"0 0 17 17",fill:"none"},{default:C((()=>[t[1]||(t[1]=s("g",{"clip-path":"url(#clip0)"},[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.5 15.7896C12.366 15.7896 15.5 12.6555 15.5 8.78955C15.5 4.92356 12.366 1.78955 8.5 1.78955C4.63401 1.78955 1.5 4.92356 1.5 8.78955C1.5 12.6555 4.63401 15.7896 8.5 15.7896ZM8.5 16.7896C12.9183 16.7896 16.5 13.2078 16.5 8.78955C16.5 4.37127 12.9183 0.789551 8.5 0.789551C4.08172 0.789551 0.5 4.37127 0.5 8.78955C0.5 13.2078 4.08172 16.7896 8.5 16.7896Z",fill:"#C3D5E9"}),s("path",{opacity:"0.4",d:"M15.8398 9.95984C15.8398 13.7318 12.7821 16.7895 9.01013 16.7895C5.23819 16.7895 2.18042 13.7318 2.18042 9.95984C2.18042 6.18789 5.23819 3.13013 9.01013 3.13013C12.7821 3.13013 15.8398 6.18789 15.8398 9.95984Z",fill:"#C3D5E9"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.97059 6.78955H12.0294C12.2882 6.78955 12.5 7.06647 12.5 7.40494V10.1742C12.5 10.5126 12.2882 10.7896 12.0294 10.7896H4.97059C4.71176 10.7896 4.5 10.5126 4.5 10.1742V7.40494C4.5 7.06647 4.71176 6.78955 4.97059 6.78955Z",fill:"currentColor"}),s("path",{d:"M6.60248 8.9915L6.61787 9.45626H6.34864L6.36402 8.9915L5.96659 9.23785L5.83325 9.00673L6.24607 8.79086L5.83325 8.56991L5.96659 8.3388L6.36402 8.58515L6.34864 8.12292H6.61787L6.60248 8.58515L6.99992 8.3388L7.13325 8.56991L6.72043 8.79086L7.13325 9.00673L6.99992 9.23785L6.60248 8.9915Z",fill:"white"}),s("path",{d:"M8.61787 8.9915L8.63325 9.45626H8.36402L8.37941 8.9915L7.98197 9.23785L7.84864 9.00673L8.26146 8.79086L7.84864 8.56991L7.98197 8.3388L8.37941 8.58515L8.36402 8.12292H8.63325L8.61787 8.58515L9.0153 8.3388L9.14864 8.56991L8.73582 8.79086L9.14864 9.00673L9.0153 9.23785L8.61787 8.9915Z",fill:"white"}),s("path",{d:"M10.6358 8.9915L10.6512 9.45626H10.382L10.3974 8.9915L9.99992 9.23785L9.86659 9.00673L10.2794 8.79086L9.86659 8.56991L9.99992 8.3388L10.3974 8.58515L10.382 8.12292H10.6512L10.6358 8.58515L11.0333 8.3388L11.1666 8.56991L10.7538 8.79086L11.1666 9.00673L11.0333 9.23785L10.6358 8.9915Z",fill:"white"})],-1)),s("defs",null,[s("clipPath",{id:l.randomId},t[0]||(t[0]=[s("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5 0.789551)"},null,-1)]),8,Ji)])])),_:1,__:[1]})}]]);const tn=Ft({name:"IconAccountColorful",components:{Icon:se}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Account Colorful Icon",width:"33",height:"32",viewBox:"0 0 33 32"},{default:C((()=>t[0]||(t[0]=[s("g",{"clip-path":"url(#clip0_420_800143)"},[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.8175 12.4444C15.7631 12.4444 18.1509 10.0566 18.1509 7.11111C18.1509 4.16559 15.7631 1.77778 12.8175 1.77778C9.87201 1.77778 7.4842 4.16559 7.4842 7.11111C7.4842 10.0566 9.87201 12.4444 12.8175 12.4444ZM12.8175 14.2222C16.7449 14.2222 19.9286 11.0385 19.9286 7.11111C19.9286 3.18375 16.7449 0 12.8175 0C8.89017 0 5.70642 3.18375 5.70642 7.11111C5.70642 11.0385 8.89017 14.2222 12.8175 14.2222Z",fill:"#C3D5E9"}),s("path",{opacity:"0.4",d:"M19.0398 7.99935C19.0398 10.9449 16.652 13.3327 13.7065 13.3327C10.761 13.3327 8.37317 10.9449 8.37317 7.99935C8.37317 5.05383 10.761 2.66602 13.7065 2.66602C16.652 2.66602 19.0398 5.05383 19.0398 7.99935Z",fill:"#C3D5E9"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.42966 25.2136C3.59381 18.585 8.06256 14.2231 12.8176 14.2231C14.3258 14.2231 15.8051 14.6619 17.1594 15.4726C17.7582 15.1154 18.4025 14.8266 19.0816 14.617C17.2418 13.2364 15.1016 12.4453 12.8176 12.4453C6.89069 12.4453 1.93151 17.7726 0.678677 24.9061C0.339002 26.8402 1.96506 28.4453 3.92874 28.4453H14.5946C14.1837 27.8982 13.8344 27.3022 13.5571 26.6675H3.92874C3.4282 26.6675 2.99944 26.462 2.73022 26.178C2.47505 25.9088 2.36515 25.5809 2.42966 25.2136Z",fill:"#C3D5E9"}),s("path",{opacity:"0.4","fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0697 14.9941C16.9806 14.4941 15.8118 14.2227 14.5954 14.2227C8.70434 14.2227 3.92871 20.5902 3.92871 28.4449H14.5925C13.4755 26.9589 12.8136 25.1113 12.8136 23.1092C12.8136 19.4942 14.9716 16.3832 
218.0697 14.9941Z",fill:"#C3D5E9"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.7064 30.2227C25.6338 30.2227 28.8175 27.0389 28.8175 23.1115C28.8175 19.1842 25.6338 16.0004 21.7064 16.0004C17.779 16.0004 14.5953 19.1842 14.5953 23.1115C14.5953 27.0389 17.779 30.2227 21.7064 30.2227ZM21.7064 32.0004C26.6156 32.0004 30.5953 28.0207 30.5953 23.1115C30.5953 18.2023 26.6156 14.2227 21.7064 14.2227C16.7972 14.2227 12.8175 18.2023 12.8175 23.1115C12.8175 28.0207 16.7972 32.0004 21.7064 32.0004Z",fill:"#C3D5E9"}),s("path",{opacity:"0.4",d:"M28.8176 23.9996C28.8176 27.436 26.0318 30.2218 22.5954 30.2218C19.159 30.2218 16.3732 27.436 16.3732 23.9996C16.3732 20.5631 19.159 17.7773 22.5954 17.7773C26.0318 17.7773 28.8176 20.5631 28.8176 23.9996Z",fill:"#C3D5E9"}),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M26.8251 20.1335L20.7706 27.1971L17.4391 22.755L18.8613 21.6884L20.8631 24.3575L25.4753 18.9766L26.8251 20.1335Z",fill:"#00B15D"})],-1),s("defs",null,[s("clipPath",{id:"clip0_420_800143"},[s("rect",{width:"32",height:"32",fill:"white",transform:"translate(0.633545)"})])],-1)]))),_:1,__:[0]})}]]);const nn=Ft({name:"IconAccountInApp",components:{Icon:se}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Account In App Icon",width:"33",height:"32",viewBox:"0 0 33 32",fill:"none"},{default:C((()=>t[0]||(t[0]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M32.6335 26C32.6335 29.3138 29.9473 32 26.6335 32C23.3198 32 20.6335 29.3138 20.6335 26C20.6335 22.6863 23.3198 20 26.6335 20C29.9473 20 32.6335 22.6863 32.6335 26ZM24.9349 28.4404C25.081 28.5855 25.2795 28.667 25.4866 28.6666C25.6936 28.667 25.8922 28.5855 26.0385 28.4403L29.8697 24.6488C30.1719 24.3468 30.1706 23.86 29.867 23.5595C29.5633 23.259 29.0714 23.2578 28.7662 23.5568L25.4866 26.8022L24.7611 26.0842C24.0955 25.3333 23.6014 25.3333 23.2966 25.6349C22.992 25.9365 22.992 26.4255 23.6574 27.1763L24.9349 28.4404Z",fill:"currentColor"},null,-1),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.54223 5.41104C4.54223 2.90154 6.57659 0.867188 9.0861 0.867188C11.3752 0.867188 13.269 2.55991 13.5839 4.76192H26.6165C28.7675 4.76192 30.5113 6.50566 30.5113 8.65666V21.4218C29.9432 20.9402 29.2843 20.5624 28.5639 20.3178V8.65666C28.5639 7.58113 27.6921 6.70929 26.6165 6.70929H13.4418C13.1507 7.68725 12.5393 8.52723 11.7292 9.10751C14.2703 10.232 16.2181 12.937 16.812 16.3185C17.0954 17.9323 15.7815 19.3185 14.1349 19.3185H5.19547V21.6391C5.19547 22.7146 6.06734 23.5865 7.14284 23.5865H21.1389C20.8733 24.1901 20.7043 24.8457 20.6514 25.5339H7.14284C4.99184 25.5339 3.2481 23.7901 3.2481 21.6391V19.2084C1.99736 18.8504 1.12408 17.6635 1.36031 16.3184C1.95418 12.937 3.902 10.232 6.44303 9.10754C5.29215 8.28318 4.54223 6.93469 4.54223 5.41104ZM6.06767 5.41104C6.06767 3.74402 7.41907 2.39263 9.0861 2.39263C10.7531 2.39263 12.1045 3.74402 12.1045 5.41104C12.1045 7.07807 10.7531 8.42947 9.0861 8.42947C7.41907 8.42947 6.06767 7.07807 6.06767 5.41104ZM9.08615 10.2308C11.9543 10.2308 14.4932 12.8721 15.1497 16.6104C15.2428 17.1406 14.7783 17.6308 14.1349 17.6308H4.03742C3.39403 17.6308 2.92946 17.1406 3.02259 16.6104C3.67912 12.8721 6.21805 10.2308 9.08615 10.2308Z",fill:"currentColor"},null,-1),s("path",{d:"M26.1335 12C26.4097 12 26.6335 12.2985 26.6335 12.6667C26.6335 13.0086 26.4405 13.2903 26.1919 13.3288L26.1335 13.3333H19.1335C18.8574 13.3333 18.6335 13.0349 18.6335 12.6667C18.6335 12.3248 18.8266 12.043 19.0752 12.0045L19.1335 12H26.1335Z",fill:"currentColor"},null,-1),s("path",{d:"M26.6335 15.3333C26.6335 14.9651 26.4097 14.6667 26.1335 14.6667H19.1335L19.0752 14.6712C18.8266 14.7097 18.6335 14.9914 18.6335 15.3333C18.6335 15.7015 18.8574 16 19.1335 16H26.1335L26.1919 15.9955C26.4405 15.957 26.6335 15.6752 26.6335 15.3333Z",fill:"currentColor"},null,-1),s("path",{d:"M26.6335 18C26.6335 17.6318 26.4097 17.3333 26.1335 17.3333H19.1335L19.0752 17.3378C18.8266 17.3763 18.6335 17.6581 18.6335 18C18.6335 18.3682 18.8574 18.6667 19.1335 18.6667H26.1335L26.1919 18.6622C26.4405 18.6237 26.6335 18.3419 26.6335 18Z",fill:"currentColor"},null,-1)]))),_:1,__:[0]})}]]);const an=Ft({name:"IconLockInApp",components:{Icon:se}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Lock In App Icon",width:"33",height:"32",viewBox:"0 0 33 32",fill:"none"},{default:C((()=>t[0]||(t[0]=[s("rect",{x:"5.96753",y:"12.9453",width:"21.332",height:"14.888",stroke:"currentColor","stroke-width":"2","stroke-linejoin":"round"},null,-1),s("path",{d:"M10.1895 12.8556V7.64625C10.1895 4.98851 12.2502 2.83398 14.7923 2.83398H18.4746C21.0167 2.83398 23.0774 4.98851 23.0774 7.64625V12.8556",stroke:"currentColor","stroke-width":"2"},null,-1),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.1375 20.7505C18.9767 20.3046 19.5439 19.4522 19.5439 18.4739C19.5439 17.0342 18.3155 15.8672 16.8 15.8672C15.2846 15.8672 14.0562 17.0342 14.0562 18.4739C14.0562 19.4522 14.6234 20.3046 15.4625 20.7505L14.0562 24.3669H19.5439L18.1375 20.7505Z",fill:"currentColor"},null,-1)]))),_:1,__:[0]})}]]),sn={name:"AccountSettingDialog",components:{BrandDialog:J,FormField:ce,FormFieldInput:le,AccountSettingItem:Zi,IconGoogleAuth:Qi,IconPasscode:en,IconAccountColorful:tn,IconAccountInApp:nn,IconLockInApp:an},props:{fetchNickname:{type:Function,default:e=>re.becomeUser(e)},errorCode:{type:Number,default:0}},emits:["onClose"],data:()=>({nickname:"",isNicknameJumpingError:!1,isLoading:!1}),computed:{...t(["lang","accountInfo","apiResponseCode","isApp"]),...t("c2c",["c2cInitInfo","c2cAccountInfo"]),...D(["accountStatus"]),...D("c2c",["isC2CUser"]),roleUserInfo(){var e;return(null==(e=this.c2cInitInfo)?void 0:e.signUpPrerequisites)||{}},currentNickname(){var e;return(null==(e=this.c2cAccountInfo)?void 0:e.alias)||""},isChangeable(){return!this.isC2CUser},isNicknameShown(){const e=this.roleUserInfo.unsatisfiedPrerequisites||[];return this.isChangeable||0===e.length},nicknameJumpingError(){return this.$t(`response-code.${ue.C2C_OTC_USER_DUPLICATE}`)}
2,prerequisiteList(){var e;return(null==(e=this.roleUserInfo)?void 0:e.requiredPrerequisites)||[]},unsatisfyPrerequisiteList(){return this.roleUserInfo.unsatisfiedPrerequisites||[]},isTwoFactorAuthenticatorShown(){return this.prerequisiteList.includes(ye.GOOGLE_TOTP)},isPinCodeShown(){return this.prerequisiteList.includes(ye.PINCODE)},isIdVerified(){return this.errorCode!==he.C2C_OTC_MISSING_ROLE_PREREQUISITES&&!this.unsatisfyPrerequisiteList.includes(ye.ID_VERIFICATION)},isIdProcessing(){return!this.isIdVerified&&this.accountStatus===pe.PROCESSING},twoFactorAuthenticatorIconComponent:()=>me()?an:Qi,pinCodeIconComponent:()=>me()?an:en,accountIconComponent:()=>me()?nn:tn},watch:{apiResponseCode(e){ue.C2C_OTC_USER_DUPLICATE===e&&(this.isNicknameJumpingError=!0)},currentNickname:{handler(e){this.nickname=e},immediate:!0}},methods:{..._("c2c",["updateC2CInitInfo"]),onClose(){this.$emit("onClose")},submitForm(){this.isLoading=!0,this.fetchNickname(this.nickname).then((()=>{this.updateC2CInitInfo(),this.onClose()})).finally((()=>{this.isLoading=!1}))},isSubmitDisabled(e){return e||this.isNicknameJumpingError||this.isTwoFactorAuthenticatorShown&&!this.accountInfo.isGoogleBind||this.isPinCodeShown&&!this.accountInfo.hasPinCode||!this.isIdVerified||this.isLoading},goBindTwoFactorAuthenticator(){var e;this.isApp&&window.AppInterface?window.AppInterface.goBindTwoFactorAuthenticator():this.isApp&&(null==(e=window.webkit)?void 0:e.messageHandlers)?window.webkit.messageHandlers.onJsBindTwoFactorAuthenticator.postMessage(""):this.$router.push({name:de.SECURITY_TWO_FACTOR_SETTING,params:{lang:this.lang},state:{redirectName:"c2cMarketList"}})},goBindPinCode(){var e;this.isApp&&window.AppInterface?window.AppInterface.goBindPinCode():this.isApp&&(null==(e=window.webkit)?void 0:e.messageHandlers)?window.webkit.messageHandlers.onJsBindPinCode.postMessage(""):this.$router.push({name:de.SECURITY_TWO_FACTOR_SETTING,params:{lang:this.lang},state:{redirectName:"c2cMarketList"}})},goVerification(){var e;this.isApp&&window.AppInterface?window.AppInterface.goVerification():this.isApp&&(null==(e=window.webkit)?void 0:e.messageHandlers)?window.webkit.messageHandlers.onJsVerification.postMessage(""):this.$router.push({name:de.VERIFICATION,params:{lang:this.lang}})}}},on=["onSubmit"],rn={class:"description"},ln={class:"flex-box items-center"},cn={class:"note"},dn={key:1,class:"description"},un={class:"verification-block"},mn={key:2,class:"button-block flex-center-center"};const pn=Ft(sn,[["render",function(e,t,d,m,p,g){const f=i("FormFieldInput"),b=i("FormField"),v=i("AccountSettingItem"),k=i("BaseButton"),S=i("ValidationForm"),A=i("BrandDialog"),M=P("loading");return a(),h(A,{idPrefix:"p2p_account_setting_dialog",class:"account-setting-dialog",width:e.$isLargeSize(e.$mq)?"560px":"90%",height:e.isMobile?"100%":"auto",fullStyle:e.isMobile,isBrandNewStyle:"",onClosed:g.onClose},{header:C((()=>[r(c(e.$t("c2c.accountSetting")),1)])),body:C((()=>[l(S,{as:""},{default:C((({meta:i,handleSubmit:d})=>[o((a(),n("form",{class:"content-block flex-box flex-column",onSubmit:T((e=>d(g.submitForm)),["prevent"])},[g.isNicknameShown?(a(),n(u,{key:0},[s("div",rn,c(e.$t("c2c.accountSetting.description")),1),l(b,null,{title:C((()=>[s("div",ln,[s("div",null,c(e.$t("t.nickname")),1),s("div",cn," ("+c(e.$t("c2c.accountSetting.nickname.note"))+") ",1)])])),default:C((()=>[l(f,{value:p.nickname,"onUpdate:value":t[0]||(t[0]=e=>p.nickname=e),isJumpingError:p.isNicknameJumpingError,"onUpdate:isJumpingError":t[1]||(t[1]=e=>p.isNicknameJumpingError=e),name:"nickname",placeholder:e.$t("c2c.accountSetting.nickname.placeholder"),jumpingError:g.nicknameJumpingError,disabled:!g.isChangeable,rules:"required",maxlength:"300"},null,8,["value","isJumpingError","placeholder","jumpingError","disabled"])])),_:1}),t[2]||(t[2]=s("div",{class:"divider"},null,-1))],64)):(a(),n("div",dn,c(e.$t("c2c.accountSetting.error")),1)),l(b,{title:e.$t("t.securityVerification")},{default:C((()=>[s("div",un,[g.isTwoFactorAuthenticatorShown?(a(),h(v,{key:0,title:e.$t("msg.googleAuthenticator"),unverifiedText:e.$t("t.enable"),verifiedText:e.$t("t.enabled"),isVerified:e.accountInfo.isGoogleBind,onClick:g.goBindTwoFactorAuthenticator},{icon:C((()=>[(a(),h(I(g.twoFactorAuthenticatorIconComponent)))])),_:1},8,["title","unverifiedText","verifiedText","isVerified","onClick"])):y("",!0),g.isPinCodeShown?(a(),h(v,{key:1,title:e.$t("t.pinCode"),unverifiedText:e.$t("wallets.setup"),verifiedText:e.$t("t.enabled"),isVerified:e.accountInfo.hasPinCode,onClick:g.goBindPinCode},{icon:C((()=>[(a(),h(I(g.pinCodeIconComponent)))])),_:1},8,["title","unverifiedText","verifiedText","isVerified","onClick"])):y("",!0),l(v,{title:e.$t("c2c.accountSetting.verificationLevel"),unverifiedText:e.$t("t.verify"),verifiedText:e.$t("t.verified"),isVerified:g.isIdVerified,isProcessing:g.isIdProcessing,onClick:g.goVerification},{icon:C((()=>[(a(),h(I(g.accountIconComponent)))])),_:1},8,["title","unverifiedText","verifiedText","isVerified","isProcessing","onClick"])])])),_:1},8,["title"]),g.isChangeable?(a(),n("div",mn,[l(k,{class:"outline-primary",size:"large",onClick:g.onClose},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["onClick"]),l(k,{class:"primary",size:"large",type:"submit",disabled:g.isSubmitDisabled(!i.valid),loading:p.isLoading},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:2},1032,["disabled","loading"])])):y("",!0)],40,on)),[[M,!e.c2cInitInfo]])])),_:1})])),_:1},8,["width","height","fullStyle","onClosed"])}],["__scopeId","data-v-632dd441"]]),hn={ENABLE:"ENABLE",DISABLE:"DISABLE",DELETED:"DELETED",COMPLETED:"COMPLETED",BLOCKED:"BLOCKED"},yn={STATUS:"STATUS",EDIT:"EDIT",DELETE:"DELETE",FAIL:"FAIL",AMOUNT_ERR:"AMOUNT_ERR"},Cn="hideC2CToggleStatusHint",gn="hideC2CToggleEditHint",fn=[{key:"ALL",lang:"t.all"},{key:"BUY",lang:"t.buy"},{key:"SELL",lang:"t.sell"}],bn=[{key:"ALL",lang:"t.all"},{key:hn.ENABLE,lang:"account.status.active"},{key:hn.DISABLE,lang:"c2c.dropdown.inactive"},{key:hn.BLOCKED,lang:"c2c.marketList.blocked"}],vn={name:"NoticeModal",components:{BrandDialog:J,IconNotificationHollow:ee},props:{advertId:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},btnText:{type:String,default:"t.yes"},type:{type:String,default:"t.yes"}},emits:["click","update:isShow"],data:()=>({checkValue:!1,DIALOG_ACTION:yn}),computed:{...D(["userName"]),...t(["lang"]),showAdNumber(){return this.type===yn.DELETE},showCheckBox(){return this.type===yn.STATUS||this.type===yn.EDIT}}
2,watch:{checkValue(e){const t=this.type===yn.STATUS?Cn:gn;window.localStorage.setItem(`${t}.${this.userName}`,e)}},methods:{closed(){this.$emit("update:isShow",!1)},viewMyOrders(){this.$router.push({name:"c2cMyOrder",params:{lang:this.lang}})}}},kn={class:"notice-modal__body"},Sn={class:"body__title"},An={key:0,class:"ad-number"},Mn={class:"body__text"},In={key:1},wn={class:"check-text"};const Tn=Ft(vn,[["render",function(e,t,o,d,u,m){const p=i("IconNotificationHollow"),g=i("Checkbox"),f=i("BaseButton"),b=i("BrandDialog");return a(),h(b,{class:"notice-modal",width:e.isMobile?"90%":"338px",idPrefix:"p2p_my_ads_notice_dialog",isBrandNewStyle:"",onClosed:m.closed},{body:C((()=>[s("div",kn,[l(p,{class:"body__icon"}),s("p",Sn,c(e.$t(o.title)),1),m.showAdNumber?(a(),n("div",An,c(e.$t("c2c.myAdsList.adNumber"))+" "+c(o.advertId),1)):y("",!0),s("p",Mn,c(e.$t(o.content)),1),o.type===u.DIALOG_ACTION.FAIL?(a(),n("div",In,[r(c(e.$t("t.view"))+" ",1),s("span",{class:"link",onClick:t[0]||(t[0]=(...e)=>m.viewMyOrders&&m.viewMyOrders(...e))},c(e.$t("c2c.myOrders")),1)])):y("",!0),m.showCheckBox?(a(),h(g,{key:2,value:u.checkValue,"onUpdate:value":t[1]||(t[1]=e=>u.checkValue=e),class:"checkbox",isBrandNewStyle:""},{default:C((()=>[s("span",wn,c(e.$t("c2c.myAdsList.checkText")),1)])),_:1},8,["value"])):y("",!0),w(e.$slots,"content",{},void 0,!0),l(f,{class:"primary body__button",size:"large",onClick:t[2]||(t[2]=t=>e.$emit("click"))},{default:C((()=>[r(c(e.$t(o.btnText)),1)])),_:1})])])),_:3},8,["width","onClosed"])}],["__scopeId","data-v-c84d0d51"]]),_n={class:"background"},Dn={key:0,class:"desktop"},Pn={class:"left-wrapper"},Ln={key:0,class:"left"},En=["src"],xn=["src"],Nn=["src"],Rn=["src"],Bn={class:"right-wrapper"},On={key:0,class:"right"},Fn=["src"],Un=["src"],$n=["src"],qn={key:1,class:"mobile"},Vn={class:"left-wrapper"},Hn=["src"],jn=["src"],Gn={class:"right-wrapper"},zn=["src"],Kn=["src"],Yn={class:"title-wrapper"},Wn={class:"title"},Zn={class:"desc"};const Xn=Ft({name:"Background",props:{title:{type:String,default:""},desc:{type:String,default:""}},data:()=>({iconBitcoin1:"/static/img/LLHv_NTh.png",iconBitcoin2:"/static/img/Bnek3ELd.png",iconBitcoinHalf:"/static/img/C8tntlb7.png",iconEllipse:"/static/img/BqDn814M.png",iconCoin:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAABHCAYAAABVsFofAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA4vSURBVHgB7VpbjBvVGf7neDyezDqO4ywbZ7MsaUiiJDQphShSr2wrUSpe+oACElLLpYKipu0TqtonwkPf+tCLKpWKQi/qRYmqUpBacW1QoVxCKNeFhhDS7bI1G8dxHGd2djxzTv//zMXjsb1e3xKE9tPOnpnxmTPnfPP9//nPPwOwghWsYAUrWMEKVrCCFaygDgUuMsRfv52yJhIb9VRqNdR42kmIpMrU87bNFrW1TgkK5Q+UPb+owUXARSFHvPX9deAu7gbH2QSCXQYO937gfglM/oGqASQTFqS0WTx6E36XeFU5cIDDBcIFJUe8+M28m1SvS3C+CWyu1MmIgzXuMiJLA74qVWF6avpoee7JPRdATReEnMKjd4+sX2ddCy6/UqqESKE/2warYoJTxQ33ueUAU1VQdRW0tAFaNoOcqEiMWieJ1DQyUgY1+Rz8nh8ZppKGTo54Zf8VsADXAXczRAq3HTDnS1CeKULpdBVraEiGDsaIIdWhqswnzsJ/Dh5zyE5kQM+P+kQxbzMyeGnqNJyzH1L2/uC/MAQMlZzac3d9RgV2LfoWoK1aKMHcmzNQNTlk1o3C2GQOjLQulRIqgxC4IIuDbeJ1ZRO4WYV03gBjYrSuJC2NJBngWsrR9z4oPrb1+p8uwgAxNHKcI9+4PmGLvUC8oNnMvnECiu9XYfTSMRjfNIbj0tFEmLcRWJuGiChsgyNJlUKVJAWZzVlghu5dhKoDDVUHaulMTf91bs/3zsKAMBRyxPP7r4dabS+ZkVkow8l/HQeH6bBl1yQYORyI6j/5YFZaDnySnAr6qfky6JMZUNOGpzaNCEJfBMkyQOJXyicPlGEAGDg54rlvTaF3nSLHW5mbhxNHT0BuPapl5ziaj1ZXCoEtlxkf3N9QRWahAtp4GgnSvXZ0nyhIlYGdQ4J+1DdBXfZuaZx/5vZxcGufJ2KqSMzxF45B/tJxmNw90UyMRA8TDTWRVsEYzwIvmigl25v9LNOfBWtZbqdvEgemVOgTAyNHvHSnYXDtJqi5zCpVpCmNXz4B+e1534xa3EoqgUNTvCOdcyCTSN0odAZaLg1O0aq3YdtyhmPgbIAvf/oL0CcGp5wF9kVwnTXcsmD29eNoSqOQ35KP+JdO8MnAqRtwlgbpb3lr8gIYGBORr6n6BJGK5IbOSTh7xfPfnYA+MBByxAv714EQV1EHyyfm5Pjy2ya8gC2KTgExlTrNYF5pzsyhuVh1hbVqAE0Mo22pGI8gGSRRmcSgcwr6wEDIcc+jA0ZzstGcSv8pwPjWCWDkY6R5xCrHx6f6dUgpmr8h7GIFKjMlCCPq4NpQSf5G1xp4EUbXXh27XseBLeYjd22EHtE3OeLZu8YSirKLnlwZn3T2kpwM+5vR4qkTMWnsQpZ5Zdqf2mlcJwuQC2KhTvCj6mBZIlXkO2ptZNU10CP6Jsex3d3UGRsDPftMBXKTY/j01aZot37gP1XpW3wTivwU1Dd2bwaNnDmLXLPkSNS6onjdzBQuLhd/P6BDD+iLnIMH9yVUoVxF/aGp21idxsjVaK4YdxfSFDoEgERwPov1wFMBRMwpSmTQLpljSGCdJCYgAe6ZbdAD+ooF9q3PbQa7ZlDnebkC2U0TS5sB9TnwQ1q93vz0HMy8Pg/pNRmYuDIv11AhyLSqGM85at18OsVHMpp2QvIXuaBZ6zXoEn0px3X5DirtSlVaidpKNXFQx8NB4rjnKzD9+NuQTqYhjQvJ0htVdMRVvy6u4rGLZqnqDbaTaQU+J2q+uKUU1pNy+iIHk1YbZB9ME4ys4auG1Tva9q71zmvom3ZvHYVt23MwMZmWm1ZywMElgoMz1RuPTcPMiSosC8z35l4HIg5aZMTDdy7jycWagx7x0n13JkEoG+juTrnqrZLjUXAr30A7dr2KltUht32MUjnSbzD0RXpGB37SgrefOgHl0xwmNo3XYybeqf3Iz44/vQvBKtZI1065Z5+zbQOsCWSrYmyhpnGW6hTUBIeoCrQhP8bBayYxRzPvxzTUBpFkM8hlUFGTGmYk1MZGZDtt7kWnfU4ccsjcazOZcEg5JegCPStHUxfXeD1w/OxDdzzzoh154thCLkuMeFMwQsWYZ3wcU6UZf8Ha1NM2sgl8DhLNyWf5XDpCpKFL9ExOStNyod9QWaNJtZF5w22rZI5O/RStwUYp7WDV/ZXaQ/cYD0ty5l5syGG1rtrQJXoiRwihgCt4SACLPtn4U2wF7DZO5c6cBY4VqUR+hcyNm9C0looT3tbfeDMhOfNILh8WlVrXLqQnchRFEUjRyLJa4ZE60sf4PZb5KRXs41W0pMjoKO0J/sq6VUzTTpXRAJH2qE00dXqC9NP5SmoBukTPZuVwUQubCE2Kt1cLTTYZCuQoQWV6dVE9BibX+YxVH7R8/aJGomK/3ZbSgcbzdK1PUnQlQajVTnXljP2RLQ1pQo2Qx8LiC2GHgk6F/Y0NhsQgF5V4nCa/SI7XHzxO3Sq5HjntevVtWmFTqsJpKRFoJCY2Gs/JgO1Ef1Wc/Nd+a0KX6EiOZ0LNpzljC/UnzaAp6OP1joIZ+Y3q53HVrloeWdSDTKNDN6u29BlhQ638Szt/49cPMxi473JewN1W41gS3ZpVqKJzAHPhWUpuO3a903FgMsqpRB4lvomAMZy6dcfbso3ZwgouKZYMDVrdI1QNZUtxrYcr1oA7m/P3oQcsSU7cpPA43B/diI9egGdatKayLWibrUNV8AIuB+yo6ameiaWNSD4GiZktQeWs7b9qYbB0SBCAe8pzvEYsy0Zu9XqOzIZ/Qw/oSjkRExNw9X2Oy8T/5JEq8wphANfKb9Jr3uoxs3HqjsHGQb19ZAay63JYX2tupAExu5LK8TywxbXQSjHgMH/+zvqT0AOWJKeFv1FIPYGihCveCf0OPWnHaTmJyBuhJWXota/pNN2HgrQKpkVffvQYkpKGsbFcY1TcNGPFyKK6jlfHMi00o0A1DHBKPXKgx48NOgZGRERAEhGD+2F55s+3vpVV+XWyr2n0IRXMu6h6hPJG7hk53pwmqxeOz2MOpwDG2hxY52x8f+7AKCpm80QGX2CqTdc2iSealCf/ZHtp0RI6f1WvrzGZnpyGHtGRHJ8YJfA3UYIQZ92Hb5lJMJiUpqWVvSmaBwTFRoRxTeAHijNFtEImk1jZtQZMbFRxoaliDMhiEXcHaMHbBxQlqQbSoNMhuSsh3tzwlR9/AD1iOSF16JQDUqKO2XLVoyPMmZTOkFbm5aI/07R4X4VPtTiL6Q3sPT/PYfvWPBjokL24j2HJWr+xWKr3xAJlIkk1uF7TdG+WwrOivMiegj7QlUMOSLn33ntDwn742uTrNYcXw97S2sixAOLRsu8q0FVCucBh/LJJXIinpVLIjJjKuuuNTLXi/SzPnKoVXKexbPgjqublHbf87DT0gXbdUWKlVA2BiLnnnntElKBTZfcJLy+A//QxL/UQDf8j6ysynU3jOoxmNS+P3NXHBH5jlJMlYkx/dkJ/M1/FSBuXHWS22N
2dywjH7Uk3D4DvUEb5jbqkewt0ff+fmkaSyxfvigVEkhwNP+ybW8xLOA4tIkJqTigE5Ozq4zeL7cqaNyllLEUhLrfbA9q8/MAd9Qun0W9S/xOGrSO6fOrTfyKrlO5IJtiZ89VJFa+PpSLTbrUpil8jXxJqnGCSF/MxcsQo2G5XfEqLXAoXxJye/ev8/YADo6pFG1RJXzmGYWjh7nv0ROyzkuGgAmby3hgpMrKst1ksywSgxaMKzSIwJOX/hS6drzwyKGEIn5YTTeOBr6IeoYgiHDh0K2/nU+b/szGfEDWqQxaP32JTdw9c3MhJcbtqaRTYZYGJpe69nyJRm5nHaRrOlSJpmORfYs9tuu/9xGCCW9WVXdI0VKGbnzp2y3Ldvn4iSQ/is9ci2tavcG3SVqV6Si546va6teE7bYs2+KKph8jHye0EtWDmG0beJzncW88+OTwx6X5yYEg9tv+P+rl/adcJyP3tTYr6n4booOUiWLAuHbs/pNfPmjJFYy8Iv0pnnTGm24X4y3Q/zJdSAMNagFGkyWBZxup6v4KykU2ykQkKwQtUSf7rqOw+egiFguT6HpirapHJwkyeDMgokSpb5fQ+UXrF33Hd6QTxhLta4TFvSYE0yMSrx1haamRPZ6Bz5FMznoESkyiivU65acLxgwryFpOgZFEtqoeayRytC/SUSU4QhoecPJnExxwK/00o5RNIll1wiz68+9ofsumT56jUa/8RISjXUyPIg+nTCNStl8pDIMq63ymiCFi5HNE1D7SZOC6a8+rLqHLn11gflN8dtknEDQd9fk/r+SIn7HUJAToDki39btSr93vrcKnGFBm4OFyIbNVV1heAp71sjELR+PFdLCMtRbTWZqgglOetCbd7WV7/7udt+UgwmhugCOOgKDBiD/NRWOXjwYJOZxglqwtNPgz3ybmqEb2D6DsP958mcu2vXLvfUqVOCnH1QLTDhYMZsuPGQ1NNn6NoAceONN7o4ID49Pd2yszTgppPXXANfuvs31tzH9pgnrJ2L+XzeiRMTIL5sIQRZAxgC+v5WNw6/s3Jg5Jdwyg/VE1fR1NSUOHz4cMuBBWZKJEUdf6CcSIZA8U1L8c1sYCoaODlRBBk4GgAOtkml/swmghkujnYK9NuUZdTnRPYHgqGSE8B/mi7t+2pqGkXUjEg1rcyqDYZmVhcNpCZ04AksGW3BflASiZFSCTbwzKfhGIaEQTrkrkBqIgeOJZmeIBMKFBPxMeFaLjwRMadhxjgfSrRTTFw5kXJo+DDbasN6LppoC459fHgj5AuBuEJixASplRUQYmR9tGaqFazgo43/A3YaGDvnxRViAAAAAElFTkSuQmCC",iconCoin2:"/static/img/Bwo4j-_V.png",iconSupport:"/static/img/YzyAvJoD.png",mBitcoin:"data:image/png;base64,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",mCoin1:"data:image/png;base64,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",mCoin2:"data:image/png;base64,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",mSupport:"/static/img/D0Q6gSFW.png"}),computed:{bgCoinIconVisible:()=>j.bgCoinIconVisible}},[["render",function(e,t,i,o,r,l){return a(),n("div",_n,[e.isMobile?l.bgCoinIconVisible?(a(),n("div",qn,[s("div",Vn,[s("img",{src:r.mBitcoin,alt:"bitcoin"},null,8,Hn),s("img",{class:"absolute coin1",src:r.mCoin1,alt:"coin 1"},null,8,jn)]),s("div",Gn,[s("img",{class:"absolute coin2",src:r.mCoin2,alt:"coin 2"},null,8,zn),s("img",{src:r.mSupport,alt:"support"},null,8,Kn)])])):y("",!0):(a(),n("div",Dn,[s("div",Pn,[l.bgCoinIconVisible?(a(),n("div",Ln,[s("img",{class:"absolute",src:r.iconEllipse,alt:"ellipse"},null,8,En),s("img",{class:"absolute bitcoin1",src:r.iconBitcoin1,alt:"bitcoin 1"},null,8,xn),s("img",{class:"absolute bitcoin2",src:r.iconBitcoin2,alt:"bitcoin 2"},null,8,Nn),s("img",{class:"absolute bitcoin-half",src:r.iconBitcoinHalf,alt:"bitcoin half"},null,8,Rn)])):y("",!0)]),s("div",Bn,[l.bgCoinIconVisible?(a(),n("div",On,[s("img",{class:"absolute coin",src:r.iconCoin,alt:"coin"},null,8,Fn),s("img",{class:"absolute coin2",src:r.iconCoin2,alt:"coin 2"},null,8,Un),s("img",{class:"absolute ic-support",src:r.iconSupport,alt:"support"},null,8,$n)])):y("",!0)])])),s("div",Yn,[s("div",Wn,c(i.title),1),s("div",Zn,c(i.desc),1)])])}],["__scopeId","data-v-1c217d1d"]]),Qn=[{key:"market",title:"trading.orders.markets",routeName:"c2cMarketList",isAuthNeeded:!1}],Jn=[{key:"my_ads",title:"c2c.myAds",routeName:"c2cMyAds",isAuthNeeded:!0},{key:"orders",title:"c2c.orders",routeName:"c2cMyOrder",nestRouteName:"c2cOrder",isAuthNeeded:!0},{key:"profile",title:"c2c.c2cProfile",routeName:"c2cAccountManagement",isAuthNeeded:!0},{key:"help_center",title:"c2c.helpCenter",isAuthNeeded:!1}],ea={name:"Menu",components:{IconChevronDown:ge,IconArrowBack:Ce},inject:["context"],emits:["onSettingOpen"],data:()=>({leftMenu:Qn,activeTab:Ni.MARKET,menuTabs:Ni,isDropDownOpen:!1}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo"]),...D("c2c",["isAvailableC2CUser"]),isTabletSmaller(){return this.$deviceSmallerThan.lg(this.$mq)},isShowBackButton(){var e;return"c2cAccountManagement"===this.routeName&&(null==(e=this.$route.query)?void 0:e.username)},routeName(){return this.$route.name},mobileTabs(){return[...Qn,...this.rightMenu].filter((e=>e.title!==this.dropDownSelectedText))},dropDownSelectedText(){var e;return(null==(e=[...Qn,...Jn].find((e=>e.key===this.activeTab)))?void 0:e.title)||""},helpCenterLink(){return te(this.lang,"C2C_MENU_HELP_CENTER")},hasUnreadMessage(){var e;return null==(e=this.c2cAccountInfo)?void 0:e.hasUnreadMessages},rightMenu(){return Jn.map((e=>{const t={...e,hasUnreadMessages:this.hasUnreadMessage};return"orders"===e.key?t:e}))}},watch:{"$route.name":{immediate:!0,handler(){this.initTabActive()}},"context.pageName":{immediate:!0,handler(e){e?this.activeTab=e.pageName:this.initTabActive()}}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{initTabActive(){var e;this.activeTab=(null==(e=[...Qn,...Jn].find((e=>{const t=e.nestRouteName===this.routeName;return e.routeName===this.routeName||t})))?void 0:e.key)||"c2cMarketList"},onMenuClick(e){e.key!==Ni.HELP_CENTER?!e.isAuthNeeded||this.isAvailableC2CUser?(this.context.pageName=null,this.activeTab=e.key,this.$router.push({name:e.routeName,params:{lang:this.lang}})):this.$emit("onSettingOpen"):window.open(this.helpCenterLink,"_blank")},onCreateAdsClick(){this.isAvailableC2CUser?this.c2cAccountInfo.isBlockedByAdmin?this.context.
2isShowNoticeModal=!0:this.context.isShowPreModal=!0:this.$emit("onSettingOpen")},onDropdownItemClick(e){e.key!==Ni.HELP_CENTER?!e.isAuthNeeded||this.isAvailableC2CUser?(this.activeTab=e.key,this.$router.push({name:e.routeName,params:{lang:this.lang}})):this.$emit("onSettingOpen"):window.open(this.helpCenterLink,"_blank")},onDropdownClick(){this.isDropDownOpen=!this.isDropDownOpen,this.isDropDownOpen&&document.addEventListener("click",this.onClickOutside),!this.isDropDownOpen&&document.removeEventListener("click",this.onClickOutside)},onClickOutside(e){this.$refs.dropdown&&!this.$refs.dropdown.contains(e.target)&&(this.isDropDownOpen=!1,document.removeEventListener("click",this.onClickOutside))},onBack(){this.$router.push({name:"c2cMarketList",params:{lang:this.lang}})}}},ta={key:0,class:"desktop"},ia={class:"left"},na=["onClick"],aa={class:"right inner-ml-36"},sa=["onClick"],oa={key:1,class:"mobile inner-ml-8"},ra={class:"dropdown"},la={class:"selected-text inline-flex"},ca={key:0,class:"dropdown-items"},da=["onClick"];const ua=Ft(ea,[["render",function(e,t,o,d,h,g){const f=i("IconArrowBack"),b=i("BaseButton"),v=i("IconChevronDown");return a(),n("div",{class:p(["menu",{"is-sticky":!g.isTabletSmaller}])},[g.isShowBackButton?(a(),n("div",{key:0,class:p(g.isTabletSmaller?"mobile":"desktop")},[s("div",{class:"back-wrap inner-ml-8",onClick:t[0]||(t[0]=(...e)=>g.onBack&&g.onBack(...e))},[l(f,{class:"icon-back"}),s("span",null,c(e.$t("c2c.backToMarket")),1)])],2)):(a(),n(u,{key:1},[g.isTabletSmaller?(a(),n("div",oa,[s("div",ra,[s("div",{ref:"dropdown",class:"dropdown-select inner-ml-8",onClick:t[1]||(t[1]=(...e)=>g.onDropdownClick&&g.onDropdownClick(...e))},[s("div",la,[r(c(e.$t(g.dropDownSelectedText))+" ",1),s("div",{class:p(["unread-icon",{unread:g.hasUnreadMessage}])},null,2)]),l(v,{class:"dropdown-icon"})],512),h.isDropDownOpen?(a(),n("ul",ca,[(a(!0),n(u,null,m(g.mobileTabs,(t=>(a(),n("li",{key:t.key,class:"dropdown-item inline-flex",onClick:e=>g.onDropdownItemClick(t)},[r(c(e.$t(t.title))+" ",1),s("div",{class:p(["unread-icon",{unread:t.hasUnreadMessages}])},null,2)],8,da)))),128))])):y("",!0)]),l(b,{class:"primary",size:"extra-small",onClick:g.onCreateAdsClick},{default:C((()=>[r(" + "+c(e.$t("c2c.createAds.createAds")),1)])),_:1},8,["onClick"])])):(a(),n("div",ta,[s("ul",ia,[(a(!0),n(u,null,m(h.leftMenu,(t=>(a(),n("li",{key:t.key,class:p({active:t.key===h.activeTab}),onClick:e=>g.onMenuClick(t)},c(e.$t(t.title)),11,na)))),128))]),s("ul",aa,[s("li",null,[l(b,{size:"extra-small",class:"primary",onClick:g.onCreateAdsClick},{default:C((()=>[r(" + "+c(e.$t("c2c.createAds.createAds")),1)])),_:1},8,["onClick"])]),(a(!0),n(u,null,m(g.rightMenu,(t=>(a(),n("li",{key:t.key,class:p(["inline-flex",{active:t.key===h.activeTab&&t.key!==h.menuTabs.HELP_CENTER}]),onClick:e=>g.onMenuClick(t)},[r(c(e.$t(t.title))+" ",1),s("div",{class:p(["unread-icon",{unread:t.hasUnreadMessages}])},null,2)],10,sa)))),128))])]))],64))],2)}],["__scopeId","data-v-3b353052"]]),ma={class:"section"},pa={class:"section__title"},ha={class:"section__container"};const ya=Ft({name:"Section",props:{title:{type:String,default:""}}},[["render",function(e,t,i,o,r,l){return a(),n("div",ma,[s("p",pa,c(e.$t(i.title)),1),s("div",ha,[w(e.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-4a80b47d"]]),Ca=["onClick"],ga=Ft(L({__name:"SwitcherV2",props:{value:{default:""},btnList:{default:()=>[]},isDisabled:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const i=e,s=t;function o(e){return i.value===e}return(e,t)=>(a(),n("div",{class:p(["switcher-v2",{"is-disabled":e.isDisabled}])},[(a(!0),n(u,null,m(e.btnList,(({key:e,text:t,color:r})=>(a(),n("div",{key:e,class:p(["switcher__item",{active:o(e)}]),style:E(o(e)&&{backgroundColor:r}),onClick:t=>function(e){i.isDisabled||s("select",e)}(e)},c(t),15,Ca)))),128))],2))}}),[["__scopeId","data-v-3ac8a008"]]),fa={name:"AmountInput",props:{value:{type:[Number,String],default:0},enableMax:{type:Boolean,default:!1},maxAmount:{type:Number,default:0},currency:{type:String,default:""},errorMsg:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},isCrypto:{type:Boolean,default:!1},isFocus:{type:Boolean,default:!1}},emits:["input","focus","update:value"],computed:{...t("c2c",["c2cInitInfo"]),...D("c2c",["getCurrencyDecimal"]),innerValue:{get(){return this.value},set(e){this.$emit("update:value",e)}},isError(){return this.errorMsg.length>0}},methods:{calcNumOfDecimal(e){const t=e.toString().indexOf(".");return-1===t?0:e.toString().length-t-1},handleInput(e){const t=this.calcNumOfDecimal(e),i=this.getCurrencyDecimal(this.currency),n=t>i?this.$t("rules.decimalDigits",{i:i}):"";this.$emit("input",e,n),this.innerValue=e},handleFocus(){this.$emit("focus",!0)},onMax(){this.disabled||this.handleInput(this.maxAmount)}}},ba={class:"amount-input__currency"},va={class:"amount-input__error-msg"};const ka=Ft(fa,[["render",function(e,t,o,r,d,u){const m=i("BrandInput");return a(),n("div",{class:p(["amount-input",{"is-disabled":o.disabled}])},[l(m,{value:u.innerValue,"onUpdate:value":t[1]||(t[1]=e=>u.innerValue=e),class:p(["amount-input__input",{"is-focus":o.isFocus}]),isPrice:"",textAlign:"right",isError:u.isError,placeholder:o.placeholder,disabled:o.disabled,isBrandNewStyle:"",onInput:u.handleInput,onFocus:u.handleFocus},{suffix:C((()=>[o.enableMax?(a(),n("div",{key:0,class:"amount-input__max-btn",onClick:t[0]||(t[0]=(...e)=>u.onMax&&u.onMax(...e))},c(e.$t("t.max.uppercase")),1)):y("",!0),s("div",ba,c(o.currency),1)])),_:1},8,["value","class","isError","placeholder","disabled","onInput","onFocus"]),s("p",va,c(o.errorMsg),
21)],2)}],["__scopeId","data-v-3963f723"]]),Sa={class:"note"},Aa={class:"title"},Ma=["value","maxlength","placeholder"],Ia={class:"remaining"};const wa=Ft({name:"Note",props:{value:{type:String,default:""},title:{type:String,default:""},maxlength:{type:String,default:"100"},placeholder:{type:String,default:""}},emits:["input"],computed:{wordCount(){return this.value.length},remainingChars(){return this.maxlength-this.wordCount}},methods:{setValue(e){this.$emit("input",e)}}},[["render",function(e,t,i,o,r,l){return a(),n("div",Sa,[s("div",Aa,c(e.$t(i.title)),1),s("textarea",{value:i.value,maxlength:i.maxlength,placeholder:i.placeholder,onInput:t[0]||(t[0]=e=>l.setValue(e.target.value))},null,40,Ma),s("div",Ia,c(l.remainingChars),1)])}],["__scopeId","data-v-3f0eca6f"]]);const Ta=Ft({name:"PaymentTag",props:{methodType:{type:String,default:""},isFullName:{type:Boolean,default:!1},methodInfo:{type:Object,default:()=>({})}},computed:{...D("c2c",["paymentMethodsInfoMap"]),methodInfoData(){return this.methodType?this.paymentMethodsInfoMap[this.methodType]||{}:this.methodInfo},style(){var e;return{color:null==(e=this.methodInfoData)?void 0:e.colorCode}},paymentText(){var e,t;const i=Object.keys(this.paymentMethodsInfoMap).includes(this.methodType);return this.methodType&&!i?this.$t("t.invalid"):this.isFullName?(null==(e=this.methodInfoData)?void 0:e.name)||"":(null==(t=this.methodInfoData)?void 0:t.shortName)||""}}},[["render",function(e,t,i,s,o,r){return a(),n("div",{class:"payment-tag",style:E(r.style)},c(r.paymentText),5)}],["__scopeId","data-v-023f7d15"]]),_a={class:"payment-received-item"},Da={class:"payment-received-item__name"},Pa={class:"payment-received-item__info"},La={class:"info__account-number"};const Ea=Ft({name:"PaymentReceivedItem",components:{PaymentTag:Ta,SwitchButton:fe},inject:["createAdsContext"],props:{payment:{type:Object,default:()=>({})},index:{type:Number,required:!0}},emits:["selected"],computed:{isUsePayment(){return this.createAdsContext.paymentReceivedList[this.index].isUse},alias(){return this.payment.data.properties.alias},type(){return this.payment.data.type},accountNumber(){const{accountNumber:e=""}=this.payment.data.properties||{};return`****${e.substring(e.length-4)}`}},methods:{onClick(){const e=this.createAdsContext.paymentReceivedList[this.index].isUse;this.createAdsContext.paymentReceivedList[this.index].isUse=!e,this.$emit("selected",this.payment)}}},[["render",function(e,t,o,r,d,u){const m=i("PaymentTag"),p=i("SwitchButton");return a(),n("div",_a,[s("p",Da,c(u.alias),1),s("div",Pa,[l(m,{methodType:u.type},null,8,["methodType"]),s("p",La,c(u.accountNumber),1),l(p,{class:"info__switcher",modelValue:u.isUsePayment,onClick:t[0]||(t[0]=T((e=>u.onClick()),["prevent"]))},null,8,["modelValue"])])])}],["__scopeId","data-v-0cf76755"]]),xa={class:"modal-item"},Na={class:"item__title"};const Ra=Ft({name:"ModalItem",props:{title:{type:String,default:""}}},[["render",function(e,t,i,o,r,l){return a(),n("div",xa,[s("p",Na,c(i.title),1),w(e.$slots,"default",{},void 0,!0)])}],["__scopeId","data-v-b13be1d0"]]),Ba={name:"PaymentDropdown",components:{Dropdown:ke,DropdownItem:ve,PaymentTag:Ta,IconNotificationCheck:ne,SearchInput:be},props:{handleSelect:{type:Function,required:!0},selectedMethod:{type:Object,required:!0},isDisabled:{type:Boolean,default:!1},isFullName:{type:Boolean,default:!1},hasAllPaymentOption:{type:Boolean,default:!1},appliedPaymentList:{type:Array,default:()=>[]}},data:()=>({searchText:""}),computed:{...D("c2c",["supportPaymentMethods"]),paymentMethodList(){var e;if(!(null==(e=this.supportPaymentMethods)?void 0:e.length))return[];const t={type:"ALL",name:this.$t("c2c.allPayments"),shortName:this.$t("c2c.allPayments"),colorCode:"#4C5763"},i=(this.hasAllPaymentOption?[t,...this.supportPaymentMethods]:[...this.supportPaymentMethods]).filter((e=>{const t=e.shortName.toLocaleUpperCase().includes(this.searchText.toLocaleUpperCase()),i="ALL"===e.type||!this.appliedPaymentList.length||this.appliedPaymentList.includes(e.type);return t&&i}));return this.selectedMethod&&Object.keys(this.selectedMethod).length||this.handleSelect(i[0]),i},hasPaymentMethodOption(){return this.paymentMethodList.length}}},Oa={class:"placeholder"},Fa={key:0,class:"method"},Ua={key:1},$a={class:"search-input-wrapper"},qa={key:0,class:"payment-dropdown-scroll-list"},Va={class:"flex-box items-center justify-between item-wrapper"},Ha={key:1,class:"no-results-wrapper"},ja={class:"no-results-title"},Ga={class:"no-results-text"};const za=Ft(Ba,[["render",function(e,t,o,r,d,p){const g=i("PaymentTag"),f=i("SearchInput"),b=i("IconNotificationCheck"),v=i("DropdownItem"),k=i("Dropdown");return a(),h(k,{class:"dropdown-wrapper",value:o.selectedMethod,disabled:o.isDisabled,isBrandNewStyle:"",onInput:o.handleSelect},{placeholder:C((()=>[s("span",Oa,c(e.$t("t.paymentMethod")),1)])),value:C((()=>[Object.keys(o.selectedMethod).length?(a(),n("span",Fa,[l(g,{class:"selected-payment-tag",methodInfo:o.selectedMethod,isFullName:o.isFullName}
2,null,8,["methodInfo","isFullName"])])):(a(),n("span",Ua))])),default:C((()=>[s("div",$a,[l(f,{value:d.searchText,"onUpdate:value":t[0]||(t[0]=e=>d.searchText=e),class:"search-input",width:"100%",height:"32px"},null,8,["value"])]),p.hasPaymentMethodOption?(a(),n("div",qa,[(a(!0),n(u,null,m(p.paymentMethodList,(e=>(a(),h(v,{key:e.type,value:e},{default:C((()=>[s("div",Va,[l(g,{class:"payment-item",methodInfo:e,isFullName:o.isFullName},null,8,["methodInfo","isFullName"]),o.selectedMethod===e?(a(),h(b,{key:0,class:"icon-checked"})):y("",!0)])])),_:2},1032,["value"])))),128))])):(a(),n("div",Ha,[s("p",ja,c(e.$t("t.noResultsFound")),1),s("p",Ga,c(e.$t("t.pleaseChangeKeywords")),1)]))])),_:1},8,["value","disabled","onInput"])}],["__scopeId","data-v-4cdcddd9"]]),Ka={name:"CustomizationDropdown",components:{Dropdown:ke,DropdownItem:ve,SearchInput:be,IconNotificationCheck:ne},props:{options:{type:Array,required:!0},handleSelect:{type:Function,required:!0},selected:{type:Object,required:!0},placeholder:{type:String,default:""},isDisabled:{type:Boolean,default:!1}},data:()=>({searchText:""}),computed:{hasFilterList(){return this.filterList.length>0},filterList(){return this.options.filter((e=>e.display.toLocaleUpperCase().includes(this.searchText.toLocaleUpperCase())))}}},Ya={class:"placeholder"},Wa={key:0,class:"value"},Za={class:"search-input-wrapper"},Xa={key:0,class:"customization-dropdown-scroll-list"},Qa={class:"flex-box items-center justify-between item-wrapper"},Ja={class:"option"},es={key:1,class:"no-results-wrapper"},ts={class:"no-results-title"},is={class:"no-results-text"};const ns={ADD:"Add",EDIT:"Edit",NOTICE_LIMIT_PAYMENT_METHODS:"NoticeLimitPaymentMethods",NOTICE_CANNOT_EDIT:"NoticeCannotEdit",NOTICE_CANNOT_REMOVE:"NoticeCannotRemove",NOTICE_CONFIRM_REMOVE:"NoticeConfirmRemove"},as={name:"DynamicAddOrEditPaymentMethodModal",components:{BrandDialog:J,ModalItem:Ra,PaymentDropdown:za,MobileInput:Ae,FormFieldInput:le,FileUpload:Se,CustomizationDropdown:Ft(Ka,[["render",function(e,t,o,r,d,p){const g=i("SearchInput"),f=i("IconNotificationCheck"),b=i("DropdownItem"),v=i("Dropdown");return a(),h(v,{class:"customization-dropdown-wrapper",value:o.selected,disabled:o.isDisabled,isBrandNewStyle:"",onInput:o.handleSelect},{placeholder:C((()=>[s("span",Ya,c(o.placeholder),1)])),value:C((()=>[o.selected?(a(),n("span",Wa,c(o.selected.display),1)):y("",!0)])),default:C((()=>[s("div",Za,[l(g,{value:d.searchText,"onUpdate:value":t[0]||(t[0]=e=>d.searchText=e),class:"search-input",width:"100%",height:"32px"},null,8,["value"])]),p.hasFilterList?(a(),n("div",Xa,[(a(!0),n(u,null,m(p.filterList,(e=>(a(),h(b,{key:e.value,value:e},{default:C((()=>[s("div",Qa,[s("p",Ja,c(e.display),1),o.selected.value===e.value?(a(),h(f,{key:0,class:"icon-checked"})):y("",!0)])])),_:2},1032,["value"])))),128))])):(a(),n("div",es,[s("p",ts,c(e.$t("t.noResultsFound")),1),s("p",is,c(e.$t("t.pleaseChangeKeywords")),1)]))])),_:1},8,["value","disabled","onInput"])}],["__scopeId","data-v-2b14fee6"]])},props:{type:{type:String,default:ns.ADD,validator:e=>[ns.ADD,ns.EDIT].includes(e)},payment:{type:Object,default:()=>({})}}
2,emits:["successUpdate","update:isShow"],data:()=>({FILED_TYPE:$i,isLoading:!1,selectedMethod:{},textareaStyles:[],form:{},textareaRef:{}}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo","c2cInitInfo"]),...D("c2c",["supportPaymentMethods","paymentMethodsInfoMap"]),isAdd(){return this.type===ns.ADD},isEdit(){return this.type===ns.EDIT},reportLink(){return te(this.lang,"C2C")},paymentMethodInfo(){return this.paymentMethodsInfoMap[this.selectedMethod.type]||{}},paymentMethodFields(){var e;return 0===((null==(e=this.paymentMethodInfo)?void 0:e.paymentMethodFields)||[]).length?[]:Ie(this.paymentMethodInfo.paymentMethodFields).sort(((e,t)=>e.displayPriority-t.displayPriority))},title(){return this.isAdd?"c2c.paymentMethod.addPaymentMethod":"c2c.paymentMethod.editPaymentMethod"},accountName(){var e;return(null==(e=this.c2cAccountInfo)?void 0:e.kycFullName)||""},isBankFormFull(){return this.bankName.length},isDisabled(){return this.paymentMethodFields.some((({field:e,type:t,mandatory:i})=>{if(!i)return!1;switch(t){case $i.PHONE_NUMBER:return!this.form[e].isMobileValid;case $i.IMAGE:return 0===this.form[e].image.length;case $i.SELECT:return!this.form[e].value;default:return!1}}))}},created(){this.init()},methods:{init(){this.initSelectMethod(),this.initForm()},initSelectMethod(){var e,t;(null==(e=this.payment)?void 0:e.type)?this.selectedMethod=this.paymentMethodsInfoMap[null==(t=this.payment)?void 0:t.type]:this.selectedMethod=this.supportPaymentMethods[0]||{}},async initForm(){this.form={};for(const e of this.paymentMethodFields){const{field:t,type:i}=e;if(i===$i.PHONE_NUMBER){const{countryCode:e="",phone:i="",countryName:n}=this.getPhoneCountryCodeAndNumber(this.payment);this.form[t]={countryName:n,phone:i,countryCode:e,isMobileValid:!1}}else this.form[t]=i===$i.IMAGE?{image:this.payment[t]?[this.payment[t]]:[],type:i}:i===$i.SELECT?e.options.find((({value:e})=>e===this.payment[t]))||{display:"",value:""}:this.payment[t]||""}},getPhoneCountryCodeAndNumber(e){if(!(null==e?void 0:e.accountNumber))return{};const t=new x(this.payment.accountNumber);return{countryCode:t.countryCallingCode,phone:t.nationalNumber,countryName:t.country}},handleSelectPaymentMethod(e){this.selectedMethod=e,this.initForm()},handleTextarea(e){const t=this.textareaRef[e];t&&(this.textareaStyles[e]={height:`${t.scrollHeight}px`})},handlerUploadImage(e,t){this.form[e.field].image=t},handleSelectOption(e,t){this.form[e]=t},async uploadFile(e,t,i){if(!t)return!0;try{const n=await re.upload(e);return await re.uploadFileToS3(n,t),i&&await re.updatePaymentMethodImage(this.payment.id,e.field,n),n}catch{return!1}},async removeFile(e){try{await re.updatePaymentMethodImage(this.payment.id,e,null)}catch{return!1}},async getProperties(){let e={};for(const[t,i]of Object.entries(this.form))if(i)if(null==i?void 0:i.image)if(i.image.length){if(i.image[0].file){const n=await this.uploadFile({type:Me.PAYMENT_METHOD_IMAGE,paymentMethodTemplateType:i.type,field:t},i.image[0].file,this.isEdit);if(!n)return!1;this.isAdd&&(e[t]=n)}}else this.payment[t]&&await this.removeFile(t);else(null==i?void 0:i.phone)?e[t]=`+${i.countryCode}${i.phone}`:void 0!==(null==i?void 0:i.value)?i.value&&(e[t]=i.value):e[t]=i;return e},onCountrySelected(e,t){this.form[e].countryCode=t.countryCode},async onAdd(){this.isLoading=!0;const e=await this.getProperties();if(e){try{const t=await re.createPaymentMethod({data:{type:this.selectedMethod.type,properties:e}});this.$emit("successUpdate",t.paymentMethod),this.closed()}catch{}this.isLoading=!1}else this.isLoading=!1},async onEdit(){this.isLoading=!0;const e=await this.getProperties();e?re.editPaymentMethod(this.payment.id,{data:{type:this.selectedMethod.type,properties:e}}).then((()=>{this.$emit("successUpdate"),this.closed()})).finally((()=>{this.isLoading=!1})):this.isLoading=!1},closed(){this.$emit("update:isShow",!1)}}},ss={class:"select-payment-field"},os={key:0,class:"note"},rs=["href"],ls={class:"modal-body"},cs=["placeholder","onInput"],ds={class:"error-message"};const us=Ft(as,[["render",function(e,t,o,d,p,g){const f=i("PaymentDropdown"),b=i("ModalItem"),v=i("BrandInput"),k=i("FormFieldInput"),S=i("ValidationField"),A=i("FileUpload"),M=i("MobileInput"),I=i("CustomizationDropdown"),w=i("BaseButton"),T=i("ValidationForm"),_=i("BrandDialog");return a(),h(_,{class:"dynamic-add-and-edit-payment-method-modal",width:"560px",fullStyle:e.isMobile,idPrefix:"p2p_payment_method_dialog",isBrandNewStyle:"",onClosed:g.closed},{header:C((()=>[r(c(e.$t(g.title)),1)])),body:C((()=>[l(T,{as:""},{default:C((({meta:t})=>[s("div",ss,[l(b,{title:e.$t("t.paymentMethod")},{default:C((()=>[l(f,{handleSelect:g.handleSelectPaymentMethod,selectedMethod:p.selectedMethod,isDisabled:g.isEdit,isFullName:""},null,8,["handleSelect","selectedMethod","isDisabled"]),g.reportLink?(a(),n("p",os,[s("span",null,c(e.$t("c2c.needMoreMethods")),1),s("a",{class:"link",target:"_blank",rel:"noopener nofollow",href:g.reportLink},c(e.$t("t.report")),9,rs)])):y("",!0)])),_:1},8,["title"]),l(b,{title:e.$t("t.accountName")},{default:C((()=>[l(v,{value:g.accountName,readonly:"",isBrandNewStyle:""},null,8,["value"])])),_:1},8,["title"]),s("div",ls,[(a(!0),n(u,null,m(g.paymentMethodFields,(e=>(a(),n("div",{key:e.field},[e.type===p.FILED_TYPE.INPUT?(a(),h(b,{key:0,title:e.fieldName},{default:C((()=>[l(k,{value:p.form[e.field],"onUpdate:value":t=>p.form[e.field]=t,name:e.field,placeholder:e.placeholder,rules:{required:e.mandatory,validation:{regex:e.validation,errorMsg:e.errorMessage}}},null,8,["value","onUpdate:value","name","placeholder","rules"])])),_:2},1032,["title"])):e.type===p.FILED_TYPE.TEXTAREA?(a(),h(S,{key:1,modelValue:p.form[e.field],"onUpdate:modelValue":t=>p.form[e.field]=t,rules:{required:e.mandatory,validation:{regex:e.validation,errorMsg:e.errorMessage}},name:e.field},{default:C((({errors:t,field:i})=>[l(b,{title:e.fieldName},{default:C((()=>[s("textarea",N({ref_for:!0},i,{ref_for:!0,ref:p.textareaRef[e.field],class:["textarea",{"is-error":t[0]}],style:p.textareaStyles,placeholder:e.placeholder,onInput:t=>g.handleTextarea(e.field)}),null,16,cs),s("p",ds,c(t[0]),1)])),_:2},1032,["title"])])),_:2},1032,["modelValue","onUpdate:modelValue","rules","name"])):e.type===p.FILED_TYPE.IMAGE?(a(),h(b,{key:2,title:e.fieldName},{default:C((()=>[l(A,{class:"file-upload",uploadedImages:p.form[e.field].image||[],displayPhoto:"",useCamera:"",onCh
2ange:t=>{g.handlerUploadImage(e,t)}},null,8,["uploadedImages","onChange"])])),_:2},1032,["title"])):e.type===p.FILED_TYPE.PHONE_NUMBER?(a(),h(b,{key:3,title:e.fieldName},{default:C((()=>[l(M,{countryName:p.form[e.field].countryName,"onUpdate:countryName":t=>p.form[e.field].countryName=t,phone:p.form[e.field].phone,"onUpdate:phone":t=>p.form[e.field].phone=t,isValid:p.form[e.field].isMobileValid,"onUpdate:isValid":t=>p.form[e.field].isMobileValid=t,class:"mobile-input",onCountrySelected:t=>{g.onCountrySelected(e.field,t)}},null,8,["countryName","onUpdate:countryName","phone","onUpdate:phone","isValid","onUpdate:isValid","onCountrySelected"])])),_:2},1032,["title"])):e.type===p.FILED_TYPE.SELECT?(a(),h(b,{key:4,title:e.fieldName},{default:C((()=>[l(I,{selected:p.form[e.field],options:e.options,placeholder:e.placeholder,handleSelect:t=>{g.handleSelectOption(e.field,t)}},null,8,["selected","options","placeholder","handleSelect"])])),_:2},1032,["title"])):y("",!0)])))),128))]),g.isAdd?(a(),h(w,{key:0,class:"primary body-button",size:"large",disabled:g.isDisabled||!t.valid,loading:p.isLoading,onClick:g.onAdd},{default:C((()=>[r(c(e.$t("t.add")),1)])),_:2},1032,["disabled","loading","onClick"])):y("",!0),g.isEdit?(a(),h(w,{key:1,class:"primary body-button",size:"large",disabled:g.isDisabled||!t.valid,loading:p.isLoading,onClick:g.onEdit},{default:C((()=>[r(c(e.$t("t.update")),1)])),_:2},1032,["disabled","loading","onClick"])):y("",!0)])])),_:1})])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-5266ff21"]]),ms={class:"payment-received"},ps={class:"payment-received__title"},hs={class:"payment-received__content"},ys={key:0,class:"payment-received__list"};const Cs=Ft({name:"PaymentReceived",components:{PaymentReceivedItem:Ea,DynamicAddOrEditPaymentMethodModal:us,IconPlus:q},inject:["createAdsContext"],props:{list:{type:Array,default:()=>[]}},data:()=>({isShowAddPaymentModal:!1}),computed:{isListEmpty(){return 0===this.list.length}},methods:{successUpdate(e){this.createAdsContext.paymentReceivedList.push({...e,isUse:!1})},onItemSelected(e){const{data:{type:t},id:i}=e;this.closeSamePaymentType(i,t)},onAddPayment(){this.isShowAddPaymentModal=!0},closeSamePaymentType(e,t){const i=this.createAdsContext.paymentReceivedList.findIndex((i=>t===i.data.type&&i.isUse&&i.id!==e));-1!==i&&(this.createAdsContext.paymentReceivedList[i].isUse=!1)}}},[["render",function(e,t,o,r,d,C){const g=i("PaymentReceivedItem"),f=i("IconPlus"),b=i("DynamicAddOrEditPaymentMethodModal");return a(),n("div",ms,[s("p",ps,c(e.$t("c2c.createAds.paymentReceived.title")),1),s("div",hs,[C.isListEmpty?y("",!0):(a(),n("div",ys,[(a(!0),n(u,null,m(o.list,((e,t)=>(a(),h(g,{key:e.id,payment:e,index:t,onSelected:C.onItemSelected},null,8,["payment","index","onSelected"])))),128))])),s("div",{class:p(["list__add-payment",{"is-list-empty":C.isListEmpty}]),onClick:t[0]||(t[0]=(...e)=>C.onAddPayment&&C.onAddPayment(...e))},[l(f,{class:"add-payment__icon"}),s("p",null,c(e.$t("c2c.createAds.paymentReceived.addNewPayment")),1)],2)]),d.isShowAddPaymentModal?(a(),h(b,{key:0,isShow:d.isShowAddPaymentModal,"onUpdate:isShow":t[1]||(t[1]=e=>d.isShowAddPaymentModal=e),onSuccessUpdate:C.successUpdate},null,8,["isShow","onSuccessUpdate"])):y("",!0)])}],["__scopeId","data-v-7005707a"]]),gs={name:"PaymentOptions",components:{SearchInput:be},props:{usePaymentMethods:{type:Object,default:()=>({})}},emits:["handlePaymentMethods"],data:()=>({searchText:""}),computed:{...D("c2c",["supportPaymentMethods"]),paymentMethodList(){return this.searchText?this.supportPaymentMethods.filter((e=>e.name.toLocaleUpperCase().includes(this.searchText.toLocaleUpperCase()))):this.supportPaymentMethods}},methods:{handlePaymentMethods(e,t){const i={...this.usePaymentMethods};i[e]=t,this.$emit("handlePaymentMethods",i)}}},fs={class:"payment-options"},bs={key:0,class:"option-list"},vs={key:1,class:"no-search-result-wrapper"},ks={class:"no-search-result-title"},Ss={class:"no-search-result-text"};const As=Ft(gs,[["render",function(e,t,o,d,p,y){const g=i("SearchInput"),f=i("Checkbox");return a(),n("div",fs,[l(g,{value:p.searchText,"onUpdate:value":t[0]||(t[0]=e=>p.searchText=e),class:"search-input",width:"100%",height:"32px"},null,8,["value"]),y.paymentMethodList.length?(a(),n("div",bs,[(a(!0),n(u,null,m(y.paymentMethodList,(e=>(a(),h(f,{key:e.name,value:o.usePaymentMethods[e.type],isBrandNewStyle:"",onInput:t=>{y.handlePaymentMethods(e.type,t)}},{default:C((()=>[r(c(e.name),1)])),_:2},1032,["value","onInput"])))),128))])):(a(),n("div",vs,[s("p",ks,c(e.$t("t.noResultsFound")),1),s("p",Ss,c(e.$t("t.pleaseChangeKeywords")),1)]))])}],["__scopeId","data-v-d089dda5"]]);const Ms=Ft({name:"IconMinus",components:{Icon:se}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Minus Icon",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round"},{default:C((()=>t[0]||(t[0]=[s("line",{x1:"5",y1:"12",x2:"19",y2:"12"},null,-1)]))),_:1,__:[0]})}]]),Is={class:"counter-input"},ws=Ft(L({__name:"CounterInput",props:{buttonSize:{default:we.L},min:{default:null},max:{default:null},value:{default:0},step:{default:1}},emits:["input","update:value"],setup(e,{emit:t}){const s=e,o=t,r=S((()=>0===s.min||"0"===s.min?0:Number(s.min)||-1/0)),c=S((()=>p.value>r.value)),d=S((()=>0===s.max||"0"===s.max?0:Number(s.max)||1/0)),u=S((()=>p.value<d.value)),p=S((()=>Number(s.value))),y=S((()=>Number(s.step)||1));function g(e){(function(e){return r.value<=e&&d.value>=e})(e)&&(o("update:value",e),o("input",e))}function f(){g(p.value-y.value)}function b(){g(p.value+y.value)}return(e,t)=>{const s=i("IconButton"),o=i("BrandInput");return a(),n("div",Is,[l(s,{class:"icon-button",size:e.buttonSize,disabled:!c.value,onClick:f},{default:C((()=>[l(Ms)])),_:1}
2,8,["size","disabled"]),e.$slots.default?w(e.$slots,"default",{key:0},void 0,!0):(a(),h(o,N({key:1},e.$attrs,{class:"counter-input-field",isBrandNewStyle:"",isNumeric:"",value:e.value,onInput:g}),R({_:2},[m(e.$slots,((t,i)=>({name:i,fn:C((()=>[w(e.$slots,i,{},void 0,!0)]))})))]),1040,["value"])),l(s,{class:"icon-button",size:e.buttonSize,disabled:!u.value,onClick:b},{default:C((()=>[l(Te)])),_:1},8,["size","disabled"])])}}}),[["__scopeId","data-v-f8d74e47"]]);function Ts(e){return e.side===Pe.BUY?"buyer":"seller"}function _s(e){var t,i;const n=Ts(e);return(null==(i=null==(t=null==e?void 0:e.transferAmount)?void 0:t[n])?void 0:i.paid)||{}}function Ds(e){var t,i;const n=Ts(e);return(null==(i=null==(t=null==e?void 0:e.transferAmount)?void 0:t[n])?void 0:i.received)||{}}function Ps(e){const t=e.side===Pe.BUY?_s(e):Ds(e);return(null==t?void 0:t.transferAmount)||0}function Ls(e,t,i=8){return _e(e,e>1e9?"default":{minDigits:t,maxDigits:i})}function Es(e,{formPrice:t=0,toRate:i=0,decimal:n}){const{type:a,settings:s={}}=e;if(!a||!Object.keys(s).length)return 0;switch(a){case De.LIMIT:return Number(s.price);case De.MARKET:{if(!t||!i)return 0;const e=B(s.priceMargin).div(100).plus(1);return B(t).div(i).times(e).toFixed(n,B.ROUND_HALF_UP)}}}const xs="BUY",Ns="SELL",Rs=[{key:De.LIMIT,optionText:"c2c.fixed",text:"c2c.fixedPrice"},{key:De.MARKET,optionText:"c2c.floating",text:""}],Bs="PLUS",Os="MINUS",Fs={name:"CreateAdsSetting",components:{Section:ya,SwitcherV2:ga,CurrencyDropDown:Ne,AmountInput:ka,PaymentReceived:Cs,BottomFixedPanel:Ei,Note:wa,IconInfo2:xe,PaymentOptions:As,RadioGroup:Ee,Radio:Le,CounterInput:ws},inject:["createAdsContext"],props:{isEdit:{type:Boolean,default:!1},adType:{type:String,required:!0},fromCurrency:{type:String,default:""},settleInCurrency:{type:String,default:""},isSettleInError:{type:Boolean,default:!1},orderType:{type:Object,default:()=>({})},unitPrice:{type:[Number,String],default:0},unitPriceErrorMsg:{type:String,default:""},volume:{type:[Number,String],default:0},volumeErrorMsg:{type:String,default:""},minPerTradeAmount:{type:[Number,String],default:0},minPerTradeErrorMsg:{type:String,default:""},maxPerTradeAmount:{type:[Number,String],default:0},maxPerTradeErrorMsg:{type:String,default:""},usePaymentMethods:{type:Object,default:()=>({})},paymentReceivedList:{type:Array,default:()=>[]},note:{type:String,default:""},fee:{type:Number,default:0},isButtonDisabled:{type:Boolean,default:!0},floatingPriceMargin:{type:Number,default:0}},emits:["update:unitPrice","update:isSettleInError","update:minPerTradeErrorMsg","update:maxPerTradeErrorMsg","update:settleInCurrency","update:fromCurrency","update:adType","update:orderType","update:unitPriceErrorMsg","update:volumeErrorMsg","update:minPerTradeAmount","update:maxPerTradeAmount","update:usePaymentMethods","update:note","update:isPreviewPage","update:floatingPriceMargin","update:volume"],data:()=>({RADIO_TYPE:Re,ICON_BUTTON_SIZE:we,fiatsRate:[],fetchRateInterval:null,priceType:"",floatingPriceMarginType:"",floatingPriceMarginValue:0}),computed:{...t(["currencyMap"]),...t("c2c",["c2cInitInfo"]),...D("c2c",["c2cFiatInfoMap","getCurrencyDecimal","getCurrencyBaseRate"]),isBuy(){return this.adType===xs},fromCurrencyMap(){return this.getReviseCurrencyList(Ie(this.c2cInitInfo.supportedCryptos))},settleInCurrencyMap(){return this.getReviseCurrencyList(Ie(this.c2cInitInfo.supportedFiats))},settleInCurrencyInfo(){return this.settleInCurrencyMap[this.settleInCurrency]||{}},fromCurrencyList(){return Object.keys(this.fromCurrencyMap)},settleInCurrencyList(){return Object.keys(this.settleInCurrencyMap)},minLimitPriceMargin(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.minLimitPriceMargin)||0},maxLimitPriceMargin(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.maxLimitPriceMargin)||0},minMarketPriceMargin(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.minMarketPriceMargin)||0},maxMarketPriceMargin(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.maxMarketPriceMargin)||0},minLimitUnitPrice(){return this.getUnitPriceByMargin(Math.abs(this.minLimitPriceMargin),O
2s)},maxLimitUnitPrice(){return this.getUnitPriceByMargin(this.maxLimitPriceMargin,Bs)},minAmount(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.minAmountPerTrade)||0},maxAmount(){var e;return(null==(e=this.settleInCurrencyInfo)?void 0:e.maxAmountPerTrade)||0},floatingMarginMaxByType(){return this.floatingPriceMarginType===Bs?this.maxMarketPriceMargin:Math.abs(this.minMarketPriceMargin)},btnList(){return[{key:"BUY",text:this.$t("t.buy"),color:"var(--app--color--accent-green)"},{key:"SELL",text:this.$t("t.sell"),color:"var(--content-red-400)"}]},isLimitType(){return this.priceType===De.LIMIT},isFloatingType(){return this.priceType===De.MARKET},orderTypeList:()=>Rs,getAmount(){return this.volume&&this.unitPrice?B(this.volume).times(this.unitPrice||0):"-"},orderTypeText(){return this.orderType.text||""},userAmount(){return this.getFormatPrice(this.available,this.fromCurrency)},available(){var e;return Number(null==(e=this.currencyData)?void 0:e.available)||0},currencyData(){return this.currencyMap[this.fromCurrency]||{}},adTypeText(){return this.$t(this.isBuy?"t.buyAndCurrency":"t.sellAndCurrency",{currency:this.fromCurrency})},fromRate(){return this.getCurrencyBaseRate(this.fromCurrency)},settleInRate(){var e;return(null==(e=this.fiatsRate.find((e=>e.shortName===this.settleInCurrency)))?void 0:e.usdRate)||0},currentMarketPrice(){return this.fromRate&&this.settleInRate?this.formatNumber(B(this.fromRate).div(this.settleInRate).toNumber()):"-"},floatingUnitPrice(){return this.isFloatingType&&this.fromRate&&this.settleInRate?this.getUnitPriceByMargin(this.floatingPriceMarginValue,this.floatingPriceMarginType):0},floatingPriceFormula(){const e=this.floatingPriceMarginType===Bs?"+":"-";return this.$t("c2c.createAds.floatingPrice.formula",{percent:`(1${e}${this.floatingPriceMarginValue}%)`})},marginTypes(){return[{key:Bs,optionText:this.$t("t.plus")},{key:Os,optionText:this.$t("t.minus")}]}},watch:{isBuy:{immediate:!0,handler(){this.validateCurrency(this.fromCurrency,this.settleInCurrency)}},floatingUnitPrice(e){this.$emit("update:unitPrice",e)},settleInCurrencyList:{immediate:!0,handler(e){e.length>0&&!e.includes(this.settleInCurrency)&&this.onChangeSettleInCurrency({displayName:e[0]})}}},created(){this.orderType.key?this.onPriceTypeSelected(this.orderType.key,!0):this.onPriceTypeSelected(De.LIMIT,!0),this.floatingPriceMarginValue=Math.abs(this.floatingPriceMargin),this.floatingPriceMargin>=0?this.floatingPriceMarginType=Bs:this.floatingPriceMarginType=Os,this.updateUsdRate(),this.fetchRateInterval=setInterval(this.updateUsdRate,6e5)},beforeUnmount(){clearInterval(this.fetchRateInterval)},methods:{async validateCurrency(e,t){this.isEdit||(this.$emit("update:isSettleInError",!1),re.validateIsAdvertCreatable({side:this.isBuy?"BUY":"SELL",baseCurrency:e,quoteCurrency:t}).catch((e=>{ue.C2C_OTC_ADVERT_DUPLICATE===e&&this.$emit("update:isSettleInError",!0)})))},getReviseCurrencyList(e){const t={};return e.forEach((e=>{t[e.name]=e,delete t[e.name].name})),t},getUnitPriceByMargin(e,t){let i=B(e).div(100);i=t===Bs?i.plus(1):B(1).minus(i);const n=this.getCurrencyDecimal(this.settleInCurrency);return B(this.fromRate).div(this.settleInRate).times(i).toFixed(n,B.ROUND_HALF_UP)},emitMinPerTradeErrorMsg(e,t,i=""){let n=i;e?B(e).lt(this.minAmount||0)?n=this.$t("c2c.createAds.error.minimumLimit",{amount:this.minAmount}):B(e).gt(t||0)&&(n=this.$t("c2c.createAds.error.minExceedTheMax")):n=this.$t("c2c.createAds.error.requireMinimumPrice"),this.$emit("update:minPerTradeErrorMsg",n)},emitMaxPerTradeErrorMsg(e,t,i=""){let n=i;t?B(t).gt(this.maxAmount||0)?n=this.$t("c2c.createAds.error.maximumLimit",{amount:this.maxAmount}):B(e).gt(t||0)&&(n=this.$t("c2c.createAds.error.minExceedTheMax")):n=this.$t("c2c.createAds.error.requireMaximumPrice"),this.$emit("update:maxPerTradeErrorMsg",n)},formatNumber(e,t="max6"){return this.$filters.formatNumber(e,t)},onShowMultipleAdsModal(){this.createAdsContext.isShowCreatingMultipleModal=!0},onChangeFromCurrency(e){this.validateCurrency(e.displayName,this.settleInCurrency),this.$emit("update:fromCurrency",e.displayName)},onChangeSettleInCurrency(e){this.validateCurrency(this.fromCurrency,e.displayName),this.$emit("update:settleInCurrency",e.displayName)},handleSwitcher(e){this.$emit("update:adType",e)},onPriceTypeSelected(e,t){this.priceType=e;const i=Rs.find((t=>t.key===e));this.$emit("update:orderType",i),t||this.handleUnitPriceInput(this.unitPrice)},handleUnitPriceInput(e,t){if(!this.isLimitType)return this.$emit("update:unitPriceErrorMsg","");let i="";e?t?i=t:(this.minLimitUnitPrice>Number(e)||this.maxLimitUnitPrice<Number(e))&&(i=this.$t("c2c.createAds.unitPricePercentError",{min:`${this.minLimitPriceMargin}%`,max:`+${this.maxLimitPriceMargin}%`})):i=this.$t("c2c.createAds.error.requirePrice"),this.$emit("update:unitPriceErrorMsg",i),this.$emit("update:unitPrice",e)},handleVolumeInput(e,t){this.$emit("update:volumeErrorMsg",e?t:this.$t("c2c.createAds.error.requireVolume")),this.$emit("update:volume",e)},handleMinAmountInput(e,t){this.emitMinPerTradeErrorMsg(e,this.maxPerTradeAmount,t),this.emitMaxPerTradeErrorMsg(e,this.maxPerTradeAmount),this.$emit("update:minPerTradeAmount",e)}
2,handleMaxAmountInput(e,t){this.emitMinPerTradeErrorMsg(this.minPerTradeAmount,e),this.emitMaxPerTradeErrorMsg(this.minPerTradeAmount,e,t),this.$emit("update:maxPerTradeAmount",e)},handlePaymentMethods(e){this.$emit("update:usePaymentMethods",e)},handleNote(e){this.$emit("update:note",e)},onPreview(){this.$emit("update:isPreviewPage",!0),window.scrollTo(0,0)},onChangeFloatingPriceMargin(){this.floatingPriceMarginType===Bs?this.$emit("update:floatingPriceMargin",this.floatingPriceMarginValue):this.$emit("update:floatingPriceMargin",-this.floatingPriceMarginValue)},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},async updateUsdRate(){const{fiats:e}=await re.getFiatInfoList();this.fiatsRate=e}}},Us={class:"create-ads-setting"},$s={class:"section__content"},qs={class:"content__quote-wrapper"},Vs={class:"quote__title"},Hs={class:"quote__text-wrapper"},js={class:"text__number"},Gs={class:"section__content"},zs={class:"section__content"},Ks={class:"content__title"},Ys={key:0,class:"section__content"},Ws={class:"content__title"},Zs={class:"section__content"},Xs={class:"content__title"},Qs={class:"floating-counter-input-text"},Js={class:"section__content"},eo={class:"content__title"},to={class:"floating-unit-price-wrapper"},io={class:"floating-unit-price"},no={class:"floating-unit-price-currency"},ao={class:"floating-price-formula"},so={class:"section__frame-wrapper"},oo={class:"frame__note bold"},ro={class:"section__content"},lo={key:0,class:"content__available-wrapper"},co={class:"available__amount"},uo={class:"content__get-amount-wrapper"},mo={class:"get-amount__amount"},po={class:"section__content"},ho={class:"content__title"},yo={class:"section__content"},Co={class:"content__title"},go={class:"section__frame-wrapper"},fo={key:0,class:"section__content"},bo={class:"content__title"},vo={class:"section__frame-wrapper"},ko={class:"mt-24"},So={class:"decimal"},Ao={class:"bold"},Mo={class:"decimal"},Io={class:"bold"},wo={class:"bottom-fixed-panel__content"},To={class:"content__text-wrapper"};const _o=Ft(Fs,[["render",function(e,t,o,d,g,f){const b=i("SwitcherV2"),v=i("CurrencyDropDown"),k=i("IconInfo2"),S=i("Tooltip"),A=i("i18n-t"),M=i("Section"),I=i("Radio"),w=i("RadioGroup"),T=i("AmountInput"),_=i("CounterInput"),D=i("PaymentOptions"),P=i("PaymentReceived"),L=i("Note"),E=i("BaseButton"),x=i("BottomFixedPanel");return a(),n("div",Us,[l(M,{class:"create-ads-setting__section",title:"c2c.createAds.title"},{default:C((()=>[l(b,{value:o.adType,btnList:f.btnList,isDisabled:o.isEdit,onSelect:f.handleSwitcher},null,8,["value","btnList","isDisabled","onSelect"]),s("div",$s,[s("p",{class:p(["content__title",{"is-disabled":o.isEdit}])},c(e.$t("t.crypto")),3),l(v,{class:"content__currency-dropdown",appliedCurrencyList:f.fromCurrencyList,selectedCurrency:o.fromCurrency,disabled:o.isEdit,isFilterShown:!1,isSearchShown:!1,isError:o.isSettleInError,idPrefix:"create_ads_setting",idSuffix:"from",isOutfitStyle:"",onOnChange:f.onChangeFromCurrency},null,8,["appliedCurrencyList","selectedCurrency","disabled","isError","onOnChange"]),s("div",qs,[s("div",Vs,[r(c(e.$t("t.fee"))+" ",1),l(S,{class:"blocked--tooltip",tooltipStyle:{width:"203px"},placement:"top-start"},{content:C((()=>[l(k,{class:"quote__icon"})])),tooltip:C((()=>[s("span",null,c(e.$t("c2c.createAds.feeTooltip")),1)])),_:1})]),s("p",Hs,[s("span",js,c(o.fee),1),t[3]||(t[3]=r(" % "))])])]),s("div",Gs,[s("p",{class:p(["content__title",{"is-disabled":o.isEdit}])},c(e.$t("c2c.settleIn")),3),l(v,{class:"content__currency-dropdown",appliedCurrencyList:f.settleInCurrencyList,selectedCurrency:o.settleInCurrency,disabled:o.isEdit,isFilterShown:!1,isSearchShown:!1,isOutfitStyle:"",isError:o.isSettleInError,idPrefix:"create_ads_setting",idSuffix:"to",isNeedSyncCurrencyInfo:!1,onOnChange:f.onChangeSettleInCurrency},null,8,["appliedCurrencyList","selectedCurrency","disabled","isError","onOnChange"]),o.isSettleInError?(a(),h(A,{key:0,class:"content__error-msg",keypath:"c2c.createAds.settleIn.error",tag:"p"},{learnMore:C((()=>[s("a",{class:"link",onClick:t[0]||(t[0]=(...e)=>f.onShowMultipleAdsModal&&f.onShowMultipleAdsModal(...e))},c(e.$t("t.learnMore")),1)])),_:1})):y("",!0)])])),_:1}
2),l(M,{class:"create-ads-setting__section",title:"c2c.priceSettings"},{default:C((()=>[s("div",zs,[s("p",Ks,c(e.$t("c2c.priceType")),1),l(w,{class:"price-options",value:g.priceType,onInput:f.onPriceTypeSelected},{default:C((()=>[(a(!0),n(u,null,m(f.orderTypeList,(t=>(a(),h(I,{key:t.key,label:t.key,type:g.RADIO_TYPE.HOLLOW},{default:C((()=>[r(c(e.$t(t.optionText)),1)])),_:2},1032,["label","type"])))),128))])),_:1},8,["value","onInput"])]),f.isLimitType?(a(),n("div",Ys,[s("p",Ws,c(e.$t(f.orderTypeText)),1),l(T,{value:o.unitPrice,currency:o.settleInCurrency,errorMsg:o.unitPriceErrorMsg,onInput:f.handleUnitPriceInput},null,8,["value","currency","errorMsg","onInput"])])):f.isFloatingType?(a(),n(u,{key:1},[s("div",Zs,[s("p",Xs,c(e.$t("c2c.createAds.floatingPrice.floatingPriceMargin")),1),l(w,{modelValue:g.floatingPriceMarginType,"onUpdate:modelValue":t[1]||(t[1]=e=>g.floatingPriceMarginType=e),class:"price-options",onInput:f.onChangeFloatingPriceMargin},{default:C((()=>[(a(!0),n(u,null,m(f.marginTypes,(t=>(a(),h(I,{key:t.key,label:t.key,type:g.RADIO_TYPE.HOLLOW},{default:C((()=>[r(c(e.$t(t.optionText)),1)])),_:2},1032,["label","type"])))),128))])),_:1},8,["modelValue","onInput"]),l(_,{value:g.floatingPriceMarginValue,"onUpdate:value":t[2]||(t[2]=e=>g.floatingPriceMarginValue=e),class:"floating-counter-input",max:f.floatingMarginMaxByType,min:0,buttonSize:g.ICON_BUTTON_SIZE.S,onInput:f.onChangeFloatingPriceMargin},{default:C((()=>[s("span",Qs,c(g.floatingPriceMarginValue)+"% ",1)])),_:1},8,["value","max","buttonSize","onInput"])]),s("div",Js,[s("p",eo,c(e.$t("c2c.createAds.floatingPrice.yourPrice")),1),s("p",to,[s("span",io,c(f.formatNumber(f.floatingUnitPrice)),1),s("span",no,c(o.settleInCurrency),1)]),s("p",ao,c(f.floatingPriceFormula),1)])],64)):y("",!0),s("div",so,[s("p",null,[r(c(e.$t("t.pair"))+" ",1),s("span",oo,c(o.fromCurrency)+"/"+c(o.settleInCurrency),1)]),s("ul",null,[s("li",null,c(e.$t("c2c.createAds.currentMarketPrice"))+": "+c(f.currentMarketPrice)+" "+c(o.fromCurrency)+"/"+c(o.settleInCurrency),1),f.isLimitType?(a(),n(u,{key:0},[s("li",null,c(e.$t("c2c.createAds.priceSettings.fixed.note.1",{min:`${f.minLimitPriceMargin}%`,max:`+${f.maxLimitPriceMargin}%`})),1),s("li",null,c(e.$t("c2c.createAds.priceSettings.fixed.note.2")),1)],64)):y("",!0),f.isFloatingType?(a(),n(u,{key:1},[s("li",null,c(e.$t("c2c.createAds.priceSettings.floating.note.1",{min:`${f.minMarketPriceMargin}%`,max:`+${f.maxMarketPriceMargin}%`})),1),s("li",null,c(e.$t("c2c.createAds.priceSettings.floating.note.2")),1)],64)):y("",!0)])])])),_:1}),l(M,{class:"create-ads-setting__section",title:"c2c.createAds.transactionSettings"},{default:C((()=>[s("div",ro,[s("div",{class:p(["content__title flex-box justify-between",{"is-disabled":o.isEdit}])},[r(c(e.$t("t.volume"))+" ",1),f.isBuy?y("",!0):(a(),n("p",lo,[r(c(e.$t("t.availableBalance"))+" ",1),s("span",co,c(f.userAmount),1),r(" "+c(o.fromCurrency),1)]))],2),l(T,{value:o.volume,maxAmount:f.available,currency:o.fromCurrency,errorMsg:o.volumeErrorMsg,disabled:o.isEdit,enableMax:!f.isBuy,isCrypto:"",onInput:f.handleVolumeInput},null,8,["value","maxAmount","currency","errorMsg","disabled","enableMax","onInput"]),s("p",uo,[t[4]||(t[4]=r(" ≈ ")),s("span",mo,c(f.getAmount),1),r(" "+c(o.settleInCurrency),1)])]),s("div",po,[s("p",ho,c(e.$t("c2c.createAds.minimumPerTrade")),1),l(T,{value:o.minPerTradeAmount,currency:o.settleInCurrency,errorMsg:o.minPerTradeErrorMsg,placeholder:e.$t("t.min_amount",{amount:f.minAmount}),onInput:f.handleMinAmountInput},null,8,["value","currency","errorMsg","placeholder","onInput"])]),s("div",yo,[s("p",Co,c(e.$t("c2c.createAds.maximumPerTrade")),1),l(T,{value:o.maxPerTradeAmount,currency:o.settleInCurrency,errorMsg:o.maxPerTradeErrorMsg,placeholder:e.$t("t.max_amount",{amount:f.maxAmount}),onInput:f.handleMaxAmountInput},null,8,["value","currency","errorMsg","placeholder","onInput"])])])),_:1}),l(M,{class:"create-ads-setting__section",title:"t.payment"},{default:C((()=>[s("div",go,[s("ul",null,[s("li",null,c(e.$t("c2c.createAds.payment.textList.1")),1),s("li",null,c(e.$t("c2c.createAds.payment.textList.2")),1)])]),f.isBuy?(a(),n("div",fo,[s("div",bo,c(e.$t("t.payment")),1),l(D,{usePaymentMethods:o.usePaymentMethods,onHandlePaymentMethods:f.handlePaymentMethods},null,8,["usePaymentMethods","onHandlePaymentMethods"])])):(a(),h(P,{key:1,list:o.paymentReceivedList},null,8,["list"])),l(M,{title:"c2c.createAds.notes.title"},{default:C((()=>[l(L,{value:o.note,placeholder:e.$t("c2c.createAds.note.placeholder"),maxlength:"1000",onInput:f.handleNote},null,8,["value","placeholder","onInput"])])),_:1}),s("div",vo,[s("p",null,c(e.$t(f.isBuy?"c2c.createAds.buy.tips.title":"c2c.createAds.tips.title")),1),s("p",null,c(e.$t(f.isBuy?"c2c.createAds.buy.tips.text":"c2c.createAds.tips.text")),1),s("ul",ko,[s("li",So,[s("span",Ao,c(e.$t("c2c.createAds.tips.1.title")),1),r(" "+c(e.$t(f.isBuy?"c2c.createAds.buy.tips.1.text":"c2c.createAds.tips.1.text")),1)]),s("li",Mo,[s("span",Io,c(e.$t("c2c.createAds.tips.2.title")),1),r(" "+c(e.$t(f.isBuy?"c2c.createAds.buy.tips.2.text":"c2c.createAds.tips.2.text")),1)])])])])),_:1}),e.isMobile?(a(),h(x,{key:0},{default:C((()=>[s("div",wo,[s("p",To,[s("span",{class:p(["text__type",{buy:f.isBuy}])},c(f.adTypeText),3),r(" "+c(e.$t("t.ad")),1)]),l(E,{class:"primary",size:"large",disabled:o.isButtonDisabled,onClick:f.onPreview},{default:C((()=>[r(c(e.$t("t.preview")),1)])),_:1},8,["disabled","onClick"])])])),_:1})):y("",!0)])}],["__scopeId","data-v-58ef58ea"]]),Do={class:"title"},Po={class:"text"};const Lo=Ft({name:"ReadOnlyNote",props:{title:{type:String,default:""},text:{type:String,default:""},maxHeight:{type:String,default:""}}},[["render",function(e,t,i,o,r,l){return a(),n("div",{class:"note",style:E({maxHeight:i.maxHeight+"px",minHeight:i.maxHeight?"unset":""})},[s("div",Do,c(e.$t(i.title)),1),s("div",Po,c(i.text),1)],4)}],["__scopeId","data-v-85e62ef9"]]),Eo={name:"PreviewAd",components:{PaymentTag:Ta,ReadOnlyNote:Lo,BottomFixedPanel:Ei,ConsentTermsText:xi},inject:["context","createAdsContext"],props:{isEdit:{type:Boolean,default:!1},id:{type:String,default:""},adType:{type:String,required:!0},fromCurrency:{type:String,default:""},settleInCurrency:{type:String,default:""},orderType:{type:Object,default:()=>({})},unitPrice:{type:[Number,String],default:0},volume:{type:[Number,String],default:0},volumeErrorMsg:{type:String,default:""},minPerTradeAmount:{type:[Number,String],default:0},minPerTradeErrorMsg:{type:String,default:""},maxPerTradeAmount:{type:[Number,String],default:0},maxPerTradeErrorMsg:{type:String,default:""},usePaymentMethods:{type:Object,default:()=>({})},paymentReceivedList:{type:Array,default:()=>[]},note:{type:String,default:""},fee:{type:Number,default:0},isButtonDisabled:{type:Boolean,default:!0},floatingPriceMargin:{type:Number,default:0}},data:()=>({isAgreeTerms:!1}),computed:{...t(["lang"]),...t("c2c",["c2cInitInfo"]),...D("c2c",["getCurrencyDecimal"]),isBuy(){return this.adType===xs},isAmountError(){return this.volumeErrorMsg.length>0},isLimitsError(){return this.minPerTradeErrorMsg.length>0||this.maxPerTradeErrorMsg.length>0},isCreateAdDisabled(){return this.isButtonDisabled||!this.isAgreeTerms},limits(){return`${this.getFormatPrice(this.minPerTradeAmount,this.settleInCurrency)}~${this.getFormatPrice(this.maxPerTradeAmount,this.settleInCurrency)}`},paymentMethods(){return Object.keys(this.usePaymentMethods).filter((e=>this.usePaymentMethods[e]))},title(){return this.$t(this.isBuy?"t.buyAndCurrency":"t.sellAndCurrency",{currency:this.fromCurrency})},fees(){return this.volume?B(this.fee).div(100).times(this.volume).toNumber():0},filterPaymentReceivedList(){return this.paymentReceivedList.filter((({isUse:e})=>e))},buttonText(){return this.isEdit?"c2c.updateAd":"c2c.createAds.createAd"}},methods:{getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},getPaymentAlias:e=>e.data.properties.alias,getPaymentType:e=>e.data.type,getPaymentAccountNumber(e){const{accountNumber:t=""}=e.data.properties||{};return`****${t.substring(t.length-4)}`},onCreateAd(){const e={};this.orderType.key===De.LIMIT?e.price=String(this.unitPrice):this.orderType.key===De.MARKET&&(e.priceMargin=String(this.floatingPriceMargin));let t={side:this.adType,baseCurrency:this.fromCurrency,quoteCurrency:this.settleInCurrency,totalAmount:String(this.volume),orderMinAmount:String(this.minPerTradeAmount),orderMaxAmount:String(this.maxPerTradeAmount),priceSettings:{type:this.orderType.key,settings:e},note:this.note};this.isBuy?t.paymentMethodTypes=this.paymentMethods.map((e=>e.toUpperCase())):t.paymentMethodIds=this.filterPaymentReceivedList.map((e=>e.id)),this.isEdit?re.updateAdvert(this.id,t).then((()=>{this.context.showNotification("c2c.adsUpdated"),this.context.pageName=null,this.context.createAds.id=""})):re.createAdvert(t).then((()=>{this.createAdsContext.isShowCreateSuccessfulModal=!0}))}}},xo={class:"preview-ad-block"},No={class:"preview-ad__title"},Ro={class:"preview-ad__content"},Bo={class:"item"},Oo={class:"item__content"},Fo={class:"price"},Uo={class:"currency"},$o={class:"item"},qo={class:"amount"},Vo={class:"currency"},Ho={class:"item"},jo={class:"amount"},Go={class:"currency"},zo={class:"item"},Ko={class:"item__content"},Yo={class:"amount"},Wo={class:"currency"},Zo={key:0,class:"item"}
2,Xo={class:"item__content gap-12-4"},Qo={key:0},Jo={key:1,class:"item"},er={class:"item__content flex-column gap-12"},tr={key:0},ir={class:"item__name"},nr={class:"bottom-fixed-panel__content"};const ar=Ft(Eo,[["render",function(e,t,o,d,g,f){const b=i("PaymentTag"),v=i("ReadOnlyNote"),k=i("ConsentTermsText"),S=i("Checkbox"),A=i("BaseButton"),M=i("BottomFixedPanel");return a(),n("div",xo,[s("p",No,[r(c(e.$t("t.preview"))+" ",1),s("span",{class:p(["title__type",{buy:f.isBuy}])},c(f.title),3),r(" "+c(e.$t("t.ad")),1)]),s("div",Ro,[s("div",Bo,[s("p",null,c(e.$t("t.unitPrice")),1),s("p",Oo,[s("span",Fo,c(o.unitPrice),1),s("span",Uo,c(o.settleInCurrency),1)])]),s("div",$o,[s("p",null,c(e.$t("t.amount")),1),s("p",{class:p(["item__content",{"is-error":f.isAmountError}])},[s("span",qo,c(f.getFormatPrice(o.volume,o.fromCurrency)),1),s("span",Vo,c(o.fromCurrency),1)],2)]),s("div",Ho,[s("p",null,c(e.$t("t.limits")),1),s("p",{class:p(["item__content",{"is-error":f.isLimitsError}])},[s("span",jo,c(f.limits),1),s("span",Go,c(o.settleInCurrency),1)],2)]),s("div",zo,[s("p",null,c(e.$t("c2c.createAds.estimatedFees")),1),s("p",Ko,[s("span",Yo,c(f.getFormatPrice(f.fees,o.fromCurrency)),1),s("span",Wo,c(o.fromCurrency),1)])]),f.isBuy?(a(),n("div",Zo,[s("p",null,c(e.$t("t.paymentMethod")),1),s("div",Xo,[0===f.paymentMethods.length?(a(),n("div",Qo,"-")):y("",!0),(a(!0),n(u,null,m(f.paymentMethods,(e=>(a(),h(b,{key:e,methodType:e},null,8,["methodType"])))),128))])])):(a(),n("div",Jo,[s("p",null,c(e.$t("c2c.createAds.paymentReceivedBy")),1),s("div",er,[0===f.filterPaymentReceivedList.length?(a(),n("div",tr,"-")):y("",!0),(a(!0),n(u,null,m(f.filterPaymentReceivedList,(e=>(a(),n("p",{key:e.id,class:"content__payment-received-item"},[s("span",ir,c(f.getPaymentAlias(e)),1),l(b,{methodType:f.getPaymentType(e)},null,8,["methodType"]),s("span",null,c(f.getPaymentAccountNumber(e)),1)])))),128))])])),l(v,{title:e.$t("t.note"),text:o.note},null,8,["title","text"]),e.isMobile?y("",!0):(a(),h(S,{key:2,value:g.isAgreeTerms,"onUpdate:value":t[0]||(t[0]=e=>g.isAgreeTerms=e),class:"item__agree-terms",isBrandNewStyle:""},{default:C((()=>[l(k)])),_:1},8,["value"]))]),e.isMobile?y("",!0):(a(),h(A,{key:0,class:"primary preview-ad__button",size:"large",disabled:f.isCreateAdDisabled,onClick:f.onCreateAd},{default:C((()=>[r(c(e.$t(f.buttonText)),1)])),_:1},8,["disabled","onClick"])),e.isMobile?(a(),h(M,{key:1},{default:C((()=>[s("div",nr,[l(S,{value:g.isAgreeTerms,"onUpdate:value":t[1]||(t[1]=e=>g.isAgreeTerms=e),class:"item__agree-terms",isBrandNewStyle:""},{default:C((()=>[l(k)])),_:1},8,["value"]),l(A,{class:"primary content__button",size:"large",disabled:f.isCreateAdDisabled,onClick:f.onCreateAd},{default:C((()=>[r(c(e.$t(f.buttonText)),1)])),_:1},8,["disabled","onClick"])])])),_:1})):y("",!0)])}],["__scopeId","data-v-d9f4efa9"]]),sr={name:"CreatingMultipleAdsModal",components:{BrandDialog:J,IconNotificationHollow:ee},inject:["context"],emits:["update:isShow"],computed:{...t(["lang"])},methods:{onMyAds(){this.context.pageName=null,this.$router.push({name:"c2cMyAds",params:{lang:this.lang}}),this.onClose()},onOk(){this.onClose()},onClose(){this.$emit("update:isShow",!1)}}},or={class:"creating-multiple-ads-modal__body"},rr={class:"body__title"},lr={class:"body__content"},cr={class:"content__list"};const dr=Ft(sr,[["render",function(e,t,n,o,d,u){const m=i("IconNotificationHollow"),p=i("i18n-t"),y=i("BaseButton"),g=i("BrandDialog");return a(),h(g,{class:"creating-multiple-ads-modal",width:e.isMobile?"90%":"333px",idPrefix:"p2p_creating_multiple_ads_dialog",isBrandNewStyle:"",onClosed:u.onClose},{body:C((()=>[s("div",or,[l(m,{class:"body__icon"}),s("p",rr,c(e.$t("t.warning")),1),s("div",lr,[s("p",null,c(e.$t("c2c.createAds.multiple.text")),1),s("ul",cr,[s("li",null,c(e.$t("c2c.createAds.multiple.list.1")),1),s("li",null,c(e.$t("c2c.createAds.multiple.list.2")),1)])]),l(p,{class:"content__bottom-text",keypath:"c2c.createAds.creatingMultiple.viewMyAds",tag:"p"},{myAds:C((()=>[s("div",{class:"link",onClick:t[0]||(t[0]=(...e)=>u.onMyAds&&u.onMyAds(...e))}
2,c(e.$t("c2c.myAds")),1)])),_:1}),l(y,{class:"primary content__button",size:"large",onClick:u.onOk},{default:C((()=>[r(c(e.$t("t.ok")),1)])),_:1},8,["onClick"])])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-a6827fe3"]]),ur={name:"CreateAdsSuccessfulModal",components:{BrandDialog:J,IconSuccess:Be},inject:["context"],emits:["update:isShow"],computed:{...t(["lang"])},methods:{onViewMyAds(){this.context.pageName=null,this.$router.push({name:"c2cMyAds",params:{lang:this.lang}}),this.onClose()},onClose(){this.$emit("update:isShow",!1)}}},mr={class:"body__title"},pr={class:"body__text"};const hr={name:"CreateAds",components:{CreateAdsSetting:_o,PreviewAd:ar,CreatingMultipleAdsModal:dr,CreateAdsSuccessfulModal:Ft(ur,[["render",function(e,t,n,o,d,u){const m=i("IconSuccess"),p=i("BaseButton"),y=i("BrandDialog");return a(),h(y,{class:"create-ads-successful-modal",width:e.isMobile?"90%":"560px",idPrefix:"p2p_create_ads_successful_dialog",isBrandNewStyle:"",onClosed:u.onViewMyAds},{body:C((()=>[l(m),s("p",mr,c(e.$t("t.successful")),1),s("p",pr,c(e.$t("c2c.createAds.successful.text")),1),l(p,{class:"primary body__button",size:"large",onClick:u.onViewMyAds},{default:C((()=>[r(c(e.$t("c2c.createAds.successful.btnText")),1)])),_:1},8,["onClick"])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-e8c90986"]]),IconInfo2:xe},inject:["context"],provide(){return{createAdsContext:this.createAdsContext}},props:{id:{type:String,default:""},onBeforeUnmountHandler:{type:Function,default:()=>{}}},data:()=>({isInitLoading:!1,isEdit:!1,adType:"BUY",status:"",fromCurrency:"USDT",settleInCurrency:j.c2cBaseCurrency,isSettleInError:!1,orderType:{},unitPrice:"",unitPriceErrorMsg:"",floatingPriceMargin:0,volume:"",volumeErrorMsg:"",minPerTradeAmount:"",minPerTradeErrorMsg:"",maxPerTradeAmount:"",maxPerTradeErrorMsg:"",usePaymentMethods:{},createAdsContext:{isShowCreatingMultipleModal:!1,isShowCreateSuccessfulModal:!1,paymentReceivedList:[]},note:"",isPreviewPage:!1}),computed:{...t("c2c",["c2cInitInfo"]),...D("c2c",["supportPaymentMethods"]),isLoading(){return!Object.keys(this.c2cInitInfo).length||this.isInitLoading},isBuy(){return this.adType===xs},fee(){var e,t,i;const n=null==(i=null==(t=null==(e=this.c2cInitInfo)?void 0:e.defaultFeeSettings[0])?void 0:t.data)?void 0:i.rate;return this.isLoading||!n?0:B(n).times(100).toNumber()},isError(){return this.isSettleInError||this.unitPriceErrorMsg.length>0||this.volumeErrorMsg.length>0||this.minPerTradeErrorMsg.length>0||this.maxPerTradeErrorMsg.length>0||this.maxPerTradeAmount<this.minPerTradeErrorMsg},isEmpty(){return!(0!==this.fromCurrency.length&&0!==this.settleInCurrency.length&&0!==Object.keys(this.orderType).length&&this.unitPrice&&this.volume&&this.minPerTradeAmount&&this.maxPerTradeAmount)},isBuyInputEmpty(){return!Object.keys(this.usePaymentMethods).some((e=>this.usePaymentMethods[e]))},isSellInputEmpty(){return!this.createAdsContext.paymentReceivedList.some((e=>e.isUse))},isButtonDisabled(){return this.isError||this.isEmpty||(this.isBuy?this.isBuyInputEmpty:this.isSellInputEmpty)}},watch:{settleInCurrency(){this.id||(this.unitPrice="",this.unitPriceErrorMsg="",this.minPerTradeAmount="",this.minPerTradeErrorMsg="",this.maxPerTradeAmount="",this.maxPerTradeErrorMsg="")},isMobile:{immediate:!0,handler(e){this.setIsFooterCustomizedHidden(e)}},supportPaymentMethods:{immediate:!0,deep:!0,handler(){this.updatePaymentMethods()}}},async created(){this.isInitLoading=!0,await this.init(),this.isInitLoading=!1},beforeUnmount(){this.status===Oi&&this.onBeforeUnmountHandler(this.id,Oi),this.context.pageName=null,this.context.createAds.id="",this.setIsFooterCustomizedHidden(!1)},methods:{..._(["setIsFooterCustomizedHidden"]),async init(){await this.getUserPaymentMethods(),await this.initFormData()},async initFormData(){var e;if(!this.id)return;const{advert:t}=await re.getAdvert(this.id);t.status===Oi&&re.updateAdStatus(this.id,Fi),this.status=t.status,this.isEdit=!0,this.adType=t.side,this.fromCurrency=t.baseCurrency,this.settleInCurrency=t.quoteCurrency,this.orderType=Rs.find((e=>e.key===t.priceSettings.type))||Rs[0],this.orderType.key===De.LIMIT?this.unitPrice=Number(t.priceSettings.settings.price||""):this.orderType.key===De.MARKET&&(this.floatingPriceMargin=Number((null==(e=t.priceSettings.settings)?void 0:e.priceMargin)||"")),this.volume=Number(t.totalAmount||""),this.minPerTradeAmount=Number(t.orderMinAmount||""),this.maxPerTradeAmount=Number(t.orderMaxAmount||""),this.note=t.note,t.side===xs?t.paymentMethodTypes.forEac
2h((e=>{this.usePaymentMethods[e]=!0})):this.createAdsContext.paymentReceivedList=this.paymentReceivedListWithUsageFlag(this.createAdsContext.paymentReceivedList,t.paymentMethodIds)},async updatePaymentMethods(){var e;null==(e=this.c2cInitInfo.paymentMethodTemplates)||e.forEach((({type:e})=>{this.usePaymentMethods[e]=!1}))},async getUserPaymentMethods(){const{paymentMethods:e}=await re.getPaymentMethods({sorting:"createdAt:ASC",pageSize:100,page:1});this.createAdsContext.paymentReceivedList=this.paymentReceivedListWithUsageFlag(e)},paymentReceivedListWithUsageFlag:(e,t=null)=>e.map((e=>({...e,isUse:!!t&&t.includes(e.id)}))),onBack(e){"setting"!==e?(this.context.pageName=null,this.context.createAds.id=""):this.isPreviewPage=!1}}},yr={key:0,class:"create-ads"},Cr={key:0,class:"warning__wrapper flex-box items-center inner-ml-8"},gr={class:"create-ads__title"},fr={key:1,class:"create-ads__content"},br={key:1,class:"create-ads"},vr={key:0},kr={key:0,class:"warning__wrapper flex-box items-center inner-ml-8"},Sr={class:"create-ads__title"},Ar={key:1};const Mr=Ft(hr,[["render",function(e,t,o,r,d,m){const p=i("IconInfo2"),C=i("CreateAdsSetting"),g=i("PreviewAd"),f=i("CreatingMultipleAdsModal"),b=i("CreateAdsSuccessfulModal");return a(),n("div",null,[e.isMobile?(a(),n("div",br,[m.isLoading?y("",!0):(a(),n(u,{key:0},[d.isPreviewPage?(a(),n("div",Ar,[s("div",{class:"m-create-ads__back",onClick:t[34]||(t[34]=e=>m.onBack("setting"))},c(e.$t("msg.back")),1),l(g,{id:o.id,isEdit:d.isEdit,adType:d.adType,fromCurrency:d.fromCurrency,settleInCurrency:d.settleInCurrency,orderType:d.orderType,unitPrice:d.unitPrice,volume:d.volume,volumeErrorMsg:d.volumeErrorMsg,minPerTradeAmount:d.minPerTradeAmount,minPerTradeErrorMsg:d.minPerTradeErrorMsg,maxPerTradeAmount:d.maxPerTradeAmount,maxPerTradeErrorMsg:d.maxPerTradeErrorMsg,usePaymentMethods:d.usePaymentMethods,paymentReceivedList:d.createAdsContext.paymentReceivedList,note:d.note,fee:m.fee,isButtonDisabled:m.isButtonDisabled,floatingPriceMargin:d.floatingPriceMargin},null,8,["id","isEdit","adType","fromCurrency","settleInCurrency","orderType","unitPrice","volume","volumeErrorMsg","minPerTradeAmount","minPerTradeErrorMsg","maxPerTradeAmount","maxPerTradeErrorMsg","usePaymentMethods","paymentReceivedList","note","fee","isButtonDisabled","floatingPriceMargin"])])):(a(),n("div",vr,[s("div",{class:"m-create-ads__back",onClick:t[16]||(t[16]=e=>m.onBack())},c(e.$t("msg.back")),1),d.isEdit?(a(),n("div",kr,[l(p,{class:"warning__icon"}),s("p",null,c(e.$t("c2c.createAds.editWarningText")),1)])):y("",!0),s("div",null,[s("h3",Sr,c(e.$t("c2c.createAds.createAds")),1),l(C,{adType:d.adType,"onUpdate:adType":t[17]||(t[17]=e=>d.adType=e),fromCurrency:d.fromCurrency,"onUpdate:fromCurrency":t[18]||(t[18]=e=>d.fromCurrency=e),settleInCurrency:d.settleInCurrency,"onUpdate:settleInCurrency":t[19]||(t[19]=e=>d.settleInCurrency=e),isSettleInError:d.isSettleInError,"onUpdate:isSettleInError":t[20]||(t[20]=e=>d.isSettleInError=e),orderType:d.orderType,"onUpdate:orderType":t[21]||(t[21]=e=>d.orderType=e),unitPrice:d.unitPrice,"onUpdate:unitPrice":t[22]||(t[22]=e=>d.unitPrice=e),unitPriceErrorMsg:d.unitPriceErrorMsg,"onUpdate:unitPriceErrorMsg":t[23]||(t[23]=e=>d.unitPriceErrorMsg=e),volume:d.volume,"onUpdate:volume":t[24]||(t[24]=e=>d.volume=e),volumeErrorMsg:d.volumeErrorMsg,"onUpdate:volumeErrorMsg":t[25]||(t[25]=e=>d.volumeErrorMsg=e),minPerTradeAmount:d.minPerTradeAmount,"onUpdate:minPerTradeAmount":t[26]||(t[26]=e=>d.minPerTradeAmount=e),minPerTradeErrorMsg:d.minPerTradeErrorMsg,"onUpdate:minPerTradeErrorMsg":t[27]||(t[27]=e=>d.minPerTradeErrorMsg=e),maxPerTradeAmount:d.maxPerTradeAmount,"onUpdate:maxPerTradeAmount":t[28]||(t[28]=e=>d.maxPerTradeAmount=e),maxPerTradeErrorMsg:d.maxPerTradeErrorMsg,"onUpdate:maxPerTradeErrorMsg":t[29]||(t[29]=e=>d.maxPerTradeErrorMsg=e),usePaymentMethods:d.usePaymentMethods,"onUpdate:usePaymentMethods":t[30]||(t[30]=e=>d.usePaymentMethods=e),note:d.note,"onUpdate:note":t[31]||(t[31]=e=>d.note=e),isPreviewPage:d.isPreviewPage,"onUpdate:isPreviewPage":t[32]||(t[32]=e=>d.isPreviewPage=e),floatingPriceMargin:d.floatingPriceMargin,"onUpdate:floatingPriceMargin":t[33]||(t[33]=e=>d.floatingPriceMargin=e),class:"m-create-ads__ads-setting",isEdit:d.isEdit,paymentReceivedList:d.createAdsContext.paymentReceivedList,fee:m.fee,isButtonDisabled:m.isButtonDisabled},null,8,["adType","fromCurrency","settleInCurrency","isSettleInError","orderType","unitPrice","unitPriceErrorMsg","volume","volumeErrorMsg","minPerTradeAmount","minPerTradeErrorMsg","maxPerTradeAmount","maxPerTradeErrorMsg","usePaymentMethods","note","isPreviewPage","floatingPriceMargin","isEdit","paymentReceivedList","fee","isButtonDisabled"])])]))],64))])):(a(),n("div",yr,[d.isEdit?(a(),n("div",Cr,[l(p,{class:"warning__icon"}),s("p",null,c(e.$t("c2c.createAds.editWarningText")),1)])):y("",!0),s("h3",gr,c(e.$t("c2c.createAds.createAds")),1),m.isLoading?y("",!0):(a(),n("div",fr,[l(C,{adType:d.adType,"onUpdate:adType":t[0]||(t[0]=e=>d.adType=e),fromCurrency:d.fromCurrency,"onUpdate:fromCurrency":t[1]||(t[1]=e=>d.fromCurrency=e),settleInCurrency:d.settleInCurrency,"onUpdate:settleInCurrency":t[2]||(t[2]=e=>d.settleInCurrency=e),isSettleInError:d.isSettleInError,"onUpdate:isSettleInError":t[3]||(t[3]=e=>d.isSettleInError=e),orderType:d.orderType,"onUpdate:orderType":t[4]||(t[4]=e=>d.orderType=e),unitPrice:d.unitPrice,"onUpdate:unitPrice":t[5]||(t[5]=e=>d.unitPrice=e),unitPriceErrorMsg:d.unitPriceErrorMsg,"onUpdate:unitPriceErrorMsg":t[6]||(t[6]=e=>d.unitPriceErrorMsg=e),volume:d.volume,"onUpdate:volume":t[7]||(t[7]=e=>d.volume=e),volumeErrorMsg:d.volumeErrorMsg,"onUpdate:volumeErrorMsg":t[8]||(t[8]=e=>d.volumeErrorMsg=e),minPerTradeAmount:d.minPerTradeAmount,"onUpdate:minPerTradeAmount":t[9]||(t[9]=e=>d.minPerTradeAmount=e),minPerTradeErrorMsg:d.minPerTradeErrorMsg,"onUpdate:minPerTradeErrorMsg":t[10]||(t[10]=e=>d.minPerTradeErrorMsg=e),maxPerTradeAmount:d.maxPerTradeAmount,"onUpdate:maxPerTradeAmount":t[11]||(t[11]=e=>d.maxPerTradeAmount=e),maxPerTradeErrorMsg:d.maxPerTradeErrorMsg,"onUpdate:maxPerTradeErrorMsg":t[12]||(t[12]=e=>d.maxPerTradeErrorMsg=e),usePaymentMethods:d.usePaymentMethods,"onUpdate:usePaymentMethods":t[13]||(t[13]=e=>d.usePaymentMethods=e),note:d.note,"onUpdate:note":t[14]||(t[14]=e=>d.note=e),floatingPriceMargin:d.floatingPriceMargin,"onUpdate:floatingPriceMargin":t[15]||(t[15]=e=>d.floatingPriceMargin=e),isEdit:d.isEdit,paymentReceivedList:d.createAdsContext.paymentReceivedList,fee:m.fee,isButtonDisabled:m.isButtonDisabled},null,8,["adType","fromCurrency","settleInCurrency","isSettleInError","orderType","unitPrice","unitPriceErrorMsg","volume","volumeErrorMsg","minPerTradeAmount","minPerTradeErrorMsg","maxPerTradeAmount","maxPerTradeErrorMsg","usePaymentMethods","note","floatingPriceMargin","isEdit","paymentReceivedList","fee","isButtonDisabled"]),l(g,{id:o.id,isEdit:d.isEdit,adType:d.adType,fromCurrency:d.fromCurrency,settleInCurrency:d.settleInCurrency,orderType:d.orderType,unitPrice:d.unitPrice,volume:d.volume,volumeErrorMsg:d.volumeErrorMsg,minPerTradeAmount:d.minPerTradeAmount,minPerTradeErrorMsg:d.minPerTradeErrorMsg,maxPerTradeAmount:d.maxPerTradeAmount,maxPerTradeErrorMsg:d.maxPerTradeErrorMsg,usePaymentMethods:d.usePaymentMethods,paymentReceivedList:d.createAdsContext.paymentReceivedList,note:d.note,fee:m.fee,isButtonDisabled:m.isButtonDisabled,floatingPriceMargin:d.floatingPriceMargin},null,8,["id","isEdit","adType","fromCurrency","settleInCurrency","orderType","unitPrice","volume","volumeErrorMsg","minPerTradeAmount","minPerTradeErrorMsg","maxPerTradeAmount","maxPerTradeErrorMsg","usePaymentMethods","paymentReceivedList","note","fee","isButtonDisabled","floatingPriceMargin"])]))])),d.createAdsContext.isShowCreatingMultipleModal?(a(),h(f,{key:2,isShow:d.createAdsContext.isShowCreatingMultipleModal,"onUpdate:isShow":t[35]||(t[35]=e=>d.createAdsContext.isShowCreatingMultipleModal=e)},null,8,["isShow"])):y("",!0),d.createAdsContext.isShowCreateSuccessfulModal?(a(),h(b,{key:3,isShow:d.createAdsContext.isShowCreateSuccessfulModal,"onUpdate:isShow":t[36]||(t[36]=e=>d.createAdsContext.isShowCreateSuccessfulModal=e)},null,8,["isShow"])):y("",!0)])}],["__scopeId","data-v-89b4aa17"]]),Ir={name:"C2C",components:{Backgroun
2d:Xn,Menu:ua,CreateAds:Mr,Notification:Oe,CreateAdsPreModal:zi,AccountSettingDialog:pn,NoticeModal:Tn,LegalDialog:Li},provide(){return{context:this.context}},data(){return{isLoading:!1,iSettingShown:!1,isSetMdPadding:!1,notificationText:"",accountInfoInterval:null,fiatInfoListInterval:null,context:{pageName:"",isShowNoticeModal:!1,isShowPreModal:!1,isShowLegalDialog:!1,errorCode:0,defaultLegalRouteName:"",createAds:{id:""},showNotification:this.showNotification}}},computed:{...t({isLogin:"loginState",lang:"lang",apiResponseCode:"apiResponseCode"}),...D(["isSubAccount"]),...D("c2c",["isAvailableC2CUser"]),isShowMenu(){const e=this.$route.name;return!((this.component||"c2cOrder"===e)&&this.isMobile)},component(){return this.context.pageName===Ri?Mr:null},properties(){return this.context.pageName===Ri?{...this.context.createAds,onBeforeUnmountHandler:this.onCreateAdsBeforeUnmountHandler}:null}},watch:{lang:{handler(){this.updateC2CInitInfo()}},$route:{immediate:!0,handler(e){this.isSetMdPadding=!["c2cMarketList","c2cMyAds","c2cMyOrder"].includes(e.name),this.context.pageName=null}},apiResponseCode(e){[he.C2C_OTC_MISSING_ROLE_PREREQUISITES,he.C2C_OTC_USER_NOT_EXIST,he.USER_TOKEN_INVALID].includes(e)?(this.errorCode=e,this.onSettingOpen()):he.C2C_OTC_BLOCKED_BY_ADMIN===e&&(this.context.isShowNoticeModal=!0)},isAvailableC2CUser(e){e?(this.updateC2CAccountInfo(),this.getC2CAccountInfoByInterval()):clearInterval(this.accountInfoInterval)}},async mounted(){this.isSubAccount?this.$router.replace({name:"home",params:{lang:this.lang}}):(this.updateC2CInitInfo(),await this.updateC2CFiatInfoList(),this.isAvailableC2CUser&&this.getC2CAccountInfoByInterval(),this.startUpdateC2cFiatInfoList())},beforeUnmount(){clearInterval(this.accountInfoInterval),clearInterval(this.fiatInfoListInterval)},methods:{..._(["updateAccountInfo"]),..._("c2c",["updateC2CInitInfo","updateC2CAccountInfo","updateC2CFiatInfoList"]),showNotification(e){e&&(this.notificationText=e,this.$nextTick((()=>{this.$refs.notification.showNotification()})))},onSettingOpen(){this.isLogin?this.iSettingShown=!0:this.$router.push({name:"login",query:{redirect:this.$route.fullPath},params:{lang:this.lang}})},onSettingClose(){this.errorCode=0,this.iSettingShown=!1},closeNoticeModal(){this.context.isShowNoticeModal=!1},onSupportClick(){window.open(te(this.lang,"C2C"),"_blank")},async onCreateAdsBeforeUnmountHandler(e,t){this.isLoading=!0,await re.updateAdStatus(e,t),this.isLoading=!1},getC2CAccountInfoByInterval(){this.accountInfoInterval&&clearInterval(this.accountInfoInterval),this.accountInfoInterval=setInterval((()=>{this.updateC2CAccountInfo().catch((()=>{this.updateC2CInitInfo(),this.updateAccountInfo()}))}),5e3)},startUpdateC2cFiatInfoList(){clearInterval(this.fiatInfoListInterval),this.fiatInfoListInterval=setInterval((()=>{this.updateC2CFiatInfoList()}),3e4)}}},wr={id:"c2c",class:"c2c"},Tr={class:"notice-content"};const _r=Ft(Ir,[["render",function(e,t,r,u,m,g){const f=i("Backgroun
2d"),b=i("Menu"),v=i("RouterView"),k=i("Notification"),S=i("AccountSettingDialog"),A=i("LegalDialog"),M=i("CreateAdsPreModal"),w=i("i18n-t"),T=i("NoticeModal");return a(),n("div",wr,[l(f,{title:e.$t("c2c.title"),desc:e.$t("c2c.header.desc")},null,8,["title","desc"]),o(l(b,{onOnSettingOpen:g.onSettingOpen},null,8,["onOnSettingOpen"]),[[d,g.isShowMenu]]),m.isLoading?y("",!0):(a(),n("div",{key:0,class:p(["content-container",{"md--padding":m.isSetMdPadding||g.component}])},[g.component?y("",!0):(a(),h(v,{key:0})),g.component?(a(),h(I(g.component),O(N({key:1},g.properties)),null,16)):y("",!0)],2)),l(k,{ref:"notification",text:m.notificationText,"onUpdate:text":t[0]||(t[0]=e=>m.notificationText=e),class:"notification",hiddenCountdown:3e3},null,8,["text"]),m.iSettingShown?(a(),h(S,{key:1,errorCode:e.errorCode,onOnClose:g.onSettingClose},null,8,["errorCode","onOnClose"])):y("",!0),m.context.isShowLegalDialog?(a(),h(A,{key:2,isShow:m.context.isShowLegalDialog,"onUpdate:isShow":t[1]||(t[1]=e=>m.context.isShowLegalDialog=e),defaultTabName:m.context.defaultLegalRouteName},null,8,["isShow","defaultTabName"])):y("",!0),m.context.isShowPreModal?(a(),h(M,{key:3,isShow:m.context.isShowPreModal,"onUpdate:isShow":t[2]||(t[2]=e=>m.context.isShowPreModal=e)},null,8,["isShow"])):y("",!0),m.context.isShowNoticeModal?(a(),h(T,{key:4,isShow:m.context.isShowNoticeModal,"onUpdate:isShow":t[4]||(t[4]=e=>m.context.isShowNoticeModal=e),title:"c2c.accountLocked",btnText:"t.ok",onClick:g.closeNoticeModal},{content:C((()=>[s("div",Tr,[l(w,{keypath:"c2c.accountLockedDesc"},{customerSupport:C((()=>[s("span",{class:"link",onClick:t[3]||(t[3]=(...e)=>g.onSupportClick&&g.onSupportClick(...e))},c(e.$t("c2c.customerSupport")),1)])),_:1})])])),_:1},8,["isShow","onClick"])):y("",!0)])}],["__scopeId","data-v-75d4f477"]]),Dr=Object.freeze(Object.defineProperty({__proto__:null,default:_r},Symbol.toStringTag,{value:"Module"})),Pr={class:"coin-wrapper"},Lr=["onClick"];const Er=Ft({name:"CryptoSelector",props:{targetCoinList:{type:Array,required:!0},ruleForm:{type:Object,required:!0}},methods:{onCoinClick(e){this.ruleForm.baseCurrency=e}}},[["render",function(e,t,i,s,o,r){return a(),n("div",Pr,[(a(!0),n(u,null,m(i.targetCoinList,((e,t)=>(a(),n("div",{key:`${t}-${e}`,class:p(["coin",{"coin--active":i.ruleForm.baseCurrency===e}]),onClick:t=>r.onCoinClick(e)},c(e),11,Lr)))),128))])}],["__scopeId","data-v-5004773a"]]),xr={name:"CurrencyDropDownBar",components:{IconChevronDown:ge,BrandIcon:Fe},props:{selectedCurrencyInfo:{type:Object,default:()=>({})},toggleList:{type:Function,required:!0},selectedCurrency:{type:String,default:""},isListShown:{type:Boolean,required:!0},placeholder:{type:String,default:""},allOptionText:{type:String,default:""},hideBarIcon:{type:Boolean,default:!1}},computed:{selectedCurrencyText(){return"ALL"!==this.selectedCurrency?this.selectedCurrency:this.$t(this.allOptionText)},showOnlyText(){return"ALL"===this.selectedCurrency||this.hideBarIcon}}},Nr={key:0,class:"currency-select-wrapper"},Rr={key:0},Br={key:1,class:"placeholder"};const Or={class:"search"},Fr=["value","placeholder"];const Ur={name:"CurrencyDropDown",components:{CurrencyDropDownBar:Ft(xr,[["render",function(e,t,s,o,r,d){const u=i("BrandIcon"),m=i("IconChevronDown");return a(),n("div",{class:"bar flex-box items-center justify-between",onClick:t[0]||(t[0]=(...e)=>s.toggleList&&s.toggleList(...e))},[s.selectedCurrency?(a(),n("div",Nr,[d.showOnlyText?(a(),n("span",Rr,c(d.selectedCurrencyText),1)):(a(),h(u,{key:1,displayName:s.selectedCurrency,"short-name":!0,type:s.selectedCurrencyInfo.isFiat?"fiat":"icon",name:s.selectedCurrencyInfo.shortName||s.selectedCurrency,size:"16"},null,8,["displayName","type","name"]))])):(a(),n("span",Br,c(e.$t(s.placeholder)),1)),l(m,{class:p(["bar-arrow",s.isListShown?"bar-arrow-rotate":"bar-arrow-reset-rotate"])},null,8,["class"])])}],["__scopeId","data-v-c46b74b2"]]),CurrencySearchInput:Ft({name:"CurrencySearchInput",components:{IconMagnify:$e,IconClose:Ue},props:{searchKey:{type:String,default:""}},emits:["update:searchKey"],methods:{clearInput(){this.$emit("update:searchKey","")},handleInput(e){this.$emit("update:searchKey",e)}}},[["render",function(e,t,o,r,c,d){const u=i("IconMagnify"),m=i("IconClose");return a(),n("div",Or,[l(u,{class:"search-icon"}),s("input",{ref:"searchInput",class:"search__input",type:"text",value:o.searchKey,placeholder:e.$t("msg.search"),onInput:t[0]||(t[0]=e=>d.handleInput(e.target.value))},null,40,Fr),o.searchKey?(a(),h(m,{key:0,class:"close-icon",onClick:T(d.clearInput,["stop"])},null,8,["onClick"])):y("",!0)])}],["__scopeId","data-v-f9c04fc4"]]),BrandIcon:Fe}
2,props:{refName:{type:String,default:"currencyDropdown"},selectedCurrency:{type:String,required:!0},currencyType:{type:String,default:Ve.FIAT},placeholder:{type:String,default:""},showAllOption:{type:Boolean,default:!1},isMobileView:{type:Boolean,default:!1},hideBarIcon:{type:Boolean,default:!1},isSearchShown:{type:Boolean,default:!1},isHiddenIcon:{type:Boolean,default:!1},idPrefix:{type:String,default:""},idSuffix:{type:String,default:""}},emits:["update:selectedCurrency"],data:()=>({searchKey:"",isListShown:!1}),computed:{...t({currencyMap:"currencyMap"}),...t("c2c",["c2cInitInfo"]),currencyList(){const{supportedFiats:e,supportedCryptos:t}=this.c2cInitInfo,i=this.currencyType===Ve.FIAT?e:t;if(!i)return[];return i.map((e=>({shortName:e.name,displayName:e.name,...e}))).filter((e=>e.displayName.toLowerCase().includes(this.searchKey.toLowerCase())))},allOptionText(){return this.currencyType===Ve.CRYPTO?"t.allAssets":"c2c.dropdown.allFiat"},selectedCurrencyInfo(){return this.currencyMap[this.selectedCurrency]}},watch:{isListShown:{handler(e){e||(this.searchKey="")}}},mounted(){document.addEventListener("click",this.onClickOutside)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{e2eID:qe,onClickOutside(e){this.$refs[this.refName]&&!this.$refs[this.refName].contains(e.target)&&(this.isListShown=!1)},selectCurrency(e){this.$emit("update:selectedCurrency",e.shortName),this.isListShown=!1},toggleList(){this.isListShown=!this.isListShown},handleChange(e){this.searchKey=e},selectAll(){this.$emit("update:selectedCurrency","ALL"),this.isListShown=!1}}},$r={key:0,class:"dropdown"},qr={class:"list-wrapper"},Vr=["id"],Hr=["id","onClick"];const jr=Ft(Ur,[["render",function(e,t,o,r,d,C){const g=i("CurrencyDropDownBar"),f=i("CurrencySearchInput"),b=i("BrandIcon");
2return a(),n("div",{ref:o.refName,class:p(["wrapper relative",{isLarge:o.isMobileView}])},[l(g,{id:C.e2eID("list_coin",o.idPrefix,o.idSuffix),selectedCurrencyInfo:C.selectedCurrencyInfo,toggleList:C.toggleList,selectedCurrency:o.selectedCurrency,isListShown:d.isListShown,placeholder:o.placeholder,allOptionText:C.allOptionText,isMobileView:o.isMobileView,hideBarIcon:o.hideBarIcon},null,8,["id","selectedCurrencyInfo","toggleList","selectedCurrency","isListShown","placeholder","allOptionText","isMobileView","hideBarIcon"]),d.isListShown?(a(),n("div",$r,[o.isSearchShown?(a(),h(f,{key:0,id:C.e2eID("input_search_coin",o.idPrefix,o.idSuffix),searchKey:d.searchKey,"onUpdate:searchKey":t[0]||(t[0]=e=>d.searchKey=e),class:"search"},null,8,["id","searchKey"])):y("",!0),s("div",qr,[o.showAllOption&&!d.searchKey?(a(),n("div",{key:0,id:C.e2eID("text_search_coin",o.idPrefix,`${o.idSuffix}_0`),class:"item",onClick:t[1]||(t[1]=(...e)=>C.selectAll&&C.selectAll(...e))},c(e.$t(C.allOptionText)),9,Vr)):y("",!0),(a(!0),n(u,null,m(C.currencyList,((e,t)=>(a(),n("div",{id:C.e2eID("text_search_coin",o.idPrefix,`${o.idSuffix}_${t+1}`),key:e.shortName,class:"item",onClick:t=>C.selectCurrency(e)},[l(b,{displayName:e.displayName,type:e.isFiat?"fiat":"icon",name:e.shortName,size:"16",isHiddenIcon:o.isHiddenIcon},null,8,["displayName","type","name","isHiddenIcon"])],8,Hr)))),128))])])):y("",!0)],2)}],["__scopeId","data-v-29030f6f"]]),Gr={name:"MobileCurrencyFilter",components:{BrandDialog:J,CurrencyDropDown:jr,PaymentDropdown:za},props:{ruleForm:{type:Object,required:!0},showMobileFilter:{type:Boolean,require:!0},paymentMethods:{type:Array,required:!0},handlePaymentSelect:{type:Function,required:!0},defaultCurrency:{type:String,required:!0}},emits:["update:showMobileFilter"],data(){return{mobileRuleForm:{...this.ruleForm}}},computed:{amountErrorMessage(){const e=this.mobileRuleForm.limitAmount.replace(/\s/g,"");return!(!e||/^(\d+)\.?(\d+)?$/.test(e))&&this.$t("rules.errorAmount")},isEnterAmountDisable(){return"ALL"===this.mobileRuleForm.quoteCurrency}},methods:{handleMobileSelectMethod(e){this.mobileRuleForm.paymentMethod=e},onResetClick(){this.mobileRuleForm.quoteCurrency=this.defaultCurrency,this.mobileRuleForm.limitAmount="",this.mobileRuleForm.paymentMethod={}},onApplyClick(){const{quoteCurrency:e,limitAmount:t,paymentMethod:i}=this.mobileRuleForm;this.ruleForm.quoteCurrency=e,this.ruleForm.limitAmount=t,this.ruleForm.paymentMethod=i,this.closeMobileFilter()},closeMobileFilter(){this.$emit("update:showMobileFilter",!1)}}},zr={class:"title"},Kr={class:"title"},Yr={class:"currency-suffix"},Wr={key:0,class:"error-message"},Zr={class:"title"},Xr={class:"flex-box footer-wrapper items-end"};const Qr={class:"market-filter"},Jr={class:"side-wrapper"},el={class:"quote-currency"};const tl=Ft({name:"MarketFilter",components:{StackView:je,CryptoSelector:Er,IconFilter:He,PaymentDropdown:za,CurrencyDropDown:jr,MobileCurrencyFilter:Ft(Gr,[["render",function(e,t,o,d,u,m){const p=i("CurrencyDropDown"),g=i("BrandInput"),f=i("PaymentDropdown"),b=i("BaseButton"),v=i("BrandDialog");return a(),h(v,{class:"dialog",idPrefix:"p2p_market_list_currency_filter_dialog",isBrandNewStyle:"",hideScrollbar:"",fullStyle:"",showClose:"",onClosed:m.closeMobileFilter},{header:C((()=>[r(c(e.$t("t.filters")),1)])),body:C((()=>[s("div",zr,c(e.$t("t.currency")),1),l(p,{selectedCurrency:u.mobileRuleForm.quoteCurrency,"onUpdate:selectedCurrency":t[0]||(t[0]=e=>u.mobileRuleForm.quoteCurrency=e),placeholder:e.$t("t.fiat"),refName:"fiatDropdown",idPrefix:"p2p_market_list_currency_filter",isMobileView:"",isHiddenIcon:"",showAllOption:""},null,8,["selectedCurrency","placeholder"]),s("div",Kr,c(e.$t("c2c.marketList.settlementAmount")),1),l(g,{value:u.mobileRuleForm.limitAmount,"onUpdate:value":t[1]||(t[1]=e=>u.mobileRuleForm.limitAmount=e),maxlength:"20",textAlign:"right",placeholder:e.$t("wallets.sendToInputAmountPlaceHolder"),isError:Boolean(m.amountErrorMessage),disabled:m.isEnterAmountDisable,isBrandNewStyle:""},{suffix:C((()=>[s("div",Yr,c(m.isEnterAmountDisable?"":u.mobileRuleForm.quoteCurrency),1)])),_:1},8,["value","placeholder","isError","disabled"]),m.amountErrorMessage?(a(),n("div",Wr,c(m.amountErrorMessage),1)):y("",!0),s("div",Zr,c(e.$t("t.paymentMethod")),1),l(f,{ruleForm:u.mobileRuleForm,paymentMethods:o.paymentMethods,handleSelect:m.handleMobileSelectMethod,selectedMethod:u.mobileRuleForm.paymentMethod,hasAllPaymentOption:""},null,8,["ruleForm","paymentMethods","handleSelect","selectedMethod"])])),footer:C((()=>[s("div",Xr,[l(b,{class:"outline-primary action-btn",size:"large",onClick:m.onResetClick},{default:C((()=>[r(c(e.$t("t.reset")),1)])),_:1},8,["onClick"]),l(b,{class:"primary action-btn",size:"large",onClick:m.onApplyClick},{default:C((()=>[r(c(e.$t("earn.filter.apply")),1)])),_:1},8,["onClick"])])])),_:1},8,["onClosed"])}],["__scopeId","data-v-4da6d555"]])},props:{targetCoinList:{type:Array,required:!0},ruleForm:{type:Object,required:!0},defaultCurrency:{type:String,required:!0}},data:()=>({amount:"",showMobileFilter:!1,isInputError:!1,CurrencyType:Ve}),computed:{isEnterAmountDisable(){return"ALL"===this.ruleForm.quoteCurrency}},watch:{$mq(){this.showMobileFilter=!1},showMobileFilter(e){e||(this.amount=this.ruleForm.limitAmount)},"ruleForm.quoteCurrency"(){this.amount="",this.ruleForm.limitAmount=""}},methods:{onSideClick(e){this.ruleForm.side=e},onAmountChange(e){const t=e.replace(/\s/g,"");this.amount=e,this.isInputError=!!t&&!/^(\d+)\.?(\d+)?$/.test(t)},onConfirmClick(){this.ruleForm.limitAmount=this.amount},onResetClick(){this.ruleForm.quoteCurrency=this.defaultCurrency,this.ruleForm.limitAmount="",this.ruleForm.paymentMethod={},this.amount=""},onFilterClick(){this.showMobileFilter=!0},handleSelectMethod(e){this.ruleForm.paymentMethod=e}}},[["render",function(e,t,o,r,d,u){const m=i("CryptoSelector"),g=i("CurrencyDropDown"),f=i("BrandInput"),b=i("PaymentDropdown"),v=i("IconFilter"),k=i("MobileCurrencyFilter"),S=i("StackView");return a(),n("div",Qr,[s("div",Jr,[s("span",{class:p(["side-type buy",{active:"SELL"===o.ruleForm.side}]),onClick:t[0]||(t[0]=e=>u.onSideClick("SELL"))},c(e.$t("t.buy")),3),t[6]||(t[6]=s("span",{class:"split"},null,-1)),s("span",{class:p(["side-type sell",{active:"BUY"===o.ruleForm.side}]),onClick:t[1]||(t[1]=e=>u.onSideClick("BUY"))},c(e.$t("t.sell")),3)]),l(m,{ruleForm:o.ruleForm,targetCoinList:o.targetCoinList},null,8,["ruleForm","targetCoinList"]),l(S,{class:"options-wrapper",grow:e.isMobile?1:0,isWrap:""},{default:C((()=>[l(g,{selectedCurrency:o.ruleForm.quoteCurrency,"onUpdate:selectedCurrency":t[2]||(t[2]=e=>o.ruleForm.quoteCurrency=e),class:"quote-dropdown",refName:"fiatDropdown",isHiddenIcon:"",idPrefix:"p2p_market_filter",hideBarIcon:"",showAllOption:"",isSearchShown:""},null,8,["selectedCurrency"]),e.isMobile?y("",!0):(a(),h(f,{key:0,class:"options-wrapper--amount",placeholder:e.$t("wallets.sendToInputAmountPlaceHolder"),isError:d.isInputError,value:d.amount,disabled:u.isEnterAmountDisable,isBrandNewStyle:"",onInput:u.onAmountChange},{suffix:C((()=>[s("div",el,c(u.isEnterAmountDisable?"":o.ruleForm.quoteCurrency),1),s("div",{class:p(["text-btn confirm",{disabled:d.isInputError}]),onClick:t[3]||(t[3]=(...e)=>u.onConfirmClick&&u.onConfirmClick(...e))},c(e.$t("t.confirm")),3)])),_:1},8,["placeholder","isError","value","disabled","onInput"])),e.isMobile?y("",!0):(a(),h(b,{key:1,class:"options-wrapper--payment",handleSelect:u.handleSelectMethod,selectedMethod:o.ruleForm.paymentMethod,hasAllPaymentOption:""}
2,null,8,["handleSelect","selectedMethod"])),e.isMobile?(a(),h(v,{key:2,class:"filter-icon",onClick:u.onFilterClick},null,8,["onClick"])):(a(),n("div",{key:3,class:"options-wrapper--reset text-btn",onClick:t[4]||(t[4]=(...e)=>u.onResetClick&&u.onResetClick(...e))},c(e.$t("t.reset")),1)),d.showMobileFilter?(a(),h(k,{key:4,showMobileFilter:d.showMobileFilter,"onUpdate:showMobileFilter":t[5]||(t[5]=e=>d.showMobileFilter=e),ruleForm:o.ruleForm,handlePaymentSelect:u.handleSelectMethod,defaultCurrency:o.defaultCurrency},null,8,["showMobileFilter","ruleForm","handlePaymentSelect","defaultCurrency"])):y("",!0)])),_:1},8,["grow"])])}],["__scopeId","data-v-d0cc9533"]]);const il=Ft({name:"MarketListHeader",components:{SortableHeaderCell:Ge},props:{headerTitles:{type:Array,required:!0},sortKey:{type:String,default:void 0}}},[["render",function(e,t,o,r,l,d){const p=i("SortableHeaderCell"),y=i("HeaderRow");return a(),h(y,null,{default:C((()=>[(a(!0),n(u,null,m(o.headerTitles,(t=>(a(),h(p,N({ref_for:!0},e.$attrs,{key:t.id,currentSortKey:o.sortKey,title:t,textAlign:t.textAlign}),{content:C((()=>[s("span",null,c(e.$t(t.lang)),1)])),_:2},1040,["currentSortKey","title","textAlign"])))),128))])),_:1})}]]),nl={name:"Nickname",props:{nickname:{type:String,default:""},isOnline:{type:Boolean,default:!1},size:{type:String,default:"normal"},hasLink:{type:Boolean,default:!1},isElliptical:{type:Boolean,default:!1}},emits:["click"],data:()=>({ellipsis:!1}),computed:{classes(){return{hasLink:this.hasLink,smallFont:"small"===this.size,extraSmall:"extraSmall"===this.size,isElliptical:this.isElliptical,ellipsis:this.ellipsis}}},mounted(){this.$nextTick((()=>{if(!this.isElliptical)return;const{scrollWidth:e,clientWidth:t}=this.$refs.nickname;e>t&&(this.ellipsis=!0)}))},methods:{onNicknameClick(){this.hasLink&&this.$emit("click")}}},al={class:"relative nickname inner-ml-4"},sl={key:0,class:"full-nickname"};const ol=Ft(nl,[["render",function(e,t,i,o,r,l){return a(),n("div",al,[s("div",{ref:"nickname",class:p(["name",l.classes]),onClick:t[0]||(t[0]=T(((...e)=>l.onNicknameClick&&l.onNicknameClick(...e)),["stop"]))},c(i.nickname),3),s("div",{class:p(["status",{online:i.isOnline}])},null,2),r.ellipsis?(a(),n("div",sl,c(i.nickname),1)):y("",!0)])}],["__scopeId","data-v-e4892cb2"]]),rl={name:"Completion",props:{trades:{type:Object,required:!0},showTooltip:{type:Boolean,default:!1}},computed:{completionRate(){return 100*this.trades.completionRate}}},ll={class:"wrapper relative"},cl={key:0,class:"tooltip absolute"};const dl=Ft(rl,[["render",function(e,t,i,o,l,d){return a(),n("div",ll,[r(c(i.trades.totalTrades)+" ",1),t[0]||(t[0]=s("span",{class:"split relative"},null,-1)),r(" "+c(e.$filters.formatNumber(d.completionRate,0))+" % ",1),i.showTooltip?(a(),n("div",cl,c(e.$t("c2c.account.totalTradesToDate"))+" | "+c(e.$t("c2c.account.tradeCompletionRate")),1)):y("",!0)])}],["__scopeId","data-v-c0ad2e95"]]),ul={name:"PriceField",props:{currency:{type:String,required:!0},priceValue:{type:[Number,String],required:!0}},computed:{...t({currencyMap:"currencyMap"}),...D("c2c",["getCurrencyDecimal"]),formatValue(){const e=this.getCurrencyDecimal(this.currency);return Ls(this.priceValue,e)}}},ml={class:"value"};const pl=Ft(ul,[["render",function(e,t,i,s,o,r){return a(),n("span",ml,c(r.formatValue),1)}],["__scopeId","data-v-2a23844e"]]),hl={name:"Amount",components:{PriceField:pl},props:{amount:{type:[String,Number],default:""},unit:{type:String,required:!0},isSpaceBetween:{type:Boolean,default:!0},title:{type:String,default:"c2c.marketList.amountAvailable"}}},yl={key:0},Cl={class:"amount-price flex-box items-center"};const gl=Ft(hl,[["render",function(e,t,o,r,d,u){const m=i("PriceField");return a(),n("div",{class:p(["flex-box items-center",{"justify-between":o.isSpaceBetween}])},[s("span",null,c(e.$t(o.title)),1),o.isSpaceBetween?y("",!0):(a(),n("span",yl,":")),s("div",Cl,[l(m,{class:"highlight",priceValue:o.amount,currency:o.unit},null,8,["priceValue","currency"]),s("span",null,c(o.unit),1)])],2)}],["__scopeId","data-v-6975d082"]]),fl={name:"Limit",props:{min:{type:String,required:!0},max:{type:String,required:!0},unit:{type:String,required:!0},isSpaceBetween:{type:Boolean,default:!0}},computed:{...D("c2c",["getCurrencyDecimal"])},methods:{getFormatPrice(e){return Ls(e,this.getCurrencyDecimal(this.unit))}}},bl={key:0},vl={class:"limit-price inner-ml-4"},kl={class:"highlight"};const Sl=Ft(fl,[["render",function(e,t,i,o,r,l){return a(),n("div",{class:p(["flex-box",{"justify-between":i.isSpaceBetween}])},[s("span",null,c(e.$t("c2c.marketList.limitPerTrade")),1),i.isSpaceBetween?y("",!0):(a(),n("span",bl,":")),s("div",vl,[s("span",kl,c(l.getFormatPrice(i.min))+" - "+c(l.getFormatPrice(i.max)),1),s("span",null,c(i.unit),1)])],2)}],["__scopeId","data-v-bf2044e7"]]),Al={name:"MarketListActionButton",components:{IconInfo2:xe},props:{action:{type:String,required:!0},isBlocked:{type:Boolean,default:!1}},emits:["click"],computed:{isBuyAction(){return"BUY"===this.action},actionText(){return this.isBuyAction?this.$t("t.buy"):this.$t("t.sell")}}},Ml={key:0,class:"action-blocked inline-flex items-center justify-center"};const Il=Ft(Al,[["render",function(e,t,o,d,u,m){const y=i("IconInfo2"),g=i("Tooltip"),f=i("BaseButton");return o.isBlocked?(a(),n("div",Ml,[r(c(e.$t("c2c.marketList.blocked"))+" ",1),l(g,{class:"blocked--tooltip",tooltipStyle:{width:"106px"},placement:"top-end"},{content:C((()=>[l(y,{class:"tooltip-icon-wrapper"})])),tooltip:C((()=>[s("span",null,c(e.$t("c2c.marketList.blocked.reminder")),1)])),_:1})])):(a(),h(f,{key:1,class:p(["action-btn",[m.isBuyAction?"green":"red"]]),size:"small",onClick:t[0]||(t[0]=t=>e.$emit("click"))},{default:C((()=>[r(c(m.actionText),1)])),_:1},8,["class"]))}],["__scopeId","data-v-dabdff67"]]),wl={name:"MarketListRow",components:{IconNotification:ze,PaymentTag:Ta,Nickname:ol,Completion:dl,Amount:gl,Limit:Sl,MarketListActionButton:Il},props:{index:{type:Number,required:!0},item:{type:Object,default:()=>({})},handleAction:{type:Function,required:!0}},computed:{...t(["lang"]),...D("c2c",["getCurrencyDecimal","c2cFiatInfoMap","getCurrencyBaseRate"]),unitPrice(){var e;const t=(null==(e=this.c2cFiatInfoMap[this.item.quoteCurrency])?void 0:e.usdRate)||0,i=this.getCurrencyDecimal(this.item.quoteCurrency);return Es(this.item.priceSettings,{formPrice:this.getCurrencyBaseRate(this.item.baseCurrency),toRate:t,decimal:i})},formatPrice(){const e=this.getCurrencyDecimal(this.item.quoteCurrency);return Ls(this.unitPrice,e)},isFloatingPrice(){return this.item.priceSettings.type===De.MARKET}},methods:{handleNameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.item.owner.username}})}}},Tl={class:"flex-box items-center inner-ml-2"},_l={class:"price-value"};const Dl=[{id:"advertisers",lang:"c2c.marketList.advertisers_completion",textAlign:"left"},{id:"price",lang:"c2c.marketList.unitPrice",textAlign:"left"},{id:"amount-limit",lang:"c2c.marketList.amount_limits",textAlign:"left"},{id:"payment-method",lang:"t.paymentMethod_s",textAlign:"left"},{id:"action",lang:"",textAlign:"right"}],Pl={name:"DesktopMarketList",components:{TablePanel:Ke,MarketListHeader:il,MarketListRow:Ft(wl,[["render",function(e,t,o,r,d,p){const g=i("Nickname"),f=i("Completion"),b=i("Cell"),v=i("IconNotification"),k=i("ToolTip"),S=i("Amount"),A=i("Limit"),M=i("PaymentTag"),I=i("MarketListActionButton"),w=i("Row");return a(),h(w,{class:"market-list-row",index:o.index,disableBackgroun
2d:"",disableCssHoverEffect:""},{default:C((()=>[l(b,{class:"advertisers",textAlign:"left"},{default:C((()=>[l(g,{nickname:o.item.owner.alias,isOnline:o.item.owner.isOnline,size:"small",hasLink:"",onClick:p.handleNameClick},null,8,["nickname","isOnline","onClick"]),l(f,{class:"advertisers--completion",trades:o.item.trades,showTooltip:""},null,8,["trades"])])),_:1}),l(b,{textAlign:"left"},{default:C((()=>[s("div",Tl,[s("span",_l,c(p.formatPrice),1),s("span",null,c(o.item.quoteCurrency),1),p.isFloatingPrice?(a(),h(k,{key:0,tooltip:e.$t("t.floatingPrice")},{content:C((()=>[l(v,{class:"notification-icon"})])),_:1},8,["tooltip"])):y("",!0)])])),_:1}),l(b,{textAlign:"left"},{default:C((()=>[l(S,{amount:o.item.availableAmount,unit:o.item.baseCurrency,isSpaceBetween:!1},null,8,["amount","unit"]),l(A,{min:o.item.orderMinAmount,max:o.item.orderMaxAmount,unit:o.item.quoteCurrency,isSpaceBetween:!1},null,8,["min","max","unit"])])),_:1}),l(b,{textAlign:"left",class:"payment-methods"},{default:C((()=>[(a(!0),n(u,null,m(o.item.paymentMethodTypes,(e=>(a(),h(M,{key:e,class:"payment-item",methodType:e},null,8,["methodType"])))),128))])),_:1}),l(b,{textAlign:"right"},{default:C((()=>[l(I,{action:o.item.action,isBlocked:o.item.owner.isBlocked,onClick:t[0]||(t[0]=e=>o.handleAction(o.item))},null,8,["action","isBlocked"])])),_:1})])),_:1},8,["index"])}],["__scopeId","data-v-5472640d"]])},props:{marketList:{type:Array,required:!0},ruleForm:{type:Object,required:!0},isLoading:{type:Boolean,default:!1},handleAction:{type:Function,required:!0}},data:()=>({headerTitlesData:Dl}),methods:{setSortData({key:e,order:t}){this.ruleForm.sortKey=e,this.ruleForm.sortOrder=t}}},Ll={class:"market-table"};const El=Ft(Pl,[["render",function(e,t,s,r,c,d){const y=i("MarketListHeader"),g=i("MarketListRow"),f=i("TablePanel"),b=P("loading");return o((a(),n("div",Ll,[l(f,{isEmpty:0===s.marketList.length,hasBoundary:!1,headerSize:"small",bodySize:"small"},{header:C((()=>[l(y,{class:p({hide:s.isLoading}),headerTitles:c.headerTitlesData,sortKey:s.ruleForm.sortKey,onSort:d.setSortData},null,8,["class","headerTitles","sortKey","onSort"])])),body:C((()=>[(a(!0),n(u,null,m(s.marketList,((e,t)=>(a(),h(g,{key:e.id,index:t,item:e,handleAction:s.handleAction},null,8,["index","item","handleAction"])))),128))])),_:1},8,["isEmpty"])])),[[b,s.isLoading]])}],["__scopeId","data-v-a3cf4600"]]),xl=Ft({__name:"ListEmpty",props:{text:{type:String,default:""},routerParam:{type:Object,default:null}},setup:e=>(t,o)=>{const d=i("RouterLink");return a(),h(Ye,{class:"no-data-available"},{"empty-text":C((()=>[e.routerParam?(a(),h(d,{key:1,class:"link",to:e.routerParam},{default:C((()=>[s("span",null,c(e.text||t.$t("t.noDataFound")),1),l(F(ae))])),_:1},8,["to"])):(a(),n(u,{key:0},[r(c(e.text||t.$t("t.noDataFound")),1)],64))])),_:1})}},[["__scopeId","data-v-00986b5c"]]),Nl={name:"MobileUnitPrice",components:{IconNotification:ze},props:{item:{type:Object,required:!0}},computed:{...D("c2c",["getCurrencyDecimal","c2cFiatInfoMap","getCurrencyBaseRate"]),unitPrice(){var e;const t=(null==(e=this.c2cFiatInfoMap[this.item.quoteCurrency])?void 0:e.usdRate)||0,i=this.getCurrencyDecimal(this.item.quoteCurrency);return Es(this.item.priceSettings,{formPrice:this.getCurrencyBaseRate(this.item.baseCurrency),toRate:t,decimal:i})},formatPrice(){const e=this.getCurrencyDecimal(this.item.quoteCurrency);return Ls(this.unitPrice,e)},isFloatingPrice(){return this.item.priceSettings.type===De.MARKET}}},Rl={class:"price-info"},Bl={class:"value"};const Ol=Ft(Nl,[["render",function(e,t,o,d,u,m){const p=i("IconNotification"),g=i("ToolTip");return a(),n("div",null,[s("span",null,c(e.$t("c2c.marketList.unitPrice")),1),s("div",Rl,[s("span",Bl,c(m.formatPrice),1),r(" "+c(o.item.quoteCurrency)+" ",1),m.isFloatingPrice?(a(),h(g,{key:0,tooltip:e.$t("t.floatingPrice")},{content:C((()=>[l(p,{class:"notification-icon"})])),_:1},8,["tooltip"])):y("",!0)])])}],["__scopeId","data-v-6344e015"]]),Fl={name:"MobileMarketListCard",components:{Nickname:ol,Completion:dl,Amount:gl,Limit:Sl,MarketListActionButton:Il,PaymentTag:Ta,MobileUnitPrice:Ol},props:{item:{type:Object,required:!0},handleAction:{type:Function,required:!0}},computed:{...t(["lang"])},methods:{handleNameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.item.owner.username}})}}},Ul={class:"card-wrapper"},$l={class:"flex-center-between"},ql={class:"flex-center-between"},Vl={class:"inner-ml-4"};const Hl=Ft(Fl,[["render",function(e,t,o,r,c,d){const p=i("Nickname"),y=i("Completion"),C=i("MobileUnitPrice"),g=i("MarketListActionButton"),f=i("Amount"),b=i("Limit"),v=i("PaymentTag");return a(),n("div",Ul,[s("div",$l,[l(p,{nickname:o.item.owner.alias,isOnline:o.item.owner.isOnline,size:"small",hasLink:"",onClick:d.handleNameClick},null,8,["nickname","isOnline","onClick"]),l(y,{trades:o.item.trades,showTooltip:""},null,8,["trades"])]),s("div",ql,[l(C,{item:o.item},null,8,["item"]),l(g,{action:o.item.action,isBlocked:o.item.owner.isBlocked,onClick:t[0]||(t[0]=e=>o.handleAction(o.item))},null,8,["action","isBlocked"])]),s("div",null,[l(f,{amount:o.item.availableAmou
2nt,unit:o.item.baseCurrency},null,8,["amount","unit"]),l(b,{class:"limit",min:o.item.orderMinAmount,max:o.item.orderMaxAmount,unit:o.item.quoteCurrency},null,8,["min","max","unit"])]),s("div",Vl,[(a(!0),n(u,null,m(o.item.paymentMethodTypes,(e=>(a(),h(v,{key:e,class:"payment-item",methodType:e},null,8,["methodType"])))),128))])])}],["__scopeId","data-v-241b454c"]]),jl={name:"DropdownAccountContent",components:{PaymentTag:Ta,IconNotificationCheck:ne},props:{name:{type:String,default:""},paymentType:{type:String,default:""},accountNumber:{type:String,default:""},isSelected:{type:Boolean,default:!1}},methods:{maskAccountNumber:e=>`****${e.substr(-4)}`}},Gl={class:"dropdown-account-content"},zl={class:"name"},Kl={class:"account-wrapper"},Yl={class:"account-number"};const Wl=Ft({name:"DropdownAccount",components:{Dropdown:ke,DropdownItem:ve,DropdownAccountContent:Ft(jl,[["render",function(e,t,o,r,d,u){const m=i("PaymentTag"),p=i("IconNotificationCheck");return a(),n("div",Gl,[s("div",zl,c(o.name),1),s("div",Kl,[l(m,{methodType:o.paymentType},null,8,["methodType"]),s("span",Yl,c(u.maskAccountNumber(o.accountNumber)),1),l(p,{style:E({opacity:o.isSelected?1:0}),class:"icon-check"},null,8,["style"])])])}],["__scopeId","data-v-dd365614"]]),IconAdd:Te},props:{accountList:{type:Array,default:()=>[]},selectedAccountId:{type:String,default:""},onAddPaymentMethodClick:{type:Function,default:()=>{}}},emits:["update:selectedAccountId"],computed:{selectedAccountInfo(){const e=this.accountList.find((e=>e.id===this.selectedAccountId));return{name:e.data.properties.alias,paymentType:e.data.type,accountNumber:e.data.properties.accountNumber}}},methods:{handleSelect(e){this.$emit("update:selectedAccountId",e)}}},[["render",function(e,t,o,r,d,p){const y=i("DropdownAccountContent"),g=i("DropdownItem"),f=i("IconAdd"),b=i("Dropdown");return a(),h(b,{class:"dropdown-account",value:o.selectedAccountId,onInput:p.handleSelect},{value:C((()=>[l(y,N(p.selectedAccountInfo,{class:"selected-account"}),null,16)])),default:C((()=>[(a(!0),n(u,null,m(o.accountList,((e,t)=>(a(),h(g,{key:t,value:e.id},{default:C((()=>[l(y,{name:e.data.properties.alias,paymentType:e.data.type,accountNumber:e.data.properties.accountNumber,isSelected:e.id===o.selectedAccountId},null,8,["name","paymentType","accountNumber","isSelected"])])),_:2},1032,["value"])))),128)),s("div",{class:"add-payment",onClick:t[0]||(t[0]=(...e)=>o.onAddPaymentMethodClick&&o.onAddPaymentMethodClick(...e))},[l(f,{class:"icon-add"}),s("div",null,c(e.$t("c2c.createAds.paymentReceived.addNewPayment")),1)])])),_:1},8,["value","onInput"])}],["__scopeId","data-v-4b4bec22"]]),Zl={name:"PendingProtectionToolTip",components:{IconNotification:ze},props:{isSell:{type:Boolean,default:!1},quoteCurrency:{type:String,default:""}},computed:{...t("c2c",["c2cFiatInfoList"]),fiatInfo(){return this.c2cFiatInfoList.find((e=>e.shortName===this.quoteCurrency))||{}},pendingTime(){return this.fiatInfo.payPendingTime||0},pendingDay(){return B(this.pendingTime).div(24).dp(1,B.ROUND_DOWN).toNumber()},isReleaseProtectionShown(){return this.pendingTime>0},pendingProtectionDescriptionI18nKey(){return this.isSell?"c2c.pendingProtection.seller":"c2c.pendingProtection.buyer"}}},Xl={class:"pending-protection flex-center-center inner-ml-4"};const Ql=Ft(Zl,[["render",function(e,t,n,o,r,d){const u=i("IconNotification"),m=i("ToolTip");return d.isReleaseProtectionShown?(a(),h(m,{key:0,tooltip:e.$t(d.pendingProtectionDescriptionI18nKey,{pendingCurrency:n.quoteCurrency,pendingTime:d.pendingTime})},{content:C((()=>[s("div",Xl,[s("div",null,c(e.$t("c2c.pendingProtection",{pendingTime:d.pendingDay})),1),l(u,{class:"status-icon"})])])),_:1},8,["tooltip"])):y("",!0)}],["__scopeId","data-v-4aefd1a8"]]),Jl={AMOUNT:"amount",PRICE:"price"},ec={name:"CreateOrderModal",components:{BrandDialog:J,Completion:dl,NickName:ol,ReadOnlyNote:Lo,PaymentTag:Ta,AmountInput:ka,IconSwitch:$t,IconInfo2:xe,PaymentDropdown:za,BottomFixedPanel:Ei,DropdownAccount:Wl,PendingProtectionToolTip:Ql,IconAdd:Te,DynamicAddOrEditPaymentMethodModal:us,BrandMessage:We},props:{isSell:{type:Boolean,default:!1},advertId:{type:String,default:""},advert:{type:Object,default:null}},emits:["onClose"],data(){return{Genre:Ze,INPUT_TYPE:Jl,isFocus:{[Jl.AMOUNT]:!1,[Jl.PRICE]:!1},formData:{selectedPaymentMethod:{},selectedPaymentMethodIds:"",amount:"",price:""},isShowAddPaymentModal:!1,advertData:this.advert,isLoading:!1,paymentAccounts:[],baseCurrencyError:"",quoteCurrencyError:"",noticeText:""}},computed:{...t(["currencyMap","lang"]),...t("c2c",["c2cInitInfo"]),...D("c2c",["getCurrencyDecimal","c2cFiatInfoMap","paymentMethodsInfoMap","getCurrencyBaseRate"]),inputErrorMessage(){return this.baseCurrencyError?this.baseCurrencyError:this.isSell&&this.isInputAmountGreater?this.$t("futuresMain.insufficientBalance.title"):""}
2,userAvailableAmount(){var e;return Number(null==(e=this.currencyData)?void 0:e.available)||0},currencyData(){var e;return this.currencyMap[null==(e=this.advertData)?void 0:e.baseCurrency]||{}},baseCurrency(){var e;return(null==(e=this.advertData)?void 0:e.baseCurrency)||""},quoteCurrency(){var e;return(null==(e=this.advertData)?void 0:e.quoteCurrency)||""},isConfirmEnabled(){return this.formData.amount&&this.formData.price&&!this.isInputAmountGreater&&this.isPaymentSelected&&!this.quoteCurrencyError&&!this.baseCurrencyError},isPaymentSelected(){return Object.keys(this.formData.selectedPaymentMethod).length||this.formData.selectedPaymentMethodIds},isABAPaymentSelected(){return this.formData.selectedPaymentMethod.type===Ui},availablePaymentMethodTypes(){const e=Object.keys(this.paymentMethodsInfoMap);return(this.advertData.paymentMethodTypes||[]).filter((t=>e.includes(t)))},payments(){return this.hasMoreTags?this.advertData.paymentMethodTypes.slice(0,5):this.advertData.paymentMethodTypes},hasMoreTags(){return this.advertData.paymentMethodTypes.length>5},remainingTagsCount(){return this.advertData.paymentMethodTypes.length-5},paymentMethodTitle(){return this.isSell?"c2c.createAds.paymentReceivedBy":"t.paymentMethod"},availableAmount(){return B(Number(this.advertData.totalAmount)).minus(B(Number(this.advertData.processingAmount))).minus(B(Number(this.advertData.transferredAmount))).toString()},getMaxAmount(){if(!Number(this.unitPrice))return 0;if(!this.isSell)return Number(this.availableAmount)<=Number(B(this.advertData.orderMaxAmount))?Number(this.availableAmount):B(this.advertData.orderMaxAmount).div(B(this.unitPrice)).dp(4,B.ROUND_DOWN).toNumber();const e=Number(B(this.userAvailableAmount).times(B(this.unitPrice))),t=B(this.advertData.orderMaxAmount).div(B(this.unitPrice)).dp(4,B.ROUND_DOWN).toNumber();return e>=Number(B(this.advertData.orderMaxAmount))?t>Number(this.availableAmount)?Number(this.availableAmount):t:Number(this.userAvailableAmount)>Number(this.availableAmount)?Number(this.availableAmount):Number(this.userAvailableAmount)},unitPrice(){var e;const t=(null==(e=this.c2cFiatInfoMap[this.advertData.quoteCurrency])?void 0:e.usdRate)||0,i=this.getCurrencyDecimal(this.advertData.quoteCurrency);return Es(this.advertData.priceSettings,{formPrice:this.getCurrencyBaseRate(this.advertData.baseCurrency),toRate:t,decimal:i})},hasPaymentMethods(){return this.paymentAccounts.length},isInputAmountGreater(){return Number(this.formData.amount)>this.userAvailableAmount&&this.isSell},buttonWrapperComponent(){return this.isMobile?Ei:"div"},priceType(){return this.advertData.priceSettings.type},priceTypeText(){return this.isFloatingType?this.$t("c2c.floating"):this.$t("c2c.fixed")},isFloatingType(){return this.priceType===De.MARKET}},async created(){this.isLoading=!0;try{const e=[this.getPaymentMethods()];this.advertData||e.push(re.getAdvert(this.advertId));const[t,i]=await Promise.all(e);i&&(this.advertData=i.advert),this.paymentAccounts=t.totalRows>0?this.filterPayments(t.paymentMethods):[],this.isSell?this.paymentAccounts.length&&(this.formData.selectedPaymentMethodIds=this.paymentAccounts[0].id):this.formData.selectedPaymentMethod=this.paymentMethodsInfoMap[this.availablePaymentMethodTypes[0]]}catch{}finally{this.isLoading=!1}},methods:{onPaymentSuccessAdd(e){this.availablePaymentMethodTypes.includes(e.data.type)&&(this.paymentAccounts.push(e),this.formData.selectedPaymentMethodIds=e.id)},onGoToWallet(){const e={name:"walletSpot",params:{lang:this.lang}};this.isNotDesktop?this.$router.push(e):window.open(this.$router.resolve(e).href,"_blank")},onAddPaymentMethodClick(){this.isShowAddPaymentModal=!0},async onAmountInput(e,t){var i,n;const a=(null==(n=null==(i=this.c2cInitInfo.supportedFiats)?void 0:i.find((e=>e.name===this.quoteCurrency)))?void 0:n.decimal)||0;await this.$nextTick(),this.formData.price=B(this.formData.amount||0).times(B(this.unitPrice)).dp(a,B.ROUND_DOWN).toNumber(),this.baseCurrencyError=t,this.quoteCurrencyError=""},async onPriceInput(e,t){await this.$nextTick(),this.formData.amount=B(this.formData.price||0).div(B(this.unitPrice)).dp(8,B.ROUND_UP).toNumber(),this.quoteCurrencyError=t,this.baseCurrencyError=""},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},handlePayment(e){this.formData.selectedPaymentMethod=e},async onConfirmClick(){this.isLoading=!0;let e=this.isSell?"paymentMethodIds":"paymentMethodTypes",t=this.isSell?this.formData.selectedPaymentMethodIds:this.formData.selectedPaymentMethod.type;const i={advertId:this.advertId,price:this.unitPrice.toString(),[e]:[t]};this.isFocus[Jl.AMOUNT]?(i.amountType=Xe.BASE_CURRENCY,i.amount=this.formData.amount.toString()):(i.amountType=Xe.QUOTE_CURRENCY,i.amount=this.formData.price.toString());try{this.noticeText="";const{order:e}=await re.makeOrder(i);this.$router.push({name:"c2cOrder",params:{id:e.id,lang:this.lang}}),this.onCloseClick()}catch(n){n===ue.C2C_OTC_MARKET_PRICE_FLUCTUATION&&(this.noticeText="c2c.createOrder.notice.marketPriceFluctuations")}this.isLoading=!1}
2,handleFocus(e){Object.keys(this.isFocus).forEach((t=>{this.isFocus[t]=t===e}))},onCloseClick(){this.$emit("onClose")},getPaymentMethods:async()=>await re.getPaymentMethods({sorting:"createdAt:ASC",pageSize:10,page:1}),filterPayments(e){return e.filter((e=>{const t=e.data.type;return this.availablePaymentMethodTypes.includes(t)}))}}},tc={class:"left"},ic={class:"nickname-wrapper"},nc={class:"payment-tags-wrapper inner-ml-4"},ac={key:0,class:"remaining-tags-count"},sc={class:"price-container"},oc={class:"price-wrapper"},rc={class:"flex items-center"},lc={class:"unit-price"},cc={class:"price-wrapper"},dc={class:"price"},uc={class:"price-wrapper"},mc={class:"price"},pc={key:0,class:"horizontal-line"},hc={class:"right inner-mt-24"},yc={class:"input-container"},Cc={class:"label-wrapper"},gc={class:"label"},fc={key:0},bc={class:"input-container mt-16"},vc={class:"label"},kc={class:"input-container payment-method"},Sc={class:"label"},Ac={key:0,class:"payment-method-note"};const Mc=Ft(ec,[["render",function(e,t,o,d,g,f){const b=i("BrandMessage"),v=i("NickName"),k=i("Completion"),S=i("PaymentTag"),A=i("IconInfo2"),M=i("Tooltip"),w=i("ReadOnlyNote"),T=i("AmountInput"),_=i("DropdownAccount"),D=i("IconAdd"),P=i("PaymentDropdown"),L=i("PendingProtectionToolTip"),E=i("BaseButton"),x=i("BrandDialog"),N=i("DynamicAddOrEditPaymentMethodModal");return a(),n("div",null,[l(x,{class:"buy-modal",width:"894px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_create_order_dialog",onClosed:f.onCloseClick},{header:C((()=>[r(c(e.$t(o.isSell?"t.sellAndCurrency":"t.buyAndCurrency",{currency:f.baseCurrency})),1)])),body:C((()=>[g.noticeText?(a(),h(b,{key:0,genre:g.Genre.WARNING,closeIcon:""},{default:C((()=>[r(c(e.$t(g.noticeText)),1)])),_:1},8,["genre"])):y("",!0),g.isLoading?y("",!0):(a(),n("div",{key:1,class:p(["container",{"has-notice":g.noticeText}])},[s("div",tc,[s("div",ic,[l(v,{nickname:g.advertData.owner.alias,username:g.advertData.owner.username,isOnline:g.advertData.owner.isOnline,hasLink:""},null,8,["nickname","username","isOnline"]),l(k,{trades:g.advertData.trades},null,8,["trades"])]),s("div",nc,[(a(!0),n(u,null,m(f.payments,(e=>(a(),h(S,{key:e,methodType:e},null,8,["methodType"])))),128)),f.hasMoreTags?(a(),n("span",ac," +"+c(f.remainingTagsCount),1)):y("",!0)]),s("div",sc,[s("div",oc,[s("div",rc,[r(c(e.$t("c2c.marketList.unitPrice"))+" ("+c(f.priceTypeText)+") ",1),f.isFloatingType?(a(),h(M,{key:0,class:"price-floating-tooltip",tooltipStyle:{width:"240px"},placement:"top"},{content:C((()=>[l(A,{class:"tooltip-icon"})])),tooltip:C((()=>[s("span",null,c(e.$t("c2c.buySell.floatingPrice.tooltip")),1)])),_:1})):y("",!0)]),s("div",null,[s("span",lc,c(f.getFormatPrice(f.unitPrice,f.quoteCurrency)),1),r(" "+c(f.quoteCurrency),1)])]),s("div",cc,[s("div",null,c(e.$t("c2c.marketList.amountAvailable")),1),s("div",null,[s("span",dc,c(f.getFormatPrice(f.availableAmount,f.baseCurrency)),1),r(" "+c(f.baseCurrency),1)])]),s("div",uc,[s("div",null,c(e.$t("c2c.marketList.limitPerTrade")),1),s("div",null,[s("span",mc,c(f.getFormatPrice(g.advertData.orderMinAmount,f.quoteCurrency))+" - "+c(f.getFormatPrice(g.advertData.orderMaxAmount,f.quoteCurrency)),1),r(" "+c(f.quoteCurrency),1)])])]),e.isMobile?y("",!0):(a(),h(w,{key:0,title:e.$t("t.note"),text:g.advertData.note},null,8,["title","text"]))]),e.isMobile?(a(),n("hr",pc)):y("",!0),s("div",hc,[s("div",yc,[s("div",Cc,[s("div",gc,c(o.isSell?e.$t("c2c.buySell.iWantToSell"):e.$t("c2c.buySell.iWantToBuy")),1),o.isSell?(a(),n("div",fc,c(e.$t("wallets.availableBalance"))+" "+c(f.getFormatPrice(f.userAvailableAmount,f.baseCurrency))+" "+c(f.baseCurrency),1)):y("",!0)]),l(T,{value:g.formData.amount,"onUpdate:value":t[0]||(t[0]=e=>g.formData.amount=e),enableMax:"",currency:f.baseCurrency,maxAmount:f.getMaxAmount,errorMsg:f.inputErrorMessage,isFocus:g.isFocus[g.INPUT_TYPE.AMOUNT],isCrypto:"",onInput:f.onAmountInput,onFocus:t[1]||(t[1]=e=>f.handleFocus(g.INPUT_TYPE.AMOUNT))},null,8,["value","currency","maxAmount","errorMsg","isFocus","onInput"]),o.isSell&&f.isInputAmountGreater?(a(),n("div",{key:0,class:"go-to-wallet",onClick:t[2]||(t[2]=(...e)=>f.onGoToWallet&&f.onGoToWallet(...e))},c(e.$t("c2c.buySell.goToWallet")),1)):y("",!0)]),s("div",bc,[s("div",vc,c(o.isSell?e.$t("c2c.buySell.iWillReceive"):e.$t("c2c.buySell.iWillPay")),1),l(T,{value:g.formData.price,"onUpdate:value":t[3]||(t[3]=e=>g.formData.price=e),currency:f.quoteCurrency,errorMsg:g.quoteCurrencyError,isFocus:g.isFocus[g.INPUT_TYPE.PRICE],onInput:f.onPriceInput,onFocus:t[4]||(t[4]=e=>f.handleFocus(g.INPUT_TYPE.PRICE))},null,8,["value","currency","errorMsg","isFocus","onInput"])]),s("div",kc,[s("div",Sc,c(e.$t(f.paymentMethodTitle)),1),o.isSell?(a(),n(u,{key:0},[f.hasPaymentMethods?(a(),h(_,{key:0,selectedAccountId:g.formData.selectedPaymentMethodIds,"onUpdate:selectedAccountId":t[5]||
2(t[5]=e=>g.formData.selectedPaymentMethodIds=e),accountList:g.paymentAccounts,onAddPaymentMethodClick:f.onAddPaymentMethodClick},null,8,["selectedAccountId","accountList","onAddPaymentMethodClick"])):(a(),n("div",{key:1,class:"add-payment-method",onClick:t[6]||(t[6]=(...e)=>f.onAddPaymentMethodClick&&f.onAddPaymentMethodClick(...e))},[l(D,{class:"icon-add"}),r(" "+c(e.$t("c2c.createAds.paymentReceived.addNewPayment")),1)]))],64)):(a(),n(u,{key:1},[l(P,{appliedPaymentList:f.availablePaymentMethodTypes,selectedMethod:g.formData.selectedPaymentMethod,handleSelect:f.handlePayment},null,8,["appliedPaymentList","selectedMethod","handleSelect"]),f.isABAPaymentSelected?(a(),n("p",Ac,c(e.$t("c2c.abaBank.note")),1)):y("",!0)],64))]),e.isMobile?(a(),h(w,{key:0,class:"note",title:e.$t("t.note"),text:g.advertData.note},null,8,["title","text"])):y("",!0),(a(),h(I(f.buttonWrapperComponent),{class:"button-wrapper tx-align--center"},{default:C((()=>[l(L,{quoteCurrency:f.quoteCurrency,isSell:o.isSell},null,8,["quoteCurrency","isSell"]),l(E,{disabled:!f.isConfirmEnabled,isLoading:g.isLoading,class:"primary w-100",size:"large",onClick:f.onConfirmClick},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["disabled","isLoading","onClick"])])),_:1}))])],2))])),_:1},8,["fullStyle","onClosed"]),g.isShowAddPaymentModal?(a(),h(N,{key:0,isShow:g.
2isShowAddPaymentModal,"onUpdate:isShow":t[7]||(t[7]=e=>g.isShowAddPaymentModal=e),onSuccessUpdate:f.onPaymentSuccessAdd},null,8,["isShow","onSuccessUpdate"])):y("",!0)])}],["__scopeId","data-v-32d52d14"]]),Ic={name:"MarketList",components:{MarketFilter:tl,DesktopMarketList:El,ListEmpty:xl,MobileMarketListCard:Hl,CreateOrderModal:Mc,Pagination:Je,LoadMoreObserver:Qe},data:()=>({marketList:[],isShowCreateOrderModal:!1,isLoading:!1,selectedAdId:"",isSell:!1,defaultCurrency:et.FIAT_TYPE,ruleForm:{sortKey:"",sortOrder:"",side:et.ORDER_SIDE,baseCurrency:et.CRYPTO_TYPE,quoteCurrency:et.FIAT_TYPE,limitAmount:"",paymentMethod:{}},pageData:{currentPage:1,totalRows:0,totalPages:0}}),computed:{...t(["loginState","lang"]),...t("c2c",["c2cInitInfo"]),cryptoList(){const{supportedCryptos:e}=this.c2cInitInfo;return e?e.map((e=>e.name)):[]},showEmptyHint(){return!this.marketList.length&&!this.isLoading}},watch:{cryptoList:{handler(e){0===e.length||e.includes(this.ruleForm.baseCurrency)?this.isNotDesktop&&this.resetMarketList():this.ruleForm.baseCurrency=e[0]},deep:!0},ruleForm:{handler(){this.resetMarketList()},deep:!0},isNotDesktop(){this.resetMarketList()}},methods:{resetMarketList(){this.resetPageData(),this.getMarketList()},resetPageData(){this.pageData={currentPage:1,totalRows:0,totalPages:0}},onCloseCreateOrderModal(){this.isShowCreateOrderModal=!1,this.selectedAdId=""},getMarketList(e){const{sortKey:t,sortOrder:i,side:n,baseCurrency:a,quoteCurrency:s,limitAmount:o,paymentMethod:r}=this.ruleForm,l={sorting:`price:${n===Pe.BUY?"DESC":"ASC"},createdAt:DESC,ownerAccessedAt:DESC`,page:this.pageData.currentPage,pageSize:10,side:n,baseCurrency:a};"ALL"!==s&&(l.quoteCurrency=s),t&&i&&(l.sorting=`${t}:${i.toUpperCase()}`),o&&(l.limitAmount=o),Object.keys(r).length&&"ALL"!==r.type&&(l.paymentMethodTypes=r.type),this.isLoading=!0,re.getMarketList(l).then((t=>{const{adverts:i,totalRows:n,totalPages:a}=t;for(let e of i)e.availableAmount=String(e.totalAmount-e.processingAmount-e.transferredAmount),e.action="BUY"===e.side?"SELL":"BUY";this.marketList=e?this.marketList.concat(i):i,this.pageData.totalRows=n,this.pageData.totalPages=a})).finally((()=>{this.isLoading=!1}))},handleAction(e){this.loginState||this.$router.push({name:"login",params:{lang:this.lang},query:{redirect:this.$route.fullPath}}),this.isSell="BUY"===e.side,re.getOrderValidation(e.id).then((()=>{this.selectedAdId=e.id,this.isShowCreateOrderModal=!0})).catch((t=>{if(ue.C2C_OTC_BLOCKED_BY_USER===t){const t=this.marketList.find((t=>t.id===e.id));t.owner={...t.owner,isBlocked:!0}}}))},handlePageChange(e){this.pageData.currentPage=e,this.getMarketList()},handleLoadMore(){this.isLoading||this.pageData.currentPage===this.pageData.totalPages||(this.pageData.currentPage++,this.getMarketList(!0))}}},wc={class:"market-list"};const Tc=Ft(Ic,[["render",function(e,t,s,o,r,c){const d=i("MarketFilter"),p=i("ListEmpty"),C=i("MobileMarketListCard"),g=i("LoadMoreObserver"),f=i("DesktopMarketList"),b=i("Pagination"),v=i("CreateOrderModal");return a(),n("div",wc,[l(d,{targetCoinList:c.cryptoList,ruleForm:r.ruleForm,defaultCurrency:r.defaultCurrency},null,8,["targetCoinList","ruleForm","defaultCurrency"]),c.showEmptyHint?(a(),h(p,{key:0})):e.isNotDesktop?(a(),n(u,{key:1},[(a(!0),n(u,null,m(r.marketList,(e=>(a(),h(C,{key:e.id,item:e,handleAction:c.handleAction},null,8,["item","handleAction"])))),128)),l(g,{onLoadMore:c.handleLoadMore},null,8,["onLoadMore"])],64)):(a(),n(u,{key:2},[l(f,{marketList:r.marketList,ruleForm:r.ruleForm,isLoading:r.isLoading,handleAction:c.handleAction},null,8,["marketList","ruleForm","isLoading","handleAction"]),l(b,{class:"pagination-control",layout:"prev, pager, next, jumper",background:!1,total:r.pageData.totalRows,currentPage:r.pageData.currentPage,totalPages:r.pageData.totalPages,onHandleCurrentChangeP:c.handlePageChange},null,8,["total","currentPage","totalPages","onHandleCurrentChangeP"])],64)),r.isShowCreateOrderModal?(a(),h(v,{key:3,advertId:r.selectedAdId,isSell:r.isSell,onOnClose:c.onCloseCreateOrderModal},null,8,["advertId","isSell","onOnClose"])):y("",!0)])}],["__scopeId","data-v-97d5b9b0"]]),_c=Object.freeze(Object.defineProperty({__proto__:null,default:Tc},Symbol.toStringTag,{value:"Module"})),Dc={name:"DateRangeTextBlock",components:{IconCalendar:tt,IconChevronDown:ge},props:{dateRangeData:{type:Object,default:()=>({start:null,end:null})},isShowArrow:{type:Boolean,default:!1}},emits:["toggle"],computed:{dateRangeText(){return{start:it(this.dateRangeData.start,"yyyy-MM-dd"),end:it(this.dateRangeData.end,"yyyy-MM-dd")}}},methods:{clickHandler(){this.$emit("toggle")}}},Pc={class:"dates"},Lc={class:"start"},Ec={class:"end"};const xc=Ft(Dc,[["render",function(e,t,o,r,d,u){const m=i("IconCalendar"),p=i("IconChevronDown");return a(),n("div",{class:"date-range-wrapper",onClick:t[0]||(t[0]=(...e)=>u.clickHandler&&u.clickHandler(...e))},[l(m,{class:"icon-calendar"}),s("div",Pc,[s("span",Lc,c(u.dateRangeText.start),1),t[1]||(t[1]=s("span",{class:"dash"},"-",-1)),s("span",Ec,c(u.dateRangeText.end),1)]),o.isShowArrow?(a(),h(p,{key:0,class:"icon-chevron-down"})):y("",!0)])}],["__scopeId","data-v-485623b1"]]),Nc={class:"placeholder"},Rc={key:0},Bc={class:"item-wrapper"};const Oc=Ft({name:"SimpleDropdown",components:{Dropdown:ke,DropdownItem:ve},props:{list:{type:Array,required:!0},selected:{type:String,required:!0},placeholder:{type:String,default:""}},emits:["update:selected"],computed:{selectedText(){return this.list.find((e=>e.key===this.selected)).lang}},methods:{handleSelect(e){this.$emit("update:selected",e)}}},[["render",function(e,t,o,r,l,d){const p=i("DropdownItem"),g=i("Dropdown");return a(),h(g,{class:"dropdown-wrapper",value:o.selected,onInput:d.handleSelect},{placeholder:C((()=>[s("span",Nc,c(o.placeholder),1)])),value:C((()=>
2[o.selected?(a(),n("span",Rc,c(e.$t(d.selectedText)),1)):y("",!0)])),default:C((()=>[(a(!0),n(u,null,m(o.list,(t=>(a(),h(p,{key:t.key,value:t.key},{default:C((()=>[s("div",Bc,c(e.$t(t.lang)),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value","onInput"])}],["__scopeId","data-v-ccbf7df9"]]),Fc={name:"MobileFilter",components:{BrandDialog:J,DateRangeTextBlock:xc,DateRangePickerDialog:nt,SimpleDropdown:Oc,CurrencyDropDown:jr},props:{ruleForm:{type:Object,required:!0},showMobileFilter:{type:Boolean,required:!0},sidesListData:{type:Array,required:!0},adStatusListData:{type:Array,required:!0},onUpdateFilter:{type:Function,required:!0}},emits:["update:showMobileFilter"],data(){return{mobileRuleForm:{...this.ruleForm},CurrencyType:Ve,showDatePickerDialog:!1}},watch:{showMobileFilter(e){e&&(this.mobileRuleForm={...this.ruleForm})}},methods:{onResetClick(){const[e,t]=at();this.mobileRuleForm.statuses="",this.mobileRuleForm.baseCurrency="",this.mobileRuleForm.quoteCurrency="",this.mobileRuleForm.side="",this.mobileRuleForm.dateRange={start:e,end:t}},onApplyClick(){this.onUpdateFilter({...this.mobileRuleForm}),this.closeMobileFilter()},closeMobileFilter(){this.$emit("update:showMobileFilter",!1)}}},Uc={class:"title"},$c={class:"title"},qc={class:"title"},Vc={class:"title"},Hc={class:"title"},jc={class:"flex-box footer-wrapper items-end"};const Gc=["side","baseCurrency","quoteCurrency","statuses"],zc={key:0,class:"label"};const Kc=Ft({name:"MyAdsListFilter",components:{StackView:je,DateRangePickerV2:ot,DateRangeTextBlock:xc,CurrencyDropDown:jr,SimpleDropdown:Oc,IconFilter:He,MobileFilter:Ft(Fc,[["render",function(e,t,o,d,u,m){const p=i("DateRangeTextBlock"),g=i("SimpleDropdown"),f=i("CurrencyDropDown"),b=i("BaseButton"),v=i("BrandDialog"),k=i("DateRangePickerDialog");return a(),n("div",null,[l(v,{class:"mobile-filter",visible:o.showMobileFilter,idPrefix:"p2p_my_ads_filter_dialog",isBrandNewStyle:"",hideScrollbar:"",fullStyle:"",showClose:"",stayAlive:"",onClosed:m.closeMobileFilter},{header:C((()=>[r(c(e.$t("t.filters")),1)])),body:C((()=>[s("div",Uc,c(e.$t("referral.dashboard.history.timePeriod")),1),l(p,{dateRangeData:u.mobileRuleForm.dateRange,onToggle:t[0]||(t[0]=e=>u.showDatePickerDialog=!0)},null,8,["dateRangeData"]),s("div",$c,c(e.$t("c2c.myAdsList.adsType")),1),l(g,{selected:u.mobileRuleForm.side,"onUpdate:selected":t[1]||(t[1]=e=>u.mobileRuleForm.side=e),class:"dropdown",list:o.sidesListData,placeholder:e.$t("c2c.myAdsList.sides")},null,8,["selected","list","placeholder"]),s("div",qc,c(e.$t("t.crypto")),1),l(f,{selectedCurrency:u.mobileRuleForm.baseCurrency,"onUpdate:selectedCurrency":t[2]||(t[2]=e=>u.mobileRuleForm.baseCurrency=e),class:"selector",currencyType:u.CurrencyType.CRYPTO,placeholder:e.$t("t.crypto"),refName:"cryptoDropdown",idPrefix:"p2p_my_ads_currency_filter",idSuffix:"crypto",showAllOption:"",isMobileView:""},null,8,["selectedCurrency","currencyType","placeholder"]),s("div",Vc,c(e.$t("t.fiat")),1),l(f,{selectedCurrency:u.mobileRuleForm.quoteCurrency,"onUpdate:selectedCurrency":t[3]||(t[3]=e=>u.mobileRuleForm.quoteCurrency=e),class:"selector",placeholder:e.$t("t.fiat"),refName:"fiatDropdown",idPrefix:"p2p_my_ads_currency_filter",idSuffix:"fiat",showAllOption:"",isMobileView:"",isHiddenIcon:"",hideBarIcon:""},null,8,["selectedCurrency","placeholder"]),s("div",Hc,c(e.$t("t.status")),1),l(g,{selected:u.mobileRuleForm.statuses,"onUpdate:selected":t[4]||(t[4]=e=>u.mobileRuleForm.statuses=e),class:"dropdown",list:o.adStatusListData,placeholder:e.$t("c2c.myAdsList.adStatus")},null,8,["selected","list","placeholder"])])),footer:C((()=>[s("div",jc,[l(b,{class:"outline-primary action-btn",size:"large",onClick:m.onResetClick},{default:C((()=>[r(c(e.$t("t.reset")),1)])),_:1},8,["onClick"]),l(b,{class:"primary action-btn",size:"large",onClick:m.onApplyClick},{default:C((()=>[r(c(e.$t("earn.filter.apply")),1)])),_:1},8,["onClick"])])])),_:1},8,["visible","onClosed"]),u.showDatePickerDialog?(a(),h(k,{key:0,showDatePickerDialog:u.showDatePickerDialog,"onUpdate:showDatePickerDialog":t[5]||(t[5]=e=>u.showDatePickerDialog=e),dateRange:u.mobileRuleForm.dateRange,"onUpdate:dateRange":t[6]||(t[6]=e=>u.mobileRuleForm.dateRange=e)},null,8,["showDatePickerDialog","dateRange"])):y("",!0)])}],["__scopeId","data-v-75c86e20"]]),FilterLabels:Ft({name:"FilterLabels",components:{IconCross:st},props:{ruleForm:{type:Object,required:!0}},data:()=>({LABEL_LIST:Gc}),computed:{isNoLabel(){return!this.LABEL_LIST.some((e=>this.showLabel(e)))},sideText(){const e=fn.filter((e=>e.key===this.ruleForm.side));return this.$t(e[0].lang)},statusText(){const e=bn.filter((e=>e.key===this.ruleForm.statuses));return this.$t(e[0].lang)}},methods:{labelText(e){switch(e){case"side":return this.sideText;case"baseCurrency":return this.ruleForm.baseCurrency;case"quoteCurrency":return this.ruleForm.quoteCurrency;case"statuses":return this.statusText;default:return""}},removeLabel(e){this.ruleForm[e]=""},showLabel(e){const t=this.ruleForm[e];return t&&"ALL"!==t}}},[["render",function(e,t,s,o,d,h){const C=i("IconCross");return a(),n("div",{class:p(["labels flex-box",{"no-label":h.isNoLabel}])},[(a(!0),n(u,null,m(d.LABEL_LIST,(e=>(a(),n("div",{key:e},[h.showLabel(e)?(a(),n("div",zc,[r(c(h.labelText(e))+" ",1),l(C,{class:"label-cross",width:"7",height:"7",onClick:t=>h.removeLabel(e)},null,8,["onClick"])])):y("",!0)])))),128))],2)}],["__scopeId","data-v-5a8ea8f4"]])},props:{ruleForm:{type:Object,required:!0}},emits:["update:ruleForm"],data:()=>({showMobileFilter:!1,CurrencyType:Ve,sidesListData:fn,adStatusListData:bn,showDatePickerDialog:!1}),watch:{$mq(){this.showMobileFilter=!1}},methods:{onFilterClick(){this.showMobileFilter=!0},onResetClick(){const[e,t]=at({rangeSize:180});this.ruleForm.side="",this.ruleForm.baseCurrency="",this.ruleForm.quoteCurrency="",this.ruleForm.statuses=hn.ENABLE,this.ruleForm.dateRange={start:e,end:t}}
2,onUpdateFilter(e){this.$emit("update:ruleForm",e)}}},[["render",function(e,t,s,o,r,d){const u=i("DateRangePickerV2"),m=i("DateRangeTextBlock"),p=i("SimpleDropdown"),g=i("CurrencyDropDown"),f=i("IconFilter"),b=i("StackView"),v=i("FilterLabels"),k=i("MobileFilter");return a(),n("div",null,[l(b,{class:"filter",isWrap:""},{default:C((()=>[e.isMobile?(a(),h(m,{key:1,dateRangeData:s.ruleForm.dateRange,onToggle:d.onFilterClick},null,8,["dateRangeData","onToggle"])):(a(),h(u,{key:0,dateRange:s.ruleForm.dateRange,"onUpdate:dateRange":t[0]||(t[0]=e=>s.ruleForm.dateRange=e)},null,8,["dateRange"])),e.isMobile?y("",!0):(a(),h(p,{key:2,selected:s.ruleForm.side,"onUpdate:selected":t[1]||(t[1]=e=>s.ruleForm.side=e),class:"dropdown side",list:r.sidesListData,placeholder:e.$t("c2c.myAdsList.sides")},null,8,["selected","list","placeholder"])),e.isMobile?y("",!0):(a(),h(g,{key:3,selectedCurrency:s.ruleForm.baseCurrency,"onUpdate:selectedCurrency":t[2]||(t[2]=e=>s.ruleForm.baseCurrency=e),currencyType:r.CurrencyType.CRYPTO,placeholder:"t.crypto",refName:"cryptoDropdown",idPrefix:"p2p_my_ads_currency_filter",idSuffix:"crypto",showAllOption:""},null,8,["selectedCurrency","currencyType"])),e.isMobile?y("",!0):(a(),h(g,{key:4,selectedCurrency:s.ruleForm.quoteCurrency,"onUpdate:selectedCurrency":t[3]||(t[3]=e=>s.ruleForm.quoteCurrency=e),placeholder:"t.fiat",idPrefix:"p2p_my_ads_currency_filter",idSuffix:"fiat",showAllOption:"",isHiddenIcon:"",hideBarIcon:"",isSearchShown:""},null,8,["selectedCurrency"])),e.isMobile?y("",!0):(a(),h(p,{key:5,selected:s.ruleForm.statuses,"onUpdate:selected":t[4]||(t[4]=e=>s.ruleForm.statuses=e),class:"dropdown status",list:r.adStatusListData,placeholder:e.$t("c2c.myAdsList.adStatus")},null,8,["selected","list","placeholder"])),e.isMobile?y("",!0):(a(),n("div",{key:6,class:"reset",onClick:t[5]||(t[5]=(...e)=>d.onResetClick&&d.onResetClick(...e))},c(e.$t("t.reset")),1)),e.isMobile?(a(),h(f,{key:7,class:"filter-icon",onClick:d.onFilterClick},null,8,["onClick"])):y("",!0)])),_:1}),e.isMobile?(a(),h(v,{key:0,ruleForm:s.ruleForm},null,8,["ruleForm"])):y("",!0),l(k,{showMobileFilter:r.showMobileFilter,"onUpdate:showMobileFilter":t[6]||(t[6]=e=>r.showMobileFilter=e),ruleForm:s.ruleForm,sidesListData:r.sidesListData,adStatusListData:r.adStatusListData,onUpdateFilter:d.onUpdateFilter},null,8,["showMobileFilter","ruleForm","sidesListData","adStatusListData","onUpdateFilter"])])}],["__scopeId","data-v-8ec7e961"]]),Yc={class:"flex-box items-center row-wrapper content inner-ml-24"},Wc={class:"flex-1 title"},Zc={class:"price items-center flex-box justify-end"},Xc={class:"flex-1 transaction"},Qc={class:"flex-1 amount items-center flex-box justify-end"},Jc={class:"flex-1 payment-tags"},ed={class:"flex-box justify-end toggle"},td={class:"flex-box justify-end action"};const id=Ft({name:"MyAdsListHeader"},[["render",function(e,t,i,o,r,l){return a(),n("div",Yc,[s("span",Wc,c(e.$t("c2c.myAdsList.adsType")),1),s("span",Zc,c(e.$t("c2c.marketList.unitPrice")),1),s("span",Xc,c(e.$t("c2c.myAdsList.transactionSettings")),1),s("span",Qc,c(e.$t("c2c.marketList.amountAvailable")),1),s("span",Jc,c(e.$t("t.paymentMethod_s")),1),s("span",ed,c(e.$t("c2c.status.active")),1),s("span",td,c(e.$t("t.action")),1)])}],["__scopeId","data-v-c0c3546b"]]),{enableC2CShare:nd}=j,ad={name:"CardMoreActions",props:{actionsVisible:{type:Boolean,default:!1},isEnable:{type:Boolean,required:!0},isBlocked:{type:Boolean,required:!0},onEditClick:{type:Function,required:!0},onDeleteClick:{type:Function,required:!0},onShareClick:{type:Function,required:!0}},computed:{isShowShare(){return nd&&this.isEnable}}},sd={class:"actions"};const od=Ft(ad,[["render",function(e,t,i,r,l,u){return o((a(),n("div",sd,[i.isBlocked?y("",!0):(a(),n("div",{key:0,class:"item",onClick:t[0]||(t[0]=(...e)=>i.onEditClick&&i.onEditClick(...e))},c(e.$t("t.edit")),1)),u.isShowShare?(a(),n("div",{key:1,class:"item",onClick:t[1]||(t[1]=(...e)=>i.onShareClick&&i.onShareClick(...e))},c(e.$t("wallets.share")),1)):y("",!0),s("div",{class:"item",onClick:t[2]||(t[2]=(...e)=>i.onDeleteClick&&i.onDeleteClick(...e))},c(e.$t("t.delete")),1)],512)),[[d,i.actionsVisible]])}],["__scopeId","data-v-e1400928"]]);const rd=Ft({name:"Toggle",props:{active:{type:Boolean,required:!0},isSmallSize:{type:Boolean,default:!1}},emits:["click"]},[["render",function(e,t,i,s,o,r){return a(),n("div",{class:p(["switch",{active:i.active,small:i.isSmallSize}]),onClick:t[0]||(t[0]=t=>e.$emit("click",t))},null,2)}],["__scopeId","data-v-a7962aef"]]),ld={class:"payment-list flex-box items-center inner-ml-4"},cd={key:0,class:"relative count"},dd={class:"list-wrapper absolute"},ud={class:"list"},md={class:"content"};const pd=Ft({name:"PaymentList",components:{PaymentTag:Ta},props:{paymentMethodTypes:{type:Array,required:!0},maxNum:{type:Number,default:5}},computed:{hidedMethodsCount(){return Math.max(this.paymentMethodTypes.length-this.maxNum,0)}}},[["render",function(e,t,o,l,d,p){const C=i("PaymentTag");return a(),n("div",ld,[(a(!0),n(u,null,m(o.paymentMethodTypes.slice(0,o.maxNum),(e=>(a(),h(C,{key:e,class:"payment-item",methodType:e},null,8,["methodType"])))),128)),p.hidedMethodsCount?(a(),n("div",cd,[r(" +"+c(p.hidedMethodsCount)+" ",1),s("div",dd,[s("div",ud,[s("div",md,[(a(!0),n(u,null,m(o.paymentMethodTypes.slice(o.maxNum),(e=>(a(),h(C,{key:e,class:"list-item",methodType:e},null,8,["methodType"])))),128))])])])])):y("",!0)])}],["__scopeId","data-v-c889e009"]]),{fbAppId:hd}=j;class yd{get queryString(){return Object.entries(this.params).reduce(((e,[t,i])=>{const n=`${t}=${encodeURIComponent(i)}`;return e?`${e}&${n}`:n}),"")}get to(){return`${this.baseUrl}?${this.queryString}`}}class Cd extends yd{constructor(e,t){super(),this.key="TELEGRAM",this.baseUrl="https://t.me/share/url",this.label=rt.t("footer.telegram"),this.params={url:e,text:t}}}class gd extends yd{constructor(e,t,i){super(),this.key="TWITTER",this.baseUrl="https://twitter.com/intent/tweet",this.label=rt.t("footer.twitter"),this.params={url:e,text:t,...i&&{hashtags:i.join(",")}}}}class fd extends yd{constructor(e,t){super(),this.key="FACEBOOK",this.baseUrl="https://www.facebook.com/sharer/sharer.php",this.label=rt.t("footer.facebook"),this.params={u:e,title:t}}}class bd extends yd{constructor(e,t){super(),this.key="LINKEDIN",this.baseUrl="https://www.linkedin.com/shareArticle",this.label=rt.t("footer.linkedIn"),this.params={mini:!0,url:e,source:e,title:t,summary:t}}}class vd extends yd{constructor(e,t){super(),this.key="REDDIT",this.baseUrl="http://www.reddit.com/submit",this.label=rt.t("footer.reddit"),this.params={url:e,title:t}}}class kd extends yd{constructor(e,t){super(),this.key="FACEBOOK",this.baseUrl="https://www.facebook.com/dialog/share",this.label=rt.t("footer.facebook"),this.params={app_id:hd,display:"page",href:e,hashtag:`#${t}`}}}class Sd extends yd{constructor(e,t){super(),this.key="WHATSAPP",this.baseUrl="https://wa.me/",this.params={text:`${t}\n${e}`}}}const Ad={name:"SocialShareGroup",props:{title:{type:String,default:""},url:{type:String,default:lt.websiteUrl},from:{type:String,default:""},campaignName:{type:String,default:""}},data(){return{socialMedia:[new Cd(this.url,this.title),new gd(this.url,this.title),new fd(this.url,this.title),new bd(this.url,this.title),new vd(this.url,this.title)]}},computed:{DefaultIcon:()=>({TWITTER:pt,TELEGRAM:mt,FACEBOOK:ut,LINKEDIN:dt,REDDIT:ct})}},Md={class:"social-share-container"},Id=["href"];const wd=Ft(Ad,[["render",function(e,t,i,s,o,l){return a(),n("div",Md,[(a(!0),n(u,null,m(o.socialMedia,(e=>(a(),n("a",{key:e.key,href:e.to,class:"logo",rel:"noopener nofollow",target:"_blank"},[e.Icon?(a(),h(I(e.Icon),{key:0})):l.DefaultIcon[e.key.toUpperCase()]?(a(),h(I(l.DefaultIcon[e.key.toUpperCase()]),{key:1,"aria-label":e.label},null,8,["aria-label"])):(a(),n(u,{key:2},[r(c(e.label),1)],64))],8,Id)))),128))])}],["__scopeId","data-v-dd7d8dcc"]]),{c2cRoutePathPrefix:Td}=j,_d={name:"ShareBox",components:{BrandDialog:J,IconCopy:ht,SocialShareGroup:wd},props:{advertId:{type:String,default:""},advertOwner:{type:String,default:""},side:{type:String,default:"BUY"}},emits:["update:isShow"],computed:{...t(["lang"]),shareSide(){return"BUY"===this.side?"sell":"buy"},clipboardLink(){return`${window.location.origin}/${this.lang}/${Td}/advert/${this.advertId}?username=${this.advertOwner}&side=${this.shareSide}`}},methods:{..._(["messageSuccess","messageError"]),closed(){this.$emit("update:isShow",!1)},onCopy(){this.messageSuccess(this.$t("msg.copied"))},onError(){this.messageError(this.$t("msg.fail"))}}},Dd={class:"notice-modal__body"},Pd={class:"body__title"},Ld={class:"flex-box items-center clipboard"},Ed={class:"clipboard-text"};const xd=Ft(_d,[["render",function(e,t,r,d,u,m){const p=i("SocialShareGroup"),y=i("IconCopy"),g=i("BrandDialog"),f=P("clipboard");return a(),h(g,{class:"notice-modal",width:e.isMobile?"90%":"338px",idPrefix:"p2p_my_ads_share_box",isBrandNewStyle:"",onClosed:m.closed},{body:C((()=>[s("div",Dd,[s("p",Pd,c(e.$t("ama.topic.share_with_friends.text")),1),l(p,{class:"social-media",url:m.clipboardLink},null,8,["url"]),o((a(),n("div",Ld,[s("span",Ed,c(m.clipboardLink),1),l(y,{class:"clipboard-icon"})])),[[f,m.clipboardLink,"copy"],[f,m.onCopy,"success"],[f,m.onError,"error"]])])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-6895667c"]]),Nd={data:()=>
2({actionsVisible:!1,isShowDialog:!1,dialogType:"",dialogTitle:"",dialogContent:"",dialogBtnText:null,showShareBox:!1,STATUS:hn}),computed:{...t("c2c",["c2cAccountInfo"]),...D(["userName"]),...D("c2c",["c2cFiatInfoMap","getCurrencyDecimal","getCurrencyBaseRate"]),unitPrice(){var e;const t=(null==(e=this.c2cFiatInfoMap[this.item.quoteCurrency])?void 0:e.usdRate)||0,i=this.getCurrencyDecimal(this.item.quoteCurrency);return Es(this.item.priceSettings,{formPrice:this.getCurrencyBaseRate(this.item.baseCurrency),toRate:t,decimal:i})}},methods:{toggleStatus(){if(this.c2cAccountInfo.isBlockedByAdmin)return void(this.context.isShowNoticeModal=!0);const{status:e}=this.item;"true"!==window.localStorage.getItem(`${Cn}.${this.userName}`)?e===hn.ENABLE?this.setDialogInfo(yn.STATUS,"c2c.myAdsList.turnOffAd","c2c.myAdsList.removeAd","t.yes"):this.setDialogInfo(yn.STATUS,"c2c.myAdsList.turnOnAd","c2c.myAdsList.displayAd","t.yes"):this.onStatusConfirm()},onStatusConfirm(){const e=this.item.status===hn.ENABLE?hn.DISABLE:hn.ENABLE;re.updateAdStatus(this.item.id,e).then((()=>{this.isShowDialog=!1,this.item.status=e}))},onDeleteConfirm(){re.deleteAdvert(this.item.id).then((()=>{this.isShowDialog=!1,this.handleDeleteAd(this.item.id)}))},dialogAction(){switch(this.dialogType){case yn.STATUS:this.onStatusConfirm();break;case yn.EDIT:case yn.AMOUNT_ERR:this.context.createAds.id=this.item.id,this.context.pageName=Ri,this.isShowDialog=!1;break;case yn.DELETE:this.onDeleteConfirm();break;default:this.isShowDialog=!1}},onEditClick(){if(this.c2cAccountInfo.isBlockedByAdmin)return void(this.context.isShowNoticeModal=!0);if("true"===window.localStorage.getItem(`${gn}.${this.userName}`))return this.context.createAds.id=this.item.id,void(this.context.pageName=Ri);re.getAdvertUpdatable(this.item.id).then((()=>{this.setDialogInfo(yn.EDIT,"c2c.myAdsList.editAdQuestion","c2c.myAdsList.editAdHint","c2c.myAdsList.yesEdit")})).catch((e=>{ue.C2C_OTC_ADVERT_HAS_ONGOING_ORDER===e&&this.setDialogInfo(yn.FAIL,"t.error","c2c.myAdsList.cantEditAdHint","t.ok")}))},onDeleteClick(){re.getAdvertUpdatable(this.item.id).then((()=>{this.setDialogInfo(yn.DELETE,"c2c.myAdsList.deleteAd","c2c.myAdsList.deleteAdHint","c2c.myAdsList.yesDeleteIt")})).catch((e=>{ue.C2C_OTC_ADVERT_HAS_ONGOING_ORDER===e&&this.setDialogInfo(yn.FAIL,"t.error","c2c.myAdsList.cantDeleteAdHint","t.ok")}))},setDialogInfo(e,t,i,n){this.isShowDialog=!0,this.dialogType=e,this.dialogTitle=t,this.dialogContent=i,this.dialogBtnText=n},onShareClick(){this.actionsVisible=!1,this.showShareBox=!0}}},Rd={name:"MyAdsListRow",components:{Amount:gl,Limit:Sl,IconMore:yt,CardMoreActions:od,Toggle:rd,PaymentList:pd,NoticeModal:Tn,ShareBox:xd},inject:["handleDeleteAd","context"],props:{item:{type:Object,default:()=>({})}},data:()=>Nd.data(),computed:{...D("c2c",["getCurrencyDecimal"]),...Nd.computed,isEnable(){return this.item.status===hn.ENABLE},isBlocked(){return this.item.isBlockedByAdmin},createdAt(){return U(new Date(this.item.createdAt),"yyyy-MM-dd HH:mm:ss")},isSell(){return"SELL"===this.item.side},actionText(){return this.$t(this.isSell?"c2c.myads.sell":"c2c.myads.buy")},formatPriceSetting(){return this.getFormatPrice(this.unitPrice,this.item.quoteCurrency)}},watch:{actionsVisible(e){e?document.addEventListener("click",this.onClickOutside):document.removeEventListener("click",this.onClickOutside)},isShowDialog(e){e||(this.dialogType="",this.dialogTitle="",this.dialogContent="",this.dialogBtnText=null)}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{...Nd.methods,toggleActions(){this.actionsVisible=!this.actionsVisible},onClickOutside(e){this.$refs.actions.contains(e.target)||(this.actionsVisible=!1)},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))}}},Bd={class:"flex-box items-center justify-between header"},Od={class:"flex-box items-center"},Fd={key:0,class:"error-message"},Ud={class:"flex-box items-center content inner-ml-24"},$d={class:"flex-1 title"},qd={class:"price items-center flex-box justify-end inner-ml-4"},Vd={class:"value"},Hd={class:"flex-1 transaction"},jd={class:"flex-1 amount items-center flex-box justify-end inner-ml-4"},Gd={class:"value"},zd={key:0},Kd={class:"flex-box justify-end action relative"};const Yd={class:"my-ads-table"};const Wd=Ft({name:"DesktopMyAdsList",components:{MyAdsListHeader:id,MyAdsListRow:Ft(Rd,[["render",function(e,t,o,d,u,m){const C=i("Amount"),g=i("Limit"),f=i("PaymentList"),b=i("Toggle"),v=i("IconMore"),k=i("CardMoreActions"),S=i("NoticeModal"),A=i("ShareBox");return a(),n("div",{class:p(["row-wrapper",{"is-blocked":m.isBlocked}])},[s("div",Bd,[s("div",Od,[r(c(o.item.id)+" ",1),m.isBlocked?(a(),n("span",Fd,c(o.item.reason),1)):y("",!0)]),s("div",null,c(m.createdAt),1)]),s("div",Ud,[s("div",$d,[s("span",{class:p(["action",{red:m.isSell}])},c(m.actionText),3),s("span",null,c(o.item.baseCurrency),1)]),s("div",qd,[s("span",Vd,c(m.formatPriceSetting),1),s("span",null,c(o.item.quoteCurrency),1)]),s("div",Hd,[l(C,{amount:o.item.availableAmou
2nt,unit:o.item.baseCurrency,isSpaceBetween:!1},null,8,["amount","unit"]),l(g,{min:o.item.orderMinAmount,max:o.item.orderMaxAmount,unit:o.item.quoteCurrency,isSpaceBetween:!1},null,8,["min","max","unit"])]),s("div",jd,[s("span",Gd,c(m.getFormatPrice(o.item.totalAmount,o.item.baseCurrency)),1),s("span",null,c(o.item.baseCurrency),1)]),l(f,{class:"flex-1 row-margin",paymentMethodTypes:o.item.paymentMethodTypes,maxNum:2},null,8,["paymentMethodTypes"]),m.isBlocked?(a(),n("p",zd,c(e.$t("c2c.marketList.blocked")),1)):(a(),h(b,{key:1,class:"flex-box justify-end",active:m.isEnable,isBlocked:m.isBlocked,isSmallSize:"",onClick:e.toggleStatus},null,8,["active","isBlocked","onClick"])),s("div",Kd,[s("div",{ref:"actions",class:"flex-center-center icon-wrap",onClick:t[0]||(t[0]=(...e)=>m.toggleActions&&m.toggleActions(...e))},[l(v,{class:"more-icon"})],512),l(k,{actionsVisible:e.actionsVisible,"onUpdate:actionsVisible":t[1]||(t[1]=t=>e.actionsVisible=t),class:"more-actions",isEnable:m.isEnable,isBlocked:m.isBlocked,onEditClick:e.onEditClick,onShareClick:e.onShareClick,onDeleteClick:e.onDeleteClick},null,8,["actionsVisible","isEnable","isBlocked","onEditClick","onShareClick","onDeleteClick"])])]),e.isShowDialog?(a(),h(S,{key:0,isShow:e.isShowDialog,"onUpdate:isShow":t[2]||(t[2]=t=>e.isShowDialog=t),advertId:o.item.id,type:e.dialogType,title:e.dialogTitle,content:e.dialogContent,btnText:e.dialogBtnText,onClick:e.dialogAction},null,8,["isShow","advertId","type","title","content","btnText","onClick"])):y("",!0),e.showShareBox?(a(),h(A,{key:1,isShow:e.showShareBox,"onUpdate:isShow":t[3]||(t[3]=t=>e.showShareBox=t),advertId:o.item.id,advertOwner:o.item.owner.username,side:o.item.side},null,8,["isShow","advertId","advertOwner","side"])):y("",!0)],2)}],["__scopeId","data-v-fd44b5e0"]])},props:{marketList:{type:Array,required:!0}}},[["render",function(e,t,s,o,r,c){const d=i("MyAdsListHeader"),p=i("MyAdsListRow");return a(),n("div",Yd,[l(d),(a(!0),n(u,null,m(s.marketList,(e=>(a(),h(p,{key:e.id,class:"my-ads-row",item:e},null,8,["item"])))),128))])}],["__scopeId","data-v-e58d5517"]]),Zd={name:"MobileMyAdsListCard",components:{IconMore:yt,Amount:gl,Limit:Sl,PaymentList:pd,Toggle:rd,MobileUnitPrice:Ol,CardMoreActions:od,NoticeModal:Tn,ShareBox:xd},inject:["handleDeleteAd","context"],props:{item:{type:Object,default:()=>({})}},data:()=>Nd.data(),computed:{...t(["lang"]),...Nd.computed,isEnable(){return this.item.status===hn.ENABLE},actionText(){return this.item.side===Ns?this.$t("c2c.myads.sell"):this.$t("c2c.myads.buy")},isBlocked(){return this.item.isBlockedByAdmin},activeText(){switch(this.item.status){case hn.ENABLE:return this.$t("account.status.active");case hn.BLOCKED:return this.$t("c2c.marketList.blocked");default:return this.$t("c2c.dropdown.inactive")}},createdAt(){return U(new Date(this.item.createdAt),"yyyy-MM-dd HH:mm:ss")}},watch:{actionsVisible(e){e?document.addEventListener("click",this.onClickOutside):document.removeEventListener("click",this.onClickOutside)},isShowDialog(e){e||(this.dialogType="",this.dialogTitle="",this.dialogContent="",this.dialogBtnText=null)}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{...Nd.methods,handleNameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.item.owner.username}})},toggleActions(){this.actionsVisible=!this.actionsVisible},onClickOutside(e){this.$refs.actions.contains(e.target)||(this.actionsVisible=!1)}}},Xd={class:"flex-center-between header"},Qd={class:"content"},Jd={class:"flex-center-between"},eu={class:"title"},tu={ref:"actions",class:"relative"},iu={class:"flex-center-between row-margin"},nu={key:0,class:"error-message"};const au={name:"MyAdsList",components:{ListEmpty:xl,MyAdsListFilter:Kc,DesktopMyAdsList:Wd,MobileMyAdsListCard:Ft(Zd,[["render",function(e,t,o,d,u,m){const C=i("IconMore"),g=i("CardMoreActions"),f=i("MobileUnitPrice"),b=i("Toggle"),v=i("Amount"),k=i("Limit"),S=i("PaymentList"),A=i("NoticeModal"),M=i("ShareBox");return a(),n("div",{class:p(["card-wrapper",{"is-blocked":m.isBlocked}])},[s("div",Xd,[s("div",null,c(o.item.id),1),s("div",null,c(m.createdAt),1)]),s("div",Qd,[s("div",Jd,[s("div",null,[s("span",{class:p(["title action",{red:"SELL"===o.item.side}])},c(m.actionText),3),s("span",eu,c(o.item.baseCurrency),1)]),s("div",tu,[l(C,{class:"more-icon",onClick:m.toggleActions},null,8,["onClick"]),l(g,{actionsVisible:e.actionsVisible,"onUpdate:actionsVisible":t[0]||(t[0]=t=>e.actionsVisible=t),class:"more-actions",isEnable:m.isEnable,isBlocked:m.isBlocked,onEditClick:e.onEditClick,onShareClick:e.onShareClick,onDeleteClick:e.onDeleteClick},null,8,["actionsVisible","isEnable","isBlocked","onEditClick","onShareClick","onDeleteClick"])],512)]),s("div",iu,[l(f,{item:o.item},null,8,["item"]),s("div",{class:p(["tx-align--right toggle-wrap",{"is-blocked":m.isBlocked}])},[r(c(m.activeText)+" ",1),m.isBlocked?y("",!0):(a(),h(b,{key:0,class:"item-margin",active:m.isEnable,onClick:e.toggleStatus},null,8,["active","onClick"]))],2)]),m.isBlocked?(a(),n("p",nu,c(o.item.reason),1)):y("",!0),l(v,{class:"row-margin",amount:o.item.totalAmount,unit:o.item.baseCurrency,title:"c2c.marketList.totalAmount"},null,8,["amount","unit"]),l(v,{class:"item-margin",amount:o.item.availableAmou
2nt,unit:o.item.baseCurrency},null,8,["amount","unit"]),l(k,{class:"item-margin",min:o.item.orderMinAmount,max:o.item.orderMaxAmount,unit:o.item.quoteCurrency},null,8,["min","max","unit"]),l(S,{class:"row-margin",paymentMethodTypes:o.item.paymentMethodTypes},null,8,["paymentMethodTypes"])]),e.isShowDialog?(a(),h(A,{key:0,isShow:e.isShowDialog,"onUpdate:isShow":t[1]||(t[1]=t=>e.isShowDialog=t),advertId:o.item.id,type:e.dialogType,title:e.dialogTitle,content:e.dialogContent,btnText:e.dialogBtnText,onClick:e.dialogAction},null,8,["isShow","advertId","type","title","content","btnText","onClick"])):y("",!0),e.showShareBox?(a(),h(M,{key:1,isShow:e.showShareBox,"onUpdate:isShow":t[2]||(t[2]=t=>e.showShareBox=t),advertId:o.item.id,advertOwner:o.item.owner.username,side:o.item.side},null,8,["isShow","advertId","advertOwner","side"])):y("",!0)],2)}],["__scopeId","data-v-f22178e2"]]),Pagination:Je,LoadMoreObserver:Qe},provide(){return{handleDeleteAd:this.handleDeleteAd}},data(){const[e,t]=at({rangeSize:180});return{isLoading:!1,marketList:[],ruleForm:{side:"",baseCurrency:"",quoteCurrency:"",statuses:hn.ENABLE,dateRange:{start:e,end:t}},pageData:{currentPage:1,totalRows:0,totalPages:0}}},computed:{...t(["lang"]),showEmptyHint(){return!this.marketList.length&&!this.isLoading}},watch:{ruleForm:{handler(){this.resetPageData(),this.getMyAdsList()},deep:!0},lang(){this.resetPageData(),this.getMyAdsList()},isNotDesktop(){this.resetPageData(),this.getMyAdsList()}},mounted(){this.getMyAdsList()},methods:{resetPageData(){this.pageData={currentPage:1,totalRows:0,totalPages:0}},getMyAdsList(e){const{dateRange:t}=this.ruleForm,i={sorting:"createdAt:DESC",page:this.pageData.currentPage,pageSize:10,startTime:Ct(t.start).getTime(),endTime:Ct(t.end).getTime(),statuses:`${hn.ENABLE},${hn.DISABLE}`};["side","baseCurrency","quoteCurrency","statuses"].forEach((e=>{const t=this.ruleForm[e];t&&!["ALL",hn.BLOCKED].includes(t)&&(i[e]=t)})),this.ruleForm.statuses===hn.BLOCKED?i.isBlocked=!0:this.ruleForm.statuses&&"ALL"!==this.ruleForm.statuses&&(i.isBlocked=!1),this.isLoading=!0,re.getMyAdsList(i).then((t=>{const{adverts:i,totalRows:n,totalPages:a}=t;let s=i.map((e=>{const t=Number(B(e.totalAmount).minus(e.processingAmount).minus(e.transferredAmount));return{...e,availableAmount:t}}));this.marketList=e?this.marketList.concat(s):s,this.pageData.totalRows=n,this.pageData.totalPages=a})).catch((()=>{})).finally((()=>{this.isLoading=!1}))},handleDeleteAd(e){this.marketList=this.marketList.filter((t=>t.id!==e))},handlePageChange(e){this.pageData.currentPage=e,this.getMyAdsList()},handleLoadMore(){this.isLoading||this.pageData.currentPage===this.pageData.totalPages||(this.pageData.currentPage++,this.getMyAdsList(!0))}}},su={key:0,class:"title"},ou={key:1,class:"loading-wrap"};const ru=Ft(au,[["render",function(e,t,s,r,d,p){const C=i("MyAdsListFilter"),g=i("ListEmpty"),f=i("MobileMyAdsListCard"),b=i("LoadMoreObserver"),v=i("DesktopMyAdsList"),k=i("Pagination"),S=P("loading");return a(),n("div",null,[e.isNotDesktop?y("",!0):(a(),n("div",su,c(e.$t("c2c.myAdsList.myAds")),1)),l(C,{ruleForm:d.ruleForm,"onUpdate:ruleForm":t[0]||(t[0]=e=>d.ruleForm=e)},null,8,["ruleForm"]),d.isLoading?o((a(),n("div",ou,null,512)),[[S,!0]]):p.showEmptyHint?(a(),h(g,{key:2})):e.isNotDesktop?(a(),n(u,{key:3},[(a(!0),n(u,null,m(d.marketList,(e=>(a(),h(f,{key:e.id,item:e},null,8,["item"])))),128)),l(b,{onLoadMore:p.handleLoadMore},null,8,["onLoadMore"])],64)):(a(),n(u,{key:4},[l(v,{marketList:d.marketList},null,8,["marketList"]),l(k,{class:"pagination-control",layout:"prev, pager, next, jumper",background:!1,total:d.pageData.totalRows,currentPage:d.pageData.currentPage,totalPages:d.pageData.totalPages,onHandleCurrentChangeP:p.handlePageChange},null,8,["total","currentPage","totalPages","onHandleCurrentChangeP"])],64))])}],["__scopeId","data-v-0a69c6c7"]]),lu=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"})),cu={name:"MobileFilter",components:{BrandDialog:J,DateRangeTextBlock:xc,DateRangePickerDialog:nt,SimpleDropdown:Oc,CurrencyDropDown:jr},props:{ruleForm:{type:Object,required:!0},showMobileFilter:{type:Boolean,required:!0},orderTypeData:{type:Array,required:!0},onUpdateFilter:{type:Function,required:!0}},emits:["update:showMobileFilter"],data(){return{mobileRuleForm:{...this.ruleForm},CurrencyType:Ve,showDatePickerDialog:!1}},watch:{showMobileFilter(e){e&&(this.mobileRuleForm={...this.ruleForm})}},methods:{onResetClick(){const[e,t]=at();this.mobileRuleForm.side="",this.mobileRuleForm.baseCurrency="",this.mobileRuleForm.quoteCurrency="",this.mobileRuleForm.dateRange={start:e,end:t}},onApplyClick(){this.onUpdateFilter({...this.mobileRuleForm}),this.closeMobileFilter()},closeMobileFilter(){this.$emit("update:showMobileFilter",!1)}}},du={class:"title"},uu={class:"title"},mu={class:"title"},pu={class:"title"},hu={class:"flex-box footer-wrapper items-end"};const yu={CREATED:{key:"CREATED",lang:"t.confirming"},ACCEPTED:{key:"ACCEPTED",lang:"t.paying"},PAY_PENDING:{key:"PAY_PENDING",lang:"t.pending"},PAID:{key:"PAID",lang:"c2c.marketList.releasing"}
2,RELEASE_EXPIRED:{key:"RELEASE_EXPIRED",lang:"c2c.marketList.releaseExpired"},DISPUTED:{key:"DISPUTED",lang:"t.reported"},RELEASED:{key:"RELEASED",lang:"t.completed"},CANCELED:{key:"CANCELED",lang:"t.canceled"},TERMINATED:{key:"TERMINATED",lang:"t.canceled"}},Cu=[{key:"ALL",lang:"t.all"},{key:"BUY",lang:"t.buy"},{key:"SELL",lang:"t.sell"}],gu=[{key:"ALL",lang:"t.all"},{key:"CONFIRMING",lang:"t.confirming",propertyName:"confirmingCount"},{key:"PROCESSING",lang:"t.processing",propertyName:"processingCount"},{key:"COMPLETED",lang:"t.completed",propertyName:"completedCount"},{key:"CANCELED",lang:"t.canceled",propertyName:"canceledCount"}],fu=["RELEASED","CANCELED","TERMINATED"],bu={key:0,class:"label inner-ml-4"},vu={key:1,class:"label inner-ml-4"},ku={key:2,class:"label inner-ml-4"};const Su={class:"my-order-list-filter"};const Au=Ft({name:"MyOrderListFilter",components:{StackView:je,DateRangePickerV2:ot,DateRangeTextBlock:xc,CurrencyDropDown:jr,SimpleDropdown:Oc,IconFilter:He,MobileFilter:Ft(cu,[["render",function(e,t,o,d,u,m){const p=i("DateRangeTextBlock"),g=i("SimpleDropdown"),f=i("CurrencyDropDown"),b=i("BaseButton"),v=i("BrandDialog"),k=i("DateRangePickerDialog");return a(),n("div",null,[l(v,{class:"mobile-filter",visible:o.showMobileFilter,idPrefix:"p2p_my_order_filter_dialog",isBrandNewStyle:"",hideScrollbar:"",fullStyle:"",showClose:"",stayAlive:"",onClosed:m.closeMobileFilter},{header:C((()=>[r(c(e.$t("t.filters")),1)])),body:C((()=>[s("div",du,c(e.$t("referral.dashboard.history.timePeriod")),1),l(p,{dateRangeData:u.mobileRuleForm.dateRange,onToggle:t[0]||(t[0]=e=>u.showDatePickerDialog=!0)},null,8,["dateRangeData"]),s("div",uu,c(e.$t("c2c.myOrderList.orderType")),1),l(g,{selected:u.mobileRuleForm.side,"onUpdate:selected":t[1]||(t[1]=e=>u.mobileRuleForm.side=e),class:"w-100",list:o.orderTypeData,placeholder:e.$t("c2c.myOrderList.orderType")},null,8,["selected","list","placeholder"]),s("div",mu,c(e.$t("t.crypto")),1),l(f,{selectedCurrency:u.mobileRuleForm.baseCurrency,"onUpdate:selectedCurrency":t[2]||(t[2]=e=>u.mobileRuleForm.baseCurrency=e),currencyType:u.CurrencyType.CRYPTO,placeholder:e.$t("t.crypto"),refName:"cryptoDropdown",idPrefix:"p2p_my_order_currency_filter",idSuffix:"crypto",isMobileView:"",showAllOption:""},null,8,["selectedCurrency","currencyType","placeholder"]),s("div",pu,c(e.$t("t.fiat")),1),l(f,{selectedCurrency:u.mobileRuleForm.quoteCurrency,"onUpdate:selectedCurrency":t[3]||(t[3]=e=>u.mobileRuleForm.quoteCurrency=e),placeholder:"t.fiat",refName:"fiatDropdown",idPrefix:"p2p_my_order_currency_filter",idSuffix:"fiat",isMobileView:"",showAllOption:"",isHiddenIcon:"",hideBarIcon:""},null,8,["selectedCurrency"])])),footer:C((()=>[s("div",hu,[l(b,{class:"outline-primary action-btn",size:"large",onClick:m.onResetClick},{default:C((()=>[r(c(e.$t("t.reset")),1)])),_:1},8,["onClick"]),l(b,{class:"primary action-btn",size:"large",onClick:m.onApplyClick},{default:C((()=>[r(c(e.$t("earn.filter.apply")),1)])),_:1},8,["onClick"])])])),_:1},8,["visible","onClosed"]),u.showDatePickerDialog?(a(),h(k,{key:0,showDatePickerDialog:u.showDatePickerDialog,"onUpdate:showDatePickerDialog":t[4]||(t[4]=e=>u.showDatePickerDialog=e),dateRange:u.mobileRuleForm.dateRange,"onUpdate:dateRange":t[5]||(t[5]=e=>u.mobileRuleForm.dateRange=e)},null,8,["showDatePickerDialog","dateRange"])):y("",!0)])}],["__scopeId","data-v-1b61c4f8"]]),FilterLabels:Ft({name:"FilterLabels",components:{IconCross:st},props:{ruleForm:{type:Object,required:!0}},computed:{isNoLabel(){return!(this.showLabel("side")||this.showLabel("baseCurrency")||this.showLabel("quoteCurrency"))},sideText(){const e=Cu.filter((e=>e.key===this.ruleForm.side));return this.$t(e[0].lang)}},methods:{removeLabel(e){this.ruleForm[e]=""},showLabel(e){const t=this.ruleForm[e];return t&&"ALL"!==t}}},[["render",function(e,t,o,r,d,u){const m=i("IconCross");return a(),n("div",{class:p(["labels flex-box inner-ml-10",{"no-label":u.isNoLabel}])},[u.showLabel("side")?(a(),n("div",bu,[s("div",null,c(u.sideText),1),l(m,{class:"label-cross",width:"7",height:"7",onClick:t[0]||(t[0]=e=>u.removeLabel("side"))})])):y("",!0),u.showLabel("baseCurrency")?(a(),n("div",vu,[s("div",null,c(o.ruleForm.baseCurrency),1),l(m,{class:"label-cross",width:"7",height:"7",onClick:t[1]||(t[1]=e=>u.removeLabel("baseCurrency"))})])):y("",!0),u.showLabel("quoteCurrency")?(a(),n("div",ku,[s("div",null,c(o.ruleForm.quoteCurrency),1),l(m,{class:"label-cross",width:"7",height:"7",onClick:t[2]||(t[2]=e=>u.removeLabel("quoteCurrency"))})])):y("",!0)],2)}],["__scopeId","data-v-38300900"]])},props:{ruleForm:{type:Object,required:!0}},emits:["update:ruleForm"],data:()=>({showMobileFilter:!1,CurrencyType:Ve,orderTypeData:Cu,showDatePickerDialog:!1}),watch:{$mq(){this.showMobileFilter=!1}},methods:{onFilterClick(){this.showMobileFilter=!0},onResetClick(){const[e,t]=at({rangeSize:180});this.ruleForm.side="",this.ruleForm.baseCurrency="",this.ruleForm.quoteCurrency="",this.ruleForm.dateRange={start:e,end:t}}
2,onUpdateFilter(e){this.$emit("update:ruleForm",e)}}},[["render",function(e,t,s,o,r,d){const u=i("DateRangePickerV2"),m=i("DateRangeTextBlock"),p=i("SimpleDropdown"),g=i("CurrencyDropDown"),f=i("IconFilter"),b=i("MobileFilter"),v=i("StackView"),k=i("FilterLabels");return a(),n("div",Su,[l(v,{class:"filter",isWrap:""},{default:C((()=>[e.isMobile?(a(),h(m,{key:1,dateRangeData:s.ruleForm.dateRange,onToggle:d.onFilterClick},null,8,["dateRangeData","onToggle"])):(a(),h(u,{key:0,dateRange:s.ruleForm.dateRange,"onUpdate:dateRange":t[0]||(t[0]=e=>s.ruleForm.dateRange=e)},null,8,["dateRange"])),e.isMobile?y("",!0):(a(),h(p,{key:2,selected:s.ruleForm.side,"onUpdate:selected":t[1]||(t[1]=e=>s.ruleForm.side=e),class:"dropdown side",list:r.orderTypeData,placeholder:e.$t("c2c.myOrderList.orderType")},null,8,["selected","list","placeholder"])),e.isMobile?y("",!0):(a(),h(g,{key:3,selectedCurrency:s.ruleForm.baseCurrency,"onUpdate:selectedCurrency":t[2]||(t[2]=e=>s.ruleForm.baseCurrency=e),currencyType:r.CurrencyType.CRYPTO,placeholder:e.$t("t.crypto"),refName:"cryptoDropdown",idPrefix:"p2p_my_order_currency_filter",idSuffix:"crypto",showAllOption:"",isSearchShown:""},null,8,["selectedCurrency","currencyType","placeholder"])),e.isMobile?y("",!0):(a(),h(g,{key:4,selectedCurrency:s.ruleForm.quoteCurrency,"onUpdate:selectedCurrency":t[3]||(t[3]=e=>s.ruleForm.quoteCurrency=e),placeholder:"t.fiat",refName:"fiatDropdown",idPrefix:"p2p_my_order_currency_filter",idSuffix:"fiat",showAllOption:"",isSearchShown:"",isHiddenIcon:"",hideBarIcon:""},null,8,["selectedCurrency"])),e.isMobile?y("",!0):(a(),n("div",{key:5,class:"reset",onClick:t[4]||(t[4]=(...e)=>d.onResetClick&&d.onResetClick(...e))},c(e.$t("t.reset")),1)),e.isMobile?(a(),h(f,{key:6,class:"filter-icon",onClick:d.onFilterClick},null,8,["onClick"])):y("",!0),l(b,{showMobileFilter:r.showMobileFilter,"onUpdate:showMobileFilter":t[5]||(t[5]=e=>r.showMobileFilter=e),ruleForm:s.ruleForm,orderTypeData:r.orderTypeData,onUpdateFilter:d.onUpdateFilter},null,8,["showMobileFilter","ruleForm","orderTypeData","onUpdateFilter"])])),_:1}),e.isMobile?(a(),h(k,{key:0,ruleForm:s.ruleForm},null,8,["ruleForm"])):y("",!0)])}],["__scopeId","data-v-06824776"]]),Mu={class:"counts-wrapper flex-box inner-ml-24"},Iu=["onClick"],wu={key:0,class:"count"};const Tu=Ft({name:"MyOrderCounts",props:{ruleForm:{type:Object,required:!0},orderCounts:{type:Object,required:!0}},data:()=>({countsData:gu}),methods:{showCount(e){return"ALL"!==e.key&&this.orderCounts[e.propertyName]},genCountText(e){const t=this.orderCounts[e];return t>9?"9+":t},isActive(e){return e===(this.ruleForm.category||"ALL")},onCategoryClick(e){this.ruleForm.category=e}}},[["render",function(e,t,i,o,r,l){return a(),n("div",Mu,[(a(!0),n(u,null,m(r.countsData,(t=>(a(),n("div",{key:t.title,class:p(["item flex-box items-center inner-ml-3",{active:l.isActive(t.key)}]),onClick:e=>l.onCategoryClick(t.key)},[s("div",null,c(e.$t(t.lang)),1),l.showCount(t)?(a(),n("div",wu,c(l.genCountText(t.propertyName)),1)):y("",!0)],10,Iu)))),128))])}],["__scopeId","data-v-c5c5c565"]]),_u={class:"flex-box items-center row-wrapper content inner-ml-24"},Du={class:"flex-1 title"},Pu={class:"amount tx-align--right"},Lu={class:"price tx-align--right"},Eu={class:"flex-1 swap-amount tx-align--right"},xu={class:"flex-1 party"},Nu={class:"flex-1 payment"},Ru={class:"flex-1 status tx-align--right"};const Bu=Ft({name:"MyOrderListHeader"},[["render",function(e,t,i,o,r,l){return a(),n("div",_u,[s("span",Du,c(e.$t("c2c.myOrderList.orderType")),1),s("span",Pu,c(e.$t("c2c.marketList.settlementAmount")),1),s("span",Lu,c(e.$t("c2c.marketList.unitPrice")),1),s("span",Eu,c(e.$t("c2c.myOrderList.swapAmount")),1),s("span",xu,c(e.$t("c2c.myOrderList.counterParty")),1),s("span",Nu,c(e.$t("t.payment")),1),s("span",Ru,c(e.$t("t.status")),1)])}],["__scopeId","data-v-d1b17f86"]]);const Ou=Ft({name:"IconChat",components:{Icon:se},emits:["click"]},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Chat Icon",width:"24",height:"24",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},{default:C((()=>t[1]||(t[1]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4327 4.55346C17.463 2.58268 14.8368 1.5 12.0401 1.5C6.28138 1.5 1.59021 6.16999 1.5852 11.9027C1.5852 13.7388 2.06635 15.5249 2.97852 17.1066L1.5 22.5L7.0432 21.0531C8.57184 21.8813 
210.2909 22.3204 12.0401 22.3204H12.0451C17.8038 22.3204 22.495 17.6504 22.5 11.9127C22.495 9.13364 21.4074 6.51924 19.4327 4.55346ZM12.0401 20.5592C10.4764 20.5592 8.94773 20.1401 7.61456 19.3517L7.29881 19.1622L4.01098 20.0203L4.88807 16.8272L4.68258 16.4979C3.8105 15.1208 3.35442 13.5292 3.35442 11.8977C3.35442 7.13792 7.2537 3.25624 12.0451 3.25624C14.3656 3.25624 16.5458 4.1593 18.1897 5.79081C19.8286 7.4273 20.7308 9.59765 20.7308 11.9077C20.7258 16.6825 16.8265 20.5592 12.0401 20.5592Z",fill:"currentColor"},null,-1),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.81921 11.7138C8.81921 12.4672 8.20844 13.078 7.45502 13.078C6.70159 13.078 6.09082 12.4672 6.09082 11.7138C6.09082 10.9604 6.70159 10.3496 7.45502 10.3496C8.20844 10.3496 8.81921 10.9604 8.81921 11.7138ZM13.3676 11.7138C13.3676 12.4672 12.7568 13.078 12.0034 13.078C11.2499 13.078 10.6392 12.4672 10.6392 11.7138C10.6392 10.9604 11.2499 10.3496 12.0034 10.3496C12.7568 10.3496 13.3676 10.9604 13.3676 11.7138ZM16.5502 13.078C17.3037 13.078 17.9144 12.4672 17.9144 11.7138C17.9144 10.9604 17.3037 10.3496 16.5502 10.3496C15.7968 10.3496 15.186 10.9604 15.186 11.7138C15.186 12.4672 15.7968 13.078 16.5502 13.078Z",fill:"currentColor"},null,-1)]))),_:1,__:[1]})}]]);const Fu=Ft({name:"FeeToolTip",components:{IconInfo2:xe},methods:{onClick(){}}},[["render",function(e,t,n,o,r,d){const u=i("IconInfo2"),m=i("Tooltip");return a(),h(m,{class:"fee-tooltip",tooltipStyle:{width:"196px"},placement:"top-end",onClick:T(d.onClick,["stop"])},{content:C((()=>[l(u,{class:"tooltip-icon-wrapper"})])),tooltip:C((()=>[s("span",null,c(e.$t("c2c.myOrderList.feeTooltip")),1)])),_:1},8,["onClick"])}],["__scopeId","data-v-b507fab7"]]),Uu={name:"ActionButtons",components:{PendingProtectionToolTip:Ql},inject:["orderListContext"],props:{item:{type:Object,default:()=>({})},orderId:{type:String,default:""}},data:()=>({isBalanceInsufficient:!1}),computed:{...t(["lang"]),...t("c2c",["c2cFiatInfoList"]),isSell(){return!this.item.isSelfBuyer},showButtonArea(){return this.showConfirmBtns||this.showGoToPay||this.showGoToRelease},showConfirmBtns(){return this.item.isSelfOwner&&this.item.status===yu.CREATED.key},showGoToPay(){return this.item.isSelfBuyer&&this.item.status===yu.ACCEPTED.key},showGoToRelease(){return!this.item.isSelfBuyer&&this.item.status===yu.PAID.key},quoteCurrency(){return this.item.quoteCurrency||""}},methods:{onCancelClick(){this.orderListContext.side=this.item.side,this.orderListContext.orderId=this.item.id,this.orderListContext.status=this.item.status,this.orderListContext.isShowCancelNoticeModal=!0},onGoToWallet(){const e={name:"walletSpot",params:{lang:this.lang}};this.isNotDesktop?this.$router.push(e):window.open(this.$router.resolve(e).href,"_blank")},async onConfirmClick(){try{await re.acceptOrder(this.item.id),this.$router.push({name:"c2cOrder",params:{id:this.item.id,lang:this.lang}})}catch(e){const{code:t}=e.response.data;this.isBalanceInsufficient=ue.C2C_OTC_USER_BALANCE_INSUFFICIENT===t}}}},$u={key:0,class:"button-wrapper"},qu={key:0,class:"flex-box justify-end"},Vu={class:"flex-box justify-end"},Hu={key:1,class:"flex-box justify-end error-insufficient"};const ju=Ft(Uu,[["render",function(e,t,o,d,u,m){const g=i("PendingProtectionToolTip"),f=i("BaseButton");return m.showButtonArea?(a(),n("div",$u,[m.showConfirmBtns?(a(),n("div",qu,[l(g,{quoteCurrency:m.quoteCurrency,isSell:m.isSell},null,8,["quoteCurrency","isSell"])])):y("",!0),s("div",Vu,[m.showConfirmBtns?(a(),h(f,{key:0,class:p(["outline-primary action-btn",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:T(m.onCancelClick,["stop"])},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["class","onClick"])):y("",!0),m.showConfirmBtns?(a(),h(f,{key:1,class:p(["primary action-btn",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:T(m.onConfirmClick,["stop"])},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["class","onClick"])):y("",!0),m.showGoToPay?(a(),h(f,{key:2,class:p(["primary",{"w-100":e.isMobile}]),size:"large"},{default:C((()=>[r(c(e.$t("c2c.myOrderList.payNow")),1)])),_:1},8,["class"])):y("",!0),m.showGoToRelease?(a(),h(f,{key:3,class:p(["primary",{"w-100":e.isMobile}]),size:"large"},{default:C((()=>[r(c(e.$t("c2c.myOrderList.goToRelease")),1)])),_:1}
2,8,["class"])):y("",!0)]),u.isBalanceInsufficient?(a(),n("div",Hu,[r(c(e.$t("c2c.insufficientBalance"))+" ",1),s("span",{class:"go-to-wallet",onClick:t[0]||(t[0]=T(((...e)=>m.onGoToWallet&&m.onGoToWallet(...e)),["stop"]))},c(e.$t("c2c.buySell.goToWallet")),1)])):y("",!0)])):y("",!0)}],["__scopeId","data-v-8e0e75b5"]]),Gu={...t(["lang"]),withoutCTA(){return fu.includes(this.item.status)},orderAction(){return this.item.isSelfBuyer?"t.buy":"t.sell"},counterParty(){const{buyer:e,seller:t,isSelfBuyer:i}=this.item;return i?t:e},showTooltip(){return this.item.isSelfOwner},username(){return this.isSelfBuyer?this.item.seller.username:this.item.buyer.username}},zu={name:"MyOrderListRow",components:{PaymentTag:Ta,Nickname:ol,PriceField:pl,FeeToolTip:Fu,ActionButtons:ju,IconChevronRight:V,IconChat:Ou},props:{item:{type:Object,default:()=>({})}},emits:["click"],data:()=>({STATUS_MAPPING:yu}),computed:{...Gu,createdAt(){return U(new Date(this.item.createdAt),"yyyy-MM-dd HH:mm:ss")},settlementAmount(){return Ps(this.item)},status(){return yu[this.item.status].lang}},methods:{handleNameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.counterParty.username}})}}},Ku={class:"flex-box items-center justify-between header"},Yu={class:"inline-flex"},Wu={key:0,class:"relative"},Zu={class:"flex-box items-center content inner-ml-24"},Xu={class:"flex-1 title titel-text"},Qu={class:"title"},Ju={class:"amount items-center flex-box justify-end"},em={class:"price items-center flex-box justify-end"},tm={class:"flex-1 flex-box justify-end swap-amount"},im={class:"flex-1 party"},nm={class:"flex-1 payment"};const am={name:"DesktopMyOrderList",components:{MyOrderListHeader:Bu,MyOrderListRow:Ft(zu,[["render",function(e,t,o,d,u,m){const C=i("IconChat"),g=i("PriceField"),f=i("FeeToolTip"),b=i("Nickname"),v=i("PaymentTag"),k=i("IconChevronRight"),S=i("ActionButtons");return a(),n("div",{class:"row-wrapper",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},[s("div",Ku,[s("div",Yu,[s("div",null,c(o.item.id),1),o.item.hasUnreadMessages?(a(),n("div",Wu,[l(C,{class:"chat-icon"}),t[1]||(t[1]=s("div",{class:"unread-icon"},null,-1))])):y("",!0)]),s("div",null,c(m.createdAt),1)]),s("div",Zu,[s("div",Xu,[s("span",{class:p(["title action",{red:!o.item.isSelfBuyer}])},c(e.$t(e.orderAction)),3),s("span",Qu,c(o.item.baseCurrency),1)]),s("div",Ju,[l(g,{class:"value",priceValue:m.settlementAmount,currency:o.item.quoteCurrency},null,8,["priceValue","currency"]),r(" "+c(o.item.quoteCurrency),1)]),s("div",em,[l(g,{class:"price-value",priceValue:o.item.price,currency:o.item.quoteCurrency},null,8,["priceValue","currency"]),r(" "+c(o.item.quoteCurrency),1)]),s("div",tm,[l(g,{priceValue:o.item.amount,currency:o.item.baseCurrency},null,8,["priceValue","currency"]),r(" "+c(o.item.baseCurrency)+" ",1),e.showTooltip?(a(),h(f,{key:0})):y("",!0)]),s("div",im,[l(b,{nickname:e.counterParty.alias,isOnline:e.counterParty.isOnline,size:"extraSmall",hasLink:"",isElliptical:"",onClick:m.handleNameClick},null,8,["nickname","isOnline","onClick"])]),s("div",nm,[l(v,{methodType:o.item.paymentMethodTypes[0]},null,8,["methodType"])]),s("div",{class:p(["flex-1 flex-box items-center justify-end status tx-align--right",{disabled:e.withoutCTA}])},[r(c(e.$t(m.status))+" ",1),l(k,{class:"arrow-icon"})],2)]),l(S,{item:o.item,orderId:o.item.id},null,8,["item","orderId"])])}],["__scopeId","data-v-30f9903d"]])},props:{orderList:{type:Array,required:!0}},emits:["selectedOrder"],computed:{...t(["lang"])},methods:{onOrderClick(e){e.status===Bi.CREATED&&e.isSelfOwner&&this.isMobile?this.$emit("selectedOrder",e):this.$router.push({name:"c2cOrder",params:{id:e.id,lang:this.lang}})}}},sm={class:"order-table"};const om=Ft(am,[["render",function(e,t,s,o,r,c){const d=i("MyOrderListHeader"),p=i("MyOrderListRow");return a(),n("div",sm,[l(d),(a(!0),n(u,null,m(s.orderList,(e=>(a(),h(p,{key:e.id,class:"order-row",item:e,onClick:t=>c.onOrderClick(e)},null,8,["item","onClick"])))),128))])}],["__scopeId","data-v-d0dff3d5"]]);const rm=Ft({name:"IconMenu",components:{Icon:se}},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Menu Icon",width:"25",height:"24",viewBox:"0 0 25 24"},{default:C((()=>t[0]||(t[0]=[s("g",{fill:"none","fill-rule":"evenodd"},[s("g",{fill:"currentColor"},[s("g",null,[s("path",{d:"M11.691 16c1.135 0 2.056.895 2.056 2s-.92 2-2.056 2c-1.135 0-2.056-.895-2.056-2s.92-2 2.056-2zm6.945 0c1.135 0 2.056.895 2.056 2s-.92 2-2.056 2c-1.135 0-2.055-.895-2.055-2s.92-2 2.055-2zm6.945 0c1.136 0 2.056.895 2.056 2s-.92 2-2.056 2c-1.135 0-2.055-.895-2.055-2s.92-2 2.055-2z",transform:"translate(-1211 -463) translate(1205 457)"})])])],-1)]))),_:1,__:[0]})}]]),lm={name:"NoticeBlockUserModal",components:{BrandDialog:J,IconNotificationHollow:ee},props:{alias:{type:String,default:""},username:{type:String,default:""}},emits:["update","update:isShow"],computed:{...t(["lang"])},methods:{onClick(){let e={};this.alias?e.alias=this.alias:this.username&&(e.username=this.username),re.blockUser(e).then((()=>{this.$emit("update"),this.closed()}))},closed(){this.$emit("update:isShow",!1)}}},cm={class:"notice-modal__body"},dm={class:"body__title"},um={class:"body__text"};const mm=Ft(lm,[["render",function(e,t,n,o,d,u){const m=i("IconNotificationHollow"),p=i("BaseButton"),y=i("BrandDialog");return a(),h(y,{class:"notice-modal",width:e.isMobile?"90%":"338px",isBrandNewStyle:"",idPrefix:"p2p_notice_block_user_dialog",onClosed:u.closed},{body:C((()=>[s("div",cm,[l(m,{class:"body__icon"}),s("p",dm,c(e.$t("c2c.noticeBlockUserModal.title")),1),s("p",um,c(e.$t("c2c.noticeBlockUserModal.text")),1),l(p,{class:"primary body__button",size:"large",onClick:u.onClick},{default:C((()=>[r(c(e.$t("t.yes")),1)])),_:1},8,["onClick"])])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-9ade063f"]]),pm={name:"ChatHeaderMenu",components:{IconButton:gt,IconMenu:rm,Notification:Oe,NoticeBlockUserModal:mm},props:{username:{type:String,default:""},fetchOtherUser:{type:Function,default:e=>re.getOtherUser(e)},fetchUnBlockUser:{type:Function,default:e=>re.unBlockUser(e)}},data:()=>({isMenuShown:!1,isBlockUserModalShown:!1,oppositeUser:null,notificationTextI18nKey:"",isLoading:!1}),computed:{...t(["lang"]),isBlocked(){var e;return null==(e=this.oppositeUser)?void 0:e.isBlockedBySelf},menuItemList(){const e=[{title:this.$t("c2c.viewProfile"),onAction:()=>this.onViewProfile()}];return this.oppositeUser?(this.isBlocked?e.push({title:this.$t("c2c.unblockUser"),onAction:()=>this.onUnBlock()}):e.push({title:this.$t("c2c.blockUser"),onAction:()=>this.onBlock()}),e):e}},watch:{username:{immediate:!0,handler(){this.updateUserInfo()}}},mounted(){document.addEventListener("click",this.onClickOutside)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside)},methods:{updateUserInfo(){this.username&&(this.isLoading=!0,this.fetchOtherUser(this.username).then((e=>{this.oppositeUser=null==e?void 0:e.user})).finally((()=>{this.isLoading=!1})))},toggleMenu(){this.isMenuShown=!this.isMenuShown},closeMenu(){this.isMenuShown=!1},onViewProfile(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.username}}),this.closeMenu()},onBlock(){this.isBlockUserModalShown=!0,this.closeMenu()},onBlocked(){this.showNotification("t.blocked"),this.updateUserInfo()},onUnBlock(){this.fetchUnBlockUser(this.username).then((()=>{this.showNotification("t.unblocked")})).finally((()=>{this.isLoading=!1,this.updateUserInfo()})),this.closeMenu()},showNotification(e){this.notificationTextI18nKey=e,this.$nextTick((()=>{this.$refs.chatNotification.showNotification()}))},onClickOutside(e){this.$refs.chatHeaderMenu&&!this.$refs.chatHeaderMenu.contains(e.target)&&this.closeMenu()}}},hm={ref:"chatHeaderMenu",class:"chat-header-menu relative"},ym={class:"menu-item-block absolute"},Cm=["onClick"];const gm=Ft(pm,[["render",function(e,t,r,p,g,f){const b=i("IconMenu"),v=i("IconButton"),k=i("Notification"),S=i("NoticeBlockUserModal");return a(),n("div",hm,[l(v,{onClick:f.toggleMenu},{default:C((()=>[l(b)])),_:1},8,["onClick"]),o(s("div",ym,[(a(!0),n(u,null,m(f.menuItemList,((e,t)=>
2(a(),n("div",{key:t,onClick:e.onAction},c(e.title),9,Cm)))),128))],512),[[d,g.isMenuShown]]),l(k,{ref:"chatNotification",class:"chat-notification fixed",text:g.notificationTextI18nKey,hiddenCountdown:3e3},null,8,["text"]),g.isBlockUserModalShown?(a(),h(S,{key:0,isShow:g.isBlockUserModalShown,"onUpdate:isShow":t[0]||(t[0]=e=>g.isBlockUserModalShown=e),username:r.username,onUpdate:f.onBlocked},null,8,["isShow","username","onUpdate"])):y("",!0)],512)}],["__scopeId","data-v-be3200c4"]]),fm={name:"ChatActionNoticeBar",props:{orderData:{type:Object,default:()=>({})}},data:()=>({timer:null,diffSeconds:0}),computed:{...t("c2c",["c2cAccountInfo"]),...D("c2c",["getCurrencyDecimal"]),isPay(){var e,t,i;const n=null==(t=null==(e=this.orderData)?void 0:e.buyer)?void 0:t.username;return(null==(i=this.orderData)?void 0:i.status)===Bi.ACCEPTED&&n===this.c2cAccountInfo.username},isRelease(){var e,t,i;const n=null==(t=null==(e=this.orderData)?void 0:e.seller)?void 0:t.username;return(null==(i=this.orderData)?void 0:i.status)===Bi.PAID&&n===this.c2cAccountInfo.username},countdownTitle(){return this.isPay?this.$t("c2c.chat.timeLeftToPay"):this.$t("c2c.chat.timeLeftToRelease")},paidInfo(){return _s(this.orderData)},total(){return this.getFormatPrice(this.paidInfo.transferAmount)},currency(){return this.paidInfo.currency},countdownMinutes(){const e=Math.floor(this.diffSeconds/60);return this.padLeftZero(e>0?e:0)},countdownSeconds(){const e=this.diffSeconds%60;return this.padLeftZero(e>0?e:0)}},created(){this.setTimer()},beforeUnmount(){this.clearTimer()},methods:{getFormatPrice(e){return Ls(e,this.getCurrencyDecimal(this.currency))},setTimer(){var e;this.diffSeconds=ft.seconds(new Date(null==(e=this.orderData)?void 0:e.timeoutAt),new Date),this.timer=setInterval((()=>{this.diffSeconds>0?this.diffSeconds--:this.clearTimer()}),1e3)},clearTimer(){this.timer&&clearInterval(this.timer)},padLeftZero:(e,t=2)=>String(e).padStart(t,"0")}},bm={key:0,class:"chat-action-notice-bar flex-box justify-between"},vm={class:"flex-box items-center inner-ml-4"},km={class:"countdown"},Sm={class:"flex-box items-center inner-ml-4"},Am={class:"total"},Mm={class:"currency"};const Im=Ft(fm,[["render",function(e,t,i,o,r,l){return l.isPay||l.isRelease?(a(),n("div",bm,[s("div",vm,[s("div",null,c(l.countdownTitle),1),s("div",km,c(l.countdownMinutes)+":"+c(l.countdownSeconds),1)]),s("div",Sm,[s("div",Am,c(l.total),1),s("div",Mm,c(l.currency),1)])])):y("",!0)}],["__scopeId","data-v-f9768f47"]]),wm={name:"ChatSwitcher",props:{orderId:{type:String,default:""},currentRoomId:{type:String,default:""}},emits:["onRoomIdChange"],computed:{...t("c2c",["c2cOrderChatRoomListMap"]),roomList(){return this.c2cOrderChatRoomListMap[this.orderId]||[]}},methods:{isAdminRoom:e=>[bt.BUYER_ADMIN,bt.SELLER_ADMIN].includes(e.type),onRoomIdChange(e){this.$emit("onRoomIdChange",e)}}},Tm={class:"chat-switcher flex-box justify-center"},_m=["onClick"],Dm={class:"room-name"},Pm={key:2,class:"unread-dot"};const Lm={name:"ChatHeader",components:{ChatHeaderMenu:gm,ChatActionNoticeBar:Im,ChatSwitcher:Ft(wm,[["render",function(e,t,i,o,l,d){return a(),n("div",Tm,[(a(!0),n(u,null,m(d.roomList,(t=>(a(),n("div",{key:t.id,class:p(["chat-switcher-room flex-center-center flex-1",{selected:i.currentRoomId===t.id}]),onClick:e=>d.onRoomIdChange(t.id)},[s("div",Dm,[d.isAdminRoom(t)?(a(),n(u,{key:0},[r(c(e.$t("c2c.chat.adminRoom",{brandName:e.$t("brand.name")})),1)],64)):(a(),n(u,{key:1},[r(c(e.$t("c2c.chat.generalRoom",{peopleCount:t.participants.length})),1)],64)),t.hasUnreadMessages?(a(),n("span",Pm)):y("",!0)])],10,_m)))),128))])}],["__scopeId","data-v-83a38fc1"]]),IconArrowRight:vt},props:{orderData:{type:Object,default:()=>({})},currentRoomId:{type:String,default:""},isActionNoticeBarHidden:{type:Boolean,default:!1}},emits:["onRoomIdChange","onBack"],computed:{...t("c2c",["c2cOrderChatRoomListMap","c2cAccountInfo"]),orderId(){var e;return(null==(e=this.orderData)?void 0:e.id)||""},roomList(){return this.c2cOrderChatRoomListMap[this.orderId]||[]},room(){return this.roomList[0]||{}},participantList(){return this.room.participants||[]},isUserTitle(){return 1===this.roomList.length&&this.room.type===bt.BUYER_SELLER&&2===this.participantList.length},oppositeUser(){var e,t,i,n;const a=null==(t=null==(e=this.orderData)?void 0:e.buyer)?void 0:t.username,s=null==(n=null==(i=this.orderData)?void 0:i.seller)?void 0:n.username,o=a!==this.c2cAccountInfo.username?a:s;return this.participantList.find((e=>e.username===o))||{}}},methods:{onRoomIdChange(e){this.$emit("onRoomIdChange",e)},onBack(){this.$emit("onBack")}}},Em={class:"chat-header"},xm={class:"chat-header-content flex-box justify-between"},Nm={class:"flex-box items-center"},Rm={class:"title-block flex-box items-center"},Bm={class:"user-title"},Om={key:1};const Fm=Ft(Lm,[["render",function(e,t,r,m,C,g){const f=i("IconArrowRight"),b=i("ChatHeaderMenu"),v=i("ChatActionNoticeBar"),k=i("ChatSwitcher");return a(),n("div",Em,[s("div",xm,[s("div",Nm,[e.isMobile?(a(),h(f,{key:0,class:"back-icon",onClick:g.onBack},null,8,["onClick"])):y("",!0),s("div",Rm,[g.isUserTitle?(a(),n(u,{key:0},[s("div",Bm,c(g.oppositeUser.alias),1),s("div",{class:p(["user-dot",{online:g.oppositeUser.isOnline}])},null,2)],64)):(a(),n("div",Om,c(e.$t("c2c.chat")),1))])]),l(b,{username:g.oppositeUser.username},null,8,["username"])]),o(l(v,{orderData:r.orderData},null,8,["orderData"]),[[d,!r.isActionNoticeBarHidden]]),g.isUserTitle?y("",!0):(a(),h(k,{key:0,orderId:g.orderId,currentRoomId:r.currentRoomId,onOnRoomIdChange:g.onRoomIdChange},null,8,["orderId","currentRoomId","onOnRoomIdChange"]))])}],["__scopeId","data-v-65f278f0"]]),Um={[kt.ME]:"sender-me",[kt.OTHER]:"sender-other",[kt.ADMIN]:"sender-admin"},$m={name:"ChatMessageSender",props:{side:{type:String,default:""},nickname:{type:String,default:""},isOnline:{type:Boolean,default:!1}},computed:{classes(){return[Um[this.side],{online:this.isOnline}]},displayName(){return this.nickname.slice(0,1)},isDotShown(){return this.side!==kt.ADMIN}}},qm={class:"flex-box items-center justify-center sender-circle"},Vm={key:0,class:"sender-dot"};
2const Hm=Ft($m,[["render",function(e,t,i,o,r,l){return a(),n("div",{class:p(["chat-message-sender",l.classes])},[s("div",qm,c(l.displayName),1),l.isDotShown?(a(),n("div",Vm)):y("",!0)],2)}],["__scopeId","data-v-a04099cf"]]),jm=e=>Math.hypot(e.touches[0].pageX-e.touches[1].pageX,e.touches[0].pageY-e.touches[1].pageY),Gm={class:"image-view-block flex-center-center"};const zm=Ft({name:"ImageViewDialog",components:{BrandDialog:J},props:{showingFile:{type:Object,default:()=>({})}},emits:["onClose"],data:()=>({imageView:null,imageElementScale:1,start:{}}),computed:{showingFileComponent(){return this.showingFile.type===Me.ORDER_CHAT_MESSAGE_IMAGE?"img":null}},mounted(){this.$nextTick((()=>{this.imageView=this.$refs.imageView,this.imageView.addEventListener("touchstart",this.onTouchStart),this.imageView.addEventListener("touchmove",this.onTouchMove),this.imageView.addEventListener("touchend",this.onTouchEnd)}))},beforeUnmount(){this.imageView.removeEventListener("touchstart",this.onTouchStart),this.imageView.removeEventListener("touchmove",this.onTouchMove),this.imageView.removeEventListener("touchend",this.onTouchEnd)},methods:{onTouchStart(e){2===e.touches.length&&(e.preventDefault(),this.start.x=(e.touches[0].pageX+e.touches[1].pageX)/2,this.start.y=(e.touches[0].pageY+e.touches[1].pageY)/2,this.start.distance=jm(e))},onTouchMove(e){if(2===e.touches.length){let t;e.preventDefault(),t=e.scale?e.scale:jm(e)/this.start.distance,this.imageElementScale=Math.min(Math.max(1,t),4);const i=`translate3d(${2*((e.touches[0].pageX+e.touches[1].pageX)/2-this.start.x)}px, ${2*((e.touches[0].pageY+e.touches[1].pageY)/2-this.start.y)}px, 0) scale(${this.imageElementScale})`;this.imageView.style.transform=i,this.imageView.style.WebkitTransform=i,this.imageView.style.zIndex="9999"}},onTouchEnd(){this.imageView.style.transform="",this.imageView.style.WebkitTransform="",this.imageView.style.zIndex=""},onClose(){this.$emit("onClose")}}},[["render",function(e,t,n,o,r,l){const c=i("BrandDialog");return a(),h(c,{class:"image-view-dialog",bodyWithPadding:!1,idPrefix:"p2p_chat_image_view_dialog",isBrandNewStyle:"",fullStyle:"",onClosed:l.onClose},{body:C((()=>[s("div",Gm,[(a(),h(I(l.showingFileComponent),{ref:"imageView",src:n.showingFile.url},null,8,["src"]))])])),_:1},8,["onClosed"])}],["__scopeId","data-v-34152472"]]),Km={class:"loading-icon relative"};const Ym=Ft({name:"LoadingIcon"},[["render",function(e,t,i,o,r,l){return a(),n("div",Km,t[0]||(t[0]=[s("div",null,null,-1),s("div",null,null,-1),s("div",null,null,-1)]))}],["__scopeId","data-v-447062bc"]]),Wm={class:"message-body-wrapper"},Zm={class:"message-body"},Xm={key:0,class:"message-sender-nickname"},Qm={class:"message-body-content flex-box relative"},Jm=["innerHTML"],ep=["src","onClick"],tp={key:1,class:"loading-block flex-center-center absolute"},ip={class:"message-date"};const np=Ft({name:"ChatUserMessage",components:{ChatMessageSender:Hm,ImageViewDialog:zm,LoadingIcon:Ym},props:{side:{type:String,default:""},message:{type:Object,default:()=>({})},participant:{type:Object,default:()=>({})}},data:()=>({isImageViewShown:!1,showingFile:{}}),computed:{isOnline(){return this.participant.isOnline},isMe(){return this.side===kt.ME},displayName(){var e;return this.participant.role===St.ADMIN?this.$t("c2c.administrator"):this.participant.alias||(null==(e=this.message)?void 0:e.username)},imageFileList(){var e;return((null==(e=this.message)?void 0:e.attachments)||[]).filter((e=>e.type===Me.ORDER_CHAT_MESSAGE_IMAGE))},showingFileComponent(){return this.showingFile.type===Me.ORDER_CHAT_MESSAGE_IMAGE?"img":null}},methods:{onImageClick(e){e.tempKey||(this.showingFile=e,this.isImageViewShown=!0)},onImageViewClose(){this.isImageViewShown=!1},getUrl:e=>e.tempKey?window.URL.createObjectURL(e.file):e.url}},[["render",function(e,t,o,r,d,C){const g=i("ChatMessageSender"),f=i("LoadingIcon"),b=i("ImageViewDialog");return a(),n("div",{class:p(["chat-user-message flex-box border-box",{"message-me":C.isMe}])},[l(g,{side:o.side,nickname:C.displayName,isOnline:C.isOnline},null,8,["side","nickname","isOnline"]),s("div",Wm,[s("div",Zm,[C.isMe?y("",!0):(a(),n("div",Xm,c(C.displayName),1)),s("div",Qm,[o.message.text?(a(),n("div",{key:0,class:"message-text",innerHTML:o.message.text},null,8,Jm)):y("",!0),(a(!0),n(u,null,m(C.imageFileList,((e,t)=>
2(a(),n("img",{key:t,class:"message-image",alt:"Message image",src:C.getUrl(e),onClick:t=>C.onImageClick(e)},null,8,ep)))),128)),o.message.isTemp?(a(),n("div",tp,[l(f)])):y("",!0)])]),s("div",ip,c(o.message.formattedCreatedAt),1)]),d.isImageViewShown?(a(),h(b,{key:0,showingFile:d.showingFile,onOnClose:C.onImageViewClose},null,8,["showingFile","onOnClose"])):y("",!0)],2)}],["__scopeId","data-v-8f5815f2"]]),ap={class:"chat-system-message border-box"},sp={class:"message-date"},op=["innerHTML"];const rp=Ft({name:"ChatSystemMessage",props:{message:{type:Object,default:()=>({})}}},[["render",function(e,t,i,o,r,l){return a(),n("div",ap,[s("div",sp,c(i.message.formattedCreatedAt),1),s("div",{class:"message-content",innerHTML:i.message.text},null,8,op)])}],["__scopeId","data-v-2dc467cd"]]);const lp={name:"ChatMain",components:{ChatMessage:Ft({name:"ChatMessage",components:{ChatUserMessage:np,ChatSystemMessage:rp},props:{message:{type:Object,default:()=>({})},participant:{type:Object,default:()=>({})}},computed:{...t("c2c",["c2cAccountInfo"]),side(){var e,t;if((null==(e=this.message)?void 0:e.username)===this.c2cAccountInfo.username)return kt.ME;return(this.participant.role||"")===St.ADMIN?kt.ADMIN:(null==(t=this.message)?void 0:t.type)===At.CODE?kt.SYSTEM:kt.OTHER},component(){var e;return(null==(e=this.message)?void 0:e.type)===At.CODE?rp:np}}},[["render",function(e,t,i,n,s,o){return a(),h(I(o.component),{side:o.side,message:i.message,participant:i.participant},null,8,["side","message","participant"])}]])},props:{orderData:{type:Object,default:()=>({})},roomId:{type:String,default:""},triggeredScrollTimestamp:{type:Number,default:0}},emits:["onPreviousMessage","onNextMessage"],data:()=>({isAutoScrollable:!0,isSmoothScroll:!0}),computed:{...t("c2c",["c2cOrderChatRoomListMap","c2cChatMessageListMap"]),orderId(){var e;return(null==(e=this.orderData)?void 0:e.id)||""},messageList(){return this.c2cChatMessageListMap[this.roomId]||[]},participantList(){var e;return(null==(e=(this.c2cOrderChatRoomListMap[this.orderId]||[]).find((e=>e.id===this.roomId)))?void 0:e.participants)||[]}},watch:{roomId(){this.isAutoScrollable=!0},messageList:{handler(){this.scrollToBottom()},immediate:!0},triggeredScrollTimestamp(){setTimeout((()=>{this.isAutoScrollable=!0,this.scrollToBottom()}),500)}},mounted(){this.$nextTick((()=>{this.$refs.messageBlock.addEventListener("scroll",this.onScroll,!0)}))},beforeUnmount(){this.$refs.messageBlock.removeEventListener("scroll",this.onScroll,!0)},methods:{getParticipant(e){return this.participantList.find((t=>t.username===(null==e?void 0:e.username)))||{}},scrollToBottom(){0!==this.messageList.length&&this.isAutoScrollable&&this.$nextTick((()=>{this.isAutoScrollable=!1;const{scrollHeight:e}=this.$refs.messageBlock;this.$refs.messageBlock.scrollTo({behavior:this.isSmoothScroll?"smooth":"auto",top:e}),this.isSmoothScroll=!1}))},onScroll:Mt((function(e){const{scrollHeight:t,scrollTop:i,clientHeight:n}=e.target;if(0===Number(i))return void this.$emit("onPreviousMessage");B(i).plus(n).gte(t)&&this.$emit("onNextMessage")}),200)}},cp={class:"chat-main flex-box flex-column border-box flex-1"},dp={ref:"messageBlock",class:"message-block h-100"};const up=Ft(lp,[["render",function(e,t,o,r,l,c){const d=i("ChatMessage");return a(),n("div",cp,[s("div",dp,[(a(!0),n(u,null,m(c.messageList,(e=>(a(),h(d,{key:e.id,message:e,participant:c.getParticipant(e)},null,8,["message","participant"])))),128))],512)])}],["__scopeId","data-v-6499e27d"]]),mp={auto:"auto",left:"left",right:"right"},pp={[mp.auto]:"",[mp.left]:"text-align-left",[mp.right]:"text-align-right"},hp={name:"ContentEditableInput",components:{IconDelete2:Tt,IconEye:wt,IconEyeClose:It},props:{value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},type:{type:String,default:"text"},readonly:{type:Boolean,default:!1},isError:{type:Boolean,default:!1},isCurrency:{type:Boolean,default:!1},maxlength:{type:String,default:""},placeholderColor:{type:String,default:""},isBrandNewStyle:{type:Boolean,default:!1},setFocus:{type:Boolean,default:!1},refName:{type:String,default:"input"},hasFocusStyle:{type:Boolean,default:!1},textAlign:{type:String,default:"auto",validator:e=>Object.values(mp).includes(e)},hasInnerGap:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},hidable:{type:Boolean,default:!1},autocomplete:{type:String,default:""},maxRow:{type:Number,default:0}}
2,emits:["keydown","keyup","keypress","focus","blur","update:value"],data:()=>({isFocus:!1,isHidden:!0,isClearButtonMouseEntered:!1,inputMaxHeight:0,isOverline:!1}),computed:{classes(){return[pp[this.textAlign]||"",{"input-error":this.isError,"input-focus":this.hasFocusStyle&&this.isFocus,"input-disabled":this.disabled,"brand-new-style":this.isBrandNewStyle,"inner-gap":this.hasInnerGap}]},inputBlockStyles(){return this.value&&this.inputMaxHeight&&this.isOverline?{height:`${this.inputMaxHeight}px`,"max-height":`${this.inputMaxHeight}px`,"overflow-x":"hidden","overflow-y":"auto"}:{}},typeRevision(){return this.hidable&&this.isHidden?"password":this.type},isClearButtonShown(){return this.clearable&&this.value&&(this.isFocus||this.isClearButtonMouseEntered)},hasSupportButton(){return this.isClearButtonShown||this.hidable}},watch:{maxRow:{handler(e){this.inputMaxHeight=e?16*e:0},immediate:!0}},mounted(){this.$nextTick((()=>{this.setFocus&&this.$refs[this.refName].focus()})),this.$refs[this.refName]&&""!==this.placeholderColor&&this.$refs[this.refName].style.setProperty("--placeholder-color",this.placeholderColor)},methods:{handleInput(e){this.checkInputHeight(),this.$emit("update:value",e.target.innerHTML)},handleKeyUp(e){this.$emit("keyup",e.target.innerHTML)},handleKeyPress(e){if(this.isCurrency){const t=String.fromCharCode(e.keyCode);/^[0-9,.]+$/.test(t)||e.preventDefault()}this.$emit("keypress",e.target.innerHTML)},handleFocus(e){this.isFocus=!0,this.$emit("focus",e.target.innerHTML)},handleBlur(e){this.isFocus=!1,this.$emit("blur",e.target.innerHTML)},onClearButtonMouseEnter(){this.isClearButtonMouseEntered=!0},onClearButtonMouseLeave(){this.isClearButtonMouseEntered=!1},onClear(){this.$emit("update:value",""),this.$emit("keyup",""),this.onClearButtonMouseLeave()},onHidden(){this.isHidden=!this.isHidden},checkInputHeight(){this.$nextTick((()=>{const{clientHeight:e}=this.$refs[this.refName];this.isOverline=this.inputMaxHeight<e}))}}},yp=["text","placeholder","type","readonly","isError","disabled","maxlength","autocomplete"],Cp={key:0,class:"input-support-wrap"};const gp=["image/jpeg","image/png"],fp={name:"ChatToolbar",components:{ContentEditableInput:Ft(hp,[["render",function(e,t,o,r,l,c){const d=i("IconDelete2"),m=i("IconEyeClose"),C=i("IconEye");return a(),n("div",{class:p(["contenteditable-input-wrapper",c.classes])},[w(e.$slots,"prefix",{},void 0,!0),s("div",{class:"contenteditable-input flex-box flex-column items-center justify-start",style:E(c.inputBlockStyles)},[s("div",{ref:o.refName,contenteditable:"",class:"input-inline-input",text:o.value,placeholder:o.placeholder,type:c.typeRevision,readonly:o.readonly,isError:o.isError,disabled:o.disabled,maxlength:o.maxlength,autocomplete:o.autocomplete,onInput:t[0]||(t[0]=e=>c.handleInput(e)),onKeyup:t[1]||(t[1]=e=>c.handleKeyUp(e)),onKeypress:t[2]||(t[2]=e=>c.handleKeyPress(e)),onFocus:t[3]||(t[3]=e=>c.handleFocus(e)),onBlur:t[4]||(t[4]=e=>c.handleBlur(e)),onKeydown:t[5]||(t[5]=t=>e.$emit("keydown",t))},null,40,yp)],4),c.hasSupportButton?(a(),n("div",Cp,[c.isClearButtonShown?(a(),h(d,{key:0,onClick:c.onClear,onMouseenter:c.onClearButtonMouseEnter,onMouseleave:c.onClearButtonMouseLeave},null,8,["onClick","onMouseenter","onMouseleave"])):y("",!0),o.hidable?(a(),n(u,{key:1},[l.isHidden?(a(),h(m,{key:0,onClick:c.onHidden},null,8,["onClick"])):(a(),h(C,{key:1,onClick:c.onHidden},null,8,["onClick"]))],64)):y("",!0)])):y("",!0),w(e.$slots,"suffix",{},void 0,!0)],2)}],["__scopeId","data-v-7cc1e288"]]),IconPhoto:Ft({name:"IconPhoto",components:{Icon:se},emits:["click"]},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Photo Icon",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},{default:C((()=>t[1]||(t[1]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.98017 6.83182C5.51717 6.20532 6.48856 6.21207 7.01681 6.84597L9.37782 9.67918L10.3349 8.72206C10.8969 8.16014 11.8225 8.2114 12.3189 8.83195L14.5203 11.5837C14.7503 11.8712 14.7037 12.2907 14.4161 12.5207C14.1286 12.7507 13.7091 12.7041 13.4791 12.4166L11.2777 9.66487L10.3206 10.622C9.76623 11.1764 8.85546 11.1351 8.35352 10.5328L5.99252 7.69954L2.50586 11.7673C2.26624 12.0469 1.84538 12.0792 1.56583 11.8396C1.28628 11.6 1.2539 11.1791 1.49352 10.8996L4.98017 6.83182Z",fill:"currentColor"},null,-1),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.33301 2.66634C1.33301 1.92996 1.92996 1.33301 2.66634 1.33301L13.333 1.33301C14.0694 1.33301 14.6663 1.92996 14.6663 2.66634L14.6663 13.333C14.6663 14.0694 14.0694 14.6663 13.333 14.6663L2.66634 14.6663C1.92996 14.6663 1.33301 14.0694 1.33301 13.333L1.33301 2.66634ZM13.333 2.66634L2.66634 2.66634L2.66634 13.333L13.333 13.333L13.333 2.66634Z",fill:"currentColor"},null,-1),s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.66699 5.33333C8.66699 4.59695 9.26395 4 10.0003 4C10.7367 4 11.3337 4.59695 11.3337 5.33333C11.3337 6.06971 10.7367 6.66667 10.0003 6.66667C9.26395 6.66667 8.66699 6.06971 8.66699 5.33333Z",fill:"currentColor"},null,-1)]))),_:1,__:[1]})}]]),IconSend:Ft({name:"IconSend",components:{Icon:se},emits:["click"]},[["render",function(e,t,n,o,r,l){const c=i("Icon");return a(),h(c,{"aria-label":"Send Icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},{default:C((()=>t[1]||(t[1]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4477 12.8944C21.7865 12.725 22.0005 12.3788 22.0005 12C22.0005 11.6212 21.7865 11.275 21.4477 11.1056L3.44768 2.10558C3.10263 1.93306 2.68912 1.97439 2.38505 2.2118C2.08098 2.44921 1.94059 2.84035 2.02428 3.21694L3.63687 10.4736C3.67523 10.6462 3.82243 10.7732 3.99884 10.7858L15.4137 11.6011C15.909 11.6365 15.909 12.3637 15.4137 12.3991L3.99879 13.2145C3.82238 13.2271 3.67518 13.354 3.63681 13.5267L2.02428 20.7831C1.94059 21.1597 2.08098 21.5508 2.38505 21.7882C2.68912 22.0256 3.10263 22.067 3.44768 21.8944L21.4477 12.8944Z",fill:"currentColor"},null,-1)]))),_:1,__:[1]})}]])},props:{orderId:{type:String,default:""},roomId:{type:String,default:""},fetchMessage:{type:Function,default:(e,t,i)=>re.addChatMessage(e,t,i)},fetchUpload:{type:Function,default:e=>re.upload(e)},fetchUploadFileToS3:{type:Function,default:(e,t)=>re.uploadFileToS3(e,t)}},emits:["onInputFocus","onInputBlur","onSubmit"],data:()=>({messageText:"",isLoading:!1}),computed:{...t("c2c",["c2cAccountInfo"])},methods:{..._(["messageError"]),..._("c2c",["setC2CChatMessageListMap","deleteC2CChatMessageList"]),onInputFocus(){this.$emit("onInputFocus")},onInputBlur(){this.$emit("onInputBlur")}
2,onEnterKeyDown(e){e.shiftKey||(e.preventDefault(),this.onMessageTextSend())},onMessageTextSend(){this.focusInput(),this.messageText&&(this.isLoading=!0,this.fetchMessage(this.roomId,this.messageText).then((()=>{this.$emit("onSubmit")})).finally((()=>{this.clearInput(),this.isLoading=!1})))},focusInput(){this.$nextTick((()=>{var e,t,i;const n=null==(i=null==(t=null==(e=this.$refs)?void 0:e.toolbarInputWrapper)?void 0:t.$refs)?void 0:i.toolbarInput;n&&n.focus()}))},clearInput(){this.$nextTick((()=>{var e,t,i;const n=null==(i=null==(t=null==(e=this.$refs)?void 0:e.toolbarInputWrapper)?void 0:t.$refs)?void 0:i.toolbarInput;n&&(n.innerHTML=""),this.messageText=""}))},onPickPhoto(){this.$refs.photoInput.click()},onPhotoPicked(e){this.updateFiles(e.target.files)},updateFiles(e=[]){const t=e[0];if(!t)return;this.clearInputFiles();const{size:i,type:n}=t;i>5242880||!gp.includes(n)?this.messageError(this.$t("msg.uploadImageSizePrompt",{size:5})):this.uploadFile(t)},async uploadFile(e){var t;this.isLoading=!0;const i=await this.fetchUpload({orderId:this.orderId,type:Me.ORDER_CHAT_MESSAGE_IMAGE}),n=this.saveTempMessageFile(null==(t=null==i?void 0:i.fields)?void 0:t.key,"",e),a=await this.fetchUploadFileToS3(i,e);this.onMessageFileSend(a,n)},clearInputFiles(){this.$refs.photoInput.files&&(this.$refs.photoInput.value="")},onMessageFileSend(e,t){if(!e)return this.deleteTempMessage(t),void(this.isLoading=!1);this.isLoading=!0,this.fetchMessage(this.roomId,null,[e]).then((()=>{this.$emit("onSubmit")})).finally((()=>{this.deleteTempMessage(t),this.isLoading=!1}))},saveTempMessageFile(e,t="",i){const n=new Date,a=`temp-${n.getTime()}-${e}`,s={id:a,isTemp:!0,type:At.TEXT,username:this.c2cAccountInfo.username,text:t,createdAt:n.toString(),attachments:[{type:Me.ORDER_CHAT_MESSAGE_IMAGE,tempKey:e,file:i}]};return this.setC2CChatMessageListMap({roomId:this.roomId,messageList:[s]}),{roomId:this.roomId,messageId:a}},deleteTempMessage({roomId:e,messageId:t}){this.deleteC2CChatMessageList({roomId:e,messageIdList:[t]})}}},bp={ref:"toolbar",class:"chat-toolbar flex-box items-center"};const vp=Ft({name:"Chat",components:{ChatHeader:Fm,ChatMain:up,ChatToolbar:Ft(fp,[["render",function(e,t,o,r,c,d){const u=i("IconPhoto"),m=i("ContentEditableInput"),h=i("IconSend");return a(),n("div",bp,[l(m,{ref:"toolbarInputWrapper",value:c.messageText,"onUpdate:value":t[1]||(t[1]=e=>c.messageText=e),valueModifiers:{trim:!0},refName:"toolbarInput",class:"flex-1",placeholder:e.$t("c2c.chat.message.placeholder"),maxRow:5,hasInnerGap:"",isBrandNewStyle:"",setFocus:"",onFocus:d.onInputFocus,onBlur:d.onInputBlur,onKeydown:$(d.onEnterKeyDown,["enter"])},{suffix:C((()=>[l(u,{class:"photo-icon is-clickable",onClick:d.onPickPhoto},null,8,["onClick"]),s("input",{ref:"photoInput",class:"photo-picker",type:"file",accept:"image/*",onChange:t[0]||(t[0]=(...e)=>d.onPhotoPicked&&d.onPhotoPicked(...e))},null,544)])),_:1},8,["value","placeholder","onFocus","onBlur","onKeydown"]),l(h,{class:p(["send-icon",{"is-clickable":c.messageText}]),onClick:d.onMessageTextSend},null,8,["class","onClick"])],512)}],["__scopeId","data-v-bc695fdd"]])},props:{orderData:{type:Object,default:()=>({})},fetchMessageList:{type:Function,default:e=>re.getChatMessageList(e)},isKeepUpdating:{type:Boolean,default:!0}},emits:["onBack"],data:()=>({currentRoomId:"",triggeredRoomListTimestamp:0,triggeredMessageListTimestamp:0,triggeredScrollTimestamp:0,isActionNoticeBarHidden:!1,timer:null,isUpdating:!0,visualVh:""}),computed:{...t("c2c",["c2cChatMessageListMap"]),...D("c2c",["hasUnreadMessagesBy"]),orderId(){var e;return(null==(e=this.orderData)?void 0:e.id)||""},currentMessageList(){return(this.c2cChatMessageListMap[this.currentRoomId]||[]).filter((e=>!e.isTemp))},currentFirstMessageId(){var e;return null==(e=this.currentMessageList[0])?void 0:e.id},currentLastMessageId(){var e;return null==(e=this.currentMessageList[this.currentMessageList.length-1])?void 0:e.id},isToolbarShown(){var e;return![Bi.RELEASED,Bi.CANCELED,Bi.TERMINATED].includes(null==(e=this.orderData)?void 0:e.status)},hasUnreadMessages(){return this.hasUnreadMessagesBy({orderId:this.orderId,roomId:this.currentRoomId})},styles(){return{"--chat-vh":this.visualVh?`${this.visualVh}px`:"var(--vh)"}}},watch:{triggeredRoomListTimestamp(){this.updateRoomList()},triggeredMessageListTimestamp(){(this.hasUnreadMessages||0===this.currentMessageList.length)&&this.onNextMessage()}}
2,mounted(){this.update(),window.visualViewport&&(window.visualViewport.addEventListener("resize",this.throttleVisualResize),window.visualViewport.addEventListener("scroll",this.throttleVisualScroll))},created(){this.setTimer()},beforeUnmount(){this.clearTimer(),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.throttleVisualResize),window.visualViewport.removeEventListener("scroll",this.throttleVisualScroll))},methods:{..._("c2c",["updateC2COrderChatRoomListMap","setC2CChatMessageListMap"]),updateRoomList(){this.isUpdating=!0,this.updateC2COrderChatRoomListMap({orderId:this.orderId}).then((e=>{var t;this.onRoomIdChange(this.currentRoomId||(null==(t=e[0])?void 0:t.id)||"")})).finally((()=>{this.isUpdating=!1}))},updateMessageList(e=_t.DESC,t){this.isUpdating=!0;const i={chatRoomId:this.currentRoomId,limit:10,cursorDirection:e,cursorChatMessageId:t};this.fetchMessageList(i).then((e=>{const t=((null==e?void 0:e.chatMessages)||[]).map((e=>{const t=U(new Date(e.createdAt),"yyyy-MM-dd HH:mm:ss");return{...e,formattedCreatedAt:t}}));this.setC2CChatMessageListMap({roomId:this.currentRoomId,messageList:t})})).finally((()=>{this.isUpdating=!1,this.hasUnreadMessages&&this.update()}))},onRoomIdChange(e){this.currentRoomId=e,this.triggeredMessageListTimestamp=(new Date).getTime()},onBack(){this.$emit("onBack")},onInputFocus(){this.triggeredScrollTimestamp=(new Date).getTime(),this.isActionNoticeBarHidden=!0},onInputBlur(){this.isActionNoticeBarHidden=!1},onSubmit(){this.onNextMessage()},onPreviousMessage(){this.currentFirstMessageId?this.updateMessageList(_t.DESC,this.currentFirstMessageId):this.updateMessageList()},onNextMessage(){this.currentLastMessageId?this.updateMessageList(_t.ASC,this.currentLastMessageId):this.updateMessageList()},update(){this.triggeredRoomListTimestamp=(new Date).getTime()},setTimer(){this.isKeepUpdating&&(this.timer=setInterval((()=>{this.isUpdating||this.update()}),1e4))},clearTimer(){this.timer&&clearInterval(this.timer)},scrollToTop(){const{pageTop:e}=window.visualViewport;window.scrollTo({behavior:"smooth",top:`-${e}`})},throttleVisualResize:Mt((function(){const{height:e}=window.visualViewport;this.visualVh=.01*e,this.scrollToTop()}),200),throttleVisualScroll:Mt((function(){this.scrollToTop()}),200)}},[["render",function(e,t,s,o,r,c){const d=i("ChatHeader"),u=i("ChatMain"),m=i("ChatToolbar");return a(),n("div",{class:"chat flex-box flex-column flex-1",style:E(c.styles)},[l(d,{orderData:s.orderData,currentRoomId:r.currentRoomId,isActionNoticeBarHidden:r.isActionNoticeBarHidden,onOnRoomIdChange:c.onRoomIdChange,onOnBack:c.onBack},null,8,["orderData","currentRoomId","isActionNoticeBarHidden","onOnRoomIdChange","onOnBack"]),l(u,{orderData:s.orderData,roomId:r.currentRoomId,triggeredScrollTimestamp:r.triggeredScrollTimestamp,onOnPreviousMessage:c.onPreviousMessage,onOnNextMessage:c.onNextMessage},null,8,["orderData","roomId","triggeredScrollTimestamp","onOnPreviousMessage","onOnNextMessage"]),c.isToolbarShown?(a(),h(m,{key:0,orderId:c.orderId,roomId:r.currentRoomId,onOnInputFocus:c.onInputFocus,onOnInputBlur:c.onInputBlur,onOnSubmit:c.onSubmit},null,8,["orderId","roomId","onOnInputFocus","onOnInputBlur","onOnSubmit"])):y("",!0)],4)}],["__scopeId","data-v-bb18856e"]]),kp={name:"MobileMyOrderListCard",components:{Amount:gl,PaymentTag:Ta,Nickname:ol,PriceField:pl,FeeToolTip:Fu,ActionButtons:ju,IconChevronRight:V,IconChat:Ou,Chat:vp,BrandDialog:J},props:{item:{type:Object,required:!0}},emits:["click","tabletClick"],data:()=>({STATUS_MAPPING:yu,showChatDialog:!1}),computed:{...Gu,settlementAmount(){return Ps(this.item)},createdAt(){return U(new Date(this.item.createdAt),"yyyy-MM-dd HH:mm:ss")}},methods:{onChatClick(){this.isMobile?this.showChatDialog=!0:this.$emit("tabletClick")},onChatClose(){this.showChatDialog=!1},handleNameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.counterParty.username}})}}},Sp={class:"flex-center-between header"},Ap={class:"inline-flex"},Mp={class:"order-id"},Ip={class:"order-date"},wp={class:"content"},Tp={class:"flex-center-between"},_p={class:"title"},Dp={class:"row-margin flex-box justify-between"},Pp={class:"flex-box items-center"},Lp={class:"row-margin flex-center-between"};const Ep=Ft(kp,[["render",function(e,t,o,d,u,m){const g=i("IconChat"),f=i("IconChevronRight"),b=i("Amount"),v=i("PriceField"),k=i("FeeToolTip"),S=i("Nickname"),A=i("PaymentTag"),M=i("ActionButtons"),I=i("Chat"),w=i("BrandDialog");return a(),n("div",{class:"card-wrapper",onClick:t[1]||(t[1]=t=>e.$emit("click",t))},[s("div",Sp,[s("div",Ap,[s("div",Mp,c(o.item.id),1),o.item.hasUnreadMessages?(a(),n("div",{key:0,class:"relative",onClick:t[0]||(t[0]=T(((...e)=>m.onChatClick&&m.onChatClick(...e)),["stop"]))},[l(g,{class:"chat-icon"}),t[2]||(t[2]=s("div",{class:"unread-icon"},null,-1))])):y("",!0)]),s("div",Ip,c(m.createdAt),1)]),s("div",wp,[s("div",Tp,[s("div",null,[s("span",{class:p(["title action",{red:!o.item.isSelfBuyer}])},c(e.$t(e.orderAction)),3),s("span",_p,c(o.item.baseCurrency),1)]),s("div",{class:p(["relative flex-box items-center status",{disabled:e.withoutCTA}])},[r(c(e.$t(u.STATUS_MAPPING[o.item.status].lang))+" ",1),l(f,{class:"arrow-icon"})],2)]),l(b,{class:"row-margin settlement",amount:m.settlementAmount,unit:o.item.quoteCurrency,title:"c2c.marketList.settlementAmount"},null,8,["amount","unit"]),l(b,{class:"row-margin",amount:o.item.price,unit:o.item.quoteCurrency,title:"c2c.marketList.unitPrice"}
2,null,8,["amount","unit"]),s("div",Dp,[r(c(e.$t("c2c.myOrderList.swapAmount"))+" ",1),s("div",Pp,[l(v,{priceValue:o.item.amount,currency:o.item.baseCurrency},null,8,["priceValue","currency"]),r(" "+c(o.item.baseCurrency)+" ",1),e.showTooltip?(a(),h(k,{key:0})):y("",!0)])]),s("div",Lp,[l(S,{nickname:e.counterParty.alias,isOnline:e.counterParty.isOnline,size:"extraSmall",hasLink:"",onClick:m.handleNameClick},null,8,["nickname","isOnline","onClick"]),l(A,{methodType:o.item.paymentMethodTypes[0]},null,8,["methodType"])]),l(M,{item:o.item},null,8,["item"])]),u.showChatDialog?(a(),h(w,{key:0,fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_chat_dialog"},{body:C((()=>[l(I,{orderData:o.item,onOnBack:m.onChatClose},null,8,["orderData","onOnBack"])])),_:1})):y("",!0)])}],["__scopeId","data-v-55877dfe"]]),xp={class:"placeholder"},Np={key:0,class:"selected-item"};const Rp=Ft({name:"DropdownCancel",components:{Dropdown:ke,DropdownItem:ve},props:{reasons:{type:Array,default:()=>[]},placeholder:{type:String,default:""}},emits:["input"],data:()=>({selectedValue:null}),computed:{selectedItem(){return this.reasons.find((e=>e.value===this.selectedValue)).text}},methods:{handleSelect(e){this.selectedValue=e,this.$emit("input",e)}}},[["render",function(e,t,o,l,d,p){const g=i("DropdownItem"),f=i("Dropdown");return a(),h(f,{class:"dropdown-cancel",value:d.selectedValue,onInput:p.handleSelect},{placeholder:C((()=>[s("p",xp,c(e.$t(o.placeholder)),1)])),value:C((()=>[p.selectedItem?(a(),n("p",Np,c(e.$t(p.selectedItem)),1)):y("",!0)])),default:C((()=>[(a(!0),n(u,null,m(o.reasons,((t,i)=>(a(),h(g,{key:i,value:t.value},{default:C((()=>[r(c(e.$t(t.text)),1)])),_:2},1032,["value"])))),128))])),_:1},8,["value","onInput"])}],["__scopeId","data-v-304631c7"]]),Bp=[{text:"c2c.buySell.cancel.userAbandonment",value:"USER_ABANDONMENT"},{text:"c2c.buySell.cancel.buyerNotMeetRequire",value:"BUYER_NOT_MEET_REQUIRE",isSell:!1},{text:"c2c.buySell.cancel.buyerExtraFee",value:"BUYER_GOT_ASK_EXTRA_FEE",isSell:!1},{text:"c2c.buySell.cancel.userPaymentError",value:"USER_PAYMENT_METHOD_ERROR",isSell:!1},{text:"c2c.buySell.cancel.sellerNotMeetRequire",value:"SELLER_NOT_MEET_REQUIRE",isSell:!0},{text:"c2c.buySell.cancel.sellerExtraFee",value:"SELLER_GOT_ASK_EXTRA_ASSETS",isSell:!0},{text:"c2c.buySell.cancel.userPaymentError",value:"USER_PAYMENT_METHOD_ERROR",isSell:!0},{text:"c2c.buySell.cancel.otherReason",value:"OTHER_CANCEL_REASONS"}],Op={name:"CancelOrderModal",components:{BrandDialog:J,DropdownCancel:Rp,Note:wa},props:{isSell:{type:Boolean,default:!1},orderId:{type:String,required:!0}},emits:["onClose"],data:()=>({note:"",formData:{statusSubtype:"",statusRemarkData:{reason:""}}}),computed:{isButtonEnabled(){return!this.formData.statusSubtype||"OTHER_CANCEL_REASONS"===this.formData.statusSubtype&&!this.note},reasons(){return Bp.filter((e=>e.isSell===this.isSell||void 0===e.isSell))}},methods:{onCloseClick(){this.$emit("onClose")},async onCancelClick(){"OTHER_CANCEL_REASONS"===this.formData.statusSubtype?this.formData.statusRemarkData.reason=this.note:this.formData.statusRemarkData=null;try{await re.cancelOrder(this.orderId,this.formData)}catch(e){}}}},Fp={class:"title"},Up={class:"input-wrapper"},$p={class:"reason-label"};const qp=Ft(Op,[["render",function(e,t,n,o,d,u){const m=i("DropdownCancel"),p=i("Note"),y=i("BaseButton"),g=i("BrandDialog");return a(),h(g,{class:"cancel-order-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_cancel_order_dialog",onClosed:u.onCloseClick},{header:C((()=>[r(c(e.$t("c2c.buySell.cancelOrder")),1)])),body:C((()=>[s("div",Fp,c(e.$t("c2c.buySell.cancelOrderTitle")),1),s("div",Up,[s("div",$p,[t[2]||(t[2]=s("span",{class:"required"},"*",-1)),r(" "+c(e.$t("c2c.buySell.tellUsWhy")),1)]),l(m,{modelValue:d.formData.statusSubtype,"onUpdate:modelValue":t[0]||(t[0]=e=>d.formData.statusSubtype=e),placeholder:"c2c.buySell.chooseCancelReason",reasons:u.reasons},null,8,["modelValue","reasons"])]),l(p,{modelValue:d.note,"onUpdate:modelValue":t[1]||(t[1]=e=>d.note=e),title:"t.moreDetails",maxlength:"1000"},null,8,["modelValue"]),l(y,{class:"primary button-cancel",size:"large",disabled:u.isButtonEnabled,onClick:u.onCancelClick}
2,{default:C((()=>[r(c(e.$t("c2c.buySell.cancelOrderConfirm")),1)])),_:1},8,["disabled","onClick"])])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-ea9c46f4"]]),Vp={name:"ChatWrapper",components:{IconChat:Ou,NickName:ol},props:{orderId:{type:String,default:""},nickname:{type:String,default:""},username:{type:String,default:""},isOnline:{type:Boolean,default:!1},hasNicknameLink:{type:Boolean,default:!1},onChatClick:{type:Function,default:()=>{}},isKeepUpdating:{type:Boolean,default:!0}},data:()=>({timer:null,isUpdating:!0}),computed:{...t(["lang"]),...D("c2c",["hasUnreadMessagesBy"]),hasUnreadMessages(){return this.hasUnreadMessagesBy({orderId:this.orderId})}},watch:{isKeepUpdating:{handler(e){e?this.setTimer():this.clearTimer()},immediate:!0}},mounted(){this.update()},beforeUnmount(){this.clearTimer()},methods:{..._("c2c",["updateC2COrderChatRoomListMap"]),onNicknameClick(){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:this.username}})},update(){this.isUpdating=!0,this.updateC2COrderChatRoomListMap({orderId:this.orderId}).finally((()=>{this.isUpdating=!1}))},setTimer(){this.timer=setInterval((()=>{!this.isUpdating&&this.update()}),1e4)},clearTimer(){this.timer&&clearInterval(this.timer)}}},Hp={class:"chat-wrapper"},jp={class:"icon-chat-wrapper"},Gp={key:0,class:"notification"};const zp=Ft(Vp,[["render",function(e,t,o,r,c,d){const u=i("NickName"),m=i("IconChat");return a(),n("div",Hp,[l(u,{nickname:o.nickname,isOnline:o.isOnline,hasLink:o.hasNicknameLink,onClick:d.onNicknameClick},null,8,["nickname","isOnline","hasLink","onClick"]),s("div",jp,[d.hasUnreadMessages?(a(),n("div",Gp)):y("",!0),l(m,{class:"icon-chat",onClick:o.onChatClick},null,8,["onClick"])])])}],["__scopeId","data-v-6a622461"]]),Kp={name:"ConfirmOrderModal",components:{BrandDialog:J,PaymentTag:Ta,IconCopy:ht,Chat:vp,ChatWrapper:zp},inject:["orderListContext","context"],props:{defaultOrderData:{type:Object,default:()=>({})}},emits:["onClose"],data(){return{orderData:this.defaultOrderData,isBalanceInsufficient:!1,isChatShown:!1,timer:null,diffSeconds:0}},computed:{...t(["lang"]),...D("c2c",["getCurrencyDecimal"]),orderId(){return this.orderData.id},isSell(){return"SELL"===this.orderData.side},baseCurrency(){return this.orderData.baseCurrency},quoteCurrency(){return this.orderData.quoteCurrency},orderNumber(){return this.orderData.id},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},unitPrice(){return this.getFormatPrice(this.orderData.price,this.quoteCurrency)},swapAmount(){return this.getFormatPrice(this.orderData.amount,this.baseCurrency)},settlementAmount(){return Ps(this.orderData)},createdDate(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd")},createdTime(){return U(new Date(this.orderData.createdAt),"HH:mm:ss")},paymentType(){return this.orderData.paymentMethodTypes[0]},sellerName(){var e;return null==(e=this.orderData)?void 0:e.seller.username},maskedAccountNumber(){var e,t,i,n;return`****${((null==(n=null==(i=null==(t=((null==(e=this.orderData)?void 0:e.paymentMethods)||[])[0])?void 0:t.data)?void 0:i.properties)?void 0:n.accountNumber)||"").substr(-4)}`},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer},fee(){return this.isSell?this.transferAmount.paid.feeAmount:this.transferAmount.received.feeAmount},total(){return this.isSell?this.transferAmount.paid.totalAmount:this.transferAmount.received.totalAmount},countdownMinutes(){const e=Math.floor(this.diffSeconds/60);return this.padLeftZero(e>0?e:0)},countdownSeconds(){const e=this.diffSeconds%60;return this.padLeftZero(e>0?e:0)}},async created(){await this.init(),this.setTimer(this.orderData)},beforeUnmount(){this.clearTimer()},methods:{setTimer(e){this.diffSeconds=ft.seconds(new Date(null==e?void 0:e.timeoutAt),new Date),this.timer=setInterval((()=>{this.diffSeconds>0?this.diffSeconds--:this.clearTimer()}),1e3)},clearTimer(){this.timer&&clearInterval(this.timer)},padLeftZero:(e,t=2)=>String(e).padStart(t,"0"),onCopy(){this.context.showNotification("msg.copied")},onError(){this.context.showNotification("msg.fail")},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onGoToWallet(){const e={name:"walletSpot",params:{lang:this.lang}};this.isNotDesktop?this.$router.push(e):window.open(this.$router.resolve(e).href,"_blank")},onCancelClick(){this.orderListContext.orderId=this.orderData.id,this.orderListContext.status=this.orderData.status,this.orderListContext.
2isShowCancelNoticeModal=!0},async onConfirmClick(){try{await re.acceptOrder(this.orderData.id),this.$router.push({name:"c2cOrder",params:{id:this.orderData.id,lang:this.lang}})}catch(e){const{code:t}=e.response.data;this.isBalanceInsufficient=ue.C2C_OTC_USER_BALANCE_INSUFFICIENT===t}},onChatClick(){this.isMobile?this.isChatShown=!0:this.$router.push({name:"c2cOrder",params:{id:this.orderData.id,lang:this.lang}})},onChatBack(){this.isChatShown=!1},onCloseClick(){this.$emit("onClose")},async init(){const{order:e}=await re.getOrder(this.orderData.id);this.orderData={...this.orderData,...e}}}},Yp={class:"info-wrapper"},Wp={class:"flex-box justify-between",style:{"margin-bottom":"27px"}},Zp={class:"confirm-order-text font-bold"},Xp={class:"counter font-bold"},Qp={class:"wrapper"},Jp={class:"title"},eh={class:"flex-box justify-between"},th={class:"font-medium"},ih={class:"amount-field flex-box"},nh={class:"font-medium"},ah={class:"font-light"},sh={class:"flex-box justify-between"},oh={class:"font-medium"},rh={class:"amount-field flex-box"},lh={class:"font-medium"},ch={class:"font-light"},dh={class:"flex-box justify-between"},uh={class:"font-medium"},mh={class:"amount-field flex-box"},ph={class:"font-medium"},hh={class:"font-light"},yh={key:0,class:"flex-box justify-between"},Ch={class:"font-medium"},gh={class:"amount-field flex-box"},fh={class:"font-medium"},bh={class:"font-light"},vh={key:1,class:"flex-box justify-between"},kh={class:"font-medium"},Sh={class:"amount-field flex-box"},Ah={class:"font-medium"},Mh={class:"font-light"},Ih={key:2,class:"flex-box justify-between"},wh={class:"font-medium"},Th={class:"amount-field flex-box"},_h={class:"font-medium"},Dh={class:"font-light"},Ph={class:"flex-box justify-between"},Lh={class:"font-medium"},Eh={class:"font-medium flex-box items-center"},xh={class:"icon-copy"},Nh={key:3,class:"flex-box justify-between"},Rh={class:"font-medium"},Bh={class:"font-medium"},Oh={class:"font-light"},Fh={class:"wrapper"},Uh={class:"title"},$h={class:"flex-box justify-between"},qh={class:"font-medium"},Vh={key:0,class:"font-medium"},Hh={class:"button-wrapper flex-box"},jh={key:0,class:"error-insufficient-balance"};const Gh=Ft(Kp,[["render",function(e,t,d,m,p,g){const f=i("ChatWrapper"),b=i("IconCopy"),v=i("PaymentTag"),k=i("BaseButton"),S=i("Chat"),A=i("BrandDialog"),M=P("clipboard");return a(),h(A,{class:"confirm-order-modal",width:"560px",isBrandNewStyle:"",idPrefix:"p2p_confirm_order_dialog",fullStyle:e.isMobile,showClose:!p.isChatShown,bodyWithPadding:!p.isChatShown,onClosed:g.onCloseClick},R({body:C((()=>[p.isChatShown?(a(),h(S,{key:1,orderData:p.orderData,onOnBack:g.onChatBack},null,8,["orderData","onOnBack"])):(a(),n(u,{key:0},[s("div",Yp,[s("div",Wp,[s("div",Zp,c(e.$t(g.isSell?"c2c.buySell.confirmOrder":"c2c.buySell.confirmDeal")),1),s("div",Xp,c(g.countdownMinutes)+":"+c(g.countdownSeconds),1)]),l(f,{orderId:g.orderId,nickname:g.merchantInfo.alias,username:g.merchantInfo.username,onChatClick:g.onChatClick,isOnline:g.merchantInfo.isOnline,isKeepUpdating:!p.isChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])]),t[1]||(t[1]=s("hr",{class:"horizontal-line"},null,-1)),s("div",Qp,[s("div",Jp,c(e.$t("c2c.buySell.orderInfo")),1),s("div",eh,[s("div",th,c(e.$t("c2c.marketList.settlementAmount")),1),s("div",ih,[s("span",nh,c(g.settlementAmount),1),s("span",ah,c(g.quoteCurrency),1)])]),s("div",sh,[s("div",oh,c(e.$t("c2c.marketList.unitPrice")),1),s("div",rh,[s("span",lh,c(g.unitPrice),1),s("span",ch,c(g.quoteCurrency),1)])]),s("div",dh,[s("div",uh,c(e.$t("c2c.myOrderList.swapAmount")),1),s("div",mh,[s("span",ph,c(g.swapAmount),1),s("span",hh,c(g.baseCurrency),1)])]),g.fee?(a(),n("div",yh,[s("div",Ch,c(e.$t("c2c.buySell.fee")),1),s("div",gh,[s("span",fh,c(g.fee),1),s("span",bh,c(g.baseCurrency),1)])])):y("",!0),g.isSell&&g.fee?(a(),n("div",vh,[s("div",kh,c(e.$t("c2c.buySell.totalDeducted")),1),s("div",Sh,[s("span",Ah,c(g.total),1),s("span",Mh,c(g.baseCurrency),1)])])):y("",!0),g.isSell?y("",!0):(a(),n("div",Ih,[s("div",wh,c(e.$t("c2c.buySell.totalReceived")),1),s("div",Th,[s("span",_h,c(g.total),1),s("span",Dh,c(g.baseCurrency),1)])])),s("div",Ph,[s("div",Lh,c(e.$t("c2c.buySell.orderNumber")),1),s("div",null,[s("span",Eh,[r(c(g.orderNumber)+" ",1),o((a(),n("span",xh,[l(b)])),[[M,g.orderNumber,"copy"],[M,g.onCopy,"success"],[M,g.onError,"error"]])])])]),g.isSell?(a(),n("div",Nh,[s("div",Rh,c(e.$t("c2c.buySell.orderCreated")),1),s("div",null,[s("span",Bh,c(g.createdDate),1),s("span",Oh,c(g.createdTime),1)])])):y("",!0)]),t[2]||(t[2]=s("hr",{class:"horizontal-line"},null,-1)),s("div",Fh,[s("div",Uh,c(e.$t(g.isSell?"c2c.buySell.paymentInfo":"c2c.buySell.payment")),1),s("div",$h,[s("div",qh,c(e.$t("t.paymentMethod")),1),s("div",null,[l(v,{style:E({"margin-right":g.isSell&&"8px"}),methodType:g.paymentType},null,8,["style","methodType"]),g.isSell?(a(),n("span",Vh,c(g.maskedAccountNumber),1)):y("",!0)])])]),s("div",Hh,[l(k,{class:"outline-primary flex-1",size:"large",onClick:g.onCancelClick}
2,{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["onClick"]),l(k,{class:"primary flex-1",size:"large",disabled:p.isBalanceInsufficient,onClick:g.onConfirmClick},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["disabled","onClick"])]),p.isBalanceInsufficient?(a(),n("div",jh,[r(c(e.$t("c2c.insufficientBalance"))+" ",1),s("span",{class:"go-to-wallet",onClick:t[0]||(t[0]=(...e)=>g.onGoToWallet&&g.onGoToWallet(...e))},c(e.$t("c2c.buySell.goToWallet")),1)])):y("",!0)],64))])),_:2},[p.isChatShown?void 0:{name:"header",fn:C((()=>[r(c(g.isSell?e.$t("t.sell"):e.$t("t.buy"))+" "+c(g.baseCurrency),1)])),key:"0"}]),1032,["fullStyle","showClose","bodyWithPadding","onClosed"])}],["__scopeId","data-v-c863ad5f"]]),zh={CANCEL_ORDER:"CANCEL_ORDER",LEAVING_PAGE:"LEAVING_PAGE"},Kh={name:"NoticeModal",components:{BrandDialog:J,IconNotificationHollow:ee},props:{type:{type:String,default:zh.CANCEL_ORDER,validator:e=>[zh.CANCEL_ORDER,zh.LEAVING_PAGE].includes(e)}},emits:["onBottomClicked","update:isShow"],computed:{title(){switch(this.type){case zh.CANCEL_ORDER:return"c2c.cancelModal.title";case zh.LEAVING_PAGE:return"c2c.leavingModal.title";default:return""}},text(){return this.type===zh.LEAVING_PAGE?"c2c.leavingModal.text":""}},methods:{onClickTop(){this.closed()},onClickBottom(){this.$emit("onBottomClicked"),this.closed()},closed(){this.$emit("update:isShow",!1)}}},Yh={class:"notice-modal__body"},Wh={class:"body__title"},Zh={key:0,class:"body__text"};const Xh=Ft(Kh,[["render",function(e,t,o,d,u,m){const p=i("IconNotificationHollow"),g=i("BaseButton"),f=i("BrandDialog");return a(),h(f,{class:"notice-modal",width:e.isMobile?"90%":"338px",isBrandNewStyle:"",idPrefix:"p2p_notice_dialog",onClosed:m.closed},{body:C((()=>[s("div",Yh,[l(p,{class:"body__icon"}),s("p",Wh,c(e.$t(m.title)),1),m.text?(a(),n("p",Zh,c(e.$t(m.text)),1)):y("",!0),l(g,{class:"primary body__button",size:"large",onClick:m.onClickTop},{default:C((()=>[r(c(e.$t("t.no")),1)])),_:1},8,["onClick"]),s("div",{class:"body__bottom-button",onClick:t[0]||(t[0]=(...e)=>m.onClickBottom&&m.onClickBottom(...e))},c(e.$t("t.yes")),1)])])),_:1},8,["width","onClosed"])}
2],["__scopeId","data-v-42d33cb3"]]),Qh={name:"MyOrderList",components:{ListEmpty:xl,MyOrderListFilter:Au,DesktopMyOrderList:om,MobileMyOrderListCard:Ep,MyOrderCounts:Tu,CancelOrderModal:qp,ConfirmOrderModal:Gh,NoticeModal:Xh,Pagination:Je,LoadMoreObserver:Qe},provide(){return{orderListContext:this.orderListContext}},data(){var e;const[t,i]=at({rangeSize:180}),n=(null==(e=history.state)?void 0:e.status)||"ALL";return{modalType:zh,isLoading:!1,orderList:[],ruleForm:{side:"",category:n,baseCurrency:"",quoteCurrency:"",dateRange:{start:t,end:i}},pageData:{currentPage:1,totalRows:0,totalPages:0},orderCounts:{},orderListContext:{isShowCancelNoticeModal:!1,orderId:"",side:"",status:""},orderInterval:null,isInit:!0,selectedOrder:{},isShowConfirmOrderModal:!1,isShowCancelModal:!1}},computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo"]),showEmptyHint(){return!this.orderList.length&&!this.isLoading},orderId(){return this.selectedOrder.id||this.orderListContext.orderId},side(){return this.selectedOrder.side||this.orderListContext.side}},watch:{ruleForm:{handler(){this.isInit=!0,this.resetPageData(),this.init()},deep:!0},isNotDesktop(){this.resetPageData(),this.getMyOrderList()}},mounted(){this.init()},created(){this.getOrdersByInterval()},beforeUnmount(){clearInterval(this.orderInterval)},methods:{init(){this.getMyOrderList(),this.getOrderCounts()},resetPageData(){this.pageData={currentPage:1,totalRows:0,totalPages:0}},onConfirmModalClose(){this.isShowConfirmOrderModal=!1},async onNoticeButtonClicked(){if(this.orderListContext.status===Bi.CREATED)return this.isShowConfirmOrderModal=!1,await re.terminateOrder(this.orderListContext.orderId),void this.init();this.isShowCancelModal=!0},onSelectedOrder(e){this.selectedOrder=e,this.isShowConfirmOrderModal=!0},onCloseCancelModal(){this.isShowCancelModal=!1},onOrderClick(e){e.status===Bi.CREATED&&e.isSelfOwner?this.onSelectedOrder(e):this.$router.push({name:"c2cOrder",params:{id:e.id,lang:this.lang}})},getOrdersByInterval(){this.orderInterval=setInterval((()=>{this.isNotDesktop?this.getMyOrderList(!1,!0):this.getMyOrderList(),this.getOrderCounts()}),5e3)},getMyOrderList(e,t){const{dateRange:i}=this.ruleForm,n=this.c2cAccountInfo.username,a={sorting:"createdAt:DESC",page:t?1:this.pageData.currentPage,pageSize:t?10*this.pageData.currentPage:10,startTime:Ct(i.start).getTime(),endTime:Ct(i.end).getTime()};["side","category","baseCurrency","quoteCurrency"].forEach((e=>{const t=this.ruleForm[e];t&&"ALL"!==t&&(a[e]=t)})),this.isLoading=this.isInit,re.getMyOrdersList(a).then((i=>{const{orders:a,totalRows:s,totalPages:o}=i,r=a.map((e=>({...e,isSelfBuyer:e.buyer.username===n,isSelfOwner:e.advertOwnerUsername===n})));this.orderList=e?this.orderList.concat(r):r,t||(this.pageData.totalRows=s,this.pageData.totalPages=o)})).catch((()=>{})).finally((()=>{this.isLoading=!1,this.isInit=!1}))},getOrderCounts(){const{start:e,end:t}=this.ruleForm.dateRange,i={startTime:Ct(e).getTime(),endTime:Ct(t).getTime()};["side","baseCurrency","quoteCurrency"].forEach((e=>{const t=this.ruleForm[e];t&&"ALL"!==t&&(i[e]=t)})),re.getMyOrdersCounts(i).then((e=>{this.orderCounts=e}))},handlePageChange(e){this.pageData.currentPage=e,this.getMyOrderList()},handleLoadMore(){this.isLoading||this.pageData.currentPage===this.pageData.totalPages||(this.pageData.currentPage++,this.getMyOrderList(!0))}}},Jh={key:0,class:"title"},ey={key:1,class:"loading-wrap"};const ty=Ft(Qh,[["render",function(e,t,s,r,d,p){const C=i("MyOrderListFilter"),g=i("MyOrderCounts"),f=i("ListEmpty"),b=i("MobileMyOrderListCard"),v=i("LoadMoreObserver"),k=i("DesktopMyOrderList"),S=i("Pagination"),A=i("CancelOrderModal"),M=i("ConfirmOrderModal"),I=i("NoticeModal"),w=P("loading");return a(),n("div",null,[e.isNotDesktop?y("",!0):(a(),n("div",Jh,c(e.$t("c2c.myOrderList.orders")),1)),l(C,{ruleForm:d.ruleForm,"onUpdate:ruleForm":t[0]||(t[0]=e=>d.ruleForm=e)},null,8,["ruleForm"]),l(g,{ruleForm:d.ruleForm,orderCounts:d.orderCounts},null,8,["ruleForm","orderCounts"]),d.isLoading?o((a(),n("div",ey,null,512)),[[w,!0]]):p.showEmptyHint?(a(),h(f,{key:2,text:e.$t("c2c.account.viewC2CMarkets"),routerParam:{name:"c2cM
2arketList",params:{lang:e.lang}}},null,8,["text","routerParam"])):e.isNotDesktop?(a(),n(u,{key:3},[(a(!0),n(u,null,m(d.orderList,(e=>(a(),h(b,{key:e.id,item:e,onClick:t=>p.onOrderClick(e),onTabletClick:t=>p.onOrderClick(e)},null,8,["item","onClick","onTabletClick"])))),128)),l(v,{onLoadMore:p.handleLoadMore},null,8,["onLoadMore"])],64)):(a(),n(u,{key:4},[l(k,{orderList:d.orderList,onSelectedOrder:p.onSelectedOrder},null,8,["orderList","onSelectedOrder"]),l(S,{class:"pagination-control",layout:"prev, pager, next, jumper",background:!1,total:d.pageData.totalRows,currentPage:d.pageData.currentPage,totalPages:d.pageData.totalPages,onHandleCurrentChangeP:p.handlePageChange},null,8,["total","currentPage","totalPages","onHandleCurrentChangeP"])],64)),d.isShowCancelModal?(a(),h(A,{key:5,isSell:"SELL"===p.side,orderId:p.orderId,onOnClose:p.onCloseCancelModal},null,8,["isSell","orderId","onOnClose"])):y("",!0),d.isShowConfirmOrderModal?(a(),h(M,{key:6,defaultOrderData:d.selectedOrder,onOnClose:p.onConfirmModalClose},null,8,["defaultOrderData","onOnClose"])):y("",!0),d.orderListContext.isShowCancelNoticeModal?(a(),h(I,{key:7,isShow:d.orderListContext.isShowCancelNoticeModal,"onUpdate:isShow":t[1]||(t[1]=e=>d.orderListContext.isShowCancelNoticeModal=e),type:d.modalType.CANCEL_ORDER,onOnBottomClicked:p.onNoticeButtonClicked},null,8,["isShow","type","onOnBottomClicked"])):y("",!0)])}],["__scopeId","data-v-f02362aa"]]),iy=Object.freeze(Object.defineProperty({__proto__:null,default:ty},Symbol.toStringTag,{value:"Module"})),ny={class:"account-info-item"},ay={class:"account-info-item__value-wrap inner-ml-2"},sy={class:"value__value"},oy={class:"value__unit"},ry={key:0,class:"account-info-item__transaction inner-ml-4"},ly={class:"transaction__buy"},cy={class:"transaction__sell"};const dy=Ft({name:"AccountInfoItem",props:{title:{type:String,default:""},value:{type:[Number,String],default:""},unit:{type:String,default:""},buyValue:{type:String,default:""},sellValue:{type:String,default:""}}},[["render",function(e,t,i,o,r,l){return a(),n("div",ny,[s("p",null,c(i.title),1),s("p",ay,[s("span",sy,c(i.value),1),s("span",oy,c(i.unit),1)]),i.buyValue&&i.sellValue?(a(),n("p",ry,[s("span",ly,c(e.$t("t.buy"))+":"+c(i.buyValue),1),t[0]||(t[0]=s("span",{class:"transaction__divider"},"|",-1)),s("span",cy,c(e.$t("t.sell"))+":"+c(i.sellValue),1)])):y("",!0)])}],["__scopeId","data-v-e9d9f9b1"]]),uy={class:"add-block-modal__body"};const my={name:"BlockList",components:{BrandDialog:J,AddBlockModal:Ft({
2name:"AddBlockModal",components:{BrandDialog:J},inject:["context"],emits:["update","update:isShow"],data:()=>({nickname:"",errorMessage:""}),computed:{isError(){return this.errorMessage.length>0}},methods:{onBlock(){re.blockUser({alias:this.nickname}).then((()=>{this.$emit("update"),this.context.showNotification("c2c.addBlockModal.successText"),this.closed()})).catch((e=>{ue.C2C_OTC_ERROR===e&&(this.errorMessage=`response-code.${ue.C2C_OTC_USER_NOT_EXIST}`)}))},closed(){this.$emit("update:isShow",!1)}}},[["render",function(e,t,n,o,d,u){const m=i("BrandInput"),y=i("BaseButton"),g=i("BrandDialog");return a(),h(g,{class:"add-block-modal",width:"338px",idPrefix:"add_block_dialog",isBrandNewStyle:"",onClosed:u.closed},{header:C((()=>[r(c(e.$t("c2c.addBlockModal.title")),1)])),body:C((()=>[s("div",uy,[s("p",null,c(e.$t("c2c.addBlockModal.text")),1),l(m,{value:d.nickname,"onUpdate:value":t[0]||(t[0]=e=>d.nickname=e),class:"body__input",isError:u.isError,isBrandNewStyle:""},null,8,["value","isError"]),s("p",{class:p(["error-message",{"is-show":u.isError}])},c(e.$t(d.errorMessage)),3),l(y,{class:"primary body__button w-100",size:"large",onClick:u.onBlock},{default:C((()=>[r(c(e.$t("t.block")),1)])),_:1},8,["onClick"])])])),_:1},8,["onClosed"])}],["__scopeId","data-v-8cdd359b"]]),IconPlus:q},inject:["context"],emits:["update:isShow"],data:()=>({isLoading:!0,isShowAddBlockModal:!1,blockList:[]}),computed:{...t(["lang"])},created(){this.init()},methods:{init(){re.getBlockUsers({sorting:"createdAt:ASC",pageSize:100,page:1}).then((e=>{this.blockList=e.blockUsers})).finally((()=>{this.isLoading=!1}))},handleAddUpdate(){this.init()},onAdd(){this.isShowAddBlockModal=!0},onGoUserProfile(e){this.$router.push({name:"c2cAccountManagement",params:{lang:this.lang},query:{username:e}})},async onUnblock(e){await re.unBlockUser(e.username)&&this.context.showNotification("t.unblocked"),this.init()},closed(){this.$emit("update:isShow",!1)}}},py={class:"block-list__body"},hy={class:"body__title"},yy={class:"body__list flex-1"},Cy=["onClick"],gy={class:"item__name"},fy=["onClick"];const by={name:"AccountInfo",components:{Nickname:ol,AccountInfoItem:dy,AccountInfoDropdown:Ft({name:"AccountInfoDropdown",components:{Dropdown:ke,DropdownItem:ve,IconSetting:Dt,IconMenu:rm,BlockList:Ft(my,[["render",function(e,t,d,p,g,f){const b=i("IconPlus"),v=i("BaseButton"),k=i("AddBlockModal"),S=i("BrandDialog"),A=P("loading");return a(),h(S,{class:"block-list",width:"550px",fullStyle:e.isMobile,idPrefix:"p2p_block_list_dialog",isBrandNewStyle:"",onClosed:f.closed},{header:C((()=>[r(c(e.$t("c2c.blockList")),1)])),body:C((()=>[s("div",py,[s("p",hy,c(e.$t("c2c.blockList.title")),1),s("div",{class:"body__add-wrapper padding--16",onClick:t[0]||(t[0]=(...e)=>f.onAdd&&f.onAdd(...e))},[l(b,{class:"add__icon"}),s("span",null,c(e.$t("c2c.blockList.addToBlockList")),1)]),o((a(),n("div",yy,[(a(!0),n(u,null,m(g.blockList,(t=>(a(),n("div",{key:t.alias,class:"list__item padding--16",onClick:e=>f.onGoUserProfile(t.username)},[s("span",gy,c(t.alias),1),s("div",{class:"item__button",onClick:T((e=>f.onUnblock(t)),["stop"])},c(e.$t("t.unblock")),9,fy)],8,Cy)))),128))])),[[A,g.isLoading]]),l(v,{class:"primary",size:"large",onClick:f.closed},{default:C((()=>[r(c(e.$t("t.ok")),1)])),_:1},8,["onClick"])]),g.isShowAddBlockModal?(a(),h(k,{key:0,isShow:g.
2isShowAddBlockModal,"onUpdate:isShow":t[1]||(t[1]=e=>g.isShowAddBlockModal=e),onUpdate:f.handleAddUpdate},null,8,["isShow","onUpdate"])):y("",!0)])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-f6b3ff6d"]]),NoticeBlockUserModal:mm},inject:["context","accountContext"],props:{isSelf:{type:Boolean,default:!1},userData:{type:Object,default:()=>({})}},data:()=>({isShowBlockList:!1,isShowBlockNoticeModal:!1}),computed:{isBlocked(){return this.userData.isBlockedBySelf}},methods:{onBlockList(){this.isShowBlockList=!0},onBlock(){this.isShowBlockNoticeModal=!0},onBlocked(){this.accountContext.updateUserInfo(),this.context.showNotification("c2c.noticeBlockUserModal.successText")},onUnBlock(){re.unBlockUser(this.userData.username).then((()=>{this.context.showNotification("t.unblocked"),this.accountContext.updateUserInfo()}))}}},[["render",function(e,t,s,o,d,m){const p=i("IconSetting"),g=i("IconMenu"),f=i("DropdownItem"),b=i("Dropdown"),v=i("BlockList"),k=i("NoticeBlockUserModal");return a(),n("div",null,[l(b,{class:"account-info-dropdown",isBrandNewStyle:""},{bar:C((()=>[s.isSelf?(a(),h(p,{key:0,class:"setting__icon"})):(a(),h(g,{key:1,class:"setting__icon"}))])),default:C((()=>[s.isSelf?(a(),h(f,{key:0,value:"",onClick:m.onBlockList},{default:C((()=>[r(c(e.$t("c2c.blockList")),1)])),_:1},8,["onClick"])):(a(),n(u,{key:1},[m.isBlocked?(a(),h(f,{key:1,value:"",onClick:m.onUnBlock},{default:C((()=>[r(c(e.$t("t.unblock")),1)])),_:1},8,["onClick"])):(a(),h(f,{key:0,value:"",onClick:m.onBlock},{default:C((()=>[r(c(e.$t("t.block")),1)])),_:1},8,["onClick"]))],64))])),_:1}),d.isShowBlockList?(a(),h(v,{key:0,isShow:d.isShowBlockList,"onUpdate:isShow":t[0]||(t[0]=e=>d.isShowBlockList=e)},null,8,["isShow"])):y("",!0),d.isShowBlockNoticeModal?(a(),h(k,{key:1,isShow:d.isShowBlockNoticeModal,"onUpdate:isShow":t[1]||(t[1]=e=>d.isShowBlockNoticeModal=e),alias:s.userData.alias,onUpdate:m.onBlocked},null,8,["isShow","alias","onUpdate"])):y("",!0)])}],["__scopeId","data-v-6abaf982"]])},props:{isSelf:{type:Boolean,required:!0},userData:{type:Object,default:()=>({})}},computed:{nickname(){return this.userData.alias},isOnline(){return this.isSelf||this.userData.isOnline},joinedDate(){const e=U(new Date(this.userData.registerTime),"yyyy-MM-dd");return this.$t("c2c.account.joinedOnDate",{brandName:this.$t("brand.name"),date:e})},totalTrades(){return this.userData.trades.totalTrades||0},buyingTrades(){return this.formatValue(this.userData.trades.buyingTrades||0)},sellingTrades(){return this.formatValue(this.userData.trades.sellingTrades||0)},completionRate(){return this.getPercent(this.userData.trades.completionRate)},buyingCompletionRate(){return`${this.getPercent(this.userData.trades.buyingCompletionRate)}%`},sellingCompletionRate(){return`${this.getPercent(this.userData.trades.sellingCompletionRate)}%`},avgPayTimeInMs(){return this.getMinByMs(this.userData.trades.avgPayTimeInMs||0)},avgReleaseTimeInMs(){return this.getMinByMs(this.userData.trades.avgReleaseTimeInMs||0)},firstTradeAt(){return this.userData.firstTradeAt?U(new Date(this.userData.firstTradeAt),"yyyy-MM-dd"):"-"}},methods:{formatValue(e,t="max2"){return this.$filters.formatNumber(e,t)},getPercent(e){return this.formatValue(B(e||0).times(100).toNumber())},getMinByMs:e=>B(e).div(1e3).div(60).toNumber()}},vy={class:"account-info"},ky={class:"flex-box items-center justify-between"},Sy={class:"top__nickname-wrap"},Ay={class:"nickname__date"},My={class:"top__setting"},Iy={class:"account-info__trade-wrap"},wy={class:"trade__items"},Ty={class:"trade__items"};const _y=Ft(by,[["render",function(e,t,o,r,d,u){const m=i("Nickname"),p=i("AccountInfoDropdown"),h=i("AccountInfoItem");return a(),n("div",vy,[s("div",ky,[s("div",Sy,[l(m,{nickname:u.nickname,isOnline:u.isOnline},null,8,["nickname","isOnline"]),s("p",Ay,c(u.joinedDate),1)]),s("div",My,[l(p,{isSelf:o.isSelf,userData:o.userData},null,8,["isSelf","userData"])])]),s("div",Iy,[s("div",wy,[l(h,{title:e.$t("c2c.account.totalTradesToDate"),value:e.$filters.formatNumber(u.totalTrades,"max2"),unit:e.$t("t.time_s"),buyValue:u.buyingTrades,sellValue:u.sellingTrades},null,8,["title","value","unit","buyValue","sellValue"]),l(h,{title:e.$t("c2c.account.tradeCompletionRate"),value:u.completionRate,unit:"%",buyValue:u.buyingCompletionRate,sellValue:u.sellingCompletionRate},null,8,["title","value","buyValue","sellValue"])]),s("div",Ty,[l(h,{title:e.$t("c2c.account.paidInAvg"),value:e.$filters.formatNumber(u.avgPayTimeInMs,"max2"),unit:e.$t("t.min_s")},null,8,["title","value","unit"]),l(h,{title:e.$t("c2c.account.releasedInAvg"),value:e.$filters.formatNumber(u.avgReleaseTimeInMs,"max2"),unit:e.$t("t.min_s")},null,8,["title","value","unit"]),l(h,{title:e.$t("c2c.account.1stC2CTrade"),value:u.firstTradeAt},null,8,["title","value"])])])])}],["__scopeId","data-v-98632aa6"]]);const Dy=Ft({name:"PaymentMethodHeader",components:{SortableHeaderCell:Ge},props:{headerTitles:{type:Array,required:!0}}},[["render",function(e,t,s,o,l,d){const p=i("SortableHeaderCell"),g=i("HeaderRow");return e.isMobile?y("",!0):(a(),h(g,{key:0,class:"payment-method-header"},{default:C((()=>[(a(!0),n(u,null,m(s.headerTitles,(t=>(a(),h(p,{key:t.id,title:t,textAlign:t.textAlign},{content:C((()=>
2[r(c(e.$t(t.text)),1)])),_:2},1032,["title","textAlign"])))),128))])),_:1}))}]]),Py={name:"PaymentMethodRow",components:{PaymentTag:Ta,IconEdit2:Lt,IconTrash2:Pt,IconButton:gt},inject:["handleShowModalContext"],props:{index:{type:Number,required:!0},payment:{type:Object,default:()=>({})}},computed:{...D("c2c",["paymentMethodsInfoMap"]),alias(){return this.payment.alias},type(){return this.payment.type},bankName(){return this.payment.bankName},accountNumber(){var e;return`**** ${((null==(e=this.payment)?void 0:e.accountNumber)||"").substr(-4)}`},isPaymentSupported(){return Object.keys(this.paymentMethodsInfoMap).includes(this.type)}},methods:{onEdit(){this.handleShowModalContext(ns.EDIT,this.payment)},onRemove(){this.handleShowModalContext(ns.NOTICE_CONFIRM_REMOVE,this.payment)}}},Ly={class:"flex-box inner-ml-4"},Ey={class:"account-number"};const xy=[{id:"alias",text:"t.alias",textAlign:"left"},{id:"paymentMethods",text:"t.paymentMethods",textAlign:"left"},{id:"bankName",text:"t.bankName",textAlign:"left"},{id:"accountNoOrIBAN",text:"c2c.paymentMethod.accountNoIBAN",textAlign:"left"},{id:"edit",text:"t.edit",textAlign:"center"},{id:"delete",text:"t.delete",textAlign:"center"}];const Ny=Ft({name:"PaymentMethodList",components:{TablePanel:Ke,PaymentMethodHeader:Dy,PaymentMethodRow:Ft(Py,[["render",function(e,t,o,d,m,p){const y=i("Cell"),g=i("PaymentTag"),f=i("IconEdit2"),b=i("IconButton"),v=i("IconTrash2"),k=i("Row");return a(),h(k,{class:"payment-method-row",index:o.index,disableCssHoverEffect:"",disableBackground:""},{default:C((()=>[e.isMobile?(a(),h(y,{key:1,class:"inner-ml-2",textAlign:"left"},{default:C((()=>[s("div",null,c(p.alias),1),s("div",Ly,[l(g,{methodType:p.type},null,8,["methodType"]),s("div",Ey,c(p.accountNumber),1)])])),_:1})):(a(),n(u,{key:0},[l(y,{textAlign:"left"},{default:C((()=>[r(c(p.alias),1)])),_:1}),l(y,{textAlign:"left"},{default:C((()=>[l(g,{methodType:p.type},null,8,["methodType"])])),_:1}),l(y,{textAlign:"left"},{default:C((()=>[r(c(p.bankName),1)])),_:1}),l(y,{textAlign:"left"},{default:C((()=>[r(c(p.accountNumber),1)])),_:1})],64)),l(y,{textAlign:"center"},{default:C((()=>[l(b,{disabled:!p.isPaymentSupported,onClick:p.onEdit},{default:C((()=>[l(f)])),_:1},8,["disabled","onClick"])])),_:1}),l(y,{textAlign:"center"},{default:C((()=>[l(b,{onClick:p.onRemove},{default:C((()=>[l(v)])),_:1},8,["onClick"])])),_:1})])),_:1},8,["index"])}],["__scopeId","data-v-58684058"]])},props:{list:{type:Array,default:()=>[]}},data:()=>({headerTitlesData:xy}),computed:{isListEmpty(){return 0===this.list.length}}},[["render",function(e,t,s,o,r,c){const d=i("PaymentMethodHeader"),p=i("PaymentMethodRow"),y=i("TablePanel");return a(),h(y,{class:"payment-method-list",isEmpty:c.isListEmpty,hasBoundary:!1,headerSize:"small"},{header:C((()=>[l(d,{headerTitles:r.headerTitlesData},null,8,["headerTitles"])])),body:C((()=>[(a(!0),n(u,null,m(s.list,((e,t)=>(a(),h(p,{key:e.id,index:t,payment:e},null,8,["index","payment"])))),128))])),_:1},8,["isEmpty"])}],["__scopeId","data-v-6490b504"]]),Ry={name:"NoticeModal",components:{BrandDialog:J,IconNotificationHollow:ee},props:{type:{type:String,default:ns.NOTICE_CONFIRM_REMOVE,validator:e=>[ns.NOTICE_LIMIT_PAYMENT_METHODS,ns.NOTICE_CANNOT_EDIT,ns.NOTICE_CANNOT_REMOVE,ns.NOTICE_CONFIRM_REMOVE].includes(e)},payment:{type:Object,default:()=>({})}}
2,emits:["successUpdate","update:isShow"],computed:{...t(["lang"]),isOrdersLinkShown(){return[ns.NOTICE_CANNOT_EDIT,ns.NOTICE_CANNOT_REMOVE].includes(this.type)},title(){return this.type===ns.NOTICE_CONFIRM_REMOVE?"c2c.paymentMethod.remove.title":"t.error"},text(){switch(this.type){case ns.NOTICE_LIMIT_PAYMENT_METHODS:return"c2c.paymentMethod.limit.text";case ns.NOTICE_CANNOT_EDIT:return"c2c.paymentMethod.cannotEdit.text";case ns.NOTICE_CANNOT_REMOVE:return"c2c.paymentMethod.remove.text";default:return""}},buttonText(){return this.type===ns.NOTICE_CONFIRM_REMOVE?"c2c.paymentMethod.notice.btnText":"t.ok"}},methods:{onClick(){this.type!==ns.NOTICE_CONFIRM_REMOVE?this.closed():re.removePaymentMethod(this.payment.id).then((()=>{this.$emit("successUpdate"),this.closed()}))},closed(){this.$emit("update:isShow",!1)}}},By={class:"notice-modal__body"},Oy={class:"body__title"},Fy={key:0,class:"body__text"},Uy={key:1,class:"body__quote"};const $y=Ft(Ry,[["render",function(e,t,o,d,u,m){const p=i("IconNotificationHollow"),g=i("RouterLink"),f=i("BaseButton"),b=i("BrandDialog");return a(),h(b,{class:"notice-modal",width:e.isMobile?"90%":"338px",idPrefix:"p2p_payment_notice_dialog",isBrandNewStyle:"",onClosed:m.closed},{body:C((()=>[s("div",By,[l(p,{class:"body__icon"}),s("p",Oy,c(e.$t(m.title)),1),m.text?(a(),n("p",Fy,c(e.$t(m.text)),1)):y("",!0),m.isOrdersLinkShown?(a(),n("p",Uy,[r(c(e.$t("t.view"))+" ",1),l(g,{class:"quote__link",to:{name:"c2cMyOrder",params:{lang:e.lang}}},{default:C((()=>[r(c(e.$t("c2c.myOrders"))+". ",1)])),_:1},8,["to"])])):y("",!0),l(f,{class:"primary body__button",size:"large",onClick:m.onClick},{default:C((()=>[r(c(e.$t(m.buttonText)),1)])),_:1},8,["onClick"])])])),_:1},8,["width","onClosed"])}],["__scopeId","data-v-75cc3c8b"]]),qy={[ns.EDIT]:"c2c.paymentMethod.paymentUpdated",[ns.NOTICE_CONFIRM_REMOVE]:"c2c.paymentMethod.removeSuccess"},Vy={class:"payment-methods-wrapper"},Hy={class:"payment-methods__explain inner-ml-24"},jy={class:"explain__title"},Gy={class:"explain__text"},zy={key:0};const Ky=Ft({name:"PaymentMethods",components:{IconPlus:q,PaymentMethodList:Ny,DynamicAddOrEditPaymentMethodModal:us,NoticeModal:$y},inject:["context"],provide(){return{handleShowModalContext:this.handleShowModal}},data:()=>({isLoading:!0,paymentMethodsData:[],modalType:"",isShowAddAndEditModal:!1,isShowNoticeModal:!1,modalPaymentData:void 0}),computed:{isPaymentMethodsEmpty(){return 0===this.paymentMethodsData.length}},async created(){this.isLoading=!0,await this.getPaymentMethods(),this.isLoading=!1},methods:{async successUpdate(){this.isLoading=!0,this.showSomeThing(),await this.getPaymentMethods(),this.isLoading=!1},showSomeThing(){this.context.showNotification(qy[this.modalType])},async getPaymentMethods(){const e=await re.getPaymentMethods({sorting:"createdAt:ASC",pageSize:100,page:1});e&&(this.paymentMethodsData=e.paymentMethods.map((({id:e,data:t})=>{const{properties:i}=t;return{id:e,type:t.type,...i}})))},onAdd(){this.handleShowModal(ns.ADD)},handleShowModal(e,t=void 0){switch(this.modalType=e,this.modalPaymentData=t,e){case ns.ADD:re.validateIsPaymentMethodCreatable().then((()=>{this.isShowAddAndEditModal=!0})).catch((e=>{ue.C2C_OTC_MAX_PAYMENT_METHOD_COUNT===e&&this.handleShowModal(ns.NOTICE_LIMIT_PAYMENT_METHODS,t)}));break;case ns.EDIT:re.validateIsPaymentMethodUpdatable(t.id).then((()=>{this.isShowAddAndEditModal=!0})).catch((e=>{ue.C2C_OTC_PAYMENT_METHOD_HAS_ONGOING_ORDER===e&&this.handleShowModal(ns.NOTICE_CANNOT_EDIT,t)}));break;case ns.NOTICE_CONFIRM_REMOVE:re.validateIsPaymentMethodDeletable(t.id).then((()=>{this.isShowNoticeModal=!0})).catch((e=>{[ue.C2C_OTC_PAYMENT_METHOD_HAS_ONGOING_ORDER,ue.C2C_OTC_PAYMENT_METHOD_HAS_ONGOING_ADVERT].includes(e)&&this.handleShowModal(ns.NOTICE_CANNOT_REMOVE)}));break;case ns.NOTICE_LIMIT_PAYMENT_METHODS:case ns.NOTICE_CANNOT_EDIT:case ns.NOTICE_CANNOT_REMOVE:this.isShowNoticeModal=!0}}}},[["render",function(e,t,d,u,m,p){const g=i("IconPlus"),f=i("BaseButton"),b=i("PaymentMethodList"),v=i("DynamicAddOrEditPaymentMethodModal"),k=i("NoticeModal"),S=P("loading");return a(),n("div",Vy,[s("div",Hy,[s("div",null,[s("div",jy,[r(c(e.$t("c2c.paymentMethod.title"))+" ",1),e.isMobile?(a(),h(f,{key:0,class:"outline-primary add-button",size:"small",onClick:p.onAdd},{default:C((()=>[l(g,{class:"add-button__icon"})])),_:1},8,["onClick"])):y("",!0)]),s("p",Gy,c(e.$t("c2c.paymentMethod.explainText")),1)]),e.isMobile?y("",!0):(a(),n("div",zy,[l(f,{class:"outline-primary add-button",size:"small",onClick:p.onAdd},{default:C((()=>[l(g,{class:"add-button__icon"}),s("span",null,c(e.$t("t.add")),1)])),_:1},8,["onClick"])]))]),o((a(),n("div",null,[l(b,{class:"payment-methods__list",list:m.paymentMethodsData},null,8,["list"])])),[[S,m.isLoading]]),m.isShowAddAndEditModal?(a(),h(v,{key:0,isShow:m.isShowAddAndEditModal,"onUpdate:isShow":t[0]||(t[0]=e=>m.isShowAddAndEditModal=e),payment:m.modalPaymentData,type:m.modalType,onSuccessUpdate:p.successU
2pdate},null,8,["isShow","payment","type","onSuccessUpdate"])):y("",!0),m.isShowNoticeModal?(a(),h(k,{key:1,isShow:m.isShowNoticeModal,"onUpdate:isShow":t[1]||(t[1]=e=>m.isShowNoticeModal=e),payment:m.modalPaymentData,type:m.modalType,onSuccessUpdate:p.successUpdate},null,8,["isShow","payment","type","onSuccessUpdate"])):y("",!0)])}],["__scopeId","data-v-162f8095"]]);const Yy=Ft({name:"OtherAccountTransactionHeader",components:{SortableHeaderCell:Ge},props:{headerTitles:{type:Array,default:()=>[]},sortKey:{type:String,default:""}}},[["render",function(e,t,s,o,l,d){const p=i("SortableHeaderCell"),y=i("HeaderRow");return a(),h(y,{class:"other-account-transaction-header"},{default:C((()=>[(a(!0),n(u,null,m(s.headerTitles,(t=>(a(),h(p,N({ref_for:!0},e.$attrs,{key:t.id,currentSortKey:s.sortKey,title:t,textAlign:t.textAlign}),{content:C((()=>[r(c(e.$t(t.lang)),1)])),_:2},1040,["currentSortKey","title","textAlign"])))),128))])),_:1})}],["__scopeId","data-v-1956f83c"]]),Wy={name:"TradeButton",components:{IconInfo2:xe,CreateOrderModal:Mc},props:{isBuy:{type:Boolean,required:!0},id:{type:String,required:!0}},data:()=>({isBlocked:!1,isShowCreateOrderModal:!1}),methods:{onCloseCreateOrderModal(){this.isShowCreateOrderModal=!1},onTrade(){re.getOrderValidation(this.id).then((()=>{this.isShowCreateOrderModal=!0})).catch((e=>{ue.C2C_OTC_BLOCKED_BY_USER===e&&(this.isBlocked=!0)}))}}},Zy={key:0,class:"flex-center-center action blocked"};const Xy=Ft(Wy,[["render",function(e,t,o,d,u,m){const g=i("IconInfo2"),f=i("Tooltip"),b=i("BaseButton"),v=i("CreateOrderModal");return a(),n("div",null,[u.isBlocked?(a(),n("div",Zy,[r(c(e.$t("c2c.marketList.blocked"))+" ",1),l(f,{class:"blocked--tooltip",tooltipStyle:{width:"106px"},placement:"top-end"},{content:C((()=>[l(g,{class:"tooltip-icon-wrapper"})])),tooltip:C((()=>[s("span",null,c(e.$t("c2c.marketList.blocked.reminder")),1)])),_:1})])):(a(),h(b,{key:1,class:p(o.isBuy?"green":"red"),size:"small",onClick:m.onTrade},{default:C((()=>[r(c(e.$t(o.isBuy?"t.buy":"t.sell")),1)])),_:1},8,["class","onClick"])),u.isShowCreateOrderModal?(a(),h(v,{key:2,advertId:o.id,isSell:!o.isBuy,onOnClose:m.onCloseCreateOrderModal},null,8,["advertId","isSell","onOnClose"])):y("",!0)])}],["__scopeId","data-v-ba2f539c"]]),Qy={name:"OtherAccountTransactionRow",components:{BrandIcon:Fe,PaymentTag:Ta,TradeButton:Xy},props:{isBuy:{type:Boolean,required:!0},id:{type:String,default:""},index:{type:Number,required:!0},currency:{type:String,default:""},price:{type:String,default:""},unit:{type:String,default:""},amount:{type:String,default:""},maxAmount:{type:String,default:""},minAmount:{type:String,default:""},paymentMethods:{type:Array,default:()=>[]}},computed:{...D("c2c",["getCurrencyDecimal"]),transferredAmount(){return this.getFormatPrice(this.amount,this.currency)},unitPrice(){return this.getFormatPrice(this.price,this.unit)},limits(){return`${this.getFormatPrice(this.minAmount,this.unit)} - ${this.getFormatPrice(this.maxAmount,this.unit)}`}},methods:{getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))}}},Jy={class:"price"},eC={class:"price__unit"},tC={class:"amount-and-limits-wrapper inner-ml-4"},iC={class:"amount-and-limits__value"},nC={class:"amount-and-limits__value"};const aC=[{id:"coin",lang:"t.coin",textAlign:"left"},{id:"price",lang:"t.price",textAlign:"right"},{id:"amount-limit",lang:"c2c.account.AmountAndLimit",textAlign:"left"},{id:"payment-method",lang:"t.paymentMethod_s",textAlign:"left"},{id:"action",lang:""}];const sC=Ft({name:"OtherAccountTransactionList",components:{TablePanel:Ke,OtherAccountTransactionHeader:Yy,OtherAccountTransactionRow:Ft(Qy,[["render",function(e,t,o,d,p,y){const g=i("BrandIcon"),f=i("Cell"),b=i("PaymentTag"),v=i("TradeButton"),k=i("Row");return a(),h(k,{class:"other-account-transaction-row",index:o.index,disableCssHoverEffect:"",disableBackground:""},{default:C((()=>[l(f,{textAlign:"left"},{default:C((()=>[l(g,{class:"brand-icon",size:"16",type:"coin",name:o.currency,displayName:o.currency},null,8,["name","displayName"])])),_:1}),l(f,{class:"inner-ml-4"},{default:C((()=>[s("span",Jy,c(y.unitPrice),1),s("span",eC,c(o.unit),1)])),_:1}),l(f,{textAlign:"left"},{default:C((()=>[s("div",tC,[s("div",null,[s("p",null,c(e.$t("t.amount"))+":",1),s("p",null,c(e.$t("t.limits"))+":",1)]),s("div",null,[s("p",null,[s("span",iC,c(y.transferredAmount),1),r(" "+c(o.currency),1)]),s("p",null,[s("span",nC,c(y.limits),1),r(" "+c(o.unit),1)])])])])),_:1}),l(f,{class:"inner-ml-4",textAlign:"left"},{default:C((()=>[(a(!0),n(u,null,m(o.paymentMethods,(e=>(a(),h(b,{key:e,methodType:e},null,8,["methodType"])))),128))])),_:1}),l(f,null,{default:C((()=>[l(v,{id:o.id,isBuy:o.isBuy},null,8,["id","isBuy"])])),_:1})])),_:1},8,["index"])}],["__scopeId","data-v-506cc5bc"]]),ListEmpty:xl},props:{isBuy:{type:Boolean,required:!0},list:{type:Array,default:()=>[]},sortKey:{type:String,default:""}},data:()=>({headerTitlesData:aC}),computed:{...t(["lang"]),isListEmpty(){return 0===this.list.length}}},[["render",function(e,t,s,o,r,c){const d=i("OtherAccountTransactionHeader"),p=i("OtherAccountTransactionRow"),y=i("ListEmpty"),g=i("TablePanel");return a(),h(g,{isEmpty:c.isListEmpty,hasBoundary:!1,headerSize:"small",bodySize:"small"},{header:C((()=>[l(d,N(e.$attrs,{headerTitles:r.headerTitlesData,sortKey:s.sortKey}),null,16,["headerTitles","sortKey"])])),body:C((()=>[(a(!0),n(u,null,m(s.list,((e,t)=>
2(a(),h(p,{id:e.id,key:e.id,index:t,isBuy:s.isBuy,currency:e.baseCurrency,price:e.priceSettings.settings.price,unit:e.quoteCurrency,amount:e.transferredAmount,minAmount:e.orderMinAmount,maxAmount:e.orderMaxAmount,paymentMethods:e.paymentMethodTypes,isBlocked:e.isBlockedByAdmin},null,8,["id","index","isBuy","currency","price","unit","amount","minAmount","maxAmount","paymentMethods","isBlocked"])))),128))])),empty:C((()=>[l(y,{text:e.$t("c2c.account.viewC2CMarkets"),routerParam:{name:"c2cMarketList",params:{lang:e.lang}}},null,8,["text","routerParam"])])),_:1},8,["isEmpty"])}]]),oC={name:"MobileOtherAccountTransactionRow",components:{BrandIcon:Fe,PaymentTag:Ta,TradeButton:Xy},props:{isBuy:{type:Boolean,required:!0},id:{type:String,default:""},currency:{type:String,default:""},price:{type:String,default:""},unit:{type:String,default:""},amount:{type:String,default:""},maxAmount:{type:String,default:""},minAmount:{type:String,default:""},paymentMethods:{type:Array,default:()=>[]}},computed:{...D("c2c",["getCurrencyDecimal"]),transferredAmount(){return this.getFormatPrice(this.amount,this.currency)},unitPrice(){return this.getFormatPrice(this.price,this.unit)},limits(){return`${this.getFormatPrice(this.minAmount,this.unit)} - ${this.getFormatPrice(this.maxAmount,this.unit)}`}},methods:{getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))}}},rC={class:"m-other-account-transaction-row"},lC={class:"row__price-wrapper"},cC={class:"price__title"},dC={class:"price__price-wrapper"},uC={class:"price__value"},mC={class:"amount-wrapper mt-16"},pC={class:"amount__value"},hC={class:"amount-wrapper"},yC={class:"amount__value"},CC={class:"row__payment-methods"};const gC={name:"MobileOtherAccountTransactionList",components:{MobileOtherAccountTransactionRow:Ft(oC,[["render",function(e,t,o,d,p,y){const C=i("BrandIcon"),g=i("TradeButton"),f=i("PaymentTag");return a(),n("div",rC,[l(C,{class:"brand-icon",size:"16",type:"coin",name:o.currency,displayName:o.currency},null,8,["name","displayName"]),s("div",lC,[s("div",null,[s("p",cC,c(e.$t("t.unitPrice")),1),s("p",dC,[s("span",uC,c(y.unitPrice),1),r(" "+c(o.unit),1)])]),l(g,{id:o.id,isBuy:o.isBuy},null,8,["id","isBuy"])]),s("div",mC,[s("p",null,c(e.$t("t.totalAmount")),1),s("p",null,[s("span",pC,c(y.transferredAmount),1),r(" "+c(o.currency),1)])]),s("div",hC,[s("p",null,c(e.$t("t.limitPerTrade")),1),s("p",null,[s("span",yC,c(y.limits),1),r(" "+c(o.unit),1)])]),s("div",CC,[(a(!0),n(u,null,m(o.paymentMethods,(e=>(a(),h(f,{key:e,methodType:e},null,8,["methodType"])))),128))])])}],["__scopeId","data-v-258bb55f"]])},props:{isBuy:{type:Boolean,required:!0},list:{type:Array,default:()=>[]}}},fC={class:"m-other-account-transaction-list"};const bC="BUY",vC="SELL",kC={name:"OtherAccountTransaction",components:{ListEmpty:xl,OtherAccountTransactionList:sC,MobileOtherAccountTransactionList:Ft(gC,[["render",function(e,t,s,o,r,l){const c=i("MobileOtherAccountTransactionRow");return a(),n("div",fC,[(a(!0),n(u,null,m(s.list,(e=>(a(),h(c,{id:e.id,key:e.id,isBuy:s.isBuy,currency:e.baseCurrency,price:e.priceSettings.settings.price,unit:e.quoteCurrency,amount:e.transferredAmount,minAmount:e.orderMinAmount,maxAmount:e.orderMaxAmount,paymentMethods:e.paymentMethodTypes},null,8,["id","isBuy","currency","price","unit","amount","minAmount","maxAmount","paymentMethods"])))),128))])}]])},props:{otherUsername:{type:String,default:""}},data:()=>({isLoading:!0,selected:bC,adverts:[],sortKey:"price",sortOrder:"ASC"}),computed:{...t(["lang"]),isBuy(){return this.selected==bC},isAdvertsEmpty(){return 0===this.adverts.length},buttonList:()=>[{key:bC,text:"t.buy"},{key:vC,text:"t.sell"}]},created(){this.checkTab(),this.getAdverts()},methods:{checkTab(){const e=this.$route.query.side;if(!e)return;const t="buy"===e?bC:vC;this.onSelect(t)},async getAdverts(){this.isLoading=!0;const e=this.selected===bC?vC:bC,{adverts:t=[]}=await re.getMarketList({sorting:`${this.sortKey}:${this.sortOrder}`,username:this.otherUsername,pageSize:"100",page:1,side:e});this.adverts=t,this.isLoading=!1},setSortData({key:e,order:t}){this.sortKey=e,this.sortOrder=t.toUpperCase(),this.getAdverts()},onSelect(e){this.selected=e,this.getAdverts()}}},SC={class:"other-account-transaction"},AC={class:"other-account-transaction__switcher"},MC=["onClick"];const IC={name:"AccountManagement",components:{AccountInfo:_y,PaymentMethods:Ky,OtherAccountTransaction:Ft(kC,[["render",function(e,t,r,l,d,y){const C=i("ListEmpty"),g=i("MobileOtherAccountTransactionList"),f=i("OtherAccountTransactionList"),b=P("loading");return a(),n("div",SC,[s("div",AC,[(a(!0),n(u,null,m(y.buttonList,(t=>(a(),n("div",{key:t.key,class:p(["switcher__button",{"is-selected":d.selected===t.key}]),onClick:e=>y.onSelect(t.key)},c(e.$t(t.text)),11,MC)))),128))]),o((a(),n("div",null,[e.isMobile?(a(),n(u,{key:0},[y.isAdvertsEmpty?(a(),h(C,{key:0,text:e.$t("c2c.account.viewC2CMarkets"),routerParam:{name:"c2cM
2arketList",params:{lang:e.lang}}},null,8,["text","routerParam"])):(a(),h(g,{key:1,class:"m-other-account-transaction__list",isBuy:y.isBuy,list:d.adverts},null,8,["isBuy","list"]))],64)):(a(),h(f,{key:1,class:"other-account-transaction__list",isBuy:y.isBuy,list:d.adverts,onSort:y.setSortData},null,8,["isBuy","list","onSort"]))])),[[b,d.isLoading]])])}],["__scopeId","data-v-ed25955b"]]),CreateOrderModal:Mc},provide(){return{accountContext:{updateUserInfo:this.updateUserInfo}}},data:()=>({isLoading:!0,userData:{},isShowCreateOrderModal:!1,advert:null}),computed:{...t("c2c",["c2cAccountInfo"]),...D("c2c",["isAvailableC2CUser"]),isSelf(){return 0===this.otherUsername.length||this.otherUsername===this.c2cAccountInfo.username},otherUsername(){return this.$route.query.username||""},advertIsSell(){return"BUY"===this.advert.side}},watch:{otherUsername(){this.init()},isAvailableC2CUser(e){e&&this.showAdvertModal()}},created(){this.init()},methods:{..._("c2c",["updateC2CAccountInfo"]),async init(){this.isLoading=!0,await this.updateC2CAccountInfo(),await this.updateUserInfo(),this.isLoading=!1},async updateUserInfo(){if(this.isSelf)this.userData=this.c2cAccountInfo;else{const e=await re.getOtherUser(this.otherUsername);e&&(this.userData=e.user)}},async showAdvertModal(){const e=this.$route.params.id;if(!e)return;const{advert:t}=await re.getAdvert(e);t&&(this.isShowCreateOrderModal=!0,this.advert=t)},onCloseCreateOrderModal(){this.isShowCreateOrderModal=!1}}},wC={class:"account-management"},TC={key:0,class:"account-management__self-info"},_C={key:1,class:"account-management__other-info"};const DC=Ft(IC,[["render",function(e,t,s,r,c,d){const m=i("AccountInfo"),p=i("PaymentMethods"),C=i("OtherAccountTransaction"),g=i("CreateOrderModal"),f=P("loading");return o((a(),n("div",wC,[c.isLoading?y("",!0):(a(),n(u,{key:0},[l(m,{isSelf:d.isSelf,userData:c.userData},null,8,["isSelf","userData"]),d.isSelf?(a(),n("div",TC,[l(p)])):(a(),n("div",_C,[l(C,{otherUsername:d.otherUsername},null,8,["otherUsername"])]))],64)),c.isShowCreateOrderModal?(a(),h(g,{key:1,advertId:c.advert.id,isSell:d.advertIsSell,advert:c.advert,onOnClose:d.onCloseCreateOrderModal},null,8,["advertId","isSell","advert","onOnClose"])):y("",!0)])),[[f,c.isLoading]])}],["__scopeId","data-v-e6f4df01"]]),PC=Object.freeze(Object.defineProperty({__proto__:null,default:DC},Symbol.toStringTag,{value:"Module"})),LC={name:"PriceAmount",components:{PaymentTag:Ta,IconCopy:ht},inject:["context"],props:{settlementAmount:{type:[String,Number],default:""},unitPrice:{type:[String,Number],default:""},swapAmount:{type:[String,Number],default:""},orderNumber:{type:String,default:""},orderCreated:{type:String,default:""},paymentMethod:{type:String,default:""},quoteCurrency:{type:String,default:""},baseCurrency:{type:String,default:""},accountNumber:{type:String,default:""},disputedAccountName:{type:String,default:""},disputedBankName:{type:String,default:""},disputedAccountNumber:{type:String,default:""},transferAmount:{type:Object,required:!0},isSell:{type:Boolean,default:!1},isOwnAdvert:{type:Boolean,default:!1}},computed:{...D("c2c",["getCurrencyDecimal"]),lastAccountNumber(){return`****${this.accountNumber.substr(-4)}`},amountInfo(){return this.isSell?this.transferAmount.paid:this.transferAmount.received}},methods:{onCopy(){this.context.showNotification("msg.copied")},onError(){this.context.showNotification("msg.fail")},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))}}},EC={class:"price-amount"},xC={class:"price-wrapper"},NC={class:"price-wrapper"},RC={class:"price-wrapper"},BC={key:0,class:"price-wrapper"},OC={key:1,class:"price-wrapper"},FC={class:"price-wrapper"},UC={class:"info-wrapper inner-ml-8"},$C={class:"icon-copy"},qC={class:"price-wrapper"},VC={key:2,class:"price-wrapper"},HC={class:"info-wrapper inner-ml-8"},jC={class:"icon-copy"},GC={class:"price-wrapper"},zC={class:"info-wrapper inner-ml-8"},KC={key:0,class:"account-number"},YC={key:3,class:"price-wrapper"},WC={class:"info-wrapper inner-ml-8"},ZC={class:"icon-copy"},XC={key:4,class:"price-wrapper"}
2,QC={class:"info-wrapper inner-ml-8"},JC={class:"icon-copy"};const eg=Ft(LC,[["render",function(e,t,r,d,u,m){const p=i("IconCopy"),h=i("PaymentTag"),C=P("clipboard");return a(),n("div",EC,[s("div",xC,[s("div",null,c(e.$t("c2c.marketList.settlementAmount")),1),s("div",null,c(m.getFormatPrice(r.settlementAmount,r.quoteCurrency))+" "+c(r.quoteCurrency),1)]),s("div",NC,[s("div",null,c(e.$t("c2c.marketList.unitPrice")),1),s("div",null,c(m.getFormatPrice(r.unitPrice,r.quoteCurrency))+" "+c(r.quoteCurrency),1)]),s("div",RC,[s("div",null,c(e.$t("c2c.myOrderList.swapAmount")),1),s("div",null,c(m.getFormatPrice(r.swapAmount,r.baseCurrency))+" "+c(r.baseCurrency),1)]),r.isOwnAdvert&&m.amountInfo.feeAmount?(a(),n("div",BC,[s("div",null,c(e.$t("c2c.buySell.fee")),1),s("div",null,c(m.amountInfo.feeAmount)+" "+c(m.amountInfo.currency),1)])):y("",!0),r.isOwnAdvert&&m.amountInfo.totalAmount?(a(),n("div",OC,[s("div",null,c(e.$t(r.isSell?"c2c.buySell.totalDeducted":"c2c.buySell.totalReceived")),1),s("div",null,c(m.amountInfo.totalAmount)+" "+c(m.amountInfo.currency),1)])):y("",!0),s("div",FC,[s("div",null,c(e.$t("c2c.buySell.orderNumber")),1),s("div",UC,[s("span",null,c(r.orderNumber),1),o((a(),n("span",$C,[l(p)])),[[C,r.orderNumber,"copy"],[C,m.onCopy,"success"],[C,m.onError,"error"]])])]),s("div",qC,[s("div",null,c(e.$t("c2c.buySell.orderCreated")),1),s("div",null,c(r.orderCreated),1)]),r.disputedAccountName?(a(),n("div",VC,[s("div",null,c(r.isSell?e.$t("c2c.buySell.sellerName"):e.$t("c2c.buySell.buyerName")),1),s("div",HC,[s("span",null,c(r.disputedAccountName),1),o((a(),n("span",jC,[l(p)])),[[C,r.disputedAccountName,"copy"],[C,m.onCopy,"success"],[C,m.onError,"error"]])])])):y("",!0),t[0]||(t[0]=s("hr",{class:"horizontal-line"},null,-1)),s("div",GC,[s("div",null,c(e.$t("t.paymentMethod")),1),s("div",zC,[l(h,{methodType:r.paymentMethod},null,8,["methodType"]),r.accountNumber?(a(),n("div",KC,c(m.lastAccountNumber),1)):y("",!0)])]),r.disputedBankName?(a(),n("div",YC,[s("div",null,c(e.$t("t.bankName")),1),s("div",WC,[s("span",null,c(r.disputedBankName),1),o((a(),n("span",ZC,[l(p)])),[[C,r.disputedBankName,"copy"],[C,m.onCopy,"success"],[C,m.onError,"error"]])])])):y("",!0),r.disputedAccountNumber?(a(),n("div",XC,[s("div",null,c(e.$t("c2c.buySell.accountNumber")),1),s("div",QC,[s("span",null,c(r.disputedAccountNumber),1),o((a(),n("span",JC,[l(p)])),[[C,r.disputedAccountNumber,"copy"],[C,m.onCopy,"success"],[C,m.onError,"error"]])])])):y("",!0)])}],["__scopeId","data-v-eec05a82"]]),tg={name:"MainContainer",props:{isSell:{type:Boolean,default:!1},currency:{type:String,default:""}},computed:{showType(){return this.isSell?"t.sell":"t.buy"}}},ig={class:"main-container"},ng={class:"title"},ag={class:"content flex-box"},sg={class:"flex-1"},og={key:0,class:"flex-1"};const rg=Ft(tg,[["render",function(e,t,i,o,l,d){return a(),n("div",ig,[s("h1",ng,[s("span",{class:p(["type",{"color-sell":i.isSell}])},c(e.$t(d.showType)),3),r(" "+c(i.currency),1)]),s("div",ag,[s("div",sg,[w(e.$slots,"detail",{},void 0,!0)]),e.isMobile?y("",!0):(a(),n("div",og,[w(e.$slots,"chat",{},void 0,!0)]))])])}],["__scopeId","data-v-ff05bc15"]]),lg={class:"countdown"};const cg=Ft({name:"Countdown",props:{timeoutTime:{type:[Number,String],default:""}},data:()=>({timer:null,diffSeconds:0}),computed:{diffMinutes(){return Math.floor(this.diffSeconds/60)},diffHours(){return Math.floor(this.diffMinutes/60)},countdownHours(){const e=this.diffHours;return this.padLeftZero(e>0?e:0)},countdownMinutes(){const e=this.diffMinutes%60;return this.padLeftZero(e>0?e:0)},countdownSeconds(){const e=this.diffSeconds%60;return this.padLeftZero(e>0?e:0)},countdownResult(){const e=[this.countdownMinutes,this.countdownSeconds];return this.diffHours>0&&e.unshift(this.countdownHours),e.join(":")}},created(){this.setTimer()},beforeUnmount(){this.clearTimer()},methods:{setTimer(){this.diffSeconds=ft.seconds(new Date(this.timeoutTime),new Date),this.timer=setInterval((()=>{this.diffSeconds>0?this.diffSeconds--:this.clearTimer()}),1e3)},clearTimer(){this.timer&&clearInterval(this.timer)},padLeftZero:(e,t=2)=>String(e).padStart(t,"0")}},[["render",function(e,t,i,s,o,r){return a(),n("div",lg,c(r.countdownResult),1)}]]),dg={name:"Confirmation",components:{BrandDialog:J,PriceAmount:eg,MainContainer:rg,BottomFixedPanel:Ei,Chat:vp,ChatWrapper:zp,NoticeModal:Xh,PendingProtectionToolTip:Ql,Countdown:cg},props:{orderData:{type:Object,default:()=>({})}},data:()=>({modalType:zh,isMobileChatShown:!1,isShowNoticeModal:!1,isBalanceInsufficient:!1}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo"]),...D("c2c",["getCurrencyDecimal"]),isOwnAdvert(){return this.orderData.advertOwnerUsername===this.c2cAccountInfo.username},orderId(){return this.orderData.id},isSell(){return"SELL"===this.orderData.side},createdTime(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd HH:mm:ss")},timeoutAt(){var e;return(null==(e=this.orderData)?void 0:e.timeoutAt)||0},settlementAmount(){return Ps(this.orderData)},quoteCurrency(){return this.orderData.quoteCurrency},baseCurrency(){return this.orderData.baseCurrency},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},accountNumber(){return this.isSell?this.orderData.paymentMethods[0].data.properties.accountNumber:""},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer}},methods:{onNoticeButtonClicked(){re.terminateOrder(this.orderData.id)},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onCancelClick(){this.isShowNoticeModal=!0},async onNextClick(){if(this.isOwnAdvert)try{await re.acceptOrder(this.orderData.id),this.$router.push({name:"c2cOrder",params:{id:this.orderData.id,lang:this.lang}})}catch(e){const{code:t}=e.response.data;this.isBalanceInsufficient=ue.C2C_OTC_USER_BALANCE_INSUFFICIENT===t}},onGoToWallet(){const e={name:"walletSpot",params:{lang:this.lang}};this.isNotDesktop?this.$router.push(e):window.open(this.$router.resolve(e).href,"_blank")},onChatClick(){this.isMobileChatShown=!0},onChatBack(){this.isMobileChatShown=!1}}},ug={class:"confirmation"},mg={class:"desc-wrapper"},pg={class:"desc-title"},hg={key:1,class:"notice"},yg={class:"button-container"},Cg={class:"total-wrapper"}
2,gg={class:"total-amount-wrapper inner-ml-4"},fg={class:"amount"},bg={class:"action-wrapper"},vg={class:"flex-box justify-end"},kg={class:"flex-box button-wrapper"},Sg={key:1,class:"action-wrapper"},Ag={class:"flex-box justify-end"},Mg={class:"flex-box button-wrapper"},Ig={key:2,class:"error-insufficient-balance"};const wg=Ft(dg,[["render",function(e,t,o,d,u,m){const g=i("Countdown"),f=i("ChatWrapper"),b=i("PriceAmount"),v=i("PendingProtectionToolTip"),k=i("BaseButton"),S=i("BottomFixedPanel"),A=i("Chat"),M=i("MainContainer"),I=i("NoticeModal"),w=i("BrandDialog");return a(),n("div",ug,[l(M,{isSell:m.isSell,currency:m.baseCurrency},{detail:C((()=>[s("div",mg,[s("div",pg,c(e.$t("c2c.buySell.confirmOrder")),1),l(g,{class:"counter",timeoutTime:m.timeoutAt},null,8,["timeoutTime"])]),e.isMobile?(a(),h(f,{key:0,orderId:m.orderId,nickname:m.merchantInfo.alias,username:m.merchantInfo.username,onChatClick:m.onChatClick,isOnline:m.merchantInfo.isOnline,isKeepUpdating:!u.isMobileChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])):y("",!0),t[2]||(t[2]=s("hr",{class:"horizontal-line"},null,-1)),l(b,{settlementAmount:m.settlementAmount,unitPrice:o.orderData.price,swapAmount:o.orderData.amount,orderNumber:o.orderData.id,orderCreated:m.createdTime,paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:m.quoteCurrency,baseCurrency:m.baseCurrency,accountNumber:m.accountNumber,isOwnAdvert:m.isOwnAdvert,transferAmount:m.transferAmount,isSell:m.isSell},null,8,["settlementAmount","unitPrice","swapAmount","orderNumber","orderCreated","paymentMethod","quoteCurrency","baseCurrency","accountNumber","isOwnAdvert","transferAmount","isSell"]),m.isSell?y("",!0):(a(),n("div",hg,c(e.$t("c2c.buySell.buyerNotice")),1)),s("div",yg,[e.isMobile?(a(),h(S,{key:0},{default:C((()=>[s("div",Cg,[s("div",null,c(e.$t(m.isSell?"c2c.buySell.totalReceived":"c2c.buySell.totalPayment")),1),s("div",gg,[s("span",fg,c(m.getFormatPrice(m.settlementAmount,m.quoteCurrency)),1),s("span",null,c(m.quoteCurrency),1)])]),s("div",bg,[s("div",vg,[l(v,{quoteCurrency:m.quoteCurrency,isSell:m.isSell},null,8,["quoteCurrency","isSell"])]),s("div",kg,[l(k,{class:p(["outline-primary",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:m.onCancelClick},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["class","onClick"]),l(k,{class:p(["primary button-confirm",{"xs-btn":e.isExtraSmallSize}]),size:"large",disabled:"",onClick:m.onNextClick},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["class","onClick"])])])])),_:1})):(a(),n("div",Sg,[s("div",Ag,[l(v,{quoteCurrency:m.quoteCurrency,isSell:m.isSell},null,8,["quoteCurrency","isSell"])]),s("div",Mg,[l(k,{class:"outline-primary",size:"large",onClick:m.onCancelClick},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["onClick"]),l(k,{class:"primary button-confirm",size:"large",disabled:!m.isOwnAdvert||u.isBalanceInsufficient,onClick:m.onNextClick},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["disabled","onClick"])])]))]),u.isBalanceInsufficient?(a(),n("div",Ig,[r(c(e.$t("c2c.insufficientBalance"))+" ",1),s("span",{class:"go-to-wallet",onClick:t[0]||(t[0]=(...e)=>m.onGoToWallet&&m.onGoToWallet(...e))},c(e.$t("c2c.buySell.goToWallet")),1)])):y("",!0)])),chat:C((()=>[l(A,{orderData:o.orderData},null,8,["orderData"])])),_:1},8,["isSell","currency"]),u.isShowNoticeModal?(a(),h(I,{key:0,isShow:u.isShowNoticeModal,"onUpdate:isShow":t[1]||(t[1]=e=>u.isShowNoticeModal=e),type:u.modalType.CANCEL_ORDER,onOnBottomClicked:m.onNoticeButtonClicked},null,8,["isShow","type","onOnBottomClicked"])):y("",!0),e.isMobile&&u.isMobileChatShown?(a(),h(w,{key:1,isBrandNewStyle:"",fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_buy_sell_confirmation_dialog"},{body:C((()=>[l(A,{orderData:o.orderData,onOnBack:m.onChatBack},null,8,["orderData","onOnBack"])])),_:1})):y("",!0)])}],["__scopeId","data-v-f0de4f84"]]),Tg={class:"stepper"},_g={class:"content"},Dg={class:"content"};const Pg=Ft({name:"Stepper",components:{IconCheck:Et},props:{steps:{type:Array,default:()=>[]},currentStep:{type:[Number,String],required:!0,validator:e=>"complete"===e||"number"==typeof e}},computed:{stepComplete(){return"complete"===this.currentStep}}},[["render",function(e,t,o,r,d,h){const y=i("IconCheck");return a(),n("ol",Tg,[(a(!0),n(u,null,m(o.steps,(t=>(a(),n("li",{key:t.step,class:p(["item",{active:o.currentStep>=t.step||h.stepComplete,"solid-line":o.currentStep>t.step||h.stepComplete}])},[s("span",_g,c(t.step),1),s("p",{class:p(["title",{active:o.currentStep>=t.step||h.stepComplete}])},c(e.$t(t.title)),3)],2)))),128)),s("li",{class:p(["item",{active:h.stepComplete}])},[s("span",Dg,[l(y)])],2)])}],["__scopeId","data-v-32d4938c"]]),Lg={name:"TransferModal",components:{BrandDialog:J,PaymentTag:Ta,ConsentTermsText:xi,IconCopy:ht},inject:["c2cContext","context"],props:{isShow:{type:Boolean,default:!1},amount:{type:String,default:""},paymentMethod:{type:String,default:""},accountName:{type:String,default:""},accountNumber:{type:String,default:""},mobileNumber:{type:String,default:""},bankName:{type:String,default:""},quoteCurrency:{type:String,default:""},orderId:{type:String,default:""}},emits:["update:isShow"],data:()=>({agreeTerms:!1}),computed:{...t(["lang"])},methods:{onCloseClick(){this.$emit("update:isShow",!1)},async onNotifyClick(){try{await re.payOrder(this.orderId),this.c2cContext.showSuccessModal=!0}catch(e){}finally{this.onCloseClick()}},onCopy(){this.context.showNotification("msg.copied")},onError(){this.context.showNotification("msg.fail")}}},Eg={class:"heading"},xg={class:"step"},Ng={class:"title"},Rg={class:"step"},Bg={class:"title"},Og={class:"content"},Fg={class:"amount-container"},Ug={class:"wrapper"},$g={class:"label"},qg={class:"info info-wrapper"},Vg={class:"icon-copy"},Hg={class:"wrapper"},jg={class:"label"},Gg={class:"info-wrapper"},zg={class:"amount"},Kg={class:"icon-copy"},Yg={class:"wrapper"},Wg={class:"label"},Zg={class:"info-wrapper"},Xg={key:0,class:"wrapper"},Qg={class:"label"},Jg={class:"info info-wrapper"},ef={class:"icon-copy"},tf={class:"wrapper"},nf={class:"label"},af={class:"info info-wrapper"},sf={class:"icon-copy"},of={key:1,class:"wrapper"},rf={class:"label"},lf={class:"info info-wrapper"},cf={class:"icon-copy"},df={class:"step"},uf={class:"title"},mf={class:"agreement"};const pf=[{step:1,title:"t.paying"},{step:2,title:"c2c.buySell.releasingToken"}],hf={name:"Payment",components:{MainContainer:rg,PriceAmount:eg,BottomFixedPanel:Ei,BrandDialog:J,Stepper:Pg,TransferModal:Ft(Lg,[["render",function(e,t,d,u,m,p){const g=i("IconCopy"),f=i("PaymentTag"),b=i("ConsentTermsText"),v=i("Checkbox"),k=i("BaseButton"),S=i("BrandDialog"),A=P("clipboard");return a(),h(S,{class:"transfer-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_buy_sell_transfer_dialog",onClosed:p.onCloseClick},{header:C((()=>[r(c(e.$t("c2c.buySell.transferToSeller")),1)])),body:C((()=>[s("div",Eg,c(e.$t("c2c.buySell.transferAndNotify")),1),s("div",xg,[t[2]||(t[2]=s("div",null,[s("div",{class:"circle"},"1"),s("div",{class:"line"})],-1)),s("div",null,[s("div",Ng,c(e.$t("c2c.buySell.transferStep1Title")),1),t[1]||(t[1]=s("div",{class:"content"},null,-1))])]),s("div",Rg,[t[3]||(t[3]=s("div",null,[s("div",{class:"circle"},"2"),s("div",{class:"line"})],-1)),s("div",null,[s("div",Bg,c(e.$t("c2c.buySell.transferToSellerAccount")),1),s("div",Og,[s("div",Fg,[s("div",Ug,[s("div",$g,c(e.$t("c2c.buySell.sellerName")),1),s("div",qg,[r(c(d.accountName)+" ",1),o((a(),n("span",Vg,[l(g)])),[[A,d.accountName,"copy"],[A,p.onCopy,"success"],[A,p.onError,"error"]])])]),s("div",Hg,[s("div",jg,c(e.$t("c2c.marketList.totalAmount")),1),s("div",Gg,[s("span",zg,c(d.amount),1),r(" "+c(d.quoteCurrency)+" ",1),o((a(),n("span",Kg,[l(g)])),[[A,d.amount,"copy"],[A,p.onCopy,"success"],[A,p.onError,"error"]])])]),s("div",Yg,[s("div",Wg,c(e.$t("t.paymentMethod")),1),s("div",Zg,[l(f,{methodType:d.paymentMethod},null,8,["methodType"])])]),d.bankName?(a(),n("div",Xg,[s("div",Qg,c(e.$t("t.bankName")),1),s("div",Jg,[r(c(d.bankName)+" ",1),o((a(),n("span",ef,[l(g)])),[[A,d.bankName,"copy"],[A,p.onCopy,"success"],[A,p.onError,"error"]])])])):y("",!0),s("div",tf,[s("div",nf,c(e.$t("t.accountNumber")),1),s("div",af,[r(c(d.accountNumber||"--")+" ",1),o((a(),n("span",sf,[l(g)])),[[A,d.accountNumber,"copy"],[A,p.onCopy,"success"],[A,p.onError,"error"]])])]),d.mobileNumber?(a(),n("div",of,[s("div",rf,c(e.$t("account.account.mobile")),1),s("div",lf,[r(c(d.mobileNumber)+" ",1),o((a(),n("span",cf,[l(g)])),[[A,d.mobileNumber,"copy"],[A,p.onCopy,"success"],[A,p.onError,"error"]])])])):y("",!0)])])])]),s("div",df,[t[5]||(t[5]=s("div",null,[s("div",{class:"circle"},"3")],-1)),s("div",null,[s("div",uf,c(e.$t("c2c.buySell.transferStep3Title")),1),t[4]||(t[4]=s("div",{class:"content"},null,-1))])]),s("div",mf,[l(v,{value:m.agreeTerms,"onUpdate:value":t[0]||(t[0]=e=>m.agreeTerms=e),isBrandNewStyle:""},{default:C((()=>[l(b,{isForceWindowOpen:""})])),_:1},8,["value"])]),l(k,{class:"primary button-notify",size:"large",disabled:!m.agreeTerms,onClick:p.onNotifyClick},{default:C((()=>[r(c(e.$t("c2c.buySell.notifySeller")),1)])),_:1},8,["disabled","onClick"])])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-a795af8f"]]),CancelOrderModal:qp,Chat:vp,ChatWrapper:zp,NoticeModal:Xh,Countdown:cg},inject:["context"],props:{orderData:{type:Object,default:()=>({})}},data:()=>({modalType:zh.CANCEL_ORDER,steps:pf,showTransferModal:!1,isShowCancelModal:!1,isMobileChatShown:!1,isShowNoticeModal:!1}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo"]),...D("c2c",["getCurrencyDecimal"]),orderId(){return this.orderData.id},createdTime(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd HH:mm:ss")},timeoutAt(){var e;return(null==(e=this.orderData)?void 0:e.timeoutAt)||0},settlementAmount(){return Ps(this.orderData)},quoteCurrency(){return this.orderData.quoteCurrency},baseCurrency(){return this.orderData.baseCurrency},isSell(){return"SELL"===this.orderData.side},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},accountName(){return this.orderData.paymentMethods[0].data.properties.accountName||this.merchantInfo.kycFullName},accountNumber(){return this.isSell?this.orderData.paymentMethods[0].data.properties.accountNumber:""},isOwnAdvert(){var e;return this.orderData.advertOwnerUsername===(null==(e=this.c2cAccountInfo)?void 0:e.username)},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer}},mounted(){if(!this.isOwnAdvert){const e=this.isSell?"c2c.buySell.payment.notification.buyer":"c2c.buySell.payment.notification.seller";this.context.showNotification(e)}},methods:{onCloseCancelModal(){this.isShowCancelModal=!1},onNoticeButtonClicked(){this.isShowCancelModal=!0},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onCancelClick(){this.isShowNoticeModal=!0},onNextClick(){this.isSell||(this.showTransferModal=!0)},onContactUsClick(){window.open(te(this.lang,"C2C"),"_blank")},onChatClick(){this.isMobileChatShown=!0},onChatBack(){this.isMobileChatShown=!1}}},yf={class:"payment"},Cf={class:"desc-wrapper"},gf={class:"desc-title flex-box justify-between inner-ml-4"},ff={class:"desc"},bf={class:"desc-title"},vf={class:"desc-sell flex-box inner-ml-4"},kf={class:"button-container"},Sf={class:"total-wrapper"}
2,Af={class:"total-amount-wrapper inner-ml-4"},Mf={class:"amount"},If={class:"button-wrapper"},wf={class:"total-wrapper"},Tf={class:"total-amount-wrapper inner-ml-4"},_f={class:"amount"},Df={class:"button-wrapper"},Pf={class:"flex-box justify-end"};const Lf=Ft(hf,[["render",function(e,t,o,d,m,g){var f,b,v,k,S,A,M,I,w;const T=i("Stepper"),_=i("Countdown"),D=i("ChatWrapper"),P=i("PriceAmount"),L=i("BaseButton"),E=i("BottomFixedPanel"),x=i("Chat"),N=i("MainContainer"),R=i("TransferModal"),B=i("CancelOrderModal"),O=i("BrandDialog"),F=i("NoticeModal");return a(),n("div",yf,[l(N,{isSell:g.isSell,currency:g.baseCurrency},{detail:C((()=>[l(T,{steps:m.steps,currentStep:1},null,8,["steps"]),s("div",Cf,[g.isSell?(a(),n(u,{key:1},[s("div",bf,c(e.$t("c2c.buySell.buyerIsPaying")),1),s("div",vf,[s("div",null,c(e.$t("c2c.buySell.paymentMadeHint")),1),l(_,{class:"counter-sell",timeoutTime:g.timeoutAt},null,8,["timeoutTime"])])],64)):(a(),n(u,{key:0},[s("div",gf,[s("div",null,c(e.$t("c2c.buySell.makePayment")),1),l(_,{class:"counter",timeoutTime:g.timeoutAt},null,8,["timeoutTime"])]),s("div",ff,c(e.$t("c2c.buySell.completePaymentHint")),1)],64))]),e.isMobile?(a(),h(D,{key:0,orderId:g.orderId,nickname:g.merchantInfo.alias,username:g.merchantInfo.username,onChatClick:g.onChatClick,isOnline:g.merchantInfo.isOnline,isKeepUpdating:!m.isMobileChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])):y("",!0),t[2]||(t[2]=s("hr",{class:"horizontal-line"},null,-1)),l(P,{settlementAmount:g.settlementAmount,unitPrice:o.orderData.price,swapAmount:o.orderData.amount,orderNumber:o.orderData.id,orderCreated:g.createdTime,paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:g.quoteCurrency,baseCurrency:g.baseCurrency,accountNumber:g.accountNumber,isOwnAdvert:g.isOwnAdvert,transferAmount:g.transferAmount,isSell:g.isSell},null,8,["settlementAmount","unitPrice","swapAmount","orderNumber","orderCreated","paymentMethod","quoteCurrency","baseCurrency","accountNumber","isOwnAdvert","transferAmount","isSell"]),s("div",kf,[e.isMobile?(a(),h(E,{key:0},{default:C((()=>[s("div",Sf,[s("div",null,c(e.$t(g.isSell?"c2c.buySell.totalReceived":"c2c.buySell.totalPayment")),1),s("div",Af,[s("span",Mf,c(g.getFormatPrice(g.settlementAmount,g.quoteCurrency)),1),s("span",null,c(g.quoteCurrency),1)])]),s("div",If,[l(L,{class:p(["outline-primary",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:g.onCancelClick},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["class","onClick"]),l(L,{class:p(["primary button-next",{"xs-btn":e.isExtraSmallSize}]),size:"large",disabled:g.isSell,onClick:g.onNextClick},{default:C((()=>[r(c(e.$t("t.next")),1)])),_:1},8,["class","disabled","onClick"])])])),_:1})):(a(),n(u,{key:1},[s("div",wf,[s("div",null,c(e.$t(g.isSell?"c2c.buySell.totalReceived":"c2c.buySell.totalPayment")),1),s("div",Tf,[s("span",_f,c(g.getFormatPrice(g.settlementAmount,g.quoteCurrency)),1),s("span",null,c(g.quoteCurrency),1)])]),s("div",Df,[l(L,{class:"outline-primary button-cancel",size:"large",onClick:g.onCancelClick},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["onClick"]),l(L,{class:"primary button-next",size:"large",disabled:g.isSell,onClick:g.onNextClick},{default:C((()=>[r(c(e.$t("t.next")),1)])),_:1},8,["disabled","onClick"])])],64)),s("div",Pf,[l(L,{class:"button-contact-us",as:"span",onClick:g.onContactUsClick},{default:C((()=>[r(c(e.$t("t.contactUs")),1)])),_:1},8,["onClick"])])])])),chat:C((()=>[l(x,{orderData:o.orderData},null,8,["orderData"])])),_:1},8,["isSell","currency"]),m.showTransferModal?(a(),h(R,{key:0,isShow:m.showTransferModal,"onUpdate:isShow":t[0]||(t[0]=e=>m.showTransferModal=e),amount:g.getFormatPrice(g.settlementAmount,g.quoteCurrency),paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:g.quoteCurrency,accountName:g.accountName,accountNumber:null==(v=null==(b=null==(f=o.orderData.paymentMethods[0])?void 0:f.data)?void 0:b.properties)?void 0:v.accountNumber,bankName:null==(A=null==(S=null==(k=o.orderData.paymentMethods[0])?void 0:k.data)?void 0:S.properties)?void 0:A.bankName,orderId:o.orderData.id,mobileNumber:null==(w=null==(I=null==(M=o.orderData.paymentMethods[0])?void 0:M.data)?void 0:I.properties)?void 0:w.mobileNumber},null,8,["isShow","amount","paymentMethod","quoteCurrency","accountName","accountNumber","bankName","orderId","mobileNumber"])):y("",!0),m.isShowCancelModal?(a(),h(B,{key:1,isSell:g.isSell,orderId:o.orderData.id,onOnClose:g.onCloseCancelModal},null,8,["isSell","orderId","onOnClose"])):y("",!0),e.isMobile&&m.isMobileChatShown?(a(),h(O,{key:2,isBrandNewStyle:"",fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_buy_sell_payment_dialog"},{body:C((()=>[l(x,{orderData:o.orderData,onOnBack:g.onChatBack},null,8,["orderData","onOnBack"])])),_:1})):y("",!0),m.isShowNoticeModal?(a(),h(F,{key:3,isShow:m.isShowNoticeModal,"onUpdate:isShow":t[1]||(t[1]=e=>m.isShowNoticeModal=e),type:m.modalType.CANCEL_ORDER,onOnBottomClicked:g.onNoticeButtonClicked},null,8,["isShow","type","onOnBottomClicked"])):y("",!0)])}],["__scopeId","data-v-75b1065d"]]),Ef=[{text:"c2c.buySell.report.reason.1",value:"BUYER_PAID_NOT_RECEIVE_TOKENS",isSell:!1},{text:"c2c.buySell.report.reason.2",value:"BUYER_OVERPAID",isSell:!1},{text:"c2c.buySell.report.reason.3",value:"BUYER_PAID_ORDER_CANCELED",isSell:!1},{text:"c2c.buySell.report.reason.4",value:"SELLER_RECEIVE_INCORRECT_AMOUNT",isSell:!0},{text:"c2c.buySell.report.reason.5",value:"USER_ACCOUNT_NAME_NOT_MATCH",isSell:!0},{text:"c2c.buySell.report.reason.6",value:"SELLER_NOT_RECEIVE_PAYMENT",isSell:!0},{text:"c2c.buySell.report.reason.7",value:"OTHER_COMPLAINT_REASONS"}],xf={name:"ReportIssueModal",components:{BrandDialog:J,DropdownCancel:Rp,Note:wa},props:{isSell:{type:Boolean,default:!1},orderId:{type:String,required:!0},callback:{type:Function,default:()=>{}}},emits:["onClose"],data:()=>({note:"",formData:{statusSubtype:"",statusRemarkData:{reason:""}}}),computed:{isButtonEnabled(){return!this.formData.statusSubtype||"OTHER_COMPLAINT_REASONS"===this.formData.statusSubtype&&!this.note},reasons(){return Ef.filter((e=>e.isSell===this.isSell||void 0===e.isSell))}},methods:{onCloseClick(){this.$emit("onClose")},async onSubmitClick(){"OTHER_COMPLAINT_REASONS"===this.formData.statusSubtype?this.formData.statusRemarkData.reason=this.note:this.formData.statusRemarkData=null;try{await re.disputeOrder(this.orderId,this.formData),this.callback()}catch(e){}}}},Nf={class:"title"},Rf={class:"input-wrapper"},Bf={class:"reason-label"};const Of=Ft(xf,[["render",function(e,t,n,o,d,u){const m=i("DropdownCancel"),p=i("Note"),y=i("BaseButton"),g=i("BrandDialog");return a(),h(g,{class:"report-issue-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_report_issue_dialog",onClosed:u.onCloseClick},{header:C((()=>[r(c(e.$t("c2c.buySell.reportIssue")),1)])),body:C((()=>[s("div",Nf,c(e.$t("c2c.buySell.report.title")),1),s("div",Rf,[s("div",Bf,[t[2]||(t[2]=s("span",{class:"required"},"*",-1)),r(" "+c(e.$t("c2c.buySell.report.text")),1)]),l(m,{modelValue:d.formData.statusSubtype,"onUpdate:modelValue":t[0]||(t[0]=e=>d.formData.statusSubtype=e),placeholder:"c2c.buySell.report.dropdown.placeholder",reasons:u.reasons},null,8,["modelValue","reasons"])]),l(p,{modelValue:d.note,"onUpdate:modelValue":t[1]||(t[1]=e=>d.note=e),title:"t.moreDetails",maxlength:"1000"},null,8,["modelValue"]),l(y,{class:"primary button-submit",size:"large",disabled:u.isButtonEnabled,onClick:u.onSubmitClick}
2,{default:C((()=>[r(c(e.$t("t.submit")),1)])),_:1},8,["disabled","onClick"])])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-4da93736"]]),Ff={name:"ConfirmReceiptModal",components:{BrandDialog:J,PaymentTag:Ta,ConsentTermsText:xi},inject:["context","c2cContext"],props:{isShow:{type:Boolean,default:!1},confirmReceiptInfo:{type:Object,default:()=>({})},onReleaseTokenCallback:{type:Function,default:()=>{}}},emits:["onClose"],data:()=>({agreeTerms:!1}),computed:{...t(["lang"])},methods:{onCloseClick(){this.$emit("onClose")},onReleaseClick(){this.onReleaseTokenCallback()}}},Uf={class:"heading"},$f={class:"step"},qf={class:"title"},Vf={class:"content"},Hf={class:"amount-container"},jf={class:"wrapper"},Gf={class:"label"},zf={class:"info info-wrapper"},Kf={class:"wrapper"},Yf={class:"label"},Wf={class:"info-wrapper"},Zf={class:"wrapper"},Xf={class:"label"},Qf={class:"info-wrapper"},Jf={class:"amount"},eb={class:"step"},tb={class:"title"},ib={class:"wrapper"},nb={class:"total"};const ab=[{step:1,title:"t.paying"},{step:2,title:"c2c.buySell.releasingToken"}],sb={name:"ReleasingToken",components:{MainContainer:rg,PriceAmount:eg,BottomFixedPanel:Ei,Stepper:Pg,ConfirmReceiptModal:Ft(Ff,[["render",function(e,t,n,o,d,u){const m=i("PaymentTag"),p=i("ConsentTermsText"),y=i("Checkbox"),g=i("BaseButton"),f=i("BrandDialog");return a(),h(f,{class:"confirm-receipt-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_confirm_receipt_dialog",onClosed:u.onCloseClick},{header:C((()=>[r(c(e.$t("c2c.buySell.confirmReceiptTitle")),1)])),body:C((()=>[s("div",Uf,c(e.$t("c2c.buySell.confirmReceiptContent")),1),s("div",$f,[t[1]||(t[1]=s("div",null,[s("div",{class:"circle"},"1"),s("div",{class:"line"})],-1)),s("div",null,[s("div",qf,c(e.$t("c2c.buySell.sellerConfirmStep1")),1),s("div",Vf,[s("div",Hf,[s("div",jf,[s("div",Gf,c(e.$t("c2c.buySell.buyerName")),1),s("div",zf,c(n.confirmReceiptInfo.buyer.kycFullName),1)]),s("div",Kf,[s("div",Yf,c(n.confirmReceiptInfo.bankInfo.accountNumber),1),s("div",Wf,[l(m,{methodType:n.confirmReceiptInfo.bankInfo.type},null,8,["methodType"])])]),s("div",Zf,[s("div",Xf,c(e.$t("c2c.buySell.totalReceived")),1),s("div",Qf,[s("span",Jf,c(n.confirmReceiptInfo.totalReceived),1),r(" "+c(n.confirmReceiptInfo.quoteCurrency),1)])])])])])]),s("div",eb,[t[2]||(t[2]=s("div",null,[s("div",{class:"circle"},"2"),s("div",{class:"line"})],-1)),s("div",tb,c(e.$t("c2c.buySell.confirmAmountTitle")),1)]),l(y,{value:d.agreeTerms,"onUpdate:value":t[0]||(t[0]=e=>d.agreeTerms=e),class:"agreement",isBrandNewStyle:""},{default:C((()=>[l(p)])),_:1},8,["value"]),s("div",ib,[r(c(e.$t("c2c.buySell.totalRelease"))+" ",1),s("div",null,[s("span",nb,c(n.confirmReceiptInfo.totalRelease),1),r(" "+c(n.confirmReceiptInfo.baseCurrency),1)])]),l(g,{class:"primary button-release",size:"large",disabled:!d.agreeTerms,onClick:u.onReleaseClick},{default:C((()=>[r(c(e.$t("c2c.buySell.releaseTokens")),1)])),_:1},8,["disabled","onClick"])])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-25b887ca"]]),Chat:vp,ChatWrapper:zp,ReportIssueModal:Of,Countdown:cg,BrandDialog:J,TwoFactorAuthenticator:xt},inject:["context","c2cContext"],props:{orderData:{type:Object,default:()=>({})},isApplyDirectly:{type:Boolean,default:!1}},data:()=>({steps:ab,showConfirmReceiptModal:!1,showTwoFAModal:!1,showReportIssueModal:!1,confirmReceiptInfo:{},isMobileChatShown:!1,isTwoFactorAuthenticatorShown:!1}),computed:{...t(["lang"]),...t("c2c",["c2cInitInfo","c2cAccountInfo"]),...D("c2c",["getCurrencyDecimal"]),isOwnAdvert(){return this.orderData.advertOwnerUsername===this.c2cAccountInfo.username},prerequisiteList(){var e;return((null==(e=this.c2cInitInfo)?void 0:e.signUpPrerequisites)||{}).requiredPrerequisites||[]},twoFactorAuthenticatorType(){return this.prerequisiteList.includes(ye.GOOGLE_TOTP)?Rt.GOOGLE_AUTH:this.prerequisiteList.includes(ye.PINCODE)?Rt.PIN_CODE:""},orderId(){return this.orderData.id},createdTime(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd HH:mm:ss")},timeoutAt(){var e;return(null==(e=this.orderData)?void 0:e.timeoutAt)||0},paidAmount(){return _s(this.orderData).transferAmount},settlementAmount(){return Ps(this.orderData)},receivedAmount(){return Ds(this.orderData).transferAmount},quoteCurrency(){return this.orderData.quoteCurrency},baseCurrency(){return this.orderData.baseCurrency},isSell(){return"SELL"===this.orderData.side},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},paymentMethodInfo(){var e;return(null==(e=this.orderData.paymentMethods[0])?void 0:e.data)||{}},accountNumber(){var e;return this.isSell?null==(e=this.paymentMethodInfo.properties)?void 0:e.accountNumber:""},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer}},watch:{isApplyDirectly:{handler(e){e&&this.onReleaseTokenCallback()},immediate:!0}},created(){this.isSell&&this.getConfirmReceiptInfo()},mounted(){this.orderData.status===Bi.PAID&&this.isSell&&this.context.showNotification("c2c.buySell.releasing.notification.paid")},methods:{onConfirmReceiptModalCloseClick(){this.showConfirmReceiptModal=!1},onReleaseTokenCallback(){this.twoFactorAuthenticatorType?this.isTwoFactorAuthenticatorShown=!0:this.verification()},getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onNextClick(){this.isSell&&(this.showConfirmReceiptModal=!0)},onReportClick(){this.showReportIssueModal=!0},onReportIssueCloseClick(){this.showReportIssueModal=!1},onContactUsClick(){window.open(te(this.lang,"C2C"),"_blank")},onChatClick(){this.isMobileChatShown=!0},onChatBack(){this.isMobileChatShown=!1},getConfirmReceiptInfo(){var e;this.confirmReceiptInfo={buyer:this.orderData.buyer,totalReceived:this.getFormatPrice(this.receivedAmount,this.quoteCurrency),quoteCurrency:this.quoteCurrency,baseCurrency:this.baseCurrency,totalRelease:this.getFormatPrice(this.paidAmount,this.baseCurrency),bankInfo:{accountNumber:null==(e=this.paymentMethodInfo.properties)?void 0:e.accountNumber,type:this.paymentMethodInfo.type}}},verification(e=""){return re.releaseTokenOrder(this.orderId,e,this.twoFactorAuthenticatorType)},onVerificationSuccess(){this.c2cContext.showSuccessModal=!0,this.isTwoFactorAuthenticatorShown=!1},onVerificationFail(e){Nt.includes(e)||(this.isTwoFactorAuthenticatorShown=!1)}}},ob={class:"releasing-token"},rb={key:0,class:"desc-wrapper"},lb={class:"desc-title"},cb={class:"desc flex-box inner-ml-4"},db={key:1,class:"desc-wrapper"},ub={class:"desc-title flex-box justify-between inner-ml-4"},mb={class:"desc"},pb={class:"button-container"},hb={key:0,class:"total-wrapper"}
2,yb={class:"total-amount-wrapper inner-ml-4"},Cb={class:"amount"},gb={class:"button-wrapper"},fb={key:0,class:"total-wrapper"},bb={class:"total-amount-wrapper inner-ml-4"},vb={class:"amount"},kb={class:"button-wrapper"},Sb={class:"flex-box justify-end"};const Ab=Ft(sb,[["render",function(e,t,o,d,m,g){const f=i("Stepper"),b=i("Countdown"),v=i("ChatWrapper"),k=i("PriceAmount"),S=i("BaseButton"),A=i("BottomFixedPanel"),M=i("Chat"),I=i("MainContainer"),w=i("ConfirmReceiptModal"),T=i("TwoFactorAuthenticator"),_=i("BrandDialog"),D=i("ReportIssueModal");return a(),n("div",ob,[l(I,{isSell:g.isSell,currency:g.baseCurrency},{detail:C((()=>[l(f,{steps:m.steps,currentStep:2},null,8,["steps"]),g.isSell?(a(),n("div",db,[s("div",ub,[s("div",null,c(e.$t("c2c.buySell.releaseTokenWithin")),1),l(b,{class:"counter-sell",timeoutTime:g.timeoutAt},null,8,["timeoutTime"])]),s("div",mb,c(e.$t("c2c.buySell.confirmReceipt")),1)])):(a(),n("div",rb,[s("div",lb,c(e.$t("c2c.buySell.releaseTokenTitle")),1),s("div",cb,[s("div",null,c(e.$t("c2c.buySell.tokenReleaseTimeRemaining")),1),l(b,{class:"counter",timeoutTime:g.timeoutAt},null,8,["timeoutTime"])])])),e.isMobile?(a(),h(v,{key:2,orderId:g.orderId,nickname:g.merchantInfo.alias,username:g.merchantInfo.username,onChatClick:g.onChatClick,isOnline:g.merchantInfo.isOnline,isKeepUpdating:!m.isMobileChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])):y("",!0),t[1]||(t[1]=s("hr",{class:"horizontal-line"},null,-1)),l(k,{settlementAmount:g.settlementAmount,unitPrice:o.orderData.price,swapAmount:o.orderData.amount,orderNumber:o.orderData.id,orderCreated:g.createdTime,paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:g.quoteCurrency,baseCurrency:g.baseCurrency,accountNumber:g.accountNumber,isOwnAdvert:g.isOwnAdvert,transferAmount:g.transferAmount,isSell:g.isSell},null,8,["settlementAmount","unitPrice","swapAmount","orderNumber","orderCreated","paymentMethod","quoteCurrency","baseCurrency","accountNumber","isOwnAdvert","transferAmount","isSell"]),s("div",pb,[e.isMobile?(a(),h(A,{key:0},{default:C((()=>[g.isSell?(a(),n("div",hb,[s("div",null,c(e.$t("c2c.buySell.totalReceived")),1),s("div",yb,[s("span",Cb,c(g.getFormatPrice(g.receivedAmount,g.quoteCurrency)),1),s("span",null,c(g.quoteCurrency),1)])])):y("",!0),s("div",gb,[l(S,{class:p(["outline-primary",e.isExtraSmallSize?"xs-btn":"button-cancel"]),size:"large",onClick:g.onReportClick},{default:C((()=>[r(c(e.$t("t.report")),1)])),_:1},8,["class","onClick"]),l(S,{class:p(["primary button-next",{"xs-btn":e.isExtraSmallSize}]),isLoading:!g.isSell,size:"large",onClick:g.onNextClick},{default:C((()=>[r(c(g.isSell?e.$t("t.next"):e.$t("t.processing")),1)])),_:1},8,["class","isLoading","onClick"])])])),_:1})):(a(),n(u,{key:1},[g.isSell?(a(),n("div",fb,[s("div",null,c(e.$t("c2c.buySell.totalReceived")),1),s("div",bb,[s("span",vb,c(g.getFormatPrice(g.receivedAmount,g.quoteCurrency)),1),s("span",null,c(g.quoteCurrency),1)])])):y("",!0),s("div",kb,[l(S,{class:"outline-primary button-cancel",size:"large",onClick:g.onReportClick},{default:C((()=>[r(c(e.$t("t.report")),1)])),_:1},8,["onClick"]),l(S,{class:"primary button-next",isLoading:!g.isSell,size:"large",onClick:g.onNextClick},{default:C((()=>[r(c(g.isSell?e.$t("t.next"):e.$t("t.processing")),1)])),_:1},8,["isLoading","onClick"])])],64)),s("div",Sb,[l(S,{class:"button-contact-us",as:"span",onClick:g.onContactUsClick},{default:C((()=>[r(c(e.$t("t.contactUs")),1)])),_:1},8,["onClick"])])])])),chat:C((()=>[l(M,{orderData:o.orderData},null,8,["orderData"])])),_:1},8,["isSell","currency"]),m.showConfirmReceiptModal?(a(),h(w,{key:0,confirmReceiptInfo:m.confirmReceiptInfo,onReleaseTokenCallback:g.onReleaseTokenCallback,onOnClose:g.onConfirmReceiptModalCloseClick},null,8,["confirmReceiptInfo","onReleaseTokenCallback","onOnClose"])):y("",!0),l(_,{visible:m.isTwoFactorAuthenticatorShown,"onUpdate:visible":t[0]||(t[0]=e=>m.isTwoFactorAuthenticatorShown=e),width:"560px",idPrefix:"p2p_buy_sell_releasing_token_dialog",showClose:"",isBrandNewStyle:""},{header:C((()=>[r(c(e.$t("c2c.buySell.releaseTokens")),1)])),body:C((()=>[l(T,{type:g.twoFactorAuthenticatorType,verification:g.verification,callback:g.onVerificationSuccess,failedCallback:g.onVerificationFail,confirmButtonText:e.$t("t.submit")},null,8,["type","verification","callback","failedCallback","confirmButtonText"])])),_:1},8,["visible"]),e.isMobile&&m.isMobileChatShown?(a(),h(_,{key:1,isBrandNewStyle:"",fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_buy_sell_chat_dialog"},{body:C((()=>[l(M,{orderData:o.orderData,onOnBack:g.onChatBack},null,8,["orderData","onOnBack"])])),_:1})):y("",!0),m.showReportIssueModal?(a(),h(D,{key:2,orderId:o.orderData.id,isSell:g.isSell,onOnClose:g.onReportIssueCloseClick},null,8,["orderId","isSell","onOnClose"])):y("",!0)])}],["__scopeId","data-v-22e4c8d4"]]),Mb={name:"SucceedModal",components:{BrandDialog:J,IconSuccess:Be,BottomFixedPanel:Ei},props:{isSell:{type:Boolean,default:!1},baseCurrency:{type:String,default:""},quoteCurrency:{type:String,default:""},settlementAmount:{type:String,default:""},totalAmount:{type:String,default:""}},data:()=>({isShow:!0}
2),computed:{...t(["lang"])},methods:{onMarketClick(){this.$router.push({name:"c2cMarketList",params:{lang:this.lang}})},onWalletClick(){this.$router.push({name:"walletSpot",params:{lang:this.lang}})},onCloseClick(){this.isShow=!1}}},Ib={class:"icon-success"},wb={class:"desc-container"},Tb={class:"title"},_b={class:"desc"},Db={class:"view-wallet"},Pb={class:"amount-info-container"},Lb={class:"amount-wrapper"},Eb={class:"price"},xb={class:"currency"},Nb={class:"amount-wrapper"};const Rb={name:"Status",components:{MainContainer:rg,PriceAmount:eg,BrandDialog:J,ReadOnlyNote:Lo,SucceedModal:Ft(Mb,[["render",function(e,t,n,o,d,u){const m=i("IconSuccess"),p=i("BaseButton"),y=i("BottomFixedPanel"),g=i("BrandDialog");return a(),h(g,{visible:d.isShow,"onUpdate:visible":t[1]||(t[1]=e=>d.isShow=e),class:"succeed-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_buy_sell_succeed_dialog",onClosed:u.onCloseClick},{header:C((()=>[r(c(e.$t(n.isSell?"t.sellAndCurrency":"t.buyAndCurrency",{currency:n.baseCurrency})),1)])),body:C((()=>[s("div",Ib,[l(m)]),s("div",wb,[s("div",Tb,c(e.$t("t.completed")),1),s("div",_b,c(e.$t(n.isSell?"c2c.buySell.sellSuccessDesc":"c2c.buySell.buySuccessDesc")),1),s("div",Db,[r(c(e.$t("t.view"))+" ",1),s("span",{class:"wallet",onClick:t[0]||(t[0]=(...e)=>u.onWalletClick&&u.onWalletClick(...e))},c(e.$t("t.wallet")),1)])]),s("div",Pb,[s("div",Lb,[s("div",null,c(e.$t(n.isSell?"t.received":"t.bought")),1),s("div",Eb,[r(c(n.isSell?n.settlementAmount:n.totalAmount)+" ",1),s("span",xb,c(n.isSell?n.quoteCurrency:n.baseCurrency),1)])]),s("div",Nb,[s("div",null,c(e.$t(n.isSell?"t.sold":"t.paid")),1),s("div",null,c(n.isSell?n.totalAmount:n.settlementAmount)+" "+c(n.isSell?n.baseCurrency:n.quoteCurrency),1)])]),e.isMobile?(a(),h(y,{key:1},{default:C((()=>[l(p,{class:"primary button-go",size:"large",onClick:u.onMarketClick},{default:C((()=>[r(c(e.$t("c2c.buySell.goToC2CMarket")),1)])),_:1},8,["onClick"])])),_:1})):(a(),h(p,{key:0,class:"primary button-go desktop",size:"large",onClick:u.onMarketClick},{default:C((()=>[r(c(e.$t("c2c.buySell.goToC2CMarket")),1)])),_:1},8,["onClick"]))])),_:1},8,["visible","fullStyle","onClosed"])}],["__scopeId","data-v-af76ba40"]]),BottomFixedPanel:Ei,Chat:vp,ChatWrapper:zp,ReportIssueModal:Of},inject:["c2cContext"],props:{orderData:{type:Object,default:()=>({})}},data:()=>({data:null,orderStatus:Bi,isMobileChatShown:!1,showReportIssueModal:!1}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo"]),...D("c2c",["getCurrencyDecimal"]),isOwnAdvert(){return this.orderData.advertOwnerUsername===this.c2cAccountInfo.username},orderId(){return this.orderData.id},status(){return this.orderData.status},buttonWrapperClasses(){return this.isReportButtonShow||this.isCompleted?"justify-between":"justify-end"},isSell(){return"SELL"===this.orderData.side},title(){return this.status===Bi.RELEASE_EXPIRED?"c2c.marketList.releaseExpired":this.status===Bi.RELEASED?"c2c.buySell.orderCompleted":[Bi.CANCELED,Bi.TERMINATED].includes(this.status)?"c2c.buySell.orderCanceled":this.status===Bi.DISPUTED?"c2c.buySell.reportIssue":""},isReportButtonShow(){return this.status===Bi.RELEASE_EXPIRED||!this.isMobile&&this.status===Bi.CANCELED},isCompleted(){return this.status===Bi.RELEASED},createdTime(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd HH:mm:ss")},settlementAmount(){return Ps(this.orderData)},quoteCurrency(){return this.orderData.quoteCurrency},baseCurrency(){return this.orderData.baseCurrency},noteReason(){return this.orderData.reason},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},reporterName(){return this.orderData.issue.reporterUsername},accountNumber(){return this.isSell&&this.status===Bi.RELEASE_EXPIRED?this.orderData.paymentMethods[0].data.properties.accountNumber:""},disputedAccountName(){return this.status!==Bi.DISPUTED?"":this.orderData.paymentMethods[0].data.properties.accountName||this.merchantInfo.kycFullName},disputedBankName(){return this.status===Bi.DISPUTED?this.orderData.paymentMethods[0].data.properties.bankName:""},disputedAccountNumber(){return this.status===Bi.DISPUTED?this.orderData.paymentMethods[0].data.properties.accountNumber:""},reporterAlias(){return this.reporterName===this.orderData.seller.username?this.orderData.seller.alias:this.orderData.buyer.alias},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer}},methods:{getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onReportClick(){this.showReportIssueModal=!0},onReportIssueCloseClick(){this.showReportIssueModal=!1},onContactUsClick(){window.open(te(this.lang,"C2C"),"_blank")},onChatClick(){this.isMobileChatShown=!0},onChatBack(){this.isMobileChatShown=!1}
2,onGotoMarketClick(){this.$router.push({name:"c2cMarketList",params:{lang:this.lang}})},onGoToWallet(){const e={name:"walletSpot",params:{lang:this.lang}};this.isNotDesktop?this.$router.push(e):window.open(this.$router.resolve(e).href,"_blank")}}},Bb={class:"status"},Ob={class:"desc-wrapper"},Fb={key:0,class:"desc"},Ub={key:1,class:"reported inner-ml-8"},$b={class:"reported-username"},qb={class:"button-container"},Vb={key:0,class:"button-cta"},Hb={key:1,class:"button-cta"},jb={key:2,class:"button-cta"};const Gb=Ft(Rb,[["render",function(e,t,o,d,u,m){const g=i("ChatWrapper"),f=i("ReadOnlyNote"),b=i("PriceAmount"),v=i("BaseButton"),k=i("BottomFixedPanel"),S=i("Chat"),A=i("MainContainer"),M=i("SucceedModal"),I=i("BrandDialog"),w=i("ReportIssueModal");return a(),n("div",Bb,[l(A,{isSell:m.isSell,currency:m.baseCurrency},{detail:C((()=>[s("div",Ob,[s("div",{class:p(["desc-title",{"canceled-color":m.status===u.orderStatus.CANCELED}])},c(e.$t(m.title)),3),m.status===u.orderStatus.RELEASE_EXPIRED?(a(),n("div",Fb,c(e.$t("c2c.buySell.tokenReleaseExpired")),1)):y("",!0),m.status===u.orderStatus.DISPUTED?(a(),n("div",Ub,[s("span",null,c(e.$t("c2c.buySell.reportedBy")),1),s("span",$b,c(m.reporterAlias),1)])):y("",!0)]),e.isMobile?(a(),h(g,{key:0,orderId:m.orderId,nickname:m.merchantInfo.alias,username:m.merchantInfo.username,onChatClick:m.onChatClick,isOnline:m.merchantInfo.isOnline,isKeepUpdating:!u.isMobileChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])):y("",!0),m.noteReason&&m.status!==u.orderStatus.RELEASED?(a(),h(f,{key:1,class:"reason-note",text:m.noteReason,maxHeight:"132"},null,8,["text"])):y("",!0),t[0]||(t[0]=s("hr",{class:"horizontal-line"},null,-1)),l(b,{settlementAmount:m.settlementAmount,unitPrice:o.orderData.price,swapAmount:o.orderData.amount,orderNumber:o.orderData.id,orderCreated:m.createdTime,paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:m.quoteCurrency,baseCurrency:m.baseCurrency,accountNumber:m.accountNumber,disputedAccountName:m.disputedAccountName,disputedBankName:m.disputedBankName,disputedAccountNumber:m.disputedAccountNumber,isOwnAdvert:m.isOwnAdvert,transferAmount:m.transferAmount,isSell:m.isSell},null,8,["settlementAmount","unitPrice","swapAmount","orderNumber","orderCreated","paymentMethod","quoteCurrency","baseCurrency","accountNumber","disputedAccountName","disputedBankName","disputedAccountNumber","isOwnAdvert","transferAmount","isSell"]),s("div",qb,[s("div",{class:p(["button-wrapper",m.buttonWrapperClasses])},[m.isReportButtonShow?(a(),h(v,{key:0,class:"outline-primary",size:"large",onClick:m.onReportClick},{default:C((()=>[r(c(e.$t("t.report")),1)])),_:1},8,["onClick"])):y("",!0),m.isCompleted?(a(),h(v,{key:1,class:p(["outline-primary",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:m.onGoToWallet},{default:C((()=>[r(c(e.$t("t.checkBalance")),1)])),_:1},8,["class","onClick"])):y("",!0),l(v,{class:"button-contact-us",as:"span",onClick:m.onContactUsClick},{default:C((()=>[r(c(e.$t("t.contactUs")),1)])),_:1},8,["onClick"])],2)]),e.isMobile&&[u.orderStatus.RELEASED,u.orderStatus.CANCELED,u.orderStatus.TERMINATED,u.orderStatus.DISPUTED].includes(m.status)?(a(),h(k,{key:2},{default:C((()=>[[u.orderStatus.RELEASED,u.orderStatus.TERMINATED].includes(m.status)?(a(),n("div",Vb,[l(v,{class:"primary button-market",size:"large",onClick:m.onGotoMarketClick},{default:C((()=>[r(c(e.$t("c2c.buySell.goToC2CMarket")),1)])),_:1},8,["onClick"])])):y("",!0),m.status===u.orderStatus.CANCELED?(a(),n("div",Hb,[l(v,{class:"outline-primary",size:"large",onClick:m.onReportClick},{default:C((()=>[r(c(e.$t("t.report")),1)])),_:1},8,["onClick"]),l(v,{class:"primary button-market",size:"large",onClick:m.onGotoMarketClick},{default:C((()=>[r(c(e.$t("c2c.buySell.goToC2CMarket")),1)])),_:1},8,["onClick"])])):y("",!0),m.status===u.orderStatus.DISPUTED?(a(),n("div",jb,[l(v,{class:"primary button-chat",size:"large",onClick:m.onChatClick},{default:C((()=>[r(c(e.$t("c2c.chat")),1)])),_:1},8,["onClick"])])):y("",!0)])),_:1})):y("",!0)])),chat:C((()=>[l(S,{orderData:o.orderData},null,8,["orderData"])])),_:1},8,["isSell","currency"]),m.c2cContext.showSuccessModal&&"RELEASED"===o.orderData.status?(a(),h(M,{key:0,isSell:m.isSell,baseCurrency:m.baseCurrency,quoteCurrency:m.quoteCurrency,settlementAmount:m.getFormatPrice(m.settlementAmount,m.quoteCurrency),totalAmount:m.getFormatPrice(o.orderData.amount,m.baseCurrency)},null,8,["isSell","baseCurrency","quoteCurrency","settlementAmount","totalAmount"])):y("",!0),e.isMobile&&u.isMobileChatShown?(a(),h(I,{key:1,isBrandNewStyle:"",fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_buy_sell_status_dialog"},{body:C((()=>
2[l(S,{orderData:o.orderData,onOnBack:m.onChatBack},null,8,["orderData","onOnBack"])])),_:1})):y("",!0),u.showReportIssueModal?(a(),h(w,{key:2,orderId:o.orderData.id,isSell:m.isSell,callback:m.onReportIssueCloseClick,onOnClose:m.onReportIssueCloseClick},null,8,["orderId","isSell","callback","onOnClose"])):y("",!0)])}],["__scopeId","data-v-7494be2f"]]),zb={class:"flex-center-center"};const Kb={name:"PayPendingReceiptModal",components:{BrandDialog:J,PaymentTag:Ta,ReleaseEarlyModal:Ft({name:"ReleaseEarlyModal",components:{MessageDialog:Bt,ConsentTermsText:xi},props:{orderId:{type:String,default:""}},emits:["confirmed","closed"],data:()=>({Genre:Ot,agreeTerms:!1,isLoading:!1}),methods:{onConfirm(){this.isLoading=!0,re.verifyPay(this.orderId).then((()=>{this.$emit("confirmed")})).finally((()=>{this.isLoading=!1}))},onClosed(){this.$emit("closed")}}},[["render",function(e,t,n,d,u,m){const p=i("BaseButton"),y=i("ConsentTermsText"),g=i("Checkbox"),f=i("MessageDialog"),b=P("loading");return o((a(),h(f,{genre:u.Genre.WARNING,title:e.$t("c2c.releaseEarly"),onClosed:m.onClosed},{bottom:C((()=>[l(p,{class:"primary",size:"large",disabled:!u.agreeTerms,onClick:m.onConfirm},{default:C((()=>[r(c(e.$t("t.confirm")),1)])),_:1},8,["disabled","onClick"]),s("div",zb,[l(p,{class:"button-text",as:"span",onClick:m.onClosed},{default:C((()=>[r(c(e.$t("t.cancel")),1)])),_:1},8,["onClick"])])])),default:C((()=>[s("div",null,c(e.$t("c2c.releaseEarly.description")),1),l(g,{value:u.agreeTerms,"onUpdate:value":t[0]||(t[0]=e=>u.agreeTerms=e),class:"agreement tx-align--left",isBrandNewStyle:""},{default:C((()=>[l(y)])),_:1},8,["value"])])),_:1},8,["genre","title","onClosed"])),[[b,u.isLoading]])}],["__scopeId","data-v-c1e40f8c"]])},props:{isShow:{type:Boolean,default:!1},receiptInfo:{type:Object,default:()=>({})},onConfirmCallback:{type:Function,default:()=>{}}},emits:["closed"],data:()=>({isReleaseEarlyModalShown:!1}),methods:{onCloseClick(){this.$emit("closed")},showReleaseEarlyModal(){this.isReleaseEarlyModalShown=!0},onReleaseEarlyConfirmed(){this.onConfirmCallback()},onReleaseEarlyClosed(){this.isReleaseEarlyModalShown=!1}}},Yb={class:"heading"},Wb={class:"step"},Zb={class:"title"},Xb={class:"content"},Qb={class:"amount-container"},Jb={class:"wrapper"},ev={class:"label"},tv={class:"info-wrapper"},iv={class:"wrapper"},nv={class:"label"},av={class:"info info-wrapper"},sv={class:"wrapper"},ov={class:"label"},rv={class:"info-wrapper"},lv={class:"amount"},cv={class:"step"},dv={class:"title"},uv={class:"step"},mv={class:"title"},pv={class:"wrapper total-block"},hv={class:"total"},yv={class:"flex-center-center"};const Cv={name:"PayPendingDetail",components:{MainContainer:rg,PriceAmount:eg,BottomFixedPanel:Ei,Stepper:Pg,PayPendingReceiptModal:Ft(Kb,[["render",function(e,t,n,o,d,u){const m=i("PaymentTag"),p=i("BaseButton"),g=i("ReleaseEarlyModal"),f=i("BrandDialog");return a(),h(f,{class:"confirm-receipt-modal",width:"560px",isBrandNewStyle:"",fullStyle:e.isMobile,idPrefix:"p2p_confirm_receipt_dialog",onClosed:u.onCloseClick},{header:C((()=>[r(c(e.$t("c2c.buySell.confirmReceiptTitle")),1)])),body:C((()=>[s("div",Yb,c(e.$t("c2c.pendingRelease.receipt.description")),1),s("div",Wb,[t[0]||(t[0]=s("div",null,[s("div",{class:"circle"},"1"),s("div",{class:"line"})],-1)),s("div",null,[s("div",Zb,c(e.$t("c2c.buySell.sellerConfirmStep1")),1),s("div",Xb,[s("div",Qb,[s("div",Jb,[s("div",ev,c(n.receiptInfo.bankInfo.accountNumber),1),s("div",tv,[l(m,{methodType:n.receiptInfo.bankInfo.type},null,8,["methodType"])])]),s("div",iv,[s("div",nv,c(e.$t("c2c.buySell.buyerName")),1),s("div",av,c(n.receiptInfo.buyer.kycFullName),1)]),s("div",sv,[s("div",ov,c(e.$t("c2c.buySell.totalReceived")),1),s("div",rv,[s("span",lv,c(n.receiptInfo.totalReceived),1),r(" "+c(n.receiptInfo.quoteCurrency),1)])])])])])]),s("div",cv,[t[1]||(t[1]=s("div",null,[s("div",{class:"circle"},"2"),s("div",{class:"line"})],-1)),s("div",dv,c(e.$t("c2c.pendingRelease.check")),1)]),s("div",uv,[t[2]||(t[2]=s("div",null,[s("div",{class:"circle"},"3"),s("div",{class:"line"}
2)],-1)),s("div",mv,c(e.$t("c2c.pendingRelease.notify")),1)]),s("div",pv,[r(c(e.$t("c2c.buySell.totalRelease"))+" ",1),s("div",null,[s("span",hv,c(n.receiptInfo.totalRelease),1),r(" "+c(n.receiptInfo.baseCurrency),1)])]),l(p,{class:"primary w-100",size:"large",onClick:u.onCloseClick},{default:C((()=>[r(c(e.$t("t.close")),1)])),_:1},8,["onClick"]),s("div",yv,[l(p,{class:"button-text",as:"span",onClick:u.showReleaseEarlyModal},{default:C((()=>[r(c(e.$t("c2c.releaseEarly")),1)])),_:1},8,["onClick"])]),d.isReleaseEarlyModalShown?(a(),h(g,{key:0,orderId:n.receiptInfo.orderId,onConfirmed:u.onReleaseEarlyConfirmed,onClosed:u.onReleaseEarlyClosed},null,8,["orderId","onConfirmed","onClosed"])):y("",!0)])),_:1},8,["fullStyle","onClosed"])}],["__scopeId","data-v-a3931806"]]),Countdown:cg,Chat:vp,ChatWrapper:zp,ReportIssueModal:Of,BrandDialog:J},inject:["context"],props:{orderData:{type:Object,default:()=>({})}},emits:["onApplyDirectlyStatus"],data:()=>({showReceiptModal:!1,showReportIssueModal:!1,isMobileChatShown:!1}),computed:{...t(["lang"]),...t("c2c",["c2cAccountInfo","c2cFiatInfoList"]),...D("c2c",["getCurrencyDecimal"]),isOwnAdvert(){return this.orderData.advertOwnerUsername===this.c2cAccountInfo.username},orderId(){return this.orderData.id},createdTime(){return U(new Date(this.orderData.createdAt),"yyyy-MM-dd HH:mm:ss")},paidAmount(){return _s(this.orderData).transferAmount},settlementAmount(){return Ps(this.orderData)},receivedAmount(){return Ds(this.orderData).transferAmount},quoteCurrency(){return this.orderData.quoteCurrency},baseCurrency(){return this.orderData.baseCurrency},isSell(){return"SELL"===this.orderData.side},merchantInfo(){return this.isSell?this.orderData.buyer:this.orderData.seller},paymentMethodInfo(){var e;return(null==(e=this.orderData.paymentMethods[0])?void 0:e.data)||{}},accountNumber(){var e;return this.isSell?null==(e=this.paymentMethodInfo.properties)?void 0:e.accountNumber:""},transferAmount(){return this.isSell?this.orderData.transferAmount.seller:this.orderData.transferAmount.buyer},steps(){return[{step:1,title:"t.paying"},{step:2,title:this.isSell?"c2c.pendingRelease.review":"c2c.pendingRelease.confirming"}]},fiatInfo(){return this.c2cFiatInfoList.find((e=>e.shortName===this.quoteCurrency))||{}},pendingTime(){return this.fiatInfo.payPendingTime||0},timeoutAt(){var e;return(null==(e=this.orderData)?void 0:e.timeoutAt)||0},buttonWrapperComponent(){return this.isMobile?Ei:"div"},receiptInfo(){var e;return this.isSell?{orderId:this.orderId,buyer:this.orderData.buyer,totalReceived:this.getFormatPrice(this.receivedAmount,this.quoteCurrency),quoteCurrency:this.quoteCurrency,baseCurrency:this.baseCurrency,totalRelease:this.getFormatPrice(this.paidAmount,this.baseCurrency),bankInfo:{accountNumber:null==(e=this.paymentMethodInfo.properties)?void 0:e.accountNumber,type:this.paymentMethodInfo.type}}:{}}},mounted(){this.orderData.status===Bi.PAY_PENDING&&this.isSell&&this.context.showNotification("c2c.buySell.releasing.notification.paid")},methods:{getFormatPrice(e,t){return Ls(e,this.getCurrencyDecimal(t))},onCheckReceipt(){this.isSell&&(this.showReceiptModal=!0)},onReceiptModalClosed(){this.showReceiptModal=!1},onReportClick(){this.showReportIssueModal=!0},onReportIssueCloseClick(){this.showReportIssueModal=!1},onContactUsClick(){window.open(te(this.lang,"C2C"),"_blank")},onChatClick(){this.isMobileChatShown=!0},onChatBack(){this.isMobileChatShown=!1},onConfirmCallback(){this.$emit("onApplyDirectlyStatus",Bi.PAID)}}},gv={class:"pay-pending-detail"},fv={key:0,class:"desc-wrapper"},bv={class:"desc-title"},vv={class:"desc flex-box inner-ml-4"},kv={key:1,class:"desc-wrapper"},Sv={class:"desc-title flex-box justify-between inner-ml-4"},Av={class:"desc"},Mv={class:"button-container"},Iv={key:0,class:"total-wrapper"},wv={class:"total-amount-wrapper inner-ml-4"},Tv={class:"amount"},_v={class:"button-wrapper"},Dv={class:"flex-box justify-end"};const Pv=Ft(Cv,[["render",function(e,t,o,d,u,m){const g=i("Stepper"),f=i("Countdown"),b=i("ChatWrapper"),v=i("PriceAmount"),k=i("BaseButton"),S=i("Chat"),A=i("MainContainer"),M=i("PayPendingReceiptModal"),w=i("ReportIssueModal"),T=i("BrandDialog");return a(),n("div",gv,[l(A,{isSell:m.isSell,currency:m.baseCurrency},{detail:C((()=>[l(g,{steps:m.steps,currentStep:2},null,8,["steps"]),m.isSell?(a(),n("div",kv,[s("div",Sv,[s("div",null,c(e.$t("c2c.pendingRelease.remaining.seller")),1),l(f,{class:"sell-counter",timeoutTime:m.timeoutAt},null,8,["timeoutTime"])]),s("div",Av,c(e.$t("c2c.pendingProtection.seller",{pendingCurrency:m.quoteCurrency,pendingTime:m.pendingTime})),1)])):(a(),n("div",fv,[s("div",bv,c(e.$t("c2c.pendingRelease.title.buyer")),1),s("div",vv,[s("div",null,c(e.$t("c2c.pendingRelease.remaining.buyer")),1),l(f,{class:"counter",timeoutTime:m.timeoutAt},null,8,["timeoutTime"])])])),e.isMobile?(a(),h(b,{key:2,orderId:m.orderId,nickname:m.merchantInfo.alias,username:m.merchantInfo.username,onChatClick:m.onCh
2atClick,isOnline:m.merchantInfo.isOnline,isKeepUpdating:!u.isMobileChatShown,hasNicknameLink:""},null,8,["orderId","nickname","username","onChatClick","isOnline","isKeepUpdating"])):y("",!0),t[0]||(t[0]=s("hr",{class:"horizontal-line"},null,-1)),l(v,{settlementAmount:m.settlementAmount,unitPrice:o.orderData.price,swapAmount:o.orderData.amount,orderNumber:o.orderData.id,orderCreated:m.createdTime,paymentMethod:o.orderData.paymentMethodTypes[0],quoteCurrency:m.quoteCurrency,baseCurrency:m.baseCurrency,accountNumber:m.accountNumber,isOwnAdvert:m.isOwnAdvert,transferAmount:m.transferAmount,isSell:m.isSell},null,8,["settlementAmount","unitPrice","swapAmount","orderNumber","orderCreated","paymentMethod","quoteCurrency","baseCurrency","accountNumber","isOwnAdvert","transferAmount","isSell"]),s("div",Mv,[(a(),h(I(m.buttonWrapperComponent),null,{default:C((()=>[m.isSell?(a(),n("div",Iv,[s("div",null,c(e.$t("c2c.buySell.totalReceived")),1),s("div",wv,[s("span",Tv,c(m.getFormatPrice(m.receivedAmount,m.quoteCurrency)),1),s("span",null,c(m.quoteCurrency),1)])])):y("",!0),s("div",_v,[l(k,{class:p(["outline-primary button-cancel",{"xs-btn":e.isExtraSmallSize}]),size:"large",onClick:m.onReportClick},{default:C((()=>[r(c(e.$t("t.report")),1)])),_:1},8,["class","onClick"]),l(k,{class:p(["primary button-next",{"xs-btn":e.isExtraSmallSize}]),isLoading:!m.isSell,size:"large",onClick:m.onCheckReceipt},{default:C((()=>[r(c(m.isSell?e.$t("c2c.checkReceipt"):e.$t("t.processing")),1)])),_:1},8,["class","isLoading","onClick"])])])),_:1})),s("div",Dv,[l(k,{class:"button-contact-us",as:"span",onClick:m.onContactUsClick},{default:C((()=>[r(c(e.$t("t.contactUs")),1)])),_:1},8,["onClick"])])])])),chat:C((()=>[l(S,{orderData:o.orderData},null,8,["orderData"])])),_:1},8,["isSell","currency"]),u.showReceiptModal?(a(),h(M,{key:0,receiptInfo:m.receiptInfo,onConfirmCallback:m.onConfirmCallback,onClosed:m.onReceiptModalClosed},null,8,["receiptInfo","onConfirmCallback","onClosed"])):y("",!0),u.showReportIssueModal?(a(),h(w,{key:1,orderId:o.orderData.id,isSell:m.isSell,onOnClose:m.onReportIssueCloseClick},null,8,["orderId","isSell","onOnClose"])):y("",!0),e.isMobile&&u.isMobileChatShown?(a(),h(T,{key:2,isBrandNewStyle:"",fullStyle:"",showClose:!1,bodyWithPadding:!1,idPrefix:"p2p_buy_sell_chat_dialog"},{body:C((()=>[l(S,{orderData:o.orderData,onOnBack:m.onChatBack},null,8,["orderData","onOnBack"])])),_:1})):y("",!0)])}],["__scopeId","data-v-bc94bdeb"]]),Lv={name:"BuySellMain",components:{Confirmation:wg,Payment:Lf,ReleasingToken:Ab,Status:Gb,PayPendingDetail:Pv,IconArrowBack:Ce,NoticeModal:Xh},provide(){return{c2cContext:this.c2cContext}},beforeRouteLeave(e,t,i){if([Bi.CREATED,Bi.ACCEPTED,Bi.PAID].includes(this.orderData.status))return this.isShowLeavingModal=!0,void(this.next=i);i()},data(){return{modalType:zh,orderData:{},orderInterval:null,orderId:this.$route.params.id,c2cContext:{showSuccessModal:!1},isShowLeavingModal:!1,applyDirectlyStatus:""}},computed:{...t(["lang"]),componentProps(){return"SELL"===this.orderData.side?{isSell:!0}:null},component(){switch(this.orderData.status){case Bi.CREATED:return wg;case Bi.ACCEPTED:return Lf;case Bi.PAY_PENDING:return Pv;case Bi.PAID:return Ab;
2case Bi.RELEASED:case Bi.RELEASE_EXPIRED:case Bi.CANCELED:case Bi.DISPUTED:case Bi.TERMINATED:return Gb}return null},isConfirmation(){return this.orderData.status===Bi.CREATED},isApplyDirectly(){return this.orderData.status===this.applyDirectlyStatus}},watch:{isMobile:{immediate:!0,handler(e){this.setIsFooterCustomizedHidden(e)}}},async created(){await this.getOrderData(),this.initInterval()},beforeUnmount(){clearInterval(this.orderInterval),this.setIsFooterCustomizedHidden(!1)},methods:{..._(["setIsFooterCustomizedHidden"]),async getOrderData(){const{order:e}=await re.getOrder(this.orderId);this.orderData=e,this.isStatusPage(e.status)&&clearInterval(this.orderInterval)},initInterval(){this.isStatusPage(this.orderData.status)||(this.orderInterval=setInterval((()=>{this.getOrderData()}),1e3))},isStatusPage:e=>[Bi.TERMINATED,Bi.DISPUTED,Bi.RELEASED].includes(e),onNoticeButtonClicked(){this.next()},onApplyDirectlyStatus(e){this.applyDirectlyStatus=e},onBack(){this.$router.push({name:"c2cMyOrder",params:{lang:this.lang}})}}},Ev={class:"buy-sell-main"};const xv=Ft(Lv,[["render",function(e,t,o,r,d,u){const m=i("IconArrowBack"),p=i("NoticeModal");return a(),n("div",Ev,[e.isMobile?(a(),n("div",{key:0,class:"back-wrap inner-ml-8",onClick:t[0]||(t[0]=(...e)=>u.onBack&&u.onBack(...e))},[l(m,{class:"icon-back"}),s("span",null,c(e.$t("c2c.backToOrders")),1)])):y("",!0),(a(),h(I(u.component),N(u.componentProps,{orderData:d.orderData,isApplyDirectly:u.isApplyDirectly,onOnApplyDirectlyStatus:u.onApplyDirectlyStatus}),null,16,["orderData","isApplyDirectly","onOnApplyDirectlyStatus"])),d.isShowLeavingModal?(a(),h(p,{key:1,isShow:d.isShowLeavingModal,"onUpdate:isShow":t[1]||(t[1]=e=>d.isShowLeavingModal=e),type:d.modalType.LEAVING_PAGE,onOnBottomClicked:u.onNoticeButtonClicked},null,8,["isShow","type","onOnBottomClicked"])):y("",!0)])}],["__scopeId","data-v-e0eec6ee"]]),Nv=Object.freeze(Object.defineProperty({__proto__:null,default:xv},Symbol.toStringTag,{value:"Module"}));export{PC as A,Nv as B,xc as D,rm as I,Ym as L,kd as N,wd as S,Cd as T,Sd as W,gd as a,Ms as b,Zt as c,en as d,Qi as e,_c as f,lu as g,iy as h,Dr as i,Pi as u};
3//# sourceMappingURL=ByOB-9wo.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.