+
    ^eòjø'  ã                  ó¾   € R t ^ RIHt ^ RIHt ^ RIHt ]'       d   ^ RIHt  ! R R]	4      t
 ! R R]4      t ! R	 R
]4      t ! R R]	4      t ! R R]4      tR tR# )z?Objects related to layout of rendered text, such as TextFitter.)Úannotations)ÚTYPE_CHECKING)Ú	ImageFont)ÚLengthc                  óž   € ] tR t^tRtR t]R R l4       tR tR t	R t
]R 4       t]R	 4       t]R
 4       t]R 4       t]R 4       tR tRtR# )Ú
TextFitterzGValue object that knows how to fit text into given rectangular extents.c                	ó:   € Vw  rE\         P                  WWEV34      # ©N©ÚtupleÚ__new__)ÚclsÚline_sourceÚextentsÚ	font_fileÚwidthÚheights   &&&&  Ú‡/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/pptx/text/layout.pyr   ÚTextFitter.__new__   s   € Ø‰ˆÜ�}‰}˜S°¸yÐ"IÓJÐJó    c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	é   ÚtextÚstrr   ztuple[Length, Length]Úmax_sizeÚintr   Úreturn© )Úformats   "r   Ú__annotate__ÚTextFitter.__annotate__   s4   € ÷ 9ñ 9Øð9Ø!6ð9ØBEð9ØRUð9à	ñ9r   c                óL   € \        V4      pV ! WRV4      pVP                  V4      # )a  Return whole-number best fit point size less than or equal to `max_size`.

The return value is the largest whole-number point size less than or equal to
`max_size` that allows `text` to fit completely within `extents` when rendered
using font defined in `font_file`.
)Ú_LineSourceÚ_best_fit_font_size)r   r   r   r   r   r   Útext_fitters   &&&&&  r   Úbest_fit_font_sizeÚTextFitter.best_fit_font_size   s+   € ô " $Ó'ˆÙ˜+°	Ó:ˆØ×.Ñ.¨xÓ8Ð8r   c                óš   € V P                   p\        P                  \        ^\	        V4      ^,           4      4      pVP                  V4      # )zg
Return the largest whole-number point size less than or equal to
*max_size* that this fitter can fit.
)Ú_fits_inside_predicateÚ_BinarySearchTreeÚfrom_ordered_sequenceÚranger   Úfind_max)Úselfr   Ú	predicateÚsizess   &&  r   r#   ÚTextFitter._best_fit_font_size"   s?   € ð
 ×/Ñ/ˆ	Ü!×7Ñ7¼¸aÄÀXÃÐQRÕARÓ8SÓTˆØ�~‰~˜iÓ(Ð(r   c                óp   € \         P                  V4      pV P                  V4      pVP                  V4      # )zÑ
Return a (line, remainder) pair where *line* is the longest line in
*line_source* that will fit in this fitter's width and *remainder* is
a |_LineSource| object containing the text following the break point.
)r)   r*   Ú_fits_in_width_predicater,   )r-   r   Ú
point_sizeÚlinesr.   s   &&&  r   Ú_break_lineÚTextFitter._break_line+   s3   € ô "×7Ñ7¸ÓDˆØ×1Ñ1°*Ó=ˆ	Ø�~‰~˜iÓ(Ð(r   c                ó   a a€ VV 3R lpV# )z¥
Return a function taking a text string value and returns |True| if
that text fits in this fitter when rendered at *point_size*. Used as
predicate for _break_line()
c                ór   <€ \        V P                  SSP                  4      ^ ,          pVSP                  8*  # )zL
Return |True| if *line* fits in this fitter when rendered at
*point_size*.
)Ú_rendered_sizer   Ú
_font_fileÚ_width)ÚlineÚcxr3   r-   s   & €€r   r.   Ú6TextFitter._fits_in_width_predicate.<locals>.predicate<   s/   ø€ ô
   §	¡	¨:°t·±ÓGÈÕJˆBØ˜Ÿ™Ñ$Ð$r   r   )r-   r3   r.   s   ff r   r2   Ú#TextFitter._fits_in_width_predicate5   s   ù€ ö	%ð Ðr   c                ó   a € V 3R lpV# )zÄReturn  function taking an integer point size argument.

The function returns |True| if the text in this fitter can be wrapped to fit
entirely within its extents when rendered at that point size.
c                ó¶   <€ SP                  SP                  V 4      p\        RV SP                  4      ^,          pV\	        V4      ,          SP
                  8*  # )zÑReturn |True| when text in `line_source` can be wrapped to fit.

