Ë
    #åhi3<  ã                   óª   — d dl mZ d dlmZ d dlmZ  G d„ de«      Z G d„ de«      Zd„ Z G d	„ d
«      Z	 G d„ d«      Z
 G d„ d«      Z G d„ d«      Zy)é    )ÚEnum)ÚAny)Úcommand_builderc                   ó   — e Zd ZdZdZdZy)ÚScreenOrientationNaturalzNatural screen orientation.ÚportraitÚ	landscapeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚPORTRAITÚ	LANDSCAPE© ó    úTC:\des-py\Monitor\venv\Lib\site-packages\selenium/webdriver/common/bidi/emulation.pyr   r      s   „ Ù%à€HØ�Ir   r   c                   ó    — e Zd ZdZdZdZdZdZy)ÚScreenOrientationTypezScreen orientation type.zportrait-primaryzportrait-secondaryzlandscape-primaryzlandscape-secondaryN)r
   r   r   r   ÚPORTRAIT_PRIMARYÚPORTRAIT_SECONDARYÚLANDSCAPE_PRIMARYÚLANDSCAPE_SECONDARYr   r   r   r   r      s   „ Ù"à)ÐØ-ÐØ+ÐØ/Ñr   r   c                 ó‚   — t        | |«      r| S 	  || j                  «       «      S # t        $ r t        d| › �«      ‚w xY w)NzInvalid orientation: )Ú
isinstanceÚlowerÚ
ValueError)ÚvalueÚ
enum_classs     r   Ú_convert_to_enumr   (   sI   € Ü�%˜Ô$Øˆð:Ù˜%Ÿ+™+›-Ó(Ð(øÜò :ÜÐ0°°Ð8Ó9Ð9ð:ús   �& ¦>c                   óB   — e Zd ZdZdeez  deez  fd„Zdeeef   fd„Z	y)ÚScreenOrientationz,Represents screen orientation configuration.ÚnaturalÚtypec                 óX   — t        |t        «      | _        t        |t        «      | _        y)ag  Initialize ScreenOrientation.

        Args:
            natural: Natural screen orientation ("portrait" or "landscape").
            type: Screen orientation type ("portrait-primary", "portrait-secondary",
                "landscape-primary", or "landscape-secondary").

        Raises:
            ValueError: If natural or type values are invalid.
        N)r   r   r"   r   r#   )Úselfr"   r#   s      r   Ú__init__zScreenOrientation.__init__4   s"   € ô  (¨Ô1IÓJˆŒÜ$ TÔ+@ÓAˆ�	r   Úreturnc                 ó\   — | j                   j                  | j                  j                  dœS )N)r"   r#   )r"   r   r#   ©r%   s    r   Úto_dictzScreenOrientation.to_dictG   s$   € à—|‘|×)Ñ)Ø—I‘I—O‘Oñ
ð 	
r   N)
r
   r   r   r   r   Ústrr   r&   Údictr*   r   r   r   r!   r!   1   s=   „ Ù6ðBà)¨CÑ/ðBð $ cÑ)óBð&
˜˜c 3˜h™ô 
r   r!   c                   óà  — e Zd ZdZ	 	 	 	 	 ddededededz  dedz  dedz  d	edz  fd
„Zed„ «       Zej                  d„ «       Zed„ «       Z	e	j                  d„ «       Z	ed„ «       Z
e
j                  d„ «       Z
ed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zdeeedz  f   fd„Zy)ÚGeolocationCoordinatesz#Represents geolocation coordinates.NÚlatitudeÚ	longitudeÚaccuracyÚaltitudeÚaltitude_accuracyÚheadingÚspeedc                 óf   — || _         || _        || _        || _        || _        || _        || _        y)aÄ  Initialize GeolocationCoordinates.

        Args:
            latitude: Latitude coordinate (-90.0 to 90.0).
            longitude: Longitude coordinate (-180.0 to 180.0).
            accuracy: Accuracy in meters (>= 0.0), defaults to 1.0.
            altitude: Altitude in meters or None, defaults to None.
            altitude_accuracy: Altitude accuracy in meters (>= 0.0) or None, defaults to None.
            heading: Heading in degrees (0.0 to 360.0) or None, defaults to None.
            speed: Speed in meters per second (>= 0.0) or None, defaults to None.

        Raises:
            ValueError: If coordinates are out of valid range or if altitude_accuracy is provided without altitude.
        N©r/   r0   r1   r2   r3   r4   r5   )r%   r/   r0   r1   r2   r3   r4   r5   s           r   r&   zGeolocationCoordinates.__init__Q   s6   € ð0 !ˆŒØ"ˆŒØ ˆŒØ ˆŒØ!2ˆÔØˆŒØˆ�
