Ë
    Ã?Æiú	  ã                  ór   — d Z ddlmZ ddlZddl­ ddlmZ  ej                  d«      ZdZ	dd„Z
dd	„Zdd
„Zy)a1  Postcode (the Dutch postal code).

The Dutch postal code consists of four numbers followed by two letters,
separated by a single space.

More information:
* https://en.wikipedia.org/wiki/Postal_codes_in_the_Netherlands
* https://nl.wikipedia.org/wiki/Postcodes_in_Nederland

>>> validate('2601 DC')
'2601 DC'
>>> validate('NL-2611ET')
'2611 ET'
>>> validate('26112 ET')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> validate('2611 SS')  # a few letter combinations are banned
Traceback (most recent call last):
    ...
InvalidComponent: ...
é    )ÚannotationsN)Ú*)Úcleanz)^(?P<pt1>[1-9][0-9]{3})(?P<pt2>[A-Z]{2})$)ÚSAÚSDÚSSc                ó‚   — t        | d«      j                  «       j                  «       } | j                  d«      r| dd } | S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -ÚNLé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úY/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/nl/postcode.pyÚcompactr   9   s@   € ô �6˜4Ó ×&Ñ&Ó(×.Ñ.Ó0€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                óæ   — t        | «      } t        j                  | «      }|s
t        «       ‚|j	                  d«      t
        v r
t        «       ‚|j	                  d«      ›d|j	                  d«      ›�S )zCheck if the number is in the correct format. This currently does not
    check whether the code corresponds to a real address.Úpt2Úpt1ú )r   Ú_postcode_reÚsearchÚInvalidFormatÚgroupÚ_postcode_blacklistÚInvalidComponent)r   Úmatchs     r   Úvalidater   B   s`   € ô �V‹_€FÜ×Ñ Ó'€EÙÜ‹oÐØ‡{�{�5ÓÔ0Ñ0ÜÓ Ð Ø—k‘k %Õ(¨%¯+©+°eÔ*<Ð=Ð=r   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z+Check if the number is a valid postal code.F)Úboolr   ÚValidationErrorr   s    r   Úis_validr#   N   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡")r   ÚstrÚreturnr$   )r   r$   r%   r!   )Ú__doc__Ú
__future__r   ÚreÚstdnum.exceptionsÚstdnum.utilr   Úcompiler   r   r   r   r#   © r   r   ú<module>r-      sB   ðñ(õ. #ã 	ä Ý ð ˆr�z‰zÐFÓG€ð )Ð óó	>ôr   