python (3.12.0)

(root)/
lib/
python3.12/
email/
__pycache__/
generator.cpython-312.opt-2.pyc

ˑeNX	gdZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZdZdZ
ejdZejd	ej ZGd
dZGdd
eZdZGddeZeeej0dz
ZdezZej6Zy))	GeneratorDecodedGeneratorBytesGeneratorN)deepcopy)StringIOBytesIO)_has_surrogates_
z
\r\n|\r|\nz^From ceZdZ	ddddZdZddZdZdZdZd	Z	d
Z
dZdZd
Z
e
ZdZdZdZdZeddZedZy)rNpolicycb	||dn|j}||_||_||_||_y)NT)mangle_from__fp
_mangle_from_maxheaderlenr)selfoutfprrrs     C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/email/generator.py__init__zGenerator.__init__#s>	.#)>4v7J7JL)(c:|jj|yN)rwriterss  rrzGenerator.writeCsqrc	|j|jn|j}||j|}|j|j|j}|j|_|j|j|_d|_|j|j|_|j}|j}	||_||_|rZ|j}|s*dtjtjz}|j||jz|j|||_||_y#||_||_wxYw)N)linesepmax_line_lengthzFrom nobody )rclonerr_NL_encode_encoded_NL_EMPTY_encoded_EMPTYget_unixfromtimectimer_write)rmsgunixfromrrold_gen_policyold_msg_policyufroms        rflattenzGenerator.flattenGs*	( ${{2\\'\2F(\\$2C2C\DF>><<1"ll4;;7
	( DKCJ((**TZZ		-DDE

5488+,KK(DK'CJ)DK'CJs
A;EE-cV	|j||jd|jSNr
)	__class__rr)rfps  rr#zGenerator.clonexs0?~~b"00"%)[[2	2rctSr)rrs r_new_bufferzGenerator._new_buffers
zrc|Srrs  rr%zGenerator._encodesrc|sytj|}|ddD].}|j||j|j0|dr|j|dyy)N)NLCREsplitrr$)rlineslines   r_write_lineszGenerator._write_linesseE"#2J	!DJJtJJtxx 	!9JJuRy!rc |j}	d|_|jx|_}|j|||_|j}|`|rOt	|}|jd	|d|d<n|j
d|d|j
d|dt|dd}||j|n|||jj|jy#||_|j}|`wxYw)Ncontent-transfer-encodingrContent-Transfer-Encodingcontent-type_write_headers)r
_munge_cter9	_dispatchrgetreplace_headergetattrrHrgetvalue)rr-oldfpsfp	munge_ctemeths      rr,zGenerator._writes	 "DO!--//DHsNN3DHI3-Cww23;3<Q</0""#>	!M~y|<s,d3<$Js||~&'DHIs/C66D
c&|j}|j}tj||fj	dd}t|d|zd}|0|j	dd}t|d|zd}||j}||y)N-r
_handle_)get_content_maintypeget_content_subtype
UNDERSCOREjoinreplacerM
_writeBody)rr-mainsubspecificrRgenerics       rrJzGenerator._dispatchs
'')%%'??D#;/77SAtZ(2D9<ll3,G4g!5t<D|S	rc|jD]0\}}|j|jj||2|j|jyr)	raw_itemsrrfoldr$rr-hvs    rrHzGenerator._write_headerssJMMO	/DAqJJt{{''1-.	/	

488rc|j}|yt|tstdt	|zt|jrR|jd}|?t|}|d=|j|||j}|d|df|_
|jrtjd|}|j|y)Nzstring payload expected: %scharsetrDrF>From )get_payload
isinstancestr	TypeErrortyper	_payload	get_paramrset_payloadrIrfcrer]rB)rr-payloadrgs    r_handle_textzGenerator._handle_texts//#?'3'9DMIJJ3<<(mmI.G"sm341//+#&'B#C#&~#6#8hhx1G'"rc0g}|j}|g}n5t|tr|j|yt|ts|g}|D]`}|j}|j
|}|j|d|j|j|jb|j}|s=|jj|}|j|}|j||j e|j"r!t$j'd|j }	n|j }	|j)|	|j|j|jd|z|jz|r*|j*j|j-d|D]K}
|j|jdz|z|jz|j*j|
M|j|jdz|zdz|jz|j.K|j"r!t$j'd|j.}n|j.}|j)|yy)NFr.rrhz--r)rirjrkrlistr9r#r2r$appendrNget_boundaryr&rY_make_boundaryset_boundarypreamblerrqr]rBrpopepilogue)rr-msgtextssubpartspartrgboundaryalltextr{	body_partr}s            r_handle_multipartzGenerator._handle_multiparts??$H
#
&JJx Hd+ zH	*D  "A

