+
    Q(iH                         R t ^ RIHt ^ RIHtHt ^ RIHtHtH	t	H
t
HtHtHt ]'       d   ^ RIHt RR R lltRtRR	 R
 lltR# )z0HTML documentation generation for cyclopts apps.)TYPE_CHECKING)escape_htmlextract_text)build_command_chainextract_descriptionextract_usagefilter_help_entriesformat_usage_linegenerate_anchoriterate_commands)Appc                r    V ^8  d   QhR\         \        ,          RRR\        R\        R\        R\        RR	/# )
   linesappr   include_hiddenapp_nameprefixdepthreturnN)liststrboolint)formats   "X/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/cyclopts/docs/html.py__annotate__r      sR     ' '9'	' ' 	'
 ' ' 
'    c           
        VP                   '       g   R# \        W4       F  w  rgV'       d   V V 2MTpV RVP                  RR4       2P                  4       p	RV^,           ,          p
V P	                  V
 RV	 RV R24       VP                   '       dA   V P	                  V
 R24       \        WW#V R2V^,           4       V P	                  V
 R	24       V P	                  V
 R
24       K  	  R# )z,Recursively generate HTML table of contents.N- z  z<li><a href="#z"><code>z</code></a>z  <ul>z  </ul>z</li>)	_commandsr   replacelowerappend_generate_html_toc)r   r   r   r   r   r   namesubappdisplay_name	full_pathindents   &&&&&&     r   r%   r%      s     ===(=,2&$(j,"6"6sC"@!ABHHJ	#x~i[kRSLLF86*+un<.XYHZ\ade\efLLF87+,xu%& >r   a=  
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --code-bg: #f5f5f5;
    --link-color: #0066cc;
    --header-bg: #f8f9fa;
    --required-color: #d73027;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2em; border-bottom: 2px solid var(--border-color); padding-bottom: 0.3em; }
h2 { font-size: 1.5em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.3em; }
h3 { font-size: 1.25em; }
h4 { font-size: 1em; }

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
}

pre {
    background: var(--code-bg);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
}

.usage-block {
    margin: 16px 0;
}

.usage {
    background: #f8f9fa;
    border-left: 4px solid #0066cc;
}

.description, .app-description, .command-description {
    margin: 16px 0;
    color: var(--text-color);
}

.panel-description {
    margin: 12px 0;
    color: #666;
}

.help-panel {
    margin: 24px 0;
}

