
    <iR                        d Z ddlmZ ddlmZmZ dZerddlmZm	Z	 ddlm
Z
 ddlmZ ddlmZ 	 	 	 	 	 d%d&dZ	 	 	 	 	 	 d'd(dZ	 	 	 d)d*d"Zed#k    r e ed$          d                    d	S d	S )+a1  
This module contains practical examples of Docutils client code.

Importing this module from client code is not recommended; its contents are
subject to change in future Docutils releases.  Instead, it is recommended
that you copy and paste the parts you need into your own code, modifying as
necessary.
    )annotations)coreioF)AnyLiteral)nodes)StrPath)	PublisherNunicodeT   input_stringstr | bytessource_pathStrPath | Nonedestination_pathinput_encodingLiteral['unicode'] | strdoctitleboolinitial_header_levelintreturndict[str, str]c                D    |||d}t          j        | ||d|          }|S )a  
    Given an input string, returns a dictionary of HTML document parts.

    Dictionary keys are the names of parts, and values are Unicode strings;
    encoding is up to the client.

    Parameters:

    - `input_string`: A multi-line text string; required.
    - `source_path`: Path to the source file or object.  Optional, but useful
      for diagnostic output (system messages).
    - `destination_path`: Path to the file or object which will receive the
      output; optional.  Used for determining relative paths (stylesheets,
      source links, etc.).
    - `input_encoding`: The encoding of `input_string`.  If it is an encoded
      8-bit string, provide the correct encoding.  If it is a Unicode string,
      use "unicode", the default.
    - `doctitle`: Disable the promotion of a lone top-level section title to
      document title (and subsequent section title to document subtitle
      promotion); enabled by default.
    - `initial_header_level`: The initial level for header elements (e.g. 1
      for "<h1>").
    )r   doctitle_xformr   html)sourcer   r   writersettings_overrides)r   publish_parts)r   r   r   r   r   r   	overridespartss           /Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/docutils/examples.py
html_partsr$      sF    < $2#+)=? ?I ))5 5 5E L    output_encodingc                v    t          | |||||          }|d         }|dk    r|                    |          }|S )aE  
    Given an input string, returns an HTML fragment as a string.

    The return value is the contents of the <body> element.

    Parameters (see `html_parts()` for the remainder):

    - `output_encoding`: The desired encoding of the output.  If a Unicode
      string is desired, use the default value of "unicode" .
    )r   r   r   r   r   r   	html_bodyr   )r$   encode)	r   r   r   r   r&   r   r   r"   fragments	            r#   r(   r(   D   sU    $ !{)%1	3 3 3E
 [!H)##???33Or%   r   strr   dict[str, Any] | None tuple[nodes.document, Publisher]c                   |i }|d|iz  }t          j        dddt          j        t          j                  }|                    d|d           |                    | |           |                                 |j        |fS )zx
    Return the document tree and publisher, for exploring Docutils internals.

    Parameters: see `html_parts()`.
    Nr   
standalonerstnull)source_classdestination_class)settings_specr   config_section)	r   r
   r   StringInput
NullOutputprocess_programmatic_settings
set_sourcepublishdocument)r   r   r   r   r!   	publishers         r#   	internalsr=   a   s     !"&6%GGI|UF,.N13@ @ @I ++$?H;? , A A A ---y((r%   __main__test)NNr   Tr   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )NNr   r   Tr   )r   r   r   r   r   r   r   r   r&   r   r   r   r   r   r   r   )Nr   N)
r   r+   r   r   r   r   r   r,   r   r-   )__doc__
__future__r   docutilsr   r   TYPE_CHECKINGtypingr   r   r   docutils.nodesr	   docutils.corer
   r$   r(   r=   __name__print r%   r#   <module>rJ      sN  
  # " " " " "         (########&&&&&&'''''' .226:C $+,% % % % %R -1159B:C#*+    < -19B:>) ) ) ) )2 z	E))F

A
 r%   