
    *pj                    p   % S r SSKJr  SSKJr  SSSSSSS	S
SSSSS.rS\S'   0 SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_S#S$_S%S&_S'S(_S)S*_S+S,_S-S._S/S0_0 S1S2_S3S4_S5S6_S7S8_S9S:_S;S<_S=S>_S?S@_SASB_SCSD_SESF_SGSH_SSI_SSJ_SSK_S	SL_SSM_ESNSOSPSQSRSSSTSUSV.ErS\SW'   S\SX jr    S]SY jr	\	r
    S]SZ jrg[)^a  Public-API encoding-name remapping.

Two output transforms applied to detection results before they cross the
public API:

* :func:`apply_preferred_superset` -- when the ``prefer_superset`` API option
  is enabled, replaces detected ISO/subset encoding names with their
  Windows/CP supersets that modern software actually uses
  (e.g., ISO-8859-1 -> Windows-1252).

* :func:`apply_compat_names` -- when the default ``compat_names=True`` mode
  is enabled, maps internal Python codec names to the names chardet 5.x/6.x
  returned, preserving backward compatibility for callers that compare
  encoding strings directly.

Both transforms operate in-place on a :class:`~chardet.pipeline.DetectionDict`
and return the same dict for fluent chaining.
    )annotations)DetectionDictcp1252cp949cp1250cp1251cp1256cp1253cp1255cp1254cp874cp1257)asciieuc_kr	iso8859-1	iso8859-2	iso8859-5	iso8859-6	iso8859-7	iso8859-8	iso8859-9z
iso8859-11
iso8859-13tis-620dict[str, str]PREFERRED_SUPERSET	big5hkscsBig5cp855IBM855cp866IBM866CP874cp932CP932CP949euc_jis_2004zEUC-JPr   zEUC-KRgb18030GB18030hzz
HZ-GB-2312iso2022_jp_2zISO-2022-JP
iso2022_krzISO-2022-KRr   z
ISO-8859-1r   z
ISO-8859-2r   z
ISO-8859-5r   z
ISO-8859-6r   z
ISO-8859-7r   z
ISO-8859-8r   z
ISO-8859-9r   zISO-8859-13johabJohabzkoi8-rzKOI8-Rzmac-cyrillicMacCyrillicz	mac-romanMacRomanshift_jis_2004	SHIFT_JISr   zTIS-620zutf-16zUTF-16zutf-32zUTF-32z	utf-8-sigz	UTF-8-SIGzWindows-1250zWindows-1251zWindows-1252zWindows-1253zWindows-1254zWindows-1255zWindows-1256zWindows-1257KZ1048MacGreek
MacIceland	MacLatin2
MacTurkish)r   r	   r   kz1048z	mac-greekzmac-icelandz
mac-latin2zmac-turkish_COMPAT_NAMESc                z    U R                  S5      n[        U[        5      (       a  UR                  X"5      U S'   U $ )zGReplace the encoding name using *mapping*, modifying *result* in-place.encoding)get
isinstancestr)resultmappingencs      P/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/chardet/output_names.py_remap_encodingrB   a   s5    
**Z
 C#s$[[2zM    c                "    [        U [        5      $ )a#  Replace the encoding name with its preferred Windows/CP superset.

Modifies the ``"encoding"`` value in *result* in-place and returns *result*
for fluent chaining.

:param result: A detection result dict containing an ``"encoding"`` key.
:returns: The same *result* dict, modified in-place.
)rB   r   r>   s    rA   apply_preferred_supersetrF   i   s     6#566rC   c                "    [        U [        5      $ )a#  Convert internal codec names to chardet 5.x/6.x compatible names.

Modifies the ``"encoding"`` value in *result* in-place and returns *result*
for fluent chaining.

:param result: A detection result dict containing an ``"encoding"`` key.
:returns: The same *result* dict, modified in-place.
)rB   r8   rE   s    rA   apply_compat_namesrH   {   s     6=11rC   N)r>   r   r?   r   returnr   )r>   r   rI   r   )__doc__
__future__r   chardet.pipeliner   r   __annotations__r8   rB   rF   apply_legacy_renamerH    rC   rA   <module>rP      sL  & # * & N (-!-! X-! X	-!
 W-! W-! W-! H-! h-! y-! 	,-! M-! --! -! -!  !-!" #-!$ %-!& '-!( )-!* -+-!, W--!. h/-!0 M1-!2 3-!4 k5-!6 y7-!8 h9-!: h;-!< =-!> n?-!@ nA-!B nC-!D nE-!F nG-!H Y-!~ -`777 / 222rC   