
    g)                        U d dl mZ d dlmZ d dl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 erd d	lmZ d d
lmZ  G d de      Zeeed   df   Zded<   eeedf   Zded<    G d d      Zy)    )annotations)Enum)TYPE_CHECKINGLiteralUnioncast)	TypeAlias)StreamlitAPIException)Heading)gather_metrics)
clean_text)DeltaGenerator)SupportsStrc                      e Zd ZdZdZdZy)HeadingProtoTagh1h2h3N)__name__
__module____qualname__	TITLE_TAG
HEADER_TAGSUBHEADER_TAG     O/var/www/openai/venv/lib/python3.12/site-packages/streamlit/elements/heading.pyr   r       s    IJMr   r   FNr	   AnchorDividerc                     e Zd Z ed      	 dddd	 	 	 	 	 	 	 	 	 dd       Z ed      	 dddd	 	 	 	 	 	 	 	 	 dd       Z ed      	 ddd		 	 	 	 	 	 	 dd
       Zedd       Ze	dd       Z
e		 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd       Zy)HeadingMixinheaderNF)helpdividerc          
         | j                   j                  dt        j                  t        j
                  ||||            S )u  Display text in header formatting.

        Parameters
        ----------
        body : str
            The text to display as 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

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the header. 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``.

        divider : bool or “blue”, “green”, “orange”, “red”, “violet”, “gray”/"grey", or “rainbow”
            Shows a colored divider below the header. If True, successive
            headers will cycle through divider colors. That is, the first
            header will have a blue line, the second header will have a
            green line, and so on. If a string, the color can be set to one of
            the following: blue, green, orange, red, violet, gray/grey, or
            rainbow.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.header("_Streamlit_ is :blue[cool] :sunglasses:")
        >>> st.header("This is a header with a divider", divider="gray")
        >>> st.header("These headers have rotating dividers", divider=True)
        >>> st.header("One", divider=True)
        >>> st.header("Two", divider=True)
        >>> st.header("Three", divider=True)
        >>> st.header("Four", divider=True)

        .. output::
           https://doc-header.streamlit.app/
           height: 600px

        headingtagbodyanchorr#   r$   )dg_enqueuer!   _create_heading_protor   r   selfr)   r*   r#   r$   s        r   r"   zHeadingMixin.header+   sG    z ww..#.. / 	
 		
r   	subheaderc          
         | j                   j                  dt        j                  t        j
                  ||||            S )u  Display text in subheader formatting.

        Parameters
        ----------
        body : str
            The text to display as 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

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the subheader. 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``.

        divider : bool or “blue”, “green”, “orange”, “red”, “violet”, “gray”/"grey", or “rainbow”
            Shows a colored divider below the header. If True, successive
            headers will cycle through divider colors. That is, the first
            header will have a blue line, the second header will have a
            green line, and so on. If a string, the color can be set to one of
            the following: blue, green, orange, red, violet, gray/grey, or
            rainbow.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.subheader("_Streamlit_ is :blue[cool] :sunglasses:")
        >>> st.subheader("This is a subheader with a divider", divider="gray")
        >>> st.subheader("These subheaders have rotating dividers", divider=True)
        >>> st.subheader("One", divider=True)
        >>> st.subheader("Two", divider=True)
        >>> st.subheader("Three", divider=True)
        >>> st.subheader("Four", divider=True)

        .. output::
           https://doc-subheader.streamlit.app/
           height: 500px

        r&   r'   )r+   r,   r!   r-   r   r   r.   s        r   r0   zHeadingMixin.subheaders   sG    z ww..#11 / 	
 		
r   title)r#   c          	         | j                   j                  dt        j                  t        j
                  |||            S )a  Display text in title formatting.

        Each document should have a single `st.title()`, although this is not
        enforced.

        Parameters
        ----------
        body : str
            The text to display as 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

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the title. 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``.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.title("This is a title")
        >>> st.title("_Streamlit_ is :blue[cool] :sunglasses:")

        .. output::
           https://doc-title.streamlit.app/
           height: 220px

        r&   )r(   r)   r*   r#   )r+   r,   r!   r-   r   r   )r/   r)   r*   r#   s       r   r2   zHeadingMixin.title   sA    d ww..#--Dd / 
 	
r   c                    t        d|       S )zGet our DeltaGenerator.r   )r   )r/   s    r   r+   zHeadingMixin.dg   s     $d++r   c                ~    | du ryg d}| |v rt        t        |       S t        d|  ddj                  |       d      )NTauto)bluegreenorangeredvioletgraygreyrainbowz&Divider parameter has invalid value: `z`. Please choose from: z, .)r   strr
   join)r$   valid_colorss     r   _handle_divider_colorz"HeadingMixin._handle_divider_color   sY    d?	
 l"W%%'8	AXY]YbYbcoYpXqqrs r   c                X   t               }| j                  |_        t        |      |_        |rt
        j                  |      |_        |W|du rd|_        nKt        |t              r||_        n3|du rt        d|z        t        dt        |      j                  z        |r||_        |S )NFTzSAnchor parameter has invalid value: %s. Supported values: None, any string or FalsezRAnchor parameter has invalid type: %s. Supported values: None, any string or False)HeadingProtovaluer(   r   r)   r!   rC   r$   hide_anchor
isinstancer@   r*   r
   typer   r#   )r(   r)   r*   r#   r$   protos         r   r-   z"HeadingMixin._create_heading_proto  s     II	%
(>>wGEM$(!FC(%4+BDJK 
 ,B6l++,  EJr   )N)
r)   r   r*   r   r#   
str | Noner$   r   returnr   )r)   r   r*   r   r#   rK   rL   r   )rL   r   )r$   r   rL   r@   )NNF)r(   r   r)   r   r*   r   r#   rK   r$   r   rL   rE   )r   r   r   r   r"   r0   r2   propertyr+   staticmethodrC   r-   r   r   r   r!   r!   *   s   H E

   E
E
 E

 E
 E
 
E
 E
N K  E

   E
E
 E

 E
 E
 
E
 !E
N G 6

  6
6
 6

 6
 
6
 6
p , ,  (     	
  
 r   r!   )
__future__r   enumr   typingr   r   r   r   typing_extensionsr	   streamlit.errorsr
   streamlit.proto.Heading_pb2r   rE   streamlit.runtime.metrics_utilr   streamlit.string_utilr   streamlit.delta_generatorr   streamlit.type_utilr   r   r@   r   __annotations__boolr   r!   r   r   r   <module>r[      st    #  6 6 ' 2 ? 9 ,8/d  #wu~t34	 44d?+ +D Dr   