ó
    ˆ*£hT!  ã                  ó¶   • S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJrJr  \(       a  SS	KJr  SS
KJr   " S S\5      r " S S\5      rg)z=lxml custom element classes for picture-related XML elements.é    )Úannotations)ÚTYPE_CHECKINGÚcast)Úescape)Ú	parse_xml©Únsdecls)ÚBaseShapeElement)ÚBaseOxmlElementÚOneAndOnlyOne)ÚCT_ShapeProperties)ÚLengthc                  óì  • \ rS rSr% Sr\" S5      r\" S5      r\" S5      rS\	S'   \
SS j5       rS	 rS
 r\
S 5       r\S 5       r\S 5       r\                    SS j5       r\
S 5       r\R(                  S 5       r\
S 5       r\R(                  S 5       r\
S 5       r\R(                  S 5       r\
S 5       r\R(                  S 5       rS r\S 5       r\S 5       r\S 5       rS rSrg) Ú
CT_Pictureé   zN`p:pic` element.

Represents a picture shape (an image placement on a slide).
z	p:nvPicPrz
p:blipFillzp:spPrr   ÚspPrc                óh   • U R                   R                  nUb  UR                  b  UR                  $ g)zGValue of `p:blipFill/a:blip/@r:embed`.

Returns |None| if not present.
N)ÚblipFillÚblipÚrEmbed)Úselfr   s     ÚU/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pptx/oxml/shapes/picture.pyÚblip_rIdÚCT_Picture.blip_rId   s/   € ð �}‰}×!Ñ!ˆØÑ §¡Ñ 7Ø—;‘;ÐØó    c                óX   • U R                   R                  U R                  X5      5        g)zž
Set cropping values in `p:blipFill/a:srcRect` such that an image of
*image_size* will stretch to exactly fit *view_size* when its aspect
ratio is preserved.
N)r   ÚcropÚ_fill_cropping)r   Ú
image_sizeÚ	view_sizes      r   Úcrop_to_fitÚCT_Picture.crop_to_fit'   s!   € ð 	�‰×Ñ˜4×.Ñ.¨zÓEÕFr   c                ó6   • U R                   R                  5       $ )zC
Return the <a:ln> grandchild element, newly added if not present.
)r   Úget_or_add_ln©r   s    r   r$   ÚCT_Picture.get_or_add_ln/   s   € ð �y‰y×&Ñ&Ó(Ð(r   c                ó.   • U R                   R                  $ )z9
``<a:ln>`` grand-child element or |None| if not present
)r   Úlnr%   s    r   r(   ÚCT_Picture.ln5   s   € ð
 �y‰y�|‰|Ðr   c                ó>   • [        U R                  5       XX44-  5      $ )zR
Return a new `p:pic` placeholder element populated with the supplied
parameters.
)r   Ú_pic_ph_tmpl)ÚclsÚid_ÚnameÚdescÚrIds        r   Ú
new_ph_picÚCT_Picture.new_ph_pic<   s"   € ô ˜×)Ñ)Ó+¨s¸$Ð.DÑDÓEÐEr   c	                óV   • [        U R                  5       X[        U5      XEXgU4-  5      $ )zFReturn new `<p:pic>` element tree configured with supplied parameters.)r   Ú	_pic_tmplr   )	r,   Úshape_idr.   r/   r0   ÚxÚyÚcxÚcys	            r   Únew_picÚCT_Picture.new_picD   s+   € ô ˜Ÿ™›¨H¼FÀ4»LÈ#ÐRSÐY[Ð+\Ñ\Ó]Ð]r   c
                óh   • [        [        [        U R                  5       UUUUUUUUU	4	-  5      5      $ )z8Return a new `p:pic` populated with the specified video.)r   r   r   Ú_pic_video_tmpl)
r,   r5   Ú
shape_nameÚ	video_rIdÚ	media_rIdÚposter_frame_rIdr6   r7   r8   r9   s
             r   Únew_video_picÚCT_Picture.new_video_picI   sM   € ô ÜÜØ×#Ñ#Ó%àØØØØ$ØØØØð
