§
    tŠtjC  ã                  ó   — d Z ddlmZ ddlZddlZddlmZmZmZ ddl	m
Z
 ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ erddlmZmZmZmZmZ ddlmZ  G d„ d¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )zF
:mod:`pandas.io.formats.xml` is a module for formatting data in XML.
é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚfinal©ÚAbstractMethodError)Úcache_readonly)Úis_list_like)Úisna)Ú
get_handle)Úget_data_from_filepath)ÚCompressionOptionsÚFilePathÚ
ReadBufferÚStorageOptionsÚWriteBuffer)Ú	DataFramec                  ó8  — e Zd ZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d;d<d%„Zd=d'„Zed>d(„¦   «         Zed>d)„¦   «         Zed?d+„¦   «         Z	ed>d,„¦   «         Z
d@d-„ZedAd/„¦   «         ZedBd4„¦   «         ZedCd7„¦   «         Zed8„ ¦   «         ZedDd9„¦   «         ZedEd:„¦   «         ZdS )FÚ_BaseXMLFormatteraƒ  
    Subclass for formatting data in XML.

    Parameters
    ----------
    path_or_buffer : str or file-like
        This can be either a string of raw XML, a valid URL,
        file or file-like object.

    index : bool
        Whether to include index in xml document.

    row_name : str
        Name for root of xml document. Default is 'data'.

    root_name : str
        Name for row elements of xml document. Default is 'row'.

    na_rep : str
        Missing data representation.

    attrs_cols : list
        List of columns to write as attributes in row element.

    elem_cols : list
        List of columns to write as children in row element.

    namespaces : dict
        The namespaces to define in XML document as dicts with key
        being namespace and value the URI.

    prefix : str
        The prefix for each element in XML document including root.

    encoding : str
        Encoding of xml object or document.

    xml_declaration : bool
        Whether to include xml declaration at top line item in xml.

    pretty_print : bool
        Whether to write xml document with line breaks and indentation.

    stylesheet : str or file-like
        A URL, file, file-like object, or a raw string containing XSLT.

    compression : str or dict, default 'infer'
        For on-the-fly compression of the output data. If 'infer' and 'path_or_buffer'
        is path-like, then detect compression from the following extensions: '.gz',
        '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2'
        (otherwise no compression).
        Set to ``None`` for no compression.
        Can also be a dict with key ``'method'`` set
        to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``}
        and other key-value pairs are forwarded to
        ``zipfile.ZipFile``, ``gzip.GzipFile``,
        ``bz2.BZ2File``, ``zstandard.ZstdCompressor``, ``lzma.LZMAFile`` or
        ``tarfile.TarFile``, respectively.
        As an example, the following could be passed for faster compression and to
        create a reproducible gzip archive:
        ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.

    storage_options : dict, optional
        Extra options that make sense for a particular storage connection, e.g.
        host, port, username, password, etc. For HTTP(S) URLs the key-value pairs
        are forwarded to ``urllib.request.Request`` as header options. For other
        URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are
        forwarded to ``fsspec.open``. Please see ``fsspec`` and ``urllib`` for more
        details, and for more examples on storage options refer `here
        <https://pandas.pydata.org/docs/user_guide/io.html?
        highlight=storage_options#reading-writing-remote-files>`_.

    See also
    --------
    pandas.io.formats.xml.EtreeXMLFormatter
    pandas.io.formats.xml.LxmlXMLFormatter

    NTÚdataÚrowúutf-8ÚinferÚframer   Úpath_or_bufferú7FilePath | WriteBuffer[bytes] | WriteBuffer[str] | NoneÚindexÚboolÚ	root_nameú
