PageSourceSearch

https://living-corporate.com/assets/offering-welcome-TGthgkdL.js

js living-corporate.com collected 2026-10-02 05:00:24 UTC 3,953 bytes, 1 lines download raw bytes

1import{D as x,u as h,f as g,j as e,L as i,B as a,o as r}from"./index-QiiZ-xPT.js";import{N as d}from"./Navigation-r93ZBuy6.js";import{F as l}from"./Footer-3JNsJayo.js";import{C as f,b as j,c as b,a as w}from"./card-DkXabqFf.js";import{C as N}from"./circle-check-BOGFOgJv.js";import"./label-BA9Xin3m.js";import"./checkbox-CrGTwbPu.js";import"./index-DqZlRfV5.js";import"./check-KTa2Xihg.js";import"./select-B1P2Vx_w.js";import"./index-BMyKsIJE.js";import"./Combination-TP2Egp2x.js";import"./chevron-down-BWOHa16b.js";import"./dialog-D2VXyQJN.js";import"./save-BsB7cS8F.js";import"./dropdown-menu-D4zjGRmc.js";import"./index-Bj3iuRQR.js";import"./chevron-right-f4G5e4zR.js";import"./circle-2nw1jhuN.js";import"./useTranslation-XedzLvcK.js";import"./globe-3tsuvpPT.js";import"./log-out-CqAuLeet.js";import"./building-2-Bz-h5bHH.js";import"./BrandSponsor-DEW6i_On.js";import"./mail-Cr62Xklx.js";import"./twitter-BzZd48jL.js";const k={"workplace-index":{kind:"workplace_index",label:"Workplace Index"},newsletter:{kind:"naas",label:"Newsletter-as-a-Service"},portal:{kind:"learning_portal",label:"Multi-Tenant Learning Portal"}};function J(){const m=x()?.slug??"",s=k[m],n=new URLSearchParams(window.location.search).get("session_id"),{isAuthenticated:p}=h(),o=g({queryKey:["/api/offerings/me/subscriptions"],refetchInterval:4e3,enabled:p});if(!s)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(d,{}),e.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-32 text-center","data-testid":"text-unknown-offering",children:[e.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Unknown product"}),e.jsx(i,{href:"/pricing",children:e.jsx(a,{children:"Back to pricing"})})]}),e.jsx(l,{})]});const t=o.data?.subscriptions?.find(c=>c.offeringKind===s.kind&&(n?c.stripeCheckoutSessionId===n:!0)),u=t&&(t.status==="active"||t.status==="trialing");return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(d,{}),e.jsx("div",{className:"max-w-3xl mx-auto px-6 py-20",children:e.jsxs(f,{"data-testid":`card-welcome-${s.kind}`,children:[e.jsx(j,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(N,{className:"w-8 h-8 text-green-600"}),e.jsxs("div",{children:[e.jsxs(b,{"data-testid":"text-welcome-title",children:["Welcome to ",s.label]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Your payment was received. We're setting up your account now."})]})]})}),e.jsxs(w,{className:"space-y-4",children:[o.isLoading?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground","data-testid":"status-loading",children:[e.jsx(r,{className:"w-4 h-4 animate-spin"})," Loading your subscription…"]}):u?e.jsxs("div",{"data-testid":"status-provisioned",children:[e.jsxs("p",{className:"font-medium",children:["Your ",s.label," subscription is live."]}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Tier: ",e.jsx("span",{"data-testid":"text-tier-slug",children:t?.tierSlug})," · Status:"," ",e.jsx("span",{"data-testid":"text-status",children:t?.status})]})]}):t?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground","data-testid":"status-pending",children:[e.jsx(r,{className:"w-4 h-4 animate-spin"}),"Stripe is finalizing your subscription. This page will update automatically."]}):e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground","data-testid":"status-waiting",children:[e.jsx(r,{className:"w-4 h-4 animate-spin"}),"Waiting for Stripe webhook to confirm your purchase. If this persists past a minute, you can check your status anytime on the billing page."]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(i,{href:"/account/billing",children:e.jsx(a,{variant:"outline","data-testid":"link-billing",children:"Manage billing"})}),e.jsx(i,{href:"/pricing",children:e.jsx(a,{variant:"ghost","data-testid":"link-pricing",children:"Back to pricing"})})]})]})]})}),e.jsx(l,{})]})}export{J 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.