eOQSr/SQrSSKrSSKrSSKrSSKrSSKJr SSKJ r J r SSK J r SSK Jr SrS r\R""S 5r\R""S \R&5r\R""S 5r"S S5r"SS\5rSr"SS\5r\"\"\R8S- 55rS\-r\R>rg)z:Classes to generate plain text from a message object tree.) GeneratorDecodedGeneratorBytesGeneratorN)deepcopy)StringIOBytesIO)_has_surrogates)HeaderWriteError_ z \r\n|\r|\nz^From z\r\n[^ \t]|\r[^ \n\t]|\n[^ \t]c\rSrSrSrSSS.SjjrSrSSjrSrS r S r S r S r S r SrSr\rSrSrSrSr\SSj5r\S5rSrg)rz~Generates output from a Message object tree. This basic generator writes the message to the given file object as plain text. Npolicyc\UcUcSO URnXlX lX0lX@lg)auCreate the generator for message flattening. outfp is the output file-like object for writing the message to. It must have a write() method. Optional mangle_from_ is a flag that, when True (the default if policy is not set), escapes From_ lines in the body of the message by putting a `>' in front of them. Optional maxheaderlen specifies the longest length for a non-continued header. When a header line is longer (in characters, with tabs expanded to 8 spaces) than maxheaderlen, the header will split as defined in the Header class. Set maxheaderlen to zero to disable header wrapping. The default is 78, as recommended (but not required) by RFC 2822. The policy keyword specifies a policy object that controls a number of aspects of the generator's operation. If no policy is specified, the policy associated with the Message object passed to the flatten method is used. NT) mangle_from__fp _mangle_from_ maxheaderlenr)selfoutfprrrs 5/opt/imh/python3.13/lib/python3.13/email/generator.py__init__Generator.__init__%s12  #)>4v7J7JL)( c:URRU5 gN)rwriterss rrGenerator.writeEs qrcURc URO URnUbURUS9nURbURURS9nURUlUR UR5UlSUlUR UR5UlURnURnX@lXAlU(a`UR5nU(d,S[R"[R"55-nURXpR-5 URU5 XPlXalg!XPlXalf=f)aPrint the message object tree rooted at msg to the output file specified when the Generator instance was created. unixfrom is a flag that forces the printing of a Unix From_ delimiter before the first object in the message tree. If the original message has no From_ delimiter, a `standard' one is crafted. By default, this is False to inhibit the printing of any From_ delimiter. Note that for subobjects, no From_ line is printed. linesep specifies the characters used to indicate a new line in the output. The default value is determined by the policy specified when the Generator instance was created or, if none was specified, from the policy associated with the msg. N)linesepmax_line_lengthz From nobody )rclonerr#_NL_encode _encoded_NL_EMPTY_encoded_EMPTY get_unixfromtimectimer_write)rmsgunixfromr#rold_gen_policyold_msg_policyufroms rflattenGenerator.flattenIs* ${{2   \\'\2F    (\\$2C2C\DF>><<1 "ll4;;7  ( KJ((**TZZ -DDE 588+, KK (K'J)K'Js BE E.cNURUURSURS9$)z1Clone this generator with the exact same options.Nr) __class__rr)rfps rr'Generator.clonezs-~~b"00"%)[[2 2rc[5$r)rrs r _new_bufferGenerator._new_buffers zrcU$rrs rr)Generator._encodesrcU(dg[RU5nUSSH/nURU5 URUR5 M1 US(aURUS5 gg)N)NLCREsplitrr()rlineslines r _write_linesGenerator._write_liness`  E"#2JD JJt  JJtxx  9 JJuRy ! rc*URnSUlUR5=UlnURU5 X lURnU?U(aP[ U5nUR S5c USUS'OUR SUS5 UR SUS5 [USS5nUcURU5 OU"U5 URRUR55 g!X lURnU?f=f)Ncontent-transfer-encodingrContent-Transfer-Encoding content-type_write_headers) r _munge_cter> _dispatchrgetreplace_headergetattrrPrgetvalue)rr1oldfpsfp munge_ctemeths rr0Generator._writes "DO!--/ /DHs NN3 HI 3-Cww23;3 ! M   ~y| <s,d3 <    $ J s||~&'HIs /C<<Dc(UR5nUR5n[RX#45R SS5n[ USU-S5nUc1UR SS5n[ USU-S5nUc UR nU"U5 g)N-r _handle_)get_content_maintypeget_content_subtype UNDERSCOREjoinreplacerU _writeBody)rr1mainsubspecificrZgenerics rrRGenerator._dispatchs '')%%'??D;/77SAtZ(2D9 <ll3,G4g!5tFrom ) get_payload isinstancestr TypeErrortyper _payload get_paramr set_payloadrQrfcrerfrI)rr1payloadrws r _handle_textGenerator._handle_texts//# ? '3''9DMIJ J 3<< ( (mmI.G"sm34 g6//+#&'B#C#&~#6#8   hhx1G '"rct/nUR5nUc/nO?[U[5(aURU5 g[U[5(dU/nUH^nUR 5nUR U5nURUSURS9 URUR55 M` UR5nU(d=URRU5nURU5nURU5 UR bjUR"(a![$R'SUR 5n O UR n UR)U 5 URUR5 URSU-UR-5 U(a*UR*RUR-S55 UHLn URURS-U-UR-5 UR*RU 5 MN URURS-U-S-UR-5 UR.bPUR"(a![$R'SUR.5n O UR.n UR)U 5 gg)NFr2r#rxz--r)ryrzr{rlistr>r'r6r(appendrV get_boundaryr*rb_make_boundary set_boundarypreamblerrrfrIrpopepilogue) rr1msgtextssubpartspartr gboundaryalltextr body_partrs r_handle_multipartGenerator._handle_multipart s??$  H # & & JJx Hd++ zHD  "A 1 A IIdUDHHI = OOAJJL )  ##%&&++H5G**73H   X & << #!!88Hcll;<<   h ' JJtxx  4(?TXX-.  HHNN8<<? +"I JJtxx$1DHH< = HHNN9 % " 488d?X-4txx?@ << #!!88Hcll;<<   h ' $rcURnURSS9UlURU5 X lg!X lf=f)Nrr$)rr'r)rr1ps r_handle_multipart_signed"Generator._handle_multipart_signedFs= KKggag0    " "3 'K!Ks :Ac /nUR5HnUR5nURU5nURUSURS9 UR 5nUR UR5nU(aBUSUR:Xa/URURRUSS55 MURU5 M URRURRU55 g)NFrrD) ryr>r'r6r(rVrFr*r,rrbrr)rr1blocksrr rtextrGs r_handle_message_delivery_status)Generator._handle_message_delivery_statusQsOO%D  "A 1 A IIdUDHHI =::r'r~rzrr6ryr(rVr)rr)rr1r rrs r_handle_messageGenerator._handle_messagefs}     JJqM,, gt $ $ IIcooa(5$((I KjjlGll7+G wrcR[R"[R5nS[U--S-nUcU$UnSnUR S[ R"U5-S-[ R5nURU5(dU$US-[U5-nUS- nMk)Nz===============z==rz^--z(--)?$.rO) random randrangesysmaxsize_fmt _compile_rereescape MULTILINErpr{)clsrtokenrbcountercres rrGenerator._make_boundarys  -.5 <O //%"))A,"6"A2<<PC::d##3W-A qLG rc.[R"X5$r)rcompilerr flagss rrGenerator._compile_reszz!##r) r+r(r,r*rrrQrr)NN)FNr)__name__ __module__ __qualname____firstlineno____doc__rrr6r'r>r)rIr0rRrPrrdrrrr classmethodrr__static_attributes__rArrrrs@/(b2( " %'N( &#,J8(t 6* 2"$$rrcX^\rSrSrSrSrSrSrSrU4Sjr \ r \ S5r S r U=r$) riaGenerates a bytes version of a Message object tree. Functionally identical to the base Generator except that the output is bytes and not string. When surrogates were used in the input to encode bytes, these are decoded back to bytes for output. If the policy has cte_type set to 7bit, then the message is transformed such that the non-ASCII bytes are properly content transfer encoded, using the charset unknown-8bit. The outfp object must accept bytes in its write method. cZURRURSS55 g)Nasciisurrogateescape)rrencoders rrBytesGenerator.writes qxx):;BytesGenerator._new_buffers yrc$URS5$Nr)rrs rr)BytesGenerator._encodesxx  rcUR5H9up#URRURR X#55 M; URUR 5 gr)rkrrr fold_binaryr()rr1rrrss rrPBytesGenerator._write_headerssGMMODA HHNN4;;2218 9$ 488rcT>URcg[UR5(alURRS:XdRUR(a%[ R SUR5UlURUR5 g[[U]+U5 g)N7bitrx) r~r rcte_typerrrfrIsuperrr)rr1r9s rrBytesGenerator._handle_textsr <<   3<< ( (1E1Ev1M!!#xx#,,?   cll + . 3C 8rcN[R"URS5U5$r)rrrrs rrBytesGenerator._compile_reszz!((7+U33rrA)rrrrrrr>r)rPrrdrrr __classcell__)r9s@rrrs: =! 9J44rrzD[Non-text (%(type)s) part of message omitted, filename %(filename)s]c0\rSrSrSrSSS.SjjrSrSrg) rizGenerates a text representation of a message. Like the Generator base class, except that non-text parts are substituted with a format string representing the part. NrcX[RXX#US9 Uc [UlgX@lg)aLike Generator.__init__() except that an additional optional argument is allowed. Walks through all subparts of a message. If the subpart is of main type `text', then it prints the decoded payload of the subpart. Otherwise, fmt is a format string that is used instead of the message payload. fmt is expanded with the following keywords (in %(keyword)s format): type : Full MIME type of the non-text part maintype : Main MIME type of the non-text part subtype : Sub-MIME type of the non-text part filename : Filename of the non-text part description: Description associated with the non-text part encoding : Content transfer encoding of the non-text part The default value for fmt is None, meaning [Non-text (%(type)s) part of message omitted, filename %(filename)s] rN)rr_FMTr)rrrrfmtrs rrDecodedGenerator.__init__s/. 4 "(  * ;DIIrc UR5HnUR5nUS:Xa[URSS9US9 M2US:XaM:[URUR 5UR5UR 5URS5URSS5URS S 5S .-US9 M g) NrF)decode)file multipartz [no filename]zContent-Descriptionz[no description]rMz [no encoding])r}maintypesubtypefilename descriptionencoding) walkr_printryrget_content_typer` get_filenamerS)rr1rrs rrRDecodedGenerator._dispatchsHHJD002H6!d&&e&44@[(dii#'#8#8#:#'#<#<#>#'#;#;#=#'#4#4_#E#'88,A,>$@#'88,G,;$= # ! "r)r)NNN)rrrrrrrRrrArrrrs <"rrrOz%%0%dd) r__all__rrr.rcopyriorr email.utilsr email.errorsr raNLrrErrrorrrrlenreprr_widthrrrArrrs A =  ')    =! zz)R\\*zz"CDx$x$v /4Y/4dN6"y6"t T#++a- !&))r