{"version":3,"file":"EmailValidation.fR6g_FE4.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/4q0liSkEFTWB641LbWEn/eNUreGPIW4BW1sbG6afa/EmailValidation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";// Free / personal email domains to block\nconst blockedDomains=[\"gmail.com\",\"yahoo.com\",\"hotmail.com\",\"outlook.com\",\"icloud.com\",\"aol.com\",\"protonmail.com\",\"live.com\",\"inbox.lt\",\"mail.ru\"];// Basic but safe email validation:\n// - something before @\n// - something after @\n// - at least one \".\" in the domain part\n// - at least 2 characters after the last \".\"\nconst emailPattern=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]{2,}$/;function getBusinessEmailError(value){const trimmed=value.trim().toLowerCase();if(!trimmed)return\"\"// empty value -> let \"required\" handle it\n;// 1) Check general email format (catches \"@gmail\", \"name@\", \"name@gmai\", etc.)\nif(!emailPattern.test(trimmed)){return\"Please enter a valid email address.\";}// 2) Extract domain part after \"@\"\nconst parts=trimmed.split(\"@\");if(parts.length!==2){return\"Please enter a valid email address.\";}const domain=parts[1];// 3) Block free / personal domains\nif(blockedDomains.includes(domain)){return\"Please use a business email address (no Gmail, Yahoo, etc.).\";}// No error -> valid business email\nreturn\"\";}export function businessEmailOnly(){return{onChange(event){const input=event.target;const value=input.value;const error=getBusinessEmailError(value);// Set or clear the custom error message\ninput.setCustomValidity(error);// If you want to show the browser tooltip immediately while typing,\n// uncomment this:\n// if (error) {\n//     input.reportValidity()\n// }\n}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withbusinessEmailOnly(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...businessEmailOnly(props)});};}withbusinessEmailOnly.displayName=\"businessEmailOnly\";\nexport const __FramerMetadata__ = {\"exports\":{\"withbusinessEmailOnly\":{\"type\":\"reactHoc\",\"name\":\"withbusinessEmailOnly\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"businessEmailOnly\":{\"type\":\"override\",\"name\":\"businessEmailOnly\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EmailValidation.map"],"mappings":"oKAMmD,SAAS,EAAsB,EAAM,CAAC,IAAM,EAAQ,EAAM,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAQ,MAAM,GAEpJ,GAAG,CAAC,EAAa,KAAK,EAAQ,CAAE,MAAM,sCACtC,IAAM,EAAM,EAAQ,MAAM,IAAI,CAAC,GAAG,EAAM,SAAS,EAAG,MAAM,sCAAuC,IAAM,EAAO,EAAM,GAEpH,OADG,EAAe,SAAS,EAAO,CAAQ,+DACpC,GAAI,SAAgB,GAAmB,CAAC,MAAM,CAAC,SAAS,EAAM,CAAC,IAAM,EAAM,EAAM,OAAa,EAAM,EAAM,MAAY,EAAM,EAAsB,EAAM,CAC9J,EAAM,kBAAkB,EAAM,EAK5B,CAAqJ,SAAgB,EAAsB,EAAE,CAAC,MAAO,KAAQ,EAA+BA,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAkB,EAAM,CAAC,CAAC,uBAjBjS,IAiByB,IAAmF,CAhBjJ,EAAe,CAAC,YAAY,YAAY,cAAc,cAAc,aAAa,UAAU,iBAAiB,WAAW,WAAW,UAAU,CAK5I,EAAa,gCAW6T,EAAsB,YAAY"}