r   c                 ó   — | j                   S ©N)Ú	_latituder)   s    r   r/   zGeolocationCoordinates.latitudeq   ó   € à�~‰~Ðr   c                 óV   — d|cxk  rdk  st        d«      ‚ t        d«      ‚|| _        y )Ng     €VÀg     €V@z'latitude must be between -90.0 and 90.0)r   r:   ©r%   r   s     r   r/   zGeolocationCoordinates.latitudeu   s3   € à˜Ô& $Ò&ÜÐFÓGÐGð 'ÜÐFÓGÐGØˆ�r   c                 ó   — | j                   S r9   )Ú
_longituder)   s    r   r0   z GeolocationCoordinates.longitude{   s   € à�‰Ðr   c                 óV   — d|cxk  rdk  st        d«      ‚ t        d«      ‚|| _        y )Ng     €fÀg     €f@z*longitude must be between -180.0 and 180.0)r   r?   r=   s     r   r0   z GeolocationCoordinates.longitude   s3   € à˜%Ô( 5Ò(ÜÐIÓJÐJð )ÜÐIÓJÐJØˆ�r   c                 ó   — | j                   S r9   )Ú	_accuracyr)   s    r   r1   zGeolocationCoordinates.accuracy…   r;   r   c                 ó2   — |dk  rt        d«      ‚|| _        y )Nç        zaccuracy must be >= 0.0)r   rB   r=   s     r   r1   zGeolocationCoordinates.accuracy‰   s   € à�3Š;ÜÐ6Ó7Ð7Øˆ�r   c                 ó   — | j                   S r9   ©Ú	_altituder)   s    r   r2   zGeolocationCoordinates.altitude�   r;   r   c                 ó   — || _         y r9   rF   r=   s     r   r2   zGeolocationCoordinates.altitude“   s	   € àˆ�r   c                 ó   — | j                   S r9   )Ú_altitude_accuracyr)   s    r   r3   z(GeolocationCoordinates.altitude_accuracy—   s   € à×&Ñ&Ð&r   c                 óh   — |�| j                   €t        d«      ‚|�|dk  rt        d«      ‚|| _        y )Nz0altitude_accuracy cannot be set without altituderD   z altitude_accuracy must be >= 0.0)r2   r   rJ   r=   s     r   r3   z(GeolocationCoordinates.altitude_accuracy›   s=   € àÐ §¡Ð!6ÜÐOÓPÐPØÐ ¨¢ÜÐ?Ó@Ð@Ø"'ˆÕr   c                 ó   — | j                   S r9   )Ú_headingr)   s    r   r4   zGeolocationCoordinates.heading£   s   € à�}‰}Ðr   c                 óZ   — |�"d|cxk  rdk  st        d«      ‚ t        d«      ‚|| _        y )NrD   g     €v@z%heading must be between 0.0 and 360.0)r   rM   r=   s     r   r4   zGeolocationCoordinates.heading§   s8   € àÐ c¨UÔ&:°UÒ&:ÜÐDÓEÐEð ';ÜÐDÓEÐEØˆ�r   c                 ó   — | j                   S r9   )Ú_speedr)   s    r   r5   zGeolocationCoordinates.speed­   s   € à�{‰{Ðr   c                 ó6   — |�|dk  rt        d«      ‚|| _        y )NrD   zspeed must be >= 0.0)r   rP   r=   s     r   r5   zGeolocationCoordinates.speed±   s!   € àÐ ¨¢ÜÐ3Ó4Ð4Øˆ�r   r'   c                 ó&  — | j                   | j                  | j                  dœ}| j                  �| j                  |d<   | j                  �| j                  |d<   | j
                  �| j
                  |d<   | j                  �| j                  |d<   |S )N)r/   r0   r1   r2   ÚaltitudeAccuracyr4   r5   r7   )r%   Úresults     r   r*   zGeolocationCoordinates.to_dict·   s‰   € àŸ™ØŸ™ØŸ™ñ+
