+
    O(i                    t    R t ^ RIHt Rt^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t	 ! R	 R
]4      t
R# )z
Miscellaneous transforms.
)annotationsreStructuredText)nodes)	Transformc                  *    ] tR t^tRtRtR R ltRtR# )CallBacka  
Inserts a callback into a document.  The callback is called when the
transform is applied, which is determined by its priority.

For use with `nodes.pending` elements.  Requires a ``details['callback']``
entry, a bound method or function which takes one parameter: the pending
node.  Other data can be stored in the ``details`` attribute or in the
object hosting the callback method.
i  c                   V ^8  d   QhRR/#    returnNone )formats   "^/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/docutils/transforms/misc.py__annotate__CallBack.__annotate__   s     ' 't '    c                	    V P                   pVP                  R ,          ! V4       VP                  P                  V4       R# )callbackN)	startnodedetailsparentremove)selfpendings   & r   applyCallBack.apply   s.    ..
#G,g&r   r   N__name__
__module____qualname____firstlineno____doc__default_priorityr   __static_attributes__r   r   r   r   r      s     ' 'r   r   c                  *    ] tR t^%tRt^tR R ltRtR# )ClassAttributez[
Move the "class" attribute specified in the "pending" node into the
next visible element.
c                   V ^8  d   QhRR/# r	   r   )r   s   "r   r   ClassAttribute.__annotate__.   s     $ $t $r   c                	F   V P                   pVP                  R R RRR7       Fw  p\        V\        P                  \        P
                  34      '       d   K5  VR;;,          VP                  R,          ,          uu&   VP                  P                  V4        R# 	  V P                  P                  P                  RVP                  R,          ,          \        P                  ! VP                  VP                  4      VP                  R7      pVP                  V4       R# )	FT)include_selfdescendsiblingsascendclassesclassNz,No suitable element following "%s" directive	directive)line)r   findall
isinstancer   	Invisiblesystem_messager   r   r   documentreportererrorliteral_block	rawsourcer1   replace_self)r   r   elementr8   s   &   r   r   ClassAttribute.apply.   s    ..E504T ' CG'EOOU5I5I#JKKI'//'"::NN!!'*C &&,,:ook*+ 1 173D3DE	 - 
 	U#r   r   Nr   r   r   r   r&   r&   %   s    
 $ $r   r&   c                  6    ] tR t^@tRtRtR R ltR R ltRtR# )	Transitionsa  
Move transitions at the end of sections up the tree.  Complain
on transitions after a title, subtitle, meta, or decoration element,
at the beginning or end of the document, and after another transition.

For example, transform this::

    <section>
        ...
        <transition>
    <section>
        ...

into this::

    <section>
        ...
    <transition>
    <section>
        ...
i>  c                   V ^8  d   QhRR/# r	   r   )r   s   "r   r   Transitions.__annotate__Z   s     ( (t (r   c                	    V P                   P                  \        P                  4       F  pV P	                  V4       K  	  R # )N)r6   r2   r   
transitionvisit_transition)r   nodes   & r   r   Transitions.applyZ   s/    MM))%*:*:;D!!$' <r   c                   V ^8  d   QhRR/# r	   r   )r   s   "r   r   rA   ^   s     1/ 1/ 1/r   c                	   VP                   P                  V4      pVP                  4       pR p\        VP                   \        P
                  \        P                  34      '       g   RpMzV^ 8X  gO   \        V\        P                  \        P                  \        P                  \        P                  34      '       d   RpM"\        V\        P                  4      '       d   RpV'       d   V P
                  P                  P                  WAR7      p\        P                  ! 4       VP                   V&    VP                   P                  RR7       WP                   V&   VP                   P!                  V^,           V4       V^,          p\        VP                   \        P
                  \        P                  34      '       g   R# V\%        VP                   4      8  g   Q hV\%        VP                   4      ^,
          8w  d   R# TpV\%        VP                   4      ^,
          8X  d|   VP                   pVP                   fE   V P
                  P                  P                  RVR7      pVP                   P'                  V4       R# VP                   P                  V4      pK  VP                   P)                  V4       VP                   P!                  V^,           V4       R#   \        P"                   d    YP                   T&    ELi ; i)	 z4Transition must be child of <document> or <section>.z4Document or section may not begin with a transition.zZAt least one body element must separate transitions; adjacent transitions are not allowed.)	base_nodeF)	recursiveNz'Document may not end with a transition.)r   indexprevious_siblingr3   r   r6   sectiontitlesubtitlemeta
decorationrC   r7   warning	paragraphvalidateinsertValidationErrorlenappendr   )r   rE   rL   rM   msgrS   siblings   &&     r   rD   Transitions.visit_transition^   sG   !!$'002$++'FGGHCaZ:&69>9>9>9I9I9K L L IC(%*:*:;;;Cmm,,44S4IG!&!2DKK$$u$5 &*E"""57G4
$++'FGGs4;;''''C$q((s7>>*Q..nnG~~% --0088G(, 9 . ""7+NN((1E4 eai.; (( *%)E"*s   6K% %#LLr   N)	r   r   r    r!   r"   r#   r   rD   r$   r   r   r   r?   r?   @   s    , (1/ 1/r   r?   N)r"   
__future__r   __docformat__docutilsr   docutils.transformsr   r   r&   r?   r   r   r   <module>ra      s@   
 #"  )'y '($Y $6O/) O/r   