@zenpatient-org/healthspan-marketing-ui 0.1.103 → 0.1.106

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 (40) hide show
  1. package/dist/components/TextInput/TextInput.d.ts +1 -2
  2. package/dist/components/TextInput/index.d.ts +1 -0
  3. package/dist/components/Typography/Typography.cjs.js +1 -1
  4. package/dist/components/Typography/Typography.es.js +9 -9
  5. package/dist/healthspan-marketing-ui.css +1 -1
  6. package/dist/modules/AllInOne/AllInOne.cjs.js +1 -1
  7. package/dist/modules/AllInOne/AllInOne.es.js +193 -142
  8. package/dist/modules/AllInOne/allInOne.module.css.cjs.js +1 -1
  9. package/dist/modules/AllInOne/allInOne.module.css.es.js +14 -12
  10. package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
  11. package/dist/modules/CallToAction/CallToAction.es.js +112 -83
  12. package/dist/modules/HSModal/HSModal.cjs.js +1 -0
  13. package/dist/modules/HSModal/HSModal.d.ts +4 -0
  14. package/dist/modules/HSModal/HSModal.es.js +25 -0
  15. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.cjs.js +1 -0
  16. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.d.ts +3 -0
  17. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.es.js +53 -0
  18. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -0
  19. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts +8 -0
  20. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +88 -0
  21. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/index.d.ts +1 -0
  22. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.cjs.js +1 -0
  23. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.es.js +8 -0
  24. package/dist/modules/HSModal/components/MailchimpModal/components/index.d.ts +1 -0
  25. package/dist/modules/HSModal/components/MailchimpModal/index.d.ts +1 -0
  26. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.cjs.js +1 -0
  27. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.es.js +21 -0
  28. package/dist/modules/HSModal/components/index.d.ts +1 -0
  29. package/dist/modules/HSModal/hsModal.module.css.cjs.js +1 -0
  30. package/dist/modules/HSModal/hsModal.module.css.es.js +7 -0
  31. package/dist/modules/HSModal/index.d.ts +3 -0
  32. package/dist/modules/HSModal/types.d.ts +23 -0
  33. package/dist/modules/HSModal/useHSModal.cjs.js +1 -0
  34. package/dist/modules/HSModal/useHSModal.d.ts +20 -0
  35. package/dist/modules/HSModal/useHSModal.es.js +63 -0
  36. package/dist/pageComponents/Bubbles/Bubbles.cjs.js +1 -1
  37. package/dist/pageComponents/Bubbles/Bubbles.es.js +13 -13
  38. package/dist/pageComponents/CallToActionDefault/CallToActionDefault.cjs.js +1 -1
  39. package/dist/pageComponents/CallToActionDefault/CallToActionDefault.es.js +1 -1
  40. package/package.json +6 -1
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),B=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),E=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),p=require("react"),H=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),V=require("../../components/Typography/Typography.cjs.js"),S=require("../../utils/cn/cn.cjs.js"),P=require("../../utils/debounce.cjs.js"),W=require("../CallToAction/CallToAction.cjs.js"),a=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(E.ScrollTrigger);const z=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{title1:U,title2:G,description:Y,scrollLabels:$,images:A,subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,descriptionText:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee}={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:z,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"#",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",title1:t.jsx("p",{children:"Unlimited access to"}),title2:t.jsxs("p",{children:["our ",t.jsx("b",{children:"team and tools"})]}),descriptionText:"Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",scrollLabels:["Advanced labwork analysis","Research analysis","Dedicated physicians","Advanced biomarker profiling","Personalized health tracking","In house bioavailability testing","Advanced longevity protocols"],images:["https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"]},te=()=>{const[L,I]=p.useState(!1),j=932,h=p.useRef(null),l=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=p.useRef(null),o=p.useRef(null),v=p.useCallback(()=>{if(!l.current||!h.current||!d.current||!u.current||!g.current||!o.current)return;const n=h.current,i=l.current,r=d.current,c=u.current,m=g.current,b=o.current,y=m.querySelectorAll("p");if(y.length===0)return;y.forEach((f,s)=>{f.style.zIndex=String(y.length-s)});const _=i.querySelectorAll("img"),R=_.length;_.forEach((f,s)=>{f.style.zIndex=String(R-s)});const T=n.scrollHeight/R,q=.8;R>0&&_.forEach((f,s)=>{const C=s*T,k=(s+1)*T-q*T;e.gsap.fromTo([f,y[s]],{opacity:1},{opacity:0,scrollTrigger:{trigger:n,start:()=>`top+=${C} top`,end:()=>`top+=${k} top`,scrub:!0}})});const w=i.getBoundingClientRect(),N=r.getBoundingClientRect(),x=n.getBoundingClientRect();e.gsap.set(m,{y:`${w.bottom-x.top+20}px`}),window.innerWidth>j?(e.gsap.set(r,{x:`${w.left-N.width-50}px`}),e.gsap.set(c,{x:`${w.right+25}px`})):(e.gsap.set(r,{top:`${x.top-c.clientHeight-25}px`}),e.gsap.set(c,{top:`${x.top-25}px`}));const O=window.getComputedStyle(i).borderRadius;e.gsap.to(i,{scale:1,scrollTrigger:{trigger:n,start:"top top",end:"95% bottom",scrub:!0,onUpdate:f=>{if(!l.current||!o.current||!r||!c)return;const s=i.getBoundingClientRect();window.innerWidth>j?(e.gsap.set(r,{x:`${s.left-N.width-50}px`}),e.gsap.set(c,{x:`${s.right+25}px`})):(e.gsap.set(r,{y:`${s.top-x.top-25}px`}),e.gsap.set(c,{y:`${s.top-x.top-25}px`})),e.gsap.set(m,{y:`${s.bottom+20}px`});const C=o.current.getBoundingClientRect();s.bottom+60>=C.top?e.gsap.to(b,{opacity:0,duration:.3}):e.gsap.to(b,{opacity:1,duration:.3}),f.progress>=.99?(e.gsap.to(i,{borderRadius:0,duration:.3,ease:"power1.inOut"}),e.gsap.to(_,{opacity:0,duration:.3,ease:"power1.inOut"})):e.gsap.to(i,{borderRadius:O,duration:.3,ease:"power1.inOut"})}},onComplete:()=>{I(!0)}})},[l,d,u,g,o]);return B.useGSAP(()=>{if(!l.current||!h.current||!d.current||!u||!g.current||!o.current)return;const n=l.current,i=d.current,r=u.current,c=g.current,m=o.current;window.innerWidth<=j?e.gsap.set(n,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(n,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),v();const b=P.default(v,600);return window.addEventListener("resize",()=>{b()}),()=>{window.removeEventListener("resize",b),e.gsap.killTweensOf([n,c,i,r,m])}},{scope:h,dependencies:[h,l,d,u,g,v]}),t.jsx("div",{className:a.default.root,children:t.jsx("div",{ref:h,className:a.default.container,children:t.jsxs("div",{className:a.default.pillContainerWrapper,children:[t.jsxs("div",{ref:l,className:S.cn("pillContainer",a.default.pillContainer),children:[A==null?void 0:A.map((n,i)=>t.jsx("img",{src:n,alt:`Image ${i+1}`},i)),t.jsx("div",{className:a.default.callToActionContainer,children:L&&t.jsx(W.CallToAction,{subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,description:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee})})]}),t.jsx("div",{ref:d,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title1,as:"div",defaultVariant:"displayXs",title:U})}),t.jsx("div",{ref:u,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title2,as:"div",defaultVariant:"displayXs",title:G})}),t.jsx("div",{ref:g,className:S.cn("scrollableLabels",a.default.scrollableLabels),children:$==null?void 0:$.map((n,i)=>t.jsx(V.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:a.default.scrollLabel,children:n},i))}),t.jsx("div",{ref:o,className:S.cn("description",a.default.description),children:t.jsx(H.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:Y,className:a.default.descriptionText})})]})})})};exports.AllInOne=te;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),W=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),M=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),o=require("react"),A=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),U=require("../../components/Typography/Typography.cjs.js"),N=require("../../utils/cn/cn.cjs.js"),G=require("../../utils/debounce.cjs.js"),Y=require("../CallToAction/CallToAction.cjs.js"),a=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(M.ScrollTrigger);const F=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{title1:J,title2:X,description:K,scrollLabels:q,images:L,subtitle:Q,titleTop:Z,scrollableLabels:ee,titleBottom:te,descriptionText:ie,hsaText:se,buttonText:ae,buttonLink:le,backgroundImage:oe}={subtitle:i.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:i.jsx("p",{children:"Get more"}),scrollableLabels:F,titleBottom:i.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"#",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg",title1:i.jsx("p",{children:"Unlimited access to"}),title2:i.jsxs("p",{children:["our ",i.jsx("b",{children:"team and tools"})]}),descriptionText:"Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",scrollLabels:["Advanced labwork analysis","Research analysis","Dedicated physicians","Advanced biomarker profiling","Personalized health tracking","In house bioavailability testing","Advanced longevity protocols"],images:["https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"]},re=()=>{const[C,I]=o.useState(!1),T=1300,b=o.useRef(null),c=o.useRef(null),f=o.useRef(null),h=o.useRef(null),m=o.useRef(null),p=o.useRef(null),R=o.useRef(!1),O=e.gsap.matchMedia();o.useEffect(()=>{R.current=C},[C]);const H=o.useCallback(()=>{if(!c.current||!b.current||!f.current||!h.current||!m.current||!p.current)return;const l=b.current,s=c.current,d=f.current,r=h.current,u=m.current,v=p.current,S=u.querySelectorAll("p");if(S.length===0)return;S.forEach((n,t)=>{n.style.zIndex=String(S.length-t)});const x=s.querySelectorAll('[data-type="image"]'),k=x.length;x.forEach((n,t)=>{n.style.zIndex=String(k-t)});const y=l.scrollHeight/k,E=.8;k>0&&x.forEach((n,t)=>{const w=t*y,_=(t+1)*y-E*y;e.gsap.fromTo([n,S[t]],{opacity:1},{opacity:0,scrollTrigger:{trigger:l,start:()=>`top+=${w} top`,end:()=>`top+=${_} top`,scrub:!0}})});const j=s.getBoundingClientRect(),B=d.getBoundingClientRect(),P=l.getBoundingClientRect();e.gsap.set(u,{y:`${j.bottom-P.top+20}px`}),O.add({isMobile:`(max-width: ${T-1}px)`,isDesktop:`(min-width: ${T}px)`},n=>{const t=n.conditions,w=t==null?void 0:t.isMobile;(t==null?void 0:t.isDesktop)&&(e.gsap.set(d,{x:`${j.left-B.width-50}px`}),e.gsap.set(r,{x:`${j.right+25}px`})),w&&(e.gsap.set(d,{top:`${j.top-r.clientHeight-25}px`}),e.gsap.set(r,{top:`${j.top-25}px`}))});const D=window.getComputedStyle(s).borderRadius;e.gsap.to(s,{scale:1,scrollTrigger:{trigger:l,start:"top top",end:"100% bottom",scrub:!0,onUpdate:n=>{if(!c.current||!p.current||!d||!r)return;const t=s.getBoundingClientRect();O.add({isMobile:`(max-width: ${T-1}px)`,isDesktop:`(min-width: ${T}px)`},_=>{const g=_.conditions,$=g==null?void 0:g.isMobile;(g==null?void 0:g.isDesktop)&&(e.gsap.set(d,{x:`${t.left-B.width-50}px`}),e.gsap.set(r,{x:`${t.right+25}px`})),$&&(e.gsap.set(d,{top:`${t.top-r.clientHeight-25}px`}),e.gsap.set(r,{top:`${t.top-25}px`}))}),e.gsap.set(u,{y:`${t.bottom+20}px`});const w=p.current.getBoundingClientRect();if(t.bottom+60>=w.top?e.gsap.to(v,{opacity:0,duration:.3}):e.gsap.to(v,{opacity:1,duration:.3}),n.progress>=.9)e.gsap.to(s,{scale:1,borderRadius:0,duration:.3,ease:"power1.inOut"}),R.current||(R.current=!0,I(!0),e.gsap.to([x,u.querySelectorAll("p")],{opacity:0,duration:.8,delay:.2,ease:"power2.out",overwrite:!0}));else if(e.gsap.to(s,{borderRadius:D,duration:.3,ease:"power1.inOut"}),R.current){R.current=!1,I(!1),e.gsap.set(s,{borderRadius:D}),e.gsap.killTweensOf([x,u.querySelectorAll("p")]);const _=u.querySelectorAll("p");x.forEach((g,$)=>{const V=$*y,z=($+1)*y-E*y;e.gsap.fromTo([g,_[$]],{opacity:1},{opacity:0,scrollTrigger:{trigger:l,start:()=>`top+=${V} top`,end:()=>`top+=${z} top`,scrub:!0}})}),M.ScrollTrigger.refresh()}}}})},[c,f,h,m,p]);return W.useGSAP(()=>{if(!c.current||!b.current||!f.current||!h||!m.current||!p.current)return;const l=c.current,s=f.current,d=h.current,r=m.current,u=p.current;window.innerWidth<=T?e.gsap.set(l,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(l,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),H();const v=G.default(H,600);return window.addEventListener("resize",()=>{v()}),()=>{window.removeEventListener("resize",v),e.gsap.killTweensOf([l,r,s,d,u])}},{scope:b,dependencies:[b,c,f,h,m,H]}),i.jsx("div",{className:a.default.root,children:i.jsx("div",{ref:b,className:a.default.container,children:i.jsxs("div",{className:a.default.pillContainerWrapper,children:[i.jsxs("div",{ref:c,className:N.cn("pillContainer",a.default.pillContainer),children:[L==null?void 0:L.map((l,s)=>i.jsx("div",{className:a.default.imageBlock,"data-type":"image",style:{backgroundImage:`url(${l})`}},s)),i.jsx("div",{className:a.default.callToActionContainer,children:C&&i.jsx(Y.CallToAction,{subtitle:Q,titleTop:Z,scrollableLabels:ee,titleBottom:te,description:ie,hsaText:se,buttonText:ae,buttonLink:le,backgroundImage:oe})})]}),i.jsx("div",{ref:f,className:a.default.fixedHeader,children:i.jsx(A.HighlightedTitle,{className:a.default.title1,as:"div",defaultVariant:"displayXs",title:J})}),i.jsx("div",{ref:h,className:a.default.fixedHeader,children:i.jsx(A.HighlightedTitle,{className:a.default.title2,as:"div",defaultVariant:"displayXs",title:X})}),i.jsx("div",{ref:m,className:N.cn("scrollableLabels",a.default.scrollableLabels),children:q==null?void 0:q.map((l,s)=>i.jsx(U.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:a.default.scrollLabel,children:l},s))}),i.jsx("div",{ref:p,className:N.cn("description",a.default.description),children:i.jsx(A.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:K,className:a.default.descriptionText})})]})})})};exports.AllInOne=re;
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as A } from "react/jsx-runtime";
3
- import { useGSAP as V } from "../../node_modules/@gsap/react/src/index.es.js";
2
+ import { jsx as i, jsxs as E } from "react/jsx-runtime";
3
+ import { useGSAP as U } from "../../node_modules/@gsap/react/src/index.es.js";
4
4
  import { gsap as e } from "../../node_modules/gsap/index.es.js";
