
    &ee                    F   U d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	m
Z
mZmZmZmZ ddlmZmZ ddl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 ddl m!Z!m"Z"m#Z#m$Z$ ddl%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z.m/Z/m0Z0m1Z1m2Z2 ddl3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z<m=Z=  ee>          Z? e&ej@                  ZAeed         df         ZBdeCd<    G d de"          ZD G d de=          ZE eE            ZFd$dZG G d  d!          ZH G d" d#e!          ZIdS )%z$@st.cache_data: pickle-based caching    )annotationsN)	timedelta)AnyCallableTypeVarUnioncastoverload)Literal	TypeAlias)runtime)show_deprecation_warning)StreamlitAPIException)
get_logger)
CacheErrorCacheKeyNotFoundError)	CacheType)CacheCachedFuncInfomake_cached_func_wrapperttl_to_seconds)CachedMessageReplayContextCachedResultElementMsgDataMsgDataMultiCacheResults)HashFuncsDict)CacheStorageCacheStorageContextCacheStorageErrorCacheStorageKeyNotFoundErrorCacheStorageManager)InvalidCacheStorageContext)MemoryCacheStorageManager)gather_metrics)get_script_run_ctx)	CacheStatCacheStatsProviderdiskr   CachePersistTypec                       e Zd ZdZ	 dd fdZed d            Zed!d            Zed"d            Zd#dZ	d$dZ
 xZS )%CachedDataFuncInfoz:Implements the CachedFuncInfo interface for @st.cache_dataNfunctypes.FunctionTypeshow_spinner
bool | strpersistr*   max_entries
int | Nonettlfloat | timedelta | str | Noneallow_widgetsbool
hash_funcsHashFuncsDict | Nonec                    t                                          ||||           || _        || _        || _        |                                  d S )N)r/   r6   r8   )super__init__r1   r2   r4   validate_params)	selfr-   r/   r1   r2   r4   r6   r8   	__class__s	           Hlib/python3.11/site-packages/streamlit/runtime/caching/cache_data_api.pyr<   zCachedDataFuncInfo.__init__L   sb     	%'!	 	 	
 	
 	
 &    returnr   c                    t           j        S N)r   DATAr>   s    r@   
cache_typezCachedDataFuncInfo.cache_typeb   s
    ~rA   r   c                    t           S rD   )CACHE_DATA_MESSAGE_REPLAY_CTXrF   s    r@   cached_message_replay_ctxz,CachedDataFuncInfo.cached_message_replay_ctxf   s    ,,rA   strc                8    | j         j         d| j         j         S )z-A human-readable name for the cached function.)r-   
__module____qualname__rF   s    r@   display_namezCachedDataFuncInfo.display_namej   s"     )&AA)?AAArA   function_keyr   c                t    t                               || j        | j        | j        | j        | j                  S )N)keyr1   r2   r4   rP   r6   )_data_caches	get_cacher1   r2   r4   rP   r6   )r>   rQ   s     r@   get_function_cachez%CachedDataFuncInfo.get_function_cacheo   s>    %%L(*, & 
 
 	
rA   Nonec                t    t                               | j        j        | j        | j        | j                   dS )z
        Validate the params passed to @st.cache_data are compatible with cache storage

        When called, this method could log warnings if cache params are invalid
        for current storage.
        )function_namer1   r2   r4   N)rT   validate_cache_paramsr-   __name__r1   r2   r4   rF   s    r@   r=   z"CachedDataFuncInfo.validate_paramsy   sC     	**),L(	 	+ 	
 	
 	
 	
 	
