1import{a as k,q as S,s as I,v as A,o as N,x as C,r as b,F as O,c as T,d as q,g as v,f,h as e,i as m,l as g,k as h,y as P,z as E,e as x,A as F}from"./CFxGRstO.js";import{_ as B}from"./6HuN2jx9.js";import"./Bnx8nLGV.js";import{u as V}from"./DKVv9OHQ.js";import{O as Y}from"./CICNJ14-.js";import"./DzpbyIkv.js";import"./CdviQ7zO.js";import"./C16c000V.js";function D(p,y){const s=k(),l=S(),d=I(),r=Number(s.query.order_id)||Number(s.query["x-order-id"]);r||A("/");const c=s.query.email||s.query["billing-email"],t=b(!1),i=b(!1);let a=!1,u=null,n=null;function w(){a=!0,u&&(clearTimeout(u),u=null),n&&(n.abort(),n=null)}async function _(){if(!a){n=new AbortController;try{const o=await $fetch("/api/account/check-order",{method:"POST",body:{orderId:r,email:c},signal:n.signal});if(o.status===Y.PAID){w(),y?.(),o.user_hash?(await d.signInByHash(o.user_hash),l.push(p)):d.isSignedIn?l.push(p):i.value=!0;return}}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return;throw w(),o instanceof O&&o.statusCode===404?T({statusCode:404}):o}finally{n=null}u=setTimeout(_,1e3)}}return N(()=>{_(),setTimeout(()=>{w(),t.value=!0},1e3*60*2)}),C(()=>{w()}),{orderId:r,paymentFailed:t,paymentSucceededAndNotSignedIn:i}}const W={key:0},H={class:"container tw-py-12 tw-my-6"},M={class:"xl:tw-w-9/12 tw-mx-auto tw-text-center"},R={class:"tw-text-display-5 !tw-leading-none !tw-font-bold !tw-text-yellow tw-mb-6"},$={class:"tw-text-center tw-text-fs-5"},z={key:1},L={class:"container tw-py-12 tw-my-6"},U={class:"md:tw-w-11/12 lg:tw-w-8/12 xl:tw-w-7/12 xxl:tw-w-6/12 tw-mx-auto tw-text-center"},j={class:"tw-text-center tw-text-fs-sm"},G={key:2},J={class:"container tw-py-12 tw-my-6"},K={class:"xl:tw-w-9/12 tw-mx-auto tw-text-center"},Q={class:"tw-text-display-5 !tw-leading-none !tw-font-bold !tw-text-yellow tw-mb-6"},it=q({__name:"thank-you",setup(p){const{markOrderForSurvey:y,openSurveyIfAvailable:s}=V(),{paymentSucceededAndNotSignedIn:l,paymentFailed:d,orderId:r}=D("/account/orders",()=>{const c=E("hide-offer-modal");c.value="1"});return y(r),s(),(c,t)=>{const i=F,a=B;return v(l)?(x(),f("div",W,[e("div",H,[e("div",null,[e("div",M,[e("h1",R,[m(i,{text:"Success! Your payment has been completed"})]),e("div",$,[m(a,{to:"/user/sign-in"},{default:g(()=>[...t[0]||(t[0]=[h("Sign In",-1)])]),_:1}),t[1]||(t[1]=h(" to your account to check the details. ",-1))])])])])])):v(d)?(x(),f("div",z,[e("div",L,[e("div",null,[e("div",U,[t[4]||(t[4]=e("h1",{class:"tw-text-h4 !tw-leading-none !tw-font-bold !tw-text-yellow !tw-mb-6"}," Your order is being processed ",-1)),e("div",j,[t[3]||(t[3]=P('<p class="tw-mb-4"> Your payment is currently being verified by the payment provider. This process may take some time. Once the payment is confirmed, your access will be issued automatically. </p><div class="tw-border tw-border-solid !tw-border-yellow tw-px-4 tw-py-2 tw-mb-4"><h2 class="tw-text-fs-sm tw-font-bold tw-my-4 tw-leading-[1.2]"> What can you do right now? </h2><ol class="tw-text-start tw-list-inside tw-text-fs-sm tw-grid tw-gap-y-4 tw-pl-4 tw-mb-4"><li><b>Wait 10-15 minutes</b> and check your reWASD account. If the payment has been confirmed by provider, your purchase will appear in your account automatically.</li><li>Check your <b>email inbox</b> (including the Spam folder) in case the payment provider requires additional information or verification.</li></ol></div><p class="tw-mb-12"> If there is no update within 24 hours, please contact our support team. </p>',3)),m(a,{to:"/user/sign-in",class:"btn btn-md btn-default sm:tw-w-7/12"},{default:g(()=>[...t[2]||(t[2]=[h(" Proceed to Sign In ",-1)])]),_:1})])])])])])):(x(),f("div",G,[e("div",J,[e("div",null,[e("div",K,[e("h1",Q,[m(i,{text:"Your payment is being processed"})]),t[5]||(t[5]=e("div",{class:"tw-text-center tw-text-fs-5"}," Please do not close or refresh this tab until it's done. ",-1))])])])]))}}});
1export{it 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.