/* List styles for commands and parameters */
.commands-list, .parameters-list {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.commands-list li, .parameters-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.commands-list li:last-child, .parameters-list li:last-child {
    border-bottom: none;
}

.commands-list code, .parameters-list code {
    font-weight: 600;
}

/* Metadata styling */
.parameter-metadata {
    display: inline-flex;
    gap: 8px;
    margin-left: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.metadata-item {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.85em;
    border-radius: 4px;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
}

.metadata-required {
    background: #fee;
    border-color: #fcc;
    color: #c00;
    font-weight: 600;
}

.metadata-default {
    background: #f0f8ff;
    border-color: #d0e8ff;
    color: #0066cc;
}

.metadata-env {
    background: #f0fff0;
    border-color: #d0ffd0;
    color: #080;
}

.metadata-choices {
    background: #fffaf0;
    border-color: #ffd0a0;
    color: #840;
}

.metadata-label {
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    font-size: 0.9em;
}

/* Table of Contents */
.table-of-contents {
    background: var(--header-bg);
    border-radius: 6px;
    padding: 16px;
    margin: 24px 0;
}

.table-of-contents h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.table-of-contents ul {
    margin: 8px 0;
    padding-left: 24px;
}

.table-of-contents li {
    margin: 4px 0;
}

.table-of-contents a {
    color: var(--link-color);
    text-decoration: none;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* General link styles */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.commands-list a code {
    color: var(--link-color);
}

/* Back to top link */
.back-to-top {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9em;
    opacity: 0.7;
}

.back-to-top:hover {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .commands-list, .parameters-list {
        font-size: 0.9em;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1e1e1e;
        --text-color: #e0e0e0;
        --border-color: #444;
        --code-bg: #2d2d2d;
        --link-color: #66b3ff;
        --header-bg: #2d2d2d;
    }

    .usage {
        background: #2d2d2d;
        border-left-color: #66b3ff;
    }

    .table-of-contents {
        background: #2d2d2d;
    }

    .metadata-required {
        background: #4a2020;
        border-color: #6a3030;
        color: #ff9999;
    }

    .metadata-default {
        background: #20304a;
        border-color: #304060;
        color: #99ccff;
    }

    .metadata-env {
        background: #204a20;
        border-color: #306030;
        color: #99ff99;
    }

    .metadata-choices {
        background: #4a3020;
        border-color: #604030;
        color: #ffcc99;
    }
}

/* Command sections */
.command-section {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.command-section:first-child {
    border-top: none;
}
Nc                    V ^8  d   QhRRR\         R\         R\        R\        R\         R\        R	,          R
\        \        ,          R	,          R\         R\         R\        /# )r   r   r   	recursiver   heading_levelmax_heading_level
standalone
custom_cssNcommand_chaingenerate_tocflatten_commandsr   )r   r   r   r   )r   s   "r   r   r   G  s     _ _	__ _ 	_
 _ _ d
_ 9t#_ _ _ 	_r   c
                T   ^ RI Hp
 Vf   . p. pV'       g	   V'       g   VP                  R4       V'       g?   V P                  ^ ,          pTpTp\	        W44      pVP                  RV RV RV R24       MV'       d
   V^ ,          MV P                  ^ ,          pRP                  V4      p\        V4      p\	        W44      pVP                  R	4       VP                  RV R
V R\        V4       RV R2	4       V P                  P                  RRR7      p\        V V4      pV'       d3   \        VR4      pV'       d   VP                  R\        V4       R24       V'       d~   V'       gv   V P                  '       dd   VP                  R4       VP                  R4       VP                  R4       \        WW,R^ 4       VP                  R4       VP                  R4       \        V 4      pV'       d   \	        V^,           V4      pVP                  RV RV R24       VP                  R4       \        V\         4      '       d   TpM\        VR4      p\#        VVRR7      pVP                  R\        V4       R24       VP                  R4       V P                  V .4      ;_uu_ 4        V P%                  . V4      pRRR4       V
! V^,           VVVR7      pVP'                  4        X Fb  w  ppV'       g   V'       d   VP(                  '       g   K*  V'       g   \+        V VV4      Vn        VP,                  '       g   KX  V! RRV4       Kd  	  VP/                  4       P1                  4       pV'       d   VP                  V4       V P                  '       Ed   \3        W4       EF  w  pp\5        VVV4      pV	'       d   TpM	V^,           pVP                  R	4       \7        V4      ^8  d,   V RRP                  VR,          4       2P9                  4       MV RV 2P9                  4       p\	        VV4      p VP                  RV  R
V R\        RP                  V4      4       RV  R2	4       VP                  V V.4      ;_uu_ 4        VP                  P                  RVR7      p!\        VV!4      p"V"'       d3   \        V"R4      p#V#'       d   VP                  R \        V#4       R24       \        V4      p$V$'       d   V	'       d   V^,           p%M	V^,           p%\	        V%V4      p%VP                  RV% RV% R24       VP                  R4       \        V$\         4      '       d   T$p&M\        V$R4      p&\#        V&VRR7      p&VP                  R\        V&4       R24       VP                  R4       V'       d   VP%                  . V!4      p'V	'       d   V^,           p(M	V^,           p(\	        V(V4      p(V
! V(VVVR7      p)V' Fb  w  p*p+V'       g   V*'       d   V*P(                  '       g   K*  V'       g   \+        VV+V4      V+n        V+P,                  '       g   KX  V)! RRV+4       Kd  	  V)P/                  4       P1                  4       p,V,'       d   VP                  V,4       V'       d   VP                  '       d   \3        VV4       Fq  w  p-p.\5        VV-V4      p/V	'       d   Tp0M	V^,           p0V.P                  VV..4      ;_uu_ 4        \;        V.VVV0VR!RV/R!V	R"7
      p1RRR4       VP                  X14       Ks  	  RRR4       V'       d   VP                  R#4       VP                  R$4       EK  	  V'       d   VP                  R$4       V'       g	   V'       g   VP                  R4       R%P                  V4      p2V'       d(   V'       d   TM\<        p3R&\        V4       R'V3 R(V2 R)2p4V4# V2#   + '       g   i     EL:; i  + '       g   i     L; i  + '       g   i     L; i)*a  Generate HTML documentation for a CLI application.

Parameters
----------
app : App
    The cyclopts App instance to document.
recursive : bool
    If True, generate documentation for all subcommands recursively.
    Default is True.
include_hidden : bool
    If True, include hidden commands/parameters in documentation.
    Default is False.
