
    ch                    .   % S SK Jr  S SKrS SKJrJrJrJrJr  S SK	r	S SK	J
r
  S SKJr  \" \5      rS\S'   \" S\S	\4   S
9r\" S\S
9rSS jrSSS jjr  S           SS jjr  S           SS jjr S           SS jjrSS jrg)    )annotationsN)AnyCallableFinalTypeVarcast)config)
get_loggerr   _LOGGERTFunc.)boundTObjc                 @    [        [        R                  " S5      5      $ )z<True if we should print deprecation warnings to the browser.zclient.showErrorDetails)boolr	   
get_option     mC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\streamlit/deprecation_util.py!_error_details_in_browser_enabledr      s    !!";<==r   c                    [        5       (       a  U(       a  [        R                  " U 5        [        R                  U 5        g)a  Show a deprecation warning message.

Parameters
----------
message : str
    The deprecation warning message.
show_in_browser : bool, default=True
    Whether to show the deprecation warning in the browser. When this is True,
    we will show the deprecation warning in the browser unless the user has
    disabled error details in the browser by setting the `client.showErrorDetails`
    config option to "none".
N)r   	streamlitwarningr   )messageshow_in_browsers     r   show_deprecation_warningr   #   s+     )**'" OOGr   c           	     d    U(       a
  SU  3n SU 3nSU  SU SU  SU S3	U(       a  SU 3-   $ S-   $ )	Nzst.zPlease replace `z` with `z`.

`z` will be removed after .z

 r   )old_namenew_nameremoval_dateextra_messageinclude_st_prefixs        r   make_deprecated_name_warningr$   7   sk     
#
# 8*HXJ 7:-l^1	>%2T-!	< 9;	<r   c                   ^ ^^^^ [         R                  " T 5      SUU UUU4S jj5       nTUl        T R                  Ul        [	        SU5      $ )a  Wrap an `st` function whose name has changed.

Wrapped functions will run as normal, but will also show an st.warning
saying that the old name will be removed after removal_date.

(We generally set `removal_date` to 3 months from the deprecation date.)

Parameters
----------
func
    The `st.` function whose name has changed.

old_name
    The function's deprecated name within __init__.py.

removal_date
    A date like "2020-01-01", indicating the last day we'll guarantee
    support for the deprecated name.

extra_message
    An optional extra message to show in the deprecation warning.

name_override
    An optional name to use in place of func.__name__.
c            	        > T" U 0 UD6n[        [        TT=(       d(    [        TS5      (       a  [        TR                  5      OSTT5      5        U$ )N__name__unknown)r   r$   hasattrstrr'   )argskwargsresultr"   funcname_overrider   r!   s      r   wrapped_func)deprecate_func_name.<locals>.wrapped_funcj   sU    t&v& ( T*1$
*C*CC&	
 r   r   )r+   r   r,   r   returnr   )	functoolswrapsr'   __doc__r   )r.   r   r!   r"   r/   r0   s   ````` r   deprecate_func_namer6   I   sI    B __T   %L<<L&&r   c                0   ^^^^ [        U UUUU4S j5      $ )a  Wrap an `st` object whose name has changed.

Wrapped objects will behave as normal, but will also show an st.warning
saying that the old name will be removed after `removal_date`.

(We generally set `removal_date` to 3 months from the deprecation date.)

Parameters
----------
obj
    The `st.` object whose name has changed.

old_name
    The object's deprecated name within __init__.py.

new_name
    The object's new name within __init__.py.

removal_date
    A date like "2020-01-01", indicating the last day we'll guarantee
    support for the deprecated name.

include_st_prefix
    If False, does not prefix each of the object names in the deprecation
    message with `st.*`. Defaults to True.
c            	     .   > [        [        TTTT S95      $ )N)r#   )r   r$   )r#   r    r   r!   s   r   <lambda>$deprecate_obj_name.<locals>.<lambda>   s    (((LDU
r   )_create_deprecated_obj_wrapper)objr   r    r!   r#   s    ````r   deprecate_obj_namer=   ~   s    D *	
 r   c                b   ^ ^^^^ SmSUU4S jjm " UUU 4S jS5      m[        ST" 5       5      $ )zCreate a wrapper for an object that has been deprecated. The first
time one of the object's properties or functions is accessed, the
given `show_warning` callback will be called.
Fc                 (   > T (       d
  Sm T" 5         g g NTr   )has_shown_warningshow_warnings   r   maybe_show_warning:_create_deprecated_obj_wrapper.<locals>.maybe_show_warning   s     ! $N !r   c                  j   > \ rS rSrSU U4S jjrS	UU4S jjr\S
S j5       r\SUU4S jj5       rSr	g)/_create_deprecated_obj_wrapper.<locals>.Wrapper   c           
        > TR                  TR                  5       H2  n[        U R                  U[        U R	                  U5      5      5        M4     g N)_get_magic_functions	__class__setattrproperty_make_magic_function_proxy)selfnameWrapperr<   s     r   __init__8_create_deprecated_obj_wrapper.<locals>.Wrapper.__init__   sB    44S]]CNNT<<TBC Dr   c                ^   > XR                   ;   a  [        X5      $ T" 5         [        TU5      $ rI   )__dict__getattr)rO   attrrC   r<   s     r   __getattr__;_create_deprecated_obj_wrapper.<locals>.Wrapper.__getattr__   s-    
 }}$t** 3%%r   c                    Sn[        U 5       Vs/ s H$  nX!;  d  M
  UR                  S5      (       d  M"  UPM&     sn$ s  snf )N)rK   rU   __getattribute__rX   __)dir
startswith)self_clsignorerP   s      r   rJ   D_create_deprecated_obj_wrapper.<locals>.Wrapper._get_magic_functions   sL     RF  M)D% *.//$*? )  s   	>>>c                   >^  SUU U4S jjnU$ )Nc                *   > T" 5         [        TT5      $ rI   )rV   )_selfr+   rC   rP   r<   s     r   proxyY_create_deprecated_obj_wrapper.<locals>.Wrapper._make_magic_function_proxy.<locals>.proxy   s    "$sD))r   )rd   r   r+   r   r2   r   r   )rP   re   rC   r<   s   ` r   rN   J_create_deprecated_obj_wrapper.<locals>.Wrapper._make_magic_function_proxy   s    * * Lr   r   Nr2   None)rW   r*   r2   r   )r_   ztype[object]r2   z	list[str])rP   r*   r2   zCallable[[Any], Any])
r'   
__module____qualname____firstlineno__rR   rX   staticmethodrJ   rN   __static_attributes__)rQ   rC   r<   s   r   rQ   rF      s?    	 			& 		& 
	 
	 
	 
	r   rQ   r   rh   )r   )r<   rB   rQ   rA   rC   s   ``@@@r   r;   r;      s1    
  & &P 	""r   )r2   r   )T)r   r*   r   r   r2   ri   r@   )r   r*   r    r*   r!   r*   r"   
str | Noner#   r   r2   r*   )NN)r.   r   r   r*   r!   r*   r"   ro   r/   ro   r2   r   )r<   r   r   r*   r    r*   r!   r*   r#   r   r2   r   )r<   r   rB   zCallable[[], Any]r2   r   )
__future__r   r3   typingr   r   r   r   r   r   r	   streamlit.loggerr
   r'   r   __annotations__r   objectr   r   r   r$   r6   r=   r;   r   r   r   <module>ru      s)   #  6 6   'H% %xS12vV$>
0 !%"  	
  	, !% $2'
2'2' 2' 	2'
 2' 2't #)	)) ) 	)
 ) 
)X6#r   