ˆð �=‰=Ð$Ø!%§¡ˆF�:Ñà×!Ñ!Ð-Ø)-×)?Ñ)?ˆFÐ%Ñ&à�<‰<Ð#Ø $§¡ˆF�9Ñà�:‰:Ð!Ø"Ÿj™jˆF�7‰Oàˆr   )g      ð?NNNN)r
   r   r   r   Úfloatr&   Úpropertyr/   Úsetterr0   r1   r2   r3   r4   r5   r,   r+   r*   r   r   r   r.   r.   N   sÂ  „ Ù-ð Ø!%Ø*.Ø $Ø"ñàðð ðð ð	ð
 ˜$‘,ðð ! 4™<ðð ˜‘ðð �t‰|óð@ ñó ðð ‡_�_ñó ðð
 ñó ðð ×Ññ ó ð ð
 ñó ðð ‡_�_ñó ðð
 ñó ðð ‡_�_ñó ðð ñ'ó ð'ð ×Ññ(ó ð(ð ñó ðð ‡^�^ñó ðð
 ñó ðð ‡\�\ñó ðð
˜˜c 5¨4¡<Ð/Ñ0ô r   r.   c                   ó:   — e Zd ZdZdZefdefd„Zdeeef   fd„Zy)ÚGeolocationPositionErrorz(Represents a geolocation position error.ÚpositionUnavailabler#   c                 ób   — || j                   k7  rt        d| j                   › d�«      ‚|| _        y )Nztype must be "ú")ÚTYPE_POSITION_UNAVAILABLEr   r#   )r%   r#   s     r   r&   z!GeolocationPositionError.__init__Ò   s2   € Ø�4×1Ñ1Ò1Ü˜~¨d×.LÑ.LÐ-MÈQÐOÓPÐPØˆ�	r   r'   c                 ó   — d| j                   iS )Nr#   )r#   r)   s    r   r*   z GeolocationPositionError.to_dict×   s   € Ø˜Ÿ	™	Ð"Ð"r   N)	r
   r   r   r   r]   r+   r&   r,   r*   r   r   r   rY   rY   Í   s.   „ Ù2à 5Ðà#<ñ ˜Só ð
#˜˜c 3˜h™ô #r   rY   c                   ó–  — e Zd ZdZd„ Z	 	 	 	 ddedz  dedz  dee   dz  dee   dz  ddf
d	„Z		 	 	 dd
edz  dee   dz  dee   dz  ddfd„Z
	 	 	 ddedz  dee   dz  dee   dz  ddfd„Z	 	 	 ddedz  dee   dz  dee   dz  ddfd„Z	 	 	 ddedz  dee   dz  dee   dz  ddfd„Z	 	 	 ddedz  dee   dz  dee   dz  ddfd„Zy)Ú	Emulationz,BiDi implementation of the emulation module.c                 ó   — || _         y r9   )Úconn)r%   rb   s     r   r&   zEmulation.__init__Þ   s	   € Øˆ�	r   NÚcoordinatesÚerrorÚcontextsÚuser_contextsr'   c                 ó   — |�|�t        d«      ‚|�|�t        d«      ‚|€|€t        d«      ‚i }|�|j                  «       |d<   n|�|j                  «       |d<   |�||d<   n|�||d<   | j                  j                  t	        d	|«      «       y)
