`VhFPdZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl m Z dd l mZdd l mZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZejdZejdej dej!fZ"ej#r!ddl$Z$ddl%Z&ddl'm(Z(Gdde&j)Z*gdZ+gdZ,ded efd!Z-d"ej.ej!d e/fd#Z0d"ej.ej!d e/fd$Z1d"ej.ej!d e/fd%Z2 dJd'd(d)ej3e/d*ej4e/ej d+gej5e/ffd,ej3ej4e/ej!fd-e6d.ej3ej7e/ej!fd/ej3ej8e/ej!fd d+fd0Z9Gd1d2Z:d3e"d e"fd4Z;ej8j<Gd5d+Z=Gd6d7Z>Gd8d9Z?Gd:d;e?Z@Gd<d=ZAGd>d?ZBdeBfd@ej3dAdBejCeBd ejCeBfdCZDGdDdEeBZEGdFdGeBZFGdHdIeBZGeB`HeE`HeF`HeG`HdS)Kz;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 /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/jinja2/runtime.py__call__zLoopRenderFunc.__call__#s CN)r) __name__ __module__ __qualname__tIterablerintstrr&r#r'r%rr"s^    Z] /           r'r) LoopContextTemplateReferenceMacrorr rrr markup_joinstr_joinidentityr r Undefinedr)AsyncLoopContextr r xr c|S)zLReturns its argument. Useful for certain things in the environment. r#)r7s r%r4r4Es  Hr'seqcg}tt|}|D]Y}||t|dr2t dt ||cSZt|S)z?Concatenation that escapes if necessary and converts to string.__html__)maprappendhasattrrjoinrr)r9bufiteratorargs r%r2r2Ls 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%r3r3Ws #c3--  r'cbddl}|dtdt|S)NrzWThis template must be recompiled with at least Jinja 3.0, or it will fail in Jinja 3.1. stacklevel)warningswarnDeprecationWarningr3)r9rIs r% unicode_joinrL\s?OOO MM &  C==r'F environmentr template_nameblocksContextvarssharedglobalslocalsc|i}|r|}nt|pdfi|}|r9|rt|}|D]\}} | tur| ||<||||||S)z%Internal helper for context creation.Nr#)rS)dictitemsr context_class) rMrNrOrQrRrSrTparentkeyvalues r% new_contextr\hs | -gm,,t,, $  "&\\F ,,.. $ $JCG###s  $ $V]FG %  r'c@eZdZdZd dZdedejfdZdefd Z dS) r0zThe `self` in templates.contextrPr Nc||_dSr")_TemplateReference__context)r$r^s r%__init__zTemplateReference.__init__s  r'namecT|jj|}t||j|dSNr)r`rOBlockReference)r$rbrOs r% __getitem__zTemplateReference.__getitem__s'&t,dDNFA>>>r'cLdt|jd|jjdS)N< >)typer(r`rbr$s r%__repr__zTemplateReference.__repr__s)A4::&AA)<AAAAr')r^rPr N) r(r)r*__doc__rar.r+Anyrfrmr#r'r%r0r0st""!!!!??????B#BBBBBBr'r0 dict_methodctjdddtjffd }tjt |S)Nr$rPr c>|Sr")get_all)r$rps r%f_allz_dict_method_all..f_alls{4<<>>***r') functoolswrapsr+rocastr)rprts` r%_dict_method_allrxsZ_[!!+I+!%+++++"!+ 6!U  r'ceZdZUdZdZejeed<d"dZ d#ddd ej e ej fd ej e d ej e ejdgeje ffd ej eje ej ff d Zd e dejdgeje fdejdfdZd#de dej dej fdZde dejej dffdZde dej fdZdej e ej ffdZdej e ej ffdZedejdej dej dejej dffdZd#dej ej e ej fddfdZeejZeejZeej Z d e defdZ!de dej fd Z"de fd!Z#dS)$rPaThe 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_moder Ncd|jvr d|_dSd|jvs|jr*ddl}|dtdd|_dSdS) Nresolve_or_missingFresolverzOverriding 'resolve' is deprecated and will not have the expected behavior in Jinja 3.1. Override 'resolve_or_missing' instead rFrGT)__dict__rzrIrJrK)clsrIs r%__init_subclass__zContext.__init_subclass__s 3< / /(-C $ $ $ #, & &#*B & OOO MM1#    (,C $ $ $' &r'rMrrYrbrOrSc&||_i|_||_t|j||_t |_||_|t nt ||_d| D|_ dS)Nci|] \}}||g Sr#r#.0kvs r% z$Context.__init__..s 999$!Qq1#999r') rYrQrMreval_ctxset exported_varsrb globals_keysrWrO)r$rMrYrbrOrSs r%razContext.__init__s~ (* *5#D$4d;; ), %,_CEEE#g,, :9&,,..999 r'currentrer5c |j|}||dz}||n0#t$r#|jd|ddcYSwxYwt ||||S)zRender a parent block.r there is no parent block called .superrb)rOindex LookupErrorrM undefinedre)r$rbrrOrs r%rz Context.supers [&FLL))A-E 5MMM   #--<4<<<7.    dD&%888s-0*AArZdefaultc8 ||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$rZrs r%getz Context.gets5 9    NNN s  r5c|jrG||jvr |j|S||jvr |j|S|j|S||}|t ur|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)rzrQrYrMrr|rr$rZrvs r%r}zContext.resolves  $ 8diy~%dk!!{3''#--3-77 7  $ $S ) ) ==#--3-77 7 r'c|jr3||}t|trtS|S||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. )rzr} isinstancer5rrQrYrs r%r|zContext.resolve_or_missingst  $ c""B"i(( I $)  9S> ! $+  ;s# #r'c*fdjDS)z+Get a new dict with the exported variables.c,i|]}|j|Sr#)rQ)rrr$s r%rz(Context.get_exported..*s!<<|(<==zz-(( ?}(=>>9t#DD . . .O%,DD - - -&(4/D =$''' <&&& 5$)&)) )   %//+    sD%%$E  E rTc 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")listrs r% z"Context.derived..ms0KKtq!q$q''lKKKKKKr')r\rMrbrsrrOupdaterW)r$rTr^s r%rzContext.deriveddss   diT\\^^T4   =KKt{7H7H7J7JKKKKKKr'c&||jvp||jvSr")rQrYr$rbs r% __contains__zContext.__contains__tsty 7DDK$77r'c`||}|turt||S)zpLook up a variable by name with ``[]`` syntax, or raise a ``KeyError`` if the key is not found. )r|rr)r$rZitems r%rfzContext.__getitem__ws1&&s++ 7??3--  r'cldt|jd|d|jdS)Nrhriz of rj)rkr(rsrbrls r%rmzContext.__repr__s6M4::&MMMMtyMMMMr')r Nr")$r(r)r*rnrzr+ClassVarbool__annotations__rDictr.roOptionalCallableIteratorMutableMappingraUnionrrr}r|rrsrrrrxrVkeysvaluesrWrrfrmr#r'r%rPrPs3&.3!*T*222,,,,2=A ::":sAEz":jo : sAJ {AJsO'CDDE : A,S!%Z89 ::::* 9 9"#*i[!*S/-I"J 9 . / 9 9 9 9  s QU ae    31715++=#>4cae4=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)rez"One block on a template reference.rbr^rPstackrr Nc>||_||_||_||_dSr")rb_context_stack_depth)r$rbr^rrs r%razBlockReference.__init__s$    r'rc|jdzt|jkr*|jjd|jddSt|j|j|j|jdzS)zSuper the block.rrrrr)rlenrrrMrrbrerls r%rzBlockReference.supersv ;?c$+.. . .=,66A49AAA7 di T[ST_UUUr'cKtd|j|j|j2d{V}|jjjrt |S|S)Nc"Kg|3d{V}| 6Sr"r#rr7s r% z.BlockReference._async_call..s. F F F F F F F FQ F F F F)rrrrr autoescaperr$rs r% _async_callzBlockReference._async_callsq  F F6dk$+6t}EE F F F F F F F F F   = ! , "::  r'c|jjjr|St |j|j|j}|jjjrt|S|Sr") rrMis_asyncrrrrrrrrs r%r&zBlockReference.__call__sh = $ - &##%% % ,DK ,T];; < < = ! , "::  r')r(r)r*rnr.r+Listrrr-rapropertyrrrrr&r#r'r%reres,,   vaj)ajo!=>?        Vqw<=VVVXV3\ #   \   r'rec 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%razLoopContext.__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")rrls r%__len__zLoopContext.__len__s {r'c|jdzS)zBHow many levels deep a recursive loop currently is, starting at 1.r)rrls r%rzLoopContext.depth{Qr'c|jdzS)z-Current iteration of the loop, starting at 1.rindex0rls r%rzLoopContext.indexrr'c |j|jz S)zrNumber of iterations from the end of the loop, ending at 0. Requires calculating :attr:`length`. rrrls 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`. rrrls r%revindexzLoopContext.revindexs {T[((r'c|jdkS)z0Whether this is the first iteration of the loop.rrrls 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. )rrnextrrls 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. rrrls 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)rrrrls r%previtemzLoopContext.previtem)s* : @??#>?? ?|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.nextitem3s4__   ==??#:;; ; 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.cycleCs3  :899 9DK#d))+,,r'r[c.|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$r[s r%changedzLoopContext.changedNs$  #u , ,',D $4ur'c|Sr"r#rls r%__iter__zLoopContext.__iter__Z 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__is? = U }}Xt}DJ}GGGr'cRdt|jd|jd|jdS)Nrhri/rj)rkr(rrrls r%rmzLoopContext.__repr__ws0D4::&DDDDdkDDDDr'rd)r r/).r(r)r*rnrrr+rr-rrrrorrrr,rTypera staticmethodrrrrrrrrrrrrrrr r rrrTuplerrr.r&rmr#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_iterator~s(###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..s.88888888A8888r) rrrrrrrrrrs r%rzAsyncLoopContext.lengths < #<  Ut~..DLL U U U88888888888H!..x88DNx==4:5G9STDLLL U |s,A&BBc0K|jd{V|jz Sr"rrls r%rzAsyncLoopContext.revindex0s'[      4:--r'c0K|jd{V|jz Sr"rrls r%rzAsyncLoopContext.revindexs'[      4;..r'cK|jtur|jS |jd{V|_n#t$rt|_YnwxYw|jSr")rrr __anext__StopAsyncIterationrls r%rzAsyncLoopContext._peek_nextsy ;g % %;  " $ 8 8 : :::::::DKK! " " "!DKKK "{s$>AAcHK|d{VtuSr"rrls r%rzAsyncLoopContext.lasts-__&&&&&&&&'11r'r5czK|d{V}|tur|dS|S)Nr r rs r%r zAsyncLoopContext.nextitemsH??$$ $ $ $ $ $ $ ==??#:;; ; r'c|Sr"r#rls r% __aiter__zAsyncLoopContext.__aiter__rr'cK|jtur|j}t|_n|jd{V}|xjdz c_|j|_||_||fSr)rrrr%rrrrs r%r%zAsyncLoopContext.__anext__sq ;g % %B!DKK~//11111111B q }  4xr'N)r r6)r(r)r*r+ AsyncIteratorrorrrr,r AsyncIterablerrr-rrrrrrr r*rr%r#r'r%r6r6{squ%%%%$'!*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.NrMrfunc.rb arguments catch_kwargs catch_varargscallerdefault_autoescapec ||_||_t||_||_||_||_||_||_d|v|_ |1t|j r| d}n|j }||_ dS)Nr3) _environment_funcr_argument_countrbr0r1r2r3explicit_callercallabler_default_autoescape) r$rMr/rbr0r1r2r3r4s r%razMacro.__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) NrrFr3TzNo 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))rrrr;rr8rr0rrrr>r9r3r6rr1rrbrrr2_invoke) r$rrrr0off found_callerrbr[r3s 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")r7rr$r0rrs r% _async_invokezMacro._async_invoke0s?4:y) ) ) ) ) ) )  "::  r'c|jjr|||S|j|}|rt |}|Sr")r6rrBr7rrAs r%r=z Macro._invoke8sL   % =%%i<< < TZ #  B r'cr|jdnt|j}dt|jd|dS)N anonymousrhrirj)rbreprrkr(rs r%rmzMacro.__repr__Cs<"i/{{T$)__04::&000000r'r")r(r)r*rnr+rr.rrrrarrror&rBr=rmr#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_exceptionNhintobjrbexcr c>||_||_||_||_dSr"rH)r$rMrNrbrOs r%razUndefined.__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 )rIrJrrKrr.rrls r%_undefined_messagezUndefined._undefined_messagejs   (' '  ' ) )*;;; ;$.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. )rLrR)r$rrs r%_fail_with_undefined_errorz$Undefined._fail_with_undefined_errors''(?@@@r'cd|dddkrt||S)NrF__)AttributeErrorrUrs r% __getattr__zUndefined.__getattr__s5 8t   && &..000r'otherc>t|t|uSr")rkr$rZs r%__eq__zUndefined.__eq__sDzzT%[[((r'c.|| Sr")r]r\s r%__ne__zUndefined.__ne__s;;u%%%%r'c:tt|Sr")idrkrls r%__hash__zUndefined.__hash__s$t**~~r'cdS)Nr<r#rls r%__str__zUndefined.__str__srr'cdSrdr#rls r%rzUndefined.__len__sqr'c#KdEd{VdSNr#r#rls r%rzUndefined.__iter__s r'cKdD]}dWVdSrgr#r$_s r%r*zUndefined.__aiter__s,  A EEEEE  r'cdS)NFr#rls r%__bool__zUndefined.__bool__sur'cdS)Nr5r#rls r%rmzUndefined.__repr__s{r');r(r)r*rn __slots__rrr+rr.rorr rarrRrrUrY__add____radd____sub____rsub____mul____rmul____div____rdiv__ __truediv__ __rtruediv__ __floordiv__ __rfloordiv____mod____rmod____pos____neg__r&rf__lt____le____gt____ge____int__ __float__ __complex____pow____rpow__rr]r_r-rbrdrrrr,r*rlrmr#r'r%r5r5Hs  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)warningrR)rrs 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 rSc tj|i|dS#|j$r}d||d}~wwxYw)NzTemplate variable error: %s)rrUrLerror)r$rre __class__rs r%rUzKmake_logging_undefined..LoggingUndefined._fail_with_undefined_errorsf 22DCFCCCCC,    :A>>> s AAAcZ|tSr")rrdr$rrs r%rdz8make_logging_undefined..LoggingUndefined.__str__s' L   77??$$ $r'cZ|tSr")rrrs r%rz9make_logging_undefined..LoggingUndefined.__iter__) L   77##%% %r'cZ|tSr")rrlrs r%rlz9make_logging_undefined..LoggingUndefined.__bool__rr')r(r)r*rnr+rorUr.rdrrrrl __classcell__)rrrs@r%LoggingUndefinedrs   *+%          %S % % % % % % % &aj/ & & & & & & & &d & & & & & & & & & & &r'r)logging getLoggerr( addHandler StreamHandlersysstderrr5)rrrrrs` @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.rls r%r;zChainableUndefined.__html__s4yyr'rjc|Sr"r#ris r%rYzChainableUndefined.__getattr__ rr'N) r(r)r*rnrnr.r;rYrfr#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 }})rIrJrrKr)r$messages r%rdzDebugUndefined.__str__s   H$2FHHGG  G + +*GG.$4T5H$I$I..(...  &w%%%%r'N)r(r)r*rnrnr.rdr#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*rnrnr5rUrrdrr]r_rlrbrr#r'r%rr/sP&I#,#GGHGw,5,PPFPVPh7LLLr'r)NFNN)Irnrurtypingr+ collectionsr itertoolsr markupsaferrr async_utilsr r exceptionsr r rnodesrutilsrrrrrrrTypeVarrrror TYPE_CHECKINGrtyping_extensionsterMrProtocolrexportedasync_exportedr4r,r.r2r3rLrrrrrMappingr\r0rxregisterrPrer/r6r1r5rrrrrrnr#r'r%rsAA ############((((((,,,,,,&&&&&&######$$$$$$ AIcNN AIcCJ/000? NNN""""((((((   "  a    QZ&3!!*QU#!!!!! aj' C     ,08<04:c? F3 I; 3#?@@ A *QVCJ' (    Z(ae4 5  Jqyae, -: B B B B B B B B!gNgNgNgNgNgNgNgNT--------`BEBEBEBEBEBEBEBEJDDDDD{DDDNC1C1C1C1C1C1C1C1Lmmmmmmmmb,0999 J' (978vi7H9VI9999x6&&&&&Y&&&@88888i888: r'