
    ljO                        d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	 dgZ
 ej        d          d
d	            ZdS )zJA CLI utility helping to diagnose problems with
your Manim installation.

    )annotationsN)HEALTH_CHECKSHealthCheckFunctioncheckhealth)context_settingsreturnNonec                 6   t          j        dt          j         d           t          j        d           g } t          D ]t          j        dj         dd           t          fd| D                       rt          j        d	d
           S             }|rt          j        dd           vt          j        dd           |                                t          j                     | rnt          j        d           t          |           D ]H\  }}t          j        |j
                   |dz   t          |           k     rt          j        d           IdS t          j        d           t          j        d          }|rddl G fddj                  }                    ddd          5   |            }|                                 t          j        d|j        dd           ddd           dS # 1 swxY w Y   dS dS )zThis subcommand checks whether Manim is installed correctly
    and has access to its required (and optional) system dependencies.
    zPython executable: 
zCChecking whether your installation of Manim Community is healthy...z- z ... F)nlc              3  4   K   | ]}|j         j        v V  d S )N)__name__skip_on_failed).0failed_checkchecks     Y/home/agentuser/manim-venv/lib/python3.11/site-packages/manim/cli/checkhealth/commands.py	<genexpr>zcheckhealth.<locals>.<genexpr>    sB       
 
 !U%99
 
 
 
 
 
    SKIPPEDblue)fgPASSEDgreenFAILEDredzUThere are problems with your installation, here are some recommendations to fix them:   z"Continue with next recommendation?z6No problems detected, your installation seems healthy!z2Would you like to render and preview a test scene?r   Nc                  $    e Zd Zd fdZddZdS )$checkhealth.<locals>.CheckHealthDemor   r	   c                N                                                        j        dz            }|                     |                                           |                     d           |                     |                                           |                     d                               d          }                    d          }	                    ||          }|
                    j        d                              |j                   |                                         |                     |                     d           |                                         |j                                      |j                             d S )Ng      ?zAll systems operational!z\oint_{\gamma} f(z)~dz = 0r   )buff)shift)ManimBannerr"   UPplaycreatewaitexpandTextMathTexVGrouparrangeRIGHTnext_toDOWNWriteFadeOut)selfbanner	text_leftformula_righttext_tex_groupmns        r   _inner_constructz5checkhealth.<locals>.CheckHealthDemo._inner_constructB   sS   ^^--33BECK@@FIIfmmoo...IIcNNNIIfmmoo...IIcNNN "(B C CI$&JJ/L$M$MM%'YYy-%H%HN"**28!*<<DDVRWUUUIIbhh~66777IIcNNNII

6
77

>
AA    r   c                F    t          j         | j        d          | _        d S )Nr   )number)timeitr8   execution_time)r2   s    r   	constructz.checkhealth.<locals>.CheckHealthDemo.constructS   s#    *0-8MVW*X*X*XD'''r   Nr   r	   )r   
__module____qualname__r8   r=   )r7   s   r   CheckHealthDemor   A   sM             "Y Y Y Y Y Yr   rA   T)previewdisable_cachingzScene rendered in z.2fz	 seconds.)clickechosys
executabler   descriptionanysechoappend	enumeraterecommendationlenconfirmmanimScene
tempconfigrenderr<   )	failed_checkscheck_resultindr   render_test_scenerA   scener   r7   s	          @@r   r   r      s    
J7S^777888	JTUUU/1M ( (
0)000U;;;; 
 
 
 
 -
 
 
 
 
 	 K	f----uww 	(KW-----KU++++  ''''	JLLL +U
9	
 	
 	
 "+=!9!9 	D 	DCJ|2333Qw]++++BCCC	D 	D 	
KLLL!M@
 
  	UY Y Y Y Y Y Y"( Y Y Y* 4DIIJJ U U'))
S0DSSSSTTT	U U U U U U U U U U U U U U U U U U1	U 	Us   =HHHr>   )__doc__
__future__r   rF   r;   rD   cloupmanim.cli.checkhealth.checksr   r   __all__commandr    r   r   <module>r`      s    
 # " " " " " 



    K K K K K K K K/   DU DU DU DU DU DUr   