+
    i                        R t ^ RIHt ^ RIt^ RIHtHt ^ RIH	t	 ]'       d   ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt  ! R	 R
4      t ! R R]	4      tR# )z?Collection providing access to comments added to this document.)annotationsN)TYPE_CHECKINGIterator)BlockItemContainer)
CT_CommentCT_Comments)CommentsPart)ParagraphStyle)	Paragraphc                  Z    ] tR t^tRtR R ltR R ltR R ltRR R	 lltR
 R lt	Rt
R# )Commentsz:Collection containing the comments added to this document.c                    V ^8  d   QhRRRR/# )   comments_elmr   comments_partr    )formats   "S/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/docx/comments.py__annotate__Comments.__annotate__   s     , ,[ , ,    c                	    Wn         W n        R # N_comments_elm_comments_part)selfr   r   s   &&&r   __init__Comments.__init__   s    )+r   c                   V ^8  d   QhRR/# )r   returnzIterator[Comment]r   )r   s   "r   r   r      s     
 
+ 
r   c                D   a  V 3R lS P                   P                   4       # )z.Iterator over the comments in this collection.c              3  P   <"   T F  p\        VSP                  4      x  K  	  R # 5ir   )Commentr   ).0comment_elmr   s   & r   	<genexpr>$Comments.__iter__.<locals>.<genexpr>   s(      
= K!4!455=s   #&)r   comment_lstr   s   fr   __iter__Comments.__iter__   s!    
#11==
 	
r   c                   V ^8  d   QhRR/# r   r    intr   )r   s   "r   r   r      s     3 3 3r   c                @    \        V P                  P                  4      # )z*The number of comments in this collection.)lenr   r(   r)   s   &r   __len__Comments.__len__   s    4%%1122r   c               (    V ^8  d   QhRRRRRRRR/# )r   textstrauthorinitials
str | Noner    r#   r   )r   s   "r   r   r   #   s)     ( ( (# (j (Za (r   c                   V P                   P                  4       pW$n        W4n        \        P
                  P                  \        P                  P                  4      Vn	        \        W@P                  4      pVR8X  d   V# \        VP                  R4      4      p\        V4      pVP                  ^ ,          pVP!                  V4       V F  p	VP#                  V	R7       K  	  V# )a:  Add a new comment to the document and return it.

The comment is added to the end of the comments collection and is assigned a unique
comment-id.

If `text` is provided, it is added to the comment. This option provides for the common
case where a comment contains a modest passage of plain text. Multiple paragraphs can be
added using the `text` argument by separating their text with newlines (`"\\n"`).
Between newlines, text is interpreted as it is in `Document.add_paragraph(text=...)`.

The default is to place a single empty paragraph in the comment, which is the same
behavior as the Word UI when you add a comment. New runs can be added to the first
paragraph in the empty comment with `comments.paragraphs[0].add_run()` to adding more
complex text with emphasis or images. Additional paragraphs can be added using
`.add_paragraph()`.

`author` is a required attribute, set to the empty string by default.

`initials` is an optional attribute, set to the empty string by default. Passing |None|
for the `initials` parameter causes that attribute to be omitted from the XML.
 
r4   )r   add_commentr6   r7   dtdatetimenowtimezoneutcdater#   r   itersplitnext
paragraphsadd_runadd_paragraph)
r   r4   r6   r7   r%   commentpara_text_iterfirst_para_text
first_parass
   &&&&      r   r=   Comments.add_comment#   s    , ((446#';;??2;;??;+':':;2:Ndjj./~.''*
?+A!!q!)   r   c                    V ^8  d   QhRRRR/# )r   
comment_idr.   r    zComment | Noner   )r   s   "r   r   r   M   s     ^ ^c ^n ^r   c                n    V P                   P                  V4      pVe   \        W P                  4      # R# )zFReturn the comment identified by `comment_id`, or |None| if not found.N)r   get_comment_by_idr#   r   )r   rQ   r%   s   && r   getComments.getM   s4    ((:::F<G<Sw{$7$78]Y]]r   r   N)r:   r:   r:   )__name__
__module____qualname____firstlineno____doc__r   r*   r1   r=   rT   __static_attributes__r   r   r   r   r      s&    D,
3(T^ ^r   r   c                  
  a  ] tR t^StRtR V 3R lltRR V 3R lllt]R R l4       t]P                  R R	 l4       t]R
 R l4       t
]R R l4       t]P                  R R l4       t]R R l4       t]R R l4       tRtV ;t# )r#   aS  Proxy for a single comment in the document.

