Ë
    >²XjN
  ã                   óR   — 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y)zn
oauthlib.utils
~~~~~~~~~~~~~~

This module contains utility methods used by various parts of the OAuth
spec.
é    N)ÚquoteÚunquoteÚ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c                 ó4   ‡ — ˆ 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                 ó2   •— t        | «      }  ‰| g|¢­i |¤ŽS )N)Úfilter_oauth_params)ÚparamsÚargsÚkwargsÚtargets      €úc/var/www/html/content_generation/venv/lib/python3.12/site-packages/oauthlib/oauth1/rfc5849/utils.pyÚwrapperzfilter_params.<locals>.wrapper   s"   ø€ Ü$ VÓ,ˆÙ�fÐ.˜tÒ. vÑ.Ð.ó    )Ú__doc__)r   r   s   ` r   Úfilter_paramsr      s   ø€ ô/ð —n‘n€G„OØ€Nr   c           	      óª   — d„ }t        | t        «      r,t        t        |t        | j	                  «       «      «      «      S t        t        || «      «      S )zARemoves all non oauth parameters from a dict or a list of params.c                 ó*   — | d   j                  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      s@   € ò*ä�&œ$ÔÜ”F˜8¤T¨&¯,©,«.Ó%9Ó:Ó;Ð;ä”F˜8 VÓ,Ó-Ð-r   c           	      óŠ   — t        | t        «      s't        ddj                  | 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&   )   sI   € ô �aœÔÜÐ?Ø/×6Ñ6°q¼$¸q»'ÓBñCó Dð 	Dô �˜ÔÐr   c                 óN   — t        | t        «      st        d«      ‚t        | «      S )Nz%Only unicode objects are unescapable.)r   r    r!   r   r$   s    r   Úunescaper(   9   s"   € Ü�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j                  «       }| dt        |«       j                  «       j                  |«      r:t        | t        |«      d «      }	 t	        t        |«      j                  «       «      S t        d«      ‚# t        t        f$ r Y t        d«      ‚w xY w)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×AÑAÀ+ÔNÜÐ 4´S¸Ó5EÐ5FÐ GÓHˆð	Üœ¨Ó.×4Ñ4Ó6Ó7Ð7ô Ð5Ó
6Ð6øô œJÐ'ò 	ØÜ
Ð5Ó
6Ð6ð	ús   Á!B ÂBÂB)r   Úurllib.requestÚrequestr*   Úoauthlib.commonr   r   ÚUNICODE_ASCII_CHARACTER_SETr   r   r&   r(   r+   r/   r6   © r   r   Ú<module>r<      s=   ðñõ !ç *ð ,Ð ò
ò.òò ò&ò&ó	7r   