Your IP : 3.145.103.119


Current Path : /opt/alt/python310/lib64/python3.10/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/encodings/__pycache__/punycode.cpython-310.opt-2.pyc

o

6��f��@s�	ddlZdd�Zdd�Zdd�Zdd	�Zd
d�ZdZd
d�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
Gdd�dej�ZGdd�dej�ZGdd �d ej�ZGd!d"�d"eej�ZGd#d$�d$eej�Zd%d&�ZdS)'�NcCsR	t�}t�}|D]}t|�dkr|�t|��q	|�|�q	t|�}t|�|fS)N�)�	bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�c�r�9/opt/alt/python310/lib64/python3.10/encodings/punycode.py�	segregate
srcCs(	d}|D]}t|�|kr|d7}q|S)Nr�)r)r
�max�resr
rrr�
selective_lens�rcCsN	t|�}	|d7}||krdS||}||kr|d|fS||kr&|d7}q)Nr)���r)�len)r
�char�index�pos�lr
rrr�selective_finds�rcCs�	d}g}d}|D]:}d}}t|�}t||�}	|	d||}
	t||||�\}}|dkr/n|
||7}
|�|
d�|}d}
q!|}q	|S)Nrrrr)rrrr)r
rZoldchar�resultZoldindexr
rrrZcurlen�deltarrr�insertion_unsort0s(
�rcCs,d|d|}|dkrdS|dkrdS|S)N�$r�r)�j�biasrrrr�TFsr#s$abcdefghijklmnopqrstuvwxyz0123456789cCsn	t�}d}	t||�}||kr|�t|�t|�S|�t|||d|�||d|}|d7}q)Nrrr)rr#r�digitsr	)�Nr"rr!�trrr�generate_generalized_integerNs
�r'cCs^|r|d}n|d}|||7}d}|dkr#|d}|d7}|dks|d||d}|S)Ni��ri��#r�&r)r�first�numcharsZ	divisionsr"rrr�adapt[s
�r-cCsR	t�}d}t|�D]\}}t||�}|�|�t||dk||d�}q
t|�S)N�Hrr)r�	enumerater'�extendr-r	)Zbaselen�deltasrr"Zpointsr�srrr�generate_integersjs

r3cCs8t|�\}}t||�}tt|�|�}|r|d|S|S)N�-)rrr3r)�textrrr1rrr�punycode_encodeus
r6c
Cs�	d}d}d}	zt||�}Wnty'|dkrtd��|ddfYSw|d7}d|kr6dkr=nn|d}n#d|krGdkrNnn|d	}n|dkr\td
||d��|dfSt||�}	|||7}||	krs||fS|d|	}|d7}q)Nrr�strictzincomplete punicode string�A�Z�0�9�z Invalid extended code point '%s'r)r�
IndexError�UnicodeErrorr#)
r�extposr"�errorsr�wr!rZdigitr&rrr�decode_generalized_numbers:�


�
�rBc	Cs�	d}d}d}d}|t|�krjt||||�\}}|dur|S||d7}||t|�d7}|dkr@|dkr<td|��td	�}|t|�d}|d|�t|�||d�}t||dkt|��}|}|t|�ks|S)
Nrrr.rri��r7zInvalid character U+%x�?)rrBr>r�chrr-)	rrr@rrr"r?Znewposrrrr�insertion_sort�s.� �rEcCs�t|t�r
|�d�}t|t�rt|�}|�d�}|dkr&d}t|d���}nt|d|�d|�}t||dd�d���}t|||�S)N�asciir4r�r)�
isinstancer
�encode�
memoryviewr	�rfind�upperrE)r5r@rrrrrr�punycode_decode�s



rMc@s eZdZddd�Zddd�ZdS)�Codecr7cCst|�}|t|�fS�N)r6r��self�inputr@rrrrrI�szCodec.encodecCs*|dvr
td|��t||�}|t|�fS�N)r7�replace�ignorezUnsupported error handling )r>rMrrPrrr�decode�s
zCodec.decodeN)r7)�__name__�
__module__�__qualname__rIrVrrrrrN�s
rNc@�eZdZddd�ZdS)�IncrementalEncoderFcCst|�SrO)r6�rQrR�finalrrrrI�szIncrementalEncoder.encodeN�F)rWrXrYrIrrrrr[��r[c@rZ)�IncrementalDecoderFcCs$|jdvrtd|j��t||j�SrS)r@r>rMr\rrrrV�s
zIncrementalDecoder.decodeNr^)rWrXrYrVrrrrr`�r_r`c@�eZdZdS)�StreamWriterN�rWrXrYrrrrrb��rbc@ra)�StreamReaderNrcrrrrre�rdrec	Cs tjdt�jt�jttttd�S)NZpunycode)�namerIrV�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforNrIrVr[r`rbrerrrr�getregentry�s�rm)rkrrrrr#r$r'r-r3r6rBrErMrNr[r`rbrermrrrr�<module>s*



?>