str | NoneÚrow_nameÚna_repÚ	attr_colsúlist[str] | NoneÚ	elem_colsÚ
namespacesúdict[str | None, str] | NoneÚprefixÚencodingÚstrÚxml_declarationúbool | NoneÚpretty_printÚ
stylesheetú5FilePath | ReadBuffer[str] | ReadBuffer[bytes] | NoneÚcompressionr   Ústorage_optionsúStorageOptions | NoneÚreturnÚNonec                ó  — || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        || _        || _        || _        | j         j                             ¦   «         | _        |                      ¦   «         | _        |                      ¦   «          |                      ¦   «          |                      ¦   «         | _        |                      ¦   «          d S ©N)r   r   r   r   r!   r"   r#   r%   r&   r(   r)   r+   r-   r.   r0   r1   ÚcolumnsÚtolistÚ	orig_colsÚ_process_dataframeÚframe_dictsÚ_validate_columnsÚ_validate_encodingÚ_get_prefix_uriÚ
prefix_uriÚ_handle_indexes)Úselfr   r   r   r   r!   r"   r#   r%   r&   r(   r)   r+   r-   r.   r0   r1   s                    úS/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/io/formats/xml.pyÚ__init__z_BaseXMLFormatter.__init__t   sô   € ð& ˆŒ
Ø,ˆÔØˆŒ
Ø"ˆŒØ ˆŒØˆŒØ"ˆŒØ"ˆŒØ$ˆŒØˆŒØ ˆŒØ.ˆÔØ(ˆÔØ$ˆŒØ/:ˆÔØ.ˆÔàœÔ+×2Ò2Ñ4Ô4ˆŒØ×2Ò2Ñ4Ô4ˆÔà×ÒÑ Ô Ð Ø×ÒÑ!Ô!Ð!Ø×.Ò.Ñ0Ô0ˆŒØ×ÒÑÔÐÐÐó    Úbytesc                ó    — t          | ¦  «        ‚)ú—
        Build tree from  data.

        This method initializes the root and builds attributes and elements
        with optional namespaces.
        r   ©rA   s    rB   Ú_build_treez_BaseXMLFormatter._build_tree    s   € õ " $Ñ'Ô'Ð'rD   c                ó  — | j         r=t          | j         ¦  «        s)t          t          | j         ¦  «        j        › d�¦  «        ‚| j        r=t          | j        ¦  «        s+t          t          | j        ¦  «        j        › d�¦  «        ‚dS dS )zä
        Validate elems_cols and attrs_cols.

        This method will check if columns is list-like.

        Raises
        ------
        ValueError
            * If value is not a list and less then length of nodes.
        z" is not a valid type for attr_colsz" is not a valid type for elem_colsN)r#   r
   Ú	TypeErrorÚtypeÚ__name__r%   rH   s    rB   r<   z#_BaseXMLFormatter._validate_columns©   s¦   € ð Œ>ð 	¥,¨t¬~Ñ">Ô">ð 	ÝÝ˜œÑ'Ô'Ô0ÐTÐTÐTñô ð ð Œ>ð 	¥,¨t¬~Ñ">Ô">ð 	ÝÝ˜œÑ'Ô'Ô0ÐTÐTÐTñô ð ð	ð 	ð 	ð 	rD   c                ó8   — t          j        | j        ¦  «         dS )z×
        Validate encoding.

        This method will check if encoding is among listed under codecs.

        Raises
        ------
        LookupError
            * If encoding is not available in codecs.
        N)ÚcodecsÚlookupr)   rH   s    rB   r=   z$_BaseXMLFormatter._validate_encoding¿   s   € õ 	Œ�d”mÑ$Ô$Ð$Ð$Ð$rD   údict[int | str, dict[str, Any]]c                ó´   — | j         }| j        r|                     ¦   «         }| j        �|                     | j        ¦  «        }|                     d¬¦  «        S )zÊ
        Adjust Data Frame to fit xml output.

        This method will adjust underlying data frame for xml output,
        including optionally replacing missing values and including indexes.
        Nr   )Úorient)r   r   Úreset_indexr"   ÚfillnaÚto_dict)rA   Údfs     rB   r:   z$_BaseXMLFormatter._process_dataframeÎ   sS   € ð ŒZˆàŒ:ð 	"Ø—’Ñ!Ô!ˆBàŒ;Ð"Ø—’˜4œ;Ñ'Ô'ˆBà�zŠz ˆzÑ)Ô)Ð)rD   c                ó  ‡ — ‰ j         sdS t          t          ‰ j        ¦  «        ¦  «        }ˆ fd„‰ j        |                              ¦   «         D ¦   «         }‰ j        r|‰ j        z   ‰ _        ‰ j        r|‰ j        z   ‰ _        dS dS )zd
        Handle indexes.

        This method will add indexes into attr_cols or elem_cols.
        Nc                ó&   •— g | ]}|‰j         v¯|‘ŒS © )r9   )Ú.0ÚxrA   s     €rB   ú
