eElement("div");b.style.position="absolute";b.style.display="table";b.style.width="100%";b.style.height="100%";c=document.createElement("div");c.style.display="table-cell";c.style.verticalAlign="middle";var d=document.createElement("div");d.style.color=this.colorText;d.style.textAlign="center";d.style.overflow="visible";d.style.whiteSpace="nowrap";d.className="rp_text";c.appendChild(d);b.appendChild(c);a.appendChild(b);this.text=d;this.indetA= this.prevP=this.prevH=this.prevW=0;this.indetB=.2;this.rot=0;this.draw=function(e){1!=e&&rp_requestAnimationFrame(this.draw);var f=this.canvas,h=window.devicePixelRatio||1;f.width=f.clientWidth*h;f.height=f.clientHeight*h;if(1==e||this.spin||this.indeterminate||!(1>Math.abs(this.prevP-this.progress)&&this.prevW==f.width&&this.prevH==f.height)){e=f.width/2;var g=f.height/2,l=f.clientWidth/100,n=f.height/2-this.thick*l*h/2;l=f.clientWidth/100;this.text.style.fontSize=(this.fixedTextSize?f.clientWidth* this.fixedTextSize:.26*f.clientWidth-this.thick)+"px";if(this.noAnimations)this.aniP=this.progress;else{var q=Math.pow(.93,this.animationSpeed);this.aniP=this.aniP*q+this.progress*(1-q)}f=f.getContext("2d");f.beginPath();f.strokeStyle=this.colorBg;f.lineWidth=this.thick*l*h;f.arc(e,g,n,-Math.PI/2,2*Math.PI);f.stroke();f.beginPath();f.strokeStyle=this.colorFg;f.lineWidth=this.thick*l*h;this.round&&(f.lineCap="round");this.indeterminate?(this.indetA=(this.indetA+.07*this.animationSpeed)%(2*Math.PI), this.indetB=(this.indetB+.14*this.animationSpeed)%(2*Math.PI),f.arc(e,g,n,this.indetA,this.indetB),this.noPercentage||(this.text.innerHTML="")):(this.spin&&!this.noAnimations&&(this.rot=(this.rot+.07*this.animationSpeed)%(2*Math.PI)),f.arc(e,g,n,this.rot-Math.PI/2,this.rot+2*this.aniP*Math.PI-Math.PI/2),this.noPercentage||(this.text.innerHTML=Math.round(100*this.aniP)+" %"));f.stroke();this.prevW=f.width;this.prevH=f.height;this.prevP=this.aniP}}.bind(this);this.draw()} RadialProgress.prototype={constructor:RadialProgress,setValue:function(a){this.progress=0>a?0:1U&&(U=0);L+=2.967E-4/Math.tan(U+.00312536/(U+.08901179));return{azimuth:d(F,z,G.dec),altitude:L,distance:G.dist,parallacticAngle:P}};M.getMoonIllumination= function(G){var z=(G||new Date).valueOf()/864E5-.5+2440588-2451545;G=h(z);z=g(z);var F=D(q(G.dec)*q(z.dec)+m(G.dec)*m(z.dec)*m(G.ra-z.ra));F=A(149598E3*q(F),z.dist-149598E3*m(F));G=A(m(G.dec)*q(G.ra-z.ra),q(G.dec)*m(z.dec)-m(G.dec)*q(z.dec)*m(G.ra-z.ra));return{fraction:(1+m(F))/2,phase:.5+.5*F*(0>G?-1:1)/Math.PI,angle:G}};M.getMoonTimes=function(G,z,F,L){G=new Date(G);L?G.setUTCHours(0,0,0,0):G.setHours(0,0,0,0);L=.133*H;for(var P=M.getMoonPosition(G,z,F).altitude-L,U,S,R,Y,I,k,p,t,x,y,B=1;24>=B;B+= 2){U=M.getMoonPosition(l(G,B),z,F).altitude-L;S=M.getMoonPosition(l(G,B+1),z,F).altitude-L;I=(P+S)/2-U;k=(S-P)/2;p=-k/(2*I);t=(I*p+k)*p+U;k=k*k-4*I*U;U=0;0<=k&&(y=Math.sqrt(k)/(2*Math.abs(I)),x=p-y,y=p+y,1>=Math.abs(x)&&U++,1>=Math.abs(y)&&U++,-1>x&&(x=y));1===U?0>P?R=B+x:Y=B+x:2===U&&(R=B+(0>t?y:x),Y=B+(0>t?x:y));if(R&&Y)break;P=S}z={};R&&(z.rise=l(G,R));Y&&(z.set=l(G,Y));R||Y||(z[0