+
     Bi                     :   R t ^ RItR tR tR tR tR tRtR tR	 t	R
 t
R tR tR tR t ! R R]P                  4      t ! R R]P                   4      t ! R R]P"                  4      t ! R R]]P$                  4      t ! R R]]P&                  4      tR tR# )uX   Codec for the Punycode encoding, as specified in RFC 3492

Written by Martin v. Löwis.
Nc                    \        4       p\        4       pV  F@  p\        V4      ^8  d   VP                  \        V4      4       K/  VP	                  V4       KB  	  \        V4      p\        V4      V3# )z 3.1 Basic code point segregation)	bytearraysetordappendaddsortedbytes)strbaseextendedcs   &   )/usr/lib/python3.14/encodings/punycode.py	segregater   
   s[    ;DuHq6C<KKALLO	 
 hH;      c                R    ^ pV  F  p\        V4      V8  g   K  V^,          pK   	  V# )z@Return the length of str, considering only characters below max.)r   )r
   maxresr   s   &&  r   selective_lenr      s,    
Cq6C<1HC  Jr   c                    \        V 4      p V^,          pW48X  d   R# W,          pWQ8X  d   V^,           V3# WQ8  g   K3  V^,          pK>  )a  Return a pair (index, pos), indicating the next occurrence of
char in str. index is the position of the character considering
only ordinals up to and including char, and pos is the position in
the full string. index/pos is the starting position in the full
string.)r   )len)r
   charindexposlr   s   &&&&  r   selective_findr      sK     	CA
q8OH97C<XQJEr   c                   ^p. pRpV Fx  pR;rg\        V4      p\        W4      p	V	^,           W,
          ,          p
 \        WWg4      w  rgVR8X  d   M-WV,
          ,          p
VP                  V
^,
          4       Tp^ p
KD  TpKz  	  V# )z3.2 Insertion unsort codingr   )r   r   r   r   )r
   r   oldcharresultoldindexr   r   r   r   curlendeltas   &&         r   insertion_unsortr#   0   s    GFH1vs)dn-&sU7IE{X%%EMM%'"HE  Mr   c                 X    ^$V ^,           ,          V,
          pV^8  d   ^# V^8  d   ^# V# )$    )jbiasr   s   && r   Tr)   F   s+    