<listcomp>z5_BaseXMLFormatter._handle_indexes.<locals>.<listcomp>í   s,   ø€ ð 
ð 
ð 
Ø¸QÀdÄnÐ=TÐ=TˆAÐ=TÐ=TÐ=TrD   )r   ÚnextÚiterr;   Úkeysr#   r%   )rA   Ú	first_keyÚindexess   `  rB   r@   z!_BaseXMLFormatter._handle_indexesá   s¨   ø€ ð Œzð 	ØˆFå�˜dÔ.Ñ/Ô/Ñ0Ô0ˆ	ð
ð 
ð 
ð 
ØÔ'¨	Ô2×7Ò7Ñ9Ô9ð
ñ 
ô 
ˆð Œ>ð 	6Ø$ t¤~Ñ5ˆDŒNàŒ>ð 	6Ø$ t¤~Ñ5ˆDŒNˆNˆNð	6ð 	6rD   c                ó    — t          | ¦  «        ‚)zâ
        Get uri of namespace prefix.

        This method retrieves corresponding URI to prefix in namespaces.

        Raises
        ------
        KeyError
            *If prefix is not included in namespace dict.
        r   rH   s    rB   r>   z!_BaseXMLFormatter._get_prefix_uri÷   s   € õ " $Ñ'Ô'Ð'rD   Údictc                ód   ‡ — i }‰ j         r%ˆ fd„‰ j                              ¦   «         D ¦   «         }|S )zÃ
        Define other namespaces.

        This method will build dictionary of namespaces attributes
        for root element, conditionally with optional namespaces and
        prefix.
        c                ó^   •— i | ])\  }}|‰j         d d…         k    ¯d|dk    r|nd|› �› �|“Œ*S )é   éÿÿÿÿÚxmlnsÚ ú:)r?   )r[   ÚpÚnrA   s      €rB   ú
<dictcomp>z7_BaseXMLFormatter._other_namespaces.<locals>.<dictcomp>  sY   ø€ ð ð ð á�A�qØ˜œ¨¨"¨Ô-Ò-Ð-ð 4˜Q "šW˜W˜˜¨'¨a¨'¨'Ð3Ð3°Qà-Ð-Ð-rD   )r&   Úitems)rA   Ú	nmsp_dicts   ` rB   Ú_other_namespacesz#_BaseXMLFormatter._other_namespaces  sR   ø€ ð %'ˆ	ØŒ?ð 	ðð ð ð à œO×1Ò1Ñ3Ô3ðñ ô ˆIð ÐrD   Údúdict[str, Any]Úelem_rowr   c                ó  — | j         s|S | j         D ]o}|                      |¦  «        }	 t          ||         ¦  «        st          ||         ¦  «        |j        |<   ŒK# t
          $ r}t          d|› �¦  «        |‚d}~ww xY w|S )z´
        Create attributes of row.

        This method adds attributes using attr_cols to row element and
        works with tuples for multindex or hierarchical columns.
        úno valid column, N)r#   Ú_get_flat_col_namer   r*   ÚattribÚKeyError)rA   rr   rt   ÚcolÚ	attr_nameÚerrs         rB   Ú_build_attribsz _BaseXMLFormatter._build_attribs  s©   € ð Œ~ð 	ØˆOà”>ð 	Cð 	CˆCØ×/Ò/°Ñ4Ô4ˆIðCÝ˜A˜cœF‘|”|ð =Ý14°Q°s´V±´�H”O IÑ.øøÝð Cð Cð CÝÐ8°3Ð8Ð8Ñ9Ô9¸sÐBøøøøðCøøøàˆs   ©2AÁ
