1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4175],{1618:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/purchase-success",function(){return n(5211)}])},5211:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>j});var a=n(7876),s=n(4232),r=n(9099),c=n(8230),i=n.n(c),o=n(7328),l=n.n(o),d=n(9038),u=n(3260),m=n(8193),p=n(2695),h=n(1324),x=n(5667),f=n(7543),g=n(8053);let y=new Map;function b(e){let t=y.get(e);return t||(t=fetch("/api/payments/verify-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})}).then(e=>e.json()).then(e=>(null==e?void 0:e.success)&&e.purchase?e.purchase:null).catch(()=>null),y.set(e,t)),t}async function _(e){let t=window,n=document.cookie.match(new RegExp("(?:^|; )".concat(f.S8,"=([^;]*)")));if("function"!=typeof t.gtag||!(0,f.vP)(n?n[1]:null))return;let a="ga_purchase_".concat(e);try{if(localStorage.getItem(a))return}catch(e){}try{let n=await b(e);if(!n)return;try{localStorage.setItem(a,"1")}catch(e){}t.gtag("event","purchase",{transaction_id:e,value:Number(n.amount)||0,currency:String(n.currency||"EUR").toUpperCase(),items:[{item_id:"credits_".concat(n.credits),item_name:"".concat(n.credits," credits"),quantity:1}]})}catch(e){}}let v=new Set;async function w(e){var t;let n=document.cookie.match(new RegExp("(?:^|; )".concat(f.S8,"=([^;]*)")));if((null==(t=(0,f.iF)(n?n[1]:null))?void 0:t.m)!==!0)return;let a="tt_purchase_".concat(e);if(!v.has(a)){try{if(localStorage.getItem(a))return}catch(e){}v.add(a);try{let t=await b(e);if(!t||!(0,g.sC)("CompletePayment",{value:Number(t.amount)||0,currency:String(t.currency||"EUR").toUpperCase(),content_type:"product",contents:[{content_id:"credits_".concat(t.credits),content_name:"".concat(t.credits," credits"),quantity:1,price:Number(t.amount)||0}],order_id:e,event_id:e}))return void v.delete(a);try{localStorage.setItem(a,"1")}catch(e){}}catch(e){v.delete(a)}}}function j(){let{t:e}=(0,x.o)(),{session_id:t}=(0,r.useRouter)().query,n=!t;(0,s.useEffect)(()=>{if(t){"string"==typeof t&&(_(t),w(t));let e=Date.now()+3e3,n={startVelocity:30,spread:360,ticks:60,zIndex:0,colors:["#c8f169","#fafafa","#a1a1aa"]},a=(e,t)=>Math.random()*(t-e)+e,s=setInterval(function(){let t=e-Date.now();if(t<=0)return clearInterval(s);let r=t/3e3*50;(0,h.A)({...n,particleCount:r,origin:{x:a(.1,.3),y:Math.random()-.2}}),(0,h.A)({...n,particleCount:r,origin:{x:a(.7,.9),y:Math.random()-.2}})},250)}},[t]),(0,s.useEffect)(()=>{if("string"!=typeof t)return;let e=()=>void w(t);return window.addEventListener(f.pi,e),()=>window.removeEventListener(f.pi,e)},[t]);let c=t?"string"==typeof t?t.slice(0,15)+"â¦":t:e("purchaseSuccess.loading");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l(),{children:(0,a.jsx)("title",{children:e("purchaseSuccess.seoTitle")})}),(0,a.jsx)(m.A,{}),(0,a.jsxs)("main",{className:"relative flex min-h-screen items-center justify-center overflow-hidden bg-ink pt-16 text-fg",children:[(0,a.jsx)("div",{className:"bg-grid pointer-events-none absolute inset-0 [mask-image:radial-gradient(ellipse_at_center,black_20%,transparent_70%)]"}),(0,a.jsx)("div",{className:"relative mx-auto w-full max-w-6xl px-4 py-20 sm:px-6",children:(0,a.jsxs)(u.P.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.4},className:"mx-auto max-w-md rounded-xl border border-line bg-panel p-8 sm:p-10","aria-busy":n,children:[(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-line bg-panel-2",children:(0,a.jsx)(d.CMH,{className:"text-sm text-accent"})}),(0,a.jsx)("p",{className:"mt-6 font-mono text-xs uppercase tracking-widest text-subtle",children:e("purchaseSuccess.eyebrow")}),(0,a.jsx)("h1",{className:"mt-2 text-3xl font-semibold tracking-tight",children:e("purchaseSuccess.title")}),(0,a.jsx)("p",{className:"mt-3 text-sm leading-relaxed text-muted",children:e("purchaseSuccess.desc")}),(0,a.jsxs)("div",{className:"mt-8 grid gap-2",children:[(0,a.jsxs)(i(),{href:"/create",className:"inline-flex items-center justify-center gap-2 rounded-md bg-fg px-5 py-3 text-sm font-medium text-ink transition-opacity hover:opacity-90",children:[e("purchaseSuccess.startCreating")," ",(0,a.jsx)(d.Z0P,{className:"text-[10px]"})]}),(0,a.jsx)(i(),{href:"/dashboard",className:"inline-flex items-center justify-center rounded-md border border-line px-5 py-3 text-sm text-fg transition-colors hover:bg-panel-2",children:e("purchaseSuccess.goDashboard")})]}),(0,a.jsxs)("p",{className:"mt-8 border-t border-line pt-5 text-xs text-subtle",children:[e("purchaseSuccess.transactionId"),": ",(0,a.jsx)("span",{className:"break-all font-mono text-muted",children:c})]})]})})]}),(0,a.jsx)(p.A,{})]})}}},e=>{e.O(0,[879,1324,2695,636,6593,8792],()=>e(e.s=1618)),_N_E=e.O()}]);
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.