P}Gd9d:e>Z?Gd;d<Z@Gd=d>ZAdeAfd?ej2d@dAejBeAd ejBeAfdBZCGdCdDeAZDGdEdFeAZEGdGdHeAZFeA`GeD`GeE`GeF`GdS)Jz;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.)bound) Environmentc @eZdZ ddejedddedefdZdS) LoopRenderFuncrreciterloop_render_funcdepthreturncdSN)selfrrrs 0/usr/lib/python3/dist-packages/jinja2/runtime.py__call__zLoopRenderFunc.__call__#s CN)r) __name__ __module__ __qualname__tIterablerintstrr&r#r'r%rr"s^    Z] /           r'r) LoopContextTemplateReferenceMacrorr rr markup_joinstr_joinidentityr r Undefinedr)AsyncLoopContextr r xr c|S)zLReturns its argument. Useful for certain things in the environment. r#)r7s r%r4r4Ds  Hr'seqcg}tt|}|D]Y}||t|dr2t dt ||cSZt|S)z?Concatenation that escapes if necessary and converts to string.__html__)maprappendhasattrrjoinrr)r9bufiteratorargs r%r2r2Ks C8S!!H99 3 3 # # 9"::??5h#7#788 8 8 8 9 #;;r'cFttt|S)z3Simple args to string conversion and concatenation.)rr=r.)r9s r%r3r3Vs #c3--  r'F environmentr template_nameblocksContextvarssharedglobalslocalsc|i}|r|}nt|pdfi|}|r9|rt|}|D]\}} | tur| ||<||||||S)z%Internal helper for context creation.Nr#)rK)dictitemsr context_class) rErFrGrIrJrKrLparentkeyvalues r% new_contextrT[s | -gm,,t,, $  "&\\F ,,.. $ $JCG###s  $ $V]FG %  r'c@eZdZdZd dZdedejfdZdefd Z dS) r0zThe `self` in templates.contextrHr Nc||_dSr")_TemplateReference__context)r$rVs r%__init__zTemplateReference.__init__{s  r'namecT|jj|}t||j|dSNr)rXrGBlockReference)r$rZrGs r% __getitem__zTemplateReference.__getitem__~s'&t,dDNFA>>>r'cLdt|jd|jjdS)N< >)typer(rXrZr$s r%__repr__zTemplateReference.__repr__s)A4::&AA)<AAAAr')rVrHr N) r(r)r*__doc__rYr.r+Anyr^rer#r'r%r0r0xst""!!!!??????B#BBBBBBr'r0 dict_methodctjdddtjffd }tjt |S)Nr$rHr c>|Sr")get_all)r$rhs r%f_allz_dict_method_all..f_alls{4<<>>***r') functoolswrapsr+rgcastr)rhrls` r%_dict_method_allrpsZ_[!!+I+!%+++++"!+ 6!U  r'creZdZdZ ddddejeejfdejedejeej dgej effdejej eejff d Z ded ej dgej efd ej d fd Zddedejd ejfdZded ej ejdffdZded ejfdZd ejeejffdZd ejeejffdZedej dejdejd ej ejdffdZddejejeejfd dfdZeejZeejZeejZded efdZded ejfdZd efdZdS) rHaThe 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. NrErrQrZrGrKc&||_i|_||_t|j||_t |_||_|t nt ||_d| D|_ dS)Nci|] \}}||g Sr#r#.0kvs r% z$Context.__init__..s 999$!Qq1#999r') rQrIrEreval_ctxset exported_varsrZ globals_keysrOrG)r$rErQrZrGrKs r%rYzContext.__init__s~ (* *5#D$4d;; ), %,_CEEE#g,, :9&,,..999 r'currentr r]r5c |j|}||dz}||n0#t$r#|jd|ddcYSwxYwt ||||S)zRender a parent block.r there is no parent block called .superrZ)rGindex LookupErrorrE undefinedr])r$rZr}rGrs r%rz Context.supers [&FLL))A-E 5MMM   #--<4<<<7.    dD&%888s-0*AArRdefaultc8 ||S#t$r|cYSwxYw)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. )KeyError)r$rRrs r%getz Context.gets5 9    NNN s  r5cx||}|tur|j|S|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. r)resolve_or_missingrrEr)r$rRrvs r%resolvezContext.resolves? $ $S ) ) ==#--3-77 7 r'ch||jvr |j|S||jvr |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. )rIrQr)r$rRs r%rzContext.resolve_or_missings< $)  9S> ! $+  ;s# #r'c*fdjDS)z+Get a new dict with the exported variables.c,i|]}|j|Sr#)rI)rurvr$s r%rxz(Context.get_exported..s!<<|(<==zz-(( ?}(=>>9t#DD . . .O%,DD - - -&(4/D =$''' <&&& 5$)&)) )   %//+    sD%%$E  E rLc t|j|ji|dd|}|j|_|jd|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. TNc3>K|]\}}|t|fVdSr")listrts r% z"Context.derived..:s0KKtq!q$q''lKKKKKKr')rTrErZrkryrGupdaterO)r$rLrVs r%rzContext.derived1ss   diT\\^^T4   =KKt{7H7H7J7JKKKKKKr'c&||jvp||jvSr")rIrQr$rZs r% __contains__zContext.__contains__Asty 7DDK$77r'c`||}|turt||S)zpLook up a variable by name with ``[]`` syntax, or raise a ``KeyError`` if the key is not found. )rrr)r$rRitems r%r^zContext.__getitem__Ds1&&s++ 7??3--  r'cldt|jd|d|jdS)Nr`raz of rb)rcr(rkrZrds r%rezContext.__repr__Os6M4::&MMMMtyMMMMr'r") r(r)r*rfr+Dictr.rgOptionalCallableIteratorMutableMappingrYUnionrrrrrrkrrrrprNkeysvaluesrOboolrr^rer#r'r%rHrHs2=A ::":sAEz":jo : sAJ {AJsO'CDDE : A,S!%Z89 ::::* 9 9"#*i[!*S/-I"J 9 . / 9 9 9 9  s QU ae    31715++=#>"cae$=afS!%Z0==== .QU + . . . .*z**+%*;<5*  # $***\*X  ajQU );<       DI & &D  dk * *F  TZ ( (E888888 s qu    N#NNNNNNr'c eZdZdZdedddejejdgejefde ddf d Z e dej d fd Z edefd Zedefd ZdS)r]z"One block on a template reference.rZrVrHstackrr Nc>||_||_||_||_dSr")rZ_context_stack_depth)r$rZrVrrs r%rYzBlockReference.__init__Vs$    r'r~c|jdzt|jkr*|jjd|jddSt|j|j|j|jdzS)zSuper the block.rrrrr)rlenrrrErrZr]rds r%rzBlockReference.superbsv ;?c$+.. . .=,66A49AAA7 di T[ST_UUUr'cKtd|j|j|j2d{V}|jjjrt |S|S)Nc"Kg|3d{V}| 6Sr"r#rur7s r% z.BlockReference._async_call..ns. F F F F F F F FQ F F F F)rrrrry autoescaperr$rs r% _async_callzBlockReference._async_callksq  F F6dk$+6t}EE F F F F F F F F F   = ! , "::  r'c|jjjr|St |j|j|j}|jjjrt|S|Sr") rrEis_asyncrrrrryrrrs r%r&zBlockReference.__call__vsh = $ - &##%% % ,DK ,T];; < < = ! , "::  r')r(r)r*rfr.r+Listrrr-rYpropertyrrrrr&r#r'r%r]r]Ss,,   vaj)ajo!=>?        Vqw<=VVVXV3\ #   \   r'r]c VeZdZUdZdZdZejee d<e Z ej e d<e Z ej e d<e Zej e d<e Zej e d< d&d ejed ejd d ejddeddf dZed ejedejefdZedefdZdefdZedefdZedefdZedefdZedefdZedefdZdej fdZ edefdZ!edej"ej d ffdZ#edej"ej d ffdZ$dedefdZ%d ej defd!Z&d'd"Z'dej(ej dffd#Z)e*d ejede+fd$Z,de+fd%Z-dS)(r/zeA wrapper iterable for dynamic ``for`` loops, with information about the loop and iteration. N_length_after_current_before_last_changed_valueriterablerr5recurserdepth0r cr||_|||_||_||_||_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)r$rrrrs r%rYzLoopContext.__init__s9"**844#  r'c t|Sr")iterrs r%rzLoopContext._to_iteratorsH~~r'c4|j|jS t|j|_ni#t$r\t |j}|||_t||jz|jtuz|_YnwxYw|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. ) rrr TypeErrorrrrrrrr$rs r%lengthzLoopContext.lengths < #<  Ut~..DLL U U UDN++H!..x88DNx==4:5G9STDLLL U |s*A#BBc|jSr")rrds r%__len__zLoopContext.__len__s {r'c|jdzS)zBHow many levels deep a recursive loop currently is, starting at 1.r)rrds r%rzLoopContext.depth{Qr'c|jdzS)z-Current iteration of the loop, starting at 1.rindex0rds r%rzLoopContext.indexrr'c |j|jz S)zrNumber of iterations from the end of the loop, ending at 0. Requires calculating :attr:`length`. rrrds r% revindex0zLoopContext.revindex0s {TZ''r'c |j|jz S)zrNumber of iterations from the end of the loop, ending at 1. Requires calculating :attr:`length`. rrrds r%revindexzLoopContext.revindexs {T[((r'c|jdkS)z0Whether this is the first iteration of the loop.rrrds r%firstzLoopContext.firsts{ar'cx|jtur|jSt|jt|_|jS)a Return 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. )rrnextrrds r% _peek_nextzLoopContext._peek_nexts4 ;g % %; 4>733 {r'c8|tuS)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. rrrds r%lastzLoopContext.lasts  G++r'cH|jr|dS|jS)zZThe item in the previous iteration. Undefined during the first iteration. zthere is no previous item)rrrrds r%previtemzLoopContext.previtems* : @??#>?? ?|r'cj|}|tur|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. there is no next itemrrrrs r%nextitemzLoopContext.nextitems4__   ==??#:;; ; r'rc^|std||jt|zS)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)r$rs r%cyclezLoopContext.cycles3  :899 9DK#d))+,,r'rSc.|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)r$rSs r%changedzLoopContext.changeds$  #u , ,',D $4ur'c|Sr"r#rds r%__iter__zLoopContext.__iter__' r'c|jtur|j}t|_nt|j}|xjdz c_|j|_||_||fSNr)rrrrrrrrs r%__next__zLoopContext.__next__*sW ;g % %B!DKKdn%%B q }  4xr'cr|jtd|||j|jS)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)rrrrs r%r&zLoopContext.__call__6s? = U }}Xt}DJ}GGGr'cRdt|jd|jd|jdS)Nr`ra/rb)rcr(rrrds r%rezLoopContext.__repr__Ds0D4::&DDDDdkDDDDr'r\)r r/).r(r)r*rfrrr+rr-__annotations__rrrgrrrr,rTyperY staticmethodrrrrrrrrrrrrrrrrrrrTuplerrr.r&rer#r'r%r/r/s F#GQZ_###FAEHaeGQU!(((( 15 *Q-6+&,-     ,qz!}A\X$sXsX(3(((X()#)))X) t   X  AE    ,d,,,X,!'!%"45X !'!%"45   X  -1 - - - - - ae      !'!%"67     HA H3 H H H\ HE#EEEEEEr'r/ceZdZUejejed<edejej e ej e fdeje fdZ e defdZe defdZe defdZdejfdZe defd Ze dejejd ffd Zdd Zdejejdffd ZdS)r6rrr c t|Sr"r rs r%rzAsyncLoopContext._to_iteratorKs(###r'c>K|j|jS t|j|_nl#t$r_d|j2d{V}|||_t||jz|jtuz|_YnwxYw|jS)Nc"Kg|3d{V}| 6Sr"r#rs r%rz+AsyncLoopContext.length..Ys.88888888A8888r) rrrrrrrrrrs r%rzAsyncLoopContext.lengthQs < #<  Ut~..DLL U U U88888888888H!..x88DNx==4:5G9STDLLL U |s,A&BBc0K|jd{V|jz Sr"rrds r%rzAsyncLoopContext.revindex0_s'[      4:--r'c0K|jd{V|jz Sr"rrds r%rzAsyncLoopContext.revindexcs'[      4;..r'cK|jtur|jS |jd{V|_n#t$rt|_YnwxYw|jSr")rrr __anext__StopAsyncIterationrds r%rzAsyncLoopContext._peek_nextgsy ;g % %;  " $ 8 8 : :::::::DKK! " " "!DKKK "{s$>AAcHK|d{VtuSr"rrds r%rzAsyncLoopContext.lastrs-__&&&&&&&&'11r'r5czK|d{V}|tur|dS|S)Nrrrs r%rzAsyncLoopContext.nextitemvsH??$$ $ $ $ $ $ $ ==??#:;; ; r'c|Sr"r#rds r% __aiter__zAsyncLoopContext.__aiter__rr'cK|jtur|j}t|_n|jd{V}|xjdz c_|j|_||_||fSr)rrrrrrrrs r%rzAsyncLoopContext.__anext__sq ;g % %B!DKK~//11111111B q }  4xr'N)r r6)r(r)r*r+ AsyncIteratorrgr r rr,r AsyncIterablerrr-rrrrrrrrr rr#r'r%r6r6Hsqu%%%%$'!*Q-);;<$  $$$\$  c   X ....X.////X/ !%    2D222X2{(: ;X 0B)B!C      r'r6c@eZdZdZ ddddejdefdedejed ed ed ed ej efd Z e e dej dej defdZdejej dedefdZdejej dedefdZdefdZdS)r1zWraps a macro function.NrErfunc.rZ arguments catch_kwargs catch_varargscallerdefault_autoescapec ||_||_t||_||_||_||_||_||_d|v|_ |1t|j r| d}n|j }||_ dS)Nr#) _environment_funcr_argument_countrZr r!r"r#explicit_callercallabler_default_autoescape) r$rErrZr r!r"r#r$s r%rYzMacro.__init__s( "9~~ "(* '94  % .// <%0%;%;D%A%A""%0%;"#5   r'rrr c Z|r3t|dtr|dj}|dd}n|j}t |d|j}t |}d}||jkrk|jt |dD]M} ||}n#t$r t}YnwxYw|dkrd}| |Nn|j }|j rK|sI|dd} | |jdd} | | |jr| |nR|rPd|vrt#d|jd t#d|jd t't)||jr#| ||jdnEt ||jkr-t#d|jd t |jd |||S) NrrFr#TzNo caller definedrzmacro 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)) isinstancerrr+rr(rr rrrr>r)r#r&rr!rrZrrr"_invoke) r$rrrr off found_callerrZrSr#s r%r&zMacro.__call__s&  2JtAw 44 2a+J8DD1J4 44566 )nn $& & &s9~~'7'78 ( ($"JJt,,EE$$$#EEE$8###'L  '''' ( /L ; %| %ZZ$//F~*445Hx4XX   V $ $ $      V $ $ $ $  6!!CTYCCCWWWd6llASASWW       T$"6"8"89 : : : : YY- - -666''666  ||Iz222sB**B>=B>rcLK|j|d{V}|rt|S|Sr")r'rr$r rrs r% _async_invokezMacro._async_invokes?4:y) ) ) ) ) ) )  "::  r'c|jjr|||S|j|}|rt |}|Sr")r&rr3r'rr2s r%r.z Macro._invokesL   % =%%i<< < TZ #  B r'cr|jdnt|j}dt|jd|dS)N anonymousr`rarb)rZreprrcr(rs r%rezMacro.__repr__s<"i/{{T$)__04::&000000r'r")r(r)r*rfr+rr.rrrrYrrrgr&r3r.rer#r'r%r1r1sh!!0466"6jc"6 6 6#; 6  666Jt,6666:J3aeJ3quJ3J3J3J3\J3XQVAE]QT  D S    1#111111r'r1c :eZdZdZdZdedefdeje dej deje dej e ddf d Z ede fd Zed ej d ej dd fdZede dej fdZexZxZxZZexZxZxZZexZZexZZexZZ exZ!Z"exZ#Z$exZ%xZ&xZ'Z(exZ)xZ*Z+exZ,Z-dej de.fdZ/dej de.fdZ0de1fdZ2de fdZ3de1fdZ4dej5ej fdZ6dej7ej fdZ8de.fdZ9de fdZ:dS)r5ahThe 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_exceptionNhintobjrZexcr c>||_||_||_||_dSr"r9)r$r>r?rZr@s r%rYzUndefined.__init__+s* $!#$'!!!r'c|jr|jS|jtur |jdSt |jt st |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 )r:r;rr<r-r.rrds r%_undefined_messagezUndefined._undefined_message7s   (' '  ' ) )*;;; ;$.44 #D$78855 055    344 3 3. 3 3 r'rr te.NoReturnc6||j)zeRaise an :exc:`UndefinedError` when operations are performed on the undefined value. )r=rC)r$rrs r%_fail_with_undefined_errorz$Undefined._fail_with_undefined_errorMs''(?@@@r'cd|dddkrt||S)N__)AttributeErrorrFrs r% __getattr__zUndefined.__getattr__Vs5 8t   && &..000r'otherc>t|t|uSr")rcr$rLs r%__eq__zUndefined.__eq__hsDzzT%[[((r'c.|| Sr")rOrNs r%__ne__zUndefined.__ne__ks;;u%%%%r'c:tt|Sr")idrcrds r%__hash__zUndefined.__hash__ns$t**~~r'cdS)Nr<r#rds r%__str__zUndefined.__str__qsrr'cdSr\r#rds r%rzUndefined.__len__tsqr'c#KdEd{VdSNr#r#rds r%rzUndefined.__iter__ws r'cKdD]}dWVdSrYr#r$_s r%rzUndefined.__aiter__zs,  A EEEEE  r'cdS)NFr#rds r%__bool__zUndefined.__bool__~sur'cdS)Nr5r#rds r%rezUndefined.__repr__s{r');r(r)r*rf __slots__rrr+rr.rgr r rYrrCrrFrK__add____radd____sub____rsub____mul____rmul____div____rdiv__ __truediv__ __rtruediv__ __floordiv__ __rfloordiv____mod____rmod____pos____neg__r&r^__lt____le____gt____ge____int__ __float__ __complex____pow____rpow__rrOrQr-rTrVrrrrrr^rer#r'r%r5r5s  I!% $,: ( (jo (U (jo ( V( ) (  ( ( ( ( C   X *AUA&'eA AAA\A11111\1 /IHGHhH8.HHGHhH8!;;K,#==L=33Gh22Gg77H{(BBFBVBfv(BBGBi+33Gh)AE)d))))&AE&d&&&&#!*QU+!7$#r'r5loggerzlogging.LoggerbasecFddl}|jt|jt jdtddffd Gfdd|}|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`. Nrundefr c>d|jdS)NzTemplate variable warning: %s)warningrC)r}rzs r% _log_messagez,make_logging_undefined.._log_messages+ +U-E     r'ceZdZdZdejdejddffd Zdeffd Zdej ejffd Z de ffd Z xZ S) 0make_logging_undefined..LoggingUndefinedr#rrr rDc tj|i|dS#|j$r}d||d}~wwxYw)NzTemplate variable error: %s)rrFr=error)r$rre __class__rzs r%rFzKmake_logging_undefined..LoggingUndefined._fail_with_undefined_errorsf 22DCFCCCCC,    :A>>> s AAAcZ|tSr")rrVr$rrs r%rVz8make_logging_undefined..LoggingUndefined.__str__s' L   77??$$ $r'cZ|tSr")rrrs r%rz9make_logging_undefined..LoggingUndefined.__iter__) L   77##%% %r'cZ|tSr")rr^rs r%r^z9make_logging_undefined..LoggingUndefined.__bool__rr')r(r)r*r`r+rgrFr.rVrrrr^ __classcell__)rrrzs@r%LoggingUndefinedrs   *+%          %S % % % % % % % &aj/ & & & & & & & &d & & & & & & & & & & &r'r)logging getLoggerr( addHandler StreamHandlersysstderrr5)rzr{rrrs` @r%make_logging_undefinedrs,~""8,,/'/ ;;<<< I $      &&&&&&&&4&&&0 r'c6eZdZdZdZdefdZdeddfdZeZdS)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#r c t|Sr")r.rds r%r;zChainableUndefined.__html__s4yyr'r\c|Sr"r#r[s r%rKzChainableUndefined.__getattr__rr'N) r(r)r*rfr`r.r;rKr^r#r'r%rrsd  I#S%9KKKr'rc"eZdZdZdZdefdZdS)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#r c|jr d|j}n6|jtur|j}n dt |jd|jd}d|dS)Nzundefined value printed: zno such element: []z{{ z }})r:r;rr<r)r$messages r%rVzDebugUndefined.__str__s   H$2FHHGG  G + +*GG.$4T5H$I$I..(...  &w%%%%r'N)r(r)r*rfr`r.rVr#r'r%rrs@  I & & & & & & &r'rcTeZdZdZdZejxZxZZ ejxZ xZ xZ 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 r#N)r(r)r*rfr`r5rFrrVrrOrQr^rTrr#r'r%rrsP&I#,#GGHGw,5,PPFPVPh7LLLr'r)NFNN)Hrfrmrtypingr+ collectionsr itertoolsr markupsaferrr async_utilsr r exceptionsr r rnodesrutilsrrrrrrrTypeVarrrrgr TYPE_CHECKINGrtyping_extensionsterErProtocolrexportedasync_exportedr4r,r.r2r3rrrrrMappingrTr0rpregisterrHr]r/r6r1r5r rrrrr`r#r'r%rsAA ############((((((,,,,,,&&&&&&######$$$$$$ AIcNN AIcCJ/000? NNN""""((((((      a    QZ&3!!*QU#!!!!!,08<04:c? F3 I; 3#?@@ A *QVCJ' (    Z(ae4 5  Jqyae, -: B B B B B B B B!ANANANANANANANANH--------`BEBEBEBEBEBEBEBEJDDDDD{DDDNC1C1C1C1C1C1C1C1Lmmmmmmmmb,0999 J' (978vi7H9VI9999x6&&&&&Y&&&@88888i888: r'