Ë
    Dü´jU  ã                  ó   — U d Z ddlmZ ddlZddlZddlmZ dZded<   dZ	d	ed
<   dZ
ded<   i Zded<   d|d}d„Z	 	 	 	 d~d„Zdd„Zdd„Zdd„Zd€d„Z	 d|	 	 	 	 	 	 	 d�d„Zi 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/“d0d1“d2d3“d4d5“d6d7“i d8d9“d:d;“d<d=“d>d?“d@dA“dBdC“dDdE“dFdG“dHdI“dJdK“dLdM“dNdO“dPdQ“dRdS“dTdU“dVdW“dXdY“¥i dZd[“d\d]“d^d_“d`da“dbdc“ddde“dfdg“dhdi“djdk“dldm“dndo“dpdq“drds“dtdu“dvdw“dxdy“¥Zdzed{<   y)‚z&Internal shared utilities for chardet.é    )ÚannotationsN)ÚCallablei@ ÚintÚDEFAULT_MAX_BYTESgš™™™™™É?ÚfloatÚMINIMUM_THRESHOLDi   Ú_DEFAULT_CHUNK_SIZEz3dict[str, Callable[..., codecs.IncrementalDecoder]]Ú_INCREMENTAL_DECODERSc                óP   — | t         k7  rt        j                  dt        |¬«       yy)zDEmit a deprecation warning if *chunk_size* differs from the default.zEchunk_size is not used in this version of chardet and will be ignored©Ú
stacklevelN)r	   ÚwarningsÚwarnÚDeprecationWarning)Ú
chunk_sizer   s     úL/root/workspace/ytshorts/venv/lib/python3.12/site-packages/chardet/_utils.pyÚ_warn_deprecated_chunk_sizer   !   s%   € àÔ(Ò(Ü�‰ØSÜØ!ö	
ð )ó    c                óš   — t         j                  | «      }|€	 t        j                  | «      }|t         | <    |«       S # t        $ r Y yw xY w)aa  Return a fresh incremental decoder for *encoding*, or ``None``.

    The class lookup is cached; ``None`` means the codec does not exist.
    Every decode below catches ``UnicodeError`` rather than
    ``UnicodeDecodeError`` because the utf-16/utf-32 incremental decoders
    raise a bare ``UnicodeError`` when the stream does not start with a BOM.
    N)r
   ÚgetÚcodecsÚgetincrementaldecoderÚLookupError)ÚencodingÚdecoder_classs     r   Ú_incremental_decoderr   +   sX   € ô *×-Ñ-¨hÓ7€MØÐð	Ü"×8Ñ8¸ÓBˆMð +8Ô˜hÑ'Ù‹?Ðøô ò 	Ùð	ús   ™> ¾	A
Á	A
c                óf   — t        |«      }|€y	 |j                  | d¬«       y# t        $ r Y yw xY w)a  Return ``True`` if *data* decodes cleanly under *encoding*.

    Equivalent to ``data.decode(encoding, errors="strict")`` except that an
    incomplete multi-byte sequence at the *end* of *data* is accepted instead of
    raising.

    Detection input is nearly always a prefix of a larger whole.  Callers pass
    the first N bytes of a file, and chardet slices further on its own.
    For a two-byte encoding any of those cuts lands mid-character roughly half
    the time.

    A one-shot strict decode cannot tell a truncated tail from corrupt data: it
    raises either way, so the candidate is discarded and every CJK encoding can
    disappear from the candidate set over a single dangling lead byte. An
    incremental decoder with ``final=False`` defers the partial tail instead,
    while still raising on genuine corruption anywhere before it.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes without error, ``False`` otherwise.
    F©ÚfinalT©r   ÚdecodeÚUnicodeError©Údatar   Údecoders      r   Údecodes_without_errorr&   ?   sD   € ô, # 8Ó,€GØ€ØðØ�‰�t 5ˆÔ)ð øô ò Ùðúó   �$ ¤	0¯0c                óf   — t        |«      }|€y	 |j                  | d¬«       y# t        $ r Y yw xY w)aK  Return ``True`` if *data* decodes under *encoding* with nothing deferred.

    The strict sibling of :func:`decodes_without_error`: ``final=True`` makes
    an incomplete multi-byte sequence at the end of *data* an error rather
    than a deferred tail.  This is the question that matters when *data* is
    the caller's entire input --- ``data.decode(encoding)`` will make exactly
    this judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes completely, ``False`` otherwise.
    FTr   r    r#   s      r   Údecodes_completelyr)   _   sD   € ô # 8Ó,€GØ€ØðØ�‰�t 4ˆÔ(ð øô ò Ùðúr'   c                óÒ   — t        |«      }|€y	 |j                  | d¬«      }|r|j                  «       sy	 |j                  dd¬«       y# t        $ r Y yw xY w# t        $ r Y yw xY w)aë  Return ``True`` if *data* is ASCII text plus an incomplete tail.

    One decode pass answers both halves of the decode-safety question:
    the tolerant (``final=False``) decode yields the text before any
    deferred tail, and flushing the decoder afterwards raises exactly when
    a deferred tail existed.  True means the candidate decoded real ASCII
    characters and then hit an incomplete multi-byte sequence at the end
    --- its only *non-ASCII* evidence is the undecodable tail itself.

    Deliberately False when the tolerant decode yields nothing at all
    (the entire input is one dangling sequence): that candidate has zero
    decoded evidence, not ASCII evidence, and a clipped multi-byte
    fragment is better served by the ranking's own judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to decode *data* with.
    :returns: ``True`` if *data* decodes to non-empty pure ASCII with an
        incomplete sequence deferred at the end.
    Fr   r   T)r   r!   r"   Úisascii)r$   r   r%   Útexts       r   Údangling_tail_with_ascii_prefixr-   v   s~   € ô( # 8Ó,€GØ€ØðØ�~‰~˜d¨%ˆ~Ó0ˆñ �t—|‘|”~ØðØ�‰�s $ˆÔ'ð øô ò Ùðûô ò Ùðús"   �A ·A Á	AÁAÁ	A&Á%A&c                óh   — t        | t        «      st        | t        «      r| dk  rd}t        |«      ‚y)z:Raise ValueError if *max_bytes* is not a positive integer.é   z$max_bytes must be a positive integerN)Ú
isinstanceÚboolr   Ú
ValueError)Ú	max_bytesÚmsgs     r   Ú_validate_max_bytesr5   š   s2   € ä�)œTÔ"¬*°YÄÔ*DÈ	ÐTUÊØ4ˆÜ˜‹oÐð IVr   c                óD   — | rt        j                  dt        |¬«       y|S )zEResolve the deprecated *should_rename_legacy* into *prefer_superset*.z?should_rename_legacy is deprecated, use prefer_superset insteadr   T)r   r   r   )Úshould_rename_legacyÚprefer_supersetr   s      r   Ú_resolve_prefer_supersetr9   ¡   s'   € ñ Ü�‰ØMÜØ!õ	
ð
 ØÐr   ÚarÚarabicÚbeÚ
belarusianÚbgÚ	bulgarianÚbrÚbretonÚcsÚczechÚcyÚwelshÚdaÚdanishÚdeÚgermanÚelÚgreekÚenÚenglishÚeoÚ	esperantoÚesÚspanishÚetÚestonianÚfaÚfarsiÚfiÚfinnishÚfrÚfrenchÚgaÚirishÚgdÚgaelicÚheÚhebrewÚhrÚcroatianÚhuÚ	hungarianÚidÚ
indonesianÚisÚ	icelandicÚitÚitalianÚjaÚjapaneseÚkkÚkazakhÚkoÚkoreanÚltÚ
lithuanianÚlvÚlatvianÚmkÚ
macedonianÚmsÚmalayÚmtÚmalteseÚnlÚdutchÚnoÚ	norwegianÚplÚpolishÚptÚ
portugueseÚroÚromanianÚruÚrussianÚskÚslovakÚslÚsloveneÚsrÚserbianÚsvÚswedishÚtgÚtajikÚthÚthaiÚtrÚturkishÚukÚ	ukrainianÚundÚundeterminedÚurÚurduÚviÚ
vietnameseÚzhÚchinesezdict[str, str]ÚISO_TO_LANGUAGE)é   )r   r   r   r   ÚreturnÚNone)r   Ústrr    z codecs.IncrementalDecoder | None)r$   Úbytesr   r¢   r    r1   )r3   r   r    r¡   )r7   r1   r8   r1   r   r   r    r1   )Ú__doc__Ú
__future__r   r   r   Úcollections.abcr   r   Ú__annotations__r   r	   r
   r   r   r&   r)   r-   r5   r9   rž   © r   r   ú<module>r©      s/  ðÚ ,å "ã Û Ý $ð !Ð �3Ó  ð  Ð �5Ó ð "Ð �SÓ !ð NPÐ ÐJÓ Oô
ðØðà%óó(ó@ó.!óHð JKðØðØ15ðØCFðà	óð 3#Øˆ(ð3#àˆ,ð3#ð 	ˆ+ð3#ð 	ˆ(ð	3#ð
 	ˆ'ð3#ð 	ˆ'ð3#ð 	ˆ(ð3#ð 	ˆ(ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð 	ˆ+ð3#ð 	ˆ)ð3#ð 	ˆ*ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð  	ˆ(ð!3#ð" 	ˆ'ñ#3#ð$ 	ˆ(ð%3#ð& 	ˆ(ð'3#ð( 	ˆ*ð)3#ð* 	ˆ+ð+3#ð, 	ˆ,ð-3#ð. 	ˆ+ð/3#ð0 	ˆ)ð13#ð2 	ˆ*ð33#ð4 	ˆ(ð53#ð6 	ˆ(ð73#ð8 	ˆ,ð93#ð: 	ˆ)ð;3#ð< 	ˆ,ð=3#ð> 	ˆ'ð?3#ð@ 	ˆ)ðA3#ðB 	ˆ'ðC3#ðD 	ˆ+òE3#ðF 	ˆ(ðG3#ðH 	ˆ,ðI3#ðJ 	ˆ*ðK3#ðL 	ˆ)ðM3#ðN 	ˆ(ðO3#ðP 	ˆ)ðQ3#ðR 	ˆ)ðS3#ðT 	ˆ)ðU3#ðV 	ˆ'ðW3#ðX 	ˆ&ðY3#ðZ 	ˆ)ð[3#ð\ 	ˆ+ð]3#ð^ 
ˆ>ð_3#ð` 	ˆ&ða3#ðb 	ˆ,ðc3#ðd 	ˆ)ñe3#€�ô 3r   