A>Á&A9Á9A>rz   ústr | tuplec                ó  — |}t          |t          ¦  «        rfd|v r1d                     d„ |D ¦   «         ¦  «                             ¦   «         n0d                     d„ |D ¦   «         ¦  «                             ¦   «         }| j        › |› �S )Nrj   c                ó,   — g | ]}t          |¦  «        ‘ŒS rZ   ©r*   ©r[   Úcs     rB   r]   z8_BaseXMLFormatter._get_flat_col_name.<locals>.<listcomp>3  s   € Ð-Ð-Ð- A�˜Q™œÐ-Ð-Ð-rD   Ú_c                ó,   — g | ]}t          |¦  «        ‘ŒS rZ   r�   r‚   s     rB   r]   z8_BaseXMLFormatter._get_flat_col_name.<locals>.<listcomp>5  s   € Ð3Ð3Ð3¨!�s 1™vœvÐ3Ð3Ð3rD   )Ú
isinstanceÚtupleÚjoinÚstripr?   )rA   rz   Úflat_cols      rB   rw   z$_BaseXMLFormatter._get_flat_col_name.  s—   € àˆÝ�c�5Ñ!Ô!ð 	ð ˜�9�9ð —’Ð-Ð-¨Ð-Ñ-Ô-Ñ.Ô.×4Ò4Ñ6Ô6Ð6à—X’XÐ3Ð3¨sÐ3Ñ3Ô3Ñ4Ô4×:Ò:Ñ<Ô<ð ð
 ”/Ð- 8Ð-Ð-Ð-rD   c                ó    — t          | ¦  «        ‚r6   r   rH   s    rB   Ú_sub_element_clsz"_BaseXMLFormatter._sub_element_cls9  s   € å! $Ñ'Ô'Ð'rD   c                óB  — | j         }| j        sdS | j        D ]†}|                      |¦  «        }	 t          ||         ¦  «        s||         dk    rdnt	          ||         ¦  «        }| |||¦  «        _        Œb# t          $ r}t          d|› �¦  «        |‚d}~ww xY wdS )z¼
        Create child elements of row.

        This method adds child elements using elem_cols to row element and
        works with tuples for multindex or hierarchical columns.
        Nrj   rv   )rŒ   r%   rw   r   r*   Útextry   )rA   rr   rt   Úsub_element_clsrz   Ú	elem_nameÚvalr|   s           rB   Ú_build_elemsz_BaseXMLFormatter._build_elems=  sÔ   € ð Ô/ˆàŒ~ð 	ØˆFà”>ð 	Cð 	CˆCØ×/Ò/°Ñ4Ô4ˆIðCÝ" 1 S¤6™lœlÐK¨a°¬f¸ªl¨l�d�dÅÀAÀcÄFÁÄ�Ø<?�� ¨)Ñ4Ô4Ô9Ð9øÝð Cð Cð CÝÐ8°3Ð8Ð8Ñ9Ô9¸sÐBøøøøðCøøøð	Cð 	Cs   °A	A:Á:
BÂBÂBc                ó>  — |                       ¦   «         }| j        �Wt          | j        d| j        | j        d¬¦  «        5 }|j                             |¦  «         d d d ¦  «         n# 1 swxY w Y   d S |                     | j        ¦  «         	                    ¦   «         S )NÚwbF)r0   r1   Úis_text)
rI   r   r   r0   r1   ÚhandleÚwriteÚdecoder)   Úrstrip)rA   Úxml_docÚhandless      rB   Úwrite_outputz_BaseXMLFormatter.write_outputR  sÝ   € à×"Ò"Ñ$Ô$ˆàÔÐ*ÝØÔ#ØØ Ô,Ø $Ô 4Øðñ ô ð .ð Ø”×$Ò$ WÑ-Ô-Ð-ð.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .ð �4ð —>’> $¤-Ñ0Ô0×7Ò7Ñ9Ô9Ð9s   ¿A&Á&A*Á-A*)NTr   r   NNNNNr   TTNr   N)"r   r   r   r   r   r   r   r    r!   r    r"   r    r#   r$   r%   r$   r&   r'   r(   r    r)   r*   r+   r,   r-   r,   r.   r/   r0   r   r1   r2   r3   r4   ©r3   rE   ©r3   r4   )r3   rQ   ©r3   r*   )r3   rd   )rr   rs   rt   r   r3   r   )rz   r~   r3   r*   )rr   rs   rt   r   r3   r4   )r3   r    )rM   Ú
__module__Ú__qualname__Ú__doc__rC   rI   r   r<   r=   r:   r@   r>   rq   r}   rw   r	   rŒ   r’   rœ   rZ   rD   rB   r   r   $   sÓ  € € € € € ðMð Mðd SWØØ &Ø$Ø!Ø&*Ø&*Ø37Ø!ØØ'+Ø$(ØLPØ*1Ø15ð#*ð *ð *ð *ð *ðX(ð (ð (ð (ð ðð ð ñ „Uðð* ð%ð %ð %ñ „Uð%ð ð*ð *ð *ñ „Uð*ð$ ð6ð 6ð 6ñ „Uð6ð*(ð (ð (ð (ð ðð ð ñ „Uðð& ðð ð ñ „Uðð( ð.ð .ð .ñ „Uð.ð ð(ð (ñ „^ð(ð ðCð Cð Cñ „UðCð( ð:ð :ð :ñ „Uð:ð :ð :rD   r   c                  ó@   — e Zd ZdZd
d„Zdd„Zed„ ¦   «         Zd
d„Zd	S )ÚEtreeXMLFormatterú„
    Class for formatting data in xml using Python standard library
    modules: `xml.etree.ElementTree` and `xml.dom.minidom`.
    r3   rE   c                óž  — ddl m}m}m}  || j        › | j        › �|                      ¦   «         ¬¦  «        | _        | j         	                    ¦   «         D ]˜} || j        | j        › | j
        › �¦  «        }| j        sD| j        s=t          |                     ¦   «         ¦  «        | _        |                      ||¦  «         Œl|                      ||¦  «        }|                      ||¦  «         Œ™ || j        d| j        | j        ¬¦  «        | _        | j        r|                      ¦   «         | _        | j        �t/          d¦  «        ‚| j        S )Nr   ©ÚElementÚ
