Ë
    €»—h  ã                   óL   — d dl mZ  G d„ d«      Z G d„ d«      Z G d„ d«      Zy)	é    )Úcommand_builderc                   ó,   — e Zd ZdZdZdZdZdZeeeehZy)ÚClientWindowStatezRepresents a window state.Ú
fullscreenÚ	maximizedÚ	minimizedÚnormalN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
FULLSCREENÚ	MAXIMIZEDÚ	MINIMIZEDÚNORMALÚVALID_STATES© ó    úh/var/www/html/w1hd.aprs.trek/venv/lib/python3.12/site-packages/selenium/webdriver/common/bidi/browser.pyr   r      s'   „ Ù$à€JØ€IØ€IØ€Fà 	¨9°fÐ=�Lr   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_state6   ó   € ð �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_widthH   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_heightQ   ó   € ð �{‰{Ð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_xZ   ó   € ð �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_yc   r2   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_activel   r/   r   Údatac           	      ó  — 	 |d   }t        |t        «      st        d«      ‚|d   }t        |t        «      st        d«      ‚|t        j                  vrt        d|› dt        j                  › �«      ‚|d   }t        |t
        «      r|dk  rt        d	|› �«      ‚|d
   }t        |t
        «      r|dk  rt        d|› �«      ‚|d   }t        |t
        «      s!t        dt        |«      j                  › �«      ‚|d   }t        |t
        «      s!t        dt        |«      j                  › �«      ‚|d   }t        |t        «      st        d«      ‚ | |||||||¬«      S # t        t        f$ r}	t        d|	› �«      ‚d}	~	ww xY w)aƒ  Creates a ClientWindowInfo instance from a dictionary.

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

        Returns:
        -------
            ClientWindowInfo: A new instance of ClientWindowInfo.

        Raises:
        ------
            ValueError: If required fields are missing or have invalid types.
        ÚclientWindowzclientWindow must be a stringr   zstate must be a stringzInvalid state: z. Must be one of r   r   z*width must be a non-negative integer, got r   z+height must be a non-negative integer, got r   zx must be an integer, got r   zy must be an integer, got r   zactive must be a booleanr!   z*Invalid data format for ClientWindowInfo: N)Ú
isinstanceÚstrÚ
ValueErrorr   r   ÚintÚtyper
   ÚboolÚKeyErrorÚ	TypeError)
Úclsr7   r   r   r   r   r   r   r   Úes
             r   Ú	from_dictzClientWindowInfo.from_dictu   sž  € ð )	OØ  Ñ0ˆMÜ˜m¬SÔ1Ü Ð!@ÓAÐAà˜‘MˆEÜ˜e¤SÔ)Ü Ð!9Ó:Ð:ØÔ-×:Ñ:Ñ:Ü  ?°5°'Ð9JÔK\×KiÑKiÐJjÐ!kÓlÐlà˜‘MˆEÜ˜e¤SÔ)¨U°QªYÜ Ð#MÈeÈWÐ!UÓVÐVà˜(‘^ˆFÜ˜f¤cÔ*¨f°qªjÜ Ð#NÈvÈhÐ!WÓXÐXà�S‘	ˆAÜ˜a¤Ô%Ü Ð#=¼dÀ1»g×>NÑ>NÐ=OÐ!PÓQÐQà�S‘	ˆAÜ˜a¤Ô%Ü Ð#=¼dÀ1»g×>NÑ>NÐ=OÐ!PÓQÐQà˜(‘^ˆFÜ˜f¤dÔ+Ü Ð!;Ó<Ð<áØ+ØØØØØØôð øô œ)Ð$ò 	OÜÐIÈ!ÈÐMÓNÐNûð	Oús   ‚EE ÅF Å-E;Å;F N)r
   r   r   r   r;   r=   r?   r#   r'   r*   r,   r.   r1   r4   r6   ÚclassmethodÚdictrD   r   r   r   r   r   !   sÉ   „ Ù1ðàðð ðð ð	ð
 ðð ðð ðð óð$˜3ó ð" 3ó "ð˜3ó ð˜Có ð�só ð�só ð˜4ó ð ð8O˜Tð 8OÐ&8ò 8Oó ñ8O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"   rJ   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©rJ   Ú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ÚuserContextsrL   rM   )r"   rO   Ú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 contextrL   zbrowser.removeUserContextN)Ú	ExceptionrJ   rN   r   )r"   rU   Ú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)rJ   rN   r   r   rD   )r"   rO   Ú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;   rP   ÚlistrT   rZ   r   r^   r   r   r   rH   rH   ±   sT   „ ñòð% Só %ðX 4¨¡9ó XðP°3ð P¸4ó Pð"Z DÐ)9Ñ$:ô Zr   rH   N)Ú%selenium.webdriver.common.bidi.commonr   r   r   rH   r   r   r   ú<module>ra      s0   ðõ& B÷>ñ >÷MOñ MO÷`5Zò 5Zr   