Ë
    pwj¸]  ã                   óV  — d dl Z d dlZd dlZd dlZd dlmZmZ ddlmZ ddl	m
Z
 dZdZdZ ej                  d	«      Z ed
dh«      Z eh d£«      Z eh d£«      Z eh d£«      Z eddh«      Z eh d£«      Z eddh«      Z eddh«      Z ed
dh«      Zdedee   fd„Z G d„ de«      Z G d„ de«      Z G d„ de«      Z  G d„ de«      Z!dedefd„Z"ded ede#fd!„Z$d"ede%fd#„Z&d"edefd$„Z'd%ee%ef   de#fd&„Z(d'ee%ef   d(e#de#fd)„Z)d=d%ed*e#de#fd+„Z*d%ede#fd,„Z+d%ede#fd-„Z,d%eddfd.„Z-d%ed/ede#fd0„Z.d=d%ed/ed1e#de#fd2„Z/d%eee%e0f   ddfd3„Z1d%ede%fd4„Z2d%eee%e0f   defd5„Z3d>d'ed6e#d7e#defd8„Z4	 	 	 	 d?d"eee%e0f   d9e#d:e#d6e#d7e#de%fd;„Z5	 	 	 d@d"eee%e0f   d9e#d:e#d6e#def
d<„Z6y)Aé    N)ÚOptionalÚUnioné   )Úidnadata)Úintranges_containé	   s   xn--i   u   [.ã€‚ï¼Žï½¡]ÚRÚAL>   r	   r
   ÚAN>
   r	   r
   r   ÚBNÚCSÚENÚESÚETÚONÚNSM>   r	   r
   r   r   r   r   >   ÚLr   r   r   r   r   r   r   r   ÚDÚcpÚreturnc                 óp   — t         j                  j                  «       D ]  \  }}t        | |«      sŒ|c S  y ©N)r   Újoining_typesÚitemsr   )r   ÚjtÚrangess      úN/var/www/html/newmanjeet/manjet/venv/lib/python3.12/site-packages/idna/core.pyÚ_joining_typer      s3   € Ü×,Ñ,×2Ñ2Ö4‰
ˆˆFÜ˜R Õ(ØŠIð 5ð ó    c                   ó   — e Zd ZdZy)Ú	IDNAErrorz5Base exception for all IDNA-encoding related problemsN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r!   r!   #   s   „ Ú?r   r!   c                   ó   — e Zd ZdZy)ÚIDNABidiErrorz;Exception when bidirectional requirements are not satisfiedNr"   r'   r   r   r)   r)   '   s   „ ÚEr   r)   c                   ó   — e Zd ZdZy)ÚInvalidCodepointz<Exception when a disallowed or unallocated codepoint is usedNr"   r'   r   r   r+   r+   +   s   „ ÚFr   r+   c                   ó   — e Zd ZdZy)ÚInvalidCodepointContextzCException when the codepoint is not valid in the context it is usedNr"   r'   r   r   r-   r-   /   s   „ ÚMr   r-   c                 óž   — t        j                  t        | «      «      }|dk(  r)t        j                  t        | «      «      st	        d«      ‚|S )Nr   z Unknown character in unicodedata)ÚunicodedataÚ	combiningÚchrÚnameÚ
ValueError)r   Úvs     r   Ú_combining_classr5   3   s?   € Ü×Ñœc "›gÓ&€AØˆA‚v”k×&Ñ&¤s¨2£wÔ/ÜÐ;Ó<Ð<Ø€Hr   Úscriptc                 óN   — t        t        | «      t        j                  |   «      S r   )r   Úordr   Úscripts)r   r6   s     r   Ú
_is_scriptr:   :   s   € ÜœS ›W¤h×&6Ñ&6°vÑ&>Ó?Ð?r   Úsc                 ó$   — | j                  d«      S )NÚpunycode)Úencode©r;   s    r   Ú	_punycoder@   >   s   € Ø�8‰8�JÓÐr   c                 ó   — d| d›�S )NzU+Ú04Xr'   r?   s    r   Ú_unotrC   B   s   € Ø��#ˆwˆ<Ðr   Úlabelc                 ó   — t        | «      dk  S )uÍ  Check that a label does not exceed the maximum permitted length.

    Per :rfc:`1035` (and :rfc:`5891` Â§4.2.4) a DNS label must not exceed
    63 octets. The argument may be either a :class:`str` (a U-label, where
    length is measured in characters) or :class:`bytes` (an A-label, where
    length is measured in octets).

    :param label: The label to check.
    :returns: ``True`` if the label is within the length limit, otherwise
        ``False``.
    é?   ©Úlen©rD   s    r   Úvalid_label_lengthrJ   F   s   € ô ˆu‹:˜ÑÐr   ÚdomainÚtrailing_dotc                 ó*   — t        | «      |rdk  S dk  S )a¶  Check that a full domain name does not exceed the maximum length.

    Per :rfc:`1035`, a domain name is limited to 253 octets when no trailing
    dot is present, or 254 octets when one is included.

    :param domain: The full (possibly multi-label) domain name.
    :param trailing_dot: ``True`` if ``domain`` includes a trailing ``.``.
    :returns: ``True`` if the domain is within the length limit, otherwise
        ``False``.
    éþ   éý   rG   )rK   rL   s     r   Úvalid_string_lengthrP   U   s   € ô ˆv‹;¡,˜3Ñ8Ð8°CÑ8Ð8r   Ú	check_ltrc                 ó°  — t        | «      t        kD  rt        d«      ‚d}t        | d«      D ];  \  }}t	        j
                  |«      }|dk(  rt        d| ›d|› �«      ‚|t        v sŒ:d}Œ= |s|syt	        j
                  | d   «      }|t        v rd}n|d	k(  rd}nt        d
