ó
    |ñ:ip  ã                  ó|  • S SK J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KJr  SSKJr  SSKJr  \R(                  (       a  SSKJr  SSKJr  SSKJr  SS jr " S S\5      r " S S\5      rSS jr      SS jrS S jr        S!S jr       S"S jr!S#S jr"g)$é    )ÚannotationsN)Ú
BaseLoader)ÚEnvironment)ÚTemplate)ÚTemplateNotFoundé   )Ú_cv_app)Ú_cv_request)Úcurrent_app)Úrequest)Ústream_with_context)Úbefore_render_template)Útemplate_rendered)ÚFlask)ÚApp)ÚScaffoldc                 óÈ   • [         R                  " S5      n [        R                  " S5      n0 nU b  U R                  US'   Ub  UR                  US'   UR
                  US'   U$ )zKDefault template context processor.  Injects `request`,
`session` and `g`.
NÚgr   Úsession)r	   Úgetr
   r   r   r   )ÚappctxÚreqctxÚrvs      ÚS/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/flask/templating.pyÚ_default_template_ctx_processorr      s]   € ô �[Š[˜Ó€FÜ�_Š_˜TÓ"€FØ€BØÑØ—(‘(ˆˆ3‰ØÑØŸ™ˆˆ9‰ØŸ™ˆˆ9‰Ø€Ió    c                  ó"   • \ rS rSrSrSS jrSrg)r   é'   z¿Works like a regular Jinja environment but has some additional
knowledge of how Flask's blueprint works so that it can prepend the
name of the blueprint to referenced templates if necessary.
c                óp   • SU;  a  UR                  5       US'   [        R                  " U 40 UD6  Xl        g )NÚloader)Úcreate_global_jinja_loaderÚBaseEnvironmentÚ__init__Úapp)Úselfr$   Úoptionss      r   r#   ÚEnvironment.__init__-   s5   € Ø˜7Ó"Ø #× >Ñ >Ó @ˆG�HÑÜ× Ò  Ñ1¨Ò1Ø�r   ©r$   N)r$   r   r&   út.AnyÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r#   Ú__static_attributes__© r   r   r   r   '   s   † ñ÷
r   r   c                  óx   • \ rS rSrSrSS jr      SS jr      SS jr      SS jrSS jr	SS jr
S	rg
)ÚDispatchingJinjaLoaderé4   zTA loader that looks for templates in the application and all
the blueprint folders.
c                ó   • Xl         g ©Nr(   )r%   r$   s     r   r#   ÚDispatchingJinjaLoader.__init__9   s   € Ø�r   c                ó‚   • U R                   R                  S   (       a  U R                  X5      $ U R                  X5      $ )NÚEXPLAIN_TEMPLATE_LOADING)r$   ÚconfigÚ_get_source_explainedÚ_get_source_fast)r%   ÚenvironmentÚtemplates      r   Ú
get_sourceÚ!DispatchingJinjaLoader.get_source<   s7   € ð �8‰8�?‰?Ð5×6Ø×-Ñ-¨kÓDÐDØ×$Ñ$ [Ó;Ð;r   c                ó  • / nS nU R                  U5       H/  u  pV UR                  X5      nUc  UnUR                  XeU45        M1     SSKJn  U" U R                  X#5        Ub  U$ [        U5      e! [         a    S n NNf = f)Nr   )Ú!explain_template_loading_attempts)Ú_iter_loadersr@   r   ÚappendÚdebughelpersrC   r$   )	r%   r>   r?   ÚattemptsÚtrvÚsrcobjr    r   rC   s	            r   r<   Ú,DispatchingJinjaLoader._get_source_explainedC   s–   € ð ˆàLPˆà"×0Ñ0°Ö:‰NˆFðØ×&Ñ& {Ó=�Ø‘;Ø�Cð �O‰O˜V¨RÐ0Ö1ñ ;õ 	Dá)¨$¯(©(°HÔGà‰?ØˆJÜ˜xÓ(Ð(øô $ó Ø’ðús   œA2Á2BÂ Bc                ó’   • U R                  U5       H  u  p4 UR                  X5      s  $    [        U5      e! [         a     M3  f = fr7   )rD   r@   r   )r%   r>   r?   Ú_srcobjr    s        r   r=   Ú'DispatchingJinjaLoader._get_source_fast[   sR   € ð  $×1Ñ1°(Ö;‰OˆGðØ×(Ñ(¨Ó?Ò?ñ  <ô
 ˜xÓ(Ð(øô $ó Úðús   ˜8¸
AÁAc              #  óÌ   #   • U R                   R                  nUb  U R                   U4v •  U R                   R                  5        H  nUR                  nUc  M  X24v •  M     g 7fr7   )r$   Újinja_loaderÚiter_blueprints)r%   r?   r    Ú	blueprints       r   rD   Ú$DispatchingJinjaLoader._iter_loaderse   sZ   é € Ø—‘×&Ñ&ˆØÑØ—(‘(˜FÐ"Ò"àŸ™×1Ñ1Ö3ˆIØ×+Ñ+ˆFØÓ!ØÐ'Ô'ò 4ùs   ‚AA$Á
A$c                óP  • [        5       nU R                  R                  nUb  UR                  UR	                  5       5        U R                  R                  5        H<  nUR                  nUc  M  UR	                  5        H  nUR                  U5        M     M>     [        U5      $ r7   )Úsetr$   rO   ÚupdateÚlist_templatesrP   ÚaddÚlist)r%   Úresultr    rQ   r?   s        r   rV   Ú%DispatchingJinjaLoader.list_templateso   s†   € Ü“ˆØ—‘×&Ñ&ˆØÑØ�M‰M˜&×/Ñ/Ó1Ô2àŸ™×1Ñ1Ö3ˆIØ×+Ñ+ˆFØÓ!Ø &× 5Ñ 5Ö 7�HØ—J‘J˜xÖ(ó !8ñ 4ô �F‹|Ðr   r(   N)r$   r   r*   r+   )r>   r"   r?   Ústrr*   z3tuple[str, str | None, t.Callable[[], bool] | None])r?   r[   r*   z't.Iterator[tuple[Scaffold, BaseLoader]])r*   z	list[str])r,   r-   r.   r/   r0   r#   r@   r<   r=   rD   rV   r1   r2   r   r   r4   r4   4   sm   † ñôð<Ø*ð<Ø69ð<à	<ô<ð)Ø*ð)Ø69ð)à	<ô)ð0)Ø*ð)Ø69ð)à	<ô)ô(÷r   r4   c                óÆ   • U R                  U5        [        R                  " X R                  XS9  UR	                  U5      n[
        R                  " X R                  XS9  U$ ©N©Ú_async_wrapperr?   Úcontext)Úupdate_template_contextr   ÚsendÚensure_syncÚrenderr   )r$   r?   r`   r   s       r   Ú_renderre   ~   sU   € Ø×Ñ Ô(Ü×ÒØŸO™O°hòð 
�‰˜Ó	!€BÜ×ÒØŸO™O°hòð €Ir   c                óz   • [         R                  " 5       nUR                  R                  U 5      n[	        X#U5      $ )zøRender a template by name with the given context.

:param template_name_or_list: The name of the template to render. If
    a list is given, the first name to exist will be rendered.
:param context: The variables to make available in the template.
)r   Ú_get_current_objectÚ	jinja_envÚget_or_select_templatere   ©Útemplate_name_or_listr`   r$   r?   s       r   Úrender_templaterl   Š   s4   € ô ×
)Ò
)Ó
+€CØ�}‰}×3Ñ3Ð4IÓJ€HÜ�3 'Ó*Ð*r   c                óz   • [         R                  " 5       nUR                  R                  U 5      n[	        X#U5      $ )zÃRender a template from the given source string with the given
context.

:param source: The source code of the template to render.
:param context: The variables to make available in the template.
)r   rg   rh   Úfrom_stringre   ©Úsourcer`   r$   r?   s       r   Úrender_template_stringrq   ™   s3   € ô ×
)Ò
)Ó
+€CØ�}‰}×(Ñ(¨Ó0€HÜ�3 'Ó*Ð*r   c                ó¾   ^ ^^• T R                  T5        [        R                  " T T R                  TTS9  SU UU4S jjnU" 5       n[        (       a  [        U5      nU$ )Nr^   c               3  ó†   >#   • TR                  T5       S h  v•N   [        R                  " T T R                  TTS9  g  N&7fr]   )Úgenerater   rb   rc   )r$   r`   r?   s   €€€r   rt   Ú_stream.<locals>.generate­   s:   øé € Ø×$Ñ$ WÓ-×-Ð-Ü×ÒØ §¡¸(ÈGó	
ñ 	.ùs   ƒA˜?™'A)r*   út.Iterator[str])ra   r   rb   rc   r   r   )r$   r?   r`   rt   r   s   ```  r   Ú_streamrw   ¥   sW   ú€ ð ×Ñ Ô(Ü×ÒØ˜CŸO™O°hÈò÷
ñ 
ñ 
‹€B÷ ‚wÜ  Ó$ˆà€Ir   c                óz   • [         R                  " 5       nUR                  R                  U 5      n[	        X#U5      $ )aw  Render a template by name with the given context as a stream.
This returns an iterator of strings, which can be used as a
streaming response from a view.

:param template_name_or_list: The name of the template to render. If
    a list is given, the first name to exist will be rendered.
:param context: The variables to make available in the template.

.. versionadded:: 2.2
)r   rg   rh   ri   rw   rj   s       r   Ústream_templatery   ¼   s4   € ô ×
)Ò
)Ó
+€CØ�}‰}×3Ñ3Ð4IÓJ€HÜ�3 'Ó*Ð*r   c                óz   • [         R                  " 5       nUR                  R                  U 5      n[	        X#U5      $ )aB  Render a template from the given source string with the given
context as a stream. This returns an iterator of strings, which can
be used as a streaming response from a view.

:param source: The source code of the template to render.
:param context: The variables to make available in the template.

.. versionadded:: 2.2
)r   rg   rh   rn   rw   ro   s       r   Ústream_template_stringr{   Ï   s3   € ô ×
)Ò
)Ó
+€CØ�}‰}×(Ñ(¨Ó0€HÜ�3 'Ó*Ð*r   )r*   údict[str, t.Any])r$   r   r?   r   r`   r|   r*   r[   )rk   ú%str | Template | list[str | Template]r`   r)   r*   r[   )rp   r[   r`   r)   r*   r[   )r$   r   r?   r   r`   r|   r*   rv   )rk   r}   r`   r)   r*   rv   )rp   r[   r`   r)   r*   rv   )#Ú
__future__r   ÚtypingÚtÚjinja2r   r   r"   r   r   Úglobalsr	   r
   r   r   Úhelpersr   Úsignalsr   r   ÚTYPE_CHECKINGr$   r   Ú
sansio.appr   Úsansio.scaffoldr   r   r4   re   rl   rq   rw   ry   r{   r2   r   r   Ú<module>rˆ      sÎ   ðÝ "ã å Ý 1Ý Ý #å Ý  Ý  Ý Ý (Ý +Ý &à‡?‡?ÝÝÝ)ôô
�/ô 
ôG˜Zô GôT	ð+Ø@ð+àð+ð 	ô+ô	+ðØ	ðØ"ðØ-=ðàôð.+Ø@ð+àð+ð ô+õ&+r   