Your IP : 18.118.24.176


Current Path : /opt/alt/python310/lib64/python3.10/email/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/email/__pycache__/_parseaddr.cpython-310.opt-2.pyc

o

6��f�E�@s�	gd�ZddlZddlZdZdZdZgd�Zgd�Zdddddd	d
ddd
ddd
dd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
Gdd�d�ZGdd�de�ZdS))�	mktime_tz�	parsedate�parsedate_tz�quote�N� �z, )ZjanZfebZmarZapr�mayZjunZjulZaug�sep�octZnovZdecZjanuaryZfebruaryZmarchZaprilrZjuneZjulyZaugustZ	septemberZoctoberZnovemberZdecember)ZmonZtueZwedZthuZfriZsatZsunip���i���i���i����iD���i��)ZUTZUTCZGMT�ZZASTZADTZESTZEDTZCSTZCDTZMSTZMDTZPSTZPDTcCs.	t|�}|s	dS|ddurd|d<t|�S)N�	r)�
_parsedate_tz�tuple)�data�res�r�7/opt/alt/python310/lib64/python3.10/email/_parseaddr.pyr-src
Cs�	|sdS|��}|s
dS|d�d�s|d��tvr |d=n|d�d�}|dkr7|d|dd�|d<t|�dkrR|d�d�}t|�dkrR||dd�}t|�dkr�|d}|�d�}|dkrj|�d�}|dkr|d|�||d�g|dd�<n|�d	�t|�d
kr�dS|dd
�}|\}}}}}|r�|r�|s�dS|��}|tvr�||��}}|tvr�dSt�	|�d}|dkr�|d8}|ddkr�|dd�}|�d�}|dkr�||}}|ddkr�|dd�}|s�dS|d�
�s�||}}|ddk�r|dd�}|�d�}t|�d
k�r|\}	}
d}nAt|�dk�r'|\}	}
}n4t|�dk�rYd|dv�rY|d�d�}t|�d
k�rJ|\}	}
d}nt|�dk�rW|\}	}
}ndSdSzt|�}t|�}t|	�}	t|
�}
t|�}Wnt�y|YdSw|dk�r�|dk�r�|d7}n|d7}d}|�
�}|tv�r�t|}nzt|�}Wn
t�y�Ynw|dk�r�|�d��r�d}|�r�|dk�r�d}
|}nd}
|
|dd|dd}||||	|
|ddd|g
S)Nr�,���-��+���r���:��0�.�d�Dili�i�<)�split�endswith�lower�	_daynames�rfind�len�find�append�_monthnames�index�isdigit�int�
ValueError�upper�
_timezones�
startswith)r�iZstuff�sZddZmmZyyZtmZtzZthhZtmmZtssZtzoffsetZtzsignrrrr
9s�	

"




�




�
r
cCs$	t|�}t|t�r|dd�S|S)Nr)r�
isinstancer�r�trrrr�s

rcCs:	|ddurt�|dd�d�St�|�}||dS)Nr�)r)�time�mktime�calendarZtimegmr6rrrr�s

rcCs	|�dd��dd�S)N�\z\\�"z\")�replace)�strrrrr�src@szeZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	ddd�Z
dd�Zdd�Zdd�Z
ddd�Zdd�ZdS)�
AddrlistClasscCs\	d|_d|_d|_d|_|j|j|_|j|j|j|_|j�dd�|_||_g|_	dS)Nz()<>@,:;."[]rz 	z
rr)
�specials�pos�LWSZCR�FWS�atomendsr>�
phraseends�field�commentlist��selfrGrrr�__init__�s
zAddrlistClass.__init__cCs�	g}|jt|j�krI|j|j|jdvr/|j|jdvr'|�|j|j�|jd7_n|j|jdkr@|j�|���nn|jt|j�kst�|�S)Nz

r�()	rBr(rGrCr*rH�
getcomment�EMPTYSTRING�join)rJZwslistrrr�gotonext�s�
	zAddrlistClass.gotonextcCsJ	g}|jt|j�kr#|��}|r||7}n|�d�|jt|j�ks|S)N)rr)rBr(rG�
getaddressr*)rJ�resultZadrrr�getaddrlist�s