| ›d�«      ‚d}d}t        | d«      D ]Ž  \  }}t	        j
                  |«      }|rH|t        vrt        d|› d�«      ‚|t        v rd}n|dk7  rd}|t        v sŒO|s|}ŒT||k7  sŒZt        d«      ‚|t        vrt        d|› d�«      ‚|t        v rd}Œ‡|dk7  sŒ�d}Œ� |st        d«      ‚y)a!  Validate the Bidi Rule from :rfc:`5893` for a single label.

    The Bidi Rule constrains how bidirectional characters (Hebrew, Arabic,
    etc.) may appear within a label. By default the check is only applied
    when the label contains at least one right-to-left character (Unicode
    bidirectional categories ``R``, ``AL``, or ``AN``); set ``check_ltr``
    to ``True`` to apply it to LTR-only labels as well.

    :param label: The label to validate, as a Unicode string.
    :param check_ltr: If ``True``, apply the rules even when the label
        contains no RTL characters.
    :returns: ``True`` if the label satisfies the Bidi Rule.
    :raises IDNABidiError: If any of Bidi Rule conditions 1-6 are violated,
        or if the directional category of a codepoint cannot be determined.
    úLabel too longFr   Ú z Unknown directionality in label ú at position Tr   r   zFirst codepoint in label z" must be directionality L, R or ALNz,Invalid direction for codepoint at position z in a right-to-left labelr   z2Can not mix numeral types in a right-to-left labelz in a left-to-right labelz0Label ends with illegal codepoint directionality)rH   Ú_max_input_lengthr!   Ú	enumerater/   Úbidirectionalr)   Ú_bidi_rtl_categoriesÚ_bidi_rtl_firstÚ_bidi_rtl_allowedÚ_bidi_rtl_valid_endingÚ_bidi_rtl_numericÚ_bidi_ltr_allowedÚ_bidi_ltr_valid_ending)	rD   rQ   Ú