Fit means text can be broken into lines that fit entirely within `extents`
when rendered at `point_size` using the font defined in `font_file`.
ÚTy)Ú_wrap_linesÚ_line_sourcer9   r:   ÚlenÚ_height)r3   Ú
text_linesÚcyr-   s   &  €r   r.   Ú4TextFitter._fits_inside_predicate.<locals>.predicateN   sL   ø€ ð ×)Ñ)¨$×*;Ñ*;¸ZÓHˆJÜ  j°$·/±/ÓBÀ1ÕEˆBØœ˜Z›Õ(¨T¯\©\Ñ9Ð9r   r   )r-   r.   s   f r   r(   Ú!TextFitter._fits_inside_predicateF   s   ø€ õ	:ð Ðr   c                	ó   € V ^,          # )é   r   ©r-   s   &r   r:   ÚTextFitter._font_fileZ   ó   € à�A�wˆr   c                	ó   € V ^,          # )r   r   rM   s   &r   rF   ÚTextFitter._height^   rO   r   c                	ó   € V ^ ,          # ©é    r   rM   s   &r   rD   ÚTextFitter._line_sourceb   rO   r   c                	ó   € V ^,          # ©é   r   rM   s   &r   r;   ÚTextFitter._widthf   rO   r   c                ó‚   € V P                  W4      w  r4V.pV'       d!   VP                  V P                  WB4      4       V# )z‚
Return a sequence of str values representing the text in
*line_source* wrapped within this fitter when rendered at
*point_size*.
)r5   ÚextendrC   )r-   r   r3   r   Ú	remainderr4   s   &&&   r   rC   ÚTextFitter._wrap_linesj   s<   € ð ×*Ñ*¨;ÓC‰ˆØ�ˆßØ�L‰L˜×)Ñ)¨)Ó@ÔAØˆr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úclassmethodr%   r#   r5   r2   Úpropertyr(   r:   rF   rD   r;   rC   Ú__static_attributes__r   r   r   r   r      s—   † ÙQòKð ô9ó ð9ò)ò)òð" ñó ðð& ñó ðð ñó ðð ñó ðð ñó ðö
r   r   c                  óp   € ] tR t^wtRtR tRR lt]R 4       tR t	RR lt
]R 4       t]R	 4       tR
 tRtR# )r)   zQ
A node in a binary search tree. Uniform for root, subtree root, and leaf
nodes.
c                	ó.   € Wn         R V n        R V n        R # r	   )Ú_valueÚ_lesserÚ_greater)r-   Úvalues   &&r   Ú__init__Ú_BinarySearchTree.__init__}   s   € ØŒØˆŒØˆŽr   Nc                óª   € V! V P                   4      '       d   V P                   pV P                  pMV P                  pVf   V# VP                  W4      # )zK
Return the largest item in or under this node that satisfies
*predicate*.
)rk   rj   ri   r,   )r-   r.   Úmax_Ú	next_nodes   &&& r   r,   Ú_BinarySearchTree.find_max‚   sJ   € ñ
 �T—Z‘Z× Ò Ø—:‘:ˆDØŸ™‰IàŸ™ˆIØÒØˆKØ×!Ñ! )Ó2Ð2r   c                ój   € \        V4      pV ! VP                  4       4      pVP                  V4       V# )z`
Return the root of a balanced binary search tree populated with the
values in iterable *iseq*.
)ÚlistÚpopÚ_insert_from_ordered_sequence)r   ÚiseqÚseqÚbsts   &&  r   r*   Ú'_BinarySearchTree.from_ordered_sequence�   s/   € ô �4‹jˆá�#—'‘'“)‹nˆØ×)Ñ)¨#Ô.Øˆ
r   c                óœ   € WP                   8  d   RMRp\        W4      pVf   \        W\        V4      4       R# VP	                  V4       R# )zs
Insert a new node containing *value* into this tree such that its
structure as a binary search tree is preserved.
ri   rj   N)rk   ÚgetattrÚsetattrr)   Úinsert)r-   rk   ÚsideÚchilds   &&  r   r}   Ú_BinarySearchTree.insertœ   s?   € ð
 "§J¡JÔ.‰y°JˆÜ˜Ó#ˆØŠ=Ü�DÔ 1°%Ó 8Ö9à�L‰L˜Ör   c                óL  € V: V P                   P                  : R2pRRV,          ,          pV P                  '       d*   W0P                  P                  V^,           V4      ,          pV P                  '       d*   W0P                  P                  V^,           V4      ,          pV# )zY
