{"version":3,"file":"Work_Email.CPF2uMaS.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/uB5j9mIMrVWvIUETX3ah/sFzv9SbIr0fS5b5taqth/Work_Email.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";const blockedDomains=[\"gmail.com\",\"yahoo.com\",\"hotmail.com\",\"outlook.com\",\"aol.com\",\"mail.com\",\"protonmail.com\",\"icloud.com\"];// Override to add work email validation\nexport function withWorkEmailValidation(Component){return props=>{const containerRef=useRef(null);useEffect(()=>{if(containerRef.current){// Find the email input in the child component\nconst inputEl=containerRef.current.querySelector(\"input\");if(inputEl){inputEl.addEventListener(\"input\",()=>{// Let the browser do its own 'is this shaped like an email?' check first\n// If it's not valid yet, don't bother with the domain check\nif(!inputEl.validity.valid){inputEl.setCustomValidity(\"\");return;}// Split out the domain\nconst domain=(inputEl.value.split(\"@\")[1]||\"\").toLowerCase();// Block if the domain is in the list\nif(blockedDomains.includes(domain)){inputEl.setCustomValidity(\"Please use a valid work email.\");}else{inputEl.setCustomValidity(\"\");}});}}},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:containerRef});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withWorkEmailValidation\":{\"type\":\"reactHoc\",\"name\":\"withWorkEmailValidation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Work_Email.map"],"mappings":"yHACA,SAAgB,EAAwB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAaA,EAAO,KAAK,CAK+C,OAL9C,MAAc,CAAC,GAAG,EAAa,QAAQ,CACzI,IAAM,EAAQ,EAAa,QAAQ,cAAc,QAAQ,CAAI,GAAS,EAAQ,iBAAiB,YAAY,CAE3G,GAAG,CAAC,EAAQ,SAAS,MAAM,CAAC,EAAQ,kBAAkB,GAAG,CAAC,OAC1D,IAAM,GAAQ,EAAQ,MAAM,MAAM,IAAI,CAAC,IAAI,IAAI,aAAa,CACzD,EAAe,SAAS,EAAO,CAAE,EAAQ,kBAAkB,iCAAiC,CAAO,EAAQ,kBAAkB,GAAG,EAAI,GAAK,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,EAAa,CAAC,qBANpK,IAAoC,CAAM,EAAe,CAAC,YAAY,YAAY,cAAc,cAAc,UAAU,WAAW,iBAAiB,aAAa"}