
    Mg.                         S SK Jr  S SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
Jr  S SKJr   \R                  r/ SQr\" S5      S	 5       rSS
 jrSS jrS rS rS rS rS rg)    )newN)current_processindex)who)plugin)[31m[32m[33mz[34mz[35mr	   r
   r   	moonphasec                 D   [        5       n[        U5      n[        U5      n[        [        U   5        SnUS:X  a+  U R                  SU-   5        U R                  SUS -   5        OUS:X  d  US:X  a  U R                  [        U5      5        OZUS:X  a  U R                  [        5       5        S	nO8US
:X  d  US:X  a  [        5       nS	n[        U5        OU R                  SU-   5        US:X  a4  U R                  S5        U R                  S5        U R                  S5        g g )NTilluminationzPhase: zIllumination: z .2%artasciihelpFfullmoonfullz%The current moon phase for today is:  More details at:z0[0;40mhttps://nineplanets.org/moon/phase/today/)
positionphase_calculatorphaseprintCOLORSsay	ascii_art	help_textfullmoon_finderfullmoon_text)jarvissposcurrent_phase	phasenamedetails_textfullmoon_days          @/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/moon_phase.pyr   r       s    *C$S)Mm$I	&
 LN

9i'(

#T
34	
eqG|

9]+,	
f

9;	
jAJ&(l# 	

:YFG t

2

%&

HI	     c                 8   U c  [         R                   R                  5       n U [         R                   " SSS5      -
  n[        UR                  5      [        UR                  5      [        S5      -  -   n[        S5      U[        S5      -  -   nU[        S5      -  $ )N     Q 
0.204397310.03386319269)datetimenowdecdaysseconds)r0   diffr2   	lunationss       r'   r   r   D   s    	k!!#c
!!$1-
-4
dii.C-E
:
;4< D3+?$?@9
c!f
r(   c                    U c  [         R                   R                  5       n SnSnUS:X  a  U [         R                  " US9-   nU[         R                   " SSS5      -
  n[        UR                  5      [        UR
                  5      [        S5      -  -   n[        S5      U[        S5      -  -   nU[        S5      -  n[        U5      nUS	:X  a  S
nOUS-  nUS:X  a  M  U$ )NFr   )r2   r*   r+   r,   r-   r.      T)r/   r0   	timedeltar1   r2   r3   r   )	r0   is_full	extra_daynew_dater4   r2   r5   r   	new_phases	            r'   r   r   O   s    
{!!#cGI
U
x))y99h))$155d^s4<<03u:=>dl#tc/.B'BCiSV#h"8,i	aQ	 U
 r(   c                 $   [        S5        [        [        S   5        [        S5        U S:X  a"  [        S5        [        S5        [        S5        OU S:X  a  [        S5        O[        S	U S
5        [        S5        [        S5        [        S5        g )NzP[33mNote: This tool is not always accurate and will may be off 2 days at a timer7   r   r   z2The next full moon will approximately appear todayzHope you enjoy the Full Moon!r+   z5The next full moon will approximately appear tomorrowz0The next full moon will appear in approximately z daysr   z@[0;40mhttps://www.timeanddate.com/astronomy/moon/full-moon.html)r   r   )r&   s    r'   r   r   a   sw    	
^_	&)	"Iq@ABi+,		EF@,PWX	"I	
	
OPr(   c                 f    U [        S5      -  [        S5      -   n[        R                  " U5      nU$ )N   z0.5)r1   mathfloor)r"   r   s     r'   r   r   s   s+    3q6\SZ'EJJuELr(   c                  
    Sn U $ )Na  
    The moonphase plugin aims to inform the user about the current moon phase


    moonphase: (Default request) Displays the current moonphase

    moonphase art, moonphase ascii: Displays the current moonphase with ASCII art

    moonphase fullmoon: Displays the approximate days left until the next Full Moon

    moonphase illumination: Displays the current lunar illumination percent

    moonphase help: Prints this help prompt
     )r   s    r'   r   r   y   s    I r(   c           	      6    SSSSSSSSS	.[        U 5      S
-     $ )NzNew MoonzWaxing CrescentzFirst QuarterzWaxing Gibbousz	Full MoonzWaning GibbouszLast QuarterzWaning Crescent)r   r+         r7            rI   )intr   s    r'   r   r      s6    									 	Z!^	 	r(   c                     / SQnX   $ )N)zr       _..._     
     .:::::::.    
    :::::::::::   NEW  MOON
    ::::::::::: 
    `:::::::::'  
      `':::'' zz       _..._     
     .::::. `.    
    :::::::.  :    WAXING CRESCENT
    ::::::::  :  
    `::::::' .'  
      `'::'-' zw       _..._     
     .::::  `.    
    ::::::    :    FIRST QUARTER
    ::::::    :  
    `:::::   .'  
      `'::.-'zz       _..._     
     .::'   `.    
    :::       :    WAXING GIBBOUS
    :::       :  
    `::.     .'  
      `':..-'  zu       _..._     
     .'     `.    
    :         :    FULL MOON
    :         :  
    `.       .'  
      `-...-'  zy       _..._     
     .'   `::.    
    :       :::    WANING GIBBOUS
    :       :::  
    `.     .::'  
      `-..:'' zy       _..._     
     .'  ::::.    
    :    ::::::    LAST QUARTER
    :    ::::::  
    `.   :::::'  
      `-.::''   zz       _..._     
     .' .::::.    
    :  ::::::::    WANING CRESCENT
    :  ::::::::  
    `. '::::::'  
      `-.::'' rC   )r   ARTs     r'   r   r      s    /C` :r(   )N)hashlibr   r@   decimalr/   randommultiprocessing.dummyr   operatorr   numpyr   r   Decimalr1   r   r   r   r   r   r   r   r   r   rC   r(   r'   <module>rT      ss     & & 1    oo
 !J !JF$Q$$
1r(   