__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

���gI���D�SrSSKrSSKrSSKrSSKrSSKJr SSKJr SSKJ	r	 SSKJ
r
 SSKJr SSK
Jr S	S
KJr S	SKJr S	SKJr S	S
KJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJr S	SKJ r  S	SKJ!r! S	SKJ"r" S	SKJ#r# S	SKJ$r$ S	SK%J&r& S	SK%J'r' S	SK%J(r( S	S K%J)r) S	S!K%J*r* S	S"K+J,r, S	S#K+J-r- S	S$K+J.r. S	S%KJ/r/ S	S&K0J1r1 S	S'K2J3r3 S	S(K2J4r4 S	S)K2J5r5 S	S*K6J7r7 S	S+K6J8r8 S	S,K6J9r9 S	S-K6J:r: S	S.K6J;r; S	S/K6J<r< S	S0K6J=r= \R|(aSSK?r@S	S1KAJBrB S	S2KCJDrD S	S3KEJFrF \R�"S4S5S69rH\"S7S89S9\R�\HS:\R�S;\H4S<j5rKS=\LS;\R�\R�\R�S>\P4S?44S@jrQSA\R�\R�\R�\R�4S;\R�\R�\R�S>\P4S?44SBjrRSCS5SD\R�\R�\P\R�SE4S;\R�\PSE44SFjrVSC\HS;\H4SGjrW"SHS55rX"SIS?5rY"SJSK5rZ"SLSM5r["SNSO5r\\Y\Xl]g)PzKClasses for managing templates and their runtime and compile time
options.
�N)�ChainMap)�	lru_cache)�partial)�reduce)�CodeType)�Markup�)�nodes)�
CodeGenerator)�generate)�BLOCK_END_STRING)�BLOCK_START_STRING)�COMMENT_END_STRING)�COMMENT_START_STRING)�DEFAULT_FILTERS)�DEFAULT_NAMESPACE)�DEFAULT_POLICIES)�
DEFAULT_TESTS)�KEEP_TRAILING_NEWLINE)�LINE_COMMENT_PREFIX)�LINE_STATEMENT_PREFIX)�
LSTRIP_BLOCKS)�NEWLINE_SEQUENCE)�TRIM_BLOCKS)�VARIABLE_END_STRING)�VARIABLE_START_STRING)�TemplateNotFound)�TemplateRuntimeError)�TemplatesNotFound)�TemplateSyntaxError)�UndefinedError��	get_lexer)�Lexer)�TokenStream)�EvalContext)�Parser)�Context)�new_context)�	Undefined)�_PassArg)�concat)�consume)�
import_string)�internalcode��LRUCache)�missing)�
BytecodeCache)�	Extension)�
BaseLoader�
_env_bound�Environment)�bound�
)�maxsize�cls�args�returnc��U"U6nSUlU$)z�Return a new spontaneous environment. A spontaneous environment
is used for templates created directly rather than through an
existing environment.