1
A
IIdUDHHI=OOAJJL)		*##%&&++H5G**73HX&<<#!!88Hcll;<<h'JJtxx 

4(?TXX-.HHNN8<<?+"	&IJJtxx$1DHH<=HHNN9%		&	

488d?X-4txx?@<<#!!88Hcll;<<h'$rc|j}|jd|_	|j|||_y#||_wxYw)Nrr )rr#r)rr-ps   r_handle_multipart_signedz"Generator._handle_multipart_signed;sA
KKggag0	""3'DK!DKs	>	Acg}|jD]}|j}|j|}|j|d|j|j}|j
|j}|r@|d|jk(r.|j|jj|dd|j||jj|jj|y)NFrur=)
rir9r#r2r$rNr?r&r(rwrYrr)rr-blocksrrrtextr@s        r_handle_message_delivery_statusz)Generator._handle_message_delivery_statusFsOO%
	$D  "A

1
A
IIdUDHHI=::<DJJt//0Erd&9&99

d..33E#2J?@

d#
	$	
t'',,V45rcR|j}|j|}|j}t|tr>|j|j
dd|j|j}n|j|}|jj|y)NrFru)r9r#rnrjrvr2rir$rNr%rr)rr-rrrrs     r_handle_messagezGenerator._handle_message[szJJqM,,gt$
IIcooa(5$((IKjjlGll7+Gwrc@tjtj}dt|zzdz}||S|}d}	|jdt
j|zdztj}|j|s	|S|dzt|z}|dz
}d)Nz===============z==rz^--z(--)?$.rG)random	randrangesysmaxsize_fmt_compile_rereescape	MULTILINEsearchrk)clsrtokenrbcountercres       rryzGenerator._make_boundaryts  -.5<O//%"))A,"6"A2<<PC::d#3W-AqLGrc.tj||Sr)rcompilerrflagss   rrzGenerator._compile_reszz!U##r)NN)FNr)__name__
__module____qualname__rrr2r#r9r%rBr,rJrHrsr[rrrrclassmethodryrr;rrrrs@/(b2(	" %'N(#,J8(t	6* 2"$$rrcLeZdZ	dZdZdZdZfdZeZe	dZ
xZS)rcZ|jj|jddy)Nasciisurrogateescape)rrencoders  rrzBytesGenerator.writesqxx):;<rctSr)rr8s rr9zBytesGenerator._new_buffers
yrc$|jdSNr)rrs  rr%zBytesGenerator._encodesxx  rc|jD]:\}}|jj|jj	||<|j|j
yr)rarrrfold_binaryr$rcs    rrHzBytesGenerator._write_headerssPMMO	:DAqHHNN4;;221a89	:	

488rc<|jyt|jrf|jjdk(sM|jr%t
j
d|j|_|j|jytt|+|y)N7bitrh)rnr	rcte_typerrqr]rBsuperrrs)rr-r5s  rrszBytesGenerator._handle_textso<<3<<(1E1Ev1M!!#xx#,,?cll+.3C8rcLtj|jd|Sr)rrrrs   rrzBytesGenerator._compile_reszz!((7+U33r)rrrrr9r%rHrsr[rr
__classcell__)r5s@rrrs:
=!
9J44rrzD[Non-text (%(type)s) part of message omitted, filename %(filename)s]c"eZdZ	ddddZdZy)rNr
cd	tj||||||t|_y||_yr4)rr_FMTr)rrrrfmtrs      rrzDecodedGenerator.__init__s:	*	4l"(		*;DIDIrc
|jD]}|j}|dk(rt|jd|6|dk(r<t|j|j|j|j
|jd|jdd|jd	d
dz|y)NrF)decode)file	multipartz
[no filename]zContent-Descriptionz[no description]rEz
[no encoding])rmmaintypesubtypefilenamedescriptionencoding)	walkrVprintrirget_content_typerWget_filenamerK)rr-rrs    rrJzDecodedGenerator._dispatchsHHJ	"D002H6!d&&e&44@[(dii#'#8#8#:#'#<#<#>#'#;#;#=#'#4#4_#E#'88,A,>$@#'88,G,;$=	#	!	"	"r)NNN)rrrrrJr;rrrrs
<"rrrGz%%0%dd)__all__rrr*rcopyriorremail.utilsr	rXNLrr>rrqrrrrlenreprr_widthrryr;rr<module>rs
A
=	

 '

	

=!rzz)R\\*o$o$d/4Y/4dN6"y6"t

T#++a-
 	!&))r