%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/pygments/formatters/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/pygments/formatters/__pycache__/html.cpython-312.pyc

�

|�e8���.�dZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZmZddl
mZmZmZ	ddlZdgZed�d	ed
�ded�d
ed�ded�diZefd�Zd�Zd�ZdZdezdzZdZdZGd�de�Zy#e$rdZY�[wxYw)z�
    pygments.formatters.html
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for HTML output.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�StringIO)�	Formatter)�Token�Text�STANDARD_TYPES)�get_bool_opt�get_int_opt�get_list_opt�
HtmlFormatter�&z&amp;�<z&lt;�>z&gt;�"z&quot;�'z&#39;c�$�|j|�S)z<Escape &, <, > as well as single and double quotes for HTML.)�	translate)�text�tables  �:/usr/lib/python3/dist-packages/pygments/formatters/html.py�escape_htmlr&s���>�>�%� � �c�T�|jd�s|jd�r|Sd|zS)N�calc�var�#)�
startswith)�colors r�webifyr+s,�������5�#3�#3�E�#:����U�{�rc��tj|�}|r|Sd}|�/d|dz|z}|j}tj|�}|��/||zS)N��-���)r�get�parent)�ttype�fname�anames   r�_get_ttype_classr(2sb�����u�%�E�����E�
�-��e�B�i��%�'�������"�"�5�)���-��5�=�rz�/*
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
*/
%(styledefs)s
a�<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2023 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <style type="text/css">
z/
  </style>
</head>
<body>
<h2>%(title)s</h2>

a5<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <link rel="stylesheet" href="%(cssfile)s" type="text/css">
</head>
<body>
<h2>%(title)s</h2>