Provides methods to access comment metadata such as author, initials, and date.

A comment is also a block-item container, similar to a table cell, so it can contain both
paragraphs and tables and its paragraphs can contain rich text, hyperlinks and images,
although the common case is that a comment contains a single paragraph of plain text like a
sentence or phrase.

Note that certain content like tables may not be displayed in the Word comment sidebar due to
space limitations. Such "over-sized" content can still be viewed in the review pane.
c                    V ^8  d   QhRRRR/# )r   r%   r   r   r   r   )r   s   "r   r   Comment.__annotate__a   s     ( (J (| (r   c                	2   < \         SV `  W4       Wn        R # r   )superr   _comment_elm)r   r%   r   	__class__s   &&&r   r   Comment.__init__a   s    4'r   c               $    V ^8  d   QhRRRRRR/# )r   r4   r5   stylezstr | ParagraphStyle | Noner    r
   r   )r   s   "r   r   r^   e   s#      # 3N Zc r   c                P   < \         SV `  W4      pVf   RVP                  n        V# )a!  Return paragraph newly added to the end of the content in this container.

The paragraph has `text` in a single run if present, and is given paragraph style `style`.
When `style` is |None| or ommitted, the "CommentText" paragraph style is applied, which is
the default style for comments.
CommentText)r`   rI   _pre   )r   r4   re   	paragraphrb   s   &&& r   rI   Comment.add_paragraphe   s-     G)$6	 =!.ILLr   c                   V ^8  d   QhRR/# r   r    r5   r   )r   s   "r   r   r^   v   s     ( ( (r   c                .    V P                   P                  # )zmRead/write. The recorded author of this comment.

This field is required but can be set to the empty string.
ra   r6   r)   s   &r   r6   Comment.authoru   s       '''r   c                   V ^8  d   QhRR/# )r   valuer5   r   )r   s   "r   r   r^   ~   s     ) )C )r   c                	&    WP                   n        R # r   rn   r   rq   s   &&r   r6   ro   }   s    #( r   c                   V ^8  d   QhRR/# r-   r   )r   s   "r   r   r^      s     $ $C $r   c                .    V P                   P                  # )z&The unique identifier of this comment.)ra   idr)   s   &r   rQ   Comment.comment_id   s       ###r   c                   V ^8  d   QhRR/# )r   r    r8   r   )r   s   "r   r   r^      s     * ** *r   c                .    V P                   P                  # )zRead/write. The recorded initials of the comment author.

This attribute is optional in the XML, returns |None| if not set. Assigning |None| removes
any existing initials from the XML.
ra   r7   r)   s   &r   r7   Comment.initials   s       )))r   c                   V ^8  d   QhRR/# )r   rq   r8   r   )r   s   "r   r   r^      s     + +j +r   c                	&    WP                   n        R # r   rz   rs   s   &&r   r7   r{      s    %*"r   c                   V ^8  d   QhRR/# rl   r   )r   s   "r   r   r^      s     : :c :r   c                F    RP                  R V P                   4       4      # )zThe text content of this comment as a string.

Only content in paragraphs is included and of course all emphasis and styling is stripped.

Paragraph boundaries are indicated with a newline (`"\\n"`)
r;   c              3  8   "   T F  qP                   x  K  	  R # 5ir   r<   )r$   ps   & r   r&   Comment.text.<locals>.<genexpr>   s     9As   )joinrG   r)   s   &r   r4   Comment.text   s     yy9999r   c                   V ^8  d   QhRR/# )r   r    zdt.datetime | Noner   )r   s   "r   r   r^      s     & &- &r   c                .    V P                   P                  # )zpThe date and time this comment was authored.

This attribute is optional in the XML, returns |None| if not set.
)ra   rC   r)   s   &r   	timestampComment.timestamp   s       %%%r   )ra   )r:   N)rV   rW   rX   rY   rZ   r   rI   propertyr6   setterrQ   r7   r4   r   r[   __classcell__)rb   s   @r   r#   r#   S   s    ( (   ( ( ]]) ) $ $ * * __+ + : : & &r   r#   )rZ   
__future__r   r?   r>   typingr   r   docx.blkcntnrr   docx.oxml.commentsr   r   docx.parts.commentsr   docx.styles.styler	   docx.text.paragraphr
   r   r#   r   r   r   <module>r      s?    E "  * ,:00-?^ ?^DP&  P&r   