• File: runtime.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/jinja2/__pycache__/runtime.cpython-37.pyc
  • Date Modified: 06/27/2022 9:53 PM
  • File size: 32.18 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

^a@s2dZddlZddlZddlZddlmZddlmZddl	m
Z
ddl	mZddl	mZdd	l
mZdd
l
mZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZedZejdej dej!fdZ"ej#rNddl$Z$ddl%Z&ddl'm(Z(Gddde&j)Z*dddd d!d"d#d$d%d&d'd(d)d*d+gZ+d,d-d.gZ,eed/d0d'Z-ej.ej!e/d1d2d%Z0ej.ej!e/d1d3d&Z1ej.ej!e/d1d4d5Z2dQd7ej3e/ej4e/ej d8gej5e/ffej3ej4e/ej!fe6ej3ej7e/ej!fej3ej8e/ej!fd8d9d:d;Z9Gd<ddZ:e"e"d=d>d?Z;ej8j<Gd@d8d8Z=GdAdBdBZ>GdCddZ?GdDd,d,e?Z@GdEddZAGdFd*d*ZBdeBfej3dGejCeBejCeBdHdIdJZDGdKdLdLeBZEGdMdNdNeBZFGdOdPdPeBZGeB`HeE`HeF`HeG`HdS)Rz;The runtime functions and state used by compiled templates.N)abc)chain)escape)Markup)soft_str)
auto_aiter)
auto_await)TemplateNotFound)TemplateRuntimeError)UndefinedError)EvalContext)_PassArg)concat)internalcode)missing)	Namespace)object_type_repr)pass_eval_contextVF.)Zbound)Environmentc@s(eZdZdejedeedddZdS)LoopRenderFuncr)reciterloop_render_funcdepthreturncCsdS)N)selfrrrrr?/opt/alt/python37/lib/python3.7/site-packages/jinja2/runtime.py__call__#szLoopRenderFunc.__call__N)r)	__name__
__module____qualname__tIterablerintstrr rrrrr"srLoopContextTemplateReferenceMacrorrrrrmarkup_joinstr_joinidentityr
r	UndefinedrAsyncLoopContextrr	)xrcCs|S)zLReturns its argument. Useful for certain things in the
    environment.
    r)r0rrrr-Es)seqrcCsLg}tt|}x4|D],}||t|drtdt||SqWt|S)z?Concatenation that escapes if necessary and converts to string.__html__)maprappendhasattrrjoinrr)r1Zbufiteratorargrrrr+Ls



cCsttt|S)z3Simple args to string conversion and concatenation.)rr4r')r1rrrr,WscCs ddl}|jdtddt|S)NrzWThis template must be recompiled with at least Jinja 3.0, or it will fail in Jinja 3.1.)
stacklevel)warningswarnDeprecationWarningr,)r1r<rrrunicode_join\sr?FrContext)environment
template_nameblocksvarssharedglobalslocalsrc
Csp|dkri}|r|}nt|pdf|}|r\|r6t|}x$|D]\}}	|	tk	r@|	||<q@W|j|||||dS)z%Internal helper for context creation.Nr)rF)dictitemsrZ
context_class)
rArBrCrDrErFrGparentkeyvaluerrrnew_contexths
rMc@s@eZdZdZdddddZeejddd	Zed
ddZ	dS)
r)zThe `self` in templates.r@N)contextrcCs
||_dS)N)_TemplateReference__context)rrNrrr__init__szTemplateReference.__init__)namercCs|jj|}t||j|dS)Nr)rOrCBlockReference)rrQrCrrr__getitem__szTemplateReference.__getitem__)rcCsdt|jd|jjdS)N< >)typer!rOrQ)rrrr__repr__szTemplateReference.__repr__)
r!r"r#__doc__rPr'r$AnyrSrXrrrrr)s)dict_methodrcs,tdtjdfdd}tt|S)Nr@)rrcs|S)N)get_all)r)r[rrf_allsz_dict_method_all.<locals>.f_all)	functoolswrapsr$rZcastr)r[r]r)r[r_dict_method_allsrac
@seZdZUdZdZejeed<ddddZ	d*dej
eejfej
eej
eejdgejeffej
ejeejfd	d
dZeejdgejefejdd
ddZd+eejejdddZeejejdfdddZeejdddZej
eejfdddZej
eejfdddZeejejejejejdfdddZd,ej
ej
eejfdd d!d"ZeejZeejZeej Z eed#d$d%Z!eejdd&d'Z"edd(d)Z#dS)-r@aThe template context holds the variables of a template.  It stores the
    values passed to the template and also the names the template exports.
    Creating instances is neither supported nor useful as it's created
    automatically at various stages of the template evaluation and should not
    be created by hand.

    The context is immutable.  Modifications on :attr:`parent` **must not**
    happen and modifications on :attr:`vars` are allowed from generated
    template code only.  Template filters and global functions marked as
    :func:`pass_context` get the active context passed as first argument
    and are allowed to access the context read-only.

    The template context supports read only dict operations (`get`,
    `keys`, `values`, `items`, `iterkeys`, `itervalues`, `iteritems`,
    `__getitem__`, `__contains__`).  Additionally there is a :meth:`resolve`
    method that doesn't fail with a `KeyError` but returns an
    :class:`Undefined` object for missing variables.
    F_legacy_resolve_modeN)rcCsDd|jkrd|_n.d|jks"|jr@ddl}|jdtddd|_dS)	Nresolve_or_missingFresolverzOverriding 'resolve' is deprecated and will not have the expected behavior in Jinja 3.1. Override 'resolve_or_missing' instead r:)r;T)__dict__rbr<r=r>)clsr<rrr__init_subclass__s