:param cls: Environment class to create.
:param args: Positional arguments passed to environment.
T)�shared)r;r<�envs   �4/usr/lib/python3/dist-packages/jinja2/environment.py�get_spontaneous_environmentrBDs���t�*�C��C�J��J��sizezweakref.ref[t.Any]�Templatec�6�US:XagUS:a0$[U5$)z*Return the cache class for the given size.rNr0)rDs rA�create_cacherGRs$���q�y���a�x��	��D�>�rC�cachec�\�Ucg[U5[La0$[UR5$)z(Create an empty copy of the given cache.N)�type�dictr1�capacity)rHs rA�
copy_cacherM_s,��
�}���E�{�d���	��E�N�N�#�#rC�environment�
extensionsr4c���0nUH]n[U[5(a1[R"[RS[U55nU"U5X#R'M_ U$)zmLoad the extensions from the list and bind it to the environment.
Returns a dict of instantiated extensions.
r4)�
isinstance�str�t�cast�Typer.�
identifier)rNrO�result�	extensions    rA�load_extensionsrYlsX���F��	��i��%�%����q�v�v�k�2�M�)�4L�M�I�'0��'=��#�#�$�	 ��MrCc��[UR[5(dS5eURURs=:waUR
:wdS5e S5eURS;dS5eU$)z*Perform a sanity check on the environment.z5'undefined' must be a subclass of 'jinja2.Undefined'.z<block, variable and comment start strings must be different.>�
�
�
z8'newline_sequence' must be one of '\n', '\r\n', or '\r'.)�
issubclass�	undefinedr*�block_start_string�variable_start_string�comment_start_string�newline_sequence)rNs rA�_environment_config_checkrd~s�������y���?�>�?��	�&�&��,�,�	,��+�+�	,�F�F�	F�	,�F�F�	F�	,��'�'�,��F�F�	F��
�rCc/��\rSrSr%SrSrSrSr\RS\
S'Sr\r
\RS\
S'SRr\r\R\\
S	'\RS
\
S'\\\\\\\\\\\\SS
\SSSSS
SS4S\ S\ S\ S\ S\ S\ S\R\ S\R\ S\!S\!SSS\!S\RD\RF\ \RS4S\!S\R\S \R\RHS!\RJ4S"\RF\!\RH\R\ /\!44S#\RS$S%\&S&\!S'\RS(S)\!4,S*jjr'S+\RF\ \RS4S,S4S-jr(S.\RJS,S4S/jr)\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*4S\ S\ S\ S\ S\ S\ S\R\ S\R\ S\!S\!SSS\!S\RD\RF\ \RS4S\!S\R\S \R\RHS!\RJ4S"\RF\!\RH\R\ /\!44S#\RS$S%\&S&\!S'\RS(S)\!S,S04.S1jjr+\,S,\-4S2j5r.S,\R^S4S3jr0S4\RJS5\RF\ \RJ4S,\RF\RJ\44S6jr1S4\RJS7\ S,\RJ4S8jr2S9\RF\ \4S:\RJS;\R\RD\RJS<\R\Rf\ \RJ4S=\R\S>\R\4S?\!S,\RJ4S@jr5SoS9\ S:\RJS;\R\RD\RJS<\R\Rf\ \RJ4S=\R\S>\R\4S,\RJ4SAjjr6SoS9\ S:\RJS;\R\RD\RJS<\R\Rf\ \RJ4S=\R\S>\R\4S,\RJ4SBjjr7\8SpSC\ S9\R\ SD\R\ S,\9Rt4SEjj5r;SC\ S9\R\ SD\R\ S,\9Rt4SFjr<SpSC\ S9\R\ SD\R\ S,\R^\Rz\&\ \ 44SGjjr>SpSC\ S9\R\ SD\R\ S,\ 4SHjjr?SpSC\ S9\R\ SD\R\ SI\R\ S,\@4
SJjjrASqSC\9RtS9\R\ SD\R\ SK\!S,\ 4
SLjjrBSC\ SD\ S,\C4SMjrD\ER�SrSC\RF\ \9Rt4S9\R\ SD\R\ SNSOSK\!S,\C4SPjj5rG\ER�SsSC\RF\ \9Rt4S9\R\ SD\R\ SNSQSK\!S,\ 4SRjj5rG\8SrSC\RF\ \9Rt4S9\R\ SD\R\ SN\!SK\!S,\RF\ \C44SSjj5rGStSC\ ST\!S,SU4SVjjrHSuSW\RF\ SX4S\R\R�\ SY\R\RH\ /\!4SZ\R\ S[\R\RH\ /S4S\\!S,S4S]jjrJSpS\R\R�\ SY\R\RH\ /\!4S,\R�\ 4S^jjrLSvSC\R\ S,S_4S`jjrMSa\ Sb\ S,\ 4ScjrN\8S9\ Sd\R\R�\ \RJ4S,S
4Sej5rP\8SpS9\RF\ S
4Sb\R\ Sd\R\R�\ \RJ4S,S
4Sfjj5rQ\8SpSg\R�\RF\ S
4Sb\R\ Sd\R\R�\ \RJ4S,S
4Shjj5rS\8SpSi\RF\ S
\R�\RF\ S
44Sb\R\ Sd\R\R�\ \RJ4S,S
4Sjjj5rTSpSC\RF\ \9Rt4Sd\R\R�\ \RJ4S\R\RS
S,S
4SkjjrUSl\R\R�\ \RJ4S,\R�\ \RJ44SmjrVSnrWg)wr7�a8The core component of Jinja is the `Environment`.  It contains
important shared variables like configuration, filters, tests,
globals and others.  Instances of this class may be modified if
they are not shared and if no template was loaded so far.
Modifications on environments after the first template was loaded
will lead to surprising effects and undefined behavior.

Here are the possible initialization parameters:

    `block_start_string`
        The string marking the beginning of a block.  Defaults to ``'{%'``.

    `block_end_string`
        The string marking the end of a block.  Defaults to ``'%}'``.

    `variable_start_string`
        The string marking the beginning of a print statement.
        Defaults to ``'{{'``.

    `variable_end_string`
        The string marking the end of a print statement.  Defaults to
        ``'}}'``.

    `comment_start_string`
        The string marking the beginning of a comment.  Defaults to ``'{#'``.

    `comment_end_string`
        The string marking the end of a comment.  Defaults to ``'#}'``.

    `line_statement_prefix`
        If given and a string, this will be used as prefix for line based
        statements.  See also :ref:`line-statements`.

    `line_comment_prefix`
        If given and a string, this will be used as prefix for line based
        comments.  See also :ref:`line-statements`.

        .. versionadded:: 2.2

    `trim_blocks`
        If this is set to ``True`` the first newline after a block is
        removed (block, not variable tag!).  Defaults to `False`.

    `lstrip_blocks`
        If this is set to ``True`` leading spaces and tabs are stripped
        from the start of a line to a block.  Defaults to `False`.

    `newline_sequence`
        The sequence that starts a newline.  Must be one of ``'\r'``,
        ``'\n'`` or ``'\r\n'``.  The default is ``'\n'`` which is a
        useful default for Linux and OS X systems as well as web
        applications.

    `keep_trailing_newline`
        Preserve the trailing newline when rendering templates.
        The default is ``False``, which causes a single newline,
        if present, to be stripped from the end of the template.

        .. versionadded:: 2.7

    `extensions`
        List of Jinja extensions to use.  This can either be import paths
        as strings or extension classes.  For more information have a
        look at :ref:`the extensions documentation <jinja-extensions>`.

    `optimized`
        should the optimizer be enabled?  Default is ``True``.

    `undefined`
        :class:`Undefined` or a subclass of it that is used to represent
        undefined values in the template.

    `finalize`
        A callable that can be used to process the result of a variable
        expression before it is output.  For example one can convert
        ``None`` implicitly into an empty string here.

    `autoescape`
        If set to ``True`` the XML/HTML autoescaping feature is enabled by
        default.  For more details about autoescaping see
        :class:`~markupsafe.Markup`.  As of Jinja 2.4 this can also
        be a callable that is passed the template name and has to
        return ``True`` or ``False`` depending on autoescape should be
        enabled by default.

        .. versionchanged:: 2.4
           `autoescape` can now be a function

    `loader`
        The template loader for this environment.

    `cache_size`
        The size of the cache.  Per default this is ``400`` which means
        that if more than 400 templates are loaded the loader will clean
        out the least recently used template.  If the cache size is set to
        ``0`` templates are recompiled all the time, if the cache size is
        ``-1`` the cache will not be cleaned.

        .. versionchanged:: 2.8
           The cache size was increased to 400 from a low 50.

    `auto_reload`
        Some loaders load templates from locations where the template
        sources may change (ie: file system or database).  If
        ``auto_reload`` is set to ``True`` (default) every time a template is
        requested the loader checks if the source changed and if yes, it
        will reload the template.  For higher performance it's possible to
        disable that.

    `bytecode_cache`
        If set to a bytecode cache object, this object will provide a
        cache for the internal Jinja bytecode so that templates don't
        have to be parsed if they were not changed.

        See :ref:`bytecode-cache` for more information.

    `enable_async`
        If set to true this enables async template execution which
        allows using async functions and generators.
FN�	linked_tor�code_generator_class��
context_classrE�template_class�Ti�r`�block_end_stringra�variable_end_stringrb�comment_end_string�line_statement_prefix�line_comment_prefix�trim_blocks�
lstrip_blocksrc�te.Literal['\n', '\r\n', '\r']�keep_trailing_newlinerOr4�	optimizedr_�finalize.�
autoescape�loaderr5�
cache_size�auto_reload�bytecode_cacher3�enable_asyncc�&�XlX lX0lX@lXPlX`lXplX�lX�lX�l	X�l
X�lX�lX�l
UUlUUl[ R""5Ul[&R""5Ul[*R""5UlUUl[1U5UlUUlUUl""5Ul[=X
5UlUUl [CU5 g�N)"r`rmrarnrbrorprqrrrsrcrur_rvrwrxr�copy�filtersr�testsr�globalsryrGrHr|r{r�policiesrYrO�is_asyncrd)�selfr`rmrarnrbrorprqrrrsrcrurOrvr_rwrxryrzr{r|r}s                       rA�__init__�Environment.__init__&s���J#5�� 0��%:�"�#6� �$8�!�"4��%:�"�#6� �&��*�� 0��%:�"�-6��"�� ��
�$���'�+�+�-���"�'�'�)��
�(�-�-�/������!�*�-��
�,���&���)�-�-�/��
�*�$�;���$��
�!�$�'rCrXr=c�N�URR[X/55 g)zLAdds an extension after the environment was created.

.. versionadded:: 2.5
N)rO�updaterY)r�rXs  rA�
add_extension�Environment.add_extensionrs��
	
������t�[�A�BrC�
attributesc�r�UR5H#up#[X5(aM[XU5 M% g)z�Add the items to the instance of the environment if they do not exist
yet.  This is used by :ref:`extensions <writing-extensions>` to register
callbacks and configuration values without breaking inheritance.
N)�items�hasattr�setattr)r�r��key�values    rA�extend�Environment.extendys.��
%�*�*�,�J�C��4�%�%���5�)�-rCzte.Selfc���[[55nUS	US	US	US	[RUR5nUR
R
UR
5 SUlUUlUR5HunnU[LdM[UUU5 M  U[La[U5Ul
O[UR5Ul
0UlURR5H$unnUR!U5URU'M& U
[La%URR
[#UU
55 U[LaUUl['U5$)a�Create a new overlay environment that shares all the data with the
current environment except for cache and the overridden attributes.
Extensions cannot be removed for an overlayed environment.  An overlayed
environment automatically gets all the extensions of the environment it
is linked to plus optional extra extensions.

Creating overlays should happen after the initial environment was set
up completely.  Not all attributes are truly linked, some are just
copied over so modifications on the original environment may not shine
through.

.. versionchanged:: 3.1.5
    ``enable_async`` is applied correctly.

.. versionchanged:: 3.1.2
    Added the ``newline_sequence``, ``keep_trailing_newline``,
    and ``enable_async`` parameters to match ``__init__``.
r�rzrOr}T)rK�locals�object�__new__�	__class__�__dict__r��	overlayedrgr�r2r�rGrHrMrO�bindrYr�rd)r�r`rmrarnrbrorprqrrrsrcrurOrvr_rwrxryrzr{r|r}r<�rvr�r�s                           rA�overlay�Environment.overlay�s#��V�F�H�~����L�$�|�,�d�<�.@�$�~�BV�
�^�^�D�N�N�
+��
�����4�=�=�)��������*�*�,�J�C���G�#���C��'�'��W�$�#�J�/�B�H�!�$�*�*�-�B�H���
��/�/�/�/�1�J�C��!&���B��B�M�M�#��2��W�$��M�M� � ���Z�!@�A��w�&�&�B�K�(��,�,rCc��[U5$)zThe lexer for this environment.r"�r�s rA�lexer�Environment.lexer�s�����rCc�Z�[[URR5SS95$)z)Iterates over the extensions by priority.c��UR$r)�priority��xs rA�<lambda>�-Environment.iter_extensions.<locals>.<lambda>�s��1�:�:rC)r�)�iter�sortedrO�valuesr�s rA�iter_extensions�Environment.iter_extensions�s"���F�4�?�?�1�1�3�9M�N�O�OrC�obj�argumentc��X$![[[4aa [U[5(a:[	U5n[X5s$![a Of=f![a Of=fURXS9s$f=f)z:Get an item or attribute of an object but prefer the item.�r��name)�AttributeError�	TypeError�LookupErrorrQrR�getattr�	Exceptionr_)r�r�r��attrs    rA�getitem�Environment.getitem�s���
	:��=� ���	�;�7�	:��(�C�(�(���x�=�D��&�s�1�1��)�����!������>�>�c�>�9�9�	:�sO��*A<�A�
A
�A<�

A�A<�A�A<�
A'�$A<�&A'�'A<�;A<�	attributec��[X5$![a Of=fX$![[[4a UR	XS9s$f=f)zyGet an item or attribute of an object but prefer the attribute.
Unlike :meth:`getitem` the attribute *must* be a string.
r�)r�r�r�r�r_)r�r�r�s   rAr��Environment.getattr�sX��	��3�*�*���	��	��	;��>�!���;��7�	;��>�>�c�>�:�:�	;�s�

�
��"�$A	�A	r�r�r<�kwargs�context�eval_ctx�	is_filterc���U(aURnSn	OURnSn	URU5n
U
c;SU	SU<S3n[U[5(aUR5 [U5eU/UbUOSQnUbUO0n[R"U
5n
U
[RLa%Uc[S	U	S
35eURSU5 OiU
[RLa1UcUb
URnO[U5nURSU5 O%U
[RLaURSU5 U
"U0UD6$![anUSUS3nSnAN�SnAff=f)N�filter�testzNo z named �.z (z-; did you forget to quote the callable name?)rlzAttempted to invoke a context z without context.r)r�r��getrQr*�_fail_with_undefined_errorr�rr+�from_objr��insert�eval_contextr�r&rN)r�r�r�r<r�r�r�r��env_map�	type_name�func�msg�e�pass_args              rA�_filter_test_common�Environment._filter_test_common�ss����l�l�G� �I��j�j�G��I��{�{�4� ���<��	�{�'�$���3�C��$�	�*�*�U��3�3�5�'�s�+�+��;��!1��r�;��!�-��2���$�$�T�*���x�'�'�'���*�4�Y�K�?P�Q���
�K�K��7�#�
��.�.�
.����&�&�/�/�H�*�4�0�H��K�K��8�$�
��-�-�
-��K�K��4� ��T�$�V�$�$��7!�U� �E��A�3�&S�T�C��U�s�E�
E �E�E c	�*�URXX4XVS5$)aInvoke a filter on a value the same way the compiler does.

This might return a coroutine if the filter is running from an
environment in async mode and the filter supports async
execution. It's your responsibility to await this if needed.

.. versionadded:: 2.7
T�r��r�r�r�r<r�r�r�s       rA�call_filter�Environment.call_filter(s ��"�'�'���w�$�
�	
rCc	�*�URXX4XVS5$)a�Invoke a test on a value the same way the compiler does.

This might return a coroutine if the test is running from an
environment in async mode and the test supports async execution.
It's your responsibility to await this if needed.

.. versionchanged:: 3.0
    Tests support ``@pass_context``, etc. decorators. Added
    the ``context`` and ``eval_ctx`` parameters.

.. versionadded:: 2.7
Fr�r�s       rA�	call_test�Environment.call_test=s ��*�'�'���w�%�
�	
rC�source�filenamec�f�URXU5$![a URUS9 gf=f)ajParse the sourcecode and return the abstract syntax tree.  This
tree of nodes is used by the compiler to convert the template into
executable source- or bytecode.  This is useful for debugging or to
extract information from templates.

If you are :ref:`developing Jinja extensions <writing-extensions>`
this gives you a good overview of the node tree generated.
�r�N)�_parser �handle_exception�r�r�r�r�s    rA�parse�Environment.parseVs8��	1��;�;�v�X�6�6��"�	1��!�!��!�0�	1�s��0�0c�6�[XX#5R5$)z8Internal parsing function used by `parse` and `compile`.)r'r�r�s    rAr��Environment._parsejs���d�D�3�9�9�;�;rCc��[U5nURRXU5$![a UR	US9 gf=f)a�Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development <writing-extensions>`
and debugging templates.

This does not perform preprocessing.  If you want the preprocessing
of the extensions to be applied you have to filter source through
the :meth:`preprocess` method.
r�N)rRr��	tokeniterr r�r�s    rA�lex�Environment.lexpsI���V���	1��:�:�'�'��h�?�?��"�	1��!�!��!�0�	1�s�)�A�Ac�X^^�[UU4SjUR5[U55$)z�Preprocesses the source with all extensions.  This is automatically
called for all parsing and compiling methods but *not* for :meth:`lex`
because there you usually only want the actual source tokenized.
c�*>�URUTT5$r)�
preprocess)�sr�r�r�s  ��rAr��(Environment.preprocess.<locals>.<lambda>�s������a��x�8rC)rr�rRr�s  ``rAr��Environment.preprocess�s(����8�� � �"���K�
�	
rC�statec��URXU5nURRXX45nUR5H7nUR	U5n[U[5(aM+[
XRU5nM9 U$)z�Called by the parser to do the preprocessing and filtering
for all the extensions.  Returns a :class:`~jinja2.lexer.TokenStream`.
)r�r��tokenizer��
filter_streamrQr%)r�r�r�r�r��stream�exts       rA�	_tokenize�Environment._tokenize�sm������x�8�����$�$�V�8�C���'�'�)�C��&�&�v�.�F��f�k�2�2�$�V�8�<��	*��
rC�
defer_initc	�2�[UUUUUURS9$)zdInternal hook that can be overridden to hook a different generate
method in.

.. versionadded:: 2.5
)r�rv)rrv)r�r�r�r�r�s     rA�	_generate�Environment._generate�s'�������!��n�n�

�	
rCc��[XS5$)zcInternal hook that can be overridden to hook a different compile
method in.

.. versionadded:: 2.5
�exec)�compile)r�r�r�s   rA�_compile�Environment._compile�s���v��0�0rC�rawzte.Literal[False]c��grrl�r�r�r�r�rr�s      rAr�Environment.compile�s��rCzte.Literal[True]c��grrlrs      rArr�s��rCc��Sn[U[5(aUnURXU5nURXX5S9nU(aU$UcSnUR	X5$![
a UR
US9 gf=f)a"Compile a node or template source code.  The `name` parameter is
the load name of the template after it was joined using
:meth:`join_path` if necessary, not the filename on the file system.
the `filename` parameter is the estimated filename of the template on
the file system.  If the template came from a database or memory this
can be omitted.

The return value of this method is a python code object.  If the `raw`
parameter is `True` the return value will be a string with python
code equivalent to the bytecode returned otherwise.  This method is
mainly used internally.

`defer_init` is use internally to aid the module code generator.  This
causes the generated code to be able to import without the global
environment variable to be set.

.. versionadded:: 2.4
   `defer_init` parameter added.
N)r�z
<template>r�)rQrRr�r�rr r�)r�r�r�r�rr��source_hints       rArr�s���8��	6��&�#�&�&�$�����V�8�<���^�^�F�(�^�R�F���
���'���=�=��2�2��"�	6��!�!��!�5�	6�s�AA�A�A8�7A8�undefined_to_none�TemplateExpressionc���[XSS9nUR5nURR(d,[	SURR
RSS5eURU5 [R"[R"SS5WSS	9/nUR[R"USS	95n[Xb5$![a URUS9 Nvf=f)
a�A handy helper method that returns a callable that accepts keyword
arguments that appear as variables in the expression.  If called it
returns the result of the expression.

This is useful if applications want to use the same rules as Jinja
in template "configuration files" or similar situations.

Example usage:

>>> env = Environment()
>>> expr = env.compile_expression('foo == 42')
>>> expr(foo=23)
False
>>> expr(foo=42)
True

Per default the return value is converted to `None` if the
expression returns an undefined value.  This can be changed
by setting `undefined_to_none` to `False`.

>>> env.compile_expression('var')() is None
True
>>> env.compile_expression('var', undefined_to_none=False)()
Undefined

.. versionadded:: 2.1
�variable)r�zchunk after expressionNr�rW�storer	)�lineno)r'�parse_expressionr��eosr �currentr�set_environmentr�r
�Assign�Name�from_stringrEr)r�r�r�parser�expr�body�templates       rA�compile_expression�Environment.compile_expressions���<��J�7��	1��*�*�,�D��=�=�$�$�)�,�f�m�m�.C�.C�.J�.J�D�RV���
� � ��&����U�Z�Z��'�:�D��K�L���#�#�E�N�N�4��$B�C��!�(�>�>��#�	1��!�!��!�0�	1�s�A(C�C+�*C+�targetzos.PathLike[str]�filter_func�zip�log_function�
ignore_errorsc	�\^^^^�SSKJn Uc
S[SS4SjnUceURcS5eS[S	[SS4UUUU4S
jjnTb9SSKJn	 SS
KJn
 SSKJn SSKJm U"TS[X�S9T5mU"ST<35 OF[RRT5(d[R"T5 U"ST<35 URX#5H^nURRX5up�nUR!X�USS5nUR%U5nU"UU5 U"SUSU35 M` T(aTR'5 U"S5 g!["a!nU(deU"SUSU35 SnAM�SnAff=f!T(aTR'5 ff=f)a�Finds all the templates the loader can find, compiles them
and stores them in `target`.  If `zip` is `None`, instead of in a
zipfile, the templates will be stored in a directory.
By default a deflate zip algorithm is used. To switch to
the stored algorithm, `zip` can be set to ``'stored'``.

`extensions` and `filter_func` are passed to :meth:`list_templates`.
Each template returned will be compiled to the target folder or
zipfile.

By default template compilation errors are ignored.  In case a
log function is provided, errors are logged.  If you want template
syntax errors to abort the compilation you can set `ignore_errors`
to `False` and you will get an exception on syntax errors.

.. versionadded:: 2.4
r	)�ModuleLoaderNr�r=c��grrlr�s rAr!�3Environment.compile_templates.<locals>.log_functionPs��rC�No loader configured.r��datac�>�T(a!T"U5nSUlTRX!5 g[[RRTU5S5nUR
URS55 SSS5 g!,(df   g=f)Ni��wb�utf8)�
external_attr�writestr�open�os�path�join�write�encode)r�r(�info�f�ZipInforr �zip_files    ����rA�
write_file�1Environment.compile_templates.<locals>.write_fileVsc�����x�(��%0��"��!�!�$�-��"�'�'�,�,�v�x�8�$�?�1��G�G�D�K�K��/�0�@�?�?�s�!A>�>
Br)�ZIP_DEFLATED)�
ZIP_STORED)�ZipFile)r6�w)�deflated�storedzCompiling into Zip archive zCompiling into folder TzCould not compile "z": z
Compiled "z" as zFinished compiling templates)�loadersr$rRry�zipfiler:r;r<r6rKr/r0�isdir�makedirs�list_templates�
get_sourcerr �get_module_filename�close)r�rrOrr r!r"r$r8r:r;r<r�r�r��_�coder�r6r7s `  `             @@rA�compile_templates�Environment.compile_templates2s����4	*���
��
��
��'�'�'��{�{�&�?�(?�?�&�	1��	1�C�	1�D�	1�	1��?�,�*�'�'����T�<�K�C�P��H�
�6�v�j�A�B��7�7�=�=��(�(����F�#��1�&��<�=�	!��+�+�J�D��&*�k�k�&<�&<�T�&H�#��!���<�<��h��d�K�D�(�;�;�D�A���8�T�*��z�$��u�X�J�?�@�E����� ��3�4��+��(�� �#6�t�f�C��s�!C�D���	������ ��s6�2F�E#�,F�#
F�-F	�F�	F�F�F+c�^�URcS5eURR5nTb"Ub[S5eS[S[4U4SjjnUb UVs/sHoB"U5(dMUPM nnU$s snf)aRReturns a list of templates for this environment.  This requires
that the loader supports the loader's
:meth:`~BaseLoader.list_templates` method.

If there are other files in the template folder besides the
actual templates, the returned list can be filtered.  There are two
ways: either `extensions` is set to a list of file extensions for
templates, or a `filter_func` can be provided which is a callable that
is passed a template name and should return `True` if it should end up
in the result list.

If the loader does not support that, a :exc:`TypeError` is raised.

.. versionadded:: 2.4
r'z<either extensions or filter_func can be passed, but not bothr�r=c�L>�SU;=(a URSS5ST;$)Nr�r	)�rsplit)r�rOs �rAr�/Environment.list_templates.<locals>.filter_func�s'����a�x�E�A�H�H�S�!�$4�Q�$7�:�$E�ErC)ryrDr�rR�bool)r�rOr�namesr�s `   rArD�Environment.list_templates�s����(�{�{�&�?�(?�?�&����*�*�,���!��&��R���
F�s�
F�t�
F��"�&+�A�e�d�{�4�/@�T�e�E�A����Bs�A:�0A:zte.NoReturnc��SSKJn U"US9e)z�Exception handling helper.  This is used internally to either raise
rewritten exceptions or return a rendered traceback for the template.
r	)�rewrite_traceback_stackr�)�debugrT)r�r�rTs   rAr��Environment.handle_exception�s��	3�%�V�4�4rCr�parentc��U$)abJoin a template with the parent.  By default all the lookups are
relative to the loader root so this method returns the `template`
parameter unchanged, but if the paths should be relative to the
parent template, this function can be used to calculate the real
template name.

Subclasses may override this method and implement template path
joining here.
rl)r�rrWs   rA�	join_path�Environment.join_path�s	���rCr�c���URc[S5e[R"UR5U4nURbdURRU5nUbFUR(aUR(a$U(aURRU5 U$URRXURU55nURbX@RU'U$)Nz(no loader for this environment specified)ryr��weakref�refrHr�r{�
is_up_to_dater�r��load�make_globals)r�r�r��	cache_keyrs     rA�_load_template�Environment._load_template�s����;�;���F�G�G��[�[����-�t�4�	��:�:�!��z�z�~�~�i�0�H��#��$�$��(>�(>���$�$�+�+�G�4����;�;�#�#�D��0A�0A�'�0J�K���:�:�!�$,�J�J�y�!��rCc�z�[U[5(aU$UbURX5nURX5$)a�Load a template by name with :attr:`loader` and return a
:class:`Template`. If the template does not exist a
:exc:`TemplateNotFound` exception is raised.

:param name: Name of the template to load. When loading
    templates from the filesystem, "/" is used as the path
    separator, even on Windows.
:param parent: The name of the parent template importing this
    template. :meth:`join_path` can be used to implement name
    transformations with this.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.

.. versionchanged:: 3.0
    If a template is loaded from cache, ``globals`` will update
    the template's globals instead of ignoring the new values.

.. versionchanged:: 2.4
    If ``name`` is a :class:`Template` object it is returned
    unchanged.
)rQrErYrb)r�r�rWr�s    rA�get_template�Environment.get_template�s;��<�d�H�%�%��K����>�>�$�/�D��"�"�4�1�1rCrQc�@�[U[5(aUR5 U(d	[SS9eUHBn[U[5(aUs $UbURXB5nUR
XC5s $ [U5e![[4a Mdf=f)aHLike :meth:`get_template`, but tries loading multiple names.
If none of the names can be loaded a :exc:`TemplatesNotFound`
exception is raised.

:param names: List of template names to try loading in order.
:param parent: The name of the parent template importing this
    template. :meth:`join_path` can be used to implement name
    transformations with this.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.

.. versionchanged:: 3.0
    If a template is loaded from cache, ``globals`` will update
    the template's globals instead of ignoring the new values.

.. versionchanged:: 2.11
    If ``names`` is :class:`Undefined`, an :exc:`UndefinedError`
    is raised instead. If no templates were found and ``names``
    contains :class:`Undefined`, the message is more helpful.

.. versionchanged:: 2.4
    If ``names`` contains a :class:`Template` object it is
    returned unchanged.

.. versionadded:: 2.3
z0Tried to select from an empty list of templates.)�message)	rQr*r�rrErYrbrr!)r�rQrWr�r�s     rA�select_template�Environment.select_template�s���F�e�Y�'�'��,�,�.��#�J��
��D��$��)�)����!��~�~�d�3��
��*�*�4�9�9�
� ��&�&��%�n�5�
��
�s�)B	�	B�B�template_name_or_listc��[U[[45(aURXU5$[U[5(aU$URXU5$)z�Use :meth:`select_template` if an iterable of template names
is given, or :meth:`get_template` if one name is given.

.. versionadded:: 2.3
)rQrRr*rerEri)r�rkrWr�s    rA�get_or_select_template�"Environment.get_or_select_template0sS���+�c�9�-=�>�>��$�$�%:�G�L�L�
�-�x�
8�
8�(�(��#�#�$9�7�K�KrCc��URU5nU=(d URnURXRU5US5$)a�Load a template from a source string without using
:attr:`loader`.

:param source: Jinja source to compile into a template.
:param globals: Extend the environment :attr:`globals` with
    these extra variables available for all renders of this
    template. If the template has already been loaded and
    cached, its globals are updated with any new items.
:param template_class: Return an instance of this
    :class:`Template` class.
N)r`rk�	from_coder)r�r�r�rk�gsr;s      rAr�Environment.from_stringDs@��"�
�
�w�
'���3�� 3� 3���}�}�T�<�<��#7��T�B�BrC�dc�6�Uc0n[XR5$)aMake the globals map for a template. Any given template
globals overlay the environment :attr:`globals`.

Returns a :class:`collections.ChainMap`. This allows any changes
to a template's globals to only affect that template, while
changes to the environment's globals are still reflected.
However, avoid modifying any globals after a template is loaded.

:param d: Dict of template-specific globals.

.. versionchanged:: 3.0
    Use :class:`collections.ChainMap` to always prevent mutating
    environment globals.
)rr�)r�rss  rAr`�Environment.make_globalsYs��"
�9��A���<�<�(�(rC)r{rxrmr`r|rHrorbrOr�rwr�r�rurqrpryrsrcrvr�r�rrr_rnra)NNNN)NN)F)NNFF)NN.F)T)NNr>NTr)X�__name__�
__module__�__qualname__�__firstlineno__�__doc__�	sandboxedr�rgrS�Optional�__annotations__r?rrhrUr1r,r(rjrr
rrrrrrrrrrr*rRrP�Sequence�Union�Callable�Any�intr�r�r�r2r��propertyr$r��Iteratorr�r�r��Mappingr&r�r�r�r/r
rEr�r��Tupler�r�r%r�r�rr�typing�overloadrr�
CollectionrJ�ListrDr�rY�MutableMappingrbre�Iterablerirmrr`�__static_attributes__rlrCrAr7r7�sM��w�z�I��I�,0�I�q�z�z�-�(�/��F�5B��!�&�&��1�A�
�W�W�F�&-�M�1�6�6�'�?�,��F�F�:�&�&�#5� 0�%:�#6�$8�"4�1F�/B�'�+�AQ�&;�DF��'0�7;�IN�+/�� �6:�"�/J(��J(��J(� #�	J(�
!�J(�"�
J(� �J(� !�z�z�#��J(��Z�Z��_�J(��J(��J(�?�J(� $�J(��J�J�q�w�w�s�A�F�F�;�,?�'?�@�A�J(��J(� �6�6�)�$�!J(�"�*�*�Q�Z�Z��Q�U�U�
�3�4�#J(�$�G�G�D�!�*�*�a�j�j��o�->��-D�"E�E�F�%J(�&�
�
�<�(�'J(�(�)J(�*�+J(�,�
�
�?�3�-J(�.�/J(�XC�q�w�w�s�A�F�F�;�4G�/G�'H�C�T�C�*�1�5�5�*�T�*�#*� '�%,�#*�$+�")�18�/6�#�%�AH�&-�DK�!�'.�7>�IP�+2�!�#�6=�$�/E-��E-��E-� #�	E-�
!�E-�"�
E-� �E-� !�z�z�#��E-��Z�Z��_�E-��E-��E-�?�E-� $�E-��J�J�q�w�w�s�A�F�F�;�,?�'?�@�A�E-��E-� �6�6�)�$�!E-�"�*�*�Q�Z�Z��Q�U�U�
�3�4�#E-�$�G�G�D�!�*�*�a�j�j��o�->��-D�"E�E�F�%E-�&�
�
�<�(�'E-�(�)E-�*�+E-�,�
�
�?�3�-E-�.�/E-�0
�1E-�N��u����P����K�!8�P�:��5�5�:�$%�G�G�C����J�$7�:�	
������	�!�	"�:�&;�1�5�5�;�S�;�Q�U�U�;�4%��g�g�c�9�n�%�4%��u�u�4%��j�j����A�E�E�*�+�	4%�
�
�
�1�9�9�S�!�%�%�Z�0�1�4%����G�$�
4%��*�*�[�)�4%��4%�
���4%�t/3�48�'+�,0�
��
��u�u�
��j�j����A�E�E�*�+�	
�
�
�
�1�9�9�S�!�%�%�Z�0�1�
����G�$�

��*�*�[�)�
�
���
�2/3�48�'+�,0�
��
��u�u�
��j�j����A�E�E�*�+�	
�
�
�
�1�9�9�S�!�%�%�Z�0�1�
����G�$�

��*�*�[�)�
�
���
�2�!%�$(�	1��1��j�j��o�1��*�*�S�/�	1�

���1��1�&<��<�!"���C��<�<=�J�J�s�O�<�	���<�!%�$(�	1��1��j�j��o�1��*�*�S�/�	1�

���A�G�G�C��c�M�*�	+�1�0!%�$(�	
��
��j�j��o�
��*�*�S�/�	
�


�
�(%)�!%�����j�j��o���*�*�S�/�	�
�z�z�#���
�
�4!�
����
��j�j��o�
��*�*�S�/�	
�
�
�

�

�*1�s�1�c�1�h�1��_�_�!%�$(�#(� �
�����U�^�^�+�,���j�j��o���*�*�S�/�	�
!���
�
�����_�_�!%�$(�"%� �
�����U�^�^�+�,���j�j��o���*�*�S�/�	�
 ���
�

�����!%�$(�� �
'6�����U�^�^�+�,�'6��j�j��o�'6��*�*�S�/�	'6�
�'6��
'6�
����h��	�'6��'6�T6:�+?��+?�.2�+?�	�+?�`59�;?�)�<@�"�O5�����/�/�0�O5��J�J�q�|�|�C�0�1�O5��Z�Z��
�
�C�5�$�;� 7�8�	O5�
�Z�Z��_�O5��j�j����S�E�4�K�!8�9�
O5��O5�
�O5�f59�;?�#��J�J�q�|�|�C�0�1�#��Z�Z��
�
�C�5�$�;� 7�8�#�
�����	#�J5�q�z�z�#��5�-�5�
�#�
�s�
�s�
�����"#�*�*�Q�-=�-=�c�1�5�5�j�-I�"J��	����0�#'�<@�	"2��g�g�c�:�o�&�"2��
�
�3��"2����A�,�,�S�!�%�%�Z�8�9�	"2�

�"2��"2�H�#'�<@�	3'��z�z�!�'�'�#�z�/�2�3�3'��
�
�3��3'����A�,�,�S�!�%�%�Z�8�9�	3'�

�3'��3'�j�#'�<@�
L� �w�w���Q�V�V�A�G�G�C��O�$<�=�=� 
�L�
�
�
�3��L����A�,�,�S�!�%�%�Z�8�9�
L�
�L��L�,=A�9=�	C�����U�^�^�+�,�C����A�,�,�S�!�%�%�Z�8�9�C��
�
�1�6�6�*�#5�6�	C�

�C�*)����A�,�,�S�!�%�%�Z�8�9�)�	
�	�	�#�q�u�u�*�	%�)rCc)�D
�\rSrSr%Sr\r\R\\	S'\\	S'\R\\R4\	S'\R\\	S'\R\\	S'\R\\R\/\R"\44\	S'\R\/\R"\4\	S	'\RS
\	S'\\	S'\R\R/\4\	S
'\\\\\\\\\\\\SS\SSS4S\R@\\!RD4S\S\S\S\S\S\S\R\S\R\S\S\SSS\S \RF\R@\\RS!4S"\S#\R\S$\R\RS%\R4S&\R@\\R\R\/\44S'\S(\R4(S)jjr$\%SIS\S*\&S\R\\R4S+\R\R/\4S(S4
S,jj5r'\%S\S-\R\\R4S\R\\R4S(S4S.j5r(\%S\S/\R\\R4S\R\\R4S(S4S0j5r)S1\RS2\RS(\4S3jr*S1\RS2\RS(\4S4jr+S1\RS2\RS(S54S6jr,S1\RS2\RS(\R"\4S7jr-S1\RS2\RS(\R\\\/44S8jr0SJS9\R\R\\R4S:\S;\R\Rb\\R4S(\4S<jjr2SJS9\R\R\\R4S:\S;\R\Rb\\R4S(S
4S=jjr3SJS9\R\R\\R4S:\S;\R\Rb\\R4S(S
4S>jjr4\5SIS?\R\S(S
4S@jj5r6SIS?\R\S(S
4SAjjr7\8SKSBj5r9SC\:S(\:4SDjr;\8S(\4SEj5r<\8S(\Rz\R|\:\:44SFj5r?S(\4SGjr@SHrAg)LrEipaCA compiled template that can be rendered.

Use the methods on :class:`Environment` to create or load templates.
The environment is used to configure how templates are compiled and
behave.

It is also possible to create a template object directly. This is
not usually recommended. The constructor takes most of the same
arguments as :class:`Environment`. All templates created with the
same environment arguments share the same ephemeral ``Environment``
instance behind the scenes.

A template object should be considered immutable. Modifications on
the object are not supported.
�environment_classrNr�r�r��blocks�root_render_func�TemplateModule�_module�_debug_info�	_uptodaterlTNFr�r`rmrarnrbrorprqrrrsrcrtrurOr4rvr_rw.rxr}r=c��[URUUUUUUUU	U
UUU
[U5UUUUSSSSU5nURXS9$)NrF)rk)rBr��	frozensetr)r;r�r`rmrarnrbrorprqrrrsrcrurOrvr_rwrxr}r@s                     rAr��Template.__new__�sq��,*��!�!���!�� ��!�����!��j�!������
����/
��2���v��:�:rCrI�uptodatec�h�XRS.n[X%5 URXU5nXFlU$)z�Creates a template object from compiled code and the globals.  This
is used by the loaders and environment to create a template object.
)rN�__file__)�co_filenamer�_from_namespacer�)r;rNrIr�r��	namespacer�s       rArp�Template.from_code�s6��%0�=M�=M�N�	��T��
�
 �
 ���
A�����	rC�module_dictc�&�URXU5$)z�Creates a template object from a module.  This is used by the
module loader to create a template object.

.. versionadded:: 2.4
)r�)r;rNr�r�s    rA�from_module_dict�Template.from_module_dict�s���"�"�;�W�E�ErCr�c���[RU5nXlX4lUSUlUSUlUSUlUSUlSUlUSUl	SUl
XS'XBS'U$)Nr�r�r��root�
debug_inforN�__jinja_template__)r�r�rNr�r�r�r�r�r�r�r�)r;rNr�r�rSs     rAr��Template._from_namespace�s����n�n�S�)��#�
��	��6�"����z�*��
��X�&���'�v�.�����	�"�,�/��
����$/�-� �*+�&�'��rCr<r�c�`�URR(a%SSKnURUR"U0UD65$UR[
U0UD65nURRURU55$![a URR5 gf=f)a]This method accepts the same arguments as the `dict` constructor:
A dict, a dict subclass or some keyword arguments.  If no arguments
are given the context will be empty.  These two calls do the same::

    template.render(knights='that say nih')
    template.render({'knights': 'that say nih'})

