ok

Mini Shell

Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/__pycache__/runtime.cpython-311.pyc

�

>�Dg�w��$�dZddlZddlmZddlmZddlmZddlmZddlm	Z	dd	l
mZdd
l
mZddl
m
Z
ddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z gd�Z!eZ"d�Z#d�Z$d�Z%				d8d �Z&Gd!�d"e'��Z(d#�Z)Gd$�d%e*��Z+efd&�Z,Gd'�d(ee+����Z-ej.�/e-��Gd)�d*e'��Z0e
Gd+�d,����Z1Gd-�d.e'��Z2eGd/�d0e'����Z3d9d1�Z4Gd2�d3e3��Z5eGd4�d5e3����Z6eGd6�d7e3����Z7e3`8e5`8e6`8e7`8dS):z;The runtime functions and state used by compiled templates.�N)�chain)�
MethodType)�escape)�Markup)�soft_unicode�)�abc)�imap)�implements_iterator)�implements_to_string)�	iteritems)�PY2)�string_types)�	text_type)�with_metaclass)�TemplateNotFound)�TemplateRuntimeError)�UndefinedError)�EvalContext)�concat)�evalcontextfunction)�internalcode)�missing)�	Namespace)�object_type_repr)�LoopContext�TemplateReference�Macrorrrrr�markup_join�unicode_join�	to_string�identityrr�	Undefinedc��|S)zLReturns its argument. Useful for certain things in the
    environment.
    ���xs �E/opt/imunify360/venv/lib64/python3.11/site-packages/jinja2/runtime.pyr"r"7s	��
�H�c��g}tt|��}|D]Y}|�|��t|d��r2t	d���t
||����cS�Zt|��S)z@Concatenation that escapes if necessary and converts to unicode.�__html__�)r
r�append�hasattrr�joinrr)�seq�buf�iterator�args    r(rr>s���
�C��L�#�&�&�H��:�:���
�
�3�����3�
�#�#�	:��#�;�;�#�#�E�#�x�$8�$8�9�9�9�9�9�	:��#�;�;�r)c�F�ttt|����S)z4Simple args to unicode conversion and concatenation.)rr
r)r0s r(r r Is���$�y�#�&�&�'�'�'r)c���|�i}|r|}nt|pdfi|��}|r4|rt|��}t|��D]\}}	|	tur|	||<�|�||||��S)z%Internal helper for context creation.Nr%)�dictr
r�
context_class)
�environment�
template_name�blocks�vars�shared�globals�locals�parent�key�values
          r(�new_contextrBNs����|���
�-�����g�m��,�,�t�,�,��
�$��	"��&�\�\�F�#�F�+�+�	$�	$�J�C���G�#�#�#��s����$�$�[�&�-��P�P�Pr)c�$�eZdZdZd�Zd�Zd�ZdS)rzThe `self` in templates.c��||_dS�N)�_TemplateReference__context)�self�contexts  r(�__init__zTemplateReference.__init__ls
�� ����r)c�T�|jj|}t||j|d��S�Nr)rFr:�BlockReference)rG�namer:s   r(�__getitem__zTemplateReference.__getitem__os'����&�t�,���d�D�N�F�A�>�>�>r)c�<�d|jj�d|jj�d�S)N�<� �>)�	__class__�__name__rFrM�rGs r(�__repr__zTemplateReference.__repr__ss%��� �N�3�3�3�T�^�5H�5H�5H�I�Ir)N)rT�
__module__�__qualname__�__doc__rIrNrVr%r)r(rrisL������"�"�!�!�!�?�?�?�J�J�J�J�Jr)rc�$�t|d|��S)N�__func__)�getattrr&s r(�	_get_funcr]ws���1�j�!�$�$�$r)c��eZdZd�ZdS)�ContextMetac�B�t�||||��}|dkr|St|j��}ttj��}t|j��}ttj��}||ur||urd|_n||ur||urd|_|S)Nr%T)�type�__new__r]�resolve�Context�resolve_or_missing�_legacy_resolve_mode�_fast_resolve_mode)	�mcsrM�bases�d�rvrc�default_resolvere�default_resolve_or_missings	         r(rbzContextMeta.__new__|s���
�\�\�#�t�U�A�
.�
.���B�;�;��I��B�J�'�'��#�G�O�4�4��&�r�'<�=�=��%.�w�/I�%J�%J�"�

�?�*�*�"�&@�@�@�&*�B�#�#���&�&�"�&@�@�@�$(�B�!��	r)N)rTrWrXrbr%r)r(r_r_{s#����������r)r_c�^�||jvr
|j|S||jvr
|j|S|SrE�r;r?)rHr@rs   r(rere�s;��
�g�l����|�C� � �
�g�n����~�c�"�"��Nr)c��eZdZdZdZdZd�Zd�Zdd�Zd�Z	d�Z
d	�Zd
�Ze
d���Zdd�Zd
�Zed��Zed��Zed��Zer!ed��Zed��Zed��Z[d�Zd�Zd�ZdS)rda�The template context holds the variables of a template.  It stores the
    values passed to the template and also the names the template exports.
    Creating instances is neither supported nor useful as it's created
    automatically at various stages of the template evaluation and should not
    be created by hand.

    The context is immutable.  Modifications on :attr:`parent` **must not**
    happen and modifications on :attr:`vars` are allowed from generated
    template code only.  Template filters and global functions marked as
    :func:`contextfunction`\s get the active context passed as first argument
    and are allowed to access the context read-only.

    The template context supports read only dict operations (`get`,
    `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
    `__getitem__`, `__contains__`).  Additionally there is a :meth:`resolve`
    method that doesn't fail with a `KeyError` but returns an
    :class:`Undefined` object for missing variables.
    Fc�4�||_i|_||_t|j|��|_t��|_||_td�t|��D����|_
|jrtt|��|_
dSdS)Nc3�&K�|]\}}||gfV��
dSrEr%��.0�k�vs   r(�	<genexpr>z#Context.__init__.<locals>.<genexpr>�s,����B�B���1�A��s�8�B�B�B�B�B�Br))r?r;r8r�eval_ctx�set�
exported_varsrMr6r
r:rgrre)rGr8r?rMr:s     r(rIzContext.__init__�s��������	�&���#�D�$4�d�;�;��
� �U�U�����	�
�B�B�	�&�0A�0A�B�B�B�B�B����"�	K�&0�1C�T�&J�&J�D�#�#�#�	K�	Kr)c���	|j|}|�|��dz}||n/#t$r"|j�d|zd���cYSwxYwt||||��S)zRender a parent block.r�#there is no parent block called %r.�super�rM)r:�index�LookupErrorr8�	undefinedrL)rGrM�currentr:rs     r(r}z
Context.super�s���	��[��&�F��L�L��)�)�A�-�E��5�M�M�M���	�	�	��#�-�-�5��<�7�.���
�
�
�	�����d�D�&�%�8�8�8s�-0�)A�ANc�8�	||S#t$r|cYSwxYw)zfReturns an item from the template context, if it doesn't exist
        `default` is returned.
        )�KeyError)rGr@�defaults   r(�getzContext.get�s5��	���9����	�	�	��N�N�N�	���s�
��c��|jrt||��}n|�|��}|tur|j�|���S|S)z�Looks up a variable like `__getitem__` or `get` but returns an
        :class:`Undefined` object with the name of the name looked up.
        r~)rfrerr8r��rGr@rks   r(rczContext.resolve�s[���$�	.�#�D�#�.�.�B�B��(�(��-�-�B�
��=�=��#�-�-�3�-�7�7�7��	r)c��|jr3|�|��}t|t��rt}|St||��S)zxResolves a variable like :meth:`resolve` but returns the
        special `missing` value if it cannot be found.
        )rfrc�
isinstancer#rrer�s   r(rezContext.resolve_or_missing�sL���$�	����c�"�"�B��"�i�(�(�
����I�!�$��,�,�,r)c�D��t�fd��jD����S)z+Get a new dict with the exported variables.c3�6�K�|]}|�j|fV��dSrE)r;)rtrurGs  �r(rwz'Context.get_exported.<locals>.<genexpr>�s.�����B�B�!�Q��	�!��%�B�B�B�B�B�Br))r6rzrUs`r(�get_exportedzContext.get_exported�s)����B�B�B�B�t�/A�B�B�B�B�B�Br)c�h�|js|jS|js|jSt|jfi|j��S)z�Return the complete context as dict including the exported
        variables.  For optimizations reasons this might not return an
        actual copy so be careful with using it.
        )r;r?r6rUs r(�get_allzContext.get_all�sB��
�y�	��;���{�	��9���D�K�-�-�4�9�-�-�-r)c��	d}t|d��r |j}dD]}t||��r|}n�t|��rWt|dd��dur|f|z}n=t|dd��dur|jf|z}nt|dd��dur|jf|z}	||i|��S#t$r|j�d��cYSwxYw)	z�Call the callable with the arguments and keyword arguments
        provided but inject the active context or environment as first
        argument if the callable is a :func:`contextfunction` or
        :func:`environmentfunction`.
        T�__call__)�contextfunctionr�environmentfunctionr�Frr�zGvalue was undefined because a callable raised a StopIteration exception)r.r��callabler\rxr8�
StopIterationr�)�_Context__self�
_Context__obj�args�kwargs�__traceback_hide__�fn�fn_types       r(�callzContext.callsB��	&�!%���5�*�%�%�		���B��
�
��
�2�w�'�'���E��E���E�?�?�	4��u�/��7�7�4�?�?��y�4�'����� 5�u�=�=��E�E���)�D�0����� 5�u�=�=��E�E��*�,�t�3��	��5�$�)�&�)�)�)���	�	�	��%�/�/�*���
�
�
�	���s�B#�#$C
�	C
c	���t|j|ji|���dd|��}|j|_|j�d�t|j��D����|S)z�Internal helper function to create a derived context.  This is
        used in situations where the system needs a new context in the same
        template that is independent.
        TNc3�>K�|]\}}|t|��fV��dSrE)�listrss   r(rwz"Context.derived.<locals>.<genexpr>3s0����N�N�t�q�!�q�$�q�'�'�l�N�N�N�N�N�Nr))rBr8rMr�rxr:�updater
)rGr>rHs   r(�derivedzContext.derived*so��
���d�i��T�\�\�^�^�T�4��
�
�� �=�������N�N�y���7M�7M�N�N�N�N�N�N��r)c�^���fd�}tt���j|_�|_|S)Nc�X��t|��������SrE)r\r�)rG�meths �r(�proxyzContext._all.<locals>.proxy7s#���0�7�4�<�<�>�>�4�0�0�2�2�2r))r\r6rYrT)r�r�s` r(�_allzContext._all6s>���	3�	3�	3�	3�	3� ��d�+�+�3��
�����r)�keys�values�items�iterkeys�
itervaluesr
c�&�||jvp||jvSrEro�rGrMs  r(�__contains__zContext.__contains__Is���t�y� �7�D�D�K�$7�7r)c�`�|�|��}|turt|���|S)zTLookup a variable or raise `KeyError` if the variable is
        undefined.
        )rerr�)rGr@�items   r(rNzContext.__getitem__Ls1���&�&�s�+�+���7�?�?��3�-�-���r)c�v�d|jj�dt|������d|j�d�S)NrPrQz of rR)rSrT�reprr�rMrUs r(rVzContext.__repr__Us>����N�#�#�#������� � � � ��I�I�I�
�	
r)rE)rTrWrXrYrfrgrIr}r�rcrer�r�rr�r�r�r�r�r�rr�r�r
r�rNrVr%r)r(rdrd�so��������*!����K�K�K�$
9�
9�
9�����
�
�
�	-�	-�	-�C�C�C�	.�	.�	.��#�#��\�#�J
�
�
�
�����4��<�<�D�
�T�(�^�^�F��D��M�M�E��&��4�
�#�#���T�,�'�'�
��D��%�%�	��8�8�8����
�
�
�
�
r)rdc�D�eZdZdZd�Zed���Zed���ZdS)rLz"One block on a template reference.c�>�||_||_||_||_dSrE)rM�_context�_stack�_depth)rGrMrH�stack�depths     r(rIzBlockReference.__init__cs"����	���
��������r)c���|jdzt|j��kr)|jj�d|jzd���St|j|j|j|jdz��S)zSuper the block.rr|r}r~)r��lenr�r�r8r�rMrLrUs r(r}zBlockReference.superisp���;��?�c�$�+�.�.�.�.��=�,�6�6�5��	�A��7���
��d�i�����T�[�ST�_�U�U�Ur)c��t|j|j|j����}|jjjrt
|��}|SrE)rr�r�r�rx�
autoescaper�rGrks  r(r�zBlockReference.__call__rsE��
�,�D�K���,�T�]�;�;�
<�
<���=�!�,�	�����B��	r)N)	rTrWrXrYrI�propertyr}rr�r%r)r(rLrL`sb������,�,�����V�V��X�V�����\���r)rLc�N�eZdZdZdZdZeZeZeZ	eZ
dd�Zed���Z
ed���Zd�Zed	���Zed
���Zed���Zed���Zed
���Zd�Zed���Zed���Zed���Zd�Zd�Zd�Zd�Zed���Zd�Z dS)rzeA wrapper iterable for dynamic ``for`` loops, with information
    about the loop and iteration.
    ���Nrc�r�||_|�|��|_||_||_||_dS)a@
        :param iterable: Iterable to wrap.
        :param undefined: :class:`Undefined` class to use for next and
            previous items.
        :param recurse: The function to render the loop body when the
            loop is marked recursive.
        :param depth0: Incremented when looping recursively.
        N)�	_iterable�_to_iterator�	_iterator�
_undefined�_recurse�depth0)rG�iterabler��recurser�s     r(rIzLoopContext.__init__�s9��"����*�*�8�4�4���#�����
�����r)c� �t|��SrE)�iter)r�s r(r�zLoopContext._to_iterator�s���H�~�~�r)c�4�|j�|jS	t|j��|_ni#t$r\t	|j��}|�|��|_t|��|jz|jtuz|_YnwxYw|jS)z�Length of the iterable.

        If the iterable is a generator or otherwise does not have a
        size, it is eagerly evaluated to get a size.
        )
�_lengthr�r��	TypeErrorr�r�r�r�_afterr�rGr�s  r(�lengthzLoopContext.length�s����<�#��<��	U��t�~�.�.�D�L�L���	U�	U�	U��D�N�+�+�H�!�.�.�x�8�8�D�N��x�=�=�4�:�5���G�9S�T�D�L�L�L�	U����
�|�s�*�A#B�Bc��|jSrE)r�rUs r(�__len__zLoopContext.__len__�s
���{�r)c��|jdzS)zBHow many levels deep a recursive loop currently is, starting at 1.r)r�rUs r(r�zLoopContext.depth�����{�Q��r)c��|jdzS)z-Current iteration of the loop, starting at 1.r��index0rUs r(rzLoopContext.index�r�r)c� �|j|jz
S)zrNumber of iterations from the end of the loop, ending at 0.

        Requires calculating :attr:`length`.
        )r�rrUs r(�	revindex0zLoopContext.revindex0�s���{�T�Z�'�'r)c� �|j|jz
S)zrNumber of iterations from the end of the loop, ending at 1.

        Requires calculating :attr:`length`.
        )r�r�rUs r(�revindexzLoopContext.revindex�s���{�T�[�(�(r)c��|jdkS)z0Whether this is the first iteration of the loop.rr�rUs r(�firstzLoopContext.first�s���{�a��r)c�x�|jtur|jSt|jt��|_|jS)aReturn the next element in the iterable, or :data:`missing`
        if the iterable is exhausted. Only peeks one item ahead, caching
        the result in :attr:`_last` for use in subsequent checks. The
        cache is reset when :meth:`__next__` is called.
        )r�r�nextr�rUs r(�
_peek_nextzLoopContext._peek_next�s4���;�g�%�%��;���4�>�7�3�3����{�r)c�8�|���tuS)z�Whether this is the last iteration of the loop.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`groupby` filter avoids that issue.
        )r�rrUs r(�lastzLoopContext.last�s����� � �G�+�+r)c�H�|jr|�d��S|jS)zZThe item in the previous iteration. Undefined during the
        first iteration.
        zthere is no previous item)r�r��_beforerUs r(�previtemzLoopContext.previtem�s*��
�:�	@��?�?�#>�?�?�?��|�r)c�j�|���}|tur|�d��S|S)z�The item in the next iteration. Undefined during the last
        iteration.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`groupby` filter avoids that issue.
        zthere is no next item)r�rr�r�s  r(�nextitemzLoopContext.nextitem�s4���_�_�
�
��
��=�=��?�?�#:�;�;�;��	r)c�^�|std���||jt|��zS)z�Return a value from the given args, cycling through based on
        the current :attr:`index0`.

        :param args: One or more values to cycle through.
        zno items for cycling given)r�r�r�)rGr�s  r(�cyclezLoopContext.cycles3���	:��8�9�9�9��D�K�#�d�)�)�+�,�,r)c�.�|j|kr	||_dSdS)z�Return ``True`` if previously called with a different value
        (including when called for the first time).

        :param value: One or more values to compare to the last call.
        TF)�_last_changed_value)rGrAs  r(�changedzLoopContext.changed
s$���#�u�,�,�',�D�$��4��ur)c��|SrEr%rUs r(�__iter__zLoopContext.__iter__����r)c��|jtur|j}t|_nt|j��}|xjdz
c_|j|_||_||fS)Nr)r�rr�r�r��_currentr�r�s  r(�__next__zLoopContext.__next__sW���;�g�%�%���B�!�D�K�K��d�n�%�%�B����q�����}�����
��4�x�r)c�r�|j�td���|�||j|j���S)z�When iterating over nested data, render the body of the loop
        recursively with the given inner iterable data.

        The loop must have the ``recursive`` marker for this to work.
        NzCThe loop must have the 'recursive' marker to be called recursively.)r�)r�r�r�r�s  r(r�zLoopContext.__call__(s?���=� ��U���
��}�}�X�t�}�D�J�}�G�G�Gr)c�:�d|jj|j|jfzS)Nz
<%s %d/%d>)rSrTrr�rUs r(rVzLoopContext.__repr__6s���t�~�6��
�D�K�P�P�Pr)rK)!rTrWrXrYr�r�rr�r�r�r�rI�staticmethodr�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r�rr�rVr%r)r(rrzs���������
�F��G�
�F��H��G�!������ ����\������X��$�������X������X���(�(��X�(��)�)��X�)�� � ��X� �
�
�
��,�,��X�,�����X���
�
��X�
�	-�	-�	-�
�
�
����
�
�
��H�H��\�H�Q�Q�Q�Q�Qr)rc�N�eZdZdZ	dd�Zeed�����Zd�Zd�Z	dS)rzWraps a macro function.Nc	���||_||_t|��|_||_||_||_||_||_d|v|_	|�|j
}||_dS)N�caller)�_environment�_funcr��_argument_countrM�	arguments�catch_kwargs�
catch_varargsr��explicit_callerr��_default_autoescape)	rGr8�funcrMr�rrr��default_autoescapes	         r(rIzMacro.__init__=sp��(�����
�"�9�~�~�����	�"���(���*������'�9�4����%�!,�!7��#5�� � � r)c
�T�|r3t|dt��r|dj}|dd�}n|j}t	|d|j���}t
|��}d}||jkrk|jt
|��d�D]M}	|�|��}n#t$r
t}YnwxYw|dkrd}|�|���Nn|j}|j
rK|sI|�dd��}	|	�|j�dd���}	|�|	��|jr|�|��nQ|rOd|vrt#d|jz���t#d	|j�d
t't)|���������|jr#|�||jd���nCt
|��|jkr+t#d|jt
|j��fz���|�||��S)NrrFr�TzNo caller definedr~zamacro %r was invoked with two values for the special caller argument.  This is most likely a bug.zmacro z takes no keyword argument z+macro %r takes not more than %d argument(s))r�rr�rr�r�r�r��popr�rr-rr�r�r�rr�rMr�r�r�_invoke)
rGr�r�r�r��off�found_callerrMrAr�s
          r(r�zMacro.__call__Us���&�	2�J�t�A�w��4�4�	2��a��+�J�����8�D�D��1�J���4�� 4�4�5�6�6�	��)�n�n����
