@zenpatient-org/healthspan-marketing-ui 0.1.155 → 0.1.157

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