
    W|h)                     H    S SK Jr  S SKJr  S SKJr  \ " S S\5      5       rg)    )	dataclass)Clip)Effectc                   H    \ rS rSr% SrSr\\S'   Sr\	\S'   S\
S\
4S jrS	rg)
Loop   a>  
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                   ^ UR                   c  [        S5      eUR                   mUR                  U4S jSS/S9nU R                  (       a  U R                  T-  U l         U R                   (       a  UR	                  U R                   5      nU$ )zApply the effect to the clip.zAttribute 'duration' not setc                    > U T-  $ )N )tprevious_durations    O/home/james-whalen/.local/lib/python3.13/site-packages/moviepy/video/fx/Loop.py<lambda>Loop.apply.<locals>.<lambda>"   s    a++    maskaudio)apply_to)r
   
ValueErrortime_transformr	   with_duration)selfr   r   s     @r   apply
Loop.apply   s|    == ;<< MM""+vw6G # 
 66 FF%66DM==%%dmm4Dr   )r
   )__name__
__module____qualname____firstlineno____doc__r	   int__annotations__r
   floatr   r   __static_attributes__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   