Ë
    Ã?Æi…  ã                  ó~   — d Z ddlmZ ddlZddl­ ddlmZ  ej                  d«      Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zy)a¬  EIN (U.S. Employer Identification Number).

The Employer Identification Number, also known as Federal Employer
Identification Number (FEIN), is used to identify a business entity in the
United States. It is issued to anyone that has to pay withholding taxes on
employees.

>>> validate('91-1144442')
'911144442'
>>> get_campus('04-2103594') == 'Brookhaven'
True
>>> validate('911-14-4442')  # dash in the wrong place
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> validate('07-1144442')  # wrong prefix
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> format('042103594')
'04-2103594'
>>> format('123')  # unknown formatting is left alone
'123'
é    )ÚannotationsN)Ú*)Úcleanz)^(?P<area>[0-9]{2})-?(?P<group>[0-9]{7})$c                ó6   — t        | d«      j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.ú-)r   Ústrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/us/ein.pyÚcompactr   9   s   € ô �˜Ó×#Ñ#Ó%Ð%ó    c                ó’   — ddl m} t        | «      } |j                  d«      j	                  | «      d   d   }|s
t        «       ‚|d   S )z;Determine the Campus or other location that issued the EIN.r   )Únumdbzus/einé   Úcampus)Ústdnumr   r   ÚgetÚinfoÚInvalidComponent)r
   r   Úresultss      r   Ú
get_campusr   ?   sH   € åÜ�V‹_€FØ�i‰i˜Ó!×&Ñ& vÓ.¨qÑ1°!Ñ4€GÙÜÓ Ð Ø�8ÑÐr   c                ó    — t         j                  t        | d«      j                  «       «      }|s
t	        «       ‚t        | «       t        | «      S )zgCheck if the number is a valid EIN. This checks the length, groups and
    formatting if it is present.Ú )Ú_ein_reÚsearchr   r   ÚInvalidFormatr   r   )r
   Úmatchs     r   Úvalidater   I   s?   € ô �N‰Nœ5 ¨Ó,×2Ñ2Ó4Ó5€EÙÜ‹oÐÜˆvÔÜ�6‹?Ðr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z#Check if the number is a valid EIN.F)Úboolr   ÚValidationErrorr	   s    r   Úis_validr"   S   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ó>   — t        | «      dk(  r| dd dz   | dd z   } | S )z8Reformat the number to the standard presentation format.é	   Né   r   )Úlenr	   s    r   Úformatr'   [   s.   € ä
ˆ6ƒ{�aÒØ˜˜�˜cÑ! F¨1¨2 JÑ.ˆØ€Mr   )r
   ÚstrÚreturnr(   )r
   r(   r)   r    )Ú__doc__Ú
__future__r   ÚreÚstdnum.exceptionsÚstdnum.utilr   Úcompiler   r   r   r   r"   r'   © r   r   ú<module>r1      sD   ðñ(õ2 #ã 	ä Ý ð ˆ"�*‰*ÐAÓ
B€ó&óóóôr   