Current File : //lib/python3.9/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-39.pyc
a

[��f}
�@s�ddlmZmZmZmZmZddlZddlZddlm	Z	m
Z
e�d�ZGdd�dej
�Z
Gdd	�d	ej�ZGd
d�dej�ZGdd
�d
e
ej�ZGdd�de
ej�Zdd�ZdS)�)�encode�decode�alabel�ulabel�	IDNAError�N)�Tuple�Optionalu[.。.。]c@s eZdZddd�Zddd�ZdS)	�Codec�strictcCs.|dkrtd�|���|sdSt|�t|�fS)Nr�Unsupported error handling "{}")�r)r�formatr�len��self�data�errors�r�:/usr/lib/python3.9/site-packages/pip/_vendor/idna/codec.pyr
s
zCodec.encodecCs.|dkrtd�|���|sdSt|�t|�fS)Nrr��r)rrrrrrrrrs
zCodec.decodeN)r)r)�__name__�
__module__�__qualname__rrrrrrr
s

r
c@seZdZdd�ZdS)�IncrementalEncoderc
Cs�|dkrtd�|���|sdSt�|�}d}|rV|dsDd}|d=n|sV|d=|rVd}g}d}|D]*}|�t|��|r�|d7}|t|�7}qbd�|�|}	|t|�7}|	|fS�	Nrrrr����.rr)rr�_unicode_dots_re�split�appendrr�join�
rrr�final�labelsZtrailing_dot�result�sizeZlabelZ
result_strrrr�_buffer_encodes0
z!IncrementalEncoder._buffer_encodeN)rrrr(rrrrrsrc@seZdZdd�ZdS)�IncrementalDecoderc
Cs�|dkrtd�|���|sdSt�|�}d}|rV|dsDd}|d=n|sV|d=|rVd}g}d}|D]*}|�t|��|r�|d7}|t|�7}qbd�|�|}	|t|�7}|	|fSr)rrrr r!rrr"r#rrr�_buffer_decodeAs0
z!IncrementalDecoder._buffer_decodeN)rrrr*rrrrr)@sr)c@seZdZdS)�StreamWriterN�rrrrrrrr+bsr+c@seZdZdS)�StreamReaderNr,rrrrr-fsr-c	Cs tjdt�jt�jttttd�S)NZidna)�namerr�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor
rrrr)r+r-rrrr�getregentryjs�r5)Zcorerrrrrr3�re�typingrr	�compilerr
�BufferedIncrementalEncoderr�BufferedIncrementalDecoderr)r+r-r5rrrr�<module>s
""