A,
C
Qwq
RxJr   s$   abcdefghijklmnopqrstuvwxyz0123456789c                <   \        4       p^ p \        W14      pW8  d(   VP                  \        V ,          4       \	        V4      # VP                  \        W@V,
          ^$V,
          ,          ,           ,          4       W,
          ^$V,
          ,          p V^,          pK  )(3.3 Generalized variable-length integers)r   r)   r   digitsr	   )Nr(   r   r'   ts   &&   r   generate_generalized_integerr/   N   ss    [F	A
aJ5MM&)$= fQq5R!V"4567UQ	Qr   c                     V'       d   V R ,          p M	V ^,          p W V,          ,          p ^ pV R8  d   V ^#,          p V^$,          pK  V^$V ,          V ^&,           ,          ,           pV# )i  i  r&   )r"   firstnumchars	divisionsr(   s   &&&  r   adaptr4   [   s^    #!	hEI
#+R	U
urz23DKr   c                    \        4       p^Hp\        V4       F=  w  rE\        WS4      pVP                  V4       \	        WT^ 8H  W,           ^,           4      pK?  	  \        V4      # )z3.4 Bias adaptation)r   	enumerater/   extendr4   r	   )baselendeltasr   r(   pointsr"   ss   &&     r   generate_integersr<   j   sZ     [FD"6*(5aUAIw~a'78 + =r   c                     \        V 4      w  r\        W4      p\        \        V4      V4      pV'       d   VR ,           V,           # V# )   -)r   r#   r<   r   )textr   r   r9   s   &   r   punycode_encoder@   u   s>    t_NDd-F TF3Hd{X%%Or   c           
        ^ p^p^ p  W,          pT^,          p^ATu;8:  d   ^Z8:  d   M M
T^A,
          pMM^0Tu;8:  d   ^98:  d   M M
T^,
          pM1TR8X  d'   \        RY^,
          TRY^,
          ,           R24      hTR3# \        Yb4      p	YHT,          ,          pY8  d   Y3# T^$T	,
          ,          pT^,          pK    \          d+    TR8X  d   \        RYT^,           R4      hT^,           R3u # i ; i)r+   strictpunycodezincomplete punycode stringNzInvalid extended code point '')
IndexErrorUnicodeDecodeErrorr)   )
r   extposr(   errorsr   wr'   r   digitr.   s
   &&&&      r   decode_generalized_numberrK      s   F	A	A
	$#D 	!444KET!T!2IEx$Z!8V'DXUVhEWDXXY%Z\ \ 4<aJ!)9>!aL	Q)  	$!(Xvax)EG GA:t##		$s   C 2C65C6c           	        ^pRp^Hp^ pV\        V4      8  d   \        WWR4      w  rxVf   V # WH^,           ,          pW4\        V 4      ^,           ,          ,          pVR8  d,   VR8X  d   \        RW^,
          VRVR 24      h\        R4      pV\        V 4      ^,           ,          pV RV \	        V4      ,           WR ,           p \        W^ 8H  \        V 4      4      pTpK  V # )	z3.2 Insertion sort codingNi rB   rC   zInvalid character U+x?r   )r   rK   rF   r   chrr4   )	r   r   rH   r   r   r(   rG   newposr"   s	   &&&      r   insertion_sortrQ      s     D
CDF
3x=
 1(26@= KQwD	A&&(?!(a%*4(35 5 s8DSY]#DSzCI%T
2Uq[3t95Kr   c                    \        V \        4      '       d   V P                  R 4      p \        V \        4      '       d   \	        V 4      p V P                  R4      pVR8X  d   RpV P                  4       pM* \        V RV R V4      pY^,           R P                  4       p \        W4V4      #   \         d3   p\        R YP                  TP                  TP                  4      RhRp?ii ; i  \         dI   pT^,           p\        RT YeP                  ,           YeP                  ,           TP                  4      RhRp?ii ; i)asciir>    NrC   r   )
isinstancer
   encode
memoryviewr	   rfindupperrF   startendreasonrQ   )r?   rH   r   r   r   excoffsets   &&     r   punycode_decoder_      s   ${{7#$
##T{
**T
C
by::<	;tDSz7F3D A<%%'7df55 " 	;$WdIIsww%(ZZ16:;	;  7q T!'		!16''>!$-26	77s1   5B+ C+ +C(6-C##C(+D>6AD99D>c                   4   a  ] tR t^t o RR ltRR ltRtV tR# )Codecc                2    \        V4      pV\        V4      3# N)r@   r   selfinputrH   r   s   &&& r   rV   Codec.encode   s    e$CJr   c                \    VR9  d   \        RV 24      h\        W4      pV\        V4      3# rB   zUnsupported error handling: )rB   replaceignore)UnicodeErrorr_   r   rd   s   &&& r   decodeCodec.decode   s6    88!=fXFGGe,CJr   r&   N)rB   )__name__
__module____qualname____firstlineno__rV   rm   __static_attributes____classdictcell____classdict__s   @r   ra   ra      s      r   ra   c                   *   a  ] tR t^t o RR ltRtV tR# )IncrementalEncoderc                    \        V4      # rc   )r@   re   rf   finals   &&&r   rV   IncrementalEncoder.encode   s    u%%r   r&   NF)ro   rp   rq   rr   rV   rs   rt   ru   s   @r   rx   rx      s     & &r   rx   c                   *   a  ] tR t^t o RR ltRtV tR# )IncrementalDecoderc                ~    V P                   R9  d   \        RV P                    24      h\        WP                   4      # ri   )rH   rl   r_   rz   s   &&&r   rm   IncrementalDecoder.decode   s5    ;;==!=dkk]KLLukk22r   r&   Nr}   )ro   rp   rq   rr   rm   rs   rt   ru   s   @r   r   r      s     3 3r   r   c                       ] tR t^tRtR# )StreamWriterr&   Nro   rp   rq   rr   rs   r&   r   r   r   r          r   r   c                       ] tR t^tRtR# )StreamReaderr&   Nr   r&   r   r   r   r      r   r   r   c            
          \         P                  ! R \        4       P                  \        4       P                  \
        \        \        \        R7      # )rC   )namerV   rm   incrementalencoderincrementaldecoderstreamwriterstreamreader)	codecs	CodecInfora   rV   rm   rx   r   r   r   r&   r   r   getregentryr      s6    w~~w~~--!! r   )__doc__r   r   r   r   r#   r)   r,   r/   r4   r<   r@   rK   rQ   r_   ra   rx   r   r   r   r   r&   r   r   <module>r      s   
 
!$, 
1	><74
FLL 
&22 &322 3	5,, 		5,, 	
	r   