AlkantarClanX12

Your IP : 18.227.49.73


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

o

6��f�M�@sX	ddlZddlZddlZgd�ZdjZdjZdjZGdd�de�Z	ej
ejdZed	Z
d
d�eed��eeee
��D�Ze�ed
�ded�di�e�de�e��jZdd�Ze�d�jZdd�Zdd�Zgd�Zgd�Zdeefdd�ZGdd�de �Z!dZ"e"d Z#e�d!e"d"e#d#ej$ej%B�Z&Gd$d%�d%e �Z'Gd&d'�d'e'�Z(dS)(�N)�CookieError�
BaseCookie�SimpleCookie�z; � c@seZdZdS)rN)�__name__�
__module__�__qualname__�r
r
�3/opt/alt/python310/lib64/python3.10/http/cookies.pyr�srz!#$%&'*+-.^_`|~:z
 ()/<=>?@[]{}cCsi|]}|d|�qS)z\%03or
)�.0�nr
r
r�
<dictcomp>�s�r��"�\"�\z\\z[%s]+cCs(	|dus	t|�r|Sd|�t�dS)Nr)�
_is_legal_key�	translate�_Translator��strr
r
r�_quote�srz\\(?:([0-3][0-7][0-7])|(.))cCs"|dr
tt|dd��S|dS)N���)�chr�int)�mr
r
r�_unquote_replace�srcCsJ|dus
t|�dkr|S|ddks|ddkr|S|dd�}tt|�S)Nrrr���r)�len�_unquote_subrrr
r
r�_unquote�s
r#)ZMonZTueZWedZThuZFriZSatZSun)
NZJanZFebZMarZAprZMayZJunZJulZAugZSepZOctZNovZDecc	CsRddlm}m}|�}|||�\	}}}}	}
}}}
}d|||||||	|
|fS)Nr)�gmtime�timez#%s, %02d %3s %4d %02d:%02d:%02d GMT)r%r$)ZfutureZweekdaynameZ	monthnamer$r%ZnowZyearZmonthZdayZhhZmmZssZwd�y�zr
r
r�_getdate�s�r(c
@s�eZdZ	ddddddddd	d
�	ZddhZd
d�Zedd��Zedd��Zedd��Z	dd�Z
d1dd�Zdd�Ze
jZdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd2d)d*�ZeZd+d,�Zd1d-d.�Zd1d/d0�Zeej�ZdS)3�Morsel�expiresZPath�CommentZDomainzMax-AgeZSecureZHttpOnlyZVersionZSameSite)	r*�path�commentZdomain�max-age�secure�httponly�versionZsamesiter/r0cCs0d|_|_|_|jD]	}t�||d�qdS)Nr)�_key�_value�_coded_value�	_reserved�dict�__setitem__)�self�keyr
r
r�__init__s
�zMorsel.__init__cC�|jS�N)r2�r8r
r
rr9�z
Morsel.keycCr;r<)r3r=r
r
r�valuer>zMorsel.valuecCr;r<)r4r=r
r
r�coded_valuer>zMorsel.coded_valuecCs2|��}||jvrtd|f��t�|||�dS�NzInvalid attribute %r)�lowerr5rr6r7)r8�K�Vr
r
rr7#s
zMorsel.__setitem__NcCs.|��}||jvrtd|f��t�|||�SrA)rBr5rr6�
setdefault)r8r9�valr
r
rrE)s
zMorsel.setdefaultcCs>t|t�stSt�||�o|j|jko|j|jko|j|jkSr<)�
isinstancer)�NotImplementedr6�__eq__r3r2r4�r8Zmorselr
r
rrI/s

�
�
�z
Morsel.__eq__cCs$t�}t�||�|j�|j�|Sr<)r)r6�update�__dict__rJr
r
r�copy9szMorsel.copycCsRi}t|���D]\}}|��}||jvrtd|f��|||<qt�||�dSrA)r6�itemsrBr5rrK)r8�values�datar9rFr
r
rrK?s

z
Morsel.updatecCs|��|jvSr<)rBr5)r8rCr
r
r�
isReservedKeyHszMorsel.isReservedKeycCsH|��|jvrtd|f��t|�std|f��||_||_||_dS)Nz Attempt to set a reserved key %rzIllegal key %r)rBr5rrr2r3r4)r8r9rFZ	coded_valr
r
r�setKs
z
Morsel.setcCs|j|j|jd�S)N)r9r?r@�r2r3r4r=r
r
r�__getstate__Vs�zMorsel.__getstate__cCs"|d|_|d|_|d|_dS)Nr9r?r@rS)r8�stater
r
r�__setstate__]s

zMorsel.__setstate__�Set-Cookie:cCsd||�|�fS)Nz%s %s)�OutputString)r8�attrs�headerr
r
r�outputbsz
Morsel.outputcCsd|jj|��fS)N�<%s: %s>)�	__class__rrXr=r
r
r�__repr__gszMorsel.__repr__cCsd|�|��dd�S)Nz�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "%s";
        // end hiding -->
        </script>
        rr)rX�replace)r8rYr