rA   rD   )r-   r.   r/   r0   r1   r*   r2   r3   r4   r5   r6   r7   r8   r9   )rB   r   )rB   r   )rB   rK   )rQ   rK   rB   r   rB   rW   )r[   rN   rO   __doc__r<   propertyrG   rJ   rP   rV   r=   __classcell__r?   s   @r@   r,   r,   I   s        DD ,0      ,    X - - - X- B B B XB
 
 
 

 
 
 
 
 
 
 
rA   r,   c                  H    e Zd ZdZd ZddZd dZd!dZd"dZd#dZ	d$dZ
dS )%
DataCacheszManages all DataCache instancesc                D    t          j                    | _        i | _        d S rD   )	threadingLock_caches_lock_function_cachesrF   s    r@   r<   zDataCaches.__init__   s     %N,,68rA   rS   rK   r1   r*   r2   r3   r4   $int | float | timedelta | str | NonerP   r6   r7   rB   	DataCachec           
     t   t          |d          }| j        5  | j                            |          }|/|j        |k    r$|j        |k    r|j        |k    r|cddd           S |7t                              d||||           |j	        
                                 t                              d||||           |                     |||||          }	|                                 }
|
                    |	          }t          |||||||          }|| j        |<   |cddd           S # 1 swxY w Y   dS )zvReturn the mem cache for the given key.

        If it doesn't exist, create a new one with the given params.
        Fcoerce_none_to_infNz}Closing existing DataCache storage (key=%s, persist=%s, max_entries=%s, ttl=%s) before creating new one with different paramszCCreating new DataCache (key=%s, persist=%s, max_entries=%s, ttl=%s)rQ   rY   ttl_secondsr2   r1   )rS   storager1   r2   rn   rP   r6   )r   rf   rg   getrn   r2   r1   _LOGGERdebugro   closecreate_cache_storage_contextget_storage_managercreateri   )r>   rS   r1   r2   r4   rP   r6   rn   cachecache_contextcache_storage_managerro   s               r@   rU   zDataCaches.get_cache   s    %SUCCC  4	 4	)--c22E!%44%44MW,,4	 4	 4	 4	 4	 4	 4	 4	  D    ##%%% MMU   !== *'' >  M %)$<$<$>$>!+22=AAG'')+  E */D!#&i4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	 4	s   ?D-%B;D--D14D1rW   c                V   | j         5  	 |                                                                  nY# t          $ rL | j                                        D ]/}|                                 |j                                         0Y nw xY wi | _        ddd           dS # 1 swxY w Y   dS )z'Clear all in-memory and on-disk caches.N)	rf   ru   	clear_allNotImplementedErrorrg   valuesclearro   rs   )r>   
data_caches     r@   r{   zDataCaches.clear_all   s    	' 	'	/
 ((**446666& / / /"&"7">">"@"@ / /J$$&&&&,,..../ // %'D!	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's2   B&1BABBB
BB"%B"list[CacheStat]c                    | j         5  | j                                        }d d d            n# 1 swxY w Y   g }|                                D ])}|                    |                                           *|S rD   )rf   rg   copyr}   extend	get_stats)r>   function_cachesstatsrw   s       r@   r   zDataCaches.get_stats   s     	; 	; #388::O	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	; 	;
 "$$++-- 	, 	,ELL**++++s   .22rY   c                
   t          |d          }|                     d||||          }	 |                                                     |           dS # t          $ r"}t
                              d||            d}~ww xY w)zValidate that the cache params are valid for given storage.

        Raises
        ------
        InvalidCacheStorageContext
            Raised if the cache storage manager is not able to work with provided
            CacheStorageContext.
        Frk   	DUMMY_KEYrm   zTCache params for function %s are incompatible with current cache storage manager: %sN)r   rt   ru   check_contextr#   rq   error)r>   rY   r1   r2   r4   rn   rx   es           r@   rZ   z DataCaches.validate_cache_params   s      %SUCCC99$'## : 
 
		$$&&44]CCCCC) 	 	 	MM,	   	s   'A 
B A==BrQ   rn   float | Noner   c                *    t          |||||          S )N)rQ   function_display_namern   r2   r1   )r   )r>   rQ   rY   r1   rn   r2   s         r@   rt   z'DataCaches.create_cache_storage_context  s*     #%"/##
 
 
 	
rA   r"   c                    t          j                    rt          j                    j        S t                              d           t                      S )Nz1No runtime found, using MemoryCacheStorageManager)r   existsget_instancery   rq   warningr$   rF   s    r@   ru   zDataCaches.get_storage_manager%  sE    > 	/'))?? OOOPPP,...rA   N)rS   rK   r1   r*   r2   r3   r4   rh   rP   rK   r6   r7   rB   ri   r\   rB   r   )
rY   rK   r1   r*   r2   r3   r4   rh   rB   rW   )rQ   rK   rY   rK   r1   r*   rn   r   r2   r3   rB   r   )rB   r"   )r[   rN   rO   r]   r<   rU   r{   r   rZ   rt   ru    rA   r@   rb   rb      s        ))9 9 9F F F FP' ' ' '	 	 	 	" " " "H
 
 
 
 / / / / / /rA   rb   rB   r(   c                     t           S )z:Return the StatsProvider for all @st.cache_data functions.)rT   r   rA   r@   get_data_cache_stats_providerr   3  s    rA   c                      e Zd ZdZ	 d'd(dZ eded	ef         
          Ze	d)d            Z
e	dddddddd*d            Z
	 d'dddddddd+d Z
	 d'dd!d+d"Z ed#          d,d%            Zd& ZdS )-CacheDataAPIzjImplements the public st.cache_data API: the @st.cache_data decorator, and
    st.cache_data.clear().
    Ndecorator_metric_namerK   deprecation_warning
str | Nonec                H    t          || j                  | _        || _        dS )a  Create a CacheDataAPI instance.

        Parameters
        ----------
        decorator_metric_name
            The metric name to record for decorator usage. `@st.experimental_memo` is
            deprecated, but we're still supporting it and tracking its usage separately
            from `@st.cache_data`.

        deprecation_warning
            An optional deprecation warning to show when the API is accessed.
        N)r%   
_decorator_deprecation_warning)r>   r   r   s      r@   r<   zCacheDataAPI.__init__=  s,    $ )!4?
 
 %8!!!rA   F.)boundr-   rB   c                    d S rD   r   )r>   r-   s     r@   __call__zCacheDataAPI.__call__Y  s    rA   TF)r4   r2   r/   r1   experimental_allow_widgetsr8   r4   r5   r2   r3   r/   r0   r1   CachePersistType | boolr   r7   r8   r9   Callable[[F], F]c                   d S rD   r   )r>   r4   r2   r/   r1   r   r8   s          r@   r   zCacheDataAPI.__call__^  s	     	rA   F | Nonec          	     :    |                      |||||||          S )N)r4   r2   r1   r/   r   r8   )r   )r>   r-   r4   r2   r/   r1   r   r8   s           r@   r   zCacheDataAPI.__call__k  s4     #%'A!  
 
 	
rA   )r8   c                 	 |du rd	n	|du rd	n|		dvrt          d| d          |                                  	fd}||S t          t          t	          t
          j        |          		                    S )
