AlkantarClanX12

Your IP : 3.144.42.233


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

�

�Q�f�B�	��gd�ZddlmZddlZddlZddlmZddlmZdZ	dZ
dZd	Zd
Z
dZdZid
e	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�de	e	df�d
d�de
e
df�de
e
df�de
ddf�de
ddf�e
ddfe
e
dfee
dfd ��Zid!d
�d"d
�d#d�d$d�d%d�d&d�d'd�d(d�d)d�d*d�d+d�d,d�d-d�d.d�d/d�d0d�d1d�dddd2dd3d
d4��Zd5d6dd7�Zdd8�Zd9�Zd:�Zd;�ZGd<�d=�Zy)>)�Charset�	add_alias�add_charset�	add_codec�)�partialN)�errors)�encode_7or8bit�����us-asciizunknown-8bit�z
iso-8859-1z
iso-8859-2z
iso-8859-3z
iso-8859-4z
iso-8859-9ziso-8859-10ziso-8859-13ziso-8859-14ziso-8859-15ziso-8859-16zwindows-1252�viscii)NNN�big5�gb2312zeuc-jp�iso-2022-jp�	shift_jis�utf-8)rzkoi8-rr�latin_1zlatin-1�latin_2zlatin-2�latin_3zlatin-3�latin_4zlatin-4�latin_5zlatin-5�latin_6zlatin-6�latin_7zlatin-7�latin_8zlatin-8�latin_9zks_c_5601-1987zeuc-kr)zlatin-9�latin_10zlatin-10�cp949�euc_jp�euc_kr�ascii�eucgb2312_cn�big5_tw)rrrc�F�	|tk(rtd��|||ft|<y)Nz!SHORTEST not allowed for body_enc)�SHORTEST�
ValueError�CHARSETS)�charset�
header_enc�body_enc�output_charsets    �4/opt/alt/python312/lib64/python3.12/email/charset.pyrrjs.���,�8���<�=�=�#�X�~�>�H�W��c��	|t|<y�N)�ALIASES)�alias�	canonicals  r.rr�s���
�G�E�Nr/c��	|t|<yr1)�	CODEC_MAP)r*�	codecnames  r.rr�s���#�I�g�r/c�Z�|tk(r|jdd�S|j|�S)Nr#�surrogateescape)�UNKNOWN8BIT�encode)�string�codecs  r.�_encoder>�s+������}�}�W�&7�8�8��}�}�U�#�#r/c�H�eZdZ	efd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zy
)rc��	t|t�r|jd�nt|d�}|j
�}tj||�|_	tj|jttdf�\}}}|s|j}||_
||_tj||�|_t j|j|j�|_t j|j|j�|_y#t$rt	j
|��wxYw)Nr#)�
isinstance�strr;�UnicodeErrorr�CharsetError�lowerr2�get�
input_charsetr)r'�BASE64�header_encoding�
body_encodingr-r6�input_codec�output_codec)�selfrG�henc�benc�convs     r.�__init__zCharset.__init__�s��
	5��-��-��$�$�W�-� #�M�7� ;�
�&�+�+�-�
�$�[�[��
�F���$�<�<��(:�(:�)1�6�4�(@�B���d�D���%�%�D�#���!���%�k�k�$��5���%�=�=��);�);�)-�);�);�=���%�M�M�$�*=�*=�*.�*=�*=�?����)�	5��%�%�m�4�4�	5�s�.D � D?c�6�|jj�Sr1)rGrE�rMs r.�__repr__zCharset.__repr__�s���!�!�'�'�)�)r/c�L�t|�t|�j�k(Sr1)rBrE)rM�others  r.�__eq__zCharset.__eq__�s���4�y�C��J�,�,�.�.�.r/c�`�	|jtk(ry|jtk(rytS)Nzquoted-printable�base64)rJ�QPrHr	rSs r.�get_body_encodingzCharset.get_body_encoding�s1��	�����#�%�
�
�
�6�
)��!�!r/c�8�	|jxs|jSr1)r-rGrSs r.�get_output_charsetzCharset.get_output_charset
s ��	�
�"�"�8�d�&8�&8�8r/c��	|jxsd}t||�}|j|�}|�|S|j||�S)Nr)rLr>�_get_encoder�
header_encode)rMr<r=�header_bytes�encoder_modules     r.r`zCharset.header_encodesS��		��!�!�/�Z���v�u�-���*�*�<�8���!��M��+�+�L�%�@�@r/c���	|jxsd}t||�}|j|�}t|j|��}|j�}t
|�tz}g}	g}
t|�|z
}|D]�}|
j|�tj|
�}
|jt|
|��}||kDs�J|
j�|	s|
s|	jd�n8tj|
�}t||�}|	j||��|g}
t|�|z
}��tj|
�}t||�}|	j||��|	S)Nr)r*)rLr>r_rr`r]�len�RFC2047_CHROME_LEN�next�append�EMPTYSTRING�join�
header_length�pop)rMr<�
maxlengthsr=rarb�encoderr*�extra�lines�current_line�maxlen�	character�	this_line�length�joined_lines                r.�header_encode_lineszCharset.header_encode_lines%s[��	�"�!�!�/�Z���v�u�-���*�*�<�8���.�6�6��F���)�)�+���G��1�1�������j�!�E�)���I����	�*�#�(�(��6�I�#�1�1�'�)�W�2M�N�F����� � �"��\��L�L��&�"-�"2�"2�<�"@�K�#*�;��#>�L��L�L���!6�7� )�{���j�)�E�1�� � "�&�&�|�4���{�E�2��
���W�\�*�+��r/c�|�|jtk(rtjS|jtk(rtj
S|jtk(rctjj|�}tj
j|�}||krtjStj
Syr1)rIrH�email�
base64mimerZ�
quoprimimer'rj)rMra�len64�lenqps    r.r_zCharset._get_encoderbs������6�)��#�#�#�
�
!�
!�R�
'��#�#�#�
�
!�
!�X�
-��$�$�2�2�<�@�E��$�$�2�2�<�@�E��u�}��'�'�'��'�'�'�r/c��	|s|S|jturJt|t�r|j	|j
�}tjj|�S|jtur[t|t�r|j	|j
�}|jd�}tjj|�St|t�r*|j	|j
�jd�}|S)N�latin1r#)rJrHrArBr;r-rxry�body_encoderZ�decoderz)rMr<s  r.rzCharset.body_encodeqs���	���M�����'��&�#�&����t�':�':�;���#�#�/�/��7�7�
�
�
�2�
%��&�#�&����t�':�':�;���]�]�8�,�F��#�#�/�/��7�7��&�#�&����t�':�':�;�B�B�7�K���Mr/N)
�__name__�
__module__�__qualname__�DEFAULT_CHARSETrQrTrWr[r]r`rvr_r�r/r.rr�s=��*�V&5�?�B*�/�"�*9�A�&;�z
�r/r)�__all__�	functoolsr�email.base64mimerx�email.quoprimimer�email.encodersr	rZrHr'rer�r:rhr)r2r6rrrr>rr�r/r.�<module>r�s���
������)�����������������B�r��-���B�r��-���B�r��-�	�
�B�r��-���B�r��-���B�r��-���B�r��-���B�r��-���B�r��-�� �B�r��-�!�"�B�r��-�#�$
�B�r��-�%�&�-�'�(�F�v��-�)�*
�F�v��-�+�,
�F�t�
�6�-�.�F�t�
�6�/�0�t��-��v��-��v�w�/�5��>�
�|��
�|���|���|�	�
�|���|�
��|���|���|���|���}���}���}���}���}�� �}�!�"�}�#�$�������1��<"���

�	�?�8�#�$�l�lr/