zContext.__init_subclass__r)rArJrQrCrFcCs^||_i|_||_t|j||_t|_||_|dkr<tnt||_dd|	D|_
dS)NcSsi|]\}}|g|qSrr).0kvrrr
<dictcomp>sz$Context.__init__.<locals>.<dictcomp>)rJrDrAr
eval_ctxset
exported_varsrQZglobals_keysrIrC)rrArJrQrCrFrrrrPszContext.__init__)rRr.)rQcurrentrcCs\y$|j|}||d}||Wn(tk
rL|jjd|dddSXt||||S)zRender a parent block.rz there is no parent block called .super)rQ)rCindexLookupErrorrA	undefinedrR)rrQrorCrrrrrrqs
z
Context.super)rKdefaultrcCs"y||Stk
r|SXdS)zLook up a variable by name, or return a default if the key is
        not found.

        :param key: The variable name to look up.
        :param default: The value to return if the key is not found.
        N)KeyError)rrKrurrrgetszContext.getr.)rKrcCs`|jr<||jkr|j|S||jkr.|j|S|jj|dS||}|tkr\|jj|dS|S)aNLook up a variable by name, or return an :class:`Undefined`
        object if the key is not found.

        If you need to add custom behavior, override
        :meth:`resolve_or_missing`, not this method. The various lookup
        functions use that method, not this one.

        :param key: The variable name to look up.
        )rQ)rbrDrJrArtrcr)rrKrvrrrrds





zContext.resolvecCsN|jr"||}t|trtS|S||jkr6|j|S||jkrJ|j|StS)aNLook up a variable by name, or return a ``missing`` sentinel
        if the key is not found.

        Override this method to add custom lookup behavior.
        :meth:`resolve`, :meth:`get`, and :meth:`__getitem__` use this
        method. Don't call this method directly.

        :param key: The variable name to look up.
        )rbrd
isinstancer.rrDrJ)rrKrxrrrrcs






zContext.resolve_or_missingcsfddjDS)z+Get a new dict with the exported variables.csi|]}j||qSr)rD)rhri)rrrrk*sz(Context.get_exported.<locals>.<dictcomp>)rn)rr)rrget_exported(szContext.get_exportedcCs(|js|jS|js|jSt|jf|jS)zReturn the complete context as dict including the exported
        variables.  For optimizations reasons this might not return an
        actual copy so be careful with using it.
        )rDrJrH)rrrrr\,s
zContext.get_all)
_Context__objargskwargsrcOsd}t|dr$t|jdk	r$|j}t|}|tjkrt|drP||d}|drh||d}|f|}n.|tjkr|jf|}n|tj	kr|j	f|}|
dd|
ddy
|||Stk
r|j	dSXdS)zCall the callable with the arguments and keyword arguments
        provided but inject the active context or environment as first
        argument if the callable has :func:`pass_context` or
        :func:`pass_environment`.
        Tr NZ
_loop_varsZ_block_varszGvalue was undefined because a callable raised a StopIteration exception)
r6rZfrom_objr rNrwderivedZeval_contextrlrApop
StopIterationrt)Z_Context__selfr{r|r}Z__traceback_hide__Zpass_argrrrcall7s,








zContext.call)rGrcCsDt|j|ji|dd|}|j|_|jdd|jD|S)zInternal helper function to create a derived context.  This is
        used in situations where the system needs a new context in the same
        template that is independent.
        TNcss|]\}}|t|fVqdS)N)list)rhrirjrrr	<genexpr>msz"Context.derived.<locals>.<genexpr>)rMrArQr\rlrCupdaterI)rrGrNrrrr~ds
zContext.derived)rQrcCs||jkp||jkS)N)rDrJ)rrQrrr__contains__tszContext.__contains__cCs||}|tkrt||S)zpLook up a variable by name with ``[]`` syntax, or raise a
        ``KeyError`` if the key is not found.
        )rcrrv)rrKitemrrrrSws
zContext.__getitem__cCs$dt|jd|d|jdS)NrTrUz of rV)rWr!r\rQ)rrrrrXszContext.__repr__)N)N)N)$r!r"r#rYrbr$ZClassVarbool__annotations__rgDictr'rZOptionalCallableIteratorMutableMappingrPUnionrqrwrdrcrzr\rrr~rarHkeysvaluesrIrrSrXrrrrr@s*
X*$


c@szeZdZdZedejejdgejefe	ddddZ
eejddd	d
Z
eedddZeedd
dZdS)rRz"One block on a template reference.r@N)rQrNstackrrcCs||_||_||_||_dS)N)rQ_context_stack_depth)rrQrNrrrrrrPszBlockReference.__init__)rRr.)rcCsJ|jdt|jkr0|jjjd|jdddSt|j|j|j|jdS)zSuper the block.rz there is no parent block called rprq)rQ)rlenrrrArtrQrR)rrrrrqszBlockReference.supercs<tdd|j|j|j2IdH}|jjjr8t|S|S)Nc
s.g|y3dH}Wn
tk
s"X|qYS)N)StopAsyncIteration)rhr0rrr
<listcomp>sz.BlockReference._async_call.<locals>.<listcomp>)rrrrrl
autoescaper)rrxrrr_async_calls
$
zBlockReference._async_callcCs>|jjjr|St|j|j|j}|jjjr:t	|S|S)N)
rrAis_asyncrrrrrlrr)rrxrrrr s

zBlockReference.__call__)r!r"r#rYr'r$Listrrr&rPpropertyrrqrrr rrrrrRs
rRc@seZdZUdZdZdZejee	d<e
Zeje	d<e
Z
eje	d<e
Zeje	d<e
Zeje	d<d7ejeejd
ejdeddd
dZeejeejedddZeedddZedddZeedddZeedddZeedddZeedddZeeddd Zejdd!d"Z eedd#d$Z!eej"ejd
fdd%d&Z#eej"ejd
fdd'd(Z$eed)d*d+Z%ejed,d-d.Z&ddd/d0Z'ej(ejdfdd1d2Z)e*ejee+dd3d4Z,e+dd5d6Z-dS)8r(zeA wrapper iterable for dynamic ``for`` loops, with information
    about the loop and iteration.
    N_length_after_current_before_last_changed_valuerr.r)iterablertrecursedepth0rcCs(||_|||_||_||_||_dS)a@
        :param iterable: Iterable to wrap.
        :param undefined: :class:`Undefined` class to use for next and
            previous items.
        :param recurse: The function to render the loop body when the
            loop is marked recursive.
        :param depth0: Incremented when looping recursively.
        N)	_iterable_to_iterator	_iterator
_undefined_recurser)rrrtrrrrrrPs
zLoopContext.__init__)rrcCst|S)N)iter)rrrrrszLoopContext._to_iterator)rcCsl|jdk	r|jSyt|j|_WnDtk
rdt|j}|||_t||j|jt	k	|_YnX|jS)zLength of the iterable.

        If the iterable is a generator or otherwise does not have a
        size, it is eagerly evaluated to get a size.
        N)
rrr	TypeErrorrrrrrrr)rrrrrlengths

 zLoopContext.lengthcCs|jS)N)r)rrrr__len__szLoopContext.__len__cCs
|jdS)zBHow many levels deep a recursive loop currently is, starting at 1.r)r)rrrrrszLoopContext.depthcCs
|jdS)z-Current iteration of the loop, starting at 1.r)index0)rrrrrrszLoopContext.indexcCs|j|jS)zrNumber of iterations from the end of the loop, ending at 0.

        Requires calculating :attr:`length`.
        )rrr)rrrr	revindex0szLoopContext.revindex0cCs|j|jS)zrNumber of iterations from the end of the loop, ending at 1.

        Requires calculating :attr:`length`.
        )rr)rrrrrevindexszLoopContext.revindexcCs
|jdkS)z0Whether this is the first iteration of the loop.r)r)rrrrfirstszLoopContext.firstcCs$|jtk	r|jSt|jt|_|jS)aReturn the next element in the iterable, or :data:`missing`
        if the iterable is exhausted. Only peeks one item ahead, caching
        the result in :attr:`_last` for use in subsequent checks. The
        cache is reset when :meth:`__next__` is called.
        )rrnextr)rrrr
_peek_nexts
zLoopContext._peek_nextcCs|tkS)zWhether this is the last iteration of the loop.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`groupby` filter avoids that issue.
        )rr)rrrrlastszLoopContext.lastcCs|jr|dS|jS)zZThe item in the previous iteration. Undefined during the
        first iteration.
        zthere is no previous item)rrr)rrrrprevitem)s
zLoopContext.previtemcCs|}|tkr|dS|S)a	The item in the next iteration. Undefined during the last
        iteration.

        Causes the iterable to advance early. See
        :func:`itertools.groupby` for issues this can cause.
        The :func:`jinja-filters.groupby` filter avoids that issue.
        zthere is no next item)rrr)rrxrrrnextitem3s	
zLoopContext.nextitem)r|rcGs|std||jt|S)zReturn a value from the given args, cycling through based on
        the current :attr:`index0`.

        :param args: One or more values to cycle through.
        zno items for cycling given)rrr)rr|rrrcycleCszLoopContext.cycle)rLrcGs|j|kr||_dSdS)zReturn ``True`` if previously called with a different value
        (including when called for the first time).

        :param value: One or more values to compare to the last call.
        TF)r)rrLrrrchangedNs
zLoopContext.changedcCs|S)Nr)rrrr__iter__ZszLoopContext.__iter__cCsF|jtk	r|j}t|_n
t|j}|jd7_|j|_||_||fS)Nr)rrrrrrr)rrxrrr__next__]s

zLoopContext.__next__cCs&|jdkrtd|j||j|jdS)zWhen iterating over nested data, render the body of the loop
        recursively with the given inner iterable data.

        The loop must have the ``recursive`` marker for this to work.
        NzCThe loop must have the 'recursive' marker to be called recursively.)r)rrr)rrrrrr is
zLoopContext.__call__cCs"dt|jd|jd|jdS)NrTrU/rV)rWr!rrr)rrrrrXwszLoopContext.__repr__)Nr).r!r"r#rYrrr$rr&rrrrZrrrr%rTyperPstaticmethodrrrrrrrrrrrrrrrrrrrrTuplerrr'r rXrrrrr(sN
		
c@seZdZUejejed<eejej	e
eje
feje
dddZe
edddZe
eddd	Ze
edd
dZejddd
Ze
edddZe
ejejdfdddZddddZejejdfdddZdS)r/r)rrcCst|S)N)r)rrrrr~szAsyncLoopContext._to_iterator)rcsx|jdk	r|jSyt|j|_WnPtk
rpdd|j2IdH}|||_t||j|jtk	|_YnX|jS)Nc
s.g|y3dH}Wn
tk
s"X|qYS)N)r)rhr0rrrrsz+AsyncLoopContext.length.<locals>.<listcomp>)	rrrrrrrrrr)rrrrrrs
 zAsyncLoopContext.lengthcs|jIdH|jS)N)rrr)rrrrrszAsyncLoopContext.revindex0cs|jIdH|jS)N)rr)rrrrrszAsyncLoopContext.revindexcsH|jtk	r|jSy|jIdH|_Wntk
r@t|_YnX|jS)N)rrr	__anext__r)rrrrrs
zAsyncLoopContext._peek_nextcs|IdHtkS)N)rr)rrrrrszAsyncLoopContext.lastr.cs$|IdH}|tkr |dS|S)Nzthere is no next item)rrr)rrxrrrrs
zAsyncLoopContext.nextitemcCs|S)Nr)rrrr	__aiter__szAsyncLoopContext.__aiter__csL|jtk	r|j}t|_n|jIdH}|jd7_|j|_||_||fS)Nr)rrrrrrr)rrxrrrrs
zAsyncLoopContext.__anext__N)r!r"r#r$
AsyncIteratorrZrrrr%r
AsyncIterablerrr&rrrrrrrrrrrrrrr/{s"

c
@seZdZdZddejdefeejeeeeej	edddZ
eeej
ej
edd	d
Zejej
eeddd
Zejej
eedddZedddZdS)r*zWraps a macro function.Nr.)rAfuncrQ	argumentscatch_kwargs
catch_varargscallerdefault_autoescapec		Csl||_||_t||_||_||_||_||_||_d|k|_	|dkrbt
|jr\|d}n|j}||_dS)Nr)
_environment_funcr_argument_countrQrrrrexplicit_callercallabler_default_autoescape)	rrArrQrrrrrrrrrPs


zMacro.__init__)r|r}rc
	Os|r*t|dtr*|dj}|dd}n|j}t|d|j}t|}d}||jkrx`|jt|dD]B}y||}Wnt	k