aF  Decorator to cache functions that return data (e.g. dataframe transforms, database queries, ML inference).

        Cached objects are stored in "pickled" form, which means that the return
        value of a cached function must be pickleable. Each caller of the cached
        function gets its own copy of the cached data.

        You can clear a function's cache with ``func.clear()`` or clear the entire
        cache with ``st.cache_data.clear()``.

        To cache global resources, use ``st.cache_resource`` instead. Learn more
        about caching at https://docs.streamlit.io/library/advanced-features/caching.

        Parameters
        ----------
        func : callable
            The function to cache. Streamlit hashes the function's source code.

        ttl : float, timedelta, str, or None
            The maximum time to keep an entry in the cache. Can be one of:

            * ``None`` if cache entries should never expire (default).
            * A number specifying the time in seconds.
            * A string specifying the time in a format supported by `Pandas's
              Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
              e.g. ``"1d"``, ``"1.5 days"``, or ``"1h23s"``.
            * A ``timedelta`` object from `Python's built-in datetime library
              <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
              e.g. ``timedelta(days=1)``.

            Note that ``ttl`` will be ignored if ``persist="disk"`` or ``persist=True``.

        max_entries : int or None
            The maximum number of entries to keep in the cache, or None
            for an unbounded cache. When a new entry is added to a full cache,
            the oldest cached entry will be removed. Defaults to None.

        show_spinner : bool or str
            Enable the spinner. Default is True to show a spinner when there is
            a "cache miss" and the cached data is being created. If string,
            value of show_spinner param will be used for spinner text.

        persist : "disk", bool, or None
            Optional location to persist cached data to. Passing "disk" (or True)
            will persist the cached data to the local disk. None (or False) will disable
            persistence. The default is None.

        experimental_allow_widgets : bool
            Allow widgets to be used in the cached function. Defaults to False.
            Support for widgets in cached functions is currently experimental.
            Setting this parameter to True may lead to excessive memory use since the
            widget value is treated as an additional input parameter to the cache.
            We may remove support for this option at any time without notice.

        hash_funcs : dict or None
            Mapping of types or fully qualified names to hash functions.
            This is used to override the behavior of the hasher inside Streamlit's
            caching mechanism: when the hasher encounters an object, it will first
            check to see if its type matches a key in this dict and, if so, will use
            the provided function to generate a hash for it. See below for an example
            of how this can be used.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> @st.cache_data
        ... def fetch_and_clean_data(url):
        ...     # Fetch data from URL here, and then clean it up.
        ...     return data
        ...
        >>> d1 = fetch_and_clean_data(DATA_URL_1)
        >>> # Actually executes the function, since this is the first time it was
        >>> # encountered.
        >>>
        >>> d2 = fetch_and_clean_data(DATA_URL_1)
        >>> # Does not execute the function. Instead, returns its previously computed
        >>> # value. This means that now the data in d1 is the same as in d2.
        >>>
        >>> d3 = fetch_and_clean_data(DATA_URL_2)
        >>> # This is a different URL, so the function executes.

        To set the ``persist`` parameter, use this command as follows:

        >>> import streamlit as st
        >>>
        >>> @st.cache_data(persist="disk")
        ... def fetch_and_clean_data(url):
        ...     # Fetch data from URL here, and then clean it up.
        ...     return data

        By default, all parameters to a cached function must be hashable.
        Any parameter whose name begins with ``_`` will not be hashed. You can use
        this as an "escape hatch" for parameters that are not hashable:

        >>> import streamlit as st
        >>>
        >>> @st.cache_data
        ... def fetch_and_clean_data(_db_connection, num_rows):
        ...     # Fetch data from _db_connection here, and then clean it up.
        ...     return data
        ...
        >>> connection = make_database_connection()
        >>> d1 = fetch_and_clean_data(connection, num_rows=10)
        >>> # Actually executes the function, since this is the first time it was
        >>> # encountered.
        >>>
        >>> another_connection = make_database_connection()
        >>> d2 = fetch_and_clean_data(another_connection, num_rows=10)
        >>> # Does not execute the function. Instead, returns its previously computed
        >>> # value - even though the _database_connection parameter was different
        >>> # in both calls.

        A cached function's cache can be procedurally cleared:

        >>> import streamlit as st
        >>>
        >>> @st.cache_data
        ... def fetch_and_clean_data(_db_connection, num_rows):
        ...     # Fetch data from _db_connection here, and then clean it up.
        ...     return data
        ...
        >>> fetch_and_clean_data.clear()
        >>> # Clear all cached entries for this function.

        To override the default hashing behavior, pass a custom hash function.
        You can do that by mapping a type (e.g. ``datetime.datetime``) to a hash
        function (``lambda dt: dt.isoformat()``) like this:

        >>> import streamlit as st
        >>> import datetime
        >>>
        >>> @st.cache_data(hash_funcs={datetime.datetime: lambda dt: dt.isoformat()})
        ... def convert_to_utc(dt: datetime.datetime):
        ...     return dt.astimezone(datetime.timezone.utc)

        Alternatively, you can map the type's fully-qualified name
        (e.g. ``"datetime.datetime"``) to the hash function instead:

        >>> import streamlit as st
        >>> import datetime
        >>>
        >>> @st.cache_data(hash_funcs={"datetime.datetime": lambda dt: dt.isoformat()})
        ... def convert_to_utc(dt: datetime.datetime):
        ...     return dt.astimezone(datetime.timezone.utc)

        Tr)   FN)Nr)   zUnsupported persist option 'z#'. Valid values are 'disk' or None.c                J    t          t          |                     S )Nr-   r1   r/   r2   r4   r6   r8   )r   r,   )fr   r8   r2   persist_stringr/   r4   s    r@   wrapperz(CacheDataAPI._decorator.<locals>.wrapper/  s<    +"*!- +"<)  
 
 
