ó
    ùÞ jÅp  ã                   óœ  • S r SSKrSSKJr  SSKJr  SSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK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
KJr  SSKJr  SSKJr   " S S5      r " S S\5      r " S S\5      r " S S5      rS r " S S\R:                  5      r\R>                  S 5       r S r!S r"S r#S r$S r%S r&g)z…Provides the Template class, a facade for parsing, generating and executing
template strings, as well as template runtime operations.é    N)Úabc)Ú	machinery)Úcache)Úcodegen)Úcompat)Ú
exceptions)Úpyparser)Úruntime)Úutil)ÚLexerc                   ó:  • \ rS rSrSr\r                           SS jr\R                  S 5       r
S rS r\S 5       r\S	 5       r\R                  S
 5       r\S 5       r\S 5       r\S 5       rS rS rS rS rS rS rS r\S 5       rSrg)ÚTemplateé!   a"  Represents a compiled template.

:class:`.Template` includes a reference to the original
template source (via the :attr:`.source` attribute)
as well as the source code of the
generated Python module (i.e. the :attr:`.code` attribute),
as well as a reference to an actual Python module.

:class:`.Template` is constructed using either a literal string
representing the template text, or a filename representing a filesystem
path to a source file.

:param text: textual template source.  This argument is mutually
 exclusive versus the ``filename`` parameter.

:param filename: filename of the source template.  This argument is
 mutually exclusive versus the ``text`` parameter.

:param buffer_filters: string list of filters to be applied
 to the output of ``%def``\ s which are buffered, cached, or otherwise
 filtered, after all filters
 defined with the ``%def`` itself have been applied. Allows the
 creation of default expression filters that let the output
 of return-valued ``%def``\ s "opt out" of that filtering via
 passing special attributes or objects.

:param cache_args: Dictionary of cache configuration arguments that
 will be passed to the :class:`.CacheImpl`.   See :ref:`caching_toplevel`.

:param cache_dir:

 .. deprecated:: 0.6
    Use the ``'dir'`` argument in the ``cache_args`` dictionary.
    See :ref:`caching_toplevel`.

:param cache_enabled: Boolean flag which enables caching of this
 template.  See :ref:`caching_toplevel`.

:param cache_impl: String name of a :class:`.CacheImpl` caching
 implementation to use.   Defaults to ``'beaker'``.

:param cache_type:

 .. deprecated:: 0.6
    Use the ``'type'`` argument in the ``cache_args`` dictionary.
    See :ref:`caching_toplevel`.

:param cache_url:

 .. deprecated:: 0.6
    Use the ``'url'`` argument in the ``cache_args`` dictionary.
    See :ref:`caching_toplevel`.

:param default_filters: List of string filter names that will
 be applied to all expressions.  See :ref:`filtering_default_filters`.

:param enable_loop: When ``True``, enable the ``loop`` context variable.
 This can be set to ``False`` to support templates that may
 be making usage of the name "``loop``".   Individual templates can
 re-enable the "loop" context by placing the directive
 ``enable_loop="True"`` inside the ``<%page>`` tag -- see
 :ref:`migrating_loop`.

:param encoding_errors: Error parameter passed to ``encode()`` when
 string encoding is performed. See :ref:`usage_unicode`.

:param error_handler: Python callable which is called whenever
 compile or runtime exceptions occur. The callable is passed
 the current context as well as the exception. If the
 callable returns ``True``, the exception is considered to
 be handled, else it is re-raised after the function
 completes. Is used to provide custom error-rendering
 functions.

 .. seealso::

    :paramref:`.Template.include_error_handler` - include-specific
    error handler function

:param format_exceptions: if ``True``, exceptions which occur during
 the render phase of this template will be caught and
 formatted into an HTML error page, which then becomes the
 rendered result of the :meth:`.render` call. Otherwise,
 runtime exceptions are propagated outwards.

:param imports: String list of Python statements, typically individual
 "import" lines, which will be placed into the module level
 preamble of all generated Python modules. See the example
 in :ref:`filtering_default_filters`.

:param future_imports: String list of names to import from `__future__`.
 These will be concatenated into a comma-separated string and inserted
 into the beginning of the template, e.g. ``futures_imports=['FOO',
 'BAR']`` results in ``from __future__ import FOO, BAR``.

:param include_error_handler: An error handler that runs when this template
 is included within another one via the ``<%include>`` tag, and raises an
 error.  Compare to the :paramref:`.Template.error_handler` option.

 .. versionadded:: 1.0.6

 .. seealso::

    :paramref:`.Template.error_handler` - top-level error handler function

:param input_encoding: Encoding of the template's source code.  Can
 be used in lieu of the coding comment. See
 :ref:`usage_unicode` as well as :ref:`unicode_toplevel` for
 details on source encoding.

