o
    7 ¾h™  ã                   @  sä   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/d0„ e ¡ D ƒZG d1d2„ d2eƒZdAd5d6„ZeZ	dAd7d8„Z
dBd:d;„ZdCd>d?„Zd@S )Dz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-typesZdcz http://purl.org/dc/elements/1.1/Zdcmitypezhttp://purl.org/dc/dcmitype/Z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ÚwZw10ZwneZwpZxsic                 C  s   i | ]\}}||“qS © r   )Ú.0ÚkeyÚvaluer   r   úT/var/www/html/figdemos/bartoux_crm/venv/lib/python3.10/site-packages/pptx/oxml/ns.pyÚ
<dictcomp>$   ó    r   c                      sv   e Zd ZdZd‡ fdd„Zddd„Zedd
d„ƒZedd„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZedd„ ƒZ‡  ZS )ÚNamespacePrefixedTagzNValue object that knows the semantics of an XML tag having a namespace prefix.ÚnstagÚstrc                   s   t t| ƒ | |¡S )N)Úsuperr   Ú__new__)Úclsr   ©Ú	__class__r   r   r!   *   s   zNamespacePrefixedTag.__new__c                 C  s"   |  d¡\| _| _t| j | _d S )Nú:)ÚsplitÚ_pfxÚ_local_partÚ_nsmapÚ_ns_uri)Úselfr   r   r   r   Ú__init__-   s   zNamespacePrefixedTag.__init__Ú
clark_nameÚreturnc                 C  s.   |dd …   d¡\}}dt| |f }| |ƒS )Né   Ú}z%s:%s)r&   Úpfxmap)r"   r-   ÚnsuriÚ
local_namer   r   r   r   Úfrom_clark_name1   s   z$NamespacePrefixedTag.from_clark_namec                 C  s   d| j | jf S )Nz{%s}%s)r*   r(   ©r+   r   r   r   r-   7   s   zNamespacePrefixedTag.clark_namec                 C  ó   | j S )zu
        Return the local part of the tag as a string. E.g. 'foobar' is
        returned for tag 'f:foobar'.
        )r(   r5   r   r   r   Ú
local_part;   ó   zNamespacePrefixedTag.local_partc                 C  s   | 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.
        )r'   r*   r5   r   r   r   ÚnsmapC   s   zNamespacePrefixedTag.nsmapc                 C  r6   )zr
        Return the string namespace prefix for the tag, e.g. 'f' is returned
        for tag 'f:foobar'.
        )r'   r5   r   r   r   ÚnspfxL   r8   zNamespacePrefixedTag.nspfxc                 C  r6   )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.
        )r*   r5   r   r   r   r2   T   s   zNamespacePrefixedTag.nsuri)r   r   )r-   r   r.   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r,   Úclassmethodr4   Úpropertyr-   r7   r9   r:   r2   Ú__classcell__r   r   r#   r   r   '   s     




r   Úprefixesr   c                  G  s   dd„ | D ƒS )z²Return 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                 S  s   i | ]}|t | “qS r   ©r)   ©r   Zpfxr   r   r   r   c   r   znamespaces.<locals>.<dictcomp>r   ©rB   r   r   r   Ú
namespaces^   s   rF   c                  G  s   d  dd„ | D ƒ¡S )NÚ c                 S  s   g | ]
}d |t | f ‘qS )zxmlns:%s="%s"rC   rD   r   r   r   Ú
<listcomp>j   s    znsdecls.<locals>.<listcomp>)ÚjoinrE   r   r   r   Únsdeclsi   s   rJ   r:   c                 C  s   t |  S )z¢Return the namespace URI corresponding to `nspfx`.

    Example:

        >>> nsuri("p")
        "http://schemas.openxmlformats.org/presentationml/2006/main"
    rC   )r:   r   r   r   r2   m   s   r2   Únamespace_prefixed_tagr.   c                 C  s   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   r-   )rK   Únsptagr   r   r   Úqnx   s   rM   N)rB   r   )r:   r   )rK   r   r.   r   )r>   Ú
__future__r   r)   Úitemsr1   r   r   rF   r9   rJ   r2   rM   r   r   r   r   Ú<module>   sl    ÿþýüûúùø	÷
öõôóòñðïæ
7

