o
    沪gP                     @  s  U d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
mZmZmZ d dlmZ d dlmZ d dlmZmZ d dlmZmZ d dlmZmZmZ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) d dl*m+Z+ d dl,m-Z-m.Z. d dl/m0Z0 erd dl1m2Z2 d dl3m4Z4 d dl*m5Z5m6Z6m7Z7 d dl8m9Z9m:Z:m;Z; edZ<dZ=de>d< dZ?de>d< dZ@de>d< dZAde>d< dZBde>d < e
d! ZCd"e>d#< G d$d% d%e	e0 ZDG d&d' d'e	e0 ZEdMd,d-ZFe%jGjHd.d/d0d/fdNdFdGZIdOdIdJZJG dKdL dLZKd/S )P    )annotations)Sequence)	TYPE_CHECKINGAnyCallableFinalGenericLiteralTypeVarcastoverload)	TypeAlias)current_form_id)(convert_to_sequence_and_check_comparableget_default_indices)check_widget_policiesmaybe_raise_label_warnings)KeyLabelVisibilitycompute_and_register_element_id get_label_visibility_proto_valuesave_for_app_testingto_key)MultiSelectSerdeStreamlitAPIException)ButtonGroup)gather_metrics)get_script_run_ctx)register_widget)is_emojivalidate_material_icon)T)OptionSequence)DeltaGenerator)
WidgetArgsWidgetCallbackWidgetKwargs)RegisterWidgetResultWidgetDeserializerWidgetSerializerV)z:material/thumb_up:z:material/thumb_down:r   _THUMB_ICONS)z:material/sentiment_sad:z!:material/sentiment_dissatisfied:z:material/sentiment_neutral:z:material/sentiment_satisfied:z#:material/sentiment_very_satisfied:_FACES_ICONS   _NUMBER_STARSz:material/star:
_STAR_ICONz:material/star_filled:_SELECTED_STAR_ICONsinglemultir   SelectionModec                   @  s4   e Zd ZdZ	ddd	d
ZdddZddddZdS )SingleSelectSerdea  Uses the MultiSelectSerde under-the-hood, but accepts a single index value
    and deserializes to a single index value.
    This is because button_group can be single and multi select, but we use the same
    proto for both and, thus, map single values to a list of values and a receiving
    value wrapped in a list to a single value.

    When a default_value is provided is provided, the option corresponding to the
    index is serialized/deserialized.
    Noption_indicesSequence[T]default_valuelist[int] | NonereturnNonec                 C  s   t ||d ur|ng | _d S N)r   multiselect_serde)selfr7   r9    r@   c/var/www/html/chatdoc2/venv/lib/python3.10/site-packages/streamlit/elements/widgets/button_group.py__init__g   s   
zSingleSelectSerde.__init__valueT | None	list[int]c                 C  s   |d ur|gng }| j |S r=   )r>   	serialize)r?   rC   _valuer@   r@   rA   rF   q   s   zSingleSelectSerde.serialize ui_value	widget_idstrc                 C  s&   | j ||}t|dkrd S |d S )Nr   )r>   deserializelen)r?   rI   rJ   deserializedr@   r@   rA   rL   u   s   zSingleSelectSerde.deserializer=   )r7   r8   r9   r:   r;   r<   )rC   rD   r;   rE   rH   )rI   r:   rJ   rK   r;   rD   __name__
__module____qualname____doc__rB   rF   rL   r@   r@   r@   rA   r6   \   s    

r6   c                   @  s2   e Zd ZdZddd	ZdddZ	ddddZdS )SingleOrMultiSelectSerdea  A serde that can handle both single and multi select options.

    It uses the same proto to wire the data, so that we can send and receive
    single values via a list. We have different serdes for both cases though so
    that when setting / getting the value via session_state, it is mapped correctly.
    So for single select, the value will be a single value and for multi select, it will
    be a list of values.
    optionsr8   default_valuesrE   typeLiteral['single', 'multi']c                 C  s<   || _ || _|| _|dkrt||d| _d S t||| _d S )Nr3   r9   )rV   rW   rX   r6   r   serde)r?   rV   rW   rX   r@   r@   rA   rB      s   
