Ë
    `§1h8  ã                   ó\   — d dl mZmZ d dlmZ  G d„ d«      Z G d„ d«      Z G d„ d«      Zy	)
é    )ÚDictÚList)Úcommand_builderc                   ó    — e Zd ZdZdZdZdZdZy)ÚClientWindowStatezRepresents a window state.Ú
fullscreenÚ	maximizedÚ	minimizedÚnormalN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
FULLSCREENÚ	MAXIMIZEDÚ	MINIMIZEDÚNORMAL© ó    úd/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/selenium/webdriver/common/bidi/browser.pyr   r      s   „ Ù$à€JØ€IØ€IØ�Fr   r   c                   ó¢   — e Zd ZdZdededededededefd	„Zd
efd„Zd
efd„Z	d
efd„Z
d
efd„Zd
efd„Zd
efd„Zd
efd„Zeded
d fd„«       Zy)ÚClientWindowInfoz'Represents a client window information.Úclient_windowÚstateÚwidthÚheightÚxÚyÚactivec                 óf   — || _         || _        || _        || _        || _        || _        || _        y ©N©r   r   r   r   r   r   r   )Úselfr   r   r   r   r   r   r   s           r   Ú__init__zClientWindowInfo.__init__#   s6   € ð +ˆÔØˆŒ
ØˆŒ
ØˆŒØˆŒØˆŒØˆ�r   Úreturnc                 ó   — | j                   S )z©Gets the state of the client window.

        Returns:
        -------
            str: The state of the client window (one of the ClientWindowState constants).
        )r   ©r#   s    r   Ú	get_statezClientWindowInfo.get_state5   ó   € ð �z‰zÐr   c                 ó   — | j                   S )z|Gets the client window identifier.

        Returns:
        -------
            str: The client window identifier.
        )r   r'   s    r   Úget_client_windowz"ClientWindowInfo.get_client_window>   s   € ð ×!Ñ!Ð!r   c                 ó   — | j                   S )z€Gets the width of the client window.

        Returns:
        -------
            int: The width of the client window.
        )r   r'   s    r   Ú	get_widthzClientWindowInfo.get_widthG   r)   r   c                 ó   — | j                   S )z‚Gets the height of the client window.

        Returns:
        -------
            int: The height of the client window.
        )r   r'   s    r   Ú
get_heightzClientWindowInfo.get_heightP   ó   € ð �{‰{Ðr   c                 ó   — | j                   S )zŽGets the x coordinate of the client window.

        Returns:
        -------
            int: The x coordinate of the client window.
        )r   r'   s    r   Úget_xzClientWindowInfo.get_xY   ó   € ð �v‰vˆr   c                 ó   — | j                   S )zŽGets the y coordinate of the client window.

        Returns:
        -------
            int: The y coordinate of the client window.
        )r   r'   s    r   Úget_yzClientWindowInfo.get_yb   r3   r   c                 ó   — | j                   S )z™Checks if the client window is active.

        Returns:
        -------
            bool: True if the client window is active, False otherwise.
        )r   r'   s    r   Ú	is_activezClientWindowInfo.is_activek   r0   r   Údatac                 óò   —  | |j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      ¬«      S )	a  Creates a ClientWindowInfo instance from a dictionary.

        Parameters:
        -----------
            data: A dictionary containing the client window information.

        Returns:
        -------
            ClientWindowInfo: A new instance of ClientWindowInfo.
        ÚclientWindowr   r   r   r   r   r   r"   )Úget)Úclsr8   s     r   Ú	from_dictzClientWindowInfo.from_dictt   sc   € ñ ØŸ(™( >Ó2Ø—(‘(˜7Ó#Ø—(‘(˜7Ó#Ø—8‘8˜HÓ%Ø�h‰h�s‹mØ�h‰h�s‹mØ—8‘8˜HÓ%ô
ð 	
r   N)r   r   r   r   ÚstrÚintÚboolr$   r(   r+   r-   r/   r2   r5   r7   Úclassmethodr   r=   r   r   r   r   r       sÅ   „ Ù1ðàðð ðð ð	ð
 ðð ðð ðð óð$˜3ó ð" 3ó "ð˜3ó ð˜Có ð�só ð�só ð˜4ó ð ð
˜Tð 
Ð&8ò 
ó ñ
r   r   c                   óV   — e Zd ZdZd„ Zdefd„Zdee   fd„Zdeddfd„Z	dee
   fd	„Zy)
ÚBrowserz4
    BiDi implementation of the browser module.
    c                 ó   — || _         y r!   )Úconn)r#   rE   s     r   r$   zBrowser.__init__�   s	   € Øˆ�	r   r%   c                 óV   — | j                   j                  t        di «      «      }|d   S )z{Creates a new user context.

        Returns:
        -------
            str: The ID of the created user context.
        zbrowser.createUserContextÚuserContext©rE   Úexecuter   )r#   Úresults     r   Úcreate_user_contextzBrowser.create_user_context“   s,   € ð —‘×"Ñ"¤?Ð3NÐPRÓ#SÓTˆØ�mÑ$Ð$r   c                 ó‚   — | j                   j                  t        di «      «      }|d   D �cg c]  }|d   ‘Œ	 c}S c c}w )zuGets all user contexts.

        Returns:
        -------
            List[str]: A list of user context IDs.
        zbrowser.getUserContextsÚuserContextsrG   rH   )r#   rJ   Úcontext_infos      r   Úget_user_contextszBrowser.get_user_contexts�   s>   € ð —‘×"Ñ"¤?Ð3LÈbÓ#QÓRˆØ@FÀ~Ñ@VÖW°�˜]Ó+ÒWÐWùÒWs   ­<Úuser_context_idNc                 óv   — |dk(  rt        d«      ‚d|i}| j                  j                  t        d|«      «       y)zúRemoves a user context.

        Parameters:
        -----------
            user_context_id: The ID of the user context to remove.

        Raises:
        ------
            Exception: If the user context ID is "default" or does not exist.
        Údefaultz&Cannot remove the default user contextrG   zbrowser.removeUserContextN)Ú	ExceptionrE   rI   r   )r#   rP   Úparamss      r   Úremove_user_contextzBrowser.remove_user_context§   s<   € ð ˜iÒ'ÜÐDÓEÐEà Ð1ˆØ�	‰	×Ñœ/Ð*EÀvÓNÕOr   c                 ó¢   — | j                   j                  t        di «      «      }|d   D �cg c]  }t        j	                  |«      ‘Œ c}S c c}w )zŒGets all client windows.

        Returns:
        -------
            List[ClientWindowInfo]: A list of client window information.
        zbrowser.getClientWindowsÚclientWindows)rE   rI   r   r   r=   )r#   rJ   Úwindows      r   Úget_client_windowszBrowser.get_client_windows¸   sE   € ð —‘×"Ñ"¤?Ð3MÈrÓ#RÓSˆØAGÈÑAXÖY°vÔ ×*Ñ*¨6Õ2ÒYÐYùÒYs   ­A)r   r   r   r   r$   r>   rK   r   rO   rU   r   rY   r   r   r   rC   rC   ‹   sT   „ ñòð% Só %ðX 4¨¡9ó XðP°3ð P¸4ó Pð"Z DÐ)9Ñ$:ô Zr   rC   N)Útypingr   r   Ú%selenium.webdriver.common.bidi.commonr   r   r   rC   r   r   r   ú<module>r\      s0   ð÷$ å A÷ñ ÷h
ñ h
÷V5Zò 5Zr   