bidi_labelÚidxr   Ú	directionÚrtlÚvalid_endingÚnumber_types	            r   Ú
check_bidirf   c   s¬  € ô  ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)à€JÜ˜U AÖ&‰ˆˆRÜ×-Ñ-¨bÓ1ˆ	Ø˜Š?äÐ"BÀ5À)È=ÐY\ÐX]Ð ^Ó_Ð_ØÔ,Ò,Ø‰Jð 'ñ ™iØô ×)Ñ)¨%°©(Ó3€IØ”OÑ#Ø‰Ø	�cÒ	Ø‰äÐ7¸°yÐ@bÐcÓdÐdà€LØ!%€KÜ˜U AÖ&‰ˆˆRÜ×-Ñ-¨bÓ1ˆ	áàÔ 1Ñ1Ü#Ð&RÐSVÐRWÐWpÐ$qÓrÐràÔ2Ñ2Ø#‘Ø˜eÒ#Ø$�àÔ-Ò-Ù"Ø"+‘KØ  IÓ-Ü'Ð(\Ó]Ð]ð Ô 1Ñ1Ü#Ð&RÐSVÐRWÐWpÐ$qÓrÐràÔ2Ñ2Ø#‘Ø˜eÓ#Ø$‘ð5 'ñ8 ÜÐNÓOÐOàr   c                 óV   — t        j                  | d   «      d   dk(  rt        d«      ‚y)u^  Reject labels that begin with a combining mark.

    Per :rfc:`5891` Â§4.2.3.2 a label must not start with a character of
    Unicode general category ``M`` (Mark).

    :param label: The label to check.
    :returns: ``True`` if the first character is not a combining mark.
    :raises IDNAError: If the label begins with a combining character.
    r   ÚMz0Label begins with an illegal combining characterT)r/   Úcategoryr!   rI   s    r   Úcheck_initial_combinerrj   ®   s/   € ô ×Ñ˜E !™HÓ% aÑ(¨CÒ/ÜÐJÓKÐKØr   c                 ó`   — | dd dk(  rt        d«      ‚| d   dk(  s| d   dk(  rt        d«      ‚y	)
u§  Validate the hyphen restrictions for a label.

    Per :rfc:`5891` Â§4.2.3.1 a label must not start or end with a hyphen
    (``U+002D``), and must not have hyphens in both the third and fourth
    positions (the prefix reserved for A-labels).

    :param label: The label to check.
    :returns: ``True`` if the hyphen restrictions are satisfied.
    :raises IDNAError: If any of the hyphen restrictions are violated.
    é   é   z--z4Label has disallowed hyphens in 3rd and 4th positionr   Ú-éÿÿÿÿz)Label must not start or end with a hyphenT)r!   rI   s    r   Úcheck_hyphen_okrp   ½   sC   € ð ˆQˆq€z�TÒÜÐNÓOÐOØˆQ�x�3‚˜% ™) sÒ*ÜÐCÓDÐDØr   c                 ó†   — t        | «      t        kD  rt        d«      ‚t        j                  d| «      | k7  rt        d«      ‚y)z¬Require that a label is in Unicode Normalization Form C.

    :param label: The label to check.
    :raises IDNAError: If ``label`` differs from its NFC normalisation.
    rS   ÚNFCz%Label must be in Normalization Form CN)rH   rV   r!   r/   Ú	normalizerI   s    r   Ú	check_nfcrt   Ï   sC   € ô ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)Ü×Ñ˜U EÓ*¨eÒ3ÜÐ?Ó@Ð@ð 4r   Úposc                 ó.  — t        | «      t        kD  rt        d«      ‚t        | |   «      }|dk(  r¸|dkD  r"t	        t        | |dz
     «      «      t
        k(  ryd}t        |dz
  dd«      D ],  }t        t        | |   «      «      }|dk(  rŒ |t        v rd} n n |syd}t        |dz   t        | «      «      D ].  }t        t        | |   «      «      }|dk(  rŒ |t        v rd} |S  |S  |S |d	k(  r(|dkD  xr! t	        t        | |dz
     «      «      t
        k(  S y)
aí  Validate the CONTEXTJ rules from :rfc:`5892` Appendix A.

    These rules govern the contextual use of the joiner codepoints
    ``U+200C`` (ZERO WIDTH NON-JOINER, Appendix A.1) and ``U+200D``
    (ZERO WIDTH JOINER, Appendix A.2) within a label.

    :param label: The label containing the codepoint.
    :param pos: Index of the joiner codepoint within ``label``.
    :returns: ``True`` if the codepoint at ``pos`` satisfies its CONTEXTJ
        rule, ``False`` otherwise (including when the codepoint at
        ``pos`` is not a recognised joiner).
    :raises ValueError: If an adjacent codepoint has no Unicode name when
        determining its combining class.
    :raises IDNAError: If ``label`` exceeds the defensive input length limit.
    rS   i   r   r   TFro   ÚTi   )
rH   rV   r!   r8   r5   Ú_virama_combining_classÚranger   Ú_bidi_joiner_l_or_dÚ_bidi_joiner_r_or_d)rD   ru   Úcp_valueÚokÚiÚjoining_types         r   Úvalid_contextjr€   Û   sA  € ô  ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)Ü�5˜‘:‹€Hà�6ÒØ�Š7Ô'¬¨E°#¸±'©NÓ(;Ó<Ô@WÒWØàˆÜ�s˜Q‘w  BÖ'ˆAÜ(¬¨U°1©X«Ó7ˆLØ˜sÒ"ØØÔ2Ñ2Ø�ÙÙð (ñ ØàˆÜ�s˜Q‘w¤ E£
Ö+ˆAÜ(¬¨U°1©X«Ó7ˆLØ˜sÒ"ØØÔ2Ñ2Ø�Øàˆ	ð Øˆ	ð ,ð ˆ	à�6ÒØ�Q‰wÒ[Ô+¬C°°c¸A±g±Ó,?Ó@ÔD[Ñ[Ð[àr   Ú	exceptionc                 ó�  — t        | «      t        kD  rt        d«      ‚t        | |   «      }|dk(  rHd|cxk  xr t        | «      dz
  k  nc xr* t        | |dz
     «      dk(  xr t        | |dz      «      dk(  S |dk(  r2|t        | «      dz
  k  r t        | «      dkD  rt	        | |dz      d«      S y|d	v r|dkD  rt	        | |dz
     d
«      S y|dk(  r4| D ].  }|dk(  rŒ	t	        |d«      st	        |d«      st	        |d«      sŒ. y yd|cxk  rdk  rn nt        d„ | D «       «       S d|cxk  rdk  rn yt        d„ | D «       «       S y)aÙ  Validate the CONTEXTO rules from :rfc:`5892` Appendix A.

    Covers the contextual rules for codepoints such as MIDDLE DOT
    (``U+00B7``), Greek lower numeral sign, Hebrew punctuation, Katakana
    middle dot, and the Arabic-Indic / Extended Arabic-Indic digit ranges.

    :param label: The label containing the codepoint.
    :param pos: Index of the codepoint within ``label``.
    :param exception: Reserved for forward compatibility; currently unused.
    :returns: ``True`` if the codepoint at ``pos`` satisfies its CONTEXTO
        rule, ``False`` otherwise (including when the codepoint is not a
        recognised CONTEXTO codepoint).
    :raises IDNAError: If ``label`` exceeds the defensive input length limit.
    rS   é·   r   r   él   iu  ÚGreekF>   éó  éô  ÚHebrewiû0  u   ãƒ»ÚHiraganaÚKatakanaÚHanTé`  éi  c              3   óN   K  — | ]  }d t        |«      cxk  xr dk  nc –— Œ y­w)éð  éù  N©r8   ©Ú.0r   s     r   Ú	<genexpr>z!valid_contexto.<locals>.<genexpr>:  ó"   è ø€ ÐB¹E°b�u¤ B£Ö1¨6×1Ð1¹Eùó   ‚#%r�   r�   c              3   óN   K  — | ]  }d t        |«      cxk  xr dk  nc –— Œ y­w)rŒ   r�   Nr‘   r’   s     r   r”   z!valid_contexto.<locals>.<genexpr>=  r•   r–   )rH   rV   r!   r8   r:   Úany)rD   ru   r�   r|   r   s        r   Úvalid_contextor™     sn  € ô ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)Ü�5˜‘:‹€Hà�6ÒØ�3Ö'œ˜U› a™Ô'Òk¬C°°c¸A±g±Ó,?À6Ñ,IÒkÌcÐRWÐX[Ð^_ÑX_ÑR`ÓNaÐekÑNkÐkà�6ÒØ”�U“˜a‘Ò¤C¨£J°¢NÜ˜e C¨!¡G™n¨gÓ6Ð6ØàÐ#Ñ#Ø�Š7Ü˜e C¨!¡G™n¨hÓ7Ð7Øà�6ÒÛˆBØ�XŠ~ØÜ˜"˜jÔ)¬Z¸¸JÔ-GÌ:ÐVXÐZ_ÕK`Ùð	 ð
 à�Ô!˜EÕ!ÜÑB¹EÓBÓBÐBÐBà�Ô!˜EÔ!ð ô ÑB¹EÓBÓBÐBÐBàr   c           
      óŒ  — t        | «      t        kD  rt        d«      ‚t        | t        t
        f«      r| j                  d«      } t        | «      dk(  rt        d«      ‚t        | d¬«      st        d«      ‚t        | «       t        | «       t        | «       t        | «      D ]ã  \  }}t        |«      }t        |t        j                  d   «      rŒ/t        |t        j                  d   «      r.	 t!        | |«      s t#        d	t%        |«      › d
|dz   › d| ›�«      ‚Œzt        |t        j                  d   «      r-t)        | |«      rŒ¤t#        dt%        |«      › d
|dz   › d| ›�«      ‚t+        dt%        |«      › d|dz   › d| ›d�«      ‚ t-        | «       y# t&        $ r&}t        dt%        |«      › d|dz   › d| ›�«      |‚d}~ww xY w)a8  Run the full set of IDNA 2008 validity checks on a single label.

    Applies, in order: NFC normalisation (:func:`check_nfc`), hyphen
    restrictions (:func:`check_hyphen_ok`), the no-leading-combiner rule
    (:func:`check_initial_combiner`), per-codepoint validity (PVALID,
    CONTEXTJ, CONTEXTO classes from :rfc:`5892`), and the Bidi Rule
    (:func:`check_bidi`).

    :param label: The label to validate. ``bytes`` or ``bytearray`` input
        is decoded as UTF-8 first.
    :raises IDNAError: If the label is empty or fails a structural rule.
    :raises InvalidCodepoint: If the label contains a DISALLOWED or
        UNASSIGNED codepoint.
    :raises InvalidCodepointContext: If a CONTEXTJ or CONTEXTO codepoint
        is not valid in its context.
    :raises IDNABidiError: If the Bidi Rule is violated.
    rS   zutf-8r   zEmpty LabelT©rL   ÚPVALIDÚCONTEXTJzJoiner ú not allowed at position r   ú in z%Unknown codepoint adjacent to joiner rU   NÚCONTEXTOú
Codepoint z of z not allowed)rH   rV   r!   Ú
isinstanceÚbytesÚ	bytearrayÚdecoderP   rt   rp   rj   rW   r8   r   r   Úcodepoint_classesr€   r-   rC   r3   r™   r+   rf   )rD   ru   r   r|   Úerrs        r   Úcheck_labelr¨   B  sÜ  € ô$ ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)Ü�%œ%¤Ð+Ô,Ø—‘˜WÓ%ˆÜ
ˆ5ƒz�Q‚Ü˜Ó&Ð&ô ˜u°4Õ8ÜÐ(Ó)Ð)äˆeÔÜ�EÔÜ˜5Ô!ä˜UÖ#‰ˆˆRÜ�r“7ˆÜ˜X¤x×'AÑ'AÀ(Ñ'KÔLØÜ˜X¤x×'AÑ'AÀ*Ñ'MÔNðÜ% e¨SÔ1Ü1°G¼EÀ(»OÐ;LÐLeÐfiÐlmÑfmÐenÐnrÐsxÐr{Ð2|Ó}Ð}ð 2ô ˜x¬×)CÑ)CÀJÑ)OÔPÜ! %¨Õ-Ü-°
¼5À»?Ð:KÐKdÐehÐklÑelÐdmÐmqÐrwÐqzÐ.{Ó|Ð|ä" Z´°h³Ð/@ÀÈcÐTUÉgÈYÐVZÐ[`ÐZcÐcoÐ#pÓqÐqð! $ô$ ˆuÕøô ò ÜØ;¼EÀ(»OÐ;LÈMÐZ]Ð`aÑZaÐYbÐbfÐglÐfoÐpóàðûðús   Ã/,FÆ	GÆ!F>Æ>Gc                 ó.  — t        | «      t        kD  rt        d«      ‚	 | j                  d«      }t	        |«       t        |«      st        d«      ‚|S # t        $ r Y nw xY wt        | «       t        t        | «      z   }t        |«      st        d«      ‚|S )u  Convert a single U-label into its A-label form.

    The result is the ASCII-Compatible Encoding (ACE) form per :rfc:`5891`
    Â§4: the label is validated, Punycode-encoded, and prefixed with
    ``xn--``. Pure ASCII labels that are already valid IDNA labels are
    returned unchanged (as :class:`bytes`).

    :param label: The label to convert, as a Unicode string.
    :returns: The A-label as ASCII-encoded :class:`bytes`.
    :raises IDNAError: If the label is invalid or the resulting A-label
        exceeds 63 octets.
    rS   Úascii)
