§
    ZŠtjN
  ã                   óT   — d Z ddlmZ ddlmZmZ dZd„ Zd„ Z	d„ Z
d„ Zd	„ Zd
„ Zd„ ZdS )zn
oauthlib.utils
~~~~~~~~~~~~~~

This module contains utility methods used by various parts of the OAuth
spec.
é    N)ÚquoteÚunquoteÚ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c                 ó*   ‡ — ˆ fd„}‰ j         |_         |S )z§Decorator which filters params to remove non-oauth_* parameters

    Assumes the decorated method takes a params dict or list of tuples as its
    first argument.
    c                 ó:   •— t          | ¦  «        }  ‰| g|¢R i |¤ŽS )N)Úfilter_oauth_params)ÚparamsÚargsÚkwargsÚtargets      €ú[/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/oauthlib/oauth1/rfc5849/utils.pyÚwrapperzfilter_params.<locals>.wrapper   s0   ø€ Ý$ VÑ,Ô,ˆØˆv�fÐ.˜tÐ.Ð.Ð. vÐ.Ð.Ð.ó    )Ú__doc__)r   r   s   ` r   Úfilter_paramsr      s,   ø€ ð/ð /ð /ð /ð /ð ”n€G„OØ€Nr   c           	      óä   — d„ }t          | t          ¦  «        r<t          t          |t          |                      ¦   «         ¦  «        ¦  «        ¦  «        S t          t          || ¦  «        ¦  «        S )zARemoves all non oauth parameters from a dict or a list of params.c                 ó8   — | d                               d¦  «        S )Nr   Úoauth_)Ú
startswith)Úkvs    r   Úis_oauthz%filter_oauth_params.<locals>.is_oauth!   s   € Ø�!Œu×Ò Ñ)Ô)Ð)r   )Ú
isinstanceÚdictÚlistÚfilterÚitems)r	   r   s     r   r   r      sc   € ð*ð *ð *å�&�$ÑÔð .Ý•F˜8¥T¨&¯,ª,©.¬.Ñ%9Ô%9Ñ:Ô:Ñ;Ô;Ð;å•F˜8 VÑ,Ô,Ñ-Ô-Ð-r   c           	      ó´   — t          | t          ¦  «        s3t          dd                     | t	          | ¦  «        ¦  «        z   ¦  «        ‚t          | d¬¦  «        S )zªEscape a unicode string in an OAuth-compatible fashion.

    Per `section 3.6`_ of the spec.

    .. _`section 3.6`: https://tools.ietf.org/html/rfc5849#section-3.6

    z$Only unicode objects are escapable. zGot {!r} of type {}.ó   ~)Úsafe)r   ÚstrÚ
ValueErrorÚformatÚtyper   ©Úus    r   Úescaper&   )   sc   € õ �a�ÑÔð DÝÐ?Ø/×6Ò6°q½$¸q¹'¼'ÑBÔBñCñ Dô Dð 	Dõ �˜ÐÑÔÐr   c                 óh   — t          | t          ¦  «        st          d¦  «        ‚t          | ¦  «        S )Nz%Only unicode objects are unescapable.)r   r    r!   r   r$   s    r   Úunescaper(   9   s0   € Ý�a�ÑÔð BÝÐ@ÑAÔAÐAÝ�1‰:Œ:Ðr   c                 ó*   — t          j        | ¦  «        S )z1A unicode-safe version of urllib2.parse_keqv_list)Úurllib2Úparse_keqv_list)Úls    r   r+   r+   ?   ó   € õ Ô" 1Ñ%Ô%Ð%r   c                 ó*   — t          j        | ¦  «        S )z1A unicode-safe version of urllib2.parse_http_list)r*   Úparse_http_listr$   s    r   r/   r/   E   r-   r   c                 ó”  — d                      ¦   «         }| dt          |¦  «        …                               ¦   «                              |¦  «        rjt          | t          |¦  «        d…         ¦  «        }	 t	          t          |¦  «                             ¦   «         ¦  «        S # t          t          f$ r Y nw xY wt          d¦  «        ‚)z;Parse an OAuth authorization header into a list of 2-tupleszOAuth NzMalformed authorization header)	ÚlowerÚlenr   r/   r   r+   r   Ú
IndexErrorr!   )Úauthorization_headerÚauth_schemer   s      r   Úparse_authorization_headerr6   K   sÂ   € à—.’.Ñ"Ô"€KØÐ-�S Ñ-Ô-Ð-Ô.×4Ò4Ñ6Ô6×AÒAÀ+ÑNÔNð ÝÐ 4µS¸Ñ5EÔ5EÐ5FÐ5FÔ GÑHÔHˆð	Ý�¨Ñ.Ô.×4Ò4Ñ6Ô6Ñ7Ô7Ð7øÝ�JÐ'ð 	ð 	ð 	ØˆDð	øøøå
Ð5Ñ
6Ô
6Ð6s   Á6-B$ Â$B8Â7B8)r   Úurllib.requestÚrequestr*   Úoauthlib.commonr   r   ÚUNICODE_ASCII_CHARACTER_SETr   r   r&   r(   r+   r/   r6   © r   r   ú<module>r<      s¶   ððð ð !Ð  Ð  Ð  Ð  Ð  à *Ð *Ð *Ð *Ð *Ð *Ð *Ð *ð ,Ð ð
ð ð ð.ð .ð .ðð ð ð ð ð ð&ð &ð &ð&ð &ð &ð	7ð 	7ð 	7ð 	7ð 	7r   