Ë
    Eêñi$  ã                  óÌ   — U d dl mZ d dlZd dlZd dlmZmZmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ d dlmZmZ d d	lmZ erd d
lmZ d dlmZ d dlmZ dZded<    G d„ d«      Zy)é    )ÚannotationsN)ÚTYPE_CHECKINGÚFinalÚcast)Úcreate_layout_config)ÚNoSessionContext)ÚElement)ÚSpinner)Úadd_script_run_ctxÚenqueue_message)Ú
clean_text)ÚIterator)ÚDeltaGenerator)ÚWidthg      à?r   Ú
DELAY_SECSc                  ód   — e Zd Zej                  	 dddddœ	 	 	 	 	 	 	 	 	 dd„«       Zed	d„«       Zy)
ÚSpinnerMixinFÚcontent)Ú	show_timeÚ_cacheÚwidthc             #  óØ  ‡‡‡K  — t        |d¬«      }t        «       }t        |«      |_        ||_        ||_        t        «       }|j                  j                  |«       	 | j                  j                  ||¬«      \  Š}dŠt        j                  «       Šd}		 dˆˆˆfd„}
t        j                  t        |
«      }	t!        |	«       |	j#                  «        d–— |	r|	j%                  «        ‰5  dŠt'         |«       «       ddd«       y# t        $ r d–— Y yw xY w# 1 sw Y   yxY w# |	r|	j%                  «        ‰5  dŠt'         |«       «       ddd«       w # 1 sw Y   w xY wxY w­w)aÍ  Display a loading spinner while executing a block of code.

        Parameters
        ----------
        text : str
            The text to display next to the spinner. This defaults to
            ``"In progress..."``.

            The text can optionally contain GitHub-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.

            See the ``body`` parameter of |st.markdown|_ for additional, supported
            Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        show_time : bool
            Whether to show the elapsed time next to the spinner text. If this is
            ``False`` (default), no time is displayed. If this is ``True``,
            elapsed time is displayed with a precision of 0.1 seconds. The time
            format is not configurable.

        width : "content", "stretch", or int
            The width of the spinner element. This can be one of the following:

            - ``"content"`` (default): The width of the element matches the
              width of its content, but doesn't exceed the width of the parent
              container.
            - ``"stretch"``: The width of the element matches the width of the
              parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        Examples
        --------
        >>> import streamlit as st
        >>> import time
        >>>
        >>> with st.spinner("Wait for it...", show_time=True):
        >>>     time.sleep(5)
        >>> st.success("Done!")
        >>> st.button("Rerun")

        .. output::
            https://doc-spinner.streamlit.app/
            height: 210px

        T)r   Úallow_content_width)Úlayout_configNc                 óX   •— ‰5  ‰rt         ‰ «       «       d d d «       y # 1 sw Y   y xY w)N)r   )Úcreate_transientÚdisplay_messageÚdisplay_message_locks   €€€ú\/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/streamlit/elements/spinner.pyÚset_messagez)SpinnerMixin.spinner.<locals>.set_message~   s*   ø€ Ø)ñ <Ù&ä'Ñ(8Ó(:Ô;÷<÷ <ñ <ús   „  )F)ÚreturnÚNone)r   ÚSpinnerProtor   ÚtextÚcacher   ÚElementProtoÚspinnerÚCopyFromÚdgÚ
_transientr   Ú	threadingÚLockÚTimerr   r   ÚstartÚcancelr   )Úselfr$   r   r   r   r   Úspinner_protoÚelement_protoÚclear_transientÚtimerr    r   r   r   s              @@@r   r'   zSpinnerMixin.spinner(   sN  úè ø€ ôx -°5ÈdÔSˆä$›ˆÜ'¨Ó-ˆÔØ$ˆÔØ"+ˆÔÜ$›ˆØ×Ñ×&Ñ& }Ô5ð	Ø04·±×0BÑ0BØØ+ð 1Có 1Ñ-Ð˜oð ˆÜ(Ÿ~™~Ó/ÐØ(,ˆð	3÷<ô —O‘O¤J°Ó<ˆEÜ˜uÔ%Ø�K‰KŒMãáØ—‘”Ø%ñ 3Ø"'�ä¡Ó 1Ô2÷3ð 3øô1  ò 	ãÙð	ú÷03ð 3ûñ Ø—‘”Ø%ñ 3Ø"'�ä¡Ó 1Ô2÷3÷ 3ñ 3ÿss   …AE*Á! D ÂE*ÂAD* ÃE*Ã/DÄ	E*ÄDÄE*ÄDÄE*ÄD'Ä#E*Ä*E'Ä?EÅ	E'ÅE$Å E'Å'E*c                ó   — t        d| «      S )zGet our DeltaGenerator.r   )r   )r0   s    r   r)   zSpinnerMixin.dg‘   s   € ô Ð$ dÓ+Ð+ó    N)zIn progress...)
r$   Ústrr   Úboolr   r8   r   r   r!   zIterator[None])r!   r   )Ú__name__Ú
__module__Ú__qualname__Ú
contextlibÚcontextmanagerr'   Úpropertyr)   © r6   r   r   r   '   s|   „ Ø×Ñð %ðf3ð  ØØ ñf3àðf3ð ð	f3ð
 ðf3ð ðf3ð 
òf3ó ðf3ðP ò,ó ñ,r6   r   )Ú
__future__r   r<   r+   Útypingr   r   r   Ú#streamlit.elements.lib.layout_utilsr   Ústreamlit.errorsr   Ústreamlit.proto.Element_pb2r	   r&   Ústreamlit.proto.Spinner_pb2r
   r#   Ústreamlit.runtime.scriptrunnerr   r   Ústreamlit.string_utilr   Úcollections.abcr   Ústreamlit.delta_generatorr   r   r   Ú__annotations__r   r?   r6   r   ú<module>rK      sL   ðö #ã Û ß -Ñ -å DÝ -Ý ?Ý ?ß NÝ ,áÝ(å8Ý9ð €
ˆEÓ ÷m,ò m,r6   