heading_level : int
    Starting heading level for the main application title.
    Default is 1.
max_heading_level : int
    Maximum heading level to use. Headings deeper than this will be capped
    at this level. HTML supports levels 1-6.
    Default is 6.
standalone : bool
    If True, generate a complete HTML document with <html>, <head>, etc.
    If False, generate only the body content. Default is True.
custom_css : str
    Custom CSS to use instead of the default styles.
command_chain : list[str]
    Internal parameter to track command hierarchy.
    Default is None.
generate_toc : bool
    If True, generate a table of contents for multi-command apps.
    Default is True.
flatten_commands : bool
    If True, generate all commands at the same heading level instead of nested.
    Default is False.

Returns
-------
str
    The generated HTML documentation.
)HtmlFormatterNz<div class="cli-documentation">z<hz class="app-title">z</h>r    z!<section class="command-section">z id="z" class="command-title"><code>z
</code></hhelp_formatrestructuredtext)fallbackz<div class="app-description">z</div>z<div class="table-of-contents">z<h2>Table of Contents</h2>z<ul> z</ul>z	>Usage</hz<div class="usage-block">$)r   z<pre class="usage">z</pre>)r-   r   r   r1   r   :   NNz!<div class="command-description">F)	r,   r   r-   r.   r/   r0   r1   r2   r3   u6   <a href="#top" class="back-to-top">↑ Back to top</a>z
</section>
z<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>z) - CLI Documentation</title>
    <style>
z&
    </style>
</head>
<body id="top">
z
</body>
</html>)cyclopts.help.formatters.htmlr5   r$   r&   minjoinr
   r   	app_stackresolver   r   r!   r%   r   
isinstancer   r	   _assemble_help_panelsresetshowr   entries
get_outputstripr   r   lenr#   generate_html_docsDEFAULT_CSS)5r   r,   r   r-   r.   r/   r0   r1   r2   r3   r5   r   r   full_commandtitleeffective_level	anchor_idr7   description	desc_textusageusage_level
usage_texthelp_panels_with_groups	formattergrouppanel
panel_docsr&   r'   sub_command_chainsub_heading_leveleffective_sub_levelsub_help_formatsub_descriptionsub_desc_text	sub_usageusage_heading_levelsub_usage_text
sub_panelspanel_heading_levelsub_formatter	sub_group	sub_panelsub_panel_docsnested_name
nested_appnested_chainnested_heading_levelnested_docsbody_contentcssdocs5   &&&&&&&&&&                                           r   rK   rK   G  s   f <  E 67 88A;m?r/**=eWCGXXYZ[ (5=##((1+xx.#L1	m?89!yk1OP[\hPiOjjt  vE  uF  FG  H	

 --''@R'SK%c;7K d3	LL8Y9O8PPVWX Mcmmm6712V5~QGWX #E-!+->?r+i}A>?01eS!!J%eT2J&z=M
*;z+B*C6JKX 
u		"%";";B"L 
 #a'%#	I OO/u%


/UNKEM===dD%( 0 %%'--/JZ  }}},SALD& 3M4 R  $1!$1A$5! LL<= ()A- *Achh'8'<=>?EEG z4&)//1 
 #&&79J"KLL()yk9WXcdgdldlm~d  YA  XB  BL  M`  La  ab  c !!3-00"("2"2":":=S^":"_"5fo"N"$0$$GM$'HUbIcHddj%kl *&1	'.;a.?+.;a.?+*-.ACT*U'LL2&9%:)DWCXXY!Z[LL!<=!)S11)2)5i)F%6~GXad%eNLL#6{>7R6SSY!Z[LL* !'!=!=b/!RJ (.;a.?+.;a.?+*-.ACT*U'$1&9'5!)&7	%M 1;,	9-)INNN$-0CFIWe0fI-$,,,)$i@ 1; &3%=%=%?%E%E%GN%^4 !1!1!13CFN3[/Z':;Lk[c'd+3@03@13D0 (116:2FGG*< **3/=.B2C+0+/.:-21A+K H [1/ 4\s 1f UVLL&] Bb \" X 99U#L &jK
 !" #    
S 
		n HGG 10sp   ,_0A>`B1`>`A``-	`7!`3``*`<A`
` `0`	```')    )	TFr<      TNNTF)__doc__typingr   cyclopts._markupr   r   cyclopts.docs.baser   r   r   r   r	   r
   r   cyclopts.corer   r%   rL   rK    r   r   <module>rz      s?    6   6   !'8Tn_ _r   