z</body>
</html>
c��eZdZdZdZdgZddgZd�Zd�Zd�Z	d	�Z
d
�Zd%d�Zd%d
�Z
d%d�Zd�Zd�Zed��Zed��Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej>d��d��Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%y)&ra�,
    Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed
    in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option).
    The ``<div>``'s CSS class can be set by the `cssclass` option.

    If the `linenos` option is set to ``"table"``, the ``<pre>`` is
    additionally wrapped inside a ``<table>`` which has one row and two
    cells: one containing the line numbers and one containing the code.
    Example:

    .. sourcecode:: html

        <div class="highlight" >
        <table><tr>
          <td class="linenos" title="click to toggle"
            onclick="with (this.firstChild.style)
                     { display = (display == '') ? 'none' : '' }">
            <pre>1
            2</pre>
          </td>
          <td class="code">
            <pre><span class="Ke">def </span><span class="NaFu">foo</span>(bar):
              <span class="Ke">pass</span>
            </pre>
          </td>
        </tr></table></div>

    (whitespace added to improve clarity).

    A list of lines can be specified using the `hl_lines` option to make these
    lines highlighted (as of Pygments 0.11).

    With the `full` option, a complete HTML 4 document is output, including
    the style definitions inside a ``<style>`` tag, or in a separate file if
    the `cssfile` option is given.

    When `tagsfile` is set to the path of a ctags index file, it is used to
    generate hyperlinks from names to their definition.  You must enable
    `lineanchors` and run ctags with the `-n` option for this to work.  The
    `python-ctags` module from PyPI must be installed to use this feature;
    otherwise a `RuntimeError` will be raised.

    The `get_style_defs(arg='')` method of a `HtmlFormatter` returns a string
    containing CSS rules for the CSS classes used by the formatter. The
    argument `arg` can be used to specify additional CSS selectors that
    are prepended to the classes. A call `fmter.get_style_defs('td .code')`
    would result in the following CSS classes:

    .. sourcecode:: css

        td .code .kw { font-weight: bold; color: #00FF00 }
        td .code .cm { color: #999999 }
        ...

    If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
    `get_style_defs()` method to request multiple prefixes for the tokens:

    .. sourcecode:: python

        formatter.get_style_defs(['div.syntax pre', 'pre.syntax'])

    The output would then look like this:

    .. sourcecode:: css

        div.syntax pre .kw,
        pre.syntax .kw { font-weight: bold; color: #00FF00 }
        div.syntax pre .cm,
        pre.syntax .cm { color: #999999 }
        ...

    Additional options accepted:

    `nowrap`
        If set to ``True``, don't add a ``<pre>`` and a ``<div>`` tag
        around the tokens. This disables most other options (default: ``False``).

    `full`
        Tells the formatter to output a "full" document, i.e. a complete
        self-contained document (default: ``False``).

    `title`
        If `full` is true, the title that should be used to caption the
        document (default: ``''``).

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``). This option has no effect if the `cssfile`
        and `noclobber_cssfile` option are given and the file specified in
        `cssfile` exists.

    `noclasses`
        If set to true, token ``<span>`` tags (as well as line number elements)
        will not use CSS classes, but inline styles. This is not recommended
        for larger pieces of code since it increases output size by quite a bit
        (default: ``False``).

    `classprefix`
        Since the token types use relatively short class names, they may clash
        with some of your own class names. In this case you can use the
        `classprefix` option to give a string to prepend to all Pygments-generated
        CSS class names for token types.
        Note that this option also affects the output of `get_style_defs()`.

    `cssclass`
        CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
        If you set this option, the default selector for `get_style_defs()`
        will be this class.

        .. versionadded:: 0.9
           If you select the ``'table'`` line numbers, the wrapping table will
           have a CSS class of this string plus ``'table'``, the default is
           accordingly ``'highlighttable'``.

    `cssstyles`
        Inline CSS styles for the wrapping ``<div>`` tag (default: ``''``).

    `prestyles`
        Inline CSS styles for the ``<pre>`` tag (default: ``''``).

        .. versionadded:: 0.11

    `cssfile`
        If the `full` option is true and this option is given, it must be the
        name of an external file. If the filename does not include an absolute
        path, the file's path will be assumed to be relative to the main output
        file's path, if the latter can be found. The stylesheet is then written
        to this file instead of the HTML file.

        .. versionadded:: 0.6

    `noclobber_cssfile`
        If `cssfile` is given and the specified file exists, the css file will
        not be overwritten. This allows the use of the `full` option in
        combination with a user specified css file. Default is ``False``.

        .. versionadded:: 1.1

    `linenos`
        If set to ``'table'``, output line numbers as a table with two cells,
        one containing the line numbers, the other the whole code.  This is
        copy-and-paste-friendly, but may cause alignment problems with some
        browsers or fonts.  If set to ``'inline'``, the line numbers will be
        integrated in the ``<pre>`` tag that contains the code (that setting
        is *new in Pygments 0.8*).

        For compatibility with Pygments 0.7 and earlier, every true value
        except ``'inline'`` means the same as ``'table'`` (in particular, that
        means also ``True``).

        The default value is ``False``, which means no line numbers at all.

        **Note:** with the default ("table") line number mechanism, the line
        numbers and code can have different line heights in Internet Explorer
        unless you give the enclosing ``<pre>`` tags an explicit ``line-height``
        CSS property (you get the default line spacing with ``line-height:
        125%``).

    `hl_lines`
        Specify a list of lines to be highlighted. The line numbers are always
        relative to the input (i.e. the first line is line 1) and are
        independent of `linenostart`.

        .. versionadded:: 0.11

    `linenostart`
        The line number for the first line (default: ``1``).

    `linenostep`
        If set to a number n > 1, only every nth line number is printed.

    `linenospecial`
        If set to a number n > 0, every nth line number is given the CSS
        class ``"special"`` (default: ``0``).

    `nobackground`
        If set to ``True``, the formatter won't output the background color
        for the wrapping element (this automatically defaults to ``False``
        when there is no wrapping element [eg: no argument for the
        `get_syntax_defs` method given]) (default: ``False``).

        .. versionadded:: 0.6

    `lineseparator`
        This string is output between lines of code. It defaults to ``"\n"``,
        which is enough to break a line inside ``<pre>`` tags, but you can
        e.g. set it to ``"<br>"`` to get HTML line breaks.

        .. versionadded:: 0.7

    `lineanchors`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in an anchor tag with an ``id`` (and `name`) of ``foo-linenumber``.
        This allows easy linking to certain lines.

        .. versionadded:: 0.9

    `linespans`
        If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
        output line in a span tag with an ``id`` of ``foo-linenumber``.
        This allows easy access to lines via javascript.

        .. versionadded:: 1.6

    `anchorlinenos`
        If set to `True`, will wrap line numbers in <a> tags. Used in
        combination with `linenos` and `lineanchors`.

    `tagsfile`
        If set to the path of a ctags file, wrap names in anchor tags that
        link to their definitions. `lineanchors` should be used, and the
        tags file should specify line numbers (see the `-n` option to ctags).
        The tags file is assumed to be encoded in UTF-8.

        .. versionadded:: 1.6

    `tagurlformat`
        A string formatting pattern used to generate links to ctags definitions.
        Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
        Defaults to an empty string, resulting in just `#prefix-number` links.

        .. versionadded:: 1.6

    `filename`
        A string used to generate a filename when rendering ``<pre>`` blocks,
        for example if displaying source code. If `linenos` is set to
        ``'table'`` then the filename will be rendered in an initial row
        containing a single `<th>` which spans both columns.

        .. versionadded:: 2.1

    `wrapcode`
        Wrap the code inside ``<pre>`` blocks using ``<code>``, as recommended
        by the HTML5 specification.

        .. versionadded:: 2.4

    `debug_token_types`
        Add ``title`` attributes to all token ``<span>`` tags that show the
        name of the token.

        .. versionadded:: 2.10


    **Subclassing the HTML formatter**

    .. versionadded:: 0.7

    The HTML formatter is now built in a way that allows easy subclassing, thus
    customizing the output HTML code. The `format()` method calls
    `self._format_lines()` which returns a generator that yields tuples of ``(1,
    line)``, where the ``1`` indicates that the ``line`` is a line of the
    formatted source code.

    If the `nowrap` option is set, the generator is the iterated over and the
    resulting HTML is output.

    Otherwise, `format()` calls `self.wrap()`, which wraps the generator with
    other generators. These may add some HTML code to the one generated by
    `_format_lines()`, either by modifying the lines generated by the latter,
    then yielding them again with ``(1, line)``, and/or by yielding other HTML
    code before or after the lines, with ``(0, html)``. The distinction between
    source lines and other code makes it possible to wrap the generator multiple
    times.

    The default `wrap()` implementation adds a ``<div>`` and a ``<pre>`` tag.

    A custom `HtmlFormatter` subclass could look like this:

    .. sourcecode:: python

        class CodeHtmlFormatter(HtmlFormatter):

            def wrap(self, source, *, include_div):
                return self._wrap_code(source)

            def _wrap_code(self, source):
                yield 0, '<code>'
                for i, t in source:
                    if i == 1:
                        # it's a line of formatted code
                        t += '<br>'
                    yield i, t
                yield 0, '</code>'

    This results in wrapping the formatted lines with a ``<code>`` tag, where the
    source lines are broken using ``<br>`` tags.

    After calling `wrap()`, the `format()` method also adds the "line numbers"
    and/or "full document" wrappers if the respective options are set. Then, all
    HTML yielded by the wrapped generator is output.
    �HTML�htmlz*.htmlz*.htmc��tj|fi|��|j|j�|_t	|dd�|_t	|dd�|_|jdd�|_|j|jdd��|_	|j|jdd��|_
|j|jd	d��|_|j|jd
d��|_t	|dd�|_
|j|jdd��|_|j|jd
d��|_|j|jdd��|_t	|dd�|_i|_t	|dd�|_|jr5t(st+d��t)j,|j�|_|jdd�}|dk(rd|_n|rd|_nd|_t3t5|dd��|_t3t5|dd��|_t3t5|dd��|_t	|dd�|_|jdd�|_|jdd�|_ |jdd�|_!t	|dd�|_"tG�|_$tK|d g�D]'}	|jHjMtO|���)|jS�y#tP$rY�FwxYw)!N�nowrapF�	noclasses�classprefixr �cssclass�	highlight�	cssstyles�	prestyles�cssfile�noclobber_cssfile�tagsfile�tagurlformat�filename�wrapcode�debug_token_typeszRThe "ctags" package must to be installed to be able to use the "tagsfile" feature.�linenos�inline��r�linenostart�
linenostep�
linenospecial�nobackground�
lineseparator�
�lineanchors�	linespans�
anchorlinenos�hl_lines)*r�__init__�_decodeifneeded�titlerr-r.r#r/r0r2r3r4r5r6r7r8r9�span_element_openersr:�ctags�RuntimeError�CTags�_ctagsr;�absr	r?r@rArBrCrErFrG�setrHr
�add�int�
ValueError�_create_stylesheet)�self�optionsr;�linenos    rrIzHtmlFormatter.__init__�s������4�+�7�+��)�)�$�*�*�5��
�"�7�H�e�<���%�g�{�E�B���"�;�;�}�b�9����,�,�W�[�[��[�-Q�R��
��-�-�g�k�k�+�r�.J�K����-�-�g�k�k�+�r�.J�K����+�+�G�K�K�	�2�,F�G���!-�g�7J�E�!R����,�,�W�[�[��R�-H�I��
� �0�0����^�R�1P�Q����,�,�W�[�[��R�-H�I��
�$�W�j�%�@��
�$&��!�!-�g�7J�E�!R����=�=��"�$O�P�P��+�+�d�m�m�4�D�K��+�+�i��/���h���D�L�
��D�L��D�L��{�7�M�1�E�F����k�'�<��C�D��� ��W�o�q�!I�J���(��.�%�H���$�[�[��$�?���"�;�;�}�b�9��� ���[�"�5���)�'�?�E�J������
�"�7�J��;�	�F�
��
�
�!�!�#�f�+�.�	�	
���!���
��
�s�$L;�;	M�Mc�<�t|�}|r|j|zSy)zUReturn the css class of this token type prefixed with
        the classprefix option.r )r(r/)rWr%�
ttypeclasss   r�_get_css_classzHtmlFormatter._get_css_class�s%��&�e�,�
���#�#�j�0�0�rc��|j|�}|tvr,|j}|j|�dz|z}|tvr�,|xsdS)zOReturn the CSS classes of this token type prefixed with the classprefix option.� r )r\rr$)rWr%�clss   r�_get_css_classeszHtmlFormatter._get_css_classes�sS���!�!�%�(���>�)��L�L�E��%�%�e�,�s�2�S�8�C��>�)��y�b�rc��|jj|�}|�*|j}|jj|�}|��*|xsdS)z1Return the inline CSS styles for this token type.r )�ttype2classr#r$)rWr%�cclasss   r�_get_css_inline_stylesz$HtmlFormatter._get_css_inline_styles�sO���!�!�%�%�e�,���n��L�L�E��%�%�)�)�%�0�F��n��|��rc��tdix}|_ix}|_|jD]�\}}|j	|�}d}|dr|dt|d�zz
}|dr|dz
}|dr|dz
}|dr|d	z
}|d
r|dt|d
�zz
}|dr|d
t|d�zz
}|s��|||<|dd|t
|�f||<��y)Nr rzcolor: %s; �boldzfont-weight: bold; �italiczfont-style: italic; �	underlineztext-decoration: underline; �bgcolorzbackground-color: %s; �borderzborder: 1px solid %s; ���)rrb�class2style�styler\r�len)rW�t2c�c2sr%�ndef�namerms       rrVz HtmlFormatter._create_stylesheet�s
��"'���,��d��!#�#��d���:�:�	<�K�E�4��&�&�u�-�D��E��G�}�����W�
�)>�>�>���F�|��.�.���H�~��/�/���K� ��7�7���I���1�F�4�	�?�4K�K�K���H�~��1�F�4��>�4J�J�J���!��E�
�#�3�B�Z���E�
�;��D�	�'	<rNc���g}|j|j��|j|j|��|j|j|��dj	|�S)z�
        Return CSS style definitions for the classes produced by the current
        highlighting style. ``arg`` can be a string or list of selectors to
        insert before the token type classes.
        rD)�extend�get_linenos_style_defs�get_background_style_defs�get_token_style_defs�join)rW�arg�style_liness   r�get_style_defszHtmlFormatter.get_style_defs�sa�������4�6�6�8�9����4�9�9�#�>�?����4�4�4�S�9�:��y�y��%�%rc
