1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[26],{"2SDt":function(e,t){e.exports={srcSet:"/_next/static/images/error404-200-30f3ec5470cdac1a5b88539cb9187461.jpg 200w",images:[{path:"/_next/static/images/error404-200-30f3ec5470cdac1a5b88539cb9187461.jpg",width:200,height:200}],src:"/_next/static/images/error404-200-30f3ec5470cdac1a5b88539cb9187461.jpg",toString:function(){return"/_next/static/images/error404-200-30f3ec5470cdac1a5b88539cb9187461.jpg"},placeholder:void 0,width:200,height:200}},hVsB:function(e,t){e.exports={srcSet:"/_next/static/images/plover-27-b31363576747626b47ad61eb488f9e9f.png 27w",images:[{path:"/_next/static/images/plover-27-b31363576747626b47ad61eb488f9e9f.png",width:27,height:27}],src:"/_next/static/images/plover-27-b31363576747626b47ad61eb488f9e9f.png",toString:function(){return"/_next/static/images/plover-27-b31363576747626b47ad61eb488f9e9f.png"},placeholder:void 0,width:27,height:27}},nLOn:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/history/[...userRaceID]",function(){return r("nVQN")}])},nVQN:function(e,t,r){"use strict";r.r(t),r.d(t,"__N_SSP",(function(){return me}));var c=r("rePB"),n=r("o0o1"),a=r.n(n),s=r("HaE+"),o=r("KQm4"),l=r("ODXe"),i=r("nKUr"),u=r("MX0m"),d=r.n(u),m=r("q1tI"),g=r.n(m),p=r("nOHt"),h=r("CafY"),j=r("xJ5V"),x=r("vDqi"),b=r.n(x),f=r("8Kt/"),k=r.n(f),y=r("YFqc"),v=r.n(y),O=r("x2Si"),w=r("waOm"),T=r("UkKX"),N=r("FGyW"),B=r("aIN1"),I=r("je4i"),C=r.n(I),S=r("uNx/"),L=r("kWi6"),P=r("ujeT"),E=r("hf6B"),W=r("/0Lw"),R=r("mblX"),M=r("WMS+"),V=r("2qzJ"),F=r("pI+A"),D=r("MkHO"),q=r("hVsB"),_=r("U+D9"),G=r("0qjv"),H=r("K3Sa"),A=r("kdYF"),Y=r("f0lI"),U=r("NOX6"),K=r("fm9w"),X=r("GkSl"),z=r("loyS"),J=r("kHFq"),Q=r("69Jj"),Z=r("9Ujb"),$=r("P+tW"),ee=r("sT/F"),te=r("/h0r"),re=r("lBgm"),ce=r("zhrZ"),ne=r("8Nh1"),ae=["Basic","BlueBasic","GreenBasic","OrangeBasic","RedBasic","PurpleBasic","PinkBasic","Fairy","Crystal","Flamey","Electric","Veiny","Wavey","Tiger","RedPolygon","Abstract","Artisitic","Wood","Parquet"],se=0,oe=0,le=0,ie=!1,ue=0,de=0;var me=!0;t.default=function(e){var t,r=e.socket,n=e.notFound,u=e.trackInfo,x=e.OtherUserPlayback,f=e.raceInformation,y=e.userInfo,I=(e.p,Object(p.useRouter)());if(n)return Object(i.jsx)(S.default,{type:"race history (".concat(I.query.userRaceID[0],")")});var me=Object(m.useContext)(j.a).user,ge=Object(P.a)(),pe=Object(l.a)(ge,1)[0],he=Object(m.useState)([y]),je=he[0],xe=he[1],be=Object(m.useContext)(E.a).setLatestRacesScore,fe=Object(m.useRef)(),ke=Object(m.useRef)({value:!1,arr:[]}),ye=Object(m.useState)(u.wordBlocks),ve=ye[0],Oe=(ye[1],Object(m.useState)(10)),we=Oe[0],Te=Oe[1],Ne=Object(m.useState)(!1),Be=Ne[0],Ie=Ne[1],Ce=Object(m.useRef)({typingCalculator:null,restartStopwatchInterval:null,filledStopwatch:null,replayTyping1:null,replayTyping2:!1,replayTypingChars:[],customTimed:null,customTimed2:null,practiceNewQuoteTimeout:null,beforeTypingCalculations:null}),Se=Object(m.useState)(null),Le=Se[0],Pe=Se[1],Ee=Object(m.useRef)([]),We=Object(m.useRef)(),Re=Object(m.useState)("correctColor"),Me=Re[0],Ve=Re[1],Fe=Object(m.useState)("withCursor"),De=Fe[0],qe=Fe[1],_e=Object(m.useState)("withRedBackground"),Ge=_e[0],He=_e[1],Ae=Object(m.useState)("noSteno"),Ye=Ae[0],Ue=Ae[1],Ke=Object(m.useState)("yesSmooth"),Xe=Ke[0],ze=Ke[1],Je=Object(m.useState)(100),Qe=Je[0],Ze=Je[1],$e=Object(m.useState)("yesBlink"),et=$e[0],tt=$e[1],rt=Object(m.useRef)(0),ct=Object(m.useRef)({startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:0,allCharacters:0,incorrectCharacters:0,indexTrackingBlocks:0,oldPlayback:0,lastWordblockIndexForGraph:0,graphSpeed:[]}),nt=Object(m.useRef)({accumulatingCharacters:0,indexTrackingBlocks:0,trackValue:0}),at=Object(m.useRef)(),st=Object(m.useState)(!1),ot=st[0],lt=st[1],it=Object(m.useRef)({}),ut=Object(m.useRef)(null),dt=Object(m.useState)([]),mt=dt[0],gt=dt[1],pt=Object(m.useRef)({}),ht=Object(m.useState)({}),jt=ht[0],xt=ht[1];function bt(){Ce.current.restartStopwatchInterval&&clearInterval(Ce.current.restartStopwatchInterval),Ce.current.typingCalculator&&clearInterval(Ce.current.typingCalculator),Ce.current.replayTyping1&&clearTimeout(Ce.current.replayTyping1),Ce.current.customTimed&&clearInterval(Ce.current.customTimed),Ce.current.customTimed2&&clearTimeout(Ce.current.customTimed2),Ce.current.replayTyping2&&clearTimeout(Ce.current.replayTyping2),Ce.current.filledStopwatch&&clearTimeout(Ce.current.filledStopwatch),Ce.current.replayTypingChars&&Ce.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),function(){var e=document.getElementById("steno");e&&(e.style.display="block");document.getElementById("biggerWrapperStopwatch").classList.remove("gone"),document.getElementById("stopper").classList.remove("fadeIn"),window.innerWidth<720&&(document.getElementById("trackTextWrapper").style.whiteSpace="nowrap");var t=document.querySelector(".placeWon");t&&t.classList.remove("finished");var r=document.getElementsByClassName("placeWon")[1];r&&r.classList.remove("finished");fe.current.style.display="unset",fe.current.value="",fe.current.placeholder="Get ready to type the quote above",fe.current.disabled=!0,document.getElementById("filledStopwatch").style.animation="unset","withCursor"===De&&Ee.current[0]&&(We.current.classList.remove("gone"),ft());Object(o.a)(Ee.current).forEach((function(e){e.classList.remove(Me),e.classList.remove("wrong"),e.classList.remove("bottomBorder")})),it.current={},ut.current=null,Ie(!1);var c=document.querySelector(".currentTrack"),n=document.querySelector(".speedNow"),a=document.querySelector(".beforeTrackIndicator");c&&(c.style.left=Ot(je[0].trackstyle),a.style.width="0%",n.innerHTML="0 wpm");var s=document.getElementsByClassName("currentTrack")[1],l=document.getElementsByClassName("speedNow")[1],i=document.getElementsByClassName("beforeTrackIndicator")[1];s&&(s.style.left=Ot(je[0].trackstyle),i.style.width="0%",l.innerHTML="0 wpm");if(ke.current.value=!1,ke.current.arr=[],ct.current={startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:0,allCharacters:0,incorrectCharacters:0,indexTrackingBlocks:0,oldPlayback:0,lastWordblockIndexForGraph:0,graphSpeed:[]},nt.current={indexTrackingBlocks:0,accumulatingCharacters:0,trackValue:0},"yesSteno"===Ye){var d=u.stenoStrokes.slice(ct.current.indexTrackingBlocks,ct.current.indexTrackingBlocks+4);gt(d)}se=0,oe=0,ie=!1,ue=0,de=0}();var e=5;Te(e),Ce.current.filledStopwatch=setTimeout((function(){return document.getElementById("filledStopwatch").style.animation="trafficlight ".concat(e,"s forwards linear")})),Ce.current.restartStopwatchInterval=setInterval((function(){if(1===e){if(fe.current.disabled=!1,fe.current.focus(),fe.current.setSelectionRange(0,9999),document.getElementById("biggerWrapperStopwatch").classList.add("gone"),document.getElementById("stopper").classList.add("fadeIn"),ct.current.indexTrackingBlocks>0&&2===je.length)return alert("you fkn hacker nab, the race didn't start"),void Ct();Ce.current.beforeTypingCalculations=setTimeout((function(){kt(),Tt.challengeCompetitor()}),70),fe.current.placeholder="",clearInterval(Ce.current.restartStopwatchInterval)}e--,Te(e)}),1e3)}Object(m.useEffect)((function(){if(Object.keys(jt).length>0){var e=Object.keys(jt)[0],t=Object.values(jt)[0];"styleOfText"===e&&Ve(t),"wantsCursor"===e&&qe(t),"wantsRedBackgroundInput"===e&&He(t)}}),[jt]),Object(m.useEffect)((function(){return localStorage.getItem("styleText")&&Ve(localStorage.getItem("styleText")),localStorage.getItem("cursor")&&qe(localStorage.getItem("cursor")),localStorage.getItem("input")&&He(localStorage.getItem("input")),localStorage.getItem("steno")&&Ue(localStorage.getItem("steno")),function(){pt.current={isDarkTheme:document.documentElement.classList.contains("Dark"),textColor:!!localStorage.getItem("textColor"),textBackgroundColor:!!localStorage.getItem("textBackgroundColor"),layoutColor:!!localStorage.getItem("layoutColor"),outerBackgroundColor:!!localStorage.getItem("backgroundColor"),inputColor:!!localStorage.getItem("inputColor"),backgroundImage:localStorage.getItem("backgroundImage")?localStorage.getItem("backgroundImage"):"",backgroundBlurness:localStorage.getItem("backgroundBlurness")?localStorage.getItem("backgroundBlurness"):0,smoothCursor:!localStorage.getItem("smoothCursor"),smoothnessSpeed:localStorage.getItem("smoothnessSpeed")?localStorage.getItem("smoothnessSpeed"):100,blinkCursor:!localStorage.getItem("blinkCursor"),font:localStorage.getItem("font")?localStorage.getItem("font"):"Montserrat"};var e=localStorage.getItem("smoothnessSpeed");e&&Ze(+e);var t=localStorage.getItem("textColor");t&&(document.getElementById("trackTextWrapper").style.color=t);
1var r=localStorage.getItem("textBackgroundColor");r&&(document.getElementById("trackTextWrapper").style.backgroundColor=r);var c=localStorage.getItem("layoutColor");c&&(document.querySelector(".wrapperRace").style.backgroundColor=c);var n=localStorage.getItem("backgroundColor");n&&(document.querySelector(".didntFinishRace").style.backgroundColor=n);var a=localStorage.getItem("inputColor");a&&(document.getElementById("userInputTrack").style.color=a);var s=localStorage.getItem("font");if(s){var o=s.replace(/\s/g,"");document.getElementById("trackTextWrapper").classList.add(o),/RobotoMono|CourierNew|Consolas/.test(o)&&(rt.current=-4)}var l=localStorage.getItem("backgroundImage");l&&(document.getElementById("backgroundImageTheme").style.backgroundImage="url('".concat(l,"')"));var i=localStorage.getItem("backgroundBlurness");i&&(document.getElementById("backgroundImageTheme").style.filter="blur(".concat(i,"px)"));var u=localStorage.getItem("smoothCursor");u&&ze(u);var d=localStorage.getItem("blinkCursor");d&&tt(d)}(),pe(r),function(){r.off()}}),[]),Object(m.useEffect)((function(){if(2===je.length&&(void 0!==document.getElementsByClassName("racersName")[1]&&(document.getElementsByClassName("racersName")[1].style.fontWeight="bold"),bt()),1===je.length){var e=document.getElementById("steno");e&&(e.style.display="none")}return function(){ie=!1,ue=0,le=0,clearInterval(Ce.current.restartStopwatchInterval),clearInterval(Ce.current.typingCalculator),clearInterval(Ce.current.restartStopwatchInterval),clearInterval(Ce.current.customTimed),clearTimeout(Ce.current.beforeTypingCalculations),clearTimeout(Ce.current.customTimed2),clearTimeout(Ce.current.replayTyping1),clearTimeout(Ce.current.replayTyping2),clearTimeout(Ce.current.filledStopwatch),clearTimeout(Ce.current.practiceNewQuoteTimeout),Ce.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)}))}}),[je]),Object(m.useEffect)((function(){Be||("withoutCursor"===De&&We.current&&We.current.classList.add("gone"),Ee.current=document.getElementsByClassName("lettersTrack"))}),[ve]),Object(m.useEffect)((function(){if(Be){We.current&&We.current.classList.add("gone");var e=document.getElementsByClassName("wrapperScores");0!==e.length&&e[0].classList.add("opened")}}),[Be]),Object(m.useEffect)((function(){if(0!==ct.current.indexTrackingBlocks){var e=document.getElementById("steno");e&&(e.children[0].classList.add("correct"),e.children[1].classList.add("correct"),e.children[2].classList.add("correct"))}}),[mt]);var ft=function(){We.current.animate([{top:Ee.current[0].offsetTop-6+"px",left:Ee.current[0].offsetLeft+rt.current-5+"px"}],{fill:"forwards",duration:"yesSmooth"===Xe?Qe:0})},kt=function(e,t){var r=0;e?r=t:ct.current.startTime=Date.now();var c=document.getElementById("minutes"),n=document.getElementById("seconds");Ce.current.typingCalculator=setInterval((function(){if(ct.current.endTime=Date.now(),!e){var t=u.wordBlocks.slice(ct.current.lastWordblockIndexForGraph,ct.current.indexTrackingBlocks);0!==t.length&&ct.current.graphSpeed.push({wordblocks:t,speed:ct.current.grossWPM,time:r}),ct.current.lastWordblockIndexForGraph=ct.current.indexTrackingBlocks}if((r+=.5)%1===0){var s=Math.floor(r/60),o=r%60;c.innerText=a(s),n.innerText=a(o)}var l=ie?16667e-9*(ct.current.endTime-ct.current.startTimePlayback):16667e-9*(ct.current.endTime-ct.current.startTime),i=Math.round(oe/5/l);isNaN(i)&&(i=0),ct.current.grossWPM=i;var d=0===ct.current.trackValue?Ot(je[0].trackstyle):"calc(".concat(ct.current.trackValue,"% - 15px)");1===je.length&&yt({speed:ct.current.grossWPM,trackValue:d,personalPosition:0}),2===je.length&&yt({speed:ct.current.grossWPM,trackValue:d,personalPosition:1})}),500);var a=function(e){return e<10?"0"+e:e}};function yt(e){var t=document.getElementsByClassName("currentTrack")[e.personalPosition],r=document.getElementsByClassName("speedNow")[e.personalPosition],c=document.getElementsByClassName("beforeTrackIndicator")[e.personalPosition];if(t){if(t.style.left=e.trackValue,2===je.length&&0===e.personalPosition&&!ie){var n=0===nt.current.trackValue?"0":null!==e.trackValue.match(/\d*\.\d*%/g)?e.trackValue.match(/\d*\.\d*%/g)[0].slice(0,5).slice(0,-1):e.trackValue.match(/\d*%/g)[0].slice(0,-1);c.style.width=n+"%"}if(1===je.length||1===e.personalPosition||ie){var a=0===ct.current.trackValue?"0":null!==e.trackValue.match(/\d*\.\d*%/g)?e.trackValue.match(/\d*\.\d*%/g)[0].slice(0,5).slice(0,-1):e.trackValue.match(/\d*%/g)[0].slice(0,-1);
1c.style.width=a+"%"}r.innerHTML="".concat(e.speed," wpm")}}function vt(e){var t=document.getElementsByClassName("placeWon")[e];if(t){if(1===je.length)t.innerHTML="FINISHED";else{var r=1===++de?"1st":"2nd";t.innerHTML=r}t.classList.add("finished")}}var Ot=function(e){return-1===ae.indexOf(e)?"1px":"7px"},wt=function(e){return-1===ae.indexOf(e)?"calc(100% - 21px)":"calc(100% - 26px)"},Tt={init:function(){fe.current.style.display="unset";var e=document.getElementsByClassName("currentTrack")[1],t=document.getElementsByClassName("speedNow")[1],r=document.getElementsByClassName("beforeTrackIndicator")[1];e&&(e.style.left=Ot(je[1].trackstyle),r.style.width="0%",t.innerHTML="0 wpm"),Object(o.a)(Ee.current).forEach((function(e){return e.classList.remove(Me)})),fe.current.value="",ut.current||(ut.current=Math.min.apply(null,Object.keys(it.current))-ct.current.startTime),ct.current={startTime:null,endTime:null,grossWPM:0,trackValue:0,accuracy:ct.current.accuracy,allCharacters:ct.current.allCharacters,incorrectCharacters:ct.current.incorrectCharacters,oldPlayback:ct.current.oldPlayback,indexTrackingBlocks:0,lastWordblockIndexForGraph:0,graphSpeed:[]},se=0,oe=0;var c=document.querySelector(".placeWon");c&&c.classList.remove("finished"),Ce.current.replayTyping1=setTimeout((function(){kt(),Ce.current.replayTyping2=setTimeout((function(){var e=null;for(var t in it.current){if(e)var r=t-e;else{r=0;e=t}var c=setTimeout(Tt.changeValueCallback(it.current[t]),r);Ce.current.replayTypingChars.push(c)}}),ut.current)}),1e3)},startFromCertainPoint:function(e,t){Ce.current.replayTyping1=setTimeout((function(){clearInterval(Ce.current.restartStopwatchInterval),clearInterval(Ce.current.typingCalculator),clearInterval(Ce.current.customTimed),clearTimeout(Ce.current.customTimed2),clearTimeout(Ce.current.replayTyping1),clearTimeout(Ce.current.replayTyping2),clearTimeout(Ce.current.filledStopwatch),Ce.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)})),ie=!0,kt(!0,t);var r=null;for(var c in e){if(r)var n=c-r;else{n=0;r=c}var a=setTimeout(Tt.changeValueCallback(e[c]),n);Ce.current.replayTypingChars.push(a)}}),300)},changeValueCallback:function(e){return function(){if(fe.current&&(fe.current.value=e,fe.current.dispatchEvent(new Event("input",{bubbles:!0})),ie)){document.getElementById("sliderRecord").value=++ue;var t=Object.keys(x),r=Math.round(ue/(t.length-1)*100);document.getElementById("percentRace").innerHTML="".concat(r>100?100:r," / 100%"),ue===Object.keys(x).length&&Bt(document.getElementById("playButton"))}}},challengeCompetitor:function(){for(var e in x){var t=setTimeout(Tt.mimicCompetitorProgress(x[e]),e);Ce.current.replayTypingChars.push(t)}},mimicCompetitorProgress:function(e){return function(){var t=nt.current.indexTrackingBlocks===u.wordBlocks.length-1?u.wordBlocks[nt.current.indexTrackingBlocks]:u.wordBlocks[nt.current.indexTrackingBlocks]+" ";if(e===t){nt.current.indexTrackingBlocks++,nt.current.accumulatingCharacters+=t.length,nt.current.trackValue+=u.jumpingCarValue;var r=16667e-9*(Date.now()-ct.current.startTime);if(yt({speed:Math.round(nt.current.accumulatingCharacters/5/r),trackValue:0===nt.current.trackValue?Ot(je[0].trackstyle):nt.current.indexTrackingBlocks===u.wordBlocks.length?wt(je[0].trackstyle):"calc(".concat(nt.current.trackValue,"% - 15px)"),personalPosition:0}),nt.current.indexTrackingBlocks===u.wordBlocks.length){var c=16667e-9*(Date.now()-ct.current.startTime);yt({speed:Math.round(u.text.length/5/c),trackValue:wt(je[0].trackstyle),personalPosition:0}),vt(0)}}}}},Nt=function(e){ue=e,Bt(document.getElementById("playButton"),!0),fe.current.style.display="unset";var t=document.querySelector(".placeWon");t&&t.classList.remove("finished");var r=Object.keys(x),c=Math.round(ue/(r.length-1)*100);document.getElementById("percentRace").innerHTML="".concat(c>100?100:c," / 100%"),ut.current=r[0]-0;var n=ut.current+ +r[e]-r[0],a=!1,s=0,l=0;for(oe=0,se=0,ct.current.trackValue=0;!a;){l===+e&&(a=!0);var i=s===u.wordBlocks.length-1?u.wordBlocks[s]:u.wordBlocks[s]+" ";x[r[l]]===i&&(s++,se+=i.length,oe+=i.length,ct.current.trackValue+=u.jumpingCarValue),l++}var d=x[r[e]];fe.current.value=d;
1var m=16667e-9*n,g=Math.round(oe/5/m);isNaN(g)&&(g=0),ct.current.grossWPM=g;var p=0===ct.current.trackValue?Ot(je[0].trackstyle):s===u.wordBlocks.length?wt(je[0].trackstyle):"calc(".concat(ct.current.trackValue,"% - 15px)");yt({speed:ct.current.grossWPM,trackValue:p,personalPosition:0}),Object(o.a)(Ee.current).forEach((function(e){e.classList.remove(Me),e.classList.remove("wrong"),e.classList.remove("bottomBorder")}));for(var h=0;h<oe;h++)Ee.current[h]&&Ee.current[h].classList.add(Me);if(d!==u.wordBlocks[s-1]+" "){ke.current.value=!1;var j=0,b=oe;for(ke.current.value=!1;j<d.length&&b<oe+d.length;)u.text[b]===d[j]?ke.current.value?(Ee.current[b].classList.add("wrong"),Ee.current[b].classList.remove(Me)):("withRedBackground"===Ge&&document.getElementById("containerInput").classList.remove("wrong"),Ee.current[b].classList.remove("wrong"),Ee.current[b].classList.add(Me)):u.text[b]&&(ke.current.value=!0,"withRedBackground"===Ge&&document.getElementById("containerInput").classList.add("wrong"),Ee.current[b]||(j=d.length),Ee.current[b]&&(Ee.current[b].classList.remove(Me),Ee.current[b].classList.add("wrong"))),j++,b++}ct.current.indexTrackingBlocks=s},Bt=function(e,t){if(0!==Object.keys(x).length){var r=e.dataset.state;if(document.getElementById("biggerWrapperStopwatch").classList.add("gone"),document.getElementById("stopper").classList.add("fadeIn"),"needToPlay"===r&&!t){0!==ue&&ue!==Object.keys(x).length||Nt(0);var c=Object.keys(x),n=ut.current+ +c[ue]-c[0],a={};if(c.slice(ue,c.length).forEach((function(e){return a[e]=x[e]})),1===Object.keys(a).length)return;ct.current.startTimePlayback=Date.now()-n+302,Tt.startFromCertainPoint(a,~~(n/1e3)),e.dataset.state="needToStop",e.src=U}("needToStop"===r||t)&&(clearInterval(Ce.current.restartStopwatchInterval),clearInterval(Ce.current.typingCalculator),clearInterval(Ce.current.customTimed),clearTimeout(Ce.current.customTimed2),clearTimeout(Ce.current.replayTyping1),clearTimeout(Ce.current.replayTyping2),clearTimeout(Ce.current.filledStopwatch),Ce.current.replayTypingChars.forEach((function(e){return e&&clearTimeout(e)})),e.dataset.state="needToPlay",e.src=Y)}else N.b.error("This race isn't recorded and saved because ".concat(y.user," raced before the Playback update went live."))},It=function(e){if(-1===ae.indexOf(e))return{left:"1px"}},Ct=function(){I.push("/")};function St(){return Lt.apply(this,arguments)}function Lt(){return(Lt=Object(s.a)(a.a.mark((function e(){var t,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("none"!==me){e.next=18;break}return e.prev=1,e.next=4,b.a.get("/api/racetracks/randomGuestJoin");case 4:return t=e.sent,e.abrupt("return",t.data);case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.response.data.spam){e.next=15;break}return N.b.error("Too many requests. You are able to execute this request again in ".concat(e.t0.response.data.spam,".")),e.abrupt("return",void 0);case 15:return e.abrupt("return",{user:"Guest",link:"none",profilePic:"none",trackstyle:"Basic"});case 16:e.next=33;break;case 18:return e.prev=18,e.next=21,b.a.get("/api/profile/getMyName",{headers:{"auth-token":me}});case 21:return r=e.sent,e.abrupt("return",r.data);case 25:if(e.prev=25,e.t1=e.catch(18),!e.t1.response.data.spam){e.next=31;break}N.b.error("Too many requests. You are able to execute this request again in ".concat(e.t1.response.data.spam,".")),e.next=33;break;case 31:return N.b.error(e.t1.response.data),e.abrupt("return",{user:"Guest",link:"none",profilePic:"none",trackstyle:"Basic"});case 33:case"end":return e.stop()}}),e,null,[[1,8],[18,25]])})))).apply(this,arguments)}var Pt=function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{St().then((function(e){void 0!==e&&xe([y,e])}))}catch(t){N.b.error(t.response.data)}case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Array.prototype.equals=function(e){if(!e)return!1;if(this.length!=e.length)return!1;for(var t=0,r=this.length;t<r;t++)if(this[t]instanceof Array&&e[t]instanceof Array){if(!this[t].equals(e[t]))return!1}else if(this[t]!=e[t])return!1;return!0};var Et=function(e,t){var r=u.wordBlocks.slice(ct.current.indexTrackingBlocks,ct.current.indexTrackingBlocks+4),c=t.split(" ").filter((function(e){return""!==e}));if(function(){e.nativeEvent.data&&ct.current.allCharacters++;for(var n=function(e){var t=c.reduce((function(t,r,c){return c<e?t+r.length+1:t}),0);if(c[e]===r[e]){for(var n=t+oe;n<t+oe+c[e].length;n++)Ee.current[n]&&(Ee.current[n].classList.add(Me),Ee.current[n].classList.remove("wrong"));
1"withRedBackground"===Ge&&document.getElementById("containerInput").classList.remove("wrong")}else{var a=r[e].search(/[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]/);if(-1!==a)if(c[e].slice(0,a)===r[e].slice(0,a)){for(var s=t+oe;s<t+oe+c[e].length;s++)Ee.current[s]&&(Ee.current[s].classList.add(Me),Ee.current[s].classList.remove("wrong"));"withRedBackground"===Ge&&document.getElementById("containerInput").classList.remove("wrong"),c[e][a]&&r[e][a]!==c[e][a]&&(Ee.current[t+oe-charactersLengthUntilLastIndex+c[e].length].classList.add("wrong"),"withRedBackground"===Ge&&document.getElementById("containerInput").classList.add("wrong"))}else{for(var o=t+oe;o<t+oe+c[e].length;o++)Ee.current[o]&&(Ee.current[o].classList.add("wrong"),Ee.current[o].classList.remove(Me));"withRedBackground"===Ge&&document.getElementById("containerInput").classList.add("wrong"),-1===r[e].toLowerCase().indexOf(c[e].toLowerCase())&&-1===ke.current.arr.findIndex((function(t){return t===r[e]}))&&ke.current.arr.push(r[e])}else{for(var l=t+oe;l<t+oe+c[e].length;l++)Ee.current[l]&&(Ee.current[l].classList.add("wrong"),Ee.current[l].classList.remove(Me));"withRedBackground"===Ge&&document.getElementById("containerInput").classList.add("wrong"),-1===r[e].toLowerCase().indexOf(c[e].toLowerCase())&&-1===ke.current.arr.findIndex((function(t){return t===r[e]}))&&ke.current.arr.push(r[e])}}},a=0;a<c.length&&a<r.length;a++)n(a);for(var s=se+t.length;s<le+1;s++)Ee.current[s]&&(Ee.current[s].classList.remove(Me),Ee.current[s].classList.remove("wrong"));if(le=se+t.length,"withCursor"===De){var o=se+fe.current.selectionStart-1;if(-1===o&&ft(),!Ee.current[o])return;We.current.animate([{top:Ee.current[o].offsetTop-6+"px",left:Ee.current[o].offsetLeft+Ee.current[o].offsetWidth+rt.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==Xe||ke.current.value?0:Qe})}var l=c[0]===r[0]?c[1]===r[1]?c[2]===r[2]?c[3]===r[3]?3:2:1:0:-1;if(-1!==l){for(var i=0;i<=l;i++)document.getElementById("steno").children[i]&&document.getElementById("steno").children[i].classList.add("correct");for(var u=l+1;u<3;u++)document.getElementById("steno").children[u]&&document.getElementById("steno").children[u].classList.remove("correct")}}(),r.equals(c)){if(c[1]&&c[2]){var n=c[0];se+=n.length+1,oe+=n.length+1,fe.current.value=c.slice(1,c.length).join(" "),ct.current.trackValue+=u.jumpingCarValue,ct.current.indexTrackingBlocks++}var a=u.stenoStrokes.slice(ct.current.indexTrackingBlocks,ct.current.indexTrackingBlocks+4);if(gt(a),document.getElementById("steno").children[3]&&document.getElementById("steno").children[3].classList.remove("correct"),u.wordBlocks.length-ct.current.indexTrackingBlocks===3){ct.current.endTime=Date.now();for(var s=1;s<c.length;s++)if(s===c.length-1){var o=c[s];se+=o.length,fe.current.value="",oe+=o.length,ct.current.trackValue+=u.jumpingCarValue,ct.current.indexTrackingBlocks++}else{var l=c[s];se+=l.length+1,fe.current.value=c.slice(1,c.length).join(" "),oe+=l.length+1,ct.current.trackValue+=u.jumpingCarValue,ct.current.indexTrackingBlocks++}gt(u.stenoStrokes.slice(0,4)),document.getElementById("steno").style.display="none",fe.current.style.display="none",ct.current.trackValue=100,fe.current.disabled=!0,clearInterval(Ce.current.typingCalculator);var i=ie?16667e-9*(ct.current.endTime-ct.current.startTimePlayback):16667e-9*(ct.current.endTime-ct.current.startTime),d=Math.round(oe/5/i);ct.current.grossWPM=d,2===je.length&&(yt({speed:ct.current.grossWPM,trackValue:wt(je[1].trackstyle),personalPosition:1}),vt(1)),ct.current.incorrectCharacters=ct.current.allCharacters-u.text.length;var m=u.text.length/ct.current.allCharacters*100;ct.current.accuracy=m%1===0?m:(m+"").split(".")[1]&&"0"===(m+"").split(".")[1][0]?Math.round(m):m.toFixed(1);var g=(ct.current.endTime-ct.current.startTime)/1e3;if(ct.current.secondsWritten=(g+"").split(".")[1]&&"0"===(g+"").split(".")[1][0]?Math.round(g):g.toFixed(2),!ie){var p=u.wordBlocks.slice(ct.current.lastWordblockIndexForGraph,ct.current.indexTrackingBlocks);0!==p.length&&ct.current.graphSpeed.push({wordblocks:p,speed:ct.current.grossWPM,time:+ct.current.secondsWritten})}ie||(Ie(!0),0===ct.current.oldPlayback&&(ct.current.oldPlayback=ct.current.startTime))}}},Wt=function(){var e=Object(s.a)(a.a.mark((function e(){var t,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("none"!==me){e.next=3;break}return N.b.error("You must be logged in to use this feature"),e.abrupt("return");case 3:if(null===Le){e.next=5;break}return e.abrupt("return");case 5:return t={racetrackID:u._id},e.prev=6,e.next=9,b.a.post("/api/racetracks/fetchMyLatestTenScores",t,{headers:{"auth-token":me}});case 9:r=e.sent,Pe(r.data),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),N.b.error(e.t0.response.data);case 16:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(){return e.apply(this,arguments)}}();function Rt(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=Object(s.a)(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.a.post("/api/racetracks/saveScorePracticePremium",t,{headers:{"auth-token":me}});case 3:r=e.sent,be(r.data.avgLast10),N.b.success("Successfully saved !"),r.data.didBreakToptime&&N.b.success(Object(i.jsxs)(g.a.Fragment,{children:[Object(i.jsx)("div",{style:{marginBottom:"30px"},children:"You have just broken a world record for this quote and got into the toptimes list."}),Object(i.jsx)("div",{children:"Congratulations! \ud83e\udd73"})]})),r.data.didBreakHighscore&&N.b.success(Object(i.jsxs)("div",{children:["You have just broken your fastest high score with ",Object(i.jsx)("b",{children:"".concat(ct.current.grossWPM," wpm")})]})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),N.b.error(e.t0.response.data);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}var Vt=function(e){if(Object.keys(it.current)[0].length>6){for(var t=0,r=[],n=Object.keys(it.current),a=0;a<n.length;a++){var s=t===u.wordBlocks.length-1?u.wordBlocks[t]:u.wordBlocks[t]+" ",o=n[a]-ct.current.oldPlayback<0?0:t===u.wordBlocks.length-1?(n[a]-ct.current.oldPlayback)/10:~~((n[a]-ct.current.oldPlayback)/10);if("steno"===e)-1!==it.current[n[a]].indexOf(s)&&(r.push(o),t++);else{if(void 0!==it.current[n[a-1]]){var l=u.wordBlocks[t-1]+" ";it.current[n[a-1]].length-it.current[n[a]].length!==-1&&it.current[n[a-1]]!==l&&r.push({t:it.current[n[a-1]].length-it.current[n[a]].length+1})}-1!==s.indexOf(it.current[n[a]])?(r.push(o),s===it.current[n[a]]&&t++):r.push(Object(c.a)({},o,it.current[n[a]]))}}return r}};return Object(i.jsxs)(h.a,{duringRace:!0,children:[Object(i.jsx)(N.a,{}
1),Object(i.jsx)(k.a,{children:Object(i.jsx)("meta",{name:"robots",content:"noindex, nofollow",className:"jsx-521748964"})}),Object(i.jsx)(T.a,{title:"".concat(y.user,"'s Race History (").concat(f.speed," WPM)"),description:"Race history of ".concat(y.user,". Achieved ").concat(f.speed," WPM with ").concat(f.accuracy,"% accuracy in ").concat(new Date(f.date).toLocaleDateString("en-GB"),'. "').concat(u.text,'". \n TypiNation is a multiplayer community typing game where you can compete & improve your typing speed along with other players all around the world.'),keywords:[y.user,y.link]}),Object(i.jsxs)("div",{className:"jsx-521748964 "+((Be?"racingTemplate duringRace":"racingTemplate duringRace didntFinishRace raceHistory")||""),children:[!Be&&Object(i.jsx)("div",{id:"backgroundImageTheme",onClick:function(){return fe.current.focus()},className:"jsx-521748964"}),Object(i.jsxs)("h1",{className:"jsx-521748964 duringRace",children:["Race History (",y.user,")"]}),ot&&Object(i.jsx)("div",{id:"darkness",className:"jsx-521748964",children:Object(i.jsx)(L.a,{user:me,fetchResultsDB:Rt,dataToDeliver:at.current,setNeedsAnticheat:lt,toastConfirmedAnticheat:function(){N.b.success("Successfully verified anticheat")}})}),Object(i.jsxs)("div",{className:"jsx-521748964 wrapperRace",children:[Object(i.jsxs)("div",{id:"stopper",className:"jsx-521748964",children:["Time passed: ",Object(i.jsx)("span",{id:"minutes",className:"jsx-521748964",children:"00"}),":",Object(i.jsx)("span",{id:"seconds",className:"jsx-521748964",children:"00"})]}),je.map((function(e,t){return Object(i.jsx)(g.a.Fragment,{children:Object(i.jsxs)("div",{className:"jsx-521748964 "+((e.left?"raceblock left":"raceblock")||""),children:[Object(i.jsx)("div",{className:"jsx-521748964 placeWon"}),Object(i.jsxs)("div",{className:"jsx-521748964 lineTrackWrapper",children:[Object(i.jsx)("div",{className:"jsx-521748964 beforeTrackIndicator"}),Object(i.jsx)("div",{style:(r=e.trackstyle,"Fairy"===r||"Crystal"===r?{backgroundImage:"url('".concat(X,"')")}:"Flamey"===r?{backgroundImage:"url('".concat(z,"')")}:"Electric"===r?{backgroundImage:"url('".concat(J,"')")}:"Veiny"===r?{backgroundImage:"url('".concat(Q,"')")}:"Wavey"===r?{backgroundImage:"url('".concat(Z,"')")}:"Tiger"===r?{backgroundImage:"url('".concat($,"')")}:"RedPolygon"===r?{backgroundImage:"url('".concat(ee,"')")}:"Abstract"===r?{backgroundImage:"url('".concat(te,"')")}:"Artisitic"===r?{backgroundImage:"url('".concat(re,"')")}:"Wood"===r?{backgroundImage:"url('".concat(ce,"')")}:"Parquet"===r?{backgroundImage:"url('".concat(ne,"')")}:void 0),className:"jsx-521748964 "+("lineTrack "+e.trackstyle||!1),children:Object(i.jsxs)("div",{style:It(e.trackstyle),className:"jsx-521748964 currentTrack",children:[Object(i.jsx)("img",{src:"none"===e.profilePic?R:e.profilePic,alt:"Profile picture",className:"jsx-521748964 profilePictureRace"}),"none"!==e.link?Object(i.jsx)(v.a,{href:"/profile/[uniqueLink]",as:"/profile/".concat(e.link),children:Object(i.jsx)("a",{className:"jsx-521748964 racersName",children:e.user})}):Object(i.jsx)("div",{className:"jsx-521748964 racersName guest",children:e.user})]})})]}),Object(i.jsx)("span",{className:"jsx-521748964 speedNow",children:"0 wpm"})]})},t);var r})),Object(i.jsx)("div",{id:"biggerWrapperStopwatch",className:"jsx-521748964",children:Object(i.jsxs)("div",{className:"jsx-521748964 stopwatchWrapper",children:[Object(i.jsx)("div",{id:"filledStopwatch",className:"jsx-521748964"}),1===je.length?Object(i.jsx)("span",{className:"jsx-521748964",children:"Press Play to start"}):Object(i.jsx)(g.a.Fragment,{children:0!==we?Object(i.jsxs)("span",{className:"jsx-521748964",children:["Time to start: ",null===we?"10":we," seconds."]}):Object(i.jsx)("span",{className:"jsx-521748964",children:"GO GO GO"})})]})}),Object(i.jsxs)("div",{id:"trackTextWrapper",style:{direction:"ltr"},className:"jsx-521748964",children:[Object(i.jsx)("span",{id:"cursor",ref:We,className:"jsx-521748964 "+(("yesBlink"===et?"blinking":"")||""),children:"|"}),ve.map((function(e,t){return Object(i.jsxs)("pre",{className:"jsx-521748964",children:[e.split("").map((function(e,t){return Object(i.jsx)("span",{className:"jsx-521748964 lettersTrack",children:e},e+t)})),t!==u.wordBlocks.length-1&&Object(i.jsx)("span",{className:"jsx-521748964 lettersTrack space",children:" "})]},e+t)}))]}),mt.length>0&&Object(i.jsx)("div",{id:"steno",className:"jsx-521748964",children:mt.map((function(e){return Object(i.jsx)("span",{className:"jsx-521748964",children:e},C.a.generate())}))}),Object(i.jsx)("div",{id:"containerInput",className:"jsx-521748964",children:Object(i.jsx)("input",(t={type:"text",id:"userInputTrack",ref:fe,maxLength:"80",placeholder:"Get ready to type the quote above",disabled:!0,autoComplete:"off",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",onKeyDown:function(e){return function(e){if("withoutCursor"!==De&&!/Android/i.test(navigator.userAgent)){e.persist();
1var t=37===e.keyCode?-1:39===e.keyCode?1:0;if(0!==t){var r=se+fe.current.selectionStart-1+t;-1===r&&ft(),Ee.current[r]&&We.current.animate([{top:Ee.current[r].offsetTop-6+"px",left:Ee.current[r].offsetLeft+Ee.current[r].offsetWidth+rt.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==Xe||ke.current.value?0:Qe})}}}(e)},onPaste:function(e){return e.preventDefault()},onInput:function(e){return function(e,t){if(we>0&&2===je.length)return alert("you fkn hacker nab, the race didn't start"),void Ct();if(e.persist(),"yesBlink"===et&&We.current.classList.remove("blinking"),Be||2!==je.length||(it.current[Date.now()]=t),"yesSteno"!==Ye||ie){!function(e){e.nativeEvent.data&&ct.current.allCharacters++,""===t&&"withRedBackground"===Ge&&document.getElementById("containerInput").classList.remove("wrong");var r=0,c=oe;for(ke.current.value=!1;r<t.length&&c<u.text.length;)u.text[c]===t[r]?ke.current.value?(Ee.current[c].classList.add("wrong"),Ee.current[c].classList.remove(Me)):("withRedBackground"===Ge&&document.getElementById("containerInput").classList.remove("wrong"),Ee.current[c].classList.remove("wrong"),Ee.current[c].classList.add(Me)):(ke.current.value=!0,"withRedBackground"===Ge&&document.getElementById("containerInput").classList.add("wrong"),Ee.current[c]?(Ee.current[c].classList.remove(Me),Ee.current[c].classList.add("wrong"),-1===ke.current.arr.findIndex((function(e){return e===u.wordBlocks[ct.current.indexTrackingBlocks]}))&&ke.current.arr.push(u.wordBlocks[ct.current.indexTrackingBlocks])):r=t.length),r++,c++;for(var n=se+t.length;n<le;n++)Ee.current[n]&&(Ee.current[n].classList.remove(Me),Ee.current[n].classList.remove("wrong"));if(le=se+t.length,"withCursor"===De){var a=se+fe.current.selectionStart-1;if(-1===a&&ft(),!Ee.current[a])return;We.current.animate([{top:Ee.current[a].offsetTop-6+"px",left:Ee.current[a].offsetLeft+Ee.current[a].offsetWidth+rt.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==Xe||ke.current.value?0:Qe}),"yesBlink"===et&&We.current.classList.add("blinking")}}(e);var r=ct.current.indexTrackingBlocks===u.wordBlocks.length-1?u.wordBlocks[ct.current.indexTrackingBlocks]:u.wordBlocks[ct.current.indexTrackingBlocks]+" ";if(0===ct.current.indexTrackingBlocks&&"correctColor"===Me)for(var c=se;c<se+r.length-1;c++)Ee.current[c].classList.add("bottomBorder");if(t.slice(0,r.length)===r){for(var n=!0;n;){if("correctColor"===Me){for(var a=se;a<se+r.length-1;a++)Ee.current[a].classList.remove("bottomBorder");if(u.wordBlocks[ct.current.indexTrackingBlocks+1])for(var s=ct.current.indexTrackingBlocks+1===u.wordBlocks.length-1?u.wordBlocks[ct.current.indexTrackingBlocks+1]:u.wordBlocks[ct.current.indexTrackingBlocks+1]+" ",l=se+r.length;l<se+r.length+s.length-1;l++)Ee.current[l].classList.add("bottomBorder")}if(window.innerWidth<720){for(var i=se;i<se+r.length;i++)Ee.current[i].style.display="none";if("withCursor"===De){var d=se+r.length;Ee.current[d]&&We.current.animate([{top:Ee.current[d].offsetTop-6+"px",left:Ee.current[d].offsetLeft+rt.current-4+"px"}],{fill:"forwards",duration:"yesSmooth"!==Xe||ke.current.value?0:Qe})}}if(se+=r.length,oe+=r.length,ct.current.trackValue+=u.jumpingCarValue,ct.current.indexTrackingBlocks++,fe.current.value=fe.current.value.slice(r.length,fe.current.value.length),r=ct.current.indexTrackingBlocks===u.wordBlocks.length-1?u.wordBlocks[ct.current.indexTrackingBlocks]:u.wordBlocks[ct.current.indexTrackingBlocks]+" ",fe.current.value.slice(0,r.length)!==r){n=!1;for(var m=se+t.length;m<le;m++)Ee.current[m]&&(Ee.current[m].classList.remove(Me),Ee.current[m].classList.remove("wrong"));le=se}}if(fe.current.value="",ct.current.indexTrackingBlocks===u.wordBlocks.length){ct.current.endTime=Date.now(),window.innerWidth<720&&(Object(o.a)(Ee.current).forEach((function(e){return e.style.display="unset"})),document.getElementById("trackTextWrapper").style.whiteSpace="normal"),fe.current.style.display="none",ct.current.trackValue=100,fe.current.disabled=!0,clearInterval(Ce.current.typingCalculator);var g=ie?16667e-9*(ct.current.endTime-ct.current.startTimePlayback):16667e-9*(ct.current.endTime-ct.current.startTime),p=Math.round(oe/5/g);ct.current.grossWPM=p,1===je.length&&(yt({speed:ct.current.grossWPM,trackValue:wt(je[0].trackstyle),personalPosition:0}),vt(0)),2===je.length&&(yt({speed:ct.current.grossWPM,trackValue:wt(je[1].trackstyle),personalPosition:1}),vt(1)),ct.current.incorrectCharacters=ct.current.allCharacters-u.text.length;var h=u.text.length/ct.current.allCharacters*100;ct.current.accuracy=h%1===0?h:(h+"").split(".")[1]&&"0"===(h+"").split(".")[1][0]?Math.round(h):h.toFixed(1);var j=(ct.current.endTime-ct.current.startTime)/1e3;if(ct.current.secondsWritten=(j+"").split(".")[1]&&"0"===(j+"").split(".")[1][0]?Math.round(j):j.toFixed(2),!ie){var x=u.wordBlocks.slice(ct.current.lastWordblockIndexForGraph,ct.current.indexTrackingBlocks);0!==x.length&&ct.current.graphSpeed.push({wordblocks:x,speed:ct.current.grossWPM,time:+ct.current.secondsWritten})}ie||(Ie(!0),0===ct.current.oldPlayback&&(ct.current.oldPlayback=ct.current.startTime))}}}else Et(e,t)}(e,fe.current.value)}},Object(c.a)(t,"autoComplete","off"),Object(c.a)(t,"style",{direction:"ltr",marginBottom:"17px"}
1),Object(c.a)(t,"className","jsx-521748964"),t))}),Object(i.jsxs)("div",{id:"finishedRaceDetails",className:"jsx-521748964",children:[1===je.length&&Object(i.jsxs)("div",{id:"slideContainer",className:"jsx-521748964 shown",children:[Object(i.jsxs)("div",{id:"replayTitle",className:"jsx-521748964",children:["Replay Playback ",Object(i.jsxs)("span",{className:"jsx-521748964",children:["(",new Date(f.date).toLocaleDateString("en-GB")+" "+new Date(f.date).getHours()+":"+new Date(f.date).getMinutes(),")"]})]}),Object(i.jsxs)("div",{id:"userScore",className:"jsx-521748964",children:[Object(i.jsx)(v.a,{href:"/profile/[uniqueLink]",as:"/profile/".concat(y.link),children:Object(i.jsx)("a",{className:"jsx-521748964",children:Object(i.jsx)("b",{className:"jsx-521748964",children:y.user})})})," scored ",Object(i.jsxs)("b",{className:"jsx-521748964",children:[f.speed," WPM"]})," with ",Object(i.jsxs)("b",{className:"jsx-521748964",children:[f.accuracy,"% accuracy"]}),Object.keys(x).length===u.wordBlocks.length&&Object(i.jsxs)("div",{id:"infoStenoScore",className:"jsx-521748964",children:[Object(i.jsxs)("span",{className:"jsx-521748964",children:[y.user," typed this quote using stenography mode"]}),Object(i.jsx)("img",{src:q,alt:"plover",title:"plover",className:"jsx-521748964"})]})]}),Object(i.jsxs)("div",{id:"flexSlider",className:"jsx-521748964",children:[Object(i.jsx)("img",{id:"playButton",src:Y,alt:"play and stop playback",onClick:function(e){return Bt(e.target)},"data-state":"needToPlay",className:"jsx-521748964"}),Object(i.jsxs)("div",{id:"infoReplay",className:"jsx-521748964",children:["Click the button to play / pause the playback",Object(i.jsx)("div",{className:"jsx-521748964",children:"Drag the slider to move forwards / backwards"})]}),Object(i.jsx)("div",{id:"percentRace",className:"jsx-521748964",children:"0 / 100%"})]}),Object(i.jsx)("input",{type:"range",min:"0",max:Object.keys(x).length-1,defaultValue:"0",step:"1",id:"sliderRecord",onChange:function(e){return Nt(e.target.value)},className:"jsx-521748964"})]}),!Be&&Object(i.jsxs)("div",{className:"jsx-521748964 buttonOptionsWrapper",children:[Object(i.jsxs)("button",{onClick:function(){return Ct()},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:H,alt:"go back homepage",className:"jsx-521748964"}),"Go back homepage"]}),1===je.length&&Object(i.jsxs)("button",{onClick:function(){return Pt()},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:A,alt:"start new race",className:"jsx-521748964"}),"Challenge ",y.user]}),2===je.length&&Object(i.jsxs)(g.a.Fragment,{children:[Object(i.jsxs)("button",{onClick:bt,className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:_,alt:"start over / practice this quote",className:"jsx-521748964"}),"Start over"]}),Object(i.jsxs)("button",{onClick:function(){xe([y])},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:G,alt:"replay opponent's typing",className:"jsx-521748964"}),y.user,"'s Replay Playback"]})]})]}),Be&&Object(i.jsxs)(g.a.Fragment,{children:[Object(i.jsx)("h3",{className:"jsx-521748964",children:"Personal Typing Analysis"}),Object(i.jsxs)("div",{className:"jsx-521748964 buttonOptionsWrapper",children:[Object(i.jsxs)("button",{onClick:function(){return Ct()},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:H,alt:"go back homepage",className:"jsx-521748964"}),"Go back homepage"]}),1===je.length&&Object(i.jsx)(g.a.Fragment,{children:Object(i.jsxs)("button",{onClick:function(){return Pt()},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:A,alt:"start new race",className:"jsx-521748964"}),"Challenge ",y.user]})}),2===je.length&&Object(i.jsxs)(g.a.Fragment,{children:[Object(i.jsxs)("button",{onClick:bt,className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:_,alt:"start over / practice this quote",className:"jsx-521748964"}),"Start over"]}),Object(i.jsxs)("button",{onClick:function(){return se=0,oe=0,clearInterval(Ce.current.restartStopwatchInterval),clearInterval(Ce.current.typingCalculator),clearInterval(Ce.current.customTimed),clearTimeout(Ce.current.customTimed2),clearTimeout(Ce.current.replayTyping1),clearTimeout(Ce.current.replayTyping2),clearTimeout(Ce.current.filledStopwatch),Ce.current.replayTypingChars.forEac
1h((function(e){return e&&clearTimeout(e)})),"yesSteno"===Ye&&(document.getElementById("steno").style.display="block"),void Tt.init()},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:G,alt:"replay my typing",className:"jsx-521748964"}),"Replay My Typing"]}),Object(i.jsxs)("button",{onClick:function(){xe([y])},className:"jsx-521748964 buttonOption",children:[Object(i.jsx)("img",{src:G,alt:"replay opponent's typing",className:"jsx-521748964"}),y.user,"'s Replay Playback"]})]})]}),Object(i.jsxs)("p",{className:"jsx-521748964",children:["You've just typed a quote written by ",Object(i.jsx)("i",{className:"jsx-521748964",children:u.author})," in challenge mode (record isn't saved)."]}),"none"!==me&&Object(i.jsxs)("div",{id:"saveRecord",onClick:function(){return function(){var e=Vt("yesSteno"===Ye?"steno":"");at.current={charactersTyped:ct.current.allCharacters,totalRaceTime:ct.current.endTime-ct.current.startTime,racetrackID:u._id,speed:ct.current.grossWPM,accuracy:ct.current.accuracy,date:new Date,playback:e},ct.current.grossWPM<100?Rt(at.current):function(){var e=Object(s.a)(a.a.mark((function e(){var t,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={speed:Math.floor(.85*ct.current.grossWPM)},e.next=4,b.a.post("/api/racetracks/isVerifiedAnticheat",t,{headers:{"auth-token":me}});case 4:return r=e.sent,e.abrupt("return",r.data);case 8:e.prev=8,e.t0=e.catch(0),N.b.error(e.t0.response.data);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}()().then((function(e){e?Rt(at.current):lt(!0)}))}()},className:"jsx-521748964",children:["Click here to save your record",Object(i.jsx)("div",{className:"jsx-521748964",children:"(Available once per day for premium members)"})]}),"none"===me&&Object(i.jsx)(v.a,{href:"/signin",children:Object(i.jsx)("a",{style:{color:"#5480ff",fontWeight:"bold",textAlign:"center",display:"block",border:"1px solid black",padding:"5px",margin:"15px 0"},className:"jsx-521748964 guestSignUp",children:"To register and save your records you can sign up by clicking here"})}),Object(i.jsxs)("div",{className:"jsx-521748964 wrapperScores",children:[Object(i.jsxs)("div",{className:"jsx-521748964 needSmallFont",children:[Object(i.jsx)("img",{src:D,className:"jsx-521748964"}),Object(i.jsxs)("div",{className:"jsx-521748964 specificScore",children:[Object(i.jsxs)("b",{className:"jsx-521748964",children:[Object(i.jsxs)("div",{className:"jsx-521748964 "+((ct.current.allCharacters!==u.text.length?"incorrectChars":"correctChars")||""),children:[ct.current.allCharacters," total"]}),Object(i.jsxs)("div",{className:"jsx-521748964 correctChars",children:[u.text.length," correct"]})]}),Object(i.jsx)("span",{className:"jsx-521748964",children:"Characters"})]})]}),Object(i.jsxs)("div",{className:"jsx-521748964",children:[Object(i.jsx)("img",{src:F,className:"jsx-521748964"}),Object(i.jsxs)("div",{className:"jsx-521748964 specificScore",children:[Object(i.jsx)("b",{className:"jsx-521748964",children:ct.current.grossWPM}),Object(i.jsx)("span",{className:"jsx-521748964",children:"WPM"})]})]}),Object(i.jsxs)("div",{className:"jsx-521748964",children:[Object(i.jsx)("img",{src:M,className:"jsx-521748964"}),Object(i.jsxs)("div",{className:"jsx-521748964 specificScore",children:[Object(i.jsxs)("b",{className:"jsx-521748964",children:[isNaN(ct.current.accuracy)?"0":ct.current.accuracy,"%"]}),Object(i.jsx)("span",{className:"jsx-521748964",children:"Accuracy"})]})]}),Object(i.jsxs)("div",{className:"jsx-521748964 needSmallFont",children:[Object(i.jsx)("img",{src:V,className:"jsx-521748964"}),Object(i.jsxs)("div",{className:"jsx-521748964 specificScore",children:[Object(i.jsx)("b",{className:"jsx-521748964",children:function(e){if(e<60)return"".concat(e," seconds");var t=Math.floor(e/60),r=t>1?"minutes":"minute",c=e%60,n=c>1?"seconds":"second";if(c%1===0){var a=c;return"".concat(t," ").concat(r,", ").concat(a," ").concat(n)}var s=(c+"").split(".")[1]&&"0"===(c+"").split(".")[1][0]?Math.round(c):c.toFixed(2);return"".concat(t," ").concat(r,", ").concat(s," ").concat(n)}(ct.current.secondsWritten)}),Object(i.jsx)("span",{className:"jsx-521748964",children:"Time finished"})]})]})]}),Object(i.jsx)(O.a,{typing:ct}),0===ke.current.arr.length?Object(i.jsxs)("div",{className:"jsx-521748964",children:["You got ",Object(i.jsx)("b",{className:"jsx-521748964",children:ct.current.incorrectCharacters})," typos and in total ",Object(i.jsx)("b",{className:"jsx-521748964",children:ke.current.arr.length})," incorrect words, congratulations \ud83d\udc4f!"]}):Object(i.jsxs)(g.a.Fragment,{children:[1===ke.current.arr.length?Object(i.jsxs)("div",{className:"jsx-521748964",children:["You got ",Object(i.jsx)("b",{className:"jsx-521748964",children:ct.current.incorrectCharacters})," typos and in total only ",Object(i.jsx)("b",{className:"jsx-521748964",children:ke.current.arr.length})," incorrect word:"]}):Object(i.jsxs)("div",{className:"jsx-521748964",children:["You got ",Object(i.jsx)("b",{className:"jsx-521748964",children:ct.current.incorrectCharacters})," typos and in total ",Object(i.jsx)("b",{className:"jsx-521748964",children:ke.current.arr.length})," incorrect words:"]}),Object(i.jsx)("ul",{id:"mistakesList",className:"jsx-521748964",children:ke.current.arr.map((function(e){return Object(i.jsx)("li",{className:"jsx-521748964",children:e},e)}))})]}),null===Le?Object(i.jsxs)("div",{id:"showMyLatestScores",onClick:function(){return Wt()},className:"jsx-521748964",children:[Object(i.jsx)("b",{className:"jsx-521748964",children:"Click here"})," to see your 10 last scores for this specific racetrack"]}):Object(i.jsx)("div",{id:"showMyLatestScores",style:{cursor:"unset"}
1,className:"jsx-521748964",children:Object(i.jsx)("b",{className:"jsx-521748964",children:"Your Latest 10 Scores For This Quote"})}),Object(i.jsx)("div",{id:"wrapperLatestTenScores",className:"jsx-521748964 "+((null===Le?"hidden":void 0)||""),children:null!==Le&&Object(i.jsx)(g.a.Fragment,{children:0===Le.length?Object(i.jsx)("div",{className:"jsx-521748964",children:"You don't have any saved records for this specific racetrack."}):Object(i.jsxs)("table",{className:"jsx-521748964",children:[Object(i.jsx)("thead",{className:"jsx-521748964",children:Object(i.jsxs)("tr",{className:"jsx-521748964",children:[Object(i.jsx)("th",{className:"jsx-521748964",children:"No."}),Object(i.jsx)("th",{className:"jsx-521748964",children:"Speed"}),Object(i.jsx)("th",{className:"jsx-521748964",children:"Accuracy"}),Object(i.jsx)("th",{className:"jsx-521748964",children:"Date"})]})}),Object(i.jsx)("tbody",{className:"jsx-521748964",children:Le.map((function(e,t){return Object(i.jsxs)("tr",{className:"jsx-521748964",children:[Object(i.jsx)("td",{className:"jsx-521748964",children:t+1}),Object(i.jsx)("td",{className:"jsx-521748964",children:"".concat(e.speed," wpm")}),Object(i.jsx)("td",{className:"jsx-521748964",children:"".concat(e.accuracy,"%")}),Object(i.jsx)("td",{"data-type":"date",className:"jsx-521748964",children:new Date(e.date).toLocaleDateString("en-GB")})]},e._id)}))})]})})})]}),Object(i.jsx)(w.a,{trackInfo:u})]})]})]}),!Be&&Object(i.jsxs)(g.a.Fragment,{children:[Object(i.jsxs)("div",{id:"openChangeThemeSettings",onClick:function(){document.querySelector(".didntFinishRace").classList.add("openedThemeSettings"),document.getElementById("changeThemeSettings").classList.add("opened")},className:"jsx-521748964",children:[Object(i.jsx)("img",{src:K,alt:"Change Theme Settings",title:"Change Theme Settings",className:"jsx-521748964"}),Object(i.jsx)("span",{className:"jsx-521748964",children:"Theme"})]}),Object(i.jsx)(W.a,{styleOfText:Me,wantsCursor:De,wantsRedBackgroundInput:Ge,cursorDOM:We,setChangedThemeDisplay:xt,offsetFontCursor:rt,isCustom:pt.current})]}),Object(i.jsx)(B.a,{user:me}),Object(i.jsx)(d.a,{id:"521748964",children:[".racingTemplate.duringRace.didntFinishRace.raceHistory.jsx-521748964{padding-top:85px;height:unset;}","#userScore.jsx-521748964{margin:20px 0;text-align:center;border-bottom:1px solid #cecece;padding-bottom:10px;}","#userScore.jsx-521748964 b.jsx-521748964{font-weight:600;}","#flexSlider.jsx-521748964{margin:15px 0;}","#slideContainer.jsx-521748964{margin:10px auto 30px auto;}","#darkness.jsx-521748964{position:fixed;left:0;top:0;width:100vw;height:100vh;background:rgba(0,0,0,0.6);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;z-index:5;}","#trackTextWrapper.pagination.jsx-521748964{max-height:95px;overflow:hidden;}","#infoStenoScore.jsx-521748964{margin-top:20px;font-size:15px;white-space:break-spaces;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}","#infoStenoScore.jsx-521748964 img.jsx-521748964{margin-left:10px;}"]})]})}},"uNx/":function(e,t,r){"use strict";r.r(t);var c=r("nKUr"),n=r("MX0m"),a=r.n(n),s=(r("q1tI"),r("CafY")),o=r("UkKX"),l=r("8Kt/"),i=r.n(l),u=r("YFqc"),d=r.n(u),m=r("2SDt");function g(e){var t=e.type,r=0===t.indexOf("user")?"Profile not found":0===t.indexOf("private")?"Private racetrack not found":0===t.indexOf("race")?"Race history not found":"Page not found";return Object(c.jsxs)(s.a,{children:[Object(c.jsx)(o.a,{title:r}),Object(c.jsx)(i.a,{children:Object(c.jsx)("meta",{name:"robots",content:"noindex, nofollow",className:"jsx-803557229"})}),Object(c.jsx)("div",{id:"errorPageContainer",className:"jsx-803557229",children:Object(c.jsxs)("div",{id:"errorPageContent",className:"jsx-803557229",children:[Object(c.jsx)("div",{id:"errorImageWrapper",className:"jsx-803557229",children:Object(c.jsx)("img",{src:m,alt:"Error 404 Page not found",className:"jsx-803557229"})}),Object(c.jsxs)("div",{className:"jsx-803557229",children:["We are sorry - ",t," not found ",Object(c.jsx)("br",{className:"jsx-803557229"}),"Make sure the provided URL is correct"]}),Object(c.jsxs)("div",{id:"report",className:"jsx-803557229",children:["If you think the provided URL is correct, feel free to ",Object(c.jsx)("a",{href:"mailto:[email protected]",className:"jsx-803557229 links",children:"email"})," us about this bug or share this bug in ",Object(c.jsx)("a",{href:"https://discord.gg/SwzsvT3",target:"_blank",className:"jsx-803557229 links",children:"Discord"})]}),Object(c.jsx)(d.a,{href:"/",children:Object(c.jsx)("a",{className:"jsx-803557229 buttonOption",children:"Go Back Homepage"})})]})}),Object(c.jsx)(a.a,{id:"803557229",children:['#errorPageContent.jsx-803557229{background:#f1f1f1;width:450px;text-align:center;max-width:100%;padding:15px;border-radius:10px;font-family:"Nunito";font-size:24px;}',".buttonOption.jsx-803557229{display:block;}",".links.jsx-803557229{color:#3851ff;-webkit-text-decoration:underline;text-decoration:underline;}","#report.jsx-803557229{font-size:16px;margin:15px 0;}","#errorImageWrapper.jsx-803557229{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;
1-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;margin-bottom:20px;}","#errorPageContainer.jsx-803557229{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:calc(100vh - 60px);position:absolute;top:60px;width:100%;background:rgba(0,0,0,0.3);}","img.jsx-803557229{max-width:95%;border-radius:50%;}","@media screen and (max-width:1060px){#errorPageContainer.jsx-803557229{top:0;height:calc(100vh - 50px);}}"]})]})}g.defaultProps={type:"Page"},t.default=g}},[["nLOn",0,2,6,7,1,3,4,5,8,13]]]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.