Ë
    Ã?Æik  ã                  óL   — d Z ddlmZ ddl­ ddlmZmZ dZ	 d
d„Zd
d„Z	dd„Z
y	)u6  OSS (European VAT on e-Commerce - One Stop Shop).

This covers number that have been issued under the non-union scheme and the
import scheme of the European VAT on e-Commerce one stop shop. Numbers under
the non-union scheme are assigned to foreign companies providing digital
services to European Union consumers. Numbers under the import scheme are
assigned for importing goods from a third country (through an intermediary).

This is also called MOSS (mini One Stop Shop) and VoeS (VAT on e-Services).
The number under the import scheme is also called IOSS (Import One Stop Shop)
number.

Numbers under the non-union scheme are in the format EUxxxyyyyyz. For the
import scheme the format is IMxxxyyyyyyz. An intermediary will also get an
number in the format INxxxyyyyyyz but that may not be used as VAT
identification number.

There appears to be a check digit algorithm but the FITSDEV2-SC12-TS-Mini1SS
(Mini-1SS â€“ Technical Specifications) document that describes the algorithm
appears to not be publicly available.

More information:

* https://vat-one-stop-shop.ec.europa.eu/one-stop-shop/register-oss_en
* https://europa.eu/youreurope/business/taxation/vat/vat-digital-services-moss-scheme/index_en.htm
* https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32002L0038

>>> validate('EU 372022452')
'EU372022452'
é    )Úannotations)Ú*)ÚcleanÚisdigits)Ú040Ú056Ú100Ú191Ú196Ú203Ú208Ú233Ú246Ú250Ú276Ú300Ú348Ú372Ú380Ú428Ú440Ú442Ú470Ú528Ú616Ú620Ú642Ú703Ú705Ú724Ú752Ú900c                óR   — t        | d«      j                  «       j                  «       S )zCompact European VAT Numberz -)r   ÚupperÚstrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/eu/oss.pyÚcompactr)   \   s!   € ä�˜Ó×$Ñ$Ó&×,Ñ,Ó.Ð.ó    c                ó.  — t        | «      } | j                  d«      rt        | «      dk7  r=t        «       ‚| j                  d«      rt        | «      dk7  rt        «       ‚t	        «       ‚t        | dd «      s
t        «       ‚| dd t        vr
t	        «       ‚| S )zValidate European VAT NumberÚEUé   ÚIMé   é   Né   )r)   Ú
startswithÚlenÚInvalidLengthÚInvalidComponentr   ÚInvalidFormatÚISO_3166_1_MEMBER_STATESr&   s    r(   Úvalidater8   a   s‹   € ä�V‹_€FØ×Ñ˜ÔÜˆv‹;˜"ÒÜ“/Ð!Ø	×	Ñ	˜4Ô	 Üˆv‹;˜"ÒÜ“/Ð!äÓ Ð Ü�F˜1˜2�JÔÜ‹oÐØˆa�€{Ô2Ñ2ÜÓ Ð Ø€Mr*   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)zgCheck if the number is a valid VAT number. This performs the
    country-specific check for the number.F)Úboolr8   ÚValidationErrorr&   s    r(   Úis_validr<   s   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r'   ÚstrÚreturnr=   )r'   r=   r>   r:   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r7   r)   r8   r<   © r*   r(   ú<module>rD      s2   ðñ,õ> #ä ß 'ðÐ ð< Tó/ó
ô$r*   