AlkantarClanX12

Your IP : 18.191.81.46


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/chardet/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/chardet/__pycache__/escprober.cpython-311.pyc

�

�܋f���v�ddlmZmZddlmZddlmZddlmZm	Z	m
Z
ddlmZm
Z
mZmZGd�de��Zd	S)
�)�Optional�Union�)�
CharSetProber)�CodingStateMachine)�LanguageFilter�MachineState�ProbingState)�HZ_SM_MODEL�ISO2022CN_SM_MODEL�ISO2022JP_SM_MODEL�ISO2022KR_SM_MODELc����eZdZdZejfdeddf�fd�
Zd�fd�Zede	e
fd���Zede	e
fd���Zde
fd	�Zd
eeefdefd�Z�xZS)
�EscCharSetProberz�
    This CharSetProber uses a "code scheme" approach for detecting encodings,
    whereby easily recognizable escape or shift sequences are relied on to
    identify these encodings.
    �lang_filter�returnNc���t���|���g|_|jtjzrX|j�tt����|j�tt����|jtj
zr,|j�tt����|jtjzr,|j�tt����d|_d|_d|_t"j|_|���dS)N)rr)�super�__init__�	coding_smrr�CHINESE_SIMPLIFIED�appendrrr�JAPANESEr
�KOREANr�active_sm_count�_detected_charset�_detected_languager
�	DETECTING�_state�reset)�selfr�	__class__s  ��H/opt/cloudlinux/venv/lib64/python3.11/site-packages/chardet/escprober.pyrzEscCharSetProber.__init__0s���
�����[��1�1�1������n�?�?�	J��N�!�!�"4�[�"A�"A�B�B�B��N�!�!�"4�5G�"H�"H�I�I�I���n�5�5�	J��N�!�!�"4�5G�"H�"H�I�I�I���n�3�3�	J��N�!�!�"4�5G�"H�"H�I�I�I� ���04���15���"�,����
�
������c����t�����|jD]}d|_|����t	|j��|_d|_d|_dS)NT)rr r�active�lenrrr)r!rr"s  �r#r zEscCharSetProber.reset@sh���
���
�
������	�	�I�#�I���O�O�����"�4�>�2�2���!%���"&����r$c��|jS�N�r�r!s r#�charset_namezEscCharSetProber.charset_nameIs���%�%r$c��|jSr))rr+s r#�languagezEscCharSetProber.languageMs���&�&r$c��|jrdndS)Ng�G�z��?gr*r+s r#�get_confidencezEscCharSetProber.get_confidenceQs���-�7�t�t�4�7r$�byte_strc��|D]�}|jD]�}|js�
|�|��}|tjkr?d|_|xjdzc_|jdkrtj|_|j	ccS�n|tj
krAtj|_|���|_
|j|_|j	ccS����|j	S)NFrr)rr&�
next_stater	�ERRORrr
�NOT_MEr�state�ITS_ME�FOUND_IT�get_coding_state_machinerr.r)r!r1�cr�coding_states     r#�feedzEscCharSetProber.feedTs����	&�	&�A�!�^�
&�
&�	� �'���(�3�3�A�6�6���<�#5�5�5�',�I�$��(�(�A�-�(�(��+�q�0�0�&2�&9���#�z�)�)�)�)�)�1�"�\�%8�8�8�".�"7�D�K�-6�-O�-O�-Q�-Q�D�*�.7�.@�D�+��:�%�%�%�%�%�	9�
&� �z�r$)rN)�__name__�
__module__�__qualname__�__doc__r�NONErr �propertyr�strr,r.�floatr0r�bytes�	bytearrayr
r<�
__classcell__)r"s@r#rr)s���������6D�5H���N��T������� '�'�'�'�'�'��&�h�s�m�&�&�&��X�&��'�(�3�-�'�'�'��X�'�8��8�8�8�8��U�5�)�#3�4����������r$rN)�typingrr�
charsetproberr�codingstatemachiner�enumsrr	r
�escsmrrr
rr�r$r#�<module>rNs���8#�"�"�"�"�"�"�"�(�(�(�(�(�(�2�2�2�2�2�2�=�=�=�=�=�=�=�=�=�=�������������=�=�=�=�=�}�=�=�=�=�=r$