HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pip/_vendor/rich/__pycache__/progress.cpython-310.pyc
o

��h���@s�ddlmZddlZddlZddlZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZmZddlmZdd	lmZdd
lmZddlmZmZddlmZmZmZdd
lmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1er�ddl2m3Z3ddl4m5Z5m6Z6ddl7m8Z8m9Z9m:Z:m;Z;ddl<m=Z=ddl>m?Z?ddl@mAZAddlBmCZCddlDmEZEddlFmGZGddlHmIZImJZJddlKmLZLmMZMe+deN�ZOe0d�ZPe"geQfZRe�0de-e!�ZSGdd�de�ZT	 			!		"		#	$	%	&	'	(	"	!d�d�dCdD�ZUGdEdF�dFee!�ZVGdGdH�dHe#eSe&eS�ZWdId!dd"dd#d$d%d&d'd"dJ�d�dNdO�ZXejY	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�d\d]��ZZejY	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�d_d]��ZZ	`	P			d�ddId!dd"dd#d$d%d&d'd"dQ�d�dcd]�ZZGddde�dee�Z[Gdfdg�dge[�Z\Gdhdi�die[�Z]Gdjdk�dke[�Z^Gdldm�dme[�Z_Gdndo�doe[�Z`Gdpdq�dqe^�ZaGdrds�dse[�ZbGdtdu�due[�ZcGdvdw�dwe[�ZdGdxdy�dye[�ZeGdzd{�d{e[�ZfGd|d}�d}e[�ZgGd~d�de*�ZheGd�d��d���ZiGd�d��d�e?�Zjekd�k�r�ddllZlddlmZmdd�lnmoZodd�lpmqZqdd�lrmsZsdd�lHmJZJesd�d�d!d��ZreJd�d�d��ZHeH�td�d�d��d�eod��d�eHd�d�d�d��d�ereqd��g	Zudd�lvmwZweweu�Zxe8d!d��Z7eje]�gej�y��e`��Re7d"d����QZzezj{d�d�d��Z|ezj{d�d�d��Z}ezj{d�dd��Z~ezj�s�ezj�e|d�d��ezj�e}d�d��em��d��el��dd��dk�r�ez��e�ex��ezj�r�Wd�dSWd�dS1�s�wYdSdS)��)�annotationsN)�ABC�abstractmethod��deque)�	dataclass�field)�	timedelta)�	RawIOBase�UnsupportedOperation)�ceil)�mmap)�length_hint)�PathLike�stat)�Event�RLock�Thread)�
TracebackType)�
TYPE_CHECKING�Any�BinaryIO�Callable�ContextManager�Deque�Dict�Generic�Iterable�List�Literal�
NamedTuple�NewType�Optional�TextIO�Tuple�Type�TypeVar�Union)�Self�)�filesize�get_console)�Console�Group�
JustifyMethod�RenderableType)�Highlighter)�JupyterMixin)�Live)�ProgressBar)�Spinner)�	StyleType)�Column�Table)�Text�TextType�TaskID�ProgressType�_Ics@eZdZdZd�fdd	�Zddd
�Zddd�Zddd�Z�ZS)�_TrackThreadz)A thread to periodically update progress.�progress�
'Progress'�task_id�'TaskID'�
update_period�floatcs2||_||_||_t�|_d|_t�jdd�dS)NrT)�daemon)r>r@rBr�done�	completed�super�__init__)�selfr>r@rB��	__class__��D/usr/local/lib/python3.10/dist-packages/pip/_vendor/rich/progress.pyrHCsz_TrackThread.__init__�return�NonecCs~|j}|jj}|j}d}|jj}||�s2|jjjr2|j}||kr)||||�|}||�s2|jjjs|jj	|j|jdd�dS)NrT)rF�refresh)
r@r>�advancerBrE�wait�live�
is_startedrF�update)rIr@rQrB�last_completedrRrFrLrLrM�runLs�z_TrackThread.run�'_TrackThread'cC�|��|S�N��start�rIrLrLrM�	__enter__Z�z_TrackThread.__enter__�exc_type�Optional[Type[BaseException]]�exc_val�Optional[BaseException]�exc_tb�Optional[TracebackType]cCs|j��|��dSrZ)rE�set�join�rIr`rbrdrLrLrM�__exit__^s
z_TrackThread.__exit__)r>r?r@rArBrC�rNrO)rNrX�r`rarbrcrdrerNrO)	�__name__�
__module__�__qualname__�__doc__rHrWr^ri�
__classcell__rLrLrJrMr=@s
	
r=�
Working...TF�
�bar.back�bar.complete�bar.finished�	bar.pulse皙�����?�sequence�Iterable[ProgressType]�description�str�total�Optional[float]rF�int�auto_refresh�bool�console�Optional[Console]�	transient�get_time�Optional[Callable[[], float]]�refresh_per_secondrC�styler5�complete_style�finished_style�pulse_stylerB�disable�
show_speedrNc	cs��|rtd�gng}|�t|	|
||d�t|d�tdd�f�t||||||p'd|d��}|�|j|||||
d�Ed	HWd	�d	S1sGwYd	S)
a�Track progress by iterating over a sequence.

    You can also track progress of an iterable, which might require that you additionally specify ``total``.

    Args:
        sequence (Iterable[ProgressType]): Values you wish to iterate over and track progress.
        description (str, optional): Description of task show next to progress bar. Defaults to "Working".
        total: (float, optional): Total number of steps. Default is len(sequence).
        completed (int, optional): Number of steps completed so far. Defaults to 0.
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
        disable (bool, optional): Disable display of progress.
        show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
    Returns:
        Iterable[ProgressType]: An iterable of the values in the sequence.

    �([progress.description]{task.description}�r�r�r�r�)r�T)�elapsed_when_finishedrr�rr�r�r�r�r�)r|rFrzrBN)�
TextColumn�extend�	BarColumn�TaskProgressColumn�TimeRemainingColumn�Progress�track)rxrzr|rFrr�r�r�r�r�r�r�r�rBr�r��columnsr>rLrLrMr�hs@�,�����
�"�r�c@seZdZdZ	dQdRd
d�ZdSdd�ZdTdd�ZdUdd�ZdVdd�Ze	dWdd ��Z
dXd"d#�ZdWd$d%�Ze	dYd'd(��Z
e	dYd)d*��ZdWd+d,�ZdWd-d.�ZdWd/d0�ZdZd[d3d4�Zd\d7d8�ZdZd[d9d:�ZdZd]d=d>�Zd^d?d@�Zd_d`dDdE�ZdXdFdG�ZdadJdK�ZdbdNdO�ZdPS)c�_Readerz9A reader that tracks progress while it's being read from.T�handlerr>r?�taskr:�close_handler�rNrOcCs"||_||_||_||_d|_dS�NF)r�r>r�r��_closed)rIr�r>r�r�rLrLrMrH�s

z_Reader.__init__�	'_Reader'cCs|j��|SrZ)r�r^r]rLrLrMr^�s
z_Reader.__enter__r`rarbrcrdrecC�|��dSrZ)�closerhrLrLrMri��z_Reader.__exit__cCs|SrZrLr]rLrLrM�__iter__��z_Reader.__iter__�bytescCs$t|j�}|jj|jt|�d�|S�N�rQ)�nextr�r>rQr��len)rI�linerLrLrM�__next__�s
z_Reader.__next__cC�|jSrZ)r�r]rLrLrM�closed�sz_Reader.closedr~cC�
|j��SrZ)r��filenor]rLrLrMr���
z_Reader.filenocCr�rZ)r��isattyr]rLrLrMr��r�z_Reader.isattyr{cC�|jjSrZ)r��moder]rLrLrMr���z_Reader.modecCr�rZ)r��namer]rLrLrMr��r�z_Reader.namecCr�rZ)r��readabler]rLrLrMr��r�z_Reader.readablecCr�rZ)r��seekabler]rLrLrMr��r�z_Reader.seekablecC�dSr�rLr]rLrLrM�writable�r�z_Reader.writable����sizecC�&|j�|�}|jj|jt|�d�|Sr�)r��readr>rQr�r�)rIr��blockrLrLrMr���z_Reader.read�b�"Union[bytearray, memoryview, mmap]cCs"|j�|�}|jj|j|d�|Sr�)r��readintor>rQr�)rIr��nrLrLrMr��sz_Reader.readintocCr�r�)r��readliner>rQr�r�)rIr�r�rLrLrMr��r�z_Reader.readline�hint�List[bytes]cCs,|j�|�}|jj|jttt|��d�|Sr�)r��	readlinesr>rQr��sum�mapr�)rIr��linesrLrLrMr�sz_Reader.readlinescCs|jr|j��d|_dS)NT)r�r�r�r�r]rLrLrMr�	s

z
_Reader.closer�offset�whencecCs$|j�||�}|jj|j|d�|S)N�rF)r��seekr>rUr�)rIr�r��posrLrLrMr�sz_Reader.seekcCr�rZ)r��tellr]rLrLrMr�r�z_Reader.tell�srcC�td��)N�write�r)rIr�rLrLrMr��z
_Reader.writer��
Iterable[Any]cCr�)N�
writelinesr�)rIr�rLrLrMr�r�z_Reader.writelinesN)T)
r�rr>r?r�r:r�r�rNrO)rNr�rk)rNr)rNr��rNr�)rNr~)rNr{)r�)r�r~rNr�)r�r�)r�r~rNr�rj)r)r�r~r�r~rNr~)r�rrNr~)r�r�rNrO)rlrmrnrorHr^rir�r��propertyr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rLrLrLrMr��s8�












r�c@s.eZdZdZddd	�Zdd
d�Zddd�ZdS)�_ReadContextzEA utility class to handle a context for both a reader and a progress.r>r?�readerr<rNrOcCs||_||_dSrZ)r>r�)rIr>r�rLrLrMrH s
z_ReadContext.__init__cCs|j��|j��SrZ)r>r\r�r^r]rLrLrMr^$s

