ó
    ychN
  ã                   óR   • S r SSKJr  SSKJrJr  SrS rS r	S r
S rS	 rS
 rS rg)zn
oauthlib.utils
~~~~~~~~~~~~~~

This module contains utility methods used by various parts of the OAuth
spec.
é    N)ÚquoteÚunquoteÚ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c                 ó6   ^ • U 4S jnT R                   Ul         U$ )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   >• [        U 5      n T" U /UQ70 UD6$ )N)Úfilter_oauth_params)ÚparamsÚargsÚkwargsÚtargets      €Úf/var/www/djangovue.mamus.xyz/django/venv/lib/python3.13/site-packages/oauthlib/oauth1/rfc5849/utils.pyÚwrapperÚfilter_params.<locals>.wrapper   s"   ø€ Ü$ VÓ,ˆÙ�fÐ.˜tÒ. vÑ.Ð.ó    )Ú__doc__)r   r   s   ` r   Úfilter_paramsr      s   ø€ õ/ð —n‘n€G„OØ€Nr   c           	      ó²   • S n[        U [        5      (       a,  [        [        U[        U R	                  5       5      5      5      $ [        [        X5      5      $ )zARemoves all non oauth parameters from a dict or a list of params.c                 ó*   • U S   R                  S5      $ )Nr   Úoauth_)Ú
startswith)Úkvs    r   Úis_oauthÚ%filter_oauth_params.<locals>.is_oauth!   s   € Ø�!‰u×Ñ Ó)Ð)r   )Ú
isinstanceÚdictÚlistÚfilterÚitems)r	   r   s     r   r   r      sA   € ò*ä�&œ$×ÑÜ”F˜8¤T¨&¯,©,«.Ó%9Ó:Ó;Ð;ä”F˜8Ó,Ó-Ð-r   c           	      óŽ   • [        U [        5      (       d'  [        SSR                  U [	        U 5      5      -   5      e[        U SS9$ )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(   )   sL   € ô �aœ×ÑÜÐ?Ø/×6Ñ6°q¼$¸q»'ÓBñCó Dð 	Dô �˜ÑÐr   c                 óX   • [        U [        5      (       d  [        S5      e[        U 5      $ )Nz%Only unicode objects are unescapable.)r   r"   r#   r   r&   s    r   Úunescaper*   9   s%   € Ü�aœ×ÑÜÐ@ÓAÐAÜ�1‹:Ðr   c                 ó.   • [         R                  " U 5      $ )z1A unicode-safe version of urllib2.parse_keqv_list)Úurllib2Úparse_keqv_list)Úls    r   r-   r-   ?   ó   € ô ×"Ò" 1Ó%Ð%r   c                 ó.   • [         R                  " U 5      $ )z1A unicode-safe version of urllib2.parse_http_list)r,   Úparse_http_listr&   s    r   r1   r1   E   r/   r   c                 ó8  • SR                  5       nU S[        U5       R                  5       R                  U5      (       a:  [        U [        U5      S 5      n [	        [        U5      R                  5       5      $ [        S5      e! [        [        4 a     Nf = f)z;Parse an OAuth authorization header into a list of 2-tupleszOAuth NzMalformed authorization header)	ÚlowerÚlenr   r1   r   r-   r   Ú
IndexErrorr#   )Úauthorization_headerÚauth_schemer   s      r   Úparse_authorization_headerr8   K   s’   € à—.‘.Ó"€KØÐ-œS Ó-Ð.×4Ñ4Ó6×AÑAÀ+×NÑNÜÐ 4´S¸Ó5EÐ5FÐ GÓHˆð	Üœ¨Ó.×4Ñ4Ó6Ó7Ð7ô Ð5Ó
6Ð6øô œJÐ'ó 	Ùð	ús   Á!B ÂBÂB)r   Úurllib.requestÚrequestr,   Úoauthlib.commonr   r   ÚUNICODE_ASCII_CHARACTER_SETr   r   r(   r*   r-   r1   r8   © r   r   Ú<module>r>      s=   ðñõ !ç *ð ,Ð ò
ò.òò ò&ò&ó	7r   