{"version":3,"file":"Typing.CNWMBDA4.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","ce","_e","withTypingEffect","part","setPart","i","setI","offset","setOffset","forwards","setForwards","skipCount","setSkipCount","interval","words","skip_delay","nextI","speed","Component","props","init_Typing"],"sources":["https:/framerusercontent.com/modules/peCniMlP3KI8VN5vAOoH/vCdvwTWI2LQiKxGQplTh/Typing.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const words=[\"Hi! I'm Abhishek Jain\",\"Product at Setu by Pinelabs\",\"NMIMS'22 MBA\",\"I Build Onboarding Products for Fintechs\",\"1X Founder\"],skip_delay=40,speed=25;export function withTypingEffect(Component){return props=>{const[part,setPart]=useState(\"\");const[i,setI]=useState(0);const[offset,setOffset]=useState(0);const[forwards,setForwards]=useState(true);const[skipCount,setSkipCount]=useState(0);useEffect(()=>{const interval=setInterval(()=>{if(forwards){if(offset>=words[i].length){setSkipCount(skipCount=>skipCount+1);if(skipCount===skip_delay){setForwards(false);setSkipCount(0);}}}else{if(offset===0){setForwards(true);setI(i=>{const nextI=i+1;return nextI>=words.length?0:nextI;});setOffset(0);}}setPart(words[i].substr(0,offset));if(skipCount===0){setOffset(offset=>forwards?offset+1:offset-1);}},speed);return()=>clearInterval(interval);},[i,offset,forwards,skipCount]);return /*#__PURE__*/_jsx(Component,{...props,text:part});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withTypingEffect\":{\"type\":\"reactHoc\",\"name\":\"withTypingEffect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Typing.map"],"mappings":"A,yHAAmP,SAAgBO,EAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAACC,EAAKC,GAAST,EAAS,EAAE,EAAO,CAACU,EAAEC,GAAMX,EAAS,CAAC,EAAO,CAACY,EAAOC,GAAWb,EAAS,CAAC,EAAO,CAACc,EAASC,GAAaf,EAAS,EAAI,EAAO,CAACgB,EAAUC,GAAcjB,EAAS,CAAC,EAAoe,OAAleK,MAAc,CAAC,IAAMa,EAAS,gBAAgB,CAAIJ,EAAaF,GAAQO,EAAMT,EAAE,CAAC,SAAQO,EAAa,GAAWD,EAAU,CAAC,EAAKA,IAAYI,IAAYL,EAAY,EAAK,EAAEE,EAAa,CAAC,IAAaL,IAAS,IAAGG,EAAY,EAAI,EAAEJ,EAAK,GAAG,CAAC,IAAMU,EAAMX,EAAE,EAAE,OAAOW,GAAOF,EAAM,OAAO,EAAEE,CAAM,CAAC,EAAER,EAAU,CAAC,GAAIJ,EAAQU,EAAMT,EAAE,CAAC,OAAO,EAAEE,CAAM,CAAC,EAAKI,IAAY,GAAGH,EAAU,GAAQC,EAASF,EAAO,EAAEA,EAAO,CAAC,CAAG,EAAEU,CAAK,EAAE,UAAU,cAAcJ,CAAQ,CAAE,EAAE,CAACR,EAAEE,EAAOE,EAASE,CAAS,CAAC,EAAsB,gBAAKO,EAAU,CAAC,GAAGC,EAAM,KAAKhB,CAAI,CAAC,CAAE,CAAE,C,gDAAx6B,EAAM,CAAC,wBAAwB,8BAA8B,eAAe,2CAA2C,YAAY,EAAE,EAAW,GAAG,EAAM,E"}