1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6783],{6783:(e,t,a)=>{a.r(t),a.d(t,{QuickRentOrderModal:()=>C});var r=a(2964),n=a(1896),s=a(9235),d=a(528),l=a(7069),i=a(4179),o=a(705),c=a(6640),m=a(9776);let x=o.bL;o.l9;let p=o.ZL;o.bm;let u=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.hJ,{ref:t,className:(0,m.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n})});u.displayName=o.hJ.displayName;let h=n.forwardRef((e,t)=>{let{className:a,children:n,...s}=e;return(0,r.jsxs)(p,{children:[(0,r.jsx)(u,{}),(0,r.jsxs)(o.UC,{ref:t,className:(0,m.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[n,(0,r.jsxs)(o.bm,{className:"absolute right-4 top-4 roun
1ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,r.jsx)(c.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});h.displayName=o.UC.displayName;let g=e=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,m.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};g.displayName="DialogHeader";let b=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.hE,{ref:t,className:(0,m.cn)("text-lg font-semibold leading-none tracking-tight",a),...n})});b.displayName=o.hE.displayName;let y=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(o.VY,{ref:t,className:(0,m.cn)("text-sm text-muted-foreground",a),...n})});y.displayName=o.VY.displayName;var f=a(5290);function w(e){let{locale:t,waiting:a,showAlternatePayerForm:n,alternatePayerInput:s,setPayerBusy:d,setAlternatePayerInput:l,closeAlternatePayerForm:i,submitAlternatePayer:o,energyRecipientAddress:c,paymentFromAddress:m,variant:x="page",compact:p=!1}=e,u=f.Zq,h="hero"===x?"border-hero-muted/30":"border-border",g="hero"===x?"text-hero-muted/90":"text-muted-foreground",b=c?u.energyRecipient[t](c):"",y=m?u.paymentFrom[t](m):"";return a?(0,r.jsxs)("div",{className:p?"min-w-0 space-y-1.5 text-[11px]":"space-y-2 text-xs",children:[c?(0,r.jsx)("div",{className:"".concat(g," ").concat(p?"truncate":""),title:b,children:b}):null,m?(0,r.jsx)("div",{className:"".concat(g," ").concat(p?"truncate":""),title:y,children:y}):null,n?(0,r.jsxs)("div",{className:"space-y-2 rounded-lg border p-3 ".concat(h),children:[(0,r.jsx)("label",{className:"block leading-snug",children:u.alternatePayerLabel[t]}),(0,r.jsx)("input",{value:s,onChange:e=>l(e.target.value.trimStart()),placeholder:"Tâ¦",className:"w-full px-3 py-2 rounded-lg border font-mono text-xs min-w-0 ".concat("hero"===x?"bg-hero/50 border-hero-muted/30 text-hero-foreground":"border-border bg-background"),autoComplete:"off",spellCheck:!1}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:d,onClick:()=>void o(),className:"px-3 py-1.5 rounded-lg border border-primary/40 text-primary-foreground bg-primary/90 disabled:opacity-60",children:d?"â¦":u.alternatePayerSubmit[t]}),(0,r.jsx)("button",{type:"button",disabled:d,onClick:i,className:"px-3 py-1.5 rounded-lg border ".concat(h),children:u.alternatePayerBack[t]})]})]}):null]}):null}var j=a(3932),N=a(629);function v(e){let{locale:t,address:a,variant:s="page",compact:d=!1}=e,l=f.Zq,[i,o]=(0,n.useState)(!1),c="hero"===s,m=(0,n.useCallback)(()=>{let e=a.trim();e&&(async()=>{await function(e){var t;if("undefined"!=typeof navigator&&(null==(t=navigator.clipboard)?void 0:t.writeText))return navigator.clipboard.writeText(e).then(()=>!0).catch(()=>!1);try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();let a=document.execCommand("copy");return document.body.removeChild(t),Promise.resolve(a)}catch(e){return Promise.resolve(!1)}}(e)&&(o(!0),window.setTimeout(()=>o(!1),2e3))})()},[a]);return(0,r.jsxs)("div",{className:"min-w-0 space-y-1 ".concat(d?"text-xs":""),children:[(0,r.jsx)("div",{className:c?"text-hero-muted/90":"text-muted-foreground",children:l.payTo[t]}),(0,r.jsxs)("div",{className:"flex min-w-0 ".concat(d?"items-center gap-1.5":"items-start gap-2"),children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 font-mono ".concat(d?"whitespace-nowrap text-[clamp(8.5px,2.65vw,11.5px)] leading-none tracking-[-0.04em]":"break-all leading-relaxed [overflow-wrap:anywhere]"," ").concat(c?"text-hero-foreground":"text-foreground"),title:a,children:a}),(0,r.jsx)("button",{type:"button",onClick:m,disabled:!a.trim(),className:c?"shrink-0 rounded-md border border-hero-muted/40 p-1.5 text-hero-foreground hover:bg-hero-muted/25 focus:outline-none focus:ring-2 focus:ring-primary/40":"shrink-0 rounded-md border border-border p-1.5 text-foreground hover:bg-muted/80 focus:outline-none focus:ring-2 focus:ring-primary/40","aria-label":l.copyPayAddress[t],title:i?l.copiedPayAddress[t]:l.copyPayAddress[t],children:i?(0,r.jsx)(j.A,{className:"h-4 w-4 text-emerald-500","aria-hidden":!0}):(0,r.jsx)(N.A,{className:"h-4 w-4","aria-hidden":!0})})]})]})}var P=a(3699);let k=(0,P.I3)({en:{paymentTitle:"TRX payment",openPayment:"Open payment",scanToPay:"Scan to pay"},ru:{paymentTitle:"ÐплаÑа в TRX",openPayment:"ÐÑкÑÑÑÑ Ð¾Ð¿Ð»Ð°ÑÑ",scanToPay:"СканиÑÑйÑе Ð´Ð»Ñ Ð¾Ð¿Ð»Ð°ÑÑ"},zh:{paymentTitle:"TRX 仿¬¾",openPayment:"æå¼ä»æ¬¾",scanToPay:"æ«ç 仿¬¾"}}),A=(0,P.I3)({en:{pending_payment:"Pending payment",paid:"Paid",delegating:"Sending energy",delegated:"Energy delivered",cancelled:"Cancelled",expired:"Expired",failed:"Failed"},ru:{pending_payment:"ÐÐ¶Ð¸Ð´Ð°ÐµÑ Ð¾Ð¿Ð»Ð°ÑÑ",paid:"ÐплаÑен",delegating:"ÐÑпÑавлÑем ÑнеÑгиÑ",delegated:"ÐнеÑÐ³Ð¸Ñ Ð´Ð¾ÑÑавлена",cancelled:"ÐÑменÑн",expired:"ÐÑÑÑк",failed:"ÐÑибка"},zh:{pending_payment:"çå¾
仿¬¾",paid:"已仿¬¾",delegating:"æ£å¨åéè½é",delegated:"è½éå·²å°è´¦",cancelled:"已忶",expired:"å·²è¿æ",failed:"失败"}});function C(e){var t,a,o,c,m,p;let{locale:u,flow:j,launcherVariant:N="page"}
1=e,P=f.Zq,[C,_]=(0,n.useState)(!1),T=(0,n.useRef)(null),R=null!=(m=null==(t=j.order)?void 0:t.id)?m:null;if((0,n.useEffect)(()=>{R&&T.current!==R&&(T.current=R,_(!0))},[R]),!j.order)return null;let F=j.order,q=k[u],z=(p=F.id).length<=18?p:"".concat(p.slice(0,8),"â¦").concat(p.slice(-6)),E=function(e,t){let a=e.trim().toLowerCase();return A[t][a]||a.replaceAll("_"," ")}(j.effectiveStatus,u);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>_(!0),className:"group flex w-full items-center justify-between gap-3 rounded-xl border px-3.5 py-3 text-left text-sm transition-colors ".concat("hero"===N?"border-hero-muted/30 bg-hero/50 text-hero-foreground hover:bg-hero-muted/15":"border-border bg-muted/40 text-foreground hover:bg-muted/70"),title:P.orderLine[u](F.id),children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-2 font-medium",children:[(0,r.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-primary/15 text-primary",children:(0,r.jsx)(s.A,{className:"h-3.5 w-3.5","aria-hidden":!0})}),q.openPayment]}),(0,r.jsxs)("span",{className:"truncate font-mono text-xs opacity-65",children:["#",z]})]}),(0,r.jsx)(x,{open:C,onOpenChange:_,children:(0,r.jsxs)(h,{className:"z-[100] max-h-[calc(100dvh-1rem)] w-[calc(100%-1rem)] max-w-[400px] gap-0 overflow-x-hidden overflow-y-auto rounded-[24px] border border-white/10 bg-[#0a0c16] p-0 text-white shadow-[0_28px_100px_rgba(0,0,0,0.72)]",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-primary/80 to-transparent"}),(0,r.jsxs)(g,{className:"min-w-0 border-b border-white/10 bg-gradient-to-br from-white/[0.07] to-transparent px-4 py-3 pr-11 text-left",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-primary/15 text-primary ring-1 ring-primary/25",children:(0,r.jsx)(s.A,{className:"h-4.5 w-4.5","aria-hidden":!0})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)(b,{className:"text-base font-semibold leading-tight text-white",children:q.paymentTitle}),(0,r.jsxs)("div",{className:"mt-1 truncate font-mono text-[11px] text-white/45",title:F.id,children:["#",z]})]})]}),(0,r.jsxs)(y,{className:"mt-2 inline-flex w-fit items-center gap-1.5 rounded-full border px-2.5 py-1 text-[11px] font-medium ".concat(j.waiting?"border-amber-400/20 bg-amber-400/10 text-amber-200":"border-emerald-400/20 bg-emerald-400/10 text-emerald-200"),"aria-live":"polite",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full ".concat(j.waiting?"bg-amber-300":"bg-emerald-300"),"aria-hidden":!0}),E]})]}),(0,r.jsxs)("div",{className:"min-w-0 space-y-2 px-4 py-3",children:[(0,r.jsx)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.035] p-3",children:(0,r.jsx)(v,{locale:u,address:(null==(a=j.status)?void 0:a.pay_address)||F.pay_address,variant:"hero",compact:!0})}),j.waiting&&j.qrPayload?(0,r.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(104px,126px)] items-stretch gap-2 rounded-2xl border border-white/10 bg-white/[0.035] p-2.5",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"mb-1.5 text-center text-[11px] font-medium text-white/55",children:q.scanToPay}),(0,r.jsx)("img",{src:"https://quickchart.io/qr?size=360&text=".concat(encodeURIComponent(j.qrPayload)),alt:q.scanToPay,className:"mx-auto aspect-square w-full max-w-[176px] rounded-xl bg-white p-2 shadow-[0_10px_30px_rgba(0,0,0,0.28)]"})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col items-center justify-center rounded-xl border border-white/10 bg-black/20 px-2 py-3 text-center",children:[(0,r.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-white/45",children:P.amount[u]}),(0,r.jsx)("div",{className:"mt-1 text-base font-semibold leading-tight tabular-nums text-white",children:(null==(o=j.status)?void 0:o.expected_amount_trx)||F.amount_trx}),(0,r.jsx)("span",{className:"mt-1.5 rounded-lg bg-primary/15 px-2 py-1 text-[11px] font-bold tracking-wide text-primary ring-1 ring-primary/25",children:"TRX"})]})]}):(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-2xl border border-white/10 bg-white/[0.035] px-3 py-2.5",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-[10px] uppercase tracking-[0.12em] text-white/45",children:P.amount[u]}),(0,r.jsxs)("div",{className:"mt-0.5 text-base font-semibold tabular-nums text-white",children:[(null==(c=j.status)?void 0:c.expected_amount_trx)||F.amount_trx," TRX"]})]}),(0,r.jsx)("span",{className:"rounded-lg bg-primary/15 px-2 py-1 text-[11px] font-bold tracking-wide text-primary ring-1 ring-primary/25",children:"TRX"})]}),j.error?(0,r.jsx)("p",{className:"rounded-xl border border-red-400/20 bg-red-400/10 px-3 py-2 text-xs leading-snug text-red-200",children:j.error}):null,j.alternatePayerMessage?(0,r.jsx)("p",{className:"rounded-xl border border-emerald-400/20 bg-emerald-400/10 px-3 py-2 text-xs leading-snug text-emerald-200",children:j.alternatePayerMessage}):null,j.waiting?(0,r.jsx)("div",{className:"rounded-2xl border border-white/10 bg-white/[0.025] px-3 py-2.5",children:(0,r.jsx)(w,{locale:u,waiting:j.waiting,showAlternatePayerForm:j.showAlternatePayerForm,alternatePayerInput:j.alternatePayerInput,setPayerBusy:j.setPayerBusy,setAlternatePayerInput:j.setAlternatePayerInput,closeAlternatePayerForm:j.closeAlternatePayerForm,submitAlternatePayer:j.submitAlternatePayer,energyRecipientAddress:j.energyRecipientAddress,paymentFromAddress:j.paymentFromAddress,variant:"hero",compact:!0})}):null,j.waiting&&j.qrPayload?(0,r.jsx)("p",{className:"text-[10px] leading-snug text-white/40",children:P.payerQrPaymentHint[u]}):null,(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-0.5",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>void j.refreshStatus(),className:"inline-flex items-center justify-center gap-2 rounded-xl border border-white/10 bg-white/[0.05] px-2.5 py-2 text-xs font-medium text-white transition-colors hover:bg-white/[0.09] disabled:opacity-50",disabled:j.refreshBusy,children:[(0,r.jsx)(d.A,{className:"h-4 w-4 ".concat(j.refreshBusy?"animate-spin":""),"aria-hidden":!0}),P.refresh[u]]}),j.waiting?(0,r.jsxs)("button",{type:"button",onClick:()=>void j.cancelOrder(),className:"inline-flex items-center justify-center gap-2 rounded-xl border border-red-400/20 bg-red-400/[0.07] px-2.5 py-2 text-xs font-medium text-red-200 transition-colors hover:bg-red-400/[0.12] disabled:opacity-50",disabled:j.cancelBusy,children:[(0,r.jsx)(l.A,{className:"h-4 w-4","aria-hidden":!0}),P.cancel[u]]}):null,j.waiting&&!j.showAlternatePayerForm?(0,r.jsxs)("button",{type:"button",onClick:j.openAlternatePayerForm,className:"col-span-2 inline-flex items-center justify-center gap-2 rounded-xl border border-emerald-400/20 bg-emerald-400/[0.07] px-2.5 py-2 text-xs font-medium text-emerald-200 transition-colors hover:bg-emerald-400/[0.12]",children:[(0,r.jsx)(i.A,{className:"h-4 w-4","aria-hidden":!0}),P.payFromOtherWallet[u]]}):null]})]})]})})]})}},9776:(e,t,a)=>{a.d(t,{cn:()=>s});var r=a(8915),n=a(3612);function s(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,n.QP)((0,r.$)(t))}}}]);
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.