ñóó
ð 	
r   c                ó$   • U R                  S5      $ )z9Value of `p:blipFill/a:srcRect/@b` or 0.0 if not present.Úb©Ú
_srcRect_xr%   s    r   Ú	srcRect_bÚCT_Picture.srcRect_bi   ó   € ð �‰˜sÓ#Ð#r   c                ó@   • XR                   R                  5       l        g ©N)r   Úget_or_add_srcRectrE   ©r   Úvalues     r   rH   rI   n   ó   € à/4�‰×(Ñ(Ó*Õ,r   c                ó$   • U R                  S5      $ )z9Value of `p:blipFill/a:srcRect/@l` or 0.0 if not present.ÚlrF   r%   s    r   Ú	srcRect_lÚCT_Picture.srcRect_lr   rJ   r   c                ó@   • XR                   R                  5       l        g rL   )r   rM   rR   rN   s     r   rS   rT   w   rP   r   c                ó$   • U R                  S5      $ )z9Value of `p:blipFill/a:srcRect/@r` or 0.0 if not present.ÚrrF   r%   s    r   Ú	srcRect_rÚCT_Picture.srcRect_r{   rJ   r   c                ó@   • XR                   R                  5       l        g rL   )r   rM   rW   rN   s     r   rX   rY   €   rP   r   c                ó$   • U R                  S5      $ )z9Value of `p:blipFill/a:srcRect/@t` or 0.0 if not present.ÚtrF   r%   s    r   Ú	srcRect_tÚCT_Picture.srcRect_t„   rJ   r   c                ó@   • XR                   R                  5       l        g rL   )r   rM   r\   rN   s     r   r]   r^   ‰   rP   r   c                ór   • S nU" U6 nU" U6 nXE:  a  SXE-  -
  S-  nUSUS4$ XE:”  a  SXT-  -
  S-  nSUSU4$ g)a=  
Return a (left, top, right, bottom) 4-tuple containing the cropping
values required to display an image of *image_size* in *view_size*
when stretched proportionately. Each value is a percentage expressed
as a fraction of 1.0, e.g. 0.425 represents 42.5%. *image_size* and
*view_size* are each (width, height) pairs.
c                ó
   • X-  $ rL   © )ÚwidthÚheights     r   Úaspect_ratioÚ/CT_Picture._fill_cropping.<locals>.aspect_ratio–   s
   € Ø‘>Ð!r   g      ð?g       @ç        )rg   rg   rg   rg   rb   )r   r   r    re   Úar_viewÚar_imager   s          r   r   ÚCT_Picture._fill_cropping�   sn   € ò	"ñ  	Ð*ˆÙ Ð,ˆàÓØ˜7Ñ-Ñ.°#Ñ5ˆDØ˜#˜t SÐ)Ð)ØÓØ˜8Ñ-Ñ.°#Ñ5ˆDØ˜˜s DÐ)Ð)Ø#r   c                ó"   • S[        SSS5      -  $ )Na=  <p:pic %s>
  <p:nvPicPr>
    <p:cNvPr id="%%d" name="%%s" descr="%%s"/>
    <p:cNvPicPr>
      <a:picLocks noGrp="1" noChangeAspect="1"/>
    </p:cNvPicPr>
    <p:nvPr/>
  </p:nvPicPr>
  <p:blipFill>
    <a:blip r:embed="%%s"/>
    <a:stretch>
      <a:fillRect/>
    </a:stretch>
  </p:blipFill>
  <p:spPr/>
</p:pic>ÚpÚarW   r   ©r,   s    r   r+   ÚCT_Picture._pic_ph_tmpl¤   s   € ðô !  c¨3Ó/ñ0ð	
r   c                ó"   • S[        SSS5      -  $ )NaÙ  <p:pic %s>
  <p:nvPicPr>
    <p:cNvPr id="%%d" name="%%s" descr="%%s"/>
    <p:cNvPicPr>
      <a:picLocks noChangeAspect="1"/>
    </p:cNvPicPr>
    <p:nvPr/>
  </p:nvPicPr>
  <p:blipFill>
    <a:blip r:embed="%%s"/>
    <a:stretch>
      <a:fillRect/>
    </a:stretch>
  </p:blipFill>
  <p:spPr>
    <a:xfrm>
      <a:off x="%%d" y="%%d"/>
      <a:ext cx="%%d" cy="%%d"/>
    </a:xfrm>
    <a:prstGeom prst="rect">
      <a:avLst/>
    </a:prstGeom>
  </p:spPr>
