{"version":3,"file":"withAnimatedText.CA4RF0HO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/pOhBMVG0kU80dAfnslce/aX7dddvfFQGOBugTAmgu/withAnimatedText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{stagger,useAnimate,useInView}from\"framer-motion\";export function withAnimateChar(Component){return props=>{const[scopeRef,animate]=useAnimate();const isInView=useInView(scopeRef,{amount:.5});const easeOutCirc=[.075,.82,.165,1];const easeInCirc=[.6,.04,.98,.335];const settings={delay:stagger(.1)};useEffect(()=>{if(isInView){animate(\"span\",{y:[\"100%\",\"0%\"]},{...settings,duration:2,ease:easeOutCirc,onPlay:()=>scopeRef.current.style.opacity=1});}else{animate(\"span\",{y:[\"0%\",\"-100%\"]},{...settings,duration:1,ease:easeInCirc});}},[isInView]);useEffect(()=>{const text=scopeRef.current.querySelector(\".framer-text\");if(!text)return;text.style.display=\"flex\";text.style.justifyContent=\"center\";text.innerHTML=text.textContent.split(\"\").map(char=>`<span style=\"display:inline-block; transform:translateY(100%);\">${char}</span>`).join(\"\");},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:0},ref:scopeRef});};}export function withAnimateCharIOSFix(Component){return props=>{const[scopeRef,animate]=useAnimate();const isInView=useInView(scopeRef,{amount:.5});const easeOutCirc=[.075,.82,.165,1];const easeInCirc=[.6,.04,.98,.335];const settings={delay:stagger(.1)};useEffect(()=>{if(isInView){animate(\"span\",{y:[\"100%\",\"0%\"]},{...settings,duration:2,ease:easeOutCirc,onPlay:()=>scopeRef.current.style.opacity=1});}else{animate(\"span\",{y:[\"0%\",\"-100%\"]},{...settings,duration:1,ease:easeInCirc});}},[isInView]);useEffect(()=>{const text=scopeRef.current.querySelector(\".framer-text\");if(!text)return;// Estilos base para evitar errores de layout en iOS\ntext.style.display=\"flex\";text.style.justifyContent=\"center\";text.style.whiteSpace=\"nowrap\";text.style.width=\"100%\";// Divide en caracteres animables\ntext.innerHTML=text.textContent.split(\"\").map(char=>`<span style=\"display:inline-block; transform:translateY(100%);\">${char}</span>`).join(\"\");// 🔧 Safari iOS fix: forzar reflow/repaint tras aplicar innerHTML\nsetTimeout(()=>{scopeRef.current.style.display=\"none\";void scopeRef.current.offsetHeight// trigger reflow\n;scopeRef.current.style.display=\"block\";},50);},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:0},ref:scopeRef});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withAnimateChar\":{\"type\":\"reactHoc\",\"name\":\"withAnimateChar\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAnimateCharIOSFix\":{\"type\":\"reactHoc\",\"name\":\"withAnimateCharIOSFix\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withAnimatedText.map"],"mappings":"iLAAgI,SAAgB,EAAgB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAS,GAAS,GAAY,CAAO,EAAS,EAAU,EAAS,CAAC,OAAO,GAAG,CAAC,CAAO,EAAY,CAAC,KAAK,IAAI,KAAK,EAAE,CAAO,EAAW,CAAC,GAAG,IAAI,IAAI,KAAK,CAAO,EAAS,CAAC,MAAM,EAAQ,GAAG,CAAC,CAAiiB,OAAhiB,MAAc,CAAI,EAAU,EAAQ,OAAO,CAAC,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,EAAS,SAAS,EAAE,KAAK,EAAY,WAAW,EAAS,QAAQ,MAAM,QAAQ,EAAE,CAAC,CAAO,EAAQ,OAAO,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAS,SAAS,EAAE,KAAK,EAAW,CAAC,EAAI,CAAC,EAAS,CAAC,CAAC,MAAc,CAAC,IAAM,EAAK,EAAS,QAAQ,cAAc,eAAe,CAAK,IAAY,EAAK,MAAM,QAAQ,OAAO,EAAK,MAAM,eAAe,SAAS,EAAK,UAAU,EAAK,YAAY,MAAM,GAAG,CAAC,IAAI,GAAM,mEAAmE,EAAK,SAAS,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,QAAQ,EAAE,CAAC,IAAI,EAAS,CAAC,mBAAz8B,IAA6B,IAAwD"}