Ë
    Ã?Æi&  ã                  ój   — 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d
„Zddd„Zdd„Zy	)a¬  Abgabenkontonummer (Austrian tax identification number).

The Austrian tax identification number (Abgabenkontonummer) consists of 2
digits for the issuing tax office (Finanzamtsnummer) and 7 digits for the
subject and a check digit (Steuernummer).

More information:

* https://de.wikipedia.org/wiki/Abgabenkontonummer
* https://service.bmf.gv.at/Service/Anwend/Behoerden/show_mast.asp

>>> validate('59-119/9013')
'591199013'
>>> validate('59-119/9013', office='St. Veit Wolfsberg')
'591199013'
>>> import json
>>> print(json.dumps(info('59-119/9013'), indent=2, sort_keys=True))
{
  "office": "St. Veit Wolfsberg",
  "region": "K\u00e4rnten"
}
>>> format('591199013')
'59-119/9013'
é    )Ú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    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/at/tin.pyÚcompactr   5   s   € ô �˜Ó!×'Ñ'Ó)Ð)ó    c                óN   — dj                  d„ | j                  «       D «       «      S )zqConvert the tax office name to something that we can use for
    comparison without running into encoding issues.Ú c              3  ó(   K  — | ]
  }|d v r|–— Œ y­w)ÚbcdefghijklmnopqrstvwxyzN© )Ú.0Úxs     r   ú	<genexpr>z_min_fa.<locals>.<genexpr>>   s!   è ø€ ò ,ØØÐ*Ñ*ô 	
ñ,ùs   ‚)ÚjoinÚlower)Úoffices    r   Ú_min_far   ;   s(   € ð �7‰7ñ ,Ø—<‘<“>ô,ó ,ð ,r   c                óv   — t        | «      } t        d„ t        | dd «      D «       «      }t        d|z
  dz  «      S )zCalculate the check digit.c              3  óp   K  — | ].  \  }}|d z  rt        dt        |«         «      n
t        |«      –— Œ0 y­w)é   Ú
0246813579N)Úint)r   ÚiÚns      r   r   z#calc_check_digit.<locals>.<genexpr>F   s9   è ø€ ò +áˆAˆqð &'¨¢UŒˆLœ˜Q›Ñ Ô!´°A³Ó6ñ+ùs   ‚46Né   é
   )r   ÚsumÚ	enumerateÚstr)r
   Úss     r   Úcalc_check_digitr'   C   sB   € ä�V‹_€FÜñ +ä˜f R a˜jÓ)ô+ó 	+€Aô ��Q‘˜"‰}ÓÐr   c                óv   — t        | «      } ddlm} |j                  d«      j	                  | dd «      d   d   S )zpReturn a dictionary of data about the supplied number. This typically
    returns the the tax office and region.r   )Únumdbzat/faNr   é   )r   Ústdnumr)   ÚgetÚinfo)r
   r)   s     r   r-   r-   L   s:   € ô �V‹_€FÝØ�9‰9�WÓ×"Ñ" 6¨"¨1 :Ó.¨qÑ1°!Ñ4Ð4r   Nc                ó@  — t        | «      } t        | «      dk7  r
t        «       ‚t        | «      s
t	        «       ‚t        | «      | d   k7  r
t        «       ‚t        | «      }|s
t        «       ‚|r1t        |j                  dd«      «      t        |«      k7  r
t        «       ‚| S )zÈCheck if the number is a valid tax identification number. This checks
    the length and formatting. The tax office can be supplied to check that
    the number was issued in the specified tax office.é	   éÿÿÿÿr   r   )r   ÚlenÚInvalidLengthr   ÚInvalidFormatr'   ÚInvalidChecksumr-   ÚInvalidComponentr   r,   )r
   r   r   s      r   Úvalidater6   T   sŒ   € ô �V‹_€FÜ
ˆ6ƒ{�aÒÜ‹oÐÜ�FÔÜ‹oÐÜ˜Ó 6¨"¡:Ò-ÜÓÐÜˆV‹€AÙÜÓ Ð Ù”'˜!Ÿ%™% ¨"Ó-Ó.´'¸&³/ÒAÜÓ Ð Ø€Mr   c                óL   — 	 t        t        | |«      «      S # t        $ r Y yw xY w)zqCheck if the number is a valid tax identification number. This checks
    the length, formatting and check digit.F)Úboolr6   ÚValidationError)r
   r   s     r   Úis_validr:   g   s+   € ðÜ”H˜V VÓ,Ó-Ð-øÜò Ùðús   ‚ —	#¢#c                ó>   — t        | «      } | dd ›d| dd ›d| dd ›�S )z8Reformat the number to the standard presentation format.Nr   ú-é   ú/)r   r	   s    r   Úformatr?   p   s*   € ä�V‹_€FØ  š V¨A¨a¢[°&¸¸±*Ð=Ð=r   )r
   r%   Úreturnr%   )r   r%   r@   r%   )r
   r%   r@   zdict[str, str])N)r
   r%   r   ú
str | Noner@   r%   )r
   r%   r   rA   r@   r8   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r'   r-   r6   r:   r?   r   r   r   ú<module>rF      s8   ðñ,õ2 #ä ß 'ó*ó,óó5ôô&ô>r   