SubElementÚtostring)rx   Úxml)Úmethodr)   r+   zBTo use stylesheet, you need lxml installed and selected as parser.)Úxml.etree.ElementTreer¨   r©   rª   r?   r   rq   Úrootr;   Úvaluesr!   r#   r%   Úlistr`   r’   r}   r)   r+   Úout_xmlr-   Ú_prettify_treer.   Ú
ValueError©rA   r¨   r©   rª   rr   rt   s         rB   rI   zEtreeXMLFormatter._build_treek  s“  € ð	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð �GØŒÐ0 ¤Ð0Ð0¸×9OÒ9OÑ9QÔ9Qð
ñ 
ô 
ˆŒ	ð Ô!×(Ò(Ñ*Ô*ð 		/ð 		/ˆAØ!�z $¤)°´Ð-PÀÄÐ-PÐ-PÑQÔQˆHà”>ð /¨$¬.ð /Ý!% a§f¢f¡h¤h¡¤�”Ø×!Ò! ! XÑ.Ô.Ð.Ð.ð  ×.Ò.¨q°(Ñ;Ô;�Ø×!Ò! ! XÑ.Ô.Ð.Ð.à�xØŒIØØ”]Ø Ô0ð	
ñ 
ô 
ˆŒð Ôð 	1Ø×.Ò.Ñ0Ô0ˆDŒLàŒ?Ð&ÝØTñô ð ð Œ|ÐrD   r*   c                óš  — ddl m} d}| j        r»| j                             ¦   «         D ];\  }}t	          |t
          ¦  «        r!t	          |t
          ¦  «        r |||¦  «         Œ<| j        rB	 d| j        | j                 › d�}nG# t          $ r}t          | j        › d�¦  «        |‚d }~ww xY wd| j        v rd| j        d         › d�}nd}|S )Nr   )Úregister_namespacerj   Ú{Ú}ú is not included in namespaces)r­   r¶   r&   ro   r†   r*   r(   ry   )rA   r¶   Úurirl   rm   r|   s         rB   r>   z!EtreeXMLFormatter._get_prefix_uri’  s  € Ø<Ð<Ð<Ð<Ð<Ð<àˆØŒ?ð 	Øœ×-Ò-Ñ/Ô/ð -ð -‘��1Ý˜a¥Ñ%Ô%ð -­*°Q½Ñ*<Ô*<ð -Ø&Ð& q¨!Ñ,Ô,Ð,øØŒ{ð 
ðØ?˜tœ¨t¬{Ô;Ð?Ð?Ð?�C�CøÝð ð ð Ý"Øœ;ÐFÐFÐFñô àðøøøøðøøøð �t”Ð&Ð&Ø2˜4œ?¨2Ô.Ð2Ð2Ð2��à�àˆ
s   Á-B Â
B+ÂB&Â&B+c                ó   — ddl m} |S ©Nr   )r©   )r­   r©   ©rA   r©   s     rB   rŒ   z"EtreeXMLFormatter._sub_element_cls¨  s   € à4Ð4Ð4Ð4Ð4Ð4àÐrD   c                óf   — ddl m}  || j        ¦  «        }|                     d| j        ¬¦  «        S )zƒ
        Output tree for pretty print format.

        This method will pretty print xml with line breaks and indentation.
        r   )ÚparseStringz  )Úindentr)   )Úxml.dom.minidomr¿   r±   Útoprettyxmlr)   )rA   r¿   Údoms      rB   r²   z EtreeXMLFormatter._prettify_tree®  s?   € ð 	0Ð/Ð/Ð/Ð/Ð/àˆk˜$œ,Ñ'Ô'ˆà�Š d°T´]ˆÑCÔCÐCrD   Nr�   rŸ   )	rM   r    r¡   r¢   rI   r>   r	   rŒ   r²   rZ   rD   rB   r¤   r¤   e  s|   € € € € € ðð ð
