\n ").concat(a.name,"\n ").concat(a.help(Math.max(1,e.perks[a.id])),"\n
\n ").concat(t.reverse().join(""),"\n".concat(Y("score_panel.upgrades_picked"),"
")+a.join("")}function eH(e,a){if(!e.perks.clairvoyant||e.creative)return"";for(var r="",t=0;t".concat(Y("score_panel.upcoming_levels"),"
").concat(r,"
")}function eD(e){return e.level}function eF(e){return -1!==e.bricks.indexOf(e.ballsColor)}function eI(e){if(!e.perks.reach)return -1;for(var a=e.level.size,r=-1,t=-1,n=-1,i=0;i0&&X(1-a.y/e.gameZoneHeight*1.1+.1,0,1)||0}function eN(e,a){return Math.pow(e.x-a.x,2)+Math.pow(e.y-a.y,2)}function eU(e,a){return Math.sqrt(eN(e,a))}function eK(e){return!!(e.lastPuckMove&&e.perks.passive_income&&e.lastPuckMove>e.levelTime-250*e.perks.passive_income)}function eY(){try{return parseInt(localStorage.getItem("breakout-3-hs-short")||"0")}catch(e){}return 0}function eX(e){var a=[],r=[],t=Math.max(-1e3+100*e,0);if(e>20){var n=er.slice(0,Math.floor(e/2)).map(function(e){return e}).filter(function(e){var a;return a=e.id,_||(_=new Set(["extra_levels","extra_life","one_more_choice","instant_upgrade","shunt","slow_down"]),er.forEach(function(e){e.requires&&_.add(e.requires)})),!_.has(a)}).sort(function(a,r){return ei(e+a.id)-ei(e+r.id)}),i=Math.min(3,Math.ceil(e/30));a=n.slice(0,i),r=n.slice(i,i+i)}return{required:a,forbidden:r,minScore:t}}function eJ(e,a,r){var t=eX(e),n=t.required,i=t.forbidden,s=t.minScore,_=function(e){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return(a=Math).max.apply(a,[0].concat(B(e.filter(function(e){return!r.find(function(a){var r;return!(null==e?void 0:null===(r=e.perks)||void 0===r?void 0:r[a.id])})&&!t.find(function(a){var r;return null==e?void 0:null===(r=e.perks)||void 0===r?void 0:r[a.id]})}).map(function(e){return e.score}))))}(a,n,i),o=_&&r?Y("unlocks.reached",{reached:_}):"";return _>=s?null:n.length||i.length?{reached:_,minScore:s,text:Y("unlocks.minScoreWithPerks",{minScore:s,required:n.map(function(e){return e.name}).join(", "),forbidden:i.map(function(e){return e.name}).join(", ")})+o}:{reached:_,minScore:s,text:Y("unlocks.minScore",{minScore:s})+o}}function e$(e,a){return a.perks.transparency?X(a.perks.transparency*(1-e.y/a.gameZoneHeight*1.2),0,1):0}var eQ={};if(eQ=k("kqXj6").getBundleURL("lzUSl")+"sw-b71.fa0f927a.js","serviceWorker"in navigator&&window.location.href.endsWith("/index.html?isPWA=true")){var e0=new URL(eQ);navigator.serviceWorker.register(e0)}var f=k("5mG9B"),M=k("6QuVk"),e1=document.getElementById("game"),e2=e1.getContext("2d",{alpha:!1}),e4=document.createElement("img");e4.src="data:image/svg+xml;base64,"+btoa(''),e4.onload=function(){return rj.needsRender=!0};var e3=document.createElement("img");e3.onload=function(){return rj.needsRender=!0};var e5=document.createElement("canvas"),e6=document.createElement("canvas"),e7=e6.getContext("2d",{alpha:!1});function e8(e,a,r,t,n,i,s){var _=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1;e.globalAlpha=_,r&&("#FF0000"==r?(e.strokeStyle="#FF0000",e.lineDashOffset=ac(a),e.lineWidth=2,e.setLineDash(au)):(e.strokeStyle="#FFFFFF",e.lineWidth=1),e.beginPath(),e.moveTo(t,n),e.lineTo(i,s),e.stroke(),"#FF0000"==r&&(e.setLineDash(al),e.lineWidth=1),e.globalAlpha=1)}var e9=document.createElement("canvas"),ae="",aa={};function ar(e,a,r,t,n){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s="ball"+a+"_"+r+"_"+i,_=Math.round(r);if(!aa[s]){var o=document.createElement("canvas");o.width=_,o.height=_;var l=o.getContext("2d");l.beginPath(),l.arc(_/2,_/2,Math.round(_/2)-1,0,2*Math.PI),l.fillStyle=a,l.fill(),i&&(l.lineWidth=2,l.strokeStyle=i,l.stroke()),aa[s]=o}e.drawImage(aa[s],Math.round(t-_/2),Math.round(n-_/2))}function at(e,a,r,t,n,i,s){var _=(Math.round(s/Math.PI*64)%32+32)%32,o="coin with halo_"+a+"_"+r+"_"+i+"_"+("#ffd300"===a?_:"whatever");if(!aa[o]){var l=document.createElement("canvas");l.width=r,l.height=r;var u=l.getContext("2d");u.beginPath(),u.arc(r/2,r/2,r/2,0,2*Math.PI),u.fillStyle=a,u.fill(),u.strokeStyle=i,"#FF0000"==i&&(u.lineWidth=2,u.setLineDash(au)),"transparent"===a&&(u.lineWidth=2),u.stroke(),"#ffd300"===a&&(u.beginPath(),u.arc(r/2,r/2,r/2*.6,0,2*Math.PI),u.fillStyle="rgba(255,255,255,0.5)",u.fill(),u.translate(r/2,r/2),u.rotate(_/16),u.translate(-r/2,-r/2),u.globalCompositeOperation="multiply",as(u,"$",a,r-2,r/2,r/2+1),as(u,"$",a,r-2,r/2,r/2+1)),aa[o]=l}e.drawImage(aa[o],Math.round(t-r/2),Math.round(n-r/2))}function an(e,a,r,t,n){var i="fuzzy-circle"+a+"_"+r;null==a||a.startsWith("#");var s=Math.round(3*r);if(!(!s||isNaN(s))){if(!aa[i]){var _=document.createElement("canvas");_.width=s,_.height=s;var o=_.getContext("2d"),l=o.createRadialGradient(s/2,s/2,0,s/2,s/2,s/2);l.addColorStop(0,a),l.addColorStop(.3,a+"88"),l.addColorStop(.6,a+"22"),l.addColorStop(1,"transparent"),o.fillStyle=l,o.fillRect(0,0,s,s),aa[i]=_}e.drawImage(aa[i],Math.round(t-s/2),Math.round(n-s/2))}}function ai(e,a,r,t,n){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6?arguments[6]:void 0,_=Math.ceil(t-e.brickWidth/2),o=Math.ceil(n-e.brickWidth/2),l=Math.ceil(t+e.brickWidth/2)-1,u=Math.ceil(n+e.brickWidth/2)-1,c=l-_,d=u-o,p="brick"+r+"__"+c+"_"+d+"_"+i+"_"+s+"_";if(!aa[p]){var m,g,b,h,v,k,y=document.createElement("canvas");y.width=c,y.height=d;var f=y.getContext("2d");f.fillStyle=r,f.setLineDash(-1!==i?au:al),f.lineDashOffset=i,f.strokeStyle=-1!==i&&"#FF000033"||r,f.lineJoin="round",f.lineWidth=4,m=f,g=2,b=2,h=c-4,v=d-4,k=2,m.beginPath(),m.moveTo(4,2),m.lineTo(g+h-k,b),m.quadraticCurveTo(g+h,b,g+h,b+k),m.lineTo(g+h,b+v-k),m.quadraticCurveTo(g+h,b+v,g+h-k,b+v),m.lineTo(g+k,b+v),m.quadraticCurveTo(g,b+v,g,b+v-k),m.lineTo(g,b+k),m.quadraticCurveTo(g,b,g+k,b),m.closePath(),s||f.fill(),f.stroke(),aa[p]=y}a.drawImage(aa[p],_,o,c,d)}function as(e,a,r,t,n,i){var s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],_="text"+a+"_"+r+"_"+t+"_"+s;if(!aa[_]){var o=document.createElement("canvas");o.width=t*a.length,o.height=t;var l=o.getContext("2d");l.fillStyle=r,l.textAlign=s?"left":"center",l.textBaseline="middle",l.font=t+"px monospace",l.fillText(a,s?0:o.width/2,o.height/2,o.width),aa[_]=o}e.drawImage(aa[_],s?n:Math.round(n-aa[_].width/2),Math.round(i-aa[_].height/2))}var a_=document.getElementById("score"),ao=document.getElementById("menuLabel"),al=[],au=[5,5];function ac(e){return ev("basic")?0:Math.floor(e.levelTime%500/500*10)%10}function ad(e,a){return e.perks.metamorphosis||ev("colorful_coins")||e.perks.hypnosis||e.perks.rainbow?a.color:"#ffd300"}var ap=null,am=!1,f=k("5mG9B"),M=k("6QuVk");function ag(){ev("record")&&(null==o?void 0:o.state)==="recording"&&(null==o||o.pause())}function ab(){ev("record")&&o&&(null==o||o.stop(),o=null)}var f=k("5mG9B"),M=k("6QuVk"),ah=0,av=null,ak=document.getElementById("popup"),ay=document.getElementById("close-modale");ay.addEventListener("click",function(e){e.preventDefault(),av&&av()}),ay.title=Y("play.close_modale_window_tooltip");var af=-1;function aW(e){return az.apply(this,arguments)}function az(){return(az=(0,f._)(function(e){var a,r,t,n,i,s,_;return(0,M.__generator)(this,function(o){return a=e.title,t=void 0===(r=e.content)?[]:r,i=void 0===(n=e.allowClose)||n,_=void 0===(s=e.className)?"":s,aw(1),[2,new Promise(function(e){var r,n=function(a){o||(o=!0,Array.prototype.forEach.call(s.querySelectorAll("button:not([disabled])"),function(e){return e.disabled=!0}),document.body.style.minHeight=document.body.scrollHeight+"px",setTimeout(function(){return document.body.style.minHeight=""},0),s.remove(),e(a))};ak.className=_,ay.style.display=i?"":"none";var s=document.createElement("div"),o=!1;if(av=i?function(){n(void 0)}:null,a){var l=document.createElement("h1");l.innerHTML=a,s.appendChild(l)}null==t||t.filter(function(e){return e}).forEach(function(e,a){if(e){if("string"==typeof e){var r,t,i=document.createElement("div");i.innerHTML=e,s.appendChild(i);return}(null===(r=s.lastChild)||void 0===r?void 0:r.nodeName)=="SECTION"?t=s.lastChild:((t=document.createElement("section")).className="actions",s.appendChild(t));var _=e.text,o=e.value,l=e.help,u=e.disabled,c=e.className,d=e.icon,p=e.tooltip,m=document.createElement("button");m.innerHTML="\n".concat(void 0===d?"":d,"\n\n ").concat(e.name,"\n ").concat(e.help(1),"\n
\n".concat(a,"
\n").concat(Y("gameOver.cumulative_total",{startTs:t,endTs:r}),"
\n "),{icon:ed["icon:new_run"],value:null,text:Y("confirmRestart.yes"),help:""},'',i,function(e){if(e.creative)return"";var a="",r="";try{var t=eg.map(function(e,a){var r;return{li:a,l:e,r:null===(r=eJ(a,aR,!1))||void 0===r?void 0:r.text}}).filter(function(e){return e.r});e.runStatistics.runTime=Math.round(e.runStatistics.runTime);var n=z({},e.perks);for(var i in n)n[i]||delete n[i];aR.push(w(z({},e.runStatistics),{perks:n,appVersion:ec}));var s=t.filter(function(e){var a=e.li;return!eJ(a,aR,!0)});s.length&&(a="\n\n\n ").concat(a.name,"\n ").concat(eq(a),"\n
\n".concat(Y("gameOver.stats_intro",{count:aR.length-1}),"
")+r)}catch(e){console.warn(e)}return a+r}(rj)]}).then(function(){return rA({levelToAvoid:eD(rj).name})})}}function aG(e){return e.creative?""+Y("gameOver.creative")+"
":""}var aR=[];try{aR=JSON.parse(localStorage.getItem("breakout_71_runs_history")||"[]").sort(function(e,a){return a.score-e.score}).slice(0,100)}catch(e){}var aT=0;function aC(e){var a=document.createElement("div");a.classList="toast",a.innerHTML=e;var r=1500+200*aT;a.style.animationDuration=r+"ms",a.style.top=40+50*aT+"px",document.body.appendChild(a),aT++,setTimeout(function(){a.remove(),aT--},r)}function aE(e,a){e.computer_controlled||(e.puckPosition=a,e.needsRender=!0)}function aj(e){aA(e);var a,r=1+((null===(a=e.perks)||void 0===a?void 0:a.multiball)||0),t=e.puckWidth/(r+1);e.balls=[],e.ballsColor="#FFFFFF",(e.perks.picky_eater||e.perks.pierce_color)&&(e.ballsColor=function(e){var a,r={};e.forEach(function(e){return r[e]=(r[e]||0)+1});var t=(a=Math).max.apply(a,B(Object.keys(r).map(function(e){return r[e]})));return eP(Object.keys(r).filter(function(e){return r[e]==t}))}(e.bricks.filter(function(e){return e}))||"#FFFFFF");for(var n=0;n".concat(Y("score_panel.close_to_unlock"),'
\n\n ").concat(s,"\n ").concat(null===(a=t.reason)||void 0===a?void 0:a.text,"\n
\n".concat(Y("level_up.before_buttons",{score:e.score-e.levelStartScore,catchGain:n,levelSpawnedCoins:e.levelSpawnedCoins,time:Math.round(e.levelTime/1e3),timeGain:t,levelMisses:e.levelMisses,missesGain:s,levelWallBounces:e.levelWallBounces,wallHitsGain:i,compliment:o}),"\n
\n").concat(Y("level_up.after_buttons",{level:e.currentLevel+1,max:ej(e)}),"
\n").concat(eH(e,e.currentLevel+1),"
\n")].concat(B(_),[eA(e),rd(e),''])}),{allowClose:!1}))];case 2:return"reroll"===(l=u.sent())?(r++,e.rerolls--):(e.perks[l]++,"instant_upgrade"===l&&(r+=2),e.runStatistics.upgrades_picked++),[3,1];case 3:return[2]}})})).apply(this,arguments)}function rk(e,a){return eT(rj,Math.floor(a/rj.brickWidth),Math.floor((e-rj.offsetX)/rj.brickWidth))}function ry(e){if(rj.bricks[e])return e}function rf(e,a,r){var t,n,i;return null!==(i=null!==(n=null!==(t=ry(rk(e-r,a-r)))&&void 0!==t?t:ry(rk(e+r,a-r)))&&void 0!==n?n:ry(rk(e+r,a+r)))&&void 0!==i?i:ry(rk(e-r,a+r))}window.addEventListener("resize",function(){return rh(rj)}),window.addEventListener("fullscreenchange",function(){return rh(rj)}),setInterval(function(){var e=window.innerWidth,a=window.innerHeight;(e!==rj.canvasWidth||a!==rj.canvasHeight)&&rh(rj)},1e3),e1.addEventListener("mouseup",function(e){0===e.button&&(rj.running?rb(!0):(rm(),ev("pointerLock")&&e1.requestPointerLock&&e1.requestPointerLock().then()))}),e1.addEventListener("mousemove",function(e){document.pointerLockElement===e1?aE(rj,rj.puckPosition+e.movementX):aE(rj,e.x)}),e1.addEventListener("touchstart",function(e){var a;e.preventDefault(),(null===(a=e.touches)||void 0===a?void 0:a.length)&&(aE(rj,e.touches[0].pageX),aA(rj),rm())}),e1.addEventListener("touchend",function(e){e.preventDefault(),rb(!0)}),e1.addEventListener("touchcancel",function(e){e.preventDefault(),rb(!0)}),e1.addEventListener("touchmove",function(e){var a;(null===(a=e.touches)||void 0===a?void 0:a.length)&&aE(rj,e.touches[0].pageX)});var rW=0,rz=60,rw=!1;setInterval(function(){if(rz=rW,rW=0,!H("auto_detected_performance",!1)&&rj.computer_controlled){var e=H("max_coins",1),a=200*Math.pow(2,e);console.log(a6(rj.coins)+" coins / "+a+" : "+rz+" FPS"),rw?rz<50&&a6(rj.coins)<1.5*a?(console.log("Saving previous settings"),D("max_coins",Math.max(0,H("max_coins",0)-1)),D("auto_detected_performance",!0)):a6(rj.coins)>.8*a&&(console.log("Raise the volume of coins"),D("max_coins",e+1),D("max_particles",e),D("breakout-settings-enable-basic",!1),D("breakout-settings-enable-extra_bright",!0),D("breakout-settings-enable-contrast",!0),rj.perks.base_combo=Math.floor(200*Math.pow(2,H("max_coins",1))/7)):(console.log("Starting the test"),D("max_coins",0),D("breakout-settings-enable-basic",!0),rw=!0),rj.combo=1e4,rj.perks.base_combo=Math.floor(1e4/7),rj.perks.viscosity=8}},1e3),setInterval(function(){rj.creative||(p||(p=eg.map(function(e,a){return z({name:e.name,li:a,l:e},eX(a))})),p.forEach(function(e){var a=e.name,r=e.minScore,t=e.forbidden,n=e.required;e.l,!(rp.has(a)||rj.score\n ").concat(e.name,"
\n ").concat(e.help(1),"\n
\n ").concat(e.name," \n
\n ").concat(Q(e.credit||""),"\n\n Made in France by Renan LE CARO. \n Donate\n Discord\n F-Droid\n Google Play\n itch.io \n Gitlab\n Web version\n HackerNews\n Privacy Policy\n Archives\n v.'.concat(ec,"\n
")]),allowClose:!0})];case 1:return(a=r.sent())&&(a(),rj.needsRender=!0),[2]}})})).apply(this,arguments)}function rM(){return rq.apply(this,arguments)}function rq(){return(rq=(0,f._)(function(){var e,a,r,t,n,i,s,_,o;return(0,M.__generator)(this,function(l){switch(l.label){case 0:rb(!0),(a=[{disabled:ev("easy"),icon:ed["icon:starting_perks"],text:Y("starting_perks.title"),help:Y("starting_perks.help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return[4,rr()];case 1:return e.sent(),[2]}})})()}}]).push({icon:ed[null===(e=Z.find(function(e){return e.value===K()}))||void 0===e?void 0:e.levelName],text:Y("settings.language"),help:Y("settings.language_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){switch(r.label){case 0:return[4,aW({title:Y("settings.language"),content:[Y("settings.language_help")].concat(B(Z.map(function(e){return w(z({},e),{icon:ed[e.levelName]})}))),allowClose:!0})];case 1:if(!(a=(e=r.sent())&&e!==K()))return[3,3];return[4,rG(rj)];case 2:a=r.sent(),r.label=3;case 3:return a&&(D("lang",e),window.location.reload()),[2]}})})()}}),r=!0,t=!1,n=void 0;try{for(i=function(){var e=_.value;eh[e]&&a.push({icon:ev(e)?ed["icon:checkmark_checked"]:ed["icon:checkmark_unchecked"],text:eh[e].name,help:eh[e].help,value:function(){ek(e),rh(rj),rP(),rM()}})},s=Object.keys(eh)[Symbol.iterator]();!(r=(_=s.next()).done);r=!0)i()}catch(e){t=!0,n=e}finally{try{r||null==s.return||s.return()}finally{if(t)throw n}}return a.push({icon:ed["icon:download"],text:Y("settings.download_save_file"),help:Y("settings.download_save_file_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){return e=rs(),(a=document.createElement("a")).setAttribute("href","data:application/json;base64,"+btoa(JSON.stringify({fileType:"B71-save-file",appVersion:ec,signedPayload:e,key:ei("Security by obscurity, but really the game is oss so eh"+e)}))),a.setAttribute("download","b71-save-"+new Date().toISOString().slice(0,19).replace(/[^0-9]+/gi,"-")+".b71"),document.body.appendChild(a),a.click(),setTimeout(function(){return document.body.removeChild(a)},1e3),[2]})})()}}),a.push({icon:ed["icon:upload"],text:Y("settings.load_save_file"),help:Y("settings.load_save_file_help"),value:function(){return(0,f._)(function(){var e,a;return(0,M.__generator)(this,function(r){if(!document.getElementById("save_file_picker")){var t;(a=document.createElement("input")).setAttribute("type","file"),a.setAttribute("id","save_file_picker"),a.setAttribute("accept",".b71,.json"),a.style.position="absolute",a.style.left="-1000px",a.addEventListener("change",(t=(0,f._)(function(e){var r,t,n,i,s,_,o,l;return(0,M.__generator)(this,function(e){switch(e.label){case 0:if(e.trys.push([0,4,,6]),!(t=a&&(null===(r=a.files)||void 0===r?void 0:r.item(0))))return[3,3];return[4,new Promise(function(e,a){var r=new FileReader;r.onload=function(){var a;e((null===(a=r.result)||void 0===a?void 0:a.toString())||"")},r.onerror=function(){a(r.error)},r.readAsText(t)})];case 1:if(i=(n=JSON.parse(e.sent())).fileType,n.appVersion,s=n.signedPayload,_=n.key,"B71-save-file"!==i)throw Error("Not a B71 save file");if(_!==ei("Security by obscurity, but really the game is oss so eh"+s))throw Error("Key does not match content.");for(var u in o=JSON.parse(s),localStorage.clear(),o)localStorage.setItem(u,o[u]);return[4,aW({title:Y("settings.save_file_loaded"),content:[Y("settings.save_file_loaded_help"),{text:Y("settings.save_file_loaded_ok")}]})];case 2:e.sent(),window.location.reload(),e.label=3;case 3:return[3,6];case 4:return l=e.sent(),[4,aW({title:Y("settings.save_file_error"),content:[l.message,{text:Y("settings.save_file_loaded_ok")}]})];case 5:return e.sent(),[3,6];case 6:return a.value="",[2]}})}),function(e){return t.apply(this,arguments)})),document.body.appendChild(a)}return null===(e=document.getElementById("save_file_picker"))||void 0===e||e.click(),[2]})})()}}),a.push({icon:ed["icon:coins"],text:Y("settings.max_coins",{max:I()}),help:Y("settings.max_coins_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return D("max_coins",(H("max_coins",1)+1)%6),[4,rM()];case 1:return e.sent(),[2]}})})()}}),a.push({icon:ed["icon:particles"],text:Y("settings.max_particles",{max:V()}),help:Y("settings.max_particles_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return D("max_particles",(H("max_particles",1)+1)%6),[4,rM()];case 1:return e.sent(),[2]}})})()}}),a.push({icon:ed["icon:reset"],text:Y("settings.reset"),help:Y("settings.reset_help"),value:function(){return(0,f._)(function(){return(0,M.__generator)(this,function(e){switch(e.label){case 0:return[4,aW({title:Y("settings.reset"),content:[Y("settings.reset_instruction"),{text:Y("settings.reset_confirm"),value:!0},{text:Y("settings.reset_cancel"),value:!1}],allowClose:!0})];case 1:return e.sent()&&(localStorage.clear(),window.location.reload()),[2]}})})()}}),[4,aW({title:Y("main_menu.settings_title"),content:[Y("main_menu.settings_help")].concat(B(a)),allowClose:!0,className:"settings"})];case 1:return(o=l.sent())&&(o(),rj.needsRender=!0),[2]}})})).apply(this,arguments)}function rP(){return rO.apply(this,arguments)}function rO(){return(rO=(0,f._)(function(){var e;return(0,M.__generator)(this,function(a){switch(a.label){case 0:if(a.trys.push([0,10,,11]),!(document.fullscreenEnabled||document.webkitFullscreenEnabled))return[2,!1];if(!(null!==document.fullscreenElement&&!ev("fullscreen")))return[3,5];if(!document.exitFullscreen)return[3,2];return[4,document.exitFullscreen()];case 1:case 3:case 6:case 8:return a.sent(),[2,!0];case 2:if(!document.webkitCancelFullScreen)return[3,4];return[4,document.webkitCancelFullScreen()];case 4:return[3,9];case 5:if(!(ev("fullscreen")&&!document.fullscreenElement))return[3,9];if(!(e=document.documentElement).requestFullscreen)return[3,7];return[4,e.requestFullscreen()];case 7:if(!e.webkitRequestFullscreen)return[3,9];return[4,e.webkitRequestFullscreen()];case 9:return[3,11];case 10:return console.warn(a.sent()),[3,11];case 11:return[2,!1]}})})).apply(this,arguments)}function rL(){return(rL=(0,f._)(function(){var e,a,r,t,n,i;return(0,M.__generator)(this,function(s){switch(s.label){case 0:return e=F(),a=ev("mobile-mode")?"help":"tooltip",r=eb.sort(function(e,a){return e.threshold-a.threshold}).map(function(r){var t=r.name,n=r.id,i=r.threshold,s=r.icon,_=r.help;return W({text:t,disabled:e'):"";return W({text:e.name+i,disabled:!!n,value:{level:e},icon:ed[e.name]},a,(null==n?void 0:n.text)||eq(e))}),[4,aW({title:Y("unlocks.title_upgrades",{unlocked:r.filter(function(e){return!e.disabled}).length,out_of:r.length}),content:["".concat(Y("unlocks.intro",{ts:e}),"\n ").concat(r.find(function(e){return e.disabled})?Y("unlocks.greyed_out_help"):"","
")].concat(B(r),[Y("unlocks.level",{unlocked:n.filter(function(e){return!e.disabled}).length,out_of:n.length})],B(n)),allowClose:!0,className:ev("mobile-mode")?"":"actionsAsGrid"})];case 1:if(!(i=s.sent()))return[3,3];return[4,rG(rj)];case 2:s.sent()&&rA(z({},i)),s.label=3;case 3:return[2]}})})).apply(this,arguments)}function rG(e){return rR.apply(this,arguments)}function rR(){return(rR=(0,f._)(function(e){return(0,M.__generator)(this,function(a){return!e.currentLevel||ah?[2,!0]:(rb(!0),[2,aW({title:Y("confirmRestart.title"),content:[Y("confirmRestart.text"),{value:!0,text:Y("confirmRestart.yes")},{value:!1,text:Y("confirmRestart.no")}]})])})})).apply(this,arguments)}var rT={ArrowLeft:0,ArrowRight:0,Shift:0};function rC(e,a){rT[e]=a,rj.keyboardPuckSpeed=(rT.ArrowRight-rT.ArrowLeft)*(1+2*rT.Shift)*rj.gameZoneWidth/50}document.addEventListener("keydown",(r=(0,f._)(function(e){return(0,M.__generator)(this,function(a){return"f"!==e.key.toLowerCase()||e.ctrlKey||e.metaKey?e.key in rT&&rC(e.key,1):(ek("fullscreen"),rP())," "!==e.key||ah||(rj.running?rb(!0):rm(),e.preventDefault()),[2]})}),function(e){return r.apply(this,arguments)}));var rE=new Date;document.addEventListener("keyup",(t=(0,f._)(function(e){var a,r,t,n,i;return(0,M.__generator)(this,function(s){switch(s.label){case 0:if(i=document.querySelector("button:focus"),!(e.key in rT))return[3,1];return rC(e.key,0),[3,10];case 1:if("ArrowDown"!==e.key||(null==i?void 0:null===(a=i.nextElementSibling)||void 0===a?void 0:a.tagName)!=="BUTTON")return[3,2];return null==i||null===(r=i.nextElementSibling)||void 0===r||r.focus(),[3,10];case 2:if("ArrowUp"!==e.key||(null==i?void 0:null===(t=i.previousElementSibling)||void 0===t?void 0:t.tagName)!=="BUTTON")return[3,3];return null==i||null===(n=i.previousElementSibling)||void 0===n||n.focus(),[3,10];case 3:if(!("Escape"===e.key&&av))return[3,4];return av(),[3,10];case 4:if(!("Escape"===e.key&&rj.running))return[3,5];return rb(!0),[3,10];case 5:if(!("m"===e.key.toLowerCase()&&!ah))return[3,6];return rx().then(),[3,10];case 6:if(!("s"===e.key.toLowerCase()&&!ah))return[3,7];return ru(rj).then(),[3,10];case 7:if(!("r"===e.key.toLowerCase()&&!ah&&rE