
    Mh                         d Z ddlmZ ddlmZ ddlmZmZmZ ddl	m
Z
 ddlmZ  G d d	e
          Z G d
 de          ZdS )zHTML slide show Exporter class    )deepcopy)warn)BoolUnicodedefault)Preprocessor   )HTMLExporterc                       e Zd ZddZdS )_RevealMetadataPreprocessorNc                    t          |          }|j        D ]Q}	 |j                            di                               dd          }n# t          $ r d}Y nw xY w||j        _        Rt          |j                  D ];\  }}|j        j        dvr(d|j        _        d|j        _        d|j        _        |} n<d}t          |          d}t          |j        |d	z   d          |d	z   
          D ]\  }}|j        |d	z
           }	|j        j        dk    rd|	j        _
        d|j        _        |j        j        dv r'||	j        _        d|	j        _        d|j        _        d}r|j        j        dk    rd|j        _        |rd|	j        _        d}||j        d         j        _        d|j        d         j        _        d|j        d         j        _
        ||fS )N	slideshow
slide_type->   skipnotesslideTz-All cells are hidden, cannot create slideshowFr	   )start>   r   subslidefragment)r   cellsmetadatagetAttributeErrorr   	enumerateslide_startsubslide_start
ValueError	slide_endfragment_endsubslide_endfragment_start)
selfnb	resourcescellr   indexfirst_slide_ixmsgin_fragmentprevious_cells
             Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/nbconvert/exporters/slides.py
preprocessz&_RevealMetadataPreprocessor.preprocess   s   b\\H 	2 	2D!!]..{B??CCLRUVV

! ! ! ! 


!'1DM$$ %RX.. 		" 		"KE4}'/@@@+2(,0)/3,!& A BCS//!$RXnq.@.B.B%CN]^L^``` 	' 	'KE4HUQY/M }'72237&0,0)}'+@@@6A&36:&3/3,#)Z77/3, ':>M*77"&K .9*-1**.'9}s   /A

AA)N)__name__
__module____qualname__r.        r-   r   r      s(        > > > > > >r3   r   c                       e Zd ZdZdZ ed          d             Z ed          d             Z ed          d             Z e	d	
          
                    d          Z ed          d             Z e	dd
          
                    d          Z e	dd
          
                    d          Z edd
          
                    d          Z e	dd
          
                    d          Z e	dd
          
                    d          Z e	dd
          
                    d          Z e	dd
          
                    d          Z fdZ xZS )SlidesExporterz"Exports HTML slides with reveal.jszReveal.js slidestemplate_namec                     dS )Nrevealr2   r$   s    r-   _template_name_defaultz%SlidesExporter._template_name_default[   s    xr3   file_extensionc                     dS )Nz.slides.htmlr2   r9   s    r-   _file_extension_defaultz&SlidesExporter._file_extension_default_   s    ~r3   template_extensionc                     dS )Nz.html.j2r2   r9   s    r-   _template_extension_defaultz*SlidesExporter._template_extension_defaultc   s    zr3   a,  The URL prefix for reveal.js (version 3.x).
        This defaults to the reveal CDN, but can be any url pointing to a copy
        of reveal.js.

        For speaker notes to work, this must be a relative path to a local
        copy of reveal.js: e.g., "reveal.js".

        If a relative path is given, it must be a subdirectory of the
        current directory (from which the server is run).

        See the usage documentation
        (https://nbconvert.readthedocs.io/en/latest/usage.html#reveal-js-html-slideshow)
        for more details.
        )helpT)configreveal_url_prefixc                 \    d| j         v r"t          dd           | j         j        j        S dS )Nz!RevealHelpPreprocessor.url_prefixzdPlease update RevealHelpPreprocessor.url_prefix to SlidesExporter.reveal_url_prefix in config files.   )
stacklevelz!https://unpkg.com/reveal.js@4.0.2)rB   r   RevealHelpPreprocessor
url_prefixr9   s    r-   _reveal_url_prefix_defaultz)SlidesExporter._reveal_url_prefix_defaultz   sE    .$+==D   
 ;5@@22r3   simplea(  
        Name of the reveal.js theme to use.

        We look for a file with this name under
        ``reveal_url_prefix``/css/theme/``reveal_theme``.css.

        https://github.com/hakimel/reveal.js/tree/master/css/theme has
        list of themes that ship by default with reveal.js.
        r   z
        Name of the reveal.js transition to use.

        The list of transitions that ships by default with reveal.js are:
        none, fade, slide, convex, concave and zoom.
        Fz=
        If True, enable scrolling within each slide
         z
        slide number format (e.g. 'c/t'). Choose from:
        'c': current, 't': total, 'h': horizontal, 'v': vertical
        z
        width used to determine the aspect ratio of your presentation.
        Use the horizontal pixels available on your intended presentation
        equipment.
        z
        height used to determine the aspect ratio of your presentation.
        Use the horizontal pixels available on your intended presentation
        equipment.
        zNhttps://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.csszY
        URL to load font awesome from.

        Defaults to loading from cdnjs.
        c                 <   t                                          |          }d|vri |d<   | j        |d         d<   | j        |d         d<   | j        |d         d<   | j        |d         d<   | j        |d         d<   | j        |d         d<   | j        |d         d<   |S )	Nr8   rH   theme
transitionscrollnumberheightwidth)	super_init_resourcesrC   reveal_themereveal_transitionreveal_scrollreveal_numberreveal_heightreveal_width)r$   r&   	__class__s     r-   rT   zSlidesExporter._init_resources   s    GG++I66	9$$"$Ih,0,B	(L)'+'8	(G$,0,B	(L)(,(:	(H%(,(:	(H%(,(:	(H%'+'8	(G$r3   )r/   r0   r1   __doc__export_from_notebookr   r:   r=   r@   r   tagrC   rI   rU   rV   r   rW   rX   rZ   rY   font_awesome_urlrT   __classcell__)r[   s   @r-   r5   r5   T   s|       ,, .W_   W   W!""  #"
     
cc " W !!3 3 "!3 7   
cc      
cc  D  
 
cc  G
   
cc  7
   
cc  G
   
cc  wX   
cc         r3   r5   N)r\   copyr   warningsr   	traitletsr   r   r   nbconvert.preprocessors.baser   htmlr
   r   r5   r2   r3   r-   <module>rf      s    $ $
             , , , , , , , , , , 5 5 5 5 5 5      A A A A A, A A AH} } } } }\ } } } } }r3   