{"version":3,"file":"Testimonials.DYQuEbAz.mjs","names":["useRef","useState","__esmMin","init_npm_react_18_3_1","_e","c","init_jsx_runtime","ce","de","addPropertyControls","init_framer_DxfB3JJo","ControlType","TestimonialWall","cropBottom","props","containerRef","frameHeight","setFrameHeight","zoom","setZoom","outerRef","el","measure","ro","container","iframe","observer","script","cropped","scaled","height","init_Testimonials"],"sources":["https:/framerusercontent.com/modules/CtWskVuY8MZeeUJ97LgE/UPlQbORyI9YZYlo8yvq4/Testimonials.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Testimonial.to wall. \"Crop bottom\" hides that many pixels from the bottom of the\n * embed (its own \"Testimonial\" footer badge); 0 keeps the full embed.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function TestimonialWall(props){const cropBottom=Math.max(0,props.cropBottom||0);const containerRef=useRef(null);const[frameHeight,setFrameHeight]=useState(0);// On phones the embed's cards read too big: lay it out a little wider and scale it down.\nconst[zoom,setZoom]=useState(1);const outerRef=useRef(null);useEffect(()=>{const el=outerRef.current;if(!el)return;const measure=()=>setZoom(el.clientWidth>0&&el.clientWidth<600?.8:1);measure();if(typeof ResizeObserver===\"undefined\")return;const ro=new ResizeObserver(measure);ro.observe(el);return()=>ro.disconnect();},[]);useEffect(()=>{// Clean up any existing iframe\nconst container=containerRef.current;if(!container)return;// Clear container\ncontainer.innerHTML=\"\";// Create iframe\nconst iframe=document.createElement(\"iframe\");iframe.id=\"testimonialto-537e628d-3d75-4d6e-b310-9ca8c7717da2\";iframe.src=\"https://embed-v2.testimonial.to/w/kleo2?id=537e628d-3d75-4d6e-b310-9ca8c7717da2\";iframe.style.width=\"100%\";iframe.style.height=\"auto\";iframe.style.border=\"none\";iframe.style.display=\"block\";iframe.style.minHeight=\"400px\";iframe.setAttribute(\"scrolling\",\"no\");iframe.setAttribute(\"frameborder\",\"0\");container.appendChild(iframe);// Track the embed's height so the bottom crop follows it\nlet observer=null;if(typeof ResizeObserver!==\"undefined\"){observer=new ResizeObserver(()=>setFrameHeight(iframe.offsetHeight));observer.observe(iframe);}// Load iframeResizer script\nconst script=document.createElement(\"script\");script.src=\"https://testimonial.to/js/iframeResizer.min.js\";script.async=true;script.onload=function(){// @ts-ignore - iframeResizer is loaded\nif(typeof iFrameResize===\"function\"){// @ts-ignore\niFrameResize({log:false,checkOrigin:false,autoResize:true,heightCalculationMethod:\"bodyOffset\"},\"#testimonialto-537e628d-3d75-4d6e-b310-9ca8c7717da2\");}};document.head.appendChild(script);return()=>{if(observer)observer.disconnect();container.innerHTML=\"\";};},[]);const cropped=cropBottom>0&&frameHeight>cropBottom+200;const scaled=zoom!==1&&frameHeight>0;const height=cropped?(frameHeight-cropBottom)*zoom:scaled?frameHeight*zoom:undefined;return /*#__PURE__*/_jsx(\"div\",{ref:outerRef,style:{width:\"100%\",minHeight:cropped||scaled?undefined:\"400px\",height,overflow:cropped||scaled?\"hidden\":\"visible\"},children:/*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:`${100/zoom}%`,minHeight:\"400px\",transform:zoom!==1?`scale(${zoom})`:undefined,transformOrigin:\"0 0\"}})});}addPropertyControls(TestimonialWall,{cropBottom:{type:ControlType.Number,title:\"Crop bottom\",defaultValue:0,min:0,max:300,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TestimonialWall\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Testimonials.map"],"mappings":"A,wLAMG,SAAwBY,EAAgB,EAAM,CAAC,IAAMC,EAAW,KAAK,IAAI,EAAEC,EAAM,YAAY,CAAC,EAAQC,EAAaf,EAAO,IAAI,EAAO,CAACgB,EAAYC,GAA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