o
    i                     @   s0   d Z ddlmZ ddlmZ G dd deZdS )zModule containing a preprocessor that converts outputs in the notebook from
one format to another.

Converts all of the outputs in a notebook from one format to another.
    )Unicode   )Preprocessorc                       sT   e Zd ZdZeddjddZeddjddZ fddZd	d
 Z	dd Z
  ZS )ConvertFiguresPreprocessorzO
    Converts all of the outputs in a notebook from one format to another.
    zFormat the converter accepts)helpT)configzFormat the converter writesc                    s   t  jdi | dS )z$
        Public constructor
        N )super__init__)selfkw	__class__r   a/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/nbconvert/preprocessors/convertfigures.pyr
      s   z#ConvertFiguresPreprocessor.__init__c                 C   s   t  )zConvert the figure.)NotImplementedError)r   data_formatdatar   r   r   convert_figure   s   z)ConvertFiguresPreprocessor.convert_figurec                 C   sZ   | dg D ]"}|jdv r(| j|jv r(| j|jvr(| | j|j| j |j| j< q||fS )zK
        Apply a transformation on each cell,

        See base.py
        outputs>   display_dataexecute_result)getoutput_typefrom_formatr   	to_formatr   )r   cell	resources
cell_indexoutputr   r   r   preprocess_cell    s   
z*ConvertFiguresPreprocessor.preprocess_cell)__name__
__module____qualname____doc__r   tagr   r   r
   r   r   __classcell__r   r   r   r   r      s    r   N)r#   	traitletsr   baser   r   r   r   r   r   <module>   s    