z_ReadContext.__enter__r`rarbrcrdrecCs|j��|j�|||�dSrZ)r>�stopr�rirhrLrLrMri(s
z_ReadContext.__exit__N)r>r?r�r<rNrO)rNr<rk)rlrmrnrorHr^rirLrLrLrMr�s


r��
Reading...)rzrr�r�r�r�r�r�r�r�r��filer�ContextManager[BinaryIO]c	Csh|rtd�gng}
|
�t||	|
|d�t�t�f�t|
|||||p"d|d��}|j|||d�}t||�S)aRead bytes from a file while tracking progress.

    Args:
        file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        total (int): Total number of bytes to read.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    r�r�rrr�)r|rz)r�r�r��DownloadColumnr�r��	wrap_filer�)r�r|rzrr�r�r�r�r�r�r�r�r�r�r>r�rLrLrMr�2s0%�����

r�r�)r|rzrr�r�r�r�r�r�r�r�r��"Union[str, 'PathLike[str]', bytes]r��"Union[Literal['rt'], Literal['r']]�	buffering�encoding�
Optional[str]�errors�newline�
Optional[int]�ContextManager[TextIO]cC�dSrZrL�r�r�r�r�r�r�r|rzrr�r�r�r�r�r�r�r�r�rLrLrM�opens�r��
Literal['rb']cCr�rZrLr�rLrLrMr��r��r�1Union[Literal['rb'], Literal['rt'], Literal['r']]�7Union[ContextManager[BinaryIO], ContextManager[TextIO]]c
Csr|rtd�gng}|�t|
|||d�t�t�f�t|||	|
||p"d|d��}|j||||||||d�}t||�S)a�Read bytes from a file while tracking progress.

    Args:
        path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
        mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
        buffering (int): The buffering strategy to use, see :func:`io.open`.
        encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
        errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
        newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
        total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
        description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
        auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        console (Console, optional): Console to write to. Default creates internal Console instance.
        refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
        disable (bool, optional): Disable display of progress.
        encoding (str, optional): The encoding to use when reading in text mode.

    Returns:
        ContextManager[BinaryIO]: A context manager yielding a progress reader.

    r�r�rrr�)r�r�r�r�r�r|rz)r�r�r�r�r�r�r�r�)r�r�r�r�r�r�r|rzrr�r�r�r�r�r�r�r�r�r�r>r�rLrLrMr��sB1�����
�

c@sLeZdZUdZdZded<ddd	d
�Zddd
�Zddd�Ze	ddd��Z
dS)�ProgressColumnz3Base class for a widget to use in progress display.Nr}�max_refresh�table_column�Optional[Column]rNrOcCs||_i|_d|_dSrZ)�
_table_column�_renderable_cache�_update_time)rIr�rLrLrMrHs
zProgressColumn.__init__r6cCs|jpt�S)z.Get a table column, used to build tasks table.)r�r6r]rLrLrM�get_table_columnszProgressColumn.get_table_columnr��'Task'r/cCsp|��}|jdur)|js)z
|j|j\}}Wn	tyYn
w||j|kr)|S|�|�}||f|j|j<|S)aCalled by the Progress object to return a renderable for the given task.

        Args:
            task (Task): An object containing information regarding the task.

        Returns:
            RenderableType: Anything renderable (including str).
        N)r�r�rFr��id�KeyError�render)rIr��current_time�	timestamp�
renderablerLrLrM�__call__	s	�
zProgressColumn.__call__cCr�)z"Should return a renderable object.NrL�rIr�rLrLrMr� szProgressColumn.renderrZ)r�r�rNrO)rNr6�r�r�rNr/)rlrmrnror��__annotations__rHr�rrr�rLrLrLrMr��s


r�cs6eZdZdZ	ddd�d�fd	d
�Zddd�Z�ZS)�RenderableColumnz�A column to insert an arbitrary column.

    Args:
        renderable (RenderableType, optional): Any renderable. Defaults to empty string.
    �N�r�rr/r�r�c�||_t�j|d�dS�Nr)rrGrH)rIrr�rJrLrMrH,�zRenderableColumn.__init__r�r�rNcCr�rZ)rrrLrLrMr�2szRenderableColumn.render)r)rr/r�r�r�rlrmrnrorHr�rprLrLrJrMr%s��rcsHeZdZdZ					dd�fdd�
Z		dd dd�Zd!dd�Z�ZS)"�
SpinnerColumna�A column with a 'spinner' animation.

    Args:
        spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
        style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
        speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
    �dots�progress.spinner��?� N�spinner_namer{r��Optional[StyleType]�speedrC�
finished_textr9r�r�cs<t|||d�|_t|t�rt�|�n||_t�j|d�dS)N�r�rr)	r4�spinner�
isinstancer{r8�from_markuprrGrH)rIrr�rrr�rJrLrMrH@s��zSpinnerColumn.__init__�
spinner_stylerNrOcCst|||d�|_dS)a-Set a new spinner.

        Args:
            spinner_name (str): Spinner name, see python -m rich.spinner.
            spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
            speed (float, optional): Speed factor of spinner. Defaults to 1.0.
        rN)r4r)rIrrrrLrLrM�set_spinnerPs
zSpinnerColumn.set_spinnerr�r�r/cCs$|jr|j}|S|j�|���}|SrZ)�finishedrrr�r�)rIr��textrLrLrMr�_s����zSpinnerColumn.render)rrrrN)
rr{r�rrrCrr9r�r�)rr)rr{rrrrCrNrOr)rlrmrnrorHrr�rprLrLrJrMr
6s��r
cs8eZdZdZ					dd�fdd�
Zddd�Z�ZS)r�zA column containing text.�none�leftTN�text_formatr{r�r5�justifyr.�markupr��highlighter�Optional[Highlighter]r�r�rNrOcs:||_||_||_||_||_t�j|ptdd�d�dS)NT��no_wrapr)r r!r�r"r#rGrHr6)rIr r�r!r"r#r�rJrLrMrHks	zTextColumn.__init__r�r�r8cCsR|jj|d�}|jrtj||j|jd�}n	t||j|jd�}|jr'|j�|�|S�N�r�)r�r!)	r �formatr"r8rr�r!r#�	highlight)rIr��_textrrLrLrMr�{szTextColumn.render)rrTNN)r r{r�r5r!r.r"r�r#r$r�r�rNrO�r�r�rNr8rrLrLrJrMr�hs�r�cs:eZdZdZ						dd�fdd�
Zddd�Z�ZS)r�aRenders a visual progress bar.

    Args:
        bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
        style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
        complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
        finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
        pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    �(rsrtrurvN�	bar_widthr�r�r5r�r�r�r�r�rNrOcs0||_||_||_||_||_t�j|d�dSr
)r.r�r�r�r�rGrH)rIr.r�r�r�r�r�rJrLrMrH�s	zBarColumn.__init__r�r�r3cCs^t|jdurtd|j�ndtd|j�|jdurdntd|j�|j|��|j|j|j	|j
d�	S)z&Gets a progress bar widget for a task.Nrr))	r|rF�width�pulse�animation_timer�r�r�r�)r3r|�maxrFr.�startedr�r�r�r�r�rrLrLrMr��s
�zBarColumn.render)r-rsrtrurvN)r.r�r�r5r�r5r�r5r�r5r�r�rNrO)r�r�rNr3rrLrLrJrMr��s�r�c@�eZdZdZd	dd�ZdS)
�TimeElapsedColumnzRenders time elapsed.r�r�rNr8cCsJ|jr|jn|j}|durtddd�Sttdt|��d�}tt|�dd�S)zShow time elapsed.N�-:--:--�progress.elapsed�r�r)�seconds)r�
finished_time�elapsedr8r	r2r~r{)rIr�r;�deltarLrLrMr��s
zTimeElapsedColumn.renderNr,�rlrmrnror�rLrLrLrMr5��r5csLeZdZdZ								d$d%�fdd�
Zed&dd��Zd'd"d#�Z�ZS)(r�aShow task progress as a percentage.

    Args:
        text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
        text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
        style (StyleType, optional): Style of output. Defaults to "none".
        justify (JustifyMethod, optional): Text justification. Defaults to "left".
        markup (bool, optional): Enable markup. Defaults to True.
        highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
        table_column (Optional[Column], optional): Table Column to use. Defaults to None.
        show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
    �-[progress.percentage]{task.percentage:>3.0f}%rrrTNFr r{�text_format_no_percentager�r5r!r.r"r�r#r$r�r�r�rNrOc		s(||_||_t�j||||||d�dS)N)r r�r!r"r#r�)r@r�rGrH)	rIr r@r�r!r"r#r�r�rJrLrMrH�s
�zTaskProgressColumn.__init__rr}r8cCsN|dur
tddd�St�t|�gd�d�\}}||}t|d�|�d�dd�S)	z�Render the speed in iterations per second.

        Args:
            task (Task): A Task object.

        Returns:
            Text: Text object containing the task speed.
        Nrzprogress.percentager8)ru×10³u×10⁶u×10⁹u×10¹²��z.1fz it/s)r8r*�pick_unit_and_suffixr~)�clsr�unit�suffix�
data_speedrLrLrM�render_speed�s
�zTaskProgressColumn.render_speedr�r�cCs�|jdur|jr|�|jp|j�S|jdur|jn|j}|j|d�}|jr0t	j
||j|jd�}n	t	||j|jd�}|j
rB|j
�|�|Sr')r|r�rG�finished_speedrr@r r)r"r8rr�r!r#r*)rIr�r r+rrLrLrMr��s�zTaskProgressColumn.render)r?rrrTNNF)r r{r@r{r�r5r!r.r"r�r#r$r�r�r�r�rNrO)rr}rNr8r,)	rlrmrnrorH�classmethodrGr�rprLrLrJrMr��s�r�cs8eZdZdZdZ			dd�fd
d�
Zddd�Z�ZS)r�aRenders estimated time remaining.

    Args:
        compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
        elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
    ��?FN�compactr�r�r�r�cs||_||_t�j|d�dSr
)rKr�rGrH)rIrKr�r�rJrLrMrHszTimeRemainingColumn.__init__r�r�rNr8cCs�|jr|jr|j}d}n|j}d}|jdurtd|d�S|dur.t|jr)d|d�Sd|d�Stt|�d�\}}t|d�\}}|jrM|sM|d	�d
|d	��}n
|d�d
|d	�d
|d	��}t||d�S)zShow time remaining.r7zprogress.remainingNrr8z--:--r6�<�02d�:�d)	r�rr:�time_remainingr|r8rK�divmodr~)rIr��	task_timer��minutesr9�hours�	formattedrLrLrMr�s

zTimeRemainingColumn.render)FFN)rKr�r�r�r�r�r,)rlrmrnror�rHr�rprLrLrJrMr�s�
r�c@r4)
�FileSizeColumnzRenders completed filesize.r�r�rNr8cCst�t|j��}t|dd�S)�Show data completed.zprogress.filesizer8)r*�decimalr~rFr8�rIr��	data_sizerLrLrMr�7szFileSizeColumn.renderNr,r=rLrLrLrMrV4r>rVc@r4)
�TotalFileSizeColumnzRenders total filesize.r�r�rNr8cCs*|jdur
t�t|j��nd}t|dd�S)rWNrzprogress.filesize.totalr8)r|r*rXr~r8rYrLrLrMr�@szTotalFileSizeColumn.renderNr,r=rLrLrLrMr[=r>r[cs.eZdZdZdd�fdd	�
Zddd�Z�ZS)�MofNCompleteColumnaHRenders completed count/total, e.g. '  10/1000'.

    Best for bounded tasks with int quantities.

    Space pads the completed count so that progress length does not change as task progresses
    past powers of 10.

    Args:
        separator (str, optional): Text to separate completed and total values. Defaults to "/".
    �/N�	separatorr{r�r�cr	r
)r^rGrH)rIr^r�rJrLrMrHRszMofNCompleteColumn.__init__r�r�rNr8cCsPt|j�}|jdurt|j�nd}tt|��}t||�d��|j�|��dd�S)zShow completed/total.N�?rO�progress.downloadr8)r~rFr|r�r{r8r^)rIr�rFr|�total_widthrLrLrMr�Vs
�zMofNCompleteColumn.render)r]N)r^r{r�r�r,rrLrLrJrMr\Fsr\cs0eZdZdZ	dd�fd
d�
Zddd�Z�ZS)r�z�Renders file size downloaded and total, e.g. '0.5/2.3 GB'.

    Args:
        binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
    FN�binary_unitsr�r�r�rNrOcr	r
)rbrGrH)rIrbr�rJrLrMrHhrzDownloadColumn.__init__r�r�r8cCs�t|j�}|jdurt|j�n|}|jr t�|gd�d�\}}nt�|gd�d�\}}|dkr1dnd}||}|d|�d	��}|jdurVt|j�}	|	|}
|
d|�d	��}nd
}|�d|�d|��}t|d
d�}
|
S)z.Calculate common unit for completed and total.N)	r��KiB�MiB�GiB�TiB�PiB�EiB�ZiB�YiBi)	r��kB�MB�GB�TB�PB�EB�ZB�YBrAr)rz,.�fr_r]rr`r8)r~rFr|rbr*rBr8)rIr�rF� unit_and_suffix_calculation_baserDrE�	precision�completed_ratio�
completed_strr|�total_ratio�	total_str�download_status�
download_textrLrLrMr�ns2
�
��

zDownloadColumn.render)FN)rbr�r�r�rNrOr,rrLrLrJrMr�as
�r�c@r4)
�TransferSpeedColumnz&Renders human readable transfer speed.r�r�rNr8cCs@|jp|j}|durtddd�St�t|��}t|�d�dd�S)zShow data transfer speed.Nr_zprogress.data.speedr8z/s)rHrr8r*rXr~)rIr�rrFrLrLrMr��s
zTransferSpeedColumn.renderNr,r=rLrLrLrMr|�r>r|c@s$eZdZUdZded<	ded<dS)�ProgressSamplez$Sample of progress for a given time.rCrrFN)rlrmrnrorrLrLrLrMr}�s
r}c@sXeZdZUdZded<	ded<	ded<	ded	<	d
ed<	dZded
<	dZded<	eed�Z	ded<	edddd�Z
ded<	edddd�Zded<	dZded<	edd�ddd�Z
ded<eded�Zded <	d5d"d#�Zed6d$d%��Zed7d&d'��Zed7d(d)��Zed6d*d+��Zed5d,d-��Zed7d.d/��Zed7d0d1��Zd8d3d4�ZdS)9�Taskz�Information regarding a progress task.

    This object should be considered read-only outside of the :class:`~Progress` class.

    r:r�r{rzr}r|rCrF�GetTimeCallable�	_get_timeNr:Tr��visible)�default_factoryzDict[str, Any]�fieldsF)�default�init�repr�
start_time�	stop_timerHcCs
tdd�S)NrA)�maxlenrrLrLrLrM�<lambda>�s
z
Task.<lambda>)r�r�r�zDeque[ProgressSample]�	_progress)r�r�r�_lockrNcCs|��S)z(float: Get the current time, in seconds.)r�r]rLrLrMr��r�z
Task.get_timecC�
|jduS)z#bool: Check if the task as started.N)r�r]rLrLrMr3��
zTask.startedcCs|jdurdS|j|jS)zPOptional[float]: Get the number of steps remaining, if a non-None total was set.N�r|rFr]rLrLrM�	remaining�s
zTask.remainingcCs2|jdurdS|jdur|j|jS|��|jS)z]Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.N)r�r�r�r]rLrLrMr;�s


zTask.elapsedcCr�)zCheck if the task has finished.N)r:r]rLrLrMr�r�z
Task.finishedcCs.|jsdS|j|jd}tdtd|��}|S)zOfloat: Get progress of task as a percentage. If a None total was set, returns 0��Y@)r|rF�minr2)rIrFrLrLrM�
percentage�s
zTask.percentagecCs�|jdurdS|j�D|j}|s	Wd�dS|dj|dj}|dkr0	Wd�dSt|�}t|�tdd�|D��}||}|Wd�S1sQwYdS)z=Optional[float]: Get the estimated speed in steps per second.Nr�rcs��|]}|jVqdSrZr�)�.0�samplerLrLrM�	<genexpr>��zTask.speed.<locals>.<genexpr>)r�r�r�r�iterr�r�)rIr>�
total_time�
iter_progress�total_completedrrLrLrMr�s"
��$�z
Task.speedcCs:|jrdS|j}|sdS|j}|durdSt||�}|S)zJOptional[float]: Get estimated time to completion, or ``None`` if no data.r�N)rrr�r)rIrr��estimaterLrLrMrPszTask.time_remainingrOcCs|j��d|_d|_dS)zReset progress.N)r��clearr:rHr]rLrLrM�_resets

