{"version":3,"file":"Splittext.SSFrxNQb.mjs","names":["React.useRef","SplitType","__legacyOverrideHOC_DataObserverContext","_jsx","ScrollTrigger"],"sources":["https:/framerusercontent.com/modules/ZbHLpfc7eu1y0fJP4qpZ/eFZOJyILrjpAXet9Hy5J/Splittext.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import gsap from\"gsap\";import{ScrollTrigger}from\"gsap/ScrollTrigger\";import SplitType from\"split-type\";gsap.registerPlugin(ScrollTrigger);export function TextReveal(){const textRef=React.useRef(null);React.useEffect(()=>{const textElement=textRef.current;if(!textElement)return;// Select all direct child elements within the container\nconst paragraphs=Array.from(textElement.children).filter(child=>child.textContent.trim()!==\"\");const splitText=new SplitType(paragraphs,{types:\"words\"});const filledWords=Array.from(splitText.words).filter(line=>line.textContent.trim()!==\"\");// Individual Line Animation\ngsap.to(filledWords,{backgroundPosition:\"-100% 0%\",duration:1,stagger:1,ease:\"linear\",scrollTrigger:{trigger:textElement,scrub:1,start:\"top 80%\",end:\"bottom 60%\",markers:false}});filledWords.forEach(word=>{word.style.background=\"linear-gradient(to left, #f5f5f5 50%, #333 50%)\";word.style.backgroundSize=\"200% 100%\";word.style.color=\"transparent\";word.style.backgroundClip=\"text\";word.style.webkitBackgroundClip=\"text\";word.style.display=\"inline-block\";word.style.whiteSpace=\"pre-wrap\";});},[]);return{ref:textRef};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withTextReveal(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TextReveal(props)});};}withTextReveal.displayName=\"TextReveal\";\nexport const __FramerMetadata__ = {\"exports\":{\"TextReveal\":{\"type\":\"override\",\"name\":\"TextReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTextReveal\":{\"type\":\"reactHoc\",\"name\":\"withTextReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Splittext.map"],"mappings":"sSAAiN,SAAgB,GAAY,CAAC,IAAM,EAAQA,EAAa,KAAK,CAEiO,OAFhO,MAAoB,CAAC,IAAM,EAAY,EAAQ,QAAQ,GAAG,CAAC,EAAY,OACvP,IAAM,EAAU,IAAIC,EAAlG,MAAM,KAAK,EAAY,SAAS,CAAC,OAAO,GAAO,EAAM,YAAY,MAAM,GAAG,GAAG,CAA0C,CAAC,MAAM,QAAQ,CAAC,CAAO,EAAY,MAAM,KAAK,EAAU,MAAM,CAAC,OAAO,GAAM,EAAK,YAAY,MAAM,GAAG,GAAG,CACjP,EAAK,GAAG,EAAY,CAAC,mBAAmB,WAAW,SAAS,EAAE,QAAQ,EAAE,KAAK,SAAS,cAAc,CAAC,QAAQ,EAAY,MAAM,EAAE,MAAM,UAAU,IAAI,aAAa,QAAQ,GAAM,CAAC,CAAC,CAAC,EAAY,QAAQ,GAAM,CAAC,EAAK,MAAM,WAAW,kDAAkD,EAAK,MAAM,eAAe,YAAY,EAAK,MAAM,MAAM,cAAc,EAAK,MAAM,eAAe,OAAO,EAAK,MAAM,qBAAqB,OAAO,EAAK,MAAM,QAAQ,eAAe,EAAK,MAAM,WAAW,YAAa,EAAG,EAAE,CAAC,CAAO,CAAC,IAAI,EAAQ,CAAqJ,SAAgB,EAAe,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAW,EAAM,CAAC,CAAC,mBAFnxB,IAA4B,IAAuB,IAA8C,IAAkC,IAEye,CAFze,EAAK,eAAeC,EAAc,CAEknB,EAAe,YAAY"}