o
0i @ s d Z ddgZddlZddlZddlZddlmZmZ ddlm Z ddlm
Z
ddlmZm
Z
dd lmZ dd
lmZ ejZdZedZd
d ZdddZdd Zdd ZG dd dZG dd deZG dd deZdS )z8Basic message object for the email package object model.MessageEmailMessage N)BytesIOStringIO)utils)errors)Policycompat32charset)decode_bz; z[ \(\)<>@,;:\\"/\[\]\?=]c C s4 t | d\}}}|s| d fS | | fS )N;)str partitionstrip)paramasepb r 4/opt/alt/python310/lib64/python3.10/email/message.py_splitparam s r Tc C s |dur^t |dkr^t|tr&| d7 } t|d |d |d }d| |f S z|d W n tyG | d7 } t|dd }d| |f Y S w |sOt|rXd
| t |f S d| |f S | S )a~ Convenience function to format and return a key=value pair.
This will quote the value if needed or if quote is true. If value is a
three tuple (charset, language, value), it will be encoded according
to RFC2231 rules. If it contains non-ascii characters it will likewise
be encoded according to RFC2231 rules, using the utf-8 charset and
a null language.
Nr * %s=%sasciizutf-8 z%s="%s")
len
isinstancetupler Zencode_rfc2231encodeUnicodeEncodeError tspecialssearchquote)r valuer% r r r _formatparam' s
r' c C s dt | } g }d}| d||kr|d7 }| d|}|d}}|dkrK|| d||| d|| 7 }|d dkr