
    g)                     H    d dl mZ d dlmZ d dlmZ e G d de             Zy)    )	dataclass)Clip)Effectc                   >    e Zd ZU dZdZeed<   dZeed<   de	de	fdZ
y)Loopaf  
    Returns a clip that plays the current clip in an infinite loop.
    Ideal for clips coming from GIFs.

    Parameters
    ----------

    n
      Number of times the clip should be played. If `None` the
      the clip will loop indefinitely (i.e. with no set duration).

    duration
      Total duration of the clip. Can be specified instead of n.
    Nndurationclipreturnc                    |j                   t        d      |j                   |j                  fdddg      }| j                  r| j                  z  | _         | j                   r|j	                  | j                         }|S )zApply the effect to the clip.zAttribute 'duration' not setc                     | z  S )N )tprevious_durations    ^/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/moviepy/video/fx/Loop.py<lambda>zLoop.apply.<locals>.<lambda>"   s    a++     maskaudio)apply_to)r	   
ValueErrortime_transformr   with_duration)selfr
   r   s     @r   applyz
Loop.apply   s|    == ;<< MM""+vw6G # 
 66 FF%66DM==%%dmm4Dr   )__name__
__module____qualname____doc__r   int__annotations__r	   floatr   r   r   r   r   r   r      s/     AsMHe$ 4 r   r   N)dataclassesr   moviepy.Clipr   moviepy.Effectr   r   r   r   r   <module>r&      s)    !  ! #6 # #r   