keystone-design-bootstrap 1.0.68 → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +74 -132
  2. package/dist/design_system/sections/index.js +110 -60
  3. package/dist/design_system/sections/index.js.map +1 -1
  4. package/dist/index.js +117 -61
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/server-api.d.ts +9 -1
  7. package/dist/lib/server-api.js +11 -0
  8. package/dist/lib/server-api.js.map +1 -1
  9. package/dist/tracking/index.d.ts +134 -5
  10. package/dist/tracking/index.js +123 -0
  11. package/dist/tracking/index.js.map +1 -1
  12. package/package.json +2 -1
  13. package/src/design_system/components/ChatWidget.tsx +6 -7
  14. package/src/design_system/portal/LoginForm.tsx +21 -2
  15. package/src/design_system/portal/PortalPage.tsx +5 -5
  16. package/src/design_system/portal/PortalTabTracker.tsx +10 -2
  17. package/src/design_system/sections/contact-section-form.aman.tsx +6 -1
  18. package/src/design_system/sections/contact-section-form.balance.tsx +6 -1
  19. package/src/design_system/sections/contact-section-form.barelux.tsx +6 -1
  20. package/src/design_system/sections/contact-section-form.tsx +6 -1
  21. package/src/design_system/sections/email-signup-section.tsx +6 -1
  22. package/src/design_system/sections/header-navigation.aman.tsx +6 -1
  23. package/src/design_system/sections/header-navigation.balance.tsx +6 -1
  24. package/src/design_system/sections/header-navigation.barelux.tsx +6 -1
  25. package/src/design_system/sections/header-navigation.tsx +6 -1
  26. package/src/design_system/sections/job-application-form.aman.tsx +6 -1
  27. package/src/design_system/sections/job-application-form.barelux.tsx +6 -1
  28. package/src/design_system/sections/job-application-form.tsx +6 -1
  29. package/src/lib/server-api.ts +18 -0
  30. package/src/next/layouts/root-layout.tsx +78 -33
  31. package/src/tracking/KeystoneAnalyticsTracker.tsx +41 -0
  32. package/src/tracking/PostHogProvider.tsx +128 -0
  33. package/src/tracking/captureEvent.ts +140 -0
  34. package/src/tracking/index.ts +5 -0
package/dist/index.js CHANGED
@@ -6303,6 +6303,12 @@ function firePixelEvent(event, params, eventId) {
6303
6303
  fbq("track", event, customData, eventData);
6304
6304
  }
6305
6305
 
6306
+ // src/tracking/captureEvent.ts
6307
+ import posthog from "posthog-js";
6308
+ function captureEvent(event, ...args) {
6309
+ posthog.capture(event, args[0]);
6310
+ }
6311
+
6306
6312
  // src/next/contexts/form-definitions.tsx
6307
6313
  import React19, { createContext as createContext9, useContext as useContext10 } from "react";
6308
6314
  var FormDefinitionsContext = createContext9({
@@ -6359,14 +6365,18 @@ var ContactSectionForm = ({
6359
6365
  onSuccess == null ? void 0 : onSuccess();
6360
6366
  await setPixelUserData({ email: data.email, phone: data.phone });
6361
6367
  firePixelEvent("Lead", void 0, result.eventId);
6368
+ captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
6362
6369
  setTimeout(() => setSubmitStatus("idle"), 5e3);
6363
6370
  } else {
6371
+ const errorMsg = result.error || "Something went wrong. Please try again.";
6364
6372
  setSubmitStatus("error");
6365
- setStatusMessage(result.error || "Something went wrong. Please try again.");
6373
+ setStatusMessage(errorMsg);
6374
+ captureEvent("form_failed", { form_type: "lead", error: errorMsg });
6366
6375
  }
6367
6376
  } catch (e2) {
6368
6377
  setSubmitStatus("error");
6369
6378
  setStatusMessage("Network error. Please try again later.");
6379
+ captureEvent("form_failed", { form_type: "lead", error: "network_error" });
6370
6380
  }
6371
6381
  setIsSubmitting(false);
6372
6382
  };
@@ -6639,16 +6649,21 @@ function HeaderNavigation({
6639
6649
  companyInformation,
6640
6650
  websitePhotos
6641
6651
  }) {
6642
- var _a, _b, _c, _d, _e, _f, _g, _h;
6652
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
6643
6653
  const headerRef = useRef7(null);
6644
6654
  const navigation = navigationOverride || ((_a = config == null ? void 0 : config.navigation) == null ? void 0 : _a.header) || [];
6645
6655
  const logoImage = logoImageOverride || getLogoUrl(websitePhotos) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.image);
6646
6656
  const logoText = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_c = props == null ? void 0 : props.logo) == null ? void 0 : _c.text) || "";
