
    ;3hf                        d 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
 ddlmZ ddlmZ ddlmZ erdd	lmZ  e
        G d
 de             Zy)zgr.HTML() component.    )annotations)CallableSequence)TYPE_CHECKINGAny)document)	Component)Events)I18nData)Timerc                       e Zd ZdZej
                  ej                  gZ	 dddddddddddddddd	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d fdZddZ	dd	Z
dd
ZddZddZ xZS )HTMLz
    Creates a component to display arbitrary HTML output. As this component does not accept user input, it is rarely used as an input component.

    Demos: blocks_scroll
    Guides: key-features
    NFTvalue)labeleveryinputs
show_labelvisibleelem_idelem_classesrenderkeypreserved_by_key
min_height
max_height	containerpaddingc               f    || _         || _        || _        t        |   ||||||||	|
|||       y)a?  
        Parameters:
            value: The HTML content to display. Only static HTML is rendered (e.g. no JavaScript. To render JavaScript, use the `js` or `head` parameters in the `Blocks` constructor). If a function is provided, the function will be called each time the app loads to set the initial value of this component.
            label: The label for this component. Is used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.
            every: Continously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
            inputs: Components that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.
            show_label: If True, the label will be displayed. If False, the label will be hidden.
            visible: If False, component will be hidden.
            elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
            elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
            render: If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
            key: in a gr.render, Components with the same key across re-renders are treated as the same component, not a new component. Properties set in 'preserved_by_key' are not reset across a re-render.
            preserved_by_key: A list of parameters from this component's constructor. Inside a gr.render() function, if a component is re-rendered with the same key, these (and only these) parameters will be preserved in the UI (if they have been changed by the user or an event listener) instead of re-rendered based on the values provided during constructor.
            min_height: The minimum height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. If HTML content exceeds the height, the component will expand to fit the content.
            max_height: The maximum height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. If content exceeds the height, the component will scroll.
            container: If True, the HTML component will be displayed in a container. Default is False.
            padding: If True, the HTML component will have a certain padding (set by the `--block-padding` CSS variable) in all directions. Default is True.
        )r   r   r   r   r   r   r   r   r   r   r   r   N)r   r   r   super__init__)selfr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	__class__s                   V/var/www/html/audio-gradio/venv/lib/python3.12/site-packages/gradio/components/html.pyr    zHTML.__init__   sQ    J %$!%- 	 	
    c                     yNz<p>Hello</p> r!   s    r#   example_payloadzHTML.example_payloadT       r$   c                     yr&   r'   r(   s    r#   example_valuezHTML.example_valueW   r*   r$   c                    |S )z
        Parameters:
            payload: string corresponding to the HTML
        Returns:
            (Rarely used) passes the HTML as a `str`.
        r'   )r!   payloads     r#   
preprocesszHTML.preprocessZ   s	     r$   c                    |S )z
        Parameters:
            value: Expects a `str` consisting of valid HTML.
        Returns:
            Returns the HTML string.
        r'   )r!   r   s     r#   postprocesszHTML.postprocessc   s	     r$   c                
    ddiS )Ntypestringr'   r(   s    r#   api_infozHTML.api_infol   s    !!r$   )N)r   zstr | Callable | Noner   zstr | I18nData | Noner   zTimer | float | Noner   z7Component | Sequence[Component] | set[Component] | Noner   boolr   r6   r   
str | Noner   list[str] | str | Noner   r6   r   z(int | str | tuple[int | str, ...] | Noner   r8   r   
int | Noner   r9   r   r6   r   r6   )returnr   )r.   r7   r:   r7   )r   r7   r:   r7   )r:   zdict[str, Any])__name__
__module____qualname____doc__r
   changeclickEVENTSr    r)   r,   r/   r1   r5   __classcell__)r"   s   @r#   r   r      s    mmV\\*F (,5
 (,&*JN "/38<3:!%!%#5
$5
 %	5

 $5
 H5
 5
 5
 5
 -5
 5
 65
 15
 5
 5
  !5
" #5
n"r$   r   N)r>   
__future__r   collections.abcr   r   typingr   r   gradio_client.documentationr   gradio.components.baser	   gradio.eventsr
   gradio.i18nr   gradio.componentsr   r   r'   r$   r#   <module>rK      sC     " . % 0 ,    ' 
Z"9 Z" Z"r$   