:param lookup: a :class:`.TemplateLookup` instance that will be used
 for all file lookups via the ``<%namespace>``,
 ``<%include>``, and ``<%inherit>`` tags. See
 :ref:`usage_templatelookup`.

:param module_directory: Filesystem location where generated
 Python module files will be placed.

:param module_filename: Overrides the filename of the generated
 Python module file. For advanced usage only.

:param module_writer: A callable which overrides how the Python
 module is written entirely.  The callable is passed the
 encoded source content of the module and the destination
 path to be written to.   The default behavior of module writing
 uses a tempfile in conjunction with a file move in order
 to make the operation atomic.   So a user-defined module
 writing function that mimics the default behavior would be:

 .. sourcecode:: python

     import tempfile
     import os
     import shutil

     def module_writer(source, outputpath):
         (dest, name) = \\
             tempfile.mkstemp(
                 dir=os.path.dirname(outputpath)
             )

         os.write(dest, source)
         os.close(dest)
         shutil.move(name, outputpath)

     from mako.template import Template
     mytemplate = Template(
                     filename="index.html",
                     module_directory="/path/to/modules",
                     module_writer=module_writer
                 )

 The function is provided for unusual configurations where
 certain platform-specific permissions or other special
 steps are needed.

:param output_encoding: The encoding to use when :meth:`.render`
 is called.
 See :ref:`usage_unicode` as well as :ref:`unicode_toplevel`.

:param preprocessor: Python callable which will be passed
 the full template source before it is parsed. The return
 result of the callable will be used as the template source
 code.

:param lexer_cls: A :class:`.Lexer` class used to parse
 the template.   The :class:`.Lexer` class is used by
 default.

 .. versionadded:: 0.7.4

:param strict_undefined: Replaces the automatic usage of
 ``UNDEFINED`` for any undeclared variables not located in
 the :class:`.Context` with an immediate raise of
 ``NameError``. The advantage is immediate reporting of
 missing variables which include the name.

 .. versionadded:: 0.3.6

:param uri: string URI or other identifier for this template.
 If not provided, the ``uri`` is generated from the filesystem
 path, or from the in-memory identity of a non-file-based
 template. The primary usage of the ``uri`` is to provide a key
 within :class:`.TemplateLookup`, as well as to generate the
 file path of the generated Python module file, if
 ``module_directory`` is specified.