6647
6657
  const cta_button = props == null ? void 0 : props.cta_button;
6648
- const ctaUrls = resolveCtaUrls(companyInformation);
6658
+ const resolvedCtaUrls = resolveCtaUrls(companyInformation);
6659
+ const ctaUrls = {
6660
+ primaryHref: (_d = cta_button == null ? void 0 : cta_button.secondary_href) != null ? _d : resolvedCtaUrls.primaryHref,
6661
+ secondaryHref: (_e = cta_button == null ? void 0 : cta_button.href) != null ? _e : resolvedCtaUrls.secondaryHref,
6662
+ hasSecondary: (cta_button == null ? void 0 : cta_button.secondary_href) != null || resolvedCtaUrls.hasSecondary
6663
+ };
6649
6664
  const logo = {
6650
6665
  text: logoText || "",
6651
- href: ((_d = props == null ? void 0 : props.logo) == null ? void 0 : _d.href) || "/",
6666
+ href: ((_f = props == null ? void 0 : props.logo) == null ? void 0 : _f.href) || "/",
6652
6667
  image: logoImage
6653
6668
  };
6654
6669
  const dynamicNavigation = navigation;
@@ -6756,7 +6771,7 @@ function HeaderNavigation({
6756
6771
  width: 32,
6757
6772
  height: 32
6758
6773
  }
6759
- ) : /* @__PURE__ */ React22.createElement("div", { className: "h-8 w-8 bg-blue-600 rounded-lg flex items-center justify-center" }, /* @__PURE__ */ React22.createElement("span", { className: "text-white font-bold text-lg" }, ((_e = logoText == null ? void 0 : logoText.charAt(0)) == null ? void 0 : _e.toUpperCase()) || "")), /* @__PURE__ */ React22.createElement("span", { className: "text-xl font-bold text-primary hidden md:block" }, logoText)), /* @__PURE__ */ React22.createElement("nav", { className: "max-md:hidden" }, /* @__PURE__ */ React22.createElement("ul", { className: "flex items-center gap-0.5" }, headerNavItems.map((navItem) => /* @__PURE__ */ React22.createElement("li", { key: navItem.label }, navItem.menu ? /* @__PURE__ */ React22.createElement(HoverDropdown, { label: navItem.label, href: navItem.href }, navItem.menu) : /* @__PURE__ */ React22.createElement(
6774
+ ) : /* @__PURE__ */ React22.createElement("div", { className: "h-8 w-8 bg-blue-600 rounded-lg flex items-center justify-center" }, /* @__PURE__ */ React22.createElement("span", { className: "text-white font-bold text-lg" }, ((_g = logoText == null ? void 0 : logoText.charAt(0)) == null ? void 0 : _g.toUpperCase()) || "")), /* @__PURE__ */ React22.createElement("span", { className: "text-xl font-bold text-primary hidden md:block" }, logoText)), /* @__PURE__ */ React22.createElement("nav", { className: "max-md:hidden" }, /* @__PURE__ */ React22.createElement("ul", { className: "flex items-center gap-0.5" }, headerNavItems.map((navItem) => /* @__PURE__ */ React22.createElement("li", { key: navItem.label }, navItem.menu ? /* @__PURE__ */ React22.createElement(HoverDropdown, { label: navItem.label, href: navItem.href }, navItem.menu) : /* @__PURE__ */ React22.createElement(
6760
6775
  Link4,
6761
6776
  {
6762
6777
  href: navItem.href || "#",
@@ -6777,7 +6792,7 @@ function HeaderNavigation({
6777
6792
  Button2,
6778
6793
  {
6779
6794
  href: ctaUrls.primaryHref,
6780
- target: (_f = cta_button == null ? void 0 : cta_button.target) != null ? _f : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6795
+ target: (_h = cta_button == null ? void 0 : cta_button.target) != null ? _h : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6781
6796
  rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
6782
6797
  color: "primary",
6783
6798
  size: "lg"
@@ -6854,7 +6869,7 @@ function HeaderNavigation({
6854
6869
  Button2,
6855
6870
  {
6856
6871
  href: ctaUrls.primaryHref,
6857
- target: (_g = cta_button == null ? void 0 : cta_button.target) != null ? _g : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6872
+ target: (_i = cta_button == null ? void 0 : cta_button.target) != null ? _i : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6858
6873
  rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
6859
6874
  color: "primary",
6860
6875
  size: "lg"
@@ -6876,7 +6891,7 @@ function HeaderNavigation({
6876
6891
  Button2,
6877
6892
  {
6878
6893
  href: ctaUrls.primaryHref,
6879
- target: (_h = cta_button == null ? void 0 : cta_button.target) != null ? _h : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6894
+ target: (_j = cta_button == null ? void 0 : cta_button.target) != null ? _j : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
6880
6895
  rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
6881
6896
  color: "primary",
6882
6897
  className: `${(cta_button == null ? void 0 : cta_button.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
@@ -8522,14 +8537,18 @@ var JobApplicationForm = ({ jobSlug, formDefinition, inline = false }) => {
8522
8537
  setSubmitStatus("success");
8523
8538
  setStatusMessage(result.message || "Thank you for applying! We'll be in touch soon.");
8524
8539
  (_a = formRef.current) == null ? void 0 : _a.reset();
8540
+ captureEvent("form_submitted", { form_type: "job_application" });
8525
8541
  setTimeout(() => setSubmitStatus("idle"), 5e3);
8526
8542
  } else {
8543
+ const errorMsg = result.error || "Something went wrong. Please try again.";
8527
8544
  setSubmitStatus("error");
8528
- setStatusMessage(result.error || "Something went wrong. Please try again.");
8545
+ setStatusMessage(errorMsg);
8546
+ captureEvent("form_failed", { form_type: "job_application", error: errorMsg });
8529
8547
  }
8530
8548
  } catch (e2) {
8531
8549
  setSubmitStatus("error");
8532
8550
  setStatusMessage("Network error. Please try again.");
8551
+ captureEvent("form_failed", { form_type: "job_application", error: "network_error" });
8533
8552
  }
8534
8553
  setIsSubmitting(false);
8535
8554
  };
@@ -8647,7 +8666,7 @@ function HeaderNavigation2({
8647
8666
  companyInformation,
8648
8667
  websitePhotos
8649
8668
  }) {
8650
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
8669
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
8651
8670
  const [activeDropdown, setActiveDropdown] = useState16(null);
8652
8671
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState16(false);
8653
8672
  const [dropdownTop, setDropdownTop] = useState16(0);
@@ -8671,7 +8690,12 @@ function HeaderNavigation2({
8671
8690
  const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
8672
8691
  const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
8673
8692
  const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
8674
- const ctaUrls = resolveCtaUrls(companyInformation);
8693
+ const resolvedCtaUrls = resolveCtaUrls(companyInformation);
8694
+ const ctaUrls = {
8695
+ primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
8696
+ secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
8697
+ hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
8698
+ };
8675
8699
  const pathname = usePathname2();
8676
8700
  const portalPath = resolvePortalPath(companyInformation);
8677
8701
  const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
@@ -8729,7 +8753,7 @@ function HeaderNavigation2({
8729
8753
  return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-secondary transition-all duration-300" }, /* @__PURE__ */ React36.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React36.createElement("div", { className: cx(
8730
8754
  "relative flex items-center justify-between transition-all duration-300",
8731
8755
  isScrolled ? "py-2" : "py-8"
8732
- ) }, /* @__PURE__ */ React36.createElement(Link6, { href: ((_d = props == null ? void 0 : props.logo) == null ? void 0 : _d.href) || "/", className: "flex items-center" }, logoUrl && /* @__PURE__ */ React36.createElement(
8756
+ ) }, /* @__PURE__ */ React36.createElement(Link6, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center" }, logoUrl && /* @__PURE__ */ React36.createElement(
8733
8757
  Image11,
8734
8758
  {
8735
8759
  src: logoUrl,
@@ -8738,7 +8762,7 @@ function HeaderNavigation2({
8738
8762
  width: 120,
8739
8763
  height: 40
8740
8764
  }
8741
- )), /* @__PURE__ */ React36.createElement(Link6, { href: ((_e = props == null ? void 0 : props.logo) == null ? void 0 : _e.href) || "/", className: "absolute left-1/2 transform -translate-x-1/2 font-display text-2xl md:text-3xl font-normal uppercase tracking-widest text-fg-primary", suppressHydrationWarning: true }, companyName), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-3" }, ((_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8765
+ )), /* @__PURE__ */ React36.createElement(Link6, { href: ((_j = props == null ? void 0 : props.logo) == null ? void 0 : _j.href) || "/", className: "absolute left-1/2 transform -translate-x-1/2 font-display text-2xl md:text-3xl font-normal uppercase tracking-widest text-fg-primary", suppressHydrationWarning: true }, companyName), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-3" }, ((_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8742
8766
  Button2,
8743
8767
  {
8744
8768
  href: ctaUrls.secondaryHref,
@@ -8753,13 +8777,13 @@ function HeaderNavigation2({
8753
8777
  Button2,
8754
8778
  {
8755
8779
  href: ctaUrls.primaryHref,
8756
- target: (_h = (_g = props == null ? void 0 : props.cta_button) == null ? void 0 : _g.target) != null ? _h : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8757
- rel: ((_i = props == null ? void 0 : props.cta_button) == null ? void 0 : _i.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8780
+ target: (_m = (_l = props == null ? void 0 : props.cta_button) == null ? void 0 : _l.target) != null ? _m : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8781
+ rel: ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8758
8782
  size: "sm",
8759
8783
  color: "primary",
8760
8784
  className: "font-body text-sm uppercase tracking-wide px-6 py-2 rounded-sm"
8761
8785
  },
8762
- ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.label) || "Contact"
8786
+ ((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_p = props == null ? void 0 : props.cta_button) == null ? void 0 : _p.label) || "Contact"
8763
8787
  ))), /* @__PURE__ */ React36.createElement("nav", { className: "border-b border-secondary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center justify-center gap-8 py-4" }, navigation.map((item, i) => /* @__PURE__ */ React36.createElement(
8764
8788
  "div",
8765
8789
  {
@@ -8816,7 +8840,7 @@ function HeaderNavigation2({
8816
8840
  "aria-label": "Open menu"
8817
8841
  },
8818
8842
  /* @__PURE__ */ React36.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React36.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
8819
- ), /* @__PURE__ */ React36.createElement(Link6, { href: ((_l = props == null ? void 0 : props.logo) == null ? void 0 : _l.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React36.createElement(
8843
+ ), /* @__PURE__ */ React36.createElement(Link6, { href: ((_q = props == null ? void 0 : props.logo) == null ? void 0 : _q.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React36.createElement(
8820
8844
  Image11,
8821
8845
  {
8822
8846
  src: logoUrl,
@@ -8870,7 +8894,7 @@ function HeaderNavigation2({
8870
8894
  viewAllLabel,
8871
8895
  " \u2192"
8872
8896
  ))));
8873
- }))), /* @__PURE__ */ React36.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-3" }, ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8897
+ }))), /* @__PURE__ */ React36.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-3" }, ((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8874
8898
  Button2,
8875
8899
  {
8876
8900
  href: ctaUrls.secondaryHref,
@@ -8885,14 +8909,14 @@ function HeaderNavigation2({
8885
8909
  Button2,
8886
8910
  {
8887
8911
  href: ctaUrls.primaryHref,
8888
- target: (_o = (_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.target) != null ? _o : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8889
- rel: ((_p = props == null ? void 0 : props.cta_button) == null ? void 0 : _p.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8912
+ target: (_t = (_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.target) != null ? _t : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8913
+ rel: ((_u = props == null ? void 0 : props.cta_button) == null ? void 0 : _u.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8890
8914
  color: "primary",
8891
8915
  className: "w-full font-body text-sm uppercase tracking-wide py-3 rounded-sm",
8892
8916
  onClick: () => setIsMobileMenuOpen(false)
8893
8917
  },
8894
- ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.label) || "Contact"
8895
- ))))), !isPortalPage && /* @__PURE__ */ React36.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-0" }, ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8918
+ ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.label) || "Contact"
8919
+ ))))), !isPortalPage && /* @__PURE__ */ React36.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-0" }, ((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
8896
8920
  Button2,
8897
8921
  {
8898
8922
  href: ctaUrls.secondaryHref,
@@ -8906,12 +8930,12 @@ function HeaderNavigation2({
8906
8930
  Button2,
8907
8931
  {
8908
8932
  href: ctaUrls.primaryHref,
8909
- target: (_u = (_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.target) != null ? _u : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8910
- rel: ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8933
+ target: (_z = (_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.target) != null ? _z : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
8934
+ rel: ((_A = props == null ? void 0 : props.cta_button) == null ? void 0 : _A.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
8911
8935
  color: "primary",
8912
- className: `${((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
8936
+ className: `${((_B = props == null ? void 0 : props.cta_button) == null ? void 0 : _B.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
8913
8937
  },
8914
- ((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.label) || "Contact"
8938
+ ((_C = props == null ? void 0 : props.cta_button) == null ? void 0 : _C.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_D = props == null ? void 0 : props.cta_button) == null ? void 0 : _D.label) || "Contact"
8915
8939
  ))));
8916
8940
  }
8917
8941
  registerThemeVariant("header-navigation", "aman", HeaderNavigation2);
@@ -9142,14 +9166,18 @@ var ContactSectionForm2 = ({
9142
9166
  onSuccess == null ? void 0 : onSuccess();
9143
9167
  await setPixelUserData({ email: data.email, phone: data.phone });
9144
9168
  firePixelEvent("Lead", void 0, result.eventId);
9169
+ captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
9145
9170
  setTimeout(() => setSubmitStatus("idle"), 5e3);
9146
9171
  } else {
9172
+ const errorMsg = result.error || "Something went wrong. Please try again.";
9147
9173
  setSubmitStatus("error");
9148
- setStatusMessage(result.error || "Something went wrong. Please try again.");
9174
+ setStatusMessage(errorMsg);
9175
+ captureEvent("form_failed", { form_type: "lead", error: errorMsg });
9149
9176
  }
9150
9177
  } catch (e2) {
9151
9178
  setSubmitStatus("error");
9152
9179
  setStatusMessage("Network error. Please try again later.");
9180
+ captureEvent("form_failed", { form_type: "lead", error: "network_error" });
9153
9181
  }
9154
9182
  setIsSubmitting(false);
9155
9183
  };
@@ -17743,7 +17771,7 @@ function HeaderNavigation3({
17743
17771
  companyInformation,
17744
17772
  websitePhotos
17745
17773
  }) {
17746
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
17774
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
17747
17775
  const [activeDropdown, setActiveDropdown] = useState23(null);
17748
17776
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState23(false);
17749
17777
  const closeTimeoutRef = useRef14(null);
@@ -17757,7 +17785,12 @@ function HeaderNavigation3({
17757
17785
  const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
17758
17786
  const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
17759
17787
  const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
17760
- const ctaUrls = resolveCtaUrls(companyInformation);
17788
+ const resolvedCtaUrls = resolveCtaUrls(companyInformation);
17789
+ const ctaUrls = {
17790
+ primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
17791
+ secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
17792
+ hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
17793
+ };
17761
17794
  const pathname = usePathname3();
17762
17795
  const portalPath = resolvePortalPath(companyInformation);
17763
17796
  const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
@@ -17805,7 +17838,7 @@ function HeaderNavigation3({
17805
17838
  viewAllLabel: ""
17806
17839
  };
17807
17840
  };
17808
- return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "mx-auto max-w-7xl px-4 md:px-8" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between py-4" }, /* @__PURE__ */ React45.createElement(Link8, { href: ((_d = props == null ? void 0 : props.logo) == null ? void 0 : _d.href) || "/", className: "flex items-center flex-shrink-0" }, logoUrl ? /* @__PURE__ */ React45.createElement(
17841
+ return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "mx-auto max-w-7xl px-4 md:px-8" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between py-4" }, /* @__PURE__ */ React45.createElement(Link8, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center flex-shrink-0" }, logoUrl ? /* @__PURE__ */ React45.createElement(
17809
17842
  Image12,
17810
17843
  {
17811
17844
  src: logoUrl,
@@ -17859,7 +17892,7 @@ function HeaderNavigation3({
17859
17892
  ));
17860
17893
  })()
17861
17894
  )
17862
- ))), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 ml-4" }, ((_e = props == null ? void 0 : props.cta_button) == null ? void 0 : _e.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17895
+ ))), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 ml-4" }, ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17863
17896
  Button2,
17864
17897
  {
17865
17898
  href: ctaUrls.secondaryHref,
@@ -17873,12 +17906,12 @@ function HeaderNavigation3({
17873
17906
  Button2,
17874
17907
  {
17875
17908
  href: ctaUrls.primaryHref,
17876
- target: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.target) != null ? _g : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
17877
- rel: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
17909
+ target: (_l = (_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.target) != null ? _l : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
17910
+ rel: ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
17878
17911
  color: "primary",
17879
17912
  size: "sm"
17880
17913
  },
17881
- ((_i = props == null ? void 0 : props.cta_button) == null ? void 0 : _i.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.label) || ""
17914
+ ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.label) || ""
17882
17915
  ))))), /* @__PURE__ */ React45.createElement("header", { className: "md:hidden sticky top-0 z-50 bg-primary border-b border-secondary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between px-4 py-4" }, /* @__PURE__ */ React45.createElement(
17883
17916
  "button",
17884
17917
  {
@@ -17887,7 +17920,7 @@ function HeaderNavigation3({
17887
17920
  "aria-label": "Open menu"
17888
17921
  },
17889
17922
  /* @__PURE__ */ React45.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React45.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
17890
- ), /* @__PURE__ */ React45.createElement(Link8, { href: ((_k = props == null ? void 0 : props.logo) == null ? void 0 : _k.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React45.createElement(
17923
+ ), /* @__PURE__ */ React45.createElement(Link8, { href: ((_p = props == null ? void 0 : props.logo) == null ? void 0 : _p.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React45.createElement(
17891
17924
  Image12,
17892
17925
  {
17893
17926
  src: logoUrl,
@@ -17932,7 +17965,7 @@ function HeaderNavigation3({
17932
17965
  },
17933
17966
  link.label
17934
17967
  )))));
17935
- }))), /* @__PURE__ */ React45.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-3" }, ((_l = props == null ? void 0 : props.cta_button) == null ? void 0 : _l.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17968
+ }))), /* @__PURE__ */ React45.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-3" }, ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17936
17969
  Button2,
17937
17970
  {
17938
17971
  href: ctaUrls.secondaryHref,
@@ -17951,8 +17984,8 @@ function HeaderNavigation3({
17951
17984
  className: "w-full",
17952
17985
  onClick: () => setIsMobileMenuOpen(false)
17953
17986
  },
17954
- ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.label) || ""
17955
- ))))), !isPortalPage && /* @__PURE__ */ React45.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex gap-0" }, ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17987
+ ((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.label) || ""
17988
+ ))))), !isPortalPage && /* @__PURE__ */ React45.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex gap-0" }, ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
17956
17989
  Button2,
17957
17990
  {
17958
17991
  href: ctaUrls.secondaryHref,
@@ -17966,12 +17999,12 @@ function HeaderNavigation3({
17966
17999
  Button2,
17967
18000
  {
17968
18001
  href: ctaUrls.primaryHref,
17969
- target: (_p = (_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.target) != null ? _p : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
17970
- rel: ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
18002
+ target: (_u = (_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.target) != null ? _u : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
18003
+ rel: ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
17971
18004
  color: "primary",
17972
- className: `${((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
18005
+ className: `${((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
17973
18006
  },
17974
- ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.label) || "Contact"
18007
+ ((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.label) || "Contact"
17975
18008
  ))));
17976
18009
  }
17977
18010
  registerThemeVariant("header-navigation", "barelux", HeaderNavigation3);
@@ -18348,14 +18381,18 @@ var ContactSectionForm3 = ({
18348
18381
  onSuccess == null ? void 0 : onSuccess();
18349
18382
  await setPixelUserData({ email: data.email, phone: data.phone });
18350
18383
  firePixelEvent("Lead", void 0, result.eventId);
18384
+ captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
18351
18385
  setTimeout(() => setSubmitStatus("idle"), 5e3);
18352
18386
  } else {
18387
+ const errorMsg = result.error || "Something went wrong. Please try again.";
18353
18388
  setSubmitStatus("error");
18354
- setStatusMessage(result.error || "Something went wrong. Please try again.");
18389
+ setStatusMessage(errorMsg);
18390
+ captureEvent("form_failed", { form_type: "lead", error: errorMsg });
18355
18391
  }
18356
18392
  } catch (e2) {
18357
18393
  setSubmitStatus("error");
18358
18394
  setStatusMessage("Network error. Please try again later.");
18395
+ captureEvent("form_failed", { form_type: "lead", error: "network_error" });
18359
18396
  }
18360
18397
  setIsSubmitting(false);
18361
18398
  };
@@ -18537,7 +18574,7 @@ function HeaderNavigation4({
18537
18574
  companyInformation,
18538
18575
  websitePhotos
18539
18576
  }) {
18540
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
18577
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
18541
18578
  const [activeDropdown, setActiveDropdown] = useState27(null);
18542
18579
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState27(false);
18543
18580
  const closeTimeoutRef = useRef16(null);
@@ -18551,7 +18588,12 @@ function HeaderNavigation4({
18551
18588
  const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
18552
18589
  const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
18553
18590
  const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
18554
- const ctaUrls = resolveCtaUrls(companyInformation);
18591
+ const resolvedCtaUrls = resolveCtaUrls(companyInformation);
18592
+ const ctaUrls = {
18593
+ primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
18594
+ secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
18595
+ hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
18596
+ };
18555
18597
  const pathname = usePathname4();
18556
18598
  const portalPath = resolvePortalPath(companyInformation);
18557
18599
  const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
@@ -18581,7 +18623,7 @@ function HeaderNavigation4({
18581
18623
  const handleDropdownMouseLeave = useCallback9(() => {
18582
18624
  handleMouseLeave();
18583
18625
  }, [handleMouseLeave]);
18584
- return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React53.createElement("div", { className: "relative flex items-center justify-between py-5" }, /* @__PURE__ */ React53.createElement(Link10, { href: ((_d = props == null ? void 0 : props.logo) == null ? void 0 : _d.href) || "/", className: "flex items-center z-10" }, logoUrl ? /* @__PURE__ */ React53.createElement(
18626
+ return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React53.createElement("div", { className: "relative flex items-center justify-between py-5" }, /* @__PURE__ */ React53.createElement(Link10, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center z-10" }, logoUrl ? /* @__PURE__ */ React53.createElement(
18585
18627
  Image13,
18586
18628
  {
18587
18629
  src: logoUrl,
@@ -18625,7 +18667,7 @@ function HeaderNavigation4({
18625
18667
  child.label
18626
18668
  )))
18627
18669
  )
18628
- ))), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 z-10" }, ((_e = props == null ? void 0 : props.cta_button) == null ? void 0 : _e.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18670
+ ))), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 z-10" }, ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18629
18671
  Button2,
18630
18672
  {
18631
18673
  href: ctaUrls.secondaryHref,
@@ -18639,12 +18681,12 @@ function HeaderNavigation4({
18639
18681
  Button2,
18640
18682
  {
18641
18683
  href: ctaUrls.primaryHref,
18642
- target: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.target) != null ? _g : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
18643
- rel: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
18684
+ target: (_l = (_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.target) != null ? _l : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
18685
+ rel: ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
18644
18686
  color: "primary",
18645
18687
  size: "sm"
18646
18688
  },
18647
- ((_i = props == null ? void 0 : props.cta_button) == null ? void 0 : _i.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.label) || ""
18689
+ ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.label) || ""
18648
18690
  ))))), /* @__PURE__ */ React53.createElement("header", { className: "md:hidden sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center justify-between px-4 py-4" }, /* @__PURE__ */ React53.createElement(
18649
18691
  "button",
18650
18692
  {
@@ -18653,7 +18695,7 @@ function HeaderNavigation4({
18653
18695
  "aria-label": "Open menu"
18654
18696
  },
18655
18697
  /* @__PURE__ */ React53.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React53.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
18656
- ), /* @__PURE__ */ React53.createElement(Link10, { href: ((_k = props == null ? void 0 : props.logo) == null ? void 0 : _k.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React53.createElement(
18698
+ ), /* @__PURE__ */ React53.createElement(Link10, { href: ((_p = props == null ? void 0 : props.logo) == null ? void 0 : _p.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React53.createElement(
18657
18699
  Image13,
18658
18700
  {
18659
18701
  src: logoUrl,
@@ -18696,7 +18738,7 @@ function HeaderNavigation4({
18696
18738
  onClick: () => setIsMobileMenuOpen(false)
18697
18739
  },
18698
18740
  child.label
18699
- )))))))), /* @__PURE__ */ React53.createElement("div", { className: "px-4 py-6", style: { borderTop: "1px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col gap-3" }, ((_l = props == null ? void 0 : props.cta_button) == null ? void 0 : _l.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18741
+ )))))))), /* @__PURE__ */ React53.createElement("div", { className: "px-4 py-6", style: { borderTop: "1px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col gap-3" }, ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18700
18742
  Button2,
18701
18743
  {
18702
18744
  href: ctaUrls.secondaryHref,
@@ -18715,8 +18757,8 @@ function HeaderNavigation4({
18715
18757
  className: "w-full",
18716
18758
  onClick: () => setIsMobileMenuOpen(false)
18717
18759
  },
18718
- ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.label) || ""
18719
- ))))), !isPortalPage && /* @__PURE__ */ React53.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden", style: { backgroundColor: "rgb(148, 133, 84)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex gap-0" }, ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18760
+ ((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.label) || ""
18761
+ ))))), !isPortalPage && /* @__PURE__ */ React53.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden", style: { backgroundColor: "rgb(148, 133, 84)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex gap-0" }, ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
18720
18762
  Button2,
18721
18763
  {
18722
18764
  href: ctaUrls.secondaryHref,
@@ -18731,12 +18773,12 @@ function HeaderNavigation4({
18731
18773
  Button2,
18732
18774
  {
18733
18775
  href: ctaUrls.primaryHref,
18734
- target: (_p = (_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.target) != null ? _p : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
18735
- rel: ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
18776
+ target: (_u = (_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.target) != null ? _u : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
18777
+ rel: ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
18736
18778
  color: "primary",
18737
- className: `${((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
18779
+ className: `${((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
18738
18780
  },
18739
- ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.label) || "Contact"
18781
+ ((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.label) || "Contact"
18740
18782
  ))));
18741
18783
  }
18742
18784
  registerThemeVariant("header-navigation", "balance", HeaderNavigation4);
@@ -18846,14 +18888,18 @@ var ContactSectionForm4 = ({
18846
18888
  onSuccess == null ? void 0 : onSuccess();
18847
18889
  await setPixelUserData({ email: data.email, phone: data.phone });
18848
18890
  firePixelEvent("Lead", void 0, result.eventId);
18891
+ captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
18849
18892
  setTimeout(() => setSubmitStatus("idle"), 5e3);
18850
18893
  } else {
18894
+ const errorMsg = result.error || "Something went wrong. Please try again.";
18851
18895
  setSubmitStatus("error");
18852
- setStatusMessage(result.error || "Something went wrong. Please try again.");
18896
+ setStatusMessage(errorMsg);
18897
+ captureEvent("form_failed", { form_type: "lead", error: errorMsg });
18853
18898
  }
18854
18899
  } catch (e2) {
18855
18900
  setSubmitStatus("error");
18856
18901
  setStatusMessage("Network error. Please try again later.");
18902
+ captureEvent("form_failed", { form_type: "lead", error: "network_error" });
18857
18903
  }
18858
18904
  setIsSubmitting(false);
18859
18905
  };
@@ -19308,14 +19354,18 @@ var EmailSignupSection = ({
19308
19354
  setSubmitStatus("success");
19309
19355
  setStatusMessage(result.message || successMessage);
19310
19356
  (_a = formRef.current) == null ? void 0 : _a.reset();
19357
+ captureEvent("form_submitted", { form_type: "marketing_list_signup" });
19311
19358
  setTimeout(() => setSubmitStatus("idle"), 6e3);
19312
19359
  } else {
19360
+ const errorMsg = result.error || "Something went wrong. Please try again.";
19313
19361
  setSubmitStatus("error");
19314
- setStatusMessage(result.error || "Something went wrong. Please try again.");
19362
+ setStatusMessage(errorMsg);
19363
+ captureEvent("form_failed", { form_type: "marketing_list_signup", error: errorMsg });
19315
19364
  }
19316
19365
  } catch (e2) {
19317
19366
  setSubmitStatus("error");
19318
19367
  setStatusMessage("Network error. Please try again later.");
19368
+ captureEvent("form_failed", { form_type: "marketing_list_signup", error: "network_error" });
19319
19369
  }
19320
19370
  setIsSubmitting(false);
19321
19371
  };
@@ -19990,6 +20040,7 @@ function ChatWidget({
19990
20040
  });
19991
20041
  if (response.ok) {
19992
20042
  const result = await response.json();
20043
+ captureEvent("chat_message_sent", { is_authenticated: Boolean(contactId) });
19993
20044
  if ((_a = result.data) == null ? void 0 : _a.job_id) {
19994
20045
  pollForAgentReply();
19995
20046
  } else if (((_b = result.data) == null ? void 0 : _b.status) === "agent_unavailable" || ((_c = result.data) == null ? void 0 : _c.status) === "no_auto_reply") {
@@ -20000,11 +20051,13 @@ function ChatWidget({
20000
20051
  }
20001
20052
  } else {
20002
20053
  setMessages((prev) => prev.filter((m) => m.id !== tempMessage.id));
20054
+ captureEvent("chat_message_failed", { error: "send_failed" });
20003
20055
  console.error("Failed to send message");
20004
20056
  setIsLoading(false);
20005
20057
  }
20006
20058
  } catch (error) {
20007
20059
  setMessages((prev) => prev.filter((m) => m.id !== tempMessage.id));
20060
+ captureEvent("chat_message_failed", { error: "network_error" });
20008
20061
  console.error("Failed to send message:", error);
20009
20062
  setIsLoading(false);
20010
20063
  }
@@ -20033,7 +20086,10 @@ function ChatWidget({
20033
20086
  !isOpen && /* @__PURE__ */ React63.createElement(
20034
20087
  "button",
20035
20088
  {
20036
- onClick: () => setIsOpen(true),
20089
+ onClick: () => {
20090
+ setIsOpen(true);
20091
+ captureEvent("chat_opened");
20092
+ },
20037
20093
  className: cx(
20038
20094
  "flex size-15 items-center justify-center rounded-full border-none text-white shadow-xl transition-transform duration-200 hover:scale-105 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand",
20039
20095
  widgetBrandClass