
    LeWf                     H   d Z ddlZddlZddlmZ ddlmZ ddlmZm	Z	 ddl
ZddlZddlmZ ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddl
mZ ddlmZmZmZmZ ddlmZ ddl m!Z" ddl#m$Z% ddl&m'Z' ddl(m)Z) ddl*m!Z! 	 ddlm+Z, n# e-$ r	 ddl*m,Z, Y nw xY wddl.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZC ddlDmEZEmFZFmGZG  eejH                  ZIdZJd ZKd!ZLd"ZMd#ZNd$eJeJeJeKeKeLeMeNd%	ZOd&d'd(d)d*d+d,d-d.d/d0d1dd2ZPd3ZQ G d4 d5e8          ZRdS )6zj
Public API for all plotting renderers supported by HoloViews,
regardless of plotting package or backend.
    N)contextmanager)partial)BytesIOStringIO)Document)	file_html)curdoc)CDNINLINE)Version)config)	ipywidgetload_notebookrender_mimebundlerender_model)state)CommManager)	HoloViews)Viewable)
PlayerBase)JupyterCommManagerBinary)JupyterCommManager)
bothmethod   )AdjointLayout
DynamicMapHoloMapLayout)disable_pipeline)Exporter)
CompositorSkipRenderingStoreStoreOptions)unbound_dimensions)Stream   )Plot)collatedisplayableinitialize_dynamiczN<img src='{src}' style='max-width:100%; margin: auto; display: block; {css}'/>z
<video controls style='max-width:100%; margin: auto; display: block; {css}'>
<source src='{src}' type='{mime_type}'>
Your browser does not support the video tag.
</video>zU<iframe src='{src}' style='width:100%; margin: auto; display: block; {css}'></iframe>z{src}z,<div>Cannot render {mime_type} in HTML</div>zdata:{mime_type};base64,{b64})	base64svgpnggifwebmmp4pdfhtmlpgfzimage/svg+xmlz	image/pngz	image/gifz
video/webmz	video/mp4zapplication/pdfztext/pgf	text/htmlz	text/jsonzapplication/javascriptz&application/vnd.holoviews_exec.v0+jsonz&application/vnd.holoviews_load.v0+json)r-   r.   r/   r0   r1   r2   r4   r3   jsonjsjlab-hv-execzjlab-hv-loadserverz.
<html>
  <body>
    {html}
  </body>
</html>
c                   .    e Zd ZdZ ej        dd          Z ej        d          Z ej	        dd          Z
 ej        d	d	gd
          Z ej        dd          Z ej        d	g dd          Z ej        dddgd          Z ej	        dd          Z ej        ddg dd          Z ej        dddgd          Z ej        i d          Z ej        dddd          Z ej        dddd          Z ej        g g dd           Zdd	gdd	gd!ZeZd"d#gZd$Zi Zd$Z  fd%Z!dBd&Z"e#dCd'            Z$e#dDd(            Z%d) Z&d* Z'dEd,Z(dFd-Z)dGd.Z*d/ Z+dHd0Z,e#d1             Z-e#	 	 dId3            Z.e#d4             Z/e#dJd6            Z0e#dDd7            Z1e2d8             Z3e2d9             Z4e#	 	 dKd;            Z5e#d<             Z6e#d=             Z7e2e8d>                         Z9e2d?             Z:e2dLd@            Z;e2dA             Z< xZ=S )MRenderera0  
    The job of a Renderer is to turn the plotting state held within
    Plot classes into concrete, visual output in the form of the PNG,
    SVG, MP4 or WebM formats (among others). Note that a Renderer is a
    type of Exporter and must therefore follow the Exporter interface.

    The Renderer needs to be able to use the .state property of the
    appropriate Plot classes associated with that renderer in order to
    generate output. The process of 'drawing' is execute by the Plots
    and the Renderer turns the final plotting state into output.
    Tz#
        Whether to center the plot)defaultdocz
        The full, lowercase name of the rendering backend or third
        part plotting package used e.g. 'matplotlib' or 'cairo'.r=   Nz5
        The render resolution in dpi (dots per inch)autozc
        Output render format for static figures. If None, no figure
        rendering will occur. )r<   objectsr=      z?
        Rendered fps (frames per second) for animated formats.)scrubberwidgetsNr?   zu
        Output render multi-frame (typically animated) format. If
        None, no multi-frame rendering will occur.r<   r9   z
        Whether to render the object in regular or server mode. In server
        mode a bokeh Document will be returned which can be served as a
        bokeh server app. By default renders all output is rendered to HTML.d   z/
        The rendered size as a percentage size)leftbottomrighttoptop_left	top_rightbottom_leftbottom_rightleft_topleft_bottom	right_topright_bottomz:
        The position of the widgets relative to the plot.)r<   