rA   r   )r   _maybe_show_deprecation_warningr   r,   r	   typesFunctionType)
r>   r-   r4   r2   r/   r1   r   r8   r   r   s
     ``` `` @r@   r   zCacheDataAPI._decorator  s    @ d??#NN!NN$N//'[w[[[   	,,...	 	 	 	 	 	 	 	 	 	 <N'%,d33&)'8%  

 

 
	
rA   clear_data_cachesrW   c                `    |                                   t                                           dS )z,Clear all in-memory and on-disk data caches.N)r   rT   r{   rF   s    r@   r~   zCacheDataAPI.clearK  s.     	,,...     rA   c                @    | j         t          | j                    dS dS )zzIf the API is being accessed with the deprecated `st.experimental_memo` name,
        show a deprecation warning.
        N)r   r   rF   s    r@   r   z,CacheDataAPI._maybe_show_deprecation_warningQ  s,     $0$T%>????? 10rA   rD   )r   rK   r   r   )r-   r   rB   r   )r4   r5   r2   r3   r/   r0   r1   r   r   r7   r8   r9   rB   r   )r-   r   r4   r5   r2   r3   r/   r0   r1   r   r   r7   r8   r9   r\   )r[   rN   rO   r]   r<   r   r   r   r   r
   r   r   r%   r~   r   r   rA   r@   r   r   8  sl        
 MQ8 8 8 8 82 	8CH-...A    X  /3"&#'+/+0+/
 
 
 
 
 X
 
 /3"&#'+/+0+/
 
 
 
 
 
. I
 ,0I
 I
 I
 I
 I
 I
V ^'((! ! ! )(!
@ @ @ @ @rA   r   c                  r     e Zd ZdZ	 d d! fdZd"dZd#dZ ed          d$d            Zd%dZ	d&dZ
 xZS )'ri   z:Manages cached values for a single st.cache_data function.FrS   rK   ro   r   r1   r*   r2   r3   rn   r   rP   r6   r7   c                    t                                                       || _        || _        || _        || _        || _        || _        || _        d S rD   )	r;   r<   rS   rP   ro   rn   r2   r1   r6   )	r>   rS   ro   r1   r2   rn   rP   r6   r?   s	           r@   r<   zDataCache.__init__\  sV     	(&&*rA   rB   r   c                l    t          | j        t                    r| j                                        S g S rD   )
isinstancero   r(   r   rF   s    r@   r   zDataCache.get_statso  s0    dl$677 	,<))+++	rA   r   c                   	 | j                             |          }nY# t          $ r"}t          t	          |                    |d}~wt
          $ r"}t          t	          |                    |d}~ww xY w	 t          j        |          }t          |t                    s(| j                             |           t                      t                      }|st                      |                    |t          j                  }||j        v r|j        |         S t                      # t          j        $ r}t          d|           |d}~ww xY w)zRead a value and messages from the cache. Raise `CacheKeyNotFoundError`
        if the value doesn't exist, and `CacheError` if the value exists but can't
        be unpickled.
        NzFailed to unpickle )ro   rp   r!   r   rK   r    r   pickleloadsr   r   deleter&   get_current_widget_keyr   rE   resultsUnpicklingError)r>   rS   pickled_entryr   entryctx
widget_keyexcs           r@   read_resultzDataCache.read_resultt  sf   
	, L,,S11MM+ 	7 	7 	7'A//Q6  	, 	, 	,SVV$$!+	,	CL//Ee%677 . ##C(((+---$&&C .+---55c9>JJJU]**}Z00+---% 	C 	C 	C838899sB	Cs?    
A3AA3A..A37B$D* D* *E9EE_cache_data_objectvaluer   messageslist[MsgData]rW   c                   t                      }|dS t          j        j        }t          j        j        }| j        rd |D             }nt                      }d}	 |                     |          }n# t          t          j
        f$ r Y nw xY w|t          |i           }|j                            |           |                    |t          j                  }	t#          ||||          }
