{"version":3,"file":"TextScrollEffect.CvySbS_k.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/ljWaWCBYZd9LaXTvExPC/v4NduuzcBiFr2OsiHOp0/TextScrollEffect.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef}from\"react\";import{motion,useScroll,useTransform}from\"framer-motion\";export function ScrollTextColor(Component){return props=>{const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start 60%\",\"center 30%\"]});if(typeof window===\"undefined\"){return /*#__PURE__*/_jsx(Component,{...props});}let text=\"\";if(typeof props.children===\"string\"){text=props.children;}else if(typeof props.text===\"string\"){text=props.text;}else if(props.children?.props?.children){text=String(props.children.props.children.props.children);}if(!text||text===\"\"){return /*#__PURE__*/_jsx(Component,{...props,ref:ref});}const words=text.split(\" \");return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.children.props.children.props.style},children:/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline\"},children:words.map((word,index)=>{const start=index/words.length;const end=(index+1)/words.length;const color=useTransform(scrollYProgress,[start,end],[\"#A09F9F\",\"#05354D\"]);return /*#__PURE__*/_jsxs(motion.span,{style:{color,display:\"inline-block\"},className:props.children.props.children.props.className,children:[word,index<words.length-1?\"\\xa0\":\"\"]},index);})})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"ScrollTextColor\":{\"type\":\"reactHoc\",\"name\":\"ScrollTextColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextScrollEffect.map"],"mappings":"iMAA4I,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAIA,EAAO,KAAK,CAAM,CAAC,mBAAiB,EAAU,CAAC,OAAO,EAAI,OAAO,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,GAAU,IAAS,OAAa,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,CAA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