rt
}YnX|dkrd}||qlWn|j}|j
r|s|dd}	|	dkr|jjddd}	||	|jr||n@|rFd|kr(td|jd	td|jd
tt||jrd|||jdn.t||jkrtd|jdt|jd|||S)
NrrFrTzNo caller defined)rQzmacro zX was invoked with two values for the special caller argument. This is most likely a bug.z takes no keyword argument z takes not more than z argument(s))ryr
rrrrrrrrvrr5rrrrtrrrQrrr_invoke)
rr|r}rrZoffZfound_callerrQrLrrrrr sH





zMacro.__call__)rrrcs |j|IdH}|rt|S|S)N)rr)rrrrxrrr
_async_invoke0szMacro._async_invokecCs.|jjr|||S|j|}|r*t|}|S)N)rrrrr)rrrrxrrrr8s
z
Macro._invoke)rcCs0|jdkrdnt|j}dt|jd|dS)NZ	anonymousrTrUrV)rQreprrWr!)rrQrrrrXCszMacro.__repr__)N)r!r"r#rYr$rr'rrrrPrrrZr rrrXrrrrr*s4Lc@seZdZdZdZdedefeje	ej
eje	ejeddddZ
ee	ddd	Zeej
ej
d
ddd
Zee	ej
dddZeZZZZeZZZZeZZeZZeZZ eZ!Z"eZ#Z$eZ%Z&Z'Z(eZ)Z*Z+eZ,Z-ej
e.dddZ/ej
e.dddZ0e1dddZ2e	dddZ3e1dddZ4ej5ej
dddZ6ej7ej
dddZ8e.dd d!Z9e	dd"d#Z:dS)$r.ahThe default undefined type.  This undefined type can be printed and
    iterated over, but every other access will raise an :exc:`UndefinedError`:

    >>> foo = Undefined(name='foo')
    >>> str(foo)
    ''
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    )_undefined_hint_undefined_obj_undefined_name_undefined_exceptionN)hintobjrQexcrcCs||_||_||_||_dS)N)rrrr)rrrrQrrrrrP^szUndefined.__init__)rcCsZ|jr|jS|jtkr"|jdSt|jtsDt|jd|jSt|jd|jS)zXBuild a message about the undefined value based on how it was
        accessed.
        z
 is undefinedz has no element z has no attribute )rrrrryr'r)rrrr_undefined_messagejs