%ð %ð %ð %ðNð ð ð ð, ðð ñ „^ðð
Dð Dð Dð Dð Dð DrD   r¤   c                  óZ   ‡ — e Zd ZdZdˆ fd„Zdd„Zdd„Zdd	„Zed
„ ¦   «         Z	dd„Z
ˆ xZS )ÚLxmlXMLFormatterr¥   r3   r4   c                ób   •—  t          ¦   «         j        |i |¤Ž |                      ¦   «          d S r6   )ÚsuperrC   Ú_convert_empty_str_key)rA   ÚargsÚkwargsÚ	__class__s      €rB   rC   zLxmlXMLFormatter.__init__Â  s7   ø€ Ø�‰ŒÔ˜$Ð) &Ð)Ð)Ð)à×#Ò#Ñ%Ô%Ð%Ð%Ð%rD   rE   c                ód  — ddl m}m}m}  || j        › | j        › �| j        ¬¦  «        | _        | j         	                    ¦   «         D ]˜} || j        | j        › | j
        › �¦  «        }| j        sD| j        s=t          |                     ¦   «         ¦  «        | _        |                      ||¦  «         Œl|                      ||¦  «        }|                      ||¦  «         Œ™ || j        | j        d| j        | j        ¬¦  «        | _        | j        �|                      ¦   «         | _        | j        S )rG   r   r§   )Únsmapr«   )r-   r¬   r)   r+   )Ú
