mò 0á¸Ec@s0dZdklZdklZdklZlZdefd„ƒYZgZdfd„ƒYZ he dƒd <e d ƒd <e d ƒd <e d ƒd <e dƒd R7RRR:((RRBŽs$   $ cCs.tƒ}||_t|i|ƒƒ|_|S(N(RR7R@tb2aRtgetIdR*(RR@R7((RR7«s  cCsu|i}t||ƒo1t||ƒ}t|ƒp |ƒ}n|Snt|dƒot|i ƒSnt |ƒS(Nt_p_oid( RR+tid_attrthasattrR@tgetattrtobidR;R%RER*(RR@RIRF((RRD±s  cCs7|iodSn||i|ƒf|_|id S(Ni(RR3R@RAt_cached_children(RR@((RR?ºs cCs®|idj o1|i\}}d|_||jo|SqAn|idj o|i|ƒSnt||iƒ}t |t ƒp t |t ƒp |ƒ}n|i |ƒS(N( RRJRtobtchildrenR@R#RHR&t isinstancetListTypet TupleTypetfilterChildren(RR@RKRL((RRAÁs     cCs|io|i|ƒSn|S(N(RR(RL(RRL((RRPÔs (RRt__doc__RR+R&R3RR(R#R5R0RJR"R)R,R1R4R6RBR7RDR?RARP(((RR8s*      tiif0.0lcCs|t|ƒƒS(N(t is_simplettypeRK(RKRS((RR;ÙsN(s translates maketranss+/=s-._cCs(ttit|ƒƒtƒiddƒS(svEncode a value as a cookie- and url-safe string. Encoded string use only alpahnumeric characters, and "._-". s RRN(t translatetbase64t encodestringR%tsta2u_maptreplace(RX((RRCåscCstit|tƒƒS(sDecode a b2a-encoded string.N(RVt decodestringRURXtu2a_map(RX((Rta2bìsc Cs g}d}d}x„|D]|}|idjoqn||id}|i}|djo|id|ƒn|i|i ƒ||_ |d}qWdi |ƒ}|oVt|ƒdjoCdtti |dƒƒ}t|ƒt|ƒjo |}qn|S( sEncode the expanded node ids of a tree into a string. Accepts a list of nodes, such as that produced by root.flat(). Marks each expanded node with an expansion_number attribute. Since node ids are encoded, the resulting string is safe for use in cookies and URLs. iÿÿÿÿiit_t:ii N(tstepst last_depthtntnodesR7RRtddRR*texpansion_numbertjointresulttcompressRRCtzlibtzresult( RcRhR7RdRaRbR`RgRj((RtencodeExpansionðs*   i c Cs t|ƒ|jotdƒ‚n|ddjoItiƒ} | it|dƒ|ƒ}| i otdƒ‚n~ nh}}g}d}d}|dj o d}nx|idƒD]ý} | idƒot| ƒd}qÀn|djo%|i|ƒh||<||}n|od||