�J�|j|�}|jj�D����cgc]\}\}}}|r|r||||f��}}}}}|j�|D����cgc]$\}}}}||��d|�dt	|�dd�d���&}}}}}|Scc}}}}wcc}}}}w)Nz { z } /* �z */)�get_css_prefixrl�items�sort�repr)	rWry�prefixr_rmr%�level�styles�liness	         rrwz"HtmlFormatter.get_token_style_defs
s����$�$�S�)��/3�.>�.>�.D�.D�.F�
�
�*��*�e�U�E��u��E�3��&�
��
�
	���
�/5�
�
�*���s�E�%+�3�K���U��A�B��H�
��
�
���
��
s�B
�%)B
c	��|j|�}|jj}|jj}g}|ri|js]|�[d}t
|jvr&d|j|jt
dz}|jd|d��d|�d|�d��|�|jd|d��d|�d��|S)	Nr r^rz{ background: �;z }�hllz { background-color: )	r~rm�background_color�highlight_colorrBrrbrl�insert)rWryr��bg_color�hl_colorr��
text_styles       rrvz'HtmlFormatter.get_background_style_defss����$�$�S�)���:�:�.�.���:�:�-�-�����t�(�(�X�-A��J��t�'�'�'� �4�#3�#3�D�4D�4D�T�4J�#K�A�#N�N�
��L�L���2�J��*��
�
���L�L��F�5�M�8�L�
��rc��d|jzd|jzd|jzd|jzd|jzg}|S)Nz
pre { %s }ztd.linenos .normal { %s }zspan.linenos { %s }ztd.linenos .special { %s }zspan.linenos.special { %s })�
_pre_style�_linenos_style�_linenos_special_style)rWr�s  rruz$HtmlFormatter.get_linenos_style_defs2sT���4�?�?�*�'�$�*=�*=�=�!�D�$7�$7�7�(�4�+F�+F�F�)�D�,G�,G�G�
���rc���|�#d|jvxrd|jzxsd}t|t�r|g�nt	|���fd�}|S)Nr0�.r c���|rd|z}g}�D]!}|j|xr|dzxsd|z��#dj|�S)Nr�r^r z, )�appendrx)r_�tmpry�argss   �rr�z,HtmlFormatter.get_css_prefix.<locals>.prefixEsP�����C�i���C��
<���
�
�C�-�C�#�I�3��s�:�;�
<��9�9�S�>�!r)rXr0�
isinstance�str�list)rWryr�r�s   @rr~zHtmlFormatter.get_css_prefix=sO����;�����-�C�#�d�m�m�2C�I�r�C��c�3���5�D���9�D�	"��
rc��y)Nzline-height: 125%;��rWs rr�zHtmlFormatter._pre_styleOs��#rc�d�d|jj�d|jj�d�S�Nzcolor: z; background-color: z(; padding-left: 5px; padding-right: 5px;)rm�line_number_color�line_number_background_colorr�s rr�zHtmlFormatter._linenos_styleSs(��
�J�J�(�(��J�J�3�3�
�	
rc�d�d|jj�d|jj�d�Sr�)rm�line_number_special_color�$line_number_special_background_colorr�s rr�z$HtmlFormatter._linenos_special_styleZs(��
�J�J�0�0��J�J�;�;�
�	
rc��t|t�r7|jr|j|j�S|j�S|S�N)r��bytes�encoding�decode�rW�values  rrJzHtmlFormatter._decodeifneededas7���e�U�#��}�}��|�|�D�M�M�2�2��<�<�>�!��rc#�K�|j�r>tjj|j�r
|j}nd	|j}|r|ddk(rt
�tjj
tjj|�|j�}	tjj|�r|js@t|dd��5}|jtd|j!d	�iz�ddd�dt&t)|j*|j|j,��zf��n<dt.t)|j*|j!d	�|j,��zf��|Ed{���dt0f��y#t
$r+tdtj��|j}Y��(wxYw#1swY��xYw#t"$r}d
|j$z|_�d}~wwxYw7�x�w)
Nrr
z^Note: Cannot determine output file name, using current directory as base for the CSS file name)�file�wzutf-8)r��	styledefs�bodyzError writing CSS file: )rKr4r�)rKr�r�)r4�os�path�isabsrr�AttributeErrorrx�dirname�print�sys�stderr�existsr5�open�write�CSSFILE_TEMPLATEr{�OSError�strerror�DOC_HEADER_EXTERNALCSS�dictrKr��
DOC_HEADER�
DOC_FOOTER)rW�inner�outfile�cssfilenamer8�cf�errs       r�
_wrap_fullzHtmlFormatter._wrap_fullhs������<�<��w�w�}�}�T�\�\�*�"�l�l��/�&�|�|�H�#�x��{�c�'9�,�,�"$�'�'�,�,�r�w�w���x�/H�/3�|�|�#=�K�
��w�w�~�~�k�2�$�:P�:P��k�3��A�M�R����!1�"-�t�/B�/B�6�/J�!K�"L�M�M��,�����#'�<�<�$(�M�M�3�3�4�
4�
�j�����%)�%8�%8��%@�$(�M�M�3�3�4�
4�
�����m���5&�/��R�"�z�z�+�#'�,�,�K�	/��M�M���
�9�C�L�L�H�����
��	�sn�AH
�A#F�+9G"�$*G�G"�A9H
�H�H
�0G�H
�G�H
�G�G"�"	H�+H�H�H
c#�>K�t�}d}|D]\}}|r|dz
}|j|��|j}tt	||zdz
��}|j
}|j}	|jxs|j}
|j}|j}g}
t|||z�D]v}||	zdk(}|xr||zdk(}|rd||fz}|rd|
||fz}nd|z}|r"|rd|jz}nd|jz}n|rd}nd}|r	d	|�d
|�d�}|
j|��xdj|
�}d
}|j rd|j zdz}dd|j"�d�|zdz|zdzf��d��d|j%�f��d��d��y�w)Nrr>�%*d�<a href="#%s-%d">%s</a>r^� style="%s"z class="special"z class="normal"�<spanr�</span>rDr z<<tr><th colspan="2" class="filename"><span class="filename">z</span></th></tr>z<table class="ztable">z4<tr><td class="linenos"><div class="linenodiv"><pre>z"</pre></div></td><td class="code">)rz<div>)rz</div>)rz</td></tr></table>)rr�r?rnr�rAr@rErFrGr.�ranger�r�r�rxr8r0�getvalue)rWr��dummyoutfile�lncount�t�line�fl�mw�sp�st�anchor_name�aln�noclsr��i�
print_line�special_linerm�ls�filename_trs                    r�_wrap_tablelinenosz HtmlFormatter._wrap_tablelinenos�s������z�����	%�G�A�t���1������t�$�	%�
�
�
��
��W�r�\�A�%�&�
'��
�
�
��
�_�_���&�&�8�$�.�.��� � ���������r�2�g�:�&�	�A��R��1��J��-�!�b�&�A�+�L����A�w����4��Q��7M�M�D��R�x����)�D�,G�,G�G�E�)�D�,?�,?�?�E��.�E�-�E��.3�T�:���L�L���3	�6�Y�Y�u�
�����=�=�*�,0�M�M�:�=��
��N�4�=�=�/��9�K�G�B�C���5�6�7�	7�����&�&�(�(�(���%�%�s�FFc#� K�t|�}|j}|j}|j}t	tt	|�|zdz
��}|jxs|j}|j}|j}	|D]�\}
}||zdk(}|xr||zdk(}
|rd||fz}nd|z}|	r"|
rd|jz}nd|jz}n|
rd}nd}|r
d|�d	|�d
�}n|}|rdd|||fz|zf��n	d||zf��|dz
}��y�w)Nr>rr�r^r�z class="linenos special"z class="linenos"r�rr�r�)r�rAr@r?rnr�rErFrGr.r�r�)rWr��inner_linesr�r��numr�r�r�r��_�
inner_liner�r�r�rmr;s                 r�_wrap_inlinelinenosz!HtmlFormatter._wrap_inlinelinenos�sG�����5�k��
�
�
��
�_�_������
��S��%��+�a�/�0�
1���&�&�8�$�.�.��� � ������(�	�M�A�z��r��Q��J��/�#��(�a�-�L����C�y�(���R�x����)�D�,G�,G�G�E�)�D�,?�,?�?�E��6�E�.�E��16��=������3�{�C��6Q�Q�$�%�&�&���:�-�-�-��1�H�C�=	�s�DDc#�K�|j}|jdz
}|D]9\}}|r,|dz
}|jrdnd||fz}dd|||||fz|zf���4d|f���;y�w)Nr>r z href="#%s-%d"z!<a id="%s-%d" name="%s-%d"%s></a>r)rEr?r;)rWr��sr�r�r��hrefs       r�_wrap_lineanchorszHtmlFormatter._wrap_lineanchorss������������q� ���	�G�A�t���Q���!�\�\�r�/?�1�a�&�/H���<��1�a��D�?Q�Q�TX�X�X�X���g�
�
	�s�AAc#�K�|j}|jdz
}|D]\}}|r|dz
}dd|||fzf���d|f���!y�w)Nr>z<span id="%s-%d">%s</span>r)rFr?)rWr�r�r�r�r�s      r�_wrap_linespanszHtmlFormatter._wrap_linespanss^�����N�N�����q� ���	�G�A�t���Q����5��A�t��D�D�D���g�
�	�s�AAc#�K�g}|jrJ|js>|jj�(|j	d|jj���|j
r|j	|j
�dj
|�}dd|jxrd|jzz|xrd|zzdzf��|Ed{���d��y7�	�w)	Nzbackground: �; rz<divz class="%s"r�r)rz</div>
)r.rBrmr�r�r2rxr0�rWr�rms   r�	_wrap_divzHtmlFormatter._wrap_divs��������N�N�4�#4�#4��
�
�+�+�7��L�L�T�Z�Z�-H�-H�J�K��>�>��L�L����(��	�	�%� ���&�D�M�M�K�m�d�m�m�.K�L��4�m�e�3�6�8;�<�=�	=������	�s�CC�	C�

Cc#�vK�g}|jr|j|j�|jr|j|j�dj	|�}|j
r%|jdk7rdd|j
zdzf��dd|xrd|zzdzf��|Ed{���d	��y7�	�w)
Nr�r>rz<span class="filename">r�z<prer�z><span></span>)rz</pre>)r3r�r.r�rxr8r;r�s   r�	_wrap_prezHtmlFormatter._wrap_pre$s��������>�>��L�L����(��>�>��L�L����)��	�	�%� ���=�=�T�\�\�Q�.��/�$�-�-�?�)�K�L�L��&�E�;�m�e�&;�<�?O�O�P�P������	�s�B+B9�-B7�.
B9c#�4K�d��|Ed{���d��y7�	�w)N)rz<code>)rz</code>r�)rWr�s  r�
_wrap_codezHtmlFormatter._wrap_code5s �����������	�s�
��
�d)�maxsizec�J�|jt�jd�S)z-HTML-escape a value and split it by newlines.rD)r�_escape_html_table�splitr�s  r�_translate_partszHtmlFormatter._translate_parts:s�����1�2�8�8��>�>rc	#�FK�|j}|j}|j}d}g}|D�]�\}}	|j|}	|j|�}
|r�|tjvr�|j|�\}}|r�tjj!|�\}}|r|d	z
}tjj#|�\}}|j$|||d
�z}d||j&||
dfz|
d<|
dd
z|
d<|
ddD]�}|rV||	k7r!|r|j)|xrd|	||	xrd|f�n|j)||xrd|f�ddj
|�f��g}�[|rddj
|	||	xrd|f�f���{d|f����|r?|
dr:||	k7r|j)|xrd|	|
df�|	}���|j+|
d����|
ds���|	|
dg}|	}���|r-|j)|xrd|f�ddj
|�f��yy#t$r�|j
rddj
|�znd}
|r2|j|�}|r|j|d}d|�d|
�d�}	n"d}	n|j|�}|r
d|�d|
�d�}	nd}	|	|j|<Y��YwxYw�w)zd
        Just format the tokens, without any wrapping tags.
        Yield individual lines.
        r z title="%s"r�rz