A string representation of the tree rooted in this node, useful for
debugging purposes.
Ú
u   %sâ””â”€â”€ z    )rk   r   ri   Útreerj   )r-   ÚlevelÚprefixr   s   &&& r   rƒ   Ú_BinarySearchTree.tree¨   su   € ò
 " 4§:¡:§?¤?Ð3ˆØ 6¨E¥>Õ2ˆØ�<�<ˆ<Ø—L‘L×%Ñ% e¨a¥i°Ó8Õ8ˆDØ�=�=ˆ=Ø—M‘M×&Ñ& u¨q¥y°&Ó9Õ9ˆDØˆr   c                ó   € V P                   # )z*
The value object contained in this node.
)rh   rM   s   &r   rk   Ú_BinarySearchTree.valueµ   s   € ð
 �{‰{Ðr   c                óš   € \        V 4      ^ 8X  d   . R. 3# \        \        V 4      ^,          4      pW,          pW^,           R pV RV pW#V3# )zf
Return a (medial_value, greater_values, lesser_values) 3-tuple
obtained by bisecting sequence *seq*.
N)rE   r   )rw   Úmid_idxÚmidÚgreaterÚlessers   &    r   Ú_bisectÚ_BinarySearchTree._bisect¼   sX   € ô ˆs‹8�qŒ=Ø�t˜R�<ÐÜ”c˜#“h •lÓ#ˆØ�lˆØ •k�mÐ$ˆØ�X�g�ˆØ˜VÐ#Ð#r   c                ó¸   € \        V4      ^ 8X  d   R# V P                  V4      w  r#pV P                  V4       V P                  V4       V P                  V4       R# )z`
Insert the new values contained in *seq* into this tree such that
a balanced tree is produced.
N)rE   rŽ   r}   ru   )r-   rw   r‹   rŒ   r�   s   &&   r   ru   Ú/_BinarySearchTree._insert_from_ordered_sequenceÊ   sM   € ô
 ˆs‹8�qŒ=ÙØ#Ÿ|™|¨CÓ0Ñˆ�fØ�‰�CÔØ×*Ñ*¨7Ô3Ø×*Ñ*¨6Ö2r   )rj   ri   rh   r	   )rT   Ú )r^   r_   r`   ra   rb   rl   r,   rc   r*   r}   rƒ   rd   rk   ÚstaticmethodrŽ   ru   re   r   r   r   r)   r)   w   s\   † ñò
ô
3ð ñ	ó ð	ò
 ôð ñó ðð ñ$ó ð$ö
3r   r)   c                  ó>   € ] tR t^×tRtR tR tR tR tR t	R t
RtR	# )
r"   aR  
Generates all the possible even-word line breaks in a string of text,
each in the form of a (line, remainder) 2-tuple where *line* contains the
text before the break and *remainder* the text after as a |_LineSource|
object. Its boolean value is |True| when it contains text, |False| when
its text is the empty string or whitespace only.
c                	ó   € Wn         R # r	   ©Ú_text)r-   r   s   &&r   rl   Ú_LineSource.__init__à   s   € ØŽ
r   c                ó<   € V P                   P                  4       R8g  # )zƒ
Gives this object boolean behaviors (in Python 3). bool(line_source)
is False if it contains the empty string or whitespace only.
r’   ©r—   ÚstriprM   s   &r   Ú__bool__Ú_LineSource.__bool__ã   ó   € ð
 �z‰z×ÑÓ! RÑ'Ð'r   c                	ó4   € V P                   VP                   8H  # r	   r–   ©r-   Úothers   &&r   Ú__eq__Ú_LineSource.__eq__ê   s   € Ø�z‰z˜UŸ[™[Ñ(Ð(r   c              #  ó  "  € V P                   P                  4       p\        ^\        V4      ^,           4       FB  pRP	                  VRV 4      pRP	                  WR 4      p\        V4      p\        W54      x € KD  	  R# 5i)z£
