Ë
    Ã?Æ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	)u™  VAT (Moms, MervÃ¤rdesskatt, Swedish VAT number).

The Momsregistreringsnummer is used for VAT (Moms, MervÃ¤rdesskatt) purposes
and consists of 12 digits of which the last two should be 01. The first 10
digits should have a valid Luhn checksum.

>>> validate('SE 123456789701')
'123456789701'
>>> validate('123456789101')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)Úorgnr)Ú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 -.ÚSEé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/se/vat.pyÚcompactr   *   s@   € ô �6˜5Ó!×'Ñ'Ó)×/Ñ/Ó1€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                ó†   — t        | «      } t        | «      r| dd dk7  r
t        «       ‚t        j                  | dd «       | S )zbCheck if the number is a valid VAT number. This checks the length,
    formatting and check digit.éþÿÿÿNÚ01)r   r   ÚInvalidFormatr   Úvalidater   s    r   r   r   3   sA   € ô �V‹_€FÜ�FÔ˜v b c˜{¨dÒ2Ü‹oÐÜ	‡N�N�6˜#˜2�;ÔØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid VAT number.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.ser   Ústdnum.utilr   r   r   r   r   © r   r   ú<module>r$      s'   ðñ*õ #ä Ý ß 'óóôr   