1import { o as e } from "./rolldown-runtime-CEFd7nDs.js"; 2import { E as t, k as n } from "./react-BP4GhFtr.js"; 3import { Xr as r, _ as i, _t as a, c as o, l as s, m as c, s as l, vt as u, x as d } from "./PillButton-CyrUwzav.js"; 4import { t as f } from "./useIntl-BvTQrSJV.js"; 5import { C as p, D as m, Qt as h, Xt as g } from "./PinturaEditorContext-C8ThvzKM.js"; 6import { t as _ } from "./CSSTransition-DFG4fJo7.js"; 7import { t as v } from "./IconButton-BjIFdJub.js"; 8import { t as y } from "./Tooltip-2t39vvxO.js"; 9import { t as b } from "./Select-D5hJnYnp.js"; 10import { t as x } from "./MenuItem-CMbv2T7h.js"; 11import { i as S, n as C, r as w, t as T } from "./TextField-APCza6VQ.js"; 12import { t as E } from "./FormControlLabel-V4YhUygp.js"; 13import { t as D } from "./FormGroup-CDeY_JOu.js"; 14import { t as O } from "./InputAdornment-CSmP1dc0.js"; 15import { t as k } from "./Slider-D0iUyEcF.js"; 16import { N as ee, P as A, v as te } from "./free-solid-svg-icons-cXWvZHQ_.js"; 17import { i as ne, n as re, r as ie, s as j, t as ae } from "./mui-tel-input.es-DNB98huM.js"; 18import { t as oe } from "./TypographyIntl-GE1svvsP.js"; 19import { t as M } from "./GlobalWrapper-CTKpQv28.js"; 20import { a as N, d as P, l as F, n as I, o as L, p as R, r as z, s as B } from "./chunk-62JRHF6Z-DMyCiZws.js"; 21import { n as V, t as H } from "./stripe.esm-5kun5NfK.js"; 22import { n as U } from "./Theme-wwfTIB6f.js"; 23//#region Components/CarWash/theme.jsx 24var W = /* @__PURE__ */ e(n(), 1); 25u(); 26var G = "#0099cb", K = "#00c0ff", q = { 27 lmRed: "#FD374A", 28 lmLightGrey: "#f0f0f0", 29 lmDarkGrey: "rgba(0, 0, 0, 0.15)", 30 lmBlackish: "rgba(0, 0, 0, 0.87)", 31 lmGreenish: "rgb(72, 162, 159)" 32}, J = { 33 border: "2px", 34 borderRadius: "var(--radius-sm)" 35}, se = a({ 36 palette: { 37 primary: { 38 light: q.lmLightGrey, 39 main: q.lmDarkGrey 40 }, 41 secondary: { main: q.lmRed }, 42 error: { main: q.lmRed } 43 }, 44 typography: { 45 fontFamily: "\"Libre Franklin\", \"Franklin Gothic\", \"Franklin Gothic Medium\", Arial, sans-serif", 46 allVariants: { letterSpacing: "-0.02em" }, 47 h1: { 48 fontSize: 40, 49 letterSpacing: "-0.025em" 50 }, 51 h2: { 52 fontSize: 32, 53 letterSpacing: "-0.025em" 54 }, 55 h3: { 56 fontSize: 28, 57 letterSpacing: "-0.03em" 58 }, 59 h4: { 60 fontSize: 18, 61 letterSpacing: "-0.02em" 62 }, 63 h5: { fontSize: 16 }, 64 h6: { fontSize: 16 } 65 }, 66 components: { 67 MuiFormLabel: { styleOverrides: { 68 root: { 69 fontSize: "20px !important", 70 color: "rgba(0, 0, 0, 0.4) !important", 71 paddingBottom: "15px !important" 72 }, 73 input: { paddingBottom: "15px !important" } 74 } }, 75 MuiFormControl: { root: { borderRadius: J.borderRadius } }, 76 MuiFormControlLabel: { styleOverrides: { root: { 77 marginLeft: "0 ", 78 marginRight: "0 " 79 } } }, 80 MuiInputBase: { styleOverrides: { 81 input: { 82 marginBottom: "0 !important", 83 borderBottom: "none !important", 84 fontSize: "20px !important" 85 }, 86 root: { 87 borderRadius: J.borderRadius + " !important", 88 paddingLeft: "25px", 89 paddingRight: "25px", 90 "&::before": { borderBottom: "none !important" } 91 } 92 } }, 93 MuiSelect: { styleOverrides: { root: { 94 color: q.lmDarkGrey, 95 backgroundColor: q.lmLightGrey, 96 paddingLeft: "0", 97 paddingRight: "0" 98 } } }, 99 MuiMenu: { styleOverrides: { paper: { 100 color: "rgba(0, 0, 0, 0.50)", 101 backgroundColor: q.lmLightGrey 102 } } }, 103 MuiOutlinedInput: { styleOverrides: { 104 notchedOutline: { 105 borderWidth: J.border, 106 borderColor: q.lmDarkGrey 107 }, 108 input: { "&:focus": { boxShadow: "none !important" } } 109 } }, 110 MuiButton: { styleOverrides: { 111 root: { 112 borderRadius: "var(--radius-md)", 113 backgroundColor: "lightgray", 114 color: "black", 115 height: "40px", 116 width: "100%", 117 maxWidth: "350px", 118 fontWeight: "var(--font-weight-bold)" 119 }, 120 contained: { 121 color: "white", 122 backgroundColor: G, 123 "&:hover": { backgroundColor: K } 124 }, 125 outlined: { 126 backgroundColor: "transparent", 127 color: G, 128 borderColor: G, 129 "&:hover": { 130 backgroundColor: "transparent", 131 borderWidth: "2px", 132 borderColor: K 133 } 134 } 135 } }, 136 MuiInputAdornment: { styleOverrides: { root: { "&.MuiInputAdornment-positionStart": { "&.MuiInputAdornment-root": { ":not(.MuiInputAdornment-hiddenLabel)": { marginTop: "0" } } } } } }, 137 MuiTypography: { styleOverrides: { root: { letterSpacing: "-0.02em" } } } 138 } 139}), Y = t(), ce = ({ bundle: e, numberOfLearners: t, setNumberOfLearners: n, stripePreviewOpen: r, setStripePreviewOpen: a }) => { 140 let [s, c] = (0, W.useState)(t), [l, u] = (0, W.useState)(f(t)); 141 function f(t) { 142 let n = e.priceTiers.find((e) => e.quantityMin <= t && e.quantityMax >= t); 143 return n ? n.flatPrice ?? n.unitPrice * t : null; 144 } 145 let p = new Intl.NumberFormat("en-US", { 146 style: "currency", 147 currency: "USD", 148 trailingZeroDisplay: "stripIfInteger" 149 }); 150 return /* @__PURE__ */ (0, Y.jsxs)(i, { 151 className: `stripe-preview ${r ? "open" : ""}`, 152 onClick: () => a(!0), 153 sx: { cursor: r ? "" : "pointer" }, 154 children: [
155 /* @__PURE__ */ (0, Y.jsxs)(d, { 156 className: "title", 157 sx: { 158 color: "#0098c9", 159 fontSize: "var(--font-size-xl)", 160 textTransform: "uppercase", 161 fontWeight: "var(--font-weight-bold)", 162 display: "flex", 163 alignItems: "center" 164 }, 165 children: [/* @__PURE__ */ (0, Y.jsx)(i, { 166 component: "img", 167 src: "/images/calculator.png", 168 sx: { height: "3rem" } 169 }), " Calculate Your Price"] 170 }), 171 /* @__PURE__ */ (0, Y.jsxs)(i, { 172 sx: { 173 display: r ? "block" : "none", 174 padding: "0 2rem" 175 }, 176 children: [ 177 /* @__PURE__ */ (0, Y.jsxs)(i, { children: [/* @__PURE__ */ (0, Y.jsx)(d, { 178 sx: { 179 textAlign: "center", 180 fontSize: "var(--font-size-xl)", 181 fontWeight: "var(--font-weight-bold)" 182 }, 183 children: "Billed Monthly" 184 }), /* @__PURE__ */ (0, Y.jsxs)(d, { 185 sx: { 186 color: "#0098c9", 187 textAlign: "center", 188 fontSize: "2rem", 189 fontWeight: "var(--font-weight-bold)" 190 }, 191 children: [ 192 p.format(l), 193 " ", 194 /* @__PURE__ */ (0, Y.jsx)("span", { 195 style: { fontSize: "var(--font-size-xl)" }, 196 children: "/mo" 197 }) 198 ] 199 })] }), 200 /* @__PURE__ */ (0, Y.jsx)(d, { 201 sx: { 202 textAlign: "center", 203 fontSize: "var(--font-size-xl)", 204 fontWeight: "var(--font-weight-bold)", 205 margin: "1rem", 206 marginBottom: "2rem" 207 }, 208 children: "Estimate your number of learners" 209 }), 210 /* @__PURE__ */ (0, Y.jsx)(k, { 211 min: 1, 212 max: 500, 213 value: s, 214 "aria-label": "Default", 215 valueLabelDisplay: "on", 216 valueLabelFormat: (e) => `${e} ${e === 1 ? "Learner" : "Learners"}`, 217 sx: { 218 color: "#0098c9", 219 "& .MuiSlider-valueLabel": { backgroundColor: "#0098c9" } 220 }, 221 onChange: (e, t) => { 222 c(t); 223 }, 224 onChangeCommitted: (e, t) => { 225 c(t), n(t), u(f(t)); 226 } 227 }) 228 ] 229 }), 230 s === 500 && r && /* @__PURE__ */ (0, Y.jsxs)(i, { 231 sx: { 232 textAlign: "center", 233 marginTop: 0, 234 marginLeft: "-0.4rem", 235 marginRight: "-0.35rem", 236 padding: "0.75rem 0", 237 background: "radial-gradient(circle at top center, #dedab5, #54bdb4, #4ebdb5, #46bec8, #8bc8d4)", 238 borderRadius: "0 0 var(--radius-md) var(--radius-md)", 239 color: "white", 240 boxSizing: "border-box", 241 position: "relative" 242 }, 243 children: [/* @__PURE__ */ (0, Y.jsx)(d, { 244 sx: { 245 fontSize: "var(--font-size-xl)", 246 fontWeight: "var(--font-weight-bold)", 247 display: "block" 248 }, 249 children: "HAVE MORE THAN 500 LEARNERS?" 250 }), /* @__PURE__ */ (0, Y.jsx)(d, { 251 component: "a", 252 href: "https://share.hsforms.com/1Lq10I-D5RqyMcHV20UOwqA4zhw2", 253 target: "_blank", 254 rel: "noopener noreferrer", 255 sx: { 256 fontWeight: "100", 257 cursor: "pointer", 258 textDecoration: "underline", 259 color: "white", 260 fontSize: "var(--font-size-2xl)", 261 display: "block" 262 }, 263 onClick: (e) => e.stopPropagation(), 264 children: "CONTACT US" 265 })] 266 }), 267 /* @__PURE__ */ (0, Y.jsx)(o, { 268 icon: g, 269 onClick: (e) => { 270 e.stopPropagation(), a(!1); 271 }, 272 style: { 273 position: "absolute", 274 right: ".7rem", 275 top: "1rem", 276 cursor: "pointer", 277 display: r ? "" : "none" 278 } 279 }) 280 ] 281 }); 282}, le = ({ bundle: e, numberOfLearners: t, setNumberOfLearners: n, children: r, stripePreviewOpen: a, setStripePreviewOpen: o }) => { 283 let s = e.type === "allAccess" ? "LEAD" : e.name; 284 return /* @__PURE__ */ (0, Y.jsxs)(i, { 285 className: "order-details", 286 children: [ 287 /* @__PURE__ */ (0, Y.jsx)(d, { children: "Order Details" }), 288 /* @__PURE__ */ (0, Y.jsx)(d, { 289 variant: "h3", 290 sx: { fontWeight: "var(--font-weight-medium)" }, 291 children: s 292 }), 293 /* @__PURE__ */ (0, Y.jsx)(d, { 294 variant: "h4", 295 sx: { paddingRight: "2rem" }, 296 children: e.description 297 }), 298 e.bulletPoints && /* @__PURE__ */ (0, Y.jsx)(i, { children: e.bulletPoints.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)(i, { 299 sx: { 300 display: "flex", 301 marginBottom: ".2rem" 302 }, 303 children: [/* @__PURE__ */ (0, Y.jsx)("img", { 304 src: "/images/checkmark-black.svg", 305 style: { 306 width: "1rem", 307 marginRight: ".6rem" 308 } 309 }
309), /* @__PURE__ */ (0, Y.jsx)(d, { 310 component: "div", 311 sx: { fontWeight: "200" }, 312 children: e 313 })] 314 }, t)) }), 315 /* @__PURE__ */ (0, Y.jsx)(i, { 316 sx: { 317 marginTop: "1rem", 318 marginBottom: "1rem" 319 }, 320 children: /* @__PURE__ */ (0, Y.jsx)(ce, { 321 bundle: e, 322 numberOfLearners: t, 323 setNumberOfLearners: n, 324 stripePreviewOpen: a, 325 setStripePreviewOpen: o 326 }) 327 }), 328 r 329 ] 330 }); 331}, ue = (e) => e.endsWith("/") ? e.slice(0, -1) : e, de = (e) => { 332 let t = R(), n = P(); 333 (0, W.useEffect)(() => { 334 ue(n.pathname) === "/lead/checkout" && !e?.email && t("/lead/account"); 335 }, [ 336 n, 337 e?.email, 338 t 339 ]); 340}, fe = h()(() => ({ 341 button: { 342 borderRadius: "var(--radius-pill)", 343 color: "white", 344 borderWidth: "2px", 345 paddingLeft: "30px", 346 paddingRight: "30px", 347 fontWeight: "var(--font-weight-regular)", 348 width: "164px", 349 "&:hover": { 350 background: "white", 351 borderWidth: J.border 352 }, 353 textTransform: "none", 354 fontSize: 18, 355 [se.breakpoints.down("sm")]: { 356 margin: "0", 357 width: "100%" 358 } 359 }, 360 loginButton: { 361 borderColor: q.lmGreenish, 362 background: q.lmGreenish, 363 "&:hover": { 364 borderColor: q.lmGreenish, 365 color: q.lmGreenish 366 } 367 }, 368 line1: { 369 color: q.lmRed, 370 fontSize: "50px", 371 fontWeight: "350" 372 }, 373 logo: { 374 width: "40%", 375 filter: "brightness(0) saturate(100%) invert(16%) sepia(72%) saturate(7432%) hue-rotate(345deg) brightness(91%) contrast(118%)" 376 }, 377 txtBox: { 378 fontSize: "40px !important", 379 height: "4rem !important", 380 borderRadius: J.borderRadius 381 }, 382 border: { 383 borderWidth: J.border, 384 borderStyle: "solid" 385 }, 386 disabledCheckbox: { borderColor: q.lmDarkGrey + "!important" } 387})), pe = { 388 fontSize: "var(--font-size-lg)", 389 paddingLeft: 3 390}; 391function me({ onNext: e, bundle: t, isLoading: n, values: a, setValues: u, errors: d, setErrors: m, children: h, emailData: _, setEmailData: y, numberOfLearners: k, setNumberOfLearners: j, stripePreviewOpen: M, setStripePreviewOpen: N, lmLoginUrl: P }) { 392 (0, W.createRef)(); 393 let { formatMessage: F, messages: I } = f(), L = r("/Account", { cachePolicy: "no-cache" }), { classes: R } = fe(), z = (0, W.useRef)(), B = (0, W.useState)()[1], [V, H] = (0, W.useState)(!0), [U, G] = (0, W.useState)(!1), K = (e) => document.activeElement?.id === e; 394 (0, W.useEffect)(() => { 395 H(!(a.email && a.password && a.accountName && a.agreeTos && Object.values(d).every((e) => !e) && !n)); 396 }, [ 397 a, 398 d, 399 n 400 ]), (0, W.useLayoutEffect)(() => { 401 a.howDidYouHear === "Other" && document.activeElement?.id !== "other" && document.getElementById("other").focus(); 402 }, [a.howDidYouHear]); 403 let q = (e) => (t) => u((n) => ({ 404 ...n, 405 [e]: t.target.value 406 })), J = (e, t) => { 407 u((e) => ({ 408 ...e, 409 phone: t 410 })); 411 }, se = () => (e) => { 412 u((e) => ({ 413 ...e, 414 agreeTos: !a.agreeTos 415 })); 416 }, ce = (e) => { 417 let t = e.target.value; 418 u((e) => ({ 419 ...e, 420 howDidYouHear: t, 421 other: "" 422 })); 423 }, ue = () => { 424 u((e) => ({ 425 ...e, 426 howDidYouHear: "", 427 other: "" 428 })); 429 }; 430 function de() { 431 G(!U); 432 } 433 async function me() { 434 if (H(!0), a.email.length == 0) { 435 m({ 436 ...d, 437 email: !0, 438 emailMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.EmailRequired" }) 439 }); 440 return; 441 } 442 if (!/\S+@\S+\.\S+/.test(a.email)) { 443 m({ 444 ...d, 445 email: !0, 446 emailMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.Invalid" }) 447 }); 448 return; 449 } 450 var e = new URLSearchParams(); 451 e.append("email", a.email.trim()), e.append("whiteListDomains", ["gmail.com"]); 452 var t = await L.post("/ValidateEmail?" + e.toString()); 453 t.success ? (m((e) => ({ 454 ...e, 455 email: !1, 456 emailMsg: "" 457 })), t.accountName.length > 0 && !K("accountName") && z.current?.value.length == 0 && t.accountName !== "gmail" && (u((e) => ({ 458 ...e, 459 accountName: t.accountName 460 })), m((e) => ({ 461 ...e, 462 accountName: !1, 463 accountNameMsg: "" 464 })))) : t.learnerUrl ? m({ 465 ...d, 466 email: !0, 467 emailMsg: /* @__PURE__ */ (0, Y.jsx)(l, { 468 id: "account.signup.AreYouALearner", 469 values: { learnerLink: /* @__PURE__ */ (0, Y.jsx)("a", { 470 href: t.learnerUrl, 471 children: t.learnerUrl 472 }) } 473 }) 474 }) : t.accountExists ? m({ 475 ...d, 476 email: !0, 477 emailMsg: /* @__PURE__ */ (0, Y.jsx)(l, { 478 id: "account.signup.AccountAlreadyExists", 479 values: { loginLink: /* @__PURE__ */ (0, Y.jsx)("a", { 480 href: t.loginUrl, 481 children: "sign in" 482 }) } 483 }) 484 }) : m({ 485 ...d, 486 email: !0, 487 emailMsg: t.message 488 }); 489 } 490 let { personalEmailCompanyNames: X } = ie(P); 491 function he() { 492 if (a.accountName.trim().length == 0) { 493 m({ 494 ...d, 495 accountName: !0, 496 accountNameMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.CompanyNameRequired" }) 497 }); 498 return; 499 } 500 if (X.includes(a.accountName.trim().toLowerCase())) { 501 m({ 502 ...d, 503 accountName: !0, 504 accountNameMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.CompanyNameInvalid" }) 505 }); 506 return; 507 } 508 m({ 509 ...d, 510 accountName: !1, 511 accountNameMsg: "" 512 }); 513 } 514 function Z() { 515 if (a.password.length == 0) { 516 m({ 517 ...d, 518 password: !0, 519 passwordMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.PasswordRequired" }) 520 }); 521 return; 522 } 523 if (a.password.length < 6) { 524 m({ 525 ...d, 526 password: !0, 527 passwordMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.PasswordLength" }) 528 }); 529 return; 530 } 531 m({ 532 ...d, 533 password: !1, 534 passwordMsg: "" 535 }); 536 } 537 function ge() { 538 if (a.phone.nationalNumber.length > 0 && !re(a.phone.numberValue)) { 539 m({ 540 ...d, 541 phone: !0, 542 phoneMsg: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.Invalid" }) 543 }); 544 return; 545 } 546 m({ 547 ...d, 548 phone: !1, 549 phoneMsg: "" 550 }); 551 } 552 let Q = 1; 553 function $(e) { 554 return { 555 id: e, 556 fullWidth: !0, 557 value: a[e], 558 error: d[e], 559 inputProps: {
560 maxLength: 255, 561 tabIndex: Q++ 562 }, 563 InputProps: { className: R.txtBox }, 564 sx: { 565 "& legend": { display: "none" }, 566 "& fieldset": { 567 top: 0, 568 borderStyle: K(e) || a[e] ? "solid" : "none" 569 }, 570 "& .MuiInputBase-root": { backgroundColor: K(e) || a[e] ? "white" : "rgba(0, 0, 0, 0.04)" } 571 }, 572 onChange: q(e), 573 onFocus: B, 574 onBlur: B, 575 disabled: n, 576 variant: "outlined" 577 }; 578 } 579 let _e = async () => { 580 if (!_) try { 581 let e = { 582 method: "POST", 583 headers: { 584 Accept: "application/json", 585 "Content-Type": "application/json" 586 }, 587 body: JSON.stringify({ 588 bundleId: t.id, 589 bundleName: t.name, 590 stripePriceId: t.stripePriceId, 591 accountName: a.accountName, 592 agreeTos: a.agreeTos, 593 email: a.email, 594 fullName: a.fullName, 595 howDidYouHear: a.howDidYouHear, 596 other: a.other, 597 numberValue: a.phone?.numberValue, 598 source: "ica" 599 }) 600 }; 601 y(e.body), await fetch(`${P}/Account/LeadCapture`, e); 602 } catch (e) { 603 console.log("error", e); 604 } 605 e(); 606 }; 607 return /* @__PURE__ */ (0, Y.jsxs)(i, { 608 className: "signup-form", 609 children: [h, /* @__PURE__ */ (0, Y.jsxs)(i, { 610 className: "form-outer", 611 children: [/* @__PURE__ */ (0, Y.jsxs)(i, { 612 className: "form", 613 children: [/* @__PURE__ */ (0, Y.jsx)(i, { 614 className: "form-left", 615 children: /* @__PURE__ */ (0, Y.jsxs)(s, { 616 direction: "column", 617 spacing: 2, 618 justifyContent: "center", 619 children: [ 620 /* @__PURE__ */ (0, Y.jsx)(T, { 621 ...$("email"), 622 required: !0, 623 placeholder: F({ id: K("email") ? "account.signup.EmailExample" : "account.signup.EmailPlaceholder" }), 624 helperText: d.email ? d.emailMsg : "", 625 onBlur: me 626 }), 627 /* @__PURE__ */ (0, Y.jsx)(T, { 628 ...$("password"), 629 required: !0, 630 type: U ? "text" : "password", 631 placeholder: F({ id: "account.signup.PasswordPlaceholder" }), 632 helperText: d.password ? d.passwordMsg : "", 633 onBlur: Z, 634 InputProps: { 635 className: R.txtBox, 636 endAdornment: /* @__PURE__ */ (0, Y.jsx)(v, { 637 "aria-label": "toggle password visibility", 638 onClick: de, 639 edge: "end", 640 tabIndex: -1, 641 children: U ? /* @__PURE__ */ (0, Y.jsx)(o, { 642 icon: A, 643 style: { 644 fontSize: "var(--font-size-xl)", 645 color: "var(--ui-color-buttons)" 646 } 647 }) : /* @__PURE__ */ (0, Y.jsx)(o, { 648 icon: ee, 649 style: { 650 fontSize: "var(--font-size-xl)", 651 color: "var(--ui-color-buttons)" 652 } 653 }) 654 }) 655 } 656 }), 657 /* @__PURE__ */ (0, Y.jsxs)(s, { 658 direction: { 659 xs: "column", 660 md: "row" 661 }, 662 spacing: 2, 663 children: [/* @__PURE__ */ (0, Y.jsx)(T, { 664 ...$("accountName"), 665 placeholder: F({ id: "account.signup.CompanyName" }), 666 helperText: d.accountName ? d.accountNameMsg : "", 667 onBlur: he, 668 inputRef: z 669 }), /* @__PURE__ */ (0, Y.jsx)(ae, { 670 id: "phone", 671 fullWidth: !0, 672 forceCallingCode: !0, 673 defaultCountry: "US", 674 focusOnSelectCountry: !0, 675 MenuProps: { 676 autoFocus: !1, 677 tabIndex: -1, 678 backgroundColor: "transparent" 679 }, 680 preferredCountries: [ 681 "US", 682 "CA", 683 "IN" 684 ], 685 value: a.phone?.numberValue, 686 placeholder: "Phone Number", 687 helperText: d.phone ? d.phoneMsg : "", 688 error: d.phone, 689 variant: K("phone") || a.phone?.nationalNumber != "" ? "outlined" : "filled", 690 onChange: J, 691 onBlur: ge, 692 onFocus: B, 693 inputProps: { 694 maxLength: 255, 695 tabIndex: Q++ 696 }, 697 InputProps: { className: R.txtBox }, 698 disabled: !!n, 699 sx: { 700 "& .MuiInputBase-root": { px: "25px !important" }, 701 "& legend": { display: "none" }, 702 "& fieldset": { top: 0 } 703 } 704 })] 705 }),
706 /* @__PURE__ */ (0, Y.jsxs)(s, { 707 direction: { 708 xs: "column", 709 md: "row" 710 }, 711 spacing: 2, 712 children: [/* @__PURE__ */ (0, Y.jsx)(T, { 713 ...$("fullName"), 714 placeholder: "Your Name" 715 }), a.howDidYouHear === "Other" ? /* @__PURE__ */ (0, Y.jsx)(i, { 716 sx: { width: 1 }, 717 children: /* @__PURE__ */ (0, Y.jsx)(T, { 718 ...$("other"), 719 placeholder: F({ id: "account.signup.PleaseSpecify" }), 720 InputProps: { 721 className: R.txtBox, 722 endAdornment: /* @__PURE__ */ (0, Y.jsx)(O, { 723 position: "end", 724 children: /* @__PURE__ */ (0, Y.jsx)(o, { 725 icon: g, 726 onClick: ue, 727 style: { cursor: "pointer" } 728 }) 729 }) 730 } 731 }) 732 }) : /* @__PURE__ */ (0, Y.jsxs)(S, { 733 component: "fieldset", 734 sx: { width: 1 }, 735 children: [/* @__PURE__ */ (0, Y.jsx)(C, { 736 shrink: !1, 737 id: "how-did-you-hear-label", 738 sx: { 739 pl: 1.5, 740 display: a.howDidYouHear ? "none" : "" 741 }, 742 children: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.HowDidYouHear" }) 743 }), /* @__PURE__ */ (0, Y.jsx)(b, { 744 id: "howDidYouHear", 745 displayEmpty: !0, 746 labelId: "how-did-you-hear-label", 747 value: a.howDidYouHear || "", 748 onChange: ce, 749 sx: { 750 minWidth: 200, 751 "&.MuiOutlinedInput-root.Mui-focused fieldset.MuiOutlinedInput-notchedOutline": { borderColor: "rgba(0, 0, 0, 0.15)" }, 752 "&.MuiOutlinedInput-root fieldset.MuiOutlinedInput-notchedOutline": { borderColor: "transparent" }, 753 backgroundColor: K("howDidYouHear") ? "white" : "rgba(0, 0, 0, 0.04)", 754 color: a.howDidYouHear ? "rgba(0,0,0, 0.4)" : "" 755 }, 756 tabIndex: Q++, 757 children: ne.map((e) => /* @__PURE__ */ (0, Y.jsx)(x, { 758 value: e.value, 759 sx: pe, 760 children: /* @__PURE__ */ (0, Y.jsx)(l, { id: e.messageId }) 761 }, e.value)) 762 })] 763 })] 764 }), 765 /* @__PURE__ */ (0, Y.jsx)(s, { 766 direction: { 767 xs: "column", 768 md: "row" 769 }, 770 spacing: 2, 771 children: /* @__PURE__ */ (0, Y.jsx)(s, { 772 direction: { 773 md: "column", 774 lg: "row" 775 }, 776 sx: { 777 width: 1, 778 justifyContent: "space-between" 779 }, 780 children: /* @__PURE__ */ (0, Y.jsxs)(D, { 781 sx: { minWidth: .5 }, 782 children: [/* @__PURE__ */ (0, Y.jsx)(E, { 783 control: /* @__PURE__ */ (0, Y.jsx)(c, { 784 id: "agreeTos", 785 onClick: n ? {} : se(), 786 display: "flex", 787 className: `${K("agreeTos") || a.agreeTos ? R.border : ""} ${n ? R.disabledCheckbox : ""}`, 788 variant: K("agreeTos") || a.agreeTos ? "outlined" : "text", 789 disabled: !!n, 790 tabIndex: Q++, 791 sx: { 792 height: "35px", 793 width: "35px", 794 minWidth: "35px", 795 m: 1, 796 ml: 0, 797 borderRadius: "var(--radius-sm)", 798 "& .MuiTouchRipple-root *": { 799 borderRadius: "var(--radius-sm)", 800 left: 0, 801 top: 0 802 } 803 }, 804 children: /* @__PURE__ */ (0, Y.jsx)(o, { 805 icon: te, 806 style: { 807 fontSize: "var(--font-size-2xl)", 808 display: a.agreeTos ? "block" : "none", 809 color: n ? "rgba(0, 0, 0, 0.38)" : "black" 810 } 811 }) 812 }), 813 label: /* @__PURE__ */ (0, Y.jsx)("div", { children: /* @__PURE__ */ (0, Y.jsx)(oe, { 814 variant: "h5", 815 id: "account.signup.iAcceptThe", 816 display: "inline", 817 values: { 818 termsOfService: /* @__PURE__ */ (0, Y.jsx)("a", { 819 href: "https://learnermobile.com/lead-by-learner-mobile-terms-of-service", 820 target: "_blank", 821 tabIndex: -1, 822 children: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.termsOfService" }) 823 }), 824 privacyPolicy: /* @__PURE__ */ (0, Y.jsx)("a", { 825 href: "https://learnermobile.com/privacy-policy", 826 target: "_blank", 827 tabIndex: -1, 828 children: /* @__PURE__ */ (0, Y.jsx)(l, { id: "account.signup.privacyPolicy" }) 829 }) 830 } 831 }) }) 832 }
832), /* @__PURE__ */ (0, Y.jsx)(w, { 833 error: !0, 834 style: { display: !!d.tos }, 835 children: d.tosMsg 836 })] 837 }) 838 }) 839 }) 840 ] 841 }) 842 }), /* @__PURE__ */ (0, Y.jsx)(i, { 843 className: "form-right", 844 children: t && /* @__PURE__ */ (0, Y.jsx)(le, { 845 bundle: t, 846 numberOfLearners: k, 847 setNumberOfLearners: j, 848 stripePreviewOpen: M, 849 setStripePreviewOpen: N 850 }) 851 })] 852 }), /* @__PURE__ */ (0, Y.jsx)(i, { 853 className: "nav-btns", 854 sx: { justifyContent: "flex-end" }, 855 children: /* @__PURE__ */ (0, Y.jsxs)(c, { 856 className: "next", 857 variant: "contained", 858 onClick: _e, 859 disabled: V, 860 children: ["Add Payment", /* @__PURE__ */ (0, Y.jsx)(o, { icon: p })] 861 }) 862 })] 863 })] 864 }); 865} 866//#endregion 867//#region Components/CarWash/StripeCheckout.jsx 868var X = V(), he = ({ onPrevious: e, onNext: t, bundle: n, bundles: r, accountData: a, setAccountData: s, lmLoginUrl: l, isLoading: u, setIsLoading: f, children: h, numberOfLearners: g, setNumberOfLearners: _, stripePreviewOpen: v, onSignupComplete: b, setStripePreviewOpen: x }) => { 869 let S = r?.find((e) => e.id === n?.id)?.stripePriceId, C = (0, X.useStripe)(), w = (0, X.useElements)(), [T, E] = (0, W.useState)(), D = () => { 870 f(!1), E("Something went wrong. Please try again."); 871 }, O = async (e) => { 872 if (e.preventDefault(), !C) return; 873 f(!0); 874 let { error: r } = await w.submit(); 875 if (r) { 876 D(); 877 return; 878 } 879 let i = { 880 urlHostName: window.location.origin, 881 signupValues: [ 882 { 883 name: "stripePriceId", 884 value: S 885 }, 886 { 887 name: "bundleId", 888 value: n.id 889 }, 890 { 891 name: "source", 892 value: "ica" 893 }, 894 { 895 name: "email", 896 value: a.email.trim() 897 }, 898 { 899 name: "accountName", 900 value: a.accountName.trim() 901 }, 902 { 903 name: "password", 904 value: a.password 905 }, 906 { 907 name: "fullName", 908 value: a.fullName 909 }, 910 { 911 name: "agreeTos", 912 value: a.agreeTos.toString() 913 }, 914 { 915 name: "phone", 916 value: a.phone?.nationalNumber 917 }, 918 { 919 name: "referrer", 920 value: document.referrer 921 }, 922 { 923 name: "howDidYouHear", 924 value: a.howDidYouHear 925 }, 926 { 927 name: "other", 928 value: a.other 929 } 930 ] 931 }, o = null; 932 try { 933 if (o = await k(`${l}/Account/CreateSetupIntent`, i), !o?.success) { 934 D(); 935 return; 936 } 937 } catch { 938 D(); 939 return; 940 } 941 let { clientSecret: c, customerId: u } = o, d = C.confirmSetup, { error: p } = await d({ 942 elements: w, 943 clientSecret: c, 944 confirmParams: { return_url: "https://example.com/order/123/complete" }, 945 redirect: "if_required" 946 }); 947 if (p) { 948 D(); 949 return; 950 } 951 try { 952 s((e) => ({ 953 ...e, 954 stripeCustomerId: u 955 })), t(u); 956 } catch { 957 D(); 958 return; 959 } 960 }; 961 async function k(e, t) { 962 return (await fetch(e, { 963 method: "POST", 964 cache: "no-cache", 965 headers: { 966 "Content-Type": "application/json", 967 "Access-Control-Allow-Credentials": "true" 968 }, 969 credentials: "include", 970 body: JSON.stringify(t) 971 })).json(); 972 } 973 let ee = new Intl.NumberFormat("en-US", { 974 style: "currency", 975 currency: "USD", 976 trailingZeroDisplay: "stripIfInteger" 977 }), A = /* @__PURE__ */ new Date(); 978 return A.setMonth(A.getMonth() + 1), /* @__PURE__ */ (0, Y.jsxs)(i, { 979 className: "stripe-checkout", 980 children: [h, /* @__PURE__ */ (0, Y.jsx)("form", { 981 onSubmit: O, 982 children: /* @__PURE__ */ (0, Y.jsxs)(i, { 983 className: "form-outer", 984 children: [/* @__PURE__ */ (0, Y.jsxs)(i, { 985 className: "form", 986 children: [/* @__PURE__ */ (0, Y.jsxs)(i, { 987 className: "form-left", 988 children: [ 989 T && /* @__PURE__ */ (0, Y.jsx)(d, { 990 variant: "body1", 991 sx: { 992 marginBottom: "1.5rem", 993 color: "#df1b41", 994 background: "ffdede", 995 padding: ".5rem", 996 borderRadius: "var(--radius-md)" 997 }, 998 children: T 999 }), 1000 /* @__PURE__ */ (0, Y.jsx)(d, { 1001 variant: "h3", 1002 sx: { marginBottom: "1.5rem" }, 1003 children: "Payment Method" 1004 }),
1005 /* @__PURE__ */ (0, Y.jsx)(X.PaymentElement, {}) 1006 ] 1007 }), /* @__PURE__ */ (0, Y.jsx)(i, { 1008 className: "form-right", 1009 children: n && /* @__PURE__ */ (0, Y.jsx)(le, { 1010 bundle: n, 1011 numberOfLearners: g, 1012 setNumberOfLearners: _, 1013 stripePreviewOpen: v, 1014 setStripePreviewOpen: x, 1015 children: /* @__PURE__ */ (0, Y.jsx)(i, { 1016 sx: { 1017 display: "flex", 1018 justifyContent: "flex-end", 1019 marginTop: "auto", 1020 paddingTop: "2rem" 1021 }, 1022 children: /* @__PURE__ */ (0, Y.jsxs)(i, { 1023 sx: { width: "350px" }, 1024 children: [/* @__PURE__ */ (0, Y.jsxs)(d, { 1025 sx: { color: "#868686" }, 1026 children: ["Your first payment: ", A.toLocaleDateString("en-US")] 1027 }), /* @__PURE__ */ (0, Y.jsxs)(i, { 1028 sx: { 1029 display: "flex", 1030 justifyContent: "space-between" 1031 }, 1032 children: [/* @__PURE__ */ (0, Y.jsx)(d, { 1033 sx: { color: "#868686" }, 1034 children: "Your estimated payment amount:" 1035 }), /* @__PURE__ */ (0, Y.jsxs)(d, { 1036 sx: { 1037 fontWeight: "var(--font-weight-bold)", 1038 display: "flex", 1039 alignItems: "center" 1040 }, 1041 children: [/* @__PURE__ */ (0, Y.jsx)(y, { 1042 className: "checkout-tooltip", 1043 slotProps: { tooltip: { sx: { 1044 borderRadius: "var(--radius-md)", 1045 backgroundColor: "#3d3d3d" 1046 } } }, 1047 title: /* @__PURE__ */ (0, Y.jsxs)(i, { 1048 sx: { padding: "1rem .5rem" }, 1049 children: [ 1050 /* @__PURE__ */ (0, Y.jsxs)(d, { 1051 variant: "body2", 1052 children: [ 1053 "You have chosen the ", 1054 n.name, 1055 " package." 1056 ] 1057 }), 1058 /* @__PURE__ */ (0, Y.jsx)(d, { 1059 variant: "body2", 1060 sx: { margin: "1rem 0" }, 1061 children: "Pricing is per user and based on the following:" 1062 }), 1063 /* @__PURE__ */ (0, Y.jsxs)(d, { 1064 variant: "body2", 1065 sx: { marginBottom: ".1rem" }, 1066 children: [ 1067 n.priceTiers[0].quantityMax, 1068 " users (minimum): $", 1069 n.priceTiers[0].flatPrice, 1070 " per month" 1071 ] 1072 }), 1073 /* @__PURE__ */ (0, Y.jsxs)(d, { 1074 variant: "body2", 1075 sx: { marginBottom: ".1rem" }, 1076 children: [ 1077 `${n.priceTiers[1].quantityMin}-${n.priceTiers[1].quantityMax}`, 1078 " users: $", 1079 n.priceTiers[1].unitPrice, 1080 " per user per month" 1081 ] 1082 }), 1083 /* @__PURE__ */ (0, Y.jsxs)(d, { 1084 variant: "body2", 1085 sx: { marginBottom: ".1rem" }, 1086 children: [ 1087 `${n.priceTiers[2].quantityMin}-${n.priceTiers[2].quantityMax}`, 1088 " users: $", 1089 n.priceTiers[2].unitPrice, 1090 " per user per month" 1091 ] 1092 }), 1093 /* @__PURE__ */ (0, Y.jsxs)(d, { 1094 variant: "body2", 1095 sx: { marginBottom: ".1rem" }, 1096 children: [ 1097 `${n.priceTiers[3].quantityMin}-${n.priceTiers[3].quantityMax}`, 1098 " users: $", 1099 n.priceTiers[3].unitPrice, 1100 " per user per month" 1101 ] 1102 }), 1103 /* @__PURE__ */ (0, Y.jsxs)(d, { 1104 variant: "body2", 1105 sx: { marginBottom: ".1rem" }, 1106 children: [ 1107 `${n.priceTiers[4].quantityMin}+`, 1108 " users: $", 1109 n.priceTiers[4].unitPrice, 1110 " per user per month" 1111 ] 1112 }) 1113 ] 1114 }), 1115 placement: "top-start", 1116 children: /* @__PURE__ */ (0, Y.jsx)(o, { 1117 icon: m, 1118 style: { 1119 fontSize: "var(--font-size-lg)", 1120 marginRight: ".2rem" 1121 } 1122 }) 1123 }), ee.format(n.priceTiers[0].flatPrice)] 1124 })] 1125 })] 1126 }) 1127 }) 1128 }) 1129 })] 1130 }
1130), /* @__PURE__ */ (0, Y.jsxs)(i, { 1131 className: "nav-btns", 1132 children: [/* @__PURE__ */ (0, Y.jsx)(c, { 1133 variant: "outlined", 1134 onClick: e, 1135 children: "Return to account information" 1136 }), /* @__PURE__ */ (0, Y.jsxs)(c, { 1137 className: "next", 1138 variant: "contained", 1139 type: "submit", 1140 disabled: !C || u, 1141 children: ["Confirm", /* @__PURE__ */ (0, Y.jsx)(o, { icon: p })] 1142 })] 1143 })] 1144 }) 1145 })] 1146 }); 1147}, Z = ({ isComplete: e, isActive: t, stepNumber: n, completeColor: r, offset: i }) => /* @__PURE__ */ (0, Y.jsx)("div", { 1148 className: `progress-step ${e ? "complete" : ""}`, 1149 style: { 1150 left: i, 1151 backgroundColor: e || t ? r : null 1152 }, 1153 children: e ? /* @__PURE__ */ (0, Y.jsx)(o, { icon: te }) : /* @__PURE__ */ (0, Y.jsx)(d, { children: n }) 1154}), ge = (e) => e.endsWith("/") ? e.slice(0, -1) : e, Q = ({ accountData: e }) => { 1155 let t = ge(P().pathname), n = e.email !== "", r = !!e.stripeCustomerId; 1156 return /* @__PURE__ */ (0, Y.jsxs)("div", { 1157 className: "progress-outer", 1158 style: { 1159 width: "600px", 1160 margin: "2rem" 1161 }, 1162 children: [/* @__PURE__ */ (0, Y.jsxs)(i, { 1163 className: "progress", 1164 sx: { display: "flex" }, 1165 children: [
1166 (t === "/lead/checkout" || r) && /* @__PURE__ */ (0, Y.jsx)(i, { className: "progress-complete-1" }), 1167 /* @__PURE__ */ (0, Y.jsx)(Z, { 1168 isActive: t === "/lead/account", 1169 isComplete: n, 1170 offset: "0%", 1171 completeColor: "#eb8724", 1172 stepNumber: "1" 1173 }), 1174 /* @__PURE__ */ (0, Y.jsx)(Z, { 1175 isActive: t === "/lead/checkout", 1176 isComplete: r, 1177 offset: "100%", 1178 completeColor: "#67bfd6", 1179 stepNumber: "2" 1180 }) 1181 ] 1182 }), /* @__PURE__ */ (0, Y.jsxs)("div", { 1183 style: { 1184 paddingTop: "1rem", 1185 position: "relative" 1186 }, 1187 children: [/* @__PURE__ */ (0, Y.jsx)(I, { 1188 to: "/lead/account", 1189 style: { 1190 position: "absolute", 1191 width: "120px", 1192 textAlign: "center", 1193 transform: "translateX(calc(-50%))", 1194 left: "0%", 1195 textDecoration: "none", 1196 color: "#6f7a86" 1197 }, 1198 children: /* @__PURE__ */ (0, Y.jsx)(d, { 1199 sx: { 1200 fontWeight: "var(--font-weight-bold)", 1201 lineHeight: "1.2rem" 1202 }, 1203 children: "Create Your Account" 1204 }) 1205 }), /* @__PURE__ */ (0, Y.jsx)(I, { 1206 to: n ? "/lead/checkout" : "#", 1207 style: { 1208 position: "absolute", 1209 width: "65px", 1210 textAlign: "center", 1211 transform: "translateX(calc(-50%))", 1212 left: "100%", 1213 textDecoration: "none", 1214 color: "#6f7a86" 1215 }, 1216 children: /* @__PURE__ */ (0, Y.jsx)(d, { 1217 sx: { 1218 fontWeight: "var(--font-weight-bold)", 1219 lineHeight: "1.2rem" 1220 }, 1221 children: "Add Payment" 1222 }) 1223 })] 1224 })] 1225 }); 1226}, $ = ({ images: e, blurbs: t, interval: n = 5e3, loop: r, loadingComplete: a }) => { 1227 let [o, s] = (0, W.useState)(0), [c, l] = (0, W.useState)(0); 1228 return (0, W.useEffect)(() => { 1229 l(33); 1230 }, []), (0, W.useEffect)(() => { 1231 a === !0 && l(100); 1232 }, [a]), (0, W.useEffect)(() => { 1233 let t = setInterval(() => { 1234 l((e) => e + 33 <= 95 ? e + 33 : 95), s((n) => { 1235 let i = n + 1; 1236 if (i >= e.length) { 1237 if (r === !1) return clearInterval(t), n; 1238 i = 0; 1239 } 1240 return i; 1241 }); 1242 }, [n]); 1243 return () => clearInterval(t); 1244 }
1244, []), /* @__PURE__ */ (0, Y.jsxs)(i, { 1245 className: "loading-screen", 1246 sx: { 1247 display: "flex", 1248 flexDirection: "column", 1249 minHeight: "100vh", 1250 padding: { 1251 xs: "0 16px", 1252 md: "0 40px" 1253 }, 1254 position: "relative" 1255 }, 1256 children: [/* @__PURE__ */ (0, Y.jsx)(i, { 1257 sx: { 1258 display: "flex", 1259 justifyContent: "flex-end", 1260 padding: "24px 0", 1261 width: "100%", 1262 height: "3.2rem" 1263 }, 1264 children: /* @__PURE__ */ (0, Y.jsx)("img", { 1265 className: "logo", 1266 src: "https://premiumlearnermobileblob.blob.core.windows.net/lead/images/LEAD-LM-Logos.png", 1267 style: { 1268 height: "40px", 1269 objectFit: "contain" 1270 } 1271 }) 1272 }), /* @__PURE__ */ (0, Y.jsx)(i, { 1273 sx: { 1274 flex: 1, 1275 display: "flex", 1276 justifyContent: "center", 1277 alignItems: "center", 1278 padding: "40px 0" 1279 }, 1280 children: /* @__PURE__ */ (0, Y.jsx)(i, { 1281 className: "form-outer", 1282 sx: { 1283 width: "90%", 1284 maxWidth: "1200px" 1285 }, 1286 children: /* @__PURE__ */ (0, Y.jsxs)(i, { 1287 className: "form", 1288 sx: { 1289 width: "100%", 1290 minHeight: "70vh", 1291 display: "flex", 1292 flexDirection: "column", 1293 alignItems: "center", 1294 justifyContent: "center", 1295 backgroundColor: "white", 1296 borderRadius: "var(--radius-md)" 1297 }, 1298 children: [ 1299 /* @__PURE__ */ (0, Y.jsx)(d, { 1300 sx: { 1301 fontSize: { 1302 xs: "1.3rem", 1303 md: "1.3rem" 1304 }, 1305 fontWeight: "var(--font-weight-bold)", 1306 marginTop: "1rem", 1307 textAlign: "center", 1308 textTransform: "uppercase" 1309 }, 1310 children: t[o] 1311 }), 1312 /* @__PURE__ */ (0, Y.jsx)("img", { 1313 src: e[o], 1314 style: { 1315 width: "100%", 1316 maxWidth: "700px", 1317 objectFit: "contain" 1318 } 1319 }), 1320 /* @__PURE__ */ (0, Y.jsx)(d, { 1321 sx: { 1322 textTransform: "uppercase", 1323 fontSize: { 1324 xs: "1rem", 1325 md: "1rem" 1326 }, 1327 fontWeight: "var(--font-weight-bold)", 1328 textAlign: "center", 1329 color: "#48c2c5", 1330 marginBottom: "1rem" 1331 }, 1332 children: "Just a moment while we set up your account." 1333 }), 1334 /* @__PURE__ */ (0, Y.jsx)(i, { 1335 sx: { 1336 height: "12px", 1337 borderRadius: "var(--radius-md)", 1338 width: "100%", 1339 maxWidth: "800px", 1340 backgroundColor: "#e8e8e8", 1341 marginTop: "1rem", 1342 marginBottom: "3rem" 1343 }, 1344 children: /* @__PURE__ */ (0, Y.jsx)(i, { sx: { 1345 height: "12px", 1346 borderRadius: "var(--radius-md)", 1347 width: `${c}%`, 1348 backgroundImage: "linear-gradient(to right, #db7867, #e16137, #e98c2f, #9bbd8b, #48bfc5)", 1349 transition: "width 2s ease" 1350 } }) 1351 }) 1352 ] 1353 }) 1354 }) 1355 })] 1356 }); 1357}, _e = { 1358 email: "", 1359 accountName: "", 1360 password: "", 1361 fullName: "", 1362 phone: { 1363 numberValue: "", 1364 nationalNumber: "" 1365 }, 1366 agreeTos: !1 1367}, ve = { 1368 email: !1, 1369 emailMsg: "", 1370 accountName: !1, 1371 accountNameMsg: "", 1372 password: !1, 1373 passwordMsg: "", 1374 phone: !1, 1375 phoneMsg: "", 1376 tos: !1, 1377 tosMsg: "", 1378 submit: !1, 1379 submitMsg: "" 1380}, ye = { 1381 mode: "setup", 1382 amount: 0, 1383 currency: "usd", 1384 paymentMethodTypes: ["card", "us_bank_account"], 1385 appearance: {} 1386}, be = [ 1387 "https://premiumlearnermobileblob.blob.core.windows.net/e840bd34-5281-40dc-afce-d4c43d9c4fa2/906beb9e-8a03-4436-a1a1-16db15007088.png", 1388 "https://premiumlearnermobileblob.blob.core.windows.net/e840bd34-5281-40dc-afce-d4c43d9c4fa2/e873bd54-8c3d-4b80-afb3-18c00fa7cb3b.png", 1389 "https://premiumlearnermobileblob.blob.core.windows.net/e840bd34-5281-40dc-afce-d4c43d9c4fa2/e9f34311-ac51-4ddd-bf3c-bf835e59a66c.png" 1390], xe = [ 1391 "Getting Ready to Shine!", 1392 "Drying Off the Details!", 1393 "Ready to hit the road!" 1394], Se = "https://premiumlearnermobileblob.blob.core.windows.net/lead/images/LEAD-LM-Logos.png", Ce = ({ viewModel: e, lmLoginUrl: t, stripePublishableKey: n }) => { 1395 let r = JSON.parse(e), a = H(n), o = r.bundles?.[0], s = R(), c = (0, W.useRef)(), [l, u] = (0, W.useState)(null), [d, f] = (0, W.useState)(50), [p, m] = (0, W.useState)(!1), [h, g] = (0, W.useState)(!1), [v, y] = (0, W.useState)(!1), [b, x] = (0, W.useState)(_e), [S, C] = (0, W.useState)(ve); 1396 de(b); 1397 let w = async (e, t) => { 1398 try { 1399 let n = await fetch(e, { 1400 method: "POST", 1401 cache: "no-cache", 1402 headers: { 1403 "Content-Type": "application/json", 1404 "Access-Control-Allow-Credentials": "true" 1405 }, 1406 credentials: "include", 1407 body: JSON.stringify(t) 1408 }); 1409 return n.ok ? n.json() : null; 1410 } catch (e) { 1411 return console.error("signup post failed", e), null; 1412 } 1413 }, T = () => { 1414 g(!0), setTimeout(() => { 1415 window.top.location.replace(window.location.origin); 1416 }, 2e3); 1417 }, E = () => { 1418 y(!1); 1419 }, D = async (e = null) => { 1420 if (!o) { 1421 E(); 1422 return; 1423 } 1424 c.current.reset(); 1425 let n = await c.current.executeAsync(), r = { 1426 urlHostName: window.location.origin, 1427 gRecaptchaResponse: n, 1428 signupValues: [ 1429 { 1430 name: "stripePriceId", 1431 value: o.stripePriceId 1432 }, 1433 { 1434 name: "customerId", 1435 value: b.stripeCustomerId ?? e 1436 }, 1437 { 1438 name: "bundleId", 1439 value: o.id 1440 }, 1441 { 1442 name: "source", 1443 value: "ica" 1444 }, 1445 { 1446 name: "email", 1447 value: b.email.trim() 1448 }, 1449 { 1450 name: "accountName", 1451 value: b.accountName.trim() 1452 }, 1453 { 1454 name: "password", 1455 value: b.password 1456 }, 1457 { 1458 name: "fullName", 1459 value: b.fullName 1460 }, 1461 { 1462 name: "agreeTos", 1463 value: b.agreeTos.toString() 1464 }, 1465 { 1466 name: "phone", 1467 value: b.phone?.nationalNumber 1468 }, 1469 { 1470 name: "referrer", 1471 value: document.referrer 1472 }, 1473 { 1474 name: "howDidYouHear", 1475 value: b.howDidYouHear 1476 }, 1477 { 1478 name: "other", 1479 value: b.other 1480 } 1481 ] 1482 }; 1483 if (y(!0), !(await w(`${t}/Account/AccountSignUp`, r))?.success) { 1484 E(); 1485 return; 1486 } 1487 T(); 1488 }, O = /* @__PURE__ */ (0, Y.jsxs)(i, { 1489 className: "steps",
1490 children: [/* @__PURE__ */ (0, Y.jsx)(Q, { accountData: b }), /* @__PURE__ */ (0, Y.jsx)("img", { 1491 className: "logo", 1492 src: Se, 1493 alt: "LEAD" 1494 })] 1495 }); 1496 return /* @__PURE__ */ (0, Y.jsxs)(M, { 1497 theme: U, 1498 publicSite: !0, 1499 children: [/* @__PURE__ */ (0, Y.jsx)(_, { 1500 timeout: 2e3, 1501 classNames: "loading", 1502 in: v, 1503 mountOnEnter: !0, 1504 unmountOnExit: !0, 1505 style: { position: "absolute" }, 1506 children: /* @__PURE__ */ (0, Y.jsx)(i, { 1507 sx: { 1508 display: "flex", 1509 justifyContent: "center", 1510 height: 1, 1511 width: 1 1512 }, 1513 children: /* @__PURE__ */ (0, Y.jsx)($, { 1514 images: be, 1515 blurbs: xe, 1516 interval: 7e3, 1517 loop: !1, 1518 loadingComplete: h 1519 }) 1520 }) 1521 }, 1), /* @__PURE__ */ (0, Y.jsxs)(i, { 1522 className: "root ica", 1523 children: [/* @__PURE__ */ (0, Y.jsx)(_, { 1524 timeout: 1e3, 1525 classNames: "signup", 1526 in: !v, 1527 appear: !0, 1528 unmountOnExit: !1, 1529 mountOnEnter: !0, 1530 children: /* @__PURE__ */ (0, Y.jsx)("div", { 1531 style: { display: v ? "none" : "block" }, 1532 children: /* @__PURE__ */ (0, Y.jsxs)(B, { children: [ 1533 /* @__PURE__ */ (0, Y.jsx)(N, { 1534 path: "/lead/account", 1535 element: /* @__PURE__ */ (0, Y.jsx)(me, { 1536 onNext: () => s("/lead/checkout"), 1537 bundle: o, 1538 values: b, 1539 setValues: x, 1540 errors: S, 1541 setErrors: C, 1542 numberOfLearners: d, 1543 setNumberOfLearners: f, 1544 stripePreviewOpen: p, 1545 setStripePreviewOpen: m, 1546 emailData: l, 1547 setEmailData: u, 1548 lmLoginUrl: t, 1549 children: O 1550 }) 1551 }), 1552 /* @__PURE__ */ (0, Y.jsx)(N, { 1553 path: "/lead/checkout", 1554 element: /* @__PURE__ */ (0, Y.jsx)(X.Elements, { 1555 stripe: a, 1556 options: ye, 1557 children: /* @__PURE__ */ (0, Y.jsx)(he, { 1558 accountData: b, 1559 setAccountData: x, 1560 lmLoginUrl: t, 1561 bundle: o, 1562 bundles: r.bundles, 1563 onPrevious: () => s("/lead/account"), 1564 onNext: async (e) => await D(e), 1565 isLoading: v, 1566 setIsLoading: y, 1567 onSignupComplete: T, 1568 numberOfLearners: d, 1569 setNumberOfLearners: f, 1570 stripePreviewOpen: p, 1571 setStripePreviewOpen: m, 1572 children: O 1573 }) 1574 }) 1575 }), 1576 /* @__PURE__ */ (0, Y.jsx)(N, { 1577 path: "/lead/*", 1578 element: /* @__PURE__ */ (0, Y.jsx)(z, { 1579 to: "/lead/account", 1580 replace: !0 1581 }) 1582 }) 1583 ] }) 1584 }) 1585 }, 2), /* @__PURE__ */ (0, Y.jsx)(j, { 1586 ref: c, 1587 style: { visibility: "hidden" }, 1588 size: "invisible", 1589 sitekey: "6Ld2QHQdAAAAAEliiSMQFqu1X-aw1-nxdl5JM5tQ" 1590 })] 1591 })] 1592 }); 1593}; 1594//#endregion 1595//#region Components/CarWash/WizardWrapper.jsx 1596function we() { 1597 let { pathname: e } = P(); 1598 return (0, W.useEffect)(() => { 1599 window.scrollTo(0, 0); 1600 }, [e]), null; 1601} 1602function Te(e) { 1603 return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(we, {}), /* @__PURE__ */ (0, Y.jsx)(Ce, { ...e })] }); 1604} 1605var Ee = (e) => { 1606 let [t] = (0, W.useState)(() => F([{ 1607 path: "*", 1608 element: /* @__PURE__ */ (0, Y.jsx)(Te, { ...e }) 1609 }])); 1610 return /* @__PURE__ */ (0, Y.jsx)(L, { router: t }); 1611}; 1612//#endregion 1613export { Te as WizardRoutes, Ee 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.