5
5
  import { ScrollTrigger as W } from "../../node_modules/gsap/ScrollTrigger.es.js";
6
- import { useState as P, useRef as h, useCallback as z } from "react";
7
- import { HighlightedTitle as S } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
8
- import { Typography as U } from "../../components/Typography/Typography.es.js";
9
- import { cn as N } from "../../utils/cn/cn.es.js";
10
- import G from "../../utils/debounce.es.js";
11
- import { CallToAction as Y } from "../CallToAction/CallToAction.es.js";
12
- import n from "./allInOne.module.css.es.js";
6
+ import { useState as G, useRef as g, useEffect as Y, useCallback as F } from "react";
7
+ import { HighlightedTitle as N } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
8
+ import { Typography as J } from "../../components/Typography/Typography.es.js";
9
+ import { cn as L } from "../../utils/cn/cn.es.js";
10
+ import X from "../../utils/debounce.es.js";
11
+ import { CallToAction as K } from "../CallToAction/CallToAction.es.js";
12
+ import r from "./allInOne.module.css.es.js";
13
13
  e.registerPlugin(W);
14
- const q = [
14
+ const Q = [
15
15
  "health",
16
16
  "energy",
17
17
  "strength",
@@ -23,34 +23,34 @@ const q = [
23
23
  "fun",
24
24
  "years"
25
25
  ], {
26
- title1: D,
27
- title2: F,
28
- description: J,
29
- scrollLabels: $,
30
- images: L,
31
- subtitle: X,
32
- titleTop: M,
33
- scrollableLabels: K,
34
- titleBottom: Q,
35
- descriptionText: Z,
36
- hsaText: ee,
37
- buttonText: te,
38
- buttonLink: ie,
39
- backgroundImage: oe
26
+ title1: Z,
27
+ title2: ee,
28
+ description: te,
29
+ scrollLabels: I,
30
+ images: j,
31
+ subtitle: ie,
32
+ titleTop: oe,
33
+ scrollableLabels: re,
34
+ titleBottom: se,
35
+ descriptionText: ae,
36
+ hsaText: le,
37
+ buttonText: ne,
38
+ buttonLink: ce,
39
+ backgroundImage: pe
40
40
  } = {
41
- subtitle: /* @__PURE__ */ t("p", { children: "YOUR LONGEVITY JOURNEY" }),
42
- titleTop: /* @__PURE__ */ t("p", { children: "Get more" }),
43
- scrollableLabels: q,
44
- titleBottom: /* @__PURE__ */ t("p", { children: "out of life" }),
41
+ subtitle: /* @__PURE__ */ i("p", { children: "YOUR LONGEVITY JOURNEY" }),
42
+ titleTop: /* @__PURE__ */ i("p", { children: "Get more" }),
43
+ scrollableLabels: Q,
44
+ titleBottom: /* @__PURE__ */ i("p", { children: "out of life" }),
45
45
  description: "It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",
46
46
  hsaText: "Healthspan is HSA/FSA Eligible",
47
47
  buttonText: "JOIN NOW",
48
48
  buttonLink: "#",
49
- backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",
50
- title1: /* @__PURE__ */ t("p", { children: "Unlimited access to" }),
51
- title2: /* @__PURE__ */ A("p", { children: [
49
+ backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg",
50
+ title1: /* @__PURE__ */ i("p", { children: "Unlimited access to" }),
51
+ title2: /* @__PURE__ */ E("p", { children: [
52
52
  "our ",
53
- /* @__PURE__ */ t("b", { children: "team and tools" })
53
+ /* @__PURE__ */ i("b", { children: "team and tools" })
54
54
  ] }),
55
55
  descriptionText: "Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",
56
56
  scrollLabels: [
@@ -71,183 +71,234 @@ const q = [
71
71
  "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg",
72
72
  "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg",
73
73
  "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg",
74
- "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"
74
+ "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_1_6d46345746.jpg"
75
75
  ]
76
- }, ge = () => {
77
- const [j, k] = P(!1), _ = 932, f = h(null), a = h(null), p = h(null), d = h(null), m = h(null), l = h(null), w = z(() => {
78
- if (!a.current || !f.current || !p.current || !d.current || !m.current || !l.current)
76
+ }, Re = () => {
77
+ const [k, B] = G(!1), _ = 1300, b = g(null), n = g(null), u = g(null), f = g(null), h = g(null), c = g(null), w = g(!1), D = e.matchMedia();
78
+ Y(() => {
79
+ w.current = k;
80
+ }, [k]);
81
+ const H = F(() => {
82
+ if (!n.current || !b.current || !u.current || !f.current || !h.current || !c.current)
79
83
  return;
80
- const r = f.current, i = a.current, s = p.current, c = d.current, g = m.current, b = l.current, x = g.querySelectorAll("p");
81
- if (x.length === 0) return;
82
- x.forEach((u, o) => {
83
- u.style.zIndex = String(x.length - o);
84
+ const s = b.current, o = n.current, p = u.current, a = f.current, d = h.current, R = c.current, $ = d.querySelectorAll("p");
85
+ if ($.length === 0) return;
86
+ $.forEach((l, t) => {
87
+ l.style.zIndex = String($.length - t);
84
88
  });
85
- const v = i.querySelectorAll("img"), R = v.length;
86
- v.forEach((u, o) => {
87
- u.style.zIndex = String(R - o);
89
+ const y = o.querySelectorAll('[data-type="image"]'), A = y.length;
90
+ y.forEach((l, t) => {
91
+ l.style.zIndex = String(A - t);
88
92
  });
89
- const C = r.scrollHeight / R, O = 0.8;
90
- R > 0 && v.forEach((u, o) => {
91
- const H = o * C, E = (o + 1) * C - O * C;
93
+ const x = s.scrollHeight / A, O = 0.8;
94
+ A > 0 && y.forEach((l, t) => {
95
+ const C = t * x, v = (t + 1) * x - O * x;
92
96
  e.fromTo(
93
- [u, x[o]],
97
+ [l, $[t]],
94
98
  { opacity: 1 },
95
99
  {
96
100
  opacity: 0,
97
101
  scrollTrigger: {
98
- trigger: r,
99
- start: () => `top+=${H} top`,
100
- end: () => `top+=${E} top`,
102
+ trigger: s,
103
+ start: () => `top+=${C} top`,
104
+ end: () => `top+=${v} top`,
101
105
  scrub: !0
102
106
  }
103
107
  }
104
108
  );
105
109
  });
106
- const T = i.getBoundingClientRect(), I = s.getBoundingClientRect(), y = r.getBoundingClientRect();
107
- e.set(g, {
108
- y: `${T.bottom - y.top + 20}px`
109
- }), window.innerWidth > _ ? (e.set(s, {
110
- x: `${T.left - I.width - 50}px`
111
- }), e.set(c, {
112
- x: `${T.right + 25}px`
113
- })) : (e.set(s, {
114
- top: `${y.top - c.clientHeight - 25}px`
115
- }), e.set(c, {
116
- top: `${y.top - 25}px`
117
- }));
118
- const B = window.getComputedStyle(i).borderRadius;
119
- e.to(i, {
110
+ const T = o.getBoundingClientRect(), V = p.getBoundingClientRect(), q = s.getBoundingClientRect();
111
+ e.set(d, {
112
+ y: `${T.bottom - q.top + 20}px`
113
+ }), D.add(
114
+ {
115
+ isMobile: `(max-width: ${_ - 1}px)`,
116
+ isDesktop: `(min-width: ${_}px)`
117
+ },
118
+ (l) => {
119
+ const t = l.conditions, C = t == null ? void 0 : t.isMobile;
120
+ (t == null ? void 0 : t.isDesktop) && (e.set(p, {
121
+ x: `${T.left - V.width - 50}px`
122
+ }), e.set(a, {
123
+ x: `${T.right + 25}px`
124
+ })), C && (e.set(p, {
125
+ top: `${T.top - a.clientHeight - 25}px`
126
+ }), e.set(a, {
127
+ top: `${T.top - 25}px`
128
+ }));
129
+ }
130
+ );
131
+ const M = window.getComputedStyle(o).borderRadius;
132
+ e.to(o, {
120
133
  scale: 1,
121
134
  scrollTrigger: {
122
- trigger: r,
135
+ trigger: s,
123
136
  start: "top top",
124
- end: "95% bottom",
137
+ end: "100% bottom",
125
138
  scrub: !0,
126
- onUpdate: (u) => {
127
- if (!a.current || !l.current || !s || !c)
139
+ onUpdate: (l) => {
140
+ if (!n.current || !c.current || !p || !a)
128
141
  return;
129
- const o = i.getBoundingClientRect();
130
- window.innerWidth > _ ? (e.set(s, {
131
- x: `${o.left - I.width - 50}px`
132
- }), e.set(c, {
133
- x: `${o.right + 25}px`
134
- })) : (e.set(s, {
135
- y: `${o.top - y.top - 25}px`
136
- }), e.set(c, {
137
- y: `${o.top - y.top - 25}px`
138
- })), e.set(g, {
139
- y: `${o.bottom + 20}px`
142
+ const t = o.getBoundingClientRect();
143
+ D.add(
144
+ {
145
+ isMobile: `(max-width: ${_ - 1}px)`,
146
+ isDesktop: `(min-width: ${_}px)`
147
+ },
148
+ (v) => {
149
+ const m = v.conditions, S = m == null ? void 0 : m.isMobile;
150
+ (m == null ? void 0 : m.isDesktop) && (e.set(p, {
151
+ x: `${t.left - V.width - 50}px`
152
+ }), e.set(a, {
153
+ x: `${t.right + 25}px`
154
+ })), S && (e.set(p, {
155
+ top: `${t.top - a.clientHeight - 25}px`
156
+ }), e.set(a, {
157
+ top: `${t.top - 25}px`
158
+ }));
159
+ }
160
+ ), e.set(d, {
161
+ y: `${t.bottom + 20}px`
140
162
  });
141
- const H = l.current.getBoundingClientRect();
142
- o.bottom + 60 >= H.top ? e.to(b, { opacity: 0, duration: 0.3 }) : e.to(b, { opacity: 1, duration: 0.3 }), u.progress >= 0.99 ? (e.to(i, {
143
- borderRadius: 0,
163
+ const C = c.current.getBoundingClientRect();
164
+ if (t.bottom + 60 >= C.top ? e.to(R, { opacity: 0, duration: 0.3 }) : e.to(R, { opacity: 1, duration: 0.3 }), l.progress >= 0.9)
165
+ e.to(o, {
166
+ scale: 1,
167
+ borderRadius: 0,
168
+ duration: 0.3,
169
+ ease: "power1.inOut"
170
+ }), w.current || (w.current = !0, B(!0), e.to([y, d.querySelectorAll("p")], {
171
+ opacity: 0,
172
+ duration: 0.8,
173
+ delay: 0.2,
174
+ ease: "power2.out",
175
+ overwrite: !0
176
+ }));
177
+ else if (e.to(o, {
178
+ borderRadius: M,
144
179
  duration: 0.3,
145
180
  ease: "power1.inOut"
146
- }), e.to(v, {
147
- opacity: 0,
148
- duration: 0.3,
149
- ease: "power1.inOut"
150
- })) : e.to(i, {
151
- borderRadius: B,
152
- duration: 0.3,
153
- ease: "power1.inOut"
154
- });
181
+ }), w.current) {
182
+ w.current = !1, B(!1), e.set(o, { borderRadius: M }), e.killTweensOf([y, d.querySelectorAll("p")]);
183
+ const v = d.querySelectorAll("p");
184
+ y.forEach((m, S) => {
185
+ const P = S * x, z = (S + 1) * x - O * x;
186
+ e.fromTo(
187
+ [m, v[S]],
188
+ { opacity: 1 },
189
+ {
190
+ opacity: 0,
191
+ scrollTrigger: {
192
+ trigger: s,
193
+ start: () => `top+=${P} top`,
194
+ end: () => `top+=${z} top`,
195
+ scrub: !0
196
+ }
197
+ }
198
+ );
199
+ }), W.refresh();
200
+ }
155
201
  }
156
- },
157
- onComplete: () => {
158
- k(!0);
159
202
  }
160
203
  });
161
- }, [a, p, d, m, l]);
162
- return V(
204
+ }, [n, u, f, h, c]);
205
+ return U(
163
206
  () => {
164
- if (!a.current || !f.current || !p.current || !d || !m.current || !l.current)
207
+ if (!n.current || !b.current || !u.current || !f || !h.current || !c.current)
165
208
  return;
166
- const r = a.current, i = p.current, s = d.current, c = m.current, g = l.current;
167
- window.innerWidth <= _ ? e.set(r, {
209
+ const s = n.current, o = u.current, p = f.current, a = h.current, d = c.current;
210
+ window.innerWidth <= _ ? e.set(s, {
168
211
  aspectRatio: `${window.innerWidth} / ${window.innerHeight}`,
169
212
  scale: 0.5
170
- }) : e.set(r, {
213
+ }) : e.set(s, {
171
214
  scale: 0.3,
172
215
  aspectRatio: `${window.innerWidth} / ${window.innerHeight}`
173
- }), w();
174
- const b = G(w, 600);
216
+ }), H();
217
+ const R = X(H, 600);
175
218
  return window.addEventListener("resize", () => {
176
- b();
219
+ R();
177
220
  }), () => {
178
- window.removeEventListener("resize", b), e.killTweensOf([r, c, i, s, g]);
221
+ window.removeEventListener("resize", R), e.killTweensOf([s, a, o, p, d]);
179
222
  };
180
223
  },
181
224
  {
182
- scope: f,
225
+ scope: b,
183
226
  dependencies: [
227
+ b,
228
+ n,
229
+ u,
184
230
  f,
185
- a,
186
- p,
187
- d,
188
- m,
189
- w
231
+ h,
232
+ H
190
233
  ]
191
234
  }
192
- ), /* @__PURE__ */ t("div", { className: n.root, children: /* @__PURE__ */ t("div", { ref: f, className: n.container, children: /* @__PURE__ */ A("div", { className: n.pillContainerWrapper, children: [
193
- /* @__PURE__ */ A("div", { ref: a, className: N("pillContainer", n.pillContainer), children: [
194
- L == null ? void 0 : L.map((r, i) => /* @__PURE__ */ t("img", { src: r, alt: `Image ${i + 1}` }, i)),
195
- /* @__PURE__ */ t("div", { className: n.callToActionContainer, children: j && /* @__PURE__ */ t(
196
- Y,
235
+ ), /* @__PURE__ */ i("div", { className: r.root, children: /* @__PURE__ */ i("div", { ref: b, className: r.container, children: /* @__PURE__ */ E("div", { className: r.pillContainerWrapper, children: [
236
+ /* @__PURE__ */ E("div", { ref: n, className: L("pillContainer", r.pillContainer), children: [
237
+ j == null ? void 0 : j.map((s, o) => /* @__PURE__ */ i(
238
+ "div",
239
+ {
240
+ className: r.imageBlock,
241
+ "data-type": "image",
242
+ style: { backgroundImage: `url(${s})` }
243
+ },
244
+ o
245
+ )),
246
+ /* @__PURE__ */ i("div", { className: r.callToActionContainer, children: k && /* @__PURE__ */ i(
247
+ K,
197
248
  {
198
- subtitle: X,
199
- titleTop: M,
200
- scrollableLabels: K,
201
- titleBottom: Q,
202
- description: Z,
203
- hsaText: ee,
204
- buttonText: te,
205
- buttonLink: ie,
206
- backgroundImage: oe
249
+ subtitle: ie,
250
+ titleTop: oe,
251
+ scrollableLabels: re,
252
+ titleBottom: se,
253
+ description: ae,
254
+ hsaText: le,
255
+ buttonText: ne,
256
+ buttonLink: ce,
257
+ backgroundImage: pe
207
258
  }
208
259
  ) })
209
260
  ] }),
210
- /* @__PURE__ */ t("div", { ref: p, className: n.fixedHeader, children: /* @__PURE__ */ t(
211
- S,
261
+ /* @__PURE__ */ i("div", { ref: u, className: r.fixedHeader, children: /* @__PURE__ */ i(
262
+ N,
212
263
  {
213
- className: n.title1,
264
+ className: r.title1,
214
265
  as: "div",
215
266
  defaultVariant: "displayXs",
216
- title: D
267
+ title: Z
217
268
  }
218
269
  ) }),
219
- /* @__PURE__ */ t("div", { ref: d, className: n.fixedHeader, children: /* @__PURE__ */ t(
220
- S,
270
+ /* @__PURE__ */ i("div", { ref: f, className: r.fixedHeader, children: /* @__PURE__ */ i(
271
+ N,
221
272
  {
222
- className: n.title2,
273
+ className: r.title2,
223
274
  as: "div",
224
275
  defaultVariant: "displayXs",
225
- title: F
276
+ title: ee
226
277
  }
227
278
  ) }),
228
- /* @__PURE__ */ t("div", { ref: m, className: N("scrollableLabels", n.scrollableLabels), children: $ == null ? void 0 : $.map((r, i) => /* @__PURE__ */ t(
229
- U,
279
+ /* @__PURE__ */ i("div", { ref: h, className: L("scrollableLabels", r.scrollableLabels), children: I == null ? void 0 : I.map((s, o) => /* @__PURE__ */ i(
280
+ J,
230
281
  {
231
282
  as: "p",
232
283
  defaultVariant: "labelLg",
233
284
  mobileVariant: "labelSm",
234
- className: n.scrollLabel,
235
- children: r
285
+ className: r.scrollLabel,
286
+ children: s
236
287
  },
237
- i
288
+ o
238
289
  )) }),
239
- /* @__PURE__ */ t("div", { ref: l, className: N("description", n.description), children: /* @__PURE__ */ t(
240
- S,
290
+ /* @__PURE__ */ i("div", { ref: c, className: L("description", r.description), children: /* @__PURE__ */ i(
291
+ N,
241
292
  {
242
293
  as: "p",
243
294
  defaultVariant: "preambleMd",
244
295
  mobileVariant: "preambleSm",
245
- title: J,
246
- className: n.descriptionText
296
+ title: te,
297
+ className: r.descriptionText
247
298
  }
248
299
  ) })
249
300
  ] }) }) });
250
301
  };
251
302
  export {
252
- ge as AllInOne
303
+ Re as AllInOne
253
304
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="allInOne-module__root___aRPBl",l="allInOne-module__container___FKeTW",n="allInOne-module__pillContainerWrapper___kXrF1",o="allInOne-module__pillContainer___PJAUY",t="allInOne-module__callToActionContainer___J0Gfh",i="allInOne-module__fixedHeader___4Lq8d",a="allInOne-module__scrollableLabels___BtN-2",r="allInOne-module__description___Y3gZh",_="allInOne-module__descriptionText___svjVl",c={root:e,container:l,pillContainerWrapper:n,pillContainer:o,callToActionContainer:t,fixedHeader:i,scrollableLabels:a,description:r,descriptionText:_};exports.callToActionContainer=t;exports.container=l;exports.default=c;exports.description=r;exports.descriptionText=_;exports.fixedHeader=i;exports.pillContainer=o;exports.pillContainerWrapper=n;exports.root=e;exports.scrollableLabels=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="allInOne-module__root___aRPBl",l="allInOne-module__container___FKeTW",n="allInOne-module__pillContainerWrapper___kXrF1",o="allInOne-module__pillContainer___PJAUY",t="allInOne-module__callToActionContainer___J0Gfh",a="allInOne-module__imageBlock___0a5Ir",i="allInOne-module__fixedHeader___4Lq8d",_="allInOne-module__scrollableLabels___BtN-2",r="allInOne-module__description___Y3gZh",c="allInOne-module__descriptionText___svjVl",s={root:e,container:l,pillContainerWrapper:n,pillContainer:o,callToActionContainer:t,imageBlock:a,fixedHeader:i,scrollableLabels:_,description:r,descriptionText:c};exports.callToActionContainer=t;exports.container=l;exports.default=s;exports.description=r;exports.descriptionText=c;exports.fixedHeader=i;exports.imageBlock=a;exports.pillContainer=o;exports.pillContainerWrapper=n;exports.root=e;exports.scrollableLabels=_;
@@ -1,23 +1,25 @@
1
- const e = "allInOne-module__root___aRPBl", l = "allInOne-module__container___FKeTW", n = "allInOne-module__pillContainerWrapper___kXrF1", o = "allInOne-module__pillContainer___PJAUY", _ = "allInOne-module__callToActionContainer___J0Gfh", t = "allInOne-module__fixedHeader___4Lq8d", a = "allInOne-module__scrollableLabels___BtN-2", i = "allInOne-module__description___Y3gZh", r = "allInOne-module__descriptionText___svjVl", c = {
2
- root: e,
3
- container: l,
1
+ const l = "allInOne-module__root___aRPBl", e = "allInOne-module__container___FKeTW", n = "allInOne-module__pillContainerWrapper___kXrF1", o = "allInOne-module__pillContainer___PJAUY", _ = "allInOne-module__callToActionContainer___J0Gfh", a = "allInOne-module__imageBlock___0a5Ir", t = "allInOne-module__fixedHeader___4Lq8d", i = "allInOne-module__scrollableLabels___BtN-2", r = "allInOne-module__description___Y3gZh", c = "allInOne-module__descriptionText___svjVl", s = {
2
+ root: l,
3
+ container: e,
4
4
  pillContainerWrapper: n,
5
5
  pillContainer: o,
6
6
  callToActionContainer: _,
7
+ imageBlock: a,
7
8
  fixedHeader: t,
8
- scrollableLabels: a,
9
- description: i,
10
- descriptionText: r
9
+ scrollableLabels: i,
10
+ description: r,
11
+ descriptionText: c
11
12
  };
12
13
  export {
13
14
  _ as callToActionContainer,
14
- l as container,
15
- c as default,
16
- i as description,
17
- r as descriptionText,
15
+ e as container,
16
+ s as default,
17
+ r as description,
18
+ c as descriptionText,
18
19
  t as fixedHeader,
20
+ a as imageBlock,
19
21
  o as pillContainer,
20
22
  n as pillContainerWrapper,
21
- e as root,
22
- a as scrollableLabels
23
+ l as root,
24
+ i as scrollableLabels
23
25
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),X=require("../../components/Button/Button.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),w=require("../../components/Icon/Icon.cjs.js"),M=require("../../components/Icon/constants.cjs.js"),x=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),z=require("../../node_modules/@gsap/react/src/index.cjs.js"),F=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),D=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(F.ScrollTrigger);const G=({subtitle:A,titleTop:E,scrollableLabels:j,titleBottom:P,description:C,hsaText:W,buttonText:k,buttonLink:f,backgroundImage:B})=>{const R=l.useRef(null),i=l.useRef(null),T=l.useRef(null),p=l.useRef(null),h=l.useRef(null),N=l.useRef(null),m=l.useRef(null),g=l.useRef(null),y=l.useRef(null);return z.useGSAP(()=>{var V,L,H;const o=(V=T.current)==null?void 0:V.querySelector("p"),u=(L=N.current)==null?void 0:L.querySelector("p"),$=[o,p.current,i.current,h.current,u,m.current,g.current,y.current].filter(Boolean);a.gsap.set($,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100}),a.gsap.to([o,p.current,i.current,h.current,u,m.current,g.current,y.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},scrollTrigger:{trigger:R.current,start:"top center",end:"+=500"}});const r=(H=i.current)==null?void 0:H.querySelector("ul");if(!r)return;const v=r.innerHTML;let s=null,q=!0;const _=()=>{s&&s.kill(),r.innerHTML=v,a.gsap.set(r,{y:0});const n=Array.from(r.querySelectorAll("li"));if(n.length<=1)return;const b=n[0].clientHeight;if(!b)return;a.gsap.set(i.current,{height:b,overflow:"hidden"});const I=Array.from(n);I.forEach(S=>{r.appendChild(S.cloneNode(!0))}),s=a.gsap.timeline({repeat:-1,delay:q?2.5:0,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((S,O)=>{s&&s.to({},{duration:2}).to(r,{y:`-${(O+1)*b}`,duration:.5,ease:"power1.inOut"})}),q=!1},c=D.default(_,200);return _(),window.addEventListener("resize",c),()=>{var n;window.removeEventListener("resize",c),(n=c.kill)==null||n.call(c),s&&s.kill(),r&&(r.innerHTML=v,a.gsap.set(r,{y:0}))}},[j]),e.jsxs("section",{ref:R,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${B})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:p,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:E})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:j.map((o,u)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(d.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:o})},u))})}),e.jsx("div",{ref:h,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(x.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:A})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(d.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(w.Icon,{name:M.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:m,children:e.jsx(d.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:C})}),e.jsx("div",{ref:g,className:t.default.buttonWrapper,children:f&&e.jsx(X.Button,{as:f?"a":"button",href:f,variant:"secondary",size:"lg",children:k})}),e.jsxs("div",{ref:y,className:t.default.hsaEligible,children:[e.jsx(w.Icon,{name:M.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(d.Typography,{defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:W})]})]})})]})]})};exports.CallToAction=G;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),G=require("../../components/Button/Button.cjs.js"),p=require("../../components/Typography/Typography.cjs.js"),A=require("../../components/Icon/Icon.cjs.js"),C=require("../../components/Icon/constants.cjs.js"),v=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),K=require("../../node_modules/@gsap/react/src/index.cjs.js"),M=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),J=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(M.ScrollTrigger);const Q=({subtitle:k,titleTop:P,scrollableLabels:R,titleBottom:B,description:W,hsaText:$,buttonText:O,buttonLink:g,backgroundImage:X})=>{const u=l.useRef(null),i=l.useRef(null),T=l.useRef(null),h=l.useRef(null),m=l.useRef(null),N=l.useRef(null),y=l.useRef(null),b=l.useRef(null),x=l.useRef(null);return K.useGSAP(()=>{var S,V,w;const d=u.current&&u.current.getBoundingClientRect().top<window.innerHeight*.8,f=(S=T.current)==null?void 0:S.querySelector("p"),q=(V=N.current)==null?void 0:V.querySelector("p"),z=[f,h.current,i.current,m.current,q,y.current,b.current,x.current].filter(Boolean);a.gsap.set(z,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100});const o=a.gsap.to([f,h.current,i.current,m.current,q,y.current,b.current,x.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},paused:!0});M.ScrollTrigger.create({trigger:u.current,start:"top 80%",end:"+=500",onEnter:()=>o.play(),onLeave:()=>o.reverse(),onEnterBack:()=>o.play(),onLeaveBack:()=>o.reverse()}),d&&a.gsap.delayedCall(.1,()=>{o.play()});const r=(w=i.current)==null?void 0:w.querySelector("ul");if(!r)return;const L=r.innerHTML;let n=null,_=!0;const H=()=>{n&&n.kill(),r.innerHTML=L,a.gsap.set(r,{y:0});const s=Array.from(r.querySelectorAll("li"));if(s.length<=1)return;const j=s[0].clientHeight;if(!j)return;a.gsap.set(i.current,{height:j,overflow:"hidden"});const I=Array.from(s);I.forEach(E=>{r.appendChild(E.cloneNode(!0))});const F=_&&!d?2.5:0;n=a.gsap.timeline({repeat:-1,delay:F,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((E,D)=>{n&&n.to({},{duration:2}).to(r,{y:`-${(D+1)*j}`,duration:.5,ease:"power1.inOut"})}),_=!1},c=J.default(H,200);return H(),window.addEventListener("resize",c),()=>{var s;window.removeEventListener("resize",c),(s=c.kill)==null||s.call(c),n&&n.kill(),r&&(r.innerHTML=L,a.gsap.set(r,{y:0}))}},[R]),e.jsxs("section",{ref:u,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${X})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:h,children:e.jsx(v.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:R.map((d,f)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(p.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:d})},f))})}),e.jsx("div",{ref:m,children:e.jsx(v.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:B})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(v.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:k})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(p.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(A.Icon,{name:C.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:y,children:e.jsx(p.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:W})}),e.jsx("div",{ref:b,className:t.default.buttonWrapper,children:g&&e.jsx(G.Button,{as:g?"a":"button",href:g,variant:"secondary",size:"lg",children:O})}),e.jsxs("div",{ref:x,className:t.default.hsaEligible,children:[e.jsx(A.Icon,{name:C.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(p.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:$})]})]})})]})]})};exports.CallToAction=Q;