Ë
    ¹ûàg‰$  ã                   óª   — d dl mZ d dlmZ dZ G d„ de«      Z G d„ de«      Z G d„ d	«      Z G d
„ de«      Z	 G d„ de«      Z
 G d„ de	«      Zdd„Zy)é    )Úcontextmanager)Úcopy)z'django.template.context_processors.csrfc                   ó   — e Zd ZdZy)ÚContextPopExceptionz,pop() has been called more times than push()N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úU/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/django/template/context.pyr   r      s   „ Ù2Ør   r   c                   ó*   ‡ — e Zd Zˆ fd„Zd„ Zd„ Zˆ xZS )ÚContextDictc                 óh   •— t        ‰| �  |i |¤Ž |j                  j                  | «       || _        y ©N)ÚsuperÚ__init__ÚdictsÚappendÚcontext)Úselfr   ÚargsÚkwargsÚ	__class__s       €r   r   zContextDict.__init__   s.   ø€ Ü‰Ñ˜$Ð) &Ò)à�‰×Ñ˜TÔ"Øˆ�r   c                 ó   — | S r   r   ©r   s    r   Ú	__enter__zContextDict.__enter__   s   € Øˆr   c                 ó8   — | j                   j                  «        y r   )r   Úpop)r   r   r   s      r   Ú__exit__zContextDict.__exit__   s   € Ø�‰×ÑÕr   )r   r   r	   r   r   r    Ú__classcell__©r   s   @r   r   r      s   ø„ ôòör   r   c                   óˆ   ‡ — e Zd Zdd„Zdd„Zˆ fd„Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zdd„Zdd„Zdd„Zd„ Zd„ Zˆ xZS )ÚBaseContextc                 ó&   — | j                  |«       y r   )Ú_reset_dicts)r   Údict_s     r   r   zBaseContext.__init__   s   € Ø×Ñ˜%Õ r   c                 óÂ   — ddd dœ}|g| _         t        |t        «      r#| xj                   |j                   dd  z  c_         y |�| j                   j                  |«       y y )NTF)ÚTrueÚFalseÚNoneé   )r   Ú
isinstancer$   r   )r   ÚvalueÚbuiltinss      r   r&   zBaseContext._reset_dicts   sV   € Ø ¨5¸$Ñ?ˆØ�ZˆŒ
Ü�eœ[Ô)Ø�JŠJ˜%Ÿ+™+ a b˜/Ñ)ŽJØÐØ�J‰J×Ñ˜eÕ$ð r   c                 óV   •— t        t        «       «      }| j                  d d  |_        |S r   )r   r   r   ©r   Ú	duplicater   s     €r   Ú__copy__zBaseContext.__copy__'   s#   ø€ Üœ›“Mˆ	ØŸ*™*¡Q˜-ˆ	ŒØÐr   c                 ó,   — t        | j                  «      S r   )Úreprr   r   s    r   Ú__repr__zBaseContext.__repr__,   s   € Ü�D—J‘JÓÐr   c                 ó,   — t        | j                  «      S r   ©Úreversedr   r   s    r   Ú__iter__zBaseContext.__iter__/   s   € Ü˜Ÿ
™
Ó#Ð#r   c                 óš   — g }|D ]6  }t        |t        «      r||j                  dd  z  }Œ&|j                  |«       Œ8 t	        | g|¢­i |¤ŽS ©Nr,   )r-   r$   r   r   r   )r   r   r   r   Úds        r   ÚpushzBaseContext.push2   sV   € ØˆØò 	 ˆAÜ˜!œ[Ô)Ø˜Ÿ™  ˜Ñ$‘à—‘˜Q•ð		 ô
 ˜4Ð2 %Ò2¨6Ñ2Ð2r   c                 ór   — t        | j                  «      dk(  rt        ‚| j                  j                  «       S r<   )Úlenr   r   r   r   s    r   r   zBaseContext.pop;   s)   € Üˆt�z‰z‹?˜aÒÜ%Ð%Ø�z‰z�~‰~ÓÐr   c                 ó(   — || j                   d   |<   y)z%Set a variable in the current contextéÿÿÿÿN©r   )r   Úkeyr.   s      r   Ú__setitem__zBaseContext.__setitem__@   s   € à#ˆ�
‰
�2‰�sÒr   c                 óp   — | j                   d   }t        | j                   «      D ]
  }||v sŒ|} n |||<   y)z|
        Set a variable in one of the higher contexts if it exists there,
        otherwise in the current context.
        rB   N)r   r9   )r   rD   r.   r   r=   s        r   Ú
set_upwardzBaseContext.set_upwardD   sC   € ð
 —*‘*˜R‘.ˆÜ˜$Ÿ*™*Ó%ò 	ˆAØ�aŠxØ�Ùð	ð ˆ�Šr   c                 ób   — t        | j                  «      D ]  }||v sŒ||   c S  t        |«      ‚)zHGet a variable's value, starting at the current context and going upward)r9   r   ÚKeyError)r   rD   r=   s      r   Ú__getitem__zBaseContext.__getitem__P   s6   € ä˜$Ÿ*™*Ó%ò 	ˆAØ�aŠxØ˜‘v’ð	ô �s‹mÐr   c                 ó$   — | j                   d   |= y)z*Delete a variable from the current contextrB   NrC   ©r   rD   s     r   Ú__delitem__zBaseContext.__delitem__W   s   € à�J‰J�r‰N˜3Ñr   c                 ó@   ‡— t        ˆfd„| j                  D «       «      S )Nc              3   ó&   •K  — | ]  }‰|v –— Œ
 y ­wr   r   )Ú.0r=   rD   s     €r   ú	<genexpr>z+BaseContext.__contains__.<locals>.<genexpr>\   s   øè ø€ Ò0 �3˜!”8Ñ0ùs   ƒ)Úanyr   rL   s    `r   Ú__contains__zBaseContext.__contains__[   s   ø€ ÜÓ0 T§Z¡ZÔ0Ó0Ð0r   c                 óP   — t        | j                  «      D ]  }||v sŒ||   c S  |S r   r8   )r   rD   Ú	otherwiser=   s       r   ÚgetzBaseContext.get^   s2   € Ü˜$Ÿ*™*Ó%ò 	ˆAØ�aŠxØ˜‘v’ð	ð Ðr   c                 ó8   — 	 | |   S # t         $ r	 || |<   Y |S w xY wr   )rI   )r   rD   Údefaults      r   Ú
setdefaultzBaseContext.setdefaultd   s.   € ð	 Ø˜‘9ÐøÜò 	 ØˆD�ŠIØˆð	 ús   ‚ ‡˜c                 ó>   — t        | «      }|j                  |«       |S )z{
        Return a new context with the same properties, but with only the
        values given in 'values' stored.
        )r   r&   )r   ÚvaluesÚnew_contexts      r   ÚnewzBaseContext.newk   s!   € ô
 ˜4“jˆØ× Ñ  Ô(ØÐr   c                 óN   — i }| j                   D ]  }|j                  |«       Œ |S )z6
        Return self.dicts as one dictionary.
        )r   Úupdate)r   Úflatr=   s      r   ÚflattenzBaseContext.flattent   s,   € ð ˆØ—‘ò 	ˆAØ�K‰K˜�Nð	àˆr   c                 óp   — t        |t        «      st        S | j                  «       |j                  «       k(  S )zN
        Compare two contexts by comparing theirs 'dicts' attributes.
        )r-   r$   ÚNotImplementedra   )r   Úothers     r   Ú__eq__zBaseContext.__eq__}   s+   € ô ˜%¤Ô-Ü!Ð!à�|‰|‹~ §¡£Ñ0Ð0r   r   )r   r   r	   r   r&   r3   r6   r:   r>   r   rE   rG   rJ   rM   rS   rV   rY   r]   ra   re   r!   r"   s   @r   r$   r$      sX   ø„ ó!ó%ôò
 ò$ò3ò ò
$ò
òò ò1óóóòö1r   r$   c                   óD   ‡ — e Zd ZdZdˆ fd„	Zed„ «       Zˆ fd„Zd„ Zˆ xZ	S )ÚContextz&A stack container for variable contextc                 óˆ   •— || _         || _        || _        d| _        t	        «       | _        d | _        t        ‰| �!  |«       y )NÚunknown)	Ú
autoescapeÚuse_l10nÚuse_tzÚtemplate_nameÚRenderContextÚrender_contextÚtemplater   r   )r   r'   rj   rk   rl   r   s        €r   r   zContext.__init__Š   s@   ø€ Ø$ˆŒØ ˆŒØˆŒØ&ˆÔÜ+›oˆÔð ˆŒÜ‰Ñ˜Õr   c              #   óx   K  — | j                   �t        d«      ‚|| _         	 d –— d | _         y # d | _         w xY w­w)Nú&Context is already bound to a template)rp   ÚRuntimeError)r   rp   s     r   Úbind_templatezContext.bind_template•   s9   è ø€ à�=‰=Ð$ÜÐGÓHÐHØ ˆŒð	!Ûà ˆD�Mø˜DˆD�Müs   ‚:¢. ¦:®	7·:c                 óX   •— t         ‰| �  «       }t        | j                  «      |_        |S r   )r   r3   r   ro   r1   s     €r   r3   zContext.__copy__Ÿ   s)   ø€ Ü‘GÑ$Ó&ˆ	Ü#'¨×(;Ñ(;Ó#<ˆ	Ô ØÐr   c                 ó¢   — t        |d«      st        d«      ‚t        |t        «      r|j                  dd j                  «       }t        | |«      S )z;Push other_dict to the stack of dictionaries in the ContextrJ   z6other_dict must be a mapping (dictionary-like) object.r,   N)ÚhasattrÚ	TypeErrorr-   r$   r   r   r   )r   Ú
other_dicts     r   r_   zContext.update¤   sJ   € ä�z =Ô1ÜÐTÓUÐUÜ�j¤+Ô.Ø#×)Ñ)¨!¨"Ð-×1Ñ1Ó3ˆJÜ˜4 Ó,Ð,r   )NTNN)
r   r   r	   r
   r   r   rt   r3   r_   r!   r"   s   @r   rg   rg   ‡   s)   ø„ Ù,õ	 ð ñ!ó ð!ôö
-r   rg   c                   ó@   — e Zd ZdZdZd„ Zd„ Zdd„Zd„ Ze	d	d„«       Z
y)
rn   aÈ  
    A stack container for storing Template state.

    RenderContext simplifies the implementation of template Nodes by providing a
    safe place to store state between invocations of a node's `render` method.

    The RenderContext also provides scoping rules that are more sensible for
    'template local' variables. The render context stack is pushed before each
    template is rendered, creating a fresh scope with nothing in it. Name
    resolution fails if a variable is not found at the top of the RequestContext
    stack. Thus, variables are local to a specific template and don't affect the
    rendering of other templates as they would if they were stored in the normal
    template context.
    Nc              #   ó>   K  — | j                   d   E d {  –—†  y 7 Œ­w©NrB   rC   r   s    r   r:   zRenderContext.__iter__¿   s   è ø€ Ø—:‘:˜b‘>×!Ò!ús   ‚•–c                 ó$   — || j                   d   v S r|   rC   rL   s     r   rS   zRenderContext.__contains__Â   s   € Ø�d—j‘j ‘nÐ$Ð$r   c                 ó@   — | j                   d   j                  ||«      S r|   )r   rV   )r   rD   rU   s      r   rV   zRenderContext.getÅ   s   € Ø�z‰z˜"‰~×!Ñ! # yÓ1Ð1r   c                 ó&   — | j                   d   |   S r|   rC   rL   s     r   rJ   zRenderContext.__getitem__È   s   € Ø�z‰z˜"‰~˜cÑ"Ð"r   c              #   óÒ   K  — | j                   }|| _         |r| j                  «        	 d –— || _         |r| j                  «        y y # || _         |r| j                  «        w w xY w­wr   )rp   r>   r   )r   rp   Úisolated_contextÚinitials       r   Ú
push_statezRenderContext.push_stateË   s]   è ø€ à—-‘-ˆØ ˆŒÙØ�I‰IŒKð	Ûà#ˆDŒMÙØ—‘•
ð  øð $ˆDŒMÙØ—‘•
ð  üs   ‚&A'©A ­A'ÁA$Á$A'r   )T)r   r   r	   r
   rp   r:   rS   rV   rJ   r   rƒ   r   r   r   rn   rn   ­   s6   „ ñð €Hò"ò%ó2ò#ð ò
ó ñ
r   rn   c                   óJ   ‡ — e Zd ZdZ	 	 	 	 	 dˆ fd„	Zed„ «       Zdˆ fd„	Zˆ xZS )ÚRequestContextzù
    This subclass of template.Context automatically populates itself using
    the processors defined in the engine's configuration.
    Additional processors can be specified as a list of callables
    using the "processors" keyword argument.
    c                 óÚ   •— t         ‰| �  ||||¬«       || _        |€dn
t        |«      | _        t        | j                  «      | _        | j                  i «       | j                  i «       y )N)rk   rl   rj   r   )	r   r   ÚrequestÚtupleÚ_processorsr@   r   Ú_processors_indexr_   )r   r‡   r'   Ú
processorsrk   rl   rj   r   s          €r   r   zRequestContext.__init__á   s`   ø€ ô 	‰Ñ˜¨¸&ÈZÐÔXØˆŒØ!+Ð!3™2¼¸zÓ9JˆÔÜ!$ T§Z¡Z£ˆÔð 	�‰�BŒð 	�‰�B�r   c              #   ó  K  — | j                   �t        d«      ‚|| _         |j                  j                  | j                  z   }i }|D ]&  } || j
                  «      }	 |j                  |«       Œ( || j                  | j                  <   	 d –— d | _         i | j                  | j                  <   y # t        $ r}t        d|j                  › d�«      |‚d }~ww xY w# d | _         i | j                  | j                  <   w xY w­w)Nrr   zContext processor z didn't return a dictionary.)rp   rs   ÚengineÚtemplate_context_processorsr‰   r‡   r_   rx   r	   r   rŠ   )r   rp   r‹   ÚupdatesÚ	processorr   Úes          r   rt   zRequestContext.bind_templateö   s  è ø€ à�=‰=Ð$ÜÐGÓHÐHà ˆŒà—_‘_×@Ñ@À4×CSÑCSÑSˆ
ØˆØ#ò 	ˆIÙ §¡Ó-ˆGðØ—‘˜wÕ'ð	ð .5ˆ�
‰
�4×)Ñ)Ñ*ð	4Ûà ˆDŒMà13ˆD�J‰J�t×-Ñ-Ò.øô ò ÜØ(¨×)?Ñ)?Ð(@ð A"ð "óð ðûðûð !ˆDŒMà13ˆD�J‰J�t×-Ñ-Ò.üsB   ‚AD ÁB0Á/D ÂC Â!D Â0	CÂ9CÃCÃD Ã"C=Ã=D c                 óB   •— t         ‰| �  |«      }t        |d«      r|`|S )NrŠ   )r   r]   rw   rŠ   )r   r[   r\   r   s      €r   r]   zRequestContext.new  s*   ø€ Ü‘g‘k &Ó)ˆô �;Ð 3Ô4ØÐ-ØÐr   )NNNNTr   )	r   r   r	   r
   r   r   rt   r]   r!   r"   s   @r   r…   r…   Ù   s<   ø„ ñð ØØØØõð* ñ4ó ð4÷6ñ r   r…   Nc                 óÐ   — | �2t        | t        «      s"t        d| j                  j                  z  «      ‚|€t        | fi |¤Ž} | S | }t        |fi |¤Ž} |r| j                  |«       | S )zT
    Create a suitable Context from a plain dict and optionally an HttpRequest.
    z&context must be a dict rather than %s.)r-   Údictrx   r   r   rg   r…   r>   )r   r‡   r   Úoriginal_contexts       r   Úmake_contextr–     s}   € ð Ð¤:¨g´tÔ#<ÜØ4°w×7HÑ7H×7QÑ7QÑQó
ð 	
ð €Ü˜'Ñ, VÑ,ˆð €Nð	 #ÐÜ  Ñ3¨FÑ3ˆÙØ�L‰LÐ)Ô*Ø€Nr   r   )Ú
contextlibr   r   Ú_builtin_context_processorsÚ	Exceptionr   r”   r   r$   rg   rn   r…   r–   r   r   r   ú<module>rš      se   ðÝ %Ý ð KÐ ô	˜)ô 	ô
�$ô ÷i1ñ i1ôX#-ˆkô #-ôL)�Kô )ôX?�Wô ?ôDr   