
    gM                     P    d dl mZ d dlZd dlmZ d dlmZ e G d de             Zy)    )	dataclassN)Clip)Effectc                   :    e Zd ZU dZeed<   dZeed<   dedefdZ	y)FadeInaU  Makes the clip progressively appear from some color (black by default),
    over ``duration`` seconds at the beginning of the clip. Can be used for
    masks too, where the initial color must be a number between 0 and 1.

    For cross-fading (progressive appearance or disappearance of a clip
    over another clip, see ``CrossFadeIn``
    durationNinitial_colorclipreturnc                       j                   |j                  rdng d _         t        j                   j                          _          fd}|j	                  |      S )zApply the effect to the clip.r   )r   r   r   c                     |j                   k\  r | |      S d|z  j                   z  }| | |      z  d|z
  j                  z  z   S )Ng      ?   )r   r	   )	get_frametfadingselfs      `/var/www/it7/html/youtubeDownloader/venv/lib/python3.12/site-packages/moviepy/video/fx/FadeIn.pyfilterzFadeIn.apply.<locals>.filter   sN    DMM! |#q4==0	!,F
d>P>P/PPP    )r	   is_masknparray	transform)r   r
   r   s   `  r   applyzFadeIn.apply   sM    %&*ll	DXXd&8&89	Q ~~f%%r   )
__name__
__module____qualname____doc__float__annotations__r	   listr   r    r   r   r   r   	   s+     OM4&$ &4 &r   r   )	dataclassesr   numpyr   moviepy.Clipr   moviepy.Effectr   r   r"   r   r   <module>r'      s,    !   ! &V & &r   