o
    MfI                     @   s:  d dl mZ d dlmZmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ G d	d
 d
e	Zedkrd dlmZ ddlmZ e Zed>Zed ed ed ed ed ejddd ed ed ed ejdddd ed W d   n1 sw   Y  ed dS dS )    )TracebackType)OptionalType   )ConsoleRenderableType)JupyterMixin)Live)Spinner)	StyleTypec                   @   s   e Zd ZdZddddddded	ee d
edede	de	fddZ
edefddZed&ddZ	d'dddddee d
ee dee dee	 ddf
ddZd(ddZd(ddZdefddZd)dd Zd!eee  d"ee d#ee ddfd$d%ZdS )*Statusa  Displays a status indicator with a 'spinner' animation.

    Args:
        status (RenderableType): A status renderable (str or Text typically).
        console (Console, optional): Console instance to use, or None for global console. Defaults to None.
        spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
        spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
        speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
        refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.
    Ndotszstatus.spinnerg      ?g      )@)consolespinnerspinner_stylespeedrefresh_per_secondstatusr   r   r   r   r   c                C   s<   || _ || _|| _t||||d| _t| j||dd| _d S )Ntextstyler   T)r   r   	transient)r   r   r   r
   _spinnerr	   
renderable_live)selfr   r   r   r   r   r    r   Y/var/www/html/analyze/labelStudio/lib/python3.10/site-packages/pip/_vendor/rich/status.py__init__   s   
zStatus.__init__returnc                 C      | j S N)r   r   r   r   r   r   ,   s   zStatus.renderabler   c                 C   s   | j jS )z+Get the Console used by the Status objects.)r   r   r"   r   r   r   r   0   s   zStatus.console)r   r   r   c                C   s|   |dur|| _ |dur|| _|dur|| _|dur0t|| j | j| jd| _| jj| jdd dS | jj| j | j| jd dS )a  Update status.

        Args:
            status (Optional[RenderableType], optional): New status renderable or None for no change. Defaults to None.
            spinner (Optional[str], optional): New spinner or None for no change. Defaults to None.
            spinner_style (Optional[StyleType], optional): New spinner style or None for no change. Defaults to None.
            speed (Optional[float], optional): Speed factor for spinner animation or None for no change. Defaults to None.
        Nr   T)refresh)r   r   r   r
   r   r   updater   )r   r   r   r   r   r   r   r   r$   5   s   
zStatus.updatec                 C      | j   dS )zStart the status animation.N)r   startr"   r   r   r   r&   U      zStatus.startc                 C   r%   )zStop the spinner animation.N)r   stopr"   r   r   r   r(   Y   r'   zStatus.stopc                 C   r    r!   )r   r"   r   r   r   __rich__]   s   zStatus.__rich__c                 C   s   |    | S r!   )r&   r"   r   r   r   	__enter__`   s   zStatus.__enter__exc_typeexc_valexc_tbc                 C   s   |    d S r!   )r(   )r   r+   r,   r-   r   r   r   __exit__d   s   zStatus.__exit__)r   r   r!   )r   N)r   r   )__name__
__module____qualname____doc__r   r   r   strr   floatr   propertyr
   r   r   r$   r&   r(   r)   r*   r   BaseExceptionr   r.   r   r   r   r   r      sj    


 


r   __main__)sleep)r   z"[magenta]Covid detector booting up   zImporting advanced AIzAdvanced Covid AI Readyz[bold blue] Scanning for Covidearth)r   r   z*Found 10,000,000,000 copies of Covid32.exez%[bold red]Moving Covid32.exe to TrashbouncingBallyellow)r   r   r      Nz&[bold green]Covid deleted successfully)typesr   typingr   r   r   r   r   jupyterr   liver	   r   r
   r   r   r   r/   timer8   r   logr$   printr   r   r   r   <module>   s>    b



