+
    i                       R t ^ RIHt ^ RIHtHtHt ^ RIHt ^ RI	H
t ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ]'       d   ^ RIHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RI%H&t&  ! R R]4      t'R# )z+|DocumentPart| and closely related objects.)annotations)IOTYPE_CHECKINGcast)Document)RELATIONSHIP_TYPE)CommentsPart)
FooterPart
HeaderPart)NumberingPart)SettingsPart)	StoryPart)
StylesPart)InlineShapes)lazyproperty)Comments)WD_STYLE_TYPE)CoreProperties)Settings)	BaseStylec                  2   ] tR t^tRtR tR t]R R l4       t]R R l4       t	]R 4       t
R	 R
 ltR R ltR R ltR tR R lt]R 4       t]R R l4       tR R lt]R R l4       t]R 4       t]R R l4       t]R R l4       t]R R l4       tR tR!# )"DocumentParta}  Main document part of a WordprocessingML (WML) package, aka a .docx file.

Acts as broker to other parts such as image, core properties, and style parts. It
also acts as a convenient delegate when a mid-document object needs a service
involving a remote ancestor. The `Parented.part` property inherited by many content
objects provides access to this part object for that purpose.
c                    \         P                  ! V P                  4      pV P                  V\        P
                  4      pW3# )z=Return (footer_part, rId) pair for newly-created footer part.)r	   newpackage	relate_toRTFOOTER)selffooter_partrIds   &  Z/Users/agent/.openclaw/workspace/.venv/lib/python3.14/site-packages/docx/parts/document.pyadd_footer_partDocumentPart.add_footer_part#   1     nnT\\2nn["))4    c                    \         P                  ! V P                  4      pV P                  V\        P
                  4      pW3# )z=Return (header_part, rId) pair for newly-created header part.)r
   r   r   r   r   HEADER)r   header_partr    s   &  r!   add_header_partDocumentPart.add_header_part)   r$   r%   c                   V ^8  d   QhRR/# )   returnr    )formats   "r!   __annotate__DocumentPart.__annotate__0   s     , ,( ,r%   c                .    V P                   P                  # )zJ|Comments| object providing access to the comments added to this document.)_comments_partcommentsr   s   &r!   r4   DocumentPart.comments/   s     ""+++r%   c                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1   5   s     , , ,r%   c                .    V P                   P                  # )z^A |CoreProperties| object providing read/write access to the core properties
of this document.)r   core_propertiesr5   s   &r!   r9   DocumentPart.core_properties4   s     ||+++r%   c                .    \        V P                  V 4      # )zEA |Document| object providing access to the content of this document.)r   _elementr5   s   &r!   documentDocumentPart.document:   s     t,,r%   c                    V ^8  d   QhRRRR/# )r,   r    strr-   Noner.   )r/   s   "r!   r0   r1   ?   s      C D r%   c                (    V P                  V4       R# )z/Remove related header part identified by `rId`.N)drop_relr   r    s   &&r!   drop_header_partDocumentPart.drop_header_part?   s    cr%   c                   V ^8  d   QhRR/# r,   r    r@   r.   )r/   s   "r!   r0   r1   C        ' 's 'r%   c                (    V P                   V,          # )z%Return |FooterPart| related by `rId`.related_partsrD   s   &&r!   r   DocumentPart.footer_partC       !!#&&r%   c               $    V ^8  d   QhRRRRRR/# )r,   style_idz
str | None
style_typer   r-   r   r.   )r/   s   "r!   r0   r1   G   s!     ; ;* ;- ;I ;r%   c                8    V P                   P                  W4      # )zReturn the style in this document matching `style_id`.

