{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/QJJqnOtZgAi1mfUjyAHp/cokDcXn3DWKDO34cW0wF/WithFormValidation.js", "ssg:https://framerusercontent.com/modules/kVDwqrVPwYLySjfxEBDG/XFFfseU5wd2jquFGWN8q/WC1N_qq1W.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n */export function withFormValidation(Component){return function FormValidationHOC(props){useEffect(()=>{const phoneInput=document.querySelector(\"input[name='phone-number']\");const emailInput=document.querySelector(\"input[name='email']\");// Phone number validation function\nconst validatePhoneNumber=()=>{if(!phoneInput)return;const phonePattern=/^(?:\\+\\d{1,3})?0?\\d{7,10}$/;const value=phoneInput.value;if(/[^\\d+]/.test(value)){phoneInput.setCustomValidity(\"Invalid format - Only numbers are allowed\");}else if(value&&!phonePattern.test(value)){phoneInput.setCustomValidity(\"Invalid format: Include a prefix (e.g., +972 or +1) followed by 7-10 digits, no spaces\");}else{phoneInput.setCustomValidity(\"\");}};// Email validation function\nconst validateEmail=()=>{if(!emailInput)return;const emailPattern=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.(com|net|org|nu|eu|gov|group|edu|mil|co|il|uk|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|ca|br|in|ar|mx|cn|za|gr|dk|fi|pl|be|pt|tr|xyz|info|biz|me|io|co\\.il)$/;const excludedDomains=[\"gmail.com\",\"hotmail.com\",\"yahoo.com\",\"inbox.lv\",\"dominatingkeywords.com\"]// Add more domains as needed\n;const value=emailInput.value;if(value===\"\"){emailInput.setCustomValidity(\"\");}else if(!emailPattern.test(value)){emailInput.setCustomValidity(\"Please use a business email adress.\");}else{const domain=value.split(\"@\")[1]// Extract domain from email\n;if(excludedDomains.includes(domain)){emailInput.setCustomValidity(\"Please use a business email adress.\");}else{emailInput.setCustomValidity(\"\");}}};// Attach event listeners if inputs exist\nphoneInput===null||phoneInput===void 0?void 0:phoneInput.addEventListener(\"blur\",validatePhoneNumber);emailInput===null||emailInput===void 0?void 0:emailInput.addEventListener(\"blur\",validateEmail);// Cleanup event listeners on component unmount\nreturn()=>{phoneInput===null||phoneInput===void 0?void 0:phoneInput.removeEventListener(\"blur\",validatePhoneNumber);emailInput===null||emailInput===void 0?void 0:emailInput.removeEventListener(\"blur\",validateEmail);};},[])// Run only once on mount\n;return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFormValidation\":{\"type\":\"reactHoc\",\"name\":\"withFormValidation\",\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"* @framerIntrinsicWidth 100\",\"framerIntrinsicHeight\":\"100\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithFormValidation.map", "// Generated by Framer (0b8b5e5)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;DM Sans-500\",\"GF;DM Sans-700\",\"GF;DM Sans-700italic\",\"GF;DM Sans-500italic\"]);export const fonts=[{explicitInter:true,fonts:[{family:\"DM Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwAkJxhS2f3ZGMZpg.woff2\",weight:\"500\"},{family:\"DM Sans\",source:\"google\",style:\"normal\",url:\"https://fonts.gstatic.com/s/dmsans/v15/rP2tp2ywxg089UriI5-g4vlH9VoD8CmcqZG40F9JadbnoEwARZthS2f3ZGMZpg.woff2\",weight:\"700\"},{family:\"DM Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/dmsans/v15/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat9uCm32RmYJpso5.woff2\",weight:\"700\"},{family:\"DM Sans\",source:\"google\",style:\"italic\",url:\"https://fonts.gstatic.com/s/dmsans/v15/rP2rp2ywxg089UriCZaSExd86J3t9jz86Mvy4qCRAL19DksVat-7DW32RmYJpso5.woff2\",weight:\"500\"}]}];export const css=['.framer-xgZLJ .framer-styles-preset-1rr69q1:not(.rich-text-wrapper), .framer-xgZLJ .framer-styles-preset-1rr69q1.rich-text-wrapper p { --framer-font-family: \"DM Sans\", \"DM Sans Placeholder\", sans-serif; --framer-font-family-bold: \"DM Sans\", \"DM Sans Placeholder\", sans-serif; --framer-font-family-bold-italic: \"DM Sans\", \"DM Sans Placeholder\", sans-serif; --framer-font-family-italic: \"DM Sans\", \"DM Sans Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 12px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-weight: 500; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 500; --framer-letter-spacing: 0em; --framer-line-height: 2em; --framer-paragraph-spacing: 20px; --framer-text-alignment: start; --framer-text-color: var(--token-a548a8aa-aec5-44b3-b340-8ca2ab153059, #344054); --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }'];export const className=\"framer-xgZLJ\";\nexport const __FramerMetadata__ = {\"exports\":{\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "0FAIU,SAASA,EAAmBC,EAAU,CAAC,OAAO,SAA2BC,EAAM,CAAC,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAW,SAAS,cAAc,4BAA4B,EAAQC,EAAW,SAAS,cAAc,qBAAqB,EACtOC,EAAoB,IAAI,CAAC,GAAG,CAACF,EAAW,OAAO,IAAMG,EAAa,6BAAmCC,EAAMJ,EAAW,MAAS,SAAS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C,CAAC,EAAeC,EAAI,CAAC,2lCAA2lC,EAAeC,EAAU",
  "names": ["withFormValidation", "Component", "props", "ue", "phoneInput", "emailInput", "validatePhoneNumber", "phonePattern", "value", "validateEmail", "emailPattern", "excludedDomains", "domain", "p", "fontStore", "fonts", "css", "className"]
}
