
    4i              
          U d dl mZ d dlmZ d dlmZ dddddddddd	Zd	ed
<   dZded<   i dddddddddddddddddddddddddddddddddddddd d d!Z	d	ed"<   d#d$hZ
d%ed&<   d*d'Zd+d(Zy)),    )annotations)Final)StreamlitAPIExceptionctrlcmdaltshift)	r   controlr   commandmetar   optionr	   modzFinal[dict[str, str]]_MODIFIER_ALIASES)r   r   r   r	   zFinal[tuple[str, ...]]_MODIFIER_ORDERenterreturnspacespacebartabescapeesc	backspacedeletedelhomeendpageuppagedownleft	arrowleftrightupdown)
arrowrightr"   arrowupr#   	arrowdown_KEY_ALIASEScrzFinal[set[str]]_RESERVED_KEYSc                    | t         v r	t         |    S t        |       dk(  r| j                         r| S | j                  d      r| dd j	                         r| S t        d      )zFNormalize a key token to a format that can be used on the client side.   fNzgshortcut must include a single character or one of the supported keys (e.g. Enter, Space, Tab, Escape).)r'   lenisalnum
startswithisdigitr   )lower_tokens    o/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/streamlit/elements/lib/shortcut_utils.py_normalize_key_tokenr4   D   sl     l"K((
;1!4!4!6c"{12'>'>'@
	,     c                P   t        | t              st        d      | j                  d      D cg c]#  }|j	                         s|j	                         % }}|st        d      g }d}|D ]f  }|j                         }|t        v rt        |   }||vr|j                  |       :|t        d      t        |      }|t        v rt        d      |}h |t        d      t        D 	cg c]	  }	|	|v s|	 }
}	||
j                  |       dj                  |
      S c c}w c c}	w )ac  Normalize a shortcut string to a format that can be used on the client side.

    Parameters
    ----------
    shortcut : str
        The shortcut string to normalize.

    Returns
    -------
    str
        The normalized shortcut string.

    Raises
    ------
    StreamlitAPIException
        If the shortcut is not a string value.
        If the shortcut does not contain at least one key or modifier.
        If the shortcut contains a single non-modifier key.
        If the shortcut uses the keys 'C' or 'R', with or without modifiers.
        If the shortcut does not include a non-modifier key.
    z shortcut must be a string value.+z9The `shortcut` must contain at least one key or modifier.Nz:The `shortcut` may only specify a single non-modifier key.zIThe `shortcut` cannot use the keys 'C' or 'R', with or without modifiers.zGThe `shortcut` must include a non-modifier key such as 'K' or 'Ctrl+K'.)
isinstancestrr   splitstriplowerr   appendr4   r*   r   join)shortcuttokentokens	modifierskey	raw_tokenr2   normalized_modifiernormalized_keymodifiernormalized_tokenss              r3   normalize_shortcutrI   V   sY   , h$#$FGG)1)<NekkmNFN#G
 	
 IC 	oo'++"3K"@")3  !45?'L  .k:^+'[  '* {#U
 	

 "1$H	4I$ $   %88%&&S OF$s   DD*	D#4D#N)r2   r9   r   r9   )r?   r9   r   r9   )
__future__r   typingr   streamlit.errorsr   r   __annotations__r   r'   r*   r4   rI    r5   r3   <module>rO      sW    #
 
, ( 
 +J' I'W'g' W' 	'
 
5' h' 
8' ' h' 
8' F' 
5' h' 
' F'  !'" W#'$ 
-'# 2 $'* ,$B'r5   