
     f6                       d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
 ddl	mZ e G d d	                      Ze G d
 d                      Ze G d d                      Ze G d d                      Ze G d d                      Zd8dZd8dZd9dZd:dZd;dZd<d Zd=d#Zd>d&Zd?d(Zd@d+Z ed,          e G d- d.                                  Z ed/          e G d0 d1                                  Z ed2          e G d3 d4                                  Z ed5          e G d6 d7                                  ZdS )A    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)runtimec                      e Zd ZU dZded<   ded<   ded<   ded<   ded	<   ded
<   ded<   ded<   dZded<   dZded<   dZded<   d Ze	d             Z
dS )	Animationz
    Animation instance.
    strid_nameboolpaused_state
play_statefloatplayback_rate
start_timecurrent_timetype_Nz typing.Optional[AnimationEffect]sourcetyping.Optional[str]css_idz%typing.Optional[ViewOrScrollTimeline]view_or_scroll_timelinec                p   t                      }| j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j	        | j	        
                                |d	<   | j        
| j        |d
<   | j        | j        
                                |d<   |S )Nidr   pausedState	playStateplaybackRate	startTimecurrentTimetyper   cssIdviewOrScrollTimeline)dictr   r   r   r   r   r   r   r   r   to_jsonr   r   selfjsons     t/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/devtools/v127/animation.pyr&   zAnimation.to_json:   s    vvXT
yV"/] O[#1^ O["/]zV;"![0022DN;" KDM'3+/+G+O+O+Q+QD'(    c                     | t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   d	|v r t                              |d	                   nd d
|v rt          |d
                   nd d|v r t
                              |d                   nd           S )Nr   r   r   r   r   r    r!   r"   r   r#   r$   )r   r   r   r   r   r   r   r   r   r   r   )r   r   r   AnimationEffect	from_jsonViewOrScrollTimelineclsr)   s     r*   r.   zAnimation.from_jsonL   s   sDJT&\""d=1224,--^ 455T+.//tM233d6l##@HD@P@P?,,T(^<<<VZ)0D3tG}%%%ddz  C  eC  eC$8$B$B4H^C_$`$`$`  IM
 
 
 	
