�
;��g �
�P � d dl Z d dlZd dlmZ d dlmZ ddlmZ ddlmZ ej rd dl
Z ej d� � Z
d� Zeeeeeee ed� � hZd ej ej d df d
dfd�Z G d� d
ej e
� � Z dd�Zd dd
ej d fd�ZdS )� N)�WRAPPER_ASSIGNMENTS)�wraps� )�_PassArg)�pass_eval_context�Vc � � � � fd�}|S )Nc �� �� ��� t j �� � }|d u �|t j u rdt j dt
fd��ndt j dt
fd��d}t
t t � � � |� � � � }t �|�� � t � |d�� � � ���fd �� � � � }�rt |� � }d
|_ |S )N�args�returnc �L � t j t | d j � � S �Nr )�t�cast�bool�is_async�r s �b/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/jinja2/async_utils.pyr z2async_variant.<locals>.decorator.<locals>.is_async s � ��v�d�D��G�$4�5�5�5� c �V � t j t | d j j � � S r )r r r �environmentr r s r r z2async_variant.<locals>.decorator.<locals>.is_async s � ��v�d�D��G�$7�$@�A�A�Ar )�
__module__�__name__�__qualname__)�assigned� )r �updatedc �V �� �| � � }�r
| dd � } |r �| i |��S �| i |��S )Nr r )r �kwargs�b�
async_funcr �need_eval_context�normal_funcs ����r �wrapperz1async_variant.<locals>.decorator.<locals>.wrapper% sY �� � �����A� �
��A�B�B�x���
3�!�z�4�2�6�2�2�2��;��/��/�/�/r T)
r �from_objr r �Anyr �tuple�setr �
differencer r �jinja_async_variant)r! �pass_arg�async_func_attrs�normal_func_attrsr$ r r"