zUndefined._undefined_messagezte.NoReturn)r|r}rcOs||jdS)zeRaise an :exc:`UndefinedError` when operations are performed
        on the undefined value.
        N)rr)rr|r}rrr_fail_with_undefined_errorsz$Undefined._fail_with_undefined_error)rQrcCs |dddkrt||S)Nr:__)AttributeErrorr)rrQrrr__getattr__szUndefined.__getattr__)otherrcCst|t|kS)N)rW)rrrrr__eq__szUndefined.__eq__cCs||S)N)r)rrrrr__ne__szUndefined.__ne__cCstt|S)N)idrW)rrrr__hash__szUndefined.__hash__cCsdS)Nr3r)rrrr__str__szUndefined.__str__cCsdS)Nrr)rrrrrszUndefined.__len__ccsdEdHdS)Nrr)rrrrrszUndefined.__iter__cCsxdD]
}dVqWdS)Nrr)r_rrrrs
zUndefined.__aiter__cCsdS)NFr)rrrr__bool__szUndefined.__bool__cCsdS)Nr.r)rrrrrXszUndefined.__repr__);r!r"r#rY	__slots__rrr$rr'rZrrrPrrrrr__add____radd____sub____rsub____mul____rmul__Z__div__Z__rdiv____truediv____rtruediv____floordiv__
__rfloordiv____mod____rmod____pos____neg__r rS__lt____le____gt____ge____int__	__float____complex____pow____rpow__rrrr&rrrrrrrrrXrrrrr.HsB
 zlogging.Logger)loggerbasercsZdkr,ddl}|t|tjtddfddGfddd|}|S)akGiven a logger object this returns a new undefined class that will
    log certain failures.  It will log iterations and printing.  If no
    logger is given a default logger is created.

    Example::

        logger = logging.getLogger(__name__)
        LoggingUndefined = make_logging_undefined(
            logger=logger,
            base=Undefined
        )

    .. versionadded:: 2.8

    :param logger: the logger to use.  If not provided, a default logger
                   is created.
    :param base: the base class to add logging functionality to.  This
                 defaults to :class:`Undefined`.
    Nr)undefrcsd|jdS)NzTemplate variable warning: %s)Zwarningr)r)rrr_log_messagesz,make_logging_undefined.<locals>._log_messagecsteZdZdZejejddfddZedfddZej	ejdfd	d
