Your IP : 3.147.77.119


Current Path : /opt/alt/python312/lib64/python3.12/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/encodings/__pycache__/punycode.cpython-312.opt-2.pyc

�

�Q�f���6�	ddlZd�Zd�Zd�Zd�Zd�ZdZd�Zd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
Gd�dej�ZGd�dej�ZGd�dej �ZGd�deej"�ZGd�deej$�Zd�Zy)�Nc���	t�}t�}|D]<}t|�dkr|jt|���,|j	|��>t|�}t
|�|fS)N�)�	bytearray�set�ord�append�add�sorted�bytes)�str�base�extended�cs    �9/opt/alt/python312/lib64/python3.12/encodings/punycode.py�	segregater
s^��*��;�D��u�H�
���q�6�C�<��K�K��A����L�L��O�	�
�h��H���;�� � �c�B�	d}|D]}t|�|ks�|dz
}�|S)Nr�)r)r�max�resrs    r�
selective_lenrs/��J�
�C�
���q�6�C�<��1�H�C���Jrc�j�	t|�}	|dz
}||k(ry||}||k(r|dz|fS||kr|dz
}�')Nr)���r)�len)r�char�index�pos�lrs      r�selective_findrs[���	�C��A�
��q����!�8����H����9���7�C�<��
��X��Q�J�E�rc���	d}g}d}|D]c}dx}}t|�}t||�}	|	dz||z
z}
	t||||�\}}|dk(rn!|
||z
z
}
|j|
dz
�|}d}
�8|}�e|S)Nrrrr)rrrr)rr�oldchar�result�oldindexrrrr�curlen�deltas           r�insertion_unsortr&0s���%��G�
�F��H�
�������1�v���s�D�)�����d�W�n�-���&�s�1�U�3�7�I�E�#���{���U�X�%�%�E��M�M�%��'�"��H��E������Mrc�4�d|dzz|z
}|dkry|dkDry|S)N�$r��)�j�biasrs   r�Tr-Fs+��
��A��,��
�C�
�Q�w�q�
�R�x���Jrs$abcdefghijklmnopqrstuvwxyz0123456789c���	t�}d}	t||�}||kr#|jt|�t	|�S|jt|||z
d|z
zz�||z
d|z
z}|dz
}�i)Nrrr()rr-r�digitsr)�Nr,r"r+�ts     r�generate_generalized_integerr2Ns���2�
�[�F�	�A�
�
�a��J���q�5��M�M�&��)�$���=� ��
�
�f�Q�1�q�5�R�!�V�"4�5�6�7�
��U��Q����	�Q���rc�z�|r|dz}n|dz}|||zz
}d}|dkDr|dz}|dz
}|dkDr�|d|z|dzzz}|S)Ni��ri��#r(�&r*)r%�first�numchars�	divisionsr,s     r�adaptr:[sk���
�#�
��
�!���	�U�h�
��E��I�
�#�+������R��	��#�+���U�
�u�r�z�2�3�D��Krc��	t�}d}t|�D]8\}}t||�}|j|�t	||dk(||zdz�}�:t|�S)N�Hrr)r�	enumerater2�extendr:r)�baselen�deltasr"r,�pointsr%�ss       r�generate_integersrCjsc���
�[�F�
�D�"�6�*�
���(���5���
�
�a���U�F�A�I�w�v�~�a�'7�8��+���=�rc�x�t|�\}}t||�}tt|�|�}|r|dz|zS|S)N�-)rr&rCr)�textr
rr@s    r�punycode_encoderGusB���t�_�N�D�(�
�d�H�
-�F� ��T��F�3�H���d�{�X�%�%��Orc�f�	d}d}d}		t||�}|dz
}d|cxkrdkr	nn|dz
}n1d|cxkrdkr	nn|d	z
}n|dk(rtd
||dz
z��|dfSt||�}	|||zz
}||	kr||fS|d|	z
z}|dz
}��#t$r|dk(rtd��|dzdfcYSwxYw)Nrr�strictzincomplete punicode string�A�Z�0�9�z Invalid extended code point '%s'r()r�
IndexError�UnicodeErrorr-)
r�extposr,�errorsr"�wr+r�digitr1s
          r�decode_generalized_numberrUs��2�
�F�	�A�	�A�
�	$��x��'�(�D�
	�!����4��4���4�K�E�
�T�
!�T�
!��2�I�E�
�x�
��A�!)�&��(�!3� 4�5�
5��4�<��
�a��J���%�!�)����1�9��6�>�!�
��a��L��	�Q���-���	$���!�"�#?�@�@��A�:�t�#�#�	$�s�B
�
 B0�/B0c��	d}d}d}d}|t|�kr�t||||�\}}|�|S||dzz
}||t|�dzzz
}|dkDr|dk(rtd|z��td	�}|t|�dzz}|d|t	|�z||dz}t||dk(t|��}|}|t|�kr��|S)
Nrrr<rri��rIzInvalid character U+%x�?)rrUrPr�chrr:)	r
rrRrrr,rQ�newposr%s	         r�insertion_sortrZ�s���%��D�
�C�
�D�
�F�
�3�x�=�
 �1�(�F�26��@�
����=��K��u�Q�w������D�	�A�
�&�&���(�?���!�"�#;�d�#B�C�C��s�8�D��S��Y��]�#���D�S�z�C��I�%��S�T�
�2���U�V�q�[�3�t�9�5����!�3�x�=�
 �"�Krc�Z�t|t�r|jd�}t|t�rt	|�}|jd�}|dk(rd}t|d�j
�}n0t|d|d|�}t||dzdd�j
�}t|||�S)N�asciirEr�r)�
isinstancer�encode�
memoryviewr�rfind�upperrZ)rFrRrr
rs     r�punycode_decoderc�s����$����{�{�7�#���$�
�#��T�{��
�*�*�T�
�C�
�b�y����t�W�%�+�+�-���4���:�w��/���t�C��E�F�|�W�-�3�3�5���$��&�1�1rc��eZdZdd�Zdd�Zy)�Codecc�2�t|�}|t|�fS�N)rGr��self�inputrRrs    rr_zCodec.encode�s���e�$���C��J��rc�X�|dvrtd|z��t||�}|t|�fS�N)rI�replace�ignorezUnsupported error handling )rPrcrrhs    r�decodezCodec.decode�s6���8�8��<�V�C�D�D��e�V�,���C��J��rN)rI)�__name__�
__module__�__qualname__r_ror*rrrere�s���rrec��eZdZdd�Zy)�IncrementalEncoderc��t|�Srg)rG�rirj�finals   rr_zIncrementalEncoder.encode�s
���u�%�%rN�F)rprqrrr_r*rrrtrt�s��&rrtc��eZdZdd�Zy)�IncrementalDecoderc�z�|jdvrtd|jz��t||j�Srl)rRrPrcrvs   rrozIncrementalDecoder.decode�s5���;�;�=�=��<�T�[�[�H�I�I��u�d�k�k�2�2rNrx)rprqrrror*rrrzrz�s��3rrzc��eZdZy)�StreamWriterN�rprqrrr*rrr}r}����rr}c��eZdZy)�StreamReaderNr~r*rrr�r��rrr�c	��tjdt�jt�jt
ttt��S)N�punycode)�namer_ro�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInforer_rortrzr}r�r*rr�getregentryr��s6�����
��w�~�~��w�~�~�-�-�!�!��r)r�rrrr&r-r/r2r:rCrGrUrZrcrertrzr}r�r�r*rr�<module>r�s����
�
!���$�,�
1����	���<�22� 
�F�L�L�
�&��2�2�&�3��2�2�3�	�5��,�,�	�	�5��,�,�	�
	r

?>