HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/__pycache__/ns.cpython-310.pyc
o

$we��@s�dZddlmZmZddlmZidd�dd�dd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�Zd$d%�e��D�ZGd&d'�d'e	�Z
d(e	d)e	fd*d+�Zd,e	d)ee	e	ffd-d.�Zd/e	d)e	fd0d1�Z
d2S)3zNamespace-related objects.�)�Any�Dict)�Self�az5http://schemas.openxmlformats.org/drawingml/2006/main�cz6http://schemas.openxmlformats.org/drawingml/2006/chart�cpzGhttp://schemas.openxmlformats.org/package/2006/metadata/core-properties�dcz http://purl.org/dc/elements/1.1/�dcmitypezhttp://purl.org/dc/dcmitype/�dctermszhttp://purl.org/dc/terms/�dgmz8http://schemas.openxmlformats.org/drawingml/2006/diagram�mz:http://schemas.openxmlformats.org/officeDocument/2006/math�picz8http://schemas.openxmlformats.org/drawingml/2006/picture�rzChttp://schemas.openxmlformats.org/officeDocument/2006/relationships�slz9http://schemas.openxmlformats.org/schemaLibrary/2006/main�wz<http://schemas.openxmlformats.org/wordprocessingml/2006/main�w14z4http://schemas.microsoft.com/office/word/2010/wordml�wpzFhttp://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing�xmlz$http://www.w3.org/XML/1998/namespace�xsiz)http://www.w3.org/2001/XMLSchema-instancecCsi|]\}}||�qS�r)�.0�key�valuerr�E/home/arjun/projects/env/lib/python3.10/site-packages/docx/oxml/ns.py�
<dictcomp>�rcs�eZdZdZdedef�fdd�Zdefdd�Zedefd	d
��Z	e
dedefdd
��Zedefdd��Z
edeeeffdd��Zedefdd��Zedefdd��Z�ZS)�NamespacePrefixedTagzNValue object that knows the semantics of an XML tag having a namespace prefix.�nstag�argscstt|��||�S)N)�superr�__new__)�clsrr��	__class__rrr  szNamespacePrefixedTag.__new__cCs"|�d�\|_|_t|j|_dS)N�:)�split�_pfx�_local_part�nsmap�_ns_uri)�selfrrrr�__init__#szNamespacePrefixedTag.__init__�returncCsd|j|jfS)N�{%s}%s)r)r'�r*rrr�
clark_name'szNamespacePrefixedTag.clark_namer/cCs.|dd��d�\}}dt||f}||�S)N��}z%s:%s)r%�pfxmap)r!r/�nsuri�
local_namerrrr�from_clark_name+sz$NamespacePrefixedTag.from_clark_namecC�|jS)z[The local part of this tag.

        E.g. "foobar" is returned for tag "f:foobar".
        )r'r.rrr�
local_part1�zNamespacePrefixedTag.local_partcCs|j|jiS)z�Single-member dict mapping prefix of this tag to it's namespace name.

        Example: `{"f": "http://foo/bar"}`. This is handy for passing to xpath calls
        and other uses.
        )r&r)r.rrrr(9szNamespacePrefixedTag.nsmapcCr6)zeThe namespace-prefix for this tag.

        For example, "f" is returned for tag "f:foobar".
        )r&r.rrr�nspfxBr8zNamespacePrefixedTag.nspfxcCr6)z�The namespace URI for this tag.

        For example, "http://foo/bar" would be returned for tag "f:foobar" if the "f"
        prefix maps to "http://foo/bar" in nsmap.
        )r)r.rrrr3JszNamespacePrefixedTag.nsuri)�__name__�
__module__�__qualname__�__doc__�strrr r+�propertyr/�classmethodrr5r7rr(r9r3�
__classcell__rrr"rrs r�prefixesr,cGsd�dd�|D��S)z�Namespace declaration including each namespace-prefix in `prefixes`.

    Handy for adding required namespace declarations to a tree root element.
    � cSsg|]
}d|t|f�qS)z
xmlns:%s="%s"�r(�r�pfxrrr�
<listcomp>Ysznsdecls.<locals>.<listcomp>)�join)rBrrr�nsdeclsTsrI�nspfxscGsdd�|D�S)z�Subset namespace-prefix mappings specified by *nspfxs*.

    Any number of namespace prefixes can be supplied, e.g. namespaces("a", "r", "p").
    cSsi|]}|t|�qSrrDrErrrrarznspfxmap.<locals>.<dictcomp>r)rJrrr�nspfxmap\srK�tagcCs"|�d�\}}t|}d||fS)aStands for "qualified name".

    This utility function converts a familiar namespace-prefixed tag name like "w:p"
    into a Clark-notation qualified tag name for lxml. For example, `qn("w:p")` returns
    "{http://schemas.openxmlformats.org/wordprocessingml/2006/main}p".
    r$r-)r%r()rL�prefix�tagroot�urirrr�qndsrPN)r=�typingrr�typing_extensionsrr(�itemsr2r>rrIrKrPrrrr�<module>sR��������	�
���
����7