Z
edfddZZ
S)
z0make_logging_undefined.<locals>.LoggingUndefinedrzte.NoReturn)r|r}rc
sLytj||Wn4|jk
rF}zd||Wdd}~XYnXdS)NzTemplate variable error: %s)rqrrerror)rr|r}e)	__class__rrrrs
zKmake_logging_undefined.<locals>.LoggingUndefined._fail_with_undefined_error)rcs|tS)N)rqr)r)rrrrrsz8make_logging_undefined.<locals>.LoggingUndefined.__str__cs|tS)N)rqr)r)rrrrrsz9make_logging_undefined.<locals>.LoggingUndefined.__iter__cs|tS)N)rqr)r)rrrrrsz9make_logging_undefined.<locals>.LoggingUndefined.__bool__)r!r"r#rr$rZrr'rrrrr
__classcell__r)rr)rrLoggingUndefinedsr)loggingZ	getLoggerr!Z
addHandlerZ
StreamHandlersysstderrr.)rrrrr)rrrmake_logging_undefineds
rc@s6eZdZdZdZedddZeddddZeZd	S)
ChainableUndefinedaAn undefined that is chainable, where both ``__getattr__`` and
    ``__getitem__`` return itself rather than raising an
    :exc:`UndefinedError`.

    >>> foo = ChainableUndefined(name='foo')
    >>> str(foo.bar['baz'])
    ''
    >>> foo.bar['baz'] + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined

    .. versionadded:: 2.11.0
    r)rcCst|S)N)r')rrrrr2szChainableUndefined.__html__)rrcCs|S)Nr)rrrrrr	szChainableUndefined.__getattr__N)	r!r"r#rYrr'r2rrSrrrrrs
