
    RPf                         d dl mZmZ ddlmZmZ ddlmZmZm	Z	m
Z
mZ ddlmZ dddddddddd	d	eeef   d
ee   dedee   dee   dee   dee   dee   dee   dee   defdZy)    )OptionalUnion   )EmailSyntaxErrorValidatedEmail)split_emailvalidate_email_local_partvalidate_email_domain_namevalidate_email_domain_literalvalidate_email_length)CASE_INSENSITIVE_MAILBOX_NAMESNF)	allow_smtputf8allow_empty_localallow_quoted_localallow_domain_literalcheck_deliverabilitytest_environmentglobally_deliverabletimeoutdns_resolveremailr   r   r   r   r   r   r   r   r   returnc      	         Z   ddl m}
m}m}m}m}m}m} ||
}||}||}||}||}||}||	|}t        | t              s	 | j                  d      } t        |       \  }}}t               }| |_        t!        ||||      }|d   |_        |d   |_        |d	   |_        |r|st        d
      |j$                  j|j$                  j)                         t*        v rJ|j"                  >|j$                  j)                         |_        |j"                  j)                         |_        d}t-        |      dk(  rt        d      |j/                  d      rM|j1                  d      r<t3        |dd       }|st        d      |d   |_        |d   |_        |d   |_        d}n"t;        |||      }|d   |_        |d   |_        |j"                  dz   |j4                  z   |_        |j&                  s=|j6                  st?        d      |j$                  xs ddz   |j6                  z   |_         nd|_         tC        |       |rP|sN|r|S ddl"m#}  ||j6                  |j4                  ||	      }|jI                         D ]  \  }}tK        |||        |S # t        $ r}t        d      |d}~ww xY w)z
    Given an email address, and some options, returns a ValidatedEmail instance
    with information about the address if it is valid or, if the address is not
    valid, raises an EmailNotValidError. This is the main function of the module.
    r   )ALLOW_SMTPUTF8ALLOW_QUOTED_LOCALALLOW_DOMAIN_LITERALGLOBALLY_DELIVERABLECHECK_DELIVERABILITYTEST_ENVIRONMENTDEFAULT_TIMEOUTNasciiz%The email address is not valid ASCII.)r   r   quoted_local_part
local_partascii_local_partsmtputf8z7Quoting the part before the @-sign is not allowed here.Fr   z)There must be something after the @-sign.[]z<A bracketed IP address after the @-sign is not allowed here.domaindomain_addressT)r   r   ascii_domain@zMissing ASCII domain. )validate_email_deliverability)&r-   r   r   r   r   r   r   r    
isinstancestrdecode
ValueErrorr   r   r   originalr	   r#   r$   r%   lowerr   len
startswithendswithr   r)   r+   r*   r
   
normalized	Exceptionascii_emailr   deliverabilityr.   itemssetattr)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    er#   domain_partis_quoted_local_partretlocal_part_infois_domain_literaldomain_part_infor.   deliverability_infokeyvalues                                X/var/www/fastapitest/venv/lib/python3.12/site-packages/email_validator/validate_email.pyvalidate_emailrI      s   *V V V'!/#3#3+#3</!
 eS!	SLL)E e
 2J1 
CCL 0
?MBSBVXO %\2CN*+=>C":.CL
 $6XYY
 '%%'+II>>%"3399;--/ 
;1JKK				$)=)=c)B8Qr9JK#"#abb%h/
+H5-.>? 
 6kTd  |P  Q%h/
+N; ^^c)CJJ6CN <<344//52<s?O?OO #$4 J 	B;cjj'<
 .335 	%JCCe$	% J}  	S"#JKQRR	Ss   J 	J*J%%J*)typingr   r   exceptions_typesr   r   syntaxr   r	   r
   r   r   rfc_constantsr   r0   bytesboolintobjectrI        rH   <module>rT      s    " > M  M 9 &*#)-+/+/'++/!%)JeJ TN	J
 J !J #4.J #4.J tnJ #4.J c]J 6"J JrS   