Ë
    êÿæiL  ã                  óv  — d dl mZ d dlZd dlmZ ddlmZ ddlmZm	Z	  ej                  d«      Zdd„Zddd	„Zed
k(  r{ddlmZ  ed¬«      Zej#                  d«        e e	dd«      «        ed¬«      Zej%                  «        ej#                  d«       ej%                  «        ej#                  d«       yy)é    )ÚannotationsN)ÚIterableé   )Ú	loop_last)Úcell_lenÚ
chop_cellsz	\s*\S+\s*c              #  óÊ   K  — d}t         j                  | |«      }|�E|j                  «       \  }}|j                  d«      }|||f–— t         j                  | |«      }|�ŒDyy­w)z·Yields each word from the text as a tuple
    containing (start_index, end_index, word). A "word" in this context may
    include the actual word and any whitespace to the right.
    r   N)Úre_wordÚmatchÚspanÚgroup)ÚtextÚpositionÚ
word_matchÚstartÚendÚwords         ú_/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/rich/_wrap.pyÚwordsr      sh   è ø€ ð
 €HÜ—‘˜t XÓ.€JØ
Ð
 Ø—_‘_Ó&‰
ˆˆsØ×Ñ Ó"ˆØ�S˜$ÐÒÜ—]‘] 4¨Ó-ˆ
ð	 Ó
 ùs   ‚AA#Á!A#c                óž  — g }|j                   }d}t        }t        | «      D ]¨  \  }}}	 ||	j                  «       «      }
||z
  }||
k\  }|r| ||	«      z  }Œ5|
|kD  rY|rDt	        |	|¬«      }t        |«      D ](  \  }}|r ||«       |r	 ||«      }Œ|t        |«      z  }Œ* Œ€|r ||«        ||	«      }Œ“|sŒ–|sŒ™ ||«        ||	«      }Œª |S )aœ  Given a string of text, and a width (measured in cells), return a list
    of cell offsets which the string should be split at in order for it to fit
    within the given width.

    Args:
        text: The text to examine.
        width: The available cell width.
        fold: If True, words longer than `width` will be folded onto a new line.

    Returns:
        A list of indices to break the line at.
    r   ©Úwidth)Úappendr   r   Úrstripr   r   Úlen)r   r   ÚfoldÚbreak_positionsr   Úcell_offsetÚ	_cell_lenr   Ú_endr   Úword_lengthÚremaining_spaceÚword_fits_remaining_spaceÚfolded_wordÚlastÚlines                   r   Údivide_liner'      sñ   € ð "$€OØ×#Ñ#€FØ€KÜ€Iä" 4ž[Ñˆˆt�TÙ §¡£Ó.ˆØ +Ñ-ˆØ$3°{Ñ$BÐ!á$à™9 T›?Ñ*‰Kð ˜UÒ"ñ ä",¨T¸Ô"?�KÜ&/°Ö&<™
˜˜dÙ Ù" 5œMÙÙ*3°D«/™Kà!¤S¨£YÑ.™Eñ '=ñ Ù˜uœÙ"+¨D£/‘KÚ¢ñ �u”Ù'¨›o‘ðA )ðD Ðó    Ú__main__)ÚConsoleé
   r   z@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345Úabcdefghijklmnopqrstuvwxyzé   uR   Textualã�¯Pythonã�®é«˜é€Ÿã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³é–‹ç™ºãƒ•ãƒ¬ãƒ¼ãƒ ãƒ¯ãƒ¼ã‚¯ã�§ã�™u4   ã‚¢ãƒ—ãƒªã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã�¯1670ä¸‡è‰²ã‚’ä½¿ç”¨ã�§ã��)r   ÚstrÚreturnzIterable[tuple[int, int, str]])T)r   r.   r   Úintr   Úboolr/   z	list[int])Ú
__future__r   ÚreÚtypingr   Ú_loopr   Úcellsr   r   Úcompiler
   r   r'   Ú__name__Úconsoler*   ÚprintÚrule© r(   r   Ú<module>r=      sž   ðÝ "ã 	Ý å ß 'à
ˆ"�*‰*�\Ó
"€ó.ô4ðn ˆzÒÝ á˜BÔ€GØ‡M�MÐTÔUÙ	‰*Ð1°2Ó
6Ô7á˜BÔ€GØ‡L�L„NØ‡M�MÐfÔgà‡L�L„NØ‡M�MÐHÕIð r(   