Ë
    ¦#ijS
  ã                   ót   — d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
 d„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zy)aR  
A set of request processors that return dictionaries to be merged into a
template context. Each function takes the request object as its only parameter
and returns a dictionary to add to the context.

These are referenced from the 'context_processors' option of the configuration
of a DjangoTemplates backend and used by RequestContext.
é    N)Úsettings©Ú	get_nonce©Ú	get_token)ÚSimpleLazyObjectÚlazyc                 ó(   ‡ — ˆ fd„}dt        |«      iS )z 
    Context processor that provides a CSRF token, or the string 'NOTPROVIDED'
    if it has not been provided by either a view decorator or the middleware
    c                  ó$   •— t        ‰«      } | €y| S )NÚNOTPROVIDEDr   )ÚtokenÚrequests    €ú\/var/www/html/office/venv/lib/python3.12/site-packages/django/template/context_processors.pyÚ_get_valzcsrf.<locals>._get_val   s   ø€ Ü˜'Ó"ˆØˆ=ð !àˆLó    Ú
csrf_token)r   )r   r   s   ` r   Úcsrfr      s   ø€ ôð Ô*¨8Ó4Ð5Ð5r   c                 óÄ   ‡— i }t         j                  rL| j                  j                  d«      t         j                  v r!d|d<   ddlmŠ t        ˆfd„t        «      |d<   |S )z9
    Return context variables helpful for debugging.
    ÚREMOTE_ADDRTÚdebugr   ©Úconnectionsc                  óf   •— t        t        j                  j                  ˆ fd„‰ D «       «      «      S )Nc              3   ó<   •K  — | ]  }‰|   j                   –— Œ y ­w)N)Úqueries)Ú.0Úxr   s     €r   ú	<genexpr>z*debug.<locals>.<lambda>.<locals>.<genexpr>2   s    øè ø€ ò .Ø/0�K ‘N×*Õ*ñ.ùs   ƒ)ÚlistÚ	itertoolsÚchainÚfrom_iterabler   s   €r   ú<lambda>zdebug.<locals>.<lambda>1   s+   ø€ ”DÜ—‘×-Ñ-ó .Ø4?ô.ó ó€ r   Úsql_queries)	r   ÚDEBUGÚMETAÚgetÚINTERNAL_IPSÚ	django.dbr   r	   r   )r   Úcontext_extrasr   s     @r   r   r   %   s]   ø€ ð €NÜ‡~‚~˜'Ÿ,™,×*Ñ*¨=Ó9¼X×=RÑ=RÑRØ"&ˆ�wÑÝ)ô )-óô
 ó)
ˆ�}Ñ%ð Ðr   c                 ón   — ddl m} t        j                  |j	                  «       |j                  «       dœS )Nr   )Útranslation)Ú	LANGUAGESÚLANGUAGE_CODEÚLANGUAGE_BIDI)Údjango.utilsr,   r   r-   Úget_languageÚget_language_bidi)r   r,   s     r   Úi18nr3   ;   s2   € Ý(ô ×'Ñ'Ø$×1Ñ1Ó3Ø$×6Ñ6Ó8ñð r   c                 ó2   — ddl m} d|j                  «       iS )Nr   )ÚtimezoneÚ	TIME_ZONE)r0   r5   Úget_current_timezone_name)r   r5   s     r   Útzr8   E   s   € Ý%à˜×;Ñ;Ó=Ð>Ð>r   c                 ó&   — dt         j                  iS )z>
    Add static-related context variables to the context.
    Ú
STATIC_URL)r   r:   ©r   s    r   Ústaticr<   K   s   € ð œ(×-Ñ-Ð.Ð.r   c                 ó&   — dt         j                  iS )z=
    Add media-related context variables to the context.
    Ú	MEDIA_URL)r   r>   r;   s    r   Úmediar?   R   s   € ð œ×+Ñ+Ð,Ð,r   c                 ó
   — d| iS )Nr   © r;   s    r   r   r   Y   s   € Ø�wÐÐr   c                 ó   — dt        | «      iS )z+
    Add the CSP nonce to the context.
    Ú	csp_noncer   r;   s    r   ÚcsprD   ]   s   € ð œ 7Ó+Ð,Ð,r   )Ú__doc__r    Údjango.confr   Údjango.middleware.cspr   Údjango.middleware.csrfr   Údjango.utils.functionalr   r	   r   r   r3   r8   r<   r?   r   rD   rA   r   r   ú<module>rJ      sC   ðñó å  Ý +Ý ,ß :ò6ò&ò,ò?ò/ò-ò ó-r   