
    hi                       d Z ddlmZ i ddddddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.	Zd/ e                                D             Z G d0 d1e          Zd<d4ZeZ	d<d5Z
d=d7Zd>d:Zd;S )?zNamespace related objects.    )annotationsaz5http://schemas.openxmlformats.org/drawingml/2006/maincz6http://schemas.openxmlformats.org/drawingml/2006/chartcpzGhttp://schemas.openxmlformats.org/package/2006/metadata/core-propertiesctz<http://schemas.openxmlformats.org/package/2006/content-typesdcz http://purl.org/dc/elements/1.1/dcmitypezhttp://purl.org/dc/dcmitype/dctermszhttp://purl.org/dc/terms/epzIhttp://schemas.openxmlformats.org/officeDocument/2006/extended-propertiesizIhttp://schemas.openxmlformats.org/officeDocument/2006/relationships/imagemz:http://schemas.openxmlformats.org/officeDocument/2006/mathmoz8http://schemas.microsoft.com/office/mac/office/2008/mainmvz!urn:schemas-microsoft-com:mac:vmloz'urn:schemas-microsoft-com:office:officepz:http://schemas.openxmlformats.org/presentationml/2006/mainpdzDhttp://schemas.openxmlformats.org/drawingml/2006/presentationDrawingpicz8http://schemas.openxmlformats.org/drawingml/2006/pictureprz<http://schemas.openxmlformats.org/package/2006/relationshipszChttp://schemas.openxmlformats.org/officeDocument/2006/relationshipszOhttp://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayoutzurn:schemas-microsoft-com:vmlz;http://schemas.openxmlformats.org/markup-compatibility/2006z<http://schemas.openxmlformats.org/wordprocessingml/2006/mainz%urn:schemas-microsoft-com:office:wordz4http://schemas.microsoft.com/office/word/2006/wordmlzFhttp://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingz)http://www.w3.org/2001/XMLSchema-instance)	rslvveww10wnewpxsic                    i | ]\  }}||	S  r   ).0keyvalues      d/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/pptx/oxml/ns.py
<dictcomp>r$   $   s    	6	6	6e%	6	6	6    c                       e Zd ZdZd fdZddZedd            Zed	             Z	ed
             Z
ed             Zed             Zed             Z xZS )NamespacePrefixedTagzNValue object that knows the semantics of an XML tag having a namespace prefix.nstagstrc                V    t          t          |                               | |          S )N)superr'   __new__)clsr(   	__class__s     r#   r,   zNamespacePrefixedTag.__new__*   s$    )3//77UCCCr%   c                x    |                     d          \  | _        | _        t          | j                 | _        d S )N:)split_pfx_local_part_nsmap_ns_uri)selfr(   s     r#   __init__zNamespacePrefixedTag.__init__-   s/    &+kk#&6&6#	4#di(r%   
clark_namereturnc                |    |dd                               d          \  }}t          |         d|} | |          S )N   }r0   )r1   pfxmap)r-   r8   nsuri
local_namer(   s        r#   from_clark_namez$NamespacePrefixedTag.from_clark_name1   sD    &qrrN0055z!%===**5s5zzr%   c                &    d| j         d| j        S )N{r<   )r5   r3   r6   s    r#   r8   zNamespacePrefixedTag.clark_name7   s     <<<)9)9::r%   c                    | j         S )zu
        Return the local part of the tag as a string. E.g. 'foobar' is
        returned for tag 'f:foobar'.
        )r3   rC   s    r#   
local_partzNamespacePrefixedTag.local_part;   s     r%   c                    | j         | j        iS )z
        Return a dict having a single member, mapping the namespace prefix of
        this tag to it's namespace name (e.g. {'f': 'http://foo/bar'}). This
        is handy for passing to xpath calls and other uses.
        )r2   r5   rC   s    r#   nsmapzNamespacePrefixedTag.nsmapC   s     	4<((r%   c                    | j         S )zr
        Return the string namespace prefix for the tag, e.g. 'f' is returned
        for tag 'f:foobar'.
        )r2   rC   s    r#   nspfxzNamespacePrefixedTag.nspfxL   s     yr%   c                    | j         S )z
        Return the namespace URI for the tag, e.g. 'http://foo/bar' would be
        returned for tag 'f:foobar' if the 'f' prefix maps to
        'http://foo/bar' in _nsmap.
        )r5   rC   s    r#   r>   zNamespacePrefixedTag.nsuriT   s     |r%   )r(   r)   )r8   r)   r9   r'   )__name__
__module____qualname____doc__r,   r7   classmethodr@   propertyr8   rE   rG   rI   r>   __classcell__)r.   s   @r#   r'   r'   '   s       XXD D D D D D) ) ) )    [
 ; ; X;     X  ) ) X)   X   X    r%   r'   prefixesr)   c                     d | D             S )zReturn a dict containing the subset namespace prefix mappings specified by *prefixes*.

    Any number of namespace prefixes can be supplied, e.g. namespaces('a', 'r', 'p').
    c                *    i | ]}|t           |         S r   r4   r    pfxs     r#   r$   znamespaces.<locals>.<dictcomp>c   s    111C111r%   r   rR   s    r#   
namespacesrY   ^   s    
 211111r%   c                 @    d                     d | D                       S )N c                6    g | ]}d |dt           |         dS )zxmlns:z=""rU   rV   s     r#   
<listcomp>znsdecls.<locals>.<listcomp>j   s+    NNNccVC[[[9NNNr%   )joinrX   s    r#   nsdeclsr`   i   s#    88NNXNNNOOOr%   rI   c                    t           |          S )zReturn the namespace URI corresponding to `nspfx`.

    Example:

        >>> nsuri("p")
        "http://schemas.openxmlformats.org/presentationml/2006/main"
    rU   )rI   s    r#   r>   r>   m   s     %=r%   namespace_prefixed_tagr9   c                .    t          |           }|j        S )a*  Return a Clark-notation qualified tag name corresponding to `namespace_prefixed_tag`.

    `namespace_prefixed_tag` is a string like 'p:body'. 'qn' stands for `qualified name`.

    As an example, `qn("p:cSld")` returns:
        `"{http://schemas.openxmlformats.org/drawingml/2006/main}cSld"`.
    )r'   r8   )rb   nsptags     r#   qnre   x   s     ""899Fr%   N)rR   r)   )rI   r)   )rb   r)   r9   r)   )rN   
__future__r   r4   itemsr=   r)   r'   rY   rG   r`   r>   re   r   r%   r#   <module>rh      s       " " " " " "
	@
	A
 	
S
 	
H	

 	
,
 .
 *
 	
U
 	T
 	E
 	
D
 	
-
 	2
 	E
 	
P
  
E!
" 	
H#
$ 
O
[	(
G	G2A
R65
 
 
: 
7	6v||~~	6	6	64 4 4 4 43 4 4 4n2 2 2 2 	P P P P   	 	 	 	 	 	r%   