Nc           	      óè  • U(       a$  [         R                  " SSU5      U l        X0l        OÂU(       aŽ  [         R                  " SSU5      U l        [        R
                  R                  U5      u  nn[        R
                  R                  U5      R                  [        R
                  R                  S5      nUU l        O-S[        [        U 5      5      -   U l        U R                  U l        U R                  R                  SS5      R                  S5      n[        R
                  R                  U5      nUR                  S5      (       a#  [        R                  " SU R                  -  5      eUU l        Xpl        X€l        UU l        UU l        UU l        Uc	  S/U l        OUU l        UU l        UU l        UU l        UU l        Ub  UU l        Ub,  [9        XU5      u  nn UU l        Xl        [?        U S XUX5        O•Ub|  Ub  UnOcU	b^  [        R
                  RA                  [        R
                  RC                  [        R
                  R                  U	5      US	-   5      5      nOS nU RE                  UU5      n O[        RF                  " S
5      eU U l$        X l%        U RH                  RL                  U l'        X@l(        XPl)        UU l*        X`l+        X�l,        U R[                  UUU
UUU5        g )Nú\WÚ_Ú/zmemory:Ú\z..zNTemplate uri "%s" is invalid - it cannot be relative outside of the root path.Ústrz.pyz"Template requires text or filename).ÚreÚsubÚ	module_idÚuriÚosÚpathÚ
splitdriveÚnormpathÚreplaceÚsepÚhexÚidÚlstripÚ
startswithr   ÚTemplateLookupExceptionÚinput_encodingÚoutput_encodingÚencoding_errorsÚenable_loopÚstrict_undefinedÚmodule_writerÚdefault_filtersÚbuffer_filtersÚimportsÚfuture_importsÚpreprocessorÚ	lexer_clsÚ_compile_textÚ_codeÚ_sourceÚ
ModuleInfoÚabspathÚjoinÚ_compile_from_fileÚRuntimeExceptionÚmoduleÚfilenameÚrender_bodyÚ	callable_Úformat_exceptionsÚerror_handlerÚinclude_error_handlerÚlookupÚmodule_directoryÚ_setup_cache_args)!ÚselfÚtextr:   r   r=   r>   r@   r&   r'   rA   Ú
cache_argsÚ
cache_implÚcache_enabledÚ
cache_typeÚ	cache_dirÚ	cache_urlÚmodule_filenamer%   r*   r+   r,   r)   r-   r.   r(   r/   r0   r?   Údriver   Úu_normÚcoder9   s!                                    ÚG/var/www/html/gaurav/venv/lib/python3.13/site-packages/mako/template.pyÚ__init__ÚTemplate.__init__á   s�  € ö< ÜŸVšV E¨3°Ó4ˆDŒNØ�HÞÜŸVšV E¨3°Ó9ˆDŒNÜŸ'™'×,Ñ,¨XÓ6‰KˆE�4Ü—7‘7×#Ñ# DÓ)×1Ñ1´"·'±'·+±+¸sÓCˆDØˆD�Hà&¬¬R°«X«Ñ6ˆDŒNØ—~‘~ˆDŒHà—‘×!Ñ! $¨Ó,×3Ñ3°CÓ8ˆÜ—‘×!Ñ! &Ó)ˆØ×Ñ˜T×"Ñ"Ü×4Ò4ð$à&*§h¡hñ/óð ð -ˆÔØ.ÔØ.ÔØ&ˆÔØ 0ˆÔØ*ˆÔàÑ"Ø$) 7ˆDÕ à#2ˆDÔ Ø,ˆÔàˆŒØ,ˆÔØ(ˆÔàÑ Ø&ˆDŒNð ÑÜ(¨°XÓ>‰LˆD�&ØˆDŒJØŒLÜ�v˜t T°T¸4ÕEØÑ!ð Ñ*Ø&‘Ø!Ñ-Ü—w‘w—‘Ü—G‘G—L‘LÜŸ™×(Ñ(Ð)9Ó:¸FÀU¹Nóó‘ð �Ø×,Ñ,¨T°8Ó<‰Fä×-Ò-Ø4óð ð ˆŒØ ŒØŸ™×0Ñ0ˆŒØ!2ÔØ*ÔØ%:ˆÔ"ØŒà 0Ôà×ÑØØØØØØõ	
ó    c                 ó„   • U R                   (       a  [        R                  $ [        R                  R                  S/5      $ )NÚloop)r(   r   ÚRESERVED_NAMESÚ
difference©rC   s    rO   Úreserved_namesÚTemplate.reserved_namesT  s0   € à××Ü×)Ñ)Ð)ä×)Ñ)×4Ñ4°f°XÓ>Ð>rR   c                 ó¼   • Xl         X l        U=(       d    0 U l        U(       a  X@R                  S'   U(       a  XPR                  S'   U(       a  X`R                  S'   g g )NÚtypeÚdirÚurl)rF   rG   rE   )rC   rF   rG   rE   rH   rI   rJ   s          rO   rB   ÚTemplate._setup_cache_args[  sM   € ð %ŒØ*ÔØ$×*¨ˆŒæØ&0�O‰O˜FÑ#ÞØ%.�O‰O˜EÑ"ÞØ%.�O‰O˜EÒ"ð rR   c           	      óh  ^• TGb·  [         R                  " [        R                  R	                  T5      5        [        R
                  " U5      [
        R                     n[        U4S jTU5         [        R                  R                  T5      (       a+  [        R
                  " T5      [
        R                     U:  aA  [         R                  " U5      n[        5          [        XUTU R                  5        S S S 5        [        R                  " U R                  T5      nUR                   ["        R$                  :w  ab  [         R                  " U5      n[        5          [        XUTU R                  5        S S S 5        [        R                  " U R                  T5      nS S S 5        ['        WTXS S S 5        U$ [         R                  " U5      n[)        XU5      u  peS U l        X`l        ['        US XUS S 5        U$ ! , (       d  f       GN= f! , (       d  f       Nž= f! , (       d  f       N†= f)Nc                  ó0   >• [         R                  " T 5      $ ©N)r   Úread_python_file)r   s   €rO   Ú<lambda>Ú-Template._compile_from_file.<locals>.<lambda>t  s   ø€ œ×-Ò-¨dÔ3rR   )r   Úverify_directoryr   r   ÚdirnameÚstatÚST_MTIMEÚ_translate_module_warningsÚexistsÚ	read_fileÚ_drop_expression_warningsÚ_compile_module_filer*   r   Úload_moduler   Ú_magic_numberr   ÚMAGIC_NUMBERr4   r1   r3   r2   )rC   r   r:   Ú	filemtimeÚdatar9   rN   s    `     rO   r7   ÚTemplate._compile_from_fileo  sš  ø€ ØÒÜ×!Ò!¤"§'¡'§/¡/°$Ó"7Ô8ÜŸš Ó)¬$¯-©-Ñ8ˆIÜ+Ü3°T¸8õô Ÿ™Ÿ™ t×,Ñ,Ü—w’w˜t“}¤T§]¡]Ñ3°iÓ?äŸ>š>¨(Ó3�DÜ2Õ4Ü,Ø ¨°$¸×8JÑ8Jô÷ 5ô  ×+Ò+¨D¯N©N¸DÓA�Ø×'Ñ'¬7×+?Ñ+?Ó?ÜŸ>š>¨(Ó3�DÜ2Õ4Ü,Ø ¨°$¸×8JÑ8Jô÷ 5ô $×/Ò/°·±ÀÓE�F÷'ô* �v˜t T°T¸4ÀÔFð ˆô —>’> (Ó+ˆDÜ(¨°XÓ>‰LˆDØˆDŒLØŒJÜ�v˜t T°T¸4ÀÔFØˆ÷- 5Ö4ú÷ 5Õ4ú÷õ ús>   Á1A0H#Ã!H Ã:A'H#Å!HÅ:)H#È 
H	È
H#È
H 	ÈH#È#
H1c                 ó@   • [        U R                  5      R                  $ )z<Return the template source code for this :class:`.Template`.)Ú_get_module_info_from_callabler<   ÚsourcerW   s    rO   rv   ÚTemplate.source“  s   € ô .¨d¯n©nÓ=×DÑDÐDrR   c                 ó@   • [        U R                  5      R                  $ )z:Return the module source code for this :class:`.Template`.)ru   r<   rN   rW   s    rO   rN   ÚTemplate.code™  s   € ô .¨d¯n©nÓ=×BÑBÐBrR   c                 ó.   • [         R                  " U 5      $ ra   )r   ÚCacherW   s    rO   r   ÚTemplate.cacheŸ  s   € ä�{Š{˜4Ó Ð rR   c                 ó    • U R                   S   $ )Nr\   ©rE   rW   s    rO   rI   ÚTemplate.cache_dir£  ó   € à�‰˜uÑ%Ð%rR   c                 ó    • U R                   S   $ )Nr]   r~   rW   s    rO   rJ   ÚTemplate.cache_url§  r€   rR   c                 ó    • U R                   S   $ )Nr[   r~   rW   s    rO   rH   ÚTemplate.cache_type«  s   € à�‰˜vÑ&Ð&rR   c                 óD   • [         R                  " X R                  X5      $ )a¼  Render the output of this template as a string.

If the template specifies an output encoding, the string
will be encoded accordingly, else the output is raw (raw
output uses `StringIO` and can't handle multibyte
characters). A :class:`.Context` object is created corresponding
to the given data. Arguments that are explicitly declared
by this template's internal rendering method are also
pulled from the given ``*args``, ``**data`` members.

©r
   Ú_renderr<   ©rC   Úargsrr   s      rO   ÚrenderÚTemplate.render¯  s   € ô �Š˜t§^¡^°TÓ@Ð@rR   c                 óB   • [         R                  " X R                  XSS9$ )z7Render the output of this template as a unicode object.T)Ú
as_unicoder†   rˆ   s      rO   Úrender_unicodeÚTemplate.render_unicode½  s    € ô �ŠØ—.‘. $¸ñ
ð 	
rR   c                 óŒ   • [        USS5      c  UR                  U 5        [        R                  " X R                  U/UQ70 UD6  g)zfRender this :class:`.Template` with the given context.

The data is written to the context's buffer.

Ú_with_templateN)ÚgetattrÚ_set_with_templater
   Ú_render_contextr<   )rC   Úcontextr‰   Úkwargss       rO   Úrender_contextÚTemplate.render_contextÄ  s@   € ô �7Ð,¨dÓ3Ñ;Ø×&Ñ& tÔ,Ü×Ò §n¡n°gÐOÀÒOÈÓOrR   c                 ó4   • [        U R                  SU-  5      $ ©Nú	render_%s)Úhasattrr9   ©rC   Únames     rO   Úhas_defÚTemplate.has_defÎ  ó   € Ü�t—{‘{ K°$Ñ$6Ó7Ð7rR   c                 óH   • [        U [        U R                  SU-  5      5      $ )z9Return a def of this template as a :class:`.DefTemplate`.r›   )ÚDefTemplater’   r9   r�   s     rO   Úget_defÚTemplate.get_defÑ  s!   € ô ˜4¤¨¯©°kÀDÑ6HÓ!IÓJÐJrR   c                 óp   • [        U R                  5       Vs/ sH  oSS S:X  d  M  USS PM     sn$ s  snf )zAreturn a list of defs in the template.

.. versionadded:: 1.0.4

Né   Úrender_)r\   r9   )rC   Úis     rO   Ú	list_defsÚTemplate.list_defsÖ  s:   € ô  # 4§;¡;Ô/ÓFÑ/˜!°R°a°5¸IÑ3E“��!�"“Ñ/ÑFÐFùÒFs   ˜3§	3c                 ó4   • [        U R                  SU-  5      $ rš   )r’   r9   r�   s     rO   Ú_get_def_callableÚTemplate._get_def_callableÞ  r¡   rR   c                 ó.   • U R                   R                  $ ra   )r9   Ú_modified_timerW   s    rO   Úlast_modifiedÚTemplate.last_modifiedá  s   € à�{‰{×)Ñ)Ð)rR   )r2   r3   r,   rE   rG   rF   r<   r+   r(   r'   r>   r:   r=   r.   r-   r?   r%   r0   r@   r9   rA   r   r*   r&   r/   r)   r   )NNNFNNNÚstrictNNÚbeakerTNNNNNNN© FNNTNNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r0   rP   r   Úmemoized_propertyrX   rB   r7   Úpropertyrv   rN   r   rI   rJ   rH   rŠ   rŽ   r—   rŸ   r¤   rª   r­   r±   Ú__static_attributes__rµ   rR   rO   r   r   !   sL  † ñ{ðz €Ið ØØØØØØØ ØØØØØØØØØØØØØØØØØØØ"ô9q
ðf 
×Ññ?ó ð?ò/ò("ðH ñEó ðEð
 ñCó ðCð
 
×Ññ!ó ð!ð ñ&ó ð&ð ñ&ó ð&ð ñ'ó ð'òAò
òPò8òKò
Gò8ð ñ*ó ó*rR   r   c                   óD   • \ rS rSrSr                 SS jrSrg)ÚModuleTemplateiæ  a	  A Template which is constructed given an existing Python module.

e.g.::

     t = Template("this is a template")
     f = file("mymodule.py", "w")
     f.write(t.code)
     f.close()

     import mymodule

     t = ModuleTemplate(mymodule)
     print(t.render())

Nc           	      ó²  • [         R                  " SSUR                  5      U l        UR                  U l        UR
                  U l        Xpl        X€l        UR                  U l
        Xl        X@l        [        UUU UUUUR                  5        U R                  R                  U l        X�l        X l        UU l        X°l        U R)                  UUUUUU5        g )Nr   r   )r   r   Ú_template_urir   r   Ú_source_encodingr%   r&   r'   Ú_enable_loopr(   r9   r:   r4   r;   r<   r=   r>   r?   r@   rB   )rC   r9   rK   ÚtemplateÚtemplate_filenameÚmodule_sourceÚtemplate_sourcer&   r'   r=   r>   r@   rE   rF   rG   rH   rI   rJ   r?   s                      rO   rP   ÚModuleTemplate.__init__÷  sÌ   € ô* Ÿš  s¨F×,@Ñ,@ÓAˆŒØ×'Ñ'ˆŒØ$×5Ñ5ˆÔØ.ÔØ.ÔØ!×.Ñ.ˆÔàŒØ)ŒÜØØØØØØØ× Ñ ô	
ð Ÿ™×0Ñ0ˆŒØ!2ÔØ*ÔØ%:ˆÔ"ØŒØ×ÑØØØØØØõ	
rR   )r<   r(   r'   r>   r:   r=   r?   r%   r@   r9   r   r&   r   )NNNNNNr³   FNNNr´   TNNNN)r¶   r·   r¸   r¹   rº   rP   r½   rµ   rR   rO   r¿   r¿   æ  sA   † ñð& ØØØØØØ ØØØØØØØØØØ"÷'4
rR   r¿   c                   ó$   • \ rS rSrSrS rS rSrg)r£   i.  zJA :class:`.Template` which represents a callable def in a parent
template.c                 ó,  • Xl         X l        UR                  U l        UR                  U l        UR                  U l        UR
                  U l        UR                  U l        UR                  U l        UR                  U l        UR                  U l	        g ra   )
Úparentr<   r&   r9   r'   r=   r>   r?   r(   r@   )rC   rË   r<   s      rO   rP   ÚDefTemplate.__init__2  sv   € ØŒØ"ŒØ%×5Ñ5ˆÔØ—m‘mˆŒØ%×5Ñ5ˆÔØ!'×!9Ñ!9ˆÔØ#×1Ñ1ˆÔØ%+×%AÑ%AˆÔ"Ø!×-Ñ-ˆÔØ—m‘mˆ�rR   c                 ó8   • U R                   R                  U5      $ ra   )rË   r¤   r�   s     rO   r¤   ÚDefTemplate.get_def>  s   € Ø�{‰{×"Ñ" 4Ó(Ð(rR   )
r<   r(   r'   r>   r=   r?   r@   r9   r&   rË   N)r¶   r·   r¸   r¹   rº   rP   r¤   r½   rµ   rR   rO   r£   r£   .  s   † ñò
$õ)rR   r£   c                   ót   • \ rS rSrSr\R                  " 5       rS r\	S	S j5       r
\S 5       r\S 5       rSrg)
r4   iB  z¡Stores information about a module currently loaded into
memory, provides reverse lookups of template source, module
source code based on a module's identifier.

c                 ó¸   • Xl         X l        X@l        XPl        X`l        Xpl        U =U R                  UR                  '   Ul        U(       a  X R                  U'   g g ra   )	r9   rK   rÅ   rÆ   rÇ   Útemplate_uriÚ_modulesr¶   Ú_mmarker)rC   r9   rK   rÄ   rÅ   rÆ   rÇ   rÑ   s           rO   rP   ÚModuleInfo.__init__K  sU   € ð ŒØ.ÔØ!2ÔØ*ÔØ.ÔØ(ÔØ=AÐAˆ�‰�f—o‘oÑ&¨Ô):ÞØ-1�M‰M˜/Ò*ð rR   c                 ó¶  • [         R                  " SU[         R                  5      R                  S5      n[        R
                  " U5      nUS   R                  5        VVs0 sH  u  pE[        U5      [        U5      _M     snnUS'   U(       aC  / =ocS'   US   nSn[        S[        U5      5       H  n	X—;   a  Xy   nUR                  U5        M     U$ s  snnf )Nz'__M_BEGIN_METADATA(.+?)__M_END_METADATAé   Úline_mapÚfull_line_map)r   ÚsearchÚSÚgroupÚjsonÚloadsÚitemsÚintÚrangeÚmaxÚappend)
ÚclsrÆ   rØ   Ú
source_mapÚkÚvÚ
f_line_mapr×   Úcurr_templ_lineÚmod_lines
             rO   Úget_module_source_metadataÚ%ModuleInfo.get_module_source_metadata_  sÑ   € ä—Y’YØ6¸ÄrÇtÁtó
ç
‰%�‹(ð 	ô —Z’Z 
Ó+ˆ
à'1°*Ñ'=×'CÑ'CÔ'Eô"
Ù'E™t˜qŒC�‹F”C˜“FŠNÑ'Eò"
ˆ
�:Ñö Ø79Ð9ˆJ OÑ4Ø! *Ñ-ˆHàˆOÜ! !¤S¨£]Ö3�ØÓ'Ø&.Ñ&8�OØ×!Ñ! /Ö2ñ 4ð Ðùó"
s   Á" Cc                 ót   • U R                   b  U R                   $ [        R                  " U R                  5      $ ra   )rÆ   r   rb   rK   rW   s    rO   rN   ÚModuleInfo.codes  s1   € à×ÑÑ)Ø×%Ñ%Ð%ä×(Ò(¨×)=Ñ)=Ó>Ð>rR   c                 óÊ  • U R                   cb  [        R                  " U R                  5      nU R                  R
                  (       a%  UR                  U R                  R
                  5      $ U$ U R                  R
                  (       aN  [        U R                   [        5      (       d/  U R                   R                  U R                  R
                  5      $ U R                   $ ra   )	rÇ   r   rk   rÅ   r9   rÂ   ÚdecodeÚ
isinstancer   )rC   rr   s     rO   rv   ÚModuleInfo.sourcez  s    € à×ÑÑ'Ü—>’> $×"8Ñ"8Ó9ˆDØ�{‰{×+×+Ø—{‘{ 4§;¡;×#?Ñ#?Ó@Ð@à�à�[‰[×)×)´*Ø× Ñ ¤#÷3
ñ 3
ð ×'Ñ'×.Ñ.¨t¯{©{×/KÑ/KÓLÐLà×'Ñ'Ð'rR   )r9   rK   rÆ   rÅ   rÇ   rÑ   N)F)r¶   r·   r¸   r¹   rº   ÚweakrefÚWeakValueDictionaryrÒ   rP   Úclassmethodrê   r¼   rN   rv   r½   rµ   rR   rO   r4   r4   B  sX   † ñð ×*Ò*Ó,€Hò2ð( óó ðð& ñ?ó ð?ð ñ(ó ó(rR   r4   c                 óf  • U R                  UUU R                  U R                  S9nUR                  5       n[        R
                  " UU R                  UU R                  U R                  U R                  U R                  UR                  UU R                  U R                  U R                  S9nXd4$ )N)r%   r/   )	r+   r,   r-   r.   Úsource_encodingÚgenerate_magic_commentr)   r(   rX   )r0   r%   r/   Úparser   Úcompiler   r+   r,   r-   r.   Úencodingr)   r(   rX   )rÄ   rD   r:   r÷   ÚlexerÚnoderv   s          rO   Ú_compilerý   ‹  sª   € Ø×ÑØØØ×.Ñ.Ø×*Ñ*ð	 ð €Eð �;‰;‹=€DÜ�_Š_ØØ�‰ØØ ×0Ñ0Ø×.Ñ.Ø× Ñ Ø×.Ñ.ØŸ™Ø5Ø!×2Ñ2Ø×(Ñ(Ø×.Ñ.ñ€Fð ˆ=ÐrR   c                   ó*   • \ rS rSrSrS rS rS rSrg)Ú_ModuleSourceLoaderi¤  a/  Provide the generated source of an in-memory template module.

A module created directly from :class:`types.ModuleType` has ``__spec__``
and ``__loader__`` present in its namespace but set to ``None``.  The
:mod:`linecache` module consults these while a traceback is being built,
and as of Python 3.15 emits a :class:`DeprecationWarning` when it finds a
``__spec__`` that has no loader; a module lacking a real loader also has
no source lines available to show for its frames.  Supplying a loader
that can produce the generated module source addresses both.

c                 ó   • Xl         X l        g ra   )rž   r3   )rC   rž   rv   s      rO   rP   Ú_ModuleSourceLoader.__init__±  s   € ØŒ	Ø�rR   c                 ó   • U R                   $ ra   )r3   r�   s     rO   Ú
get_sourceÚ_ModuleSourceLoader.get_sourceµ  s   € Ø�|‰|ÐrR   c                 ó   • g)NFrµ   r�   s     rO   Ú
is_packageÚ_ModuleSourceLoader.is_package¸  s   € ØrR   )r3   rž   N)	r¶   r·   r¸   r¹   rº   rP   r  r  r½   rµ   rR   rO   rÿ   rÿ   ¤  s   † ñ
òòõrR   rÿ   c              #   ó˜   ^ ^#   • [         R                  mSU U4S jjnU[         l         Sv •  T[         l        g! T[         l        f = f7f)aD  Replace the warnings display hook for the duration of the block.

``locate`` is passed the message, category, filename and line number of
each warning, and returns the filename and line number it should be
shown as, or ``None`` for a warning that should not be shown at all.

The display hook is replaced, rather than the warnings being recorded
and raised a second time, so that each warning passes through the
warnings filters exactly once.  A filter with a stateful action such as
"once" would otherwise suppress the second occurrence, and the warning
would be lost entirely.

Nc                 óN   >• T" XX#5      nUc  g XbU4:w  a  S nUu  p#T" XX#XE5        g ra   rµ   )	ÚmessageÚcategoryr:   ÚlinenoÚfileÚlineÚlocationÚlocateÚshow_warnings	          €€rO   Ú_showÚ _show_warnings_as.<locals>._showÎ  s>   ø€ Ù˜'¨XÓ>ˆØÑØà &Ð)Ó)ð ˆDØ'ÑˆHá�W¨¸$ÕErR   )NN)ÚwarningsÚshowwarning)r  r  r  s   ` @rO   Ú_show_warnings_asr  ¼  sA   ùé € ô  ×'Ñ'€L÷Fð Fð !„HÔð,Ûà+ŒÕø˜|ŒÕüs   „%A
ª: ®A
ºAÁA
c                  ó   • S n [        U 5      $ )a  Drop warnings raised while individual expressions are parsed.

These carry no location that can be related back to the template, as the
expression is parsed on its own, and the same warning is raised again
when the module as a whole is compiled, where the location can be
translated.

c                 óˆ   • U[         R                  :w  a  X#4$ [        R                  R	                  [        U 5      U4S 5        g ra   )r	   ÚEXPRESSION_FILENAMEr  ÚonceregistryÚpopr   )r
  r  r:   r  s       rO   Ú_locateÚ*_drop_expression_warnings.<locals>._locateì  s=   € Ø”x×3Ñ3Ó3ØÐ#Ð#ô
 	×Ñ×!Ñ!¤3 w£<°Ð":¸DÔAØrR   ©r  )r  s    rO   rl   rl   â  s   € òô ˜WÓ%Ð%rR   c                 ó6   ^ ^^^• SmUU UU4S jn[        U5      $ )aJ  Report warnings raised for a generated module against the template
it was generated from, translating the line number through the module's
line map.

Any other warning, such as one raised by a module imported from a
``<%! %>`` block as the template module executes, is shown unchanged, as
is one whose line cannot be translated.

Nc                 óº   >• UT:w  a  X#4$ Tc   [         R                  T" 5       SS9S   m TUS-
     nTU4$ ! [         a    / m Nf = f! [         a    X#4s $ f = f)NT)rØ   rØ   rÖ   )r4   rê   Ú	ExceptionÚ
IndexError)	r
  r  Úwarning_filenamer  Ú
translatedr:   r  r×   r   s	        €€€€rO   r  Ú+_translate_module_warnings.<locals>._locate  s—   ø€ ð ˜yÓ(Ø#Ð+Ð+àÑðÜ%×@Ñ@Ù“L°ð Að à!ñ#�ð	(Ø! &¨1¡*Ñ-ˆJð ˜ZÐ'Ð'øô ó ð ’ð	ûô ó 	,Ø#Ð+Ò+ð	,ús    �8 ¬A
 ¸AÁAÁ
AÁAr  )r  r   r:   r  r×   s   ``` @rO   ri   ri   ù  s!   û€ ð €H÷(ð (ô0 ˜WÓ%Ð%rR   c                 óê  ^	• U R                   nUn[        R                  " U5      n[        5          [	        XUSS9u  m	nS S S 5        [        UT	5      nXul        [        R                  " XGUS9Ul	        [        U	4S jXB=(       d    U R                  5         [        T	US5      n[        X…R                  UR                  5        S S S 5        T	U4$ ! , (       d  f       N—= f! , (       d  f       T	U4$ = f)NF©r÷   )Úoriginc                  ó   >• T $ ra   rµ   )rv   s   €rO   rc   Ú_compile_text.<locals>.<lambda>1  s   ø€ ‘rR   Úexec)r   ÚtypesÚ
ModuleTyperl   rý   rÿ   Ú
__loader__r   Ú
ModuleSpecÚ__spec__ri   r   rù   r+  Ú__dict__)
rÄ   rD   r:   Ú
identifierÚcidr9   rû   ÚloaderrN   rv   s
            @rO   r1   r1   !  sØ   ø€ Ø×#Ñ#€Jà
€CÜ×Ò˜cÓ"€Fä	"Õ	$Ü Ø˜H¸Uñ
‰ˆ�÷ 
%ô
 !  fÓ-€FØÔÜ×*Ò*¨3¸sÑC€F„Oä	#Ü˜×5¨¯©õ
ô �v˜s FÓ+ˆô 	ˆT—?‘? F§O¡OÔ4÷
ð �FÐÐ÷+ 
%Õ	$ú÷
ô 
ð �FÐÐús   °CÂ.C!Ã
CÃ!
C2c                 óš  • [        XUSS9u  pV[        U[        5      (       a$  UR                  UR                  =(       d    S5      nU(       a	  U" XS5        g [
        R                  " [        R                  R                  U5      S9u  px[        R                  " Xu5        [        R                  " U5        [        R                  " Xƒ5        g )NTr'  Úascii)r\   )rý   rð   r   Úencoderú   ÚtempfileÚmkstempr   r   rf   ÚwriteÚcloseÚshutilÚmove)	rÄ   rD   r:   Ú
outputpathr*   rv   rû   Údestrž   s	            rO   rm   rm   ?  sŠ   € ÜØ˜¸ñ�M€Fô �&œ#×ÑØ—‘˜uŸ~™~×8°Ó9ˆæÙ�fÕ)ô
 ×%Ò%¬"¯'©'¯/©/¸*Ó*EÑF‰
ˆä
�Š�ÔÜ
�Š�ŒÜ�Š�DÕ%rR   c                 ó2   • [        U R                  S   5      $ )Nr¶   )Ú_get_module_infoÚ__globals__)r<   s    rO   ru   ru   T  s   € Ü˜I×1Ñ1°*Ñ=Ó>Ð>rR   c                 ó(   • [         R                  U    $ ra   )r4   rÒ   )r:   s    rO   rA  rA  X  s   € Ü×Ñ˜xÑ(Ð(rR   )'rº   Ú
contextlibÚ	importlibr   r   rÜ   r   r   r<  rg   r8  r,  r  rò   Úmakor   r   r   r   r	   r
   r   Ú
mako.lexerr   r   r¿   r£   r4   rý   ÚLoaderrÿ   Úcontextmanagerr  rl   ri   r1   rm   ru   rA  rµ   rR   rO   Ú<module>rJ     sÌ   ðñ=ó Ý Ý Û Û 	Û 	Û Û Û Û Û Û å Ý Ý Ý Ý Ý Ý Ý ÷B*ñ B*ôJE
�Xô E
ôP)�(ô )÷(F(ñ F(òRô2˜#Ÿ*™*ô ð0 ×Ññ",ó ð",òJ&ò.%&òPò<&ò*?ó)rR   