§
    |Øjà  ã                  óœ  — U d Z ddlmZ ddlmZ ddlmZ dddddd	d
ddddddœZded<   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)“d*d+“d,d-“d.d/“d0d1“i d2d3“d4d5“d6d7“d8d9“d:d;“d<d=“d>d?“d@dA“dBdC“dDdE“dFdG“dHdI“ddJ“ddK“ddL“d
dM“ddN“¥dOdPdQdRdSdTdUdVdWœ¥Z	dedX<   djd]„Z
	 dkd^d^d_œdlde„ZeZ eh df£¦  «        Zdgedh<   	 dkdmdi„Zd^S )naé  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)Údecodes_without_error)Ú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_NAMESÚresultr   ÚmappingÚreturnc                óŒ   — |                       d¦  «        }t          |t          ¦  «        r|                      ||¦  «        | d<   | S )zGReplace the encoding name using *mapping*, modifying *result* in-place.Úencoding)ÚgetÚ
isinstanceÚstr)r:   r;   Úencs      ú‰/Users/tedpeters/Documents/Projects/Claude Projects/Misc Tools/notename-sheets/.venv/lib/python3.11/site-packages/chardet/output_names.pyÚ_remap_encodingrD   e   sB   € à
�*Š*�ZÑ
 Ô
 €CÝ�#•sÑÔð 3Ø$Ÿ[š[¨¨cÑ2Ô2ˆˆzÑØ€Mó    N)Úinclude_encodingsÚexclude_encodingsÚdataúbytes | NonerF   úfrozenset[str] | NonerG   c               óè   — |                       d¦  «        }t          |t          ¦  «        s| S t                                |¦  «        }|€| S |�||vr| S |�||v r| S |�t	          ||¦  «        r|| d<   | S )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.

    The Windows code pages leave a few C1 positions undefined that their ISO
    subsets map (0x81, 0x8D, 0x8F, 0x90, 0x9D under cp1252), so the remap is
    decode-safe only for data that avoids them.  When *data* is given, the
    remap applies only if the superset decodes it; otherwise the detected
    name stands, being the one that does.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :param data: The bytes *result* was detected from, when known.
    :param include_encodings: Canonical encoding names (as returned by
        :func:`~chardet.registry.normalize_encodings`) allowed in the result.
        The superset is skipped when it is not one of them.
    :param exclude_encodings: Canonical encoding names forbidden in the
        result.  The superset is skipped when it is one of them.
    :returns: The same *result* dict, modified in-place.
    r>   )r?   r@   rA   r   r   )r:   rH   rF   rG   rB   Úsupersets         rC   Úapply_preferred_supersetrM   m   s™   € ð6 �*Š*�ZÑ
 Ô
 €CÝ�c�3ÑÔð ØˆÝ!×%Ò% cÑ*Ô*€HØÐØˆØÐ$¨Ð9JÐ)JÐ)JØˆØÐ$¨Ð5FÐ)FÐ)FØˆØ€|Õ,¨T°8Ñ<Ô<€|Ø%ˆˆzÑØ€MrE   >   r   r'   r+   r1   zfrozenset[str]ÚNARROWER_DISPLAY_NAMESc                óÐ   — |                       d¦  «        }|�;t          |t          ¦  «        r&|t          v rt	          |t
          |         ¦  «        s| S t          | t
          ¦  «        S )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.

    The internal name is the codec the pipeline validated the data under.
    For the names in :data:`NARROWER_DISPLAY_NAMES` the display name is a
    smaller codec, so when *data* is given the rename applies only if the
    display codec decodes it; otherwise the internal name stands, which
    Python's codecs accept as is.  Without *data* the rename is
    unconditional, as before.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :param data: The bytes *result* was detected from, when known.
    :returns: The same *result* dict, modified in-place.
    r>   )r?   r@   rA   rN   r   r9   rD   )r:   rH   rB   s      rC   Úapply_compat_namesrP   ¦   sg   € ð( �*Š*�ZÑ
 Ô
 €CàÐÝ�s�CÑ Ô ð 	àÕ)Ð)Ð)Ý% d­M¸#Ô,>Ñ?Ô?ð *ð ˆÝ˜6¥=Ñ1Ô1Ð1rE   )r:   r   r;   r   r<   r   )N)
r:   r   rH   rI   rF   rJ   rG   rJ   r<   r   )r:   r   rH   rI   r<   r   )Ú__doc__Ú
__future__r   Úchardet._utilsr   Úchardet.pipeliner   r   Ú__annotations__r9   rD   rM   Úapply_legacy_renameÚ	frozensetrN   rP   © rE   rC   ú<module>rY      s(  ððð ð ð& #Ð "Ð "Ð "Ð "Ð "à 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø *Ð *Ð *Ð *Ð *Ð *ð ØØØØØØØØØØØð&ð &Ð ð ð ð ñ ð(-!à�ð-!ð ˆXð-!ð ˆXð	-!ð
 ˆWð-!ð ˆWð-!ð ˆWð-!ð �Hð-!ð ˆhð-!ð ˆyð-!ð 	ˆ,ð-!ð �Mð-!ð �-ð-!ð �ð-!ð �ð-!ð  �ð!-!ð" �ð#-!ð$ �ð%-!ð -!ð& �ð'-!ð( �ð)-!ð* �-ð+-!ð, ˆWð--!ð. ˆhð/-!ð0 �Mð1-!ð2 �ð3-!ð4 �kð5-!ð6 ˆyð7-!ð8 ˆhð9-!ð: ˆhð;-!ð< �ð=-!ð> ˆnð?-!ð@ ˆnðA-!ðB ˆnðC-!ðD ˆnðE-!ðF ˆnðG-!ð -!ðH ØØàØØØØðY-!ð -!ð -!€ð -ð -ð -ñ -ð`ð ð ð ð ð'ð 04Ø/3ð'ð 'ð 'ð 'ð 'ð 'ðV /Ð ð *3¨ØCÐCÐCñ*ô *Ð ð ð ð ñ ð ð2ð 2ð 2ð 2ð 2ð 2ð 2rE   