<span style="rrz
<span class="�/)r�r&�fextz<a href="%s#%s-%d">%sr"z</a>Nr�r>)r.rCr6rL�KeyErrorr:rxrdrlr`r�r�Name�_lookup_ctagr�r�r��splitextr7rErtr�)rW�tokensourcer��lsepr6�lspanr�r%r��cspanrK�	css_style�	css_class�partsr8�
linenumber�base�	extension�url�parts                    r�
_format_lineszHtmlFormatter._format_lines?s�����
�����!�!���=�=������'�<	�L�E�5�
9��1�1�%�8��$�)�)�%�0�E��E�U�Z�Z�/�'+�'8�'8��'?�$��*��%'�W�W�]�]�8�%<�N�D�(������*,�'�'�*:�*:�8�*D�'�H�i��+�+�t�h�7@�/B�B�C�8��d�.�.�
�E�!�H�E� F�E�!�H� %�b�	�F� 2�E�"�I��c�r�
�
"�����~�$����e�&9�	�E�4�&+�&9�	�D�%B�C����T�E�,?�i�$�$G�H��R�W�W�T�]�*�*��D���R�W�W�e�T�E�4G�i�$�%O�P�P�P��T�'�M�
"� ��b�	��E�>��K�K�%�"5�I��u�R�y� I�J�!�E��K�K��b�	�*��r���u�R�y�)����y<	�~��K�K�%�-�I��5�6��R�W�W�T�]�"�"���y�
9�;?�;Q�;Q�
������7�WY��� $� ;� ;�E� B�I� �$(�$4�$4�Y�$?��$B�	�9B�E� J�� "�� $� 5� 5�e� <�I� �9B�E� J�� "��38��)�)�%�0�
9�s0�2J!�H
�FJ!�<J!�
B
J�J!�J�J!c��tj�}|jj||j	�d�r|dj�|dfSy)Nrr��
lineNumber)NN)rM�TagEntryrP�find�encoder�)rW�token�entrys   rrzHtmlFormatter._lookup_ctag�sJ����� ���;�;���E�5�<�<�>�1�5���=�'�'�)�5��+>�>�>�rc#�,K�|j}t|�D]v\}\}}|dk7r||f��|dz|vrV|jr@d}|jj�d|jj�d�}dd|�d|�d�f���gdd	|zf���qd|f���xy�w)
z�
        Highlighted the lines specified in the `hl_lines` option by
        post-processing the token stream coming from `_format_lines`.
        r>r Nz style="background-color: rr�rr�z<span class="hll">%s</span>)rH�	enumerater.rmr�)rWr�hlsr�r�r�rms       r�_highlight_lineszHtmlFormatter._highlight_lines�s�����
�m�m��&�{�3�
	�M�A�z��5��A�v���h���1�u��|��>�>��E��z�z�1�1�=�"&�*�*�"<�"<�"?���E�5�A�A�A��:�U�B�B�B���h��
	�s�BBc�f�|}|jr|j|�}|j|�}|S)z�
        Wrap the ``source``, which is a generator yielding
        individual lines, in custom generators. See docstring
        for `format`. Can be overridden.
        )r9r�r�)rW�source�outputs   r�wrapzHtmlFormatter.wrap�s1�����=�=��_�_�V�,�F�����'���
rc�:�|j|�}|js |jdk(r|j|�}|jr|j|�}|js�|jr|j|�}|jr|j|�}|j|�}|jdk(r|j|�}|j|�}|jr|j||�}|D]\}}|j|��y)aW
        The formatting process uses several nested generators; which of
        them are used is determined by the user's options.

        Each generator should take at least one argument, ``inner``,
        and wrap the pieces of text generated by this.

        Always yield 2-tuples: (code, text). If "code" is 1, the text
        is part of the original tokensource being highlighted, if it's
        0, the text is some piece of wrapping. This makes it possible to
        use several different wrappers that process the original source
        linewise, e.g. line number generators.
        r=r>N)rr-r;r�rHrrEr�rFr�rr�r��fullr�r�)rWrr�rr��pieces      r�format_unencodedzHtmlFormatter.format_unencoded�s����#�#�K�0���{�{�t�|�|�q�0��-�-�f�5�F��=�=��*�*�6�2�F��{�{�����/�/��7���~�~��-�-�f�5���Y�Y�v�&�F��|�|�q� ��0�0��8���^�^�F�+�F��y�y������9���	!�H�A�u��M�M�%� �	!rr�)&�__name__�
__module__�__qualname__�__doc__rr�aliases�	filenamesrIr\r`rdrVr{rwrvrur~�propertyr�r�r�rJr�r�r�r�r�r�r�r��	functools�	lru_cacher�rrrrr#r�rrrrqs���c�J	�D��h�G��7�#�I�/"�b���<�0&��"�.	��$�$��$��
��
��
��
��'�RA&�H)�V
����"�
�Y����%�?�&�?�L#�\��,
�%!r)r'r+r�r��os.path�ior�pygments.formatterr�pygments.tokenrrr�
pygments.utilrr	r
rM�ImportError�__all__�ordr�rrr(r�r�r�r�rr�rr�<module>r5s�����	�
���(�6�6�A�A����
����H�g���H�f���H�f���H�h���H�g���/�!�
�	���
��
���
�*
���
�m
!�I�m
!��u���E��s�B
�
B�B

Zerion Mini Shell 1.0