�zAddrlistClass.getaddrlistcCs�	g|_|��|j}|j}|��}|��g}|jt|j�kr.|r-t�|j�|dfg}n�|j|jdvrJ||_||_|��}t�|j�|fg}n�|j|jdkr�g}t|j�}|jd7_|jt|j�kr�|��|j|kr�|j|jdkr�|jd7_n||�	�}|jt|j�kshnI|j|jdkr�|�
�}|jr�t�|�dd�|j�d	|fg}n't�|�|fg}n|r�t�|j�|dfg}n|j|j|jvr�|jd7_|��|jt|j�kr�|j|jd
kr�|jd7_|S)Nrz.@rr�;�<z (r�)r)rHrPrB�
getphraselistr(rG�SPACErO�getaddrspecrQ�getrouteaddrrA)rJZoldposZoldcl�plistZ
returnlistZaddrspecZfieldlenZ	routeaddrrrrrQs`�
��
��� zAddrlistClass.getaddresscCs�	|j|jdkrdSd}|jd7_|��d}|jt|j�kry|r+|��d}nB|j|jdkr=|jd7_	|S|j|jdkrO|jd7_d}n|j|jdkr_|jd7_n|��}|jd7_	|S|��|jt|j�ks"|S)	NrUFrr�>�@Tr)rGrBrPr(�	getdomainrY)rJZexpectrouteZadlistrrrrZGs6���zAddrlistClass.getrouteaddrcCs\	g}|��|jt|j�krzd}|j|jdkr4|r%|d��s%|��|�d�|jd7_d}n1|j|jdkrH|�dt|����n|j|j|j	vr^|r]|d��s]|��n|�|�
��|��}|rr|rr|�|�|jt|j�ks|jt|j�ks�|j|jdkr�t�|�S|�d�|jd7_|��|�
�}|s�tSt�|�|S)	NTrrrFr=z"%s"r])rPrBr(rG�strip�popr*r�getquoterE�getatomrNrOr^)rJZaslistZpreserve_wsZwsZdomainrrrrYgs>

� 

zAddrlistClass.getaddrspeccCs�	g}|jt|j�kru|j|j|jvr|jd7_nQ|j|jdkr-|j�|���n@|j|jdkr=|�|���n0|j|jdkrR|jd7_|�d�n|j|jdkr\tS|j|j|j	vrfn|�|�
��|jt|j�kst�|�S)NrrL�[rr])rBr(rGrCrHr*rM�getdomainliteralrNrErbrO)rJZsdlistrrrr^�s&�
zAddrlistClass.getdomainTcCs�	|j|j|krdSdg}d}|jd7_|jt|j�krr|r-|�|j|j�d}n6|j|j|vr=|jd7_n5|rO|j|jdkrO|�|���q|j|jdkrZd}n	|�|j|j�|jd7_|jt|j�kst�|�S)NrFrrLr<T)rGrBr(r*rMrNrO)rJZ	begincharZendcharsZ
allowcommentsZslistrrrr�getdelimited�s,�
zAddrlistClass.getdelimitedcC�	|�ddd�S)Nr=z"
F�re�rJrrrra��zAddrlistClass.getquotecCrf)NrLz)
TrgrhrrrrM�rizAddrlistClass.getcommentcCs	d|�ddd�S)Nz[%s]rcz]
Frgrhrrrrd�szAddrlistClass.getdomainliteralNcCsr	dg}|dur|j}|jt|j�kr4|j|j|vrn|�|j|j�|jd7_|jt|j�kst�|�S)Nrr)rErBr(rGr*rNrO)rJrEZatomlistrrrrb�s�
zAddrlistClass.getatomcCs�	g}|jt|j�krZ|j|j|jvr|jd7_n6|j|jdkr,|�|���n&|j|jdkr=|j�|���n|j|j|jvrI	|S|�|�	|j��|jt|j�ks|S)Nrr=rL)
rBr(rGrDr*rarHrMrFrb)rJr[rrrrW�s��zAddrlistClass.getphraselist)T�N)�__name__�
__module__�__qualname__rKrPrSrQrZrYr^rerarMrdrbrWrrrrr@�s	; &
%
r@c@sFeZdZ	dd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�AddressListcCs(t�||�|r|��|_dSg|_dSrj)r@rKrS�addresslistrIrrrrKs
zAddressList.__init__cCs
t|j�Srj)r(rorhrrr�__len__	s
zAddressList.__len__cCs>td�}|jdd�|_|jD]
}||jvr|j�|�q|Srj�rnror*�rJ�otherZnewaddr�xrrr�__add__s

�zAddressList.__add__cCs&|jD]
}||jvr|j�|�q|Srj)ror*�rJrsrtrrr�__iadd__�


�zAddressList.__iadd__cCs.td�}|jD]
}||jvr|j�|�q|Srjrqrrrrr�__sub__s

�zAddressList.__sub__cCs&|jD]
}||jvr|j�|�q|Srj)ro�removervrrr�__isub__$rxzAddressList.__isub__cCs
|j|Srj)ro)rJr,rrr�__getitem__+s
zAddressList.__getitem__N)
rkrlrmrKrprurwryr{r|rrrrrns	rn)�__all__r9r;rXrNZ
COMMASPACEr+r&r1rr
rrrr@rnrrrr�<module>s0�	}	

/

?>