�$�&�&�&���s�9�~�~�'7�'7�8�
(�
(��$�"�J�J�t�,�,�E�E���$�$�$�#�E�E�E�$�����8�#�#�#'�L�� � ��'�'�'�'�
(� �/�L�
�;�	%�|�	%��Z�Z��$�/�/�F��~��*�4�4�5H�x�4�X�X�����V�$�$�$���	����V�$�$�$�$�
�
	��6�!�!��)�+/�9�5����
�)��9�9�9�d�4��<�<�0�0�0�2���
���	����T�$�"6�"8�"8�9�:�:�:�:�
��Y�Y��-�
-�
-��=��9�c�$�.�1�1�2�3���
�
�|�|�I�z�2�2�2s�B*�*B>�=B>c�<�|j|�}|rt|��}|S)z=This method is being swapped out by the async implementation.)r�r)rGr�r�rks    r(rz
Macro._invoke�s(��
�T�Z��
#���	�����B��	r)c�b�d|jj�d|jdurdpt|j���d�S)NrPrQ�	anonymousrR)rSrTrMr�rUs r(rVzMacro.__repr__�s>����N�#�#�#��I���-�+�@��d�i���@�@�
�	
r)rE)
rTrWrXrYrIrrr�rrVr%r)r(rr:s{������!�!� �6�6�6�6�0��L3�L3����\�L3�\���
�
�
�
�
r)rc��eZdZdZdZdedefd�Zed���Z	e
d���Ze
d���ZexZ
xZxZxZxZxZxZxZxZxZxZxZxZxZxZxZxZxZxZxZ xZ!xZ"xZ#xZ$xZ%xZ&Z'd�Z(d	�Z)d
�Z*d�Z+d�Z,d
�Z-d�Z.e.Z/d�Z0dS)r#ahThe default undefined type.  This undefined type can be printed and
    iterated over, but every other access will raise an :exc:`UndefinedError`:

    >>> foo = Undefined(name='foo')
    >>> str(foo)
    ''
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    ��_undefined_hint�_undefined_obj�_undefined_name�_undefined_exceptionNc�>�||_||_||_||_dSrEr)rG�hint�objrM�excs     r(rIzUndefined.__init__�s(��#���!���#���$'��!�!�!r)c��|jr|jS|jtur
d|jzSt	|jt
��st
|j���d|j��St
|j���d|j��S)zXBuild a message about the undefined value based on how it was
        accessed.
        z%r is undefined� has no element � has no attribute )rrrrr�rrrUs r(�_undefined_messagezUndefined._undefined_message�s���
��	(��'�'���'�)�)�$�t�';�;�;��$�.��=�=�	� ��!4�5�5�5�5��$�$��
�
�T�0�1�1�1�1�� � �
�	
r)c�6�|�|j���)zeRaise an :exc:`UndefinedError` when operations are performed
        on the undefined value.
        )rr)rGr�r�s   r(�_fail_with_undefined_errorz$Undefined._fail_with_undefined_error�s��
�'�'��(?�@�@�@r)c�d�|dd�dkrt|���|���S)N��__)�AttributeErrorrr�s  r(�__getattr__zUndefined.__getattr__�s5������8�t��� ��&�&�&��.�.�0�0�0r)c�>�t|��t|��uSrE)ra�rG�others  r(�__eq__zUndefined.__eq__!s���D�z�z�T�%�[�[�(�(r)c�.�|�|��SrE)r&r$s  r(�__ne__zUndefined.__ne__$s���;�;�u�%�%�%�%r)c�:�tt|����SrE)�idrarUs r(�__hash__zUndefined.__hash__'s���$�t�*�*�~�~�r)c��dS)Nr,r%rUs r(�__str__zUndefined.__str__*s���sr)c��dSrKr%rUs r(r�zUndefined.__len__-s���qr)c#�
K�dSrEr%rUs r(r�zUndefined.__iter__0s����	�	r)c��dS)NFr%rUs r(�__nonzero__zUndefined.__nonzero__4s���ur)c��dS)Nr#r%rUs r(rVzUndefined.__repr__9s���{r))1rTrWrXrY�	__slots__rrrIr�rrrr"�__add__�__radd__�__mul__�__rmul__�__div__�__rdiv__�__truediv__�__rtruediv__�__floordiv__�
__rfloordiv__�__mod__�__rmod__�__pos__�__neg__r�rN�__lt__�__le__�__gt__�__ge__�__int__�	__float__�__complex__�__pow__�__rpow__�__sub__�__rsub__r&r(r+r-r�r�r1�__bool__rVr%r)r(r#r#�sK���������I�!�g�D�n�(�(�(�(��
�
��X�
�*�A�A��\�A��1�1��\�1�b3M�Y,M�G�,M��,M�	�,M�
	�,M�	�,M�	�,M�	�,M�	�,M�	�,M�"	�#,M�&	�',M�*	�+,M�.	�/,M�2	�3,M�6	�7,M�:	�;,M�>	�?,M�B	�C,M�F	�G,M�J	�K,M�N	�O,M�R	�S,M�V	�W,M�X	�Y,M�X�Y,M�X%�x�)�)�)�&�&�&�����������������H�����r)r#c��������Pddl}|�t�����|�t
j������t��fd��G���fd�d���}|S)akGiven a logger object this returns a new undefined class that will
    log certain failures.  It will log iterations and printing.  If no
    logger is given a default logger is created.

    Example::

        logger = logging.getLogger(__name__)
        LoggingUndefined = make_logging_undefined(
            logger=logger,
            base=Undefined
        )

    .. versionadded:: 2.8

    :param logger: the logger to use.  If not provided, a default logger
                   is created.
    :param base: the base class to add logging functionality to.  This
                 defaults to :class:`Undefined`.
    Nrc�2��|j�q|jturd|jz}n_t	|jt