r+   )__name__
__module____qualname____doc____annotations__r   r   r   r&   classmethodr.    r+   r*   r   r      s           HHH III  OOO    JJJ 04F3333 $(F'''' FJIIII  $ 
 
 [
 
 
r+   r   c                  r    e Zd ZU dZded<   dZded<   dZded<   dZded	<   dZded
<   d Z	e
d             ZdS )r/   z
    Timeline instance
    zdom.ScrollOrientationaxisN"typing.Optional[dom.BackendNodeId]source_node_idztyping.Optional[float]start_offset
end_offsetsubject_node_idc                *   t                      }| j                                        |d<   | j        | j                                        |d<   | j        
| j        |d<   | j        
| j        |d<   | j        | j                                        |d<   |S )Nr:   sourceNodeIdstartOffset	endOffsetsubjectNodeId)r%   r:   r&   r<   r=   r>   r?   r'   s     r*   r&   zViewOrScrollTimeline.to_jsonu   s    vvy((**V*#'#6#>#>#@#@D ("&"3D?& $D+$($8$@$@$B$BD!r+   c           
     p    | t           j                            |d                   d|v r%t           j                            |d                   nd d|v rt	          |d                   nd d|v rt	          |d                   nd d|v r%t           j                            |d                   nd           S )Nr:   rA   rB   rC   rD   )r:   r<   r=   r>   r?   )r   ScrollOrientationr.   BackendNodeIdr   r0   s     r*   r.   zViewOrScrollTimeline.from_json   s    s&00f>>P^bfPfPf3,66tN7KLLLlp7D7L7LtM2333RV3>$3F3FuT+.///DRaeiRiRiC-77_8MNNNos
 
 
 	
r+   )r2   r3   r4   r5   r6   r<   r=   r>   r?   r&   r7   r.   r8   r+   r*   r/   r/   ]   s             :>N==== ,0L//// *.J----
 ;?O>>>>   
 
 [
 
 
r+   r/   c                      e Zd ZU dZded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   dZded<   dZded<   d Zed             Z	dS )r-   z"
    AnimationEffect instance
    r   delay	end_delayiteration_start
iterationsdurationr   	directionfilleasingNr;   backend_node_idztyping.Optional[KeyframesRule]keyframes_rulec                N   t                      }| j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j        |d<   | j	        | j	        
                                |d	<   | j        | j        
                                |d
<   |S )NrI   endDelayiterationStartrL   rM   rN   rO   rP   backendNodeIdkeyframesRule)r%   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   r&   rR   r'   s     r*   r&   zAnimationEffect.to_json   s    vv
W>Z!%!5!_\=Z N[yVX+$($8$@$@$B$BD!*$($7$?$?$A$AD!r+   c                    | t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   t          |d                   d	|v r%t          j                            |d	                   nd d
|v r t
                              |d
                   nd 
  
        S )NrI   rT   rU   rL   rM   rN   rO   rP   rV   rW   )
rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   )r   r   r   rG   r.   KeyframesRuler0   s     r*   r.   zAnimationEffect.from_json   s    sW&&D,--!$'7"899T,/004
+,,${+,,T&\""tH~&&RaeiRiRiC-77_8MNNNosM\`dMdMd=2243HIIIjn
 
 
 	
r+   )
r2   r3   r4   r5   r6   rQ   rR   r&   r7   r.   r8   r+   r*   r-   r-      s           LLL    OOO NNN III KKK ;?O>>>> 6:N9999    
 
 [
 
 
r+   r-   c                  H    e Zd ZU dZded<   dZded<   d Zed             ZdS )	rY   z
    Keyframes Rule
    ztyping.List[KeyframeStyle]	keyframesNr   r   c                l    t                      }d | j        D             |d<   | j        
| j        |d<   |S )Nc                6    g | ]}|                                 S r8   )r&   .0is     r*   
<listcomp>z)KeyframesRule.to_json.<locals>.<listcomp>   s     AAAQQYY[[AAAr+   r[   r   )r%   r[   r   r'   s     r*   r&   zKeyframesRule.to_json   s=    vvAA$.AAA[9 9DLr+   c                n     | d |d         D             d|v rt          |d                   nd           S )Nc                B    g | ]}t                               |          S r8   )KeyframeStyler.   r^   s     r*   ra   z+KeyframesRule.from_json.<locals>.<listcomp>   s&    MMMa}..q11MMMr+   r[   r   )r[   r   r   r0   s     r*   r.   zKeyframesRule.from_json   sM    sMM4;LMMM&,nnT&\"""$
 
 
 	
r+   )	r2   r3   r4   r5   r6   r   r&   r7   r.   r8   r+   r*   rY   rY      sk           *))) "&D%%%%   
 
 [
 
 
r+   rY   c                  D    e Zd ZU dZded<   ded<   d Zed             ZdS )rd   z
    Keyframe Style
    r   offsetrP   c                J    t                      }| j        |d<   | j        |d<   |S )Nrg   rP   )r%   rg   rP   r'   s     r*   r&   zKeyframeStyle.to_json   s&    vvXXr+   c                h     | t          |d                   t          |d                             S )Nrg   rP   )rg   rP   re   r0   s     r*   r.   zKeyframeStyle.from_json   s9    stH~&&tH~&&
 
 
 	
r+   N)r2   r3   r4   r5   r6   r&   r7   r.   r8   r+   r*   rd   rd      s`           KKK KKK   
 
 [
 
 
r+   rd   return0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]c               #     K   ddi} | V }dS )z2
    Disables animation domain notifications.
    methodzAnimation.disableNr8   cmd_dictr)   s     r*   disablerp     s$      
 	%H >>DDDr+   c               #     K   ddi} | V }dS )z1
    Enables animation domain notifications.
    rm   zAnimation.enableNr8   rn   s     r*   enablerr     s$      
 	$H >>DDDr+   r   r   1typing.Generator[T_JSON_DICT, T_JSON_DICT, float]c              #  h   K   t                      }| |d<   d|d}|V }t          |d                   S )z
    Returns the current time of the an animation.

    :param id_: Id of animation.
    :returns: Current time of the page.
    r   zAnimation.getCurrentTimerm   paramsr!   )r%   r   )r   rv   ro   r)   s       r*   get_current_timerw     sJ       &&FF4L, H >>Dm$%%%r+   c               #  @   K   ddi} | V }t          |d                   S )zo
    Gets the playback rate of the document timeline.

    :returns: Playback rate for animations on page.
    rm   zAnimation.getPlaybackRater   )r   rn   s     r*   get_playback_ratery   -  s3       	-H >>Dn%&&&r+   
animationstyping.List[str]c              #  V   K   t                      }d | D             |d<   d|d}|V }dS )zz
    Releases a set of animations to no longer be manipulated.

    :param animations: List of animation ids to seek.
    c                    g | ]}|S r8   r8   r^   s     r*   ra   z&release_animations.<locals>.<listcomp>C      222!A222r+   rz   zAnimation.releaseAnimationsru   Nr%   )rz   rv   ro   r)   s       r*   release_animationsr   :  sJ       &&F22z222F</ H >>DDDr+   animation_id@typing.Generator[T_JSON_DICT, T_JSON_DICT, runtime.RemoteObject]c              #     K   t                      }| |d<   d|d}|V }t          j                            |d                   S )z
    Gets the remote object of the Animation.

    :param animation_id: Animation id.
    :returns: Corresponding remote object.
    animationIdzAnimation.resolveAnimationru   remoteObject)r%   r	   RemoteObjectr.   )r   rv   ro   r)   s       r*   resolve_animationr   K  sT       &&F(F=. H >>D))$~*>???r+   r   r   c              #  `   K   t                      }d | D             |d<   ||d<   d|d}|V }dS )z
    Seek a set of animations to a particular time within each animation.

    :param animations: List of animation ids to seek.
    :param current_time: Set the current time of each animation.
    c                    g | ]}|S r8   r8   r^   s     r*   ra   z#seek_animations.<locals>.<listcomp>i  r~   r+   rz   r!   zAnimation.seekAnimationsru   Nr   )rz   r   rv   ro   r)   s        r*   seek_animationsr   ^  sT       &&F22z222F<(F=, H >>DDDr+   pausedr   c              #  `   K   t                      }d | D             |d<   ||d<   d|d}|V }dS )z
    Sets the paused state of a set of animations.

    :param animations: Animations to set the pause state of.
    :param paused: Paused state to set to.
    c                    g | ]}|S r8   r8   r^   s     r*   ra   zset_paused.<locals>.<listcomp>}  r~   r+   rz   r   zAnimation.setPausedru   Nr   )rz   r   rv   ro   r)   s        r*   
set_pausedr   r  sT       &&F22z222F<F8' H >>DDDr+   r   c              #  B   K   t                      }| |d<   d|d}|V }dS )zz
    Sets the playback rate of the document timeline.

    :param playback_rate: Playback rate for animations on page
    r   zAnimation.setPlaybackRateru   Nr   )r   rv   ro   r)   s       r*   set_playback_rater     s<       &&F*F>- H >>DDDr+   rM   rI   c              #  V   K   t                      }| |d<   ||d<   ||d<   d|d}|V }dS )z
    Sets the timing of an animation node.

    :param animation_id: Animation id.
    :param duration: Duration of the animation.
    :param delay: Delay of the animation.
    r   rM   rI   zAnimation.setTimingru   Nr   )r   rM   rI   rv   ro   r)   s         r*   
set_timingr     sO       &&F(F=!F:F7O' H >>DDDr+   zAnimation.animationCanceledc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationCanceledz9
    Event for when an animation has been cancelled.
    r   r   r)   r   rj   c                @     | t          |d                             S Nr   )r   re   r0   s     r*   r.   zAnimationCanceled.from_json  (    sDJ
 
 
 	
r+   N)r)   r   rj   r   r2   r3   r4   r5   r6   r7   r.   r8   r+   r*   r   r     I           HHH
 
 
 [
 
 
r+   r   zAnimation.animationCreatedc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationCreatedz9
    Event for each animation that has been created.
    r   r   r)   r   rj   c                @     | t          |d                             S r   re   r0   s     r*   r.   zAnimationCreated.from_json  r   r+   N)r)   r   rj   r   r   r8   r+   r*   r   r     r   r+   r   zAnimation.animationStartedc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationStartedz4
    Event for animation that has been started.
    r   	animationr)   r   rj   c                V     | t                               |d                             S Nr   )r   r   r.   r0   s     r*   r.   zAnimationStarted.from_json  1    s))${*;<<
 
 
 	
r+   N)r)   r   rj   r   r   r8   r+   r*   r   r     L           
 
 
 [
 
 
r+   r   zAnimation.animationUpdatedc                  6    e Zd ZU dZded<   ed	d            ZdS )
AnimationUpdatedz4
    Event for animation that has been updated.
    r   r   r)   r   rj   c                V     | t                               |d                             S r   r   r0   s     r*   r.   zAnimationUpdated.from_json  r   r+   N)r)   r   rj   r   r   r8   r+   r*   r   r     r   r+   r   )rj   rk   )r   r   rj   rs   )rj   rs   )rz   r{   rj   rk   )r   r   rj   r   )rz   r{   r   r   rj   rk   )rz   r{   r   r   rj   rk   )r   r   rj   rk   )r   r   rM   r   rI   r   rj   rk   )
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r   r/   r-   rY   rd   rp   rr   rw   ry   r   r   r   r   r   r   r   r   r   r   r8   r+   r*   <module>r      s   # " " " " " * * * * * * * * ! ! ! ! ! !               I
 I
 I
 I
 I
 I
 I
 I
X ,
 ,
 ,
 ,
 ,
 ,
 ,
 ,
^ B
 B
 B
 B
 B
 B
 B
 B
J 
 
 
 
 
 
 
 
2 
 
 
 
 
 
 
 
0      & & & &&
' 
' 
' 
'   "@ @ @ @&   (   (   "   . *++

 
 
 
 
 
 
  ,+
 )**

 
 
 
 
 
 
  +*
 )**

 
 
 
 
 
 
  +*
 )**

 
 
 
 
 
 
  +*
 
 
r+   