1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7104],{3778:function(e,l,n){n.d(l,{o:function(){return N},V:function(){return x}});var o=n(40003),t=n(30381),i=n.n(t),a=n(28677),s=n(67294),d=n(25617),r=n(69077),c=n(62788),u=n(17845),m=n(98343),v=n(69831),p=n(53575),f=n(94050),h=n(5385),y=n(59983);function x(e){let{createQACodeCallback:l,handleSubmit:n}=e,{t}=(0,a.$G)(["common"]),x=(0,d.I0)(),{user:O}=(0,d.v9)(u.aF),{assetDetail:N}=(0,d.v9)(m.zu),{loadingTopupTransactionInit:_,transactionInitTopup:j}=(0,d.v9)(v.kj),{chain:g}=(0,r.LN)(),[C,I]=(0,s.useState)(null),[E,b]=(0,s.useState)(!1),S=async e=>{let{price:n,amount:o=0,profileId:a,assetType:s,tokenIds:d=[],amounts:r=[]}=e;b(!1);let u=[];s===p.C6.COLLECTION_ASSET&&Array.isArray(d)&&d.forEach(e=>u.push({tokenId:String(e)})),s===p.C6.HYPER_ASSET&&Array.isArray(d)&&Array.isArray(r)&&d.forEach((e,l)=>u.push({tokenId:String(e),amount:r[l]}));let m={amount:n,timestamp:i()().unix().valueOf(),userId:null==O?void 0:O.id,chainId:null==N?void 0:N.chainId,expiredAt:"",transactionType:null===h.n2||void 0===h.n2?void 0:h.n2.Payment,orderDescription:{assetType:s,orderList:u,profileId:String(a),amount:o,paymentType:h.uG.OneTime}};(null==g?void 0:g.testnet)?x(c.CF.getQRCodePaymentTestnet(m,t,()=>{x(c.CF.self.setShowPaymentModal(!0)),l(),I({price:n,amount:o}),b(!0)})):x(c.CF.getQRCodePayment(m,t,()=>{x(c.CF.self.setShowPaymentModal(!0)),l(),I({price:n,amount:o}),b(!0)}))},w=async e=>{((null==e?void 0:e.status)===h.fO.PAID||(null==e?void 0:e.status)===h.fO.OVER_PAID||(null==e?void 0:e.status)===h.fO.UNDER_PAID)&&x(c.CF.self.setPaymentLoading(!0)),(null==e?void 0:e.status)===h.fO.HAFT_SUCCESS&&setTimeout(async()=>{await n({...C,topupTx:e}),x(c.CF.self.setShowPaymentModal(!1)),x(c.CF.self.setPaymentLoading(!1))},3500),(null==e?void 0:e.status)===h.fO.ERROR&&(x(c.CF.self.setShowPaymentErrorModal(!0)),x(c.CF.self.setShowPaymentModal(!1)),x(c.CF.self.setPaymentLoading(!1))),(null==e?void 0:e.status)===h.fO.CANCELLED&&x(c.CF.self.setShowPaymentModal(!1))};return(0,s.useEffect)(()=>()=>{x(c.CF.self.setShowPaymentErrorModal(!1))},[]),(0,s.useEffect)(()=>{let e;let l=!0;if(E){var n;(e=new o.Z({type:o.W.WEB_SOCKET_TOPUP,query:{orderId:null==j?void 0:null===(n=j.qrCode)||void 0===n?void 0:n.orderId,service:[f.ar.Metadap]}})).subscribe("topup_notification",w),e.onConnect(async()=>{if(x(c.CF.self.setIsConnectSocket(!0)),!l)try{let l=await y.s4.getTransactionById(null==O?void 0:O.id,null==j?void 0:j.id);if(null==l?void 0:l.status){var e;w({amount:null==l?void 0:l.amount,receivedAmount:null==l?void 0:l.receivedAmount,status:null==l?void 0:l.status,userId:null==l?void 0:null===(e=l.user)||void 0===e?void 0:e.id})}}catch(e){console.error("Failed to fetch topup status:",e)}l=!1}),e.onDisconnect(()=>{x(c.CF.self.setIsConnectSocket(!1))})}return()=>{null==e||e.disconnect()}},[E]),{createQRCode:S,loadingTopupTransactionInit:_,setFormSubmit:I,transactionInitTopup:j}}var O=n(11163);function N(){let e=(0,d.I0)(),{assetDetail:l}=(0,d.v9)(m.zu),{transactionInitTopup:n}=(0,d.v9)(v.kj),o=(0,O.useRouter)(),[t,i]=(0,s.useState)(!1),a=e=>{let{as:l}=e;return l===o.asPath||(window.history.pushState(null,null,o.asPath),i(!0),!1)};return(0,s.useEffect)(()=>(o.beforePopState(a),()=>o.beforePopState(()=>!0)),[o]),{setConfirmLeavePage:i,confirmLeavePage:t,handleConfirm:()=>{e(c.CF.cancelTransactionDeposit("cancelled",null==l?void 0:l.chainId,null==n?void 0:n.id,()=>(e(c.CF.self.setShowPaymentModal(!1)),o.beforePopState(()=>!0),o.back())))}}}},69356:function(e,l,n){var o=n(85893);n(67294);var t=n(42476),i=n(25617),a=n(69077),s=n(11163),d=n(30311),r=n(17845),c=n(8108);l.Z=function(e){var l,n,u;let{className:m="",startText:v="",endText:p=""}=e,{locale:f}=(0,s.useRouter)(),{isConnectWallet:h}=(0,i.v9)(r.aF),{listNetwork:y}=(0,i.v9)(c.eN),{isMobile:x}=(0,d.dD)(),{chain:O}=(0,a.LN)();return(0,o.jsx)(o.Fragment,{children:h&&(0,o.jsxs)("div",{className:"mb-4 text-sm text-purple_700 ".concat(m),children:[v,(0,o.jsx)(t.Z,{placement:x?"topRight":"top",title:null==y?void 0:null===(u=y.filter(e=>Number(null==e?void 0:e.chainId)===Number(null==O?void 0:O.id)))||void 0===u?void 0:null===(n=u[0])||void 0===n?void 0:null===(l=n.description)||void 0===l?void 0:l[f],className:"text-primary font-bold",color:"#fff",overlayInnerStyle:{borderRadius:"6px",textAlign:"justify",width:"300px",color:"#100A55",fontSize:"12px",fontWeight:"400"},children:null==O?void 0:O.name}),".",p]})})}},89463:function(e,l,n){var o=n(85893);n(67294);var t=n(93830),i=n(25675),a=n.n(i);l.Z=function(e){let{src:l,descriptions:n="",onClick:i,buttonName:s="",className:d="",classNameImg:r="",loading:c=!1}=e;return(0,o.jsxs)("div",{className:"flex flex-col items-center gap-6 md:gap-8 ".concat(d),children:[(0,o.jsx)("div",{className:"relative h-full ".concat(r||"w-[200px] md:w-[300px]"),children:(0,o.jsx)(a(),{width:100,height:100,src:l,alt:"",className:"mx-auto w-full h-full"})}),n&&(0,o.jsx)("span",{className:"flex justify-center text-grey_100 font-bold text-base md:text-xl text-center",children:n}),s&&(0,o.jsx)(t.BaseButton,{loading:c,className:"mx-auto w-[158px] sm:w-[188px] md:w-[200px] !h-10 md:!h-12",onClick:i,children:(0,o.jsx)("span",{className:"typography-h5",children:s})})]})}},24446:function(e,l,n){var o=n(85893);n(67294);var t=n(28677),i=n(81187),a=n(93830);l.Z=function(e){let{qrCode:l,loading:n=!1,className:s="",isBlur:d=!1}=e,{t:r}=(0,t.$G)("common");return(0,o.jsxs)("div",{className:"border border-gray_200 relative rounded mx-auto overflow-hidden ".concat(s||"w-full xs:w-[200px] md:w-auto"),children:[(0,o.jsx)("img",{className:"w-full h-full ".concat(d?"blur-sm":""),src:l,alt:""}),(0,o.jsx)(i.If,{condition:n,Then:(0,o.jsx)("div",{className:"absolute top-0 w-full h-full backdrop-blur-[5px] bg-black/25 !z-20",children:(0,o.jsxs)("b",{className:"flex justify-center items-center flex-wrap gap-2 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:[(0,o.jsx)(a.ImpulseSpin,{size:22,frontColor:"#fff"}),(0,o.jsx)("span",{className:"text-white text-sm md:text-base text-center",children:r("processing")})]})})})]})}},53831:function(e,l,n){n.r(l),n.d(l,{default:function(){return ee}});var o,t,i=n(85893),a=n(67294),s=n(25617),d=n(11163),r=n(28677),c=n(90628),u=n(8206),m=n(81187),v=n(89463),p=n(13640),f=n(30381),h=n.n(f),y=n(66261),x=n(20818),O=n(21266),N=n(3685),_=n(53971),j=n(93830),g=n(69356),C=n(69077),I=n(15561),E=n(49302),b=n(17845),S=n(59983);let w=()=>{let e=(0,a.useRef)({isLoad:null}),{chain:l}=(0,C.LN)(),{user:n}=(0,s.v9)(b.aF),[o,t]=(0,a.useState)(null),[i,d]=(0,a.useState)(null),[r,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),v=(0,I.N)(null==u?void 0:u.orderId,500),p=async e=>{let{page:o=1}=e;try{c(!0);let e=await S.s4.getListPayment({userId:null==n?void 0:n.id,params:{limit:10,page:o,filters:{...u,chains:[(0,E.eC)(null==l?void 0:l.id)]}}});d(e)}catch(e){d(null)}finally{c(!1)}},f=async()=>{try{let e=await S.v8.getProfileIds();t(e)}catch(e){t(null)}};return(0,a.useEffect)(()=>{e.current.isLoad&&m(e=>({...e,chains:[(0,E.eC)(null==l?void 0:l.id)]})),e.current.isLoad=!0},[l]),(0,a.useEffect)(()=>{(null==n?void 0:n.id)&&p({page:1})},[v,n,null==u?void 0:u.chains,null==u?void 0:u.assetType,null==u?void 0:u.status,null==u?void 0:u.assets]),(0,a.useEffect)(()=>{f()},[]),{listPayment:i,loading:r,getTopUpTransactionList:p,setFilters:m,filters:u,profileIds:o}};var k=n(5385),T=n(4116);function A(e){let{status:l}=e,{t:n}=(0,r.$G)("common"),o=[{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.INITIALIZE),component:T.Z,props:{className:"font-bold typography-h6 text-warning",children:n("payment.initialize")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.PAID),component:T.Z,props:{className:"font-bold typography-h6 text-info",children:n("payment.full_payment")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID),component:T.Z,props:{className:"font-bold typography-h6 text-info",children:n("payment.partial_payment")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.OVER_PAID),component:T.Z,props:{className:"font-bold typography-h6 text-info",children:n("payment.overpayment")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.HAFT_SUCCESS),component:T.Z,props:{className:"font-bold typography-h6 text-[#0E26FF]",children:n("payment.haft_completed")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS),component:T.Z,props:{className:"font-bold typography-h6 text-success",children:n("payment.success")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED),component:T.Z,props:{className:"font-bold typography-h6 text-gray_500",children:n("payment.canceled")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED),component:T.Z,props:{className:"font-bold typography-h6 text-gray_500",children:n("payment.expired")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.FAILED),component:T.Z,props:{className:"font-bold typography-h6 text-error",children:n("payment.failure")}},{condition:l===(null===k.fO||void 0===k.fO?void 0:k.fO.ERROR),component:T.Z,props:{className:"font-bold typography-h6 text-error",children:n("payment.system_error")}}];return(0,i.jsx)(m.Z,{conditions:o})}var R=n(41664),D=n.n(R),F=n(93879),L=n(30311),P=n(68970),B=n(49300),Z=n(12866),M=n(62788);function G(e){var l,n,o,t,a,d,c,u,m,v,p,f;let h,y,O;let{modalId:N,detail:_}=e,{t:g}=(0,r.$G)("common"),C=(0,s.I0)(),{locate:I,locations:E}=(0,s.v9)(Z.u4),b=[{key:1,label:g("payment.project"),value:null==_?void 0:null===(o=_.asset)||void 0===o?void 0:null===(n=o.tokenizationInfo)||void 0===n?void 0:null===(l=n.assetName)||void 0===l?void 0:l[I]},{key:2,label:g("payment.project_owner"),value:null==_?void 0:null===(t=_.assetOwner)||void 0===t?void 0:t.name},{key:3,label:g("payment.phone_number"),value:null==_?void 0:null===(a=_.assetOwner)||void 0===a?void 0:a.phoneNumber},{key:4,label:g("payment.email_address"),value:null==_?void 0:null===(d=_.assetOwner)||void 0===d?void 0:d.email},{key:5,label:g("payment.contact_address"),value:(h=null==_?void 0:null===(u=_.assetOwner)||void 0===u?void 0:null===(c=u.currentAddress)||void 0===c?void 0:c.address,y=null==_?void 0:null===(v=_.assetOwner)||void 0===v?void 0:null===(m=v.currentAddress)||void 0===m?void 0:m.communeCode,O=null==_?void 0:null===(f=_.assetOwner)||void 0===f?void 0:null===(p=f.currentAddress)||void 0===p?void 0:p.provinceCode,(0,x.im)([h,null==E?void 0:E.getCommuneName(y),null==E?void 0:E.getCitiesName(O)]))}];return(0,i.jsx)(P.sm,{modalId:N,title:g("payment.contact_information"),breakPoint:768,width:480,children:(0,i.jsxs)("div",{className:"grid gap-y-8 font-medium text-sm",children:[(0,i.jsx)("p",{className:"text-purple_700 text-center",children:g("payment.support_refund")}),(0,i.jsx)("div",{className:"grid gap-[14px]",children:null==b?void 0:b.map(e=>(0,i.jsxs)("div",{className:"flex justify-between",children:[(0,i.jsx)("span",{className:"text-gray_500",children:null==e?void 0:e.label}),(0,i.jsx)("b",{className:"text-purple_700 w-[65%] text-end",children:(null==e?void 0:e.value)||"-"})]},null==e?void 0:e.key))}),(0,i.jsx)("div",{className:"grid",children:(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:()=>C(M.nT.closeModal({modalId:N})),children:(0,i.jsx)("span",{className:"typography-h5",children:g("close")})})})]})})}var U=n(80033),H=n(53133),q=n(3160),z=n(74478),V=n(82414);(o=t||(t={})).NOT="NOT",o.ERROR="ERROR",o.DONE="DONE";
1let X="modal_cancel",$="modal_owner_info";function W(e){var l,n,o,u,v,p,f,y,_,g,C,I;let{modalId:E,getTopUpTransactionList:w,paymentDetail:T}=e,{t:R}=(0,r.$G)(["profile","common"]),Z=(0,s.I0)(),{urlTx:W}=(0,L.Sz)(),{handleCancelQR:J,listError:Q,stepStatus:K,handleBuyAgain:ee,detail:el,loading:en,isOpenReportProblem:eo,setIsOpenReportProblem:et,handleAmount:ei}=function(e){var l;let{getTopUpTransactionList:n,paymentDetail:o}=e,{t:i}=(0,r.$G)("common"),u=(0,d.useRouter)(),m=(0,s.I0)(),{user:v}=(0,s.v9)(b.aF),[p,f]=(0,a.useState)(!1),[h,y]=(0,a.useState)(null),[x,N]=(0,a.useState)(!1),_=[{condition:(null==h?void 0:null===(l=h.statusHistory)||void 0===l?void 0:l.find(e=>(null==e?void 0:e.title)===(null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID)))&&(null==h?void 0:h.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.FAILED),message:i("payment.the_transfer_amount_is_less_than_amount_to_paid")},{condition:(null==h?void 0:h.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.ERROR),message:i("payment.the_amount_u_have_paid_will_be_amount")}],j=async()=>{try{N(!0);let e=await S.s4.getDetailPayment({userId:null==o?void 0:o.userId,transactionId:null==o?void 0:o.id});y(e),N(!1)}catch(e){y(null),N(!1)}};return(0,a.useEffect)(()=>{j()},[]),{handleCancelQR:()=>m(M.CF.cancelTransactionDeposit("cancelled",null==h?void 0:h.chainId,null==h?void 0:h.id,()=>{m(M.nT.resetModal()),n({page:1})})),listError:_,stepStatus:e=>{var l,n,o,a,s;let d=l=>{var n;return null==e?void 0:null===(n=e.filter(e=>null==l?void 0:l.includes(null==e?void 0:e.title)))||void 0===n?void 0:n.pop()};return[{key:1,status:d([null===k.fO||void 0===k.fO?void 0:k.fO.INITIALIZE])?"DONE":"NOT",title:i("payment.waiting_for_payment"),time:null===(l=d([null===k.fO||void 0===k.fO?void 0:k.fO.INITIALIZE]))||void 0===l?void 0:l.timeCreated,isShow:!0},{key:2,status:d([null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED])?null==t?void 0:t.ERROR:null==t?void 0:t.NOT,title:i("payment.cancel_payment_order"),time:null===(n=d([null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED]))||void 0===n?void 0:n.timeCreated,isShow:!!d([null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED])},{key:3,status:d([null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED])?null==t?void 0:t.ERROR:null==t?void 0:t.NOT,title:i("payment.payment_time_expired"),time:null===(o=d([null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED]))||void 0===o?void 0:o.timeCreated,isShow:!!d([null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED])},{key:4,status:d([null===k.fO||void 0===k.fO?void 0:k.fO.PAID,null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.OVER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.HAFT_SUCCESS])?null==t?void 0:t.DONE:d([null===k.fO||void 0===k.fO?void 0:k.fO.ERROR])?null==t?void 0:t.ERROR:null==t?void 0:t.NOT,title:i("payment.processing"),time:null===(a=d([null===k.fO||void 0===k.fO?void 0:k.fO.PAID,null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.OVER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.HAFT_SUCCESS,null===k.fO||void 0===k.fO?void 0:k.fO.ERROR]))||void 0===a?void 0:a.timeCreated,isShow:!d([null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED])&&!d([null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED])},{key:5,status:d([null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS])?"DONE":d([null===k.fO||void 0===k.fO?void 0:k.fO.FAILED])?"ERROR":"NOT",title:i("payment.transaction_successful"),time:null===(s=d([null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS,null===k.fO||void 0===k.fO?void 0:k.fO.FAILED]))||void 0===s?void 0:s.timeCreated,isShow:!d([null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED])&&!d([null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED])}]},handleBuyAgain:()=>{var e,l,n,t,a,s,d,r,p,f;let{assetType:y,orderList:x}=null!==(e=null==h?void 0:h.orderDescription)&&void 0!==e?e:{};if(y===H.C6.HYPER_ASSET&&(m(M.nT.resetModal()),u.push({pathname:c.kr.projectHyperById(null==h?void 0:null===(l=h.asset)||void 0===l?void 0:l.id),query:{tokenId:null==x?void 0:null===(n=x[0])||void 0===n?void 0:n.tokenId,tabReview:q.FJ.REVIEW,tabList:z.Z0.ALL,hyperAssetCart:JSON.stringify(null==x?void 0:x.map(e=>({[e.tokenId]:e.amount}))),transactionId:null==o?void 0:o.id}})),y===H.C6.SINGLE_ASSET&&(m(M.nT.resetModal()),u.push({pathname:c.kr.projectSingleById(null==h?void 0:null===(t=h.asset)||void 0===t?void 0:t.id),query:{quantity:null==h?void 0:null===(a=h.orderDescription)||void 0===a?void 0:a.amount,showBuyModal:!0,transactionId:null==o?void 0:o.id}})),y===H.C6.COLLECTION_ASSET){let e=null==h?void 0:null===(r=h.asset)||void 0===r?void 0:null===(d=r.collectionAsset)||void 0===d?void 0:null===(s=d.assetList)||void 0===s?void 0:s.find(e=>{var l;return(null==e?void 0:e.tokenId)===(null==x?void 0:null===(l=x[0])||void 0===l?void 0:l.tokenId)});(null==e?void 0:e.isSale)&&(null==e?void 0:e.owner)!==(null==v?void 0:v.walletAddress)?(m(M.nT.resetModal()),u.push({pathname:c.kr.projectCollectionDetailByTokenID(null==h?void 0:null===(p=h.asset)||void 0===p?void 0:p.id,null==x?void 0:null===(f=x[0])||void 0===f?void 0:f.tokenId),query:{showBuyModal:!0,transactionId:null==o?void 0:o.id}})):V.Q.showToastError(i("payment.the_product_has_not_been_listed_for_sale_by_owner"))}},detail:h,loading:x,isOpenReportProblem:p,setIsOpenReportProblem:f,handleAmount:()=>{var e,l,n,o;let{assetType:t}=null!==(e=null==h?void 0:h.orderDescription)&&void 0!==e?e:{},i=0;return t===H.C6.HYPER_ASSET&&(i=(null==h?void 0:null===(n=h.orderDescription)||void 0===n?void 0:null===(l=n.orderList)||void 0===l?void 0:l.reduce((e,l)=>e+(null==l?void 0:l.amount),0))||0),t===H.C6.SINGLE_ASSET&&(i=null==h?void 0:null===(o=h.orderDescription)||void 0===o?void 0:o.amount),(0,O.xG)(i)}}}({getTopUpTransactionList:w,paymentDetail:T}),ea=()=>{Z(M.nT.openModal({modalId:$,modalComponent:(0,i.jsx)(G,{modalId:$,detail
1:el})}))},es=[{key:1,label:R("common:payment.order_id"),value:(0,i.jsx)(j.ButtonCopy,{text:null==el?void 0:null===(l=el.qrCode)||void 0===l?void 0:l.orderId,positionIcon:"end",classNameIcon:"w-5",children:(0,x.bJ)(null==el?void 0:null===(n=el.qrCode)||void 0===n?void 0:n.orderId,5)})},{key:2,label:R("common:payment.amount_paid"),value:"".concat((0,O.xG)(null==el?void 0:el.receivedAmount)," VND")},{key:3,label:R("common:payment.bank_beneficiary"),value:null==el?void 0:null===(o=el.bankAccount)||void 0===o?void 0:o.shortName},{key:4,label:R("common:payment.account_number"),value:null==el?void 0:null===(u=el.bankAccount)||void 0===u?void 0:u.accountNumber},{key:5,label:R("common:payment.transfer_description"),value:(0,i.jsx)(j.ButtonCopy,{text:null==el?void 0:el.content,positionIcon:"end",classNameIcon:"w-5",children:(0,x.bJ)(null==el?void 0:el.content,5)})},{key:6,label:R("common:payment.project_id"),value:(0,O.xG)(null==el?void 0:null===(v=el.orderDescription)||void 0===v?void 0:v.profileId)},(null==el?void 0:null===(p=el.orderDescription)||void 0===p?void 0:p.assetType)!==H.C6.SINGLE_ASSET&&{key:7,label:R("common:payment.asset_id"),value:null==el?void 0:null===(_=el.orderDescription)||void 0===_?void 0:null===(y=_.orderList)||void 0===y?void 0:null===(f=y.map(e=>null==e?void 0:e.tokenId))||void 0===f?void 0:f.join(", ")},(null==el?void 0:null===(g=el.orderDescription)||void 0===g?void 0:g.assetType)!==H.C6.COLLECTION_ASSET&&{key:8,label:R("common:payment.product_quantity"),value:ei()},{key:9,label:R("common:payment.type_of_project"),value:(0,i.jsx)(Y,{orderDescription:null==el?void 0:el.orderDescription})},{key:10,label:R("common:payment.type_of_payment"),value:R("common:payment.direct_payment")},(null==el?void 0:el.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS)&&{key:11,label:R("common:payment.txn_hash"),value:(0,i.jsxs)("div",{className:"flex justify-end items-center",children:[(0,i.jsx)(D(),{href:W(null==el?void 0:el.chainId,null==el?void 0:el.paymentTxHash),target:"_blank",className:"text-primary hover:text-primary underline hover:underline cursor-pointer",children:(0,x.bJ)(null==el?void 0:el.paymentTxHash,5)}),(0,i.jsx)(j.ButtonCopy,{text:null==el?void 0:el.paymentTxHash,positionIcon:"end",classNameIcon:"w-5"})]})}],ed=[{condition:(null==el?void 0:el.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.INITIALIZE),component:a.Fragment,props:{children:(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",outline:!0,onClick:()=>{Z(M.nT.openModal({modalId:X,modalComponent:(0,i.jsx)(U.CancelPaymentModal,{modalId:X,onConfirm:J})}))},children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:payment.cancel_transaction")})}),(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:()=>Z(M.nT.closeModal({modalId:E})),children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:close")})})]})}},{condition:(null==el?void 0:null===(C=el.statusHistory)||void 0===C?void 0:C.find(e=>(null==e?void 0:e.title)===(null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID)))&&(null==el?void 0:el.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.FAILED),component:a.Fragment,props:{children:(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",outline:!0,onClick:ea,children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:payment.refund")})}),(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:()=>Z(M.nT.closeModal({modalId:E})),children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:close")})})]})}},{condition:(null==el?void 0:el.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.FAILED),component:a.Fragment,props:{children:(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",outline:!0,onClick:()=>Z(M.nT.closeModal({modalId:E})),children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:close")})}),(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:ee,children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:payment.retry")})})]})}},{condition:[null===k.fO||void 0===k.fO?void 0:k.fO.PAID,null===k.fO||void 0===k.fO?void 0:k.fO.OVER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID,null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED,null===k.fO||void 0===k.fO?void 0:k.fO.ERROR,null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED,null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS].includes(null==el?void 0:el.status),component:a.Fragment,props:{children:(0,i.jsx)("div",{className:"grid",children:(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:()=>Z(M.nT.closeModal({modalId:E})),children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:close")})})})}},{condition:(null==el?void 0:el.status)===(null===k.fO||void 0===k.fO?void 0:k.fO.HAFT_SUCCESS),component:a.Fragment,props:{children:(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",outline:!0,onClick:ea,children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:payment.refund")})}),(0,i.jsx)(j.BaseButton,{className:"h-10 md:h-12",onClick:ee,children:(0,i.jsx)("span",{className:"typography-h5",children:R("common:payment.continue_transaction")})})]})}}];return(0,i.jsxs)(P.sm,{modalId:E,title:R("common:payment.transaction_details"),breakPoint:768,width:480,children:[(0,i.jsx)(F.Z,{spinning:en,children:(0,i.jsxs)("div",{className:"max-h-[580px] overflow-auto custom_scrollbar_sm pr-1",children:[(0,i.jsxs)("div",{className:"text-center py-3 md:px-6 rounded-lg bg-gray_50 text-purple_700",children:[(0,i.jsx)("p",{className:"font-medium text-sm",children:R("common:payment.payment_for_an_order")}),(0,i.jsxs)("b",{className:"text-lg mt-3 block",children:[(0,O.xG)(null==el?void 0:el.amount),"Ä"]})]}),(0,i.jsxs)("div",{className:"mt-6 md:px-6 py-2 font-medium text-sm",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("p",{className:"text-gray_500",children:R("common:status")}),(0,i.jsx)("div",{className:"text-xs",children:(0,i.jsx)(A,{status:null==el?void 0:el.status})})]}),(0,i.jsx)("div",{className:"flex flex-col gap-3 mt-4",children:null===(I=K(null==el?void 0:el.statusHistory)
1)||void 0===I?void 0:I.map((e,l)=>(null==e?void 0:e.isShow)&&(0,i.jsxs)("div",{className:"flex gap-[14px] items-center justify-between relative",children:[(0,i.jsx)(m.If,{condition:e.status===t.NOT,Then:(0,i.jsx)("div",{className:"w-3 h-3 border-2 border-gray-500 rounded-full"})}),(0,i.jsx)(m.If,{condition:e.status===t.DONE,Then:(0,i.jsx)(j.IconStepSuccess,{})}),(0,i.jsx)(m.If,{condition:e.status===t.ERROR,Then:(0,i.jsx)(j.IconStepError,{})}),(0,i.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,i.jsx)("div",{className:"text-purple_700",children:null==e?void 0:e.title}),(0,i.jsx)("p",{className:"text-gray_500 text-end",children:(null==e?void 0:e.time)&&h()(null==e?void 0:e.time).format(N.Q6)})]}),(0,i.jsx)(m.If,{condition:0!==l,Then:(0,i.jsx)("div",{className:"w-3 h-[2px] absolute rotate-90 -top-[7px] ".concat((null==e?void 0:e.status)===(null==t?void 0:t.DONE)?"bg-success":"bg-gray_500")})})]},null==e?void 0:e.key))})]}),(0,i.jsx)("div",{className:"md:px-6",children:(0,i.jsx)(m.Z,{conditions:null==Q?void 0:Q.map(e=>({...e,component:a.Fragment,props:{children:(0,i.jsxs)("div",{className:"text-error bg-error_10 mt-6 p-4 rounded typography-h6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(j.IconInfoCircle,{color:"#FD504F"}),(0,i.jsx)("b",{children:R("common:payment.payment_failed")})]}),(0,i.jsx)("div",{className:"text-justify mt-1",dangerouslySetInnerHTML:{__html:null==e?void 0:e.message}})]})}}))})}),(0,i.jsx)("div",{className:"mt-6 md:px-6 py-2 font-medium flex flex-col gap-y-[14px] text-sm",children:null==es?void 0:es.map(e=>e&&(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("p",{className:"text-gray_500",children:null==e?void 0:e.label}),(0,i.jsx)("div",{className:"font-bold text-purple_700 w-[50%] line-clamp-1 text-end",children:(null==e?void 0:e.value)||"-"})]},null==e?void 0:e.key))}),(0,i.jsxs)("div",{className:"block mt-6 justify-center font-medium text-center",children:[(0,i.jsx)("span",{className:"text-sm text-gray_500 mr-1 inline",children:R("profile:deposit.problem")}),(0,i.jsx)("span",{onClick:()=>et(!0),className:"text-sm text-primary font-bold cursor-pointer underline inline-block",children:R("profile:deposit.sendRequest")})]})]})}),(0,i.jsx)("div",{className:"mt-8",children:(0,i.jsx)(m.Z,{conditions:ed})}),(0,i.jsx)(B.Z,{isOpenReportProblem:eo,setIsOpenReportProblem:et})]})}var J=n(53575);let Y=e=>{let{orderDescription:l}=e;return(null==l?void 0:l.assetType)===J.C6.HYPER_ASSET?(0,i.jsx)("b",{className:"typography-h6 text-[#A417D6]",children:"MRC1155"}):(null==l?void 0:l.assetType)===J.C6.COLLECTION_ASSET?(0,i.jsx)("b",{className:"typography-h6 text-success",children:"MRC721"}):(null==l?void 0:l.assetType)===J.C6.SINGLE_ASSET?(0,i.jsx)("b",{className:"typography-h6 text-info",children:"ERC3643"}):void 0},Q="modal_payment_detail";function K(){var e,l,n,o;let{t}=(0,r.$G)(["profile","common"]),a=(0,s.I0)(),{isMobile:d}=(0,u.d)(),{listPayment:c,loading:v,getTopUpTransactionList:f,setFilters:C,filters:I,profileIds:E}=w(),b=(e,l)=>{a(M.nT.openModal({modalId:Q,modalComponent:(0,i.jsx)(W,{modalId:Q,paymentDetail:e,getTopUpTransactionList:l})}))},S=[{key:"",label:(0,i.jsx)("span",{className:"typography-h6 text-purple_700",children:t("common:all")})},...(null==E?void 0:E.map(e=>({key:null==e?void 0:e.profileId,label:(0,i.jsx)("span",{className:"typography-h6 text-purple_700",children:null==e?void 0:e.profileId})})))||[]],T=[{title:(0,i.jsx)("span",{className:"typography-h6",children:"#"}),dataIndex:"index",align:"center",key:"index",width:"5%",render:e=>(0,i.jsx)("span",{className:"text-purple_700 typography-h6",children:e})},{title:(0,i.jsx)(_.GC,{classNameTitle:"typography-h6",title:t("common:time")}),dataIndex:"updatedAt",key:"updatedAt",width:"10%",render:e=>(0,i.jsxs)("div",{className:"text-purple_700 typography-h6",children:[(0,i.jsx)("p",{children:h()(e).format(N.lp)}),(0,i.jsx)("p",{children:h()(e).format(N.aF)})]})},{title:(0,i.jsx)(_.GC,{align:"center",classNameTitle:"typography-h6",title:t("common:payment.project_id"),filter:{value:null==I?void 0:null===(e=I.assets)||void 0===e?void 0:e[0],onSelect:e=>{C(l=>({...l,assets:e?[e]:null}))},items:S,isSearch:!0}}),dataIndex:"orderDescription",key:"orderDescription",width:"15%",align:"center",render:e=>(0,i.jsx)("div",{className:"flex justify-center typography-h6",children:(0,i.jsx)("p",{className:"text-white font-medium bg-main min-w-[20px] w-fit roun
1ded-sm px-1",children:null==e?void 0:e.profileId})})},{title:(0,i.jsx)(_.GC,{classNameTitle:"typography-h6",title:t("common:payment.order_id")}),dataIndex:"qrCode",key:"qrCode",width:"15%",render:e=>(0,i.jsx)(j.ButtonCopy,{text:null==e?void 0:e.orderId,classNameIcon:"w-5",positionIcon:"end",className:"text-purple_700 typography-h6",children:(0,x.bJ)(null==e?void 0:e.orderId,5)})},{title:(0,i.jsx)(_.GC,{classNameTitle:"typography-h6",align:"center",title:t("common:payment.amount")}),dataIndex:"amount",key:"amount",width:"15%",align:"center",render:e=>(0,i.jsxs)("div",{className:"text-purple_700 flex gap-1 typography-h6 justify-center",children:[(0,i.jsx)("span",{children:(0,O.xG)(e)}),(0,i.jsx)("span",{children:"Ä"})]})},{title:(0,i.jsx)(_.GC,{align:"left",classNameTitle:"typography-h6",title:t("common:payment.project_type"),prefix:(0,i.jsx)(_.k8,{items:[{key:2,name:J.C6.SINGLE_ASSET,color:"#3EAFFF",label:"ERC3643"},{key:3,name:J.C6.COLLECTION_ASSET,color:"#38C976",label:"MRC721"},{key:4,name:J.C6.HYPER_ASSET,color:"#A417D6",label:"MRC1155"}],filters:null==I?void 0:I.assetType,onChange:e=>{C({assetType:e})}})}),dataIndex:"orderDescription",key:"orderDescription",width:"20%",render:e=>(0,i.jsx)(Y,{orderDescription:e})},{title:(0,i.jsx)(_.GC,{classNameTitle:"typography-h6",title:t("common:payment.status"),prefix:(0,i.jsx)(_.k8,{items:[{key:1,name:null===k.fO||void 0===k.fO?void 0:k.fO.INITIALIZE,color:"#FCB121",label:t("common:payment.initialize")},{key:2,name:null===k.fO||void 0===k.fO?void 0:k.fO.PAID,color:"#3EAFFF",label:t("common:payment.full_payment")},{key:3,name:null===k.fO||void 0===k.fO?void 0:k.fO.UNDER_PAID,color:"#3EAFFF",label:t("common:payment.partial_payment")},{key:4,name:null===k.fO||void 0===k.fO?void 0:k.fO.OVER_PAID,color:"#3EAFFF",label:t("common:payment.overpayment")},{key:5,name:null===k.fO||void 0===k.fO?void 0:k.fO.HAFT_SUCCESS,color:"#0E26FF",label:t("common:payment.haft_completed")},{key:6,name:null===k.fO||void 0===k.fO?void 0:k.fO.SUCCESS,color:"#38C976",label:t("common:payment.success")},{key:7,name:null===k.fO||void 0===k.fO?void 0:k.fO.CANCELLED,color:"#6C727F",label:t("common:payment.canceled")},{key:8,name:null===k.fO||void 0===k.fO?void 0:k.fO.EXPIRED,color:"#6C727F",label:t("common:payment.expired")},{key:9,name:null===k.fO||void 0===k.fO?void 0:k.fO.ERROR,color:"#FF1515",label:t("common:payment.system_error")},{key:10,name:null===k.fO||void 0===k.fO?void 0:k.fO.FAILED,color:"#FF1515",label:t("common:payment.failure")}],filters:null==I?void 0:I.status,onChange:e=>{C({status:e})}})}),dataIndex:"status",key:"status",width:"15%",render:e=>(0,i.jsx)(A,{status:e})}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.Z,{startText:t("profile:balanceHistory.transactionList"),endText:t("profile:balanceHistory.switchNetwork"),className:"mt-8"}),(0,i.jsx)("div",{className:"mb-20 mt-4",children:(0,i.jsx)(m.If,{condition:(null==c?void 0:null===(l=c.data)||void 0===l?void 0:l.length)>0||I,Then:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"flex justify-start mb-8",children:(0,i.jsx)(j.BaseInput,{className:"max-w-[250px] w-full",classNameInput:"rounded h-8 md:h-10 text-sm",value:null==I?void 0:I.orderId,onChange:e=>C(l=>{var n;return{...l,orderId:null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.value}}),placeholder:t("common:payment.search_by_OrderID"),suffix:(0,i.jsx)("img",{src:"/icons/header/icon_search.svg",className:"w-4 h-4",alt:""})})}),(0,i.jsx)(p.Z,{className:"custom_table_profile",locale:{emptyText:(0,i.jsx)(j.EmptyComponent,{text:t("common:share_component.no_data")})},loading:v,columns:T,dataSource:null==c?void 0:null===(n=c.data)||void 0===n?void 0:n.map((e,l)=>({index:10*((null==c?void 0:c.page)-1)+l+1,...e})),pagination:{className:"custom-pagination",position:[(null===(o=window)||void 0===o?void 0:o.innerWidth)<=1200?"bottomLeft":"bottomRight"],current:null==c?void 0:c.page,total:(null==c?void 0:c.totalPage)*10,pageSize:10,onChange:e=>{f({page:e}),y.NY.scrollToTop()},responsive:!0,defaultCurrent:1},rowKey:"index",onRow:e=>({onClick:()=>{b(e,f)}}),scroll:{x:d?800:null}})]}),Else:(0,i.jsxs)("div",{className:"mt-10 md:mt-40",children:[(0,i.jsx)("img",{alt:"",src:"/icons/project/icon_tx_table_none.svg",className:"mx-auto w-[60%] md:w-auto max-w-[200px]"}),(0,i.jsx)("div",{className:"typography-h4 font-bold text-grey_100 text-center mt-6 xl:mt-10",children:t("profile:deposit.noTransaction")})]})})})]})}var ee=function(){let{t:e}=(0,r.$G)("common"),l=(0,s.I0)(),n=(0,d.useRouter)(),{isConnectWallet:o,isVerifyWallet:t,loadingVerifyWallet:a}=(0,s.v9)(b.aF),{isMobile:p}=(0,u.d)(768),f=[{condition:!t,component:v.Z,props:{className:"mt-8 md:mt-[160px]",src:p?"/img/balance-history/balance-history-small.svg":"/img/balance-history/balance-history.svg",descriptions:e("payment.please_verify_your_wallet_to_view_the_transaction"),buttonName:e("verify_wallet"),loading:a,onClick:()=>n.push(null===c.kr||void 0===c.kr?void 0:c.kr.verifyWallet)}},{condition:!o,component:v.Z,props:{className:"mt-8 md:mt-[160px]",src:p?"/img/balance-history/balance-history-small.svg":"/img/balance-history/balance-history.svg",descriptions:e("payment.please_connect_your_wallet_to_view_transaction_history"),buttonName:e("connect_wallet"),onClick:()=>l(M.Iu.setShowConnectWalletModal(!0))}}];return(0,i.jsx)(m.Z,{conditions:f,children:(0,i.jsx)(K,{})})}}}]);
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.