z!SingleOrMultiSelectSerde.__init__rC   T | list[T] | Noner;   c                 C  s   | j tt|S r=   )r[   rF   r   r   )r?   rC   r@   r@   rA   rF      s   z"SingleOrMultiSelectSerde.serializerH   rI   r:   rJ   rK   list[T] | T | Nonec                 C  s   | j ||S r=   )r[   rL   )r?   rI   rJ   r@   r@   rA   rL      s   z$SingleOrMultiSelectSerde.deserializeN)rV   r8   rW   rE   rX   rY   )rC   r\   r;   rE   rO   )rI   r:   rJ   rK   r;   r]   rP   r@   r@   r@   rA   rU   ~   s    
	
rU   feedback_option#Literal['thumbs', 'faces', 'stars']r;   /tuple[list[ButtonGroupProto.Option], list[int]]c                 C  s   g }g }| dkrt tttt}dd tD }||fS | dkr4t ttt}dd tD }||fS | dkrHt tt}tjt	t
dgt }||fS )Nthumbsc                 S     g | ]}t j|d qS )content_iconButtonGroupProtoOption.0iconr@   r@   rA   
<listcomp>       z&get_mapped_options.<locals>.<listcomp>facesc                 S  rb   rc   re   rh   r@   r@   rA   rk      rl   stars)rd   selected_content_icon)listreversedrangerM   r,   r-   r/   rf   rg   r0   r1   )r^   rV   options_indicesr@   r@   rA   get_mapped_options   s(   
rt   pillsNvisiblerJ   rK   formatted_options!Sequence[ButtonGroupProto.Option]rW   rE   disabledboolr   
click_mode$ButtonGroupProto.ClickMode.ValueTypeselection_visualization1ButtonGroupProto.SelectionVisualization.ValueTypestyle3Literal['borderless', 'pills', 'segmented_control']label
str | Nonelabel_visibilityr   helprf   c                 C  s   t  }| |_||jd d < ||_||_||_t j| |_	|d ur3||_
t|	|j_|
d ur3|
|_|D ]}|j| q5||_|S r=   )rf   iddefaultform_idry   r{   StyleValueupperr   r   r   r   rC   r   rV   appendr}   )rJ   rw   rW   ry   r   r{   r}   r   r   r   r   protoformatted_optionr@   r@   rA   _build_proto   s$   r   selection_modec                 C  s   | dvrt d|  ddS )zHCheck if the selection_mode value is valid or raise exception otherwise.r2   zYThe selection_mode argument must be one of ['single', 'multi']. The argument passed was ''.Nr   )r   r@   r@   rA   #_maybe_raise_selection_mode_warning   s   r   c                   @  s  e Zd Ze	dWdddddddXddZe	dWdddddddYddZed	dZddddddd[ddZeddddddddddd
d\d-d.Zedddddddddd/	d]d3d.Zed4ddddddddddd
d^d7d.Zeddddddddddd
d_d9d:Zedddddddddd/	d`d;d:Zed<ddddddddddd
dad=d:Zed>dddddd<ddddddd?dbdBdCZddddd<dddde	j
jddddDdcdRdSZedddUdVZdS )eButtonGroupMixin.NF)keyry   	on_changeargskwargsrV   Literal['thumbs']r   
Key | Nonery   rz   r   WidgetCallback | Noner   WidgetArgs | Noner   WidgetKwargs | Noner;   Literal[0, 1] | Nonec                C     d S r=   r@   r?   rV   r   ry   r   r   r   r@   r@   rA   feedback      
zButtonGroupMixin.feedbackLiteral['faces', 'stars']Literal[0, 1, 2, 3, 4] | Nonec                C  r   r=   r@   r   r@   r@   rA   r      r   r   ra   r_   
int | Nonec                C  st   |dvrt d| dt|\}}tt |}	tjj}
|dkr$tjj}
| j|d|d||	j	|	j
||||
dd}|jS )	a  Display a feedback widget.

        A feedback widget is an icon-based button group available in three
        styles, as described in ``options``. It is commonly used in chat and AI
        apps to allow users to rate responses.

        Parameters
        ----------
        options: "thumbs", "faces", or "stars"
            The feedback options displayed to the user. ``options`` can be one
            of the following:

            - ``"thumbs"`` (default): Streamlit displays a thumb-up and
              thumb-down button group.
            - ``"faces"``: Streamlit displays a row of five buttons with
              facial expressions depicting increasing satisfaction from left to
              right.
            - ``"stars"``: Streamlit displays a row of star icons, allowing the
              user to select a rating from one to five stars.

        key : str or int
            An optional string or integer to use as the unique key for the widget.
            If this is omitted, a key will be generated for the widget
            based on its content. No two widgets may have the same key.

        disabled : bool
            An optional boolean that disables the feedback widget if set
            to ``True``. The default is ``False``.

        on_change : callable
            An optional callback invoked when this feedback widget's value
            changes.

        args : tuple
            An optional tuple of args to pass to the callback.

        kwargs : dict
            An optional dict of kwargs to pass to the callback.

        Returns
        -------
        int or None
            An integer indicating the user's selection, where ``0`` is the
            lowest feedback. Higher values indicate more positive feedback.
            If no option was selected, the widget returns ``None``.

            - For ``options="thumbs"``, a return value of ``0`` indicates
              thumbs-down, and ``1`` indicates thumbs-up.
            - For ``options="faces"`` and ``options="stars"``, return values
              range from ``0`` (least satisfied) to ``4`` (most satisfied).

        Examples
        --------
        Display a feedback widget with stars, and show the selected sentiment:

        >>> import streamlit as st
        >>>
        >>> sentiment_mapping = ["one", "two", "three", "four", "five"]
        >>> selected = st.feedback("stars")
        >>> if selected is not None:
        >>>     st.markdown(f"You selected {sentiment_mapping[selected]} star(s).")

        .. output ::
            https://doc-feedback-stars.streamlit.app/
            height: 200px

        Display a feedback widget with thumbs, and show the selected sentiment:

        >>> import streamlit as st
        >>>
        >>> sentiment_mapping = [":material/thumb_down:", ":material/thumb_up:"]
        >>> selected = st.feedback("thumbs")
        >>> if selected is not None:
        >>>     st.markdown(f"You selected: {sentiment_mapping[selected]}")

        .. output ::
            https://doc-feedback-thumbs.streamlit.app/
            height: 200px

        )ra   rm   rn   zjThe options argument to st.feedback must be one of ['thumbs', 'faces', 'stars']. The argument passed was 'r   rn   Nr3   
borderless)r   r   r   ry   deserializer
serializerr   r   r   r}   r   )r   rt   r6   intrf   SelectionVisualizationONLY_SELECTEDALL_UP_TO_SELECTED_button_grouprL   rF   rC   )r?   rV   r   ry   r   r   r   transformed_optionsrs   r[   r}   	sentimentr@   r@   rA   r   
  s6   \r3   rv   )
r   r   format_funcr   r   r   r   r   ry   r   r   rK   OptionSequence[V]r   Literal['single']r   V | Noner   Callable[[Any], str] | Noner   r   r   r   c       
         C  r   r=   r@   r?   r   rV   r   r   r   r   r   r   r   r   ry   r   r@   r@   rA   ru        zButtonGroupMixin.pills)	r   r   r   r   r   r   r   ry   r   Literal['multi']Sequence[V] | V | Nonelist[V]c       
         C  r   r=   r@   r   r@   r@   rA   ru     r   ru   rY   list[V] | V | Nonec       
         C  $   | j |||||||d||	|
||dS )a`  Display a pills widget.

        A pills widget is similar to a ``st.selectbox`` or ``st.multiselect``
        where the ``options`` are displayed as pill-buttons instead of a
        drop-down list.

        Parameters
        ----------
        label: str
            A short label explaining to the user what this widget is for.
            The label can optionally contain GitHub-flavored Markdown of the
            following types: Bold, Italics, Strikethroughs, Inline Code, Links,
            and Images. Images display like icons, with a max height equal to
            the font height.

            Unsupported Markdown elements are unwrapped so only their children
            (text contents) render. Display unsupported elements as literal
            characters by backslash-escaping them. E.g.,
            ``"1\. Not an ordered list"``.

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

            For accessibility reasons, you should never set an empty label, but
            you can hide it with ``label_visibility`` if needed. In the future,
            we may disallow empty labels by raising an exception.

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

        options: Iterable of V
            Labels for the select options in an ``Iterable``. This can be a
            ``list``, ``set``, or anything supported by ``st.dataframe``. If
            ``options`` is dataframe-like, the first column will be used. Each
            label will be cast to ``str`` internally by default and can
            optionally contain GitHub-flavored Markdown, including the Markdown
            directives described in the ``body`` parameter of ``st.markdown``.

        selection_mode: "single" or "multi"
            The selection mode for the widget. If this is ``"single"``
            (default), only one option can be selected. If this is ``"multi"``,
            multiple options can be selected.

        default: Iterable of V, V, or None
            The value of the widget when it first renders. If the
            ``selection_mode`` is ``multi``, this can be a list of values, a
            single value, or ``None``. If the ``selection_mode`` is
            ``"single"``, this can be a single value or ``None``.

        format_func: function
            Function to modify the display of the options. It receives
            the raw option as an argument and should output the label to be
            shown for that option. This has no impact on the return value of
            the command. The output can optionally contain GitHub-flavored
            Markdown, including the Markdown directives described in the
            ``body`` parameter of ``st.markdown``.

        key: str or int
            An optional string or integer to use as the unique key for the widget.
            If this is omitted, a key will be generated for the widget
            based on its content. Multiple widgets of the same type may
            not share the same key.

        help: str or None
            A tooltip that gets displayed next to the widget label. Streamlit
            only displays the tooltip when ``label_visibility="visible"``. If
            this is ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        on_change: callable
            An optional callback invoked when this widget's value changes.

        args: tuple
            An optional tuple of args to pass to the callback.

        kwargs: dict
            An optional dict of kwargs to pass to the callback.

        disabled: bool
            An optional boolean that disables the widget if set to ``True``.
            The default is ``False``.

        label_visibility: "visible", "hidden", or "collapsed"
            The visibility of the label. The default is ``"visible"``. If this
            is ``"hidden"``, Streamlit displays an empty spacer instead of the
            label, which can help keep the widget alligned with other widgets.
            If this is ``"collapsed"``, Streamlit displays no label or spacer.

        Returns
        -------
        list of V, V, or None
            If the ``selection_mode`` is ``multi``, this is a list of selected
            options or an empty list. If the ``selection_mode`` is
            ``"single"``, this is a selected option or ``None``.

        Examples
        --------

        **Example 1: Multi-select pills**

        Display a multi-select pills widget, and show the selection:

        >>> import streamlit as st
        >>>
        >>> options = ["North", "East", "South", "West"]
        >>> selection = st.pills("Directions", options, selection_mode="multi")
        >>> st.markdown(f"Your selected options: {selection}.")

        .. output::
           https://doc-pills-multi.streamlit.app/
           height: 200px

        **Example 2: Single-select pills with icons**

        Display a single-select pills widget with icons:

        >>> import streamlit as st
        >>>
        >>> option_map = {
        ...     0: ":material/add:",
        ...     1: ":material/zoom_in:",
        ...     2: ":material/zoom_out:",
        ...     3: ":material/zoom_out_map:",
        ... }
        >>> selection = st.pills(
        ...     "Tool",
        ...     options=option_map.keys(),
        ...     format_func=lambda option: option_map[option],
        ...     selection_mode="single",
        ... )
        >>> st.write(
        ...     "Your selected option: "
        ...     f"{None if selection is None else option_map[selection]}"
        ... )

        .. output::
           https://doc-pills-single.streamlit.app/
           height: 200px

        ru   r   r   r   r   r   r   r   r   r   r   ry   r   _internal_button_groupr   r@   r@   rA   ru     s     !str | int | Nonec       
         C  r   r=   r@   r   r@   r@   rA   segmented_controlW  r   z"ButtonGroupMixin.segmented_controlc       
         C  r   r=   r@   r   r@   r@   rA   r   h  r   r   c       
         C  r   )a  Display a segmented control widget.

        A segmented control widget is a linear set of segments where each of
        the passed ``options`` functions like a toggle button.

        Parameters
        ----------
        label : str
            A short label explaining to the user what this widget is for.
            The label can optionally contain GitHub-flavored Markdown of the
            following types: Bold, Italics, Strikethroughs, Inline Code, Links,
            and Images. Images display like icons, with a max height equal to
            the font height.

            Unsupported Markdown elements are unwrapped so only their children
            (text contents) render. Display unsupported elements as literal
            characters by backslash-escaping them. E.g.,
            ``"1\. Not an ordered list"``.

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

            For accessibility reasons, you should never set an empty label, but
            you can hide it with ``label_visibility`` if needed. In the future,
            we may disallow empty labels by raising an exception.

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

        options: Iterable of V
            Labels for the select options in an ``Iterable``. This can be a
            ``list``, ``set``, or anything supported by ``st.dataframe``. If
            ``options`` is dataframe-like, the first column will be used. Each
            label will be cast to ``str`` internally by default and can
            optionally contain GitHub-flavored Markdown, including the Markdown
            directives described in the ``body`` parameter of ``st.markdown``.

        selection_mode: "single" or "multi"
            The selection mode for the widget. If this is ``"single"``
            (default), only one option can be selected. If this is ``"multi"``,
            multiple options can be selected.

        default: Iterable of V, V, or None
            The value of the widget when it first renders. If the
            ``selection_mode`` is ``multi``, this can be a list of values, a
            single value, or ``None``. If the ``selection_mode`` is
            ``"single"``, this can be a single value or ``None``.

        format_func: function
            Function to modify the display of the options. It receives
            the raw option as an argument and should output the label to be
            shown for that option. This has no impact on the return value of
            the command. The output can optionally contain GitHub-flavored
            Markdown, including the Markdown directives described in the
            ``body`` parameter of ``st.markdown``.

        key: str or int
            An optional string or integer to use as the unique key for the widget.
            If this is omitted, a key will be generated for the widget
            based on its content. Multiple widgets of the same type may
            not share the same key.

        help: str or None
            A tooltip that gets displayed next to the widget label. Streamlit
            only displays the tooltip when ``label_visibility="visible"``. If
            this is ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        on_change: callable
            An optional callback invoked when this widget's value changes.

        args: tuple
            An optional tuple of args to pass to the callback.

        kwargs: dict
            An optional dict of kwargs to pass to the callback.

        disabled: bool
            An optional boolean that disables the widget if set to ``True``.
            The default is ``False``.

        label_visibility: "visible", "hidden", or "collapsed"
            The visibility of the label. The default is ``"visible"``. If this
            is ``"hidden"``, Streamlit displays an empty spacer instead of the
            label, which can help keep the widget alligned with other widgets.
            If this is ``"collapsed"``, Streamlit displays no label or spacer.

        Returns
        -------
        list of V, V, or None
            If the ``selection_mode`` is ``multi``, this is a list of selected
            options or an empty list. If the ``selection_mode`` is
            ``"single"``, this is a selected option or ``None``.

        Examples
        --------

        **Example 1: Multi-select segmented control**

        Display a multi-select segmented control widget, and show the
        selection:

        >>> import streamlit as st
        >>>
        >>> options = ["North", "East", "South", "West"]
        >>> selection = st.segmented_control(
        ...     "Directions", options, selection_mode="multi"
        ... )
        >>> st.markdown(f"Your selected options: {selection}.")

        .. output::
           https://doc-segmented-control-multi.streamlit.app/
           height: 200px

        **Example 2: Single-select segmented control with icons**

        Display a single-select segmented control widget with icons:

        >>> import streamlit as st
        >>>
        >>> option_map = {
        ...     0: ":material/add:",
        ...     1: ":material/zoom_in:",
        ...     2: ":material/zoom_out:",
        ...     3: ":material/zoom_out_map:",
        ... }
        >>> selection = st.segmented_control(
        ...     "Tool",
        ...     options=option_map.keys(),
        ...     format_func=lambda option: option_map[option],
        ...     selection_mode="single",
        ... )
        >>> st.write(
        ...     "Your selected option: "
        ...     f"{None if selection is None else option_map[selection]}"
        ... )

        .. output::
           https://doc-segmented-control-single.streamlit.app/
           height: 200px

        r   r   r   r   r@   r@   rA   r   z  s     #r   )r   r   r   ry   r   r   r   r   r   r   r   r   r   %Literal['pills', 'segmented_control']c                  sz   t || d	 fdd}t|}t||}tt |||}| j|||||||||j|j||	|
