Ë
    Ã?ÆiŒ	  ã                  óN   — d Z ddlmZ ddl­ ddlmZ dd„ZdZdd„Zdd„Z	dd	„Z
y
)aÌ  Wertpapierkennnummer (German securities identification code).

The WKN, WPKN, WPK (Wertpapierkennnummer) is a German code to identify
securities. It is a 6-digit alphanumeric number without a check digit that no
longer has any structure. It is expected to be replaced by the ISIN.

>>> validate('A0MNRK')
'A0MNRK'
>>> validate('AOMNRK')  # no capital o allowed
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> to_isin('SKWM02')
'DE000SKWM021'
é    )Úannotations)Ú*)Ú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 whitespace.ú )r   ÚstripÚupper©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/de/wkn.pyÚcompactr   +   s#   € ô �˜Ó×#Ñ#Ó%×+Ñ+Ó-Ð-ó    z$0123456789ABCDEFGH JKLMN PQRSTUVWXYZc                ó„   — t        | «      } t        d„ | D «       «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚| S )úRCheck if the number provided is valid. This checks the length and
    check digit.c              3  ó,   K  — | ]  }|t         v –— Œ y ­w)N)Ú	_alphabet)Ú.0Úxs     r   ú	<genexpr>zvalidate.<locals>.<genexpr>9   s   è ø€ Ò. !ˆq”IŒ~Ñ.ùs   ‚é   )r   ÚallÚInvalidFormatÚlenÚInvalidLengthr
   s    r   Úvalidater   5   s<   € ô �V‹_€FÜÑ. vÔ.Ô.Ü‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐØ€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   ‚ –	"¡"c                ó2   — ddl m} |j                  d| «      S )zConvert the number to an ISIN.r   )ÚisinÚDE)Ústdnumr!   Ú
from_natid)r   r!   s     r   Úto_isinr%   I   s   € åØ�?‰?˜4 Ó(Ð(r   N)r   ÚstrÚreturnr&   )r   r&   r'   r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r   r%   © r   r   ú<module>r-      s0   ðñ*õ  #ä Ý ó.ð 3€	óóô)r   