zTask._reset)rNrCr�)rNr}rj)rlrmrnrorr:r�r�dictr�r�r�rHr�rr�r�r�r3r�r;rr�rrPr�rLrLrLrMr~�sZ

�

r~c@s�eZdZdZddddddddddd�
d�dd�Zed�dd��Zed�d d!��Zed�d#d$��Z	ed�d&d'��Z
ed�d(d)��Zd�d*d+�Zd�d,d-�Z
d�d/d0�Zd�d7d8�Z		9		:	;d�d�dGdH�Z	d�ddIdJ�d�dNdO�Zej	P			d�dddIdQ�d�dZd[��Zej	P			d�dddIdQ�d�d^d[��Z	_	P			d�dddIdQ�d�dbd[�Zd�ddde�Zd�dfdg�Zdddddddh�d�dodp�Zddd9dddq�d�dsdt�Zd�d�dvdw�Zd�dxdy�Zd�d{d|�Zd�d~d�Zd�d�d��Zd�d�d��Z		�	9	d�d�d�d��Zd�d�d��Z dS)�r�a�Renders an auto-updating progress bar(s).

    Args:
        console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout.
        auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
        refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
        speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
        transient: (bool, optional): Clear the progress on exit. Defaults to False.
        redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
        redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
        get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
        disable (bool, optional): Disable progress display. Defaults to False
        expand (bool, optional): Expand tasks table to fit width. Defaults to False.
    NTrrg>@F)
r�rr��speed_estimate_periodr��redirect_stdout�redirect_stderrr�r��expandr��Union[str, ProgressColumn]r�r�rr�r�rCr�r�r�r�r��Optional[GetTimeCallable]r�r�rNrOc
	Gs�|dksJd��t�|_|p|��|_||_|	|_|
|_i|_td�|_	t
|p)t�||||||jd�|_
|p9|jj|_|jj|_|jj|_dS)Nrzrefresh_per_second must be > 0)r�rr�r�r�r��get_renderable)rr��get_default_columnsr�r�r�r��_tasksr:�_task_indexr2r+r�rSr�r��print�log)rIr�rr�r�r�r�r�r�r�r�r�rLrLrMrH5s(
�	
zProgress.__init__�Tuple[ProgressColumn, ...]cCstd�t�t�t�fS)a�Get the default columns used for a new Progress instance:
           - a text column for the description (TextColumn)
           - the bar itself (BarColumn)
           - a text column showing completion percentage (TextColumn)
           - an estimated-time-remaining column (TimeRemainingColumn)
        If the Progress instance is created without passing a columns argument,
        the default columns defined here will be used.

        You can also create a Progress instance using custom columns before
        and/or after the defaults, as in this example:

            progress = Progress(
                SpinnerColumn(),
                *Progress.get_default_columns(),
                "Elapsed:",
                TimeElapsedColumn(),
            )

        This code shows the creation of a Progress display, containing
        a spinner to the left, the default columns, and a labeled elapsed
        time column.
        r�)r�r�r�r�)rCrLrLrMr�Ys
