class_docstr: The Resources class encapsulates information relating to loading or
  embedding Bokeh Javascript and CSS.
  
  Args:
      mode (str) : how should Bokeh JS and CSS be included in output
  
          See below for descriptions of available modes
  
      version (str, optional) : what version of Bokeh JS and CSS to load
  
          Only valid with the ``'cdn'`` mode
  
      root_dir (str, optional) : root directory for loading Bokeh JS and CSS assets
  
          Only valid with ``'relative'`` and ``'relative-dev'`` modes
  
      minified (bool, optional) : whether JavaScript and CSS should be minified or not (default: True)
  
      root_url (str, optional) : URL and port of Bokeh Server to load resources from
  
          Only valid with ``'server'`` and ``'server-dev'`` modes
  
  The following **mode** values are available for configuring a Resource object:
  
  * ``'inline'`` configure to provide entire Bokeh JS and CSS inline
  * ``'cdn'`` configure to load Bokeh JS and CSS from ``https://cdn.bokeh.org``
  * ``'server'`` configure to load from a Bokeh Server
  * ``'server-dev'`` same as ``server`` but supports non-minified assets
  * ``'relative'`` configure to load relative to the given directory
  * ``'relative-dev'`` same as ``relative`` but supports non-minified assets
  * ``'absolute'`` configure to load from the installed Bokeh library static directory
  * ``'absolute-dev'`` same as ``absolute`` but supports non-minified assets
  
  Once configured, a Resource object exposes the following public attributes:
  
  Attributes:
      js_raw : any raw JS that needs to be placed inside ``<script>`` tags
      css_raw : any raw CSS that needs to be places inside ``<style>`` tags
      js_files : URLs of any JS files that need to be loaded by ``<script>`` tags
      css_files : URLs of any CSS files that need to be loaded by ``<link>`` tags
      messages : any informational messages concerning this configuration
  
  These attributes are often useful as template parameters when embedding
  Bokeh plots.
class_docstr_tok: ["The","Resources","class","encapsulates","information","relating","to","loading","or","embedding","Bokeh","Javascript","and","CSS",".","Args",":","mode","(","str",")",":","how","should","Bokeh","JS","and","CSS","be","included","in","output","See","below","for","descriptions","of","available","modes","version","(","str",",","optional",")",":","what","version","of","Bokeh","JS","and","CSS","to","load","Only","valid","with","the","``","'cdn","'","``","mode","root_dir","(","str",",","optional",")",":","root","directory","for","loading","Bokeh","JS","and","CSS","assets","Only","valid","with","``","'relative","'","``","and","``","'relative-dev","'","``","modes","minified","(","bool",",","optional",")",":","whether","JavaScript","and","CSS","should","be","minified","or","not","(","default",":","True",")","root_url","(","str",",","optional",")",":","URL","and","port","of","Bokeh","Server","to","load","resources","from","Only","valid","with","``","'server","'","``","and","``","'server-dev","'","``","modes","The","following","*","*","mode","*","*","values","are","available","for","configuring","a","Resource","object",":","*","``","'inline","'","``","configure","to","provide","entire","Bokeh","JS","and","CSS","inline","*","``","'cdn","'","``","configure","to","load","Bokeh","JS","and","CSS","from","``","https",":","\/\/cdn.bokeh.org","``","*","``","'server","'","``","configure","to","load","from","a","Bokeh","Server","*","``","'server-dev","'","``","same","as","``","server","``","but","supports","non-minified","assets","*","``","'relative","'","``","configure","to","load","relative","to","the","given","directory","*","``","'relative-dev","'","``","same","as","``","relative","``","but","supports","non-minified","assets","*","``","'absolute","'","``","configure","to","load","from","the","installed","Bokeh","library","static","directory","*","``","'absolute-dev","'","``","same","as","``","absolute","``","but","supports","non-minified","assets","Once","configured",",","a","Resource","object","exposes","the","following","public","attributes",":","Attributes",":","js_raw",":","any","raw","JS","that","needs","to","be","placed","inside","``","<","script",">","``","tags","css_raw",":","any","raw","CSS","that","needs","to","be","places","inside","``","<","style",">","``","tags","js_files",":","URLs","of","any","JS","files","that","need","to","be","loaded","by","``","<","script",">","``","tags","css_files",":","URLs","of","any","CSS","files","that","need","to","be","loaded","by","``","<","link",">","``","tags","messages",":","any","informational","messages","concerning","this","configuration","These","attributes","are","often","useful","as","template","parameters","when","embedding","Bokeh","plots","."]
docstr: Make a clone of a resources instance allowing to override its components. 
docstr_tok: ["Make","a","clone","of","a","resources","instance","allowing","to","override","its","components","."]
code: def clone(
      self, *, components: list[Component] | None = None
  ) -> Resources:
      """Make a clone of a resources instance allowing to override its components."""
      return Resources(
          mode=self.mode,
          version=self.version,
          root_dir=self.root_dir,
          dev=self.dev,
          minified=self.minified,
          log_level=self.log_level,
          root_url=self._root_url,
          path_versioner=self.path_versioner,
          components=components
          if components is not None
          else list(self.components),
          base_dir=self.base_dir,
      )
  
imports: from __future__ import annotations
  import logging
  import json
  import os
  import re
  from os.path import relpath
  from pathlib import Path
  from typing import TYPE_CHECKING, Callable, ClassVar, Literal, Protocol, TypedDict, Union, cast, get_args
  from .None import __version__
  from .core.templates import CSS_RESOURCES, JS_RESOURCES
  from .core.types import ID, PathLike
  from .model import Model
  from .settings import LogLevel, settings
  from .util.dataclasses import dataclass, field
  from .util.paths import ROOT_DIR
  from .util.token import generate_session_id
  from .util.version import is_full_release
label_desc: Use image node_id 2 for calling the Resources obj's underlying member method code with example usage: obj.clone() and returns: Resources