{"version":3,"file":"TestimonialCarousel.D_3HDNlj.mjs","names":["useRef","useMemo","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/ur5FYbkoWkbTW6OaMpHH/yjFhqsIXXQQUoqz4fnYy/TestimonialCarousel.js"],"sourcesContent":["// Autoplay infinite testimonial carousel, cards in horizontal marquee, no controls, per screenshot.\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useRef,useEffect,useState,useMemo}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer,RenderTarget}from\"framer\";/**\n * Testimonial Carousel Autoplay\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function TestimonialCarousel(props){const{testimonials=[{text:'Although beauty is indeed objective, I don\\'t believe certain features are inherently more or less \"desirable,\" except for those that suggest poor health or improper development. With the right styling, any features can be made to appear beautiful.',name:\"Martin\",location:\"Netherlands\"},{text:\"I love it. They have done an amazing job here! Thanks again.\",name:\"Esme MacCann\",location:\"Ireland\"},{text:\"I though this was toxic at first but this actually made me more confident for some weird reasons. It gives you a great understanding of your features which I think is important in a society where we see unrealistic beauty standard and every face start to look the same.\",name:\"Leah O'Dargan\",location:\"Ireland\"},{text:\"My face is lovely now and this promotes doing small, big changes!\",name:\"Josefine Block\",location:\"Sweden\"}],bgColor,cardBg,cardBorder,heading,headingAccent,headingFont,quoteColor,nameFont,locationFont,cardTextFont,speed,cardToNameGap=24,cardRadius=14,cardWidth=480,cardHeight=220,padding=52}=props;const containerRef=useRef(null);const trackRef=useRef(null);// For seamless looping, duplicate cards\nconst fullList=useMemo(()=>[...testimonials,...testimonials],[testimonials]);// Current X offset\nconst[offset,setOffset]=useState(0);const[trackWidth,setTrackWidth]=useState(0);const[itemWidth,setItemWidth]=useState(0);const isStatic=useIsStaticRenderer();// Animation speed (pixels/sec)\nconst SLOW_SPEED=Math.max(10,speed||18)// Default: 18 px/sec, readable\n;// Calculate widths on mount/resize\nuseEffect(()=>{if(!trackRef.current||!containerRef.current)return;function updateWidths(){const firstCard=trackRef.current.querySelector(\".carousel-card\");if(!firstCard)return;setItemWidth(firstCard.offsetWidth);setTrackWidth(trackRef.current.scrollWidth/2)// single loop width\n;}updateWidths();window.addEventListener(\"resize\",updateWidths);return()=>window.removeEventListener(\"resize\",updateWidths);},[testimonials.length]);// Infinite loop - move left, reset when crossed\nuseEffect(()=>{if(isStatic||RenderTarget.current()!==RenderTarget.preview)return;let running=true;let lastTime=performance.now();function animate(now){if(!running)return;const dt=now-lastTime;lastTime=now;// px to move: SLOW_SPEED * dt(sec)\nsetOffset(prev=>{let next=prev+SLOW_SPEED*dt/1e3;// When scrolled > trackWidth, reset\nif(next>=trackWidth)next-=trackWidth;return next;});requestAnimationFrame(animate);}const frame=requestAnimationFrame(animate);return()=>{running=false;cancelAnimationFrame(frame);};},[trackWidth,SLOW_SPEED,isStatic]);// Prevent focus during drag\nuseEffect(()=>{if(!containerRef.current)return;containerRef.current.setAttribute(\"tabIndex\",\"-1\");},[]);// Heading rendering: accent highlight for \"50,000+ people\"\nfunction renderHeading(){const regex=/(Join )(\\d{1,3}(,\\d{3})*\\+ people)( and start your transformation\\.)/;const match=heading.match(regex);if(!match)return heading;return /*#__PURE__*/_jsxs(_Fragment,{children:[match[1],/*#__PURE__*/_jsx(\"span\",{style:{color:headingAccent},children:match[2]}),match[3]]});}return /*#__PURE__*/_jsxs(\"div\",{style:{background:bgColor,width:\"100%\",padding:`${padding}px 0 0 0`,minHeight:460,boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{textAlign:\"center\",font:\"inherit\",marginBottom:48,...headingFont},children:renderHeading()}),/*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",overflow:\"hidden\",padding:\"0\"},children:/*#__PURE__*/_jsx(\"div\",{ref:trackRef,style:{display:\"flex\",flexDirection:\"row\",gap:32,minHeight:272,// Infinite track\ntransform:`translateX(-${offset}px)`,transition:isStatic?undefined:\"none\",willChange:isStatic?undefined:\"transform\"},\"aria-hidden\":true,children:fullList.map((t,i)=>/*#__PURE__*/_jsxs(\"div\",{className:\"carousel-card\",style:{background:cardBg,border:`1px solid ${cardBorder}`,borderRadius:cardRadius,minWidth:cardWidth,maxWidth:cardWidth+60,flex:`0 0 ${cardWidth}px`,padding:\"36px 32px 44px 32px\",boxSizing:\"border-box\",boxShadow:\"0 0 0 0 transparent\",display:\"flex\",flexDirection:\"column\",justifyContent:\"space-between\",height:cardHeight,position:\"relative\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{flex:1,...cardTextFont,color:cardTextFont?.color||\"#263138\",fontWeight:cardTextFont?.fontWeight||400,fontSize:cardTextFont?.fontSize||22,lineHeight:cardTextFont?.lineHeight||\"1.19em\",letterSpacing:cardTextFont?.letterSpacing,marginBottom:cardToNameGap},children:t.text}),/*#__PURE__*/_jsx(\"svg\",{width:\"38\",height:\"30\",fill:\"none\",\"aria-hidden\":true,viewBox:\"0 0 38 30\",style:{position:\"absolute\",bottom:24,right:24,opacity:.11},children:/*#__PURE__*/_jsx(\"path\",{fill:quoteColor,d:\"M10.3 29V18.89c-2.448-1.035-4.423-2.46-5.926-4.278C2.875 12.796 1.99 10.332 1.99 7.26c0-2.985.885-5.336 2.654-7.026C5.613-.456 7.584-1 9.759-1c2.362 0 4.55.639 6.554 1.922C17.71 2.437 18.96 4.386 19.874 6.82c.82 2.197 1.228 4.88 1.228 8.123V29H10.3zm19.066 0V18.89c-2.447-1.035-4.423-2.46-5.926-4.278C22.951 12.796 22.066 10.332 22.066 7.26c0-2.985.885-5.336 2.654-7.026C26.79-.456 28.76-1 30.935-1c2.362 0 4.55.639 6.553 1.922C38.366 2.437 39.616 4.386 40.53 6.82c.821 2.197 1.229 4.88 1.229 8.123V29H29.366z\"})}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:0,fontWeight:700,...nameFont,color:nameFont?.color||\"#263138\",fontSize:17},children:t.name}),/*#__PURE__*/_jsx(\"div\",{style:{fontWeight:400,...locationFont,color:locationFont?.color||\"#687078\",fontSize:16},children:t.location})]},i+t.name))})})]});}addPropertyControls(TestimonialCarousel,{heading:{type:ControlType.String,title:\"Heading\",defaultValue:\"Join 50,000+ people and start your transformation.\",displayTextArea:false},headingAccent:{type:ControlType.Color,title:\"Heading Accent\",defaultValue:\"#BEC5C6\"},headingFont:{type:ControlType.Font,title:\"Heading Font\",defaultValue:{fontSize:\"52px\",letterSpacing:\"-0.03em\",lineHeight:\"1.15em\",variant:\"Medium\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"},padding:{type:ControlType.Number,title:\"Top Padding\",defaultValue:52,min:0,max:200,step:4,unit:\"px\"},testimonials:{type:ControlType.Array,title:\"Testimonials\",control:{type:ControlType.Object,controls:{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Your life will change for the better!\",displayTextArea:true},name:{type:ControlType.String,title:\"Name\",defaultValue:\"Firstname Lastname\"},location:{type:ControlType.String,title:\"Location\",defaultValue:\"Country\"}}},defaultValue:[{text:'Although beauty is indeed objective, I don\\'t believe certain features are inherently more or less \"desirable,\" except for those that suggest poor health or improper development. With the right styling, any features can be made to appear beautiful.',name:\"Martin\",location:\"Netherlands\"},{text:\"I love it. They have done an amazing job here! Thanks again.\",name:\"Esme MacCann\",location:\"Ireland\"},{text:\"I though this was toxic at first but this actually made me more confident for some weird reasons. It gives you a great understanding of your features which I think is important in a society where we see unrealistic beauty standard and every face start to look the same.\",name:\"Leah O'Dargan\",location:\"Ireland\"},{text:\"My face is lovely now and this promotes doing small, big changes!\",name:\"Josefine Block\",location:\"Sweden\"}],maxCount:12},bgColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#F7F9F9\"},cardBg:{type:ControlType.Color,title:\"Card Background\",defaultValue:\"#fff\"},cardBorder:{type:ControlType.Color,title:\"Card Border\",defaultValue:\"#e7eaea\"},cardWidth:{type:ControlType.Number,title:\"Card Width\",defaultValue:480,min:200,max:800,step:10,unit:\"px\"},cardHeight:{type:ControlType.Number,title:\"Card Height\",defaultValue:220,min:150,max:500,step:10,unit:\"px\"},cardTextFont:{type:ControlType.Font,title:\"Card Main Font\",defaultValue:{fontSize:\"22px\",letterSpacing:\"-0.01em\",variant:\"Regular\",lineHeight:\"1.19em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},cardToNameGap:{type:ControlType.Number,title:\"Card to Name Gap\",defaultValue:24,min:0,max:48,step:1,unit:\"px\"},cardRadius:{type:ControlType.Number,title:\"Card Radius\",defaultValue:14,min:0,max:40,step:1,unit:\"px\"},nameFont:{type:ControlType.Font,title:\"Name Font\",defaultValue:{fontSize:\"17px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},locationFont:{type:ControlType.Font,title:\"Location Font\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},quoteColor:{type:ControlType.Color,title:\"Quote Icon Color\",defaultValue:\"#687078\"},speed:{type:ControlType.Number,title:\"Scroll Speed (px/sec)\",defaultValue:18,min:6,max:60,step:1,displayStepper:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TestimonialCarousel\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TestimonialCarousel.map"],"mappings":"0OAMG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,eAAa,CAAC,CAAC,KAAK,0PAA2P,KAAK,SAAS,SAAS,aAAa,EAAE,CAAC,KAAK,+DAA+D,KAAK,eAAe,SAAS,SAAS,EAAE,CAAC,KAAK,gRAAgR,KAAK,gBAAgB,SAAS,SAAS,EAAE,CAAC,KAAK,oEAAoE,KAAK,iB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