rH   rV   r!   r>   ÚulabelrJ   ÚUnicodeEncodeErrorr¨   Ú_alabel_prefixr@   )rD   Úlabel_bytess     r   Úalabelr¯   y  s›   € ô ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)ðØ—l‘l 7Ó+ˆô 	ˆ{ÔÜ! +Ô.ÜÐ,Ó-Ð-ØÐøô ò Ùðúô �ÔÜ ¤9¨UÓ#3Ñ3€Kä˜kÔ*ÜÐ(Ó)Ð)àÐs   ŸA Á	AÁAc                 óL  — t        | «      t        kD  rt        d«      ‚t        | t        t
        f«      s	 | j                  d«      }nt	        | «      }|j                  «       }|j                  t        «      r;|t        t        «      d }|st        d«      ‚|j                  d«      r't        d«      ‚t        |«       |j                  d«      S 	 |j                  d«      } t        | «       | S # t        $ r t        | «       | cY S w xY w# t        $ r}t        d«      |‚d}~ww xY w)	aÿ  Convert a single A-label into its U-label form.

    Performs the inverse of :func:`alabel`: an ``xn--``-prefixed label is
    Punycode-decoded and validated. Labels that are already Unicode (or
    plain ASCII without the ACE prefix) are validated and returned as a
    Unicode string.

    :param label: The label to convert. ``bytes`` or ``bytearray`` input
        is treated as ASCII.
    :returns: The U-label as a Unicode string.
    :raises IDNAError: If the label is malformed or fails validation.
    rS   rª   Nz5Malformed A-label, no Punycode eligible content foundó   -z"A-label must not end with a hyphenr=   zInvalid A-label)rH   rV   r!   r¢   r£   r¤   r>   r¬   r¨   ÚlowerÚ