aT  Set geolocation override for the given contexts or user contexts.

        Args:
            coordinates: Geolocation coordinates to emulate, or None.
            error: Geolocation error to emulate, or None.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both coordinates and error are provided, or if both contexts
                and user_contexts are provided, or if neither contexts nor
                user_contexts are provided.
        Nz)Cannot specify both coordinates and errorú-Cannot specify both contexts and userContextsú,Must specify either contexts or userContextsrc   rd   re   ÚuserContextsz emulation.setGeolocationOverride©r   r*   rb   Úexecuter   )r%   rc   rd   re   rf   Úparamss         r   Úset_geolocation_overridez"Emulation.set_geolocation_overrideá   s¶   € ð( Ð" uÐ'8ÜÐHÓIÐIàÐ MÐ$=ÜÐLÓMÐMàÐ Ð 5ÜÐKÓLÐLà!#ˆàÐ"Ø$/×$7Ñ$7Ó$9ˆF�=Ò!ØÐØ#Ÿm™m›oˆF�7‰OàÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*LÈfÓUÕVr   Útimezonec                 ó°   — |�|�t        d«      ‚|€|€t        d«      ‚d|i}|�||d<   n|�||d<   | j                  j                  t        d|«      «       y)a   Set timezone override for the given contexts or user contexts.

        Args:
            timezone: Timezone identifier (IANA timezone name or offset string like '+01:00'),
                or None to clear the override.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both contexts and user_contexts are provided, or if neither
                contexts nor user_contexts are provided.
        Nú.Cannot specify both contexts and user_contextsú-Must specify either contexts or user_contextsro   re   rj   zemulation.setTimezoneOverride©r   rb   rl   r   )r%   ro   re   rf   rm   s        r   Úset_timezone_overridezEmulation.set_timezone_override  sv   € ð$ Ð MÐ$=ÜÐMÓNÐNàÐ Ð 5ÜÐLÓMÐMà",¨hÐ!7ˆàÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*IÈ6ÓRÕSr   Úlocalec                 ó°   — |�|�t        d«      ‚|€|€t        d«      ‚d|i}|�||d<   n|�||d<   | j                  j                  t        d|«      «       y)aõ  Set locale override for the given contexts or user contexts.

        Args:
            locale: Locale string as per BCP 47, or None to clear override.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both contexts and user_contexts are provided, or if neither
                contexts nor user_contexts are provided, or if locale is invalid.
        Nrh   ri   ru   re   rj   zemulation.setLocaleOverriders   )r%   ru   re   rf   rm   s        r   Úset_locale_overridezEmulation.set_locale_override-  sv   € ð" Ð MÐ$=ÜÐLÓMÐMàÐ Ð 5ÜÐKÓLÐLà"*¨FÐ!3ˆàÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*GÈÓPÕQr   Úenabledc                 óÊ   — |rt        d«      ‚|�|�t        d«      ‚|€|€t        d«      ‚d|i}|�||d<   n|�||d<   | j                  j                  t        d|«      «       y)	aI  Set scripting enabled override for the given contexts or user contexts.

        Args:
            enabled: False to disable scripting, None to clear the override.
                Note: Only emulation of disabled JavaScript is supported.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both contexts and user_contexts are provided, or if neither
                contexts nor user_contexts are provided, or if enabled is True.
        zROnly emulation of disabled JavaScript is supported (enabled must be False or None)Nrh   ri   rx   re   rj   zemulation.setScriptingEnabledrs   )r%   rx   re   rf   rm   s        r   Úset_scripting_enabledzEmulation.set_scripting_enabledM  s…   € ñ$ ÜÐqÓrÐràÐ MÐ$=ÜÐLÓMÐMàÐ Ð 5ÜÐKÓLÐLà"+¨WÐ!5ˆàÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*IÈ6ÓRÕSr   Úscreen_orientationc                 óÔ   — |�|�t        d«      ‚|€|€t        d«      ‚d|�|j                  «       ndi}|�||d<   n|�||d<   | j                  j                  t	        d|«      «       y)a   Set screen orientation override for the given contexts or user contexts.

        Args:
            screen_orientation: ScreenOrientation object to emulate, or None to clear the override.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both contexts and user_contexts are provided, or if neither
                contexts nor user_contexts are provided.
        Nrh   ri   ÚscreenOrientationre   rj   z&emulation.setScreenOrientationOverriderk   )r%   r{   re   rf   rm   s        r   Úset_screen_orientation_overridez)Emulation.set_screen_orientation_overrideq  s�   € ð" Ð MÐ$=ÜÐLÓMÐMàÐ Ð 5ÜÐKÓLÐLð  ÐASÐA_Ð!3×!;Ñ!;Ô!=Ðeið"
