
    ch$                        S SK Jr  S SKrS SKrS SKJrJr  S SKJrJ	r	J
r
  S SKJrJrJr  S SKJr  S SKJr  S SKJrJrJrJr  \(       a  S S	KJr  SS
 jr " S S5      rg)    )annotationsN)ChainMapUserDict)TYPE_CHECKINGAnycast)LayoutConfigWidthWithoutContentvalidate_width)Json)gather_metrics)is_custom_dictis_list_likeis_namedtupleis_pydantic_model)DeltaGeneratorc                X    [        U [        5      (       a  [        U 5      $ [        U 5      $ )zTA repr function for json.dumps default arg, which tries to serialize sets
as lists.
)
isinstancesetlistrepr)os    jC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\streamlit/elements/json.py_ensure_serializationr   (   s#     !C((475d1g5    c                  `    \ rS rSr\" S5      SSS.       S
S jj5       r\SS j5       rSrg	)	JsonMixin/   jsonTstretch)expandedwidthc               j   [        U5      (       a  UR                  5       n[        U5      (       a  UR                  5       n[	        U[
        [        R                  [        45      (       d  [        U5      (       a  [        U5      n[        U5      (       a  [        U5      n[	        U[        5      (       d   [        R                  " U[         S9n[)        5       nXl        [	        U[,        5      (       a  X%l        O;[	        U[0        5      (       a  SUl        X%l        O[#        S[5        U5       S35      e[7        U5        [9        US	9nU R$                  R;                  S
XVS9$ ! ["         aC  nU R$                  R'                  SU S35        [        R                  " US[         S9n SnANSnAff = f)a\  Display an object or string as a pretty-printed, interactive JSON string.

Parameters
----------
body : object or str
    The object to print as JSON. All referenced objects should be
    serializable to JSON as well. If object is a string, we assume it
    contains serialized JSON.

expanded : bool or int
    The initial expansion state of the JSON element. This can be one
    of the following:

    - ``True`` (default): The element is fully expanded.
    - ``False``: The element is fully collapsed.
    - An integer: The element is expanded to the depth specified. The
      integer must be non-negative. ``expanded=0`` is equivalent to
      ``expanded=False``.

    Regardless of the initial expansion state, users can collapse or
    expand any key-value pair to show or hide any part of the object.

width : "stretch" or int
    The width of the JSON element. This can be one of the following:

    - ``"stretch"`` (default): The width of the element matches the
      width of the parent container.
    - An integer specifying the width in pixels: The element has a
      fixed width. If the specified width is greater than the width of
      the parent container, the width of the element matches the width
      of the parent container.

Example
-------
>>> import streamlit as st
>>>
>>> st.json(
...     {
...         "foo": "bar",
...         "stuff": [
...             "stuff 1",
...             "stuff 2",
...             "stuff 3",
...         ],
...         "level1": {"level2": {"level3": {"a": "b"}}},
...     },
...     expanded=2,
... )

.. output::
   https://doc-json.streamlit.app/
   height: 385px

)defaultzqWarning: this data structure was not fully serializable as JSON due to one or more unexpected keys.  (Error was: )T)skipkeysr$   Nz	The type z5 of `expanded` is not supported, must be bool or int.)r"   r   )layout_config)r   to_dictr   _asdictr   r   typesMappingProxyTyper   r   dictr   r   strr   dumpsr   	TypeErrordgwarning	JsonProtobodyboolr!   intmax_expand_depthtyper   r	   _enqueue)selfr3   r!   r"   err
json_protor'   s          r   r   JsonMixin.json0   sv   ~ $<<>D<<>D8U33X>
 
t$$:D:D$$$Vzz$0EF [
h%%"*#&&"&J*2'DN+ ,) ) 
 	u$51ww
PP1  VMMPEQRT zz$?TUVs   7E% %
F2/9F--F2c                    [        SU 5      $ )zGet our DeltaGenerator.r   )r   )r9   s    r   r0   JsonMixin.dg   s     $d++r    N)r3   objectr!   z
bool | intr"   r
   returnr   )rA   r   )	__name__
__module____qualname____firstlineno__r   r   propertyr0   __static_attributes__r?   r   r   r   r   /   sh    F
  $%.hQhQ 	hQ
 #hQ 
hQ hQT , ,r   r   )r   r@   rA   zstr | list[Any])
__future__r   r   r*   collectionsr   r   typingr   r   r   #streamlit.elements.lib.layout_utilsr	   r
   r   streamlit.proto.Json_pb2r   r2   streamlit.runtime.metrics_utilr   streamlit.type_utilr   r   r   r   streamlit.delta_generatorr   r   r   r?   r   r   <module>rP      sN    #   * + + 
 7 9  86o, o,r   