Generate a (text, remainder) pair for each possible even-word line
break in this line source, where *text* is a str value and remainder
is a |_LineSource| value.
Ú N)r—   Úsplitr+   rE   Újoinr"   Ú_Line)r-   ÚwordsÚidxÚ	line_textÚremainder_textr\   s   &     r   Ú__iter__Ú_LineSource.__iter__í   sm   é € ð —
‘
× Ñ Ó"ˆÜ˜œC ›J¨�NÖ+ˆCØŸ™  t¨ Ó-ˆIØ ŸX™X e¨D kÓ2ˆNÜ# NÓ3ˆIÜ˜	Ó-Ô-ó	 ,ùs   ‚A?Bc                ó<   € V P                   P                  4       R8g  # )zƒ
Gives this object boolean behaviors (in Python 2). bool(line_source)
is False if it contains the empty string or whitespace only.
r’   rš   rM   s   &r   Ú__nonzero__Ú_LineSource.__nonzero__ú   rž   r   c                	ó(   € R V P                   ,          # )z<_LineSource('%s')>r–   rM   s   &r   Ú__repr__Ú_LineSource.__repr__  s   € Ø$ t§z¡zÕ1Ð1r   r–   N)r^   r_   r`   ra   rb   rl   rœ   r¢   r­   r°   r³   re   r   r   r   r"   r"   ×   s%   † ñòò(ò)ò.ò(ö2r   r"   c                  óX   € ] tR tRtRtR tR tR tR tR t	]
R 4       t]
R	 4       tR
tR# )r¨   i  z«
A candidate line broken at an even word boundary from a string of text,
and a |_LineSource| value containing the text that remains after the line
is broken at this spot.
c                	ó0   € \         P                  WV34      # r	   r
   )r   r   r\   s   &&&r   r   Ú_Line.__new__  s   € Ü�}‰}˜S¨Ð"3Ó4Ð4r   c                	óX   € \        V P                  4      \        VP                  4      8„  # r	   ©rE   r   r    s   &&r   Ú__gt__Ú_Line.__gt__  s   € Ü�4—9‘9‹~¤ E§J¡J£Ñ/Ð/r   c                	ó.   € V P                  V4      '       * # r	   )rº   r    s   &&r   Ú__lt__Ú_Line.__lt__  s   € Ø—;‘;˜uÓ%Ô%Ð%r   c                	ó,   € \        V P                  4      # r	   r¹   rM   s   &r   Ú__len__Ú_Line.__len__  s   € Ü�4—9‘9‹~Ðr   c                	ó@   € R V P                   : RV P                  : R 2# )Ú'z' => ')r   r\   rM   s   &r   r³   Ú_Line.__repr__  s   � Ø!%§¤¨D¯N¬NÐ;Ð;r   c                	ó   € V ^,          # rW   r   rM   s   &r   r\   Ú_Line.remainder  rO   r   c                	ó   € V ^ ,          # rS   r   rM   s   &r   r   Ú
_Line.text  rO   r   r   N)r^   r_   r`   ra   rb   r   rº   r½   rÀ   r³   rd   r\   r   re   r   r   r   r¨   r¨     sH   † ñò5ò0ò&òò<ð ñó ðð ñó ôr   r¨   c                  ó.   € ] tR tRtRt/ t]R 4       tRtR# )Ú_Fontsi$  z*
A memoizing cache for ImageFont objects.
c                	ó–   € W3V P                   9  d%   \        P                  ! W4      V P                   W3&   V P                   W3,          # r	   )Úfontsr   Útruetype)r   Ú	font_pathr3   s   &&&r   ÚfontÚ_Fonts.font+  s?   € àÐ"¨#¯)©)Ô3Ü1:×1CÒ1CÀIÓ1ZˆC�I‰I�yÐ-Ñ.Ø�y‰y˜)Ð0Õ1Ð1r   r   N)	r^   r_   r`   ra   rb   rÌ   rc   rÏ   re   r   r   r   rÊ   rÊ   $  s    † ñð €Eàñ2ó ô2r   rÊ   c                ó*  € RpRp\         P                  W!4      p VP                  V 4      w  rg\        Wd,          V,          4      p\        Wt,          V,          4      pWÍ3#   \         d'    TP	                  T 4      w  r‰r«Y¨,
          Y¹,
          rv Lci ; i)zŸ
Return a (width, height) pair representing the size of *text* in English
Metric Units (EMU) when rendered at *point_size* in the font defined in
*font_file*.
iàó g      R@)rÊ   rÏ   ÚgetsizeÚAttributeErrorÚgetbboxr   )r   r3   r   Úemu_per_inchÚpx_per_inchrÏ   Úpx_widthÚ	px_heightÚleftÚtopÚrightÚbottomÚ	emu_widthÚ
emu_heights   &&&           r   r9   r9   2  s�   € ð €LØ€Kä�;‰;�yÓ-€Dð9Ø"Ÿl™l¨4Ó0Ñˆô
 �HÕ*¨\Õ9Ó:€IÜ�YÕ,¨|Õ;Ó<€JàÐ Ð øô ô 9Ø#'§<¡<°Ó#5Ñ ˆ�5Ø#�l¨F­L’)ð9ús   ›A! Á!.BÂBN)rb   Ú
__future__r   Útypingr   ÚPILr   Ú	pptx.utilr   r   r   Úobjectr)   r"   r¨   rÊ   r9   r   r   r   Ú<module>rä      s_   ðÙ Eå "å  å çÝ ôg�ô gôT]3˜ô ]3ô@+2�&ô +2ô\ˆEô ô>2ˆVô 2ô!r   