</p:pic>rm   rl   rW   r   rn   s    r   r4   ÚCT_Picture._pic_tmpl¹   s   € ðô. !  c¨3Ó/ñ/0ð	
r   c                ó"   • S[        SSS5      -  $ )Na  <p:pic %s>
  <p:nvPicPr>
    <p:cNvPr id="%%d" name="%%s">
      <a:hlinkClick r:id="" action="ppaction://media"/>
    </p:cNvPr>
    <p:cNvPicPr>
      <a:picLocks noChangeAspect="1"/>
    </p:cNvPicPr>
    <p:nvPr>
      <a:videoFile r:link="%%s"/>
      <p:extLst>
        <p:ext uri="{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}">
          <p14:media xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" r:embed="%%s"/>
        </p:ext>
      </p:extLst>
    </p:nvPr>
  </p:nvPicPr>
  <p:blipFill>
    <a:blip r:embed="%%s"/>
    <a:stretch>
      <a:fillRect/>
    </a:stretch>
  </p:blipFill>
  <p:spPr>
    <a:xfrm>
      <a:off x="%%d" y="%%d"/>
      <a:ext cx="%%d" cy="%%d"/>
    </a:xfrm>
    <a:prstGeom prst="rect">
      <a:avLst/>
    </a:prstGeom>
  </p:spPr>
</p:pic>rm   rl   rW   r   rn   s    r   r=   ÚCT_Picture._pic_video_tmplÖ   s!   € ð!ôB !  c¨3Ó/ñC!0ð#	
r   c                óL   • U R                   R                  nUc  g[        X!5      $ )zE
Value of `p:blipFill/a:srcRect/@{attr_name}` or 0.0 if not present.
rg   )r   ÚsrcRectÚgetattr)r   Ú	attr_nameru   s      r   rG   ÚCT_Picture._srcRect_xý   s&   € ð —-‘-×'Ñ'ˆØ‰?ØÜ�wÓ*Ð*r   rb   N)Úreturnz
str | None)r5   Úintr>   Ústrr?   r{   r@   r{   rA   r{   r6   r   r7   r   r8   r   r9   r   ry   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚnvPicPrr   r   Ú__annotations__Úpropertyr   r!   r$   r(   Úclassmethodr1   r:   rB   rH   ÚsetterrS   rX   r]   r   r+   r4   r=   rG   Ú__static_attributes__rb   r   r   r   r      sÿ  ‡ ññ
 ˜KÓ(€GÙ˜\Ó*€HÙ,¨XÓ6€DÐ
Ó6àóó ðòGò)ð ñó ðð ñFó ðFð ñ^ó ð^ð ð
àð
ð ð
ð ð	
ð
 ð
ð ð
ð ð
ð ð
ð ð
ð ð
ð 
ó
ó ð
ð> ñ$ó ð$ð ×Ññ5ó ð5ð ñ$ó ð$ð ×Ññ5ó ð5ð ñ$ó ð$ð ×Ññ5ó ð5ð ñ$ó ð$ð ×Ññ5ó ð5ò$ð. ñ
ó ð
ð( ñ
ó ð
ð8 ñ$
ó ð$
õL+r   r   c                  ó8   • \ rS rSrSr\" S5      r\" S5      rSrg)ÚCT_PictureNonVisuali  zP
``<p:nvPicPr>`` element, containing non-visual properties for a picture
shape.
zp:cNvPrzp:nvPrrb   N)	r|   r}   r~   r   r€   r   ÚcNvPrÚnvPrr†   rb   r   r   rˆ   rˆ     s   † ññ
 ˜)Ó$€EÙ˜Ó"ƒDr   rˆ   N)r€   Ú
__future__r   Útypingr   r   Úxml.sax.saxutilsr   Ú	pptx.oxmlr   Úpptx.oxml.nsr	   Úpptx.oxml.shapes.sharedr
   Úpptx.oxml.xmlchemyr   r   r   Ú	pptx.utilr   r   rˆ   rb   r   r   Ú<module>r“      sB   ðÙ Cå "ç &Ý #å Ý  Ý 4ß =æÝ:Ý ôr+Ð!ô r+ôj#˜/õ #r   