�zProgress.get_default_columnsr,cCr�rZ)rSr�r]rLrLrMr�xr�zProgress.console�
List[Task]cC�8|j�t|j���Wd�S1swYdS)zGet a list of Task instances.N)r��listr��valuesr]rLrLrM�tasks|�$�zProgress.tasks�List[TaskID]cCr�)zA list of task IDs.N)r�r�r��keysr]rLrLrM�task_ids�r�zProgress.task_idscCsZ|j� |js	Wd�dStdd�|j��D��Wd�S1s&wYdS)z'Check if all tasks have been completed.NTcsr�rZ)r)r�r�rLrLrMr��r�z$Progress.finished.<locals>.<genexpr>)r�r��allr�r]rLrLrMr�s�$�zProgress.finishedcCs|js|jjdd�dSdS)zStart the progress display.T)rPN)r�rSr\r]rLrLrMr\�s�zProgress.startcCs0|j��|jjs|jjs|j��dSdSdS)zStop the progress display.N)rSr�r��is_interactive�
is_jupyterr�r]rLrLrMr��s
�z
Progress.stopr(cCrYrZr[r]rLrLrMr^�r_zProgress.__enter__r`rarbrcrdrecCr�rZ)r�rhrLrLrMri�r�zProgress.__exit__rrqrwrxryr|r}rFr~r@�Optional[TaskID]rzr{rBccs��|dur
tt|��pd}|dur|j|||d�}n|j|||d�|jjrNt|||��}|D]}|V|jd7_q/Wd�dS1sGwYdS|j}	|j	}
|D]
}|V|	|d�|
�qVdS)aCTrack progress by iterating over a sequence.

        You can also track progress of an iterable, which might require that you additionally specify ``total``.

        Args:
            sequence (Iterable[ProgressType]): Values you want to iterate over and track progress.
            total: (float, optional): Total number of steps. Default is len(sequence).
            completed (int, optional): Number of steps completed so far. Defaults to 0.
            task_id: (TaskID): Task to track. Default is new task.
            description: (str, optional): Description of task, if new task is created.
            update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.

        Returns:
            Iterable[ProgressType]: An iterable of values taken from the provided sequence.
        Nr�r))
rCr�add_taskrUrSrr=rFrQrP)rIrxr|rFr@rzrB�track_thread�valuerQrPrLrLrMr��s(��"�
�zProgress.trackr�)r@rzr�rr�cCs�d}|dur	|}n|dur&|j�|j|j}Wd�n1s!wY|dur.td��|dur:|j||d�}n|j||d�t|||dd�S)ajTrack progress file reading from a binary file.

        Args:
            file (BinaryIO): A file-like object opened in binary mode.
            total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When no total value can be extracted from the arguments or the task.
        Nz?unable to get the total number of bytes, please specify 'total'�r|F�r�)r�r�r|�
ValueErrorr�rUr�)rIr�r|r@rz�total_bytesrLrLrMr��s��zProgress.wrap_filer�)r|r@rzr�r�r�r�r�r�r�r�c
Cr�rZrL�
rIr�r�r�r�r�r�r|r@rzrLrLrMr���z
Progress.open�"Union[Literal['r'], Literal['rt']]r#c
Cr�rZrLr�rLrLrMr�r�r�r��Union[BinaryIO, TextIO]cCs�d�t|dd��}
|
dvrtd|����|dk}|
dkr)|dkr)t�dt�d	}n|
d
vr;|dkr5td��|dkr;d	}|d
urDt|�j}|d
urP|j|	|d�}n|j	||d�t
j|d|d�}t|||dd�}
|dvrut
j
|
||||d�S|
S)a#Track progress while reading from a binary file.

        Args:
            path (Union[str, PathLike[str]]): The path to the file to read.
            mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
            buffering (int): The buffering strategy to use, see :func:`io.open`.
            encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
            errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
            newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
            total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
            task_id (TaskID): Task to track. Default is new task.
            description (str, optional): Description of task, if new task is created.

        Returns:
            BinaryIO: A readable file-like object in binary mode.

        Raises:
            ValueError: When an invalid mode is given.
        rF)�reverse)�br�rtr�z
invalid mode r)r�zaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedr�)r�r�rzcan't have unbuffered text I/ONr��rb)r�Tr�)r�r�)r�r�r��line_buffering)rg�sortedr��warnings�warn�RuntimeWarningr�st_sizer�rU�ior�r��
TextIOWrapper)rIr�r�r�r�r�r�r|r@rz�_moder�r�r�rLrLrMr�s>!�
�r:cCsZ|j� |j|}|jdur|��|_Wd�dSWd�dS1s&wYdS)z�Start a task.

        Starts a task (used when calculating elapsed time). You may need to call this manually,
        if you called ``add_task`` with ``start=False``.

        Args:
            task_id (TaskID): ID of task.
        N)r�r�r�r�)rIr@r�rLrLrM�
start_taskks	

�"�zProgress.start_taskcCsT|j�|j|}|��}|jdur||_||_Wd�dS1s#wYdS)z�Stop a task.

        This will freeze the elapsed time on the task.

        Args:
            task_id (TaskID): ID of task.
        N)r�r�r�r�r�)rIr@r�r�rLrLrM�	stop_taskys

"�zProgress.stop_task)r|rFrQrzr�rPrQr��Optional[bool]rPr�rcKsH|j��|j|}	|	j}
|dur||	jkr||	_|	��|dur'|	j|7_|dur.||	_|dur5||	_|dur<||	_|	j�|�|	j|
}|�	�}||j
}
|	j}|j}|rk|dj
|
krk|�|rk|dj
|
ks_|dkrw|�t||��|	jdur�|	j|	jkr�|	jdur�|	j|	_Wd�n1s�wY|r�|��dSdS)a�Update information associated with a task.

        Args:
            task_id (TaskID): Task id (returned by add_task).
            total (float, optional): Updates task.total if not None.
            completed (float, optional): Updates task.completed if not None.
            advance (float, optional): Add a value to task.completed if not None.
            description (str, optional): Change task description if not None.
            visible (bool, optional): Set visible flag if not None.
            refresh (bool): Force a refresh of progress information. Default is False.
            **fields (Any): Additional data fields required for rendering.
        Nr)r�r�rFr|r�rzr�r�rUr�r�r��popleftr�appendr}r:r;rP)rIr@r|rFrQrzr�rPr�r��completed_start�update_completedr��old_sample_timer�r�rLrLrMrU�sD


�

��"�zProgress.update)r\r|rFr�rzr\c
Ks�|��}|j�8|j|}	|	��|r|nd|	_|dur||	_||	_|dur)||	_|r.||	_|dur5||	_	d|	_
Wd�n1sBwY|��dS)a�Reset a task so completed is 0 and the clock is reset.

        Args:
            task_id (TaskID): ID of task.
            start (bool, optional): Start the task after reset. Defaults to True.
            total (float, optional): New total steps in task, or None to use current total. Defaults to None.
            completed (int, optional): Number of steps completed. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            description (str, optional): Change task description if not None. Defaults to None.
            **fields (str): Additional data fields required for rendering.
        N)r�r�r�r�r�r|rFr�r�rzr:rP)
rIr@r\r|rFr�rzr�r�r�rLrLrM�reset�s"
�zProgress.resetr)c
Cs*|��}|j��|j|}|j}|j|7_|j|}||j}|j}|j}	|r<|dj|kr<|	�|r<|dj|ks0t|�dkrK|	�t|�dksB|�	t
||��|jdurs|j|jkr{|jdur�|j
|_|j|_Wd�dSWd�dSWd�dSWd�dS1s�wYdS)z�Advance task by a number of steps.

        Args:
            task_id (TaskID): ID of task.
            advance (float): Number of steps to advance. Default is 1.
        rrAN)r�r�r�rFr�r�r�rr�r�r}r|r:r;rrH)
rIr@rQr�r�r�r�r�r�r�rLrLrMrQ�s8


��


���"�zProgress.advancecCs$|js|jjr|j��dSdSdS)z*Refresh (render) the progress information.N)r�rSrTrPr]rLrLrMrP
s�zProgress.refreshr/cCst|���}|S)z*Get a renderable for the progress display.)r-�get_renderables)rIrrLrLrMr�szProgress.get_renderable�Iterable[RenderableType]ccs�|�|j�}|VdS)z5Get a number of renderables for the progress display.N)�make_tasks_tabler�)rI�tablerLrLrMr�s�
zProgress.get_renderablesr��Iterable[Task]r7csRdd�|jD�}tj|d|jd��}|D]��jr&|j�fdd�|jD��q|S)z�Get a table to render the Progress display.

        Args:
            tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.

        Returns:
            Table: A table instance.
        css0�|]}t|t�rtdd�n|����VqdS)Tr%N)rr{r6r��copy)r��_columnrLrLrMr�"s���

�z,Progress.make_tasks_table.<locals>.<genexpr>)rr))�paddingr�c3s.�|]}t|t�r|j�d�n|��VqdS)r(N)rr{r))r��columnr(rLrMr�/s���
�)r�r7�gridr�r��add_row)rIr��
table_columnsr�rLr(rMr�s	�
���
zProgress.make_tasks_tablecCs2|j�|��Wd�S1swYdS)z+Makes the Progress class itself renderable.N)r�r�r]rLrLrM�__rich__:s$�zProgress.__rich__r�c	Ks�|j�2t|j||||||j|jd�}||j|j<|r!|�|j�|j}tt|j�d�|_Wd�n1s8wY|��|S)aAdd a new 'task' to the Progress display.

        Args:
            description (str): A description of the task.
            start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
                you will need to call `start` manually. Defaults to True.
            total (float, optional): Number of total steps in the progress if known.
                Set to None to render a pulsing animation. Defaults to 100.
            completed (int, optional): Number of steps completed so far. Defaults to 0.
            visible (bool, optional): Enable display of the task. Defaults to True.
            **fields (str): Additional data fields required for rendering.

        Returns:
            TaskID: An ID you can use when calling `update`.
        )r�r�r�r�r)N)	r�r~r�r�r�r�r:r~rP)	rIrzr\r|rFr�r�r��new_task_indexrLrLrMr�?s&�
�zProgress.add_taskcCs4|j�
|j|=Wd�dS1swYdS)z]Delete a task if it exists.

        Args:
            task_id (TaskID): A task ID.

        N)r�r�)rIr@rLrLrM�remove_taskjs
"�zProgress.remove_task)r�r�r�r�rr�r�rCr�rCr�r�r�r�r�r�r�r�r�r�r�r�rNrO)rNr�)rNr,)rNr�)rNr�r�rj)rNr(rk)NrNrqrw)rxryr|r}rFr~r@r�rzr{rBrCrNryrZ)
r�rr|r�r@r�rzr{rNr�r�NNN)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr#�r�r�NNN)r�r�r�r�r�r~r�r�r�r�r�r�r|r�r@r�rzr{rNr�)r@r:rNrO)r@r:r|r}rFr}rQr}rzr�r�r�rPr�r�rrNrO)r@r:r\r�r|r}rFr~r�r�rzr�r�rrNrO)r))r@r:rQrCrNrO)rNr/)rNr�)r�r�rNr7)Tr�rT)rzr{r\r�r|r}rFr~r�r�r�rrNr:)!rlrmrnrorHrIr�r�r�r�r�rr\r�r^rir�r��typing�overloadr�r�r�rUr�rQrPr�r�r�r�r�r�rLrLrLrMr�%s��$



�0��*�	��	��	�
M
�A�'




!�+r��__main__)�Panel)�Rule)�Syntax)r7a~def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_value�python)�line_numbers�foo�bar�baz�1�2�3z:Text may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...�examplezPretty printed)�typerz	Syntax...zGive it a try!)�cycle)�record)r�r�z[red]DownloadingrAr�z[green]Processingz[yellow]ThinkingrJr�g333333�?g{�G�z�?�d)rqNrTNFNrrrsrtrurvrwFT)"rxryrzr{r|r}rFr~rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5rBrCr�r�r�r�rNry)r�rr|r~rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�r�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�r�)&r�r�r�r�r�r~r�r�r�r�r�r�r|r�rzr{rr�r�r�r�r�r�r�r�rCr�r5r�r5r�r5r�r5r�r�rNr�)��
__future__rr�r�r��abcrr�collectionsr�dataclassesrr�datetimer	r
r�mathrr
�operatorr�osrr�	threadingrrr�typesrrrrrrrrrrrrr r!r"r#r$r%r&r'�typing_extensionsr(rr*r+r�r,r-r.r/r#r0�jupyterr1rSr2�progress_barr3rr4r�r5r�r6r7rr8r9r~r:r;rCrr<r=r�r�r�r�r�r�r�rr
r�r�r5r�r�rVr[r\r�r|r}r~r�rl�random�time�panelr��ruler��syntaxr�r��progress_renderables�	itertoolsr��examplesr�r>r��task1�task2�task3rrU�sleep�randintr�r�rLrLrLrM�<module>s�T
*�Ng�A������V*2*H0		1	}
T��
����

��$��