|
|j        |	<   	 t          j        |          }n1# t          j        t*          f$ r}t-          d|           |d}~ww xY w| j                            ||           dS )zbWrite a value and associated messages to the cache.
        The value must be pickleable.
        Nc                ^    h | ]*}t          |t                    r|j        |j        j        +S rD   )r   r   widget_metadata	widget_id).0msgs     r@   	<setcomp>z)DataCache.write_result.<locals>.<setcomp>  sE       c>22 8;7J7V #-7V7V7VrA   )
widget_idsr   zFailed to pickle )r&   st_mainidsidebarr6   set _read_multi_results_from_storager   r   r   r   r   updater   r   rE   r   r   dumpsPicklingError	TypeErrorr   ro   )r>   rS   r   r   r   main_id
sidebar_idwidgetsmulti_cache_resultsr   resultr   r   s                r@   write_resultzDataCache.write_result  s   
 !"";F(+Z]
 	 #  GG eeG8<	"&"G"G"L"L%v'=> 	 	 	D	 &"3wPR"S"S"S&--g666(??Y^TT
eXw
CC28#J/	A"L)<==MM$i0 	A 	A 	A66677S@	A 	m,,,,,s*   A0 0B	B	6D D9!D44D9c                8    | j                                          d S rD   )ro   r~   rF   s    r@   _clearzDataCache._clear  s    rA   r   c                >   	 | j                             |          }n/# t          $ r"}t          t	          |                    |d}~ww xY wt          j        |          }t          |t                    r|S | j         	                    |           t                      )zLook up the results from storage and ensure it has the right type.

        Raises a `CacheKeyNotFoundError` if the key has no entry, or if the
        entry is malformed.
        N)
ro   rp   r!   r   rK   r   r   r   r   r   )r>   rS   pickledr   maybe_resultss        r@   r   z*DataCache._read_multi_results_from_storage  s    	7l&&s++GG+ 	7 	7 	7'A//Q6	7 W--m%677 	*  L$$$')))s    
A	AA	)F)rS   rK   ro   r   r1   r*   r2   r3   rn   r   rP   rK   r6   r7   r   )rS   rK   rB   r   )rS   rK   r   r   r   r   rB   rW   r\   )rS   rK   rB   r   )r[   rN   rO   r]   r<   r   r   r%   r   r   r   r_   r`   s   @r@   ri   ri   Y  s        DD $+ + + + + + +&   
C C C C@ ^()))- )- )- *))-V   * * * * * * * *rA   ri   )rB   r(   )Jr]   
__future__r   r   rd   r   datetimer   typingr   r   r   r   r	   r
   typing_extensionsr   r   	streamlitr   r   streamlit.deprecation_utilr   streamlit.errorsr   streamlit.loggerr   &streamlit.runtime.caching.cache_errorsr   r   $streamlit.runtime.caching.cache_typer   %streamlit.runtime.caching.cache_utilsr   r   r   r   /streamlit.runtime.caching.cached_message_replayr   r   r   r   r   !streamlit.runtime.caching.hashingr   !streamlit.runtime.caching.storager   r   r    r!   r"   8streamlit.runtime.caching.storage.cache_storage_protocolr#   5streamlit.runtime.caching.storage.dummy_cache_storager$   streamlit.runtime.metrics_utilr%   1streamlit.runtime.scriptrunner.script_run_contextr&   streamlit.runtime.statsr'   r(   r[   rq   rE   rI   r*   __annotations__r,   rb   rT   r   r   ri   r   rA   r@   <module>r      s   + * * " " " " " "             @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 0 0 0 0 0 0 0 0           ? ? ? ? ? ? 2 2 2 2 2 2 ' ' ' ' ' ' T T T T T T T T : : : : : :                         < ; ; ; ; ;                        : 9 9 9 9 9 P P P P P P A A A A A A A A
*X

 : :9> J J  $GFOT$9:  : : : :<
 <
 <
 <
 <
 <
 <
 <
~d/ d/ d/ d/ d/# d/ d/ d/P z||   
^@ ^@ ^@ ^@ ^@ ^@ ^@ ^@B	{* {* {* {* {* {* {* {* {* {*rA   