rc@s"eZdZdZdZedddZdS)DebugUndefinedaAn undefined that returns the debug info when printed.

    >>> foo = DebugUndefined(name='foo')
    >>> str(foo)
    '{{ foo }}'
    >>> not foo
    True
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    r)rcCsL|jrd|j}n,|jtkr&|j}ndt|jd|jd}d|dS)Nzundefined value printed: zno such element: []z{{ z }})rrrrr)rmessagerrrrs
zDebugUndefined.__str__N)r!r"r#rYrr'rrrrrr
sr
c@s:eZdZdZdZejZZZ	ejZ
ZZZ
ejZdS)StrictUndefinedasAn undefined that barks on print and iteration as well as boolean
    tests and all kinds of comparisons.  In other words: you can do nothing
    with it except checking if it's defined using the `defined` test.

    >>> foo = StrictUndefined(name='foo')
    >>> str(foo)
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> not foo
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    >>> foo + 42
    Traceback (most recent call last):
      ...
    jinja2.exceptions.UndefinedError: 'foo' is undefined
    rN)r!r"r#rYrr.rrrrrrrrrrrrrr/s
r)NFNN)IrYr^r	typingr$collectionsr	itertoolsrZ
markupsaferrrZasync_utilsrr	
exceptionsr
rrZnodesr
ZutilsrrrrrrrZTypeVarrrrZrZ
TYPE_CHECKINGrZtyping_extensionsZterArZProtocolrZexportedZasync_exportedr-r%r'r+r,r?rrrrrMappingrMr)raregisterr@rRr(r/r*r.rrrr
rrrrrr<module>s
hl0FGq: