Edit File: idna.cpython-37.pyc
B ����m}�c�#������������������@���s����d�dl�Z�d�dlZd�dlZd�dlmZ�e�d�ZdZdZdd��Z dd ��Z d d��ZG�dd ��d ej�ZG�dd��dej �ZG�dd��dej�ZG�dd��deej�ZG�dd��deej�Zdd��ZdS�)�����N)� ucd_3_2_0u���[.。.。]s���xn--zxn--c�������������C���s��g�}x(|�D�] }t��|�rq |�t��|���q W�d�|�}�t�d|��}�xr|�D�]j}t��|�s�t��|�s�t�� |�s�t�� |�s�t��|�s�t��|�s�t�� |�s�t��|�s�t��|�rJtd|���qJW�dd��|�D��}t|��rtdd��|�D���r�td��|d �r�|d ��std��|�S�)N��ZNFKCzInvalid character %rc�������������S���s���g�|�]}t��|��qS���)� stringprepZin_table_d1)�.0�xr���r����3/opt/alt/python37/lib64/python3.7/encodings/idna.py� <listcomp>)���s����znameprep.<locals>.<listcomp>c�������������s���s���|�]}t��|�V��qd�S�)N)r���Zin_table_d2)r���r���r���r���r���� <genexpr>1���s����znameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r������zViolation of BIDI requirement 3)r���Zin_table_b1�appendZmap_table_b2�join�unicodedataZ normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9�UnicodeError�any)�labelZnewlabel�cZRandALr���r���r����nameprep���s2���� r���c�������������C���s����y|���d�}�W�n�tk r"���Y�n*X�dt|����k�r<dk�rDn�n|�S�td��t|��}�y|���d�}�W�n�tk rv���Y�n*X�dt|����k�r�dk�r�n�n|�S�td��|��t�r�td��|���d�}�t|��}�dt|����k�r�dk�r�n�n|�S�td��d�S�)N�asciir����@���zlabel empty or too longzLabel starts with ACE prefix�punycode)�encoder����lenr���� startswith�sace_prefix� ace_prefix)r���r���r���r����ToASCII<���s,���� r���c�������������C���s����t�|�t�rd}n,y|��d�}�d}W�n�tk r:���d}Y�nX�|stt|��}�y|��d�}�W�n�tk rr���td��Y�nX�|��t�s�t|�d�S�|�tt�d���}|� d�}t |�}t|�d����t|d�kr�td|�|��|S�)NTr���FzInvalid character in IDN labelr���zIDNA does not round-trip)� isinstance�bytesr���r���r���r���r����strr����decoder����lower)r���Z pure_asciiZlabel1�resultZlabel2r���r���r���� ToUnicodeg���s*���� r#���c���������������@���s ���e�Zd�Zddd�Zddd�ZdS�) �Codec�strictc�������������C���s��|dkrt�d|���|sdS�y|�d�}W�n�tk r>���Y�nhX�|�d�}x6|d�d��D�]&}dt|���k�rtdk�sXn�t�d ��qXW�t|d��dkr�t�d ��|t|�fS�t��}t�|�}|r�|d�s�d}|d=�nd}x(|D�] }|r�|�d��|�t|���q�W�t ||��t|�fS�)Nr%���zunsupported error handling )�����r���r�������.r���r���r���zlabel empty or too longzlabel too longr&���) r���r����UnicodeEncodeError�splitr���� bytearray�dots�extendr���r���)�self�input�errorsr"����labelsr����trailing_dotr���r���r���r�������s4���� zCodec.encodec�������������C���s����|dkrt�d|���|sdS�t|t�s.t|�}t|kr^y|�d�t|�fS��tk r\���Y�nX�|�d�}|r�t|d��dkr�d}|d=�nd }g�}x|D�]}|�t |���q�W�d� |�|�t|�fS�) Nr%���zUnsupported error handling )r���r���r���r'���r���r����.r���)r���r���r���r���r ���r����UnicodeDecodeErrorr)���r���r#���r ���)r-���r.���r/���r0���r1���r"���r���r���r���r���r �������s(���� zCodec.decodeN)r%���)r%���)�__name__� __module__�__qualname__r���r ���r���r���r���r���r$�������s��� %r$���c���������������@���s���e�Zd�Zdd��ZdS�)�IncrementalEncoderc������� ������C���s����|dkrt�d|���|sdS�t�|�}d}|rT|d�sBd}|d=�n|sT|d=�|rTd}t��}d}x<|D�]4}|r~|�d��|d7�}|�t|���|t|�7�}qdW�||7�}|t|�7�}t|�|fS�) Nr%���zunsupported error handling )r&���r���r&���r���r'���r�������)r���r+���r)���r*���r,���r���r���r���) r-���r.���r/����finalr0���r1���r"����sizer���r���r���r����_buffer_encode����s2���� z!IncrementalEncoder._buffer_encodeN)r4���r5���r6���r;���r���r���r���r���r7�������s���r7���c���������������@���s���e�Zd�Zdd��ZdS�)�IncrementalDecoderc������� ������C���s����|dkrt�d|���|sdS�t|t�r2t�|�}nt|d�}|�d�}d}|rt|d�sbd}|d=�n|st|d=�|rtd}g�}d}x2|D�]*}|�t|���|r�|d 7�}|t|�7�}q�W�d�|�|�}|t|�7�}||fS�) Nr%���zUnsupported error handling )r���r���r���r2���r���r���r���r8���) r���r���r���r+���r)���r���r#���r���r ���) r-���r.���r/���r9���r0���r1���r"���r:���r���r���r���r����_buffer_decode����s6���� z!IncrementalDecoder._buffer_decodeN)r4���r5���r6���r=���r���r���r���r���r<�������s���r<���c���������������@���s���e�Zd�ZdS�)�StreamWriterN)r4���r5���r6���r���r���r���r���r>���"��s���r>���c���������������@���s���e�Zd�ZdS�)�StreamReaderN)r4���r5���r6���r���r���r���r���r?���%��s���r?���c������������ ���C���s ���t�jdt��jt��jttttd�S�)NZidna)�namer���r ����incrementalencoder�incrementaldecoder�streamwriter�streamreader) �codecs� CodecInfor$���r���r ���r7���r<���r>���r?���r���r���r���r����getregentry*��s����rG���)r����rerE���r���r����compiler+���r���r���r���r���r#���r$����BufferedIncrementalEncoderr7����BufferedIncrementalDecoderr<���r>���r?���rG���r���r���r���r����<module>���s��� .+)H#'