\n ").concat(a.name,"\n ").concat(a.help(Math.max(1,e.perks[a.id])),"\n
\n ").concat(t.reverse().join(""),"\n".concat($("score_panel.upgrades_picked"),"
")+a.join("")}function eI(e,a){if(!e.perks.clairvoyant||e.creative)return"";for(var r="",t=0;t".concat($("score_panel.upcoming_levels"),"
").concat(r,"
")}function eV(e){return e.level}function eZ(e){return -1!==e.bricks.indexOf(e.ballsColor)}function eN(e){if(!e.perks.reach)return -1;for(var a=e.level.size,r=-1,t=-1,n=-1,i=0;i0&&Q(1-a.y/e.gameZoneHeight*1.1+.1,0,1)||0}function eY(e,a){return Math.pow(e.x-a.x,2)+Math.pow(e.y-a.y,2)}function eX(e,a){return Math.sqrt(eY(e,a))}function eJ(e){return!!(e.lastPuckMove&&e.perks.passive_income&&e.lastPuckMove>e.levelTime-250*e.perks.passive_income)}function e$(){try{return parseInt(localStorage.getItem("breakout-3-hs-short")||"0")}catch(e){}return 0}function eQ(e){var a=[],r=[],t=Math.max(-1e3+100*e,0);if(e>20){var n=ei.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"]),ei.forEach(function(e){e.requires&&_.add(e.requires)})),!_.has(a)}).sort(function(a,r){return eo(e+a.id)-eo(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 e0(e,a,r){var t=eQ(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(M(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?$("unlocks.reached",{reached:_}):"";return _>=s?null:n.length||i.length?{reached:_,minScore:s,text:$("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:$("unlocks.minScore",{minScore:s})+o}}function e1(e,a){return a.perks.transparency?Q(a.perks.transparency*(1-e.y/a.gameZoneHeight*1.2),0,1):0}function e2(e,a){return e.perks.metamorphosis||ef("colorful_coins")||e.perks.hypnosis||e.perks.rainbow?a.color:"#ffd300"}function e4(e){return(e.levelTime?e.perks.corner_shot*e.brickWidth:0)-e.perks.unbounded*e.brickWidth}var e3={};if(e3=y("kqXj6").getBundleURL("lgcGd")+"sw-b71.6426148f.js","serviceWorker"in navigator&&window.location.href.endsWith("/index.html?isPWA=true")){var e5=new URL(e3);navigator.serviceWorker.register(e5)}var W=y("5mG9B"),q=y("6QuVk"),e6=document.getElementById("game"),e7=e6.getContext("2d",{alpha:!1}),e8=document.createElement("img");e8.src="data:image/svg+xml;base64,"+btoa(''),e8.onload=function(){return rY.needsRender=!0};var e9=document.createElement("img");e9.onload=function(){return rY.needsRender=!0};var ae=document.createElement("canvas"),aa=document.createElement("canvas"),ar=aa.getContext("2d",{alpha:!1});function at(){return 16*(ef("precise_lighting")?1:2)}var an=0;function ai(e,a,r,t,n,i,s){var _=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1;t=Math.round(t),n=Math.round(n),i=Math.round(i),s=Math.round(s),e.globalAlpha=_,r&&(e.strokeStyle=r,"#FF0000"==r?(e.lineDashOffset=av(a),e.lineWidth=2,e.setLineDash(ah)):e.lineWidth=1,e.beginPath(),e.moveTo(t,n),e.lineTo(i,s),e.stroke(),"#FF0000"==r&&(e.setLineDash(ab),e.lineWidth=1),e.globalAlpha=1)}var as=document.createElement("canvas"),a_="",ao={};function al(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(!ao[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()),ao[s]=o}e.drawImage(ao[s],Math.round(t-_/2),Math.round(n-_/2))}function au(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(!ao[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(ah)),"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",ap(u,"$",a,r-2,r/2,r/2+1),ap(u,"$",a,r-2,r/2,r/2+1)),ao[o]=l}e.drawImage(ao[o],Math.round(t-r/2),Math.round(n-r/2))}function ac(e,a,r,t,n){var i="fuzzy-circle"+a+"_"+(r=Math.max(r,2));null==a||a.startsWith("#");var s=Math.round(3*r);if(!(!s||isNaN(s))){if(!ao[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),ao[i]=_}e.drawImage(ao[i],Math.round(t-s/2),Math.round(n-s/2))}}function ad(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(!ao[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?ah:ab),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(),ao[p]=y}a.drawImage(ao[p],_,o,c,d)}function ap(e,a,r,t,n,i){var s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],_="text"+a+"_"+r+"_"+t+"_"+s;if(!ao[_]){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),ao[_]=o}e.drawImage(ao[_],s?n:Math.round(n-ao[_].width/2),Math.round(i-ao[_].height/2))}var am=document.getElementById("score"),ag=document.getElementById("menuLabel"),ab=[],ah=[5,5];function av(e){return ef("basic")?0:Math.floor(e.levelTime%500/500*10)%10}var ak=null,ay=!1,W=y("5mG9B"),q=y("6QuVk");function af(){ef("record")&&(null==o?void 0:o.state)==="recording"&&(null==o||o.pause())}function aW(){ef("record")&&o&&(null==o||o.stop(),o=null)}var W=y("5mG9B"),q=y("6QuVk"),az=0,aw=null,aS=document.getElementById("popup"),ax=document.getElementById("close-modale");ax.addEventListener("click",function(e){e.preventDefault(),aw&&aw()}),ax.title=$("play.close_modale_window_tooltip");var aB=-1;function aM(e){return aq.apply(this,arguments)}function aq(){return(aq=(0,W._)(function(e){var a,r,t,n,i,s,_;return(0,q.__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,aP(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))};aS.className=_,ax.style.display=i?"":"none";var s=document.createElement("div"),o=!1;if(aw=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($("gameOver.cumulative_total",{startTs:n,endTs:t}),"
\n "),{icon:eg["icon:new_run"],value:null,text:$("confirmRestart.yes"),help:""},'',s,function(e){if(e.creative)return"";var a="",r="";try{var t=ev.map(function(e,a){var r;return{li:a,l:e,r:null===(r=e0(a,aF,!1))||void 0===r?void 0:r.text}}).filter(function(e){return e.r});e.runStatistics.runTime=Math.round(e.runStatistics.runTime);var n=w({},e.perks);for(var i in n)n[i]||delete n[i];aF.push(S(w({},e.runStatistics),{perks:n,appVersion:em}));var s=t.filter(function(e){var a=e.li;return!e0(a,aF,!0)});s.length&&(a="\n\n\n ").concat(a.name,"\n ").concat(eL(a),"\n
\n".concat($("gameOver.stats_intro",{count:aF.length-1}),"
")+r)}catch(e){console.warn(e)}return a+r}(rY)]}).then(function(){return rX({levelToAvoid:eV(rY).name})})}}function aD(e){return e.creative?""+$("gameOver.creative")+"
":""}var aF=[];try{aF=JSON.parse(localStorage.getItem("breakout_71_runs_history")||"[]").sort(function(e,a){return a.score-e.score}).slice(0,100)}catch(e){}var aI=document.createElement("div");function aV(e){aI.classList="toast visible",aI.innerHTML=e,p&&clearTimeout(p),p=setTimeout(function(){p=void 0,aI.classList="hidden toast"},1500)}function aZ(e,a){e.startParams.computer_controlled||(e.puckPosition=a,e.needsRender=!0)}function aN(e){aU(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,M(Object.keys(r).map(function(e){return r[e]})));return eR(Object.keys(r).filter(function(e){return r[e]==t}))}(e.bricks.filter(function(e){return e}))||"#FFFFFF");for(var n=0;n".concat($("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($("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($("level_up.after_buttons",{level:e.currentLevel+1,max:eD(e)}),"
\n").concat(eI(e,e.currentLevel+1),"
\n")].concat(M(_),[eF(e),rk(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 rx(e,a){return eE(rY,Math.floor(a/rY.brickWidth),Math.floor((e-rY.offsetX)/rY.brickWidth))}function rB(e){if(rY.bricks[e])return e}function rM(e,a,r){var t,n,i;return null!==(i=null!==(n=null!==(t=rB(rx(e-r,a-r)))&&void 0!==t?t:rB(rx(e+r,a-r)))&&void 0!==n?n:rB(rx(e+r,a+r)))&&void 0!==i?i:rB(rx(e-r,a+r))}window.addEventListener("resize",function(){return rw(rY)}),window.addEventListener("fullscreenchange",function(){return rw(rY)}),setInterval(function(){var e=window.innerWidth,a=window.innerHeight;(e!==rY.canvasWidth||a!==rY.canvasHeight)&&rw(rY)},1e3),e6.addEventListener("mouseup",function(e){0===e.button&&(rY.running?rz(!0):(rf(),ef("pointerLock")&&e6.requestPointerLock&&e6.requestPointerLock().then()))}),e6.addEventListener("mousemove",function(e){document.pointerLockElement===e6?aZ(rY,rY.puckPosition+e.movementX):aZ(rY,e.x)}),e6.addEventListener("touchstart",function(e){var a;e.preventDefault(),(null===(a=e.touches)||void 0===a?void 0:a.length)&&(aZ(rY,e.touches[0].pageX),aU(rY),rf())}),e6.addEventListener("touchend",function(e){e.preventDefault(),rz(!0)}),e6.addEventListener("touchcancel",function(e){e.preventDefault(),rz(!0)}),e6.addEventListener("touchmove",function(e){var a;(null===(a=e.touches)||void 0===a?void 0:a.length)&&aZ(rY,e.touches[0].pageX)});var rq=0,rP=60;setInterval(function(){rP=rq,rq=0},1e3);var rO=document.getElementById("stats"),rL={},rR=performance.now(),rG="idle";function rC(e){if(rY.startParams.stress){var a=performance.now();rG&&(rL[rG]=(rL[rG]||0)+(a-rR)),rR=a,rG=e}}setInterval(function(){if(!rY.startParams.stress){rO.style.display="none";return}rO.style.display="block";var e=eG(rL);rO.innerHTML="\n