+
    iK  c                   s    ^ RI t . ROtRt ! R R4      tRR ltRR ltR tR tRR	 lt]	R
8X  d   ]
! ]! R4      4       R# R# )    NTextWrapperz	
 c                   s  a  ] tR t^t o ]P                  ]! ]]4      ]! R4      4      t	Rt
RtR]P                  ! ]4      ,          tR]R,          ,           t]P                   ! RR]
R	]R
]R]/,          ]P"                  4      tA
AA]P                   ! R],          4      tA]P                   ! R4      tRRRRR/R lltR tR tR tR tR tR tR tR tRtV tR# )r    z[\w!"\'&.,?]z[^\d\W]z[%s]z[^:   NNa  
        ( # any whitespace
          %(ws)s+
        | # em-dash between words
          (?<=%(wp)s) -{2,} (?=\w)
        | # word, possibly hyphenated
          %(nws)s+? (?:
            # hyphenated word
              -(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))
              (?= %(lt)s -? %(lt)s)
            | # end of word
              (?=%(ws)s|\z)
            | # em-dash
              (?<=%(wp)s) (?=-{2,}\w)
            )
        )ZwpZltZwsZnwsz(%s+)z[a-z][\.\!\?][\"\']?\z	max_linesNplaceholderz [...]c               s    Wn         W n        W0n        W@n        WPn        W`n        Wpn        Wn        Wn        Wn	        Wn
        Wn        R # N)widthinitial_indentsubsequent_indentexpand_tabsreplace_whitespacefix_sentence_endingsbreak_long_wordsdrop_whitespacebreak_on_hyphenstabsizer   r   )selfr   r   r	   r
   r   r   r   r   r   r   r   r   s   &&&&&&&&&&&$$!/usr/lib64/python3.14/textwrap.py__init__ZTextWrapper.__init__p   sI     
,!2&"4$8! 0. 0"&    c                s    V P                   '       d   VP                  V P                  4      pV P                  '       d   VP	                  V P
                  4      pV# r   )r
   Z
expandtabsr   r   Z	translateunicode_whitespace_transr   text   &&r   _munge_whitespaceZTextWrapper._munge_whitespace   sG     ??4<<0D""">>$"?"?@Dr   c                s    V P                   R J d   V P                  P                  V4      pMV P                  P                  V4      pV Uu. uF  q3'       g   K  VNK  	  ppV# u upi )T)r   
wordsep_resplitwordsep_simple_re)r   r   chunksc   &&  r   _splitZTextWrapper._split   s^       D(__**40F++11$7F#)Vq!!V) *s   	A$A$c                s    ^ pV P                   P                  pV\        V4      ^,
          8  dJ   W^,           ,          R8X  d+   V! W,          4      '       d   RW^,           &   V^,          pKU  V^,          pK`  R# )r    r   z  N)sentence_end_reZsearchlen)r   r   ZiZ	patsearchr   r   _fix_sentence_endingsZ!TextWrapper._fix_sentence_endings   sf     ((//	#f+a-c{c!i	&:&:"sQQ  r   c                s   V^8  d   ^pMWC,
          pV P                   '       d   V^ 8  d   TpVR,          pV P                  '       dt   \        V4      V8  dd   VP                  R^ V4      pV^ 8  dJ   \        ;QJ d    R VRV  4       F  '       g   K   RM	  RM! R VRV  4       4      '       d
   V^,           pVP                  VRV 4       WvR VR&   R# V'       g"   VP                  VP                  4       4       R# R# )r   -c              3   s*   "   T F	  qR 8g  x  K  	  R# 5i)r$   N )Z.0r   s   & r   Z	<genexpr>Z0TextWrapper._handle_long_word.<locals>.<genexpr>   s     %G13hs   NTF)r   r   r"   ZrfindZanyappendpop)	r   Zreversed_chunkscur_linecur_lenr   Z
space_leftZendZchunkZhyphens	   &&&&&    r   _handle_long_wordZTextWrapper._handle_long_word   s     19JJ    Z!^C#B'E$$$Uj)@ S!Z8A:##%Ggv%G###%Ggv%G"G"G 1*COOE$3K("'+OB
 OOO//12 r   c                s^   . pV P                   ^ 8:  d   \        RV P                   ,          4      hV P                  ex   V P                  ^8  d   V P                  pMV P                  p\        V4      \        V P                  P                  4       4      ,           V P                   8  d   \        R4      hVP                  4        V'       Ed`   . p^ pV'       d   V P                  pMV P                  pV P                   \        V4      ,
          pV P                  '       d(   VR,          P                  4       R8X  d   V'       d   VR V'       dJ   \        VR,          4      pWW,           V8:  d*   VP                  VP                  4       4       WW,          pKP   V'       dC   \        VR,          4      V8  d,   V P                  WWV4       \        \        \
        V4      4      pV P                  '       dA   V'       d9   VR,          P                  4       R8X  d   V\        VR,          4      ,          pVR V'       g   EK{  V P                  eo   \        V4      ^,           V P                  8  gN   V'       d@   V P                  '       d^   \        V4      ^8X  dN   V^ ,          P                  4       '       g1   WV8:  d+   VP                  VRP!                  V4      ,           4       EK!  V'       d   VR,          P                  4       '       dh   V\        V P                  4      ,           V8:  dG   VP                  V P                  4       VP                  VRP!                  V4      ,           4         V# V\        VR,          4      ,          pVR K  V'       dd   VR,          P#                  4       p\        V4      \        V P                  4      ,           V P                   8:  d   WP                  ,           VR&    V# VP                  W0P                  P                  4       ,           4        V# V# )r    zinvalid width %r (must be > 0)z#placeholder too large for max width r&   )r   Z
ValueErrorr   r	   r   r"   r   ZlstripZreverser   stripr'   r(   r+   ZsummapjoinZrstrip)	r   r   linesindentr)   r*   r   lZ	prev_lines	   &&       r   _wrap_chunksZTextWrapper._wrap_chunks   s!    ::?=

JKK>>%~~!//,,6{S!1!1!8!8!:;;djjH !FGG 	f HG //,, JJV,E ###r
(8(8(:b(@U2Jr
O ;%'OOFJJL1LG  #fRj/E1&&vHc#x01 ###Xb\5G5G5IR5O3x|,,RLxNN*JNT^^3)))[A%**0@ LL"''(*;!;<"$RL..00#c$*:*:&;;uD$OOD,<,<=!LL"''(2C)CD!   3x|#44$RL (-b	(8(8(:I #IT5E5E1F F$(JJ!/,58H8H,Hb	 %  V.>.>.E.E.G%GHur   c                sF    V P                  V4      pV P                  V4      # r   )r   r    r   r   r   _split_chunksZTextWrapper._split_chunksU  s!    %%d+{{4  r   c                s    V P                  V4      pV P                  '       d   V P                  V4       V P                  V4      # r   )r4   r   r#   r3   )r   r   r   s   && r   wrapZTextWrapper.wrap[  s?     ##D)$$$&&v.  ((r   c                sB    R P                  V P                  V4      4      # )
)r/   r5   r   r   r   fillZTextWrapper.filli  s     yy4))r   )r   r   r   r
   r   r   r   r   r   r	   r   r   )
F   r,   r,   TTFTTTi   ) __name__Z
__module____qualname__Z__firstlineno__ZdictZfromkeysr.   Zord_whitespacer   Z
word_punctZletterreZescapeZ
whitespaceZnowhitespaceZcompileZVERBOSEr   r   r!   r   r   r    r#   r+   r3   r4   r5   r7   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s    b  $}}Sk-BCHM !JF299[11J*R.(L  j$j%77" 	

#J$ 	FL 

8j#89 jj "' (O
'  ' &'>,$!3ReN!)* *r   c                 >    \        RR V/VB pVP                  V 4      # r   r%   )r   r5   r   r   ZkwargsZw   &&, r   r5   r5   u  s$     	*%*6*A66$<r   c                 r=   r>   )r   r7   r?   r@   r   r7   r7     s$     	*%*6*A66$<r   c                 s    \        RR VR^/VB pVP                  RP                  V P                  4       P	                  4       4      4      # )r   r   r   r%   )r   r7   r/   r-   r   r?   r@   r   shortenrA     sB     	7%7177A66#((4::<--/011r   c                 s    V P                  R 4      pT Uu. uF&  q3'       g   K  TP                  4       '       d   K$  TNK(  	  pp\        TRR7      p\        TRR7      p^ p\        T4       F  w  rxYT,          8w  g
   TR9  g   K   M	  R P                  T Uu. uF  q3P                  4       '       g   Y7R MRNK   	  up4      #   \        \        3 d'    R\        T 4      P                  : 2p\        T4      Rhi ; iu upi u upi )r6   zexpected str object, not Nr,   )Zdefaultz 	)
r   ZAttributeErrorZ	TypeErrorZtyper:   isspaceZminZmaxZ	enumerater/   )	r   r0   Zmsgr2   Znon_blank_linesZl1Zl2Zmarginr   s	   &        r   dedentrC     s    '

4  #(A%Q1qQYY[qq%OA	_b	)B	_b	)BFr]	6
?aun # 99UKU		aj;UKLL I& ')$t**A*A)DEn$&'
 B Ls    C 	C?C?C?$D7C<c                 sb   . pVfR   V P                  R4       F;  pVP                  4       '       g   VP                  V4       VP                  V4       K=  	  MHV P                  R4       F3  pV! V4      '       d   VP                  V4       VP                  V4       K5  	  RP                  V4      # )NTr,   )Z
splitlinesrB   r'   r/   )r   ZprefixZ	predicateZprefixed_linesZlines   &&&  r   r1   r1     s     N OOD)D<<>>%%f-!!$' *
 OOD)D%%f-!!$' * 77>""r   Z__main__z Hello there.
  This is indented.)r   r5   r7   rC   r1   rA   )r8   r   )r<   Z__all__r;   r   r5   r7   rA   rC   r1   r9   Zprintr%   r   r   <module>rD      s\    

H
  _* _*H
2$M>#2 z 
&4
56 r   