This will return the rendered template as a string.
rN)rNr��asyncio�run�render_asyncr)rKr,r�r�r�)r�r<r�r��ctxs     rA�render�Template.render�s������$�$���;�;�t�0�0�$�A�&�A�B�B����t�T�4�V�4�5��	0��#�#�*�*�4�+@�+@��+E�F�F���	0����-�-�/�	0�s�)B�$B-�,B-c��l# �URR(d[S5eUR[	U0UD65nURRUR
U5Vs/sShv�NoDPMN
Os snfsn5$![a URR5s$f=f7f)aThis works similar to :meth:`render` but returns a coroutine
that when awaited returns the entire rendered template string.  This
requires the async feature to be enabled.

Example usage::

    await template.render_async(knights='that say nih; asynchronously')
�8The environment was not created with async mode enabled.N)	rNr��RuntimeErrorr)rKr,r�r�r�)r�r<r�r��ns     rAr��Template.render_asyncs�������(�(��J��
����t�T�4�V�4�5��	7��#�#�*�*�"&�"7�"7��"<�=�=�Q��=��=��
���	7��#�#�4�4�6�6�	7�sZ�AB4�(B
�,A>�.A<
�2A:�3A<
�6A>�:A<
�<A>�=B
�	B4�
$B1�.B4�0B1�1B4�TemplateStreamc�8�[UR"U0UD65$)zKWorks exactly like :meth:`generate` but returns a
:class:`TemplateStream`.
)r�r)r�r<r�s   rAr��Template.stream(s���d�m�m�T�<�V�<�=�=rCc/�^^^# �TRR(aDSSKnS[R[
4UUU4SjjnUR
U"55Shv�N gTR[T0TD65nTRU5Shv�N gN:N![a TRR5v� gf=f7f)a:For very large templates it can be useful to not render the whole
template at once but evaluate each statement after another and yield
piece for piece.  This method basically does exactly that and returns
a generator that yields one item after another as strings.

It accepts the same arguments as :meth:`render`.
rNr=c��f># �TR"T0TD6Vs/sShv�NoPMN
sn$s snf7fr)�generate_async)r�r<r�r�s ���rA�to_list�"Template.generate.<locals>.to_list9s-����)-�)<�)<�d�)M�f�)M�N�N�A��N�N��N�s$�1�,�(�&
�(�,�(�,�1)rNr�r�rSr�rRr�r)rKr�r�r�)r�r<r�r�r�r�s```   rAr�Template.generate.s��������$�$��
O�1�6�6�#�;�
O�
O��{�{�7�9�-�-�-�����t�T�4�V�4�5��	6��,�,�S�1�1�1�

.�
2���	6��"�"�3�3�5�5�	6�sH�AC
�B� C
�B�B�B�C
�B�&C�C
�C�C
c�# �URR(d[S5eUR[	U0UD65nURU5nUShv�NnU7v� MN
UR
5IShv�N g!UR
5IShv�N f=f![a  URR57v� gf=f7f)zcAn async version of :meth:`generate`.  Works very similarly but
returns an async iterator instead.
r�N)	rNr�r�r)rKr��acloser�r�)r�r<r�r��agen�events      rAr��Template.generate_asyncFs�������(�(��J��
����t�T�4�V�4�5��
	6��(�(��-�D�
$�#'� �%��K� �4�
�k�k�m�#�#��d�k�k�m�#�#���	6��"�"�3�3�5�5�	6�s~�AC�B#�B�A*�A(�A*� B�(A*�*B�+B#�>B�?B#�C�B �B�B � B#�#'C
�
C�C
�
C�varsr?r�c	�r�[URURURXURU5$)a6Create a new :class:`Context` for this template.  The vars
provided will be passed to the template.  Per default the globals
are added to the context.  If shared is set to `True` the data
is passed as is to the context without adding the globals.

`locals` can be a dict of local variables for internal usage.
)r)rNr�r�r�)r�r�r?r�s    rAr)�Template.new_context_s1������d�i�i����d�D�L�L�RX�
�	
rCc�<�URXU5n[X5$)a"This method works like the :attr:`module` attribute when called
without arguments but it will evaluate the template on every call
rather than caching it.  It's also possible to provide
a dict which is then used as context.  The arguments are the same
as for the :meth:`new_context` method.
)r)r�)r�r�r?r�r�s     rA�make_module�Template.make_moduleps!�����t�V�4���d�(�(rCc
��# �URXU5n[UUURU5Vs/sShv�NoUPMN
sn5$s snf7f)z�As template module creation can invoke template code for
asynchronous executions this method must be used instead of the
normal :meth:`make_module` one.  Likewise the module attribute
becomes unavailable in async mode.
N)r)r�r�)r�r�r?r�r�r�s      rA�make_module_async�Template.make_module_asyncsM������t�V�4�����"�3�3�C�8�9�9��Q�9�
�	
��
:�s*�-A�A�?�=�?�A�?�A�Ar�c�t�URR(a[S5eUb]URURR5-
nU(a/UR
UVs0sHo3URU_M sn5$URcUR
5UlUR$s snf)aIf a context is passed in, this means that the template was
imported. Imported templates have access to the current
template's globals by default, but they can only be accessed via
the context during runtime.

If there are new globals, we need to create a new module because
the cached module is already rendered and will not have access
to globals from the current context. This new module is not
cached because the template can be imported elsewhere, and it
should have access to only the current template's globals.
z&Module is not available in async mode.)	rNr�r��globals_keysr��keysr�rWr��r�r�r��ks    rA�_get_default_module�Template._get_default_module�s������$�$��G�H�H��?��#�#�d�l�l�&7�&7�&9�9�D���'�'�4�(H�4�a�C�J�J�q�M�)9�4�(H�I�I��<�<���+�+�-�D�L��|�|���)Is�'B5c��X# �UbeURURR5-
nU(a7URUVs0sHo3URU_M sn5IShv�N$UR
cUR5IShv�NUlUR
$s snfN?N7fr)r�r�r�r�rWr�r�s    rA�_get_default_module_async�"Template._get_default_module_async�s�����?��#�#�d�l�l�&7�&7�&9�9�D��!�3�3�t�4T�t�!��
�
�1�
�5E�t�4T�U�U�U��<�<��!%�!7�!7�!9�9�D�L��|�|���5U�U�:�s0�AB*�B!�
B*�&B&�'$B*�B(�B*�(B*c�"�UR5$)aSThe template as module.  This is used for imports in the
template runtime but is also useful if one wants to access
exported template variables from the Python layer:

>>> t = Template('{% macro foo() %}42{% endmacro %}23')
>>> str(t.module)
'23'
>>> t.module.foo() == u'42'
True

This attribute is not available if async mode is enabled.
)r�r�s rA�module�Template.module�s���'�'�)�)rCrc�R�[UR5Hup#X1::dMUs $ g)zbReturn the source line number of a line number in the
generated bytecode as they are not in sync.
r	)�reversedr�)r�r�
template_line�	code_lines    rA�get_corresponding_lineno�!Template.get_corresponding_lineno�s,��)1����(A�$�M��"�$�$�)B�rCc�>�URcgUR5$)z?If this variable is `False` there is a newer version available.T)r�r�s rAr^�Template.is_up_to_date�s���>�>�!���~�~��rCc���UR(aRURRS5Vs/sH+n[[[URS555PM- sn$/$s snf)zThe debug info mapping.�&�=)r��split�tuple�mapr�)r�r�s  rAr��Template.debug_info�s`������)�)�/�/��4��4�A��c�#�q�w�w�s�|�,�-�4��
�
�	��s�2A&c��URcS[U5S3nO[UR5nS[U5RSUS3$�Nzmemory:r��<� �>)r��id�reprrJrv�r�r�s  rA�__repr__�Template.__repr__�sK���9�9���R��X�a�L�)�D���	�	�?�D��4��:�&�&�'�q���a�0�0rC)r�r)NFN)r=r�)Brvrwrxryrzr7r�rSrUr}r�rRr�r|�Dictr�r(r�rPrr
rrrrrrrrrrr*rr
rEr~r��classmethodrrpr�r�r�r�r�r�AsyncGeneratorr�r�r�r)r�r�r/r�r�r�r�r�r�r^r�r�r�r�r�rlrCrArErEpsq���$.9��q�v�v�k�*�8���
�
�
�c�1�5�5�j�
)�)�
�*�*�S�/���j�j��o��
�F�F�3��
�
�G�9�a�j�j��o�#=�>�>�?�?��j�j�'��A�J�J�s�O�!;�<�<�
�Z�Z�(�
)�)����z�z�!�*�*�R��X�.�/�/�
#5� 0�%:�#6�$8�"4�1F�/B�'�+�AQ�&;�DF��'0�7;�IN�"�)/;�����U�^�^�+�,�/;� �/;��	/;�
 #�/;�!�
/;�"�/;� �/;� !�z�z�#��/;��Z�Z��_�/;��/;��/;�?�/;� $�/;��J�J�q�w�w�s�A�F�F�;�,?�'?�@�A�/;� �!/;�"�6�6�)�$�#/;�$�*�*�Q�Z�Z��Q�U�U�
�3�4�%/;�&�G�G�D�!�*�*�a�j�j��o�->��-D�"E�E�F�'/;�(�)/;�*
���+/;�b�6:�� �����!�!�#�q�u�u�*�-�	�
�*�*�Q�Z�Z��D��1�2��
�
��� �F� �F��%�%�c�1�5�5�j�1�F��!�!�#�q�u�u�*�-�	F�

�F��F��� ���#�#�C����J�/���!�!�#�q�u�u�*�-�	�

����60�A�E�E�0�Q�U�U�0�s�0�,7����7����7�3�7�.>�A�E�E�>�Q�U�U�>�7G�>�6�a�e�e�6�q�u�u�6����C��6�06��U�U�6�&'�e�e�6�	
�	�	�#�v�+�	&�6�604��48�	
��j�j�����Q�U�U�
�+�,�
��
��
�
�1�9�9�S�!�%�%�Z�0�1�	
�

�
�&04��48�	
)��j�j�����Q�U�U�
�+�,�
)��
)��
�
�1�9�9�S�!�%�%�Z�0�1�	
)�

�
)�"04��48�	
��j�j�����Q�U�U�
�+�,�
��
��
�
�1�9�9�S�!�%�%�Z�0�1�	
�

�
�$��q�z�z�'�':��FV����6*.���:�:�g�&��	���
*��
*��s��s��� �t� �� ���A�F�F�1�7�7�3��8�#4�5����1�#�1rCc	��\rSrSrSrS
S\S\S\R\R\
SS4SjjrS\4S	jr
S\
4S
jrS\
4SjrSrg)r�i�z�Represents an imported template.  All the exported names of the
template are available as attributes on this object.  Additionally
converting it into a string renders the contents.
Nrr��body_streamr=c�
�Uc@URR(a[S5e[UR	U55nX0lURRUR55 URUl
g)NztAsync mode requires a body stream to be passed to a template module. Use the async methods of the API you are using.)rNr�r��listr��_body_streamr�r��get_exportedr�rv)r�rr�r�s    rAr��TemplateModule.__init__�sn�����"�"�+�+�"�*����x�8�8��A�B�K�'���
�
���W�1�1�3�4� �
�
��
rCc�>�[[UR55$r)rr,r�r�s rA�__html__�TemplateModule.__html__s���f�T�.�.�/�0�0rCc�,�[UR5$r)r,r�r�s rA�__str__�TemplateModule.__str__
s���d�'�'�(�(rCc��URcS[U5S3nO[UR5nS[U5RSUS3$r�)rvr�r�rJr�s  rAr��TemplateModule.__repr__
sL���=�=� ��R��X�a�L�)�D���
�
�&�D��4��:�&�&�'�q���a�0�0rC)rvr�r)rvrwrxryrzrEr(rSr|r�rRr�rr�rr�r�rlrCrAr�r��sl���48�	&��&��&��Z�Z��
�
�3��0�	&�

�&�(1�&�1�)��)�1�#�1rCr�c��\rSrSrSrS\S\SS4SjrS\RS	\RS\R\R4S
jrSrg)riz�The :meth:`jinja2.Environment.compile_expression` method returns an
instance of this object.  It encapsulates the expression-like access
to the template with an expression it wraps.
rrr=Nc��XlX lgr��	_template�_undefined_to_none)r�rrs   rAr��TemplateExpression.__init__s
��!��"3�rCr<r�c��URR[U0UD65n[URR	U55 UR
SnUR(a[U[5(aSnU$)NrW)	rr)rKr-r�r�rrQr*)r�r<r�r�r�s     rA�__call__�TemplateExpression.__call__sd���.�.�,�,�T�4�-B�6�-B�C������/�/��8�9�
�\�\�(�
#���"�"�z�"�i�'@�'@��B��	rCr)
rvrwrxryrzrErPr�rSr�r|rr�rlrCrArrsP���
4��4�d�4�t�4��a�e�e��q�u�u�����A�E�E�9J�rCrc	�6�\rSrSrSrS\R\SS4SjrSS\R\\R\4S\R\S	\R\SS4S
jjr
SSjrS\S\R\4S
jrSS\SS4SjjrSSjrS\4SjrSrg)r�i(a�A template stream works pretty much like an ordinary python generator
but it can buffer multiple items to reduce the number of total iterations.
Per default the output is unbuffered which means that for every unbuffered
instruction in the template one string is yielded.

If buffering is enabled with a buffer size of 5, five items are combined
into a new string.  This is mainly useful if you are streaming
big templates to a client via WSGI which flushes after each iteration.
�genr=Nc�0�XlUR5 gr)�_gen�disable_buffering)r�rs  rAr��TemplateStream.__init__3s���	���� rC�fp�encoding�errorsc�n^^�Sn[U[5(aTcSm[US5nSnOUnTbUU4SjU5nOUn[US5(aUR	U5 OUHnURU5 M U(aUR
5 gg!U(aUR
5 ff=f)z�Dump the complete stream into a file or file-like object.
Per default strings are written, if you want to encode
before writing specify an `encoding`.

Example usage::

    Template('Hello {{ name }}!').stream(name='foo').dump('hello.html')
FNzutf-8r*Tc3�F># �UHoRTT5v� M g7fr)r3)�.0r�rrs  ��rA�	<genexpr>�&TemplateStream.dump.<locals>.<genexpr>Rs����E��1�H�H�X�v�6�6��s�!�
writelines)rQrRr.r�rr2rG)r�rrrrG�real_fp�iterable�items  ``    rA�dump�TemplateStream.dump7s�������b�#�����"��#'��D�>�G��E��G�
	 ��#�E��E�����w��-�-��"�"�8�,�$�D��M�M�$�'�%���
�
����u��
�
���s�AB�B4c�P�[[UR5UlSUlg)zDisable the output buffering.FN)r�nextr�_next�bufferedr�s rAr� TemplateStream.disable_buffering_s���T�4�9�9�-��
���
rCrDc#�# �/nSnURnX1:a0[UR5nU"U5 U(aUS-
nX1:aM0[	U5v� USS2	SnML![a U(dgN+f=f7f)Nrr	)�appendr"r�
StopIterationr,)r�rD�buf�c_size�push�cs      rA�_buffered_generator�"TemplateStream._buffered_generatords���������z�z���
��m��T�Y�Y��A���G���!���	�m���+���A���F���!�
����
�s(�A9�3A �
A9� A6�1A9�5A6�6A9c�|�US::a[S5eSUl[[UR	U55Ulg)z<Enable buffering.  Buffer `size` items before yielding them.r	zbuffer size too smallTN)�
ValueErrorr$rr"r-r#)r�rDs  rA�enable_buffering�TemplateStream.enable_bufferingws5���1�9��4�5�5���
��T�4�#;�#;�D�#A�B��
rCc��U$rrlr�s rA�__iter__�TemplateStream.__iter__s���rCc�"�UR5$r)r#r�s rA�__next__�TemplateStream.__next__�s���z�z�|�rC)rr#r$)N�strict)r=N)�)r=r�)rvrwrxryrzrSr�rRr�r�IO�bytesr|rrr�r-r1r4r7r�rlrCrAr�r�(s����!�A�J�J�s�O�!��!�%)�"*�	& �
�G�G�C����e��$�%�& ��*�*�S�/�& ��
�
�3��	& �

�& �P�
����
�
�3���&C�S�C��C���#�rCr�)^rzr/r�rSr\�collectionsr�	functoolsrrr�typesr�
markupsaferrir
�compilerrr�defaultsr
rrrrrrrrrrrrrrr�
exceptionsrrrr r!r�r#r$r%r&rr'�runtimer(r)r*�utilsr+r,r-r.r/r1r2�
TYPE_CHECKING�typing_extensions�te�bccacher3r�r4r@r5�TypeVarr6rUr�rBr�r|r�r�rRrGrMr~rr�rYrdr7rEr�rr�rkrlrCrA�<module>rKs=���
�
��� �������#��&�(�(�*�%�'�&�#�+�)�+�#�&�!�)�+�(�,�)�+�&������� ����� �����?�?�"�&��#�
�Y�Y�|�=�
9�
��2��
�Q�V�V�J�%7�
����
�*�
��
�
�

�
��Z�Z�� � ����)=�s�)B�!C�Z�!O�P�Q�
�
$��:�:�a�&�&�q�u�u�a�e�e�|�4�5�
$��Z�Z�� � ����)=�s�)B�!C�Z�!O�P�Q�
$�����
�
�1�7�7�3����{�(;�#;�<�=���V�V�C�����$�:��*��$])�])�@z1�z1�z%1�%1�P��&[�[�@&��rC

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 1.58 KB 0644
_identifier.cpython-313.pyc File 2.04 KB 0644
async_utils.cpython-313.pyc File 4.91 KB 0644
bccache.cpython-313.pyc File 18.89 KB 0644
compiler.cpython-313.pyc File 103.15 KB 0644
constants.cpython-313.pyc File 1.48 KB 0644
debug.cpython-313.pyc File 6.39 KB 0644
defaults.cpython-313.pyc File 1.54 KB 0644
environment.cpython-313.pyc File 73.04 KB 0644
exceptions.cpython-313.pyc File 7.8 KB 0644
ext.cpython-313.pyc File 41.17 KB 0644
filters.cpython-313.pyc File 69.67 KB 0644
idtracking.cpython-313.pyc File 18.92 KB 0644
lexer.cpython-313.pyc File 31.82 KB 0644
loaders.cpython-313.pyc File 31.57 KB 0644
meta.cpython-313.pyc File 5.42 KB 0644
nativetypes.cpython-313.pyc File 6.97 KB 0644
nodes.cpython-313.pyc File 58.63 KB 0644
optimizer.cpython-313.pyc File 2.68 KB 0644
parser.cpython-313.pyc File 60.26 KB 0644
runtime.cpython-313.pyc File 47.77 KB 0644
sandbox.cpython-313.pyc File 17.88 KB 0644
tests.cpython-313.pyc File 8.67 KB 0644
utils.cpython-313.pyc File 34.12 KB 0644
visitor.cpython-313.pyc File 5.29 KB 0644
Filemanager