lxml.etreer¨   r©   rª   r?   r   r&   r®   r;   r¯   r!   r#   r%   r°   r`   r’   r}   r-   r)   r+   r±   r.   Ú_transform_docr´   s         rB   rI   zLxmlXMLFormatter._build_treeÇ  sd  € ð	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð �G˜tœÐ@°´Ð@Ð@ÈÌÐXÑXÔXˆŒ	àÔ!×(Ò(Ñ*Ô*ð 		/ð 		/ˆAØ!�z $¤)°´Ð-PÀÄÐ-PÐ-PÑQÔQˆHà”>ð /¨$¬.ð /Ý!% a§f¢f¡h¤h¡¤�”Ø×!Ò! ! XÑ.Ô.Ð.Ð.ð  ×.Ò.¨q°(Ñ;Ô;�Ø×!Ò! ! XÑ.Ô.Ð.Ð.à�xØŒIØÔ*ØØ”]Ø Ô0ð
ñ 
ô 
ˆŒð Œ?Ð&Ø×.Ò.Ñ0Ô0ˆDŒLàŒ|ÐrD   c                ó˜   — | j         r@d| j                              ¦   «         v r'| j                              dd¦  «        | j         d<   dS dS dS )z¿
        Replace zero-length string in `namespaces`.

        This method will replace '' with None to align to `lxml`
        requirement that empty string prefixes are not allowed.
        rj   ÚdefaultN)r&   r`   ÚpoprH   s    rB   rÈ   z'LxmlXMLFormatter._convert_empty_str_keyî  s]   € ð Œ?ð 	G˜r T¤_×%9Ò%9Ñ%;Ô%;Ð;Ð;Ø$(¤O×$7Ò$7¸¸IÑ$FÔ$FˆDŒO˜DÑ!Ð!Ð!ð	Gð 	GÐ;Ð;rD   r*   c                óä   — d}| j         rf| j        rB	 d| j         | j                 › d�}nG# t          $ r}t          | j        › d�¦  «        |‚d }~ww xY wd| j         v rd| j         d         › d�}nd}|S )Nrj   r·   r¸   r¹   )r&   r(   ry   )rA   rº   r|   s      rB   r>   z LxmlXMLFormatter._get_prefix_uriù  s¯   € ØˆØŒ?ð 	ØŒ{ð 
ðØ?˜tœ¨t¬{Ô;Ð?Ð?Ð?�C�CøÝð ð ð Ý"Øœ;ÐFÐFÐFñô àðøøøøðøøøð �t”Ð&Ð&Ø2˜4œ?¨2Ô.Ð2Ð2Ð2��à�àˆ
s   ’) ©
A³AÁAc                ó   — ddl m} |S r¼   )rÎ   r©   r½   s     rB   rŒ   z!LxmlXMLFormatter._sub_element_cls
  s   € à)Ð)Ð)Ð)Ð)Ð)àÐrD   c                óÜ  — ddl m}m}m}m} | j        }|€J ‚t          || j        | j        | j	        ¬¦  «        }|5 } || j        ¬¦  «        }t          |t          j        ¦  «        r8 ||                     ¦   «                              | j        ¦  «        |¬¦  «        }	n |||¬¦  «        }	ddd¦  «         n# 1 swxY w Y    ||	¦  «        }
 |
| j        ¦  «        }t!          |¦  «        S )zõ
        Parse stylesheet from file or buffer and run it.

        This method will parse stylesheet object into tree for parsing
        conditionally by its specific object type, then transforms
        original tree with XSLT script.
        r   )ÚXSLTÚ	XMLParserÚ
fromstringÚparseN)Úfilepath_or_bufferr)   r0   r1   )r)   )Úparser)rÎ   rÖ   r×   rØ   rÙ   r.   r   r)   r0   r1   r†   ÚioÚStringIOÚgetvalueÚencoder®   rE   )rA   rÖ   r×   rØ   rÙ   Ú	style_docÚhandle_dataÚxml_dataÚcurr_parserÚxsl_docÚtransformerÚnew_docs               rB   rÏ   zLxmlXMLFormatter._transform_doc  sx  € ð	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð ”Oˆ	ØÐ$Ð$Ð$å,Ø(Ø”]ØÔ(Ø Ô0ð	
ñ 
ô 
ˆð ð 	>˜HØ#˜)¨T¬]Ð;Ñ;Ô;ˆKå˜(¥B¤KÑ0Ô0ð >Ø$˜*Ø×%Ò%Ñ'Ô'×.Ò.¨t¬}Ñ=Ô=Àkðñ ô ��ð  ˜% °Ð=Ñ=Ô=�ð	>ð 	>ð 	>ñ 	>ô 	>ð 	>ð 	>ð 	>ð 	>ð 	>ð 	>øøøð 	>ð 	>ð 	>ð 	>ð �d˜7‘m”mˆØ�+˜dœiÑ(Ô(ˆå�W‰~Œ~Ðs   ¼A1B9Â9B=Ã B=rž   r�   rŸ   )rM   r    r¡   r¢   rC   rI   rÈ   r>   r	   rŒ   rÏ   Ú__classcell__)rË   s   @rB   rÅ   rÅ   ¼  s·   ø€ € € € € ðð ð
&ð &ð &ð &ð &ð &ð
%ð %ð %ð %ðN	Gð 	Gð 	Gð 	Gðð ð ð ð" ðð ñ „^ðð
&ð &ð &ð &ð &ð &ð &ð &rD   rÅ   ) r¢   Ú
__future__r   rO   rÜ   Útypingr   r   r   Úpandas.errorsr   Úpandas.util._decoratorsr	   Úpandas.core.dtypes.commonr
   Úpandas.core.dtypes.missingr   Úpandas.io.commonr   Úpandas.io.xmlr   Úpandas._typingr   r   r   r   r   Úpandasr   r   r¤   rÅ   rZ   rD   rB   ú<module>rò      sã  ððð ð #Ð "Ð "Ð "Ð "Ð "à €€€Ø 	€	€	€	ðð ð ð ð ð ð ð ð ð ð .Ð -Ð -Ð -Ð -Ð -Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø +Ð +Ð +Ð +Ð +Ð +à 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0àð 	!ðð ð ð ð ð ð ð ð ð ð ð ð ð ð !Ð Ð Ð Ð Ð ð~:ð ~:ð ~:ð ~:ð ~:ñ ~:ô ~:ð ~:ðB
TDð TDð TDð TDð TDÐ)ñ TDô TDð TDðnzð zð zð zð zÐ(ñ zô zð zð zð zrD   