||d}|dkr:|jS |jS )
Noptionr+   r;   ButtonGroupProto.Optionc                   s    r | nt | }|d}d}t|dkrD|d  }z|dr(t|}nt|r.|}|r9d|dd }W n	 tyC   Y nw t	j
||dS )zoIf option starts with a material icon or an emoji, we extract it to send
            it parsed to the frontend. Nr   z	:material   )contentrd   )rK   splitrM   strip
startswithr!   r    joinr   rf   rg   )r   transformedtransformed_partsrj   
maybe_iconr   r@   rA   _transformed_format_func@  s(   


zIButtonGroupMixin._internal_button_group.<locals>._transformed_format_func)r   r   ry   r   r   r   r   r   r   r   r   r   r   r   r4   )r   r+   r;   r   )	r   r   r   rU   r+   r   rF   rL   rC   )r?   rV   r   r   r   ry   r   r   r   r   r   r   r   r   r   indexable_optionsrW   r[   resr@   r   rA   r   ,  s6   

z'ButtonGroupMixin._internal_button_group)r   r   r   ry   r   r   r   r   r   r}   r   r   r   r   Sequence[Any]r:   r5   r   -Callable[[V], ButtonGroupProto.Option] | Noner   WidgetDeserializer[T]r   WidgetSerializer[T]r}   r~   RegisterWidgetResult[T]c                  sf  t | |dkrtjntj}|tjkr&|d ur&t|tr&t|dkr&td|dvr2td| dt|}|}|d urDt|dkrDd }t	| j
||
|d d	}t }t| j
} d u r]n fd
dtD }t|||||||d}t|||pzg ||||||||d}t|j|
||||	|dd}|jr|	|j|jd d < d|_|rt||  | j
|| |S )Nr3   r   zYThe default argument to `st.pills` must be a single value when `selection_mode='single'`.)r   ru   r   ziThe style argument must be one of ['borderless', 'pills', 'segmented_control']. The argument passed was 'r   r   rZ   button_groupc                   s   g | ]
\}} | qS r@   r@   )ri   index_r   r   r@   rA   rk     s    
z2ButtonGroupMixin._button_group.<locals>.<listcomp>)user_keyr   rV   r   r{   r   )r{   r}   r   r   r   r   int_array_value)on_change_handlerr   r   r   r   ctx
value_typeT)r   rf   SINGLE_SELECTMULTI_SELECT
isinstancer   rM   r   r   r   dgr   r   	enumerater   r   r   r   value_changedrC   	set_valuer   _enqueue)r?   r   r   r   r   ry   r   r   r   r   r   r   r   r}   r   r   r   parsed_selection_mode_defaultwidget_namer   r   rw   
element_idr   widget_stater@   r   rA   r   x  s   
	

zButtonGroupMixin._button_groupr$   c                 C  s
   t d| S )zGet our DeltaGenerator.r$   )r   )r?   r@   r@   rA   r     s   
zButtonGroupMixin.dg).)rV   r   r   r   ry   rz   r   r   r   r   r   r   r;   r   )rV   r   r   r   ry   rz   r   r   r   r   r   r   r;   r   )ra   )rV   r_   r   r   ry   rz   r   r   r   r   r   r   r;   r   )r   rK   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )r   rK   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )r   rK   rV   r   r   rY   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )r   rK   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )r   rK   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )r   rK   rV   r   r   rY   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ry   rz   r   r   r;   r   )rV   r   r   r   r   r   r   rY   ry   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r;   r   )"r   r   r   r   r   r:   r   r5   ry   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r}   r~   r   r   r   r   r   r   r;   r   )r;   r$   )rQ   rR   rS   r   r   r   ru   r   r   rf   r   r   r   propertyr   r@   r@   r@   rA   r      s   

z 0 2Our   )r^   r_   r;   r`   )rJ   rK   rw   rx   rW   rE   ry   rz   r   rK   r{   r|   r}   r~   r   r   r   r   r   r   r   r   r;   rf   )r   r5   )L
__future__r   collections.abcr   typingr   r   r   r   r   r	   r
   r   r   typing_extensionsr   !streamlit.elements.lib.form_utilsr   -streamlit.elements.lib.options_selector_utilsr   r   streamlit.elements.lib.policiesr   r   streamlit.elements.lib.utilsr   r   r   r   r   r   &streamlit.elements.widgets.multiselectr   streamlit.errorsr   streamlit.proto.ButtonGroup_pb2r   rf   streamlit.runtime.metrics_utilr   7streamlit.runtime.scriptrunner_utils.script_run_contextr   streamlit.runtime.stater   streamlit.string_utilr    r!   streamlit.type_utilr"   streamlit.dataframe_utilr#   streamlit.delta_generatorr$   r%   r&   r'   streamlit.runtime.state.commonr(   r)   r*   r+   r,   __annotations__r-   r/   r0   r1   r5   r6   rU   rt   r   r   r   r   r   r@   r@   r@   rA   <module>   sN   , "
"%
'	