Ë
    Ã?Æiø
  ã                  ó^   — d Z ddlmZ ddl­ ddlmZmZ dd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zy)aç  ACN (Australian Company Number).

The Australian Company Number (ACN) is a company identifier issued by the
Australian Securities and Investments Commission.

More information:

* https://en.wikipedia.org/wiki/Australian_Company_Number

>>> validate('004 085 616')
'004085616'
>>> validate('010 499 966')
'010499966'
>>> validate('999 999 999')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('004085616')
'004 085 616'
>>> to_abn('002 724 334')
'43002724334'
é    )Ú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.ú )r   Ústrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/au/acn.pyÚcompactr   2   s   € ô �˜Ó×#Ñ#Ó%Ð%ó    c                óP   — t        t        d„ t        | «      D «       «      dz  «      S )zCalculate the checksum.c              3  óD   K  — | ]  \  }}t        |«      |d z
  z  –— Œ y­w)é   N)Úint)Ú.0ÚiÚns      r   ú	<genexpr>z#calc_check_digit.<locals>.<genexpr>:   s!   è ø€ ÒC©¨¨A”C˜“F˜a !™eÕ$ÑCùs   ‚ é
   )ÚstrÚsumÚ	enumerater
   s    r   Úcalc_check_digitr   8   s"   € ä”ÑC´¸6Ó1BÔCÓCÀrÑIÓJÐJr   c                ó¬   — t        | «      } t        | «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        | «      | d   k7  r
t        «       ‚| S )z[Check if the number is a valid ACN. This checks the length, formatting
    and check digit.é	   éÿÿÿÿ)r   r   ÚInvalidFormatÚlenÚInvalidLengthr   ÚInvalidChecksumr
   s    r   Úvalidater#   =   sP   € ô �V‹_€FÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜ˜Ó 6¨"¡:Ò-ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z#Check if the number is a valid ACN.F)Úboolr#   ÚValidationErrorr
   s    r   Úis_validr'   J   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                óR   — t        | «      } dj                  | dd | dd | dd f«      S )z8Reformat the number to the standard presentation format.r   r   é   é   N)r   Újoinr
   s    r   Úformatr,   R   s3   € ä�V‹_€FØ�8‰8�V˜A˜a�[ &¨¨1 +¨v°a°b¨zÐ:Ó;Ð;r   c                óL   — ddl m} t        | «      } |j                  | «      | z   S )z:Convert the number to an Australian Business Number (ABN).r   )Úabn)Ú	stdnum.aur.   r   Úcalc_check_digits)r   r.   s     r   Úto_abnr1   X   s$   € åÜ�V‹_€FØ× Ñ  Ó(¨6Ñ1Ð1r   N)r   r   Úreturnr   )r   r   r2   r%   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r#   r'   r,   r1   © r   r   ú<module>r8      s4   ðñ*õ. #ä ß 'ó&óKó

óó<ô2r   