+
    i                         ^ RI 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Ht ^ RIHtHt  ! R R	]4      t ! R
 R]
4      tR tR tRR ltR# )    N)warn)StringAliasSequence)Serialisable)ElementList)REL_NS
PKG_REL_NS)Element
fromstringc                      a  ] tR t^t o RtR t]! 4       t]! 4       t]	! R4      t
]! RR7      t]! RR7      t]	! R4      tR	R ltRtV tR# )
Relationshipz'Represents many kinds of relationships.TargetT)
allow_noneIdNc                j    Ve   RP                  \        V4      pW n        W@n        WPn        Wn        R# )z
`type` can be used as a shorthand with the default relationships namespace
otherwise the `Type` must be a fully qualified URL
Nz{0}/{1})formatr	   Typer   
TargetModer   )selfr   r   typer   r   s   &&&&&&f/Users/agent/.openclaw/workspace/.venv/lib/python3.14/site-packages/openpyxl/packaging/relationship.py__init__Relationship.__init__"   s0     ##FD1D	$    )r   r   r   r   )NNNNN)__name__
__module____qualname____firstlineno____doc__tagnamer   r   r   r   targetr   r   idr   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sK     1G8DXF8_F4(J	4	 B	tB r   r   c                   X   a a ] tR t^5t oRt]tV 3R ltR tR t	R t
V 3R ltRtVtV ;t# )RelationshipListRelationshipsc                t   < \         SV `  V4       VP                  '       g   R \        V 4       2Vn        R# R# )rIdN)superappendr   len)r   value	__class__s   &&r   r-   RelationshipList.append;   s/    uxxxSYK(EH r   c              #  N   "   V  F  pVP                   V8X  g   K  Vx  K  	  R# 5i)z
Find relationships by content-type
NB. these content-types namespaced objects and different to the MIME-types
in the package manifest :-(
N)r   )r   content_typers   && r   findRelationshipList.findA   s"      Avv% s   %
%c                r    V  F  pVP                   V8X  g   K  Vu # 	  \        R P                  V4      4      h)zUnknown relationship: {0})r   KeyErrorr   )r   keyr4   s   && r   getRelationshipList.getL   s5    Atts{  299#>??r   c                D    V  Uu/ uF  qP                   VbK  	  up# u upi )z,Return a dictionary of relations keyed by id)r#   )r   r4   s   & r   to_dictRelationshipList.to_dictS   s      $%1Q%%%s   c                P   < \         SV `  4       pVP                  R \        4       V# )xmlns)r,   to_treesetr
   )r   treer0   s   & r   rA   RelationshipList.to_treeX   s"    w *%r    )r   r   r   r   r!   r   expected_typer-   r5   r:   r=   rA   r$   r%   __classcell__)r0   r&   s   @@r   r(   r(   5   s.     G M)@&
 r   r(   c                    \         P                  ! V 4      w  r\         P                  ! VRRP                  V4      4      pV# )z
Convert relative path to absolutes that can be loaded from a zip
archive.
The path to be passed in is that of containing object (workbook,
worksheet, etc.)
_relsz{0}.rels)	posixpathsplitjoinr   )pathfolderobjfilenames   &   r   get_rels_pathrQ   ^   s6     //$'KF~~fgz/@/@/EFHOr   c                b   V P                  V4      p\        V4      p \        P                  V4      p\        P                  ! V4      p\        P                  ! V4      ^ ,          pV F  pVP                  R8X  d   K  VP                  P                  R4      '       d   VP                  R,          Vn        KQ  \        P                  ! WxP                  4      p	\        P                  ! V	4      Vn        K  	  V#   \         d*    RP                  T4      p\        T4       \        4       p Li ; i)z`
Normalise dependency file paths to absolute ones

Relative paths are relative to parent object
z+{0} contains invalid dependency definitionsExternal/:   NN)readr   r(   	from_tree	TypeErrorr   r   rJ   dirnamerK   r   r"   
startswithrL   normpath)
archiverP   srcnoderelsmsgrN   parentr4   pths
   &&        r   get_dependentsrc   j   s     ,,x
 Cc?D"))$/
 x(F__V$Q'F<<:%XX  %%xx|AH..2C ))#.AH  K  ";BB8LS	!"s   C: :1D.-D.c                   \        W#.4      '       g   \        R4      hVe   VP                  V4      pM% \        VP	                  VP
                  4      4      pVP                  pV P                  V4      p\        V4      pVP                  V4      p\        V4      p	 \        W	4      Vn        V#   \         d     R# i ; i  \         d    . Tn         T# i ; i)z,
Get related object based on id or rel_type
z.Either the id or the content type are requiredN)any
ValueErrorr:   nextr5   rel_typeStopIterationr"   rV   r   rW   rQ   rc   depsr8   )
r\   rj   r#   clsrelrM   r]   rC   rO   	rels_paths
   &&&&      r   get_relrn      s     y>>IJJ	~hhrl	tyy./C ::D
,,t
Cc?D
--
Cd#I!'5 J  		  Js#   $B0 C 0B?>B?CC)NN)rJ   warningsr   openpyxl.descriptorsr   r   r   !openpyxl.descriptors.serialisabler   openpyxl.descriptors.containerr   openpyxl.xml.constantsr	   r
   openpyxl.xml.functionsr   r   r   r(   rQ   rc   rn   rE   r   r   <module>ru      sP      
 ; 6 5< @&{ &R	6r   