Ë
    Ã?Æiå  ã                  ón   — 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y)a¾  Leitweg-ID, a buyer reference or routing identifier for electronic invoices.

For the successful transmission of an electronic invoice as invoicing party or
sender, a unique identification and addressing of the invoice recipient is
required. The Leitweg-ID must be transmitted as a mandatory requirement for
electronic invoicing to public contracting authorities in the federal
administration.

More information:

* https://leitweg-id.de/
* https://de.wikipedia.org/wiki/Leitweg-ID
* https://xeinkauf.de/app/uploads/2022/11/Leitweg-ID-Formatspezifikation-v2-0-2-1.pdf

>>> validate('991-03730-19')
'991-03730-19'
>>> validate('1-03730-19')
Traceback (most recent call last):
    ...
InvalidFormat: ...
é    )ÚannotationsN)Ú*)Ú	mod_97_10z%[0-9]{2,12}(-[0-9A-Z]{,30})?-[0-9]{2}c                ó>   — | j                  «       j                  «       S )z’
    Convert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.
    )ÚstripÚupper©Únumbers    úX/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/de/leitweg.pyÚcompactr   6   s   € ð
 �<‰<‹>×ÑÓ!Ð!ó    c                óV  — t        | t        «      s
t        «       ‚t        | «      } dt	        | «      cxk  rdk  st        «       ‚ t        «       ‚t        j                  t        | «      s
t        «       ‚| dd dvr
t        «       ‚t        j                  | j                  dd«      «       | S )z€
    Check if the number provided is valid. This checks the format, state or
    federal government code, and check digits.
    é   é.   Né   >   Ú01Ú02Ú03Ú04Ú05Ú06Ú07Ú08Ú09Ú10Ú11Ú12Ú13Ú14Ú15Ú16Ú99ú-Ú )Ú
isinstanceÚstrÚInvalidFormatr   ÚlenÚInvalidLengthÚreÚ	fullmatchÚ_patternÚInvalidComponentr   ÚvalidateÚreplacer	   s    r   r.   r.   >   s—   € ô
 �fœcÔ"Ü‹oÐÜ�V‹_€Fà”�F“Ô!˜rÒ!Ü‹oÐð "Ü‹oÐä�<‰<œ &Ô)Ü‹oÐà�"�1ˆ:ð ñ ô Ó Ð ä×Ñ�v—~‘~ c¨2Ó.Ô/Ø€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)zRCheck if the number provided is valid. This checks the length and
    check digit.F)Úboolr.   ÚValidationErrorr	   s    r   Úis_validr3   W   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡")r
   r&   Úreturnr&   )r
   r&   r4   r1   )Ú__doc__Ú
__future__r   r*   Ústdnum.exceptionsÚstdnum.iso7064r   Úcompiler,   r   r.   r3   © r   r   ú<module>r;      s:   ðñ*õ, #ã 	ä Ý $ð ˆ2�:‰:Ð>Ó?€ó"óô2r   