��st
|j���d|j��}n&t
|j���d|j��}n|j}��d|��dS)Nz%s is undefinedrrzTemplate variable warning: %s)rrrrr�rr�warning)�undefr�loggers  �r(�_log_messagez,make_logging_undefined.<locals>._log_messageYs����� �(��#�w�.�.�(�5�+@�@����� 5�|�D�D�	
�$�U�%9�:�:�:�:��)�)����%�U�%9�:�:�:�:��)�)����
�(�D����6��=�=�=�=�=r)c�`��eZdZ��fd�Z��fd�Z��fd�Zer��fd�Z��fd�ZdS��fd�Z	dS)�0make_logging_undefined.<locals>.LoggingUndefinedc���	�j|g|�Ri|��S#|j$r*}��dt|����|�d}~wwxYw)NzTemplate variable error: %s)rr�error�str)rGr�r��e�baserRs    ��r(rzKmake_logging_undefined.<locals>.LoggingUndefined._fail_with_undefined_errorlsm���
�6�t�6�t�M�d�M�M�M�f�M�M�M���,�
�
�
����:�C��F�F�C�C�C�������
���s��
A�%A�Ac�H����|��}�|��|SrE�r-�rGrkrSrZs  ��r(r-z8make_logging_undefined.<locals>.LoggingUndefined.__str__ss)������d�#�#�B��L������Ir)c�H����|��}�|��|SrE)r�r]s  ��r(r�z9make_logging_undefined.<locals>.LoggingUndefined.__iter__xs)������t�$�$�B��L������Ir)c�H����|��}�|��|SrE)r1r]s  ��r(r1z<make_logging_undefined.<locals>.LoggingUndefined.__nonzero__�+����%�%�d�+�+����T�"�"�"��	r)c�H����|��}�|��|SrE)�__unicode__r]s  ��r(rbz<make_logging_undefined.<locals>.LoggingUndefined.__unicode__�r`r)c�H����|��}�|��|SrE)rMr]s  ��r(rMz9make_logging_undefined.<locals>.LoggingUndefined.__bool__�s)����]�]�4�(�(����T�"�"�"��	r)N)
rTrWrXrr-r�rr1rbrM)rSrZrRs���r(�LoggingUndefinedrUks��������	�	�	�	�	�	�	�	�	�	�	�	�
	�	�	�	�	�	�
�	�
�
�
�
�
�
�

�
�
�
�
�
�
�
�
�
�
�
�
�
�
�
r)rd)�logging�	getLoggerrT�
addHandler�
StreamHandler�sys�stderrr#)rRrZrerdrSs``  @r(�make_logging_undefinedrk=s������(�~������"�"�8�,�,�����'�/�/��
�;�;�<�<�<��|���>�>�>�>�>�$#�#�#�#�#�#�#�#�#�4�#�#�#�J�r)c�&�eZdZdZdZd�Zd�ZeZdS)�ChainableUndefineda�An undefined that is chainable, where both ``__getattr__`` and
    ``__getitem__`` return itself rather than raising an
    :exc:`UndefinedError`.

    >>> foo = ChainableUndefined(name='foo')
    >>> str(foo.bar['baz'])
    ''
    >>> foo.bar['baz'] + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined

    .. versionadded:: 2.11.0
    r%c�*�|���SrEr\rUs r(r+zChainableUndefined.__html__�s���|�|�~�~�r)c��|SrEr%)rG�_s  r(r"zChainableUndefined.__getattr__�r�r)N)rTrWrXrYr3r+r"rNr%r)r(rmrm�sD������
�
��I��������K�K�Kr)rmc��eZdZdZdZd�ZdS)�DebugUndefinedaAn undefined that returns the debug info when printed.

    >>> foo = DebugUndefined(name='foo')
    >>> str(foo)
    '{{ foo }}'
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    r%c��|j�8|jtur
d|jzSdt	|j���d|j�d�Sd|jzS)Nz{{ %s }}z{{ no such element: �[z] }}z!{{ undefined value printed: %s }})rrrrrrUs r(r-zDebugUndefined.__str__�sh����'��"�g�-�-�"�T�%9�9�9�.�!��!4�5�5�5�5��$�$�$��
�4�d�6J�J�Jr)N)rTrWrXrYr3r-r%r)r(rrrr�s9���������I�K�K�K�K�Kr)rrc�@�eZdZdZdZejxZxZxZ	xZ
xZxZxZ
ZdS)�StrictUndefinedasAn undefined that barks on print and iteration as well as boolean
    tests and all kinds of comparisons.  In other words: you can do nothing
    with it except checking if it's defined using the `defined` test.

    >>> foo = StrictUndefined(name='foo')
    >>> str(foo)
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> not foo
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    r%N)rTrWrXrYr3r#rr�r-r�r1r&r(rMr+r%r)r(rvrv�sq��������&�I�1:�0T�
U�H�U��U�	�U�
	�U�	�
U��
U�#�X�X�Xr)rv)NNNN)NN)9rYri�	itertoolsr�typesr�
markupsaferrr�_compatr	r
rrr
rrrr�
exceptionsrrr�nodesr�utilsrrrrrr�exportedr!r"rr rB�objectrr]rar_rerd�Mapping�registerrLrrr#rkrmrrrvr3r%r)r(�<module>r�s���A�A�
�
�
�
�������������������������#�#�#�#�#�#�������������(�(�(�(�(�(�)�)�)�)�)�)�������������!�!�!�!�!�!�������#�#�#�#�#�#�(�(�(�(�(�(�,�,�,�,�,�,�&�&�&�&�&�&�������������&�&�&�&�&�&�������������������#�#�#�#�#�#�����(
�	�
�
�
����(�(�(�
����Q�Q�Q�Q�6J�J�J�J�J��J�J�J�%�%�%������$����6.5�����|
�|
�|
�|
�|
�n�n�[�)�)�|
�|
�|
�~����W���������V����4�|Q�|Q�|Q�|Q�|Q�|Q�|Q���|Q�~v
�v
�v
�v
�v
�F�v
�v
�v
�r�F�F�F�F�F��F�F���F�RS�S�S�S�r���������6�K�K�K�K�K�Y�K�K���K�6�U�U�U�U�U�i�U�U���U�B��� ������r)

Zerion Mini Shell 1.0