Ë
    Ã?Æiº  ã                  óR   — d Z ddlmZ ddl­ ddlmZ ddlmZmZ d
d„Z	d
d„Z
dd„Zy	)aD  Ust ID Nr. (Umsatzsteur Identifikationnummer, German VAT number).

The number is 9 digits long and uses the ISO 7064 Mod 11, 10 check digit
algorithm.

>>> compact('DE 136,695 976')
'136695976'
>>> validate('DE136695976')
'136695976'
>>> validate('136695978')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)Ú	mod_11_10)ÚcleanÚisdigitsc                ó‚   — t        | d«      j                  «       j                  «       } | j                  d«      r| dd } | S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -./,ÚDEé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/de/vat.pyÚcompactr   *   s@   € ô �6˜7Ó#×)Ñ)Ó+×1Ñ1Ó3€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                ó°   — t        | «      } t        | «      r| d   dk(  r
t        «       ‚t        | «      dk7  r
t	        «       ‚t        j                  | «       | S )úkCheck if the number provided is a valid VAT number. This checks the
    length, formatting and check digit.r   Ú0é	   )r   r   ÚInvalidFormatÚlenÚInvalidLengthr   Úvalidater   s    r   r   r   3   sO   € ô �V‹_€FÜ�FÔ˜v a™y¨CÒ/Ü‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜ×Ñ�vÔØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)r   F)Úboolr   ÚValidationErrorr   s    r   Úis_validr   ?   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   ÚstrÚreturnr   )r   r   r    r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.iso7064r   Ústdnum.utilr   r   r   r   r   © r   r   ú<module>r'      s'   ðñ(õ #ä Ý $ß 'óó	ôr   