startswithr­   Úendswithr¥   ÚUnicodeError)rD   r®   r§   s      r   r«   r«   ›  s  € ô ˆ5ƒzÔ%Ò%ÜÐ(Ó)Ð)Ü�eœe¤YÐ/Ô0ð	ØŸ,™, wÓ/‰Kô
 ˜E“lˆà×#Ñ#Ó%€KØ×ÑœnÔ-Ø!¤#¤nÓ"5Ð"7Ð8ˆÙÜÐSÓTÐTØ×Ñ Ô%ÜÐ@ÓAÐAä�KÔ Ø×!Ñ! 'Ó*Ð*ð4Ø×"Ñ" :Ó.ˆô �ÔØ€Løô- "ò 	Ü˜ÔØŠLð	ûô& ò 4ÜÐ)Ó*°Ð3ûð4ús)   µC- ÃD	 Ã-DÄDÄ		D#ÄDÄD#Ú
std3_rulesÚtransitionalc           	      ó  — t        | «      t        kD  rt        d«      ‚ddlm}m}m} d}t        | «      D ]Á  \  }}t        |«      }	|	dk  r|	nt        j                  ||	«      dz
  }
t        ||
   «      }||
   }|dk(  xs |dk(  xr | xs |dk(  xr	 | xr |d	u }|d	uxr |d
k(  xs |dk(  xr | xs	 |dk(  xr |}|r||z  }Œ‘|r
|€J ‚||z  }Œ�|dk(  rŒ£t        dt        |	«      › d|dz   › d| ›�«      ‚ t        j                  d|«      S )uý  Apply the UTS #46 character mapping to a domain string.

    Implements the mapping table from `UTS #46 Â§4
    <https://www.unicode.org/reports/tr46/>`_: each character is kept,
    replaced, or rejected based on its status (``V``, ``M``, ``D``, ``3``,
    ``I``). The result is returned in Normalisation Form C.

    :param domain: The full domain name to remap.
    :param std3_rules: If ``True``, apply the stricter STD3 ASCII rules
        (status ``3`` codepoints raise instead of being kept or mapped).
    :param transitional: If ``True``, use transitional processing (status
        ``D`` codepoints are mapped instead of kept). Transitional
        processing has been removed from UTS #46 and this option is
        retained only for backwards compatibility.
    :returns: The remapped domain, in Normalisation Form C.
    :raises InvalidCodepoint: If the domain contains a disallowed
        codepoint under the chosen rules.
    :raises IDNAError: If ``domain`` exceeds the defensive input length limit.
    úDomain too longr   )Úuts46_replacementsÚuts46_startsÚuts46_statusesrT   é   ÚVr   Ú3Nrh   ÚIr¡   rž   rŸ   rr   )rH   rV   r!   Ú	uts46datarº   r»   r¼   rW   r8   ÚbisectÚbisect_rightr1   r+   rC   r/   rs   )rK   r¶   r·   rº   r»   r¼   Úoutputru   ÚcharÚ
