'use strict';var aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ba;if("function"==typeof Object.setPrototypeOf)ba=Object.setPrototypeOf;else{var ca;a:{var da={$a:!0},ea={};try{ea.__proto__=da;ca=ea.$a;break a}catch(a){}ca=!1}ba=ca?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var fa=ba; function c(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(fa)fa(a,b);else for(var d in b)if("prototype"!=d)if(Object.defineProperties){var g=Object.getOwnPropertyDescriptor(b,d);g&&Object.defineProperty(a,d,g)}else a[d]=b[d];a.nb=b.prototype}var ha="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,d){a!=Array.prototype&&a!=Object.prototype&&(a[b]=d.value)},e="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this; function f(a,b){if(b){var d=e;a=a.split(".");for(var g=0;g=h}}); function ia(a){var b=0;return function(){return by*G&&(h=(h-a)*(t-b)-(k-b)*(r-a),y=h+G-y,0>h*y&&(n.time=h/(h-y),n.x=a+n.time*(d-a),n.y=b+n.time*(g-b),n.X=!0));return n}function l(a,b){return a.x*b.x+a.y*b.y}function qa(){if(void 0===window||void 0===window.localStorage)return 0;var a=window.localStorage.getItem("best_"+m);return null!==a?parseInt(a,10):0}function ra(){var a="EASY MODE";1===m?a="HARD MODE":2===m&&(a="ULTRA MEGA MODE");return a} function sa(){p.B.setTransform(1,0,0,1,0,0)}function ta(){p.B.setTransform(1,0,0,1,0,0);p.B.translate(.5*q,.5*u);p.B.translate(-v+v*Math.random()*2,-v+v*Math.random()*2);p.B.scale(w,-w)}var v=0,ua=0,x=0,va=0;function wa(a){0g?g/.25:1;p.B.save();p.B.translate(k,r);p.B.rotate(h);d=p.B.lineWidth;p.B.lineWidth=4;p.B.strokeStyle="#08F";p.B.shadowColor="#08F";p.B.beginPath();p.B.moveTo(-6,0);p.B.lineTo(6,0);p.B.stroke();p.B.restore();p.B.lineWidth=d;p.B.globalAlpha=1;b.oa-=a;0>=b.oa&&(b.U=!0)});C=C.filter(function(b){return!0!==b.U})} function ya(a,b){for(var d=0;10>d;d++)C.push({x:a,y:b,oa:.5,U:!1,angle:Math.random()*Math.PI*2,Na:360*Math.random()*Math.PI/180,Ka:15+40*Math.random()})} function D(){this.ga=this.fa=this.qa=this.pa=this.y=this.x=0;this.H=12;this.speed=0===m?250:400;this.ib=.2;this.ba=Number.MAX_SAFE_INTEGER;this.V=this.K=0;this.aa=this.Sa;this.ua={x:0,y:0};this.Ja=1500;this.T=!1;this.angle=0;this.$=180;this.Xa=this.Ua=0;var a=za(this.V,this.K);this.x=a.x;this.y=a.y;this.fa=this.x;this.ga=this.y;this.pa=this.x;this.qa=this.y;this.Ta=this.x;this.Wa=this.y} D.prototype.update=function(a){this.fa=this.pa;this.ga=this.qa;this.pa=this.x;this.qa=this.y;this.angle+=this.$*a;void 0!==this.aa&&this.aa(a)}; D.prototype.Sa=function(a){var b=this;this.K+=this.speed*a;0>this.K&&(this.K+=E.R[this.V]);this.K%=E.R[this.V];var d=za(this.V,this.K);this.x=d.x;this.y=d.y;this.Ua=d.za;this.Xa=d.Da;p.entities.forEach(function(g){g instanceof F&&(g=pa(b.fa,b.ga,b.x,b.y,g.wa,g.Aa,g.xa,g.Ba),g.X&&(ya(g.x,g.y),b.W()))});if(!this.T){this.ba+=a;if(p.L&&(460>p.O.x||50.5*q+this.H||this.y<.5*-u-this.H||this.y>.5*u+this.H)&&this.W();if(!this.T&&(p.entities.forEach(function(h){if(h instanceof I){var k=b.pa,r=b.qa,t=b.x,n=b.y,y=h.x,G=h.y;var z={x:t-k,y:n-r};k={x:y-k,y:G-r};t={x:y-t,y:G-n};n=l(k,z);0>=n?z=l(k,k):(z=l(z,z),z=n>=z?l(t,t):l(k,k)- n*n/z);z<=h.eb&&h.W()}}),a=Aa(this.fa,this.ga,this.x,this.y),a.X)){var d=a.x-this.Ta,g=a.y-this.Wa;225a.za*this.Ua+a.Da*this.Xa&&(this.speed=-this.speed),v=ua=2.5,x=va=.15,H("a",4,.01),H("a#",4,.01,.01))}};D.prototype.ab=function(){}; D.prototype.ea=function(){if(!this.T){p.B.save();p.B.translate(this.x,this.y);p.B.rotate(this.angle);var a=p.B.lineWidth;p.B.lineWidth=4;p.B.strokeStyle="#08F";p.B.shadowColor="#08F";p.B.beginPath();p.B.rect(.5*-this.H,.5*-this.H,this.H,this.H);p.B.stroke();p.B.restore();p.B.lineWidth=a}}; D.prototype.W=function(){J=Math.max(J-1,0);this.T=!0;this.aa=this.ab;v=ua=5;x=va=.2;H("a",1,.2,0,"square");var a=p;if(a.ma&&a.G){var b=a.G.createBufferSource();b.buffer=a.Oa;b.loop=!0;b.start(a.G.currentTime+0);b.stop(a.G.currentTime+0+.05);b.connect(a.G.destination)}}; function I(a,b,d,g,h){this.ya=a;this.Ca=b;this.x=a;this.y=b;this.H=8;this.Ia=20;this.eb=this.Ia*this.Ia;this.angle=0;this.$=180;this.active=!0;this.offset=void 0!==d?d:0;this.la=void 0!==g?g*Math.PI/180:0;this.Ra=void 0!==h?h*Math.PI/180:0;this.ha=0;this.Fa=.5}I.prototype.update=function(a){this.angle-=this.$*a;if(0!==this.offset){var b=Math.sin(this.la);this.x=this.ya+Math.cos(this.la)*this.offset;this.y=this.Ca+b*this.offset;0!==this.Ra&&(this.la+=this.Ra*a)}this.active||(this.ha+=a)}; I.prototype.ea=function(){if(this.active||this.ha=this.S&&(this.ja?(this.S=this.fb,this.ka=!this.ka):this.S=this.da,this.ja=!this.ja),b=!0);b&&Ba(this)};function Ba(a){var b=Math.cos(a.angle),d=Math.sin(a.angle),g=a.ya+a.Va*a.ra,h=a.Ca+a.Ya*a.ra;a.wa=g-b*a.ia;a.Aa=h-d*a.ia;a.xa=g+b*a.ia;a.Ba=h+d*a.ia} F.prototype.ea=function(){p.B.save();p.B.lineWidth=2;p.B.strokeStyle="#F00";p.B.shadowColor="#F00";p.B.beginPath();p.B.moveTo(this.wa,this.Aa);p.B.lineTo(this.xa,this.Ba);p.B.stroke();p.B.restore()}; function Ca(a){xa(a);sa();2==m&&(a=u-30,p.B.fillStyle="#FFF",p.B.fillRect(10,a,E.P/E.M*(q-20),20));p.B.shadowColor="#FFF";K({text:"LEVEL "+(L+1)+" - "+(E?E.name:""),x:10,y:30,fontSize:24,fontStyle:"bold"});K({text:"BEST: "+(qa()+1),x:10,y:50,fontSize:15,fontStyle:"bold",color:"#FFF"});if(2===m)p.B.shadowColor="#08F",K({text:"UNLIMITED LIVES",x:630,y:25,fontSize:15,fontStyle:"bold",color:"#08F",textAlign:"right"}),K({text:"PRESS HERE TO QUIT",x:630,y:45,fontSize:15,fontStyle:"bold",color:"#08F",textAlign:"right"}); else{a=0===m?10:5;for(var b=0===m?440:536,d=0;dDate.now()%500?"#08F":"#FF0",p.B.shadowColor=a,K({text:"CONGRATULATIONS!",x:.5*q, y:150,fontSize:40,fontStyle:"bold",color:a,textAlign:"center"}),p.B.shadowColor="#FFF",K({text:ra()+" COMPLETE",x:.5*q,y:180,fontSize:20,fontStyle:"bold",color:"#FFF",textAlign:"center"}),K({text:"CLICK TO QUIT TO MAIN MENU",x:.5*q,y:200,fontSize:14,fontStyle:"bold",color:"#FFF",textAlign:"center"})):(p.B.shadowColor="#333",p.B.fillStyle="#333",p.B.fillRect(0,52,q,140),p.B.shadowColor="#F00",K({text:"GAME OVER",x:.5*q,y:100,fontSize:40,fontStyle:"bold",color:"#F00",textAlign:"center"}),p.B.shadowColor= "#FFF",K({text:ra(),x:.5*q,y:130,fontSize:20,fontStyle:"bold",color:"#FFF",textAlign:"center"}),K({text:"SCORE: "+(L+1),x:.5*q,y:155,fontSize:20,fontStyle:"bold",color:"#FFF",textAlign:"center"}),K({text:"BEST: "+(qa()+1),x:.5*q,y:180,fontSize:20,fontStyle:"bold",color:"#FFF",textAlign:"center"})))}var M=[{text:"EASY MODE",width:255,ta:"(SLOW SPEED + 10 LIVES)"},{text:"HARD MODE",width:260,ta:"(FAST SPEED + 5 LIVES)"},{text:"ULTRA MEGA MODE",width:388,ta:"(FAST SPEED + TIMED LEVELS)"}],Ea=-1; function N(a){O(a);p.B.save();sa();p.B.shadowColor="#08F";K({text:"OFF THE LINE",x:15,y:10,fontSize:70,fontStyle:"bold italic",color:"#08F",textAlign:"left",textBaseline:"top"});p.B.shadowColor="#08F";K({text:"A GAME BY BRYAN PERFETTO",x:25,y:85,fontSize:20,fontStyle:"bold italic",color:"#08F",textAlign:"left",textBaseline:"top"});a=-1;for(var b=0;b=350+40*b&&p.O.y<350+40*(b+1)&&0<=p.O.x&&p.O.x=p.O.y||p.Y.escape)&&2===m&&(p.entities=[],p.L=!1,p.B.shadowBlur=20,p.state=N,p.na=void 0,H("a",4,.05,0),H("b",4,.05,.05));if(P.T||Ha())if(Ia-=a,0>=Ia)if(Ha()&&19===L){p.state=Da;for(var b=0;3>b;b++)H("d",5,.05,.3*b),H("e",5,.05,.3*b+.05),H("g",5,.05,.3*b+.1),H("a",5,.05,.3*b+.15),H("b",5,.05,.3*b+.2),H("d",5,.05,.3*b+.25);H("c",6,.5,.9)}else 0===J&&2!==m?(p.state=Da,H("a#",4,.05,0),H("g",4,.05,.05),H("e",4,.05,.1),H("d",4,.15,.15)):(P.T|| (L=(L+1)%20),Fa());wa(a);B(a);ta()} function Fa(){var a=L;p.entities=[];w=1.15;A=.2;B(0);wa(0);B(0);ta();0==a?E=new Q:1==a?E=new R:2==a?E=new S:3==a?E=new T:4==a?E=new U:5==a?E=new V:6==a?E=new W:7==a?E=new X:8==a?E=new Ja:9==a?E=new Ka:10==a?E=new La:11==a?E=new Ma:12==a?E=new Na:13==a?E=new Oa:14==a?E=new Pa:15==a?E=new Qa:16==a?E=new Ra:17==a?E=new Sa:18==a?E=new Ta:19==a&&(E=new Ua);Y(E);P=new D;Y(P);Ia=1;void 0!==window&&void 0!==window.localStorage&&window.localStorage.setItem("best_"+m,Math.max(L.toString(),qa()));H("d",4,.05, 0);H("e",4,.05,.05);H("g",4,.05,.1);H("a#",4,.15,.15)}function Da(a){O(a);p.L&&(p.entities=[],p.L=!1,p.B.shadowBlur=20,p.state=N,p.na=void 0,H("a",4,.05,0),H("b",4,.05,.05));wa(a);B(a);ta()}var Va=[],Wa=400,Xa=4E3,Ya=2; function O(a){p.Y.s&&(p.ma=!p.ma);p.B.save();sa();for(var b=0;b=this.P&&(ya(P.x,P.y),P.W()))};Z.prototype.ea=function(){p.B.lineWidth=2;p.B.strokeStyle="#FFF";p.B.shadowColor="#FFF";for(var a=0;a=g&&bb;b++){var d=2*Math.PI-b*a;this.A[0].push({x:150*Math.cos(d),y:150*Math.sin(d)})}this.name="ORBIT"};S.prototype.D=function(){Y(new I(0,0));Y(new I(0,0,50,90,70));Y(new I(0,0,100,90,70));Y(new I(0,0,50,270,70));Y(new I(0,0,100,270,70))};function T(a){Z.apply(this,arguments)}c(T,Z); T.prototype.F=function(){this.A.push([]);this.A[0].push({x:-60,y:150});this.A[0].push({x:60,y:150});this.A[0].push({x:60,y:-150});this.A[0].push({x:-60,y:-150});this.name="NEEDLE"};T.prototype.D=function(){Y(new I(0,0));Y(new I(0,50));Y(new I(0,-50));Y(new F(-40,25,40,0));Y(new F(40,-25,40,0));Y(new F(40,75,40,0));Y(new F(-40,-75,40,0))};function U(a){Z.apply(this,arguments)}c(U,Z); U.prototype.F=function(){this.A.push([]);this.A[0].push({x:-200,y:0});this.A[0].push({x:0,y:200});this.A[0].push({x:200,y:0});this.A[0].push({x:0,y:-200});this.P=this.M=12;this.name="PATIENCE"}; U.prototype.D=function(){Y(new F(0,0,250,0,40));Y(new I(0,120));Y(new I(30,90));Y(new I(60,60));Y(new I(90,30));Y(new I(-30,90));Y(new I(-60,60));Y(new I(-90,30));Y(new I(-120,0));Y(new I(-90,-30));Y(new I(-60,-60));Y(new I(-30,-90));Y(new I(0,-120));Y(new I(30,-90));Y(new I(60,-60));Y(new I(90,-30));Y(new I(120,0))};function V(a){Z.apply(this,arguments)}c(V,Z); V.prototype.F=function(){this.A.push([]);this.A[0].push({x:-200,y:200});this.A[0].push({x:-50,y:200});this.A[0].push({x:-50,y:20});this.A[0].push({x:200,y:20});this.A[0].push({x:200,y:-200});this.A[0].push({x:50,y:-200});this.A[0].push({x:50,y:-20});this.A[0].push({x:-200,y:-20});this.name="BOOMERANG"}; V.prototype.D=function(){Y(new I(0,0));Y(new I(-30,0));Y(new I(-60,0));Y(new I(30,0));Y(new I(60,0));Y(new I(90,0));Y(new I(-90,0));Y(new I(120,0));Y(new I(-120,0));Y(new F(-125,160,150));Y(new F(125,-160,150));Y(new I(-125,180));Y(new I(125,-180));Y(new F(-60,40,40,90));Y(new F(60,-40,40,90))};function W(a){Z.apply(this,arguments)}c(W,Z); W.prototype.F=function(){this.A.push([]);this.A[0].push({x:50,y:-100});this.A[0].push({x:-50,y:-100});this.C.push([]);this.C[0].push({x:0,y:1});this.C[0].push({x:0,y:1});this.A.push([]);this.A[1].push({x:-125,y:100});this.A[1].push({x:-25,y:100});this.C.push([]);this.C[1].push({x:0,y:-1});this.C[1].push({x:0,y:-1});this.A.push([]);this.A[2].push({x:125,y:100});this.A[2].push({x:25,y:100});this.C.push([]);this.C[2].push({x:0,y:-1});this.C[2].push({x:0,y:-1});this.name="SPLITTER"}; W.prototype.D=function(){Y(new I(-35,-50));Y(new I(-35,-25));Y(new I(-35,0));Y(new I(-35,25));Y(new I(-35,50));Y(new I(35,-50));Y(new I(35,-25));Y(new I(35,0));Y(new I(35,25));Y(new I(35,50))};function X(a){Z.apply(this,arguments)}c(X,Z); X.prototype.F=function(){this.A.push([]);this.A[0].push({x:-250,y:-100});this.A[0].push({x:250,y:-100});this.C.push([]);this.C[0].push({x:0,y:1});this.C[0].push({x:0,y:1});this.A.push([]);this.A[1].push({x:-140,y:100});this.A[1].push({x:-110,y:100});this.C.push([]);this.C[1].push({x:0,y:-1});this.C[1].push({x:0,y:-1});this.A.push([]);this.A[2].push({x:140,y:100});this.A[2].push({x:110,y:100});this.C.push([]);this.C[2].push({x:0,y:-1});this.C[2].push({x:0,y:-1});this.A.push([]);this.A[3].push({x:-15, y:100});this.A[3].push({x:15,y:100});this.C.push([]);this.C[3].push({x:0,y:-1});this.C[3].push({x:0,y:-1});this.P=this.M=12;this.name="TRIPLE SHOT"};X.prototype.D=function(){Y(new I(-125,-50));Y(new I(-125,0));Y(new I(-125,50));Y(new I(0,-50));Y(new I(0,0));Y(new I(0,50));Y(new I(125,-50));Y(new I(125,0));Y(new I(125,50))};function Ja(a){Z.apply(this,arguments)}c(Ja,Z); Ja.prototype.F=function(){this.A.push([]);for(var a=150,b=90,d=360/b*Math.PI/180,g=0;ga;a++)Y(new I(-125+50*a,30)),Y(new I(-125+50*a,0)),Y(new I(-125+50*a,-30));Y(new F(0,-50,50,90));Y(new F(-50,50,50,90));Y(new F(50,50,50,90));Y(new F(-100,-50,50,90));Y(new F(100,-50,50,90));Y(new F(-150,50,50,90));Y(new F(150,50,50,90))};function Pa(a){Z.apply(this,arguments)}c(Pa,Z); Pa.prototype.F=function(){this.A.push([]);this.A[0].push({x:-225,y:150});this.A[0].push({x:-225,y:50});this.A[0].push({x:-125,y:50});this.A[0].push({x:-125,y:150});this.A.push([]);this.A[1].push({x:175,y:125});this.A[1].push({x:175,y:75});this.A[1].push({x:225,y:75});this.A[1].push({x:225,y:125});this.A.push([]);this.A[2].push({x:150,y:-75});this.A[2].push({x:150,y:-125});this.A[2].push({x:200,y:-125});this.A[2].push({x:200,y:-75});this.A.push([]);this.A[3].push({x:-200,y:-85});this.A[3].push({x:-200, y:-110});this.A[3].push({x:-175,y:-110});this.A[3].push({x:-175,y:-85});this.name="QUADS"};Pa.prototype.D=function(){for(var a=0;5>a;a++)Y(new I(-75+50*a,100));for(a=0;6>a;a++)Y(new I(-135+50*a,-97.5));for(a=0;2>a;a++)Y(new I(-187.5,10-50*a));for(a=0;3>a;a++)Y(new I(187.5,50-50*a))};function Ma(a){Z.apply(this,arguments)}c(Ma,Z); Ma.prototype.F=function(){this.A.push([]);this.A[0].push({x:-300,y:100});this.A[0].push({x:-145,y:100});this.A[0].push({x:-135,y:80});this.A[0].push({x:-115,y:80});this.A[0].push({x:-105,y:100});this.A[0].push({x:105,y:100});this.A[0].push({x:115,y:80});this.A[0].push({x:135,y:80});this.A[0].push({x:145,y:100});this.A[0].push({x:300,y:100});this.A[0].push({x:300,y:20});this.A[0].push({x:280,y:10});this.A[0].push({x:280,y:-10});this.A[0].push({x:300,y:-20});this.A[0].push({x:300,y:-100});this.A[0].push({x:145, y:-100});this.A[0].push({x:135,y:-80});this.A[0].push({x:115,y:-80});this.A[0].push({x:105,y:-100});this.A[0].push({x:-105,y:-100});this.A[0].push({x:-115,y:-80});this.A[0].push({x:-135,y:-80});this.A[0].push({x:-145,y:-100});this.A[0].push({x:-300,y:-100});this.A[0].push({x:-300,y:-20});this.A[0].push({x:-280,y:-10});this.A[0].push({x:-280,y:10});this.A[0].push({x:-300,y:20});this.name="RAZOR"}; Ma.prototype.D=function(){for(var a=0;10>a;a++)Y(new I(-225+50*a,0));Y(new I(-125,40));Y(new I(-125,-40));Y(new I(125,40));Y(new I(125,-40))};function Ua(a){Z.apply(this,arguments)}c(Ua,Z); Ua.prototype.F=function(){this.A.push([]);this.C.push([]);for(var a=8*Math.PI/180,b=0;45>b;b++){var d=b*a;this.A[0].push({x:70*Math.cos(d),y:70*Math.sin(d)})}this.A.push([]);this.A[1].push({x:-300,y:50});this.A[1].push({x:-300,y:-50});this.C.push([]);this.C[1].push({x:1,y:0});this.C[1].push({x:1,y:0});this.A.push([]);this.A[2].push({x:215,y:-135});this.A[2].push({x:135,y:-215});this.C.push([]);this.C[2].push({x:-.707,y:.707});this.C[2].push({x:-.707,y:.707});this.A.push([]);this.A[3].push({x:175, y:125});this.A[3].push({x:125,y:175});this.C.push([]);this.C[3].push({x:-.707,y:-.707});this.C[3].push({x:-.707,y:-.707});this.name="ALIENS"};Ua.prototype.D=function(){Y(new I(-112,0));Y(new I(-162,0));Y(new I(-212,0));Y(new I(-262,0));Y(new I(80,-80));Y(new I(110,-110));Y(new I(140,-140));Y(new I(85,85));Y(new I(120,120));Y(new F(-188,150,75,90,0,0,-300,.5,.5));Y(new F(0,205,75,-45,0,215,-215,.5,.5))};function La(a){Z.apply(this,arguments)}c(La,Z); La.prototype.F=function(){this.A.push([]);this.A[0].push({x:-280,y:150});this.A[0].push({x:-280,y:-150});this.A[0].push({x:-260,y:-150});this.A[0].push({x:-260,y:150});this.A.push([]);this.A[1].push({x:-100,y:100});this.A[1].push({x:-100,y:-100});this.A[1].push({x:-80,y:-100});this.A[1].push({x:-80,y:100});this.A.push([]);this.A[2].push({x:80,y:50});this.A[2].push({x:80,y:-50});this.A[2].push({x:100,y:-50});this.A[2].push({x:100,y:50});this.A.push([]);this.A[3].push({x:260,y:25});this.A[3].push({x:260, y:-25});this.A[3].push({x:280,y:-25});this.A[3].push({x:280,y:25});this.name="BAR GAPS"};La.prototype.D=function(){Y(new I(-130,0));Y(new I(-180,0));Y(new I(-230,0));Y(new I(-130,80));Y(new I(-180,80));Y(new I(-230,80));Y(new I(-130,-80));Y(new I(-180,-80));Y(new I(-230,-80));Y(new I(-50,-30));Y(new I(0,-30));Y(new I(50,-30));Y(new I(-50,30));Y(new I(0,30));Y(new I(50,30));Y(new I(130,0));Y(new I(180,0));Y(new I(230,0))};function Qa(a){Z.apply(this,arguments)}c(Qa,Z); Qa.prototype.F=function(){this.A.push([]);this.A[0].push({x:-275,y:-200});this.A[0].push({x:-250,y:-200});this.C.push([]);this.C[0].push({x:0,y:1});this.C[0].push({x:0,y:1});this.A.push([]);this.A[1].push({x:-275,y:0});this.A[1].push({x:-250,y:25});this.C.push([]);this.C[1].push({x:.707,y:-.707});this.C[1].push({x:.707,y:-.707});this.A.push([]);this.A[2].push({x:-150,y:-200});this.A[2].push({x:-25,y:-200});this.C.push([]);this.C[2].push({x:0,y:1});this.C[2].push({x:0,y:1});this.A.push([]);this.A[3].push({x:-75, y:100});this.A[3].push({x:-50,y:125});this.C.push([]);this.C[3].push({x:.707,y:-.707});this.C[3].push({x:.707,y:-.707});this.A.push([]);this.A[4].push({x:160,y:-200});this.A[4].push({x:285,y:-200});this.C.push([]);this.C[4].push({x:0,y:1});this.C[4].push({x:0,y:1});this.A.push([]);this.A[5].push({x:160,y:180});this.A[5].push({x:285,y:180});this.C.push([]);this.C[5].push({x:0,y:-1});this.C[5].push({x:0,y:-1});this.P=this.M=12;this.name="ZIG ZAG"}; Qa.prototype.D=function(){for(var a=0;3>a;a++)Y(new I(-262,-150+50*a));for(a=1;4>a;a++)Y(new I(-262+50*a,12-50*a));for(a=0;5>a;a++)Y(new I(-62,-150+50*a));for(a=1;6>a;a++)Y(new I(-62+50*a,112-50*a));for(a=0;7>a;a++)Y(new I(222,-150+50*a));Y(new F(-225,-75,100,0,-180));Y(new F(-12,0,125,0,180));Y(new F(222,50,100,0,0,-100,0,1,.5));Y(new F(222,-50,100,0,0,100,0,1,.5))};function Na(a){Z.apply(this,arguments)}c(Na,Z); Na.prototype.F=function(){this.A.push([]);for(var a=4*Math.PI/180,b=0;22.5>b;b++){var d=1.745*Math.PI-b*a;this.A[0].push({x:300*Math.cos(d),y:300*Math.sin(d)+150})}this.A[0].push({x:-50,y:150});this.A[0].push({x:50,y:150});this.name="SHELL"}; Na.prototype.D=function(){var a=-60,b=95,d=50,g=Math.cos(235*Math.PI/180)*d;d*=Math.sin(235*Math.PI/180);for(var h=0;4>h;h++)Y(new I(-a-g*h,b+d*h)),Y(new I(a+g*h,b+d*h));a=-17;b=85;d=50;g=Math.cos(255*Math.PI/180)*d;d*=Math.sin(255*Math.PI/180);for(h=0;4>h;h++)Y(new I(-a-g*h,b+d*h)),Y(new I(a+g*h,b+d*h));Y(new F(0,0,150,90));Y(new F(75,20,150,-60));Y(new F(-75,20,150,60))};function Ra(a){Z.apply(this,arguments)}c(Ra,Z); Ra.prototype.F=function(){this.A.push([]);this.A[0].push({x:-250,y:0});this.A[0].push({x:-250,y:50});this.A[0].push({x:250,y:50});this.A[0].push({x:-250,y:50});this.C.push([]);this.C[0].push({x:1,y:0});this.C[0].push({x:0,y:-1});this.C[0].push({x:0,y:-1});this.C[0].push({x:1,y:0});this.A.push([]);this.A[1].push({x:250,y:0});this.A[1].push({x:250,y:-50});this.A[1].push({x:-250,y:-50});this.A[1].push({x:250,y:-50});this.C.push([]);this.C[1].push({x:-1,y:0});this.C[1].push({x:0,y:1});this.C[1].push({x:0, y:1});this.C[1].push({x:-1,y:0});this.name="X FACTOR"};Ra.prototype.D=function(){Y(new I(0,-25));Y(new I(0,25));Y(new I(100,-25));Y(new I(100,25));Y(new I(-100,-25));Y(new I(-100,25));Y(new I(200,-25));Y(new I(200,25));Y(new I(-200,-25));Y(new I(-200,25));Y(new F(200,0,80,0,270,-400,0,.75,0));Y(new F(200,0,80,90,270,-400,0,.75,0))};function Ta(a){Z.apply(this,arguments)}c(Ta,Z); Ta.prototype.F=function(){this.A.push([]);this.A[0].push({x:-150,y:150});this.A[0].push({x:-200,y:150});this.A[0].push({x:-200,y:100});this.A[0].push({x:-200,y:150});this.C.push([]);this.C[0].push({x:0,y:-1});this.C[0].push({x:1,y:0});this.C[0].push({x:1,y:0});this.C[0].push({x:0,y:-1});this.A.push([]);this.A[1].push({x:-150,y:0});this.A[1].push({x:-200,y:0});this.A[1].push({x:-200,y:50});this.A[1].push({x:-200,y:0});this.C.push([]);this.C[1].push({x:0,y:1});this.C[1].push({x:1,y:0});this.C[1].push({x:1, y:0});this.C[1].push({x:0,y:1});this.A.push([]);this.A[2].push({x:150,y:50});this.A[2].push({x:200,y:50});this.A[2].push({x:200,y:0});this.A[2].push({x:200,y:50});this.C.push([]);this.C[2].push({x:0,y:-1});this.C[2].push({x:-1,y:0});this.C[2].push({x:-1,y:0});this.C[2].push({x:0,y:-1});this.A.push([]);this.A[3].push({x:150,y:-100});this.A[3].push({x:200,y:-100});this.A[3].push({x:200,y:-50});this.A[3].push({x:200,y:-100});this.C.push([]);this.C[3].push({x:0,y:1});this.C[3].push({x:-1,y:0});this.C[3].push({x:-1, y:0});this.C[3].push({x:0,y:1});this.A.push([]);this.A[4].push({x:-150,y:-50});this.A[4].push({x:-200,y:-50});this.A[4].push({x:-200,y:-100});this.A[4].push({x:-200,y:-50});this.C.push([]);this.C[4].push({x:0,y:-1});this.C[4].push({x:1,y:0});this.C[4].push({x:1,y:0});this.C[4].push({x:0,y:-1});this.A.push([]);this.A[5].push({x:-150,y:-200});this.A[5].push({x:-200,y:-200});this.A[5].push({x:-200,y:-150});this.A[5].push({x:-200,y:-200});this.C.push([]);this.C[5].push({x:0,y:1});this.C[5].push({x:1, y:0});this.C[5].push({x:1,y:0});this.C[5].push({x:0,y:1});this.A.push([]);this.A[6].push({x:150,y:-200});this.A[6].push({x:200,y:-200});this.A[6].push({x:200,y:-150});this.A[6].push({x:200,y:-200});this.C.push([]);this.C[6].push({x:0,y:1});this.C[6].push({x:-1,y:0});this.C[6].push({x:-1,y:0});this.C[6].push({x:0,y:1});this.P=this.M=12;this.name="SNAKE"}; Ta.prototype.D=function(){Y(new I(-175,125));Y(new I(-175,75));Y(new I(-175,25));for(var a=0;7>a;a++)Y(new I(-125+50*a,25)),Y(new I(-125+50*a,-75)),Y(new I(-125+50*a,-175));Y(new I(175,-25));Y(new I(-175,-75));Y(new I(-175,-125));Y(new I(-175,-175));Y(new F(0,-25,150,0,180))};function Oa(a){Z.apply(this,arguments)}c(Oa,Z);Oa.prototype.F=function(){this.A.push([]);this.A[0].push({x:-100,y:100});this.A[0].push({x:100,y:100});this.A[0].push({x:100,y:-100});this.A[0].push({x:-100,y:-100});this.name="REVENGE OF THE BOX"}; Oa.prototype.D=function(){Y(new I(0,0));Y(new I(-50,0));Y(new I(50,0));Y(new I(-25,0));Y(new I(25,0));Y(new I(0,50));Y(new I(-50,50));Y(new I(50,50));Y(new I(-25,50));Y(new I(25,50));Y(new I(0,-50));Y(new I(-50,-50));Y(new I(50,-50));Y(new I(-25,-50));Y(new I(25,-50));Y(new F(-32,32,50,0,180));Y(new F(38,-50,50,90,0,0,50,1,.5))}; function $a(){var a=q,b=u;this.canvas=document.createElement("canvas");this.canvas.setAttribute("width",a);this.canvas.setAttribute("height",b);this.canvas.style.width=1*a+"px";this.canvas.style.height=1*b+"px";this.canvas.style.backgroundColor="black";document.getElementById("game").appendChild(this.canvas);this.B=this.canvas.getContext("2d");this.width=a;this.height=b;this.scale=1;this.entities=[];this.Ga=this.sa=!1;ab(this);bb(this);cb(this);this.Ha(performance.now())} function cb(a){a.I={};[].forEach(function(b){a.I[b]={};a.I[b].loaded=!1;b.endsWith(".png")||b.endsWith(".jpg")?(a.I[b].data=new Image,a.I[b].data.onload=function(){return a.I[b].loaded=!0},a.I[b].data.src=b):b.endsWith(".wav")||b.endsWith(".mp3")?(a.I[b].data=new Audio,a.I[b].data.src=b,a.I[b].data.load(),a.I[b].loaded=!0):console.assert(!1,"Unable to load "+b+" - unknown type")})}function db(a){return 0