
    ɯei                     `   d dl Z d dlZd dlmZ d dlmZ d dlZd dl	m
c mZ
 d dlmZ dZes e
j                  dd      Znde j"                  j%                  e j"                  j'                  e            Ze j"                  j-                  ed	      Z e
j                  de
      Zd Zd ZddZy)    N)nullcontextversion)StreamlitAPIExceptionTst_themezhttp://localhost:5173)urlzfrontend/dist)pathc                  6    t        d      } t        d|         y)z:Show the installed version of the Streamlit Theme package.zst-themezStreamlit Theme, version N)_versionprintr   s    Z/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/streamlit_theme/__init__.pyprint_versionr      s    z"G	%gY
/0    c                 |    d|  } d|  }d| d| d|  d}t        j                         }|j                  |       |S )aB  
    Add a spaceless container to the app.
    
    Insert a container into the app, which receives an iframe that does not
    render anything. Style this container using CSS and a unique key. The style
    targeting `"stVerticalBlockBorderWrapper"` removes 1rem of space added by
    the iframe. While the style targeting the div that contains the iframe
    changes its height from 1.5625rem to 0.

    Parameters
    ----------
    key : str, int or None
        A key associated with this container. This needs to be unique since all
        styles will be applied to the container with this key.

    Returns
    -------
    container : DeltaGenerator
        A container object. Elements can be added to this container using
        either the "with" notation or by calling methods directly on the
        returned object.
    	st_theme_z*div.element-container > div.stHtml > span.zQ
        <style>
            div[data-testid="stVerticalBlockBorderWrapper"]:has(zm) {
                margin-bottom: -1rem;
            }
            div[data-testid="stVerticalBlock"]:has(> zc) div:has(iframe) {
                height: 0;
            }
        </style>
        <span class='z	'></span>)st	containerhtml)keyselectorcssr   s       r   stylized_containerr   !   sl    . cU
C;C5AHAAI
 K6 7?Z @
 uI
	'  INN3r   c                    t        | t              s"t        dt        |       j                   d      t        |t
              s4t        |t              s$|"t        dt        |      j                   d      | rt        |      n	t               5  t        |d      }ddd       t        j                  |      S |S # 1 sw Y   "xY w)a	  
    Get the active theme of the Streamlit app.

    The function immediately returns the active theme, when it is called. If
    the user manually changes the theme, after the web app is already running,
    it updates the returned value.

    Parameters
    ----------
    adjust : bool, default=True
        If set to ``True``, which is the default, it makes a CSS adjustment and
        removes a space that would otherwise be added to the page by calling
        the ``st_theme`` function.

        Streamlit components are meant to render something in the web app, and
        Streamlit adds a space for them even when there is nothing to render.
        Since ``st_theme`` does not render anything, and only communicates with
        the frontend to fetch the active theme, it makes a CSS adjustment to
        remove this space.

        In most cases, the CSS adjustment does not interfere with the rest of
        the web app, however there could be some situations where this occurs.
        If this happens, or it is desired to disable it, pass ``False`` to
        `adjust` and, when necessary, make your own CSS adjustment with
        ``st.html``.
    key : str or int, optional
        A string or integer to use as a unique key for the component. Multiple
        ``st_themes`` may not share the same key. Defaults to ``None``.

    Returns
    -------
    theme : dict of {str : str} or None
        A dictionary with the style settings being used by the active theme of
        the Streamlit app, or ``None``, if for some reason it could not be
        fetched.

    Notes
    -----
    There is a known bug, that depends on the browser, where the theme is not
    returned immediately when the function is called. But it is returned
    normally when the user changes it.

    This can be a problem in determining the initial theme of the web app.
    Because, by default, Streamlit uses the user's operating system setting
    (which might be unknown) to automatically apply the light or dark mode to
    the app, when it is first rendered.

    To solve the issue, it is recommended to set a default theme configuration
    for the app (https://docs.streamlit.io/library/advanced-features/theming),
    and use its value in case of ``st_theme`` returning ``None``.

    Examples
    --------
    >>> import streamlit as st
    >>> from streamlit_theme import st_theme
    >>> theme = st_theme()
    >>> st.write(theme)
    
    .. output::
       https://st-theme-1.streamlit.app/
       height: 300px
    zYThe adjust parameter from st_theme() received an invalid type.

Expected: *bool*  
Got: **NzhThe key parameter from st_theme() received an invalid type.

Expected: *str* or *int* or *None*  
Got: *)r   )r   default)
isinstanceboolr   type__name__strintr   r   	_st_themejsonloads)adjustr   themes      r   r   r   L   s    @ fd##F|,,-Q0
 	
 c3
3(<#Cy))*!-
 	
 )/		$KM 1c401 !& 14::e<u<1 1s   B>>C)TN)osr#   
contextlibr   importlib.metadatar   r   	streamlitr   streamlit.components.v1
componentsv1streamlit.errorsr   _RELEASEdeclare_componentr"   r	   dirnameabspath__file__
parent_dirjoin	build_dirr   r   r    r   r   <module>r8      s    	  " 2  , , 2 ,
,,#I
 !:;JZ9I,
,,I1(VS=r   