Ë
    Ã?ÆiÍ  ã                  óN   — d Z ddlmZ ddl­ ddlmZ ddlmZ d
d„Zd
d„Z	dd„Z
y	)a‰  LEI (Legal Entity Identifier).

The Legal Entity Identifier (LEI) is used to identify legal entities for use
in financial transactions. A LEI is a 20-character alphanumeric string that
consists of a 4-character issuing LOU (Local Operating Unit), 2 digits that
are often 0, 13 digits to identify the organisation and 2 check digits.

More information:

* https://en.wikipedia.org/wiki/Legal_Entity_Identifier
* https://www.lei-lookup.com/
* https://www.gleif.org/
* http://openleis.com/

>>> validate('213800KUD8LAJWSQ9D15')
'213800KUD8LAJWSQ9D15'
>>> validate('213800KUD8LXJWSQ9D15')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)Ú	mod_97_10)Úcleanc                óR   — t        | d«      j                  «       j                  «       S )z‰Convert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding white space.z -)r   ÚstripÚupper©Únumbers    úQ/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/lei.pyÚcompactr   2   s#   € ô �˜Ó×$Ñ$Ó&×,Ñ,Ó.Ð.ó    c                óF   — t        | «      } t        j                  | «       | S )zRCheck if the number is valid. This checks the length, format and check
    digits.)r   r   Úvalidater
   s    r   r   r   8   s    € ô �V‹_€FÜ×Ñ�vÔØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)zCheck if the number is valid.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   ú<module>r      s'   ðñ*õ, #ä Ý $Ý ó/óôr   