code_pointr~   ÚstatusÚreplacementÚ
keep_as_isÚuse_replacements                  r   Úuts46_remaprË   Æ  sm  € ô( ˆ6ƒ{Ô&Ò&ÜÐ)Ó*Ð*ßKÑKà€Fä˜vÖ&‰	ˆˆTÜ˜“Yˆ
Ø$ sÒ*‰J´×0CÑ0CÀLÐR\Ó0]Ð`aÑ0aˆÜ�^ AÑ&Ó'ˆØ%7¸Ñ%:ˆð
 �c‰MÒ˜f¨™mÒ@°LÐ0@ÒÀfÐPSÁmÒF~Ð\fÐXfÒF~ÐkvÐz~Ðk~ð 	ð
 &¨TÐ1ò 
Ø�c‰MÒc˜f¨™mÒ>°J°ÒcÀFÈcÁMÒDbÐVbð 	ñ Ø�d‰N‰FÙØÐ*Ð*Ð*Ø�kÑ!‰FØ�sŠ]Øä" Z´°jÓ0AÐ/BÐB[Ð\_ÐbcÑ\cÐ[dÐdhÐioÐhrÐ#sÓtÐtð3 'ô6 × Ñ  ¨Ó/Ð/r   ÚstrictÚuts46c                 ó¸  — |rt        j                  dt        d¬«       t        | t        «      s	 t	        | d«      } t        | «      t        kD  rt        d«      ‚|rt        | ||«      } t        | d¬	«      st        d«      ‚d
}g }|r| j                  d«      nt        j                  | «      }|r|dgk(  rt        d«      ‚|d   dk(  r|d= d}|D ]+  }	t        |	«      } | r|j                  | «       Œ"t        d«      ‚ |r|j                  d«       dj!                  |«      } t        | |«      st        d«      ‚| S # t
        t        f$ r}t        d«      |‚d}~ww xY w)aA  Encode a Unicode domain name into its ASCII (A-label) form.

    Splits the input on label separators (only ``U+002E`` if ``strict`` is
    set; otherwise also IDEOGRAPHIC FULL STOP ``U+3002``, FULLWIDTH FULL
    STOP ``U+FF0E``, and HALFWIDTH IDEOGRAPHIC FULL STOP ``U+FF61``),
    encodes each label with :func:`alabel`, and rejoins them with ``.``.
    Optionally pre-processes the input through :func:`uts46_remap`.

    :param s: The domain name to encode.
    :param strict: If ``True``, only ``U+002E`` is recognised as a label
        separator.
    :param uts46: If ``True``, apply UTS #46 mapping before encoding.
    :param std3_rules: Forwarded to :func:`uts46_remap` when ``uts46`` is
        ``True``.
    :param transitional: Forwarded to :func:`uts46_remap` when ``uts46``
        is ``True``. Deprecated: emits a :class:`DeprecationWarning` and
        will be removed in a future version.
    :returns: The encoded domain as ASCII :class:`bytes`.
    :raises IDNAError: If the domain is empty, contains an invalid label,
        or exceeds the maximum domain length.
    zuTransitional processing has been removed from UTS #46. The transitional argument will be removed in a future version.rl   )Ú
stacklevelrª   zGshould pass a unicode string to the function rather than a byte string.Nr¹   Tr›   FÚ.rT   úEmpty domainro   úEmpty labelr   ó   .)ÚwarningsÚwarnÚDeprecationWarningr¢   ÚstrÚUnicodeDecodeErrorÚ	TypeErrorr!   rH   rV   rË   rP   ÚsplitÚ_unicode_dots_rer¯   ÚappendÚjoin)
r;   rÌ   rÍ   r¶   r·   r§   rL   ÚresultÚlabelsrD   s
             r   r>   r>   þ  sd  € ñ8 Ü�‰ðMäØõ		
ô �aœÔð	pÜ�A�w“ˆAô ˆ1ƒvÔ!Ò!ÜÐ)Ó*Ð*ÙÜ˜˜: |Ó4ˆô ˜q¨tÕ4ÜÐ)Ó*Ð*à€LØ€FÙ#ˆQ�W‰W�SŒ\Ô)9×)?Ñ)?ÀÓ)B€FÙ�V ˜t’^Ü˜Ó'Ð'Øˆb�z�RÒØ�2ˆJØˆÛˆÜ�5‹MˆÙØ�M‰M˜!Õä˜MÓ*Ð*ð ñ Ø�‰�cÔØ�	‰	�&Ó€AÜ˜q ,Ô/ÜÐ)Ó*Ð*Ø€Høô? #¤IÐ.ò 	pÜÐeÓfÐloÐoûð	pús   °D9 Ä9EÅEÅEc                 óD  — t        | t        «      s	 t        | d«      } t        | «      t        kD  rt	        d«      ‚|rt        | |d«      } t        | d¬«      st	        d«      ‚d}g }|r| j                  d«      nt        j                  | «      }|r|d	gk(  rt	        d
«      ‚|d   s|d= d}|D ]+  }t        |«      } | r|j                  | «       Œ"t	        d«      ‚ |r|j                  d	«       dj                  |«      S # t        t        f$ r}t	        d«      |‚d}~ww xY w)aà  Decode an A-label-encoded domain name back to Unicode.

    Splits the input on label separators (see :func:`encode` for the
    rules), decodes each label with :func:`ulabel`, and rejoins them
    with ``.``. Optionally pre-processes the input through
    :func:`uts46_remap`.

    :param s: The domain name to decode.
    :param strict: If ``True``, only ``U+002E`` is recognised as a label
        separator.
    :param uts46: If ``True``, apply UTS #46 mapping before decoding.
    :param std3_rules: Forwarded to :func:`uts46_remap` when ``uts46`` is
        ``True``.
    :returns: The decoded domain as a Unicode string.
    :raises IDNAError: If the input is not valid ASCII, contains an
        invalid label, or is empty.
    rª   zInvalid ASCII in A-labelNr¹   FTr›   rÐ   rT   rÑ   ro   rÒ   )r¢   r×   rØ   rÙ   r!   rH   rV   rË   rP   rÚ   rÛ   r«   rÜ   rÝ   )	r;   rÌ   rÍ   r¶   r§   rL   rÞ   rß   rD   s	            r   r¥   r¥   F  s'  € ô. �aœÔð	AÜ�A�w“ˆAô ˆ1ƒvÔ!Ò!ÜÐ)Ó*Ð*ÙÜ˜˜: uÓ-ˆô ˜q¨tÕ4ÜÐ)Ó*Ð*Ø€LØ€FÙ#ˆQ�W‰W�SŒ\Ô)9×)?Ñ)?ÀÓ)B€FÙ�V ˜t’^Ü˜Ó'Ð'Ø�"Š:Ø�2ˆJØˆÛˆÜ�5‹MˆÙØ�M‰M˜!Õä˜MÓ*Ð*ð ñ Ø�‰�bÔØ�8‰8�FÓÐøô5 #¤IÐ.ò 	AÜÐ6Ó7¸SÐ@ûð	Aús   ’C? Ã?DÄDÄD)F)TF)FFFF)FFF)7rÂ   Úrer/   rÔ   Útypingr   r   rT   r   Ú	intrangesr   rx   r­   rV   ÚcompilerÛ   Ú	frozensetrZ   rY   r[   r\   r]   r^   r_   rz   r{   Úintr×   r   rµ   r!   r)   r+   r-   r5   Úboolr:   r£   r@   rC   rJ   rP   rf   rj   rp   rt   r€   r™   r¤   r¨   r¯   r«   rË   r>   r¥   r'   r   r   Ú<module>rè      sV  ðÛ Û 	Û Û ß "å Ý (àÐ Ø€ØÐ Ø�2—:‘:Ð:Ó;Ð ñ ˜S $˜KÓ(€Ù Ò!2Ó3Ð ÙÒZÓ[Ð Ù"Ò#:Ó;Ð Ù˜t T˜lÓ+Ð ÙÒNÓOÐ Ù" C¨ ;Ó/Ð Ù  c 
Ó+Ð Ù  c 
Ó+Ð ð�cð ˜h s™mó ô@�ô @ôF�Iô FôG�yô GôN˜iô Nð˜ð  ó ð@�3ð @ ð @¨ó @ð �ð  ˜ó  ðˆSð �Só ð˜e E¨3 JÑ/ð °Dó ð9  e¨S jÑ 1ð 9Àð 9È$ó 9ñH�cð H dð H°tó HðV #ð ¨$ó ð˜3ð  4ó ð$	A�Sð 	A˜Tó 	Að3˜#ð 3 Cð 3¨Dó 3ñl.˜#ð . Cð .°Dð .ÀTó .ðb4�u˜S %¨Ð2Ñ3ð 4¸ó 4ðn�#ð ˜%ó ðD(�%˜˜U IÐ-Ñ.ð (°3ó (ñV50˜ð 50¨ð 50ÀDð 50ÐUXó 50ðt ØØØñEØˆS�%˜Ð"Ñ#ðEàðEð ðEð ð	Eð
 ðEð óEðT ØØñ	4ØˆS�%˜Ð"Ñ#ð4àð4ð ð4ð ð	4ð
 	ô4r   