Ë
    û—h  ã                   ó<   — d dl mZ d dlmZ d dlmZ  G d„ d«      Zy)é    )ÚUnion)ÚWebDriverException)Úcommand_builderc                   ó>   — e Zd ZdZd„ Zddefd„Zdeeef   ddfd„Z	y)	ÚWebExtensionz9
    BiDi implementation of the webExtension module.
    c                 ó   — || _         y ©N)Úconn)Úselfr
   s     ún/home/bbl/html/w1hd.aprs.trek/venv/lib/python3.12/site-packages/selenium/webdriver/common/bidi/webextension.pyÚ__init__zWebExtension.__init__   s	   € Øˆ�	ó    NÚreturnc                 ó<  — t        d„ |||fD «       «      dk7  rt        d«      ‚|�d|dœ}n|�d|dœ}n|�d|d	œ}d
i}	 | j                  j                  t	        d|«      «      }|S # t
        $ r+}dt        |«      v rt        t        |«      › d�«      |‚‚ d}~ww xY w)aª  Installs a web extension in the remote end.

        You must provide exactly one of the parameters.

        Parameters:
        -----------
            path: Path to an extension directory
            archive_path: Path to an extension archive file
            base64_value: Base64 encoded string of the extension archive

        Returns:
        -------
            Dict: A dictionary containing the extension ID.
        c              3   ó$   K  — | ]  }|d u–— Œ
 y ­wr	   © )Ú.0Úxs     r   ú	<genexpr>z'WebExtension.install.<locals>.<genexpr>/   s   è ø€ ÒI ˆq˜Œ}ÑIùs   ‚é   zCExactly one of path, archive_path, or base64_value must be providedNÚpath)Útyper   ÚarchivePathÚbase64)r   ÚvalueÚextensionDatazwebExtension.installzMethod not availablezŸ. If you are using Chrome or Edge, add '--enable-unsafe-extension-debugging' and '--remote-debugging-pipe' arguments or set options.enable_webextensions = True)ÚsumÚ
ValueErrorr
   Úexecuter   r   Ústr)r   r   Úarchive_pathÚbase64_valueÚextension_dataÚparamsÚresultÚes           r   ÚinstallzWebExtension.install    sÒ   € ô ÑI t¨\¸<Ð&HÔIÓIÈQÒNÜÐbÓcÐcàÐØ&,°dÑ;‰NØÐ%Ø&3¸\ÑJ‰NØÐ%Ø&.¸ÑFˆNà! >Ð2ˆð		Ø—Y‘Y×&Ñ&¤Ð7MÈvÓ'VÓWˆFØˆMøÜ!ò 	Ø%¬¨Q«Ñ/Ü(Ü˜1“v�hð ið ióð ðð ûð	ús   Á &A' Á'	BÁ0&BÂBÚextension_id_or_resultc                 óž   — t        |t        «      r|j                  d«      }n|}d|i}| j                  j	                  t        d|«      «       y)a!  Uninstalls a web extension from the remote end.

        Parameters:
        -----------
            extension_id_or_result: Either the extension ID as a string or the result dictionary
                                   from a previous install() call containing the extension ID.
        Ú	extensionzwebExtension.uninstallN)Ú
isinstanceÚdictÚgetr
   r   r   )r   r(   Úextension_idr$   s       r   Ú	uninstallzWebExtension.uninstallF   sH   € ô Ð,¬dÔ3Ø1×5Ñ5°kÓB‰Là1ˆLà˜|Ð,ˆØ�	‰	×Ñœ/Ð*BÀFÓKÕLr   )NNN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r,   r'   r   r    r/   r   r   r   r   r      s8   „ ñòñ$È$ó $ðLM°°c¸4°iÑ0@ð MÀTô Mr   r   N)Útypingr   Úselenium.common.exceptionsr   Ú%selenium.webdriver.common.bidi.commonr   r   r   r   r   ú<module>r7      s   ðõ$ å 9Ý A÷<Mò <Mr   