1import{_ as N}from"./jiNKUcgx.js";import V from"./DFygfSMa.js";import{_ as $}from"./D_Yl9mz2.js";import{d as G,X as M,s as L,x as U,v as j,a5 as q,B as d,S as p,A as i,ah as f,f as D,o as x,g as o,k as y,m as Q,h as X,i as g,p as v,G as l,E as Y,L as z}from"#entry";import{u as H}from"./B9ooX_qY.js";import{u as J}from"./CgFWkk1q.js";import{useYunoEvents as K}from"./BWtEfKRp.js";import{u as O}from"./Dwb3cLGQ.js";import"./DLNpcykF.js";import"./FC47SwYL.js";import"./BR-Dffm0.js";import"./DY3Yz_TZ.js";const W={class:"container py-12"},Z={class:"flex flex-col gap-6 items-center"},ee={class:"flex flex-col gap-4 text-center"},fe=G({__name:"processing",setup(te){const{$toast:_,$yuno:w}=M(),h=L(),b=z(),{processInvoice:k,postActionReturnUrl:C}=H(),{stopFunnel:I}=J(),{sendEvent:n}=U(),{me:S}=j(),{on:r}=K(),{waitForPaymentApplied:T}=O(),m=h.query.status,P=C.value??"/profile/balance",A=q(),s=d(!1),c=d(!1);m||p("/");const a=()=>{p(P),window.scrollTo(0,0)},E=async()=>{w.init({paymentSelector:"payment-form",domain:b.public.subslab.domain,sessionInQueryParam:!1,statusId:m})};r("paymentSuccess",async t=>{if(n(i.TransactionSuccess,{invoice_id:t.invoice_id}),I(),t.invoice_id)try{await k(parseInt(t.invoice_id)),await S(),setTimeout(()=>a(),500)}catch{_.error("Something went wrong.")}else A.log("no invoice id to process"),n(i.TransactionDataError,{text:f.MissingInvoiceId}),await T({attempts:5,delay:1500})?setTimeout(()=>a(),500):(n(i.TransactionFailedScreenShown,{text:f.MissingInvoiceId}),c.value=!0);s.value=!0});const u=()=>{c.value=!1,a()};return r("paymentFailed",t=>{s.value=!0,n(i.TransactionFailedScreenShown,{text:t?.status??t?.message??null})}),r("paymentCancelled",()=>{s.value=!0}),E(),(t,e)=>{const F=N,B=V,R=$;return x(),D("div",W,[o("div",Z,[e[1]||(e[1]=o("div",{id:"payment-form"},null,-1)),g(s)?(x(),Q(F,{key:0,onClick:Y(a,["prevent"]),class:"flex items-center py-4 px-20 my-4 bg-fm-gradient hover:bg-fm-gradient-active text-center justify-center rounded-xl !text-white text-xl max-md:text-xl max-md:w-full max-w-[430px]"},{default:v(()=>[...e[0]||(e[0]=[l(" Go back ",-1)])]),_:1})):X("",!0)]),y(R,{"is-visible":g(c),"close-btn":!1,onClose:u},{default:v(()=>[o("div",ee,[y(B,{name:"fm:warning",class:"text-4xl mx-auto text-ds-red-500","aria-hidden":"true"}),e[2]||(e[2]=o("h4",{class:"text-xl font-semibold"},"Payment not confirmed",-1)),e[3]||(e[3]=o("p",{class:"text-ds-gray-700 dark:text-gray-300"},[l(" Something went wrong and we couldn't confirm your payment. If you were charged, reach out to "),o("a",{href:"mailto:[email protected]",class:"text-primary font-semibold"},"[email protected]"),l(" and we'll take care of it. ")],-1)),o("button",{onClick:u,class:"w-full py-3 rounded-lg bg-fm-gradient hover:bg-fm-gradient-active !text-white font-semibold"}," Got it ")])]),_:1},8,["is-visible"])])}}});export{fe as default};
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.