관리-도구
편집 파일: compiler.cpython-311.pyc
� �������kB������������� �������������d�Z�ddlmZ�ddlmZ�ddlmZ�ddlmZ �ddl mZ�ddl mZ�dd l mZ�dd lmZ�ddlmZ�ddlmZ�dd lmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddlmZ�ddl m!Z!�ddl"m#Z#�ddl$m%Z%�dddddd d!d"d#�Z&�e'e(d$������������rd$Z)nd%Z)d&gZ* ��e+d'�������������e*�,��������������������d(�������������n#�e-$�r�Y�nw�xY�w ��e+d)�������������d*Z.n #�e-$�r�d+Z.Y�nw�xY�wd,��Z/ �d?d.�Z0d/��Z1d0��Z2�G�d1��d2e3������������Z4�G�d3��d4e3������������Z5�G�d5��d6e6������������Z7�G�d7��d8e%������������Z8�G�d9��d:e%������������Z9�G�d;��d<e:������������Z;�G�d=��d>e%������������Z<d-S�)@z0Compiles nodes from the parser into Python code.�����)� namedtuple��update_wrapper)�chain)� iskeyword)�escape)�Markup����)�nodes)�imap)� iteritems)�izip)�NativeStringIO)� range_type)�string_types)� text_type)�TemplateAssertionError)�Symbols)�VAR_LOAD_ALIAS)�VAR_LOAD_PARAMETER)�VAR_LOAD_RESOLVE)�VAR_LOAD_UNDEFINED)�EvalContext)� Optimizer)�concat)�NodeVisitorz==z!=�>z>=�<z<=�inznot in)�eq�ne�gt�gteq�lt�lteqr����notinr ����items�divisionz%from __future__ import generator_stop�generator_stopzdef f(): yield from x()TFc������������������.���������fd�}t����������|��������������S�)Nc������������������������|�j���������rH|j��������j��������s<|�j�����������������������������||j��������������������}||k����r|����������������������||������������S���|�||fi�|��S��N)� optimized�eval_ctx�volatile� optimizer�visit)�self�node�frame�kwargs�new_node�fs��� ��o/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/jinja2/compiler.py�new_funczoptimizeconst.<locals>.new_funcC���sm��������>�� 3�%�.�"9�� 3��~�+�+�D�%�.�A�A�H��4����z�z�(�E�2�2�2��q��t�U�-�-�f�-�-�-�����r���)r7���r9���s���` r8���� optimizeconstr;���B���s.�������.��.��.��.��.���(�A�&�&�&r:���Nc������������������������t����������|�t����������j��������������������st����������d�������������|���������������������||||||������������}|���������������������|��������������|�|j�������������������������������������������S�dS�)z+Generate the python source for a node tree.z Can't compile non template nodesN)� isinstancer����Template� TypeError�code_generator_classr1����stream�getvalue)r3����environment�name�filenamerA���� defer_initr-���� generators��� r8����generaterH���N���s~��������d�E�N�+�+��<��:�;�;�;��0�0��T�8�V�Z�����I���O�O�D���� �~���(�(�*�*�*���~r:���c�����������������������|��|�t�����������u�s |�t����������u�rdS�t����������|�������������t����������t����������t ����������t����������t����������t����������ft����������z���v�rdS�t����������|�������������t����������t����������t����������t����������fv�r|�D�]}t����������|������������s�dS��dS�t����������|�������������t����������u�r;t!����������|�������������D�])\��}}�t����������|������������s�dS�t����������|�������������s�dS��*dS�dS�)z)Does the node have a safe representation?NTF)�NotImplemented�Ellipsis�type�bool�int�float�complexr���r ���r����tuple�list�set� frozenset� has_safe_repr�dictr ���)�value�item�keys��� r8���rU���rU���\���s��������}���/�/�5�H�3D�3D��t��E�{�{�t�S�%��*�f�E��T�T�T��t��E�{�{�u�d�C��3�3�3��� �� �D� ��&�&�� ��u�u� ��t� �e���� � �#�E�*�*�� �� �J�C�� ��%�%�� ��u�u� ��'�'�� ��u�u� ��t��5r:���c�����������������������t����������|������������} �|�D�]}|���������������������|��������������n#�t����������$�r�Y�nw�xY�w|j��������S�)z�Check if the names passed are accessed undeclared. The return value is a set of all the undeclared names from the sequence of names found. )�UndeclaredNameVisitorr1����VisitorExit� undeclared)r����names�visitorr3���s��� r8����find_undeclaredr`���q���sh�������$�E�*�*�G� ��� �� �D��M�M�$����� ���� �� �� ��� ������s����,�� 9�9c�������������������������e�Zd�Zd��ZdS�)�MacroRefc������������������>�����||�_���������d|�_��������d|�_��������d|�_��������d�S�)NF)r3����accesses_caller�accesses_kwargs�accesses_varargs�r2���r3���s��� r8����__init__zMacroRef.__init__���s'�������� �$���$��� %����r:���N)�__name__� __module__�__qualname__rh�����r:���r8���rb���rb���~���s#��������������&��&��&��&��&r:���rb���c��������������������2�����e�Zd�ZdZdd�Zd��Zd d�Zd��ZeZdS�) �Framez&Holds compile time information for us.Nc������������������������||�_���������t����������|r|j��������pd�|�������������|�_��������d|�_��������d|�_��������|o|j��������|�_��������d�|�_��������|r|j��������pd�|�_��������||�_��������|�|j��������|�_��������d�S�d�S�)N��levelF) r.���r����symbols�toplevel� rootlevel�require_output_check�buffer�block�parent)r2���r.���rx���rq���s��� r8���rh���zFrame.__init__����s������� �� ��v�8�&�.�@�D��N�N�N������ � �����%+�$J�v�/J��!�������,���4��� ������� �-�D�K�K�K���r:���c�����������������������t��������������������������������|�j��������������������}|j�����������������������������|�j���������������������|�j�������������������������������������������|_��������|S�)z!Create a copy of the current one.)�object�__new__� __class__�__dict__�updaterr����copy�r2����rvs��� r8���r���z Frame.copy����sG������ �^�^�D�N� +� +�� ����4�=�)�)�)��\�&�&�(�(�� �� r:���Fc������������������v�����|r#t����������|�j��������|�j��������j��������dz����������������S�t����������|�j��������|�������������S�)zReturn an inner frame.r ���rp���)rn���r.���rr���rq���)r2����isolateds��� r8����innerzFrame.inner����s<�������� F����d�l�.@�1�.D�E�E�E�E��T�]�D�)�)�)r:���c������������������<�����|�������������������������������������}d|_��������|S�)a��Return a soft frame. A soft frame may not be modified as standalone thing as it shares the resources with the frame it was created of, but it's not a rootlevel frame any longer. This is only used to implement if-statements. F)r���rt���r����s��� r8����softz Frame.soft����s��������Y�Y�[�[������ r:���)NN�F) ri���rj���rk����__doc__rh���r���r����r�����__copy__rl���r:���r8���rn���rn�������sa��������������0�0�(��(��(��(�>�����*��*��*��*� �� �� ���H�H�Hr:���rn���c�������������������������e�Zd�ZdZdS�)r\���z?Exception used by the `UndeclaredNameVisitor` to signal a stop.N�ri���rj���rk���r����rl���r:���r8���r\���r\�������s��������������I�I�I�Ir:���r\���c��������������������*�����e�Zd�ZdZd��Zd��Zd��Zd��ZdS�)�DependencyFinderVisitorz.A visitor that collects filter and test calls.c������������������R�����t������������������������|�_��������t������������������������|�_��������d�S�r,���)rS����filters�tests�r2���s��� r8���rh���z DependencyFinderVisitor.__init__����s�������u�u����U�U�� � � r:���c������������������n�����|�����������������������|�������������|�j�����������������������������|j���������������������d�S�r,���)� generic_visitr�����addrD���rg���s��� r8����visit_Filterz$DependencyFinderVisitor.visit_Filter����s4���������4� � � �������#�#�#�#�#r:���c������������������n�����|�����������������������|�������������|�j�����������������������������|j���������������������d�S�r,���)r����r����r����rD���rg���s��� r8���� visit_Testz"DependencyFinderVisitor.visit_Test����s2���������4� � � �� ���t�y�!�!�!�!�!r:���c�����������������������dS�)zStop visiting at blocks.Nrl���rg���s��� r8����visit_Blockz#DependencyFinderVisitor.visit_Block��������������r:���N)ri���rj���rk���r����rh���r����r����r����rl���r:���r8���r����r��������sV��������������8�8������$��$��$�"��"��"�'��'��'��'��'r:���r����c��������������������$�����e�Zd�ZdZd��Zd��Zd��ZdS�)r[���z�A visitor that checks if a name is accessed without being declared. This is different from the frame visitor as it will not stop at closure frames. c������������������T�����t����������|������������|�_��������t������������������������|�_��������d�S�r,���)rS���r^���r]���)r2���r^���s��� r8���rh���zUndeclaredNameVisitor.__init__����s��������Z�Z�� ��%�%����r:���c������������������������|j���������dk����rM|j��������|�j��������v�r?|�j�����������������������������|j���������������������|�j��������|�j��������k����rt�������������������������d�S�|�j�����������������������������|j���������������������d�S�)N�load)�ctxrD���r^���r]���r����r\����discardrg���s��� r8���� visit_Namez UndeclaredNameVisitor.visit_Name����sv�������8�v���$�)�t�z�"9�"9��O���� �*�*�*���$�*�,�,�!�m�m�#��-�,�� �J���t�y�)�)�)�)�)r:���c�����������������������dS�)zStop visiting a blocks.Nrl���rg���s��� r8���r����z!UndeclaredNameVisitor.visit_Block����r����r:���N)ri���rj���rk���r����rh���r����r����rl���r:���r8���r[���r[�������sK����������������� �� �� �*��*��*�&��&��&��&��&r:���r[���c�������������������������e�Zd�ZdZdS�)�CompilerExitz�Raised if the compiler encountered a situation where it just doesn't make sense to further process the code. Any block that raises such an exception is not further processed. Nr����rl���r:���r8���r����r��������s��������������������r:���r����c������������������������e�Zd�Z �dmd�Zd��Zd��Zd��Zdnd�Zd ��Zdod�Z dpd�Z d ��Zdpd�Zd��Z d��Zdqd�Zdqd�Zdpd�Zd��Zd��Zdnd�Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd��Zd ��Zd!��Zd"��Zd#��Z d$��Z!d%��Z"d&��Z#d'��Z$d(��Z%dpd)�Z&d*��Z'd+��Z(d,��Z)d-��Z*d.��Z+d/��Z,d0��Z-d1��Z.d2��Z/d3��Z0d4��Z1d5��Z2�e3d6d7������������Z4e5Z6dZ7d8��Z8d9��Z9d:��Z:d;��Z;d<��Z<d=��Z=d>��Z>d?��Z?d@��Z@dA��ZAdB��ZBdC��ZCdD��ZDdE��ZEdF��ZFdrdG�ZGdrdH�ZH�eGdI������������ZI�eGdJ������������ZJ�eGdK������������ZK�eGdL������������ZL�eGdM������������ZM�eGdN������������ZN�eGdO������������ZO�eGdPd�Q������������ZP�eGdRd�Q������������ZQ�eHdI������������ZR�eHdJ������������ZS�eHdSd�Q������������ZT[G[HeUdT����������������ZVeUdU����������������ZWdV��ZXeUdW����������������ZYeUdX����������������ZZdY��Z[eUdZ����������������Z\eUd[����������������Z]eUd\����������������Z^eUdnd]���������������Z_d^��Z`d_��Zad`��Zbda��Zcdb��Zddc��Zedd��Zfde��Zgdf��Zhdg��Zidh��Zjdi��Zkdj��Zldk��Zmdl��ZndS�)s� CodeGeneratorNFTc����������������������|�t������������������������}||�_��������||�_��������||�_��������||�_��������d|�_��������||�_��������||�_��������|rt����������|������������|�_ ��������i�|�_ ��������i�|�_��������d|�_��������d|�_ ��������d|�_��������i�|�_��������i�|�_��������g�|�_��������d�|�_��������d|�_��������d|�_��������d|�_��������d|�_��������d|�_��������g�|�_��������g�|�_��������dg|�_��������d�S�)NFr���r ���T�context)r���rC���rD���rE���rA����created_block_contextrF���r-���r���r0����import_aliases�blocks�extends_so_far�has_known_extends�code_linenor����r����� debug_info�_write_debug_info� _new_lines� _last_line�_first_write�_last_identifier�_indentation� _assign_stack�_param_def_block�_context_reference_stack)r2���rC���rD���rE���rA���rF���r-���s��� r8���rh���zCodeGenerator.__init__����s�������>�#�%�%�F�&����� � �� ����%*��"�$���"����� 4�&�{�3�3�D�N��!�������� ��� �"'���������� ��������!%������������!����!"�������� ����!#����*3���%�%�%r:���c������������������:�����t����������|||�j��������|�j���������������������)z*Fail with a :exc:`TemplateAssertionError`.)r���rD���rE���)r2����msg�linenos��� r8����failzCodeGenerator.fail<��s������$�S�&�$�)�T�]�K�K�Kr:���c������������������6�����|�xj���������dz ��c_���������d|�j���������z��S�)zGet a new unique identifier.r ���zt_%d)r����r����s��� r8����temporary_identifierz"CodeGenerator.temporary_identifier@��s$����������"�����-�-�-r:���c������������������r�����|�������������������������������������|_��������|����������������������d|j��������z���������������dS�)z7Enable buffering for the frame from that point onwards.z%s = []N)r����rv���� writeline�r2���r4���s��� r8���rv���zCodeGenerator.bufferE��s4�������0�0�2�2������y�5�<�/�0�0�0�0�0r:���c����������������������|s�|j���������j��������r�|����������������������d�������������|�������������������������������������|����������������������d|j��������z���������������|�������������������������������������|����������������������d�������������|�������������������������������������|����������������������d|j��������z���������������|�������������������������������������dS�|j���������j��������r|����������������������d|j��������z���������������dS�|����������������������d|j��������z���������������dS�)z(Return the buffer contents of the frame.zif context.eval_ctx.autoescape:zreturn Markup(concat(%s))�else:zreturn concat(%s)N)r.���r/���r�����indentrv����outdent� autoescape)r2���r4����force_unescapeds��� r8����return_buffer_contentsz$CodeGenerator.return_buffer_contentsJ��s��������� ��~�&�� ����@�A�A�A���� � � ����:�U�\�I�J�J�J����������w�'�'�'���� � � ����2�U�\�A�B�B�B�����������*�� ����:�U�\�I�J�J�J������*�U�\�9�:�:�:�:�:r:���c������������������&�����|�xj���������dz ��c_���������dS�)zIndent by one.r ���N�r����r����s��� r8���r����zCodeGenerator.indent\��s���������Q�����r:���r ���c������������������&�����|�xj���������|z��c_���������dS�)zOutdent by step.Nr����)r2����steps��� r8���r����zCodeGenerator.outdent`��s���������T�!����r:���c�����������������������|j����������|����������������������d|�������������dS�|����������������������d|j���������z��|�������������dS�)z%Yield or write into the frame buffer.N�yield � %s.append()rv���r����)r2���r4���r3���s��� r8����start_writezCodeGenerator.start_writed��sE�������<���N�N�8�T�*�*�*�*�*��N�N�<�%�,�6��=�=�=�=�=r:���c������������������B�����|j����������|����������������������d�������������dS�dS�)z1End the writing process started by `start_write`.N�))rv����writer����s��� r8���� end_writezCodeGenerator.end_writek��s%�������<�#��J�J�s�O�O�O�O�O��$�#r:���c�����������������������|�����������������������||�������������|����������������������|�������������|����������������������|�������������dS�)z4Simple shortcut for start_write + write + end_write.N)r����r����r����)r2����sr4���r3���s��� r8����simple_writezCodeGenerator.simple_writep��s?�����������%�%�%�� � �1� � � ����u�����r:���c����������������������� �|�����������������������d�������������|D�]}|����������������������||��������������dS�#�t����������$�r�Y�dS�w�xY�w)z�Visit a list of nodes as block in a frame. If the current frame is no buffer a dummy ``if 0: yield None`` is written automatically. �passN)r����r1���r����)r2���r���r4���r3���s��� r8���� blockvisitzCodeGenerator.blockvisitv��sk������ ��N�N�6�"�"�"��� (�� (��� � �4��'�'�'�'� (�� (���� �� �� ��D�D� ���s����04�� A�Ac����������������������|�j���������r�|�j��������sk|�j�����������������������������d|�j���������z���������������|�xj��������|�j���������z ��c_��������|�j���������-|�j�����������������������������|�j��������|�j��������f�������������d|�_��������d|�_��������|�j�����������������������������d|�j��������z���������������d|�_���������|�j�����������������������������|�������������dS�)z&Write a string into the output stream.� NFz r���) r����r����rA���r����r����r����r�����appendr����)r2����xs��� r8���r����zCodeGenerator.write���s��������?�� ��$�� 2���!�!�$���"8�9�9�9�� � �D�O�3� � ��)�5��O�*�*�D�,B�D�DT�+U�V�V�V�-1�D�*� %�D���K���f�t�'8�8�9�9�9��D�O�����!�����r:���r���c������������������\�����|�����������������������||�������������|����������������������|�������������dS�)z!Combination of newline and write.N)�newliner����)r2���r����r3����extras��� r8���r����zCodeGenerator.writeline���s)���������T�5�!�!�!�� � �1� � � � � r:���c�����������������������t����������|�j��������d|z���������������|�_��������|�*|j��������|�j��������k����r|j��������|�_��������|j��������|�_��������dS�dS�dS�)z/Add one or more newlines before the next write.r ���N)�maxr����r����r����r����)r2���r3���r����s��� r8���r����zCodeGenerator.newline���sR�������d�o�q�5�y�9�9�������t�� >� >�%)�[�D�"�"�k�D�O�O�O���� >� >r:���c�����������������������d}t����������d��|j��������D���������������|pd������������D�]}t����������|������������rd}�n�|j��������D�]-}|����������������������d�������������|����������������������||��������������.|sg|j��������D�]-}|����������������������d�������������|����������������������||��������������.|�0t ����������|������������D�] \��}}|����������������������d|�d|����������������!|j��������r0|����������������������d�������������|����������������������|j��������|�������������|�r |j���������|����������������������d �������������n|����������������������d �������������|j��������D�]O}|����������������������d|j ��������z���������������|����������������������|j ��������|�������������|����������������������d��������������P|�0t ����������|������������D�] \��}}|����������������������|�d|�d���������������!|j���������G|����������������������d �������������|����������������������|j��������|�������������|����������������������d�������������dS�|����������������������d�������������dS�|j���������2|����������������������d�������������|����������������������|j��������|�������������dS�dS�)a+��Writes a function call to the stream for the current node. A leading comma is added automatically. The extra keyword arguments may not include python keywords otherwise a syntax error could occur. The extra keyword arguments should be given as python dict. Fc��������������3����$���K����|�]}|j���������V����d�S�r,���)rY�����.0r����s��� r8���� <genexpr>z*CodeGenerator.signature.<locals>.<genexpr>���s$����������7�7�a�A�E�7�7�7�7�7�7r:���rl���T�, N�=z, *z , **dict({z, **{z%r: �: z}, **r�����}z, **)r���r5����is_python_keyword�argsr����r1���r ����dyn_args� dyn_kwargsrY���rW���) r2���r3���r4����extra_kwargs�kwarg_workaround�kwarg�argrY���rW���s ��� r8���� signaturezCodeGenerator.signature���s�������!���7�7�4�;�7�7�7��9K��L�L�� �� �E� ��'�'�� �#'� ��� ���9�� #�� #�C��J�J�t�����J�J�s�E�"�"�"�"��� 9���� )�� )��� � �4� � � �� � �5�%�(�(�(�(��'�"+�L�"9�"9��9��9�J�C���J�J�J�C�C�C���7�8�8�8�8��=�� -��J�J�u�����J�J�t�}�e�,�,�,��� /���*�� � �<�(�(�(�(�� � �7�#�#�#���� !�� !��� � �6�E�I�-�.�.�.�� � �5�;��.�.�.�� � �4� � � � ��'�"+�L�"9�"9��:��:�J�C���J�J�S�S�S�%�%�%�8�9�9�9�9���*�� � �7�#�#�#�� � �4�?�E�2�2�2�� � �3������� � �3������ �_� (��J�J�v�����J�J�t���.�.�.�.�.��)� (r:���c����������� �������$����t������������������������}|D�]}|���������������������|��������������dD�]d}t����������|�|������������}t����������||������������D�]A}||vr|������������������������������������||<���|����������������������||����������d|�d|�d���������������B�edS�)zPull all the dependencies.)r����r����z = environment.�[�]N)r����r1����getattrr����r����)r2���r���r_���r3���� dependency�mappingrD���s��� r8����pull_dependencieszCodeGenerator.pull_dependencies���s�������)�+�+���� �� �D��M�M�$�����,�� �� �J��d�J�/�/�G����4�4�� �� ���w�&�&�$(�$=�$=�$?�$?�G�D�M����18����� � � �D�D�D�Q�������� � �� r:���c����������� ������������g�}t����������|j��������j��������������������D�]�\��}\��}}|t����������k����r�|t����������k����r1|����������������������|�d|�������������������������������������d|�d���������������P|t����������k����r|����������������������|�d|����������������v|t����������k����r|� ��������������������|���������������t����������d�������������|r-|����������������������dd���������������������|������������z���������������d�S�d�S�)N� = �(r����zunknown load instruction�%s = missing)r ���rr����loadsr���r���r�����get_resolve_funcr���r���r�����NotImplementedError�join)r2���r4����undefs�target�action�params��� r8����enter_framezCodeGenerator.enter_frame���s�������'0���1D�'E�'E�� F�� F�#�F�O�V�U��+�+�+���+�+�+��������8M�8M�8O�8O�8O�8O�QV�QV�QV�W�X�X�X�X��>�)�)����F�F�F�E�E�:�;�;�;�;��-�-�-�� � �f�%�%�%�%�)�*D�E�E�E��� @��N�N�>�E�J�J�v�,>�,>�>�?�?�?�?�?� @�� @r:���c������������������������|seg�}t����������|j��������j��������������������D�]\��}}|���������������������|��������������|r/|����������������������dd���������������������|������������z���������������d�S�d�S�d�S�)Nr���r����)r ���rr���r��r����r����r��)r2���r4����with_python_scoper��r���_s��� r8����leave_framezCodeGenerator.leave_frame���s������� �� D��F�&�u�}�':�;�;�� &�� &� ���� � �f�%�%�%�%��� D����~�� � �6�0B�0B�B�C�C�C�C�C� D�� D� D�� Dr:���c������������������.�����|�j���������j��������rd|z��S�d|z��S�)Nzasync def %szdef %s)rC����is_async)r2���rD���s��� r8����funczCodeGenerator.func���s%��������$�� )�!�D�(�(��$��r:���c����������� �������T����|������������������������������������}|j�����������������������������|�������������t����������|������������}d}t ������������������������}g�}t����������|j��������������������D�]g\��}}|j��������dk����r|}|j��������dv�r|���������������������|j���������������������|� ��������������������|j��������� ��������������������|j����������������������������������ht����������|j��������d������������} d| v�r�|�O �|j ��������|t����������|j��������������������z ������������nX#�t����������$�r�|����������������������d|j���������������������Y�n1w�xY�w|� ��������������������|j�����������������������������d�������������������������d|_��������d| v�r8d|vr4|� ��������������������|j�����������������������������d�������������������������d|_��������d| v�r8d|vr4|� ��������������������|j�����������������������������d�������������������������d|_��������d |_��������|j�����������������������������|�������������|����������������������|����������������������d �������������dd���������������������|�������������d �|�������������|�������������������������������������|����������������������|�������������|����������������������|�������������|����������������������|�������������t����������|j��������������������D��]\��}}|j��������� ��������������������|j��������������������} |����������������������d| z���������������|������������������������������������� �|j ��������|t����������|j��������������������z �����������}|����������������������d| z���������������|����������������������||�������������n;#�t����������$�r.�|����������������������| �dd|j��������z���d|j���������d��������������Y�nw�xY�w|����������������������| �������������|�� ������������������������������������� |��!�����������������������������������|��"��������������������|j��������|�������������|��#��������������������|d��������������|��$��������������������|d��������������|�� �����������������������������������||fS�)z/Dump the function def of a macro or call block.N�caller)r5����varargs)r��r5���r��zhWhen defining macros or call blocks the special "caller" argument must be omitted or be given a default.Tr5���r��F�macror����r�����):�if %s is missing:�%s = � = undefined(zparameter %r was not providedz, name=r����)r�����r��)%r����rr����analyze_noderb���rS���� enumerater����rD���r����r�����refr`����body�defaults�len� IndexErrorr����r�����declare_parameterrd���re���rf���ru���r����r��r��r����rv���r ���push_parameter_definitionsr1����mark_parameter_storedr�����pop_parameter_definitionsr����r����r ��)r2���r3���r4���� macro_ref�explicit_caller�skip_special_paramsr�����idxr����r]���r���defaults��� r8���� macro_bodyzCodeGenerator.macro_body���s7�������� � �� � �"�"�4�(�(�(��T�N�N� ���!�e�e����!�$�)�,�,�� 5�� 5�H�C���x�8�#�#�"%���x�0�0�0�#�'�'���1�1�1��K�K�� �)�)�#�(�3�3�4�4�4�4�$�T�Y�0O�P�P� ��z�!�!���*���M�/�C�� �N�N�"B�C�C�C��!��������I�I�1���� �����������������E�M�;�;�H�E�E�F�F�F�(,�I�%��z�!�!�h�6I�&I�&I��K�K�� �7�7��A�A�B�B�B�(,�I�%�� �"�"�y�8K�'K�'K��K�K�� �7�7� �B�B�C�C�C�)-�I�&��&+��"� � �"�"�4�(�(�(����D�I�I�g�$6�$6�$6�$6�� � �$�����H�$�O�O�O���� � � ����E������������'�'��.�.�.�!�$�)�,�,�� �� �H�C���-�#�#�C�H�-�-�C��N�N�.��4�5�5�5��K�K�M�M�M� +��-��c�$�)�n�n�(<�=������w��}�-�-�-�� � �7�E�*�*�*�*����� �� �� �����s�s�;�c�h�F�F�F�����R���������� ����� �&�&�s�+�+�+��L�L�N�N�N�N��&�&�(�(�(����� �5�)�)�)��#�#�E�4�#�@�@�@�����$��7�7�7��������i��s$����("D��%D3�2D3�>"M�5N�Nc����������� �������0����d����������������������d��|j��������j��������D���������������������������}t����������|j��������dd������������}t ����������|j��������j��������������������dk����r|dz ��}|����������������������d|�d|�d |j���������d|j���������d|j���������d ��������������dS�)z<Dump the macro definition for the def created by macro_body.r����c��������������3����>���K����|�]}t����������|j��������������������V����d�S�r,���)�reprrD���r����s��� r8���r����z*CodeGenerator.macro_def.<locals>.<genexpr>M��s*����������H�H�q�d�1�6�l�l�H�H�H�H�H�Hr:���rD���Nr ����,zMacro(environment, macro, z, (z), z, context.eval_ctx.autoescape)) r��r3���r����r����r��r����re���rf���rd���)r2���r%��r4���� arg_tuplerD���s��� r8���� macro_defzCodeGenerator.macro_defK��s��������I�I�H�H�I�N�4G�H�H�H�H�H� ��y�~�v�t�4�4���y�~�"�#�#�q�(�(����I�� � � ������ � ��)�)�)��*�*�*��)�)�)� � �� �� �� �� r:���c������������������\�����d|j���������z��}|�j���������|dt����������|�j��������������������z���z ��}|S�)z.Return a human readable position for the node.zline %dN� in )r����rD���r-��)r2���r3���r����s��� r8����positionzCodeGenerator.position]��s2������ ��� $���9� ��&�4�� �?�?�*�*�B�� r:���c�����������������������dd����������������������d��t����������|j�������������������������������������������������������D���������������������������z��S�)Nz{%s}r����c��������������3����*���K����|�]\��}}|�d�|��V����dS��r����Nrl���)r����rD���r��s��� r8���r����z3CodeGenerator.dump_local_context.<locals>.<genexpr>e��sE�����������" ��" ���f�����f�f�%�" ��" ��" ��" ��" ��" r:���)r��r ���rr����dump_storesr����s��� r8����dump_local_contextz CodeGenerator.dump_local_contextd��sQ�������� � ��" ��" � )�%�-�*C�*C�*E�*E� F� F�" ��" ��" �� �� �� �� r:���c�����������������������|�����������������������d�������������|�����������������������d�������������|�����������������������d�������������|�����������������������d�������������dS�)z�Writes a common preamble that is used by root and block functions. Primarily this sets up common local helpers and enforces a generator through a dead branch. z$resolve = context.resolve_or_missingz!undefined = environment.undefinedzcond_expr_undefined = Undefinedzif 0: yield NoneN�r����r����s��� r8���� write_commonszCodeGenerator.write_commonsj��sX������ � ���=�>�>�>����:�;�;�;�� ���8�9�9�9����)�*�*�*�*�*r:���c������������������h�����|�j������������������������������|j��������������������������������������������������������dS�)aQ��Pushes all parameter targets from the given frame into a local stack that permits tracking of yet to be assigned parameters. In particular this enables the optimization from `visit_Name` to skip undefined expressions for parameters in macros as macros can reference otherwise unbound parameters. N)r����r����rr����dump_param_targetsr����s��� r8���r"��z(CodeGenerator.push_parameter_definitionsv��s/������� ��$�$�U�]�%E�%E�%G�%G�H�H�H�H�Hr:���c������������������8�����|�j���������������������������������������������dS�)z+Pops the current parameter definitions set.N)r�����popr����s��� r8���r$��z'CodeGenerator.pop_parameter_definitions��s��������!�!�#�#�#�#�#r:���c������������������X�����|�j���������r"|�j���������d������������������������������|�������������dS�dS�)z�Marks a parameter in the current parameter definitions as stored. This will skip the enforced undefined checks. ���N)r����r�����r2���r��s��� r8���r#��z#CodeGenerator.mark_parameter_stored���s;�������� �� 6��!�"�%�-�-�f�5�5�5�5�5� 6�� 6r:���c������������������:�����|�j������������������������������|�������������d�S�r,���)r����r����rB��s��� r8����push_context_referencez$CodeGenerator.push_context_reference���s�������%�,�,�V�4�4�4�4�4r:���c������������������8�����|�j���������������������������������������������d�S�r,���)r����r?��r����s��� r8����pop_context_referencez#CodeGenerator.pop_context_reference���s�������%�)�)�+�+�+�+�+r:���c�����������������������|�j���������d���������S�)NrA���r����r����s��� r8����get_context_refzCodeGenerator.get_context_ref���s�������,�R�0�0r:���c������������������6�����|�j���������d���������}|dk����rdS�d|z��S�)NrA��r�����resolvez %s.resolverH��rB��s��� r8���r��zCodeGenerator.get_resolve_func���s*�������.�r�2���Y����9��f�$�$r:���c������������������\�����|��������������������������������������d|����������������������|�������������d�S�)Nz .derived(r����)rI��r8��r����s��� r8����derive_contextzCodeGenerator.derive_context���s8������� � �"�"�"�"��#�#�E�*�*�*�*� �� r:���c������������������2�����|�j���������sdS�||�j���������d���������v�S�)z4Checks if a given target is an undeclared parameter.FrA��)r����rB��s��� r8����parameter_is_undeclaredz%CodeGenerator.parameter_is_undeclared���s%�������$�� ��5���.�r�2�2�2r:���c������������������R�����|�j������������������������������t�������������������������������������dS�)z+Pushes a new layer for assignment tracking.N)r����r����rS���r����s��� r8����push_assign_trackingz"CodeGenerator.push_assign_tracking���s#��������!�!�#�%�%�(�(�(�(�(r:���c����������� �������.����|�j��������������������������������������������}|j��������r|sdS�d��|D���������������}t����������|������������dk����rRt ����������t����������|������������������������}|j�����������������������������|������������}|����������������������d|�d|���������������n�|����������������������d�������������t����������|������������D�]P\��}}|r|�� ��������������������d�������������|j�����������������������������|������������}|�� ��������������������|�d|����������������Q|�� ��������������������d �������������|rst����������|������������dk����r |����������������������d |d���������z���������������dS�|����������������������dd���������������������t����������t����������|������������������������z���������������dS�dS�) zoPops the topmost level for assignment tracking and updates the context variables if necessary. Nc������������������.�����g�|�]}|d�d����������dk�����|��S�)Nr ���r��rl���r����s��� r8���� <listcomp>z5CodeGenerator.pop_assign_tracking.<locals>.<listcomp>���s%������8�8�8�a�1�R�a�R�5�C�<�<��<�<�<r:���r ���� context.vars[�] = zcontext.vars.update({r����r����z})�context.exported_vars.add(%r)r���z"context.exported_vars.update((%s)))r����r?��rs���r���next�iterrr���r��r����r��r����r��r���r-��)r2���r4����vars�public_namesrD���r��r(��s��� r8����pop_assign_trackingz!CodeGenerator.pop_assign_tracking���s��������!�%�%�'�'���~�� �T�� ��F�8�8�4�8�8�8���t�9�9��>�>���T� � �#�#�D��-�#�#�D�)�)�C��N�N�N�d�d�d�C�C�@�A�A�A�A��N�N�2�3�3�3�&�t�_�_�� 3�� 3� ��T���%��J�J�t�$�$�$��m�'�'��-�-��� � �t�t�t�S�S�1�2�2�2�2��J�J�t������ ��<� � �A�%�%����>��a��P�Q�Q�Q�Q�Q����8��i�i��T�<� 8� 8�9�9�:���������� �� r:���c����������� �����������|� J�d���������������t����������|�j��������|�j��������������������}ddlm}�|����������������������dd���������������������t����������������������z���������������|����������������������dd���������������������|������������z����������������|�j��������j��������r|����������������������d�������������|�j ���������rdpd }|� ��������������������t����������j��������������������d�u}|� ��������������������t����������j��������������������D�]B}|j��������|�j��������v�r#|����������������������d |j��������z��|j���������������������||�j��������|j��������<����C|� ��������������������t����������j��������������������D�]�}|j��������|�j��������vr||j��������} |������������������������������������x|�j��������| <���} d| v�r8| ���������������������dd������������\��}}|����������������������d|�d |�d| ����������������q|����������������������d| �d| �����������������|����������������������d|�j��������z���������������|����������������������|����������������������d�������������d|�d�d��������������|�������������������������������������|�������������������������������������t5����������|������������}dt7����������|j��������d������������v�r2|j�����������������������������d������������} |����������������������d| z���������������|j�����������������������������|�������������dx|_ ��������|_!��������|o|�j"���������|_#��������|r|����������������������d�������������|��$��������������������|�������������|��%��������������������|j���������������������|��&��������������������|j��������|�������������|��'��������������������|d��������������|��(�����������������������������������|r�|�j"��������s)|�������������������������������������|����������������������d�������������|�������������������������������������tR����������r"|�j��������j��������s|����������������������d�������������nc|����������������������d|�j��������j��������rdpd z���������������|�������������������������������������|����������������������d�������������|��(�����������������������������������|��(��������������������d|�j"���������z����������������tU����������|�j��������������������D��]�\��}}|����������������������|����������������������d |z����������������d|�d�|d�������������|�������������������������������������|�������������������������������������t5����������|������������}t7����������|j��������d!������������}d|v�r2|j�����������������������������d������������} |����������������������d| z���������������d"|v�r8|j�����������������������������d"������������} |����������������������| �d#|�d$|�d%��������������|j�����������������������������|�������������||_+��������|��$��������������������|�������������|��%��������������������|j���������������������|��&��������������������|j��������|�������������|��'��������������������|d��������������|��(��������������������������������������|����������������������d&d���������������������d'��|�j��������D���������������������������z��d��������������|����������������������d(d)���������������������d*��|�j,��������D���������������������������z���������������d�S�)+Nzno root frame allowedr ���)�exportedzfrom __future__ import %sr����zfrom jinja2.runtime import zHfrom jinja2.asyncsupport import auto_await, auto_aiter, AsyncLoopContextz, environment=environment��zblock %r defined twice�.zfrom z import z as zimport z name = %r�rootz(context, missing=missingr��)r����r2���r����z%s = TemplateReference(context)Tzparent_template = Noner���if parent_template is not None:z4yield from parent_template.root_render_func(context)z9%sfor event in parent_template.root_render_func(context):zasync zyield event�block_)r2����superrd��z = context.super(z, block_r����z blocks = {%s}c��������������3����$���K����|�]}|�d�|��V����dS�)z: block_Nrl���r����s��� r8���r����z/CodeGenerator.visit_Template.<locals>.<genexpr>;��s-����������'U�'U�A�!�!�!�Q�Q�(?�'U�'U�'U�'U�'U�'Ur:���zdebug_info = %r�&c��������������3���� ���K����|�] }d�|z��V���� dS�)z%s=%sNrl���r����s��� r8���r����z/CodeGenerator.visit_Template.<locals>.<genexpr>A��s&����������(N�(N���1��(N�(N�(N�(N�(N�(Nr:���)-r���rC���rD����runtimer^��r����r��� code_featuresr��rF����findr����Extends�find_all�Blockr����r����r�����ImportedName� importnamer����r�����rsplitr��r����r;��rn���r`���r��rr���r!��r��rs���rt���r����ru���r ��r����r����r ��r�����supports_yield_fromr ���rw���r����)r2���r3���r4���r.���r^���envenv�have_extendsrw����import_�imp�alias�module�objr��rD����block_framer]���s��� r8����visit_TemplatezCodeGenerator.visit_Template���s�������}�}�5�}�}�}��t�/���;�;��%�%�%�%�%�%����2�T�Y�Y�}�5M�5M�M�N�N�N����4�t�y�y��7J�7J�J�K�K�K���$�� ��N�N�/� �� �� ���_�$�D�)D�J�����y�y���/�/�t�;����]�]�5�;�/�/�� ,�� ,�E��z�T�[�(�(�� � �2�U�Z�?���N�N�N�&+�D�K�� �#�#���}�}�U�%7�8�8�� E�� E�G��!��)<�<�<��(��37�3L�3L�3N�3N�N��#�C�(�5��#�:�:�"%�*�*�S�!�"4�"4�K�F�C��N�N�N�������U�U�#S�T�T�T�T��N�N�N����U�U�#C�D�D�D��� ���{�T�Y�.�/�/�/�� ���15���6�1B�1B�1B�1B�F�F�F�K�ST�� �� �� �� �� ��� � � ���������h�����_�T�Y� �:�:�:�:��-�1�1�&�9�9�C��N�N�<�s�B�C�C�C� � �"�"�4�(�(�(�+/�/�����%1�%P�$�:P�6P��"��� 5��N�N�3�4�4�4�����������t�y�)�)�)����� �5�)�)�)�����$��7�7�7���������� ;��)�� B���� � � ����@�A�A�A��K�K�M�M�M�"�� �4�+;�+D�� ����U�V�V�V�V����1��'�0�=�X�C��E������ ���� � � ����}�-�-�-��������L�L��$�"8�8�9�:�:�:��%�T�[�1�1�� �� �K�D�%��N�N��9�9�X��_�-�-�-�-�v�v�v�7��� �� �� �� �K�K�M�M�M���� � � �� ��/�/�K�(���5F�G�G�J���#�#�!�)�;�;�F�C�C�����@�3�F�G�G�G��*�$�$�!�)�;�;�G�D�D�����S�S�S�$�$�$�PT�PT�PT�U�V�V�V���,�,�U�3�3�3� $�K�����[�)�)�)��"�"�5�:�.�.�.��O�O�E�J��4�4�4����[�D��A�A�A��L�L�N�N�N�N�����d�i�i�'U�'U���'U�'U�'U�U�U�U��� �� �� �� �� �������(N�(N�d�o�(N�(N�(N� N� N�N� �� �� �� �� r:���c����������������������d}|j���������rB|�j��������rdS�|�j��������dk����r.|����������������������d�������������|�������������������������������������|dz ��}|j��������r|����������������������|������������}n|������������������������������������}t����������r6|�j ��������j ��������s*|j���������#|����������������������d|j���������d|�d�|�������������nr|�j ��������j ��������rdpd }|����������������������|�d |j���������d|�d�|�������������|�������������������������������������|�� ��������������������d|�������������|�������������������������������������|����������������������|�������������dS�) z.Call a block and register it for the template.r���N�if parent_template is None:r ���zyield from context.blocks[z][0](r����� async for�forz event in context.blocks[r���event)rs���r����r����r����r�����scopedrM��rI��rq��rC���r��rv���rD���r����r����)r2���r3���r4���rq���r�����loops��� r8���r����zCodeGenerator.visit_BlockD��so��������>�� ���%�� ����"�Q�&�&����<�=�=�=���� � � ��� ���;�� -��)�)�%�0�0�G�G��*�*�,�,�G�� � ��$�-� ����$��N�N�N�:>�)�)�)�W�W�W�M�t� �� �� �� ���#�,�<��E��D��N�N�<@�D�D�$�)�)�)�W�W�W�U�� �� �� �� �K�K�M�M�M����g�u�-�-�-��L�L�N�N�N����U�����r:���c�����������������������|j���������s|����������������������d|j���������������������|�j��������dk����rq|�j��������s)|����������������������d�������������|�������������������������������������|����������������������ddz���������������|�j��������rt�������������������������|�������������������������������������|����������������������d|�������������|�� ��������������������|j ��������|�������������|����������������������d|�j��������z���������������|����������������������dt����������z���������������|�������������������������������������|����������������������d �������������|�������������������������������������|j��������rd |�_��������|�xj��������dz ��c_��������dS�) zCalls the extender.z,cannot use extend from a non top-level scoper���rb���raise TemplateRuntimeError(%r)zextended multiple timesz+parent_template = environment.get_template(�, %r)z6for name, parent_block in parent_template.blocks.%s():z8context.blocks.setdefault(name, []).append(parent_block)Tr ���N)rs���r����r����r����r����r����r����r����r����r1����templater����rD����dict_item_iterrt����r2���r3���r4���s��� r8���� visit_ExtendszCodeGenerator.visit_Extendsj��s_������~�� S��I�I�D�d�k�R�R�R� ����"�"���)�� ����@�A�A�A���� � � ��N�N�;�>W�W�X�X�X���%�� �"�n�n�$����������D�d�K�K�K�� � �4�=�%�(�(�(�� � �7�T�Y�&�'�'�'����D�~�U� �� �� �� ��� � � ����Q�R�R�R������� ��?�� *�%)�D�"�� ���q� ����r:���c������������������\����|j���������r)|����������������������d�������������|�������������������������������������d}t����������|j��������t ����������j��������������������rKt����������|j��������j��������t����������������������rd}nVt����������|j��������j��������t����������t����������f������������rd}n-t����������|j��������t ����������j��������t ����������j��������f������������rd}|����������������������d|z��|�������������|�� ��������������������|j��������|�������������|����������������������d|�j��������z���������������|j���������r�|�������������������������������������|����������������������d�������������|�������������������������������������|����������������������d�������������|�������������������������������������|����������������������d �������������|�������������������������������������d }|j��������r?|�j��������j��������rdpd}|����������������������|�d |����������������������|�������������d��������������nV|�j��������j��������r|����������������������d�������������n4t*����������r|����������������������d�������������d}n|����������������������d�������������|s>|�������������������������������������|����������������������d|�������������|�������������������������������������|j���������r|�������������������������������������dS�dS�)zHandles includes.ztry:�get_or_select_template�get_template�select_templateztemplate = environment.%s(r���zexcept TemplateNotFound:r����r����Fr}��r~��zR event in template.root_render_func(template.new_context(context.get_all(), True, z)):zGfor event in (await template._get_default_module_async())._body_stream:z6yield from template._get_default_module()._body_streamTz9for event in template._get_default_module()._body_stream:r��N)�ignore_missingr����r����r=���r���r����ConstrW���r���rQ���rR����Tuple�Listr1���r����rD���r�����with_contextrC���r��r8��rq��r����)r2���r3���r4���� func_name�skip_event_yieldr���s��� r8���� visit_IncludezCodeGenerator.visit_Include���s��������� ��N�N�6�"�"�"��K�K�M�M�M�,� ��d�m�U�[�1�1�� *��$�-�-�|�<�<�� .�*� � ��D�M�/�%���?�?�� .�-� �� �� ���U�Z�'@� A� A�� *�)�I����3�i�?��F�F�F�� � �4�=�%�(�(�(�� � �7�T�Y�&�'�'�'���� ��L�L�N�N�N��N�N�5�6�6�6��K�K�M�M�M��N�N�6�"�"�"��L�L�N�N�N��N�N�7�#�#�#��K�K�M�M�M� ����� ��#�,�<��E��D��N�N�� �4�4��!8�!8��!?�!?�!?�!?�A� �� �� �� � �� � &�� ��N�N�!� �� �� �� ��#�� ����W�X�X�X�#'� � ����O������� �� ��K�K�M�M�M����g�u�-�-�-��L�L�N�N�N���� ��L�L�N�N�N�N�N� �� r:���c����������������������|�����������������������d|j�����������������������������|j��������������������z��|�������������|j��������r|����������������������d|j��������z���������������|�j��������j��������r|����������������������d�������������|����������������������d�������������|����������������������|j ��������|�������������|����������������������d|�j ��������z���������������|j��������r>|����������������������d|�j��������j��������rdpd�d |����������������������|�������������d ��������������n7|�j��������j��������r|����������������������d�������������n|����������������������d�������������|j��������r9|j��������� ��������������������d ������������s!|�����������������������d|j��������z���������������dS�dS�dS�)zVisit regular imports.r���context.vars[%r] = �await zenvironment.get_template(�, %r).�make_module�_asyncr_���(context.get_all(), True, r�����_get_default_module_async()�_get_default_module()r���!context.exported_vars.discard(%r)N)r����rr���r��r��rs���r����rC���r��r1���r���rD���r���r8��� startswithr���s��� r8����visit_ImportzCodeGenerator.visit_Import���s���������w���!2�!2�4�;�!?�!?�?��F�F�F��>�� <��J�J�,�t�{�:�;�;�;���$�� !��J�J�x� � � �� � �.�/�/�/�� � �4�=�%�(�(�(�� � �8�d�i�'�(�(�(���� 0��J�J�J���$�-�:�(�@�b�@�@��+�+�E�2�2�2�2�� �� �� �� ��� � &�� 0��J�J�4�5�5�5�5��J�J�.�/�/�/��>�� N�$�+�"8�"8��"=�"=�� N��N�N�>���L�M�M�M�M�M� N�� N�� N�� Nr:���c�����������������������|�����������������������|�������������|����������������������d|�j��������j��������rdpdz���������������|����������������������|j����������������������|����������������������d|�j��������z���������������|j��������r>|����������������������d|�j��������j��������rdpd�d|������������������������������������d��������������n7|�j��������j��������r|����������������������d �������������n|����������������������d �������������g�}g�}|j ��������D��]M}t����������|t����������������������r|\��}}n|}|�����������������������j �����������������������������|�������������d|�d��������������|����������������������d �j �����������������������������|������������z���������������|�������������������������������������|�����������������������j �����������������������������|�������������dd|����������������������|�������������dt#����������|���������������d|�d��������������|��������������������������������������j��������r?|���������������������|�������������|���������������������d������������s|���������������������|���������������O|r�t-����������|������������dk����r<|d���������}|����������������������d|�d�j �����������������������������|���������������������������n7|����������������������dd����������������������fd�|D���������������������������z���������������|rst-����������|������������dk����r |����������������������d|d���������z���������������dS�|����������������������dd���������������������t1����������t"����������|������������������������z���������������dS�dS�)zVisit named imports.z/included_template = %senvironment.get_template(r���r_��r���r���r���r���r����r���r���z = getattr(included_template, z , missing)r��r��zthe template %r (imported on z%) does not export the requested name z$ % included_template.__name__, name=r��r ���r���rU��rV��zcontext.vars.update({%s})r����c��������������3����V����K����|�]#}|�d��j������������������������������|��������������V����$dS�r6��)rr���r��)r����rD���r4���s��� �r8���r����z1CodeGenerator.visit_FromImport.<locals>.<genexpr>(��sP������������ �� �GK�D�D�D�%�-�*;�*;�D�*A�*A�*A�B� �� �� �� �� �� r:���r���z-context.exported_vars.difference_update((%s))N)r����r����rC���r��r1���r���rD���r���r8��r^���r=���rQ���r����rr���r��r����r3��r-��r����rs���r����r���r��r��r���)r2���r3���r4���� var_names�discarded_namesrD���rv��s��� ` r8����visit_FromImportzCodeGenerator.visit_FromImport���s����������T����� � �=���(�5�X�;�� =� �� �� �� � � �4�=�%�(�(�(�� � �8�d�i�'�(�(�(���� 0��J�J�J���$�-�:�(�@�b�@�@��+�+�E�2�2�2�2�� �� �� �� ��� � &�� 0��J�J�4�5�5�5�5��J�J�.�/�/�/�� ����J�� 2�� 2�D��$��&�&�� �"���e�e����N�N�"'�-�"3�"3�E�":�":�":�":�D�D�D�B� �� �� �� �N�N�.���1B�1B�5�1I�1I�I�J�J�J��K�K�M�M�M��N�N� ��M�%�%�e�,�,�,�,�,���}�}�T�*�*�*�*�D��J�J�J�8��8��8���D�D� � �� �� �� �L�L�N�N�N��~�� 2�� � ��'�'�'��'�'��,�,��2�#�*�*�5�1�1�1���� ��9�~�~��"�"� ��|������/3�t�t�U�]�5F�5F�t�5L�5L�5L�M������������/��i�i�� �� �� �� �OX� �� �� �������������� ��?�#�#�q�(�(����B�_�UV�EW�W�X�X�X�X�X����#�%)�Y�Y�t�D�/�/J�/J�%K�%K�L���������� �� r:���c�����������������������|������������������������������������}|������������������������������������}|������������������������������������}|j��������p%dt����������|���������������������d�������������d������������v�}d�}|r|j�����������������������������d������������}|j�����������������������������|d��������������|j��������r|j�����������������������������|d��������������|j���������r�|�� ����������������������������������}|j�����������������������������|d��������������|�� ��������������������d |����������������������|������������z��|j���������������������|�������������������������������������|�� ��������������������|�������������|�� ��������������������|�j��������j��������rd pd�������������|����������������������|j��������|�������������|����������������������d�������������|����������������������|�j��������j��������rd pd�������������|����������������������d�������������|�������������������������������������|�� ��������������������d|j���������������������|����������������������|j��������|�������������|����������������������d�������������|�������������������������������������|�� ��������������������d�������������|����������������������|j��������|�������������|����������������������d�������������|����������������������|d��������������|j��������ra|�� ��������������������d|����������������������d������������z��|�������������|�������������������������������������|����������������������|�������������|j��������|_��������|r|�� ��������������������d|z���������������|���������������������t.����������j��������������������D�]3} | j��������dk����r&| j��������dk����r|����������������������d| j����������������������4|j��������r,|�� ����������������������������������} |�� ��������������������d| z���������������|�� ��������������������|�j��������j��������rd pd|�������������|����������������������|j��������|�������������|r>|�j��������j��������r|����������������������d|z���������������n.|����������������������d|z���������������n|����������������������d�������������|j��������r|����������������������d|z���������������|j��������r|����������������������d�������������na|�j��������j��������r|s|����������������������d�������������|����������������������|j��������|�������������|�j��������j��������r|s|����������������������d�������������|j��������r|����������������������d�������������|j��������r|����������������������d �������������n|����������������������|rd!pd�������������|�������������������������������������|�� ��������������������|�������������|����������������������|j��������|�������������|j��������r|�� ��������������������d"| z���������������|�������������������������������������|����������������������||j��������o|j�����������������������|j��������r�|�� ��������������������d#| z���������������|�������������������������������������|�� ��������������������|�������������|����������������������|j��������|�������������|����������������������|�������������|�������������������������������������|j��������r�|�� ��������������������|�������������|�������������������������������������|��!��������������������||�������������|�j��������j��������r|����������������������d$�������������|����������������������d%�������������|�j��������j��������r|����������������������d�������������|����������������������|j��������|�������������|�j��������j��������r|����������������������d�������������|����������������������d&�������������|��"��������������������|�������������d�S�d�S�)'Nr���)r��)�only)r���r��)� for_branch�else�testz %s(fiter):z async for zfor r2��zauto_aiter(fiter)�fiter�:�if r��������Tr��z'%s(reciter, loop_render_func, depth=0):r����storez8Can't assign to special loop variable in for-loop targetz%s = 1z, %s in AsyncLoopContext(z, %s in LoopContext(z%s(�reciterzauto_aiter(r����z&, undefined, loop_render_func, depth):z , undefined):z%s = 0zif %s:r���zloop(z, loop))#r����� recursiver`����iter_child_nodesrr���r!��r���else_r���r����r����r��r����r ��rC���r��r1���r��r����r����r ��rv���rl��r����Namer����rD���r����r����rY��r����r��r����r����r����)r2���r3���r4���� loop_frame� test_frame� else_frame� extended_loop�loop_ref�loop_filter_funcrD����iteration_indicators��� r8���� visit_ForzCodeGenerator.visit_For5��s������[�[�]�]� ��[�[�]�]� ��[�[�]�]� � ���� �&�O��!�!�y�!�1�1�9�5 ��5 ��+ � ������ D�!�)�;�;�F�C�C�H���'�'���'�@�@�@��:�� E���+�+�D�V�+�D�D�D��9�� A�#�8�8�:�:����+�+�D�V�+�D�D�D��N�N�<�$�)�)�4D�*E�*E�E�t�y�Q�Q�Q��K�K�M�M�M����Z�(�(�(��N�N�4�+�4�E��O��P�P�P��J�J�t�{�J�/�/�/��J�J�v�����J�J�t�'�0�H�5H�S�G�T�T�T��J�J�s�O�O�O��K�K�M�M�M��N�N�5�$�)�,�,�,��J�J�t�y�*�-�-�-��J�J�s�O�O�O��K�K�M�M�M��N�N�8�$�$�$��J�J�t�{�J�/�/�/��L�L��O�O�O����Z�4��@�@�@� ��>�� 2��N�N�9�D�I�I�f�<M�<M�M�t� �� �� �� �K�K�M�M�M��K�K� �#�#�#��!+� 1�J����� 6��N�N�>�H�4�5�5�5��M�M�%�*�-�-�� �� �D��x�7�"�"�t�y�F�':�':�� � �N��K������� ��:�� ;�"&�";�";�"=�"=���N�N�8�&9�9�:�:�:����t�'�0�A�\�K�V�T�R�R�R�� � �4�;� �+�+�+��� ���(�� >�� � �6��A�B�B�B�B�� � �1�H�<�=�=�=�=��J�J�v�����9�� 1��J�J�u�/�/�0�0�0��>�� ��J�J�y�!�!�!�!���(�� *��� *�� � �=�)�)�)��J�J�t�y�%�(�(�(���(�� ��� �� � �3�����9�� ��J�J�s�O�O�O��>�� A��J�J�?�@�@�@�@��J�J�}�8��?�C�@�@�@���� � � �����$�$�$����� �:�.�.�.��:�� ;��N�N�8�&9�9�:�:�:�����������$�.�*K���^�� �� �� �� ���:�� ��N�N�8�&9�9�:�:�:��K�K�M�M�M����Z�(�(�(��O�O�D�J� �3�3�3����Z�(�(�(��L�L�N�N�N���>�� "��'�'� �3�3�3��L�L�N�N�N����U�D�)�)�)���(�� %�� � �8�$�$�$��J�J�w������(�� *�� � �=�)�)�)��J�J�t�y�%�(�(�(���(�� �� � �3�����J�J�y�!�!�!��N�N�5�!�!�!�!�!� "�� "r:���c������������������(����|������������������������������������}|����������������������d|�������������|����������������������|j��������|�������������|����������������������d�������������|�������������������������������������|����������������������|j��������|�������������|�������������������������������������|j ��������D�]�}|����������������������d|�������������|����������������������|j��������|�������������|����������������������d�������������|�������������������������������������|����������������������|j��������|�������������|���������������������������������������|j ��������rZ|����������������������d�������������|�������������������������������������|����������������������|j ��������|�������������|�������������������������������������d�S�d�S�)Nr���r���zelif r����)r����r����r1���r���r����r����r����r��r�����elif_r���)r2���r3���r4����if_framer���s��� r8����visit_IfzCodeGenerator.visit_If���sN������:�:�<�<�����u�d�#�#�#�� � �4�9�h�'�'�'�� � �3������� � � ����� �8�,�,�,��������Z�� �� �E��N�N�7�E�*�*�*��J�J�u�z�8�,�,�,��J�J�s�O�O�O��K�K�M�M�M��O�O�E�J��1�1�1��L�L�N�N�N�N��:�� ��N�N�7�#�#�#��K�K�M�M�M��O�O�D�J��1�1�1��L�L�N�N�N�N�N� �� r:���c����������������������|�����������������������||������������\��}}|�������������������������������������|j��������rT|j�����������������������������d������������s|����������������������d|j��������z���������������|����������������������d|j��������z���������������|����������������������d|j�����������������������������|j��������������������z���������������|�� ��������������������||�������������d�S�)Nr��rW��r���r��) r*��r����rs���rD���r���r����r����rr���r��r0��)r2���r3���r4����macro_framer%��s��� r8����visit_MacrozCodeGenerator.visit_Macro���s�������!%����u�!=�!=���Y��������>�� >��9�'�'��,�,�� H�� � �:�T�Y�F�G�G�G��N�N�0�4�9�<�=�=�=�� � �7�U�]�.�.�t�y�9�9�9�:�:�:����y�+�.�.�.�.�.r:���c����������������������|�����������������������||������������\��}}|����������������������d�������������|����������������������||�������������|����������������������||�������������|����������������������|j��������|d��������������|����������������������|�������������d�S�)Nz caller = T)�forward_caller)r*��r����r0��r����� visit_Call�callr����)r2���r3���r4���� call_framer%��s��� r8����visit_CallBlockzCodeGenerator.visit_CallBlock���s������� $����e� <� <�� �I����{�#�#�#����y�*�-�-�-������%�%�%����� �5���>�>�>����u�����r:���c����������������������|������������������������������������}|j�����������������������������|�������������|����������������������|�������������|����������������������|�������������|����������������������|j��������|�������������|����������������������||�������������|����������������������|j ��������|�������������|�� ��������������������|�������������|����������������������|�������������d�S�r,���)r����rr���r��r ��rv���r����r��r����r�����filterr����r ��)r2���r3���r4����filter_frames��� r8����visit_FilterBlockzCodeGenerator.visit_FilterBlock���s��������{�{�}�}����)�)�$�/�/�/�����&�&�&����L�!�!�!����� �<�0�0�0������%�%�%����$�+�|�4�4�4����u��������&�&�&�&�&r:���c�����������������������|������������������������������������}|j�����������������������������|�������������|����������������������|�������������t ����������|j��������|j��������������������D�]Z\��}}|�������������������������������������|����������������������||�������������|�� ��������������������d�������������|����������������������||��������������[|�� ��������������������|j��������|�������������|����������������������|�������������d�S��Nr����) r����rr���r��r ��r����targets�valuesr����r1���r����r����r��r ��)r2���r3���r4���� with_framer���exprs��� r8���� visit_WithzCodeGenerator.visit_With���s��������[�[�]�]� ���'�'��-�-�-�����$�$�$� ���t�{�;�;�� $�� $�L�F�D��L�L�N�N�N��J�J�v�z�*�*�*��J�J�u�����J�J�t�U�#�#�#�#����� �:�.�.�.�����$�$�$�$�$r:���c������������������f�����|�����������������������|�������������|����������������������|j��������|�������������d�S�r,���)r����r1���r3���r���s��� r8����visit_ExprStmtzCodeGenerator.visit_ExprStmt���s0���������T����� � �4�9�e�$�$�$�$�$r:���� _FinalizeInfo)�const�srcc������������������h����������j������������j���������S���j��������x}�d}��j��������j��������rid}��j��������j�����������fd�}t �����������dd������������du�r|dz ��}d}n:t �����������dd������������du�r|d z ��}d}nt �����������d d������������du�r|dz ��}����fd�}�����������������������||��������������_�����������j���������S�) a���Build the finalize function to be used on constants and at runtime. Cached so it's only created once for all output nodes. Returns a ``namedtuple`` with the following attributes: ``const`` A function to finalize constant data at compile time. ``src`` Source code to output around nodes to be evaluated at runtime. Nzenvironment.finalize(c������������������,����������|�������������������������S�r,���rl���)rW���r)���env_finalizes��� ��r8����finalizez.CodeGenerator._make_finalize.<locals>.finalize��s��������w�|�|�E�2�2�3�3�3r:����contextfunctionFT� context, �evalcontextfunction�context.eval_ctx, �environmentfunction� environment, c������������������8�����������j���������|�������������������������S�r,���)rC���)rW���r)��r���r2���s��� ���r8���r���z.CodeGenerator._make_finalize.<locals>.finalize'��s"�������"�7�<�<��0@�%�#H�#H�I�I�Ir:���)� _finalize�_default_finalizerC���r���r����r���)r2���r���r���r)��r���s���` @@r8����_make_finalizezCodeGenerator._make_finalize��s(����������>�%��>�!�!�3�3��7�����$�� J�)�C��+�4�L� 4�� 4�� 4�� 4�� 4�� 4���|�%6��>�>�$�F�F��{�"�������'<�e�D�D��L�L��+�+�������'<�e�D�D��L�L���&��J��J��J��J��J��J��J���+�+�H�c�:�:����~�r:���c������������������:�����t����������t����������|������������������������S�)z�Given a group of constant values converted from ``Output`` child nodes, produce a string to write to the template module source. )r-��r���)r2����groups��� r8����_output_const_reprz CodeGenerator._output_const_repr-��s������ ��F�5�M�M�"�"�"r:���c������������������������|����������������������|j��������������������}|j��������j��������rt����������|������������}t ����������|t ����������j��������������������rt����������|������������S�|���������������������|������������S�)aC��Try to optimize a child of an ``Output`` node by trying to convert it to constant, finalized data at compile time. If :exc:`Impossible` is raised, the node is not constant and will be evaluated at runtime. Any other exception will also be evaluated at runtime for easier debugging. ) �as_constr.���r����r���r=���r����TemplateDatar���r���)r2���r3���r4���r���r���s��� r8����_output_child_to_constz$CodeGenerator._output_child_to_const4��sf�������� � �e�n�-�-���>�$�� "��5�M�M�E���d�E�.�/�/�� $��U�#�#�#��~�~�e�$�$�$r:���c�����������������������|j���������j��������r|����������������������d�������������n7|j���������j��������r|����������������������d�������������n|����������������������d�������������|j���������|����������������������|j���������������������dS�dS�)zXOutput extra source code before visiting a child of an ``Output`` node. z7(escape if context.eval_ctx.autoescape else to_string)(zescape(z to_string(N)r.���r/���r����r����r����r2���r3���r4���r���s��� r8����_output_child_prezCodeGenerator._output_child_preG��s���������>�"�� %��J�J�P�Q�Q�Q�Q� �^� &�� %��J�J�y�!�!�!�!��J�J�|�$�$�$��<�#��J�J�x�|�$�$�$�$�$��$�#r:���c������������������l�����|�����������������������d�������������|j���������|�����������������������d�������������dS�dS�)zWOutput extra source code after visiting a child of an ``Output`` node. r����N)r����r���r���s��� r8����_output_child_postz CodeGenerator._output_child_postU��s6������� � � �3�����<�#��J�J�s�O�O�O�O�O��$�#r:���c�����������������������|j���������r2|�j��������rd�S�|����������������������d�������������|�������������������������������������|������������������������������������}g�}|j��������D�]�} �|j��������s-t����������|t ����������j��������������������st����������j �����������������������|�� ��������������������|||������������}n1#�t ����������j ��������t����������f$�r�|���������������������|�������������Y��|w�xY�w|r7t����������|d���������t����������������������r|d������������������������������|���������������|���������������������|g���������������|j���������bt����������|������������dk����r|����������������������d|j��������z���������������n|����������������������d|j��������z���������������|�������������������������������������|D�]�}t����������|t����������������������rN|����������������������|������������}|j���������|����������������������d|z�����������������L|����������������������|dz�����������������e|j���������|����������������������d|�������������n|����������������������|�������������|����������������������|||�������������|����������������������||�������������|����������������������|||�������������|j���������|����������������������d���������������|j���������>|�������������������������������������|����������������������t����������|������������dk����rdnd �������������|j���������r|�������������������������������������d�S�d�S�) Nr|��rA��r ���r����z%s.extend((r����r.��r�����)))ru���r����r����r����r���r���r���r=���r���� Impossibler���� Exceptionr����rR���rv���r��r���r����r���r1���r���r����r����) r2���r3���r4���r���r���childr���rX����vals ��� r8����visit_OutputzCodeGenerator.visit_Output^��s�������%�� ��%�� ����N�N�8�9�9�9��K�K�M�M�M��&�&�(�(���� ��Z�� %�� %�E� ���N�-��"�%��);�<�<� -�� �*�,�,�,��3�3�E�5�(�K�K�����$�i�0�� �� �� �����E�"�"�"��� ������� %� �4��8�T�2�2�� %��R�����&�&�&�&����U�G�$�$�$�$��<�#��4�y�y�A�~�~����|�e�l�:�;�;�;�;����}�u�|�;�<�<�<��K�K�M�M�M��� $�� $�D��$��%�%�� $��-�-�d�3�3���<�'��N�N�8�c�>�2�2�2�2��N�N�3��9�-�-�-�-��<�'��N�N�8�T�2�2�2�2��L�L��&�&�&���&�&�t�U�H�=�=�=�� � �4��'�'�'��'�'��e�X�>�>�>��<�+��J�J�s�O�O�O���<�#��L�L�N�N�N��N�N�#�d�)�)�q�.�.�3�3�d�;�;�;��%�� ��L�L�N�N�N�N�N� �� s����AB&�&+C�Cc����������������������|��������������������������������������|����������������������|�������������|����������������������|j��������|�������������|����������������������d�������������|����������������������|j��������|�������������|����������������������|�������������d�S�r���)rQ��r����r1���r��r����r3���r\��r���s��� r8����visit_AssignzCodeGenerator.visit_Assign���s~�������!�!�#�#�#����T����� � �4�;��&�&�&�� � �5����� � �4�9�e�$�$�$�� � ��'�'�'�'�'r:���c����������������������|��������������������������������������|�����������������������������������}d|_��������|j�����������������������������|�������������|����������������������|�������������|����������������������|�������������|����������������������|j��������|�������������|�� ��������������������|�������������|�� ��������������������|j��������|�������������|����������������������d�������������|j ���������|����������������������|j ��������|�������������n|����������������������d|j��������z���������������|����������������������d�������������|����������������������|�������������|����������������������|�������������d�S�)NFz9 = (Markup if context.eval_ctx.autoescape else identity)(� concat(%s)r����)rQ��r����ru���rr���r��r ��rv���r����r��r����r1���r��r����r���r����r\��r ��)r2���r3���r4���ry��s��� r8����visit_AssignBlockzCodeGenerator.visit_AssignBlock���s3������!�!�#�#�#��k�k�m�m���,1��(���(�(��.�.�.�����%�%�%����K� � � ����� �;�/�/�/����T����� � �4�;��&�&�&�� � �N�O�O�O��;�"����d�k�;�7�7�7�7��J�J�|�k�&8�8�9�9�9�� � �3����� � ��'�'�'�����%�%�%�%�%r:���c����������� ������������|j���������dk����r3|j��������r,|�j��������r%|�j��������d������������������������������|j���������������������|j�����������������������������|j��������������������}|j���������dk����rh|j�����������������������������|������������}|�&|d���������t����������k����r|�� ��������������������|������������r&|�� ��������������������d|j���������d|�d|�d��������������d�S�|�� ��������������������|�������������d�S�) Nr���rA��r����r���z(undefined(name=z) if z is missing else r����)r����rs���r����r����rD���rr���r��� find_loadr���rO��r����)r2���r3���r4���r��r����s��� r8���r����zCodeGenerator.visit_Name���s��������8�w���5�>���!�� 6��"�2�&�*�*�4�9�5�5�5��m���� �*�*�� ��8�v����=�*�*�3�/�/�D�� ���G�1�1�1��4�4�S�9�9��2��� � � ��y�y�y�#�#�#�s�s�s�,���������� � �3�����r:���c������������������4����|j������������������������������|j��������������������}|����������������������d|z���������������|�������������������������������������|����������������������ddz���������������|�������������������������������������|����������������������|�d|j���������d��������������d�S�)Nz!if not isinstance(%s, Namespace):r���z/cannot assign attribute on non-namespace objectr����r����)rr���r��rD���r����r����r�����attr)r2���r3���r4���r��s��� r8����visit_NSRefzCodeGenerator.visit_NSRef���s���������m���� �*�*�����:�S�@�A�A�A���� � � ����,�?� @� �� �� �� ���������3�3�3�� � � �2�3�3�3�3�3r:���c������������������������|����������������������|j��������������������}t����������|t����������������������r$|����������������������t����������|�������������������������d�S�|����������������������t ����������|�������������������������d�S�r,���)r���r.���r=���rO���r�����strr-��)r2���r3���r4���r���s��� r8����visit_ConstzCodeGenerator.visit_Const���sc�������m�m�E�N�+�+���c�5�!�!�� "��J�J�s�3�x�x� � � � � ��J�J�t�C�y�y�!�!�!�!�!r:���c������������������������ �|�����������������������t����������|���������������������|j���������������������������������������������d�S�#�t����������j��������$�r!�|�����������������������d|j��������z���������������Y�d�S�w�xY�w)Nz9(Markup if context.eval_ctx.autoescape else identity)(%r))r����r-��r���r.���r���r����datar���s��� r8����visit_TemplateDataz CodeGenerator.visit_TemplateData���s������� ��J�J�t�D�M�M�%�.�9�9�:�:�;�;�;�;�;����� �� �� ��J�J�K�d�i�W� �� �� �� �� �� � ���s����:>��,A.�-A.c�����������������������|�����������������������d�������������d}t����������|j��������������������D�]2\��}}|r|�����������������������d�������������|����������������������||��������������3|�����������������������|dk����rdpd�������������d�S�)Nr����rA��r����r���z,)r�����r����r��r'���r1����r2���r3���r4���r(��rX���s��� r8����visit_TuplezCodeGenerator.visit_Tuple��s�������� � �3������"�4�:�.�.�� $�� $�I�C���� !�� � �4� � � ��J�J�t�U�#�#�#�#�� � �3�!�8�$��+��,�,�,�,�,r:���c������������������������|�����������������������d�������������t����������|j��������������������D�]2\��}}|r|�����������������������d�������������|����������������������||��������������3|�����������������������d�������������d�S�)Nr����r����r����r��r ��s��� r8���� visit_ListzCodeGenerator.visit_List��sr������� � �3����"�4�:�.�.�� $�� $�I�C���� !�� � �4� � � ��J�J�t�U�#�#�#�#�� � �3�����r:���c������������������R����|�����������������������d�������������t����������|j��������������������D�]g\��}}|r|�����������������������d�������������|����������������������|j��������|�������������|�����������������������d�������������|����������������������|j��������|��������������h|�����������������������d�������������d�S�)N�{r����r����r����)r����r��r'���r1���rY���rW���r ��s��� r8���� visit_DictzCodeGenerator.visit_Dict��s�������� � �3����"�4�:�.�.�� *�� *�I�C���� !�� � �4� � � ��J�J�t�x��'�'�'��J�J�t�����J�J�t�z�5�)�)�)�)�� � �3�����r:���c������������������,�������t�������������fd���������������}|S�)Nc������������������������|�j���������j��������rr�|�j���������j��������v�rd|����������������������d�z���������������|����������������������|j��������|�������������|����������������������d�������������|����������������������|j��������|�������������nc|����������������������d�������������|����������������������|j��������|�������������|����������������������d�z���������������|����������������������|j��������|�������������|����������������������d�������������d�S�)Nz$environment.call_binop(context, %r, r����r����� %s r����)rC���� sandboxed�intercepted_binopsr����r1����left�right�r2���r3���r4����operators��� �r8���r_���z$CodeGenerator.binop.<locals>.visitor��s���������� �*� .��� 0� C�C�C�� � �A�H�L�M�M�M�� � �4�9�e�,�,�,�� � �4� � � �� � �4�:�u�-�-�-�-�� � �3����� � �4�9�e�,�,�,�� � �6�H�,�-�-�-�� � �4�:�u�-�-�-��J�J�s�O�O�O�O�Or:����r;����r��� interceptabler_���s���` r8����binopzCodeGenerator.binop��s-������� � �� �� �� �� �� � ��r:���c������������������,�������t�������������fd���������������}|S�)Nc������������������4�����|�j���������j��������rB�|�j���������j��������v�r4|����������������������d�z���������������|����������������������|j��������|�������������n3|����������������������d�z����������������|����������������������|j��������|�������������|����������������������d�������������d�S�)Nz#environment.call_unop(context, %r, r����r����)rC���r���intercepted_unopsr����r1���r3���r��s��� �r8���r_���z#CodeGenerator.uaop.<locals>.visitor2��s���������� �*� -��� 0� B�B�B�� � �@�8�K�L�L�L�� � �4�9�e�,�,�,�,�� � �3��>�*�*�*�� � �4�9�e�,�,�,��J�J�s�O�O�O�O�Or:���r��r��s���` r8����uaopzCodeGenerator.uaop1��s-������� � �� �� �� �� �� ���r:����+�-�*�/z//z**�%�and)r���orznot c������������������ ����|j���������j��������rd}n|j���������j��������rd}nd}|����������������������d|z���������������|j��������D�]-}|����������������������||�������������|����������������������d��������������.|����������������������d�������������d�S�)Nz;(context.eval_ctx.volatile and markup_join or unicode_join)�markup_join�unicode_joinz%s((r����r���)r.���r/���r����r����r���r1���)r2���r3���r4���r���r����s��� r8����visit_ConcatzCodeGenerator.visit_ConcatO��s��������>�"�� '�U�I�I� �^� &�� '�%�I�I�&�I�� � �6�I�%�&�&�&��:�� �� �C��J�J�s�E�"�"�"��J�J�t������ � �4�����r:���c������������������������|�����������������������d�������������|����������������������|j��������|�������������|j��������D�]}|����������������������||��������������|�����������������������d�������������d�S�)Nr����r����)r����r1���r����ops)r2���r3���r4����ops��� r8���� visit_ComparezCodeGenerator.visit_Compare]��sb������� � �3����� � �4�9�e�$�$�$��(�� "�� "�B��J�J�r�5�!�!�!�!�� � �3�����r:���c�����������������������|�����������������������dt����������|j�����������������z���������������|����������������������|j��������|�������������d�S�)Nr��)r����� operatorsr2��r1���r���r���s��� r8���� visit_OperandzCodeGenerator.visit_Operande��s<������� � �6�I�d�g�.�.�/�/�/�� � �4�9�e�$�$�$�$�$r:���c������������������(����|�j���������j��������r|����������������������d�������������|����������������������d�������������|����������������������|j��������|�������������|����������������������d|j��������z���������������|�j���������j��������r|����������������������d�������������d�S�d�S�)N�(await auto_await(zenvironment.getattr(r���r���)rC���r��r����r1���r3���r��r���s��� r8���� visit_GetattrzCodeGenerator.visit_Getattri��s���������$�� -��J�J�+�,�,�,�� � �)�*�*�*�� � �4�9�e�$�$�$�� � �7�T�Y�&�'�'�'���$�� ��J�J�t������ �� r:���c������������������z����t����������|j��������t����������j��������������������rb|����������������������|j��������|�������������|����������������������d�������������|����������������������|j��������|�������������|����������������������d�������������d�S�|�j��������j��������r|����������������������d�������������|����������������������d�������������|����������������������|j��������|�������������|����������������������d�������������|����������������������|j��������|�������������|����������������������d�������������|�j��������j��������r|����������������������d�������������d�S�d�S�)Nr����r����r8��zenvironment.getitem(r����r����r���) r=���r����r����Slicer1���r3���r����rC���r��r���s��� r8���� visit_GetitemzCodeGenerator.visit_Getitemu��s�������d�h���,�,�� !��J�J�t�y�%�(�(�(��J�J�s�O�O�O��J�J�t�x��'�'�'��J�J�s�O�O�O�O�O���(�� 1�� � �/�0�0�0��J�J�-�.�.�.��J�J�t�y�%�(�(�(��J�J�t�����J�J�t�x��'�'�'��J�J�s�O�O�O���(�� !�� � �4� � � � � � !�� !r:���c������������������*����|j����������|����������������������|j���������|�������������|����������������������d�������������|j���������|����������������������|j��������|�������������|j���������2|����������������������d�������������|����������������������|j��������|�������������d�S�d�S�)Nr���)�startr1���r�����stopr����r���s��� r8����visit_SlicezCodeGenerator.visit_Slice���s��������:�!��J�J�t�z�5�)�)�)�� � �3�����9� ��J�J�t�y�%�(�(�(��9� ��J�J�s�O�O�O��J�J�t�y�%�(�(�(�(�(��!� r:���c�����������������������|�j���������j��������r|����������������������d�������������|����������������������|�j��������|j�����������������dz����������������|�j���������j�����������������������������|j��������������������}|�#|����������������������d|j��������z��|j���������������������t����������|dd������������du�r|����������������������d�������������nQt����������|dd������������du�r|����������������������d �������������n(t����������|d d������������du�r|����������������������d�������������|j ���������|�� ��������������������|j ��������|�������������nz|j��������j��������r'|����������������������d|j ���������d |j ���������d��������������nG|j��������j��������r|����������������������d|j ��������z���������������n|����������������������d|j ��������z���������������|����������������������||�������������|����������������������d�������������|�j���������j��������r|����������������������d�������������d�S�d�S�)N�await auto_await(r����zno filter named %r� contextfilterFTr����evalcontextfilterr����environmentfilterr���z/(context.eval_ctx.autoescape and Markup(concat(z )) or concat(r���zMarkup(concat(%s))r���r����)rC���r��r����r����rD����getr����r����r����r3���r1���r.���r/���rv���r����r����)r2���r3���r4���r��s��� r8���r����zCodeGenerator.visit_Filter���s��������$�� ,��J�J�*�+�+�+�� � �4�<�� �*�S�0�1�1�1���'�+�+�D�I�6�6���<��I�I�*�T�Y�6���D�D�D��4��%�0�0�D�8�8��J�J�{�#�#�#�#� �T�.�� 6� 6�$� >� >��J�J�+�,�,�,�,� �T�.�� 6� 6�$� >� >��J�J��'�'�'���9� ��J�J�t�y�%�(�(�(�(� �^� $�� 4��J�J�J�8=����e�l�l�l�T� �� �� �� ���^� &�� 4��J�J�+�e�l�:�;�;�;�;��J�J�|�e�l�2�3�3�3����t�U�#�#�#�� � �3������$�� ��J�J�s�O�O�O�O�O� �� r:���c������������������N����|�����������������������|�j��������|j�����������������dz����������������|j��������|�j��������j��������vr#|����������������������d|j��������z��|j���������������������|����������������������|j��������|�������������|����������������������||�������������|�����������������������d�������������d�S�)Nr����zno test named %rr����) r����r����rD���rC���r����r����r1���r3���r����r���s��� r8���r����zCodeGenerator.visit_Test���s�������� � �4�:�d�i�(�3�.�/�/�/��9�D�,�2�2�2��I�I�(�4�9�4�d�k�B�B�B�� � �4�9�e�$�$�$����t�U�#�#�#�� � �3�����r:���c������������������B������������fd�}������������������������d�������������������������������������j����������������������������������������������d�������������������������������������j����������������������������������������������d��������������|���������������������������������������d�������������d�S�)Nc��������������������������j���������������������������������j�����������������������S�����������������������dd�����������������������������������z��z���������������d�S�)Nzcond_expr_undefined(%r)zRthe inline if-expression on %s evaluated to false and no else section was defined.)�expr2r1���r����r3��)r4���r3���r2���s������r8����write_expr2z1CodeGenerator.visit_CondExpr.<locals>.write_expr2���sc��������z�%��z�z�$�*�e�4�4�4��J�J�)�3�59�]�]�4�5H�5H�I�� �� �� �� �� r:���r����z if z else r����)r����r1����expr1r���)r2���r3���r4���rK��s���``` r8����visit_CondExprzCodeGenerator.visit_CondExpr���s���������� �� �� �� �� �� �� �� � � �3����� � �4�:�u�%�%�%�� � �6����� � �4�9�e�$�$�$�� � �8������ � � �� � �3�����r:���c����������������������|�j���������j��������r|����������������������d�������������|�j���������j��������r|����������������������d�������������n|����������������������d�������������|����������������������|j��������|�������������|rddipd�}|����������������������|||�������������|����������������������d�������������|�j���������j��������r|����������������������d�������������d�S�d�S�)NrB��zenvironment.call(context, z context.call(r��r����)rC���r��r����r��r1���r3���r����)r2���r3���r4���r���r����s��� r8���r���zCodeGenerator.visit_Call���s���������$�� ,��J�J�*�+�+�+���%�� (��J�J�3�4�4�4�4��J�J��'�'�'�� � �4�9�e�$�$�$�%�>�8�X�*>�F�$�����t�U�L�1�1�1�� � �3������$�� ��J�J�s�O�O�O�O�O� �� r:���c������������������v�����|�����������������������|j��������dz����������������|����������������������|j��������|�������������d�S�)Nr����)r����rY���r1���rW���r���s��� r8���� visit_KeywordzCodeGenerator.visit_Keyword���s6������� � �4�8�c�>�"�"�"�� � �4�:�u�%�%�%�%�%r:���c�����������������������|�����������������������d�������������|����������������������|j��������|�������������|�����������������������d�������������d�S�)NzMarkup(r�����r����r1���r���r���s��� r8����visit_MarkSafezCodeGenerator.visit_MarkSafe���s=������� � �9����� � �4�9�e�$�$�$�� � �3�����r:���c�����������������������|�����������������������d�������������|����������������������|j��������|�������������|�����������������������d�������������d�S�)Nz5(context.eval_ctx.autoescape and Markup or identity)(r����rR��r���s��� r8����visit_MarkSafeIfAutoescapez(CodeGenerator.visit_MarkSafeIfAutoescape���s>������� � �J�K�K�K�� � �4�9�e�$�$�$�� � �3�����r:���c������������������@�����|�����������������������d|j��������z����������������d�S�)Nzenvironment.�r����rD���r���s��� r8����visit_EnvironmentAttributez(CodeGenerator.visit_EnvironmentAttribute���s!������� � �>�D�I�-�.�.�.�.�.r:���c������������������P�����|�����������������������d|j���������d|j�����������������������d�S�)Nzenvironment.extensions[z].)r����� identifierrD���r���s��� r8����visit_ExtensionAttributez&CodeGenerator.visit_ExtensionAttribute���s+������� � � �d�o�o�o�t�y�y�Q�R�R�R�R�Rr:���c������������������P�����|�����������������������|�j��������|j������������������������������d�S�r,���)r����r����ro��r���s��� r8����visit_ImportedNamez CodeGenerator.visit_ImportedName���s$������� � �4�&�t��7�8�8�8�8�8r:���c������������������:�����|�����������������������|j���������������������d�S�r,���rW��r���s��� r8����visit_InternalNamez CodeGenerator.visit_InternalName���s������� � �4�9�����r:���c������������������0�����|�����������������������d�������������d�S�)Nr����)r����r���s��� r8����visit_ContextReferencez$CodeGenerator.visit_ContextReference���s������� � �9�����r:���c������������������V�����|�����������������������|����������������������|�������������������������d�S�r,���)r����rM��r���s��� r8����visit_DerivedContextReferencez+CodeGenerator.visit_DerivedContextReference��s(������� � �4�&�&�u�-�-�.�.�.�.�.r:���c������������������2�����|�����������������������d|�������������d�S�)N�continuer:��r���s��� r8����visit_ContinuezCodeGenerator.visit_Continue��s���������z�4�(�(�(�(�(r:���c������������������2�����|�����������������������d|�������������d�S�)N�breakr:��r���s��� r8����visit_BreakzCodeGenerator.visit_Break��s���������w��%�%�%�%�%r:���c������������������������|������������������������������������}|j�����������������������������|�������������|����������������������|�������������|����������������������|j��������|�������������|����������������������|�������������d�S�r,���)r����rr���r��r ��r����r��r ��)r2���r3���r4����scope_frames��� r8����visit_ScopezCodeGenerator.visit_Scope��sj�������k�k�m�m����(�(��.�.�.�����%�%�%����� �;�/�/�/�����%�%�%�%�%r:���c������������������*����|�������������������������������������}|����������������������|�d|����������������������|���������������������������|����������������������d|z���������������|����������������������|j��������|�������������|����������������������|�������������|���������������������d�������������}|j�����������������������������|�������������|�� ��������������������|�������������|�� ��������������������|j��������|�������������|����������������������|�������������|�� �����������������������������������d�S�)Nr����z %s.vars = T)r����)r����r����rM��r1���r����rD��r����rr���r��r ��r����r��r ��rF��)r2���r3���r4���r����rk��s��� r8����visit_OverlayScopez CodeGenerator.visit_OverlayScope��s�������'�'�)�)�����C�C�C��)<�)<�U�)C�)C�)C�D�E�E�E����|�c�)�*�*�*�� � �4�<��'�'�'��#�#�C�(�(�(��k�k�4�k�0�0����(�(��.�.�.�����%�%�%����� �;�/�/�/�����%�%�%��"�"�$�$�$�$�$r:���c������������������B����|j���������D�]�}|����������������������d|j��������z���������������|����������������������|j��������|������������� �|j�����������������������������|j��������������������}t����������|j��������|j��������|��������������v#�t����������j ��������$�r�d|j��������_ ��������Y���w�xY�wd�S�)Nzcontext.eval_ctx.%s = T)�optionsr����rY���r1���rW���r���r.����setattrr���r���r/���)r2���r3���r4����keywordr���s��� r8����visit_EvalContextModifierz'CodeGenerator.visit_EvalContextModifier ��s��������|�� :�� :�G��N�N�3�g�k�A�B�B�B��J�J�w�}�e�,�,�,� :��m�,�,�U�^�<�<��������S�9�9�9�9����#�� /�� /�� /�*.���'�'�'� /���� :�� :s����A>�>B�Bc������������������`����|�������������������������������������}|j�������������������������������������������}|����������������������d|z���������������|����������������������||�������������|j��������D�]}|����������������������||��������������|j�����������������������������|�������������|����������������������d|z���������������d�S�)Nz%s = context.eval_ctx.save()zcontext.eval_ctx.revert(%s))r����r.����saver����rs��r��r1����revert)r2���r3���r4����old_ctx_name� saved_ctxr���s��� r8����visit_ScopedEvalContextModifierz-CodeGenerator.visit_ScopedEvalContextModifier+��s��������0�0�2�2���N�'�'�)�)� ����5��D�E�E�E��&�&�t�U�3�3�3��Y�� %�� %�E��J�J�u�e�$�$�$�$� ����i�(�(�(����4�|�C�D�D�D�D�Dr:����NFTr����)r ���r,���)Nr���)T)ori���rj���rk���rh���r����r����rv���r����r����r����r����r����r����r����r����r����r����r����r����r ��r ��r��r*��r0��r3��r8��r;��r"��r$��r#��rD��rF��rI��r��rM��rO��rQ��r\��rz��r����r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r���r����r��r��r ��r��r��r��r ��r$��� visit_Add� visit_Sub� visit_Mul� visit_Div�visit_FloorDiv� visit_Pow� visit_Mod� visit_And�visit_Or� visit_Pos� visit_Neg� visit_Notr;���r/��r3��r6��r9��r<��r@��r����r����rM��r���rP��rS��rU��rX��r[��r]��r_��ra��rc��rf��ri��rl��rn��rs��ry��rl���r:���r8���r����r��������s �������������TX�@4��@4��@4��@4�HL��L��L�.��.��.� 1��1��1� ;��;��;��;�$�����"��"��"��"�>��>��>��>������ ������� �� �� ������������� *��*��*��*�3/��3/��3/��3/�j�����@��@��@� D��D��D��D������ N ��N ��N �` �� �� �$����� �� �� � +�� +�� +�I��I��I�$��$��$�6��6��6�5��5��5�,��,��,�1��1��1�%��%��%� �� �� �3��3��3�)��)��)������>z ��z ��z ��z �x$��$��$�L+!��+!��+!�Z8��8��8�tN��N��N�2I��I��I�VD"��D"��D"�L�����*/��/��/������ '�� '�� '� %�� %�� %�%��%��%���J��0@�A�A�M��"���I�'��'��'�R#��#��#�%��%��%�&%��%��%������M��M��M�^(��(��(�&��&��&�0�����04��4��4�"��"��"������-��-��-������������������(������� ���c� � �I���c� � �I���c� � �I���c� � �I��U�4�[�[�N���d���I���c� � �I���e�5�1�1�1�I��u�T��/�/�/�H���S� � �I���S� � �I���V�5�1�1�1�I� �t�������]���������]��%��%��%��� �� ���]� ���!��!���]�!�()��)��)��������]��@�������]���������]��*���������]��&��&��&������ ����� /��/��/�S��S��S�9��9��9�����������/��/��/�)��)��)�&��&��&�&��&��&�%��%��%� :�� :�� :�E��E��E��E��Er:���r����rz��)=r�����collectionsr���� functoolsr���� itertoolsr���rr��r���r����� markupsafer���r ���r_��r����_compatr���r ���r���r���r���r���r���� exceptionsr���� idtrackingr���r���r���r���r���r���r0���r����utilsr���r_���r���r5���hasattrrV���r���ri���execr�����SyntaxErrorrq��r;���rH���rU���r`���rz���rb���rn����RuntimeErrorr\���r����r[���r���r����r����rl���r:���r8����<module>r������s7�����6��6��"��"��"��"��"��"��$��$��$��$��$��$��������������2��2��2��2��2��2��������������������������������������������������������������������������#��#��#��#��#��#��������������!��!��!��!��!��!��������������.��.��.��.��.��.��������������&��&��&��&��&��&��*��*��*��*��*��*��(��(��(��(��(��(��*��*��*��*��*��*�������������� �� �� �� �� �� �������������� �� �� �� �� �� ��� � �� �� � � �� � ���7�4������ �N�N��N��� � ��D� 0�1�1�1����)�*�*�*�*���� �� �� ��D� ������D� "�#�#�#��������� �� �� ����� ���� '�� '�� '��QU�+��+��+��+������* �� �� �&��&��&��&��&�v��&��&��&�:��:��:��:��:�F��:��:��:�zJ��J��J��J��J�,��J��J��J�'��'��'��'��'�k��'��'��'�&&��&��&��&��&�K��&��&��&�,���������9�������|E��|E��|E��|E��|E�K��|E��|E��|E��|E��|Es$����3 C��C�C� C.��.C8�7C8