Returns the default style for `style_type` if `style_id` is |None| or does not
match a defined style of `style_type`.
)styles	get_by_id)r   rP   rQ   s   &&&r!   	get_styleDocumentPart.get_styleG   s     {{$$X::r%   c                8    V P                   P                  W4      # )a,  Return the style_id (|str|) of the style of `style_type` matching
`style_or_name`.

Returns |None| if the style resolves to the default style for `style_type` or if
`style_or_name` is itself |None|. Raises if `style_or_name` is a style of the
wrong type or names a style not present in the document.
)rS   get_style_id)r   style_or_namerQ   s   &&&r!   rX   DocumentPart.get_style_idO   s     {{''BBr%   c                   V ^8  d   QhRR/# rH   r.   )r/   s   "r!   r0   r1   Y   rI   r%   c                (    V P                   V,          # )z%Return |HeaderPart| related by `rId`.rK   rD   s   &&r!   r(   DocumentPart.header_partY   rN   r%   c                B    \        V P                  P                  V 4      # )zIThe |InlineShapes| instance containing the inline shapes in the document.)r   r<   bodyr5   s   &r!   inline_shapesDocumentPart.inline_shapes]   s     DMM..55r%   c                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1   c   s     
" 
" 
"r%   c                     \        \        V P                  \        P                  4      4      #   \
         d;    \        P                  ! 4       pT P                  T\        P                  4       Tu # i ; i)zA |NumberingPart| object providing access to the numbering definitions for this document.

Creates an empty numbering part if one is not present.
)r   r   part_related_byr   	NUMBERINGKeyErrorr   r   )r   numbering_parts   & r!   rg   DocumentPart.numbering_partb   sX    	"t';';BLL'IJJ 	"*..0NNN>2<<8!!	"s   ,/ AA43A4c                   V ^8  d   QhRR/# )r,   path_or_streamzstr | IO[bytes]r.   )r/   s   "r!   r0   r1   o   s     * *? *r%   c                <    V P                   P                  V4       R# )z}Save this document to `path_or_stream`, which can be either a path to a
filesystem location (a string) or a file-like object.N)r   save)r   rj   s   &&r!   rl   DocumentPart.saveo   s     	.)r%   c                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1   u   s     , ,( ,r%   c                .    V P                   P                  # )z[A |Settings| object providing access to the settings in the settings part of
this document.)_settings_partsettingsr5   s   &r!   rq   DocumentPart.settingst   s     ""+++r%   c                .    V P                   P                  # )zUA |Styles| object providing access to the styles in the styles part of this
document.)_styles_partrS   r5   s   &r!   rS   DocumentPart.stylesz   s       '''r%   c                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1           ! ! !r%   c                $    \        \        V P                  \        P                  4      4      #   \
         dV    T P                  f   Q h\        P                  ! T P                  4      pT P                  T\        P                  4       Tu # i ; i)zA |CommentsPart| object providing access to the comments added to this document.

Creates a default comments part if one is not present.
)	r   r   rd   r   COMMENTSrf   r   defaultr   )r   comments_parts   & r!   r3   DocumentPart._comments_part   sn    	!d&:&:2;;&GHH 	!<<+++(00>MNN="++6  		!s   ,/ ABBc                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1      rw   r%   c                    \        \        V P                  \        P                  4      4      #   \
         dF    \        P                  ! T P                  4      pT P                  T\        P                  4       Tu # i ; i)zA |SettingsPart| object providing access to the document-level settings for
this document.

Creates a default settings part if one is not present.
)	r   r   rd   r   SETTINGSrf   rz   r   r   )r   settings_parts   & r!   rp   DocumentPart._settings_part   s^    	!d&:&:2;;&GHH 	!(00>MNN="++6  	!s   ,/ AA?>A?c                   V ^8  d   QhRR/# )r,   r-   r   r.   )r/   s   "r!   r0   r1      s      j r%   c                    \        \        V P                  \        P                  4      4      #   \
         dN    T P                  pTf   Q h\        P                  ! T4      pT P                  T\        P                  4       Tu # i ; i)zaInstance of |StylesPart| for this document.

Creates an empty styles part if one is not present.
)	r   r   rd   r   STYLESrf   r   rz   r   )r   r   styles_parts   &  r!   rt   DocumentPart._styles_part   so    	
D$8$8$CDD 	llG&&&$,,W5KNN;		2	s   ,/ ABBr.   N)__name__
__module____qualname____firstlineno____doc__r"   r)   propertyr4   r9   r=   rE   r   rU   rX   r(   r   r`   rg   rl   rq   rS   r3   rp   rt   __static_attributes__r.   r%   r!   r   r      s       , , , ,
 - -';C' 6 6 
" 
"*
 , ,
 ( (
 ! ! ! !  r%   r   N)(r   
__future__r   typingr   r   r   docx.documentr   docx.opc.constantsr   r   docx.parts.commentsr   docx.parts.hdrftrr	   r
   docx.parts.numberingr   docx.parts.settingsr   docx.parts.storyr   docx.parts.stylesr   
docx.shaper   docx.sharedr   docx.commentsr   docx.enum.styler   docx.opc.corepropsr   docx.settingsr   docx.styles.styler   r   r.   r%   r!   <module>r      sO    1 " * * " 6 , 4 . , & ( # $&-1&+O9 Or%   