PageSourceSearch

https://no-db-webform.lovable.app/assets/ThankYou-QE8da9c5.js

js no-db-webform.lovable.app collected 2026-10-03 03:34:23 UTC 36,278 bytes, 223 lines download raw bytes

1import{c as B,e as Y,r as s,j as e,B as U,s as R,a as F}from"./index-DrMCWrbp.js";import"./label-B2wL2NH-.js";import"./select-mlKLkZCa.js";import"./dialog-DsntTtE8.js";import{u as V}from"./useScrollToTop-BqoJz36k.js";import{Q as z}from"./QuoteExpectationCard-BWeKPgf3.js";import{B as P}from"./badge-CiFEvAaP.js";import{S as M}from"./sparkles-B9BbDogJ.js";import{M as L}from"./mail-DpSbvhN1.js";import{C as E}from"./circle-check-ACcF67Hv.js";import{L as q}from"./loader-circle-Dh4c0S9B.js";import{A as O}from"./arrow-right-BKs0LXaU.js";import{C as D}from"./clock-BdEVl3f_.js";import{S as G}from"./shield-07gCWMs6.js";import{T as J}from"./target-ph-rfhI2.js";import{S as X}from"./scale-BknccklH.js";import{S as H}from"./shield-check-DH_gaVPZ.js";import{H as K}from"./headset-51UpIOxq.js";import"./index-BdQq_4o_.js";import"./index-C28efFoy.js";import"./Combination-D_r_gRnv.js";import"./index-CzR1DcrQ.js";import"./chevron-down-CjRhCoZ_.js";import"./check-C7lqRlsb.js";import"./zap-ABN9i-eB.js";import"./chart-column-hg9P-LIV.js";import"./users-DNjXsAZ-.js";import"./pencil-BlZf2Nce.js";import"./phone-DhUDYJNo.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Z=B("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ee=B("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]),te=[{id:1,label:"Processing quote",icon:"⚡"},{id:2,label:"Generating pricing",icon:"💰"},{id:3,label:"Preparing email",icon:"📧"},{id:4,label:"Sending to inbox",icon:"✉️"}];function ae({email:p,quoteNumber:i,vehicleRegistration:b,vehicleMake:t,vehicleModel:S,vehicleYear:m,firstName:j,isPolling:y,emailSent:o,form3SubmissionId:u}){const c=Y(),[x,k]=s.useState(1),[N,C]=s.useState(!1),[h,r]=s.useState(5),[n,l]=s.useState(!1),w=s.useRef(!1),_=o&&!!u&&!n,I=()=>{w.current||!u||(w.current=!0,c(`/form4-lite?form3Id=${u}`))};s.useEffect(()=>{if(!_)return;r(5);const d=setInterval(()=>{r(a=>a<=1?(clearInterval(d),I(),0):a-1)},1e3);return()=>clearInterval(d)},[_]);const g=d=>{const[a,f]=d.split("@");return f?`${a.length>2?`${a.slice(0,2)}${"*".repeat(Math.min(a.length-2,5))}`:a}@${f}`:d};return s.useEffect(()=>{if(!y)return;const d=[2e3,2500,2e3,1500];let a;const f=v=>{v>4||o||(k(v),a=setTimeout(()=>f(v+1),d[v-1]))};return f(1),()=>clearTimeout(a)},[y,o]),s.useEffect(()=>{o&&(k(4),setTimeout(()=>C(!0),300))},[o]),e.jsxs("div",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-green-50 via-emerald-50 to-teal-50 rounded-xl"}),N&&e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:[...Array(20)].map((d,a)=>e.jsx("div",{className:"absolute animate-[confetti_3s_ease-out_forwards]",style:{left:`${Math.random()*100}%`,top:"-20px",animationDelay:`${Math.random()*.5}s`},children:e.jsx(M,{className:"text-primary",size:12+Math.random()*8,style:{opacity:.7+Math.random()*.3,transform:`rotate(${Math.random()*360}deg)`}})},a))}),e.jsxs("div",{className:"relative z-10 p-6 sm:p-8 space-y-6",children:[e.jsx("div",{className:"flex justify-center",children:e.jsxs(P,{className:"bg-gradient-to-r from-green-500 to-emerald-500 text-white border-0 px-4 py-1.5 text-sm font-semibold shadow-lg animate-scale-in",children:[e.jsx(M,{className:"w-4 h-4 mr-2"}),"Instant Quote Activated"]})}),e.jsx("div",{className:"flex justify-center",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`absolute inset-0 rounded-full transition-all duration-700 ${o?"bg-green-400/30 animate-ping":"bg-primary/20 animate-pulse"}`}),e.jsx("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 rounded-full flex items-center justify-center transition-all duration-500 ${o?"bg-gradient-to-br from-green-500 to-emerald-600 shadow-xl shadow-green-500/30":"bg-gradient-to-br from-primary to-primary/80 shadow-lg"}`,children:y&&!o?e.jsx(L,{className:"w-12 h-12 sm:w-14 sm:h-14 text-white animate-bounce"}):e.jsx(E,{className:"w-12 h-12 sm:w-14 sm:h-14 text-white animate-scale-in"})}),o&&e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"absolute -top-2 -right-2 w-6 h-6 text-yellow-400 animate-pulse"}),e.jsx(M,{className:"absolute -bottom-1 -left-3 w-5 h-5 text-yellow-400 animate-pulse",style:{animationDelay:"0.2s"}})]})]})}),e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold text-foreground",children:o?"Your quote has been sent!":"Preparing your instant quote..."}),e.jsx("p",{className:"text-muted-foreground text-base sm:text-lg",children:o?`Check your inbox, ${j}!`:"This will only take a moment"})]}),e.jsx("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-4 sm:p-5 shadow-sm border border-green-100",children:e.jsx("div",{className:"grid grid-cols-4 gap-2",children:te.map(d=>e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("div",{className:`
12                  w-10 h-10 sm:w-12 sm:h-12 rounded-full flex items-center justify-center text-lg sm:text-xl
13                  transition-all duration-500
14                  ${d.id<x||d.id===x&&o?"bg-green-500 text-white scale-100":d.id===x?"bg-primary text-white animate-pulse scale-110":"bg-gray-100 text-gray-400 scale-90"}
15                `,children:d.id<x||d.id===x&&o?e.jsx(E,{className:"w-5 h-5 sm:w-6 sm:h-6"}):d.id===x&&!o?e.jsx(q,{className:"w-5 h-5 sm:w-6 sm:h-6 animate-spin"}):d.icon}),e.jsx("span",{className:`text-[10px] sm:text-xs text-center font-medium transition-colors duration-300 ${d.id<=x?"text-foreground":"text-muted-foreground"}`,children:d.label})]},d.id))})}),e.jsx("div",{className:"bg-white/90 backdrop-blur-sm rounded-xl p-4 sm:p-5 border border-green-100 shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(L,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Sending to"}),e.jsx("p",{className:"font-semibold text-foreground",children:g(p)})]})]})}),i&&o&&e.jsx("div",{className:"bg-gradient-to-r from-primary/10 to-secondary/10 rounded-xl p-4 border border-primary/20 animate-fade-in",children:e.jsxs("div",{className:"flex items-center justify-center gap-3",children:[e.jsx("span",{className:"text-2xl",children:"🎫"}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Quote Reference"}),e.jsx("p",{className:"text-xl font-bold text-primary",children:i})]})]})}),e.jsx("div",{className:"bg-white/80 backdrop-blur-sm rounded-xl p-4 border border-green-100",children:e.jsxs("div",{className:"flex items-center justify-center gap-4 text-sm",children:[e.jsx(P,{variant:"outline",className:"bg-white",children:b}),e.jsxs("span",{className:"text-muted-foreground",children:[t," ",S," ",m&&`(${m})`]})]})}),o&&u&&e.jsxs("div",{className:"bg-gradient-to-r from-primary/10 to-emerald-100 border-2 border-primary/30 rounded-xl p-5 sm:p-6 text-center space-y-3 animate-fade-in shadow-md",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-foreground",children:"Skip the wait — continue to checkout"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your quote is ready now. Review and secure your cover in under a minute."}),e.jsxs(U,{onClick:I,size:"lg",className:"w-full sm:w-auto bg-primary hover:bg-primary/90 text-primary-foreground font-semibold shadow-lg",children:["Continue to checkout",e.jsx(O,{className:"ml-2 w-5 h-5"})]}),n?e.jsx("p",{className:"text-xs text-muted-foreground",children:"Auto-redirect cancelled. Click the button above when you're ready."}):e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Redirecting automatically in ",h,"s…"," ",e.jsx("button",{type:"button",onClick:()=>l(!0),className:"text-primary hover:underline font-medium",children:"Stay on this page"})]})]}),o&&!u&&e.jsxs("div",{className:"text-center space-y-2 animate-fade-in",children:[e.jsxs("p",{className:"text-sm text-muted-foreground flex items-center justify-center gap-2",children:[e.jsx(D,{className:"w-4 h-4"}),"Quote should arrive within 1-2 minutes"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Didn't receive it? Check your spam folder or"," ",e.jsx("a",{href:"tel:1300090555",className:"text-primary hover:underline font-medium",children:"contact us"})]})]}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground bg-white/80 px-3 py-1.5 rounded-full",children:[e.jsx(G,{className:"w-3.5 h-3.5 text-green-500"}),e.jsx("span",{children:"Secure & Encrypted"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground bg-white/80 px-3 py-1.5 rounded-full",children:[e.jsx(E,{className:"w-3.5 h-3.5 text-green-500"}),e.jsx("span",{children:"No Spam, Ever"})]})]})]}),e.jsx("style",{children:`
16        @keyframes confetti {
17          0% {
18            transform: translateY(0) rotate(0deg);
19            opacity: 1;
20          }
21          100% {
22            transform: translateY(400px) rotate(720deg);
23            opacity: 0;
24          }
25        }
26      `})]})}const $=[{Icon:Z,title:"Going over your details",body:"Checking what you submitted so we quote on accurate information.",tag:null},{Icon:J,title:"Finding the right cover for you",body:"Pairing your needs with the right cover types and inclusions.",tag:null},{Icon:ee,title:"Shopping the market for you",body:"Reaching out across our insurer panel for live pricing.",tag:null},{Icon:X,title:"Comparing your options",body:"Lining up premiums, excesses and inclusions side by side.",tag:null},{Icon:H,title:"Locking in your best price",body:"Found a genuine quote that's cheaper? Bring it to us and we'll beat it.",tag:"Price Beat Guarantee"},{Icon:K,title:"Lining up your support team",body:"Real people ready to negotiate with insurers and stand beside you at claim time.",tag:null}],Q=[15,32,50,68,84,95],se=p=>`${Math.floor(p/60)}:${(p%60).toString().padStart(2,"0")}`,re=({vehicleRegistration:p,vehicleMake:i,vehicleModel:b,vehicleYear:t,firstName:S,quoteNumber:m,coverType:j,email:y})=>{const[o,u]=s.useState(0),[c,x]=s.useState(0);s.useEffect(()=>{const n=setInterval(()=>{u(l=>l>=$.length-1?(clearInterval(n),l):l+1)},4500);return()=>clearInterval(n)},[]),s.useEffect(()=>{const n=setInterval(()=>
26x(l=>l+1),1e3);return()=>clearInterval(n)},[]);const k=s.useMemo(()=>[t,i,b].filter(Boolean).join(" ").trim()||p||"Your vehicle",[i,b,t,p]);s.useEffect(()=>{const n="birdeye-revz-loader";if(!document.getElementById(n)){const l=document.createElement("script");l.id=n,l.type="text/javascript",l.async=!0,l.src="https://getbirdeye.com.au/embed/v7/169994241801236/10/9876543213010151831216912",document.head.appendChild(l)}},[]);const N=Q[Math.min(o,Q.length-1)],C=s.useMemo(()=>Array.from({length:12},(n,l)=>l),[]),[h,r]=s.useState(0);return s.useEffect(()=>{const n=setInterval(()=>r(l=>(l+1)%12),200);return()=>clearInterval(n)},[]),e.jsxs("div",{className:"nc-loader",children:[e.jsx("style",{children:`
27        .nc-loader {
28          --orange:#e8601c; --orange-deep:#c94f12; --orange-tint:#fff4ee;
29          --navy:#1b2d45; --navy-soft:#5a6a80;
30          --green:#1f9d57; --green-tint:#eafaf0;
31          --line:#eef0f3;
32          font-family:'Plus Jakarta Sans','Inter',system-ui,sans-serif;
33          color:var(--navy);
34          background:#fff;
35          border-radius:24px;
36          box-shadow:0 30px 70px -25px rgba(27,45,69,.25);
37          overflow:hidden;
38        }
39        .nc-loader .head { padding:24px 24px 4px; text-align:center; }
40        .nc-loader .eyebrow-row {
41          display:flex; align-items:center; justify-content:space-between;
42          gap:10px; margin-bottom:10px;
43        }
44        .nc-loader .eyebrow {
45          font-family:'Barlow Condensed','Plus Jakarta Sans',sans-serif;
46          font-weight:600; text-transform:uppercase; letter-spacing:.18em;
47          font-size:12.5px; color:var(--orange);
48          display:inline-flex; align-items:center; gap:7px;
49        }
50        .nc-loader .timer {
51          font-family:'Barlow Condensed','Plus Jakarta Sans',sans-serif;
52          font-weight:600; font-size:12px; letter-spacing:.06em;
53          color:var(--navy-soft);
54          background:#fafbfc; border:1px solid var(--line);
55          padding:2px 9px; border-radius:999px;
56          font-variant-numeric: tabular-nums;
57        }
58        .nc-loader .eyebrow .dot {
59          width:7px;height:7px;border-radius:50%;background:var(--orange);
60          animation: nc-blink 1.4s ease-in-out infinite;
61        }
62        @keyframes nc-blink { 0%,100%{opacity:1} 50%{opacity:.25} }
63        .nc-loader h2.nc-h {
64          font-family:'Poppins','Plus Jakarta Sans',sans-serif; font-weight:700;
65          font-size:22px; line-height:1.2; letter-spacing:-.4px; color:var(--navy);
66        }
67        .nc-loader h2.nc-h em { font-style:normal; color:var(--orange); }
68        .nc-loader .ref {
69          margin-top:10px; font-size:13px; color:var(--navy-soft);
70          display:flex; align-items:center; justify-content:center;
71          gap:8px; flex-wrap:wrap;
72        }
73        .nc-loader .ref b { color:var(--navy); font-weight:600; }
74        .nc-loader .ref .pill {
75          background:var(--orange-tint); color:var(--orange-deep);
76          font-weight:700; font-size:12px; padding:3px 9px; border-radius:999px;
77        }
78        .nc-loader .ref .sep { width:4px;height:4px;border-radius:50%;background:#d9dde3; }
79
80        .nc-loader .scanner-wrap { padding:22px 24px 6px; display:flex; justify-content:center; }
81        .nc-loader .scanner { position:relative; width:158px; height:158px; }
82        .nc-loader .scanner .track { position:absolute; inset:0; border-radius:50%; border:2px solid var(--line); }
83        .nc-loader .scanner .sweep {
84          position:absolute; inset:0; border-radius:50%;
85          background: conic-gradient(from 0deg,
86            rgba(232,96,28,0) 0deg,
87            rgba(232,96,28,0) 250deg,
88            rgba(232,96,28,.14) 320deg,
89            rgba(232,96,28,.55) 358deg,
90            rgba(232,96,28,0) 360deg);
91          animation: nc-spin 2.4s linear infinite;
92        }
93        @keyframes nc-spin { to { transform: rotate(360deg); } }
94        .nc-loader .scanner .ndot {
95          position:absolute; width:9px; height:9px; border-radius:50%;
96          background:#dfe3e9; transform:translate(-50%,-50%);
97          transition: background .25s, box-shadow .25s;
98        }
99        .nc-loader .scanner .ndot.on {
100          background:var(--orange);
101          box-shadow:0 0 0 4px rgba(232,96,28,.16);
102        }
103        .nc-loader .scanner .core {
104          position:absolute; inset:34px; border-radius:50%;
105          background:var(--orange-tint);
106          display:flex; flex-direction:column; align-items:center; justify-content:center;
107          box-shadow: inset 0 0 0 1px rgba(232,96,28,.12);
108        }
109        .nc-loader .scanner .core .num {
110          font-family:'Barlow Condensed','Poppins',sans-serif; font-weight:700;
111          font-size:34px; line-height:1; color:var(--orange-deep);
112        }
113        .nc-loader .scanner .core .lbl {
114          font-family:'Barlow Condensed','Poppins',sans-serif; font-weight:600;
115          text-transform:uppercase; letter-spacing:.14em; font-size:10px;
116          color:var(--navy-soft); margin-top:3px;
117        }
118
119        .nc-loader .bar {
120          margin:18px 24px 4px; height:7px; border-radius:999px;
121          background:var(--line); overflow:hidden;
122        }
123        .nc-loader .bar i {
124          display:block; height:100%; border-radius:999px;
125          background: linear-gradient(90deg, var(--orange), #f5853f);
126          transition: width .8s cubic-bezier(.4,0,.2,1);
127        }
128
129        .nc-loader .steps { padding:14px 18px 6px; display:flex; flex-direction:column; gap:6px; }
130        .nc-loader .step {
131          display:flex; gap:13px; align-items:flex-start;
132          padding:12px; border-radius:16px;
133          transition: background .35s ease;
134        }
135        .nc-loader .step.active { background:var(--orange-tint); }
136        .nc-loader .step .ico {
137          flex:0 0 30px; width:30px; height:30px; border-radius:50%;
138          display:flex; align-items:center; justify-content:center;
139          background:#f1f3f6; color:#aab2bf; position:relative;
140          font-size:14px;
141          transition: all .35s ease;
142        }
143        .nc-loader .step.active .ico { background:#fff; color:var(--orange); box-shadow:0 0 0 1px rgba(232,96,28,.25); }
144        .nc-loader .step.done .ico { background:var(--green-tint); color:var(--green); }
145        .nc-loader .step .ico .ring {
146          position:absolute; inset:-1px; border-radius:50%;
147          border:2px solid transparent; border-top-color:var(--orange);
148          animation: nc-spin .9s linear infinite; display:none;
149        }
150        .nc-loader .step.active .ico .ring { display:block; }
151        .nc-loader .step .txt h3 {
152          font-family:'Poppins','Plus Jakarta Sans',sans-serif; font-weight:600;
153          font-size:15px;
153 color:var(--navy); line-height:1.25; margin:0;
154        }
155        .nc-loader .step .txt p {
156          font-size:12.8px; color:var(--navy-soft); margin:3px 0 0; line-height:1.45;
157        }
158        .nc-loader .step .txt .tag {
159          display:inline-block; margin-top:7px; font-size:11px; font-weight:700;
160          color:var(--green); background:var(--green-tint);
161          padding:2px 8px; border-radius:999px;
162        }
163
164        .nc-loader .process {
165          margin:10px 24px 0; padding:14px 16px;
166          background:#fafbfc; border:1px solid var(--line); border-radius:16px;
167          font-size:12.8px; line-height:1.5; color:var(--navy-soft); text-align:center;
168        }
169        .nc-loader .process b { color:var(--navy); font-weight:700; }
170
171        .nc-loader .reviews { margin-top:22px; border-top:1px solid var(--line); padding:18px 0 4px; }
172        .nc-loader .reviews-head { display:flex; align-items:center; gap:11px; padding:0 24px 14px; }
173        .nc-loader .badge {
174          flex:0 0 auto; width:58px; height:58px; border-radius:50%;
175          background:#fff; box-shadow:0 6px 18px -8px rgba(27,45,69,.35), inset 0 0 0 1px var(--line);
176          display:flex; flex-direction:column; align-items:center; justify-content:center;
177        }
178        .nc-loader .badge .score { font-family:'Barlow Condensed','Poppins',sans-serif; font-weight:700; font-size:21px; line-height:1; color:var(--navy); }
179        .nc-loader .badge .stars { color:var(--orange); font-size:9px; letter-spacing:1px; margin-top:1px; }
180        .nc-loader .badge .cnt { font-size:7.5px; color:var(--navy-soft); margin-top:1px; }
181        .nc-loader .reviews-head h4 { font-family:'Poppins','Plus Jakarta Sans',sans-serif; font-weight:600; font-size:14.5px; color:var(--navy); margin:0; }
182        .nc-loader .reviews-head span { font-size:12px; color:var(--navy-soft); }
183
184        .nc-loader .marquee {
185          position:relative; overflow:hidden;
186          -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
187          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
188        }
189        .nc-loader .marquee-track {
190          display:flex; gap:12px; width:max-content; padding:0 12px 16px;
191          animation: nc-marquee 32s linear infinite;
192        }
193        .nc-loader .marquee:hover .marquee-track { animation-play-state: paused; }
194        @keyframes nc-marquee { to { transform: translateX(-50%); } }
195        .nc-loader .rev {
196          flex:0 0 232px; background:#fff; border:1px solid var(--line);
197          border-radius:16px; padding:13px 14px;
198        }
199        .nc-loader .rev .s { color:var(--orange); font-size:11px; letter-spacing:1px; margin-bottom:6px; }
200        .nc-loader .rev .q { font-size:12.6px; line-height:1.5; color:var(--navy); }
201        .nc-loader .rev .n { font-size:11.5px; color:var(--navy-soft); margin-top:9px; font-weight:600; }
202
203        .nc-loader .foot { padding:14px 24px 22px; text-align:center; }
204        .nc-loader .foot .next {
205          display:flex; align-items:center; justify-content:center; gap:8px;
206          font-size:12.5px; color:var(--navy-soft); margin-bottom:4px;
207        }
208        .nc-loader .foot .next b { color:var(--navy); font-weight:600; }
209        .nc-loader .foot .email-line { font-size:12px; color:var(--navy-soft); }
210        .nc-loader .foot .email-line b { color:var(--orange-deep); }
211
212        @media (prefers-reduced-motion: reduce) {
213          .nc-loader .scanner .sweep,
214          .nc-loader .eyebrow .dot,
215          .nc-loader .step .ico .ring,
216          .nc-loader .marquee-track { animation: none; }
217          .nc-loader .marquee-track { transform: translateX(0); }
218        }
219        @media (max-width: 380px) {
220          .nc-loader h2.nc-h { font-size: 20px; }
221          .nc-loader .scanner { width:140px; height:140px; }
222        }
223      `}),e.jsxs("div",{className:"head",children:[e.jsxs("div",{className:"eyebrow-row",children:[e.jsxs("div",{className:"eyebrow",children:[e.jsx("span",{className:"dot"}),"Working on your quote"]}),e.jsx("div",{className:"timer","aria-label":"Elapsed time",children:se(c)})]}),e.jsxs("h2",{className:"nc-h",children:["Hang tight, ",e.jsx("em",{children:S||"there"})," —",e.jsx("br",{}),"we're shopping the market for you"]}),e.jsxs("div",{className:"ref",children:[m&&e.jsx("span",{className:"pill",children:m}),m&&e.jsx("span",{className:"sep"}),e.jsx("b",{children:k}),j&&e.jsx("span",{className:"sep"}),j&&e.jsx("span",{children:j})]})]}),e.jsx("div",{className:"scanner-wrap",children:e.jsxs("div",{className:"scanner","aria-hidden":"true",children:[e.jsx("div",{className:"track"}),e.jsx("div",{className:"sweep"}),C.map(n=>{const l=n/12*Math.PI*2-Math.PI/2,w=70,_=79,I=79,g=_+Math.cos(l)*w,d=I+Math.sin(l)*w,a=n===h%12||n===(h+4)%12||n===(h+8)%12;return e.jsx("span",{className:`ndot${a?" on":""}`,style:{left:`${g}px`,top:`${d}px`}},n)}),e.jsxs("div",{className:"core",children:[e.jsx("span",{className:"num",children:"5.0"}),e.jsx("span",{className:"lbl",children:"Star rated"})]})]})}),e.jsx("div",{className:"bar",children:e.jsx("i",{style:{width:`${N}%`}})}),e.jsx("div",{className:"steps",children:$.map((n,l)=>{const w=l<o?"step done":l===o?"step active":"step";return e.jsxs("div",{className:w,children:[e.jsxs("div",{className:"ico",children:[e.jsx("span",{className:"ring"}),e.jsx(n.Icon,{size:16,strokeWidth:1.75})]}),e.jsxs("div",{className:"txt",children:[e.jsx("h3",{children:n.title}),e.jsx("p",{children:n.body}),n.tag&&e.jsx("span",{className:"tag",children:n.tag})]})]},l)})}),e.jsxs("p",{className:"process",children:[e.jsx("b",{children:"Save big with smart price research."})," We find the best deals by constantly monitoring prices across the market — then back it with a price-beat guarantee and hands-on help when you need to claim."]}),e.jsx("section",{className:"reviews","aria-label":"Customer reviews",children:e.jsx("div",{className:"birdeye-wrap",children:e.jsx("div",{id:"bf-revz-widget-9876543213010151831216912"})})}),e.jsxs("div",{className:"foot",children:[e.jsxs("div",{className:"next",children:[e.jsx("span",{children:"✓"}),e.jsx("b",{children:"Reviewed within 24 hours"})]}),y&&e.jsxs("div",{className:"email-line",children:["Your personalised quote is on its way to ",e.jsx("b",{children:y})]})]})]})},oe=({submissionId:p,dealId:i,pollInterval:b=2e3,maxDuration:t=24e4})=>{const[S,m]=s.useState({status:"checking",webhookSent:!1,error:null,rawStatus:null,addressValidated:null,form3SubmissionId:null}),j=s.useCallback(async()=>
223{if(!p)return null;const{data:o,error:u}=await R.from("form_submissions").select("auto_quote_webhook_sent, auto_quote_status, auto_quote_error, address_suncorp_validated").eq("id",p).single();return u?(console.error("Error checking webhook status:",u),null):o},[p]),y=s.useCallback(async()=>{if(!i)return null;const{data:o,error:u}=await R.from("form3_submissions").select("id").eq("deal_id",i).order("created_at",{ascending:!1}).limit(1).maybeSingle();return u?(console.warn("[useAutoQuoteWebhookStatus] form3 lookup error:",u),null):(o==null?void 0:o.id)??null},[i]);return s.useEffect(()=>{if(!p){console.log("[useAutoQuoteWebhookStatus] No submissionId provided"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:null,addressValidated:null,form3SubmissionId:null});return}console.log("[useAutoQuoteWebhookStatus] Starting poll for submissionId:",p);let o=0;const u=Math.ceil(t/b);let c=null,x=!1,k=null;const N=8,C=8,h=async()=>{if(x)return;o++,console.log(`[useAutoQuoteWebhookStatus] Poll ${o}/${u}`);const r=await j();if(!x){if(r){if(console.log("[useAutoQuoteWebhookStatus] Backend data:",r),r.auto_quote_webhook_sent===!0||r.auto_quote_status==="completed"){k===null&&(k=o);const n=await y();if(x)return;const l=o-k;if(n||l>=N){console.log("[useAutoQuoteWebhookStatus] SUCCESS - webhook sent, form3Id:",n),m({status:"success",webhookSent:!0,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:n}),c&&clearInterval(c);return}m(w=>({...w,status:"checking",rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated}));return}if(r.auto_quote_status==="failed"){console.log("[useAutoQuoteWebhookStatus] FAILED"),m({status:"failed",webhookSent:!1,error:r.auto_quote_error||"Auto-quote failed",rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}if(r.auto_quote_status==="not_qualified"){console.log("[useAutoQuoteWebhookStatus] NOT_ELIGIBLE - not_qualified"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}if(["paused_manual_quote","p2p_no_price","p2p_retrying","p2p_server_error","vehicle_mismatch","skipped_freetext_vehicle"].includes(r.auto_quote_status)){console.log("[useAutoQuoteWebhookStatus] NOT_ELIGIBLE - auto-quote paused"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}if(r.auto_quote_status==="skipped_address_invalid"){console.log("[useAutoQuoteWebhookStatus] NOT_ELIGIBLE - skipped_address_invalid"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}if(r.address_suncorp_validated===!1&&!r.auto_quote_status){console.log("[useAutoQuoteWebhookStatus] NOT_ELIGIBLE - address not validated"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}if(r.auto_quote_status==="pending"&&o>=C){console.log("[useAutoQuoteWebhookStatus] NOT_ELIGIBLE - stuck pending"),m({status:"not_eligible",webhookSent:!1,error:null,rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated,form3SubmissionId:null}),c&&clearInterval(c);return}m(n=>({...n,status:"checking",rawStatus:r.auto_quote_status,addressValidated:r.address_suncorp_validated}))}o>=u&&(console.log("[useAutoQuoteWebhookStatus] TIMEOUT after",u,"polls"),m(n=>({...n,status:"timeout",error:"Webhook verification timed out"})),c&&clearInterval(c))}};return h(),c=setInterval(h,b),()=>{console.log("[useAutoQuoteWebhookStatus] Cleanup"),x=!0,c&&clearInterval(c)}},[p,b,t,j,y]),S};function Pe(){const p=F();V();const i=p.state,b=sessionStorage.getItem("submissionId")||"",[t,S]=s.useState(()=>i?{firstName:i.firstName?i.firstName.charAt(0).toUpperCase()+i.firstName.slice(1).toLowerCase():"",lastName:i.lastName?i.lastName.charAt(0).toUpperCase()+i.lastName.slice(1).toLowerCase():"",vehicleUsage:i.vehicleUsage||"",email:i.email||"",dealId:i.dealId||"",submissionId:i.submissionId||b,vehicleRegistration:i.vehicleRegistration||"",vehicleMake:i.vehicleMake||"",vehicleModel:i.vehicleModel||"",vehicleYear:i.vehicleYear||"",isAutoQuoteEligible:i.isAutoQuoteEligible||!1,partnerTheme:i.partnerTheme||null}:{firstName:"",lastName:"",vehicleUsage:"",email:"",dealId:"",submissionId:b,vehicleRegistration:"",vehicleMake:"",vehicleModel:"",vehicleYear:"",isAutoQuoteEligible:!1,partnerTheme:null}),[m,j]=s.useState(""),[y,o]=s.useState(""),[u,c]=s.useState("");
223s.useState(null),s.useState(""),s.useState(!1);const[x,k]=s.useState(!1),[N,C]=s.useState(!1),[h,r]=s.useState({step:0,message:"",isComplete:!1});s.useState(!1);const[n,l]=s.useState(24*60*60);s.useState(!1),s.useRef(null);const w=s.useRef(null),_=a=>a&&a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),I=()=>{const a=()=>{window.scrollTo({top:0,behavior:"auto"}),document.scrollingElement&&(document.scrollingElement.scrollTop=0),document.documentElement.scrollTop=0,document.body.scrollTop=0;const f=document.getElementById("root");f&&(f.scrollTop=0);const v=document.querySelector("main");v&&(v.scrollTop=0),Array.from(document.querySelectorAll('[data-scroll],[data-scroll-container],.scroll-area,[class*="overflow-auto"],[class*="overflow-y-auto"]')).forEach(W=>{try{W.scrollTop=0}catch{}});const T=document.getElementById("page-top-anchor");T&&T.scrollIntoView({behavior:"auto",block:"start"});const A=document.getElementById("progress-modal-top");A&&A.scrollIntoView({behavior:"auto",block:"start"});try{window.parent&&window.parent!==window&&(window.parent.postMessage("scrollToTop","*"),window.parent.postMessage({type:"scrollToTop"},"*"))}catch{}};a(),requestAnimationFrame(a),setTimeout(a,100),setTimeout(a,300)};s.useEffect(()=>{if(!i){const a=new URLSearchParams(p.search);S({firstName:_(a.get("firstName")||"valued customer"),lastName:_(a.get("lastName")||""),vehicleUsage:a.get("vehicleUsage")||"Car",email:a.get("email")||"",dealId:a.get("dealId")||"",submissionId:b,vehicleRegistration:a.get("vehicleRegistration")||"",vehicleMake:a.get("vehicleMake")||"",vehicleModel:a.get("vehicleModel")||"",vehicleYear:a.get("vehicleYear")||"",isAutoQuoteEligible:!1,partnerTheme:null})}},[p.search]);const g=oe({submissionId:t.submissionId||null,dealId:t.dealId||null,pollInterval:2e3,maxDuration:24e4});console.log("[ThankYou] dealId:",t.dealId,"submissionId:",t.submissionId),console.log("[ThankYou] webhookStatus:",g.status,"raw:",g.rawStatus,"addressValidated:",g.addressValidated),s.useEffect(()=>{N&&I()},[N]),s.useEffect(()=>{x&&I()},[x]),s.useEffect(()=>{const a=setInterval(()=>{l(f=>Math.max(0,f-1))},1e3);return()=>clearInterval(a)},[]);const d=[{id:1,message:"Verifying quote evidence...",duration:1e3},{id:2,message:"Updating your quote details...",duration:1500},{id:3,message:"Recording notes for National Cover team...",duration:1200},{id:4,message:"Creating betterQuote™ price beat challenge...",duration:1500},{id:5,message:"Finalizing your submission...",duration:800}];return u&&(parseFloat(u)*.75).toFixed(2),u&&(parseFloat(u)*.25).toFixed(2),e.jsxs("div",{className:"min-h-screen flex items-start justify-center p-3 sm:p-6 pt-4 sm:pt-8",style:t.partnerTheme==="professional"?{background:"#ffffff","--background":"0 0% 100%","--primary":"320 70% 45%","--secondary":"235 50% 30%","--primary-foreground":"0 0% 100%","--accent":"320 70% 95%"}:{background:"hsl(var(--background))"},children:[e.jsx("div",{id:"page-top-anchor"}),e.jsx("div",{className:"max-w-2xl w-full bg-[#f7f7f7] rounded-xl shadow-lg p-3 sm:p-6 md:p-8",children:e.jsxs("div",{className:"bg-white rounded-lg p-4 sm:p-6 md:p-8 space-y-4 sm:space-y-6",children:[t.submissionId?e.jsxs(e.Fragment,{children:[g.status==="checking"&&e.jsx(re,{vehicleRegistration:t.vehicleRegistration,vehicleMake:t.vehicleMake,vehicleModel:t.vehicleModel,vehicleYear:t.vehicleYear,firstName:t.firstName,quoteNumber:t.dealId,coverType:t.vehicleUsage?`${t.vehicleUsage} Insurance`:void 0,email:t.email}),g.status==="success"&&e.jsx(ae,{email:t.email,quoteNumber:null,vehicleRegistration:t.vehicleRegistration,vehicleMake:t.vehicleMake,vehicleModel:t.vehicleModel,vehicleYear:t.vehicleYear,firstName:t.firstName,isPolling:!1,emailSent:!0,form3SubmissionId:g.form3SubmissionId}),(g.status==="failed"||g.status==="timeout"||g.status==="not_eligible")&&t.dealId&&e.jsx(z,{insuranceType:t.vehicleUsage||"Private",dealId:t.dealId,submissionDate:new Date,firstName:t.firstName,email:t.email,vehicleYear:t.vehicleYear,vehicleMake:t.vehicleMake,vehicleModel:t.vehicleModel})]}):t.dealId&&e.jsx(z,{insuranceType:t.vehicleUsage||"Private",dealId:t.dealId,submissionDate:new Date,firstName:t.firstName,email:t.email,vehicleYear:t.vehicleYear,vehicleMake:t.vehicleMake,vehicleModel:t.vehicleModel}),e.jsx("hr",{className:"border-t border-border"}),!1,N&&e.jsxs("div",{className:"mt-6 sm:mt-8 bg-green-50 border-2 border-green-200 rounded-lg p-4 sm:p-6 text-center",children:[e.jsx(E,{className:"w-10 h-10 sm:w-12 sm:h-12 text-green-600 mx-auto mb-2 sm:mb-3"}),e.jsx("h3",{className:"text-lg sm:text-xl font-bold text-green-800 mb-1 sm:mb-2",children:"betterQuote™ Activated!"}),e.jsxs("p",{className:"text-sm sm:text-base text-green-700",children:["Your submission has been upgraded. Our team will now beat ",m==="Other"?y:m,"'s quote by 25% — guaranteed."]})]})]})}),x&&e.jsx("div",{id:"progress-modal-top",ref:w,className:"fixed inset-0 bg-background/95 backdrop-blur-sm z-50 flex items-start justify-center px-4 pt-8 sm:pt-16",children:e.jsxs("div",{className:"w-full max-w-md bg-card border-2 border-primary shadow-2xl rounded-xl animate-scale-in",children:[e.jsx("div",{className:"text-center pb-4 pt-6 px-6",children:e.jsx("h2",{className:"text-xl sm:text-2xl font-bold flex items-center justify-center gap-2",children:h.isComplete?e.jsxs(e.Fragment,{children:[e.jsx(E,{className:"w-7 h-7 text-green-600 animate-scale-in"}),e.jsx("span",{className:"text-green-600",children:"Complete!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"w-7 h-7 text-primary animate-spin"}),e.jsx("span",{children:"Processing..."})]})})}),e.jsxs("div",{className:"px-6 pb-6 space-y-6",children:[e.jsx("div",{className:"space-y-4",children:d.map(a=>{const f=h.step===a.id,v=h.step>a.id||h.isComplete;return e.jsxs("div",{className:`flex items-center gap-3 transition-all duration-300 ${f?"scale-105":v?"opacity-60":"opacity-30"}`,children:[e.jsx("div",{className:`flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center border-2 transition-all ${v?"bg-green-100 border-green-500":f?"bg-primary/10 border-primary animate-pulse":"bg-muted border-muted-foreground
223/30"}`,children:v?e.jsx(E,{className:"w-5 h-5 text-green-600"}):f?e.jsx(q,{className:"w-5 h-5 text-primary animate-spin"}):e.jsx("span",{className:"text-xs font-bold text-muted-foreground",children:a.id})}),e.jsx("div",{className:"flex-1",children:e.jsx("p",{className:`text-sm font-medium transition-colors ${f?"text-foreground":"text-muted-foreground"}`,children:a.message})})]},a.id)})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-2 bg-secondary rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary transition-all duration-500 ease-out",style:{width:`${h.step/d.length*100}%`}})}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:h.isComplete?"Complete!":`Step ${h.step} of ${d.length}`})]})]})]})})]})}export{Pe 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.