r
r�	js_outputjs�zMorsel.js_outputcCs g}|j}|d|j|jf�|dur|j}t|���}|D]m\}}|dkr'q||vr,q|dkrCt|t�rC|d|j|t|�f�q|dkrXt|t�rX|d|j||f�q|dkrot|t	�ro|d|j|t
|�f�q||jvr�|r|t	|j|��q|d|j||f�qt|�S)N�%s=%srr*r.z%s=%dr-)
�appendr9r@r5�sortedrNrGrr(rr�_flags�_semispacejoin)r8rY�resultrbrNr9r?r
r
rrXts.
�zMorsel.OutputStringr<)NrW)rrr	r5rdr:�propertyr9r?r@r7rErI�object�__ne__rMrKrQrRrTrVr[�__str__r^r`rX�classmethod�types�GenericAlias�__class_getitem__r
r
r
rr)�sH�



	



!r)z,\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=z\[\]z�
    \s*                            # Optional whitespace at start of cookie
    (?P<key>                       # Start of group 'key'
    [a	]+?   # Any word of at least one letter
    )                              # End of group 'key'
    (                              # Optional group: there may not be a value.
    \s*=\s*                          # Equal Sign
    (?P<val>                         # Start of group 'val'
    "(?:[^\\"]|\\.)*"                  # Any doublequoted string
    |                                  # or
    \w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT  # Special case for "expires" attr
    |                                  # or
    [a-]*      # Any word or empty string
    )                                # End of group 'val'
    )?                             # End of optional value group
    \s*                            # Any number of spaces.
    (\s+|;|$)                      # Ending either at space, semicolon, or EOS.
    c@sleZdZ	dd�Zdd�Zddd�Zdd	�Zd
d�Zddd�ZeZ	dd�Z
ddd�Zdd�Ze
fdd�ZdS)rcCs
	||fSr<r
�r8rFr
r
r�value_decode�szBaseCookie.value_decodecCs	t|�}||fSr<r�r8rFZstrvalr
r
r�value_encode�szBaseCookie.value_encodeNcCs|r	|�|�dSdSr<)�load)r8�inputr
r
rr:�s�zBaseCookie.__init__cCs0	|�|t��}|�|||�t�|||�dSr<)�getr)rRr6r7)r8r9Z
real_valuer@�Mr
r
rZ__set�szBaseCookie.__setcCs>	t|t�rt�|||�dS|�|�\}}|�|||�dSr<)rGr)r6r7rr�_BaseCookie__set)r8r9r?�rval�cvalr
r
rr7�s

zBaseCookie.__setitem__rW�
cCs<	g}t|���}|D]
\}}|�|�||��q|�|�Sr<)rcrNrbr[�join)r8rYrZ�seprfrNr9r?r
r
rr[�s
zBaseCookie.outputcCsJg}t|���}|D]\}}|�d|t|j�f�q
d|jjt|�fS)Nrar\)rcrNrb�reprr?r]r�
_spacejoin)r8�lrNr9r?r
r
rr^�s
zBaseCookie.__repr__cCs8	g}t|���}|D]\}}|�|�|��qt|�Sr<)rcrNrbr`�	_nulljoin)r8rYrfrNr9r?r
r
rr`�szBaseCookie.js_outputcCs8	t|t�r
|�|�dS|��D]\}}|||<qdSr<)rGr�_BaseCookie__parse_stringrN)r8Zrawdatar9r?r
r
rrs�s

�
zBaseCookie.loadcCspd}t|�}g}d}d}d}d|kr|kr�nnz|�||�}	|	s#nq|	�d�|	�d�}
}|	�d�}|
ddkrI|s<q|�||
dd�|f�n@|
��tjvru|sTdS|durj|
��tjvrh|�||
df�n!dS|�||
t	|�f�n|dur�|�||
|�
|�f�d}ndSd|kr�|ksnd}|D]\}
}
}|
|kr�|||
<q�|\}}|�|
||�||
}q�dS)	NrFrrr9rF�$T)r!�match�group�endrbrBr)r5rdr#rprw)r8rZpatt�ir
Zparsed_itemsZmorsel_seenZTYPE_ATTRIBUTEZ
TYPE_KEYVALUEr�r9r?rv�tprxryr
r
rZ__parse_string	sJ
�%

�zBaseCookie.__parse_stringr<)NrWrz)rrr	rprrr:rwr7r[rjr^r`rs�_CookiePatternr�r
r
r
rr�s	
	
	
rc@seZdZ	dd�Zdd�ZdS)rcCst|�|fSr<)r#ror
r
rrpMszSimpleCookie.value_decodecCst|�}|t|�fSr<)rrrqr
r
rrrPszSimpleCookie.value_encodeN)rrr	rprrr
r
r
rrFsr))�re�stringrl�__all__r{r�rer~�	ExceptionrZ
ascii_lettersZdigitsZ_LegalCharsZ_UnescapedCharsrR�range�map�ordrrK�compile�escape�	fullmatchrr�subr"rr#Z_weekdaynameZ
_monthnamer(r6r)Z_LegalKeyCharsZ_LegalValueChars�ASCII�VERBOSEr�rrr
r
r
r�<module>sX&]��
6����
