
    -iM                     ^    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dS )    )	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	dS )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}|                    |          S )zApply the effect to the clip.Nr   )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      U/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/FadeIn.pyfilterzFadeIn.apply.<locals>.filter   sR    DM!! y||#q4=0		!,F
d>P/PPP    )r	   is_masknparray	transform)r   r
   r   s   `  r   applyzFadeIn.apply   sj    %&*l!A			DXd&899	Q 	Q 	Q 	Q 	Q ~~f%%%r   )
__name__
__module____qualname____doc__float__annotations__r	   listr   r    r   r   r   r   	   s]           OOOM4&$ &4 & & & & & &r   r   )	dataclassesr   numpyr   moviepy.Clipr   moviepy.Effectr   r   r"   r   r   <module>r'      s    ! ! ! ! ! !           ! ! ! ! ! ! & & & & &V & & & & &r   