ˆð ÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*RÐTZÓ[Õ\r   Ú
user_agentc                 ó°   — |�|�t        d«      ‚|€|€t        d«      ‚d|i}|�||d<   n|�||d<   | j                  j                  t        d|«      «       y)aé  Set user agent override for the given contexts or user contexts.

        Args:
            user_agent: User agent string to emulate, or None to clear the override.
            contexts: List of browsing context IDs to apply the override to.
            user_contexts: List of user context IDs to apply the override to.

        Raises:
            ValueError: If both contexts and user_contexts are provided, or if neither
                contexts nor user_contexts are provided.
        Nrq   rr   Ú	userAgentre   rj   zemulation.setUserAgentOverriders   )r%   r   re   rf   rm   s        r   Úset_user_agent_overridez!Emulation.set_user_agent_override“  sv   € ð" Ð MÐ$=ÜÐMÓNÐNàÐ Ð 5ÜÐLÓMÐMà"-¨zÐ!:ˆàÐØ!)ˆF�:ÒØÐ&Ø%2ˆF�>Ñ"à�	‰	×Ñœ/Ð*JÈFÓSÕTr   )NNNN)NNN)FNN)r
   r   r   r   r&   r.   rY   Úlistr+   rn   rt   rw   Úboolrz   r!   r~   r‚   r   r   r   r`   r`   Û   s
  „ Ù6òð
 6:Ø15Ø%)Ø*.ñ)Wà+¨dÑ2ð)Wð (¨$Ñ.ð)Wð �s‘)˜dÑ"ð	)Wð
 ˜C‘y 4Ñ'ð)Wð 
ó)WðZ  $Ø%)Ø*.ñ	Tà˜‘*ðTð �s‘)˜dÑ"ðTð ˜C‘y 4Ñ'ð	Tð
 
óTðF "Ø%)Ø*.ñ	Rà�d‘
ðRð �s‘)˜dÑ"ðRð ˜C‘y 4Ñ'ð	Rð
 
óRðD  %Ø%)Ø*.ñ	"Tà˜‘ð"Tð �s‘)˜dÑ"ð"Tð ˜C‘y 4Ñ'ð	"Tð
 
ó"TðL 8<Ø%)Ø*.ñ	 ]à-°Ñ4ð ]ð �s‘)˜dÑ"ð ]ð ˜C‘y 4Ñ'ð	 ]ð
 
ó ]ðH "&Ø%)Ø*.ñ	Uà˜$‘JðUð �s‘)˜dÑ"ðUð ˜C‘y 4Ñ'ð	Uð
 
ôUr   r`   N)Úenumr   Útypingr   Ú%selenium.webdriver.common.bidi.commonr   r   r   r   r!   r.   rY   r`   r   r   r   ú<module>rˆ      s\   ðõ$ Ý å Aô˜tô ô0˜Dô 0ò:÷
ñ 
÷:|ñ |÷~#ñ #÷VUò VUr   