Ë
    Ã?Æi¾  ã                  óZ   — d Z ddlmZ ddl­ ddlmZmZ dd„Zdd„ZdZ	dd„Z
dd	„Zdd
„Zy)uÍ  CUIT (CÃ³digo Ãšnico de IdentificaciÃ³n Tributaria, Argentinian tax number).

The CUIT is a taxpayer identification number used for VAT (IVA, Impuesto al
Valor Agregado) and other taxes.

More information:

* https://es.wikipedia.org/wiki/Clave_Ãšnica_de_IdentificaciÃ³n_Tributaria

>>> validate('20-05536168-2')
'20055361682'
>>> validate('20267565392')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('20267565393')
'20-26756539-3'
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                ó6   — t        | d«      j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -)r   Ústrip©Únumbers    úU/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/ar/cuit.pyÚcompactr   2   s   € ô �˜Ó×$Ñ$Ó&Ð&ó    c                óT   — d}t        d„ t        || «      D «       «      dz  }dd|z
     S )zCalculate the check digit.)
é   é   é   é   é   é   r   r   r   r   c              3  ó>   K  — | ]  \  }}|t        |«      z  –— Œ y ­w)N)Úint)Ú.0ÚwÚns      r   ú	<genexpr>z#calc_check_digit.<locals>.<genexpr>;   s   è ø€ Ò<™t˜q !�”C˜“F•
Ñ<ùs   ‚é   Ú012345678990)ÚsumÚzip)r
   ÚweightsÚchecks      r   Úcalc_check_digitr!   8   s2   € à,€GÜÑ<¤s¨7°FÓ';Ô<Ó<¸rÑA€EØ˜"˜u™*Ñ%Ð%r   )
Ú20Ú23Ú24Ú27Ú30Ú33Ú34Ú50Ú51Ú55c                óÜ   — t        | «      } t        | «      dk7  r
t        «       ‚t        | «      s
t	        «       ‚| dd t
        vr
t        «       ‚t        | dd «      | d   k7  r
t        «       ‚| S )ú$Check if the number is a valid CUIT.r   Nr   éÿÿÿÿ)	r   ÚlenÚInvalidLengthr   ÚInvalidFormatÚ
_cuit_tpesÚInvalidComponentr!   ÚInvalidChecksumr	   s    r   Úvalidater5   G   sk   € ä�V‹_€FÜ
ˆ6ƒ{�bÒÜ‹oÐÜ�FÔÜ‹oÐØˆbˆq€zœÑ#ÜÓ Ð Ü˜˜s ˜Ó$¨¨r©
Ò2ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)r-   F)Úboolr5   ÚValidationErrorr	   s    r   Úis_validr9   U   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                óF   — t        | «      } | dd dz   | dd z   dz   | dd z   S )z8Reformat the number to the standard presentation format.r   r   ú-é
   N)r   r	   s    r   Úformatr=   ]   s7   € ä�V‹_€FØ�1�QˆK˜#Ñ  q¨ Ñ,¨sÑ2°V¸B¸C°[Ñ@ÐAr   N)r
   ÚstrÚreturnr>   )r
   r>   r?   r7   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r!   r2   r5   r9   r=   © r   r   ú<module>rE      s6   ðñ2õ& #ä ß 'ó'ó&ð€
óóôBr   