Ë
    :É„jÑ  ã                   óD   — d dl Z d dlmZmZ d dlZd dlmZ  G d„ d«      Zy)é    N)ÚListÚUnion)Úrawc                   ó4   — e Zd Zdddeeef   dee   defd„Zy)ÚSetPinnedGiftsÚselfzpyrogram.ClientÚowner_idÚowned_gift_idsÚreturnc              ƒ   óŽ  K  — g }|D �]Y  }t        |t        «      st        dt        |«      › d�«      ‚t	        j
                  dt        |«      «      }| j                  j                  t        |«      «      }|ro|j                  t        j                  j                  | j                  |j                  d«      «      ƒ d{  –—† t        |j                  d«      «      ¬«      «       Œà|r@|j                  t        j                  j                  |j                  d«      ¬«      «       �Œ"|j                  t        j                  j                  t        |«      ¬	«      «       �Œ\ | j!                  t        j"                  j$                  j'                  | j                  |«      ƒ d{  –—† |¬
«      «      ƒ d{  –—† }|S 7 Œÿ7 Œ7 Œ
­w)a]  Change the list of pinned gifts on the current user.

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            owner_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).

            owned_gift_ids (List of ``str``):
                New list of pinned gifts.
                All gifts must be upgraded and saved on the profile page first.
                For a user gift, you can use the message ID (int) of the gift message.
                For a channel gift, you can use the packed format `chatID_savedID` (str).
                For a upgraded gift, you can use the gift link.

        Returns:
            ``bool``: On success, True is returned.

        Example:
            .. code-block:: python

                # Set pinned gifts in user profile
                await app.set_pinned_gifts(received_gift_ids=["123", "456"])
        zgift id has to be str, but z was providedz^(\d+)_(\d+)$é   Né   )ÚpeerÚsaved_id)Úslug)Úmsg_id)r   Ústargift)Ú
isinstanceÚstrÚ
ValueErrorÚtypeÚreÚmatchÚUPGRADED_GIFT_REÚappendr   ÚtypesÚInputSavedStarGiftChatÚresolve_peerÚgroupÚintÚInputSavedStarGiftSlugÚInputSavedStarGiftUserÚinvokeÚ	functionsÚpaymentsÚToggleStarGiftsPinnedToTop)r   r	   r
   Ú	stargiftsÚgiftÚsaved_gift_matchÚ
slug_matchÚrs           úa/var/www/html/GAP/venv/lib/python3.12/site-packages/pyrogram/methods/payments/set_pinned_gifts.pyÚset_pinned_giftszSetPinnedGifts.set_pinned_gifts   s�  è ø€ ð> ˆ	à"ó 	ˆDÜ˜d¤CÔ(Ü Ð#>¼tÀD»z¸lÈ-Ð!XÓYÐYä!Ÿx™xÐ(8¼#¸d»)ÓDÐØ×.Ñ.×4Ñ4´S¸³YÓ?ˆJáØ× Ñ Ü—I‘I×4Ñ4Ø#'×#4Ñ#4Ð5E×5KÑ5KÈAÓ5NÓ#O×OÜ!$Ð%5×%;Ñ%;¸AÓ%>Ó!?ð 5ó õñ Ø× Ñ Ü—I‘I×4Ñ4Ø'×-Ñ-¨aÓ0ð 5ó öð × Ñ Ü—I‘I×4Ñ4Ü" 4›yð 5ó öð+	ð6 —+‘+Ü�M‰M×"Ñ"×=Ñ=Ø×,Ñ,¨XÓ6×6Ø"ð >ó ó
÷ 
ˆð ˆð1 Pøð& 7øð
ús7   ‚B=GÂ?F?Ã C&GÆ&GÆ'GÆ8GÆ9GÇGÇGN)	Ú__name__Ú
__module__Ú__qualname__r   r    r   r   Úboolr-   © ó    r,   r   r      s<   „ ðCØðCà˜˜S˜‘/ðCð ˜S™	ðCð 
ô	Cr3   r   )r   Útypingr   r   Úpyrogramr   r   r2   r3   r,   ú<module>r6      s   ðó( 
ß ã Ý ÷Dò Dr3   