allow_Noner@   r=   embedlivez~
        The widget mode determining whether frames are embedded or generated
        'live' when interacting with the widget.zI
        Dictionary of CSS attributes and values to apply to HTML output.zD
        Renderers do not support the saving of object info metadata)r<   rQ   constantr=   zC
        Renderers do not support the saving of object key metadata)r-   r.   aL  
       Optional dictionary of hooks that are applied to the rendered
       data (according to the output format) before it is returned.

       Each hook is passed the rendered data and the object that is
       being rendered. These hooks allow post-processing of rendered
       data before output is saved to file or displayed.)figholomaprB   rC   Fc                 H    d | _          t                      j        di | d S )N )	last_plotsuper__init__)selfparams	__class__s     ;lib/python3.11/site-packages/holoviews/plotting/renderer.pyr[   zRenderer.__init__   s-    ""6"""""    c                 z   |                      ||          \  }}|t          |         d}|d |fS | j        dk    r,|                     ||                    d                    |fS t          |t                    r|                     |          |fS  | j        ||fi |}| 	                    |||          }||fS )N)file-ext	mime_typer9   r=   r>   )
	_validate
MIME_TYPESmode
server_docget
isinstancer   static_html_figure_data_apply_post_render_hooks)r\   objfmtkwargsplotinfodatas          r_   __call__zRenderer.__call__   s    NN3,,	cjo>><:Y(""??4VZZ->->???EEh'' 	##D))4//$4$T399&99D00sC@@D:r`   c                 p   t          |t                    rP|j        rId                    d |j        D                       }d}t	          |                    |                    t          |           |s+| }t          | t                    s|                                 }t          |t                    s0t          |          st          |          }t          |           t                      5  t          j        |d| j                  }ddd           n# 1 swxY w Y   t!          |                     || j                  fi |}t          |t&                    rt)          |          } |                     |          |fd|i|}	d	 |	j        D             }
t/          d
 t1          |	j        d         |
          D                       }|	                    |           n|}	g }|	                                D ]=}t9          |d          s|j        D ]}||vr|                    |           g |_        >|D ]}t?          j         |g           t          | t                    r|	| _!        |r||	_"        |s| j#        dk    r,|#| j$        rtK                      ntM                      }||	_'        |	S )zR
        Given a HoloViews Viewable return a corresponding plot instance.
        z, c              3      K   | ]}|V  d S NrX   ).0dims     r_   	<genexpr>z$Renderer.get_plot.<locals>.<genexpr>   s$      AACZAAAAAAr`   zDynamicMap cannot be displayed without explicit indexing as {dims} dimension(s) are unbounded. 
Set dimensions bounds with the DynamicMap redim.range or redim.values methods.)dimsrr   )rf   backendNrendererc                     g | ]	}|j         
S rX   )r<   )rw   kds     r_   
<listcomp>z%Renderer.get_plot.<locals>.<listcomp>   s    ===r
===r`   c              3   (   K   | ]\  }}||n|V  d S rv   rX   )rw   vds      r_   ry   z$Renderer.get_plot.<locals>.<genexpr>   s>       : :tq!!)QQ : : : : : :r`   r   _triggerr9   )(ri   r   	unboundedjoinr"   formatr+   r;   instancer(   r*   r)   r   r!   mapr{   dictplot_optionssizer   r   plotting_class
dimensionstuplezipkeysupdatetraversehasattrr   appendr&   triggerrY   commrf   notebook_contextr   r	   document)self_or_clsrm   r=   r|   r   ro   rz   msg	plot_optsrp   defaultsinit_keytriggerspr   s                  r_   get_plotzRenderer.get_plot   sU   
 c:&& 	73= 	799AA3=AAAAAD.C  


 5 5666 	3 	2"Hk844 2&//11#t$$ 	s## (cll"3'''!## T T nSv{?RSSST T T T T T T T T T T T T T T[55c;;KLL ' '%' 'I#}-- "Skk2;--c223 @ @ @5>@ @D==T_===H : : 1x88: : : : :HKK!!!!D  	 	A1j)) : - -(**OOG,,,AJJ 	& 	&GNG9%%%%k8,, 	)$(K! 	DI 	 ;#x//{$/$@NhjjjfhhDMs   3DD #D c                 Z    t          |t                    s | j        d||d|}|j        S )zO
        Given a HoloViews Viewable return a corresponding plot state.
        )rm   r|   rX   )ri   r(   r   r   )r   rm   r|   ro   s       r_   get_plot_statezRenderer.get_plot_state  s>    
 #t$$ 	M&+&L3LLVLLCyr`   c           	         t          |t                    r|dfS | j        d         }| j        d         }|                    d t          g          }t          d |D                       }|dv rLt          d |D                       r| j        dv r|d         n| j        }n| j        d	k    r|d         n| j        }|| j        v r| 	                    ||          }d}n=|s| j
        r$|dk    rt          || j        | j        | 
          }n | j        |fd| i|}t          ||z             }	||	vr t!          d|d| j        d||z             || _        ||fS )z
        Helper method to be used in the __call__ method to get a
        suitable plot or widget object and the appropriate format.
        r3   rU   rV   c                     | S rv   rX   xs    r_   <lambda>z$Renderer._validate.<locals>.<lambda>   s    ! r`   c              3   @   K   | ]}t          |t                    V  d S rv   )ri   r   )rw   ms     r_   ry   z%Renderer._validate.<locals>.<genexpr>!  s,      BBAjJ//BBBBBBr`   )r?   Nc              3      K   | ]N}t          |          d k    p6t          |t                    o!t          |j        |j        |j                   V  OdS )r'   )no_duplicatesN)lenri   r   r%   streamskdimspositional_stream_args)rw   os     r_   ry   z%Renderer._validate.<locals>.<genexpr>$  s       & &
  q66A: S*Q
";"; #R"4&'i&'g898P4P#R #R #R& & & & & &r`   r   r?   )centerr{   r|   r|   zFormat z not supported by mode z. Allowed formats: )ri   r   mode_formatsr   r   anyrV   rU   rC   
get_widget_render_with_panelHoloViewsPaner   r{   r   set	Exceptionrf   rY   )
r\   rm   rn   ro   fig_formatsholomap_formatsholomapsdynamicrp   all_formatss
             r_   rd   zRenderer._validate  s   
 c8$$ 	;'.+I6<<gY77BBBBBBB.   & &
 %& & & & & I -1LN,J,Joa((PTP\(,F(:(:k!nn$,??3,,DCC 	?0 	?SF]] T[$,*.0 0 0DD !4=>>t>v>>D+788k!!  Fc  F  FDI  F  Fdo  sB  eB  F  F  G  G  GSyr`   c                     | j                             |g           }|D ]F}	  |||          }# t          $ r*}| j                            d|d|            Y d}~?d}~ww xY w|S )z:
        Apply the post-render hooks to the data.
        zThe post_render_hook z could not be applied:

 N)post_render_hooksrh   r   paramwarning)r\   rr   rm   rn   hookshookes          r_   rl   z!Renderer._apply_post_render_hooks=  s     &**3r22 	; 	;D;tD# ; ; ;
"" $:4 $: $:67$: $: ; ; ; ; ; ; ; ;; s   .
A" AA"r
   c                    |                      ||          \  }} | ||fi |\  }}t          |t                    r|                                }|| j        }t          |t
                    rNt                      }	|                    |	           |dk    rt          }n|dk    rt          }t          |	|          S |dv r|S |dk    r|                    d          }n5|dk    r/d|vr+|                     |          \  }}
d	|
| j        z  d
z  z  |d<   t          |t                    r2d                    d |                                D                       }nt#          d          t%          j        |                              d          }t*          |         t,          |         }}t,          d                             ||          }|                    |||          }|S )z
        Renders plot or data structure and wraps the output in HTML.
        The comm argument defines whether the HTML output includes
        code to initialize a Comm, if the plot supplies one.
        Ncdninline)r3   r6   r-   zutf-8r2   heightz%dpxgffffff?z; c              3   *   K   | ]\  }}| d | V  dS )z: NrX   )rw   kr   s      r_   ry   z Renderer.html.<locals>.<genexpr>g  s0      @@DAqqKKAKK@@@@@@r`   z)CSS must be supplied as Python dictionaryr,   )rc   b64)srcrc   css)rd   ri   strlowerr   r   r   _render_modelr
   r   r   encodeget_sizedpir   r   items
ValueErrorr,   	b64encodedecodere   	HTML_TAGSr   )r\   rm   rn   r   	resourcesro   rp   figdata_r=   hr   rc   tagr   r3   s                   r_   r3   zRenderer.htmlJ  s    ^^C--	cT$..v..
i%% 	*!))I;dhdH%% 	7**Cs###E!!		h&&"	S),,,$$$NE\\nnW--GGE\\hc11==&&DAq"ajo6CMc4   	J))@@CIIKK@@@@@CCHIIIw''..w77%c?IcNC!((9#(FFzzcYCz@@r`   c                    t          |t                    r|}n|                     ||          \  }}t          |t                    s$ | j        ||fddi|}d|it
          d         i ifS t          t          j        	                                          }|j
                            d           }d\  }	}
|D ]8|	t          t                    z  }	|
t          fd|D                       z  }
9|	p|
p
| j        dk     pt          j        }|st          j        d	k    r|                     |||          S |                     |          S )
z
        Returns data and metadata dictionaries containing HTML and JS
        components to include render in app, notebook, or standalone
        document.
        	as_scriptTr5   r8   c                     | S rv   rX   r   s    r_   r   z%Renderer.components.<locals>.<lambda>  s     r`   )FFc              3   b   K   | ])\  }}|D ]!}|u p|j         d uo|j         j         k    V  "*d S rv   )_plot_id)rw   r   r   ssources       r_   ry   z&Renderer.components.<locals>.<genexpr>  sm         Cg 12 v_#,d":"^s|v?^      r`   rS   r<   )ri   r(   rd   r   rk   re   listr&   registryr   objectr   r   r   widget_moder   rR   comms_render_panel_render_ipywidget)r\   rm   rn   r   ro   rp   r3   r   r@   r   r   rR   r   s               @r_   
componentszRenderer.componentsq  s    c4   	1DDsC00ID#$)) 	I$4$T3II$I&IID&N)CR(HHH--//00+&&{{33' 	 	Fz&*555Gs    $,     GG FFD,<,FGW6< 	9FLI--%%dE4888%%d+++r`   c                 <   |r| j                                         nd }t                      }t          j        |          5  |j                            ||          }d d d            n# 1 swxY w Y   |rt          ||          S |j        d         }t          |j
        |          }| j                             t          |j        ||          t          |j        |          t          |j        |                    }|j
        |_        t#          ||||          S )N)rR   id)comm_idplot_id)on_msgon_error	on_stdout)comm_managerget_server_commr   r   r   layoutr   r   refPnCommManagerr   get_client_commr   _on_msg	_on_error
_on_stdoutclient_comm_idr   )	r\   rp   rR   r   r=   modelr   managerclient_comms	            r_   r   zRenderer._render_panel  sK   6:Dt 00222jjZe$$$ 	9 	9K--c488E	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	-t,,,io==='774<g66T^S11dos33 8 
 

 "- T7;;;s   A))A-0A-c                 Z   t          |d          }t          |d          r|                                i fS t          |          }t	          |          dk    r|d d         dz   }d|i}|j        dd|j        d	|d
<   t          j        dk    rddl	m
}  ||d           ddii fS |i fS )NT)combine_events_repr_mimebundle_n   u   …z
text/plainr   r   )version_majorversion_minormodel_idz(application/vnd.jupyter.widget-view+jsonvscode)display)rawr5   z!<div style="display: none"></div>)r   r   r  reprr   
_view_name	_model_idr   r   IPython.displayr	  )r\   rp   widget	plaintextrr   r	  s         r_   r   zRenderer._render_ipywidget  s    45556.// 	2++--r11LL	y>>C!$3$%/Ii((!"!"",@ @D;<
 <8##//////GDd####!DErIIRxr`   c                     t                      }|                     |||           |                    d           |                                S )z
        Generates a static HTML with the rendered object in the
        supplied format. Allows supplying a template formatting string
        with fields to interpolate 'js', 'css' and the main 'html'.
        r   )r   saveseekread)r\   rm   rn   template
html_bytess        r_   rj   zRenderer.static_html  sE     ZZ
		#z3'''   r`   c                     |dk    r
| j         pd}nd}| j         pd}t          ||| j        ||           }t          d| j        z  dz            }|j                            t                    D ]	}||_        
|S )NrB   rF   
individualrG   )widget_typer   widget_locationr|   g      ?i  )	r  r   r   intfpsr   selectr   interval)r   rp   r  ro   r  r   r  players           r_   r   zRenderer.get_widget  s    *$$)9EXOO&K)9DWOt[EW/>V V V;?*d233m**:66 	' 	'F&FOOr`    c                     || j         ddgz   vrt          d          |                     ||                              |           dS )am  
        Render and export object as a widget to a static HTML
        file. Allows supplying a custom template formatting string
        with fields to interpolate 'js', 'css' and the main 'html'
        containing the widget. Also provides options to export widget
        data to a json file in the supplied json_path (defaults to
        current path).
        r?   Nz?Renderer.export_widget may only export registered widget types.)rC   r   r   r  )r   rm   filenamern   r  r6   	json_pathro   s           r_   export_widgetszRenderer.export_widgets  s\     k)64.888 8 9 9 9sC((--h77777r`   c                 N    | j         dv rd}| j        pd}nd}| j        pd}||ddS )N)r?   rC   r  rG   rB   rF   T)r  r  r   )rV   r  )r   r  locs      r_   _widget_kwargszRenderer._widget_kwargs  sG    "555&K-8CC$K-9C#&{dSSSr`   r   c                     t          |t                    r|}n't          |f| j        | d|                                 }|r|                    |||          S |rd|ini } |j        dd|i|S )a  
        Creates a bokeh app from a HoloViews object or plot. By
        default simply attaches the plot to bokeh's curdoc and returns
        the Document, if show option is supplied creates an
        Application instance and displays it either in a browser
        window or inline if notebook extension has been loaded.  Using
        the new_window option the app may be displayed in a new
        browser tab once the notebook extension has been loaded.  A
        websocket origin is required when launching from an existing
        tornado server (such as the notebook) and it is not on the
        default port ('localhost:8888').
        )r{   r|   )shownotebook_urlportNrX   )ri   r   r{   r'  _get_serverapp)r   rp   r)  
new_windowwebsocket_originr+  panero   s           r_   r-  zRenderer.app  s     dM** 	ADD  A{/B[ A A#.#=#=#?#?A AD 	1##D*:#FFF;KSn&677QSF48000000r`   c                     t          |t                    s't          |f| | j        d|                                 }|j                            |          S )z
        Get a bokeh Document with the plot attached. May supply
        an existing doc, otherwise bokeh.io.curdoc() is used to
        attach the plot to the global document instance.
        )r|   r{   )ri   r   r{   r'  r   rg   )r   rm   r=   s      r_   rg   zRenderer.server_doc  sh     #}-- 	@ @k;CV @ @"-"<"<">">@ @Cz$$S)))r`   c                    t          |t                    s	|t          u rt          }t          |t                    r|}nQt          |t                    r|j        nt          |          }|$t          t          |          j         d          	 t          j        | j	                 |         }n&# t          $ r t          d|j         d          w xY w|S )z
        Given an object or Element class, return the suitable plotting
        class needed to render it with the current renderer.
        Nz/ was empty, could not determine plotting class.zNo plotting class for z found.)ri   r   r   typer   r"   __name__r#   r   r{   KeyError)clsrm   element_type	plotclasss       r_   r   zRenderer.plotting_class  s     c=)) 	SM-A-ACc4   	lLL'1#w'?'?N388T#YYL##tCyy'9$j$j$jkkk	Ys{3LAII 	Y 	Y 	Y W9N W W WXXX	Ys   B. .#Cc                     t           )a1  
        Given an object and a percentage size (as supplied by the
        %output magic) return all the appropriate plot options that
        would be used to instantiate a plot class for that element.

        Default plot sizes at the plotting class level should be taken
        into account.
        NotImplementedError)r6  rm   percent_sizes      r_   r   zRenderer.plot_options#  s
     "!r`   r   c	                 d   |i }|i }|s|rt          d          |	r$t          j        j                            d           t	          j        ||fi |	5  |                     ||          \  }
}ddd           n# 1 swxY w Y   t          |
t                    rddl	m
}m}m} t          ||          rn5|                                dk    r|}n|                                dk    r|}t          |t                    r1|t          j                            |          }|t$          v r| d| }|
j                            |d	||
           dS  | |
|          }|dS |\  }}|                     |          }|                     |d                   }|r||z   }t          |t.          t0          f          r,|                    |           |                    d           dS | d|d          }t7          |d          5 }|                    |           ddd           dS # 1 swxY w Y   dS )z
        Save a HoloViews object to file, either using an explicitly
        supplied format or to the appropriate default.
        Nz2Renderer does not support saving metadata to file.zSupplying plot, style or norm options as keyword arguments to the Renderer.save method is deprecated and will error in the next minor release.r   )r
   r   	Resourcesr   r   .T)rR   r   titlerb   wb)r   r   mainr   r$   optionsrd   ri   r   bokeh.resourcesr
   r   r>  r   r   ospathbasenamere   r   r  r   _save_prefixr   r   writer  open)r   rm   rG  rn   keyrq   rC  r   r@  ro   rp   r
   r   r>  renderedrr   encodedprefixr"  fs                       r_   r  zRenderer.save/  s    <D;C 	R3 	RPQQQ 	:J$$ &9 : : :
 !#w99&99 	8 	8#--c377ID#	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 	8 dH%% 	>>>>>>>>>>)Y// #""e++		""h.."	(C(( 3=G,,X66E*$$"*22S22HKXTYeTTTF;tS))VVt$$X..))$z*:;; 	'w&Gh( 344 	!NN7###MM!!66D$466Hh%% !   ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !s$   A;;A?A?H%%H),H)c                     dS )z7Hook to prefix content for instance JS when saving HTMLNrX   )r   exts     r_   rH  zRenderer._save_prefixe  s	     	r`   c                     t           )z
        Return the display size associated with a plot before
        rendering to any particular format. Used to generate
        appropriate HTML display.

        Returns a tuple of (width, height) in pixels.
        r:  )r   rp   s     r_   r   zRenderer.get_sizej  s
     "!r`   c              #      K   dV  dS )z
        Context manager to handle global state for a backend,
        allowing Plot classes to temporarily override that state.
        NrX   )r6  s    r_   r   zRenderer.stateu  s       	r`   c                     |S )zB
        Validate an options dictionary for the renderer.
        rX   )r6  rC  s     r_   validatezRenderer.validate~  s	    
 r`   c                    t           t          d          k    rt          |||           n=t           t          d          k    rt          ||           n|rdS t          |           t          j        d          5  	 t                      }n# t          $ r d}Y nw xY w|rt          |d          s	 ddd           dS d| _        t          | _
        t          t          _        ddd           dS # 1 swxY w Y   dS )	zc
        Loads any resources required for display of plots
        in the Jupyter notebook
        z1.0.2)	reloadingenable_mathjaxz1.0.0)rW  NERRORkernelT)panel_versionr   r   r   logging_levelget_ipythonr   r   r   r   r   r   _comm_manager)r6  r   rW  rX  ips        r_   load_nbzRenderer.load_nb  sz    GG,,,,&InUUUUUgg....&I66666 	"F&!!! )) 		5 		5 ]]    WR22 		5 		5 		5 		5 		5 		5 		5 		5 $(C 1C"4E		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5 		5s<   =C1?BC1BC1BC1 $C11C58C5c                 z    | j                             |          }|dS |                                 | j         |= dS )zA
        Deletes registered plots and calls Plot.cleanup
        N)_plotsrh   cleanup)r6  r   rp   s      r_   _delete_plotzRenderer._delete_plot  s>    
 z~~g&&<FJwr`   )r?   )NNNrv   )NNr
   )NT)FT)NN)NNFr   )FFNr   )r?   NNNr   N)FFF)>r4  
__module____qualname____doc__r   Booleanr   Stringr{   Integerr   ObjectSelectorrU   Numberr  rV   rf   r   r  r   Dictr   Callableinfo_fnkey_fnr   r   r   r   rC   r   rb  r   r[   rs   r   r   r   rd   rl   r3   r   r   r   rj   r   r$  r'  r-  rg   classmethodr   r   r  rH  r   r   r   rU  r`  rd  __classcell__)r^   s   @r_   r;   r;   ]   s:       
 
 U]4 .& ' ' 'F el  D E E EG %- +8 9 9 9C %
vx F" # # #C %,r (B C C CC #e"6+O+O+O V67 7 7G
  5	)2H(= DPQ Q QD 5= +2 3 3 3D +e*4D S% S% S%+=> > >O '%&w&@Q X4 5 5 5K %*R &L M M MC enTdT QG H H HG U^DTD PF G G GF #
"B+?+? F< = = = !&> $f~/ /L
 L 9%G  F # # # # #    > > > Z>@    Z& & &P  % % % %N, , , ,<< < < <"  ,	! 	! 	! 	!   Z FJ-/8 8 8 Z8 T T ZT 1 1 1 Z10 	* 	* 	* Z	*   [& 	" 	" [	" DH593! 3! 3! Z3!j   Z " " Z"   ^ [   [ 5 5 5 [50     [         r`   r;   )Srg  r,   rE  
contextlibr   	functoolsr   ior   r   panelpnr   bokeh.documentr   bokeh.embedr   bokeh.ior	   rD  r
   r   packaging.versionr   r   panel.io.notebookr   r   r   r   panel.io.stater   panel.models.comm_managerr   r   
panel.paner   r   panel.viewabler   panel.widgets.playerr   pyviz_commsr   r   ImportErrorparam.parameterizedr   corer   r   r   r   	core.datar   core.ior    core.optionsr!   r"   r#   r$   	core.utilr%   r   r&   r   r(   utilr)   r*   r+   __version__r[  	IMAGE_TAG	VIDEO_TAGPDF_TAGHTML_TAGINVALID_TAGr   re   static_templater;   rX   r`   r_   <module>r     sl     				 % % % % % %                            # # # # # # ! ! ! ! ! !       ' ' ' ' ' ' ' ' % % % % % %       W W W W W W W W W W W W             B B B B B B 1 1 1 1 1 1 # # # # # # + + + + + + # # # # # #/PPPPPPP / / /......../ + * * * * * = = = = = = = = = = = = ( ( ( ( ( (       I I I I I I I I I I I I * * * * * *             : : : : : : : : : :'' ]		
 b< .
 
	 $<< 
 J	  J	  J	  J	  J	 x J	  J	  J	  J	  J	 s   >B BB